/* SoundAgent v0.1 */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0c0c0e;          /* true near-black, no tint */
  --panel: #161618;
  --panel-2: #1e1e21;
  --text: #f2f1f4;
  --dim: #98979e;
  --accent: #ffd428;      /* signal yellow — every primary action */
  --accent-ink: var(--accent-ink);  /* text on yellow */
  --accent-2: #8a79ff;    /* electric violet — the agent's color, small doses */
  --user: #28282c;
  --line: #26262a;        /* card + panel hairlines */
  --line-2: #34343a;      /* raised lines: dashes, handles, leaders */
  --hover: #47474f;       /* neutral border lift on hover */
  --radius: 18px;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ------------------------------------------------------------- glyph icons */
/* Material Symbols Rounded, ligature-based: <span class="ms">piano</span>.
   Icon-only buttons carry the class themselves and their text IS the glyph. */
.ms {
  font-family: 'Material Symbols Rounded';
  font-weight: normal; font-style: normal; line-height: 1;
  display: inline-block; vertical-align: -0.22em; font-size: 1.2em;
  letter-spacing: normal; text-transform: none; white-space: nowrap;
  word-wrap: normal; direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 1, 'opsz' 20;
}

/* ---------------------------------------------------------------- topbar */
:root { --topbar-h: 60px; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  height: var(--topbar-h);
  padding: 0 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.topbar-actions { overflow-x: auto; scrollbar-width: none; }
.topbar-actions::-webkit-scrollbar { display: none; }
.topbar-actions .pill { white-space: nowrap; text-decoration: none; }
.nav-pill.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
/* The pill row never spills off the right edge: it sheds weight in steps as
   the window narrows — labels first (icons keep their tooltips), then the
   secondary pills (they live in the ☰ sheet), then everything but ☰. */
.topbar-actions { min-width: 0; }   /* stays right-aligned via the topbar's space-between; may shrink, never pushes */
#menuBtn { display: none; }
@media (max-width: 1280px) {
  .topbar-actions .pill { display: inline-flex; align-items: center; gap: 6px; }
  .topbar-actions .pill .pl { display: none; }                      /* icons only */
}
@media (max-width: 1040px) {
  .topbar-actions .pill-2nd { display: none; }
  .topbar-actions #menuBtn { display: inline-flex; align-items: center; font-size: 1.3rem; }
}
@media (max-width: 760px) {
  .topbar-actions .pill { display: none; }
  .topbar-actions #menuBtn { display: inline-flex; align-items: center; font-size: 1.3rem; }
}
.brand { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.5px; }
.topbar-actions { display: flex; gap: 8px; }
.pill {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; font-size: 0.85rem; cursor: pointer;
}
.pill:hover { border-color: var(--hover); }
.pill.connected { border-color: #2f7d4f; color: #7fd8a2; }

/* ---------------------------------------------------------------- chat */
/* Every page shares the block-flow shell body; chat pins its own scroll
   region between the topbar and the composer. */
.chat {
  position: fixed; top: var(--topbar-h); bottom: 0; left: 0; right: 0;
  overflow-y: auto;
  padding: 18px 14px 150px;
  display: flex; flex-direction: column; gap: 12px;
  max-width: 760px; width: 100%; margin: 0 auto;
}
.msg { display: flex; }
.msg.user { justify-content: flex-end; }
.bubble {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: var(--radius);
  line-height: 1.45;
  white-space: pre-wrap;
}
.msg.agent .bubble { background: var(--panel-2); border-bottom-left-radius: 4px; }
.msg.user .bubble { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.msg.cards-msg .bubble { max-width: 100%; width: 100%; background: transparent; padding: 0; }

.dots span { animation: blink 1.2s infinite; font-size: 1.6rem; }
.dots span:nth-child(2) { animation-delay: .2s; }
.dots span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100% { opacity: .25; } 40% { opacity: 1; } }

/* ---------------------------------------------------------------- cards */
.cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.card {
  background: var(--panel-2); border-radius: 12px; overflow: hidden;
  cursor: pointer; transition: transform .12s ease;
}
.card:hover { transform: translateY(-3px); }
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.card-noart {
  width: 100%; aspect-ratio: 1; display: grid; place-items: center;
  font-size: 2rem; color: var(--dim); background: var(--user);
}
.card-title { font-size: 0.78rem; padding: 8px 8px 2px; }
.card-year { font-size: 0.7rem; color: var(--dim); padding: 0 8px 8px; }

.release { display: flex; gap: 14px; background: var(--panel-2); border-radius: var(--radius); padding: 14px; }
.release-cover { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.release-title { font-weight: 700; }
.release-artist { color: var(--accent); font-size: 0.9rem; margin-bottom: 8px; }
.tracklist { list-style: none; max-height: 220px; overflow-y: auto; }
.tracklist li {
  padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 0.85rem;
  display: flex; gap: 8px; align-items: baseline;
}
.tracklist li:hover { background: var(--user); }
.tracklist li::before { content: "▶"; color: var(--accent-2); font-size: 0.6rem; }
.tracklist .pos { color: var(--dim); min-width: 24px; }
.tracklist .dur { margin-left: auto; color: var(--dim); font-size: 0.75rem; }

/* ---------------------------------------------------------------- player */
#ytHolder { position: absolute; width: 0; height: 0; overflow: hidden; }
.player-dock {
  position: fixed; left: 0; right: 0;
  bottom: calc(env(safe-area-inset-bottom));
  z-index: 90;
  background: var(--panel); border-top: 1px solid var(--line);
  padding: 12px 14px 10px; display: flex; align-items: center; gap: 12px;
  max-width: 760px; margin: 0 auto; border-radius: 14px 14px 0 0;
}
/* On the chat page the dock sits above the composer */
#page[data-page="chat"] ~ .player-dock { bottom: 74px; }
.player-dock.hidden { display: none; }
.progress-wrap {
  position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: var(--user); cursor: pointer; border-radius: 14px 14px 0 0;
}
#progressBar { height: 100%; width: 0; background: var(--accent); border-radius: 14px 0 0 0; }
.np-cover { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.player-meta { min-width: 0; flex: 1; }
.np-title { font-weight: 700; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-artist { color: var(--dim); font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-controls { display: flex; gap: 4px; }
.player-controls button {
  background: none; border: none; color: var(--text); font-size: 1.1rem;
  cursor: pointer; padding: 6px; border-radius: 8px;
}
.player-controls button:hover { background: var(--panel-2); }
#btnPlay { color: var(--accent); font-size: 1.3rem; }
.player-close {
  background: none; border: none; color: var(--dim); font-size: 1rem; cursor: pointer;
}
.queue-panel {
  position: absolute; bottom: 100%; left: 0; right: 0;
  background: var(--panel); border: 1px solid var(--line); border-bottom: none;
  border-radius: 14px 14px 0 0; max-height: 260px; overflow-y: auto;
  padding: 10px 14px; margin-bottom: 5px;
}
.queue-panel.hidden { display: none; }
.queue-panel ol { list-style: none; }
.queue-panel li {
  padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 0.85rem;
  display: flex; justify-content: space-between; gap: 10px;
}
.queue-panel li:hover { background: var(--panel-2); }
.queue-panel li.active { color: var(--accent); font-weight: 700; }
.queue-panel .q-artist { color: var(--dim); font-size: 0.75rem; }
.queue-panel .dim-li { color: var(--dim); cursor: default; }

/* Dock soundwave — the homepage spectrum behind the player controls */
.dock-wave {
  position: absolute; left: 0; right: 0; bottom: 0; top: 5px;
  width: 100%; height: calc(100% - 5px);
  opacity: 0.3; pointer-events: none; border-radius: 0 0 0 0;
}
.player-dock .np-cover, .player-dock .player-meta,
.player-dock .player-controls, .player-dock .player-close { position: relative; z-index: 1; }

/* Login backdrop — same wave welcoming you in */
.auth-wave {
  position: fixed; left: 0; right: 0; bottom: 0; height: 34vh; min-height: 180px;
  width: 100%; opacity: 0.5; pointer-events: none; z-index: 0;
}
.auth-page .auth-card { position: relative; z-index: 1; }

/* ---------------------------------------------------------------- EQ-5 */
/* A five-band graphic EQ styled like the rack unit it wishes it was:
   brushed-steel faceplate, ridged fader caps, jewel lamp, corner screws. */
.eq-rack { border: none; background: transparent; padding: 0; max-width: 460px; width: calc(100% - 32px); }
.eq-rack::backdrop { background: rgba(5, 4, 8, 0.72); }
.eq-faceplate {
  position: relative;
  background:
    radial-gradient(140% 100% at 50% 0%, rgba(255, 255, 255, 0.08), transparent 45%),
    repeating-linear-gradient(90deg, #3b3a42 0px, #45444d 1px, #3b3a42 2px),
    #3b3a42;
  border: 1px solid #191820;
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -2px 6px rgba(0, 0, 0, 0.5),
              0 24px 60px rgba(0, 0, 0, 0.65);
  padding: 18px 22px 16px;
  color: #d8d4c8;
  font-family: var(--mono, 'IBM Plex Mono', monospace);
}
/* corner screws */
.eq-faceplate::before, .eq-faceplate::after {
  content: ""; position: absolute; top: 10px; width: 9px; height: 9px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #b9b6ad, #6a675e 55%, #2e2c27);
  box-shadow: 0 0 0 1px #23222a, 0 60vh 0 0 transparent;
}
.eq-faceplate::before { left: 10px; }
.eq-faceplate::after { right: 10px; }

.eq-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.eq-logo {
  display: block; font-family: Anton, sans-serif; font-size: 1.05rem; letter-spacing: 1px;
  color: #ece8dc; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
}
.eq-model { display: block; font-size: 0.58rem; letter-spacing: 0.18em; color: #97927f; margin-top: 2px; }

.eq-power { display: flex; align-items: center; gap: 12px; }
.eq-lamp { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.eq-lamp i {
  width: 11px; height: 11px; border-radius: 50%;
  background: #241f18; box-shadow: inset 0 1px 2px #000, 0 0 0 2px #23222a;
  transition: background 0.25s, box-shadow 0.25s;
}
.eq-lamp b { font-size: 0.52rem; letter-spacing: 0.14em; color: #97927f; font-weight: 500; }
.eq-lamp[data-mode="eq"] i     { background: #ffb43a; box-shadow: inset 0 1px 2px rgba(0,0,0,.4), 0 0 0 2px #23222a, 0 0 12px rgba(255, 180, 58, 0.9); }
.eq-lamp[data-mode="direct"] i { background: #7fd8a2; box-shadow: inset 0 1px 2px rgba(0,0,0,.4), 0 0 0 2px #23222a, 0 0 10px rgba(127, 216, 162, 0.8); }

/* power: a chunky vertical toggle */
.eq-switch {
  width: 30px; height: 44px; border-radius: 6px; cursor: pointer; padding: 3px;
  background: linear-gradient(#17161c, #23222a); border: 1px solid #111016;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8);
}
.eq-switch-cap {
  display: block; width: 100%; height: 18px; border-radius: 4px;
  background: linear-gradient(#e8e4d8, #a9a496 60%, #7c786c);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.6), inset 0 1px 0 #fff;
  transition: transform 0.15s ease;
  transform: translateY(18px);
}
.eq-switch[aria-pressed="true"] .eq-switch-cap { transform: translateY(0); }

/* bands */
.eq-bands { display: flex; gap: 4px; padding: 6px 2px 2px; }
.eq-scale {
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end;
  height: 168px; padding: 0 6px 0 0; font-size: 0.55rem; color: #97927f; letter-spacing: 0.06em;
}
.eq-band { flex: 1; display: flex; flex-direction: column; align-items: center; }
.eq-band label {
  margin-top: 8px; font-size: 0.58rem; letter-spacing: 0.12em; color: #c9c4b4;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.7);
}
.eq-fader { position: relative; height: 168px; width: 44px; }
/* fader slot */
.eq-fader::before {
  content: ""; position: absolute; left: 50%; top: 4px; bottom: 4px; width: 6px;
  transform: translateX(-50%); border-radius: 3px;
  background: linear-gradient(#0a0a0d, #1c1b22);
  box-shadow: inset 0 1px 3px #000, 0 1px 0 rgba(255, 255, 255, 0.07);
}
/* center détente tick */
.eq-fader::after {
  content: ""; position: absolute; left: 4px; right: 4px; top: 50%; height: 1px;
  background: rgba(255, 180, 58, 0.5);
}
.eq-slider {
  -webkit-appearance: none; appearance: none;
  position: absolute; top: 50%; left: 50%; margin: 0;
  width: 160px; height: 30px;
  transform: translate(-50%, -50%) rotate(-90deg);
  background: transparent; cursor: ns-resize;
}
.eq-slider::-webkit-slider-runnable-track { height: 2px; background: transparent; }
.eq-slider::-moz-range-track { height: 2px; background: transparent; }
/* the fader cap: brushed metal with a center groove */
.eq-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 30px; margin-top: -14px; border-radius: 3px;
  background:
    linear-gradient(0deg, transparent 46%, #16151a 46%, #16151a 54%, transparent 54%),
    linear-gradient(90deg, #55525c, #d6d2c6 30%, #8f8b80 50%, #d6d2c6 70%, #4a4750);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  border: 1px solid #23222a;
}
.eq-slider::-moz-range-thumb {
  width: 26px; height: 30px; border-radius: 3px;
  background:
    linear-gradient(0deg, transparent 46%, #16151a 46%, #16151a 54%, transparent 54%),
    linear-gradient(90deg, #55525c, #d6d2c6 30%, #8f8b80 50%, #d6d2c6 70%, #4a4750);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  border: 1px solid #23222a;
}
.eq-rack.eq-bypassed .eq-bands { opacity: 0.45; }

/* presets: piano-key program buttons */
.eq-presets { display: flex; align-items: center; gap: 6px; margin-top: 16px; }
.eq-presets-label { font-size: 0.55rem; letter-spacing: 0.16em; color: #97927f; margin-right: 4px; }
.eq-presets button {
  flex: 1; padding: 7px 0; font-family: inherit; font-size: 0.6rem; letter-spacing: 0.12em;
  color: #d8d4c8; cursor: pointer; border-radius: 3px;
  background: linear-gradient(#4a4852, #33323a 55%, #2a2931);
  border: 1px solid #1b1a21;
  box-shadow: 0 2px 0 #17161c, inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.eq-presets button:active { transform: translateY(2px); box-shadow: 0 0 0 #17161c, inset 0 1px 0 rgba(255, 255, 255, 0.12); }

.eq-note { margin-top: 14px; font-size: 0.58rem; letter-spacing: 0.08em; color: #97927f; text-align: center; }
.eq-note b { color: #7fd8a2; }
.eq-done {
  display: block; margin: 12px auto 0; padding: 6px 22px; cursor: pointer;
  font-family: inherit; font-size: 0.65rem; letter-spacing: 0.14em; color: #d8d4c8;
  background: linear-gradient(#4a4852, #2a2931); border: 1px solid #1b1a21; border-radius: 4px;
}

/* ---------------------------------------------------------------- chips + onboarding */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; font-size: 0.85rem; cursor: pointer;
}
.chip:hover { border-color: var(--hover); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }

dialog.onboard { width: min(560px, 94vw); }
dialog h3 { font-size: 0.85rem; color: var(--dim); text-transform: uppercase; letter-spacing: .5px; margin: 14px 0 8px; }
.ob-step.hidden { display: none; }
.ob-nav { justify-content: space-between; margin-top: 6px; }
.album-picker { max-height: 240px; overflow-y: auto; margin: 12px 0; }
.pick-card.picked-done { outline: 2px solid var(--accent); opacity: .65; }
.picked-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.picked {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel-2); border: 1px solid var(--accent);
  border-radius: 999px; padding: 4px 10px 4px 4px; font-size: 0.8rem;
}
.picked img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.picked .unpick { cursor: pointer; color: var(--dim); font-weight: 400; }
.picked .unpick:hover { color: var(--text); }

/* ---------------------------------------------------------------- playlists */
.pl-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.pl-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px;
}
.pl-name { font-weight: 600; font-size: 0.9rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-meta { color: var(--dim); font-size: 0.75rem; flex-shrink: 0; }
.mini-btn {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 5px 10px; font-size: 0.8rem; cursor: pointer;
}
.mini-btn.ms { font-size: 0.95rem; }
.player-controls button.ms { font-size: 1.25rem; }
.mini-btn:hover { border-color: var(--hover); }
.release-actions { display: flex; gap: 8px; margin-bottom: 8px; }

/* ---------------------------------------------------------------- composer */
.composer {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; gap: 10px; align-items: center;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  background: var(--panel); border-top: 1px solid var(--line);
}
.composer input {
  flex: 1; background: var(--panel-2); border: 1px solid var(--line);
  color: var(--text); border-radius: 999px; padding: 12px 18px; font-size: 1rem;
  outline: none;
}
.composer input:focus { border-color: var(--accent); }
.mic, .send, .speak-toggle {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 50%;
  width: 46px; height: 46px; cursor: pointer; flex-shrink: 0;
  display: grid; place-items: center; font-size: 1rem;
}
.mic.listening {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
  animation: pulse 1.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,212,40,.5); }
  70% { box-shadow: 0 0 0 14px rgba(255,212,40,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,212,40,0); }
}
.send { color: var(--accent); }
.speak-toggle.on { border-color: var(--accent); }

/* ---------------------------------------------------------------- modals */
dialog {
  position: relative;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; width: min(440px, 92vw);
}
/* The corner ✕ every dialog gets (shell.js decorateDialogs) — a big, honest
   tap target so closing never means hunting for a "Done" button. */
.dlg-x {
  position: absolute; top: 6px; right: 6px; z-index: 5;
  width: 40px; height: 40px; border-radius: 50%;
  background: transparent !important; color: var(--dim) !important;
  border: none; font-size: 1.05rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.dlg-x:hover { background: var(--panel-2) !important; color: var(--text) !important; }
dialog::backdrop { background: rgba(0,0,0,.6); }
dialog h2 { font-size: 1.1rem; margin-bottom: 6px; }
.dim { color: var(--dim); font-size: 0.85rem; margin-bottom: 14px; }
dialog input {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line);
  color: var(--text); border-radius: 10px; padding: 11px 14px; font-size: 0.95rem;
  margin-bottom: 14px;
}
dialog button {
  background: var(--accent); color: var(--accent-ink); border: none; font-weight: 700;
  border-radius: 10px; padding: 10px 18px; cursor: pointer; font-size: 0.9rem;
}
dialog button.close-modal { background: var(--panel-2); color: var(--text); }
.modal-row { display: flex; gap: 10px; align-items: center; }
.modal-row input { flex: 1; margin-bottom: 0; }
#profileModal { width: min(560px, 94vw); }

/* ---------------------------------------------------------------- pages (shelf + liner notes) */
body.page { height: auto; min-height: 100dvh; display: block; padding-bottom: 110px; }
body.page .topbar { position: sticky; top: 0; z-index: 50; }
.brand a { color: inherit; text-decoration: none; }
.count-pill { cursor: default; color: var(--dim); }

.shelf-page { max-width: 1080px; margin: 0 auto; padding: 18px 16px; }
.shelf-add { position: relative; margin-bottom: 14px; }
.shelf-add input {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line);
  color: var(--text); border-radius: 999px; padding: 12px 18px; font-size: 1rem; outline: none;
}
.shelf-add input:focus { border-color: var(--accent); }
#shelfResults {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 40;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px; max-height: 320px; overflow-y: auto;
  box-shadow: 0 18px 40px rgba(0,0,0,.5);
}
#shelfResults.hidden { display: none; }
.shelf-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.shelf-filters .chip { text-decoration: none; }
.shelf-filters .chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.filter-select {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 12px; font-size: 0.85rem;
}
.shelf-empty { text-align: center; color: var(--text); padding: 60px 0 30px; }
.shelf-empty .dim a { color: var(--accent); }

.shelf-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px;
}
.shelf-card {
  position: relative; display: block; text-decoration: none; color: var(--text);
  background: var(--panel-2); border-radius: 12px; overflow: hidden;
  transition: transform .12s ease;
}
.shelf-card:hover { transform: translateY(-3px); }
.shelf-card img, .shelf-card .card-noart { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.shelf-info { padding: 8px 10px 10px; }
.shelf-title { font-size: 0.82rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shelf-artist { font-size: 0.72rem; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.star {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  background: rgba(12,12,14,.72); border: none; border-radius: 50%;
  width: 30px; height: 30px; color: var(--dim); font-size: 0.95rem; cursor: pointer;
}
.star.on { color: var(--accent); }

/* --------- artist pages (list + on-the-fly artist page) */
.artist-filter {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 14px; font-size: 0.85rem; min-width: 200px;
}
.artist-filter:focus { outline: none; border-color: var(--accent); }

.artist-head { display: flex; gap: 22px; margin-bottom: 26px; align-items: flex-start; }
.artist-photo {
  width: 180px; height: 180px; object-fit: cover; border-radius: var(--radius);
  flex-shrink: 0; background: var(--panel-2);
}
.artist-noimg { display: flex; align-items: center; justify-content: center; font-size: 3rem; color: var(--dim); }
.artist-name { font-family: Anton, sans-serif; font-size: 2.2rem; letter-spacing: 0.5px; margin-bottom: 4px; }
.artist-meta { font-size: 0.8rem; margin-bottom: 12px; }
.artist-bio { line-height: 1.55; max-width: 68ch; }
.artist-src { font-size: 0.75rem; margin-top: 6px; }
.artist-src a { color: var(--accent); }
.artist-actions { margin-top: 14px; }
.artist-claim { font-size: 0.78rem; margin-top: 12px; }
.artist-claim a { color: var(--accent); }
@media (max-width: 600px) {
  .artist-head { flex-direction: column; }
  .artist-photo { width: 100%; height: auto; aspect-ratio: 16/9; }
}

.artist-shows { margin-bottom: 26px; }
.shows-list { list-style: none; }
.show-row {
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline;
  padding: 9px 12px; border-radius: 10px; font-size: 0.88rem;
}
.show-row:nth-child(odd) { background: var(--panel-2); }
.show-date { color: var(--accent); font-weight: 600; min-width: 150px; }
.show-venue { font-weight: 600; }
.show-city { color: var(--dim); }
.show-tix { margin-left: auto; color: var(--accent-2); text-decoration: none; white-space: nowrap; }
.show-tix:hover { text-decoration: underline; }

/* --------- wiki quick-look: detected names in liner notes */
.wname { border-bottom: 1px dotted var(--accent-2); cursor: pointer; }
.wname:hover { color: var(--accent-2); }
.wiki-pop {
  position: absolute; z-index: 60; width: max-content; max-width: 340px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 12px;
  padding: 12px 14px; font-size: 0.85rem; box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
}
.wiki-pop.hidden { display: none; }
.wp-title { font-weight: 700; margin-bottom: 6px; }
.wp-hint { color: var(--accent); font-size: 0.75rem; }
.wp-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 9px; }
.wp-links a { color: var(--accent-2); text-decoration: none; font-size: 0.78rem; white-space: nowrap; }
.wp-links a:hover { text-decoration: underline; }

/* --------- liner notes: two-ink gatefold (white + amber on black board) */
.liner {
  max-width: 1080px; margin: 0 auto; padding: 26px 16px;
  display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 40px;
  --ink: #f0ebe1;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (max-width: 760px) { .liner { grid-template-columns: 1fr; gap: 26px; } }

.ln-cover-panel { position: sticky; top: 84px; align-self: start; }
@media (max-width: 760px) { .ln-cover-panel { position: static; } }
.ln-cover {
  width: 100%; aspect-ratio: 1; object-fit: cover; display: block;
  border-radius: 4px; box-shadow: 0 22px 50px rgba(0,0,0,.55);
}
.ln-noart { display: grid; place-items: center; font-size: 4rem; color: var(--dim); background: var(--panel-2); }
.ln-title {
  font-family: 'Anton', var(--mono); font-weight: 400;
  font-size: clamp(1.9rem, 4.5vw, 2.9rem); line-height: 1.02;
  text-transform: uppercase; letter-spacing: 0.01em; color: var(--ink);
  margin: 20px 0 4px;
}
.ln-artist { color: var(--accent); font-size: 1.05rem; font-weight: 600; margin-bottom: 10px; }
.ln-artist a, .ln-name a { color: inherit; text-decoration: none; }
.ln-artist a:hover, .ln-name a:hover { color: var(--accent-2); text-decoration: underline; }
.ln-factline { font-family: var(--mono); font-size: 0.75rem; color: var(--ink); letter-spacing: .04em; margin-bottom: 3px; }
.ln-factline.dim { color: var(--dim); }
.ln-actions { display: flex; gap: 8px; margin: 16px 0 14px; }
.ln-btn {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 999px; padding: 10px 16px; font-size: 0.9rem; cursor: pointer;
}
.ln-btn:hover { border-color: var(--hover); }
a.ln-btn { text-decoration: none; display: inline-block; }
.ln-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.ln-btn.primary:hover { filter: brightness(1.08); }
.star-btn.on { color: var(--accent); border-color: var(--accent); }
/* Icon-only action row: the glyph is the button, the words live in a hover tip. */
.ln-icons { flex-wrap: wrap; }
.ln-ico, a.ln-ico { width: 44px; height: 44px; padding: 0; display: inline-grid; place-items: center; font-size: 1.15rem; line-height: 1; }
.ln-ico .ms { font-size: 1.35rem; vertical-align: 0; }
.ln-ico.armed { color: #e06060; border-color: #e06060; }
/* Hover / focus tip for any element carrying data-tip (no native title, so no double tooltip). */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px);
  background: #08080a; color: #f2f1f4; border: 1px solid var(--line-2); border-radius: 7px; padding: 5px 9px;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 0.72rem; font-weight: 500; letter-spacing: 0;
  white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s ease, transform .12s ease; z-index: 30;
}
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
@media (hover: none) { [data-tip]::after { display: none; } }
.ln-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ln-chips .chip { text-decoration: none; font-size: 0.75rem; padding: 6px 11px; }
.ln-chips .chip.ghost { border-style: dashed; color: var(--dim); cursor: default; }
.ln-elsewhere { font-family: var(--mono); font-size: 0.72rem; color: var(--dim); }
.ln-elsewhere a { color: var(--dim); text-decoration: underline; text-underline-offset: 3px; }
.ln-elsewhere a:hover { color: var(--ink); }

.ln-h {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.22em; color: var(--accent);
  display: flex; align-items: center; gap: 12px; margin: 30px 0 12px;
}
.ln-h:first-child { margin-top: 4px; }
.ln-h::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

.ln-tracklist { list-style: none; }
.ln-track {
  display: flex; align-items: baseline; gap: 10px;
  padding: 7px 8px; margin: 0 -8px; border-radius: 8px; cursor: pointer;
  color: var(--ink);
}
.ln-track:hover { background: var(--panel-2); }
.ln-track:hover .ln-pos { color: var(--accent); }
.ln-pos { font-family: var(--mono); font-size: 0.72rem; color: var(--dim); min-width: 2.4em; }
.ln-ttitle { font-size: 0.95rem; }
.ln-track .leader { flex: 1; border-bottom: 1px dotted var(--line-2); transform: translateY(-4px); min-width: 20px; }
.ln-dur { font-family: var(--mono); font-size: 0.75rem; color: var(--dim); }
.ln-track-credits {
  list-style: none; font-family: var(--mono); font-size: 0.68rem; color: var(--dim);
  padding: 0 8px 6px 2.9em; letter-spacing: .02em;
}

.ln-credits { list-style: none; }
.ln-credits li { display: flex; align-items: baseline; gap: 10px; padding: 4px 0; }
.ln-name { color: var(--ink); font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ln-role { font-family: var(--mono); font-size: 0.72rem; color: var(--dim); margin-left: auto; text-align: right; }

.ln-notes { color: #c9c3d4; font-size: 0.88rem; line-height: 1.65; max-width: 62ch; }
.ln-fineprint {
  font-family: var(--mono); font-size: 0.66rem; color: var(--dim);
  border-top: 1px solid var(--line); margin-top: 34px; padding-top: 12px;
  letter-spacing: .04em; line-height: 1.7;
}

/* ---------------------------------------------------------------- toast */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 150px; z-index: 200;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 16px; font-size: 0.88rem;
  box-shadow: 0 14px 34px rgba(0,0,0,.5);
  max-width: min(440px, 90vw);
}
.toast.hidden { display: none; }

/* ---------------------------------------------------------------- skeletons */
.skel {
  background: linear-gradient(100deg, var(--panel-2) 40%, #2e2e33 50%, var(--panel-2) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
  border-radius: 10px;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.skel-bar { height: 46px; border-radius: 999px; margin-bottom: 14px; }
.skel-pills { display: flex; gap: 8px; margin-bottom: 18px; }
.skel-pill { height: 34px; width: 110px; border-radius: 999px; }
.skel-card { aspect-ratio: 1 / 1.28; border-radius: 12px; }
.skel-cover { aspect-ratio: 1; border-radius: 4px; margin-bottom: 20px; }
.skel-line { height: 14px; margin-bottom: 12px; }
.skel-line.tall { height: 34px; }
.skel-line.w30 { width: 30%; } .skel-line.w40 { width: 40%; }
.skel-line.w55 { width: 55%; } .skel-line.w60 { width: 60%; }
.skel-line.w70 { width: 70%; } .skel-line.w95 { width: 95%; }
.skel-bubble { height: 58px; width: 62%; border-radius: var(--radius); }
.skel-bubble.short { width: 40%; }
.skel-bubble.right { align-self: flex-end; width: 45%; }

@media (prefers-reduced-motion: reduce) {
  .shelf-card, .card { transition: none; }
  .skel { animation: none; }
}

/* ---------------------------------------------------------------- video mode */
/* The 0×0 audio iframe becomes a floating video panel when toggled (🎬). */
#ytHolder.video-open {
  position: fixed; right: 14px;
  bottom: calc(env(safe-area-inset-bottom) + 96px);
  width: min(440px, calc(100vw - 28px)); height: auto; aspect-ratio: 16 / 9;
  overflow: hidden; z-index: 95;
  background: #000; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 18px 44px rgba(0,0,0,.6);
}
#ytHolder.video-open iframe { width: 100%; height: 100%; display: block; }
/* Clear the chat composer, like the dock does */
#page[data-page="chat"] ~ #ytHolder.video-open { bottom: 170px; }
#btnVideo.on { color: var(--accent); }

/* ---------------------------------------------------------------- rabbit hole */
/* The deeper you fall, the weirder it gets: every hop bumps --rh-hue, which
   retunes the aurora backdrop, the depth gauge, and each card's colorway. */
.rabbit-page { max-width: 760px; margin: 0 auto; padding: 18px 16px 120px; --rh-hue: 0; }

/* Aurora down the hole — a fixed glow that re-colors as you descend, with a
   slow-turning swirl behind it. */
.rabbit-page::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(90% 55% at 50% -8%, hsl(calc(265 + var(--rh-hue)) 65% 16%), transparent 60%),
    radial-gradient(70% 45% at 85% 108%, hsl(calc(180 + var(--rh-hue)) 60% 12%), transparent 60%);
  transition: background 1.4s ease;
}
.rabbit-page::after {
  content: ""; position: fixed; left: 50%; top: 50%; z-index: -1; pointer-events: none;
  width: 160vmax; height: 160vmax; margin: -80vmax 0 0 -80vmax; opacity: 0.05;
  background: conic-gradient(from 0deg,
    hsl(calc(265 + var(--rh-hue)) 80% 60%), transparent 25%,
    hsl(calc(320 + var(--rh-hue)) 80% 60%) 50%, transparent 75%,
    hsl(calc(265 + var(--rh-hue)) 80% 60%));
  animation: rhSwirl 90s linear infinite;
}
@keyframes rhSwirl { to { transform: rotate(1turn); } }

/* Depth gauge */
.rh-depth {
  position: fixed; right: 14px; top: calc(var(--topbar-h) + 12px); z-index: 20;
  font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.68rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: hsl(calc(265 + var(--rh-hue)) 90% 78%);
  background: rgba(12, 12, 14, 0.78); backdrop-filter: blur(6px);
  border: 1px solid hsl(calc(265 + var(--rh-hue)) 70% 60% / 0.55);
  border-radius: 999px; padding: 8px 14px;
  box-shadow: 0 0 20px hsl(calc(265 + var(--rh-hue)) 80% 60% / 0.3);
  transition: color 0.9s, border-color 0.9s, box-shadow 0.9s;
}
.rh-depth.pulse { animation: rhPing 0.6s ease; }
@keyframes rhPing { 35% { transform: scale(1.14); } }

/* Intro rabbit, waiting at the edge */
.rh-intro-rabbit { display: inline-block; font-size: 2.6rem; animation: rhHover 2.4s ease-in-out infinite; }
@keyframes rhHover { 50% { transform: translateY(-9px) rotate(-8deg); } }
.rh-intro-lead { font-size: 1.3rem; margin-bottom: 8px; }
.rh-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.rh-toolbar input {
  flex: 1; min-width: 180px; background: var(--panel-2); border: 1px solid var(--line);
  color: var(--text); border-radius: 999px; padding: 10px 16px; font-size: 0.95rem; outline: none;
}
.rh-toolbar input:focus { border-color: var(--accent); }
.rh-toolbar .ln-btn:disabled { opacity: .6; cursor: default; }

.rh-trail { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; }
.rh-sep { color: var(--dim); font-size: 0.8rem; }
.rh-crumb { font-size: 0.78rem; }

.rh-intro { text-align: center; padding: 60px 0 30px; }
.rh-intro.hidden { display: none; }
.rh-intro p:first-child { font-size: 1.3rem; margin-bottom: 8px; }

.rh-feed { display: flex; flex-direction: column; gap: 18px; }
.rh-feed.plunging { animation: rhPlunge 0.55s ease; }
@keyframes rhPlunge { 40% { transform: translateY(16px); } }

/* Each hop is a card with its own colorway (--ch, set per depth in JS),
   falling into place from above. */
.rh-post {
  --ch: 265;
  position: relative;
  background:
    linear-gradient(var(--panel-2), var(--panel-2)) padding-box,
    linear-gradient(150deg,
      hsl(var(--ch) 80% 62% / 0.6),
      hsl(calc(var(--ch) + 60) 80% 58% / 0.2) 40%, var(--line) 85%) border-box;
  border: 1px solid transparent;
  border-radius: var(--radius); padding: 16px;
  box-shadow: 0 16px 38px hsl(var(--ch) 70% 45% / 0.13);
  animation: rhFall 0.6s cubic-bezier(0.22, 0.9, 0.3, 1);
}
@keyframes rhFall {
  0% { opacity: 0; transform: translateY(-48px) scale(0.97) rotate(-1.2deg); }
  65% { transform: translateY(7px); }
  100% { opacity: 1; transform: none; }
}
/* Dotted rope connecting each hop to the one below it */
.rh-feed .rh-post:not(:last-child)::after {
  content: ""; position: absolute; left: 50%; bottom: -19px; width: 2px; height: 18px;
  background: repeating-linear-gradient(180deg,
    hsl(var(--ch) 75% 62% / 0.55) 0 3px, transparent 3px 7px);
}
.rh-head { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.rh-head .chip { font-size: 0.72rem; padding: 5px 10px; cursor: default; }
.rh-depth-chip {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  background: hsl(var(--ch) 75% 58% / 0.16) !important;
  border-color: hsl(var(--ch) 75% 58% / 0.55) !important;
  color: hsl(var(--ch) 90% 76%) !important;
}

/* Digging state — a tumbling rabbit while Claude digs the next hop */
.rh-skel { text-align: center; }
.rh-fall { font-size: 1.8rem; animation: rhTumble 1s ease-in-out infinite; }
@keyframes rhTumble {
  0%, 100% { transform: translateY(-5px) rotate(-14deg); }
  50% { transform: translateY(8px) rotate(12deg); }
}
.rh-digging {
  font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.7rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: hsl(calc(265 + var(--rh-hue)) 85% 74%); margin: 4px 0 10px;
  animation: blink 1.4s ease-in-out infinite;
}
.rh-summary { line-height: 1.55; font-size: 0.92rem; margin-bottom: 12px; }

.rh-tracks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.rh-track {
  display: inline-flex; align-items: baseline; gap: 7px;
  background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 13px; font-size: 0.82rem; cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s, box-shadow 0.15s;
}
.rh-track:hover {
  border-color: hsl(var(--ch) 80% 62%); transform: translateY(-2px);
  box-shadow: 0 6px 18px hsl(var(--ch) 80% 60% / 0.25);
}
.rh-track:hover .rh-play { animation: rhPing 0.5s ease; }
.rh-track .rh-play { color: hsl(var(--ch) 85% 68%); font-size: 0.95rem; }
.rh-track .q-artist { color: var(--dim); font-size: 0.72rem; }

/* Option doors — each a different color, begging to be opened */
.rh-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-bottom: 12px; }
.rh-opt {
  --oh: var(--ch);
  text-align: left; color: var(--text); cursor: pointer;
  border: 1px solid hsl(var(--oh) 70% 58% / 0.35); border-radius: 12px; padding: 10px 12px;
  background: linear-gradient(160deg, hsl(var(--oh) 70% 58% / 0.13), var(--panel) 55%);
  transition: transform 0.16s ease, border-color 0.16s, box-shadow 0.16s;
}
.rh-opt:nth-child(3n+2) { --oh: calc(var(--ch) + 75); }
.rh-opt:nth-child(3n)   { --oh: calc(var(--ch) + 150); }
.rh-opt:hover {
  transform: translateY(-3px) scale(1.012);
  border-color: hsl(var(--oh) 85% 64%);
  box-shadow: 0 10px 26px hsl(var(--oh) 80% 58% / 0.3);
}
.rh-opt:active { transform: translateY(0) scale(0.99); }
.rh-opt strong::before { content: "▸ "; color: hsl(var(--oh) 85% 66%); }
.rh-opt strong { display: block; font-size: 0.86rem; }
.rh-opt span { display: block; color: var(--dim); font-size: 0.76rem; margin-top: 3px; line-height: 1.4; }
.rh-opt em {
  display: block; font-style: normal; color: var(--accent);
  font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.68rem; margin-top: 5px;
}

.rh-sources { display: flex; flex-wrap: wrap; gap: 6px 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.rh-sources a {
  font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.72rem;
  color: var(--dim); text-decoration: underline; text-underline-offset: 3px;
}
.rh-sources a:hover { color: var(--text); }
.rh-sources a i { font-style: normal; color: var(--accent); }

/* one source row: link + reader / read-aloud / podcast actions */
.rh-src { display: inline-flex; align-items: center; gap: 4px; }
.rh-src .mini-btn { padding: 2px 5px; font-size: 0.82rem; color: var(--dim); }
.rh-src .mini-btn:hover { color: var(--text); }
.rh-src .mini-btn.spin, .rh-reader .spin { color: var(--accent-2); animation: vbspin 0.9s linear infinite; display: inline-block; }
@media (prefers-reduced-motion: reduce) { .rh-src .mini-btn.spin, .rh-reader .spin { animation: none; } }

/* pop-open article reader */
.rh-reader { position: fixed; inset: 0; z-index: 60; background: rgba(5, 4, 8, 0.72);
  display: flex; align-items: center; justify-content: center; padding: 4vh 14px; }
.rh-reader-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  width: min(680px, 100%); max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; }
.rh-reader-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); background: var(--panel-2); }
.rh-reader-title { flex: 1; min-width: 0; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rh-reader-head a.mini-btn { text-decoration: none; }
.rh-reader-acts { display: flex; gap: 8px; padding: 10px 16px 0; flex-wrap: wrap; }
.rh-reader-body { padding: 12px 16px 16px; overflow-y: auto; font-size: 0.86rem; line-height: 1.65; }
.rh-reader-body p { margin: 0 0 10px; }
.rh-reader .warn { color: var(--accent); }

.rh-history { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.rh-history.hidden { display: none; }
.rh-hist-row { display: flex; gap: 8px; align-items: center; }
.rh-hist-load {
  flex: 1; text-align: left; background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; min-width: 0;
}
.rh-hist-load:hover { border-color: var(--hover); }
.rh-hist-load strong { font-size: 0.82rem; }
.rh-hist-load span { display: block; color: var(--text); font-size: 0.78rem; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rh-hist-load em {
  display: block; font-style: normal; color: var(--dim);
  font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.66rem; margin-top: 4px;
}

/* Your holes — every saved dive, click one to climb back down */
.rh-holes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.rh-holes.hidden { display: none; }
.rh-holes-h {
  font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.72rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px;
}
.rh-hole {
  --ch: 265;
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  border: 1px solid hsl(var(--ch) 65% 55% / 0.3); border-radius: 12px; padding: 11px 13px;
  background: linear-gradient(150deg, hsl(var(--ch) 70% 58% / 0.1), var(--panel-2) 55%);
  transition: transform 0.15s ease, border-color 0.15s, box-shadow 0.15s;
}
.rh-hole:hover {
  transform: translateY(-2px); border-color: hsl(var(--ch) 85% 62%);
  box-shadow: 0 8px 22px hsl(var(--ch) 80% 58% / 0.25);
}
.rh-hole-depth {
  font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.7rem;
  color: hsl(var(--ch) 90% 74%); white-space: nowrap; min-width: 52px;
}
.rh-hole-main { flex: 1; min-width: 0; }
.rh-hole-main strong { display: block; font-size: 0.82rem; }
.rh-hole-trail {
  display: block; color: var(--dim); font-size: 0.76rem; margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rh-hole-meta {
  font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 0.64rem;
  color: var(--dim); white-space: nowrap;
}
@media (max-width: 560px) { .rh-hole-meta { display: none; } }

/* Motion safety — the hole holds still for those who need it to */
@media (prefers-reduced-motion: reduce) {
  .rabbit-page::after, .rh-intro-rabbit, .rh-fall, .rh-digging { animation: none; }
  .rh-post { animation: none; }
  .rh-feed.plunging { animation: none; }
  .rh-depth.pulse { animation: none; }
  .rh-opt:hover, .rh-track:hover, .rh-hole:hover { transform: none; }
}

.persona-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.persona-option {
  text-align: left; background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
.persona-option span { display: block; color: var(--dim); font-size: 0.8rem; margin-top: 4px; }
.persona-option.selected { border-color: var(--accent); }
.persona-option:hover { border-color: var(--hover); }

/* ---------------------------------------------------------------- wallet */
.wallet-balance { font-family: 'Anton', sans-serif; font-size: 2.2rem; letter-spacing: .5px; margin: 4px 0 2px; }
.wallet-balance .dim { font-family: inherit; font-size: 1rem; letter-spacing: 0; color: var(--dim); }
#wAmounts { align-items: center; margin-bottom: 10px; }
#wAmounts input { width: 90px; margin-bottom: 0; padding: 8px 12px; }
#wPayCard { background: var(--accent); color: var(--accent-ink); }
#wPayUsdc { background: var(--accent-2); }
#wActivity { max-height: 180px; overflow-y: auto; }
.pl-meta.pos { color: #7fd8a2; }
.pl-meta.neg { color: var(--dim); }

/* ---------------------------------------------------------------- studio */
dialog textarea {
  width: 100%; margin-bottom: 12px; padding: 10px 14px; resize: vertical;
  background: var(--panel-2); color: var(--text); font: inherit;
  border: 1px solid var(--line); border-radius: 10px;
}
dialog textarea:focus { outline: none; border-color: var(--accent); }
#stStatus { font-size: 0.8rem; }
.st-tracks { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.st-track { background: var(--panel-2); border-radius: 10px; padding: 10px 12px; border: 1px solid transparent; }
.st-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }

/* ------------------------------------------------------------- studio page */
.studio-page {
  max-width: 1120px; margin: 0 auto; padding: 22px 16px 120px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 32px;
  align-items: start;
}
@media (max-width: 820px) { .studio-page { grid-template-columns: 1fr; gap: 26px; } .st-composer { order: -1; } }
.st-composer { position: sticky; top: 84px; }
@media (max-width: 820px) { .st-composer { position: static; } }
.st-h1 { font-family: Anton, sans-serif; font-size: 1.9rem; letter-spacing: 0.5px; margin-bottom: 4px; }
.st-composer textarea {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 12px 14px; font-size: 0.95rem; margin-bottom: 12px; resize: vertical;
}
.st-composer textarea:focus { outline: none; border-color: var(--accent); }
.st-composer input {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 11px 14px; font-size: 0.95rem; margin-bottom: 14px;
}
.st-generate {
  background: var(--accent); color: var(--accent-ink); border: none; font-weight: 700;
  border-radius: 999px; padding: 12px 22px; font-size: 0.95rem; cursor: pointer;
}
.st-generate:disabled { opacity: 0.6; cursor: default; }
.st-facts { margin-top: 16px; }
.st-facts strong { color: var(--text); }

.st-toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.st-toolbar input {
  flex: 1; min-width: 160px; background: var(--panel-2); border: 1px solid var(--line);
  color: var(--text); border-radius: 999px; padding: 9px 14px; font-size: 0.85rem;
}
.st-toolbar input:focus { outline: none; border-color: var(--accent); }

.st-page-tracks { max-height: none; overflow: visible; }
.st-row { display: flex; align-items: center; gap: 8px; }
.st-info { min-width: 0; flex: 1; cursor: pointer; display: flex; flex-direction: column; }
.st-info .st-title { font-weight: 700; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-sub { color: var(--dim); font-size: 0.72rem; }
.st-prompt {
  margin-top: 6px; color: var(--dim); font-size: 0.75rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.st-track.now { border-color: var(--accent); }
.st-track.now .st-play { color: var(--accent); border-color: var(--accent); }
.st-track.now .st-title { color: var(--accent); }
.st-title { flex: 1; font-size: 0.85rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-track audio { width: 100%; height: 34px; }
.st-lyrics summary { color: var(--dim); font-size: 0.75rem; cursor: pointer; margin-top: 6px; }
.st-lyrics pre { white-space: pre-wrap; font-size: 0.75rem; color: var(--dim); margin-top: 6px; }

/* Playing dock → album page (only when the track knows its album) */
.player-dock.linked .np-cover,
.player-dock.linked .player-meta { cursor: pointer; }
.player-dock.linked .player-meta:hover .np-title { text-decoration: underline; }

/* Per-song add-to-playlist / lyrics / elsewhere buttons on liner tracklists */
.ln-track .ln-tadd, .ln-track .ln-tlyr, .ln-track .ln-tlinks { opacity: 0; align-self: center; flex-shrink: 0; }
.ln-track:hover .ln-tadd, .ln-track:hover .ln-tlyr, .ln-track:hover .ln-tlinks { opacity: 1; }
@media (hover: none) { .ln-track .ln-tadd, .ln-track .ln-tlyr, .ln-track .ln-tlinks { opacity: 1; } }

/* ---------------------------------------------------------------- album tags */
.ln-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.tag-chips { display: contents; }   /* chips flow inline with the add field */
.tag-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 0.75rem; padding: 5px 10px; }
.tag-chip a { color: inherit; text-decoration: none; }
.tag-chip .tag-x { background: none; border: none; color: var(--dim); cursor: pointer; font-size: 0.85rem; padding: 0; line-height: 1; }
.tag-chip .tag-x:hover { color: var(--text); }
.tag-add input {
  width: 90px; background: var(--panel-2); border: 1px dashed var(--line-2); color: var(--text);
  border-radius: 999px; padding: 5px 10px; font: inherit; font-size: 0.75rem;
}
.tag-add input:focus { outline: none; border-color: var(--accent); }

/* "Listen on" row: a direct album/track link lights up; plain links are searches */
.ln-elsewhere a.deep { color: var(--accent); }

/* ---------------------------------------------------------------- lyrics */
#lyricsModal { width: min(520px, 94vw); }
.ly-controls { position: absolute; top: 12px; right: 56px; display: flex; gap: 4px; }
.ly-fs {
  background: var(--panel-2); color: var(--dim); border: 1px solid var(--line);
  border-radius: 8px; width: 30px; height: 30px; padding: 0; cursor: pointer; line-height: 1;
}
.ly-fs[data-fs="14"] { font-size: 0.7rem; }
.ly-fs[data-fs="16"] { font-size: 0.85rem; }
.ly-fs[data-fs="20"] { font-size: 1rem; }
.ly-fs.on { border-color: var(--accent); color: var(--text); }
.ly-body {
  white-space: pre-wrap; line-height: 1.7; max-height: 60vh; overflow-y: auto;
  color: #c9c3d4; font-size: 16px; margin-top: 10px;
}

/* ---------------------------------------------------------------- auth + admin */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-card { width: min(380px, 92vw); background: var(--panel); border-radius: 16px; padding: 28px; }
.auth-card .brand { font-weight: 800; font-size: 1.5rem; }
.auth-card form { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.auth-card input {
  background: var(--panel-2); color: var(--text); font: inherit;
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px;
}
.auth-card input:focus { outline: none; border-color: var(--accent); }
.auth-card button { background: var(--accent); color: var(--accent-ink); border: none; border-radius: 10px; padding: 11px; font-weight: 700; cursor: pointer; }
.auth-card .dim { text-align: center; font-size: 0.85rem; }
.auth-card a { color: var(--accent); }
.auth-error { background: #3a1d24; color: #ff9db0; border-radius: 10px; padding: 10px 14px; margin-top: 12px; font-size: 0.85rem; }

.admin-h { font-family: 'Anton', sans-serif; font-size: 1.6rem; margin-bottom: 16px; }
.admin-scroll { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.admin-table th { text-align: left; color: var(--dim); font-weight: 500; font-size: 0.75rem; text-transform: uppercase; letter-spacing: .5px; }
.admin-table th, .admin-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-actions { display: flex; gap: 6px; align-items: center; }
.a-newpass { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; font: inherit; font-size: 0.8rem; width: 130px; }

/* =============================================================== mobile app shell
   Under 760px the site becomes an app: slim topbar (brand + wallet), a fixed
   bottom tab bar (Chat / Shelf / Rabbit / Studio / More), dialogs presented
   as slide-up bottom sheets, and the player dock stacked above the tabs. */
:root { --tab-offset: 0px; }
html { -webkit-tap-highlight-color: transparent; }
.tabbar { display: none; }

.more-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.more-list button, .more-list a {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel-2); color: var(--text); text-decoration: none;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 14px; font-size: 0.95rem; font-family: inherit; text-align: left; cursor: pointer;
}
.more-list button:hover, .more-list a:hover { border-color: var(--hover); }
.more-list .pl-meta { margin-left: auto; }

@media (max-width: 760px) {
  body.has-tabbar { --tab-offset: calc(60px + env(safe-area-inset-bottom)); }

  /* --- bottom tab bar --- */
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
    display: flex; align-items: stretch;
    background: rgba(22, 22, 24, .94);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
    padding: 6px 2px calc(4px + env(safe-area-inset-bottom));
  }
  .tab-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    background: none; border: none; text-decoration: none; cursor: pointer;
    color: var(--dim); font-family: inherit; font-size: 0.6rem; font-weight: 600; letter-spacing: .03em;
    padding: 4px 0 2px;
  }
  .tab-item .t-ico { font-size: 1.35rem; line-height: 1.15; }
  .tab-item.active { color: var(--accent); }

  /* --- slim the topbar: brand + wallet only --- */
  .topbar .nav-pill, #playlistsBtn, #personaBtn, #profileBtn, #studioBtn,
  .topbar a[href="admin.php"], .topbar .pill-signout { display: none; }

  /* --- vertical stack: content / dock / (composer) / tab bar --- */
  body.page.has-tabbar { padding-bottom: calc(var(--tab-offset) + 120px); }
  .has-tabbar .composer { bottom: var(--tab-offset); padding: 10px 12px; }
  .has-tabbar .player-dock { bottom: var(--tab-offset); border-radius: 0; }
  .has-tabbar #page[data-page="chat"] ~ .player-dock { bottom: calc(var(--tab-offset) + 67px); }
  .has-tabbar .chat { padding-bottom: calc(var(--tab-offset) + 160px); }
  .has-tabbar .toast { bottom: calc(var(--tab-offset) + 84px); }
  .has-tabbar #ytHolder.video-open { bottom: calc(var(--tab-offset) + 96px); }
  .has-tabbar #page[data-page="chat"] ~ #ytHolder.video-open { bottom: calc(var(--tab-offset) + 165px); }

  /* --- dialogs present as bottom sheets --- */
  dialog {
    margin: 0; position: fixed; top: auto; bottom: 0; left: 0; right: 0;
    width: 100%; max-width: 100%; max-height: 88dvh; overflow-y: auto;
    border: none; border-top: 1px solid var(--line);
    border-radius: 22px 22px 0 0;
    padding: 14px 18px calc(20px + env(safe-area-inset-bottom));
    animation: sheet-up .24s cubic-bezier(.32, .72, .35, 1);
  }
  dialog::before {   /* grab handle */
    content: ""; display: block; width: 38px; height: 4px; border-radius: 2px;
    background: var(--line-2); margin: 0 auto 14px;
  }
  dialog::backdrop { background: rgba(0, 0, 0, .55); }
  #profileModal, dialog.onboard { width: 100%; }

  /* --- touch comfort --- */
  dialog input, dialog textarea, .filter-select, .a-newpass { font-size: 16px; }  /* no iOS focus zoom */
  .player-controls { gap: 2px; }
  .player-controls button { font-size: 1.3rem; padding: 9px 8px; }
  #btnPlay { font-size: 1.55rem; }
  .mini-btn { padding: 8px 12px; }
  dialog button { padding: 12px 18px; }
  .ln-actions { flex-wrap: wrap; }
  .liner { padding-top: 16px; }
  .shelf-grid { gap: 10px; }
}
@keyframes sheet-up { from { transform: translateY(24%); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { dialog { animation: none; } }

/* ---------------------------------------------------------------- animated EQ logo */
.brand a, .auth-card .brand { display: inline-flex; align-items: center; gap: 9px; }
.eq { display: flex; align-items: flex-end; gap: 2.5px; height: 15px; }
.eq span {
  width: 3px; background: var(--brand, var(--accent)); border-radius: 2px;
  transform-origin: bottom; animation: eq 1.15s ease-in-out infinite;
  transition: background 0.5s ease;
}
/* Live logo: when our own audio (Studio track, read, podcast) is playing,
   player.js drives the bars from the real spectrum instead of the CSS sway. */
.eq.live span { animation: none; transition: transform 0.06s linear, background 0.5s ease; }

/* The wordmark's "Agent" half rides the same brand color as the bars. */
.brand .brand-agent { color: var(--brand, var(--accent)); transition: color 0.5s ease; }

/* Each main section (and its subpages) tints the logo its own color. */
body[data-page="chat"]   { --brand: var(--accent-2); }   /* the agent's room — violet */
body[data-page="shelf"]  { --brand: var(--accent); }     /* home base — signal yellow */
body[data-page="rabbit"] { --brand: #7ddf8f; }           /* down the green hole */
body[data-page="studio"] { --brand: #ff7a59; }           /* hot coral — the live room */
body[data-page="voice"]  { --brand: #62c5ff; }           /* on-air blue */
body[data-page="admin"]  { --brand: #ff5470; }           /* control room red */
body[data-page="shows"]  { --brand: #ffb3c7; }           /* house lights pink — the stub */
.eq span:nth-child(1) { height: 8px;  animation-delay: 0s; }
.eq span:nth-child(2) { height: 15px; animation-delay: .18s; }
.eq span:nth-child(3) { height: 10px; animation-delay: .36s; }
.eq span:nth-child(4) { height: 13px; animation-delay: .09s; }
.eq span:nth-child(5) { height: 7px;  animation-delay: .27s; }
@keyframes eq { 0%, 100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .eq span { animation: none; } }

/* Studio jobs in flight */
.st-composing { border: 1px dashed var(--line-2); background: transparent; }
.st-composing .st-title { color: var(--accent); animation: blink 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .st-composing .st-title { animation: none; } }

/* "Make something like this" insight */
.in-insight { color: #c9c3d4; font-size: 0.9rem; line-height: 1.65; margin-bottom: 4px; }

/* ---------------------------------------------------------------- voice booth */
.vb-page { max-width: 860px; margin: 0 auto; padding: 22px 16px 120px; }
.vb-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.vb-h1 { font-family: Anton, sans-serif; font-size: 1.9rem; letter-spacing: 0.5px; }
.vb-sub { color: var(--dim); font-size: 0.9rem; margin: 4px 0 18px; max-width: 60ch; }
.vb-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.vb-panel-head { font-family: var(--mono, 'IBM Plex Mono', monospace); font-size: 0.72rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--dim); margin-bottom: 12px; }

/* on-air lamp */
.onair { display: inline-flex; align-items: center; gap: 8px; font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem; letter-spacing: 0.18em; color: var(--dim); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 12px; user-select: none; }
.onair .lamp { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); transition: all .3s; }
.onair.live { color: #ffe27a; border-color: #6b5c14; }
.onair.live .lamp { background: var(--accent); box-shadow: 0 0 12px 2px rgba(255,212,40,.7); animation: vbpulse 1.1s infinite; }
@keyframes vbpulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .onair.live .lamp { animation: none; } }

.vb-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.vb-tab { background: none; border: 1px solid var(--line); color: var(--dim); border-radius: 8px;
  padding: 6px 14px; font: inherit; font-size: 0.85rem; cursor: pointer; }
.vb-tab.on { background: var(--panel-2); color: var(--accent); border-color: var(--accent); }
.vb-urlrow { display: flex; gap: 8px; margin-bottom: 12px; }
.vb-urlrow[hidden] { display: none; }
.vb-urlrow input { flex: 1; background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 10px 13px; font: inherit; }
.vb-urlrow input:focus { outline: none; border-color: var(--accent); }
#vbScript { width: 100%; min-height: 180px; resize: vertical; background: var(--panel-2);
  border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 12px 14px; font: inherit; font-size: 0.95rem; }
#vbScript:focus { outline: none; border-color: var(--accent); }
#vbScript[hidden] { display: none; }

/* "Ask for a show" — one prompt describes the episode and its hosts */
#vbPromptRow[hidden] { display: none; }
#vbPrompt { width: 100%; min-height: 110px; resize: vertical; background: var(--panel-2);
  border: 1px solid var(--accent-2); color: var(--text); border-radius: 10px; padding: 12px 14px; font: inherit; font-size: 0.95rem; }
#vbPrompt:focus { outline: none; border-color: var(--accent); }

/* AI listener's casting keywords for the selected voice */
.vb-vibe { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; min-height: 0; }
.vb-vibe-chip { font-family: 'IBM Plex Mono', monospace; font-size: 0.66rem; letter-spacing: 0.04em;
  color: var(--accent-2); border: 1px solid var(--accent-2); border-radius: 999px; padding: 2px 9px; opacity: 0.9; }
.vb-vibe-wait { font-size: 0.75rem; }
.vb-read-row { display: flex; align-items: center; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.vb-meta { font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; color: var(--dim); }
div.vb-meta { margin-top: 8px; min-height: 0; }
div.vb-meta:empty { display: none; }
.vb-meta .warn { color: var(--accent); }

.vb-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.vb-field label { display: block; font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.vb-field.wide { grid-column: 1 / -1; }
.vb-field .filter-select { width: 100%; }
.vb-opt { text-transform: none; letter-spacing: 0; }
#vbStyle { width: 100%; min-height: 56px; resize: vertical; background: var(--panel-2);
  border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 10px 13px; font: inherit; font-size: 0.9rem; }
#vbStyle:focus { outline: none; border-color: var(--accent); }
.vb-voice-row { display: flex; gap: 8px; }
.vb-voice-row .filter-select { flex: 1; }
.vb-hint { font-size: 0.75rem; color: var(--dim); margin-top: 6px; }
.vb-hint .warn { color: var(--accent); }
.vb-status { font-family: 'IBM Plex Mono', monospace; font-size: 0.78rem; color: var(--dim); }
.vb-status.err { color: #ff9c8a; }
#vbPreview.playing { color: var(--accent); border-color: var(--accent); }

.vb-takes { list-style: none; }
.vb-empty { padding: 8px 2px; }
.vb-take { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: 0.85rem; }
.vb-take:last-child { border-bottom: none; }
.vb-take .vb-num { font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; color: var(--dim); flex: 0 0 auto; }
.vb-take .vb-desc { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vb-take.failed .vb-desc { color: #cc8a7d; }
.vb-tag { font-family: 'IBM Plex Mono', monospace; font-size: 0.62rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--dim); border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px; flex: 0 0 auto; }
.vb-tag.scraped { color: var(--accent); border-color: var(--accent); }
a.vb-tag { text-decoration: none; }
a.vb-tag.scraped:hover { background: var(--accent); color: var(--accent-ink); }
.vb-take .vb-info { font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem; color: var(--dim); flex: 0 0 auto; }
.vb-take .vb-dl { text-decoration: none; }
.vb-tx.on { color: var(--accent); }

/* pop-open transcript under a take */
.vb-transcript { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; margin: 2px 0 10px; }
.vb-tx-head { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line);
  font-family: 'IBM Plex Mono', monospace; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.vb-tx-head .vb-tx-count { margin-left: auto; letter-spacing: 0.04em; text-transform: none; }
.vb-tx-head .vb-tx-src { text-decoration: none; }
.vb-tx-body { padding: 12px 14px; max-height: 320px; overflow-y: auto; font-size: 0.84rem; line-height: 1.6; }
.vb-tx-body p { margin: 0 0 10px; }
.vb-tx-body p:last-child { margin-bottom: 0; }
.vb-tx-note { font-size: 0.75rem; color: var(--dim); font-style: italic; }
.vb-turn b { font-family: 'IBM Plex Mono', monospace; font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 500; display: inline-block; margin-right: 8px; }
.vb-turn.a b { color: var(--accent); }
.vb-turn.b b { color: var(--accent-2); }
@media (max-width: 640px) {
  .vb-controls { grid-template-columns: 1fr; }
  .vb-take .vb-info { display: none; }
}

/* ---------------------------------------------------------------- control room (admin) */
.cr-meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 22px; }
.cr-meter { background: var(--panel); padding: 15px 16px; }
.cr-meter .v { font-family: 'IBM Plex Mono', monospace; font-size: 1.3rem; color: var(--accent); }
.cr-meter .k { font-family: 'IBM Plex Mono', monospace; font-size: 0.66rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--dim); margin-top: 3px; }
.cr-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 20px; overflow: hidden; }
.cr-panel-head { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--dim); padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel-2);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cr-filters { display: flex; gap: 6px; margin-left: auto; }
.cr-filters .chip { font-size: 0.7rem; padding: 4px 10px; cursor: pointer; }
.cr-filters .chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cr-scroll { overflow-x: auto; }
.cr-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.cr-table th, .cr-table td { text-align: left; padding: 9px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.cr-table tr:last-child td { border-bottom: none; }
.cr-table th { font-family: 'IBM Plex Mono', monospace; font-size: 0.66rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--dim); font-weight: 500; background: var(--panel-2); }
.cr-table th.sortable { cursor: pointer; user-select: none; }
.cr-table th.sortable:hover { color: var(--accent); }
.cr-table th .arrow { opacity: 0.5; font-size: 0.8em; }
.cr-table td.num, .cr-table th.num { text-align: right; font-family: 'IBM Plex Mono', monospace; font-size: 0.78rem; }
.cr-kind { font-family: 'IBM Plex Mono', monospace; font-size: 0.62rem; letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 4px; padding: 2px 7px; color: var(--dim); }
.cr-kind.music { color: var(--accent-2); border-color: var(--accent-2); }
.cr-kind.vo { color: var(--accent); border-color: var(--accent); }
.cr-src { font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem; color: var(--dim); }
.cr-src.scraped { color: var(--accent); }
.cr-fail { color: #ff9c8a; }
.cr-empty { padding: 18px 16px; color: var(--dim); }
.cr-note { font-size: 0.75rem; color: var(--dim); padding: 10px 16px; }

/* voiceover card in chat */
.vo-card { display: flex; align-items: center; gap: 10px; }
.vo-card .vo-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 0.9rem; }
.vo-card a.mini-btn { text-decoration: none; }

/* voice booth mode toggle + podcast */
.vb-mode { display: inline-flex; gap: 4px; margin-left: auto; }
.vb-modebtn { background: none; border: 1px solid var(--line); color: var(--dim); border-radius: 8px;
  padding: 4px 12px; font: inherit; font-size: 0.75rem; cursor: pointer; }
.vb-modebtn.on { background: var(--accent-2); color: #fff; border-color: var(--accent-2); }
.vb-modebtn:disabled { opacity: 0.5; cursor: not-allowed; }
.vb-mode-note { margin: -4px 0 12px; }
.vb-tag.podcast { color: var(--accent-2); border-color: var(--accent-2); }
.vb-tag.rabbit { color: var(--accent-2); border-color: var(--accent-2); text-transform: none; }
a.vb-tag.rabbit:hover { background: var(--accent-2); color: #fff; }
.vb-tx-hole { color: var(--accent-2); text-decoration: none; text-transform: none; letter-spacing: 0.04em; }
.vb-tx-hole:hover { text-decoration: underline; }
.cr-kind.podcast { color: var(--accent-2); border-color: var(--accent-2); }
select:disabled { opacity: 0.55; cursor: not-allowed; }

/* voice booth live progress */
.vb-progress .onair.live { margin-left: auto; }
.vb-progress .onair.live .lamp { background: var(--accent); }
.vb-steps { list-style: none; margin: 6px 0 0; display: flex; flex-direction: column; gap: 8px; }
.vb-steps li { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--dim); }
.vb-steps li.active { color: var(--text); }
.vb-steps li.done { color: var(--text); }
.vb-steps .ms.ok { color: #7fd8a2; }
.vb-steps .ms.idle { color: #4a4756; }
.vb-steps .spin, .vb-take .spin { color: var(--accent-2); animation: vbspin 0.9s linear infinite; }
@keyframes vbspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .vb-steps .spin, .vb-take .spin { animation: none; } }
.vb-steps .wait, .vb-take .wait { color: var(--accent); }

/* launch row: the go button sits below the whole form */
.vb-launch { margin: -6px 0 22px; }

/* Studio session console (borrows the Voice Booth's readout) */
.st-progress { margin-top: 18px; }
.vb-steps li.st-job-head { display: block; font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem;
  letter-spacing: 0.06em; color: var(--dim); padding: 8px 0 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vb-steps li.st-job-head:first-child { padding-top: 0; }

/* live script preview + approve-for-air gate inside the progress console */
.vb-script-preview { margin: 12px 16px 16px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.vb-script-preview[hidden] { display: none; }
.vb-script-preview .vb-tx-body { max-height: 380px; }
.vb-approve-row { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); }
.vb-approve-row[hidden] { display: none; }
.vb-take.working .vb-desc { color: var(--dim); }
.vb-substep { font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; color: var(--accent); }
.vb-bar { height: 6px; background: var(--panel-2); border-radius: 999px; overflow: hidden; margin-top: 12px; }
.vb-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s ease; }
.vb-prog-note { font-size: 0.78rem; color: var(--dim); margin-top: 10px; min-height: 14px; }

/* ---------------------------------------------------------------- car mode
   Fullscreen head-unit takeover: giant targets, glanceable type, screen
   stays awake. Landscape = now-playing | browse; portrait stacks. */
.car-mode { position: fixed; inset: 0; z-index: 400; background: #060607; display: flex; flex-direction: column;
  user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.car-mode[hidden] { display: none; }
body.car-open { overflow: hidden; }
.car-top { display: flex; align-items: center; gap: 14px; padding: 14px 20px; }
.car-clock { font-family: 'IBM Plex Mono', monospace; font-size: 1.15rem; color: var(--dim); min-width: 90px; }
.car-brand { flex: 1; text-align: center; font-weight: 800; letter-spacing: -0.5px; color: var(--dim); font-size: 1rem; }
.car-exit { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 14px;
  font-size: 1.6rem; padding: 10px 18px; cursor: pointer; }
.car-body { flex: 1; display: grid; grid-template-columns: 1fr 1fr; min-height: 0; }
.car-now { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: 10px 28px 28px; min-height: 0; }
.car-cover { width: min(34vh, 260px); height: min(34vh, 260px); object-fit: cover; border-radius: 18px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6); }
.car-meta { text-align: center; max-width: 100%; }
.car-title { font-size: clamp(1.4rem, 4.5vh, 2.2rem); font-weight: 800; line-height: 1.15;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.car-artist { font-size: clamp(1rem, 2.8vh, 1.3rem); color: var(--dim); margin-top: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.car-progress { width: 100%; max-width: 460px; height: 22px; border-radius: 11px; background: var(--panel-2);
  overflow: hidden; cursor: pointer; }
.car-progress div { height: 100%; width: 0; background: var(--accent); border-radius: 11px; }
.car-controls { display: flex; align-items: center; gap: 26px; }
.car-btn { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 50%;
  width: 84px; height: 84px; font-size: 2.6rem; cursor: pointer; display: grid; place-items: center; }
.car-btn:active { border-color: var(--accent); }
.car-play { width: 116px; height: 116px; font-size: 3.6rem;
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.car-browse { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); }
.car-tabs { display: flex; gap: 10px; padding: 6px 18px 12px; }
.car-tab { flex: 1; background: var(--panel-2); border: 1px solid var(--line); color: var(--dim); border-radius: 14px;
  padding: 14px 0; font: inherit; font-size: 1.05rem; font-weight: 600; cursor: pointer; }
.car-tab.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.car-list { flex: 1; overflow-y: auto; list-style: none; margin: 0; padding: 0 10px 24px; }
.car-list li { display: flex; flex-direction: column; gap: 3px; padding: 16px 14px;
  border-bottom: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.car-list li:active { background: var(--panel-2); }
.car-list li.active { background: var(--panel-2); box-shadow: inset 3px 0 0 var(--accent); }
.car-row-main { font-size: 1.15rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.car-row-sub { font-size: 0.85rem; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.car-empty { padding: 24px 16px; color: var(--dim); font-size: 1rem; }
@media (orientation: portrait) {
  .car-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .car-browse { border-left: none; border-top: 1px solid var(--line); }
  .car-cover { width: min(26vh, 220px); height: min(26vh, 220px); }
  .car-btn { width: 72px; height: 72px; }
  .car-play { width: 96px; height: 96px; }
}

/* -------------------------------------------------------- 2-column layout
   Desktop: content in the big left column, the agent riding shotgun in a
   sticky right rail (compact chat, same conversation as the chat page).
   The chat page keeps its full-width room; smaller screens use the Chat tab. */
.agent-side { display: none; }
@media (min-width: 1200px) {
  body.page.has-tabbar { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  body.page.has-tabbar > .topbar { grid-column: 1 / -1; }
  body.page.has-tabbar > #page { grid-column: 1; min-width: 0; }
  .agent-side { display: flex; flex-direction: column; grid-column: 2; position: sticky;
    top: var(--topbar-h); height: calc(100vh - var(--topbar-h));
    border-left: 1px solid var(--line); background: var(--panel); }
  body:has(.player-dock:not(.hidden)) .agent-side { height: calc(100vh - var(--topbar-h) - 92px); }
  body[data-page="chat"].has-tabbar { display: block; }   /* the chat page IS the agent */
  body[data-page="chat"] .agent-side { display: none; }
  body[data-page="rabbit"].has-tabbar { display: block; } /* the rabbit hole has its own conversation column */
  body[data-page="rabbit"] .agent-side { display: none; }
  /* Hidden by the listener: single column again, with an edge tab to bring it back. */
  html.side-closed body.page.has-tabbar { display: block; }
  html.side-closed .agent-side { display: none; }
  html.side-closed body:not([data-page="chat"]):not([data-page="rabbit"]) .as-open { display: flex; }
}
.as-open { display: none; position: fixed; right: 0; top: calc(var(--topbar-h) + 18px); z-index: 30;
  align-items: center; justify-content: center; width: 34px; height: 44px;
  background: var(--panel); color: var(--accent-2); border: 1px solid var(--line); border-right: none;
  border-radius: 10px 0 0 10px; cursor: pointer; box-shadow: -4px 0 14px rgba(0,0,0,.25); }
.as-open:hover { color: var(--text); border-color: var(--accent-2); }
.as-open .ms { font-size: 1.2rem; }
.as-head .as-close { padding: 4px 7px; }
.as-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.as-head .as-ico { color: var(--accent-2); }
.as-head strong { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-head a.mini-btn { text-decoration: none; }
.as-log { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.as-msg { max-width: 92%; padding: 8px 11px; border-radius: 12px; font-size: 0.84rem; line-height: 1.5; overflow-wrap: break-word; }
.as-msg.agent { background: var(--panel-2); border-bottom-left-radius: 4px; align-self: flex-start; }
.as-msg.user { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; align-self: flex-end; }
.as-msg a { color: inherit; }
.as-input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.as-input input { flex: 1; min-width: 0; background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 0.86rem; }
.as-input input:focus { outline: none; border-color: var(--accent-2); }

/* -------------------------------------------------------- rabbit hole: ideas + steering */
.rh-ideas { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px;
  margin: 18px auto 4px; max-width: 720px; text-align: left; }
.rh-idea { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  font: inherit; color: var(--text); cursor: pointer; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.rh-idea:hover { border-color: var(--hover); }
.rh-idea .ms { color: var(--accent); font-size: 1.1rem; }
.rh-idea strong { font-size: 0.9rem; line-height: 1.3; }
.rh-idea em { font-style: normal; font-family: 'IBM Plex Mono', monospace; font-size: 0.62rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
#rhShuffle { margin-top: 12px; }
.rh-ask { display: flex; gap: 8px; margin: 0 0 12px; }
.rh-ask[hidden] { display: none; }
.rh-ask input { flex: 1; min-width: 0; background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 10px 13px; font: inherit; font-size: 0.9rem; }
.rh-ask input:focus { outline: none; border-color: var(--accent-2); }   /* violet — you're talking to the agent */
.rh-agent { font-family: 'IBM Plex Mono', monospace; font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-2); border: 1px solid var(--accent-2); border-radius: 4px; padding: 1px 6px;
  margin-right: 8px; vertical-align: 2px; white-space: nowrap; }

/* Studio console: honest-estimate compose bar (fills toward typical time) */
.vb-steps li.st-est { display: flex; align-items: center; gap: 10px; font-size: 0.72rem; }
.st-est-bar { flex: 0 0 220px; max-width: 60%; height: 8px; border-radius: 4px; background: var(--panel-2);
  border: 1px solid var(--line); overflow: hidden; }
.st-est-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px;
  transition: width 1s linear; }

/* Control Room — Studio import panel */
.cr-import { padding: 14px 16px; }
.cr-import p { margin: 0 0 12px; font-size: 0.85rem; line-height: 1.5; }
.cr-import code { font-family: 'IBM Plex Mono', monospace; font-size: 0.78rem; background: var(--bg); padding: 1px 5px; border-radius: 4px; }
.cr-import-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cr-import-row input[type=file] { font-size: 0.8rem; color: var(--dim); max-width: 100%; }
.cr-import-log { list-style: none; margin: 12px 0 0; padding: 0; font-family: 'IBM Plex Mono', monospace; font-size: 0.76rem;
  max-height: 220px; overflow-y: auto; border-top: 1px solid var(--line); }
.cr-import-log li { padding: 5px 0; border-bottom: 1px solid var(--line); color: var(--dim); }
.cr-import-log li.good { color: var(--text); }
.cr-import-log li.bad { color: #e06060; }
.cr-import-log li.skip { opacity: 0.7; }
.st-title-input { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--accent); border-radius: 6px;
  padding: 2px 6px; width: 100%; max-width: 420px; }

/* Rabbit Hole — the board (left) and the running conversation (right) */
.rabbit-page { max-width: 1180px; display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 26px; align-items: start; }
.rh-main { min-width: 0; }
.rh-side { position: sticky; top: calc(var(--topbar-h) + 12px); display: flex; flex-direction: column;
  max-height: calc(100vh - var(--topbar-h) - 150px); min-height: 320px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.rh-side-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line);
  font-family: 'IBM Plex Mono', monospace; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim);
  cursor: default; }
.rh-side-head .rh-agent { margin-right: 0; }
.rh-side-head .rh-side-tog { margin-left: auto; display: none; font-size: 1.1rem; cursor: pointer; }
.rh-chat { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; scroll-behavior: smooth; }
.rh-msg { display: flex; }
.rh-msg.user { justify-content: flex-end; }
.rh-bub { max-width: 90%; padding: 8px 11px; border-radius: 12px; font-size: 0.86rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.rh-msg.agent .rh-bub { background: var(--panel-2); border-bottom-left-radius: 4px; }
.rh-msg.user .rh-bub { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.rh-msg.user.hop .rh-bub { background: transparent; color: var(--dim); border: 1px dashed var(--line); font-size: 0.78rem;
  display: inline-flex; align-items: center; gap: 4px; }
.rh-msg.user.hop .ms { font-size: 0.95rem; }
.rh-msg.typing .rh-bub { color: var(--dim); font-style: italic; animation: rhBlink 1.2s ease-in-out infinite; }
@keyframes rhBlink { 50% { opacity: 0.45; } }
.rh-hopref { display: block; margin-top: 5px; font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent-2); cursor: pointer; }
.rh-hopref:hover { text-decoration: underline; }
.rh-say { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.rh-say input { flex: 1; min-width: 0; background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 10px 13px; font: inherit; font-size: 0.9rem; }
.rh-say input:focus { outline: none; border-color: var(--accent-2); }
@media (max-width: 1000px) {
  .rabbit-page { grid-template-columns: 1fr; gap: 14px; }
  .rh-side { position: static; order: -1; max-height: none; min-height: 0; }
  .rh-side-head { cursor: pointer; }
  .rh-side-head .rh-side-tog { display: inline-block; }
  .rh-side:not(.open) .rh-chat { max-height: 138px; }
  .rh-side.open .rh-chat { max-height: 55vh; }
}
@media (prefers-reduced-motion: reduce) { .rh-msg.typing .rh-bub { animation: none; } .rh-chat { scroll-behavior: auto; } }

/* ---------------------------------------------------------------- home: the shelf + a floating field */
.home-shelf { max-width: 1080px; margin: 0 auto; padding: 18px 16px 150px; }
.home-shelf[hidden] { display: none; }
.home-shelf-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.home-shelf-head .chip { margin-left: auto; text-decoration: none; }
.home-shelf-k { font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
.chat.hidden { display: none; }
.composer.floating {
  left: 50%; right: auto; transform: translateX(-50%);
  width: min(760px, calc(100% - 20px)); bottom: 14px;
  padding: 9px 10px; border: 1px solid var(--line); border-radius: 32px;
  background: color-mix(in srgb, var(--panel) 86%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 14px 44px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.03) inset;
}
.composer.floating input { background: transparent; border-color: transparent; }
.composer.floating input:focus { border-color: var(--line); }
.has-tabbar .composer.floating { bottom: calc(var(--tab-offset) + 10px); padding: 8px 8px; }
/* A frosted band along the bottom eighth of the chat page: full blur at the
   edge, fading to nothing upward, so the shelf/messages soften behind the
   floating composer instead of slicing through it. Pointer-transparent and
   stacked under the composer, dock and tab bar. */
.composer-haze {
  position: fixed; left: 0; right: 0; bottom: 0; height: 12.5vh; height: 12.5dvh;
  pointer-events: none; z-index: 5;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  background: linear-gradient(to top, color-mix(in srgb, var(--bg) 70%, transparent), transparent);
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.6) 45%, transparent 100%);
          mask-image: linear-gradient(to top, #000 0%, rgba(0,0,0,.6) 45%, transparent 100%);
}
.has-tabbar .composer-haze { bottom: var(--tab-offset); }
.composer.floating { z-index: 6; }
#page[data-page="chat"] ~ .player-dock { bottom: 90px; }
#page[data-page="chat"] ~ #ytHolder.video-open { bottom: 186px; }
@media (max-width: 760px) { .has-tabbar #page[data-page="chat"] ~ .player-dock { bottom: calc(var(--tab-offset) + 82px); } }
.chat { padding-bottom: 170px; }

/* quick play line + read-aloud control on replies */
.qp-ico { color: var(--accent); vertical-align: -3px; margin-right: 2px; }
.qp-kind { font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--dim); margin-left: 6px; }
.say-btn { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: 8px; vertical-align: middle;
  border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--dim); cursor: pointer; font-size: 0.95rem; }
.say-btn:hover { color: var(--text); border-color: var(--hover); }
.say-btn.playing { color: var(--accent-2); border-color: var(--accent-2); animation: rhBlink 1.2s ease-in-out infinite; }

/* ---------------------------------------------------------------- tablature (album page) */
.ln-track .ln-ttab { opacity: 0; align-self: center; flex-shrink: 0; font-family: 'IBM Plex Mono', monospace; font-size: 0.62rem;
  letter-spacing: 0.1em; padding: 4px 7px; }
.ln-track:hover .ln-ttab { opacity: 1; }
@media (hover: none) { .ln-track .ln-ttab { opacity: 1; } }
.tab-body { display: flex; flex-direction: column; gap: 12px; }
.tab-song { margin: 0; font-size: 0.92rem; }
.tab-parts { display: flex; flex-direction: column; gap: 6px; }
.tab-part { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto auto; gap: 10px; align-items: center;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2);
  color: var(--text); text-decoration: none; }
.tab-part:hover { border-color: var(--accent); }
.tab-inst { font-size: 0.82rem; font-weight: 600; }
.tab-name { font-size: 0.78rem; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-meta { display: flex; gap: 10px; align-items: center; font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem; color: var(--dim); white-space: nowrap; }
.tab-tuning { letter-spacing: 0.08em; }
.tab-diff { color: var(--accent); letter-spacing: 0.05em; }
.tab-part .ms { color: var(--dim); font-size: 1rem; }
.tab-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tab-acts .mini-btn { text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.tab-credit { margin-left: auto; font-size: 0.72rem; }
@media (max-width: 560px) { .tab-part { grid-template-columns: minmax(0, 1fr) auto; } .tab-name { display: none; } }

/* ---------------------------------------------------------------- news */
.news-page { max-width: 860px; margin: 0 auto; padding: 18px 16px 140px; }
.nw-h1 { display: flex; align-items: center; gap: 8px; font-size: 1.4rem; margin: 0 0 4px; }
.nw-h1 .ms { color: var(--accent); }
.nw-sub { margin: 0 0 14px; }
.nw-cats { margin-bottom: 16px; }
.nw-cats .chip { text-decoration: none; }
.nw-cats .chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.nw-recap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 18px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.nw-recap-txt { flex: 1; min-width: 220px; font-size: 0.9rem; }
.nw-recap-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nw-recap-acts .ln-btn:disabled { opacity: .7; cursor: default; }
.nw-list { display: flex; flex-direction: column; gap: 10px; }
.nw-story { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 14px; padding: 12px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 14px; }
.nw-story:not(:has(.nw-img)) { grid-template-columns: minmax(0, 1fr); }
.nw-img { width: 132px; height: 96px; object-fit: cover; border-radius: 10px; background: var(--panel-2); }
.nw-src { font-family: 'IBM Plex Mono', monospace; font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; }
.nw-title { display: block; color: var(--text); text-decoration: none; font-weight: 600; font-size: 1rem; line-height: 1.3; }
.nw-title:hover { color: var(--accent); }
.nw-desc { margin: 6px 0 0; font-size: 0.84rem; color: var(--dim); line-height: 1.45; }
.nw-acts { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.nw-acts .mini-btn { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.nw-acts .mini-btn:disabled { opacity: .7; cursor: default; }
.nw-acts .spin, .nw-recap .spin { animation: vbspin 0.9s linear infinite; display: inline-block; }
@media (max-width: 560px) { .nw-story { grid-template-columns: minmax(0, 1fr); } .nw-img { width: 100%; height: 150px; } }

/* ---------------------------------------------------------------- singles */
.shelf-add-row { display: flex; gap: 8px; align-items: center; }
.shelf-add-row input { flex: 1; min-width: 0; }
.shelf-add-mode { flex-shrink: 0; }
.shelf-add-mode .chip { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.shelf-add-mode .chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.shelf-add-mode .chip .ms { font-size: 0.95rem; }
@media (max-width: 560px) { .shelf-add-mode .chip .ms { display: none; } }
.ln-tartist { color: var(--dim); }
.ln-track .ln-tdel { opacity: 0; align-self: center; flex-shrink: 0; }
.ln-track:hover .ln-tdel { opacity: 1; }
@media (hover: none) { .ln-track .ln-tdel { opacity: 1; } }

/* ---------------------------------------------------------------- studio cards (v2) */
.st-catalog, .st-track, .st-info { min-width: 0; }              /* nothing may push the column wider than the page */
.st-track { padding: 12px 14px; }
.st-art { position: relative; width: 56px; height: 56px; flex-shrink: 0; border-radius: 8px; overflow: hidden; border: 1px solid var(--line);
  background: var(--panel); color: var(--dim); cursor: pointer; display: grid; place-items: center; padding: 0; }
.st-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-art > .ms:not(.st-art-play) { font-size: 1.5rem; }
.st-art-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.55); color: #fff; opacity: 0; transition: opacity .15s; }
.st-art:hover .st-art-play, .st-track.now .st-art-play { opacity: 1; }
.st-track.now .st-art { border-color: var(--accent); }
.st-info .st-title { white-space: normal; overflow-wrap: anywhere; }
.st-artist { color: var(--text); }
.st-on { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.st-on-chip { font-size: 0.66rem; padding: 2px 8px; text-decoration: none; display: inline-flex; align-items: center; gap: 3px; }
.st-on-chip .ms { font-size: 0.8rem; }
.st-prompt { white-space: normal; overflow-wrap: anywhere; text-overflow: clip; line-height: 1.45; margin-top: 10px; }
.st-prompt.clamped { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-more { background: none; border: none; color: var(--accent); font: inherit; font-size: 0.72rem; padding: 2px 0; cursor: pointer; }
.st-more:hover { text-decoration: underline; }
.st-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.st-act { display: inline-flex; align-items: center; gap: 4px; background: var(--panel); color: var(--dim); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 10px 4px 7px; font: inherit; font-size: 0.72rem; cursor: pointer; }
.st-act .ms { font-size: 0.95rem; }
.st-act:hover { color: var(--text); border-color: var(--hover); }
.st-act.st-del:hover { color: #e06060; border-color: #e06060; }
@media (max-width: 480px) { .st-act { padding: 4px 8px; } .st-act .ms { font-size: 1rem; } }
.st-artist-chips { margin: -4px 0 12px; }
.st-artist-chips:empty { display: none; }

/* the cover studio */
dialog.st-cover-modal { width: min(1040px, 96vw); max-height: 92vh; display: flex; flex-direction: column; }
dialog.st-cover-modal:not([open]) { display: none; }
dialog.st-cover-modal h2 { display: flex; align-items: center; gap: 8px; }
dialog.st-cover-modal h2 .ms { color: var(--accent); }
.cs-body { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; min-height: 0; flex: 1; overflow: hidden; }
.cs-albums { overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 4px; }
.cs-album { display: flex; align-items: center; gap: 10px; text-align: left; background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; padding: 8px; font: inherit; cursor: pointer; }
.cs-album.on { border-color: var(--accent); }
.cs-album img, .cs-noart { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; flex-shrink: 0; display: grid; place-items: center;
  background: var(--panel); color: var(--dim); }
.cs-album-txt { display: flex; flex-direction: column; min-width: 0; }
.cs-album-txt strong { font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-album-txt em { font-style: normal; font-size: 0.7rem; color: var(--dim); }
.cs-editor { overflow-y: auto; min-width: 0; padding-right: 4px; }
.cs-head { display: flex; gap: 16px; align-items: center; margin-bottom: 6px; }
.cs-current img, .cs-noart.big { width: 150px; height: 150px; border-radius: 12px; object-fit: cover; font-size: 2rem; }
.cs-meta { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.cs-title { font-size: 1.1rem; }
.cs-meta .mini-btn { text-decoration: none; }
.cs-row { flex-wrap: wrap; }
.cs-upload { cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.cs-history { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.cs-cover { position: relative; border-radius: 10px; overflow: hidden; border: 2px solid transparent; background: var(--panel-2); }
.cs-cover.on { border-color: var(--accent); }
.cs-cover.editing { border-color: var(--accent-2); }
.cs-cover img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.cs-cover-acts { position: absolute; inset: auto 0 0 0; display: flex; justify-content: center; gap: 4px; padding: 6px; background: linear-gradient(transparent, rgba(0,0,0,.7)); opacity: 0; transition: opacity .15s; }
.cs-cover:hover .cs-cover-acts { opacity: 1; }
@media (hover: none) { .cs-cover-acts { opacity: 1; } }
.cs-when { position: absolute; top: 6px; left: 6px; font-family: 'IBM Plex Mono', monospace; font-size: 0.58rem; letter-spacing: 0.08em;
  background: rgba(0,0,0,.6); color: #ddd; padding: 2px 6px; border-radius: 4px; }
@media (max-width: 760px) { .cs-body { grid-template-columns: 1fr; } .cs-albums { flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  .cs-album { flex: 0 0 200px; } .cs-current img, .cs-noart.big { width: 110px; height: 110px; } }
.st-wav { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; margin: -4px 0 10px; cursor: pointer; }
.st-wav[hidden] { display: none; }
.st-wav .dim { margin: 0; font-size: 0.75rem; }
.st-wav input { accent-color: var(--accent); }
a.st-act { text-decoration: none; }
.st-act.st-wavdl { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.st-act .spin { animation: vbspin 0.9s linear infinite; display: inline-block; }

/* singles: source album */
.ln-tthumb { width: 28px; height: 28px; border-radius: 4px; object-fit: cover; vertical-align: middle; margin-right: 8px; }
.ln-tfrom { font-size: 0.66rem; padding: 2px 8px 2px 5px; margin-left: 8px; vertical-align: middle; display: inline-flex; align-items: center; gap: 3px; cursor: pointer; }
.ln-tfrom .ms { font-size: 0.85rem; }
.card-album { padding-top: 0; font-style: italic; }
dialog.from-modal { width: min(640px, 94vw); max-height: 90vh; overflow-y: auto; }
.from-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.from-cover { width: 120px; height: 120px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.from-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.from-title { font-size: 1.1rem; }
.from-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.from-acts .ln-btn { text-decoration: none; }
.from-acts .ln-btn:disabled { opacity: .6; cursor: default; }
.from-tracks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.from-track { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: 0.88rem; }
.from-track:last-child { border-bottom: none; }
.from-ttitle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.from-note { margin: 12px 0 0; }
@media (max-width: 480px) { .from-cover { width: 84px; height: 84px; } }

/* singles on the shelf: a little 45 sticker */
.shelf-card.single .shelf-45 { position: absolute; left: 8px; top: 8px; z-index: 1; font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem;
  font-weight: 700; letter-spacing: 0.06em; color: var(--accent-ink); background: var(--accent); border-radius: 999px; padding: 3px 7px; }
.ln-wiki { line-height: 1.6; }
.ln-wiki-src { color: var(--accent); text-decoration: none; font-size: 0.8rem; white-space: nowrap; }
.ln-wiki-src:hover { text-decoration: underline; }
.shelf-bsides { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; margin: 8px 0 0 2px; cursor: pointer; }
.shelf-bsides[hidden] { display: none; }
.shelf-bsides .dim { margin: 0; font-size: 0.74rem; }
.shelf-bsides input { accent-color: var(--accent); }

/* song cards in chat (search_songs) */
.song-cards { display: flex; flex-direction: column; gap: 8px; }
.song-card { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 10px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; }
.song-card img, .song-card .card-noart { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; display: grid; place-items: center; }
.song-info { min-width: 0; }
.song-title { font-weight: 600; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-sub, .song-album { font-size: 0.75rem; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-album { font-style: italic; }
.song-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.song-acts .mini-btn { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.song-acts .mini-btn:disabled { opacity: .7; cursor: default; }
.song-acts .spin { animation: vbspin 0.9s linear infinite; display: inline-block; }
@media (max-width: 520px) { .song-card { grid-template-columns: 48px minmax(0, 1fr); } .song-acts { grid-column: 1 / -1; justify-content: flex-start; } }

/* shelf: quick find */
.shelf-find { display: inline-flex; align-items: center; gap: 6px; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 12px 4px 10px; color: var(--dim); flex: 1 1 200px; min-width: 160px; max-width: 320px; }
.shelf-find:focus-within { border-color: var(--accent); color: var(--text); }
.shelf-find .ms { font-size: 1rem; }
.shelf-find input { flex: 1; min-width: 0; background: none; border: none; color: var(--text); font: inherit; font-size: 0.85rem; outline: none; padding: 4px 0; }
.shelf-find input::-webkit-search-cancel-button { filter: invert(.7); }
.shelf-card[hidden] { display: none; }
.shelf-nomatch[hidden] { display: none; }

/* ---------------------------------------------------------------- shows */
.shows-page { max-width: 900px; margin: 0 auto; padding: 18px 16px 140px; }
.sh-tabs .chip { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font: inherit; font-size: 0.85rem; }
.sh-tabs .chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.sh-n { font-family: 'IBM Plex Mono', monospace; font-size: 0.7rem; opacity: .8; }
.sh-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.sh-find { flex: 1 1 260px; max-width: none; }
.sh-city { flex: 0 1 160px; min-width: 120px; }
.sh-status { margin: 0 0 12px; min-height: 1.2em; font-size: 0.8rem; }
.sh-list { display: flex; flex-direction: column; gap: 10px; }
.sh-card { display: grid; grid-template-columns: 120px 64px minmax(0, 1fr); gap: 14px; align-items: start;
  padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.sh-img { width: 120px; height: 80px; object-fit: cover; border-radius: 10px; background: var(--panel-2); display: block; }
.sh-img.sh-stub { object-fit: contain; background: #000; }
.sh-noimg { display: grid; place-items: center; color: var(--dim); font-size: 1.6rem; }
.sh-date { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 6px 4px; border-radius: 10px; background: var(--panel-2); color: var(--accent); line-height: 1.05; }
.sh-d-m { font-family: 'IBM Plex Mono', monospace; font-size: 0.62rem; letter-spacing: .14em; text-transform: uppercase; }
.sh-d-d { font-family: 'Anton', sans-serif; font-size: 1.6rem; color: var(--text); }
.sh-d-y { font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; color: var(--dim); }
.sh-body { min-width: 0; }
.sh-who { font-weight: 700; font-size: 1rem; line-height: 1.25; }
.sh-artist { color: var(--text); text-decoration: none; }
.sh-artist:hover { color: var(--accent); }
.sh-with { font-weight: 400; font-size: 0.82rem; }
.sh-bill { font-size: 0.84rem; color: var(--dim); margin-top: 2px; }
.sh-where { font-size: 0.86rem; margin-top: 3px; }
.sh-notes { margin: 4px 0 0; font-size: 0.8rem; }
.sh-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sh-acts .mini-btn { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.sh-tix { color: var(--accent-ink); background: var(--accent) !important; border-color: var(--accent) !important; font-weight: 700; }
.sh-wish.on { border-color: var(--accent); color: var(--accent); }
.sh-media { margin-top: 10px; border-top: 1px dashed var(--line-2); padding-top: 8px; }
.sh-setlist summary { cursor: pointer; font-size: 0.85rem; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 6px; }
.sh-setlist summary::-webkit-details-marker { display: none; }
.sh-setlist ol { margin: 8px 0 4px 0; padding-left: 0; columns: 2; column-gap: 22px; font-size: 0.82rem; line-height: 1.5; list-style-position: inside; }
.sh-setlist li { break-inside: avoid; }
.sh-src { font-size: 0.72rem; text-decoration: none; }
.sh-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 8px; }
.sh-vid { position: relative; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; padding: 0;
  cursor: pointer; text-align: left; color: var(--text); font: inherit; }
.sh-vid img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.sh-vid-t { display: block; font-size: 0.7rem; padding: 6px 8px; line-height: 1.3; max-height: 2.6em; overflow: hidden; }
.sh-play { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.6); color: #fff; border-radius: 999px; padding: 3px; font-size: 1.1rem; }
.sh-vid:hover .sh-play { background: var(--accent); color: var(--accent-ink); }
.sh-mline { margin: 8px 0 0; font-size: 0.75rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sh-recheck { background: none; border: 1px solid var(--line-2); color: var(--text); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 0.72rem; cursor: pointer; }
.sh-recheck:hover { border-color: var(--hover); }
.sh-addbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.sh-scan { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.sh-modal { width: min(520px, 94vw); }
.sh-stub-preview { width: 100%; max-height: 220px; object-fit: contain; background: #000; border-radius: 10px; margin-bottom: 12px; }
.sh-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.sh-form input { margin: 0; }
.sh-form input:nth-child(1), .sh-form input:nth-child(5), .sh-form input:nth-child(6) { grid-column: 1 / -1; }
.sh-teaser { width: min(520px, 94vw); }
.sh-teaser h2 { display: flex; align-items: center; gap: 8px; }
.sh-teaser h2 .ms { color: var(--accent); }
.sh-tease-list { list-style: none; margin: 0 0 16px; display: flex; flex-direction: column; gap: 8px; }
.sh-tease-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 12px; background: var(--panel-2); border-radius: 10px; font-size: 0.86rem; }
.sh-tease-date { color: var(--accent); font-weight: 600; min-width: 140px; }
.sh-tease-who { flex: 1; min-width: 160px; }
.sh-tease-list .sh-tix { text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.sh-teaser .modal-row { justify-content: flex-end; }
.sh-teaser .ln-btn { text-decoration: none; }
@media (max-width: 560px) {
  .sh-card { grid-template-columns: 56px minmax(0, 1fr); }
  .sh-card .sh-img { grid-column: 1 / -1; width: 100%; height: 140px; }
  .sh-setlist ol { columns: 1; }
  .sh-form { grid-template-columns: 1fr; }
  .sh-form input { grid-column: auto !important; }
}

/* ------------------------------------------- studio + reads: list-first layout */
.st-sub-h { font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--dim); display: flex; align-items: center; gap: 8px; margin: 0; }
.st-sub-h .sh-n { font-size: 0.68rem; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.st-list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; margin-bottom: 10px; }
.st-list-head .st-toolbar { margin: 0; flex: 1 1 320px; justify-content: flex-end; }
.st-list-head .st-toolbar input { flex: 1 1 160px; min-width: 120px; padding: 7px 12px; font-size: 0.8rem; }
.st-list-head .filter-select { font-size: 0.8rem; padding: 6px 10px; }
.st-list { gap: 4px; }
.st-list .st-track { padding: 6px 8px 6px 6px; border-radius: 10px; }
.st-list .st-track:hover { border-color: var(--line-2); }
.st-list .st-track.open { border-color: var(--line-2); background: var(--panel); }
.st-list .st-row { gap: 10px; }
.st-list .st-art { width: 40px; height: 40px; border-radius: 6px; }
.st-list .st-art > .ms:not(.st-art-play) { font-size: 1.15rem; }
.st-list .st-info .st-title { font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-list .st-sub { font-size: 0.68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-genres { display: flex; gap: 4px; flex-shrink: 0; max-width: 42%; overflow: hidden; }
.st-genre { font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
  color: var(--dim); background: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 8px; cursor: pointer; }
.st-genre:hover { color: var(--accent); border-color: var(--accent); }
.st-genre.ghost { border-style: dashed; cursor: default; }
.st-open { background: none; border: none; color: var(--dim); font-size: 1.3rem; cursor: pointer; padding: 4px; border-radius: 8px; flex-shrink: 0; transition: transform .18s ease, color .12s; }
.st-open:hover { color: var(--text); background: var(--panel); }
.st-track.open .st-open { transform: rotate(180deg); color: var(--accent); }
.st-tray { margin: 6px 0 4px 56px; padding: 10px 12px 8px; border-left: 2px solid var(--line-2); }
.st-tray-k { font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); margin: 8px 0 3px; }
.st-tray-k:first-child { margin-top: 0; }
.st-tray .st-prompt { margin-top: 0; color: var(--text); font-size: 0.82rem; }
.st-lyrics-pre { white-space: pre-wrap; font-size: 0.78rem; color: var(--dim); line-height: 1.5; font-family: inherit; }
.st-tray .st-on { margin-top: 2px; }
.st-tray .st-acts { margin-top: 12px; }
@media (max-width: 560px) {
  .st-genres { display: none; }
  .st-track.open .st-genres { display: flex; max-width: none; margin: 6px 0 0 50px; order: 9; flex-basis: 100%; }
  .st-list .st-row { flex-wrap: wrap; }
  .st-tray { margin-left: 0; }
}

/* ------------------------------------------------ reads: list-first layout */
.vb-page.vb-grid { max-width: 1120px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: 32px; align-items: start; }
.vb-form-col { min-width: 0; }
.vb-list-col { min-width: 0; }
.vb-toolbar { flex: 0 1 220px; }
.vb-toolbar input { padding: 7px 12px; font-size: 0.8rem; }
.vb-list-col .vb-takes { display: flex; flex-direction: column; gap: 2px; }
.vb-list-col .vb-take { padding: 6px 6px; border: 1px solid transparent; border-radius: 10px; font-size: 0.84rem; }
.vb-list-col .vb-take:hover { border-color: var(--line-2); }
.vb-list-col .vb-take.open { border-color: var(--line-2); background: var(--panel); }
.vb-list-col .vb-take .vb-desc { cursor: pointer; }
.vb-list-col .vb-take .vb-play { flex-shrink: 0; }
.vb-list-col .vb-take .vb-tx { margin-left: 2px; }
.vb-list-col .vb-transcript { margin: 2px 0 8px 40px; }
.vb-tray-acts { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 12px; border-top: 1px solid var(--line); }
.vb-tray-acts .st-act.ms { font-size: 1rem; padding: 4px 8px; }
.vb-news-list { margin-top: 12px; }
.vb-news-list .nw-story { grid-template-columns: 96px minmax(0, 1fr); padding: 10px; }
.vb-news-list .nw-img { width: 96px; height: 72px; }
.vb-news-list .nw-title { font-size: 0.92rem; }
#vbNewsRow .nw-recap { padding: 10px 12px; margin: 10px 0 0; }
#vbNewsRow .nw-cats { margin: 4px 0 0; }
.vb-tab .ms { font-size: 1rem; vertical-align: -0.15em; }
@media (max-width: 900px) {
  .vb-page.vb-grid { grid-template-columns: 1fr; gap: 24px; }
  .vb-form-col { order: -1; }
  .vb-list-col .vb-transcript { margin-left: 0; }
  .vb-news-list .nw-story { grid-template-columns: minmax(0, 1fr); }
  .vb-news-list .nw-img { width: 100%; height: 140px; }
}

/* ---------------------------------------------------------------- credits */
.pill-credits { gap: 4px; }
.pill-credits .ms { color: var(--accent); }
.pill-credits.low .ms { color: #e06060; }
.cost-pill { display: inline-flex; align-items: center; gap: 1px; margin-left: 8px; padding: 1px 8px 1px 5px; border-radius: 999px;
  background: rgba(0,0,0,.18); font-family: 'IBM Plex Mono', monospace; font-size: 0.72rem; font-weight: 600; vertical-align: 1px; }
.cost-pill .ms { font-size: 0.95rem; }
.ln-btn .cost-pill { background: var(--panel); color: var(--accent); }
.wallet-balance .w-bolt { color: var(--accent); font-size: 1.4rem; vertical-align: -0.2em; margin-right: 2px; }
.w-prices { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 10px; }
.w-price { font-size: 0.74rem; color: var(--dim); background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.w-price b { color: var(--text); font-family: 'IBM Plex Mono', monospace; margin-left: 4px; }
.w-credit-log { max-height: 180px; overflow-y: auto; margin-bottom: 6px; }
.a-credits .ms { font-size: 0.9rem; color: var(--accent); vertical-align: -0.15em; }
.a-grant-wrap { display: inline-flex; gap: 4px; align-items: center; margin-right: 6px; }
.a-grant { width: 84px; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font: inherit; font-size: 0.78rem; }
.a-grant:focus { outline: none; border-color: var(--accent); }
.cr-pricing { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 18px; padding: 16px; }
.cr-pricing label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.84rem; }
.cr-pricing input { width: 96px; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 0.84rem; text-align: right; }
.cr-pricing input:focus { outline: none; border-color: var(--accent); }
.cr-pricing-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.vb-news-list .nw-story:not(:has(.nw-img)) { grid-template-columns: minmax(0, 1fr); }
.vb-tabs { flex-wrap: wrap; }
.vb-tab { white-space: nowrap; }
.vb-list-col .vb-take .vb-desc { flex: 1 1 140px; min-width: 110px; }
.vb-list-col .vb-take .vb-tag.scraped, .vb-list-col .vb-take .vb-tag:not(.podcast):not(.rabbit) { display: none; }  /* source lives in the tray */
@media (max-width: 1100px) { .vb-list-col .vb-take .vb-info { display: none; } }

/* Desktop dialogs: the global margin reset cancels the browser's own
   centering for <dialog>, so put modals back in the middle of the viewport.
   (Phones keep their bottom-sheet rules, defined in the ≤760px block.) */
@media (min-width: 761px) {
  dialog:modal { position: fixed; inset: 0; margin: auto; max-height: 92vh; overflow-y: auto; }
  dialog.st-cover-modal:modal { overflow: hidden; }
}

/* Redo loaded a prompt — Generate pulses until it's fired or the prompt is edited. */
.st-generate.armed { animation: pulse 1.4s ease-out infinite; }
@media (prefers-reduced-motion: reduce) { .st-generate.armed { animation: none; outline: 2px solid var(--accent); outline-offset: 3px; } }

/* Phones: composer / booth fold away behind a button in the list head. */
.mob-compose { display: none; align-items: center; gap: 6px; padding: 8px 14px; font-size: 0.85rem; }
@media (max-width: 820px) {
  .mob-compose { display: inline-flex; }
  .studio-page:not(.mob-open) .st-composer { display: none; }
  .studio-page .st-list-head { flex-wrap: wrap; }
  .studio-page .st-list-head .st-toolbar { flex-basis: 100%; justify-content: flex-start; }
  .studio-page .st-composer { order: -1; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
  .studio-page.mob-open .st-list-head { order: 0; }
}
@media (max-width: 900px) {
  .vb-page.vb-grid .mob-compose { display: inline-flex; }
  .vb-page.vb-grid:not(.mob-open) .vb-form-col { display: none; }
  .vb-page.vb-grid .st-list-head { flex-wrap: wrap; }
  .vb-page.vb-grid .vb-toolbar { flex-basis: 100%; }
}
.sh-rabbit { color: var(--accent-2); }
.sh-rabbit:hover { border-color: var(--accent-2); }
.sh-rabbit .ms { font-size: 1.05rem; }

/* Been there: the ticket + liner notes + setlist */
.sh-night { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 4px; }
.sh-night-text { min-width: 0; }
.sh-tk-k { font-family: 'IBM Plex Mono', monospace; font-size: 0.6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); margin: 0 0 4px; }
.sh-writeup { margin-bottom: 12px; }
.sh-writeup p { font-size: 0.86rem; line-height: 1.55; margin: 0 0 8px; }
.sh-ticket-photo { display: block; border-radius: 8px; overflow: hidden; background: #000; border: 1px solid var(--line-2); transform: rotate(-1.2deg); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.sh-ticket-photo img { display: block; width: 100%; max-height: 260px; object-fit: contain; }
/* A printed stub: thermal-paper stock, dot-matrix caps, tear-off end. */
.sh-ticket { display: grid; grid-template-columns: minmax(0, 1fr) 46px; color: #2a2419; font-family: 'IBM Plex Mono', monospace;
  background: linear-gradient(180deg, #f4ecd6 0%, #ece1c6 100%); border-radius: 6px; overflow: hidden; transform: rotate(-1.2deg);
  box-shadow: 0 10px 30px rgba(0,0,0,.45), inset 0 0 0 1px rgba(80,60,30,.15); position: relative; }
.sh-ticket::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background: repeating-linear-gradient(0deg, rgba(120,90,50,.06) 0 1px, transparent 1px 3px); }
.sh-tk-main { padding: 10px 12px 10px 14px; min-width: 0; }
.sh-tk-top { display: flex; justify-content: space-between; gap: 8px; font-size: 0.52rem; letter-spacing: .18em; color: #6a5a3a; border-bottom: 1px dashed rgba(80,60,30,.35); padding-bottom: 5px; margin-bottom: 8px; }
.sh-tk-artist { font-family: 'Anton', 'IBM Plex Mono', sans-serif; font-size: 1.25rem; letter-spacing: .04em; line-height: 1.05; color: #1c1710; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-tk-tour { font-size: 0.6rem; letter-spacing: .14em; margin: 3px 0 8px; color: #4b3f2a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-tk-venue { font-size: 0.72rem; font-weight: 600; letter-spacing: .06em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-tk-city { font-size: 0.62rem; letter-spacing: .1em; color: #4b3f2a; margin-bottom: 8px; }
.sh-tk-row { display: flex; gap: 12px; font-size: 0.7rem; font-weight: 600; border-top: 1px dashed rgba(80,60,30,.35); padding-top: 6px; }
.sh-tk-row small { display: block; font-size: 0.48rem; letter-spacing: .16em; color: #6a5a3a; font-weight: 400; }
.sh-tk-date { margin-left: auto; text-align: right; white-space: nowrap; }
.sh-tk-barcode { height: 22px; margin-top: 9px; background: repeating-linear-gradient(90deg, #1c1710 0 2px, transparent 2px 4px, #1c1710 4px 5px, transparent 5px 8px, #1c1710 8px 11px, transparent 11px 13px); opacity: .85; }
.sh-tk-stub { border-left: 2px dashed rgba(80,60,30,.5); background: #ebdfc2; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 8px 0; }
.sh-tk-stub span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 0.5rem; letter-spacing: .16em; color: #4b3f2a; white-space: nowrap; max-height: 80px; overflow: hidden; }
.sh-tk-stub span:first-child { font-weight: 700; color: #1c1710; }
@media (max-width: 700px) { .sh-night { grid-template-columns: 1fr; } .sh-ticket, .sh-ticket-photo { max-width: 320px; } }

/* ---------------------------------------------------------------- concert page */
.show-page { max-width: 960px; }
.sp-back { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-size: 0.8rem; margin-bottom: 10px; }
.sp-back:hover { color: var(--text); }
.sp-head { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.sp-h1 { font-family: 'Anton', sans-serif; font-size: 2.2rem; letter-spacing: .02em; line-height: 1; margin: 0 0 4px; }
.sp-h1 .sh-artist:hover { color: var(--accent); }
.sp-bill { font-size: 0.95rem; color: var(--dim); margin-bottom: 4px; }
.sp-where { font-family: 'IBM Plex Mono', monospace; font-size: 0.8rem; color: var(--accent); }
.sp-notes-line { margin-top: 4px; font-size: 0.82rem; }
.sp-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-acts .mini-btn { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.sp-top { display: grid; grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); gap: 24px; align-items: start; margin-bottom: 20px; }
.sp-ticket { position: sticky; top: calc(var(--topbar-h, 60px) + 16px); }
.sp-ticket .sh-ticket, .sp-ticket .sh-ticket-photo { transform: rotate(-1.5deg); }
.sp-ticket-open { cursor: zoom-in; transition: transform .15s ease; }
.sp-ticket-open:hover { transform: rotate(0) scale(1.02) !important; }
.sp-poster { width: 100%; border-radius: 12px; display: block; border: 1px solid var(--line); }
.sp-block { margin-bottom: 18px; }
.sp-notes p { font-size: 0.92rem; line-height: 1.6; margin: 0 0 10px; }
.sp-setlist { margin: 6px 0 4px; padding-left: 0; columns: 2; column-gap: 26px; font-size: 0.88rem; line-height: 1.6; list-style-position: inside; }
.sp-setlist li { break-inside: avoid; }
.sp-videos { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.sp-mline { margin-top: 6px; }
.sp-ticket-modal { width: min(720px, 94vw); background: #0a0a0c; }
.sp-ticket-modal .sh-ticket.big, .sp-ticket-modal .sh-ticket-photo.big { transform: none; margin: 8px auto 14px; max-width: 640px; }
.sp-ticket-modal .sh-ticket.big { font-size: 1.15rem; grid-template-columns: minmax(0, 1fr) 64px; }
.sp-ticket-modal .sh-ticket.big .sh-tk-artist { font-size: 2rem; }
.sp-ticket-modal .sh-ticket.big .sh-tk-main { padding: 16px 18px 16px 20px; }
.sp-ticket-modal .sh-ticket.big .sh-tk-barcode { height: 34px; }
.sp-ticket-modal .sh-ticket-photo.big img { max-height: 70vh; }
@media (max-width: 700px) { .sp-top { grid-template-columns: 1fr; } .sp-ticket { position: static; max-width: 340px; } .sp-setlist { columns: 1; } .sp-h1 { font-size: 1.7rem; } }

/* ---------------------------------------------------------------- video modal */
#videoBackdrop { position: fixed; inset: 0; z-index: 94; background: rgba(4,4,6,.82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#videoBackdrop .dlg-x { position: fixed; top: 14px; right: 14px; z-index: 97; background: rgba(255,255,255,.08) !important; color: #fff !important; }
.video-caption { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(50% - min(28vw, 270px) - 44px);
  max-width: min(960px, 94vw); padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.55); color: #f2f1f4;
  font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
#ytHolder.video-open.video-modal { position: fixed; inset: 0; margin: auto; right: auto; bottom: auto; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(960px, 94vw); height: auto; aspect-ratio: 16 / 9; max-height: 80vh; z-index: 96; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.7); }
html.video-modal-open body { overflow: hidden; }

/* ---------------------------------------------------------------- crop tool */
.sh-crop-modal { width: min(720px, 96vw); }
.sh-crop { position: relative; display: inline-block; max-width: 100%; margin: 4px auto 12px; user-select: none; touch-action: none; background: #000; border-radius: 10px; overflow: hidden; }
.sh-crop img { display: block; max-width: 100%; max-height: 62vh; }
/* Dim everything outside the box with a hollow shadow. */
.sh-crop-box { position: absolute; box-shadow: 0 0 0 9999px rgba(0,0,0,.55); outline: 2px solid var(--accent); cursor: move; touch-action: none; }
.sh-crop-box::before { content: ""; position: absolute; inset: 0; background:
  linear-gradient(to right, transparent calc(33.33% - 1px), rgba(255,255,255,.25) 33.33%, transparent calc(33.33% + 1px), transparent calc(66.66% - 1px), rgba(255,255,255,.25) 66.66%, transparent calc(66.66% + 1px)),
  linear-gradient(to bottom, transparent calc(33.33% - 1px), rgba(255,255,255,.25) 33.33%, transparent calc(33.33% + 1px), transparent calc(66.66% - 1px), rgba(255,255,255,.25) 66.66%, transparent calc(66.66% + 1px));
  pointer-events: none; }
.sh-crop-box .h { position: absolute; width: 22px; height: 22px; background: var(--accent); border: 2px solid #000; border-radius: 50%; transform: translate(-50%, -50%); }
.sh-crop-box .nw { left: 0; top: 0; cursor: nwse-resize; } .sh-crop-box .n { left: 50%; top: 0; cursor: ns-resize; } .sh-crop-box .ne { left: 100%; top: 0; cursor: nesw-resize; }
.sh-crop-box .e { left: 100%; top: 50%; cursor: ew-resize; } .sh-crop-box .se { left: 100%; top: 100%; cursor: nwse-resize; } .sh-crop-box .s { left: 50%; top: 100%; cursor: ns-resize; }
.sh-crop-box .sw { left: 0; top: 100%; cursor: nesw-resize; } .sh-crop-box .w { left: 0; top: 50%; cursor: ew-resize; }
.sh-crop-row { flex-wrap: wrap; }
.sh-crop-row .ln-btn { margin-left: auto; }

/* Shows: near home */
.sh-near { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 6px; }
.sh-scope { margin: 0; gap: 6px; }
.sh-scope .chip { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; font: inherit; font-size: 0.8rem; padding: 6px 12px; }
.sh-scope .chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.sh-scope .chip.needs-zip { border-style: dashed; color: var(--dim); }
.sh-zip { flex: 0 1 150px; min-width: 120px; max-width: 170px; }
.sh-active { font-family: 'IBM Plex Mono', monospace; font-size: 0.68rem; letter-spacing: .06em; margin-left: auto; }

/* Rabbit Hole: deep-dive pages (every hop after the first) */
.rh-post.rh-deep .rh-summary { font-style: italic; }
.rh-sections { margin: 4px 0 14px; }
.rh-section { margin-bottom: 14px; }
.rh-section h3 { font-family: 'Anton', sans-serif; font-size: 1.15rem; letter-spacing: .02em; color: hsl(var(--ch) 85% 72%); margin: 0 0 4px; }
.rh-section p { font-size: 0.93rem; line-height: 1.62; margin: 0 0 8px; }
.rh-named { border-top: 1px dashed var(--line-2); padding-top: 10px; margin-bottom: 12px; }
.rh-named-h { display: flex; align-items: center; gap: 8px; font-family: 'IBM Plex Mono', monospace; font-size: 0.66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.rh-named-h .rh-play-all { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 0.74rem; }
.rh-named-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 12px; counter-reset: named; }
.rh-named-list li { counter-increment: named; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.rh-named-list li::before { content: counter(named, decimal-leading-zero); font-family: 'IBM Plex Mono', monospace; font-size: 0.66rem; color: var(--dim); flex-shrink: 0; }
.rh-named-list .rh-track { flex: 1; min-width: 0; text-align: left; white-space: normal; }
.rh-named-list .rh-note { display: block; font-style: normal; font-size: 0.7rem; color: var(--dim); margin-top: 1px; }
.rh-named-list .rh-track { border-radius: 10px; flex-wrap: wrap; row-gap: 0; }
.rh-wiki { background: var(--panel-2); border-left: 3px solid hsl(var(--ch) 70% 60%); border-radius: 0 10px 10px 0; padding: 10px 14px; margin: 0 0 14px; }
.rh-wiki p { font-size: 0.86rem; line-height: 1.55; margin: 0 0 6px; color: var(--text); }
.rh-wiki a { font-size: 0.78rem; color: var(--accent); text-decoration: none; }
.rh-wiki a:hover { text-decoration: underline; }
.rh-sources-h { flex-basis: 100%; font-family: 'IBM Plex Mono', monospace; font-size: 0.62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.rh-siblings { border-top: 1px dashed var(--line-2); padding-top: 10px; margin-bottom: 12px; }
.rh-sib-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rh-sib { padding: 7px 12px; font-size: 0.8rem; display: inline-flex; flex-direction: column; gap: 1px; max-width: 260px; }
.rh-sib em { font-style: normal; font-size: 0.68rem; color: var(--dim); }

/* Rabbit Hole: hover a song → shelve it (single) or its album */
.rh-tw { position: relative; display: inline-flex; align-items: center; max-width: 100%; }
.rh-named-list .rh-tw { flex: 1; min-width: 0; }
.rh-shelve { position: absolute; right: 6px; top: 50%; transform: translateY(-50%) translateX(6px); display: flex; gap: 4px; opacity: 0; pointer-events: none; transition: opacity .12s, transform .12s; }
.rh-tw:hover .rh-shelve, .rh-tw:focus-within .rh-shelve { opacity: 1; pointer-events: auto; transform: translateY(-50%); }
.rh-shelve .mini-btn { display: inline-flex; align-items: center; gap: 1px; padding: 3px 7px; font-size: 0.72rem; font-weight: 700; border-radius: 999px; background: var(--panel); box-shadow: 0 4px 14px rgba(0,0,0,.45); }
.rh-shelve .mini-btn .ms { font-size: 0.9rem; }
.rh-shelve .mini-btn:hover { border-color: var(--accent); color: var(--accent); }
.rh-shelve .mini-btn.done { border-color: var(--accent); color: var(--accent-ink); background: var(--accent); }
.rh-shelve .mini-btn.spin .ms { animation: vbspin 0.9s linear infinite; }
.rh-tw:hover .rh-track, .rh-tw:focus-within .rh-track { padding-right: 96px; }
@media (hover: none) { .rh-shelve { position: static; transform: none; opacity: 1; pointer-events: auto; margin-left: 4px; } .rh-tw:hover .rh-track { padding-right: 13px; } }

/* ---------------------------------------------------------------- jobs tray */
.jobs-wrap { position: relative; }
.pill-jobs { gap: 4px; }
.pill-jobs .jobs-ico { font-size: 1.15rem; }
.pill-jobs.busy .jobs-ico { animation: vbspin 0.9s linear infinite; color: var(--accent); }
.pill-jobs.ready { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.pill-jobs.ready .jobs-ico { animation: jobsRing 1.6s ease-in-out 2; }
.pill-jobs.failed { background: #e06060; border-color: #e06060; color: #fff; }
@keyframes jobsRing { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-16deg); } 40% { transform: rotate(14deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(6deg); } }
.jobs-panel { position: fixed; right: 12px; top: calc(var(--topbar-h, 60px) + 6px); width: min(340px, calc(100vw - 24px)); z-index: 120;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; padding: 8px; box-shadow: 0 18px 44px rgba(0,0,0,.55); }
.jobs-h { display: flex; align-items: center; gap: 8px; font-family: 'IBM Plex Mono', monospace; font-size: 0.62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); padding: 6px 8px 4px; }
.jobs-clear { margin-left: auto; background: none; border: none; color: var(--dim); font: inherit; font-size: 0.68rem; cursor: pointer; text-transform: none; letter-spacing: 0; }
.jobs-clear:hover { color: var(--text); }
.jobs-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: 0.84rem; }
a.jobs-row:hover { background: var(--panel-2); }
.jobs-row > .ms { flex-shrink: 0; font-size: 1.15rem; color: var(--dim); }
.jobs-row.done > .ms { color: var(--accent); }
.jobs-row.failed > .ms { color: #e06060; }
.jobs-row .spin { animation: vbspin 0.9s linear infinite; }
.jobs-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.jobs-t b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jobs-t small { font-size: 0.7rem; color: var(--dim); }
.jobs-go { color: var(--dim); }
a.jobs-row:hover .jobs-go { color: var(--accent); }
/* landing on an item from the tray */
.st-track.flash, .vb-take.flash { animation: jobsFlash 1.8s ease-out 1; }
@keyframes jobsFlash { 0% { box-shadow: 0 0 0 0 rgba(255,212,40,.7); border-color: var(--accent); } 100% { box-shadow: 0 0 0 16px rgba(255,212,40,0); } }
@media (max-width: 760px) { .topbar .jobs-wrap { display: block; } }
@media (max-width: 760px) { .topbar .jobs-wrap { order: -1; } .topbar #menuBtn { order: 0; } }
/* The jobs tray survives every topbar squeeze — it's the one pill that must stay. */
.topbar-actions .jobs-wrap .pill-jobs { display: inline-flex !important; align-items: center; }
.topbar-actions .jobs-wrap { display: block; flex-shrink: 0; }
.topbar-actions .jobs-wrap[hidden] { display: none !important; }

/* ---------------------------------------------------------------- artists list */
.artist-list { list-style: none; margin: 0; padding: 0; column-width: 250px; column-gap: 28px; }
.artist-row { break-inside: avoid; }
.artist-row a { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: "l n go" "l m go"; column-gap: 8px; align-items: center;
  padding: 6px 4px 6px 0; border-radius: 8px; color: var(--text); text-decoration: none; }
.artist-row a:hover { background: var(--panel-2); }
.artist-row a:hover .artist-name { color: var(--accent); }
.artist-letter { grid-area: l; font-family: 'Anton', sans-serif; font-size: 1.05rem; color: var(--accent); line-height: 1; }
.artist-row.first-of-letter { margin-top: 10px; }
.artist-row.first-of-letter:first-child { margin-top: 0; }
.artist-name { grid-area: n; font-weight: 600; font-size: 0.92rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.artist-meta { grid-area: m; font-family: 'IBM Plex Mono', monospace; font-size: 0.64rem; letter-spacing: .04em; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.artist-go { grid-area: go; display: none; color: var(--dim); }
.artist-none { padding: 30px 0; text-align: center; }
@media (max-width: 760px) {
  .artist-list { column-width: auto; columns: 1; }
  .artist-row a { padding: 11px 6px 11px 0; border-bottom: 1px solid var(--line); border-radius: 0; }
  .artist-row:last-child a { border-bottom: none; }
  .artist-row.first-of-letter { margin-top: 0; }
  .artist-row.first-of-letter a { border-top: 1px solid var(--line-2); }
  .artist-go { display: inline-block; }
  .artist-name { font-size: 1rem; }
}

/* Past dives: the artist / record leads, the path and the lens follow */
.rh-hole-main .rh-hole-head { display: block; font-family: 'Anton', sans-serif; font-weight: 400; font-size: 1.05rem; letter-spacing: .02em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rh-hole-trail i { font-style: normal; color: var(--line-2); margin: 0 2px; }
.rh-hole-lens { font-family: 'IBM Plex Mono', monospace; font-size: 0.64rem; letter-spacing: .1em; text-transform: uppercase; color: hsl(var(--ch) 80% 72%); }
.rh-hole-trail { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.rh-hole-path { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rh-hole-lens { flex-shrink: 0; }
.vb-defaults { margin-left: 8px; font-size: 0.7rem; padding: 3px 9px; display: inline-flex; align-items: center; gap: 3px; vertical-align: middle; text-transform: none; letter-spacing: 0; }
.vb-defaults .ms { font-size: 0.9rem; }
.vb-defaults.on { border-color: var(--accent); color: var(--accent); }
.vb-show .vb-voice-row input { flex: 1 1 180px; min-width: 0; background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 0.9rem; }
.vb-show .vb-voice-row input:focus { outline: none; border-color: var(--accent); }
.vb-show .vb-voice-row select { flex: 1 1 200px; min-width: 0; }
