/* True Shuffle: the app's own look, on top of the kit's tokens (kit.css).
   Layout: top bar | sidebar, view, now-playing panel | player bar.
   Under 1180 px the sidebar keeps only icons; under 760 px the page becomes a
   phone app: bottom tabs, the video docked under the top bar while it plays,
   and the queue as a sheet. */

:root {
	--ts-side: 236px;
	--ts-now: 340px;
	--ts-bar: 96px;
	--ts-hover: rgba(16, 24, 40, 0.05);
	--ts-sel: rgba(31, 95, 214, 0.12);
	--ts-panel: var(--surface);
	--ts-chrome: #f3f4f7;
	--ts-tileL: 40%;
	--ts-chipL: 45%;
	--ts-play: #1f5fd6;
	--ts-play-ink: #ffffff;
	--ts-bar-fill: #3b6fd4;
}
:root[data-theme="dark"] {
	--ts-hover: rgba(255, 255, 255, 0.05);
	--ts-sel: rgba(124, 179, 255, 0.16);
	--ts-panel: #13161b;
	--ts-chrome: #0b0d10;
	--ts-tileL: 30%;
	--ts-chipL: 62%;
	--ts-play: #7cb3ff;
	--ts-play-ink: #0b1220;
	--ts-bar-fill: #6aa2f2;
}

html, body.ts { height: 100%; }
body.ts {
	margin: 0;
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	height: 100vh;
	height: 100dvh;
	overflow: hidden;
	background: var(--ts-chrome);
	color: var(--text);
}
.ts a { color: inherit; }
.ts-i { width: 20px; height: 20px; fill: currentColor; flex: none; display: block; }
.ts-muted { color: var(--text-2); }
.ts-guess { color: var(--text-2); font-style: italic; }
.ts-empty { color: var(--text-2); padding: 24px 4px; }
[hidden] { display: none !important; }

/* ---------- Top bar (the kit's header) ---------- */
.kit-header.ts-top {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	margin: 0;
	background: var(--ts-chrome);
	border-bottom: 0;
	min-height: 56px;
	flex-wrap: nowrap;
}
.ts-brand { margin: 0; font-size: 17px; flex: none; }
.ts-brand-link { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--heading); font-weight: 750; letter-spacing: -0.01em; }
.ts-logo {
	width: 30px; height: 30px; border-radius: 9px; flex: none;
	background: conic-gradient(from 210deg, #ff5f8f, #ffb347, #5fd38d, #4fa3ff, #b06cff, #ff5f8f);
	box-shadow: inset 0 0 0 7px var(--ts-chrome);
}
.ts-histnav { display: flex; gap: 4px; margin-left: 12px; }
.ts-search {
	position: relative; flex: 1 1 auto; max-width: 520px; margin: 0 auto 0 8px;
	display: flex; align-items: center;
}
.ts-search input {
	width: 100%; height: 42px; border-radius: 999px; border: 1px solid var(--border);
	background: var(--surface); color: var(--text); font: inherit; font-size: 15px;
	padding: 0 40px 0 42px; outline: none;
	transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.ts-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.ts-search-icon { position: absolute; left: 13px; color: var(--text-2); pointer-events: none; }
.ts-search-kbd { position: absolute; right: 12px; font: 12px var(--font-mono); color: var(--text-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; pointer-events: none; }
.ts-search input:focus ~ .ts-search-kbd { display: none; }
.kit-header.ts-top .kit-tools { flex: 1 1 auto; flex-wrap: nowrap; min-width: 0; gap: 6px; margin-left: 4px; }

/* ---------- App grid ---------- */
.ts-app {
	display: grid;
	grid-template-columns: var(--ts-side) minmax(0, 1fr) var(--ts-now);
	grid-template-rows: minmax(0, 1fr) var(--ts-bar);
	grid-template-areas: "side main now" "bar bar bar";
	gap: 8px;
	padding: 0 8px;
	min-height: 0;
}
.ts-side, .ts-main, .ts-now { background: var(--ts-panel); border-radius: 12px; min-height: 0; }
.ts-side { grid-area: side; overflow-y: auto; padding: 10px 8px; display: flex; flex-direction: column; }
.ts-main { grid-area: main; overflow-y: auto; overflow-x: hidden; position: relative; outline: none; }
.ts-now { grid-area: now; overflow: hidden; display: flex; flex-direction: column; }
.ts-bar { grid-area: bar; }
.ts-tabbar { display: none; }
.ts-view { padding: 20px 24px 120px; max-width: 1400px; }

/* ---------- Sidebar ---------- */
.ts-nav { list-style: none; margin: 0; padding: 0; }
.ts-nav-sep { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-2); padding: 16px 12px 6px; font-weight: 650; }
.ts-nav-a {
	display: flex; align-items: center; gap: 14px; padding: 9px 12px; border-radius: 8px;
	text-decoration: none; color: var(--text-2); font-weight: 600; font-size: 14px;
	transition: background var(--dur-fast), color var(--dur-fast);
}
.ts-nav-a:hover { color: var(--heading); background: var(--ts-hover); }
.ts-nav-a.is-on { color: var(--heading); background: var(--ts-sel); }
.ts-nav-a .ts-nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-nav-count { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.ts-side-sec { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 4px; flex: 1; }
.ts-side-h { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-2); padding: 12px 12px 6px; margin: 0; font-weight: 650; }
.ts-stations { list-style: none; margin: 0; padding: 0; }
.ts-station { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px; border: 0; background: none; color: var(--text); font: inherit; font-size: 14px; text-align: left; border-radius: 8px; cursor: pointer; }
.ts-station:hover { background: var(--ts-hover); }
.ts-station span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-station-art { width: 32px; height: 32px; border-radius: 6px; font-size: 13px; }
.ts-side-empty { font-size: 13px; color: var(--text-2); padding: 4px 12px; line-height: 1.45; }
.ts-side-legal { font-size: 11px; color: var(--text-2); padding: 12px; margin: 0; line-height: 1.5; }

/* ---------- Buttons ---------- */
.ts-icon-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-width: 36px; height: 36px; padding: 0 8px; border-radius: 999px; border: 0;
	background: transparent; color: var(--text-2); cursor: pointer; font: inherit; font-weight: 600; font-size: 14px;
	transition: color var(--dur-fast), background var(--dur-fast), transform var(--dur-fast);
}
.ts-icon-btn:hover:not(:disabled) { color: var(--heading); background: var(--ts-hover); }
.ts-icon-btn:disabled { opacity: 0.4; cursor: default; }
.ts-icon-btn[aria-pressed="true"], .ts-icon-btn.is-on { color: var(--accent); }
.ts-link-btn { border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.ts-link-btn:hover { text-decoration: underline; }
.ts-row-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.ts-danger { color: var(--kit-warn) !important; border-color: var(--kit-warn-line) !important; }

/* ---------- Art ---------- */
.ts-art {
	position: relative; display: block; width: 100%; aspect-ratio: 1; border-radius: 8px; overflow: hidden; flex: none;
	background: hsl(var(--h, 210) var(--s, 50%) var(--ts-tileL));
}
.ts-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ts-art-gen {
	background:
		radial-gradient(120% 90% at 85% 10%, hsl(calc(var(--h, 210) + 40) var(--s, 50%) 60% / 0.85), transparent 60%),
		linear-gradient(160deg, hsl(var(--h, 210) var(--s, 50%) 52%), hsl(calc(var(--h, 210) - 25) var(--s, 50%) 26%));
	display: flex; align-items: center; justify-content: center;
}
.ts-art-letter { color: rgba(255, 255, 255, 0.92); font-weight: 800; font-size: 40%; line-height: 1; font-size: clamp(12px, 38cqw, 64px); }
.ts-art { container-type: inline-size; }
.ts-art.is-round { border-radius: 50%; }

/* ---------- Player bar ---------- */
.ts-bar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; gap: 12px; padding: 0 8px; }
.ts-bar-track { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ts-bar-art { width: 64px; height: 64px; border-radius: 8px; }
.ts-bar-text { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.ts-bar-title { border: 0; background: none; padding: 0; color: var(--heading); font: inherit; font-weight: 650; font-size: 15px; text-align: left; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ts-bar-title.is-empty { cursor: default; color: var(--text-2); }
.ts-bar-title:hover:not(.is-empty) { text-decoration: underline; }
.ts-bar-artist { font-size: 13.5px; color: var(--text-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ts-bar-artist a { text-decoration: none; }
.ts-bar-artist a:hover { text-decoration: underline; color: var(--text); }
.ts-bar-mid { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.ts-transport { display: flex; align-items: center; gap: 10px; }
.ts-transport .ts-icon-btn { min-width: 42px; height: 42px; }
.ts-transport .ts-icon-btn .ts-i { width: 22px; height: 22px; }
.ts-play {
	width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--ts-play); color: var(--ts-play-ink); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: transform var(--dur-fast);
}
.ts-play:hover:not(:disabled) { transform: scale(1.06); background: var(--ts-play-hover, var(--ts-play)); }
.ts-play:disabled { opacity: 0.4; }
.ts-play .ts-i { width: 28px; height: 28px; }
.ts-seek { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 620px; }
.ts-time { font: 11.5px var(--font-mono); color: var(--text-2); min-width: 38px; text-align: center; }
.ts-range { flex: 1; -webkit-appearance: none; appearance: none; height: 20px; background: transparent; cursor: pointer; margin: 0; }
.ts-range::-webkit-slider-runnable-track { height: 5px; border-radius: 4px; background: linear-gradient(to right, var(--text) var(--p, 0%), var(--border-strong) var(--p, 0%)); }
.ts-range::-moz-range-track { height: 4px; border-radius: 4px; background: var(--border-strong); }
.ts-range::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--text); }
.ts-range::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--heading); margin-top: -4.5px; opacity: 0; transition: opacity var(--dur-fast); }
.ts-range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--heading); }
.ts-seek:hover .ts-range::-webkit-slider-thumb, .ts-range:focus-visible::-webkit-slider-thumb { opacity: 1; }
.ts-modal .ts-range::-webkit-slider-thumb { opacity: 1; }
.ts-range:disabled { cursor: default; opacity: 0.6; }
.ts-bar-right { display: flex; justify-content: flex-end; gap: 4px; }

/* ---------- Now playing panel ---------- */
.ts-video { position: relative; padding: 12px 12px 0; flex: none; }
.ts-player { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 210px; min-width: 210px; max-height: max(210px, 58dvh); border-radius: 10px; overflow: hidden; background: #000; }
.ts-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ts-poster { position: absolute; inset: 0; border: 0; padding: 0; cursor: pointer; background: #111; color: #fff; display: flex; align-items: center; justify-content: center; }
.ts-poster-art { position: absolute; inset: 0; }
.ts-poster-art .ts-art { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; filter: saturate(1.1) brightness(0.6); }
.ts-poster-play { position: relative; width: 64px; height: 64px; border-radius: 50%; background: rgba(255, 255, 255, 0.95); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4); transition: transform var(--dur-fast); }
.ts-poster-play::after { content: ''; position: absolute; left: 26px; top: 20px; border-left: 18px solid #111; border-top: 12px solid transparent; border-bottom: 12px solid transparent; }
.ts-poster:hover .ts-poster-play { transform: scale(1.06); }
.ts-poster-text { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; font-size: 13px; font-weight: 600; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7); }
.ts-demo-tag { position: absolute; top: 20px; left: 20px; font-size: 11px; font-weight: 700; background: rgba(0, 0, 0, 0.6); color: #fff; padding: 2px 8px; border-radius: 999px; }
.ts-mock { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 16px; color: #fff; background: radial-gradient(120% 120% at 20% 0%, #3a2c6b, #0f1020 70%); }
.ts-mock-title { font-weight: 700; font-size: 14px; }
.ts-mock-bar { height: 4px; background: rgba(255, 255, 255, 0.2); border-radius: 4px; overflow: hidden; }
.ts-mock-bar > * { height: 100%; background: #fff; }
.ts-mock-time { font: 12px var(--font-mono); opacity: 0.8; }
.ts-now-rest { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ts-sheet-grip { display: none; }
.ts-nowinfo { padding: 14px 16px 6px; }
.ts-now-empty { font-size: 14px; line-height: 1.5; }
.ts-kicker { margin: 0 0 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-2); }
.ts-now-title { margin: 0; font-size: 21px; line-height: 1.2; color: var(--heading); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.ts-now-alt { margin: 2px 0 0; font-size: 13px; color: var(--text-2); }
.ts-now-artist { display: block; margin-top: 6px; font-weight: 600; font-size: 14.5px; }
.ts-now-artist a { text-decoration: none; }
.ts-now-artist a:hover { text-decoration: underline; }
.ts-now-work { margin: 6px 0 0; font-size: 13.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ts-now-work a { text-decoration: none; color: var(--text); }
.ts-now-work a:hover { text-decoration: underline; }
.ts-now-ver { margin: 4px 0 0; font-size: 13px; }
.ts-now-actions { display: flex; align-items: center; gap: 2px; margin: 10px 0 0; flex-wrap: wrap; }
.ts-now-actions .ts-stars { margin-right: auto; }
.ts-role { font-size: 10.5px; font-weight: 750; letter-spacing: 0.04em; padding: 1px 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.ts-role.is-big { font-size: 12px; padding: 2px 8px; }
.ts-stars { display: inline-flex; gap: 0; }
.ts-star { border: 0; background: none; padding: 4px 2px; cursor: pointer; color: var(--border-strong); }
.ts-star .ts-i { width: 18px; height: 18px; }
.ts-star[aria-pressed="true"] { color: #f2b01e; }
.ts-star:hover { color: #f2b01e; }
.ts-guessbox { margin: 12px 0 0; padding: 10px 12px; border: 1px dashed var(--border-strong); border-radius: 8px; font-size: 13.5px; }
.ts-guessbox p { margin: 0 0 6px; }

/* the queue */
.ts-queue { padding: 4px 8px 16px; flex: 1; }
.ts-tabs { display: flex; align-items: center; gap: 4px; padding: 8px 8px 4px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.ts-tab { border: 0; background: none; font: inherit; font-weight: 650; font-size: 14px; color: var(--text-2); padding: 6px 8px; border-radius: 6px; cursor: pointer; position: relative; white-space: nowrap; flex: none; }
.ts-tab[aria-selected="true"] { color: var(--heading); }
.ts-tab[aria-selected="true"]::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -5px; height: 2px; border-radius: 2px; background: var(--accent); }
.ts-tabs-sp { flex: 1; }
.ts-context { margin: 6px 8px; font-size: 12.5px; color: var(--text-2); }
.ts-context a { color: var(--text); font-weight: 650; text-decoration: none; }
.ts-context a:hover { text-decoration: underline; }
.ts-qlist { list-style: none; margin: 0; padding: 0; }
.ts-q { display: flex; align-items: center; gap: 2px; border-radius: 8px; position: relative; }
.ts-q:hover { background: var(--ts-hover); }
.ts-q.is-drag { opacity: 0.5; }
.ts-q.drop-before::before, .ts-q.drop-after::after { content: ''; position: absolute; left: 8px; right: 8px; height: 2px; background: var(--accent); border-radius: 2px; }
.ts-q.drop-before::before { top: -1px; }
.ts-q.drop-after::after { bottom: -1px; }
.ts-grip { border: 0; background: none; color: var(--text-2); padding: 6px 2px; cursor: grab; touch-action: none; opacity: 0.5; border-radius: 4px; }
.ts-grip .ts-i { width: 16px; height: 16px; }
.ts-q:hover .ts-grip, .ts-grip:focus-visible { opacity: 1; }
.ts-q-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 6px 4px; text-align: left; font: inherit; color: inherit; cursor: pointer; border-radius: 6px; }
.ts-q-art { width: 40px; height: 40px; border-radius: 5px; }
.ts-q-text { display: flex; flex-direction: column; min-width: 0; }
.ts-q-title { font-size: 13.5px; font-weight: 600; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-q-artist { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-q-x { opacity: 0; min-width: 30px; height: 30px; }
.ts-q-x .ts-i { width: 16px; height: 16px; }
.ts-q:hover .ts-q-x, .ts-q-x:focus-visible { opacity: 1; }
.ts-qmore { font-size: 12.5px; padding: 6px 8px; margin: 0; }

/* ---------- Chips ---------- */
.ts-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ts-chip {
	display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px;
	border: 1px solid var(--border); background: var(--surface); color: var(--text);
	font: inherit; font-size: 12.5px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
	transition: background var(--dur-fast), border-color var(--dur-fast);
}
a.ts-chip:hover, button.ts-chip:hover { border-color: var(--border-strong); background: var(--ts-hover); }
.ts-chip.is-hued::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: hsl(var(--h) var(--s, 55%) var(--ts-chipL)); flex: none; }
.ts-chip.is-hued { border-color: hsl(var(--h) var(--s, 55%) 50% / 0.35); }
.ts-chip.is-on { background: var(--heading); color: var(--bg); border-color: var(--heading); }
.ts-chip.is-small { font-size: 11.5px; padding: 2px 9px; }
.ts-chip.is-removable .ts-i { width: 14px; height: 14px; }
.ts-count { font-size: 11px; font-weight: 600; opacity: 0.65; }
.ts-chipbar { margin: 4px 0 16px; }
.ts-tag { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 0 6px; border-radius: 4px; border: 1px solid var(--border-strong); color: var(--text-2); margin-left: 8px; vertical-align: 1px; white-space: nowrap; line-height: 16px; }
.ts-tag.is-warn { color: var(--kit-warn); border-color: var(--kit-warn-line); }

/* ---------- Headings and sections ---------- */
.ts-h1 { font-size: 30px; margin: 4px 0 10px; color: var(--heading); letter-spacing: -0.02em; }
.ts-lede { margin: -4px 0 16px; max-width: 70ch; line-height: 1.5; }
.ts-sec-head { display: flex; align-items: baseline; gap: 12px; margin: 28px 0 12px; flex-wrap: wrap; }
.ts-sec-head h2 { margin: 0; font-size: 21px; color: var(--heading); letter-spacing: -0.01em; }
.ts-sec-head h2 a { text-decoration: none; }
.ts-sec-head h2 a:hover { text-decoration: underline; }
.ts-sec-more { margin-left: auto; font-size: 13px; font-weight: 650; color: var(--text-2); text-decoration: none; }
.ts-sec-more:hover { text-decoration: underline; color: var(--text); }
.ts-sec-head .ts-sort { margin-left: auto; }
.ts-fam-head { border-top: 1px solid var(--border); padding-top: 18px; }
.ts-fam-head h2::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 10px; background: hsl(var(--h) var(--s) var(--ts-chipL)); }
.ts-fam-head .ts-muted { font-size: 13px; flex: 1; }

/* hero */
.ts-hero {
	display: flex; align-items: flex-end; gap: 24px; padding: 28px 24px 22px; margin: -20px -24px 0;
	background: linear-gradient(180deg, hsl(var(--h) var(--s) var(--ts-tileL) / 0.75), hsl(var(--h) var(--s) var(--ts-tileL) / 0.12) 85%, transparent);
	border-radius: 12px 12px 0 0;
}
.ts-hero-art { width: 192px; height: 192px; border-radius: 10px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3); flex: none; }
.ts-hero.is-round .ts-hero-art { border-radius: 50%; }
.ts-hero-text { min-width: 0; }
.ts-hero-title { margin: 0; font-size: clamp(28px, 4.6vw, 64px); line-height: 1.02; color: var(--heading); letter-spacing: -0.03em; overflow-wrap: anywhere; }
.ts-hero-alt { margin: 6px 0 0; font-size: 16px; color: var(--text); opacity: 0.8; }
.ts-hero-blurb { margin: 10px 0 0; color: var(--text); max-width: 64ch; line-height: 1.45; }
.ts-hero-meta { margin: 10px 0 0; font-size: 13.5px; color: var(--text-2); font-weight: 600; }
.ts-actions { display: flex; align-items: center; gap: 10px; padding: 18px 0 6px; flex-wrap: wrap; }

/* home */
.ts-home-hero { margin: 0 0 8px; }
.ts-greet { font-size: 32px; margin: 4px 0 2px; color: var(--heading); letter-spacing: -0.02em; }
.ts-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin-top: 16px; }
.ts-quickb {
	display: flex; align-items: center; gap: 14px; padding: 10px; border: 0; border-radius: 10px; cursor: pointer; text-align: left;
	background: linear-gradient(110deg, hsl(var(--h, 210) 60% 50% / 0.22), var(--surface-2) 70%); color: var(--text); font: inherit;
	transition: transform var(--dur-fast), background var(--dur-fast);
}
.ts-quickb:hover { transform: translateY(-1px); background: linear-gradient(110deg, hsl(var(--h, 210) 60% 50% / 0.34), var(--surface-2) 75%); }
.ts-quick-ic { width: 52px; height: 52px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: hsl(var(--h, 210) 55% 45%); color: #fff; flex: none; }
.ts-quick-ic .ts-i { width: 26px; height: 26px; }
.ts-quick-t { display: flex; flex-direction: column; min-width: 0; }
.ts-quick-t b { font-size: 15px; color: var(--heading); }
.ts-quick-t span { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-needs { display: flex; align-items: center; gap: 10px; margin: 28px 0 0; padding: 12px 14px; border-radius: 10px; border: 1px dashed var(--border-strong); color: var(--text); text-decoration: none; font-size: 14px; }
.ts-needs:hover { background: var(--ts-hover); }
.ts-legal { font-size: 12px; color: var(--text-2); margin-top: 40px; }
.ts-legal a { color: var(--text-2); }

/* shelves, grids, cards, tiles */
.ts-shelf { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(160px, 168px); gap: 12px; overflow-x: auto; padding: 2px 2px 12px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; scrollbar-width: thin; }
.ts-shelf > * { scroll-snap-align: start; }
.ts-grid { display: grid; gap: 12px; }
.ts-grid.is-cards { grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); }
.ts-grid.is-tiles { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.ts-grid.is-tiles.is-small { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ts-card { position: relative; border-radius: 10px; padding: 10px; transition: background var(--dur-fast); min-width: 0; }
.ts-card:hover, .ts-card:focus-within { background: var(--ts-hover); }
.ts-card-a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; }
.ts-card-a .ts-art { margin-bottom: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18); }
.ts-card-title { font-weight: 650; font-size: 14px; color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-card-sub { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
.ts-card.is-round .ts-card-a { text-align: left; }
.ts-bigplay {
	position: absolute; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
	background: var(--ts-play); color: var(--ts-play-ink); display: flex; align-items: center; justify-content: center;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35); opacity: 0; transform: translateY(6px);
	transition: opacity var(--dur-fast), transform var(--dur-fast);
}
.ts-bigplay .ts-i { width: 22px; height: 22px; }
.ts-card .ts-bigplay { right: 18px; top: calc(100% - 46px - 64px); }
.ts-card:hover .ts-bigplay, .ts-bigplay:focus-visible, .ts-tile-wrap:hover .ts-bigplay { opacity: 1; transform: none; }
.ts-tile-wrap { position: relative; min-width: 0; }
.ts-tile {
	position: relative; display: flex; flex-direction: column; justify-content: flex-start; gap: 4px; overflow: hidden;
	min-height: 112px; padding: 14px 16px; border-radius: 10px; text-decoration: none; color: #fff;
	background: hsl(var(--h) var(--s) var(--ts-tileL));
	transition: transform var(--dur-fast), filter var(--dur-fast);
}
.ts-tile:hover { filter: brightness(1.08); }
.ts-tile-title { font-weight: 800; font-size: 18px; line-height: 1.15; max-width: 75%; position: relative; z-index: 1; letter-spacing: -0.01em; }
.ts-tile-sub { font-size: 12.5px; opacity: 0.88; max-width: 70%; position: relative; z-index: 1; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ts-tile-art { position: absolute; right: -14px; bottom: -8px; width: 76px; height: 76px; transform: rotate(22deg); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); border-radius: 6px; }
.ts-tile.is-mood { background: linear-gradient(135deg, hsl(var(--h) var(--s) calc(var(--ts-tileL) + 6%)), hsl(calc(var(--h) + 30) var(--s) calc(var(--ts-tileL) - 8%))); }
.ts-tile-wrap .ts-bigplay { right: 10px; bottom: 10px; width: 40px; height: 40px; }
.ts-shelf .ts-tile-wrap { width: 210px; }
.ts-shelf:has(.ts-tile-wrap) { grid-auto-columns: 210px; }
.ts-more { margin: 16px 0; }

/* ---------- Track lists ---------- */
.ts-tracks { margin: 4px 0 0; --cols: 36px 44px minmax(0, 2.2fr) minmax(0, 1.1fr) minmax(0, 1.3fr) 52px 80px; }
.ts-tracks.no-work { --cols: 36px 44px minmax(0, 2.6fr) 100px minmax(0, 1fr) 52px 80px; }
.ts-thead { display: grid; grid-template-columns: var(--cols); gap: 12px; align-items: center; padding: 0 12px 8px; border-bottom: 1px solid var(--border); margin-bottom: 6px; font-size: 12px; color: var(--text-2); font-weight: 600; position: sticky; top: 0; background: var(--ts-panel); z-index: 2; padding-top: 8px; }
.ts-thead .ts-c-idx { text-align: center; }
.ts-sticky.is-on ~ .ts-tracks > .ts-thead { top: 60px; }
.ts-th { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.ts-th:hover, .ts-th.is-on { color: var(--accent); }
.ts-th .ts-i { width: 14px; height: 14px; }
.ts-th.is-reversed .ts-i { transform: rotate(180deg); }
.ts-vlist { position: relative; }
.ts-row {
	position: absolute; left: 0; right: 0; display: grid; grid-template-columns: var(--cols); gap: 12px; align-items: center;
	padding: 0 12px; border-radius: 6px; cursor: default; outline: none; user-select: none; -webkit-user-select: none;
}
.ts-row:hover { background: var(--ts-hover); }
.ts-row.is-sel { background: var(--ts-sel); }
.ts-row:focus-visible { box-shadow: inset 0 0 0 2px var(--accent-ring); }
.ts-row.is-gone, .ts-row.is-blocked { opacity: 0.55; }
.ts-c-idx { position: relative; text-align: center; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; height: 32px; display: flex; align-items: center; justify-content: center; }
.ts-row-play { position: absolute; inset: 0; min-width: 0; height: auto; padding: 0; border-radius: 6px; opacity: 0; color: var(--heading); }
.ts-row-play .ts-i { width: 18px; height: 18px; }
.ts-row:hover .ts-row-play, .ts-row:focus-within .ts-row-play { opacity: 1; }
.ts-row:hover .ts-idx-n, .ts-row:focus-within .ts-idx-n { opacity: 0; }
.ts-eq { display: none; gap: 2px; align-items: flex-end; height: 14px; }
.ts-eq i { width: 3px; background: var(--accent); border-radius: 1px; animation: ts-eq 0.9s ease-in-out infinite; height: 40%; }
.ts-eq i:nth-child(2) { animation-delay: -0.3s; }
.ts-eq i:nth-child(3) { animation-delay: -0.6s; }
@keyframes ts-eq { 0%, 100% { height: 30%; } 50% { height: 100%; } }
body:not(.is-playing) .ts-eq i { animation: none; height: 55%; }
.ts-row.is-now .ts-idx-n { display: none; }
.ts-row.is-now .ts-eq { display: flex; }
.ts-row.is-now:hover .ts-eq { opacity: 0; }
.ts-row.is-now .ts-r-tt { color: var(--accent); }
.ts-c-art .ts-art { width: 44px; height: 44px; border-radius: 5px; }
.ts-c-main { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.ts-r-title { display: flex; align-items: center; min-width: 0; color: var(--heading); font-weight: 600; font-size: 14.5px; }
.ts-r-tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ts-r-sub { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-r-sub a { text-decoration: none; }
.ts-r-sub a:hover { text-decoration: underline; color: var(--text); }
.ts-c-work { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--text-2); }
.ts-c-work a { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-c-work a:hover { text-decoration: underline; color: var(--text); }
.ts-c-genre { min-width: 0; overflow: hidden; }
.ts-c-genre .ts-chip { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.ts-c-genre .ts-chip.is-hued::before { display: inline-block; margin-right: 6px; vertical-align: 1px; }
.ts-c-len { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; text-align: right; }
.ts-c-more .ts-icon-btn { opacity: 0; }
.ts-row:hover .ts-c-more .ts-icon-btn, .ts-row:focus-within .ts-c-more .ts-icon-btn, .ts-row.is-sel .ts-c-more .ts-icon-btn { opacity: 1; }
.ts-guesspicks { display: flex; gap: 6px; min-width: 0; margin-top: 2px; }
.ts-pick { flex: 0 1 auto; min-width: 0; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 999px; font: inherit; font-size: 11.5px; font-weight: 650; padding: 1px 9px; cursor: pointer; }
.ts-pick:hover { border-color: var(--accent); color: var(--accent); }
.ts-selbar {
	position: sticky; bottom: 12px; z-index: 5; margin: 12px auto 0; width: max-content; max-width: 100%;
	display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 6px 8px 6px 16px; border-radius: 999px;
	background: var(--heading); color: var(--bg); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.ts-selbar .ts-icon-btn { color: var(--bg); }
.ts-selbar .ts-icon-btn:hover { color: var(--bg); background: rgba(127, 127, 127, 0.25); }
.ts-selbar-n { font-weight: 700; font-size: 13.5px; margin-right: 8px; }

/* filter bars */
.ts-filterbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.ts-filter { flex: 1 1 220px; max-width: 360px; }
.ts-sort { width: auto; }

/* ---------- Menus and dialogs ---------- */
.ts-menu {
	position: fixed; z-index: 1000; min-width: 220px; max-width: 380px; max-height: 70vh; overflow-y: auto; padding: 6px;
	background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}
.ts-menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; background: none; color: var(--text); font: inherit; font-size: 14px; text-align: left; border-radius: 6px; cursor: pointer; outline: none; }
.ts-menu-item:hover, .ts-menu-item:focus { background: var(--ts-hover); color: var(--heading); }
.ts-menu-item:focus-visible { box-shadow: inset 0 0 0 2px var(--accent-ring); }
.ts-menu-item:disabled { opacity: 0.4; }
.ts-menu-item .ts-i { width: 18px; height: 18px; color: var(--text-2); }
.ts-menu-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-menu-hint { font: 11px var(--font-mono); color: var(--text-2); }
.ts-menu-item.is-checked { color: var(--accent); font-weight: 650; }
.ts-menu-item .ts-menu-check { color: var(--accent); }
.ts-i-sp { width: 18px; flex: none; }
.ts-menu-sep { height: 1px; background: var(--border); margin: 5px 6px; }
.ts-menu-h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-2); padding: 6px 10px 4px; }
.ts-modal-back { position: fixed; inset: 0; z-index: 900; background: rgba(5, 8, 12, 0.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.ts-modal { background: var(--bg); color: var(--text); border-radius: 14px; border: 1px solid var(--border); box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4); width: 100%; max-width: 480px; max-height: calc(100dvh - 32px); display: flex; flex-direction: column; }
.ts-modal.is-wide { max-width: 760px; }
.ts-modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 8px 22px; }
.ts-modal-head h2 { margin: 0; flex: 1; font-size: 19px; color: var(--heading); }
.ts-modal-body { padding: 4px 22px 20px; overflow-y: auto; }
.ts-edit-raw { font-size: 13px; margin: 0 0 12px; overflow-wrap: anywhere; }
.ts-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.ts-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ts-field > span { font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.ts-field.is-wide { grid-column: 1 / -1; }
.ts-field .kit-input { width: 100%; }
.ts-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-seg-b { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.ts-seg-b.is-hued { border-color: hsl(var(--h) 60% 50% / 0.4); }
.ts-seg-b[aria-checked="true"] { background: var(--heading); color: var(--bg); border-color: var(--heading); }
.ts-seg-b.is-hued[aria-checked="true"] { background: hsl(var(--h) 60% 42%); border-color: transparent; color: #fff; }
.ts-gchosen { display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; align-items: center; }
.ts-gpick { max-height: 220px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 8px; margin-top: 2px; }
.ts-gfam { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-bottom: 8px; }
.ts-gfam-h { width: 100%; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); }
.ts-edit-adv { margin-top: 14px; font-size: 14px; }
.ts-edit-adv summary { cursor: pointer; font-weight: 650; color: var(--text-2); }
.ts-edit-adv select { margin-top: 6px; width: 100%; }
/* Negative edges cancel modal body padding to keep editor actions in view. */
.ts-edit-btns { position: sticky; bottom: -20px; z-index: 2; background: var(--bg); margin: 18px -22px -20px; padding: 12px 22px max(20px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
.ts-edit-reset { margin-left: auto; }

/* ---------- Mix builder ---------- */
.ts-mixsum { position: sticky; top: 0; z-index: 3; background: var(--ts-panel); padding: 12px 0 4px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.ts-mixsum p { margin: 0 0 4px; }
.ts-mixsum-n b { font-size: 18px; color: var(--heading); }
.ts-modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.ts-modecard { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 2px 10px; padding: 12px; text-align: left; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.ts-modecard .ts-i { grid-row: span 2; color: var(--text-2); margin-top: 2px; }
.ts-modecard b { font-size: 14px; color: var(--heading); }
.ts-modecard span { font-size: 12px; color: var(--text-2); line-height: 1.35; }
.ts-modecard.is-on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.ts-modecard.is-on .ts-i { color: var(--accent); }
.ts-pickrow { margin: 6px 0 14px; }
.ts-pick-h { display: flex; align-items: baseline; gap: 8px; }
.ts-pick-h h3 { margin: 0; font-size: 14px; color: var(--text-2); }
.ts-pickrow .ts-chips { margin-top: 6px; }
.ts-limits { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 16px; align-items: end; }
.ts-check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; line-height: 1.4; }
.ts-check input { margin-top: 3px; width: 16px; height: 16px; flex: none; accent-color: var(--accent); }

/* ---------- Stats ---------- */
.ts-stattiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 8px 0 20px; }
.ts-stat { background: var(--surface-2); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.ts-stat-v { font-size: 28px; font-weight: 800; color: var(--heading); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ts-stat-l { font-size: 12.5px; color: var(--text-2); }
.ts-statcols { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px 28px; }
.ts-bars { margin: 0 0 12px; }
.ts-bars figcaption { display: flex; flex-direction: column; margin-bottom: 8px; }
.ts-bars figcaption h3 { margin: 0; font-size: 16px; color: var(--heading); }
.ts-bars figcaption .ts-muted { font-size: 12px; }
.ts-bars-t { width: 100%; border-collapse: collapse; font-size: 13px; }
.ts-bars-t th { text-align: left; font-weight: 550; color: var(--text); padding: 3px 10px 3px 0; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.ts-bars-t th a { text-decoration: none; }
.ts-bars-t th a:hover { text-decoration: underline; }
.ts-bars-t tr:hover th, .ts-bars-t tr:hover .ts-bars-v { color: var(--heading); }
.ts-bars-v { text-align: right; padding: 3px 10px 3px 0; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; width: 1%; }
.ts-bars-c { width: 60%; padding: 3px 0; }
.ts-bars-bar { display: block; height: 10px; border-radius: 0 4px 4px 0; background: var(--ts-bar-fill); }

/* ---------- Settings ---------- */
.ts-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; margin: 0 0 14px; max-width: 860px; }
.ts-panel h2 { margin: 0 0 10px; font-size: 18px; color: var(--heading); }
.ts-panel h3 { margin: 16px 0 6px; font-size: 14px; color: var(--text-2); }
.ts-panel p { line-height: 1.5; }
.ts-setup { font-size: 14px; border-left: 3px solid var(--accent); padding: 2px 0 2px 14px; margin-bottom: 12px; }
.ts-setup li { margin: 4px 0; overflow-wrap: anywhere; }
.ts-inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.ts-inline-form .kit-input { flex: 1 1 260px; }
.ts-artist-discovery { padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); margin: 16px 0 28px; }
.ts-artist-discovery h2, .ts-artist-discovery h3 { margin: 12px 0; }
.ts-artist-discovery .ts-btn { min-height: 44px; }
.ts-discovery-result { margin-top: 20px; }
.ts-discovery-anime { margin: 24px 0; }
.ts-discovery-anime > summary { padding: 16px; cursor: pointer; font-weight: 600; }
.ts-m-row.has-quick-add .ts-m-next { display: none; }
.ts-m-row.has-quick-add .ts-addyt { max-width: 220px; }
.ts-addyt .ts-btn-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) {
	.ts-artist-discovery { padding: 12px; }
	.ts-m-row.has-quick-add { flex-wrap: wrap; }
	.ts-m-row.has-quick-add .ts-m-text { flex-basis: calc(100% - 65px); }
	.ts-m-row.has-quick-add .ts-m-acts { margin-left: 0; width: 100%; justify-content: flex-end; }
	.ts-m-row.has-quick-add .ts-addyt { max-width: 200px; padding: 0 10px; }
}
.ts-sources { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ts-progress progress { width: 100%; }
.ts-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 13.5px; margin: 18px 0 0; max-width: 760px; }
.ts-facts dt { color: var(--text-2); font-weight: 600; }
.ts-facts dd { margin: 0; overflow-wrap: anywhere; }

/* misc */
.ts-welcome { max-width: 680px; padding: 40px 0; }
.ts-welcome h1 { font-size: 36px; margin: 0 0 12px; color: var(--heading); letter-spacing: -0.02em; }
.ts-welcome p { line-height: 1.55; font-size: 16px; }
.ts-demo { margin: 0; padding: 8px 24px; background: var(--accent-soft); font-size: 13px; }
.ts-notice { margin: 12px 24px 0; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border-strong); font-size: 14px; }
.ts-notice p { margin: 0 0 8px; }
.ts-search-top { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.ts-search-top .ts-card { width: 200px; background: var(--surface-2); }
.ts-hub { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ts-hub a { display: flex; align-items: center; gap: 16px; padding: 14px 12px; border-radius: 10px; text-decoration: none; }
.ts-hub a:hover { background: var(--ts-hover); }
.ts-hub a .ts-i { width: 26px; height: 26px; color: var(--text-2); }
.ts-hub a > span { display: flex; flex-direction: column; }
.ts-hub b { color: var(--heading); font-size: 16px; }
.ts-hub .ts-muted { font-size: 13px; }

/* ---------- Mid width: icon-only sidebar ---------- */
@media (max-width: 1180px) {
	:root { --ts-side: 68px; --ts-now: 300px; }
	.ts-nav-label, .ts-nav-sep, .ts-side-sec, .ts-side-legal, .ts-nav-count { display: none; }
	.ts-nav-a { justify-content: center; padding: 11px 0; position: relative; }
	.ts-hero-art { width: 150px; height: 150px; }
	.ts-tracks { --cols: 32px 44px minmax(0, 2fr) minmax(0, 1.2fr) 52px 80px; }
	.ts-tracks .ts-c-genre { display: none; }
	.ts-tracks.no-work { --cols: 32px 44px minmax(0, 2.6fr) 90px 52px 80px; }
}
@media (max-width: 960px) and (min-width: 761px) {
	:root { --ts-now: 270px; }
	.ts-view { padding: 16px 18px 120px; }
	.ts-hero { margin: -16px -18px 0; }
	.ts-tracks { --cols: 32px 44px minmax(0, 1fr) 52px 80px; }
	.ts-tracks .ts-c-work { display: none; }
	.ts-tracks.no-work .ts-c-work { display: flex; }
	.ts-tracks.no-work { --cols: 32px 44px minmax(0, 1fr) 80px 52px 80px; }
	.ts-histnav { display: none; }
}

/* ---------- Phones ---------- */
@media (max-width: 760px) {
	body.ts { grid-template-rows: auto minmax(0, 1fr); }
	.kit-header.ts-top { gap: 6px; padding: 6px 10px; min-height: 52px; }
	.ts-brand-name, .ts-histnav, .ts-search-kbd { display: none; }
	.ts-search { margin: 0; }
	.ts-search input { height: 38px; font-size: 16px; }
	.ts-app {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto minmax(0, 1fr) auto auto;
		grid-template-areas: "video" "main" "bar" "tabs";
		gap: 0; padding: 0;
	}
	.ts-side { display: none; }
	.ts-main { border-radius: 0; background: var(--bg); }
	.ts-now { display: contents; }
	.ts-video { grid-area: video; display: none; padding: 0; background: #000; }
	body.has-player .ts-video { display: block; }
	.ts-player { border-radius: 0; aspect-ratio: auto; height: max(210px, min(56.25vw, 34vh)); }
	.ts-demo-tag { top: 8px; left: 8px; }
	.ts-now-rest {
		position: fixed; left: 0; right: 0; bottom: 0; top: 18vh; z-index: 800; background: var(--bg);
		border-radius: 16px 16px 0 0; box-shadow: 0 -16px 50px rgba(0, 0, 0, 0.35); overflow-y: auto;
		transform: translateY(105%); transition: transform var(--dur) var(--ease-out); visibility: hidden;
	}
	body.sheet-open .ts-now-rest { transform: none; visibility: visible; }
	body.has-player.sheet-open .ts-now-rest { top: var(--ts-safe-top, calc(52px + max(210px, min(56.25vw, 34vh)))); }
	.ts-sheet-grip { display: flex; justify-content: center; position: sticky; top: 0; background: var(--bg); z-index: 1; padding-top: 4px; }
	.ts-bar { grid-area: bar; grid-template-columns: minmax(0, 1fr) auto; padding: 6px 10px; gap: 8px; background: var(--surface); border-top: 1px solid var(--border); position: relative; }
	.ts-bar-art { width: 44px; height: 44px; }
	.ts-bar-mid { flex-direction: row; }
	.ts-seek { position: absolute; left: 0; right: 0; top: -8px; gap: 0; max-width: none; }
	.ts-seek .ts-time { display: none; }
	.ts-transport { gap: 2px; }
	#btn-prev, #btn-reshuffle, #btn-mode { display: none; }
	.ts-bar-right { display: none; }
	.ts-tabbar {
		grid-area: tabs; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface);
		padding: 4px 4px max(4px, env(safe-area-inset-bottom)); border-top: 1px solid var(--border);
	}
	.ts-tab-a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 11px; font-weight: 650; color: var(--text-2); text-decoration: none; border-radius: 8px; }
	.ts-tab-a.is-on { color: var(--heading); }
	.ts-tab-a .ts-i { width: 22px; height: 22px; }
	.ts-view { padding: 14px 16px 40px; }
	.ts-hero { flex-direction: column; align-items: flex-start; gap: 14px; margin: -14px -16px 0; padding: 22px 16px 16px; border-radius: 0; }
	.ts-hero-art { width: 132px; height: 132px; }
	.ts-h1 { font-size: 26px; }
	.ts-greet { font-size: 26px; }
	.ts-quick { grid-template-columns: 1fr 1fr; gap: 8px; }
	.ts-quickb { flex-direction: column; align-items: flex-start; gap: 8px; }
	.ts-quick-t span { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
	.ts-quick-ic { width: 40px; height: 40px; }
	.ts-tracks, .ts-tracks.no-work { --cols: 44px minmax(0, 1fr) 80px; }
	.ts-c-more .ts-like { opacity: 1; }
	.ts-thead { display: none; }
	.ts-row { gap: 10px; padding: 0 4px; }
	.ts-row .ts-c-idx, .ts-row .ts-c-work, .ts-row .ts-c-genre, .ts-row .ts-c-len { display: none; }
	.ts-c-more .ts-icon-btn { opacity: 1; }
	.ts-grid.is-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
	.ts-grid.is-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.ts-grid.is-tiles.is-small { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ts-tile { min-height: 96px; padding: 12px; }
	.ts-tile-title { font-size: 15px; max-width: 90%; }
	.ts-tile-art { width: 60px; height: 60px; }
	.ts-shelf { grid-auto-columns: 140px; }
	.ts-shelf:has(.ts-tile-wrap) { grid-auto-columns: 170px; }
	.ts-shelf .ts-tile-wrap { width: 170px; }
	.ts-bigplay { opacity: 1; transform: none; width: 38px; height: 38px; }
	.ts-card .ts-bigplay { display: none; }
	.ts-edit-grid { grid-template-columns: minmax(0, 1fr); }
	.ts-statcols { grid-template-columns: minmax(0, 1fr); }
	.ts-selbar { border-radius: 14px; bottom: 8px; }
	.ts-modal-back { align-items: flex-end; padding: 0; }
	.ts-modal { border-radius: 16px 16px 0 0; max-height: 92dvh; }
	.ts-menu { max-width: calc(100vw - 16px); }
	.ts-filter { max-width: none; }
	.ts-actions { gap: 8px; }
	.ts-demo { padding: 8px 16px; }
}

/* ---------- Thumbnail: a fixed, full frame ---------- */
html.is-thumb body.ts { grid-template-rows: minmax(0, 1fr); }
html.is-thumb .ts-app { padding: 8px; }
html.is-thumb .ts-main { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
	.ts-eq i { animation: none; height: 55%; }
}
html.is-reduced .ts-eq i { animation: none; height: 55%; }

/* fixes after the first look */
.ts a.ts-tile { color: #fff; }
.ts-search { min-width: 0; }
@media (max-width: 760px) {
	.ts-search { flex: 1 1 0; }
	.kit-header.ts-top .kit-tools { gap: 2px; }
	.kit-header.ts-top .kit-back { font-size: 0; padding: 0 6px; }
	.kit-header.ts-top .kit-back::before { content: '\2190'; font-size: 18px; }
	.ts-logo { width: 26px; height: 26px; }
}
.kit-header.ts-top .kit-spacer { display: none; }
@media (max-width: 760px) {
	.kit-header.ts-top .kit-tools { gap: 0; }
	.kit-header.ts-top .kit-theme, .kit-header.ts-top .kit-help { width: 36px; height: 36px; min-width: 0; }
}
/* the kit moves the history buttons and the search into .kit-tools */
.kit-header.ts-top .ts-histnav { margin: 0 auto 0 24px; }
.kit-header.ts-top .ts-search { flex: 0 1 520px; margin: 0 auto 0 0; }
@media (max-width: 760px) {
	.kit-header.ts-top .ts-search { flex: 1 1 0; margin: 0; }
}

/* ---------- Focus: working inside a playlist ---------- */
.ts-focus {
	display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px 0 14px; max-width: 240px; flex: none;
	border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text);
	font: inherit; font-size: 14px; font-weight: 650; cursor: pointer;
}
.ts-focus:hover { border-color: var(--border-strong); }
.ts-focus .ts-i { width: 18px; height: 18px; color: var(--text-2); }
.ts-focus .ts-focus-caret { width: 14px; height: 14px; }
.ts-focus-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-focus.is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--heading); }
.ts-focus.is-on .ts-i { color: var(--accent); }
.ts-focusbar { display: flex; align-items: center; gap: 10px; margin: -6px 0 14px; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); font-size: 13.5px; }
.ts-focusbar .ts-i { width: 18px; height: 18px; color: var(--accent); }
.ts-focusbar span { flex: 1; min-width: 0; }
.ts-focusbar a { font-weight: 700; text-decoration: none; color: var(--heading); }
.ts-focusbar a:hover { text-decoration: underline; }
a.ts-station { text-decoration: none; }
.ts-station.is-on { background: var(--ts-sel); }
.ts-station.is-focused span { color: var(--accent); font-weight: 650; }
.ts-station .ts-station-focus { width: 16px; height: 16px; color: var(--accent); margin-left: auto; }
.ts-card.is-focused { box-shadow: inset 0 0 0 2px var(--accent); }
.ts-bigplay.is-plus { right: 10px; bottom: 10px; width: 36px; height: 36px; opacity: 1; transform: none; background: rgba(0, 0, 0, 0.35); color: #fff; box-shadow: none; }
.ts-bigplay.is-plus:hover { background: rgba(0, 0, 0, 0.55); }
body.is-dragging .ts-now, body.is-dragging .ts-station { outline: 2px dashed var(--border-strong); outline-offset: -4px; }
.is-drop { outline: 2px solid var(--accent) !important; background: var(--accent-soft) !important; }
@media (max-width: 760px) {
	.ts-focus { height: 38px; padding: 0 10px; max-width: 120px; font-size: 13px; }
	.ts-focus .ts-focus-caret { display: none; }
}

/* ---------- History ---------- */
.ts-histlist { list-style: none; margin: 0; padding: 0; max-width: 760px; }
.ts-histlist li { display: flex; align-items: center; gap: 8px; border-radius: 8px; }
.ts-histlist li:hover { background: var(--ts-hover); }
.ts-histlist li.is-skip { opacity: 0.6; }
.ts-hist-time { font: 12px var(--font-mono); color: var(--text-2); width: 44px; text-align: right; flex: none; }

/* ---------- Quick labeller ---------- */
.ts-labelcard { max-width: 880px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; }
.ts-alias-dialog .ts-btn, .ts-alias-list .ts-btn { min-height: 44px; }
.ts-labelhead { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 14px; }
.ts-label-art { width: 128px; height: 128px; border-radius: 10px; flex: none; }
.ts-labelhead .ts-now-title { font-size: 18px; overflow-wrap: anywhere; }
.ts-chips.is-tight { margin-top: 4px; gap: 5px; }
.ts-labeldyn { display: grid; gap: 12px; margin-top: 14px; }
.ts-more-genre { width: auto; margin-top: 6px; font-size: 13px; }
@media (max-width: 760px) { .ts-label-art { width: 84px; height: 84px; } .ts-labelcard { padding: 14px; } }

/* ---------- The map ---------- */
.ts-view.is-map { max-width: none; padding-bottom: 24px; }
.ts-mapbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 4px; }
.ts-mapbar .kit-input { width: auto; }
.ts-mapfind { flex: 1 1 200px; max-width: 280px; }
.ts-mapinfo { font-size: 13px; }
.ts-mapblurb { font-size: 13px; margin: 4px 0 8px; max-width: 90ch; }
.ts-mapwrap { position: relative; height: calc(100dvh - 300px); min-height: 380px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.ts-map { display: block; touch-action: none; cursor: grab; outline: none; }
.ts-map:active { cursor: grabbing; }
.ts-map:focus-visible { box-shadow: inset 0 0 0 2px var(--accent-ring); }
.ts-maptip { position: absolute; pointer-events: none; z-index: 3; max-width: 220px; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 12.5px; }
.ts-maptip b { color: var(--heading); }
.ts-maplegend { position: absolute; left: 10px; bottom: 10px; z-index: 2; display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 10px; background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--border); max-height: calc(100% - 20px); overflow-y: auto; }
.ts-leg { display: flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--text); font: inherit; font-size: 12.5px; padding: 3px 6px; border-radius: 6px; cursor: pointer; text-align: left; }
.ts-leg:hover { background: var(--ts-hover); }
.ts-leg i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.ts-leg.is-off { opacity: 0.45; }
.ts-leg.is-off i { background: transparent !important; box-shadow: inset 0 0 0 1.5px var(--text-2); }
.ts-ramp { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); padding: 4px; }
.ts-ramp-bar { width: 120px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #cde2fb, #6da7ec, #256abf, #0d366b); }
.ts-mapside { position: absolute; right: 10px; top: 10px; z-index: 2; width: 250px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.ts-mapside-art { width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; }
.ts-mapside-art img { object-fit: cover; }
.ts-mapside-title { font-weight: 700; color: var(--heading); text-decoration: none; margin: 0; }
.ts-mapside .ts-row-btns { margin: 4px 0 0; }
.ts-mapside .ts-btn { --btn-h: 34px; padding: 0 12px; font-size: 13px; }
.ts-regions .ts-sec-head { font-size: 18px; color: var(--heading); margin: 16px 0 8px; }
@media (max-width: 760px) {
	.ts-mapwrap { height: 62vh; }
	.ts-mapside { left: 8px; right: 8px; top: auto; bottom: 8px; width: auto; }
	.ts-mapside-art { display: none; }
	.ts-maplegend { top: 8px; bottom: auto; flex-direction: row; flex-wrap: wrap; max-width: calc(100% - 16px); }
}
.ts-station .ts-station-art { width: 32px; height: 32px; aspect-ratio: 1; }

/* ---------- Discover ---------- */
.ts-dlist { list-style: none; margin: 0; padding: 0; max-width: 900px; }
.ts-drow { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; }
.ts-drow:hover { background: var(--ts-hover); }
.ts-drow .ts-q-art { width: 44px; height: 44px; border-radius: 5px; }
.ts-drow .ts-q-text { flex: 1; min-width: 0; }
.ts-drow .ts-tag { margin: 0; }
.ts-pv.is-on { color: var(--accent); }
.ts-ytsearch { margin-top: 24px; max-width: 900px; }

/* what the player is doing, over the video box */
.ts-player-msg { margin: 8px 0 0; border-radius: 10px; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; color: var(--text); font-size: 13px; line-height: 1.45; background: var(--surface-2); border: 1px solid var(--border); }
.ts-player-msg p { margin: 0; }
.ts-player-msg.is-loading { flex-direction: row; align-items: center; font-weight: 600; }
.ts-player-msg.is-loading::before { content: ''; width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid var(--accent); border-right-color: transparent; animation: ts-spin 0.8s linear infinite; }
.ts-player-msg.is-error { border-color: var(--kit-warn-line); }
@media (max-width: 760px) { .ts-player-msg { margin: 0; border-radius: 0; border-width: 1px 0 0; max-height: 30vh; overflow-y: auto; } }
.ts-player-msg .ts-diag { font: 11px var(--font-mono); opacity: 0.75; overflow-wrap: anywhere; }

/* the handle that resizes the now-playing panel */
.ts-now { position: relative; }
.ts-resizer { position: absolute; left: 0; top: 0; bottom: 0; width: 10px; z-index: 4; cursor: col-resize; touch-action: none; outline: none; }
.ts-resizer::after { content: ''; position: absolute; left: 3px; top: 50%; width: 4px; height: 44px; margin-top: -22px; border-radius: 4px; background: var(--border-strong); opacity: 0; transition: opacity var(--dur-fast), background var(--dur-fast); }
.ts-now:hover .ts-resizer::after, .ts-resizer:focus-visible::after { opacity: 1; }
.ts-resizer:hover::after, .ts-resizer:focus-visible::after, body.is-resizing .ts-resizer::after { background: var(--accent); opacity: 1; }
body.is-resizing { cursor: col-resize; user-select: none; -webkit-user-select: none; }
body.is-resizing iframe { pointer-events: none; }
@media (max-width: 760px) { .ts-resizer { display: none; } }

/* ---------- When you added them: songs per month ---------- */
.ts-timeline { margin: 16px 0 8px; }
.ts-timeline figcaption { font-size: 12.5px; margin-bottom: 8px; }
.ts-tl-cols { display: flex; align-items: flex-end; gap: 2px; height: 120px; padding-bottom: 18px; position: relative; overflow-x: auto; }
.ts-tl-col { position: relative; flex: 1 0 6px; height: 100%; display: flex; align-items: flex-end; text-decoration: none; border-radius: 3px; }
.ts-tl-col i { display: block; width: 100%; border-radius: 3px 3px 0 0; background: var(--ts-bar-fill); }
a.ts-tl-col:hover i, a.ts-tl-col:focus-visible i { background: var(--accent); }
a.ts-tl-col:hover { background: var(--ts-hover); }
.ts-tl-col b { position: absolute; left: 0; bottom: -18px; font-size: 11px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.ts-tl-col.is-year { box-shadow: -1px 0 0 var(--border); }

/* =========================================================================
   UI pass 3: a bigger player bar, the shuffle order everywhere, player
   sizes, volume, likes, the palette, toasts with undo, a sticky header.
   ========================================================================= */
@media (min-width: 761px) { .ts-seek { position: relative; } }
.ts-seektip { position: absolute; bottom: 22px; transform: translateX(-50%); font: 11.5px var(--font-mono); background: var(--heading); color: var(--bg); padding: 2px 6px; border-radius: 5px; pointer-events: none; }

/* the order: a labelled pill */
.ts-modepill {
	display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 10px; margin-right: 6px; max-width: 220px;
	border-radius: 999px; border: 1px solid var(--accent); background: var(--accent-soft); color: var(--heading);
	font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.ts-modepill:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.ts-modepill .ts-i { width: 18px; height: 18px; color: var(--accent); flex: none; }
.ts-modepill .ts-modepill-caret { width: 14px; height: 14px; }
.ts-modepill-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-modepill.is-small { height: 32px; font-size: 12.5px; margin: 0; }
.ts-qmode { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 8px 8px; font-size: 12.5px; }
.ts-orderrow { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 13.5px; }
.ts-menu-two { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ts-menu-desc { font-size: 12px; color: var(--text-2); white-space: normal; line-height: 1.35; margin-top: 1px; }
.ts-menu-item:has(.ts-menu-desc) { align-items: flex-start; padding-top: 9px; padding-bottom: 9px; }

/* Shuffle with its order */
.ts-split-mode { font-weight: 500; color: var(--text-2); font-size: 12.5px; }

/* the player's size */
.ts-vbar { display: flex; gap: 4px; justify-content: flex-end; padding: 6px 0 0; }
.ts-vbtn { min-width: 34px; height: 30px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ts-vbtn .ts-i { width: 16px; height: 16px; }
.ts-vbtn:hover { color: var(--heading); border-color: var(--border-strong); }
.ts-vbtn.is-on { background: var(--heading); color: var(--bg); border-color: var(--heading); }
.ts-resizer::after { opacity: 0.6; }
body.is-theater .ts-nav-label, body.is-theater .ts-nav-sep, body.is-theater .ts-side-sec, body.is-theater .ts-side-legal, body.is-theater .ts-nav-count { display: none; }
body.is-theater { --ts-side: 68px; }
body.is-theater .ts-nav-a { justify-content: center; padding: 11px 0; }
.ts-video:fullscreen { background: #000; padding: 0; display: flex; flex-direction: column; }
.ts-video:fullscreen .ts-player { flex: 1; aspect-ratio: auto; height: auto; border-radius: 0; }
.ts-video:fullscreen .ts-vbar, .ts-video:fullscreen .ts-player-msg { display: none; }

/* volume, like */
.ts-vol { display: inline-flex; align-items: center; gap: 2px; }
.ts-volrange { width: 96px; }
.ts-volrange::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--text) var(--p, 100%), var(--border-strong) var(--p, 100%)); }
.ts-like.is-on, #btn-like.is-on { color: #e8487a; }
.ts-c-more { display: flex; align-items: center; justify-content: flex-end; }
.ts-c-more .ts-like { opacity: 0; }
.ts-c-more .ts-like.is-on { opacity: 1; }
.ts-row:hover .ts-c-more .ts-like, .ts-row:focus-within .ts-c-more .ts-like { opacity: 1; }

/* compact lists */
body.is-compact .ts-c-art .ts-art { width: 36px; height: 36px; }
body.is-compact .ts-r-title { font-size: 13.5px; }
body.is-compact .ts-r-sub { font-size: 12px; }

/* the sticky header */
.ts-sticky { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: 12px; height: 0; overflow: hidden; margin: 0 -24px; padding: 0 24px; background: var(--ts-panel); border-bottom: 0 solid var(--border); transition: height var(--dur-fast); }
.ts-sticky.is-on { height: 60px; border-bottom-width: 1px; }
.ts-sticky b { font-size: 18px; color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-sticky-play { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--ts-play); color: var(--ts-play-ink); display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }

/* the palette */
.ts-modal.ts-palette { max-width: 620px; align-self: flex-start; margin-top: 10vh; }
.ts-palette-in { width: 100%; font-size: 16px; height: 46px; }
.ts-pal-list { list-style: none; margin: 10px 0 0; padding: 0; max-height: 56vh; overflow-y: auto; }
.ts-pal-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.ts-pal-item.is-on { background: var(--ts-sel); }
.ts-pal-ic { width: 36px; height: 36px; border-radius: 8px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--text-2); flex: none; }
.ts-pal-art { width: 36px; height: 36px; border-radius: 6px; }
.ts-pal-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ts-pal-text b { color: var(--heading); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-pal-text span { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-pal-kind { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-2); }
.ts-pal-none { padding: 12px; }
.ts-keys { border-collapse: collapse; width: 100%; font-size: 14px; }
.ts-keys th { text-align: left; padding: 6px 16px 6px 0; white-space: nowrap; vertical-align: top; }
.ts-keys td { padding: 6px 0; color: var(--text); }
.ts-keys kbd { font: 12px var(--font-mono); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; background: var(--surface); }

/* toasts with an action */
.ts-toast { position: fixed; left: 50%; bottom: calc(var(--ts-bar) + 24px); transform: translate(-50%, 20px); z-index: 950; display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 16px; border-radius: 10px; background: var(--heading); color: var(--bg); font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); opacity: 0; pointer-events: none; transition: opacity var(--dur-fast), transform var(--dur-fast); max-width: calc(100vw - 32px); }
.ts-toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.ts-toast-btn { border: 0; background: none; color: #7cb3ff; font: inherit; font-weight: 800; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
:root[data-theme="dark"] .ts-toast-btn { color: #1f5fd6; }

/* the bar on phones: the order stays reachable, as an icon */
@media (max-width: 760px) {
	#btn-mode { display: inline-flex; padding: 0 8px; height: 36px; margin: 0; }
	#btn-mode .ts-modepill-label, #btn-mode .ts-modepill-caret { display: none; }
	#btn-repeat { display: none; }
	.ts-play { width: 48px; height: 48px; }
	.ts-vbar { display: none; }
	.ts-toast { bottom: 150px; }
}
@media (max-width: 1180px) { .ts-volrange { width: 70px; } .ts-modepill { max-width: 160px; } }

/* titles follow their column, not the window */
.ts-view { container-type: inline-size; }
.ts-hero-title { font-size: clamp(26px, 7.5cqi, 64px); }
@container (max-width: 560px) { .ts-hero { flex-direction: column; align-items: flex-start; } .ts-hero-art { width: 140px; height: 140px; } }

body.is-filedrop::after { content: 'Drop the labels file to apply it'; position: fixed; inset: 12px; z-index: 990; display: flex; align-items: center; justify-content: center; border: 3px dashed var(--accent); border-radius: 16px; background: color-mix(in srgb, var(--bg) 80%, transparent); color: var(--heading); font-size: 22px; font-weight: 800; pointer-events: none; }

/* works: one-song works, the list view */
.ts-onesong { margin: 4px 0 18px; }
.ts-onesong summary { cursor: pointer; font-weight: 650; color: var(--text-2); font-size: 13.5px; padding: 6px 0; }
.ts-onesong .ts-chips { margin-top: 8px; }
.ts-wtable-wrap { overflow-x: auto; }
.ts-wtable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ts-wtable th { text-align: left; font-size: 12px; color: var(--text-2); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.ts-wtable td { padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ts-wtable tr:hover td { background: var(--ts-hover); }
.ts-wtable .is-num { text-align: right; font-variant-numeric: tabular-nums; }
.ts-wt-art { width: 40px; height: 40px; border-radius: 6px; }
.ts-wt-name { font-weight: 650; color: var(--heading); text-decoration: none; }
.ts-wt-name:hover { text-decoration: underline; }
.ts-wt-artists { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-sec-head .ts-btn { margin-left: auto; }
@media (max-width: 760px) { .ts-wtable th:nth-child(3), .ts-wtable td:nth-child(3), .ts-wtable th:nth-child(7), .ts-wtable td:nth-child(7), .ts-wtable th:nth-child(8), .ts-wtable td:nth-child(8) { display: none; } }
.ts-wtable td { white-space: nowrap; } .ts-wtable td.ts-wt-artists { white-space: nowrap; }

/* ---------- Discover hub ---------- */
.ts-back { display: inline-block; margin: 0 0 8px; font-size: 13.5px; font-weight: 650; color: var(--text-2); text-decoration: none; }
.ts-back:hover { color: var(--heading); text-decoration: underline; }
.ts-dsearch .kit-input { flex: 1 1 320px; max-width: 520px; height: 44px; font-size: 15px; }
.ts-dsearch-res:empty { display: none; }
.ts-dsec { margin-top: 8px; }
.ts-dsub { margin-top: 16px; }
.ts-dsub h3 { margin: 0; font-size: 16px; color: var(--heading); }
.ts-dsub .ts-btn, .ts-dsec .ts-sec-head .ts-btn { margin-left: auto; }
.ts-save.is-on { color: var(--accent); }
.ts-dloading { font-size: 13px; }

/* the preview radio, above the player bar */
.ts-pvbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--ts-bar) + 12px); z-index: 900; width: min(980px, calc(100vw - 24px)); display: flex; align-items: center; gap: 8px; padding: 10px 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border-strong); box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4); }
.ts-pvbar-art { width: 52px; height: 52px; border-radius: 8px; flex: none; }
.ts-pvbar-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ts-pvbar-text .ts-kicker { margin: 0; font-size: 10.5px; }
.ts-pvbar-text b { color: var(--heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-pvbar-text a, .ts-pvbar-text span { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-pvbar-prog { position: absolute; left: 12px; right: 12px; bottom: 6px; height: 3px; border-radius: 3px; background: var(--border); overflow: hidden; }
.ts-pvbar-fill { display: block; height: 100%; width: 0; background: var(--accent); }
body.has-pvbar .ts-toast { bottom: calc(var(--ts-bar) + 110px); }
@media (max-width: 760px) { .ts-pvbar { bottom: 140px; flex-wrap: wrap; } .ts-pvbar .ts-btn--sm:not(.is-icon) { display: none; } }

/* ---------- Moods & scenes: the mixer and the grid ---------- */
.ts-mixer { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; margin: 4px 0 18px; }
.ts-mixer h2 { margin: 0 0 4px; font-size: 19px; color: var(--heading); }
.ts-mixer > p { margin: 0 0 10px; font-size: 13px; }
.ts-mixrow { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; align-items: start; padding: 6px 0; border-top: 1px solid var(--border); }
.ts-mixrow-h { font-size: 12.5px; font-weight: 700; color: var(--text-2); padding-top: 6px; }
.ts-mixres { margin-top: 10px; font-size: 15px; }
.ts-mixres b { color: var(--heading); }
.ts-mixer .ts-actions { padding-bottom: 0; }
.ts-matrix-wrap { overflow-x: auto; }
.ts-matrix { border-collapse: separate; border-spacing: 3px; font-size: 13px; }
.ts-matrix th { font-weight: 650; color: var(--text-2); padding: 4px 8px; white-space: nowrap; text-align: center; font-size: 12px; }
.ts-matrix th[scope="row"] { text-align: left; font-size: 13px; }
.ts-matrix th a { color: var(--heading); text-decoration: none; }
.ts-matrix td { padding: 0; min-width: 64px; }
.ts-matrix td a { display: block; text-align: center; padding: 10px 6px; border-radius: 6px; text-decoration: none; color: var(--heading); font-weight: 650; font-variant-numeric: tabular-nums; background: color-mix(in srgb, var(--ts-bar-fill) calc(var(--t, 10) * 1%), transparent); }
.ts-matrix td a:hover, .ts-matrix td a:focus-visible { outline: 2px solid var(--accent); }
.ts-breakdown { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 10px; font-size: 13px; }
@media (max-width: 760px) { .ts-mixrow { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.ts-subh { margin: 14px 0 6px; font-size: 15px; color: var(--text-2); } .ts-more-artist { margin-top: 8px; border-top: 1px solid var(--border); }
.ts-bars-t { table-layout: fixed; } .ts-bars-t th { width: 42%; max-width: none; } .ts-bars-v { width: 14%; } .ts-bars-c { width: 44%; }
@media (max-width: 760px) { .ts-sticky { margin: 0 -16px; padding: 0 16px; } }

/* adding a found song to a YouTube playlist */
.ts-addyt.is-done { color: var(--accent); border-color: var(--accent); }

/* songs like this one: the Like this tab and the track page */
.ts-like-h { margin: 12px 4px 4px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2); }
.ts-like-why { font-size: 11.5px; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-like .ts-q-x { opacity: 0.7; }
.ts-like:hover .ts-q-x, .ts-like:focus-within .ts-q-x { opacity: 1; }
.ts-like-acts { padding: 10px 4px 4px; }
.ts-like-acts .ts-btn { --btn-h: 32px; font-size: 12.5px; }
.ts-like-sec { margin-top: 18px; }
.ts-like-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 4px 24px; align-items: start; }
.ts-tabs .ts-link-btn { white-space: nowrap; }

/* journeys */
.ts-maphint { position: absolute; left: 12px; top: 12px; z-index: 3; margin: 0; display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--accent); font-size: 13px; font-weight: 650; color: var(--heading); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25); }
.ts-maphint[hidden] { display: none; }
.ts-jlist { max-height: 46vh; overflow: auto; margin: 8px 0; }

/* versions and voice actors */
.ts-voices { margin: 4px 0 0; font-size: 13.5px; color: var(--text); }
.ts-voices a { font-weight: 650; }
.ts-now-voices { font-size: 13px; margin-top: 2px; }
.ts-now-vers { display: block; margin: 4px 0 0; font-size: 12.5px; }

/* ---------- The queue folded to one line (Q or the Queue button on a wide window) ---------- */
.ts-queue-fold { display: none; }
@media (min-width: 761px) {
	body.queue-hidden .ts-queue { flex: none; }
	body.queue-hidden .ts-queue > :not(.ts-queue-fold) { display: none; }
	body.queue-hidden .ts-queue-fold {
		display: block; width: 100%; margin: 4px 0; padding: 10px 14px; border-radius: 10px;
		border: 1px solid var(--border); background: var(--surface); color: var(--text);
		font: inherit; font-size: 13.5px; font-weight: 600; text-align: left; cursor: pointer;
		overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
	}
	body.queue-hidden .ts-queue-fold:hover { border-color: var(--border-strong); background: var(--ts-hover); }
}

/* ---------- Settings > Playback: what the media keys sent ---------- */
.ts-medialog { list-style: none; margin: 4px 0 8px; padding: 0; font-size: 13px; display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow-y: auto; }
.ts-medialog li { display: flex; gap: 8px; align-items: baseline; }
.ts-medialog .ts-hist-time { width: auto; text-align: left; }
.ts-ok { color: var(--ts-ok); font-weight: 650; }

/* a page title that took the focus for screen readers shows no ring */
.ts-view h1[tabindex="-1"]:focus { outline: none; }

/* ---------- The bar's More: sleep, theater, full screen, edit, repeat ---------- */
#btn-bar-more { position: relative; }
#btn-bar-more.has-dot::after { content: ''; position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--ts-chrome); }
@media (max-width: 1100px) and (min-width: 761px) {
	#btn-reshuffle, #btn-repeat { display: none; }
	.ts-volrange { width: 64px; }
}

/* ---------- The queue: a feeder's songs still being found ---------- */
.ts-q.is-pending { opacity: 0.72; }
.ts-q.is-pending .ts-grip { visibility: hidden; }
.ts-q.is-pending .ts-q-main { cursor: default; }
.ts-q-state { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 0 8px; font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; }

/* ---------- The ambient glow behind the video ---------- */
.ts-video { isolation: isolate; }
/* The glow sits on the video's own box and spreads by its blur alone: a blur's spill is not scrollable overflow, an offset box is (the panel would scroll sideways). */
body.has-ambient .ts-video::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--ambient, none) center / cover no-repeat; filter: blur(46px) saturate(1.5); opacity: 0.45; transition: opacity var(--dur-slow, 400ms); }
:root[data-theme="light"] body.has-ambient .ts-video::before { opacity: 0.3; }
@media (max-width: 760px) { body.has-ambient .ts-video::before { display: none; } }

/* ---------- Playback speed badge ---------- */
.ts-rate-badge { border: 1px solid var(--accent); background: var(--accent-soft); color: var(--accent); border-radius: 999px; font: 700 11px var(--font-mono); padding: 1px 6px; cursor: pointer; flex: none; }

/* UI pass, 2026-10-11 */
/* the now-playing actions: the stars and five buttons on one row */
.ts-now-actions .ts-btn.is-icon { --btn-h: 34px; }
@media (max-width: 760px) {
	/* the mini player: the title gets the room; the order is in the sheet */
	.ts-bar #btn-mode { display: none; }
	/* the header: the search field before the focus label */
	.ts-focus-label { display: none; }
	.ts-focus { max-width: none; padding: 0 9px; }
}
/* the queue's order row: the pill, the time left and Shuffle again on one line */
.ts-qmode { flex-wrap: nowrap; }
.ts-qmode > .ts-muted { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-qmode .ts-btn.is-icon { --btn-h: 32px; flex: none; }
/* the player sizes share the "Now playing" line instead of a row of their own (a wide window) */
@media (min-width: 761px) {
	.ts-vbar { position: relative; z-index: 2; padding: 10px 16px 0; margin-bottom: -40px; pointer-events: none; }
	.ts-vbar > * { pointer-events: auto; }
	.ts-vbtn { height: 28px; min-width: 30px; padding: 0 7px; font-size: 12px; }
}
/* a phone: the header art smaller, so the title and its buttons come sooner */
@media (max-width: 760px) { .ts-hero-art { width: 104px; height: 104px; } }
/* a mid-width window: the panel is narrow; the size presets go (theater, full screen and the drag stay), the row of actions and the tabs tighten */
@media (min-width: 761px) and (max-width: 1099px) {
	.ts-vbtn:nth-child(-n+3) { display: none; }
	.ts-now-actions .ts-btn.is-icon { --btn-h: 30px; }
	.ts-now-actions { gap: 0; }
	.ts-tab { padding: 6px 6px; font-size: 13.5px; }
}
/* a queue row's remove on a touch screen: shown, but quiet (with a mouse it shows on hover) */
@media (hover: none), (pointer: coarse) { .ts-q .ts-q-x { opacity: 0.6; } .ts-q .ts-q-x:focus-visible { opacity: 1; } }

.ts-pick > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 761px) { .ts-tracks.is-naming { --cols: 36px 44px minmax(0, 1fr) 52px 80px; } .ts-tracks.is-naming .ts-c-work, .ts-tracks.is-naming .ts-c-genre { display: none; } }
@media (max-width: 1180px) and (min-width: 761px) { .ts-tracks.is-naming { --cols: 32px 44px minmax(0, 1fr) 52px 80px; } }
@media (pointer: coarse) { .ts-pick { position: relative; } .ts-pick::after { content: ""; position: absolute; inset: -10px -3px; } }

body.has-selbar .ts-toast { bottom: calc(var(--ts-bar) + var(--ts-selbar-h, 96px) + 24px); }

.ts-tracks.is-selecting .ts-c-art { position: relative; }
.ts-tracks.is-selecting .ts-c-art::after { content: ""; position: absolute; inset: 0; border-radius: 6px; box-shadow: inset 0 0 0 2px var(--border-strong); }
.ts-tracks.is-selecting .ts-row.is-sel .ts-c-art::after { box-shadow: inset 0 0 0 3px var(--accent); background: color-mix(in srgb, var(--accent) 35%, transparent); }

.ts-selbar .ts-btn { color: var(--bg); border-color: color-mix(in srgb, var(--bg) 45%, transparent); }
.ts-selbar .ts-btn:hover:not(:disabled) { color: var(--bg); background: rgba(127, 127, 127, 0.25); }
