  :root {
    --glow: 40, 60, 90;
    --bg: #040506; --shell: #0b0d0f; --shell-2: #111417; --line: rgba(120, 230, 215, .14); --line-2: rgba(255, 255, 255, .06);
    --ink: #e8efec; --dim: #8a9894; --faint: #56625f;
    --teal: #4fd6c4; --teal-d: #1f7f75; --amber: #ffb040; --amber-d: #b86a10;
    --r: 18px; --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --round: ui-rounded, "SF Pro Rounded", Nunito, "Varela Round", "Arial Rounded MT Bold", system-ui, sans-serif;
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; height: 100%; overflow: hidden; color: var(--ink); font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; }
  body { background: radial-gradient(70% 60% at 58% 46%, rgba(var(--glow), .22), rgba(var(--glow), .04) 55%, transparent 80%), var(--bg); transition: background 2s; }
  button { font: inherit; color: inherit; }
  .lbl { font: 700 10px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }

  /* ================= the set ================= */
  #tv { position: fixed; inset: max(12px, 2.2vmin); display: grid; grid-template-columns: clamp(220px, 19vw, 290px) 1fr; grid-template-rows: auto 1fr auto;
    gap: clamp(10px, 1.3vw, 18px); padding: clamp(12px, 1.5vw, 22px); border-radius: clamp(20px, 2.4vw, 34px);
    background: linear-gradient(160deg, #15191c, var(--shell) 40%, #070809);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .07), inset 0 -2px 6px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .04); }
  #tv::before { content: ""; position: absolute; left: 34px; right: 34px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--teal), transparent); opacity: .35; }
  #rail { grid-row: 1; } #panel { grid-column: 1; } #bezel { grid-row: 2; grid-column: 2; } #dock { grid-row: 3; grid-column: 2; }
  #rail { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; padding: 0 4px; }
  .logo { display: inline-flex; align-items: center; gap: .38em; text-decoration: none; color: #f6ecd8; font: 800 clamp(22px, 2vw, 30px)/1 var(--round); letter-spacing: -.015em; }
  .logo b { color: var(--amber); font-weight: 800; }
  .logo svg { width: 1.2em; height: 1.2em; flex: none; }
  .pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .035); box-shadow: inset 0 0 0 1px var(--line-2); font: 600 12px/1 system-ui, sans-serif; color: var(--ink); white-space: nowrap; }
  .pill[hidden] { display: none; }
  button.pill { border: 0; cursor: pointer; } button.pill:hover { box-shadow: inset 0 0 0 1px var(--teal); }             /* the viewer count is a button: click for who's watching */
  .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); animation: breathe 2.6s ease-in-out infinite; }
  @keyframes breathe { 50% { opacity: .45; } }
  .demo { font: 700 9px/1 var(--mono); letter-spacing: .12em; color: var(--faint); border: 1px solid var(--line-2); border-radius: 4px; padding: 2px 4px; }

  /* ================= message strip (optional) and links ================= */
  #msg { position: fixed; left: 0; right: 0; top: 0; height: 28px; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 0 max(12px, 2.2vmin) 0 calc(max(12px, 2.2vmin) + 20px); font-size: 12px; color: var(--dim); }
  #msg[hidden] { display: none; }
  body.hasmsg #tv { top: 30px; }
  #msgTag { flex: none; font: 700 9.5px/1 var(--mono); letter-spacing: .18em; color: var(--teal); border: 1px solid var(--line); padding: 3px 6px; border-radius: 4px; }
  #msgRun { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
  #msgRun span { display: inline-block; padding-left: 100%; animation: run var(--dur, 38s) linear infinite; color: var(--dim); }
  #msgRun:hover span { animation-play-state: paused; }
  #msgRun.still span { padding-left: 0; animation: none; }
  @keyframes run { to { transform: translateX(-100%); } }
  #msgCta { flex: none; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 12px; white-space: nowrap; opacity: .8; }
  #msgCta:hover { text-decoration: underline; }
  #msgX { flex: none; width: 22px; height: 22px; font-size: 11px; border: 0; border-radius: 50%; background: none; color: var(--dim); cursor: pointer; }
  #msgX:hover { background: rgba(255, 255, 255, .08); color: var(--ink); }
  .railR { display: flex; align-items: center; gap: 8px; }
  #rail { flex-wrap: wrap; row-gap: 8px; } #rail > .railR { margin-left: auto; }        /* with 3–4 links the right-hand group drops to its own row when it does not fit beside the logo */
  @media (max-width: 460px) { #rail, .railR { gap: 6px; } .railsep { display: none; } #links { gap: 6px; } }                                                                                  /* phones: tighter gaps */
  @media (max-width: 380px) { #watchPill .wtxt { display: none; } }                                               /* very narrow: just the dot and the count */
  .tp { display: inline-flex; align-items: center; gap: 7px; padding: 5px 6px 5px 11px; border-radius: 999px; background: rgba(79, 214, 196, .08); box-shadow: inset 0 0 0 1px var(--line); font: 700 12px/1 var(--mono); color: var(--ink); white-space: nowrap; }
  .tp.break { background: rgba(255, 176, 64, .1); box-shadow: inset 0 0 0 1px rgba(255, 176, 64, .3); }
  .tp svg { width: 14px; height: 14px; color: var(--teal); }
  .tp.break svg { color: var(--amber); }
  .tp.ending { animation: tpPulse 1s ease-in-out infinite; } .tp.ending svg { animation: tpRing 1s ease-in-out infinite; transform-origin: 50% 20%; }
  @keyframes tpPulse { 50% { box-shadow: inset 0 0 0 1px var(--teal), 0 0 0 5px rgba(79, 214, 196, .18); } }
  .tp.break.ending { animation-name: tpPulseA; } @keyframes tpPulseA { 50% { box-shadow: inset 0 0 0 1px var(--amber), 0 0 0 5px rgba(255, 176, 64, .2); } }
  @keyframes tpRing { 0%, 60%, 100% { transform: rotate(0); } 10% { transform: rotate(14deg); } 25% { transform: rotate(-12deg); } 40% { transform: rotate(6deg); } }
  @media (prefers-reduced-motion: reduce) { .tp.ending, .tp.ending svg { animation: none; } }
  .tp button { width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .06); color: var(--dim); cursor: pointer; font-size: 10px; line-height: 1; padding: 0; }
  .tp button:hover { background: rgba(255, 255, 255, .14); color: var(--ink); }
  .tnote { color: var(--teal) !important; font-family: var(--mono) !important; }
  .railsep { width: 1px; height: 20px; background: var(--line-2); margin: 0 2px; }

  /* ================= left panel ================= */
  #panel { grid-row: 2 / span 2; display: flex; flex-direction: column; gap: clamp(8px, 1.1vh, 14px); min-height: 0; overflow: hidden auto; scrollbar-width: none; }
  #sceneCard { position: relative; } #sceneCard > #shotMob { position: absolute; top: 10px; right: 10px; }   /* phone drawer: the camera sits in the card's corner */
  .card { background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .015)); border-radius: 14px; padding: 14px; box-shadow: inset 0 0 0 1px var(--line-2), inset 0 1px 0 rgba(255, 255, 255, .04); }
  #sceneCard h1 { margin: 8px 0 2px; font: 800 clamp(20px, 1.7vw, 26px)/1.1 var(--round); letter-spacing: -.01em; }
  #sceneCard .sub { color: var(--dim); font-size: 13px; }
  .facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
  .fact { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 8px; background: rgba(0, 0, 0, .35); box-shadow: inset 0 0 0 1px var(--line-2); font: 600 12px/1 var(--mono); color: var(--ink); }
  .fact svg { width: 14px; height: 14px; }
  .fact.here { color: var(--teal); }

  /* the time dial: drag it, scroll it, or click a label and it swings there */
  #dialCard { display: flex; flex-direction: column; align-items: center; gap: 0; }
  #dialCard .dial { margin: -6px 0 -8px; }
  .dial { position: relative; width: min(100%, 220px); aspect-ratio: 1.55; margin-top: 4px !important; --R: 64px; }
  .knob { position: absolute; left: 50%; top: 60%; width: 34%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%) rotate(var(--a, -120deg)); transition: transform .55s cubic-bezier(.3, 1.35, .5, 1);
    background: radial-gradient(circle at 50% 40%, #2a3033, #121517 62%, #0b0d0e); box-shadow: 0 8px 18px rgba(0, 0, 0, .7), inset 0 1px 1px rgba(255, 255, 255, .12), inset 0 -3px 6px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .05);
    cursor: grab; touch-action: none; outline: none; }
  .knob.drag { transition: none; cursor: grabbing; }
  .knob::before { content: ""; position: absolute; inset: 12%; border-radius: 50%; background: repeating-conic-gradient(rgba(255, 255, 255, .05) 0 4deg, transparent 4deg 8deg); }
  .knob i { position: absolute; left: 50%; top: 7%; width: 5px; height: 22%; margin-left: -2.5px; border-radius: 3px; background: var(--amber); box-shadow: 0 0 8px var(--amber); }
  .knob:focus-visible { box-shadow: 0 0 0 3px var(--teal), 0 8px 18px rgba(0, 0, 0, .7); }
  .tick { position: absolute; left: 50%; top: 58%; width: 2px; height: 7px; margin-left: -1px; background: var(--faint); transform-origin: 50% 0; }
  .dl { position: absolute; left: 50%; top: 60%; transform: translate(-50%, -50%) rotate(var(--la)) translateY(calc(var(--R) * -1)) rotate(calc(var(--la) * -1));
    border: 0; background: none; padding: 5px 6px; border-radius: 6px; cursor: pointer; font: 700 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
  .dl:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
  .dl.on { color: var(--amber); text-shadow: 0 0 10px rgba(255, 176, 64, .5); }
  #dialNote { display: none; }

  /* your channels: four favourites, one tap away */
  .chead { display: flex; align-items: center; justify-content: space-between; }
  .linkb { border: 0; background: none; cursor: pointer; padding: 2px 0; font: 600 12px/1 system-ui, sans-serif; color: var(--teal); }
  .linkb:hover { text-decoration: underline; }
  #favs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
  .fav { position: relative; border: 0; padding: 0; cursor: pointer; border-radius: 9px; overflow: hidden; aspect-ratio: 16 / 10; background: #15191b; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06); transition: box-shadow .15s, transform .15s; }
  .fav canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
  .fav::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .75)); }
  .fav:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
  .fav.on { box-shadow: 0 0 0 2px var(--teal), 0 0 14px rgba(79, 214, 196, .25); }
  .fav .fn { position: absolute; left: 7px; right: 7px; bottom: 6px; z-index: 1; text-align: left; font: 700 11.5px/1.15 var(--round); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fav .fc { position: absolute; top: 5px; right: 5px; z-index: 1; padding: 3px 6px; border-radius: 999px; background: rgba(4, 6, 7, .72); font: 700 10px/1 var(--mono); color: var(--ink); }
  .fav .fk { position: absolute; top: 5px; left: 5px; z-index: 1; width: 16px; height: 16px; border-radius: 4px; display: grid; place-items: center; background: rgba(4, 6, 7, .6); font: 700 9px/1 var(--mono); color: var(--dim); }
  .fav.soon canvas { filter: saturate(.6) brightness(.75); }
  .fav.soon .fc { color: var(--dim); }
  .fav.add { display: grid; place-items: center; background: transparent; box-shadow: inset 0 0 0 1px dashed; border: 1px dashed rgba(255, 255, 255, .16); color: var(--dim); font: 600 12px/1 system-ui, sans-serif; }
  .fav.add::after { display: none; }
  .fav.add:hover { color: var(--teal); border-color: var(--teal); }
  @media (max-height: 880px) {
    .card { padding: 11px 12px; } #panel { gap: 8px; }
    #sceneCard h1 { font-size: 20px; margin: 5px 0 1px; } .facts { margin-top: 8px; }
    .dial { width: min(100%, 196px); } .fav { aspect-ratio: 16 / 9; } #favs { margin-top: 8px; gap: 6px; }
    #npTitle { margin-top: 5px; } #np .row { margin-top: 7px; } .chips { margin-top: 8px; } .ib.big { width: 40px; height: 40px; }
  }
  @media (max-height: 760px) { #sceneCard .sub { display: none; } }
  .star { position: absolute; top: 8px; right: 8px; z-index: 2; width: 30px; height: 30px; border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center; background: rgba(4, 6, 7, .72); color: var(--dim); font-size: 15px; line-height: 1; }
  .star:hover { color: var(--ink); }
  .star[aria-pressed="true"] { color: var(--amber); }

  /* now playing */
  #np .row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
  #npTitle { font: 700 16px/1.2 var(--round); margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #npMeta { font: 600 11px/1 var(--mono); color: var(--dim); margin-top: 4px; letter-spacing: .06em; }
  .ib { width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; flex: none;
    background: linear-gradient(180deg, #20262a, #121517); box-shadow: 0 3px 8px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 1px rgba(255, 255, 255, .05); }
  .ib:hover { box-shadow: 0 3px 8px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 0 1px var(--teal); }
  .ib.big { width: 46px; height: 46px; background: linear-gradient(180deg, var(--teal), var(--teal-d)); color: #042220; }
  .ib svg { width: 18px; height: 18px; }
  .vu { width: 74px; display: grid; grid-template-columns: repeat(14, 1fr); gap: 2px; height: 9px; }
  .vu i { display: block; height: 100%; border-radius: 2px; background: rgba(255, 255, 255, .06); }
  .vu i.on { background: var(--teal); box-shadow: 0 0 6px rgba(79, 214, 196, .5); }
  .vu i.on.hot { background: var(--amber); box-shadow: 0 0 6px rgba(255, 176, 64, .5); }
  .chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
  #vibes { gap: 4px; } #vibes .chip { padding: 6px 7px; font-size: 11.5px; }
  .chip { border: 0; cursor: pointer; padding: 6px 9px; border-radius: 8px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--line-2); font: 600 12px/1 system-ui, sans-serif; color: var(--dim); }
  .chip:hover { color: var(--ink); }
  .chip[aria-pressed="true"] { color: #042220; background: var(--teal); box-shadow: none; }
  .fader { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
  input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; }
  input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--teal) var(--p, 60%), rgba(255, 255, 255, .1) var(--p, 60%)); }
  input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .1); }
  input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--teal); }
  input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: #e8efec; box-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
  input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #e8efec; box-shadow: 0 2px 6px rgba(0, 0, 0, .6); }

  /* ================= screen ================= */
  #bezel { position: relative; min-width: 0; min-height: 0; padding: clamp(6px, .8vw, 12px); border-radius: calc(var(--r) + 8px); background: #000;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05), 0 0 0 1px rgba(0, 0, 0, .8), 0 0 40px rgba(var(--glow), .12); }
  #screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: var(--r); background: #0a0b0c; isolation: isolate; }
  #host { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; z-index: 0; }
  #fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
  #tap { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 3; border: 0; cursor: pointer; padding: 9px 16px; border-radius: 999px;
    background: rgba(6, 8, 9, .72);  box-shadow: inset 0 0 0 1px var(--line); font: 600 13px/1 system-ui, sans-serif; transition: opacity .6s; }
  #tap.gone { opacity: 0; pointer-events: none; }
  #toast { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); z-index: 3; padding: 8px 14px; border-radius: 999px; background: rgba(6, 8, 9, .72);
     box-shadow: inset 0 0 0 1px var(--line); font: 600 13px/1 system-ui, sans-serif; opacity: 0; transition: opacity .5s; pointer-events: none; white-space: nowrap; }
  #toast.show { opacity: 1; }
  #screen > .shot { position: absolute; top: 12px; right: 12px; z-index: 4; opacity: 0; transform: translateY(-3px); transition: opacity .18s, transform .18s; }
  #screen:hover .shot, .shot:focus-visible { opacity: 1; transform: none; }
  @media (hover: none) { .shot { opacity: .6; transform: none; } }
  body.bare #screen > .shot { display: none; }
  #screen.flash::after { content: ""; position: absolute; inset: 0; z-index: 5; background: #fff; pointer-events: none; animation: shotflash .32s ease-out forwards; }
  @keyframes shotflash { from { opacity: .55; } to { opacity: 0; } }
  @media (prefers-reduced-motion: reduce) { #screen.flash::after { animation: none; display: none; } .shot { transition: none; } }
  body.bare:has(#fsTimers:not(:empty)) #toast { top: 70px; }

  /* ================= dock under the screen ================= */
  #dock, #ovPanel { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; padding: 8px; border-radius: 16px; background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .015)); box-shadow: inset 0 0 0 1px var(--line-2), inset 0 1px 0 rgba(255, 255, 255, .04); }
  .spacer { flex: 1; }
  .pop h4 { margin: 4px 8px 4px; font: 700 10px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
  .pop .row2 { display: flex; gap: 4px; padding: 0 4px 6px; } .pop .row2 button { padding: 7px 10px; font-size: 13px; border: 1px solid rgba(255,255,255,.08); }
  .pop .row2 .chip[aria-pressed="true"] { color: #042220; background: var(--teal); }
  /* hover labels: a small pill rises out of the icon after a short dwell; keyboard focus shows it too; touch screens never see it */
  .tipd { position: relative; }
  .tip { position: absolute; bottom: calc(100% + 10px); left: 50%; z-index: 40; display: flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 10px; white-space: nowrap; pointer-events: none;
    font: 600 12.5px/1 system-ui, sans-serif; color: var(--ink); background: #0b0d0e; box-shadow: 0 8px 22px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .09);
    opacity: 0; transform: translate(-50%, 6px) scale(.94); transform-origin: 50% 100%; transition: opacity .12s, transform .12s; }
  .tip::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border: 5px solid transparent; border-top-color: #0b0d0e; }
  .tip.b { bottom: auto; top: calc(100% + 10px); transform-origin: 90% 0; } .tip.b::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: #0b0d0e; }
  .tip.r { left: auto; right: -4px; transform: translate(0, 6px) scale(.94); transform-origin: 90% 100%; } .tip.r::after { left: auto; right: 16px; }
  .tip kbd { font: 700 10px/1 var(--mono); color: var(--teal); padding: 3px 5px; border-radius: 5px; background: rgba(80, 200, 190, .13); }
  @media (hover: hover) {
    .tipd:hover > .tip, .tipd:focus-visible > .tip { opacity: 1; transform: translate(-50%, 0) scale(1); transition: opacity .16s .28s, transform .22s .28s cubic-bezier(.2, .9, .3, 1.35); }
    .tipd:hover > .tip.r, .tipd:focus-visible > .tip.r { transform: translate(0, 0) scale(1); } }
  .tip.b { transform: translate(0, -6px) scale(.94); }
  @media (hover: hover) { .tipd:hover > .tip.b, .tipd:focus-visible > .tip.b { transform: translate(0, 0) scale(1); } }
  @media (hover: none) { .tip { display: none; } }
  body:has(.pop.open) .tip, body.idle .tip { display: none; }
  #fsTimers { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); z-index: 16; display: none; gap: 8px; }
  body.bare #fsTimers:not(:empty) { display: flex; }
  #fsTimers .tp { background: rgba(8, 10, 12, .9); box-shadow: 0 8px 24px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.1); }

  /* ================= pop-ups ================= */
  dialog { border: 0; padding: 0; color: var(--ink); background: #0d1012; border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .06), inset 0 1px 0 rgba(255, 255, 255, .05);
    width: min(860px, calc(100vw - 28px)); max-height: min(86vh, 820px); }
  dialog::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
  .dh { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 14px; background: linear-gradient(180deg, #0d1012 70%, rgba(13, 16, 18, 0)); }
  .dh h2 { margin: 0; font: 800 22px/1 var(--round); }
  .x { width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(255, 255, 255, .06); font-size: 16px; }
  .x:hover { background: rgba(255, 255, 255, .12); }
  .db-body { padding: 0 20px 22px; overflow: auto; }
  #chGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
  .ch { position: relative; border: 0; padding: 0; text-align: left; cursor: pointer; border-radius: 14px; overflow: hidden; background: #15191b; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06); transition: transform .15s, box-shadow .15s; }
  .ch:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--teal), 0 10px 26px rgba(0, 0, 0, .5); }
  .ch.soon { cursor: default; }
  .ch.soon:hover { transform: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06); }
  .thumb { position: relative; aspect-ratio: 16 / 9; background: #222; overflow: hidden; }
  .thumb canvas, .thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
  .ch.soon .thumb::after { content: "Coming soon"; position: absolute; inset: 0; display: grid; place-items: center; font: 700 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .75); background: rgba(0, 0, 0, .35); }
  .chb { padding: 10px 12px 12px; }
  .chb b { display: block; font: 800 15px/1.2 var(--round); }
  .chb span { font-size: 12px; color: var(--dim); }
  .badge { position: absolute; top: 8px; left: 8px; z-index: 1; display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; background: rgba(4, 6, 7, .72); font: 700 11px/1 var(--mono); color: var(--ink); }
  .badge.on { background: var(--teal); color: #042220; }
  /* the mix: label + slider rows, in the mixer popover and the phone drawer */
  .mix { display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 2px 10px; font-size: 13px; color: var(--dim); }
  .card .mix { margin-top: 10px; } .mixnote { margin: 2px 2px 0; font-size: 11.5px; color: var(--faint); line-height: 1.4; } #mixPop .mixnote { margin-bottom: 4px; }
  #whoPop { width: min(300px, calc(100vw - 16px)); gap: 2px; padding: 12px; } #whoPop h4 { margin: 2px 2px 4px; } #whoPop h4:not(:first-child) { margin-top: 10px; }
  .whorow { display: grid; grid-template-columns: 21px 1fr auto; align-items: center; gap: 10px; padding: 4px 2px; font-size: 13px; }
  .whorow .cc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .whorow .n { font: 700 12px/1 var(--mono); color: var(--dim); }
  .whorow.others .cc { color: var(--dim); } .whorow.tot { font-weight: 700; } .whorow.tot .n { color: var(--teal); } .whorow.chan .cc { color: var(--dim); font-size: 12.5px; }
  .flag { display: block; width: 21px; height: 14px; } .flag.none { visibility: hidden; }
  .switchrow, #mixPop .switchrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; border: 0; background: none; cursor: pointer; padding: 6px 2px; color: var(--ink); font: 600 13px/1.2 system-ui, sans-serif; text-align: left; }
  #mixPop .switchrow:hover { background: none; }
  .switchrow .sw { position: relative; flex: none; width: 34px; height: 20px; border-radius: 10px; background: rgba(255, 255, 255, .14); transition: background .15s; } .switchrow .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #cfd8d5; transition: transform .15s; }
  .switchrow[aria-checked="true"] .sw { background: var(--teal); } .switchrow[aria-checked="true"] .sw::after { transform: translateX(14px); background: #fff; }
  #mixPop { width: 272px; gap: 6px; padding: 12px; }
  #mixPop h4 { margin: 2px 2px 2px; } #mixPop .mix { padding: 0 2px 6px; }
  #mixPop .chips { margin: 0 0 4px; padding: 0 2px; }
  #mixPop .chip { display: inline-block; padding: 6px 9px; font-size: 12px; text-align: center; }
  #mixPop .chip:hover { background: rgba(255, 255, 255, .08); }
  #mixPop .chip[aria-pressed="true"] { color: #042220; background: var(--teal); }
  #mixPop .keylink { margin-top: 4px; padding: 9px 10px; border-top: 1px solid var(--line-2); border-radius: 0 0 9px 9px; justify-content: space-between; font-size: 13px; color: var(--dim); }
  #mixPop .keylink:hover { color: var(--ink); }
  .keylist { display: grid; grid-template-columns: max-content 1fr; gap: 9px 18px; margin: 0; font-size: 14px; } .keylist dt { text-align: right; white-space: nowrap; } .keylist dd { margin: 0; color: var(--dim); }
  .keylist kbd { font-size: 12px; padding: 1px 6px; }
  #helpDlg { width: min(640px, calc(100vw - 28px)); max-height: min(86vh, 700px); display: none; flex-direction: column; } #helpDlg[open] { display: flex; }
  #helpDlg .dh { flex: none; }
  .tabs { flex: none; display: flex; gap: 4px; padding: 0 20px 12px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line-2); } .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: none; border: 0; cursor: pointer; padding: 8px 12px; border-radius: 9px; background: none; font: 600 13px/1 system-ui, sans-serif; color: var(--dim); }
  .tabs button:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
  .tabs button[aria-selected="true"] { color: #042220; background: var(--teal); }
  .help { flex: 0 1 auto; min-height: 0; padding-top: 16px; font-size: 14.5px; line-height: 1.6; color: var(--dim); }
  .help p { margin: 0 0 12px; } .help p:last-child { margin-bottom: 0; } .help b { color: var(--ink); } .help a { color: var(--teal); } .help a.cta { color: #2a1604; }   /* amber button: dark ink, never the link colour */
  .help [role=tabpanel]:not([hidden]) { display: flow-root; }
  .help h3 { margin: 16px 0 4px; font: 800 14px/1.2 var(--round); color: var(--ink); } .help h3:first-child { margin-top: 0; }
  .help ul { margin: 0; padding: 0 0 0 18px; } .help li { margin: 0 0 9px; }
  .help .ba { float: right; width: 96px; margin: 2px 0 8px 18px; } .help .ba img { display: block; width: 100%; height: auto; }
  .help .more { margin: 14px 0 0; }
  .help details { border-bottom: 1px solid var(--line-2); } .help summary { cursor: pointer; padding: 11px 0; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
  .help summary::-webkit-details-marker { display: none; } .help summary::after { content: "+"; color: var(--faint); } .help details[open] summary::after { content: "–"; } .help details p { margin: 0 0 12px; }
  .help [role=tabpanel]:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; border-radius: 6px; }
  @media (max-width: 560px) { .tabs { padding: 0 14px 10px; } .help { padding: 14px 14px 20px; } .keylist { gap: 9px 12px; } .help .ba { width: 78px; } }
  #keysDlg { width: min(400px, calc(100vw - 28px)); }
  .note { font-size: 12px; color: var(--faint); margin: 10px 0 0; }
  kbd { font: 11px var(--mono); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; color: var(--ink); }
  #sponsor { width: min(420px, calc(100vw - 28px)); padding: 24px; }
  #sponsor h2 { margin: 10px 0 8px; font: 800 22px/1.15 var(--round); }
  #sponsor p { margin: 0 0 14px; color: var(--dim); }
  #sponsor .sponsored { display: inline-block; margin-right: 8px; padding: 3px 7px; border-radius: 999px; background: rgba(255, 200, 104, .14); color: var(--amber); letter-spacing: .14em; }
  .cta { display: inline-block; background: linear-gradient(180deg, #ffc868, var(--amber)); color: #2a1604; text-decoration: none; padding: 10px 16px; border-radius: 10px; font-weight: 800; }
  .pop { position: fixed; z-index: 30; display: none; flex-direction: column; gap: 4px; padding: 8px; border-radius: 14px; background: #0f1214; box-shadow: 0 16px 40px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .07); }
  .pop.open { display: flex; }
  .pop button { display: flex; align-items: center; gap: 10px; border: 0; background: none; cursor: pointer; padding: 9px 12px; border-radius: 9px; text-align: left; font-size: 14px; }
  .pop button:hover { background: rgba(255, 255, 255, .06); }
  .pop button[aria-pressed="true"] { color: var(--teal); }
  .pop button small { margin-left: auto; color: var(--faint); font: 11px var(--mono); }

  /* ================= full screen: the picture, and a quiet overlay when you move ================= */
  .ov { position: fixed; left: 0; right: 0; z-index: 15; display: none; align-items: center; gap: 10px; padding: 18px 24px; transition: opacity .5s; }
  #ovTop { top: 0; justify-content: space-between; padding-bottom: 46px; background: linear-gradient(180deg, rgba(3, 4, 5, .72), transparent); }
  #ovBot { bottom: 0; justify-content: center; padding-bottom: 22px; padding-top: 56px; background: linear-gradient(0deg, rgba(3, 4, 5, .8), transparent); }
  #ovPanel { flex-wrap: wrap; justify-content: center; background: rgba(8, 10, 12, .55); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }   /* the dock's container, translucent */
  #ovRight { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
  .ov .pill { background: var(--btn-bg); -webkit-backdrop-filter: var(--btn-blur); backdrop-filter: var(--btn-blur); }   /* the status pill, translucent like the buttons */
  #ovRight b { font-weight: 700; } #ovInfo { color: var(--dim); } #ovRight .ovdiv { width: 1px; height: 14px; background: rgba(255, 255, 255, .12); }
  #ovRight .tp { padding: 4px 5px 4px 9px; } #ovTimers:empty { display: none; }
  #ovScene { min-width: 11em; text-align: center; font: 800 15px/1 var(--round); }
  #ovVol { width: 110px; } #ovChevR { transform: scaleX(-1); }
  body.bare #tv, body.hideui #tv { inset: 0; padding: 0; gap: 0; border-radius: 0; background: #000; box-shadow: none; grid-template-columns: 1fr; grid-template-rows: 1fr; }
  body.bare #tv::before, body.bare #rail, body.bare #panel, body.bare #dock, body.bare #msg, body.hideui #tv::before, body.hideui #rail, body.hideui #panel, body.hideui #dock, body.hideui #msg, body.hideui #sheetBack, body.hideui #toast, body.hideui #tap, body.hideui #screen > .shot, body.hideui #fsTimers { display: none !important; }
  body.bare.hasmsg #tv, body.hideui.hasmsg #tv { top: 0; }
  body.bare #bezel, body.hideui #bezel { grid-row: 1; grid-column: 1; padding: 0; border-radius: 0; box-shadow: none; }
  body.bare #screen, body.hideui #screen { border-radius: 0; }
  body.bare .ov { display: flex; }
  body.hideui .ov { display: none !important; }
  body.hideui, body.hideui * { cursor: none !important; }
  body.bare.idle .ov, body.bare.idle #tap { opacity: 0; pointer-events: none; }
  body.bare.idle, body.bare.idle * { cursor: none !important; }

  /* ================= narrow and portrait ================= */
  .mob { display: none; }
  #soundCard { display: none; }
  .sheetHead { display: none; }
  #sheetBack { display: none; }
  @media (max-aspect-ratio: 1/1), (max-width: 760px) {
    #tv { inset: 8px; grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; gap: 8px; padding: 10px; border-radius: 22px; }
    body.hasmsg #tv { top: 30px; }
    #rail { grid-row: 1; min-height: 30px; } .logo { font-size: 22px; }
    #bezel { grid-row: 2; grid-column: 1; padding: 5px; }
    #dock { grid-row: 3; grid-column: 1; flex-wrap: nowrap; gap: 6px; padding: 6px; }
    .db .t, .db .k { display: none; }
    .mob { display: inline-flex; } #fsBtn, .nomob { display: none; }
    #sceneCard h1 { padding-right: 46px; }
    #soundCard { display: block; } #np #vibes, #screen > .shot { display: none; } #mixBtn { display: none; }
    #msgCta { display: none; }
    #panel { position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; max-height: 78vh; overflow: auto; padding: 8px 12px 18px; display: block; columns: 2 300px; column-gap: 10px;
      background: #0b0e10; border-radius: 22px 22px 0 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .07); transform: translateY(105%); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
    body.sheet #panel { transform: none; }
    .sheetHead { display: flex; column-span: all; position: sticky; top: -8px; z-index: 2; align-items: center; justify-content: space-between; margin: -8px -12px 8px; padding: 12px 14px 8px; background: #0b0e10; }
    .sheetHead::before { content: ""; position: absolute; left: 50%; top: 6px; width: 44px; height: 5px; margin-left: -22px; border-radius: 3px; background: rgba(255, 255, 255, .18); }
    .sheetHead b { font: 800 17px/1 var(--round); margin-top: 8px; }
    .sheetHead .x { margin-top: 6px; }
    #panel .card { break-inside: avoid; margin-bottom: 10px; }
    #sheetBack { display: block; position: fixed; inset: 0; z-index: 24; background: rgba(0, 0, 0, .45); opacity: 0; pointer-events: none; transition: opacity .3s; }
    body.sheet #sheetBack { opacity: 1; pointer-events: auto; }
    .dial { width: min(100%, 230px); }
    #ovPanel { gap: 6px; padding: 6px; } #ovScene { min-width: 0; font-size: 13px; } #ovPanel .db:has(#ovVol), #ovLanternTxt, #ovPanel .railsep { display: none; }
    #ovTop #ovInfo, #ovRight .ovdiv { display: none; }
    #timerBtn > .tip { left: auto; right: -4px; transform: translate(0, 6px) scale(.94); transform-origin: 90% 100%; } #timerBtn > .tip::after { left: auto; right: 16px; }   /* the last dock button on a phone: keep its label on screen */
  }
  @media (hover: hover) and ((max-aspect-ratio: 1/1) or (max-width: 760px)) { #timerBtn:hover > .tip, #timerBtn:focus-visible > .tip { transform: translate(0, 0) scale(1); } }
  @media (max-width: 640px), (max-height: 760px) and (max-aspect-ratio: 1/1) { #panel { columns: auto; display: flex; flex-direction: column; gap: 10px; } #panel .card { margin: 0; flex: none; } }
  @media (max-width: 420px) { .pill { padding: 6px 10px; } }
  @media (prefers-reduced-motion: reduce) { .knob { transition: none; } .dot { animation: none; } }

  /* ================= dock countdown, tour, view chips, mini player ================= */
  .tcount { display: none; font: 700 11px/1 var(--mono); letter-spacing: .02em; } #timerBtn.on .tcount:not(:empty) { display: inline; }
  .db.ic#timerBtn.on:has(.tcount:not(:empty)) { width: auto; min-width: var(--btn-h); padding: 0 10px; gap: 6px; }
  .pop .row2.wrap { flex-wrap: wrap; }
  .viewchips { margin-top: 12px; } .viewchips .chip kbd { margin-left: 5px; }
  #miniBar { display: none; }
  body.mini { background: #000; overflow: hidden; }
  body.mini::before { content: "Mini player · tap ⤢ or press P to bring the TV back"; position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; font: 600 13px/1.4 var(--mono); letter-spacing: .08em; color: var(--faint); pointer-events: none; }
  body.mini #tv { position: fixed; inset: auto 16px 16px auto; width: min(360px, calc(100vw - 32px)); height: auto; display: block; padding: 0; gap: 0; border-radius: 14px; background: #0b0d0f; box-shadow: 0 18px 50px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .1); overflow: hidden; z-index: 40; }
  body.mini #tv::before, body.mini #rail, body.mini #panel, body.mini #dock, body.mini #msg, body.mini #sheetBack, body.mini .ov, body.mini #tap, body.mini #screen > .shot, body.mini #fsTimers { display: none !important; }
  body.mini #bezel { display: block; aspect-ratio: 16 / 9; width: 100%; height: auto; padding: 0; border-radius: 0; box-shadow: none; }
  body.mini #screen { border-radius: 0; }
  body.mini #miniBar { display: flex; align-items: center; gap: 8px; padding: 6px 8px; } #miniName { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 800 14px/1 var(--round); }
  body.mini #toast { display: none; }

  @media (max-aspect-ratio: 1/1), (max-width: 760px) {
    #rail .railR { min-width: 0; } #timers { min-width: 0; } .tp .tl, .tp[data-id="tour"] { display: none; }                     /* phones: the rail keeps the numbers only (the tour shows on the timer button) */
    #timerBtn { position: relative; } .db.ic#timerBtn.on:has(.tcount:not(:empty)) { width: var(--btn-h); padding: 0; gap: 0; }
    #timerBtn .tcount { position: absolute; left: 50%; bottom: 3px; transform: translateX(-50%); font-size: 8.5px; letter-spacing: 0; }
    #timerPop { max-width: calc(100vw - 16px); }
  }

  .pill.plain { cursor: default; pointer-events: none; }                                                  /* "live" with no number: nothing to open */
