/* The opening screen — item layout straight from the sketch in
 * ../../docs/app-strategy.md.
 *
 * ⚠️ Phone-shaped at every width, not "mobile first then widen". This screen
 * becomes a React Native screen later, and a desktop layout that spreads the
 * five entries into a grid would have to be thrown away at that point. A column
 * that stays a column ports as a column. */
* { box-sizing: border-box; }

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

/* zillion-tickets#276 round 2: --zw-col is the WEB column width (zillion-webux.js); unset = 460px, today. */
.screen { width: 100%; max-width: var(--zw-col, 460px); padding: 0 16px 40px; }
/* The theme background (#128, #164, #176, #177) is in theme.css since 17 nov 2026. */

/* ── head ─────────────────────────────────────────────────────────────── */

.head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 2px 14px;
}
/* ⚠️ The lockup stacks "Zillion" over "24/7", so a height chosen for the old
   single-line wordmark gives each of them half and the 24/7 goes to mud. */
.head .logo img { height: 42px; width: auto; display: block; }
.head .tagline {
  font-size: .58rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--dim); margin-top: 3px;
}
.head .spacer { margin-left: auto; }

/* zillion-tickets#156: the SHARE icon of /live/ (#30), here too; the list hangs
   under the header, right-aligned. Behaviour: /zillion-share.js. */
.head { position: relative; }
.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% - 4px); right: 2px; 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; }

/* The account button only appears once there is a session to manage — the same
   rule as on the live page, and for the same reason: it is the route to signing
   out and deleting the account. */
.acct {
  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: .8rem;
  font-weight: 600; cursor: pointer; text-decoration: none;
}
:root[data-account="in"] .acct { display: inline-flex; }
.acct .nick { max-width: 11ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── the menu ─────────────────────────────────────────────────────────── */

/* The nav reads --zn-* so it can be dropped on a page with another palette;
   here it simply follows the brand tokens. */
zillion-nav {
  --zn-fg: var(--ink); --zn-dim: var(--dim);
  --zn-line: var(--line); --zn-panel: var(--panel);
  margin: 2px 0 10px;
}

zillion-player { margin-top: 4px; }
/* One line, quiet, directly under the player: it explains the whole shape of
   this screen -- free below, account above -- in eleven words. */
.free { margin: 8px 2px 0; font-size: .74rem; line-height: 1.5; color: var(--dim); }

.menu { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }

.item {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 16px; border-radius: 13px;
  border: 1px solid #ffffff1f;
  background: var(--panel);
  color: var(--ink); text-decoration: none;
  font-weight: 800; font-size: 1.02rem; letter-spacing: .01em;
  position: relative;
}
.item .ico {
  width: 34px; height: 34px; flex: none; border-radius: 9px;
  display: grid; place-items: center; font-size: 1.05rem;
  background: #ffffff14;
}
/* zillion-tickets#21 (11 nov 2026, Frank's second round): the unread count is a
   pink badge right after NEWZ, as on most apps, the digit twice the old size,
   blinking until NEWZ is opened. Static for reduced motion. */
.item .unread { display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; padding: 0 .4em; box-sizing: border-box;
  border-radius: 999px; background: var(--accent, #ff00c8); color: #fff; font-size: 1.1rem; font-weight: 900; line-height: 1;
  margin-left: 2px; box-shadow: 0 0 10px color-mix(in srgb, var(--accent, #ff00c8) 60%, transparent);
  animation: zn-blink 1s steps(1, end) infinite; }
.item .unread[hidden] { display: none; }
@keyframes zn-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .item .unread { animation: none; } }
.item .chev { margin-left: auto; color: var(--dim); font-size: 1.1rem; line-height: 1; }

/* One accent per entry, matching the sketch. Deliberately on the icon and the
   border rather than as a full fill: five saturated bars stacked is a traffic
   light, not a brand. */
.item.newz   { border-color: #2f7bff55; } .item.newz   .ico { background: #2f7bff; color: #fff; }
.item.eventz { border-color: #8b5cf655; } .item.eventz .ico { background: #8b5cf6; color: #fff; }
.item.yt     { border-color: #ff000055; } .item.yt     .ico { background: #ff0000; color: #fff; }
.item.sc     { border-color: #ff7a1f55; } .item.sc     .ico { background: #ff7a1f; color: #fff; }
.item.shop    { border-color: #05dfd755; } .item.shop    .ico { background: #05dfd7; color: #000; }
.item.socials { border-color: #ff00c855; } .item.socials .ico { background: #ff00c8; color: #fff; }
.item.zendus  { border-color: #c8e40055; } .item.zendus  .ico { background: #c8e400; color: #000; }
.item.starshop { border-color: #fcd34d55; } .item.starshop .ico { background: #fcd34d; color: #000; }   /* #132 */
/* zillion-tickets#120: the MODERATOR tile, shown to MOD members only. */
.item.moderator { border-color: #ff3b5c66; } .item.moderator .ico { background: #ff3b5c; color: #fff; }
.item[hidden] { display: none; }
.item.vault   { border-color: #ffd60a55; } .item.vault   .ico { background: #ffd60a; color: #000; }
.item.momentz { border-color: #ff00c8aa; } .item.momentz .ico { background: #ff00c8; color: #000; }
.item.zundays { border-color: #ff2d2daa; } .item.zundays .ico { background: #ff2d2d; color: #fff; font-weight: 900; }
/* zillion-tickets#81 */
.item.replay  { border-color: #00d0ffaa; } .item.replay  .ico { background: #00d0ff; color: #000; font-weight: 900; }
.item.replay[hidden] { display: none; }
/* Two lines in a tile no taller than its one-line neighbours (30 px icon). */
.item .two { line-height: 1.05; }
/* MOMENT VAN DE AVOND (zillion-tickets#53): the clip's poster behind two lines. */
.item.motn { flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 0; line-height: 1.2;
  border-color: #ffd60a66; background: var(--panel) center / cover no-repeat; }
.item.motn[hidden] { display: none; }
.item.motn .motn-star { color: #ffd60a; font-size: .66rem; font-weight: 800; letter-spacing: .08em; white-space: normal; }
.item.motn .motn-who { font-size: .74rem; font-weight: 600; color: #fff; }

a.item:hover { border-color: var(--accent); }

/* ⚠️ The four that go nowhere yet are <button disabled>, not <a> without an
   href. A link that does nothing is a dead end a visitor discovers by tapping
   it; a disabled control says so before the tap. The badge says when. */
.item:disabled {
  opacity: .62; cursor: default;
  font: inherit; font-weight: 800; font-size: 1.02rem; text-align: left; width: 100%;
}
.item:disabled .chev { display: none; }
.soon {
  margin-left: auto; font-size: .56rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px;
}

.foot {
  margin-top: 22px; text-align: center; font-size: .76rem; line-height: 1.7; color: var(--dim);
}
.foot a { color: var(--dim); }

/* The live tile and the pairs (26 oct 2026, from the /menu-lab/ trial).
 *
 * 1. The live show is a full-width 16:9 tile with a moving thumbnail
 *    (<zillion-live-tile>), because it is the one entry that matters most.
 * 2. The other four are two pairs side by side, to win back the height the
 *    tile takes. Still a column of rows, so it ports to React Native as rows
 *    of two, not as a desktop grid. */

/* the tile defaults to system-ui; on this page it speaks the brand font */
.live-tile { margin-top: 14px; --zt-font: var(--font); }

/* zillion-tickets#86: every row is its own <nav> now, so the rows sit as far
   apart as the two tiles in a row (10px), not the 14px between blocks. */
.menu.pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.menu.pairs .item {
  padding: 13px 12px; gap: 10px; font-size: .9rem; min-width: 0;
}
.menu.pairs .item .ico { width: 30px; height: 30px; font-size: .95rem; }
/* "SOUNDCLOUD" is the longest label; on a 320 px screen it does not fit beside
   an icon, so the icon goes on top there instead of the word being cut. */
.menu.pairs .item span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 359px) {
  .menu.pairs .item { flex-direction: column; align-items: flex-start; }
}

/* zillion-tickets#166 (Frank, 17 nov 2026): MODERATOR, about a third of a menu
   tile, at the bottom right next to EN/NL/FR, on phone and computer alike.
   The languages stay in the middle; the button hangs to their right. */
.sitefoot { align-items: center; gap: 10px; }
.mod-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px;
  border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none;
  font-size: .62rem; font-weight: 800; letter-spacing: .1em; white-space: nowrap;
}
.mod-btn:hover { border-color: var(--accent); }
.mod-btn[hidden] { display: none; }

/* zillion-tickets#176: the background picker, left of EN/NL/FR. */
.sitefoot .theme-pick { position: relative; }

/* zillion-tickets#347 (Frank, 29 nov 2026, option C): the player's studio
   chooser (/live/'s .bar .studio-sel) at the top of the menu. A native
   <select>: the phone's own picker on a phone. 16 px text, or iOS zooms the
   page in on a tap.
   zillion-tickets#334 round 2 (Frank, 29 nov 2026): the chooser LEFT of the
   radio player on one row, each half; a hidden one leaves the other the whole
   row. Beside the chooser the player is its compact bar (index.html). */
.toprow { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; }
.toprow > .studio-pick, .toprow > #radioBlock { flex: 1 1 0; min-width: 0; }
.toprow > #radioBlock zillion-player { margin-top: 0; }
.studio-pick { display: block; margin: 0; }
.studio-pick[hidden], #radioBlock[hidden], .free[hidden] { display: none; }
.studio-sel {
  display: block; width: 100%; min-width: 0; box-sizing: border-box;
  font: inherit; font-size: 1rem; font-weight: 800; color: var(--ink); background: #1a1a20;
  border: 1px solid #ffffff2e; border-radius: 999px; padding: 9px 14px; cursor: pointer; text-overflow: ellipsis;
}
.studio-sel:hover, .studio-sel:focus-visible { border-color: var(--accent); }
.studio-sel:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* zillion-tickets#347 round 2 (Frank, 30 nov 2026: "Hoe op een telefoon? Ook
   daar naast elkaar"). Two equal halves on a phone cut the name to "STUDIO 1..."
   and the compact player's title to "Z.". So on a narrow screen, while both
   halves show, /live/'s phone chooser (web/live/live.css): a chip with the
   studio's dot, its short name ("ST 1 ZILLION 24/7", up to two lines) and a
   caret, with the native select over it at opacity 0, so a tap still opens
   the phone's own picker with the full names. The chooser takes 38 %, the
   player the rest, so its title stays readable. Wider screens, and a row with one
   half, keep the plain select above. */
.studio-pick { position: relative; }
.studio-pick .chip { display: none; }
@media (max-width: 600px) {
  .toprow:has(> #radioBlock:not([hidden])) { gap: 8px; }
  .toprow:has(> #radioBlock:not([hidden])) > .studio-pick:not([hidden]) { flex: 0 0 38%; }
  .toprow:has(> #radioBlock:not([hidden])) .studio-pick .chip {
    display: flex; align-items: center; gap: 6px; min-height: 40px; box-sizing: border-box;
    font-size: .72rem; font-weight: 800; line-height: 1.12; color: var(--ink);
    background: #1a1a20; border: 1px solid #ffffff2e; border-radius: 14px; padding: 4px 8px;
  }
  .toprow:has(> #radioBlock:not([hidden])) .studio-pick .chip .nm {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
    overflow: hidden; overflow-wrap: anywhere; min-width: 0;
  }
  .toprow:has(> #radioBlock:not([hidden])) .studio-pick .chip::before {
    content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; display: none;
  }
  /* #217: red online, rust backup sound, orange backup playing, no dot off or idle. */
  .toprow:has(> #radioBlock:not([hidden])) .studio-pick .chip[data-state="live"]::before { display: block; background: #ff2440; box-shadow: 0 0 5px #ff2440; }
  .toprow:has(> #radioBlock:not([hidden])) .studio-pick .chip[data-state="sound"]::before { display: block; background: #d2561e; box-shadow: 0 0 5px #d2561e; }
  .toprow:has(> #radioBlock:not([hidden])) .studio-pick .chip[data-state="backup"]::before { display: block; background: #ff9d00; box-shadow: 0 0 5px #ff9d00; }
  .toprow:has(> #radioBlock:not([hidden])) .studio-pick .chip::after { content: '▾'; flex: none; margin-left: auto; font-size: .7rem; opacity: .7; }
  .toprow:has(> #radioBlock:not([hidden])) .studio-pick:focus-within .chip { border-color: var(--accent); }
  .toprow:has(> #radioBlock:not([hidden])) .studio-pick .studio-sel {
    position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px;
  }
}

/* zillion-tickets#356 (Frank, 30 nov 2026): the same chooser in the header of
   NEWZ, MOMENTZ and REPLAY, right of the logo as on /live/ (his picture). The
   pill keeps its natural width up to 340 px and shrinks with the header. On a
   phone the chip of #347 round 2 with the native select over it at opacity 0,
   so the text stays small without iOS zooming in on a tap. */
.head .studio-pick { flex: 0 1 auto; min-width: 0; max-width: 340px; }
.head .studio-sel { font-size: .86rem; padding: 7px 14px; }
@media (max-width: 600px) {
  .head .studio-pick:not([hidden]) { flex: 1 1 0; max-width: 220px; }
  .head .studio-pick .chip {
    display: flex; align-items: center; gap: 6px; min-height: 36px; box-sizing: border-box;
    font-size: .72rem; font-weight: 800; line-height: 1.12; color: var(--ink);
    background: #1a1a20; border: 1px solid #ffffff2e; border-radius: 14px; padding: 4px 8px;
  }
  .head .studio-pick .chip .nm {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
    overflow: hidden; overflow-wrap: anywhere; min-width: 0;
  }
  .head .studio-pick .chip::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; display: none; }
  .head .studio-pick .chip[data-state="live"]::before { display: block; background: #ff2440; box-shadow: 0 0 5px #ff2440; }
  .head .studio-pick .chip[data-state="sound"]::before { display: block; background: #d2561e; box-shadow: 0 0 5px #d2561e; }
  .head .studio-pick .chip[data-state="backup"]::before { display: block; background: #ff9d00; box-shadow: 0 0 5px #ff9d00; }
  .head .studio-pick .chip::after { content: '▾'; flex: none; margin-left: auto; font-size: .7rem; opacity: .7; }
  .head .studio-pick:focus-within .chip { border-color: var(--accent); }
  .head .studio-pick .studio-sel { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; }
}

/* zillion-tickets#353: PROGRAM GUIDE, one tile in its own row at the bottom,
   as big as NEWZ (half a row). */
.item.guide { border-color: #ff3b1f88; } .item.guide .ico { background: #ff3b1f; color: #fff; font-size: .8rem; }
.item.guide[hidden] { display: none; }
.menu.pairs.guide-row:not(.on) { display: none !important; }   /* the MATRIX pass sets style.display on every row */

/* zillion-tickets#334 (Frank, 28 nov 2026; round 2, 29 nov 2026): the side
   columns. Without html[data-side="on"] (switched off on /web, a server from
   before) .home is a plain block and the page is today's. With it, on a screen
   wider than 900 px, the studio's COLUMN WIDTH (--zw-col of zillion-webux.js;
   the whole window without one) is the width of the WHOLE, split 25 % left |
   50 % menu | 25 % right (at 80 %: 20 + 40 + 20). The tracks are explicit, so
   an empty or hidden side keeps its width and the menu never widens. Round 1
   put the columns outside the column width; Frank's sketch of 29 nov 2026 puts
   them inside it. Narrower than 901 px, or when the middle would be under
   400 px (the script then leaves data-side off, owner 30 nov 2026), the
   columns stay hidden and the strip under the tiles shows the same posts. */
.home { width: 100%; display: flex; flex-direction: column; align-items: center; }
.side[hidden], .side-strip[hidden] { display: none; }
.side { display: none; }
@media (min-width: 901px) {
  :root[data-side="on"] .home {
    display: grid; align-items: start; width: min(var(--zw-col, 100%), 100%);
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
  }
  :root[data-side="on"] .home > .screen { grid-column: 2; grid-row: 1; max-width: none; justify-self: stretch; min-width: 0; }
  :root[data-side="on"] .side:not([hidden]) {
    display: flex; flex-direction: column; gap: 12px; padding: 18px 8px 40px; min-width: 0;
    position: sticky; top: 0; max-height: 100dvh; overflow-y: auto; scrollbar-width: thin;
  }
  :root[data-side="on"] .side-l { grid-column: 1; grid-row: 1; }
  :root[data-side="on"] .side-r { grid-column: 3; grid-row: 1; }
  :root[data-side="on"] .side-strip { display: none; }
}
.side-post {
  display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none;
  background: var(--panel); border: 1px solid #ffffff1f; border-radius: 12px; overflow: hidden;
  font-size: .82rem; line-height: 1.3; min-width: 0;
}
.side-post:hover, .side-post:focus-visible { border-color: var(--accent); }
.side-post img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.side-post b { padding: 0 10px 10px; font-weight: 800; overflow-wrap: anywhere; }
.side-post img + b { padding-top: 0; }
.side-post b:first-child { padding-top: 10px; }
/* The strip on a narrow screen: one row of cards, swiped sideways. */
.side-strip:not([hidden]) {
  display: flex; gap: 10px; margin-top: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 6px; scrollbar-width: thin;
}
.side-strip .side-post { flex: 0 0 min(62%, 220px); scroll-snap-align: start; }
