/* live.zillion247.com — the public watch page.
 *
 * One stylesheet, two shapes, chosen by html[data-frame] (live-frame.js):
 * `phone` is a single column with the chat underneath, `desk` has the chat
 * alongside. Since zillion-tickets#276 round 3 (28 nov 2026) a desktop window
 * is always `desk`, whatever its width: the block keeps the size it has in the
 * maximised window and a narrower window scrolls. `phone` is a touch device
 * below 900px, a non-desktop context (a frame, the app, EXPORT) below 900px,
 * or ?phone=1. No second page.
 *
 * Brand tokens come from /theme.css; nothing here redefines a colour. */

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: calc(100dvh / var(--zw-s, 1));                 /* dvh, not vh: iOS Safari's toolbar */
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  display: flex;
  flex-direction: column;
}

/* ── top bar ─────────────────────────────────────────────────────────── */

/* The announcement strip: full width, above the header, gone when empty. */
.motd {
  padding: 9px 16px; text-align: center;
  font-size: .86rem; line-height: 1.4; color: var(--ink);
  background: linear-gradient(90deg, #c56bff2e, #7b5bff2e);
  border-bottom: 1px solid #ffffff1f;
}
.motd[hidden] { display: none; }
@media (max-width: 560px) { .motd { padding: 8px 12px; font-size: .8rem; } }

.bar {
  display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap;
  padding: 12px clamp(12px, calc(3 * var(--zl-vw, calc(1vw / var(--zw-s, 1)))), 28px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(8px);
}
/* ⚠️ Taller than the old wordmark on purpose: this lockup stacks "Zillion"
   over "24/7", so a height that suited one line leaves each of them half of it
   and the 24/7 unreadable. */
.bar .logo img { height: 42px; width: auto; display: block; }
.bar .meta {
  font-size: .72rem; letter-spacing: .06em; color: var(--dim);
  white-space: nowrap;
}
.bar .meta b { color: var(--ink); font-weight: 700; font-size: .92rem; }
/* Headphones instead of the word "listening", on every screen since
   zillion-tickets#77 (it was phone-only before). */
.bar .meta-viewers::before { content: '🎧'; margin-right: 4px; font-size: .9rem; }
.bar #pbuf { margin-left: 5px; opacity: .7; }

/* zillion-tickets#165: the indicator is a button in a wrapper that carries the
   list of studios under it. The wrapper takes the indicator's place in the
   bar (margin-left: auto); the button looks like the plain indicator until
   studios are known, then shows a caret and a border on hover. */
.bar .live-wrap { margin-left: auto; position: relative; display: inline-flex; flex: none; }
.bar .live {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: inherit; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--dim); background: none; border: 1px solid transparent; border-radius: 999px;
  padding: 5px 9px; margin: 0; min-height: 32px; cursor: default;
}
.bar .live[aria-haspopup] { cursor: pointer; }
.bar .live[aria-haspopup]:hover, .bar .live[aria-expanded="true"] { border-color: var(--line); }
.bar .live:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bar .live .caret { font-size: .7rem; letter-spacing: 0; opacity: .7; }
.bar .live .caret[hidden] { display: none; }
.studio-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 20;
  display: flex; flex-direction: column; gap: 2px; min-width: 250px; max-width: min(320px, calc(calc(100vw / var(--zw-s, 1)) - 24px)); padding: 6px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 34px #000a;
}
.studio-menu[hidden] { display: none; }
.studio-menu .sm {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 5px 10px 5px 5px;
  border: 1px solid transparent; border-radius: 9px; background: none; color: var(--ink);
  font: inherit; font-size: .86rem; text-align: left; cursor: pointer;
}
.studio-menu .sm:hover, .studio-menu .sm:focus-visible { background: #ffffff12; outline: none; }
.studio-menu .sm[aria-current="true"] { border-color: var(--accent); }
.studio-menu .sm img, .studio-menu .sm .ph { width: 32px; height: 32px; border-radius: 7px; object-fit: cover; flex: none; background: var(--panel); }
.studio-menu .sm .nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.studio-menu .sm .lv { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--signal); box-shadow: 0 0 6px var(--signal); }
.studio-menu .sm .tag { font-size: .62rem; letter-spacing: .08em; color: var(--dim); flex: none; }
.studio-menu .sm.offline { opacity: .6; }
/* #350 (Frank, 29 nov 2026): every studio's CHAT COLOR as a 6 px stripe (the chat's
   width, .msg.sdt) at the front of its choice; transparent for MOZAIEK and a studio
   without a colour, so the pictures and names stay in line. live.js sets --zl-sc. */
.studio-menu .sm::before { content: ''; flex: none; width: 6px; align-self: stretch; margin: 3px -4px 3px 0; border-radius: 1px; background: transparent; }
.studio-menu .sm[data-sc]::before { background: var(--zl-sc); }
.bar .live .dot {
  width: 8px; height: 8px; border-radius: 50%; background: #3a3a42;
  transition: background .3s, box-shadow .3s;
}
.bar .live[data-on="1"] .dot {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
.bar .live[data-on="1"] .what { color: var(--ink); }
@keyframes pulse { 50% { opacity: .45; } }

/* ⚠️ Respect the setting. A pulsing dot is decoration; for someone with
   vestibular sensitivity it is not. */
@media (prefers-reduced-motion: reduce) {
  .bar .live[data-on="1"] .dot { animation: none; }
}

/* zillion-tickets#30: the share icon and its list (where the device has no
   share sheet). The list hangs under the bar, right-aligned. */
/* MOMENTZ (zillion-tickets#53): left of share, the one filled pill in the bar,
   because it only exists while the show is live. */
.momentz-btn {
  flex: none; font: inherit; font-size: .74rem; font-weight: 800; letter-spacing: .12em; cursor: pointer;
  border: 0; border-radius: 999px; padding: 8px 14px; background: var(--accent); color: #000;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.momentz-btn[hidden] { display: none; }
/* zillion-tickets#126: the MINI button, a quiet outline next to MOMENTZ. */
.mini-btn {
  flex: none; font: inherit; font-size: .7rem; font-weight: 800; letter-spacing: .12em; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; background: transparent; color: var(--ink);
}
.mini-btn[hidden] { display: none; }
.mini-btn:hover { border-color: var(--accent); }
:root[data-frame="phone"] .mini-btn { padding: 5px 9px; font-size: .62rem; letter-spacing: .08em; }
.momentz-btn:hover { filter: brightness(1.15); }
:root[data-frame="phone"] .momentz-btn { padding: 6px 10px; font-size: .64rem; letter-spacing: .08em; }
/* #162 feedback (Frank, 18 nov 2026): on a phone the pill is half as wide,
   the word broken in two lines, "MO-" over "MENTZ". The hyphen exists only there. */
.momentz-btn .mzh { display: none; }
:root[data-frame="phone"] .momentz-btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1.05; padding: 3px 9px; font-size: .56rem; letter-spacing: .06em; border-radius: 12px; }
:root[data-frame="phone"] .momentz-btn[hidden] { display: none; }
:root[data-frame="phone"] .momentz-btn .mzh { display: inline; }
.share-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none;
  border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer;
}
.share-btn:hover, .share-btn[aria-expanded="true"] { border-color: var(--accent); }
.share-menu {
  position: absolute; top: calc(100% + 6px); right: clamp(12px, calc(3 * var(--zl-vw, calc(1vw / var(--zw-s, 1)))), 28px); z-index: 20;
  display: flex; flex-direction: column; min-width: 210px; padding: 6px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 34px #000a;
}
.share-menu[hidden] { display: none; }
.share-menu a, .share-menu button {
  display: block; padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none;
  font: inherit; font-size: .88rem; text-align: left; background: none; border: 0; cursor: pointer;
}
.share-menu a:hover, .share-menu button:hover { background: #ffffff12; }
:root[data-frame="phone"] .share-btn { width: 30px; height: 30px; }

/* ⚠️ The chat toggle lives in the header now, so it must not stretch. */
.bar .chat-toggle { padding: 7px 14px; font-size: .8rem; }

/* ── the shell: one column, then two ─────────────────────────────────── */

.shell {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(12px, calc(2 * var(--zl-vw, calc(1vw / var(--zw-s, 1)))), 22px);
  padding: clamp(12px, calc(2.5 * var(--zl-vw, calc(1vw / var(--zw-s, 1)))), 28px);
  /* #276 round 3 (owner, 28 nov 2026): /live/ ignores the WEB column width
     (--zw-col); the block keeps its own 1500px cap. MINI and the phone frame
     set max-width: none further down and keep it. */
  max-width: 1500px; width: 100%; margin: 0 auto;
  align-content: start;
}

/* ── #276 round 3: on a desktop the block follows the monitor ───────────
   Frank (28 nov 2026): the player, the zeats and the chat stay as large as in
   this window maximised; a smaller window scrolls instead of shrinking them.
   live-frame.js sets html[data-fix] and the maximised widths --zl-fw (layout,
   no scrollbar) and --zl-fwi (innerWidth) in window px; dividing by --zw-s
   turns them into CSS px under a WEB zoom. The shell keeps that width, at most
   1500px, and a narrower window scrolls. Every window-relative length in the
   page reads --zl-vw (1 % of that maximised window) with today's vw as the
   fallback, so without data-fix nothing changes. A maximised window gives
   exactly today's values. Not in MINI, which is built for a small window. */
:root[data-fix]:not([data-mini]) { --zl-vw: calc(var(--zl-fwi) / 100 / var(--zw-s, 1)); }
:root[data-fix]:not([data-mini]) body { min-width: min(1500px, calc(var(--zl-fw) / var(--zw-s, 1))); }
/* ⚠️ CAPPED at the shell's own 1500px (29 nov 2026). Uncapped, the body took
   the whole estimated maximised width, and the 1500px shell centred inside it:
   on Frank's 7680x2160 screen, in a window narrower than the screen, the block
   sat on the right, half off-screen. Capped, the body is never wider than the
   block, so the block starts at the left edge when the window is narrower and
   is centred when it fits; a window of 1500px or more is never touched,
   whatever the estimate. On the body, not the shell, so the sticky header has
   room to stay in place while the page scrolls. */
/* theme.css gives the chat its desktop height only from 940px of window up. */
/* The announcement, the header and the navigation stay as wide as the window
   and in place while the block scrolls sideways, so LIVE, MINI, Hide and
   Account are always on screen (owner, 28 nov 2026). The bar keeps its top: 0. */
:root[data-fix]:not([data-mini]) :is(.motd, .bar, .navstrip) {
  position: sticky; left: 0; width: calc(var(--zl-ww) / var(--zw-s, 1)); box-sizing: border-box;
}
:where(:root[data-fix]:not([data-mini])) zillion-chat { height: min(620px, calc(calc(100dvh / var(--zw-s, 1)) - 260px)); }

.stage { min-width: 0; }              /* min-width:0 or the grid refuses to shrink */
/* ZILLION ZEATS right under the picture (zillion-tickets#63, Frank: "the title
   must stick to the picture"). theme.css gives .stage an 18px gap, and the strip
   is its only other child; the strip's own top margin is a few px since #63. */
.stage { gap: 0; }

/* zillion-tickets#65: on a desktop, while the seats are on screen, the chat
   column runs down to the bottom of the stage instead of stopping at its own
   height. `contain: size` keeps the chat out of the row's height, so the STAGE
   sets it (theme.css's align-items: start still keeps the stage from being
   stretched by the chat); the min-height is the chat's usual height, so a short
   stage never makes the chat smaller than before. Not on the account pane and
   not behind the sign-in gate, where the column holds the account panel. */
/* #276 round 3: was @media (min-width: 900px); now the desk frame (live-frame.js), at zero specificity. */
  :root:where([data-frame="desk"]):not([data-frame="phone"]):not([data-pane="account"]):is([data-account="in"], :not([data-gate="on"]))
    .shell:has(zillion-zeats:not([hidden])) .side {
    align-self: stretch; contain: size; min-height: min(620px, calc(calc(100dvh / var(--zw-s, 1)) - 260px));
    display: flex; flex-direction: column;
  }
  :root:where([data-frame="desk"]):not([data-frame="phone"]):not([data-pane="account"]):is([data-account="in"], :not([data-gate="on"]))
    .shell:has(zillion-zeats:not([hidden])) zillion-chat {
    flex: 1 1 auto; height: auto; min-height: 0; --zc-log-lines: 400;
  }




.chat-toggle {
  font: inherit; font-weight: 600; font-size: .9rem;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 20px; cursor: pointer; flex: none;
  background: var(--panel-2); color: var(--ink);
}
.chat-toggle:hover { border-color: var(--accent); }
:root[data-chat="closed"] .ct-close,
:root[data-chat="open"]   .ct-open { display: none; }

/* ⚠️ `hidden` would unload the chat's websocket every time it is collapsed.
   Keep it in the tree and take it out of layout instead, so reopening is
   instant and no message is missed while it is shut. */
:root[data-chat="closed"] zillion-chat { display: none; }

/* ⚠️ THE TOGGLE HIDES THE CHAT, NOT THE COLUMN. It used to hide `.side`, which
   also holds the account panel — so "hide chat" hid the registration gate and
   the profile pane with it.

   The expensive half was not the one that got reported: `data-chat` defaults to
   CLOSED below 900px, so every first-time visitor on a phone loaded /live/ with
   the column hidden, the stage hidden by the gate, and therefore NOTHING on the
   page at all. Measured on 13 oct 2026 at 695px: side, stage and account panel
   all display:none together.

   The column now collapses only when it genuinely has nothing to show: signed
   in (so no gate is needed), not looking at the account pane, and the chat shut
   by hand. */
:root[data-chat="closed"][data-account="in"]:not([data-pane="account"]) .side {
  display: none;
}
.side { min-width: 0; }

/* #276 round 3: was @media (min-width: 900px); now the desk frame (live-frame.js), at zero specificity. */
  /* zillion-tickets#9 (10 nov 2026): on a desktop the chat beside the show is
     twice as tall, 24 messages instead of the widget's 12. Height only; the
     column keeps its width, and the chat may run on below the video. */
  :root:where([data-frame="desk"]):not([data-frame="phone"]) zillion-chat { --zc-log-lines: 24; }
  :root:where([data-frame="desk"])[data-chat="open"] .shell {
    grid-template-columns: minmax(0, 1fr) clamp(300px, calc(26 * var(--zl-vw, calc(1vw / var(--zw-s, 1)))), 400px);
  }
  /* The toggle is for small screens; on a wide one the chat simply sits there.
     It stays available, because someone may still want the video full width. */


/* ── account gate and the profile pane ───────────────────────────────── */
/*
 * Two independent facts, two attributes on <html>:
 *   data-account  in | out   -- does this visitor have a session
 *   data-pane     watch | account   -- which pane they asked for
 *
 * ⚠️ The pane exists because hiding the account panel on sign-in removed the
 * only route to signing out, renaming and DELETING the account -- and App Store
 * guideline 5.1.1(v) requires that last one to be reachable from inside. Built
 * and caught the same hour. The app sketch had it right all along: there is a
 * Profiel tab in the bottom bar.
 *
 * ⚠️ Default is signed OUT and the attribute is only set once the server has
 * answered, so the chat never flashes into view for an expired session.
 */
:root[data-gate="on"]:not([data-account="in"]) zillion-chat,
:root[data-pane="account"] zillion-chat { display: none; }

:root[data-account="in"]:not([data-pane="account"]) #account { display: none; }

/* The video is behind the gate too: the live shows are what an account unlocks.
   The 24/7 audio stream is a different URL and stays open -- the panel says so
   and links there. */
:root[data-gate="on"]:not([data-account="in"]) .stage,
:root[data-pane="account"] .stage { display: none; }

:root[data-gate="on"]:not([data-account="in"]) .shell,
:root[data-pane="account"] .shell { grid-template-columns: minmax(0, 520px); justify-content: center; }

/* ⚠️ EXCEPT WHILE WAITING FOR A CODE (22 oct 2026). The two rules above hide
   the stage whenever the account pane is open, which is right for a member
   managing their profile and exactly wrong for a PENDING one: they pressed
   Confirm in the chat, the video vanished, and they were left staring at a
   code box — which is the behaviour this whole change exists to remove. Caught
   in the browser before it ever shipped; the backend tests could not see it.
   So for an unverified member the pane sits in the side column, beside the
   show, and the show keeps playing. */
:root[data-verified="no"][data-pane="account"] .stage { display: block; }
/* #276 round 3: was @media (min-width: 900px); now the desk frame (live-frame.js), at zero specificity. */
  :root:where([data-frame="desk"])[data-verified="no"][data-pane="account"] .shell {
    grid-template-columns: minmax(0, 1fr) clamp(300px, calc(26 * var(--zl-vw, calc(1vw / var(--zw-s, 1)))), 400px);
    justify-content: stretch;
  }


:root[data-gate="on"]:not([data-account="in"]) .chat-toggle { display: none; }

/* Gate off: the account panel is not in the way, but the profile button
   still is -- signing in voluntarily must stay possible, because the chat
   needs a name either way. */
:root[data-gate="off"]:not([data-pane="account"]) #account { display: none; }
:root[data-gate="off"] .account-btn { display: inline-flex; }

/* zillion-tickets#110: a THIRD value, data-gate="guest": the gate is on, the
   visitor has no account and has free time left today (live.js). Every rule
   above that says [data-gate="on"] lets go by itself, so the stage and the chat
   show as for a member; what is left is the same pair as for the gate being
   off: the account panel stays out of the way until asked for, and the button
   to ask for it is there. */
:root[data-gate="guest"]:not([data-pane="account"]) #account { display: none; }
:root[data-gate="guest"] .account-btn { display: inline-flex; }
/* Until the first answer about the gate, the account panel is not drawn. */
:root[data-boot] #account, :root[data-boot] .langs-pane { visibility: hidden; }
/* The line above the register panel once the free time is up. */
.guest-over { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--accent); border-radius: 12px;
  font-size: .9rem; line-height: 1.5; font-weight: 600; }
.guest-over[hidden] { display: none; }

/* #304: the NEWZ photo lines switch. Green = shown, red = hidden for this
   viewer. Since 28 nov 2026 it sits in the chat widget's top right corner (slot
   "corner", placed by zillion-chat.js), not in the bar. Feedback of 28 nov
   (Frank): twice as big as the LIVE dot (16 px instead of 8, in a 32 px tap
   target), and the explanation shows at once on hover: our own tip, not the
   native title, which waits about a second. */
.newz-lines {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0;
  margin: 0; border: 0; background: transparent; cursor: pointer; border-radius: 50%;
}
.newz-lines[hidden] { display: none; }
.newz-lines .dot { width: 16px; height: 16px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 12px #e5484d; transition: background .2s, box-shadow .2s; }
.newz-lines[data-on="1"] .dot { background: #2bd66b; box-shadow: 0 0 12px #2bd66b; }
.newz-lines .tip {
  position: absolute; right: calc(100% + 2px); top: 4px;
  width: max-content; max-width: 240px; padding: 6px 9px; border-radius: 8px;
  background: #111c; color: #fff; border: 1px solid #ffffff2e; font: 600 .74rem/1.35 system-ui, sans-serif;
  text-align: left; white-space: normal; pointer-events: none; visibility: hidden; z-index: 6;
}
.newz-lines:hover .tip, .newz-lines:focus-visible .tip { visibility: visible; }
.newz-lines:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The profile button only means anything once there is a session to manage. */
.account-btn {
  display: none; align-items: center; gap: 7px;
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink); font: inherit; font-size: .82rem;
  font-weight: 600; cursor: pointer;
}
:root[data-account="in"] .account-btn { display: inline-flex; }
.account-btn:hover { border-color: var(--accent); }

/* ⚠️ The only thing data-verified paints, and it is on purpose that it is
   small. A pending member can watch the whole show without ever being nagged;
   this is a mark on the profile button saying one step is unfinished, not a
   banner across the stage. The chat composer is where the actual ask lives,
   at the moment they reach for it. */
:root[data-verified="no"] .account-btn {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.account-btn .nick { max-width: 12ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The ZILLION STARS balance (zillion-tickets#16): small, next to the name. */
.account-btn .stars { font-size: .72rem; font-weight: 700; color: #ffd60a; white-space: nowrap; font-variant-numeric: tabular-nums; }
.account-btn .stars[hidden] { display: none; }


/* The navigation strip, full bleed under the header. */
zillion-nav { --zn-fg: var(--ink); --zn-dim: var(--dim); --zn-line: var(--line); --zn-panel: var(--panel); }
.navstrip { padding: 6px clamp(12px, calc(3 * var(--zl-vw, calc(1vw / var(--zw-s, 1)))), 28px) 0; border-bottom: 1px solid var(--line); }

/* ══ the phone: the viewport IS the frame ═══════════════════════════════════
 *
 * ⚠️ An ATTRIBUTE, not a bare media query. `data-frame` is set on <html> by
 * live-frame.js: a touch device (or a frame, the app, EXPORT) below 900px;
 * `?phone=1` forces it. A desktop window never gets it (#276 round 3).
 *
 * A layout that lives only inside a media query cannot be inspected anywhere but
 * on a phone: every check becomes "please look at your device and describe it",
 * and three rounds of that went by without even establishing which rules were
 * reaching it. One attribute makes the phone frame reproducible on a desk, which
 * is the difference between testing it and hoping.
 *
 * The frame: nothing scrolls but the chat log. Player under the bar, chat filling
 * what is left, composer on the bottom edge. Both on screen at once, always.
 *
 * ⚠️ `100dvh`, never `100vh`. On iOS Safari `vh` excludes the browser chrome, so
 * a 100vh column puts the composer behind the toolbar with the last line of chat
 * under it. `dvh` follows the toolbar as it hides and returns.
 */
:root[data-frame="phone"],
:root[data-frame="phone"] body { height: calc(100dvh / var(--zw-s, 1)); overflow: hidden; }

:root[data-frame="phone"] body {
  display: flex; flex-direction: column; min-height: 0;
}
/* #153 feedback (Frank, 18 nov 2026): the account pane got taller than a phone
   (the sign-in providers) and SIGN OUT fell off the bottom, unreachable because
   the page itself does not scroll here. The pane scrolls instead; on any screen
   that is too short. */
:root[data-pane="account"] .shell,
:root[data-gate="on"]:not([data-account="in"]) .shell { min-height: 0; }
:root[data-pane="account"] .side,
:root[data-gate="on"]:not([data-account="in"]) .side { min-height: 0; max-height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
:root[data-frame="phone"][data-pane="account"] .shell,
:root[data-frame="phone"][data-gate="on"]:not([data-account="in"]) .shell { flex: 1 1 auto; overflow: hidden; }
/* .side is a flex column: without this the pane shrinks to fit and cuts its own
   bottom off (its host hides overflow), and then there is nothing to scroll. */
:root[data-pane="account"] #account,
:root[data-gate="on"]:not([data-account="in"]) #account { flex-shrink: 0; }

:root[data-frame="phone"] .bar { padding: 7px 12px; gap: 9px; }
:root[data-frame="phone"] .bar .logo img { height: 32px; }

/* The player's buffer reading is desk detail; the viewer count is not, and it
   moves up beside the logo instead of being hidden with it. */
:root[data-frame="phone"] .bar .meta-player { display: none; }

/* ONE ROW on a phone (14 nov 2026, Cain): logo, 👁 count, then MOMENTZ, share and
   the account as an icon with its stars, nothing wrapping to a second line.
   - headphones and the number, no word (the rule is with .bar .meta now);
   - the nickname goes from the account button (the 👤 and the ⭐ stay, and the
     button still opens the account pane);
   - LIVE goes while on air: MOMENTZ only shows during a live, so it already
     says so. "off air" stays, because then it is news. */
:root[data-frame="phone"] .bar { flex-wrap: nowrap; gap: 8px; }
:root[data-frame="phone"] .bar .meta-viewers { margin-right: auto; }
:root[data-frame="phone"] .bar .live-wrap { margin-left: 0; position: static; }
:root[data-frame="phone"] .bar .live { font-size: .62rem; letter-spacing: .08em; gap: 5px; white-space: nowrap; padding: 4px 7px; }
:root[data-frame="phone"] .bar .live[data-on="1"],
:root[data-frame="phone"] .bar .live-wrap:has(.live[data-on="1"]) { display: none; }
/* #165: on a phone the list hangs under the whole bar, edge to edge, as the
   share list does; the indicator is too far right to anchor 250 px on. */
:root[data-frame="phone"] .studio-menu { left: 12px; right: 12px; max-width: none; min-width: 0; }
:root[data-frame="phone"] .account-btn { padding: 6px 9px; gap: 5px; flex: none; }
:root[data-frame="phone"] .account-btn .nick { display: none; }

/* ⚠️ The page menu is GONE on a phone, not merely thinner. Six destinations
   across the top of a watch screen is the opposite of what this layout is for,
   and the logo reaches all of them. */
:root[data-frame="phone"] .navstrip { display: none; }

:root[data-frame="phone"] .shell {
  /* ⚠️ No max-width here. The base rule centres the page at 1500px, which on a
     wide screen in this frame produced the very gutter the frame exists to
     remove — and it is what a landscape phone or a tablet would hit too. */
  max-width: none;
  flex: 1 1 auto;
  min-height: 0;                        /* or the grid refuses to shrink at all */
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  align-content: stretch;
}

/* Edge to edge: a letterboxed video inside a rounded, inset card wastes the one
   dimension a phone has none of. No frame, no radius, no gutter.
   ⚠️ `--radius: 0` as well as `border: 0` — the player draws its own frame from
   `var(--radius, 12px)` inside its shadow root. A `video` selector from here
   would miss entirely: that element is in the shadow DOM. */
/* ⚠️ The picture is CAPPED, not merely sized. Its row is `auto`, so it takes
   whatever 16:9 asks for — fine at 390px wide (219px tall, a quarter of the
   screen) and ruinous on a landscape phone or a tablet, where it swallows the
   frame and leaves the chat entirely below the fold. A ceiling makes "both
   always on screen" a guarantee instead of a happy consequence of portrait
   arithmetic. */
:root[data-frame="phone"] .stage { min-height: 0; max-height: calc(42dvh / var(--zw-s, 1)); }
/* zillion-tickets#62 (13 nov 2026): as little space as possible between
   everything on a phone. theme.css gives .stage 22px of padding, which on a
   390px screen is 44px of nothing beside the picture and the seats. */
:root[data-frame="phone"] .stage { padding: 0; }
/* ZILLION ZEATS sits in the stage under the picture. The picture keeps its own
   42dvh ceiling (on its width, below), so the stage may grow by the strip. */
:root[data-frame="phone"] .stage:has(zillion-zeats:not([hidden])) { max-height: none; }
/* zillion-tickets#129: the same for the banner carousel, which sits in the
   stage between the picture and the seats. As wide as the picture, and capped
   in height: on a phone every line of screen above the chat's text box counts,
   so a tall banner keeps its ratio and shows narrower instead. */
:root[data-frame="phone"] .stage:has(zillion-banners:not([hidden])) { max-height: none; }
:root[data-frame="phone"] zillion-banners { max-width: calc(calc(42dvh / var(--zw-s, 1)) * 16 / 9); margin: 0 auto; --zb-max-height: calc(14dvh / var(--zw-s, 1)); }
/* As wide as the picture, so on a landscape phone the seats stay a strip. */
:root[data-frame="phone"] zillion-zeats { max-width: calc(calc(42dvh / var(--zw-s, 1)) * 16 / 9); margin: 0 auto; }
/* ⚠️ The ceiling is applied to the WIDTH, not the height. Capping the height on
   a 16:9 element crops it — the first version cut the top and bottom off the
   picture in landscape, where a video page is most likely to be watched. Limiting
   the width to what 42dvh of height allows keeps the whole frame and simply makes
   it narrower, centred. In portrait the limit is wider than the screen, so the
   picture stays edge to edge and nothing changes. */
:root[data-frame="phone"] .stage zillion-video {
  --radius: 0; border: 0; display: block;
  width: 100%; max-width: calc(calc(42dvh / var(--zw-s, 1)) * 16 / 9); margin: 0 auto;
}

/* ⚠️ `height: 100%`, and it is not belt-and-braces. A grid item's default
   stretch did NOT bound this one: the row measured 424px while the column
   rendered 620 and pushed the composer off the bottom. An explicit height
   resolves against the row and the whole chain below it — chat, log, composer —
   finally shrinks. Proven by setting it by hand in the browser first: 620 became
   424 and the composer landed 21px above the viewport edge. */
:root[data-frame="phone"] .side {
  min-height: 0; height: 100%; display: flex; flex-direction: column;
}

/* ⚠️ The chat is ALWAYS shown here, and the toggle is hidden rather than merely
   ignored. A control that is visible and does nothing is worse than no control,
   and with both panes fixed on screen there is nothing left to toggle. */
:root[data-frame="phone"][data-chat="closed"] zillion-chat { display: flex; }
:root[data-frame="phone"] .chat-toggle { display: none; }

:root[data-frame="phone"] zillion-chat {
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 0;
  border-left: 0; border-right: 0; border-bottom: 0;
  /* ⚠️ The line cap belongs to a page that SCROLLS. Here the log takes exactly
     the room that is left, so the cap is lifted and the flex parent decides.
     Leaving it would strand the composer halfway up the screen. */
  --zc-log-lines: 999;
}

/* The account pane takes the whole frame when open: a form and a video fighting
   over 700px of phone is a form nobody completes. */
:root[data-frame="phone"][data-pane="account"] .stage { display: none; }
:root[data-frame="phone"][data-pane="account"] .side { overflow-y: auto; }

/* ⚠️ The gate still wins on a phone. The "chat is ALWAYS shown" rule above has
   the same specificity as the gate's hide rule and comes later, so until
   15 oct 2026 a signed-out phone got the chat AND the account form, the form
   squeezed to a strip with its fields cut off. One more attribute is enough to
   outrank it; the side then scrolls so the whole form is reachable. */
:root[data-frame="phone"][data-gate="on"]:not([data-account="in"]) zillion-chat,
:root[data-frame="phone"][data-pane="account"] zillion-chat { display: none; }
:root[data-frame="phone"][data-gate="on"]:not([data-account="in"]) .side { overflow-y: auto; }

/* ⚠️ And the other half, same day: SIGNED IN, the column-collapse rule further
   up (`data-chat="closed"` + `data-account="in"` hides .side) took the whole
   chat away on a phone, because data-chat defaults to closed below 900px and
   the phone frame has no toggle to open it. The phone frame shows the chat
   always, so the collapse does not apply here. One attribute more to outrank it. */
:root[data-frame="phone"][data-chat="closed"][data-account="in"]:not([data-pane="account"]) .side {
  display: flex;
}

/* ══ the desk ══════════════════════════════════════════════════════════════ */
/* #276 round 3: was @media (min-width: 900px); now the desk frame (live-frame.js), at zero specificity. */
  /* The picker only has a place to live once the account pane is open; in the
     watch pane it would be a stray row of letters under the chat. */
  :where(:root[data-frame="desk"]) .langs-pane { margin-top: 14px; justify-content: center; }

:root:not([data-pane="account"]) .langs-pane { display: none; }

/* zillion-tickets#39/#45: the screen effects (flames and the others), over the
   whole page and the video, never in the way of a click. web/zillion-effects.js. */
.flames { position: fixed; inset: 0; width: calc(100vw / var(--zw-s, 1)); height: calc(100vh / var(--zw-s, 1)); z-index: 9000; pointer-events: none; mix-blend-mode: screen; }
.flames[hidden] { display: none; }


/* zillion-tickets#108, #121: the CLUB ZUNDAYS background over the whole page
   while a member has the chat's ZUNDAYS switch on (live.js sets --zd-bg to a
   blob). Darkened like on /clubzundays/, so the page stays readable on any photo.
   #189: ZUNDAYS wins over a theme or the visitor's own background. theme.css
   makes body transparent under :root[data-landing] (0,2,1), which reset this
   photo to none, so the second selector outweighs it; and the theme's own layer
   is hidden, not removed, so switching ZUNDAYS off shows it again as it was.
   :not([data-mini]) keeps MINI's black ground winning, as it did before. */
body.zd-bg > .theme-bg { display: none; }
body.zd-bg, :root[data-landing]:not([data-mini]) body.zd-bg { background-image: linear-gradient(#000000b3, #000000b3), var(--zd-bg); background-size: cover; background-position: center;
  background-attachment: fixed; background-repeat: no-repeat; }

/* ── MINI (zillion-tickets#126, Frank, 16 nov 2026) ─────────────────────── */
/* data-mini on <html>: the page is only the picture and the seats, edge to
   edge, with 1 px between them, so a small window next to other work is all
   stream. Everything else is hidden, not removed: leaving MINI (the icon on
   the picture, or Escape) puts the page back exactly. The player and the seats
   draw their own compact form from their `mini` attribute. live.js never sets
   this while the stage is not shown (the register gate). */
:root[data-mini] zillion-banners { display: none; }           /* #129: MINI is the picture and the seats only */
:root[data-mini] .bar, :root[data-mini] .navstrip, :root[data-mini] .side,
:root[data-mini] .sitefoot, :root[data-mini] .guest-over { display: none !important; }
:root[data-mini], :root[data-mini] body { height: auto; min-height: calc(100dvh / var(--zw-s, 1)); overflow: auto; background: #000; }
:root[data-mini] body { display: block; margin: 0; padding: 0; }
:root[data-mini] .shell { display: block; max-width: none; width: 100%; margin: 0; padding: 0; gap: 0; }
:root[data-mini] .stage { display: flex; flex-direction: column; gap: 1px; margin: 0; padding: 0; }
/* The picture is as wide as the window, but never taller than it: in a low,
   wide window it gets narrower and is centred, so the whole frame stays on
   screen. This also lifts the phone layout's 42dvh ceiling, which is there to
   leave room for the chat and has nothing to leave room for here. */
:root[data-mini] .stage, :root[data-mini][data-frame="phone"] .stage { max-height: none; }
:root[data-mini] .stage zillion-video, :root[data-mini][data-frame="phone"] .stage zillion-video {
  --radius: 0; display: block; width: 100%; max-width: calc((calc(100dvh / var(--zw-s, 1)) - 2px) * 16 / 9); margin: 0 auto;   /* 2px: the frame's own border */
}
:root[data-mini] zillion-zeats, :root[data-mini][data-frame="phone"] zillion-zeats { max-width: none; margin: 0; }


/* STUDIOS (zillion-tickets#162, 18 nov 2026): the studio chooser in the bar,
   right after the count. Frank asked for the club page's native chooser
   (#167, .ctl select there) in place of the strip of buttons under the picture,
   so it is a plain <select>: the phone's own picker on a phone, no list of ours
   to keep accessible. live.js fills it; hidden while only one studio exists. */
.bar .studio-pick { position: relative; display: inline-flex; min-width: 0; flex: 0 1 auto; }
.bar .studio-pick[hidden] { display: none; }
.bar .studio-pick .chip { display: none; }
.bar .studio-sel {
  font: inherit; font-size: .78rem; font-weight: 800; color: var(--ink); background: #1a1a20;
  border: 1px solid #ffffff2e; border-radius: 999px; padding: 4px 8px; cursor: pointer;
  max-width: clamp(110px, calc(22 * var(--zl-vw, calc(1vw / var(--zw-s, 1)))), 240px); min-width: 0; text-overflow: ellipsis;
}
.bar .studio-sel:hover, .bar .studio-sel:focus-visible { border-color: var(--accent); }
/* #350 (Frank, 29 nov 2026): the stripe of the chosen studio's CHAT COLOR before its dot on
   the closed chooser, 6 px as in the chat; nothing without a colour. live.js sets --zl-sc. */
.bar .studio-sel[data-sc] {
  padding-left: 20px; background-image: linear-gradient(var(--zl-sc), var(--zl-sc));
  background-repeat: no-repeat; background-size: 6px 1.15em; background-position: 9px 50%;
}
/* #350 "knop en lijst": the open list is the browser's own, which draws no stripe. Where the
   browser can style its list (customizable select, Chromium 135 and later) and with a mouse,
   the list is ours: dark as the bar, the same stripe before every studio's dot (transparent
   for MOZAIEK, so the names stay in line). Everywhere else, and on a phone (the chip and the
   phone's own picker), the list is the browser's as before. The options keep their text. */
@supports (appearance: base-select) {
  @media (hover: hover) and (pointer: fine) {
    :root:not([data-frame="phone"]) .bar .studio-sel,
    :root:not([data-frame="phone"]) .bar .studio-sel::picker(select) { appearance: base-select; }
    :root:not([data-frame="phone"]) .bar .studio-sel { display: inline-flex; align-items: center; gap: 6px; line-height: 1.25; }
    :root:not([data-frame="phone"]) .bar .studio-sel::picker-icon { font-size: .7em; opacity: .75; }
    :root:not([data-frame="phone"]) .bar .studio-sel::picker(select) {
      background: #16161c; color: var(--ink); border: 1px solid #ffffff2e; border-radius: 10px; padding: 4px;
      box-shadow: 0 12px 32px #000000b0; margin-top: 4px;
    }
    :root:not([data-frame="phone"]) .bar .studio-sel option {
      display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 7px;
      font-size: .84rem; font-weight: 700; white-space: nowrap; color: var(--ink); background: transparent; cursor: pointer;
    }
    :root:not([data-frame="phone"]) .bar .studio-sel option::checkmark { display: none; }
    :root:not([data-frame="phone"]) .bar .studio-sel option::before { content: ''; flex: none; width: 6px; height: 1.15em; border-radius: 1px; background: transparent; }
    :root:not([data-frame="phone"]) .bar .studio-sel option[data-sc]::before { background: var(--zl-sc); }
    :root:not([data-frame="phone"]) .bar .studio-sel option:hover,
    :root:not([data-frame="phone"]) .bar .studio-sel option:focus-visible { background: #ffffff1a; outline: none; }
    :root:not([data-frame="phone"]) .bar .studio-sel option:checked { background: #ffffff26; }
  }
}
.bar .studio-sel:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Phone: the one-row bar of 14 nov. Measured 18 nov 2026 at 360 px with MOMENTZ
   showing: logo, count, MOMENTZ, share and account leave 34 px, so no select
   with a name fits. The chip names the studio (with a dot: live, or grey when off)
   and the select lies over it at opacity 0, so a tap opens the phone's own
   picker with the full names. Gaps and logo give up a little while it shows. */
:root[data-frame="phone"] .bar .meta-viewers:has(+ .studio-pick:not([hidden])) { margin-right: 0; }
/* #162 feedback (Frank, 18 nov 2026): since MOMENTZ is narrower the chip shows
   the studio's name ("ST 1 ZILLION 24/7") and takes the room that is left,
   cut with an ellipsis; never narrower than "ST N". */
:root[data-frame="phone"] .bar .studio-pick { margin-right: auto; flex: 0 1 auto; min-width: 58px; }
:root[data-frame="phone"] .bar .studio-pick .chip {
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; max-width: 100%; min-width: 0; box-sizing: border-box;
  font-size: .66rem; font-weight: 800; letter-spacing: .01em; color: var(--ink);
  background: #1a1a20; border: 1px solid #ffffff2e; border-radius: 999px; padding: 4px 6px;
}
:root[data-frame="phone"] .bar .studio-pick .chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
:root[data-frame="phone"] .bar .studio-pick .chip::before { display: none; }
/* #217: red online, rust backup sound, orange backup playing, no dot offline or idle (zillion-studio-dot.js). */
:root[data-frame="phone"] .bar .studio-pick .chip[data-state="live"]::before { display: block; background: #ff2440; box-shadow: 0 0 5px #ff2440; }
:root[data-frame="phone"] .bar .studio-pick .chip[data-state="sound"]::before { display: block; background: #d2561e; box-shadow: 0 0 5px #d2561e; }
:root[data-frame="phone"] .bar .studio-pick .chip[data-state="backup"]::before { display: block; background: #ff9d00; box-shadow: 0 0 5px #ff9d00; }
:root[data-frame="phone"] .bar .studio-pick .chip::after { content: '▾'; font-size: .6rem; opacity: .7; }
:root[data-frame="phone"] .bar .studio-pick .chip::before,
:root[data-frame="phone"] .bar .studio-pick .chip::after { flex: none; }
:root[data-frame="phone"] .bar .studio-pick .chip .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* #350: the chat colour's stripe before the dot (the dot is ::before, so the stripe goes first by order). */
:root[data-frame="phone"] .bar .studio-pick .chip .sc { display: none; }
:root[data-frame="phone"] .bar .studio-pick .chip[data-sc] .sc { display: block; order: -1; flex: none; width: 6px; align-self: stretch; min-height: 1em; border-radius: 1px; background: var(--zl-sc); }
:root[data-frame="phone"] .bar .studio-pick:focus-within .chip { border-color: var(--accent); }
:root[data-frame="phone"] .bar .studio-sel { position: absolute; inset: 0; width: 100%; max-width: none; opacity: 0; font-size: 16px; }
:root[data-frame="phone"] .bar:has(.studio-pick:not([hidden])) { gap: 6px; }
:root[data-frame="phone"] .bar:has(.studio-pick:not([hidden])) .logo img { height: 28px; }
/* ⚠️ No room for the off-air indicator as well. The chip's grey dot and the
   picker's OFFLINE say what it said, and the picker is the same switch as its
   #165 list, so on a phone the chooser replaces it while it shows. */
:root[data-frame="phone"] .bar:has(.studio-pick:not([hidden])) .live-wrap { display: none; }

/* #260 (Frank, 24 nov 2026): on a real phone the bar reads better stacked.
   data-phone is set by live.js from the #179 phone query, so an iPad held
   upright and a narrow desktop window keep the one-line bar above. */
:root[data-phone="1"] .bar .meta-viewers { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.05; }
:root[data-phone="1"] .bar .meta-viewers::before { margin-right: 0; font-size: .8rem; }
:root[data-phone="1"] .bar .meta-viewers b { font-size: .8rem; }
:root[data-phone="1"] .account-btn { flex-direction: column; gap: 0; padding: 3px 8px; line-height: 1.05; border-radius: 12px; }
:root[data-phone="1"] .account-btn .stars { font-size: .62rem; }
:root[data-phone="1"] .momentz-btn .mz2 { display: flex; flex-direction: column; align-items: center; }
:root[data-phone="1"] .momentz-btn { padding: 3px 7px; font-size: .54rem; line-height: 1.02; }
:root[data-phone="1"] .bar .studio-pick .chip { white-space: normal; border-radius: 10px; padding: 3px 6px; }
:root[data-phone="1"] .bar .studio-pick .chip .nm {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  white-space: normal; font-size: .56rem; line-height: 1.12; overflow-wrap: anywhere;
}
