.tsContainer {
	display: flex;
	flex-direction: column;
	height: 100vh;
	padding: 1rem 1.5rem;
	box-sizing: border-box;
}

.tsHeader {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 0.75rem;
	flex-shrink: 0;
	position: relative;
}

.tsHeader h1 {
	margin: 0;
	font-size: 1.4rem;
	flex: 1;
}

#tsMessage {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	font-size: 0.9rem;
	color: #666;
	pointer-events: none;
}

.tsInfoBox {
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #f7f7f7;
	padding: 0.35rem 0.75rem;
	font-size: 0.85rem;
	line-height: 1.6;
	white-space: nowrap;
}

.tsRefreshBtn {
	padding: 0.35rem 0.75rem;
	font-size: 0.85rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #f7f7f7;
	cursor: pointer;
	white-space: nowrap;
}

.tsRefreshBtn:hover {
	background: #e8e8e8;
}

.tsRefreshBtn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.tsInfoBoxTitle {
	cursor: pointer;
	font-weight: 600;
	font-size: 0.85rem;
	user-select: none;
	list-style: none;
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

.tsInfoBoxTitle::before {
	content: '▶';
	font-size: 0.65rem;
	transition: transform 0.15s;
}

details[open] > .tsInfoBoxTitle::before {
	transform: rotate(90deg);
}

.tsInfoBoxTitle::-webkit-details-marker {
	display: none;
}

.tsInfoTable {
	border-collapse: collapse;
}

.tsInfoTable td {
	padding: 0 0.4rem 0 0;
}

.tsInfoLabel {
	font-weight: 600;
}

.tsBody {
	display: flex;
	flex: 1;
	min-height: 0;
	gap: 1rem;
}

.tsPlot {
	flex: 1;
	min-width: 0;
}

.tsLegend {
	width: 14rem;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	overflow-y: auto;
	padding: 0.5rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fafafa;
	align-self: flex-start;
	max-height: 100%;
}

.tsLegendTitle {
	font-weight: 600;
	font-size: 0.95rem;
	margin-bottom: 0.25rem;
	padding-bottom: 0.25rem;
	border-bottom: 1px solid #ddd;
}

.tsLegendItem {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9rem;
	cursor: pointer;
	padding: 0.15rem 0;
	user-select: none;
}

.tsLegendItem input[type="checkbox"] {
	cursor: pointer;
	margin: 0;
	flex-shrink: 0;
}

.tsLegendDot {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	flex-shrink: 0;
}
