#tsApp {
	--ts-ink: #0f172a;
	--ts-muted: #64748b;
	--ts-line: #e2e8f0;
	--ts-primary: #3b82f6;
	--ts-primary-hover: #2563eb;
	--ts-soft: #eff6ff;
	--ts-mid: #dbeafe;
	--ts-radius: 0.375rem;
	--ts-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
}

#tsApp .ts-workspace {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

#tsApp .ts-cols {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
	align-items: stretch;
}

@media (min-width: 1024px) {
	#tsApp .ts-cols {
		grid-template-columns: 1fr 1fr;
	}
}

#tsApp .ts-shell {
	background:
		radial-gradient(1200px 420px at 10% -10%, rgba(59, 130, 246, 0.14), transparent 55%),
		radial-gradient(900px 360px at 100% 0%, rgba(37, 99, 235, 0.07), transparent 50%);
	border: 1px solid var(--ts-line);
	border-radius: var(--ts-radius);
	box-shadow: var(--ts-shadow);
	overflow: hidden;
	height: 100%;
}

#tsApp .ts-panel {
	background: rgba(255, 255, 255, 0.92);
	min-height: 100%;
}

#tsApp .ts-kicker {
	margin: 0 0 0.25rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ts-primary-hover);
}

#tsApp .ts-section-desc {
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--ts-muted);
}

#tsApp .ts-label {
	display: block;
	margin-bottom: 0.4rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #334155;
}

#tsApp .ts-now-date {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--ts-ink);
	font-variant-numeric: tabular-nums;
}

#tsApp .ts-unit {
	display: inline-flex;
	gap: 0.35rem;
	padding: 0.3rem;
	border-radius: 999px;
	background: var(--ts-soft);
	border: 1px solid var(--ts-mid);
}

#tsApp .ts-unit-btn {
	min-width: 3.5rem;
	height: 2.25rem;
	padding: 0 0.9rem;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #475569;
	font-size: 0.8125rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}

#tsApp .ts-unit-btn:hover {
	background: rgba(255, 255, 255, 0.7);
}

#tsApp .ts-unit-btn.is-active {
	background: #fff;
	color: #2563eb;
	box-shadow: 0 1px 3px rgba(37, 99, 235, 0.18);
}

#tsApp .ts-now-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
}

@media (min-width: 640px) {
	#tsApp .ts-now-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

#tsApp .ts-metric {
	padding: 0.9rem 1rem;
	border: 1px solid var(--ts-line);
	border-radius: 0.5rem;
	background: #fff;
}

#tsApp .ts-metric-label {
	margin: 0 0 0.35rem;
	font-size: 0.75rem;
	font-weight: 600;
	color: #64748b;
}

#tsApp .ts-metric-value {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 700;
	color: #1d4ed8;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	word-break: break-all;
	font-variant-numeric: tabular-nums;
	min-height: 1.6em;
}

#tsApp .ts-metric-value-sm {
	font-size: 0.875rem;
	line-height: 1.4;
}

#tsApp .ts-copy-link {
	margin-top: 0.45rem;
	padding: 0;
	border: 0;
	background: transparent;
	color: #2563eb;
	font-size: 0.75rem;
	font-weight: 600;
	cursor: pointer;
}

#tsApp .ts-copy-link:hover {
	color: #1d4ed8;
	text-decoration: underline;
}

#tsApp .ts-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.5rem;
	padding: 0 1rem;
	border-radius: 0.5rem;
	font-size: 0.875rem;
	font-weight: 600;
	border: 1px solid transparent;
	cursor: pointer;
}

#tsApp .ts-btn-muted {
	background: #f8fafc;
	color: #1e293b;
	border-color: #e2e8f0;
}

#tsApp .ts-btn-muted:hover {
	background: #f1f5f9;
}

#tsApp .ts-field-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.75rem;
}

@media (min-width: 480px) {
	#tsApp .ts-field-grid {
		grid-template-columns: 1fr 1fr;
	}
}

#tsApp .ts-select-wrap {
	position: relative;
}

#tsApp .ts-select-chevron {
	pointer-events: none;
	position: absolute;
	right: 0.9rem;
	top: 50%;
	transform: translateY(-50%);
	color: #94a3b8;
}

#tsApp .ts-field-error {
	margin: 0.35rem 0 0;
	font-size: 0.75rem;
	line-height: 1.4;
	color: #dc2626;
}

#tsApp .is-invalid {
	border-color: #f87171;
}

#tsApp .ts-result {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	padding: 0.85rem 1rem;
	border: 1px solid #bfdbfe;
	border-radius: 0.5rem;
	background: linear-gradient(135deg, var(--ts-soft), #fff 60%);
}

#tsApp .ts-result-row {
	display: grid;
	grid-template-columns: 5.5rem minmax(0, 1fr) auto;
	gap: 0.5rem;
	align-items: center;
}

#tsApp .ts-result-label {
	font-size: 0.75rem;
	font-weight: 600;
	color: #64748b;
}

#tsApp .ts-result-value {
	font-size: 0.875rem;
	font-weight: 600;
	color: #1d4ed8;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	word-break: break-all;
	font-variant-numeric: tabular-nums;
}

#tsApp .ts-notes {
	background: #fff;
	border-radius: var(--ts-radius);
	box-shadow: var(--ts-shadow);
	border: 1px solid var(--ts-line);
}

#tsApp .ts-notes a {
	color: #2563eb;
}

#tsApp .ts-notes code {
	font-size: 0.85em;
	background: #f1f5f9;
	padding: 0.05em 0.3em;
	border-radius: 0.25rem;
}

@media (prefers-reduced-motion: reduce) {
	#tsApp .ts-unit-btn {
		transition: none;
	}
}
