@import url('/fonts/game.css');
@import url('/fonts/fonts.css');
@import url('/fonts/poppins.css');

/*
 * «سهرة» (Nasser's choice, 2026-10-20): one design, night and day. The phone's setting decides first, then the
 * player's choice in the menu (data-theme on <html>, kept on the device).
 * Layout: one centred column, phone first; tablet and desktop keep the same column with room around it.
 */
:root {
  /* «برنامج المسابقات» (Nasser 2026-10-22, nhmsv docs/BUS_COMPLETE.md §2أ): stage navy, spotlight gold, buzzer red. */
  --navy: #0b1d51;
  --navy-2: #13286b;
  --on-navy: #ffffff;
  --gold: #ffb800;
  --gold-2: #ffd24d;
  --buzzer: #ff3b30;
  --buzzer-shadow: #b3241c;
  --on-buzzer: #ffffff;
  --rays: rgba(255, 210, 77, 0.07);
  --bg: #eef2ff;
  --surface: #ffffff;
  --mine: #fff4cc;
  --line: #d6ddf5;
  --ink: #0b1d51;
  --muted: #4b5a86;
  --accent: #ffb800;
  --on-accent: #0b1d51;
  --letter: #13286b;
  --ok: #16a34a;
  --on-ok: #ffffff;
  --bad: #e5281d;
  --on-bad: #ffffff;
  --scrim: rgba(11, 29, 81, 0.35);
  --menu: #ffffff;
  --shadow: 0 12px 32px rgba(11, 29, 81, 0.18);
  --silver: #c9d1ea;
  --bronze: #d08a5c;
  --band: #e3e9fb;
  --soft: #fff1c2;
  /* One Arabic font in the four games, Tajawal, and Poppins for Latin and digits (GAMES_PHASE2_SPEC §2); Lalezar stays the
     display face of the letters (the game's identity). */
  --font: 'Poppins', 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* game-ui 1.0.0 colour names (nhmsv shared/game-ui), from this game's identity: the buzzer red, darkened to 4.5:1. */
  --brand: #d92d20;
  --brand-ink: #b3241c;
  --on-brand: #ffffff;
  --display: 'Lalezar', 'Tajawal', system-ui, sans-serif;
  color-scheme: light;
}
:root[data-theme="night"] {
  --bg: #08153d;
  --surface: #13286b;
  --mine: #2b3060;
  --line: #24397f;
  --ink: #eef2ff;
  --muted: #a9b6dd;
  --letter: #ffd24d;
  --on-accent: #0b1d51;
  --ok: #4ade80;
  --on-ok: #0b1f12;
  --bad: #ff6b61;
  --on-bad: #2a0d0a;
  --scrim: rgba(3, 8, 24, 0.6);
  --menu: #13286b;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --band: #0e1d4f;
  --soft: #2e2a4a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100dvh; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.55; -webkit-tap-highlight-color: transparent; }
a { color: var(--letter); }
p, h1, h2 { margin: 0; }
h1 { font-size: 32px; font-weight: 800; line-height: 1.3; text-wrap: balance; }
h2 { font-size: 19px; font-weight: 700; }
.hidden { display: none !important; }
.center { text-align: center; }
.muted { color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* ---- Shell: top bar with the menu ----------------------------------------------------------------------- */
/* The bar stays at the top while the page scrolls (Nasser 2026-10-23). */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding-block: max(14px, env(safe-area-inset-top)) 10px; padding-inline: max(20px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right)); max-width: 560px; margin-inline: auto; }
.brand { display: flex; align-items: center; gap: 10px; flex: 1; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 18px; }
.icon-button { width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 2px solid transparent; border-radius: 22px; background: var(--surface); color: var(--ink); padding: 0; cursor: pointer; }
.icon-button[aria-expanded="true"] { border-color: var(--accent); }
.icon-button svg { width: 22px; height: 22px; }
.menu-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 20; }
.menu { position: fixed; inset-block-start: calc(max(14px, env(safe-area-inset-top)) + 54px); inset-inline-end: max(16px, calc((100vw - 560px) / 2 + 16px)); z-index: 21; width: min(270px, calc(100vw - 32px)); display: flex; flex-direction: column; padding: 8px; background: var(--menu); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.menu-item { display: flex; align-items: center; gap: 12px; min-height: 52px; padding-inline: 12px; border: 0; border-radius: 14px; background: transparent; color: var(--ink); font: inherit; font-size: 16px; text-align: start; text-decoration: none; cursor: pointer; }
.menu-item:hover, .menu-item:focus-visible { background: var(--bg); }
.menu-item svg { width: 20px; height: 20px; flex: none; }
.menu-item span { flex: 1; }
.menu-item.danger { color: var(--bad); font-weight: 700; }
.menu-sep { height: 1px; margin: 4px 8px; background: var(--line); }
.menu-note { padding: 0 12px 6px; font-size: 13px; color: var(--muted); }
.switch { width: 44px; height: 26px; flex: none; border-radius: 13px; background: var(--line); display: flex; align-items: center; justify-content: flex-end; padding: 0 3px; }
.switch::after { content: ""; width: 20px; height: 20px; border-radius: 10px; background: var(--surface); }
[aria-checked="true"] > .switch { background: var(--accent); justify-content: flex-start; }
[aria-checked="true"] > .switch::after { background: var(--on-accent); }

/* ---- Page column ------------------------------------------------------------------------------------------ */
.wrap { max-width: 560px; margin-inline: auto; padding-block: 8px max(24px, env(safe-area-inset-bottom)); padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right)); display: flex; flex-direction: column; gap: 16px; }
/* Offline: a banner at the top (shell.js / app.js), the page stays as it was. */
.offline-banner { position: sticky; top: 0; z-index: 25; margin: 0; padding: 10px 16px; text-align: center; background: var(--bad); color: var(--on-bad); font-size: 15px; font-weight: 700; }
.card { background: var(--surface); border-radius: 26px; padding: 20px; }
.alert { background: var(--bad); color: var(--on-bad); border-radius: 18px; padding: 12px 16px; font-weight: 700; }
.note { background: var(--mine); border-radius: 18px; padding: 12px 16px; }

/* ---- Controls --------------------------------------------------------------------------------------------- */
label { font-size: 14px; font-weight: 500; color: var(--muted); }
input, select { font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 29px; height: 58px; padding: 0 22px; width: 100%; font-size: 19px; }
input:focus, select:focus { outline: none; border-color: var(--accent); }
button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.code-input { height: 74px; border-radius: 37px; text-align: center; font-size: 34px; font-weight: 800; letter-spacing: 0.25em; direction: ltr; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
.primary, .ghost, a.button, .danger-outline { display: flex; align-items: center; justify-content: center; min-height: 60px; padding: 0 22px; border-radius: 32px; font-size: 19px; font-weight: 800; text-decoration: none; border: 0; }
.primary { background: var(--accent); color: var(--on-accent); }
.primary:disabled { opacity: 0.45; }
.ghost, a.button.ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); font-weight: 700; font-size: 16px; min-height: 52px; }
.danger-outline { background: transparent; color: var(--bad); border: 2px solid var(--bad); font-weight: 700; font-size: 16px; min-height: 52px; }
.row-buttons { display: flex; gap: 10px; }
.row-buttons > * { flex: 1; }
.link-button { background: none; border: 0; padding: 6px; color: var(--muted); font-size: 14px; text-decoration: underline; }

/* ---- Join ------------------------------------------------------------------------------------------------- */
.join { min-height: calc(100dvh - 110px); display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.join-form { display: flex; flex-direction: column; gap: 22px; margin-block: auto; }
.field-group { display: flex; flex-direction: column; gap: 8px; }

/* ---- Lobby ------------------------------------------------------------------------------------------------ */
.code-card { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.code { font-size: 44px; font-weight: 800; letter-spacing: 0.2em; direction: ltr; color: var(--letter); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 14px; border-radius: 18px; background: var(--surface); font-size: 15px; border: 0; color: var(--ink); }
.chip.me { font-weight: 800; }
.chip.lead { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.chip.count { background: transparent; border: 2px dashed var(--line); color: var(--muted); }
.chip .x { margin-inline-start: 6px; color: var(--muted); }
.player-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.player-list li { display: flex; align-items: center; justify-content: space-between; min-height: 54px; padding: 0 20px; background: var(--surface); border-radius: 27px; }
.tag { font-size: 13px; color: var(--on-accent); background: var(--accent); border-radius: 999px; padding: 2px 10px; font-weight: 700; }
.settings { display: flex; flex-direction: column; padding: 6px 18px; background: var(--surface); border-radius: 26px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 66px; border-bottom: 1px solid var(--line); }
.setting:last-child { border-bottom: 0; }
.setting > span { font-size: 16px; font-weight: 700; }
.setting.block-setting { flex-direction: column; align-items: stretch; padding-block: 14px; }
.segmented { display: flex; padding: 4px; background: var(--bg); border-radius: 20px; flex: none; }
.segmented button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 16px; background: transparent; color: var(--muted); font-size: 15px; }
.segmented button[aria-checked="true"] { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 40px; height: 40px; border: 2px solid var(--line); border-radius: 20px; background: transparent; color: var(--ink); font-size: 20px; }
.stepper output { min-width: 28px; text-align: center; font-size: 22px; font-weight: 800; }
.stepper .stepper-value { width: auto; min-width: 52px; padding: 0 12px; border-color: var(--accent); background: var(--soft); font-size: 22px; font-weight: 800; }
.rounds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.rounds-grid button { height: 48px; min-height: 0; padding: 0; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font-size: 18px; font-weight: 700; }
.rounds-grid button:disabled { opacity: 0.35; }
.rounds-grid button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.toggle { border: 0; background: transparent; padding: 0; }
.toggle .switch { width: 50px; height: 30px; border-radius: 15px; }
.toggle .switch::after { width: 24px; height: 24px; border-radius: 12px; }
.points-edit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-block: 12px 4px; }
.points-edit label { display: flex; flex-direction: column; gap: 6px; }
.points-edit input { height: 48px; border-radius: 24px; text-align: center; }
.points-edit .wide { grid-column: 1 / -1; }
.letters-off { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; padding-block: 10px 4px; }
.letters-off button { height: 40px; border: 0; border-radius: 12px; background: var(--bg); color: var(--ink); font-size: 18px; font-weight: 700; }
.letters-off.en button { text-transform: uppercase; }
.letters-off button[aria-pressed="false"] { background: transparent; border: 2px dashed var(--line); color: var(--muted); text-decoration: line-through; }
.hint { font-size: 13px; color: var(--muted); }

/* ---- Screens with a fixed head and foot (letter picker, correction) ---------------------------------------- */
.screen { height: var(--vh, 100dvh); display: flex; flex-direction: column; width: 100%; max-width: 560px; margin-inline: auto; }
.screen-head { flex: none; display: flex; align-items: center; gap: 12px; padding-block: max(14px, env(safe-area-inset-top)) 6px; padding-inline: max(20px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right)); }
.screen-head .titles { flex: 1; display: flex; flex-direction: column; }
.screen-head .kicker { font-size: 13px; color: var(--muted); }
.screen-head .title { font-size: 24px; font-weight: 800; line-height: 1.3; }
.screen-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right)); padding-block-end: 8px; }
.screen-foot { flex: none; display: flex; flex-direction: column; gap: 10px; padding-block: 12px max(22px, env(safe-area-inset-bottom)); padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right)); background: var(--bg); }
body.full .top { display: none; }
body.full .wrap { max-width: none; padding: 0; }
.legend { display: flex; gap: 14px; padding: 6px 0 12px; font-size: 13px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 6px; background: var(--accent); }
.dot.played { background: var(--line); }
.dot.today { background: transparent; box-shadow: 0 0 0 2px var(--gold, #ffb800) inset; }
.dot.off { background: transparent; border: 2px dashed var(--line); }
.letter-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.letter-grid button { height: 56px; border: 0; border-radius: 18px; background: var(--surface); color: var(--ink); font-size: 26px; font-weight: 800; transition: transform 0.15s; }
.letter-grid.en button { text-transform: uppercase; }
.letter-grid button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); transform: scale(1.06); }
.letter-grid button.played { background: var(--line); color: var(--muted); text-decoration: line-through; }
.letter-grid button.off { background: transparent; border: 2px dashed var(--line); color: var(--muted); }
.letter-grid button:disabled { cursor: default; }

/* ---- Round (one screen, no scroll) ------------------------------------------------------------------------ */
.round-screen { position: relative; min-height: var(--vh, 100dvh); max-width: 560px; margin-inline: auto; display: flex; flex-direction: column; padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right)); padding-block-start: max(8px, env(safe-area-inset-top)); }
.round-menu { position: absolute; inset-block-start: max(10px, env(safe-area-inset-top)); inset-inline-end: 12px; z-index: 5; }
.round-menu .icon-button { background: transparent; color: var(--muted); }
.round-letter { flex: none; text-align: center; }
.letter { font-size: clamp(64px, 15vh, 132px); line-height: 1.35; font-weight: 800; color: var(--letter); min-height: 1em; }
.letter.en { text-transform: uppercase; }
.countdown { font-size: clamp(48px, 12vh, 104px); line-height: 1.2; font-weight: 800; color: var(--muted); }
.round-fields { flex: none; display: flex; flex-direction: column; gap: clamp(6px, 1.2vh, 10px); padding-block: 4px; }
.round-field { display: flex; align-items: center; gap: 12px; flex: none; height: clamp(52px, 7vh, 60px); padding-inline: 20px; background: var(--surface); border: 2px solid var(--line); border-radius: 30px; }
.round-field:focus-within { border-color: var(--accent); }
.round-field span { width: 52px; flex: none; font-size: 15px; font-weight: 500; color: var(--muted); }
.round-field:focus-within span { color: var(--letter); font-weight: 700; }
.round-field input { flex: 1; min-width: 0; height: 100%; border: 0; border-radius: 0; background: transparent; padding: 0; font-size: 21px; font-weight: 500; }
.round-action { flex: none; padding-block: 16px max(18px, env(safe-area-inset-bottom)); scroll-margin-bottom: 16px; }
/* Until all six fields are filled: dots and how many are left. Then «بس!» arrives, large and glowing. */
.bus-hint { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; padding: 0 18px; border: 2px dashed var(--line); border-radius: 28px; color: var(--muted); font-size: 15px; }
.bus-dots { display: flex; gap: 5px; flex: none; }
.bus-dots i { width: 9px; height: 9px; border-radius: 5px; background: var(--line); }
.bus-dots i.on { background: var(--accent); }
.bus.pop { animation: pop 0.5s cubic-bezier(.2, .8, .2, 1) both, glow 1.6s 0.5s ease-in-out infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 6px 0 var(--buzzer-shadow), 0 0 0 0 rgba(255, 59, 48, 0.55); } 50% { box-shadow: 0 6px 0 var(--buzzer-shadow), 0 0 0 12px rgba(255, 59, 48, 0); } }
.bus { width: 100%; height: 68px; border: 0; border-radius: 34px; background: var(--accent); color: var(--on-accent); font-size: 30px; font-weight: 800; line-height: 1; display: flex; align-items: center; justify-content: center; padding: 0; }
.bus:disabled { opacity: 0.45; }
.round-wait { text-align: center; margin-block-start: 24px; }
.locked-screen { min-height: 70dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.big { font-size: 24px; font-weight: 800; }
@media (max-height: 560px) {
  .letter { font-size: 48px; }
}

/* ---- Correction ------------------------------------------------------------------------------------------- */
.letter-badge { width: 52px; height: 52px; flex: none; border-radius: 26px; background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800; color: var(--letter); }
.letter-badge.en { text-transform: uppercase; }
.wiki-link { margin-inline-start: 8px; font-size: 12px; font-weight: 600; color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; vertical-align: middle; white-space: nowrap; }
.wiki-link::before { content: '🔎 '; }
.pts { font-size: 14px; font-weight: 700; }
.pts.ok { color: var(--ok); }
.pts.bad { color: var(--bad); }
.pts.wait { color: var(--letter); }
.verdict-btn { width: 52px; height: 44px; flex: none; border: 2px solid var(--line); border-radius: 22px; background: transparent; color: var(--muted); font-size: 20px; }
.verdict-btn.ok[aria-pressed="true"] { background: var(--ok); color: var(--on-ok); border-color: var(--ok); }
.verdict-btn.bad[aria-pressed="true"] { background: var(--bad); color: var(--on-bad); border-color: var(--bad); }
.merge { height: 36px; width: auto; max-width: 50%; padding: 0 12px; border: 1px solid var(--line); border-radius: 18px; background: transparent; font-size: 14px; }
.tally { display: flex; flex-direction: column; gap: 6px; }
.tally-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.tally-chips span { flex: none; padding: 6px 12px; border-radius: 16px; background: var(--surface); font-size: 14px; }
.tally-chips b { margin-inline-start: 4px; direction: ltr; unicode-bidi: isolate; }
.tally-chips b.neg { color: var(--bad); }
.my-points { display: flex; align-items: baseline; justify-content: space-between; padding: 16px 22px; background: var(--surface); border-radius: 26px; }
.my-points b { font-size: 34px; font-weight: 800; color: var(--letter); direction: ltr; unicode-bidi: isolate; }
.nav-buttons { display: flex; gap: 10px; }
.nav-buttons .ghost { flex: none; width: 108px; min-height: 60px; }
.nav-buttons .primary { flex: 1; }

/* ---- Results and honour board ----------------------------------------------------------------------------- */
.headline { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding-block: 4px 18px; }
.lead-name { font-size: 46px; font-weight: 800; color: var(--letter); line-height: 1.2; }
.standings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.standings li { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 20px; background: var(--surface); border-radius: 29px; }
.standings li.first { min-height: 66px; background: var(--mine); border: 2px solid var(--accent); }
.standings .place { width: 22px; font-weight: 800; color: var(--muted); }
.standings li.first .place { color: var(--letter); }
.standings .who { flex: 1; font-size: 18px; }
.standings li.first .who, .standings li.me .who { font-weight: 700; }
.standings .gain { font-size: 14px; color: var(--muted); direction: ltr; unicode-bidi: isolate; }
.standings .neg { color: var(--bad); }
.standings .bonus { font-size: 13px; color: var(--on-accent); background: var(--accent); border-radius: 999px; padding: 3px 9px; font-weight: 800; }
.standings .total { min-width: 46px; text-align: end; font-size: 21px; font-weight: 800; direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; }
.podium > div { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.medal { width: 44px; height: 44px; border-radius: 22px; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; color: #12141c; }
.medal.p1 { width: 56px; height: 56px; border-radius: 28px; font-size: 26px; background: var(--accent); color: var(--on-accent); }
.medal.p2 { background: var(--silver); }
.medal.p3 { background: var(--bronze); }
.podium .name { font-size: 17px; font-weight: 700; text-align: center; overflow-wrap: anywhere; }
.podium .p1-col .name { font-size: 20px; font-weight: 800; }
.block { width: 100%; border-radius: 20px 20px 8px 8px; background: var(--surface); display: flex; justify-content: center; padding-top: 14px; font-size: 24px; font-weight: 800; direction: ltr; }
.block.b1 { height: 170px; background: var(--mine); border: 2px solid var(--accent); color: var(--letter); font-size: 30px; }
.block.b2 { height: 120px; }
.block.b3 { height: 90px; }
.crown { width: 40px; height: 28px; fill: var(--accent); }

/* ---- Motion (off when the device asks for less motion) ---------------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes pop { 0% { transform: scale(0.4); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes flash { from { box-shadow: 0 0 0 6px var(--accent); } to { box-shadow: 0 0 0 0 transparent; } }
.reveal > * { animation: rise 0.45s cubic-bezier(.2, .8, .2, 1) both; }
.pop { animation: pop 0.5s cubic-bezier(.2, .8, .2, 1) both; }
.podium .block { transform-origin: bottom; animation: grow 0.8s cubic-bezier(.2, .8, .2, 1) both; }
.podium .p3-col .block { animation-delay: 0.2s; }
.podium .p2-col .block { animation-delay: 0.5s; }
.podium .p1-col .block { animation-delay: 0.9s; }
.podium .p1-col .medal, .podium .p1-col .crown { animation: pop 0.6s 1.5s cubic-bezier(.2, .8, .2, 1) both; }
.changed { animation: flash 0.7s ease-out; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- Tablet and desktop ----------------------------------------------------------------------------------- */
@media (min-width: 768px) {
  .wrap { padding-block-start: 24px; }
  .round-screen { padding-block-start: 24px; }
}

/* ---- Plans and invoices ----------------------------------------------------------------------------------- */
.small { font-size: 14px; }
.plan-now { display: flex; flex-direction: column; gap: 2px; }
.plan-now strong { font-size: 19px; }
.plan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.plan { display: flex; flex-direction: column; gap: 12px; }
.plan-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.plan-price { font-size: 22px; font-weight: 800; color: var(--letter); white-space: nowrap; }
.order-row { display: flex; flex-direction: column; gap: 6px; padding-block: 16px; }
.order-badge { padding: 2px 10px; border-radius: 12px; background: var(--bg); color: var(--muted); white-space: nowrap; }
.order-badge.order-paid { background: var(--ok); color: var(--on-ok); }
.order-badge.order-refunded, .order-badge.order-rejected { background: var(--bad); color: var(--on-bad); }
.order-mark { width: 72px; height: 72px; margin-inline: auto; border-radius: 36px; display: flex; align-items: center; justify-content: center; font-size: 36px; font-weight: 800; background: var(--bg); color: var(--muted); }
.order-paid .order-mark { background: var(--ok); color: var(--on-ok); }
.order-expired .order-mark, .order-cancelled .order-mark, .order-rejected .order-mark, .order-refunded .order-mark { background: var(--bad); color: var(--on-bad); }

/* ---- Footer and privacy ----------------------------------------------------------------------------------- */
.foot { text-align: center; padding: 8px 20px max(20px, env(safe-area-inset-bottom)); font-size: 14px; }
.foot a { color: var(--muted); }
.privacy h2 { margin-top: 6px; }
.cookie-list { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 6px; }
.cookie-list code { font-weight: 700; }

/* ---- Inviting players: code, QR and share options; dialogs ------------------------------------------------- */
.share-card { display: flex; flex-direction: column; gap: 14px; }
.screen-open { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.screen-open svg { width: 20px; height: 20px; }
.share-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.share-code { display: flex; flex-direction: column; gap: 2px; }
.share-code .code { font-size: 44px; line-height: 1.1; }
.share-link { font-size: 14px; overflow-wrap: anywhere; }
.qr-button { border: 0; padding: 6px; background: #fff; border-radius: 16px; cursor: zoom-in; line-height: 0; flex: none; }
.qr { display: block; width: 120px; height: 120px; image-rendering: pixelated; }
.qr.big { width: min(70vw, 60vh, 420px); height: auto; aspect-ratio: 1; background: #fff; border-radius: 18px; padding: 10px; }
.overlay { position: fixed; inset: 0; z-index: 40; background: var(--scrim); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade-in 0.15s ease-out; }
.big-share { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px; border-radius: 28px; background: var(--surface); text-align: center; max-width: 520px; width: 100%; }
.big-share .code { font-size: clamp(44px, 9vw, 80px); letter-spacing: 0.2em; }
.dialog { width: min(420px, 100%); }
.dialog .row-buttons > * { font-size: 17px; padding: 0 14px; white-space: nowrap; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .overlay { animation: none; } }

/* ---- Wide screens: header links (desktop design approved by Nasser, 2026-10-20) ---------------------------- */
.top-nav, .top-links { display: none; }
.icon-button.outline { background: transparent; border: 1px solid var(--line); }
.pill { display: inline-flex; align-items: center; height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 22px; color: var(--ink); font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap; }
@media (min-width: 900px) {
  .top { max-width: 1160px; gap: 22px; padding-inline: 24px; }
  .brand { flex: none; font-size: 20px; }
  .top-nav { display: flex; flex: 1; gap: 24px; font-size: 16px; }
  .top-nav a { color: var(--muted); text-decoration: none; }
  .top-nav a:hover { color: var(--ink); }
  .top-links { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
  .top-nav + .top-links { margin-inline-start: 0; }
  .top-links > a:first-child { color: var(--muted); font-size: 15px; text-decoration: none; padding-inline: 6px; }
  .top-links .icon-button svg { width: 20px; height: 20px; }
}

/* ---- Home page --------------------------------------------------------------------------------------------- */
body.landing-page .wrap { max-width: none; padding: 0; gap: 0; }
body.landing-page .top { position: sticky; top: 0; z-index: 10; background: var(--bg); }
.landing h2 { font-size: 30px; font-weight: 800; line-height: 1.3; }
.landing h3 { margin: 0; font-size: 19px; font-weight: 800; }
.landing p { line-height: 1.75; }
.landing [id] { scroll-margin-top: 80px; }
.badge { align-self: flex-start; display: inline-block; padding: 6px 14px; border-radius: 16px; background: var(--soft); color: var(--letter); font-size: 14px; font-weight: 700; }
.section { max-width: 1160px; margin-inline: auto; padding: 56px 20px; display: flex; flex-direction: column; gap: 28px; }
.section.narrow { max-width: 860px; }
.section-head { display: flex; flex-direction: column; gap: 6px; text-align: center; }
.band { background: var(--band); }
.hero { max-width: 1160px; margin-inline: auto; padding: 24px 20px 48px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; }
.hero-text { display: flex; flex-direction: column; gap: 20px; }
.hero-title { font-size: clamp(34px, 5vw, 54px); line-height: 1.25; }
.hero-title span { display: block; color: var(--letter); }
.lead { font-size: 18px; color: var(--muted); max-width: 40em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-cta > * { flex: 1 1 200px; }
.join-card { display: flex; flex-direction: column; gap: 18px; border: 1px solid var(--line); }
.join-card h2 { font-size: 22px; }
.join-card .join-form { margin: 0; gap: 16px; }
.hero-art { display: none; }
.steps, .features, .price-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.steps li, .features li { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); }
.step-no { width: 44px; height: 44px; border-radius: 22px; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; }
.feature-icon { width: 48px; height: 48px; border-radius: 16px; background: var(--soft); color: var(--letter); display: flex; align-items: center; justify-content: center; }
.feature-icon svg { width: 24px; height: 24px; }
.price-card { display: flex; flex-direction: column; gap: 14px; border: 1px solid var(--line); }
.price-card.featured { border: 2px solid var(--accent); }
.price-card .price { font-size: 34px; font-weight: 800; color: var(--letter); }
.price-card .button { margin-top: auto; }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
.ticks li::before { content: "✓"; color: var(--ok); font-weight: 800; margin-inline-end: 8px; }
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { border: 1px solid var(--line); padding: 0; }
.faq summary { padding: 18px 22px; font-size: 18px; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--letter); font-weight: 800; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 22px 18px; }
.cta-band { padding: 32px; border-radius: 32px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.cta-band > div { display: flex; flex-direction: column; gap: 6px; }
.cta-band strong { font-size: 28px; font-weight: 800; }
.cta-band span { color: var(--muted); font-size: 18px; }
body.landing-page .foot { max-width: 1160px; margin-inline: auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 24px 20px; border-top: 1px solid var(--line); color: var(--muted); }

@media (min-width: 640px) {
  .steps, .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); padding: 56px 24px 80px; gap: 56px; }
  .section { padding: 80px 24px; gap: 36px; }
  .landing h2 { font-size: 38px; }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .features { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .price-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .steps li, .features li, .price-card { padding: 26px; }
  .cta-band { padding: 44px; }
  .cta-band strong { font-size: 34px; }

  /* The phone in the hero shows a round in play; decoration only (aria-hidden). */
  .hero-art { display: block; position: relative; min-height: 620px; }
  .phone { position: absolute; inset-inline-start: 50%; transform: translateX(50%); top: 0; width: 290px; padding: 22px 18px; border: 10px solid var(--line); border-radius: 44px; background: var(--bg); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 9px; }
  [dir="ltr"] .phone { transform: translateX(-50%); }
  .phone-letter { text-align: center; font-size: 84px; line-height: 1.3; font-weight: 800; color: var(--letter); }
  .phone-field { display: flex; align-items: center; gap: 10px; height: 46px; padding-inline: 16px; background: var(--surface); border: 2px solid var(--line); border-radius: 23px; }
  .phone-field span { width: 46px; font-size: 13px; color: var(--muted); }
  .phone-field b { font-size: 17px; font-weight: 700; }
  .phone-bus { margin-top: 6px; height: 54px; border-radius: 27px; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; }
  .float-card { position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
  .results-card { inset-inline-end: 0; bottom: -24px; width: 220px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
  .results-card span { display: flex; justify-content: space-between; }
  .results-card span.first { color: var(--letter); font-weight: 800; }
  .results-card i { font-style: normal; }
  .bus-chip { inset-inline-start: 0; top: 70px; padding: 10px 16px; font-weight: 700; color: var(--letter); }
}

/* ---- Coordinator lobby on a computer or TV: invitation on one side, players and settings on the other ------- */
@media (min-width: 900px) {
  body.wide .wrap { max-width: 1320px; padding-inline: 32px; }
  .coord-lobby { display: grid; grid-template-columns: minmax(360px, 440px) minmax(0, 1fr); gap: 28px; align-items: stretch; }
  .coord-lobby .lobby-share { position: sticky; top: 16px; }
  .coord-lobby .share-card { padding: 28px; align-items: stretch; border: 1px solid var(--line); }
  .coord-lobby .share-top { flex-direction: column-reverse; gap: 18px; }
  .coord-lobby .qr-button { align-self: center; padding: 14px; border-radius: 22px; }
  .coord-lobby .qr { width: 240px; height: 240px; }
  .coord-lobby .share-code { align-items: center; text-align: center; }
  .coord-lobby .share-code .code { font-size: 64px; }
  .coord-lobby .chips .chip { font-size: 17px; padding: 10px 18px; }
}

/* ---- Coordinator account pages: sign in, new account, reset, verify ---------------------------------------- */
.auth { width: 100%; max-width: 460px; margin-inline: auto; display: flex; flex-direction: column; gap: 18px; padding-block: 8px 12px; }
.auth-card { display: flex; flex-direction: column; gap: 20px; padding: 28px 24px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.auth-head { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.auth-head img { width: 56px; height: 56px; border-radius: 16px; margin-bottom: 4px; }
.auth-head h1 { font-size: 28px; }
.auth-head p { font-size: 15px; max-width: 30em; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form .primary { margin-top: 4px; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.label-row a { font-size: 14px; }
.password-field { position: relative; }
.password-field input { display: block; padding-inline-end: 56px; }
.pw-reveal { position: absolute; inset-block: 0; inset-inline-end: 6px; margin-block: auto; width: 46px; height: 46px; border: 0; border-radius: 23px; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.pw-reveal svg { width: 22px; height: 22px; }
.pw-reveal[aria-pressed="true"] { color: var(--letter); }
.auth-sep { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.auth-sep::before, .auth-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth .center a { color: var(--muted); font-size: 15px; }
@media (min-width: 900px) {
  .auth { padding-block: 40px; }
  .auth-card { padding: 36px 36px 32px; }
}

/* ---- Round: the letter large at first, then in the top bar (Nasser 2026-10-21) ------------------------------- */
.round-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding-block: 6px 12px; }
.round-logo { display: flex; justify-content: flex-start; }
.round-logo img { width: 36px; height: 36px; border-radius: 10px; }
.round-bar-end { display: flex; justify-content: flex-end; }
.round-bar-end .icon-button { background: transparent; color: var(--muted); }
.letter-title { font-size: 26px; font-weight: 800; line-height: 1.3; white-space: nowrap; text-align: center; }
.letter-title .word { color: var(--muted); font-weight: 700; }
.letter-title .name { color: var(--letter); }
body.kids .letter-title { font-size: 32px; }
.letter-overlay { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: var(--bg); animation: fade-in 0.15s ease-out; }
.letter-overlay .letter { font-size: clamp(140px, 45vw, 280px); line-height: 1.2; }
.letter-overlay .countdown { font-size: clamp(96px, 30vw, 200px); }
.letter-overlay.flash { pointer-events: none; cursor: default; animation: letter-flash 0.7s ease-in both; }
@keyframes letter-flash { 0%, 55% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .letter-overlay.flash { animation: none; opacity: 0.92; } }
.letter-overlay .letter:empty, .letter-overlay .countdown:empty { display: none; }

/* ---- Narrow phones (≤ 380px): settings labels stay on one line beside their controls ------------------------ */
.setting > span { flex: 1; min-width: 0; }
@media (max-width: 380px) {
  .settings { padding-inline: 14px; }
  .segmented button { padding: 0 10px; font-size: 14px; }
  .share-code .code { font-size: 36px; }
  .qr { width: 100px; height: 100px; }
}

/* ---- Account in the menu; plan limits in the lobby and on the coordinator page ------------------------------ */
.menu form .menu-item { width: 100%; }
.plan-left { font-weight: 700; color: var(--letter); }
.limit { display: flex; flex-direction: column; gap: 10px; }
.meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.meter { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 18px; background: var(--surface); }
.meter .k { font-size: 13px; color: var(--muted); }
.meter .v { font-size: 18px; font-weight: 800; }
.meter .bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; display: flex; }
.meter .bar i { background: var(--accent); }
.meter.full .bar i { background: var(--bad); }
.meter.full .v { color: var(--bad); }
.limit .note { display: flex; flex-direction: column; gap: 10px; }

/* ---- Coordinator panel (Nasser 2026-10-21): tab bar at the bottom on phones, tabs under the header on a computer */
.stack-tight { display: flex; flex-direction: column; gap: 2px; }
.panel-nav { position: fixed; inset-inline: 0; bottom: 0; z-index: 15; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 6px max(8px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-bottom)); background: var(--menu); border-top: 1px solid var(--line); }
.panel-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 14px; color: var(--muted); font-size: 12px; text-decoration: none; }
.panel-nav svg { width: 24px; height: 24px; }
.panel-nav a[aria-current="page"] { color: var(--letter); font-weight: 800; }
.panel-nav a[aria-current="page"] svg { background: var(--soft); border-radius: 12px; padding: 2px 10px; width: 44px; box-sizing: content-box; height: 22px; }
body.has-panel .wrap { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
body.has-panel .foot { display: none; }
.panel-page h1 { font-size: 28px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel-head a { font-size: 15px; }
.small-button { min-height: 44px; font-size: 15px; padding: 0 18px; }
.plan-card { display: flex; flex-direction: column; gap: 14px; border: 1px solid var(--line); }
.resume { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink); text-decoration: none; border: 2px solid var(--accent); }
.resume b { color: var(--letter); white-space: nowrap; }
.session-list, .round-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.session-row { display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none; border: 1px solid var(--line); }
.session-row:hover { border-color: var(--accent); }
.session-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.session-leader { font-size: 15px; font-weight: 700; color: var(--letter); }
.state-badge { padding: 3px 10px; border-radius: 12px; font-size: 13px; font-weight: 700; background: var(--bg); color: var(--muted); white-space: nowrap; }
.state-lobby, .state-playing_round, .state-round_results { background: var(--accent); color: var(--on-accent); }
.back-link { color: var(--muted); font-size: 15px; text-decoration: none; }
.round-history .card { display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--line); }
.round-history-head { display: flex; align-items: center; gap: 12px; }
.wrap-chips { flex-wrap: wrap; overflow: visible; }
.wrap-chips span { background: var(--bg); }
.wrap-chips b { margin-inline-start: 8px; }
.account-card { display: flex; align-items: center; gap: 14px; }
.avatar { width: 52px; height: 52px; flex: none; border-radius: 26px; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; }
.list-card { padding: 6px 18px; display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-size: 16px; text-decoration: none; text-align: start; cursor: pointer; padding: 0; }
.list-item:last-child { border-bottom: 0; }
.list-item b { color: var(--muted); font-weight: 500; }
@media (min-width: 900px) {
  .panel-nav { position: sticky; top: 0; bottom: auto; max-width: 560px; margin: 0 auto 8px; grid-template-columns: repeat(5, auto); justify-content: center; gap: 4px;
    padding: 6px; border: 1px solid var(--line); border-radius: 22px; }
  .panel-nav a { flex-direction: row; gap: 8px; padding: 8px 14px; font-size: 15px; }
  .panel-nav svg { width: 20px; height: 20px; }
  .panel-nav a[aria-current="page"] { background: var(--soft); }
  .panel-nav a[aria-current="page"] svg { background: none; padding: 0; width: 20px; height: 20px; }
  body.has-panel .wrap { padding-bottom: 32px; }
}

/* ---- The others' progress while the round is played: names and six dots, no answers (Nasser 2026-10-21) ------- */
.progress-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 0 10px; flex: none; }
.progress-strip:empty { display: none; }
.progress-chip { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 16px; background: var(--surface); font-size: 13px; }
.progress-chip b { font-weight: 700; }
.progress-chip.full { background: var(--mine); box-shadow: 0 0 0 2px var(--accent); }
.mini-dots { display: flex; gap: 3px; }
.mini-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); }
.mini-dots i.on { background: var(--accent); }
.progress-strip.big { flex-wrap: wrap; justify-content: center; padding-top: 24px; }
.progress-strip.big .progress-chip { font-size: 18px; padding: 10px 16px; }
.progress-strip.big .mini-dots i { width: 10px; height: 10px; border-radius: 5px; }
.list-note { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.session-close { display: flex; justify-content: flex-end; margin-top: -4px; }
.session-close .link-button { color: var(--bad); }

/* ---- The coordinator's screen, /s/<key> (TV / projector, Nasser 2026-10-21): large, readable from the room ----- */
body.screen-page .wrap { max-width: none; min-height: 100dvh; padding: clamp(16px, 3vw, 48px); }
.screen-show { min-height: calc(100dvh - 2 * clamp(16px, 3vw, 48px)); display: flex; flex-direction: column; cursor: default; }
.screen-show > section { flex: 1; }
.show-center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1vh; text-align: center; }
.show-logo { width: clamp(80px, 10vw, 160px); height: auto; border-radius: 24%; }
/* The drawn art (public/media/art, Nasser 2026-11-08: in code, in the identity's colours). */
.show-art { width: min(52vw, 70vh); height: auto; }
.show-title-logo { width: 1.1em; height: 1.1em; border-radius: 24%; vertical-align: -0.15em; margin-inline-end: 0.3em; }
.art-icon { width: 1.6em; height: 1.6em; vertical-align: middle; }
.show-award .icon .art-icon { width: clamp(34px, 3.4vw, 60px); height: auto; }
.show-kings-title { display: inline-flex; align-items: center; gap: 8px; }
.award-icon .art-icon { width: 34px; height: 34px; }
.field-art { width: 22px; height: 22px; vertical-align: -5px; margin-inline-end: 6px; }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-state img { width: 160px; height: auto; }
.empty-state p { margin: 0; }
.tv-entry-art { display: block; width: min(100%, 300px); height: auto; margin: 0 auto; }
body.screen-page:not(.show-day):not(.show-contrast) { background: url('/media/art/tv-bg.svg') center / cover no-repeat fixed, var(--navy); }
.stamp::before { content: ''; position: absolute; inset: -55% -14%; z-index: -1; background: url('/media/art/stamp.svg') center / contain no-repeat; }
.show-title { font-size: clamp(28px, 4vw, 64px); font-weight: 800; }
.show-muted { color: var(--muted); font-size: clamp(16px, 1.8vw, 30px); }
.show-brand { display: flex; align-items: center; gap: 12px; font-size: clamp(18px, 1.8vw, 28px); font-weight: 800; }
.show-brand img { width: clamp(32px, 3vw, 48px); height: auto; border-radius: 22%; }
.show-lobby { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 72px); align-items: center; }
.show-join { display: flex; flex-direction: column; align-items: center; gap: 1vh; padding: clamp(16px, 2.5vw, 40px); border-radius: 32px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.show-qr { width: min(34vw, 44vh); height: auto; aspect-ratio: 1; background: #fff; border-radius: 24px; padding: 14px; image-rendering: pixelated; }
.show-code { font-size: clamp(48px, min(8vw, 13vh), 140px); font-weight: 800; letter-spacing: 0.15em; color: var(--letter); direction: ltr; line-height: 1.1; }
.show-join-corner { position: fixed; inset-block-end: 2vh; inset-inline-end: 2vw; display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 10px; z-index: 5; }
.show-join-corner img { width: min(12vw, 18vh); height: auto; aspect-ratio: 1; background: #fff; border-radius: 8px; image-rendering: pixelated; }
.show-join-corner b { font-size: clamp(18px, 2vw, 32px); letter-spacing: 0.12em; color: var(--letter); direction: ltr; }
.show-link { font-size: clamp(16px, 1.8vw, 30px); color: var(--muted); }
.show-players { display: flex; flex-direction: column; gap: 2vh; }
.show-players h1 { font-size: clamp(36px, 5vw, 88px); }
.show-chips { display: flex; flex-wrap: wrap; gap: 12px; }
.show-chip { padding: 0.5em 1.1em; border-radius: 999px; background: var(--surface); font-size: clamp(18px, 2vw, 34px); font-weight: 700; animation: pop 0.4s both; }
.show-chip.lead { background: var(--accent); color: var(--on-accent); }
.show-countdown { font-size: clamp(120px, 30vh, 360px); font-weight: 800; color: var(--muted); line-height: 1; }
.show-letter { font-size: clamp(140px, 42vh, 480px); font-weight: 800; color: var(--letter); line-height: 1.35; }
.show-letter.small { font-size: clamp(100px, 28vh, 300px); }
.show-letter.en, .show-badge.en { text-transform: uppercase; }
.show-countdown:empty, .show-letter:empty { display: none; }
.show-review { display: flex; flex-direction: column; gap: 3vh; }
.show-review-head { display: flex; align-items: center; gap: 24px; }
.show-review-head h1 { font-size: clamp(32px, 4.5vw, 80px); }
.show-badge { width: clamp(72px, 8vw, 140px); height: clamp(72px, 8vw, 140px); border-radius: 50%; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; font-size: clamp(40px, 5vw, 90px); font-weight: 800; flex: none; }
.show-answers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.show-answers li { display: flex; flex-direction: column; gap: 6px; padding: 18px 24px; border-radius: 24px; background: var(--surface); border: 3px dashed var(--accent); }
.show-answers li.ok { border: 3px solid var(--ok); }
.show-answers li.bad { border: 3px solid var(--bad); opacity: 0.75; }
.show-answers b { font-size: clamp(24px, 2.6vw, 48px); }
.show-answers i { font-style: normal; font-weight: 700; font-size: clamp(16px, 1.5vw, 30px); color: var(--muted); }
.show-answers li.ok i { color: var(--ok); }
.show-answers li.bad i { color: var(--bad); }
.show-results { display: flex; flex-direction: column; align-items: center; gap: 2.5vh; text-align: center; }
.show-results h1 { font-size: clamp(36px, 5vw, 90px); }
.show-standings { list-style: none; margin: 0; padding: 0; width: min(100%, 1100px); display: flex; flex-direction: column; gap: 12px; }
.show-standings li { display: flex; align-items: center; gap: 20px; padding: 14px 28px; border-radius: 999px; background: var(--surface); font-size: clamp(20px, 2.4vw, 42px); }
.show-standings li.first { background: var(--mine); border: 3px solid var(--accent); }
.show-standings .place { width: 1.6em; font-weight: 800; color: var(--muted); }
.show-standings .who { flex: 1; text-align: start; font-weight: 700; }
.show-standings .gain { color: var(--muted); font-size: 0.7em; }
.show-standings .total { font-weight: 800; min-width: 3ch; text-align: end; }
.show-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: end; width: min(100%, 1100px); }
.show-podium .col { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.show-podium .name { font-size: clamp(22px, 2.6vw, 48px); font-weight: 800; }
.show-podium .block { width: 100%; display: flex; justify-content: center; padding-top: 18px; border-radius: 28px 28px 10px 10px; background: var(--surface); font-size: clamp(28px, 3vw, 56px); font-weight: 800; transform-origin: bottom; animation: grow 0.8s both; }
.show-podium .p1 .block { background: var(--mine); border: 3px solid var(--accent); color: var(--letter); }
/* The step's height follows its position, its colour the real place (ties share a colour, Nasser 2026-10-23). */
.show-podium .step1 .block { height: 34vh; }
.show-podium .step2 .block { height: 24vh; }
.show-podium .step3 .block { height: 17vh; }
/* With the awards under it, the podium is lower so the whole board fits one screen. */
.show-results.final .show-podium .step1 .block { height: 22vh; }
.show-results.final .show-podium .step2 .block { height: 15vh; }
.show-results.final .show-podium .step3 .block { height: 10vh; }
.show-results.final { gap: clamp(10px, 1.6vh, 22px); }
.show-results.final h1 { margin: 0; }
@media (max-width: 800px) {
  .show-lobby { grid-template-columns: 1fr; }
  .show-qr { width: min(70vw, 40vh); }
}
.screen-card { display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--line); }
.screen-url { padding: 10px 14px; border-radius: 14px; background: var(--bg); font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }

/* ---- Round time limit (Nasser 2026-10-21) ------------------------------------------------------------------- */
.round-bar-end { gap: 6px; align-items: center; }
.round-timer { min-width: 52px; padding: 4px 10px; border-radius: 14px; background: var(--surface); font-weight: 800; font-variant-numeric: tabular-nums; direction: ltr; text-align: center; }
.round-timer.urgent { background: var(--bad); color: var(--on-bad); animation: pop 0.4s; }

/* ---- The session's fields: presets and the coordinator's own (Nasser 2026-10-21) --------------------------- */
.preset-row { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 10px 6px; }
.preset-row .chip, .field-chips .chip { background: var(--bg); border: 0; cursor: pointer; }
.preset-row .chip.lead { background: var(--accent); color: var(--on-accent); }
.field-chips { padding-block: 6px; }
.field-add { display: flex; gap: 8px; }
.field-add input { height: 44px; border-radius: 22px; font-size: 16px; }
.field-add .small-button { flex: none; width: 52px; padding: 0; }
.round-field span { width: auto; min-width: 52px; max-width: 34%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Kids mode: bigger letters and text in the round (Nasser 2026-10-21) ------------------------------------ */
body.kids .round-field input { font-size: 25px; }
body.kids .round-field span { font-size: 17px; }
body.kids .letter-badge { width: 72px; height: 72px; font-size: 42px; }

/* ---- Appeals in correction: who objected, the votes, and the decision (Nasser 2026-10-21) ------------------- */
.appeal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.appeal .link-button { padding: 0; }
.appeal.open { padding: 8px 10px; border-radius: 14px; background: var(--soft); color: var(--ink); }
.appeal-head { font-weight: 700; }
.appeal-votes { flex: 1; white-space: nowrap; text-align: end; }
.appeal-actions { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.appeal-actions:empty { display: none; }
.appeal .chip { padding: 6px 12px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); font-size: 14px; }
.appeal .chip[aria-pressed="true"] { border-color: var(--accent); background: var(--mine); }
.appeal .chip.accept { border-color: var(--ok); }
.appeal.accepted b { color: var(--ok); }
.appeal.rejected b { color: var(--bad); }

/* ---- Team mode: the teams in the lobby, and their standings (Nasser 2026-10-21) ---------------------------- */
.teams-panel { display: flex; flex-direction: column; gap: 10px; }
.teams-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.team-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 18px; background: var(--surface); border: 2px solid var(--line); border-top-width: 6px; }
.team-card.team-0 { border-top-color: #d97706; }
.team-card.team-1 { border-top-color: #2563eb; }
.team-card.team-2 { border-top-color: #16a34a; }
.team-card.team-3 { border-top-color: #db2777; }
.team-card.team-4 { border-top-color: #7c3aed; }
.team-card.team-5 { border-top-color: #0891b2; }
.team-head { display: flex; align-items: center; gap: 6px; }
.team-head b { flex: 1; }
.team-name { flex: 1; min-width: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: inherit; font: inherit; font-weight: 700; }
.team-members { display: flex; flex-wrap: wrap; gap: 6px; }
.team-members .chip { font-size: 14px; }
.team-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.team-actions button { flex: 1; }
.team-standings h2 { margin: 0 0 8px; font-size: 18px; }
.team-standings .who small { font-weight: 400; }
.team-winner { font-size: 20px; font-weight: 800; }


/* Offers and coupons on the plans (Nasser 2026-10-21): the old price struck through, the saving, the offer's badge. */
.was { font-size: 0.6em; font-weight: 600; color: var(--muted); margin-inline-end: 6px; }
.saving { margin: 0; font-weight: 700; color: var(--letter); }
.badge.offer { background: var(--accent); color: var(--on-accent); }
.coupon-form { display: flex; flex-direction: column; gap: 8px; }
.coupon-form .row { display: flex; gap: 8px; }
.coupon-form input { flex: 1; min-width: 0; text-transform: uppercase; }
.coupon-form p { margin: 0; }

/* The winner's coupon on the honour board (only on the winner's phone). */
.winner-coupon { display: flex; flex-direction: column; gap: 10px; border: 2px dashed var(--accent); text-align: center; }
.winner-coupon p { margin: 0; }
.winner-code { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.winner-code code { font-size: 26px; font-weight: 800; letter-spacing: 3px; color: var(--letter); }
.winner-budget { margin: 0; }

/* «شاهد كيف تلعب» on the coordinator's page: the how-to video, folded until opened. */
.howto summary { cursor: pointer; font-weight: 700; }
.howto video { display: block; width: 100%; max-width: 280px; aspect-ratio: 9 / 16; margin: 12px auto 0; border-radius: 16px; background: #000; }

/* The screen's round board (Nasser 2026-10-21): who filled which box, never what. «race»: the three leaders large,
   then everyone else in lanes; «table»: one row per player. Boxes: empty, typing (dashed, three dots), done (lit). */
.show-play { display: flex; flex-direction: column; gap: 2.2vh; }
.show-round-head { display: flex; align-items: center; gap: 24px; }
.show-round-head .show-title { margin: 0; }
.show-round-head .show-muted { margin: 0; }
.show-spacer { flex: 1; }
.show-timer { font-size: clamp(28px, 4vw, 64px); font-weight: 800; font-variant-numeric: tabular-nums; }
.show-timer:empty { display: none; }
.show-board { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 1.4vh; }
.show-board[hidden] { display: none; }
.cell { display: flex; align-items: flex-end; justify-content: center; min-height: 0; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); position: relative; color: var(--muted); font-weight: 700; }
.cell.done { background: linear-gradient(180deg, #f8c64b, #e0a21c); border-color: #f8c64b; color: #3a2a06; box-shadow: 0 0 18px rgba(245, 184, 46, 0.35); }
.cell.typing { background: rgba(245, 184, 46, 0.1); border: 3px dashed var(--accent); color: var(--accent); }
.cell.typing::after { content: ''; position: absolute; inset: 0; margin: auto; width: 48px; height: 12px; background: radial-gradient(circle, var(--accent) 5px, transparent 6px) 0 0 / 16px 12px repeat-x; animation: typing 1s infinite alternate; }
@keyframes typing { from { opacity: 0.35; } to { opacity: 1; } }
.show-count { display: inline-flex; align-items: center; justify-content: center; min-width: 4.2em; padding: 0.3em 0.6em; border-radius: 999px; font-weight: 800; font-variant-numeric: tabular-nums; direction: ltr; }
.heat0 { background: var(--surface); color: var(--muted); } .heat1 { background: #3b3420; color: #f5d27a; } .heat2 { background: #5a4512; color: #fde68a; }
.heat3 { background: #8a5d0b; color: #fff; } .heat4 { background: #c2410c; color: #fff; } .heat5 { background: #dc2626; color: #fff; box-shadow: 0 0 24px rgba(220, 38, 38, 0.55); }
.show-rank { font-weight: 800; color: var(--muted); text-align: center; }
.show-who { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.show-section { margin: 0; color: var(--muted); font-weight: 800; font-size: clamp(14px, 1.3vw, 24px); }
.show-cells { display: grid; grid-template-columns: repeat(var(--fields), minmax(0, 1fr)); gap: 8px; }
.show-leaders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.show-leader { display: flex; flex-direction: column; gap: 14px; padding: 20px 24px; border-radius: 28px; background: var(--surface); border: 1px solid var(--line); }
.show-leader.first { border-color: var(--accent); box-shadow: 0 0 40px rgba(245, 184, 46, 0.25); }
.show-leader-head { display: flex; align-items: center; gap: 14px; font-size: clamp(22px, 2.4vw, 46px); }
.show-leader-head .show-rank { width: 1.3em; height: 1.3em; border-radius: 50%; background: var(--line); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 0.7em; }
.show-leader.first .show-rank { background: var(--accent); color: var(--on-accent); }
.show-leader-head .show-count { margin-inline-start: auto; font-size: 0.6em; }
.show-leader .cell { height: clamp(60px, 10vh, 110px); padding-bottom: 8px; font-size: clamp(12px, 1.1vw, 22px); }
.show-leader .cell.typing::after { inset: 18% 0 auto 0; }
.show-lanes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1vh 40px; }
.show-lane { display: grid; grid-template-columns: 2.2em 8em minmax(0, 1fr) 4.6em; align-items: center; gap: 14px; font-size: clamp(16px, 1.6vw, 30px); }
.show-lane .cell { height: clamp(28px, 4.4vh, 48px); font-size: 0; }
.show-lane .show-count, .show-row .show-count { font-size: max(0.8em, 29px); }
.show-board.table { gap: 0.8vh; }
.show-row { display: grid; grid-template-columns: 2.2em 9em repeat(var(--fields), minmax(0, 1fr)) 5em; align-items: center; gap: 10px; font-size: clamp(16px, 1.8vw, 34px); }
.show-row .cell { height: clamp(28px, 6.8vh, 74px); }
.show-board.n10 .show-row .cell, .show-board.n11 .show-row .cell, .show-board.n12 .show-row .cell { height: 4.6vh; }
.show-board.n13 .show-row, .show-board.n14 .show-row, .show-board.n15 .show-row { font-size: clamp(14px, 1.3vw, 24px); }
.show-board.n13 .show-row .cell, .show-board.n14 .show-row .cell, .show-board.n15 .show-row .cell { height: 3.6vh; }
.show-row.head { font-size: clamp(14px, 1.4vw, 28px); color: var(--muted); font-weight: 800; }
.show-field { text-align: center; }
.show-row.is-bus .cell, .show-lane.is-bus .cell { outline: 3px solid var(--accent); outline-offset: 2px; }
.show-leader.is-bus { outline: 4px solid var(--accent); }
.show-banner { align-self: center; margin: 0; padding: 0.35em 1.2em; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: clamp(28px, 3.6vw, 64px); font-weight: 800; box-shadow: 0 0 80px rgba(245, 184, 46, 0.5); }
.show-legend { display: flex; flex-wrap: wrap; gap: 28px; color: var(--muted); font-size: clamp(13px, 1.2vw, 22px); align-items: center; }
.show-legend span { display: inline-flex; align-items: center; gap: 10px; }
.show-legend .cell { display: inline-block; width: 30px; height: 22px; }
.show-legend .cell.typing::after { display: none; }
.show-settings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 1vh; }
.show-set { padding: 14px 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.show-set small { display: block; color: var(--muted); font-size: clamp(12px, 1.1vw, 22px); }
.show-set b { font-size: clamp(16px, 1.6vw, 30px); }
.screen-layout { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.segmented button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 700; }

/* Teams on the screen (Nasser 2026-10-21): a colour per team, its name beside every member, its totals. */
.show-team { display: inline-block; margin-inline-start: 0.6em; padding: 0.1em 0.6em; border-radius: 999px; font-size: 0.55em; font-weight: 800; vertical-align: middle; color: #12141c; }
.t0 { --team: #f5b82e; } .t1 { --team: #60a5fa; } .t2 { --team: #4ade80; } .t3 { --team: #f472b6; } .t4 { --team: #a78bfa; } .t5 { --team: #fb923c; }
.show-team { background: var(--team, var(--line)); }
.show-teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.show-team-col { display: flex; flex-direction: column; gap: 10px; padding: 14px 18px; border-radius: 22px; background: var(--surface); border: 2px solid var(--team, var(--line)); }
.show-team-col > b { color: var(--team, var(--muted)); font-size: clamp(18px, 1.8vw, 32px); }
.show-team-col .show-chip { font-size: clamp(16px, 1.5vw, 28px); }
.show-team-sums { display: flex; flex-wrap: wrap; gap: 14px; }
.show-team-sums .show-team { margin: 0; font-size: clamp(16px, 1.5vw, 28px); padding: 0.25em 0.9em; }
.show-team-standings { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.show-team-card { display: flex; align-items: center; gap: 14px; padding: 12px 22px; border-radius: 22px; background: var(--surface); border: 2px solid var(--team, var(--line)); font-size: clamp(18px, 2vw, 36px); }
.show-team-card.first { box-shadow: 0 0 40px rgba(245, 184, 46, 0.3); }
.show-team-card .place { color: var(--muted); font-weight: 800; }
.show-team-card b { color: var(--team); }
.show-team-card .total { font-weight: 800; }
.show-team-winner { text-align: center; font-size: clamp(22px, 2.6vw, 48px); font-weight: 800; color: var(--letter); margin: 0; }

/* «اقتراح الحكم»: a quiet line under an answer awaiting the coordinator; the verdict buttons stay the decision. */
.ai-hint { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.ai-hint::before { content: '✦ '; }
.ai-hint.ok::before { color: var(--ok, #15803d); }
.ai-hint.bad::before { color: var(--bad, #b42318); }
/* The suggestion disagrees with the verdict the row has now (often the letter check's automatic «صحيحة»). */
.ai-hint.differs { color: var(--ink); font-weight: 600; }
/* «التصحيح الذكي» on its way: one quiet line above the answers, with a way to carry on without it. */
/* «التصحيح الذكي» on its way: the whole screen, a spinner and «تخطَّ» (Nasser 2026-10-22). */
.ai-overlay { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; background: var(--bg); animation: fade-in 0.15s ease-out; }
.ai-overlay-title { margin: 0; font-size: 20px; font-weight: 800; }
.ai-overlay-title::before { content: '✦ '; color: var(--letter); }
.ai-overlay .ghost { min-width: 160px; }
.spinner { width: 48px; height: 48px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--accent); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
/* The letter's name under the big letter: «حرف الراء». */
.letter-overlay .letter-name { margin: 0; font-size: clamp(22px, 6vw, 34px); font-weight: 700; }
.letter-overlay .letter-name:empty { display: none; }
.merged-line { margin: 4px 0 0; font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip-undo { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 2px 10px; font: inherit; font-size: 13px; }
button.chip-undo { cursor: pointer; }
.share-icons { display: flex; align-items: center; justify-content: center; gap: 12px; }
.icon-round { width: 52px; height: 52px; min-height: 0; padding: 0; border-radius: 26px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-round svg { width: 24px; height: 24px; }
.text-link { color: var(--muted); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* The countdown in words (Nasser 2026-10-22): «خلك» slides in, «جاهز» drops and bounces, «بنبدأ!» bursts out with a
   shake; then the letter. Sized from the countdown's own font size so it fits a phone and a TV. */
.count-word { display: inline-block; font-size: 0.68em; line-height: 1.15; white-space: nowrap; color: var(--letter); }
.count-word.w3 { color: var(--gold); animation: word-slide 0.85s cubic-bezier(.2, .9, .25, 1) both; }
.count-word.w2 { color: var(--gold-2); animation: word-drop 0.85s cubic-bezier(.3, 1.4, .5, 1) both; }
.count-word.w1 { color: var(--buzzer); animation: word-burst 0.9s cubic-bezier(.2, .9, .25, 1) both; }
.count-word.w4 { color: var(--muted); font-size: 1em; animation: word-drop 0.7s ease-out both; }
@keyframes word-slide { 0% { transform: translateX(70%) skewX(-18deg); opacity: 0; filter: blur(8px); } 60% { transform: translateX(-6%) skewX(6deg); opacity: 1; filter: blur(0); } 100% { transform: none; opacity: 1; } }
@keyframes word-drop { 0% { transform: translateY(-90%) scale(1.25); opacity: 0; } 55% { transform: translateY(8%) scale(0.96); opacity: 1; } 75% { transform: translateY(-3%); } 100% { transform: none; opacity: 1; } }
@keyframes word-burst { 0% { transform: scale(0.2) rotate(-8deg); opacity: 0; } 45% { transform: scale(1.18) rotate(2deg); opacity: 1; } 60% { transform: scale(1) translateX(-4%); } 70% { transform: translateX(4%); } 80% { transform: translateX(-2%); } 100% { transform: none; opacity: 1; } }
/* «خمّن الحرف الجاي…»: «بنبدأ!» gives way, the line fades in and beats faster with the drums, glowing. */
.count-word.guess { white-space: normal; max-width: 90vw; font-size: 0.4em; line-height: 1.35; color: var(--letter); text-align: center;
  animation: guess-in 0.5s ease-out both, guess-beat 0.42s ease-in-out 0.5s infinite alternate, guess-glow 2s ease-in 0.2s both; }
@keyframes guess-in { 0% { opacity: 0; transform: scale(0.85); filter: blur(6px); } 100% { opacity: 1; transform: none; filter: blur(0); } }
@keyframes guess-beat { from { transform: scale(1); } to { transform: scale(1.06); } }
@keyframes guess-glow { from { text-shadow: 0 0 0 transparent; } to { text-shadow: 0 0 0.35em rgba(255, 184, 0, 0.6); } }
/* The letter's entrance after the drums: it lands from far with a flash. */
.letter-overlay .letter.pop { animation: letter-land 0.6s cubic-bezier(.2, .9, .25, 1.2) both; }
@keyframes letter-land { 0% { transform: scale(3); opacity: 0; filter: blur(10px); } 60% { transform: scale(0.94); opacity: 1; filter: blur(0); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .count-word, .letter-overlay .letter.pop { animation: none !important; } }

/* ---- «برنامج المسابقات» (Nasser 2026-10-22): the stage ----------------------------------------------------------
   Navy bars and stages with faint gold rays, the big type in Lalezar, the main actions red buzzer buttons with a bottom
   shadow like a console key. Colours come from the tokens above only. */
.stage { background: repeating-conic-gradient(from 0deg at 50% 110%, var(--rays) 0deg 7deg, transparent 7deg 18deg), var(--navy); color: var(--on-navy); }
h1, h2, .code, .show-code, .show-title, .lead-name, .count-word, .letter-title, .pts, .total, .place, .medal, .block,
.letter-overlay .letter, .show-letter, .show-badge, .show-countdown, .bus, .screen-head .title { font-family: var(--display); font-weight: 400; letter-spacing: 0; }
h1 { font-size: 34px; }
.code, .show-code, .show-join-corner b { letter-spacing: 0.18em; }
/* The top bar: full-width navy, the menu button light on it. */
.top { max-width: none; padding-inline: max(20px, calc((100% - 560px) / 2 + 20px)); background: repeating-conic-gradient(from 0deg at 50% 160%, var(--rays) 0deg 7deg, transparent 7deg 18deg), var(--navy); }
.top .brand { color: var(--on-navy); font-family: var(--display); font-weight: 400; font-size: 21px; }
.top .icon-button { background: rgba(255, 255, 255, 0.1); color: var(--on-navy); }
/* Buzzer buttons. */
.primary, .bus { background: var(--buzzer); color: var(--on-buzzer); box-shadow: 0 6px 0 var(--buzzer-shadow); transition: transform 0.08s, box-shadow 0.08s; }
.primary:active:not(:disabled), .bus:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 var(--buzzer-shadow); }
.primary:disabled, .bus:disabled { box-shadow: 0 6px 0 rgba(179, 36, 28, 0.35); }
.bus { font-size: 34px; }
.ghost, a.button.ghost { box-shadow: 0 4px 0 var(--line); }
/* The countdown and the letter fill the stage. */
.letter-overlay { background: repeating-conic-gradient(from 0deg at 50% 50%, var(--rays) 0deg 7deg, transparent 7deg 18deg), var(--navy); color: var(--on-navy); }
.letter-overlay .letter { color: var(--gold); }
.letter-overlay .letter-name { color: var(--on-navy); }
.letter-overlay .count-word.guess { color: var(--gold-2); }
/* In the bar: «حرف» then the letter's name on a gold key. */
.letter-title .word { color: var(--muted); }
.letter-title .name { color: var(--navy); background: var(--gold); border-radius: 12px; padding: 0 0.35em; box-shadow: 0 3px 0 rgba(179, 127, 0, 0.6); }
.letter-badge { font-family: var(--display); font-weight: 400; background: var(--gold); color: var(--navy); }
/* The TV: always the stage. */
body.screen-page { background: repeating-conic-gradient(from 0deg at 50% 120%, var(--rays) 0deg 6deg, transparent 6deg 15deg), var(--navy); color: var(--on-navy); }
body.screen-page .show-muted, body.screen-page .show-link { color: #a9b6dd; }
body.screen-page .show-letter, body.screen-page .show-code, body.screen-page .show-join-corner b { color: var(--gold); }
body.screen-page .show-join, body.screen-page .show-chip, body.screen-page .show-answers li, body.screen-page .show-standings li,
body.screen-page .show-podium .block, body.screen-page .show-join-corner { background: var(--navy-2); border-color: rgba(255, 255, 255, 0.12); color: var(--on-navy); }
body.screen-page .show-chip.lead, body.screen-page .show-badge { background: var(--gold); color: var(--navy); }
body.screen-page .show-standings li.first, body.screen-page .show-podium .p1 .block { background: #1b3585; border-color: var(--gold); color: var(--gold); }
body.screen-page .show-standings .place, body.screen-page .show-standings .gain { color: #a9b6dd; }
/* The landing page: navy bar and a navy stage behind the hero (full width), the join card white on it. */
body.landing-page .top { background: repeating-conic-gradient(from 0deg at 50% 160%, var(--rays) 0deg 7deg, transparent 7deg 18deg), var(--navy); }
body.landing-page .hero { position: relative; color: var(--on-navy); box-shadow: 0 0 0 100vmax var(--navy); clip-path: inset(0 -100vmax); background: repeating-conic-gradient(from 0deg at 50% 120%, var(--rays) 0deg 7deg, transparent 7deg 18deg), var(--navy); }
body.landing-page .hero .hero-title span { color: var(--gold); }
body.landing-page .hero .lead { color: #c9d3f2; }
body.landing-page .hero .badge { background: var(--gold); color: var(--navy); }
body.landing-page .hero .ghost { color: var(--on-navy); border-color: rgba(255, 255, 255, 0.35); box-shadow: none; }
body.landing-page .hero .join-card { color: var(--ink); }
.step-no { font-family: var(--display); font-weight: 400; }
.price-card .price { font-family: var(--display); font-weight: 400; color: var(--ink); }
body.screen-page { --rays: rgba(255, 210, 77, 0.045); }

/* Inviting players (Nasser 2026-10-22): four round icons with a word under each; the QR opens large when tapped. */
.invite-icons { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 8px; }
.invite-icon { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 4px 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; text-decoration: none; text-align: center; cursor: pointer; }
.invite-disc { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--navy); color: var(--gold); box-shadow: 0 4px 0 var(--navy-2); transition: transform 0.08s, box-shadow 0.08s; }
.invite-icon:active .invite-disc { transform: translateY(3px); box-shadow: 0 1px 0 var(--navy-2); }
.invite-disc svg { width: 24px; height: 24px; }
.qr-button { display: flex; flex-direction: column; align-items: center; gap: 2px; }

/* The settings behind one button, in a sheet (Nasser 2026-10-22). */
.settings-open { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 18px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); color: var(--ink); font: inherit; text-align: start; cursor: pointer; box-shadow: 0 4px 0 var(--line); }
.settings-open-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.settings-open-text b { font-size: 17px; }
.sheet-overlay { align-items: flex-end; padding: 0; }
.sheet { width: min(640px, 100%); max-height: 88dvh; display: flex; flex-direction: column; background: var(--bg); border-radius: 26px 26px 0 0; box-shadow: var(--shadow); animation: sheet-up 0.22s ease-out; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 10px; }
.sheet-done { min-height: 44px; padding: 0 22px; font-size: 16px; }
.sheet-body { overflow-y: auto; padding: 0 16px max(20px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 900px) { .sheet-overlay { align-items: center; } .sheet { border-radius: 26px; } }

/* The coordinator's microphone before their name (Nasser 2026-10-22). */
.host-mark { width: 1em; height: 1em; vertical-align: -0.12em; margin-inline-end: 0.3em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Many players (Nasser 2026-10-22, tried with 15): the lobby list in two columns, tighter result rows, and on the TV
   smaller chips, standings in two columns, a tighter table, and room kept for the join corner. */
.player-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.player-list li { min-height: 46px; padding: 0 16px; border-radius: 23px; font-size: 16px; }
.standings.many { gap: 6px; }
.standings.many li { min-height: 44px; padding: 0 16px; border-radius: 22px; }
.standings.many li.first { min-height: 52px; }
.standings.many .who { font-size: 16px; }
.standings.many .total { font-size: 18px; }
.show-chips.many { gap: 8px; }
.show-chips.many .show-chip { font-size: clamp(15px, 1.5vw, 26px); padding: 0.4em 0.9em; }
.show-standings.many { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: column; grid-template-rows: repeat(10, auto); width: min(100%, 1500px); gap: 8px 20px; }
.show-standings.many li { padding: 6px 20px; font-size: clamp(16px, 1.7vw, 30px); }
.show-board.n13 .show-row .cell, .show-board.n14 .show-row .cell, .show-board.n15 .show-row .cell { height: 2.9vh; }
.show-board.n13.table, .show-board.n14.table, .show-board.n15.table { gap: 0.45vh; }
.screen-show:has(> .show-join-corner) > section { padding-inline-end: calc(min(12vw, 18vh) + 3vw); }

/* The code in the middle of its column, copied with a tap. */
.share-code { flex: 1; align-items: center; text-align: center; }
.code-copy { border: 0; background: none; padding: 0; cursor: copy; color: var(--letter); }

/* English letters (Nasser 2026-10-22): the display font draws «I» as a bare bar, read as «ا». A letter alone is drawn
   with serifs (the device's own serif, no font to fetch), on a key wide enough for a narrow letter. */
.letter.en, .letter-badge.en, .letter-title.en .name, .letter-grid.en button, .letters-off.en button,
.show-letter.en, .show-badge.en { font-family: Georgia, 'Times New Roman', serif; font-weight: 700; }
.letter-title.en .name { display: inline-block; min-width: 1.5em; text-align: center; }

/* The screen's colours for projectors (Nasser 2026-10-22), chosen by the coordinator: the navy stage above is «night».
   «day»: a light screen for a lit room, where a projector washes dark backgrounds out; dark ink, gold only as a fill.
   «contrast»: black and yellow with white outlines, for a weak projector or a sunny place. */
body.screen-page.show-day { --muted: #2c3a6e; --line: #b9c4ea; --surface: #eef2ff; --mine: #fff1c2; --letter: #0b1d51;
  background: #ffffff; color: var(--navy); }
body.screen-page.show-day .show-muted, body.screen-page.show-day .show-link,
body.screen-page.show-day .show-standings .place, body.screen-page.show-day .show-standings .gain { color: var(--muted); }
body.screen-page.show-day .show-letter, body.screen-page.show-day .show-code, body.screen-page.show-day .show-join-corner b { color: var(--navy); }
body.screen-page.show-day .show-join, body.screen-page.show-day .show-chip, body.screen-page.show-day .show-answers li,
body.screen-page.show-day .show-standings li, body.screen-page.show-day .show-podium .block,
body.screen-page.show-day .show-join-corner { background: var(--surface); border-color: var(--line); color: var(--navy); }
body.screen-page.show-day .show-chip.lead, body.screen-page.show-day .show-badge { background: var(--gold); color: var(--navy); }
body.screen-page.show-day .show-standings li.first, body.screen-page.show-day .show-podium .p1 .block { background: var(--mine); border-color: var(--gold); color: var(--navy); }
body.screen-page.show-contrast { --surface: #000000; --mine: #1c1a00; --line: #ffffff; --ink: #ffffff; --muted: #e6e6e6;
  --letter: #ffe600; --accent: #ffe600; --on-accent: #000000; --ok: #00e676; --bad: #ff5c5c; background: #000000; color: #ffffff; }
body.screen-page.show-contrast .show-muted, body.screen-page.show-contrast .show-link,
body.screen-page.show-contrast .show-standings .place, body.screen-page.show-contrast .show-standings .gain { color: var(--muted); }
body.screen-page.show-contrast .show-letter, body.screen-page.show-contrast .show-code, body.screen-page.show-contrast .show-join-corner b { color: var(--letter); }
body.screen-page.show-contrast .show-join, body.screen-page.show-contrast .show-chip, body.screen-page.show-contrast .show-answers li,
body.screen-page.show-contrast .show-standings li, body.screen-page.show-contrast .show-podium .block,
body.screen-page.show-contrast .show-join-corner, body.screen-page.show-contrast .show-leader { background: #000000; border: 3px solid #ffffff; color: #ffffff; }
body.screen-page.show-contrast .show-chip.lead, body.screen-page.show-contrast .show-badge { background: var(--accent); color: #000000; border-color: var(--accent); }
body.screen-page.show-contrast .show-standings li.first, body.screen-page.show-contrast .show-podium .p1 .block,
body.screen-page.show-contrast .show-leader.first { border-color: var(--accent); color: var(--accent); box-shadow: none; }
.screen-layout > .muted.small:last-child { flex-basis: 100%; }

/* Messages as a toast (Nasser 2026-10-22): over the page at the top, in and out by themselves, never pushing it down. */
.toast { position: fixed; z-index: 60; inset-inline: 0; top: max(14px, env(safe-area-inset-top)); width: max-content; max-width: min(92vw, 520px); margin-inline: auto;
  display: flex; align-items: center; gap: 12px; padding: 12px 20px 12px 14px; border-radius: 999px; background: var(--navy); color: var(--on-navy);
  font-weight: 700; font-size: 16px; line-height: 1.4; box-shadow: 0 14px 34px rgba(11, 29, 81, 0.35); cursor: pointer;
  opacity: 0; transform: translateY(-140%); pointer-events: none; transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2), opacity 0.2s; }
.toast.show { opacity: 1; transform: none; pointer-events: auto; }
.toast.error { background: var(--buzzer); color: var(--on-buzzer); box-shadow: 0 6px 0 var(--buzzer-shadow), 0 14px 34px rgba(179, 36, 28, 0.35); }
.toast-icon { width: 28px; height: 28px; flex: none; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.22); font-weight: 800; }
.toast.ok, .toast.info { background: #ffffff; color: var(--navy); border: 2px solid var(--gold); }
.toast.ok .toast-icon, .toast.info .toast-icon { background: var(--gold); color: var(--navy); }
@media (prefers-reduced-motion: reduce) { .toast { transition: opacity 0.2s; transform: none; } }

/* An open appeal holds the correction (Nasser 2026-10-22): the button waits, the appeal glows for the coordinator. */
.primary.waiting { background: var(--muted); box-shadow: 0 6px 0 rgba(11, 29, 81, 0.35); }
.appeal.open { animation: appeal-glow 1.6s ease-in-out infinite; }
@keyframes appeal-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 184, 0, 0.55); } 50% { box-shadow: 0 0 0 6px rgba(255, 184, 0, 0); } }
@media (prefers-reduced-motion: reduce) { .appeal.open { animation: none; } }
/* «بس!» stamped on every phone and the screen (Nasser 2026-10-22): a red card, tilted, that lands hard and lifts away. */
.stamp-overlay { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; background: rgba(11, 29, 81, 0.28); animation: fade-in 0.12s ease-out; cursor: pointer; }
.stamp-overlay.lift { opacity: 0; transition: opacity 0.4s; }
.stamp { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: min(72vw, 300px); padding: 16px 30px 18px; border-radius: 22px;
  background: var(--buzzer); color: var(--on-buzzer); border: 4px solid rgba(255, 255, 255, 0.9); box-shadow: 0 8px 0 var(--buzzer-shadow), 0 24px 60px rgba(11, 29, 81, 0.45);
  transform: rotate(-7deg); animation: stamp-in 0.38s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
.stamp b { font-family: var(--display); font-weight: 400; font-size: clamp(64px, 20vw, 96px); line-height: 1.1; }
.stamp span { font-weight: 800; font-size: clamp(17px, 4.8vw, 22px); line-height: 1.4; max-width: 70vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.screen-page .stamp { min-width: 30vw; padding: 2vh 4vw 3vh; border-width: 6px; }
body.screen-page .stamp b { font-size: clamp(96px, 16vh, 220px); }
body.screen-page .stamp span { font-size: clamp(24px, 4vh, 56px); max-width: 60vw; }
@keyframes stamp-in { 0% { transform: rotate(-16deg) scale(2.6); opacity: 0; } 60% { transform: rotate(-6deg) scale(0.94); opacity: 1; } 80% { transform: rotate(-7.5deg) scale(1.03); } 100% { transform: rotate(-7deg) scale(1); } }
@media (prefers-reduced-motion: reduce) { .stamp { animation: none; } }

/* Until the first tap a phone plays no sound (Nasser 2026-10-22): a small button says so; any tap removes it. */
.sound-hint { position: fixed; z-index: 55; inset-inline: 0; width: max-content; margin-inline: auto; bottom: max(16px, env(safe-area-inset-bottom)); padding: 10px 18px; border: 2px solid var(--gold); border-radius: 999px; background: var(--navy); color: var(--on-navy); font: inherit; font-weight: 700; font-size: 15px; box-shadow: 0 10px 26px rgba(11, 29, 81, 0.35); cursor: pointer; animation: rise 0.3s both; }
body.full .sound-hint { bottom: auto; top: max(76px, env(safe-area-inset-top)); }

/* The player's own answer in the correction list (Nasser 2026-10-22): first, on a gold tint, with a «★ إجابتك» badge. */
.mine-badge { display: inline-flex; align-items: center; margin-inline-end: 8px; padding: 2px 10px; border-radius: 999px; background: var(--gold); color: var(--navy); font-family: var(--font); font-size: 13px; font-weight: 800; vertical-align: middle; white-space: nowrap; }

/* The coordinator's lobby on a computer (Nasser 2026-10-22): the right column matches the invitation's height, the
   players in a card that fills it, the limits and the settings side by side, then one large start button. */
.players-card, .lobby-facts { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 900px) {
  body.wide .top { padding-inline: max(32px, calc((100% - 1320px) / 2 + 32px)); }
  .coord-lobby .lobby-share .share-card { height: 100%; justify-content: center; }
  .lobby-main { gap: 20px; }
  .players-card { flex: 1; min-height: 240px; padding: 24px 28px; border-radius: 28px; background: var(--surface); border: 1px solid var(--line); }
  .players-card h2 { font-size: 24px; }
  .players-card .chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); align-content: start; gap: 10px; }
  .players-card .chips .chip { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border-radius: 25px; }
  .players-card .chips .chip:not(.lead) { background: var(--bg); }
  .lobby-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
  .lobby-facts .meter { border: 1px solid var(--line); min-height: 88px; justify-content: center; }
  .lobby-facts .settings-open { min-height: 88px; }
  .lobby-start { min-height: 72px; font-size: 26px; }
}

/* The header on a computer (Nasser 2026-10-22): as wide as the page's content, its links light on the navy bar, nothing
   wrapping, and «دخول المنسق» a gold key. */
@media (min-width: 900px) {
  .top { padding-inline: max(24px, calc((100% - 1160px) / 2 + 24px)); }
  .top-nav { justify-content: center; gap: 28px; }
  .top-nav a, .top-links > a:first-child { color: #c9d3f2; white-space: nowrap; }
  .top-nav a:hover, .top-links > a:first-child:hover { color: var(--on-navy); }
  .top .icon-button.outline { border-color: rgba(255, 255, 255, 0.3); }
  .top .pill { background: var(--gold); color: var(--navy); border-color: var(--gold); box-shadow: 0 3px 0 rgba(179, 127, 0, 0.6); }
}
/* The landing page's section links need ~1100px beside the logo and the buttons (Compare View, 2026-11-22: at 945px
   the header ran off the page); below that they stay in ☰, which lists the same sections. */
@media (min-width: 900px) and (max-width: 1099.98px) {
  .top-nav, .top .vis-links { display: none; }
}
/* The demo phone's floating cards keep dark ink on the navy hero (their text inherited the hero's white). */
body.landing-page .hero .float-card { color: var(--ink); }

/* The coordinator's lobby on a phone (Nasser 2026-10-22): the limits, then the players in a card with room to fill,
   and the start button with a round settings button fixed at the bottom. On a computer: players first, one start
   button, the settings card beside the limits. */
.lobby-actions { display: flex; align-items: center; gap: 12px; }
.lobby-actions .lobby-start { flex: 1; }
.lobby-gear { width: 60px; height: 60px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%;
  background: var(--navy); color: var(--gold); box-shadow: 0 5px 0 var(--navy-2); cursor: pointer; }
.lobby-gear svg { width: 28px; height: 28px; }
.lobby-gear:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--navy-2); }
@media (max-width: 899px) {
  .coord-lobby { padding-bottom: 96px; }
  .players-card { min-height: 34vh; padding: 16px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
  .players-card .chips .chip:not(.lead) { background: var(--bg); }
  /* The bar itself is game-ui's gu-dock (fixed at the bottom); only its width is this game's. */
  .lobby-actions.gu-dock { max-width: 560px; align-items: center; }
  .lobby-actions .lobby-start { min-height: 60px; }
}
@media (min-width: 900px) {
  .players-card { order: -1; }
  .lobby-gear { display: none; }
}
@media (max-width: 899px) { body.wide .sound-hint { bottom: calc(100px + env(safe-area-inset-bottom)); } }
/* An animated parent holds a fixed child: the column with the fixed action bar does not take the entrance motion. */
.coord-lobby.reveal > .lobby-main { animation: none; }
/* The version at the bottom of the menu and in the footer, as on every NHMSV platform (Nasser 2026-10-22). */
.menu-version { margin: 6px 8px 2px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; text-align: center; }
.menu-version code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; background: none; }
.foot-version { color: var(--muted); font-size: 13px; }
.foot .foot-version::before { content: '·'; margin-inline: 8px; }
body.landing-page .foot .foot-version::before { content: none; }

/* On a computer the menu button stands at the other end from the name and logo (Nasser 2026-10-22), and the menu
   opens under it. */
@media (min-width: 900px) {
  .top [data-menu-button] { margin-inline-start: auto; }
  .menu { inset-inline-end: max(24px, calc((100vw - 1160px) / 2 + 24px)); }
  body.wide .menu { inset-inline-end: max(32px, calc((100vw - 1320px) / 2 + 32px)); }
}

/* A coordinator who only runs the game (Nasser 2026-10-22): one line under the players, not a player chip. */
.host-off { display: flex; align-items: center; gap: 6px; grid-column: 1 / -1; flex-basis: 100%; list-style: none; }
.player-list li.host-off { background: none; min-height: 0; padding: 0 4px; border: 0; box-shadow: none; }

/* The event plan (Nasser 2026-10-23): the event title above the lobby, results and honour board, and on the screen. */
.event-banner { margin: 0 0 12px; padding: 8px 14px; border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font-weight: 800; text-align: center; overflow-wrap: anywhere; }
.event-setting input { width: 100%; }
.event-upsell { margin: 0 0 8px; }
.show-brand .show-event { display: flex; flex-direction: column; line-height: 1.15; }
.show-brand .show-event small { font-size: .55em; font-weight: 600; opacity: .7; }
/* Leagues (Nasser 2026-10-22, suggestion 5). */
.league-new label { font-weight: 700; }
.league-new input { flex: 1; min-width: 0; }
.league-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.league-row a { color: var(--ink); text-decoration: none; }
.league-row.archived { opacity: 0.6; }
.table-wrap { overflow-x: auto; padding: 0; }
.league-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.league-table th, .league-table td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line); }
.league-table th { color: var(--muted); font-size: 13px; font-weight: 700; }
.league-table tr.first td { background: var(--soft); }
.league-select { min-height: 40px; max-width: 60%; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; padding: 0 10px; }
.league-board h2 { margin-bottom: 8px; }
.show-league { display: flex; flex-direction: column; align-items: center; gap: 0.5vh; }
.show-league-row { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(6px, 0.8vw, 14px); font-size: clamp(15px, 1.5vw, 26px); }
.chip.merge-hint { border: 2px dashed var(--gold); background: var(--soft); color: var(--ink); font-weight: 700; cursor: pointer; }
.notify-ask { width: 100%; }

/* The screen from the phone (Nasser 2026-10-22): the coordinator's choices in the menu, and the screen's overlays. */
.menu-label { margin: 8px 12px 2px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 700; }
.menu-on { margin-inline-start: auto; color: var(--gold); }
.show-mode { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 4vh 4vw;
  background: repeating-conic-gradient(from 0deg at 50% 120%, var(--rays) 0deg 6deg, transparent 6deg 15deg), var(--navy); color: var(--on-navy); animation: fade-in 0.25s ease-out; }
body.show-day .show-mode { background: #ffffff; color: var(--navy); }
body.show-contrast .show-mode { background: #000000; color: #ffffff; }
.show-mode-body { width: min(100%, 1300px); display: flex; flex-direction: column; align-items: center; gap: 3vh; text-align: center; }
.show-mode.letter .show-letter { font-size: clamp(200px, 60vh, 700px); line-height: 1.2; }
.show-mode .show-title { font-size: clamp(40px, 6vw, 110px); }
body.hide-code .show-join-corner, body.hide-code .show-join { visibility: hidden; }
/* Ready-made sessions at the top of the settings sheet (Nasser 2026-10-22). */
.templates { display: flex; flex-direction: column; gap: 8px; padding: 4px 4px 10px; }
.template-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.template-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.template-chip b { font-size: 16px; }
.template-chip small { color: var(--muted); font-size: 12px; }
.template-chip[aria-pressed="true"] { border-color: var(--gold); background: var(--soft); }

/* Kids mode (Nasser 2026-10-22): a few right words under the box while a child types; a tap writes it. */
.kids-words { display: flex; flex-wrap: wrap; gap: 6px; }
.kids-words:empty { display: none; }
.kids-word { padding: 6px 14px; border: 2px solid var(--gold); border-radius: 999px; background: var(--soft); color: var(--ink); font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; }
.kids-word:active { transform: scale(0.96); }

/* A join link (Nasser 2026-10-23, JOIN_CODE_LOCK): the code as read-only text, the name the only thing to type. */
.locked-code { align-items: center; text-align: center; }
.code-locked { display: block; font-size: 40px; font-weight: 800; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; color: var(--ink); direction: ltr; }
.other-code { margin-top: 12px; }
.other-code a, .join-refused .button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
.join.join-refused { justify-content: center; text-align: center; }

/* The game's awards and the kings of the fields (Nasser 2026-10-23): on the phones and on the screen. */
.awards h2, .kings h2, .titles h2 { margin: 0 0 8px; font-size: 18px; }
.award-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.award { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 18px; background: var(--surface); border: 2px solid var(--line); }
.award.mine { border-color: var(--accent); background: var(--mine); }
.award-icon { font-size: 22px; line-height: 1; }
.award-title { font-size: 12px; color: var(--muted); }
.award-who { font-size: 18px; font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
.award-what { font-size: 13px; color: var(--muted); }
.king-list { list-style: none; margin: 0; padding: 0; border-radius: 18px; background: var(--surface); border: 2px solid var(--line); overflow: hidden; }
.king-list li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; align-items: center; gap: 10px; padding: 10px 14px; }
.king-list li + li { border-top: 1px solid var(--line); }
.king-list li.mine { background: var(--mine); }
.king-field { color: var(--muted); font-size: 14px; }
.king-who { font-weight: 800; overflow-wrap: anywhere; }
.king-count { font-size: 13px; color: var(--muted); white-space: nowrap; }
.show-awards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: clamp(10px, 1.4vw, 22px); width: min(100%, 1400px); }
.show-award { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: clamp(10px, 1.4vw, 22px); border-radius: 24px; background: var(--surface); text-align: center; }
.show-award .icon { font-size: clamp(24px, 2.6vw, 44px); line-height: 1; }
.show-award small { color: var(--muted); font-size: clamp(14px, 1.3vw, 22px); }
.show-award bdi { font-size: clamp(20px, 2.2vw, 40px); font-weight: 800; }
.show-award span:last-child { color: var(--muted); font-size: clamp(16px, 1.5vw, 30px); }
.show-kings { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: clamp(8px, 1vw, 16px); font-size: clamp(15px, 1.5vw, 26px); }
.show-king { display: inline-flex; align-items: baseline; gap: 8px; padding: 6px 16px; border-radius: 999px; background: var(--surface); }
.show-king small { color: var(--muted); }
.show-king bdi { font-weight: 800; }
body.screen-page .show-award, body.screen-page .show-king { background: var(--navy-2); color: var(--on-navy); }
body.screen-page.show-day .show-award, body.screen-page.show-day .show-king { background: var(--surface); color: var(--navy); }
/* Back to one's game and the internet's speed (Nasser 2026-10-23). */
.resume-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.reclaim { gap: 10px; text-align: center; }
.chip.away { opacity: .55; border-style: dashed; }
/* «غادر» (option «ب», GAMES_UNIFIED §3.1): a player who left, faded, the word after the name. */
.left-mark { margin-inline-start: 6px; font-size: 0.8em; font-weight: 700; color: var(--muted); }
li.left { opacity: .55; }
.show-chip.left { opacity: .5; }
.show-chip .left-mark { color: inherit; }
.away-mark { font-size: 13px; }
.net-slow { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 16px); inset-inline-end: 72px; z-index: 40; display: inline-flex;
  align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border: 0; border-radius: 999px; background: var(--accent);
  color: var(--on-accent); font: inherit; font-size: 13px; font-weight: 700; box-shadow: 0 4px 14px rgb(0 0 0 / .18); cursor: pointer; }

/* A round's points on the session page (Nasser 2026-10-23): each name against its points, highest first. */
.round-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.round-table th { padding: 0 12px 6px; color: var(--muted); font-size: 12px; font-weight: 700; text-align: start; }
.round-table th:last-child, .round-table td:last-child { text-align: end; width: 1%; white-space: nowrap; }
.round-table td { padding: 9px 12px; border-top: 1px solid var(--line); }
.round-table td:last-child { font-weight: 800; font-variant-numeric: tabular-nums; }
.round-table td.neg { color: var(--bad); }
.round-table tr.round-lead td { background: var(--soft); }
.round-table tr.round-lead td:first-child { border-start-start-radius: 12px; border-end-start-radius: 12px; }
.round-table tr.round-lead td:last-child { border-start-end-radius: 12px; border-end-end-radius: 12px; }

/* The player's waiting room (Nasser 2026-10-23): the code in the bar, the rules as icons with their values (a tap
   explains one), then the players; both sections fold away with a tap on their title. */
.code-pill { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 40px; padding: 4px 12px; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.12); color: var(--on-navy); font: inherit; font-size: 17px; font-weight: 800; letter-spacing: 0.08em; cursor: pointer; }
.code-pill svg { width: 18px; height: 18px; color: var(--gold); }
@media (min-width: 900px) {
  .top .code-pill { margin-inline-start: auto; }
  .top .code-pill:not(.hidden) ~ [data-menu-button] { margin-inline-start: 0; }
}
.fold { display: flex; flex-direction: column; gap: 10px; }
.fold-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; padding: 0 4px; border: 0;
  background: none; color: var(--ink); font: inherit; font-size: 17px; font-weight: 800; text-align: start; cursor: pointer; }
.fold-head small { margin-inline-start: auto; color: var(--muted); font-size: 12px; font-weight: 500; }
.fold-head svg { width: 20px; height: 20px; flex: none; transition: transform 0.2s; }
.fold-head[aria-expanded="false"] svg { transform: rotate(-90deg); }
[dir="rtl"] .fold-head[aria-expanded="false"] svg { transform: rotate(90deg); }
.rules-card { padding: 10px 14px 14px; }
.rule-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.rule-chip { display: flex; align-items: center; gap: 5px; min-width: 0; min-height: 46px; padding: 5px; border: 2px solid transparent; border-radius: 16px;
  background: var(--bg); color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.rule-chip[aria-expanded="true"] { border-color: var(--gold); background: var(--mine); }
.rule-chip .ic { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 10px; background: var(--navy); color: var(--gold); font-size: 13px; font-weight: 800; }
.rule-chip .ic svg { width: 16px; height: 16px; }
.rule-chip b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rule-chip b.num { direction: ltr; unicode-bidi: isolate; }
.rule-chip.plus b { color: var(--ok); }
.rule-chip.minus b { color: var(--bad); }
.rule-tip { grid-column: 1 / -1; position: relative; margin: 0; padding: 12px 14px; border-radius: 16px; background: var(--navy); color: var(--on-navy); font-size: 14px; line-height: 1.6; }
.rule-tip strong { display: block; color: var(--gold); font-size: 15px; }
@media (max-width: 379px) {
  .rule-chip { gap: 4px; padding: 4px; }
  .rule-chip .ic { width: 24px; height: 24px; }
  .rule-chip b { font-size: 13px; }
}

/* What each player wrote in a round (Nasser 2026-10-23), opened from their name on the session page. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.answers-toggle { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; min-height: 32px; padding: 0; border: 0; background: none;
  color: inherit; font: inherit; text-align: start; cursor: pointer; }
.answers-toggle svg { width: 16px; height: 16px; flex: none; color: var(--muted); transform: rotate(90deg); transition: transform 0.2s; }
[dir="ltr"] .answers-toggle svg { transform: rotate(-90deg); }
.answers-toggle[aria-expanded="true"] svg { transform: none; }
.answers-sum { display: inline-flex; gap: 6px; margin-inline-start: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.answers-sum .ok { color: var(--ok); }
.answers-sum .no { color: var(--bad); }
.round-table tr.answers-row > td { padding: 0 4px 12px; border-top: 0; background: none; }
.answers { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-size: 14px; }
.answers th, .answers td { padding: 7px 8px; background: var(--bg); border: 0; text-align: start; vertical-align: middle; }
.answers th { width: 22%; border-start-start-radius: 10px; border-end-start-radius: 10px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.answers td:last-child { width: 1%; border-start-end-radius: 10px; border-end-end-radius: 10px; text-align: end; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.answers td.neg { color: var(--bad); }
.answers .ans { font-weight: 700; }
.answers .empty { color: var(--muted); font-weight: 400; }
.answers .mark { width: 1%; text-align: center; font-weight: 800; }
.answers .mark.ok { color: var(--ok); }
.answers .mark.no { color: var(--bad); }
.answers .appeal { display: flex; width: max-content; max-width: 100%; align-items: center; gap: 4px; margin-top: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; animation: none; }
.answers .appeal.won { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.answers .appeal.lost { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }
.answers .appeal.open { background: var(--soft); color: var(--ink); }
.answers-legend { margin: 6px 4px 0; }

/* The compact correction screen (Nasser 2026-10-23): field tabs, one line per answer, the points on demand. */
.rv-screen .screen-head { padding-block-end: 4px; }
.rv-title { font-size: 20px; }
.rv-tabs { flex: none; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); }
.rv-tab { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border: 2px solid transparent; border-radius: 999px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; }
button.rv-tab { cursor: pointer; }
.rv-tab.on { border-color: var(--navy); background: var(--navy); color: var(--on-navy); }
.rv-tab .done { color: var(--ok); }
.rv-tab .left { display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--gold); color: var(--navy); font-size: 11px; }
.rv-body { padding-inline: max(14px, env(safe-area-inset-left)) max(14px, env(safe-area-inset-right)); display: flex; flex-direction: column; gap: 8px; }
.rv-sec { display: flex; justify-content: space-between; margin: 4px 2px -2px; font-size: 12.5px; font-weight: 800; color: var(--muted); }
.rv-sec.wait { color: var(--letter); }
/* Nothing in the scrolling correction body shrinks: with many answers the body scrolls instead of clipping rows (Nasser 2026-11-16). */
.rv-body > * { flex-shrink: 0; }
.rv-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: 18px; overflow: hidden; }
.rv-row { display: flex; flex-direction: column; gap: 4px; padding: 4px 6px 4px 8px; }
.rv-row + .rv-row { border-top: 1px solid var(--line); }
.rv-row.pending { background: var(--soft); }
.rv-row.mine { background: var(--mine); }
.rv-line { display: flex; align-items: center; gap: 6px; min-height: 42px; }
.rv-main { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px; padding: 4px 2px; border: 0; background: none; color: inherit; font: inherit;
  text-align: start; white-space: nowrap; overflow: hidden; cursor: pointer; }
.rv-answer { font-size: 17px; font-weight: 800; }
.rv-count { flex: none; display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bg);
  color: var(--muted); font-size: 11.5px; font-weight: 800; }
.rv-tag { flex: none; font-size: 11px; font-weight: 700; color: var(--bad); }
.rv-spark { flex: none; font-size: 12px; color: var(--ok); }
.rv-spark.bad { color: var(--bad); }
.rv-names { flex: 1; min-width: 0; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.rv-main .pts { flex: none; font-size: 12px; }
.rv-main .mine-badge { flex: none; font-size: 11px; padding: 1px 8px; margin: 0; }
.rv-acts { flex: none; display: flex; align-items: center; gap: 6px; }
.rv-src { display: grid; place-items: center; width: 30px; height: 34px; font-size: 15px; text-decoration: none; }
.rv-row .verdict-btn { width: 40px; height: 34px; border-radius: 12px; font-size: 18px; font-weight: 800; }
.rv-row .ai-hint, .rv-row .merged-line { margin: 0 4px 4px; }
.rv-row .merge-hint { align-self: flex-start; margin-inline-start: 4px; }
.rv-row .merge { max-width: 100%; align-self: flex-start; margin: 0 4px 6px; }
.rv-row .appeal { margin: 0 4px 6px; }
.rv-row:not(.open) .on-tap { display: none; }
.rv-empty { margin: 0; padding: 10px 12px; border-radius: 18px; background: var(--surface); color: var(--muted); font-size: 13px; }
.rv-foot { gap: 8px; padding-block-start: 8px; border-top: 1px solid var(--line); }
.rv-bar { display: flex; gap: 8px; align-items: center; }
.rv-bar .primary { flex: 1; }
.rv-pts { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 58px; height: 50px; border: 0; border-radius: 16px;
  background: var(--surface); color: var(--muted); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.rv-pts b { font-size: 14px; color: var(--ink); transition: transform 0.2s; }
.rv-pts[aria-expanded="true"] b { transform: rotate(180deg); }
body.kids .rv-answer { font-size: 21px; }

/* The bell (nhmsv NOTIFICATIONS.md §4): beside the menu, the unread count in red, the last five under it. */
.bell { position: relative; margin-inline-start: auto; }
.top-links + .bell, .bell + [data-menu-button] { margin-inline-start: 0 !important; }
.bell > summary { list-style: none; position: relative; cursor: pointer; }
.bell > summary::-webkit-details-marker { display: none; }
.bell > summary svg { width: 20px; height: 20px; }
.bell-count { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--bad);
  color: #fff; font-size: 12px; font-weight: 800; line-height: 20px; text-align: center; }
.bell-panel { position: absolute; top: calc(100% + 8px); inset-inline-end: -48px; z-index: 40; width: min(360px, calc(100vw - 24px)); padding: 12px;
  border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25); display: flex; flex-direction: column; gap: 8px; }
.bell-title { font-size: 15px; }
.bell-empty { margin: 0; color: var(--muted); font-size: 14px; }
.bell-list, .notify-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.bell-list li + li, .notify-list li + li { border-top: 1px solid var(--line); }
.bell-list a, .notify-list a { display: flex; flex-direction: column; gap: 2px; padding: 9px 4px; color: var(--ink); text-decoration: none; font-size: 14px; line-height: 1.5; }
.bell-list li.unread a, .notify-list li.unread a { font-weight: 700; }
/* «جديد» on an unread one, in the four games (GAMES_UNIFIED §9.2). */
.nt-new { display: inline-block; margin-inline-end: 4px; padding: 0 7px; border-radius: 999px; background: #b42318; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; vertical-align: 1px; }
.bell-list li.read a, .notify-list li.read a { color: var(--muted); }
.bell-all { align-self: center; color: var(--letter); font-weight: 700; font-size: 14px; text-decoration: none; }
.notify-list { padding: 4px 14px; }
label.check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 15px; }
label.check input { width: 20px; height: 20px; accent-color: var(--accent); }

/* The code screen (nhmsv USER_AUTH_FLOW.md §5–§6). */
.notice { background: var(--mine); border-radius: 18px; padding: 12px 16px; }
.verify-phone { font-size: 17px; }
.link-button:disabled { text-decoration: none; opacity: 0.7; }
@keyframes pulse { 50% { opacity: 0.25; } }

/* «نسخة تجريبية» while the platform is not live (nhmsv PLATFORM_MODES.md §2): thin, amber, no close button. */

/* The coordinator's entry (signed out): the card in the middle of the screen, on phones, tablets and computers. */
.auth-center { min-height: calc(100dvh - 190px); justify-content: center; }

/* ---- The coordinator's home as a dashboard (Nasser 2026-10-25): a layout for each screen ------------------------
   Phone: one column, the start first (new session), the plan in one line, the sessions, then the screen and settings.
   Tablet (700px+): two columns: the start beside the plan, then the sessions beside the screen and settings.
   Computer (1100px+): wide: the start across two thirds with the plan beside it, then the sessions two by two
   beside a column of settings. */
.dash { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "welcome" "plan" "main" "side"; }
.dash-welcome { grid-area: welcome; display: flex; flex-direction: column; gap: 12px; }
.dash-greet { display: flex; flex-direction: column; gap: 4px; }
.dash-greet h1 { font-size: 26px; margin: 0; }
.dash-greet p { margin: 0; }
.dash-welcome .stack { margin: 0; }
.dash-plan { grid-area: plan; display: flex; flex-direction: column; gap: 10px; }
.dash-plan .note, .dash-plan p { margin: 0; }
.dash-main { grid-area: main; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.dash-main .panel-head h2 { margin: 0; }
.dash-side { grid-area: side; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dash-side > * { margin: 0; }
.dash-empty { text-align: center; padding: 28px 18px; }
@media (max-width: 699px) {
  .dash .plan-card { flex-direction: row; align-items: center; justify-content: space-between; }
  .dash .plan-card .button { min-height: 44px; padding: 0 16px; font-size: 15px; flex: none; }
}
@media (min-width: 700px) {
  body.panel-wide .wrap, body.panel-wide .top { max-width: 980px; }
  .dash { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "welcome plan" "main side"; align-items: start; }
  .dash-welcome, .dash-plan .plan-card { min-height: 100%; }
  .dash-welcome { justify-content: space-between; }
  .dash-side .row-buttons { flex-direction: column; }
}
@media (min-width: 1100px) {
  body.panel-wide .wrap, body.panel-wide .top { max-width: 1240px; }
  .dash { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 380px); grid-template-areas: "welcome welcome plan" "main main side"; gap: 20px; }
  .dash-welcome { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 28px; }
  .dash-greet { flex: 1 1 50%; }
  .dash-greet h1 { font-size: 32px; }
  .dash-welcome .stack { flex: 0 0 280px; }
  .dash-welcome .resume { flex: 1 1 100%; }
  .dash-main .session-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* «حرف اليوم» (Nasser 2026-10-25): the letter large, today's rare answers, and the day's letter in the picker. */
.today-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 26px 18px; }
.today-letter { font-family: Lalezar, Tajawal, sans-serif; font-size: 120px; line-height: 1.1; color: var(--letter); }
.today-rare { margin: 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 8px; }
.today-rare li { display: flex; justify-content: space-between; gap: 12px; }
.letter-grid button.today { box-shadow: 0 0 0 3px var(--gold, #ffb800) inset; }
.today-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); }
.today-card b { font-family: Lalezar, Tajawal, sans-serif; font-size: 34px; color: var(--letter); }
/* «إحصاءاتي» (Nasser 2026-10-25): sessions per month as bars in tenths, no inline style (CSP). */
.month-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.month-bars li { display: grid; grid-template-columns: 64px 1fr 28px; align-items: center; gap: 10px; }
.month-bars .bar { height: 12px; border-radius: 6px; background: var(--bg); overflow: hidden; }
.month-bars .bar i { display: block; height: 100%; border-radius: 6px; background: var(--accent); width: 0; }
.month-bars .bar i.w1 { width: 10%; } .month-bars .bar i.w2 { width: 20%; } .month-bars .bar i.w3 { width: 30%; } .month-bars .bar i.w4 { width: 40%; }
.month-bars .bar i.w5 { width: 50%; } .month-bars .bar i.w6 { width: 60%; } .month-bars .bar i.w7 { width: 70%; } .month-bars .bar i.w8 { width: 80%; }
.month-bars .bar i.w9 { width: 90%; } .month-bars .bar i.w10 { width: 100%; }
/* «صوت المذيع»: until the screen gets its first click, a small note at the bottom asks for one (browsers need it). */
.show-sound-hint { position: fixed; inset-inline: 0; top: 18px; margin: 0 auto; width: max-content; max-width: 90vw; padding: 8px 18px;
  border-radius: 20px; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: clamp(16px, 1.5vw, 30px); z-index: 30; }
/* «جارٍ إعادة الاتصال» on the TV (Nasser 2026-11-08): a small badge over the last state while the network is away. */
.show-net-badge { position: fixed; top: 14px; inset-inline-start: 14px; margin: 0; display: flex; align-items: center; gap: 10px; padding: 8px 18px;
  border-radius: 20px; background: rgba(0, 0, 0, 0.7); color: #fff; font-size: clamp(14px, 1.4vw, 22px); font-weight: 700; z-index: 40; }
.show-net-badge i { width: 0.7em; height: 0.7em; border-radius: 50%; background: #f5b301; animation: net-blink 1s ease-in-out infinite alternate; }
@keyframes net-blink { from { opacity: 0.25; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .show-net-badge i { animation: none; } }
/* «ملخص الجلسة» on a past session (Nasser 2026-10-25): the share button beside its line. */
.summary-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); }
.summary-card .primary { flex: none; min-height: 44px; }
/* History pages, one look for «فواتيري», «الباقات» and «الجلسات» (Nasser 2026-10-25): a navy card with the plan now, filter
   chips, rows grouped by month in one white card, and a receipt-like detail page. On wide screens the navy card sits
   beside the list. */
.hx-page { display: grid; gap: 14px; grid-template-areas: "title" "side" "main"; }
.hx-title { grid-area: title; font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 1.2; }
.hx-side { grid-area: side; display: flex; flex-direction: column; gap: 12px; }
.hx-main { grid-area: main; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hx-hero { border-radius: 22px; color: #fff; padding: 16px 18px; background-color: var(--navy);
  background-image: repeating-conic-gradient(from 0deg at 0% 100%, var(--rays) 0 6deg, transparent 6deg 14deg); display: flex; flex-direction: column; gap: 6px; }
.hx-k { font-size: 13px; color: var(--silver); font-weight: 600; }
.hx-plan { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hx-name { font-family: var(--display); font-size: 26px; line-height: 1.2; color: var(--gold-2); }
.hx-left { background: var(--gold); color: var(--navy); font-weight: 800; border-radius: 999px; padding: 4px 12px; font-size: 13px; white-space: nowrap; }
.hx-left.hx-over { background: var(--buzzer); color: var(--on-buzzer); }
.hx-bar { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.18); overflow: hidden; margin-top: 4px; }
.hx-bar i { display: block; height: 100%; border-radius: 8px; background: var(--gold); width: 0; }
.hx-bar i.w1 { width: 10%; } .hx-bar i.w2 { width: 20%; } .hx-bar i.w3 { width: 30%; } .hx-bar i.w4 { width: 40%; } .hx-bar i.w5 { width: 50%; }
.hx-bar i.w6 { width: 60%; } .hx-bar i.w7 { width: 70%; } .hx-bar i.w8 { width: 80%; } .hx-bar i.w9 { width: 90%; } .hx-bar i.w10 { width: 100%; }
.hx-row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--silver); }
.hx-stats { display: flex; gap: 8px; margin-top: 8px; }
.hx-stats div { flex: 1; min-width: 0; background: rgba(255, 255, 255, 0.08); border-radius: 14px; padding: 8px 10px; display: flex; flex-direction: column; }
.hx-stats b { font-family: var(--display); font-weight: 400; font-size: 21px; line-height: 1.3; color: #fff; white-space: nowrap; }
.hx-stats span { font-size: 12px; color: var(--silver); }
.hx-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.hx-chips a { white-space: nowrap; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 14px; color: var(--muted); text-decoration: none; }
.hx-chips a.on { background: var(--navy); color: var(--gold-2); border-color: var(--navy); }
.hx-month { font-weight: 800; color: var(--muted); font-size: 13px; margin: 6px 4px 0; display: flex; justify-content: space-between; }
.hx-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: 20px; overflow: hidden; border: 1px solid var(--line); }
.hx-list > li + li { border-top: 1px solid var(--band); }
.hx-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--ink); text-decoration: none; }
.hx-item:hover { background: var(--bg); }
.hx-item::after { content: '‹'; color: var(--silver); font-size: 20px; line-height: 1; }
[dir="ltr"] .hx-item::after { content: '›'; }
.hx-tile { width: 46px; height: 46px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none;
  background: var(--band); color: var(--ink); line-height: 1.05; }
.hx-tile b { font-family: var(--display); font-weight: 400; font-size: 20px; }
.hx-tile small { font-size: 10px; font-weight: 700; }
.hx-tile.mid { background: var(--soft); color: var(--navy); }
.hx-tile.long, .hx-tile.live { background: var(--navy); color: var(--gold-2); }
.hx-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hx-body strong { font-weight: 800; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-sub { font-size: 12.5px; color: var(--muted); }
.hx-end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.hx-amt { font-weight: 800; font-size: 16px; white-space: nowrap; }
.hx-amt s { color: var(--muted); font-weight: 600; }
.hx-st { font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.hx-st::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.hx-st.ok { color: var(--ok); } .hx-st.bad { color: var(--bad); } .hx-st.wait { color: #b47d00; } .hx-st.off { color: var(--muted); }
.hx-st.live { color: var(--ok); }
.hx-item.dim strong, .hx-item.dim .hx-amt { color: var(--muted); }
/* The detail page: a receipt with a navy head and dashed sections. */
.hx-detail { display: flex; flex-direction: column; gap: 12px; max-width: 620px; width: 100%; margin-inline: auto; }
.hx-receipt { background: var(--surface); border-radius: 24px; overflow: hidden; border: 1px solid var(--line); }
.hx-rhead { color: #fff; text-align: center; padding: 18px 16px 20px; display: flex; flex-direction: column; align-items: center; gap: 4px; background-color: var(--navy);
  background-image: repeating-conic-gradient(from 0deg at 50% 130%, var(--rays) 0 6deg, transparent 6deg 14deg); }
.hx-badge { display: inline-block; padding: 4px 14px; border-radius: 999px; font-weight: 800; font-size: 13px; background: var(--silver); color: var(--navy); }
.hx-badge.ok { background: var(--ok); color: var(--on-ok); } .hx-badge.bad { background: var(--bad); color: var(--on-bad); } .hx-badge.wait, .hx-badge.live { background: var(--gold); color: var(--navy); }
.hx-big { font-family: var(--display); font-size: 44px; line-height: 1.15; color: var(--gold-2); }
.hx-for { font-weight: 700; color: var(--silver); }
.hx-sim { font-size: 12px; font-weight: 700; color: var(--navy); background: var(--soft); border-radius: 999px; padding: 2px 10px; }
.hx-sec { padding: 14px 18px; border-top: 1px dashed var(--line); }
.hx-rhead + .hx-sec { border-top: 0; }
.hx-sec h2 { font-size: 13px; color: var(--muted); font-weight: 800; margin: 0 0 8px; }
.hx-state h1 { font-size: 20px; margin: 0 0 4px; }
.hx-kv { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.hx-kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 14.5px; }
.hx-kv dt { color: var(--muted); }
.hx-kv dd { margin: 0; font-weight: 700; text-align: end; }
.hx-kv .total { border-top: 1px solid var(--band); margin-top: 4px; padding-top: 8px; font-size: 16px; }
.hx-kv .total dd { font-weight: 900; }
.hx-kv .ok { color: var(--ok); } .hx-kv .bad { color: var(--bad); }
.hx-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; overflow-wrap: anywhere; }
.hx-tl { list-style: none; margin: 0; padding: 0 0 0 0; padding-inline-start: 22px; position: relative; display: flex; flex-direction: column; gap: 10px; }
.hx-tl::before { content: ''; position: absolute; inset-inline-start: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--band); }
.hx-tl li { position: relative; display: flex; flex-direction: column; }
.hx-tl li::before { content: ''; position: absolute; inset-inline-start: -21px; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--silver); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--silver); }
.hx-tl li.ok::before { background: var(--ok); box-shadow: 0 0 0 1px var(--ok); }
.hx-tl li.bad::before { background: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
.hx-tl li.wait::before { background: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.hx-tl b { font-size: 14.5px; }
.hx-tl small { font-size: 12px; color: var(--muted); }
.hx-limits { display: flex; gap: 8px; }
.hx-limits div { flex: 1; background: var(--bg); border-radius: 12px; padding: 8px; text-align: center; display: flex; flex-direction: column; }
.hx-limits b { font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1.3; }
.hx-limits span { font-size: 12px; color: var(--muted); }
.hx-actions { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 900px) {
  .hx-page { grid-template-columns: minmax(0, 1fr) 360px; grid-template-areas: "title title" "main side"; align-items: start; column-gap: 24px; }
  .hx-side { position: sticky; top: 90px; }
  .hx-actions { flex-direction: row; flex-wrap: wrap; }
  .hx-actions > * { flex: 1 1 200px; }
}
.hx-plans { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hx-plan-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 12px; position: relative; }
.hx-plan-card.current { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold) inset; }
.hx-plan-card.discounted { border-color: var(--gold); }
.hx-plan-top { display: flex; align-items: center; gap: 12px; }
.hx-price { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.hx-price b { font-family: var(--display); font-weight: 400; font-size: 28px; color: var(--letter); white-space: nowrap; }
.hx-price .was { color: var(--muted); font-size: 13px; }
.hx-price .hx-per { color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
.hx-plan-card .badge.offer { align-self: flex-start; }
.hx-plan-card form .primary { width: 100%; }
.hx-side .coupon-form { border: 1px solid var(--line); }
@media (min-width: 700px) { .hx-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hx-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hx-title-row h1 { font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 1.2; }
.hx-lead { font-size: 12.5px; font-weight: 700; color: var(--letter); }
.hx-list > li { display: flex; flex-direction: column; }
.hx-close { padding: 0 14px 10px; padding-inline-start: 72px; margin-top: -6px; }
.hx-close .link-button { font-size: 13px; }
.hx-session .hx-big { font-size: 34px; margin: 0; }
.hx-session .hx-limits b { font-size: 18px; }
.hx-session .hx-lead { margin: 10px 0 0; font-size: 14px; }
/* The panel bar's «+» (Nasser 2026-10-25): a round red buzzer raised over the bar on phones, a pill among the tabs on a
   computer. */
.panel-new { display: flex; justify-content: center; margin: 0; }
.panel-new button { display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: 0; padding: 0; color: var(--buzzer); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.panel-new-dot { width: 60px; height: 60px; margin-top: -30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--buzzer); color: var(--on-buzzer); box-shadow: 0 4px 0 var(--buzzer-shadow), 0 0 0 6px var(--menu); }
.panel-new-dot svg { width: 30px; height: 30px; }
.panel-new button:active .panel-new-dot { transform: translateY(3px); box-shadow: 0 1px 0 var(--buzzer-shadow), 0 0 0 6px var(--menu); }
/* While a game is open the middle button leads back to it (docs/COORDINATOR_UX.md §3): red, with a ring that breathes. */
.panel-nav a.panel-live { color: var(--buzzer); font-weight: 800; }
.panel-nav a.panel-live > span:last-child { white-space: nowrap; font-size: 11.5px; }
/* On a phone the home's plan card stays short: its numbers live under «ألعابي ← إحصاءاتي» (docs/COORDINATOR_UX.md P1). */
@media (max-width: 899px) { .hx-home .hx-stats { display: none; } }
.panel-live .panel-new-dot { animation: live-ring 1.8s ease-in-out infinite; }
@keyframes live-ring { 50% { box-shadow: 0 4px 0 var(--buzzer-shadow), 0 0 0 6px var(--menu), 0 0 0 12px color-mix(in srgb, var(--buzzer) 25%, transparent); } }
@media (prefers-reduced-motion: reduce) { .panel-live .panel-new-dot { animation: none; } }
@media (min-width: 900px) {
  .panel-new button { flex-direction: row; gap: 8px; padding: 6px 16px 6px 8px; border-radius: 16px; background: var(--buzzer); color: var(--on-buzzer); font-size: 15px; }
  .panel-new-dot { width: 26px; height: 26px; margin: 0; box-shadow: none; background: transparent; }
  .panel-new-dot svg { width: 20px; height: 20px; }
  .panel-nav a.panel-live { flex-direction: row; gap: 8px; padding: 6px 16px 6px 8px; border-radius: 16px; background: var(--buzzer); color: var(--on-buzzer); font-size: 15px; }
  .panel-live .panel-new-dot { animation: none; }
}
/* «المزيد» in groups (Nasser 2026-10-25): an icon on each row, rows that open in place, signing out on its own card. */
.mx-page { gap: 10px; }
.mx-account { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 22px; color: #fff; background-color: var(--navy);
  background-image: repeating-conic-gradient(from 0deg at 0% 100%, var(--rays) 0 6deg, transparent 6deg 14deg); }
.mx-account strong { font-size: 18px; }
.mx-account .small { color: var(--silver); }
.mx-head { font-size: 13px; font-weight: 800; color: var(--muted); margin: 8px 6px 0; }
.mx-list { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; margin: 0; }
.mx-list.mx-list > * + * { border-top: 1px solid var(--band); }
.mx-row { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 0 16px; width: 100%; background: transparent; border: 0; color: var(--ink);
  font: inherit; font-size: 16px; font-weight: 600; text-decoration: none; text-align: start; cursor: pointer; list-style: none; }
.mx-row::-webkit-details-marker { display: none; }
.mx-row:hover { background: var(--bg); }
.mx-row::after { content: '‹'; color: var(--silver); font-size: 22px; line-height: 1; margin-inline-start: auto; }
[dir="ltr"] .mx-row::after { content: '›'; }
.mx-fold > .mx-row::after { content: '⌄'; font-size: 18px; transition: transform 0.15s; }
.mx-fold[open] > .mx-row::after { transform: rotate(180deg); }
.mx-label { flex: 1; min-width: 0; }
.mx-val { color: var(--muted); font-size: 13px; font-weight: 500; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-ic { width: 36px; height: 36px; flex: none; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--band); color: var(--letter); }
.mx-ic svg { width: 20px; height: 20px; }
.mx-ic-orders, .mx-ic-stats, .mx-ic-leagues, .mx-ic-today { background: var(--soft); color: #b47d00; }
.mx-body { padding: 4px 16px 16px; gap: 8px; }
.mx-body .screen-card { padding: 0; border: 0; background: transparent; box-shadow: none; }
.mx-out, .mx-out .mx-ic { color: var(--bad); }
.mx-out .mx-ic { background: rgba(229, 40, 29, 0.1); }
.mx-out::after { content: none; }
.list-note { margin: 0; padding: 10px 16px; font-size: 14px; color: var(--muted); }
/* The home in the history look (Nasser 2026-10-25): on phones the plan, then a new session and the latest sessions,
   then the screen and the settings; on a computer the list on one side and the cards on the other. */
.hx-home { grid-template-areas: "title" "main" "side" "recent" "extra"; }
.hx-recent { grid-area: recent; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hx-coupons { margin: 0; }
.hx-screen-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: 20px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.hx-screen-link .small { color: var(--muted); }
.hx-screen-link b { font-size: 18px; letter-spacing: 1px; white-space: nowrap; }
.hx-extra { grid-area: extra; display: flex; flex-direction: column; gap: 12px; }
.hx-greet h1 { font-family: var(--display); font-weight: 400; font-size: 32px; line-height: 1.25; margin: 0; }
.hx-greet p { margin: 2px 0 0; font-family: var(--font); font-size: 15px; line-height: 1.5; }
.hx-side > .button { width: 100%; }
.hx-today { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: 20px; text-decoration: none;
  background: var(--soft); color: var(--navy); border: 1px solid var(--gold); }
.hx-today .small { color: var(--muted); }
.hx-today b { font-family: var(--display); font-weight: 400; font-size: 40px; line-height: 1; color: var(--navy); }
.hx-extra .screen-card, .hx-extra .howto, .hx-extra #ai { border: 1px solid var(--line); }
.hx-resume { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 20px; background: var(--surface); border: 2px solid var(--ok);
  color: var(--ink); text-decoration: none; }
.hx-resume b { color: var(--ok); white-space: nowrap; }
.hx-resume-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.18); flex: none; }
.hx-start { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0; padding: 16px 18px; border-radius: 22px;
  background: var(--surface); border: 1px solid var(--line); }
.hx-start strong { font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1.2; }
.hx-buzz { width: 64px; height: 64px; flex: none; border-radius: 50%; border: 0; padding: 0; cursor: pointer; display: flex; align-items: center; justify-content: center;
  background: var(--buzzer); color: var(--on-buzzer); box-shadow: 0 5px 0 var(--buzzer-shadow); }
.hx-buzz svg { width: 32px; height: 32px; }
.hx-buzz:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--buzzer-shadow); }
.hx-month a { font-weight: 700; color: var(--letter); text-decoration: none; }
@media (min-width: 900px) {
  .hx-home { grid-template-areas: "title title" "main side" "recent side" "recent extra"; grid-template-rows: auto auto auto 1fr; }
  .hx-home .hx-side { position: static; }
}
/* «البريد» (USER_AUTH_FLOW.md §4ب): proven or not, next to the address. */
.mx-flag { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.mx-flag.ok { background: rgba(22, 163, 74, 0.12); color: var(--ok); }
.mx-flag.wait { background: var(--soft); color: #b47d00; }

/* ---- Full width (nhmsv LAYOUT_WIDTH.md, Nasser 2026-10-26) ----------------------------------------------------
   Pages use the screen up to --content-max (1920px), then centre. The bar spans the same width. Forms and long text
   stay narrow and centred; card lists add columns as the screen grows; the type never grows. The game screens for
   players and the TV stay as designed: a round is played on a phone. */
:root { --content-max: 1920px; }
@media (min-width: 900px) {
  .top { padding-inline: max(24px, calc((100% - var(--content-max)) / 2 + 24px)); }
  body.landing-page .top { max-width: var(--content-max); padding-inline: 24px; }
  .section, .hero, body.landing-page .foot { max-width: var(--content-max); }
  body.wide .wrap, body.panel-wide .wrap { max-width: var(--content-max); padding-inline: 32px; }
}
@media (min-width: 900px) {
  body.panel-wide .top { max-width: none; }
  body.wide .top, body.panel-wide .top { padding-inline: max(32px, calc((100% - var(--content-max)) / 2 + 32px)); }
  /* Card lists and reports: columns grow with the screen; forms beside them stay narrow. */
  body.panel-wide .session-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); }
  body.panel-wide .league-new { width: 100%; max-width: 720px; margin-inline: auto; }
  .hx-plans { grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); }
  .stats-page { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); align-items: start; }
  .stats-page > :is(.back-link, h1, .meters, p) { grid-column: 1 / -1; }
}

/* «جلسة جديدة» with a session still open (Nasser 2026-10-27): go back to it, or end it and start a new one. */
.open-choice { display: flex; flex-direction: column; gap: 12px; border: 2px solid var(--accent); }
.open-choice-row { display: flex; flex-direction: column; gap: 10px; }
.open-choice-row form { margin: 0; display: flex; }
.open-choice-row form > button, .open-choice-row .button { width: 100%; min-height: 52px; }
@media (max-width: 560px) { .open-choice-row .row-buttons { flex-direction: column; } }

/* The emoji a player picks when joining (Nasser 2026-10-30, as in Quizenta): tap to choose; a taken one is dimmed and
   says so when tapped (shell.js). */
.avatar-pick { border: 0; padding: 0; margin: 0; min-width: 0; }
.avatar-pick legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.avatar-note:empty { display: none; }
.avatar-mark, .show-avatar { margin-inline-end: 0.3em; }

/* ---- The round's small helps (suggestions ل4، ق5، and the save mark) -------------------------------------- */
/* Each field's save mark at its end: waiting (grey), saved (green ✓), not sent yet (red, kept on the phone). */
.round-field::after { content: ''; flex: none; width: 18px; text-align: center; font-size: 15px; font-weight: 800; line-height: 1; }
.round-field[data-save="pending"]::after { content: '•'; color: var(--muted); }
.round-field[data-save="saved"]::after { content: '✓'; color: var(--ok); }
.round-field[data-save="failed"]::after { content: '!'; color: var(--bad); }
/* The last ten seconds of a timed round: the fields still empty turn red. */
.round-screen.hurry .round-field.empty { border-color: var(--bad); animation: hurry 1s ease-in-out infinite; }
@keyframes hurry { 50% { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); } }
@media (prefers-reduced-motion: reduce) { .round-screen.hurry .round-field.empty { animation: none; } }
/* The first «بس!» of a session: what a wrong answer costs, once. */
.bus-tip { margin: 8px 4px 0; font-size: 14px; color: var(--muted); text-align: center; }

/* ---- Larger text on this phone (suggestion «حجم الخط»), from the menu ------------------------------------- */

/* ---- «كيف نلعب؟» in the lobby (suggestion ل1) ------------------------------------------------------------- */
.howto h2 { margin: 0 0 10px; }
.howto-steps { margin: 0 0 14px; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 10px; }
.howto-steps li { counter-increment: step; display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; align-items: start; }
.howto-steps li::before { content: counter(step); grid-row: span 2; width: 30px; height: 30px; border-radius: 15px; background: var(--accent); color: var(--on-accent); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.howto-steps b { font-size: 16px; }
.howto-steps span { color: var(--muted); font-size: 15px; }

/* ---- The fields as a player's phone shows them (suggestion م11) ------------------------------------------- */
.field-preview { margin-top: 10px; }
.field-preview-phone { width: min(100%, 340px); margin-inline: auto; padding: 12px; border: 2px solid var(--line); border-radius: 26px; background: var(--bg); display: flex; flex-direction: column; gap: 6px; }
.field-preview-phone .round-field { height: 42px; padding-inline: 14px; }
.field-preview-phone .round-field span { font-size: 14px; }
.fp-line { flex: 1; height: 2px; background: var(--line); border-radius: 1px; }

/* ---- The paid plan ends within half an hour (suggestion م10) ---------------------------------------------- */
.plan-warning { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 16px; border-radius: 20px; background: color-mix(in srgb, var(--gold, #ffb800) 22%, var(--surface)); color: var(--ink); font-size: 15px; font-weight: 600; }
.plan-warning span { flex: 1; }
.plan-warning .small-button { flex: none; min-height: 40px; padding-inline: 16px; font-size: 15px; }

/* ---- «ألقاب الليلة»: a title for every player (suggestion ل7) --------------------------------------------- */
.title-list { list-style: none; margin: 0; padding: 0; border-radius: 18px; background: var(--surface); border: 2px solid var(--line); overflow: hidden; }
.title-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who name" "why why"; gap: 2px 10px; padding: 10px 14px; }
.title-list li + li { border-top: 1px solid var(--line); }
.title-list li.mine { background: var(--mine); }
.title-who { grid-area: who; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title-name { grid-area: name; font-weight: 800; color: var(--letter); }
.title-why { grid-area: why; font-size: 13px; color: var(--muted); }

/* ---- The coordinator's round controls and the paused round (suggestions م1، م2، م3) ----------------------- */
.round-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding-block: 8px; }
.round-controls .chip.control { cursor: pointer; font-weight: 700; border: 2px solid var(--line); background: var(--surface); min-height: 40px; }
.round-screen { position: relative; }
.pause-cover { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px; text-align: center; background: var(--bg); }
.pause-title { margin: 0; font-size: 26px; font-weight: 800; color: var(--letter); }
.round-screen.paused .round-timer { opacity: 0.6; }

/* ---- Scoring helps (suggestions ق1، ق4، ق6، ق7، م5) -------------------------------------------------------- */
.verdict-btn.half[aria-pressed="true"] { background: var(--gold, #ffb800); color: var(--navy, #0b1d51); border-color: var(--gold, #ffb800); }
.rv-row.half .rv-answer::after { content: ' ½'; color: #b47d00; }
.pts.half { color: #b47d00; }
.accept-many { width: 100%; margin-block: 6px; }
.rv-golden { margin: 6px 0; padding: 8px 12px; border-radius: 14px; background: color-mix(in srgb, var(--gold, #ffb800) 20%, var(--surface)); font-weight: 700; text-align: center; }
.double-tag { margin: 6px 0 0; font-size: 20px; font-weight: 800; color: var(--gold, #ffb800); }
.adjustments h2 { margin: 0 0 8px; font-size: 17px; }
.adjustments ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.adjustments li { display: grid; grid-template-columns: auto auto 1fr; gap: 8px; align-items: baseline; }
.adj-pts.pos { color: var(--ok); } .adj-pts.neg { color: var(--bad); }
.adj-why { color: var(--muted); font-size: 14px; }
.adjust-form summary { cursor: pointer; font-weight: 700; }
.adjust-form form { margin-top: 10px; }

/* ---- Reactions, the oddest answers, «مجموعاتي» (suggestions ل3، و1، م7) ------------------------------------ */
.reactions { display: flex; gap: 6px; padding: 2px 4px 6px; }
.react { display: inline-flex; align-items: center; gap: 3px; min-height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 15px; background: transparent; font-size: 15px; line-height: 1; cursor: pointer; }
.react b { font-size: 12px; color: var(--muted); }
.react.on { border-color: var(--accent); background: var(--mine); }
.oddest h2 { margin: 0 0 8px; font-size: 18px; }
.field-sets { margin-top: 8px; }
.field-sets .chip .link-button { padding: 0 2px; text-decoration: none; color: inherit; }
.field-sets .wide-label { width: auto; padding-inline: 14px; }

/* «إزالة جميع اللاعبين» under the lobby's players. */
.chips .kick-all { flex-basis: 100%; text-align: start; font-size: 14px; color: var(--muted); padding: 4px 0 0; }

/* ---- Public pages after the persona test (2026-11-08) ---- */
.field-error { margin: 6px 0 0; color: var(--bad); font-size: 14px; font-weight: 700; }
input[aria-invalid="true"] { border-color: var(--bad); }
.menu-item.strong { font-weight: 800; }
.plans-why { margin: 16px auto 0; max-width: 46em; text-align: center; font-weight: 700; }
.hx-main .plans-why { text-align: start; margin: 0 0 12px; font-weight: 400; color: var(--muted); }
.foot { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; }
.foot-contact, .foot-pay { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.foot-chip { padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink) !important; font-weight: 700; text-decoration: none; }
.pay-chip { padding: 3px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: #1a1f36; font-size: 13px; font-weight: 800; }
.foot-id { font-size: 13px; color: var(--muted); text-align: center; }
.foot bdi { white-space: nowrap; }
.foot .foot-version::before { content: none; }
body.landing-page .foot { flex-direction: column; align-items: center; justify-content: center; }
.legal h2 { margin: 12px 0 0; font-size: 18px; font-weight: 800; }
.legal .row-links { display: flex; flex-wrap: wrap; gap: 10px; }
.tv-section { display: grid; gap: 28px; align-items: center; }
.tv-art { position: relative; max-width: 520px; width: 100%; margin-inline: auto; padding-bottom: 12px; }
.tv-mock { direction: rtl; }
.tv-screen { aspect-ratio: 16 / 9; border: 8px solid #10131f; border-radius: 16px; background: repeating-conic-gradient(from 0deg at 50% 120%, rgba(255, 255, 255, 0.05) 0deg 7deg, transparent 7deg 18deg), #0b1d51; color: #fff;
  padding: 5% 6%; display: flex; flex-direction: column; justify-content: center; gap: 7%; box-shadow: var(--shadow); }
.tv-foot { width: 34%; height: 10px; margin: 0 auto; border-radius: 0 0 10px 10px; background: #10131f; }
.tv-head { display: flex; align-items: center; gap: 4%; font-weight: 800; }
.tv-letter { display: grid; place-items: center; width: 15%; aspect-ratio: 1; border-radius: 22%; background: #ffb800; color: #0b1d51; font-family: var(--display); font-size: clamp(22px, 6vw, 40px); line-height: 1; }
.tv-round { flex: 1; font-size: clamp(12px, 3vw, 18px); }
.tv-clock { font-size: clamp(14px, 3.6vw, 22px); color: #ffb800; }
.tv-row { display: flex; align-items: center; gap: 4%; font-size: clamp(11px, 2.8vw, 16px); }
.tv-row b { width: 22%; }
.tv-cells { flex: 1; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4%; }
.tv-cells i { height: clamp(10px, 2.6vw, 18px); border-radius: 5px; background: rgba(255, 255, 255, 0.14); }
.tv-cells i.on { background: #22c55e; }
.tv-phone { position: absolute; inset-block-end: 0; inset-inline-end: -2%; width: 17%; aspect-ratio: 9 / 17; border: 4px solid #10131f; border-radius: 14px; background: var(--surface); display: flex; flex-direction: column; align-items: center; gap: 8%; padding: 10% 8%; box-shadow: var(--shadow); }
.tv-phone span { font-family: var(--display); font-size: clamp(16px, 4vw, 26px); line-height: 1; color: var(--letter); }
.tv-phone i { width: 100%; height: 9%; border-radius: 4px; background: var(--line); }
.tv-steps { margin: 12px 0; padding-inline-start: 1.3em; display: grid; gap: 8px; font-weight: 700; }
@media (min-width: 900px) { .tv-section { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; } }
/* Explanations read from across a desk on wide screens. */
@media (min-width: 1100px) {
  .landing p, .landing .muted, .landing .ticks li, .landing summary, .tv-steps { font-size: 19px; }
  .landing .lead { font-size: 21px; }
  .landing .small { font-size: 16px; }
}

/* «لاعبون تجريبيون» (Nasser 2026-11-09): the lobby's row, the mark on their chips, the trial strip. */
.test-players { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 14px; padding-top: 4px; }
.chip.bot { border-style: dashed; }
/* /tv: the screen's code (Nasser 2026-11-08). */
.screen-code { display: flex; align-items: baseline; gap: 10px; margin: 0; }
.screen-code b { font-size: 26px; font-weight: 800; letter-spacing: 0.08em; color: var(--letter); }
.tv-code { text-transform: uppercase; letter-spacing: 0.12em; }

.tv-way { margin: 4px 0 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.tv-way-code { border: 1px dashed var(--line); border-radius: 12px; background: var(--bg); color: var(--letter); font: inherit; font-weight: 800; letter-spacing: 0.08em; padding: 6px 14px; }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 60; }
.confetti i { position: absolute; top: -20px; display: block; opacity: 0.95; animation: confetti-fall 3s linear both; }
@keyframes confetti-fall { 0% { transform: translateY(0) rotate(0); } 100% { transform: translateY(110vh) rotate(720deg); opacity: 0.7; } }

/* «حالة الموقع»: the closed page's notice above the join form. */
.closed-card { max-width: 560px; margin: 0 auto 16px; text-align: center; border: 2px solid var(--accent); }

/* The coordinator's side menu (Nasser 2026-11-13, the same shape as Feudboard and Jeoboard, in navy and gold). A
   computer only: a phone keeps the bottom bar (.panel-nav). */
.coord-side { display: none; }
@media (min-width: 900px) {
  body.has-side .coord-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100dvh; }
  body.has-side .coord-main { min-width: 0; }
  body.has-side .coord-side { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100dvh; overflow-y: auto;
    padding: 20px 14px 16px; background: repeating-conic-gradient(from 0deg at 50% 115%, var(--rays) 0deg 6deg, transparent 6deg 15deg), var(--navy); color: var(--on-navy); }
  body.has-side .panel-nav, body.has-side .top .brand { display: none; }
  .coord-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px; color: var(--on-navy); font-weight: 800; font-size: 19px; text-decoration: none; }
  .coord-brand img { border-radius: 10px; }
  .coord-who { margin: 2px 12px 12px; font-size: 13px; color: color-mix(in srgb, var(--on-navy) 70%, transparent); }
  .coord-desk ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
  .coord-desk a { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 999px; color: var(--on-navy); text-decoration: none; font-weight: 700; }
  .coord-desk a:hover { background: color-mix(in srgb, var(--on-navy) 12%, transparent); }
  .coord-desk a.active { background: var(--gold); color: var(--navy); }
  .coord-desk svg { flex: none; }
  .coord-new { margin: 8px 0 4px; }
  a.coord-new { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; border-radius: 999px; text-decoration: none;
    background: var(--buzzer, #ff3b30); color: #fff; font-weight: 800; box-shadow: 0 4px 0 var(--buzzer-shadow, #b3261e); }
  /* The side menu stands for «حسابي» and the menu on a computer (docs/COORDINATOR_UX.md §3, P5). */
  body.has-side .top .pill { display: none; }
  body.has-side .menu { inset-inline-end: 20px; }
  .coord-new button { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; border: 0; border-radius: 999px;
    background: var(--buzzer, #ff3b30); color: #fff; font: inherit; font-weight: 800; cursor: pointer; box-shadow: 0 4px 0 var(--buzzer-shadow, #b3261e); }
  .coord-group { margin: 14px 16px 4px; font-size: 12px; font-weight: 800; letter-spacing: 0.02em; color: color-mix(in srgb, var(--on-navy) 60%, transparent); }
  .coord-out { margin-top: auto; padding-top: 12px; }
  .coord-out button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 16px; border: 0; border-radius: 999px; background: transparent;
    color: color-mix(in srgb, var(--on-navy) 75%, transparent); font: inherit; cursor: pointer; }
  .coord-out button:hover { background: color-mix(in srgb, var(--on-navy) 12%, transparent); color: var(--on-navy); }
}

/* Verdict colours with depth (Nasser 2026-11-14: «more professional, with a gradient in the red and the green»):
   emerald and rose ramps, a soft tint on the rows, the full ramp on what is pressed (docs/COORDINATOR_UX.md). */
:root {
  --ok-grad: linear-gradient(135deg, #34d399 0%, #10b981 48%, #047857 100%);
  --bad-grad: linear-gradient(135deg, #fb7185 0%, #f43f5e 48%, #be123c 100%);
  --half-grad: linear-gradient(135deg, #fcd34d 0%, #f59e0b 50%, #b45309 100%);
  --ok-tint: linear-gradient(270deg, rgba(16, 185, 129, 0.16), rgba(16, 185, 129, 0.03));
  --bad-tint: linear-gradient(270deg, rgba(244, 63, 94, 0.15), rgba(244, 63, 94, 0.03));
  --ok-line: rgba(16, 185, 129, 0.35); --bad-line: rgba(244, 63, 94, 0.32);
  --ok-ink: #047857; --bad-ink: #be123c;
  --ok-glow: 0 8px 18px -8px rgba(5, 150, 105, 0.7); --bad-glow: 0 8px 18px -8px rgba(225, 29, 72, 0.7);
}
[data-theme="night"] {
  --ok-tint: linear-gradient(270deg, rgba(52, 211, 153, 0.22), rgba(52, 211, 153, 0.05));
  --bad-tint: linear-gradient(270deg, rgba(251, 113, 133, 0.22), rgba(251, 113, 133, 0.05));
  --ok-line: rgba(52, 211, 153, 0.45); --bad-line: rgba(251, 113, 133, 0.45);
  --ok-ink: #6ee7b7; --bad-ink: #fda4af;
}
.rv-row.ok, .rv-row.half { background: var(--ok-tint); }
.rv-row.bad { background: var(--bad-tint); }
.rv-row + .rv-row { border-top-color: transparent; }
.rv-list .rv-row { border-radius: 12px; }
.rv-list { display: flex; flex-direction: column; gap: 4px; }
.pts.ok { color: var(--ok-ink); } .pts.bad { color: var(--bad-ink); }
.verdict-btn { transition: transform 0.12s ease, box-shadow 0.12s ease; }
.verdict-btn.ok { color: var(--ok-ink); } .verdict-btn.bad { color: var(--bad-ink); }
.verdict-btn.ok[aria-pressed="true"] { background: var(--ok-grad); border-color: transparent; color: #fff; box-shadow: var(--ok-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.verdict-btn.bad[aria-pressed="true"] { background: var(--bad-grad); border-color: transparent; color: #fff; box-shadow: var(--bad-glow), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.verdict-btn.half[aria-pressed="true"] { background: var(--half-grad); border-color: transparent; color: #fff; }
.verdict-btn:active { transform: scale(0.94); }
.rv-tab .done { color: var(--ok-ink); }
/* The field bar: six equal cells, never a scrollbar (Nasser 2026-11-14). */
.rv-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); overflow: visible; }
.rv-tab { min-width: 0; justify-content: center; padding: 6px 6px; }
.rv-tab.on { grid-column: span 2; }
.rv-tab-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rv-tab .field-art { width: 20px; height: 20px; flex: none; }
.rv-flag { color: var(--bad-ink); font-weight: 800; }
/* Appeals: a visible button on one's own wrong answer, and a card pinned above the answers. */
.appeal-raise { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 4px 10px; border: 0; border-radius: 12px;
  background: var(--gold); color: var(--navy); font: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.appeal-left { font-weight: 600; font-size: 12px; }
.appeal-cards { display: flex; flex-direction: column; gap: 8px; }
.appeal-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 16px; border: 1.5px solid var(--gold); background: var(--soft); color: var(--ink); }
.appeal-card.mine { background: var(--surface); border-style: dashed; }
.appeal-card.accepted { background: var(--ok-tint), var(--surface); border-color: var(--ok-line); }
.appeal-card.rejected { background: var(--bad-tint), var(--surface); border-color: var(--bad-line); }
.appeal-card.accepted .appeal-title { color: var(--ok-ink); } .appeal-card.rejected .appeal-title { color: var(--bad-ink); }
.appeal-card.open { animation: appeal-glow 1.6s ease-in-out infinite; }
.appeal-title { font-size: 15px; line-height: 1.4; }
.appeal-card a { color: inherit; }
.appeal-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.appeal-yes, .appeal-no { min-height: 44px; border: 0; border-radius: 14px; color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.appeal-yes { background: var(--ok-grad); box-shadow: var(--ok-glow), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.appeal-no { background: var(--bad-grad); box-shadow: var(--bad-glow), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.appeal-yes.big, .appeal-no.big { min-height: 50px; font-size: 17px; }
.appeal-yes[aria-pressed="true"], .appeal-no[aria-pressed="true"] { outline: 3px solid var(--gold); outline-offset: 2px; }
.appeal-yes[aria-pressed="false"], .appeal-no[aria-pressed="false"] { opacity: 0.85; }
.appeal-bar { display: flex; gap: 3px; height: 8px; }
.appeal-bar i { border-radius: 8px; background: var(--line); }
.appeal-bar i.agree { background: var(--ok-grad); } .appeal-bar i.disagree { background: var(--bad-grad); }
.appeal-bar .w0 { display: none; }
.appeal-bar .w1 { flex: 1; } .appeal-bar .w2 { flex: 2; } .appeal-bar .w3 { flex: 3; } .appeal-bar .w4 { flex: 4; } .appeal-bar .w5 { flex: 5; }
.appeal-bar .w6 { flex: 6; } .appeal-bar .w7 { flex: 7; } .appeal-bar .w8 { flex: 8; } .appeal-bar .w9 { flex: 9; } .appeal-bar .w10 { flex: 10; }
.appeal-bar:not(:has(.w1, .w2, .w3, .w4, .w5, .w6, .w7, .w8, .w9, .w10))::before { content: ""; flex: 1; border-radius: 8px; background: var(--line); }
.appeal-counts { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .appeal-card.open { animation: none; } }

/* The coordinator's round (docs/COORDINATOR_UX.md §0, option B): who filled which field, four quick actions, ⚡. */
.cr-top { flex-direction: column; align-items: stretch; gap: 8px; }
.cr-head-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.cr-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cr-titles .letter-title { font-size: 22px; }
.cr-count:empty { display: none; }
.cr-count { font-family: var(--display); font-size: 28px; line-height: 1.1; margin: 0; }
.cr-steps { list-style: none; margin: 0; padding: 0 4px; display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 12.5px; font-weight: 800; color: var(--muted); }
.cr-steps li { display: inline-flex; align-items: center; gap: 5px; }
.cr-steps li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: 0.5; }
.cr-steps li + li::after { content: none; }
.cr-steps li.on { color: var(--navy); background: var(--gold); border-radius: 999px; padding: 1px 10px 1px 8px; } .cr-steps li.on::before { opacity: 1; }
.cr-steps li.done { color: var(--ink); }
.cr-body { display: flex; flex-direction: column; gap: 10px; }
.cr-role { align-self: center; }
.cr-grid { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; }
.cr-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.cr-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.cr-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-bus { color: var(--buzzer); font-size: 12px; font-weight: 800; white-space: nowrap; }
.cr-cells { display: grid; grid-template-columns: repeat(6, 22px); gap: 6px; }
.cr-cells i { height: 16px; border-radius: 5px; background: var(--band); }
.cr-cells i.on { background: var(--gold); }
.cr-row.bus .cr-cells i.on { background: var(--bad-grad); }
.cr-head .cr-cells b { display: grid; justify-items: center; gap: 1px; }
.cr-head .cr-cells .field-art { width: 20px; height: 20px; }
.cr-head .cr-cells small { font-size: 11px; color: var(--muted); font-weight: 700; }
.cr-fname { font-size: 11px; }
/* Four equal tiles, never a scrollbar (Nasser 2026-11-14); the rest live behind ⚡. */
.cr-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.cr-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px; min-width: 0; padding: 6px 4px;
  border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 800; line-height: 1.25; text-align: center; cursor: pointer; }
.cr-tile svg { width: 20px; height: 20px; }
.cr-tile:disabled { opacity: 0.45; cursor: default; }
.cr-tile.on { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.cr-bolt { flex: none; width: 56px; border: 0; border-radius: 16px; background: var(--gold); color: var(--navy); display: grid; place-items: center; cursor: pointer; }
.cr-bolt svg { width: 24px; height: 24px; }
.quick-head { margin: 8px 0 6px; font-size: 13px; color: var(--muted); }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.role-back { border: 0; border-radius: 999px; padding: 4px 12px; background: var(--gold); color: var(--navy); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }

/* Lobby on a phone (docs/COORDINATOR_UX.md §0, option A): a short invite card, the players right under it, and the
   bar [⚙] [ابدأ] [⚡] at the bottom. */
.lobby-bolt { width: 60px; height: 60px; border-radius: 50%; box-shadow: 0 5px 0 color-mix(in srgb, var(--gold) 60%, var(--navy)); }
@media (max-width: 899px) {
  .coord-lobby .players-card { order: -1; min-height: 0; }
  .coord-lobby .lobby-main { display: flex; flex-direction: column; }
  .coord-lobby .share-card { gap: 10px; padding: 14px; }
  .coord-lobby .qr { width: 76px; height: 76px; }
  .coord-lobby .share-code .code { font-size: 40px; }
  .coord-lobby .invite-icons { gap: 6px; }
  /* The screen's button and code live behind ⚡ and on «الشاشة», so the players show sooner. */
  .coord-lobby .screen-open, .coord-lobby .tv-way { display: none; }
  body:has(.coord-dock) .wrap { padding-bottom: 110px; }
}
/* On a computer the lobby's buttons stay in the page under the players, as before, without the dock's bar. */
@media (min-width: 900px) {
  .lobby-actions.gu-dock { position: static; z-index: auto; max-width: none; margin: 0; padding: 0; background: none; border: 0; border-radius: 0; }
}

/* The round's foot (P7) is game-ui's dock, in the screen's own column (its body scrolls above it), not over it. */
.screen-foot.gu-dock { position: static; z-index: auto; max-width: none; margin-inline: 0; flex-direction: row; align-items: center; }

/* Results (option A, as Quizboard): the first three as cards, the rest as the table. */
.podium { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; }
.podium-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 18px; background: var(--surface);
  border: 1px solid var(--line); text-align: center; min-width: 0; }
/* The page keeps rank order (1, 2, 3); on screen the first stands in the middle. */
.podium-card.p1 { order: 2; padding-block: 18px; border: 2px solid var(--gold); background: var(--soft); }
.podium-card.p2 { order: 1; } .podium-card.p3 { order: 3; }
.podium-card.me { box-shadow: 0 0 0 3px var(--accent); }
.podium-medal { font-size: 26px; line-height: 1.2; }
.podium-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-total { font-family: var(--display); font-size: 30px; line-height: 1.1; }
.podium-total.neg { color: var(--bad-ink); }
.podium-gain { font-size: 13px; font-weight: 800; color: var(--ok-ink); }
.podium-gain.neg { color: var(--bad-ink); }
.podium-move { font-size: 12px; font-weight: 800; }
.podium-move.up { color: var(--ok-ink); } .podium-move.down { color: var(--bad-ink); }

/* The coordinator's game on a computer, option B (docs/COORDINATOR_UX.md §0): the panel's menu as icons on one side,
   the standings on the other. Option A, and every phone, show neither. */
.cr-rail, .cr-aside { display: none; }
@media (min-width: 1000px) {
  body.desk-b { padding-inline-start: 76px; }
  body.desk-b:has(.cr-aside) { padding-inline-end: 300px; }
  body.desk-b .cr-rail { display: flex; flex-direction: column; align-items: center; gap: 6px; position: fixed; z-index: 20; inset-block: 0; inset-inline-start: 0;
    width: 76px; padding: 18px 0; background: var(--navy); }
  .cr-rail a { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; color: var(--on-navy); }
  .cr-rail a:hover { background: color-mix(in srgb, var(--on-navy) 12%, transparent); }
  .cr-rail a.on { background: var(--buzzer); color: var(--on-buzzer); }
  .cr-rail svg { width: 22px; height: 22px; }
  .cr-rail-sep { width: 32px; height: 1px; margin: 6px 0; background: color-mix(in srgb, var(--on-navy) 25%, transparent); }
  body.desk-b .cr-aside { display: flex; flex-direction: column; gap: 10px; position: fixed; z-index: 20; inset-block: 0; inset-inline-end: 0;
    width: 300px; padding: 20px 16px; overflow-y: auto; background: var(--surface); border-inline-start: 1px solid var(--line); }
  .cr-aside-head { display: flex; justify-content: space-between; align-items: baseline; }
  .cr-stand { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
  .cr-stand li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--bg); }
  .cr-stand li.first { background: var(--soft); box-shadow: inset 0 0 0 1.5px var(--gold); }
  .cr-stand .place { font-family: var(--display); }
  .cr-stand .who { display: flex; gap: 6px; align-items: center; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .cr-stand b { font-variant-numeric: tabular-nums; }
  .cr-stand b.neg { color: var(--bad-ink); }
}

/* «جاري تصحيح الإجابات» (Nasser 2026-11-14): the letter in a turning gradient ring, the six fields lighting in turn. */
.ai-wait { gap: 16px; }
.ai-ring { position: relative; width: 120px; height: 120px; display: grid; place-items: center; }
.ai-ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; padding: 5px;
  background: conic-gradient(from 0deg, var(--gold), var(--buzzer), #8b5cf6, #10b981, var(--gold));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 1.6s linear infinite; }
.ai-letter { width: 84px; height: 84px; display: grid; place-items: center; border-radius: 26px; background: var(--gold); color: var(--navy);
  font-family: var(--display); font-size: 52px; line-height: 1; box-shadow: 0 10px 24px -10px rgba(11, 29, 81, 0.5); animation: ai-breathe 1.6s ease-in-out infinite; }
.ai-wait-title { margin: 0; font-size: 22px; font-weight: 800; }
.ai-fields { display: flex; gap: 10px; }
.ai-field { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--surface); border: 1px solid var(--line);
  font-weight: 800; animation: ai-light 2.4s ease-in-out infinite; }
.ai-field .field-art { width: 24px; height: 24px; }
.ai-field.d1 { animation-delay: 0.4s; } .ai-field.d2 { animation-delay: 0.8s; } .ai-field.d3 { animation-delay: 1.2s; }
.ai-field.d4 { animation-delay: 1.6s; } .ai-field.d5 { animation-delay: 2s; }
@keyframes ai-light { 0%, 100% { transform: none; box-shadow: none; } 15% { transform: translateY(-6px); box-shadow: 0 0 0 3px var(--gold), 0 10px 18px -8px rgba(255, 184, 0, 0.8); } 30% { transform: none; box-shadow: none; } }
@keyframes ai-breathe { 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .ai-ring::before, .ai-letter, .ai-field { animation: none; } }

/* «اختر لي عشوائياً» (Nasser 2026-11-14): the light that runs over the letters, then the one it lands on. */
.letter-grid.rolling button { pointer-events: none; }
.letter-grid button.roll { background: var(--accent); color: var(--on-accent); transform: scale(1.1); box-shadow: 0 8px 18px -8px rgba(255, 184, 0, 0.9); transition: none; }
.letter-grid button.landed { animation: letter-land 0.6s ease-out; box-shadow: 0 0 0 4px var(--accent), 0 12px 26px -8px rgba(255, 184, 0, 0.9); }
@keyframes letter-land { 0% { transform: scale(1.1); } 40% { transform: scale(1.35) rotate(-4deg); } 100% { transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .letter-grid button.landed { animation: none; } }
/* The screen's background comes alive (Nasser 2026-11-14: «like city lights, cinematic»), night colours only: two soft
   searchlight beams sweep slowly, and out-of-focus city lights drift and breathe behind the content. Transforms
   and opacity only (cheap on a TV's browser); still for reduced motion and in the day and high-contrast colours. */
body.screen-page:not(.show-day):not(.show-contrast) .wrap { position: relative; z-index: 1; }
body.screen-page:not(.show-day):not(.show-contrast)::before,
body.screen-page:not(.show-day):not(.show-contrast)::after { content: ""; position: fixed; z-index: 0; pointer-events: none; }
body.screen-page:not(.show-day):not(.show-contrast)::before {
  inset: -20vmax -20vmax 0; transform-origin: 50% 100%;
  background: conic-gradient(from 270deg at 50% 100%, transparent 0deg 38deg, rgba(255, 214, 120, 0.09) 46deg, transparent 54deg 120deg,
    rgba(140, 180, 255, 0.08) 128deg, transparent 136deg 360deg);
  filter: blur(8px); animation: tv-beams 26s ease-in-out infinite alternate; }
body.screen-page:not(.show-day):not(.show-contrast)::after { content: ""; position: fixed; z-index: 0; pointer-events: none; }
body.screen-page:not(.show-day):not(.show-contrast)::before {
  inset: -50vmax; transform-origin: 50% 50%;
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 210, 77, 0.05) 0deg 5deg, transparent 5deg 14deg);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 10%, transparent 60%); mask-image: radial-gradient(circle at 50% 50%, #000 10%, transparent 60%);
  animation: tv-rays 180s linear infinite; }
body.screen-page:not(.show-day):not(.show-contrast)::after {
  inset: -10%; filter: blur(5px);
  background:
    radial-gradient(circle at 12% 78%, rgba(255, 184, 0, 0.32) 0 0.6vmax, transparent 1.4vmax),
    radial-gradient(circle at 22% 30%, rgba(255, 59, 48, 0.22) 0 0.9vmax, transparent 2.2vmax),
    radial-gradient(circle at 35% 88%, rgba(120, 170, 255, 0.28) 0 0.5vmax, transparent 1.3vmax),
    radial-gradient(circle at 48% 18%, rgba(255, 255, 255, 0.16) 0 0.4vmax, transparent 1.1vmax),
    radial-gradient(circle at 63% 72%, rgba(255, 210, 77, 0.26) 0 1.1vmax, transparent 2.6vmax),
    radial-gradient(circle at 74% 26%, rgba(139, 92, 246, 0.22) 0 0.8vmax, transparent 2vmax),
    radial-gradient(circle at 86% 60%, rgba(255, 184, 0, 0.3) 0 0.5vmax, transparent 1.3vmax),
    radial-gradient(circle at 92% 14%, rgba(16, 185, 129, 0.2) 0 0.7vmax, transparent 1.8vmax),
    radial-gradient(circle at 6% 40%, rgba(255, 255, 255, 0.14) 0 0.35vmax, transparent 1vmax),
    radial-gradient(circle at 55% 95%, rgba(255, 59, 48, 0.2) 0 0.6vmax, transparent 1.6vmax);
  animation: tv-drift 38s ease-in-out infinite alternate, tv-breathe 7s ease-in-out infinite; }
@keyframes tv-beams { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }
@keyframes tv-drift { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(-2.5%, -3%, 0) scale(1.05); } 100% { transform: translate3d(2%, -1.5%, 0) scale(1.02); } }
@keyframes tv-breathe { 0%, 100% { opacity: 0.75; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  body.screen-page::before, body.screen-page::after { animation: none !important; }
}

/* Starting with «تراجع» (Nasser 2026-11-14): a bar at the bottom for 3 seconds, its line running out. */
.undo-start { position: fixed; z-index: 60; inset-inline: 12px; bottom: max(16px, env(safe-area-inset-bottom)); max-width: 520px; margin-inline: auto;
  display: flex; align-items: center; gap: 12px; padding: 12px 14px 16px; border-radius: 18px; background: var(--navy); color: var(--on-navy);
  box-shadow: 0 14px 30px -10px rgba(11, 29, 81, 0.6); overflow: hidden; }
.undo-text { flex: 1; display: flex; flex-direction: column; }
.undo-text .small { opacity: 0.8; }
.undo-btn { flex: none; border: 0; border-radius: 12px; padding: 10px 16px; background: var(--gold); color: var(--navy); font: inherit; font-weight: 800; cursor: pointer; }
.undo-line { position: absolute; inset-inline: 0; bottom: 0; height: 4px; background: var(--gold); transform-origin: right; animation: undo-run 3s linear forwards; }
[dir="ltr"] .undo-line { transform-origin: left; }
@keyframes undo-run { to { transform: scaleX(0); } }
/* Between rounds: the countdown everyone sees, the ×2 banner, the coordinator's two switches. */
.double-next { margin: 0; padding: 10px 14px; border-radius: 16px; background: linear-gradient(135deg, #fb923c, #ef4444); color: #fff; font-weight: 800; text-align: center; }
.auto-card { display: flex; flex-direction: column; gap: 8px; border: 1.5px solid var(--gold); }
.auto-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auto-row > span { display: flex; flex-direction: column; }
.auto-count { font-family: var(--display); font-size: 40px; line-height: 1; color: var(--letter); font-variant-numeric: tabular-nums; }
.auto-line { height: 8px; border-radius: 8px; background: var(--band); overflow: hidden; }
.auto-line i { display: block; height: 100%; background: var(--gold); transform-origin: right; transition: transform 0.25s linear; }
[dir="ltr"] .auto-line i { transform-origin: left; }
.auto-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.flow-toggles { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.flow-pill { border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 14px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; }
.flow-pill.on { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.flow-pill:disabled { opacity: 0.5; cursor: default; }
.primary.auto-soon { animation: pulse-soft 1s ease-in-out infinite; }
@keyframes pulse-soft { 50% { opacity: 0.75; } }
@media (prefers-reduced-motion: reduce) { .undo-line, .primary.auto-soon { animation: none; } }

/* The round's grid, from the TV's rows: a cell pulses while that field is being typed; test players' names are quieter. */
.cr-cells i.typing { background: var(--gold); opacity: 0.45; animation: cr-typing 0.9s ease-in-out infinite; }
@keyframes cr-typing { 50% { opacity: 1; } }
.cr-row.bot .cr-name b { color: var(--muted); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .cr-cells i.typing { animation: none; } }

/* The game settings in sections (docs/COORDINATOR_UX.md G3): a heading and a card per group. */
.settings .set-sec { display: flex; flex-direction: column; gap: 0; padding: 4px 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.settings .set-sec + .set-sec { margin-top: 12px; }
.set-head { margin: 10px 0 2px; font-size: 13px; font-weight: 800; color: var(--muted); letter-spacing: 0.01em; }
.settings:has(> .set-sec) { background: transparent; padding: 0; }

/* Test and internal strips show in the lobby only, never during the game (Nasser 2026-11-14). */
/* «الحروف المستثناة» (Nasser 2026-11-14): a grid of letter tiles; a crossed-out tile is left out of every game. */
.letters-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; }
.letter-tile { position: relative; cursor: pointer; }
.letter-tile input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.letter-tile span { display: grid; place-items: center; height: 56px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line);
  font-size: 26px; font-weight: 800; color: var(--ink); }
.letter-tile input:checked + span { background: var(--bad-tint), var(--surface); border-color: var(--bad-line); color: var(--bad-ink); text-decoration: line-through; opacity: 0.85; }
.letter-tile input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }

/* The screen between rounds (Nasser 2026-11-14): the «🔥 ×2» banner and the automatic countdown, big enough for a room. */
.show-double { margin: 0.4em auto; padding: 0.4em 1.2em; border-radius: 999px; background: linear-gradient(135deg, #fb923c, #ef4444); color: #fff;
  font-weight: 800; font-size: clamp(20px, 2.6vw, 44px); text-align: center; width: fit-content; max-width: 100%; animation: show-pulse 1.6s ease-in-out infinite; }
.show-auto { display: grid; grid-template-columns: auto auto; justify-content: center; align-items: center; gap: 0.2em 0.6em; margin: 0.3em auto 0.6em;
  font-size: clamp(18px, 2.2vw, 36px); font-weight: 800; }
.show-auto b { font-family: var(--display); font-weight: 400; font-size: 1.8em; line-height: 1; color: var(--gold); font-variant-numeric: tabular-nums; }
.show-auto-line { grid-column: 1 / -1; width: min(60vw, 720px); height: 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.15); overflow: hidden; }
.show-auto-line i { display: block; height: 100%; background: var(--gold); transform-origin: right; transition: transform 0.25s linear; }
[dir="ltr"] .show-auto-line i { transform-origin: left; }
@keyframes show-pulse { 50% { transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .show-double { animation: none; } }
/* The join code with «لصق» beside it (nhmsv UX_RULES.md §1, §2). */
.code-row { display: flex; gap: 8px; align-items: stretch; }
.code-row .code-input { flex: 1; min-width: 0; }
.code-row button.ghost.paste-btn { min-height: 44px; flex: none; border-radius: 37px; padding-inline: 18px; background: var(--surface); color: var(--navy); border: 2px solid var(--accent); font-weight: 800; }
.code-row .code-input { font-size: 28px; letter-spacing: 0.08em; padding-inline: 12px; }

/* ---- «الموسيقى» in the menu (docs/SOUND_MAP.md §8): the current choice at the end of the row ------------------- */
.menu-item .menu-value { flex: none; font-weight: 700; font-size: 14px; color: var(--muted); }

/* ---- The appeal vote (Nasser 2026-11-15, docs/APPEALS_VOTE.md, mockup docs/mockups/appeals-vote.html) ----------
   Every phone: who appeals which word, a graded green «موافق» and a graded red «غير موافق» that share the width by
   the votes (w0–w10), the time left, then the stamp for 3 seconds. */
:root {
  --av-yes-a: #34d399; --av-yes-b: #059669; --av-yes-c: #065f46;
  --av-no-a: #fb7185; --av-no-b: #e11d48; --av-no-c: #9f1239;
}
[data-theme="night"] {
  --av-yes-a: #10b981; --av-yes-b: #047857; --av-yes-c: #022c22;
  --av-no-a: #f43f5e; --av-no-b: #be123c; --av-no-c: #4c0519;
}
.av-screen { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 100dvh; padding: 12px 14px 16px; }
.av-head { display: flex; align-items: center; gap: 8px; }
.av-chip { padding: 4px 10px; border-radius: 999px; background: var(--soft, rgba(255, 184, 0, .16)); font-weight: 800; font-size: 14px; }
.av-timer { margin-inline-start: auto; font-weight: 800; font-variant-numeric: tabular-nums; font-size: 18px; }
.av-timer.urgent { color: var(--bad); }
.av-claim { text-align: center; display: grid; gap: 4px; }
.av-who { margin: 0; font-weight: 700; }
.av-word { font-size: clamp(30px, 9vw, 46px); line-height: 1.15; }
.av-meta { margin: 0; color: var(--muted); font-size: 14px; }
.av-search { color: inherit; }
.av-split { flex: 1; display: flex; gap: 8px; min-height: 260px; }
.av-half { flex: 1 1 0; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 8px 44px; border: 0; border-radius: 18px; font: inherit; text-align: center; transition: opacity .25s, filter .25s; }
/* Option «ب» (Nasser 2026-11-15): equal halves, a light tint with a 2px inner border, filling from the bottom. */
.av-half.agree { color: #065f46; background: color-mix(in srgb, var(--av-yes-a) 16%, var(--surface, #fff)); box-shadow: inset 0 0 0 2px var(--av-yes-b); }
.av-half.disagree { color: #9f1239; background: color-mix(in srgb, var(--av-no-a) 16%, var(--surface, #fff)); box-shadow: inset 0 0 0 2px var(--av-no-b); }
[data-theme="night"] .av-half.agree { color: #d1fae5; }
[data-theme="night"] .av-half.disagree { color: #ffe4e6; }
.av-half > * { position: relative; }
.av-half > .av-fill { position: absolute; inset-inline: 0; bottom: 0; height: 0; transition: height .6s cubic-bezier(.34, 1.56, .64, 1); }
.av-half.agree > .av-fill { background: linear-gradient(0deg, var(--av-yes-c) 0%, var(--av-yes-b) 60%, var(--av-yes-a) 100%); }
.av-half.disagree > .av-fill { background: linear-gradient(0deg, var(--av-no-c) 0%, var(--av-no-b) 60%, var(--av-no-a) 100%); }
.av-half.f1 > .av-fill { height: 10%; } .av-half.f2 > .av-fill { height: 20%; } .av-half.f3 > .av-fill { height: 30%; } .av-half.f4 > .av-fill { height: 40%; }
.av-half.f5 > .av-fill { height: 50%; } .av-half.f6 > .av-fill { height: 60%; } .av-half.f7 > .av-fill { height: 70%; } .av-half.f8 > .av-fill { height: 80%; }
.av-half.f9 > .av-fill { height: 90%; } .av-half.f10 > .av-fill { height: 100%; }
.av-half.f7, .av-half.f8, .av-half.f9, .av-half.f10 { color: #fff; } /* the fill has reached the label (centred) */
button.av-half { cursor: pointer; }
button.av-half:active { filter: brightness(1.06); }
.av-half.picked { box-shadow: inset 0 0 0 4px currentColor; }
.av-faces { position: absolute; inset-inline: 6px; bottom: 8px; display: flex; flex-wrap: wrap-reverse; justify-content: center; gap: 2px; font-size: 22px; line-height: 1; }
.av-face.drop { animation: av-drop .55s cubic-bezier(.34, 1.56, .64, 1) both; }
.av-count.pop { animation: av-pop .45s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes av-drop { from { transform: translateY(-120px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes av-pop { 50% { transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .av-half > .av-fill { transition: none; } .av-face.drop, .av-count.pop { animation: none; } }
.av-sign { font-size: 44px; line-height: 1; }
.av-label { font-size: 18px; }
.av-count { font-size: 36px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.av-names { font-size: 13px; opacity: .95; line-height: 1.5; }
.av-mine { font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .22); }
.av-note { margin: 0; text-align: center; color: var(--muted); font-size: 14px; }
.av-decide { display: flex; gap: 8px; justify-content: center; }
.av-reject { flex: 2; min-height: 48px; border: 0; border-radius: 14px; color: #fff; font: inherit; font-weight: 800;
  background: linear-gradient(180deg, var(--av-no-a), var(--av-no-c)); }
.av-accept { flex: 1; min-height: 40px; border: 2px solid var(--ok); border-radius: 14px; background: transparent; color: var(--ok); font: inherit; font-weight: 700; }
.av-screen.stamped .av-split, .av-screen.stamped .av-claim { filter: saturate(.7); opacity: .75; }
.av-stamp { position: absolute; inset-inline: 12%; top: 36%; display: grid; gap: 4px; justify-items: center; padding: 10px 16px 12px; text-align: center;
  border: 5px double currentColor; border-radius: 14px; transform: rotate(-12deg); animation: av-thump .45s cubic-bezier(.2, 1.6, .4, 1) both; }
.av-stamp b { font-size: 28px; line-height: 1.15; }
.av-stamp span { font-size: 13px; font-weight: 800; }
.av-stamp.ok { color: var(--av-yes-b); background: linear-gradient(160deg, color-mix(in srgb, var(--surface, #fff) 92%, var(--av-yes-a)), color-mix(in srgb, var(--surface, #fff) 80%, var(--av-yes-a))); }
.av-stamp.bad { color: var(--av-no-b); background: linear-gradient(160deg, color-mix(in srgb, var(--surface, #fff) 92%, var(--av-no-a)), color-mix(in srgb, var(--surface, #fff) 80%, var(--av-no-a))); }
@keyframes av-thump { from { transform: rotate(-12deg) scale(2.4); opacity: 0; } 70% { opacity: 1; } to { transform: rotate(-12deg) scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .av-stamp { animation: none; } .av-half { transition: none; } }
.appeal-lock { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 12px; font-size: 12px; font-weight: 700;
  color: var(--muted); background: rgba(127, 127, 127, .12); }

/* The appeal vote on the room screen: the halves fill from the bottom with the votes (f0–f10). */
.show-av { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1.6vh; min-height: 88vh; text-align: center; }
.show-av-head { display: flex; width: 100%; align-items: center; justify-content: space-between; }
.show-av-chip { padding: .4vh 1.6vw; border-radius: 999px; background: rgba(255, 184, 0, .18); font-weight: 800; font-size: clamp(18px, 1.8vw, 34px); }
.show-av-timer { font-weight: 900; font-size: clamp(24px, 3vw, 56px); font-variant-numeric: tabular-nums; }
.show-av-timer.urgent { color: #ff6b60; }
.show-av-who { margin: 0; font-size: clamp(20px, 2.2vw, 40px); font-weight: 700; }
.show-av-word { margin: 0; font-size: clamp(48px, 7vw, 140px); line-height: 1.05; }
.show-av-split { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 1.6vw; width: 100%; min-height: 40vh; }
.show-av-half { position: relative; overflow: hidden; display: grid; align-content: center; justify-items: center; gap: 1vh; padding-bottom: 7vh; border-radius: 2vw; font-size: clamp(20px, 2.4vw, 44px); }
.show-av-half > :not(.fill) { position: relative; }
.show-av-half.agree { background: linear-gradient(180deg, rgba(16, 185, 129, .16), rgba(2, 44, 34, .55)); color: #d1fae5; box-shadow: inset 0 0 0 2px #059669; }
.show-av-half.disagree { background: linear-gradient(180deg, rgba(244, 63, 94, .16), rgba(76, 5, 25, .55)); color: #ffe4e6; box-shadow: inset 0 0 0 2px #e11d48; }
.show-av-half .fill { position: absolute; inset-inline: 0; bottom: 0; height: 0; opacity: .85; transition: height .6s cubic-bezier(.34, 1.56, .64, 1); }
.show-av-half .faces { position: absolute; inset-inline: 1vw; bottom: 1.4vh; display: flex; flex-wrap: wrap-reverse; justify-content: center; gap: .3vw; font-size: clamp(22px, 2.6vw, 52px); line-height: 1; }
.show-av-half.agree .fill { background: linear-gradient(0deg, #065f46 0%, #059669 60%, #34d399 100%); }
.show-av-half.disagree .fill { background: linear-gradient(0deg, #9f1239 0%, #e11d48 60%, #fb7185 100%); }
.show-av-half.f1 .fill { height: 10%; } .show-av-half.f2 .fill { height: 20%; } .show-av-half.f3 .fill { height: 30%; } .show-av-half.f4 .fill { height: 40%; }
.show-av-half.f5 .fill { height: 50%; } .show-av-half.f6 .fill { height: 60%; } .show-av-half.f7 .fill { height: 70%; } .show-av-half.f8 .fill { height: 80%; }
.show-av-half.f9 .fill { height: 90%; } .show-av-half.f10 .fill { height: 100%; }
.show-av-half .sign { font-size: 2.4em; line-height: 1; }
.show-av-half .count { font-size: 2.6em; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.show-av-half .names { font-size: .6em; line-height: 1.5; max-width: 90%; }
.show-av-turnout { margin: 0; }
.show-av-stampwrap { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; background: rgba(0, 0, 0, .35); }
.show-av-stamp { display: grid; gap: 1vh; justify-items: center; padding: 1.4vw 3.2vw 1.8vw; border: 1vw double currentColor; border-radius: 2vw; background: rgba(7, 19, 56, .82);
  transform: rotate(-12deg); animation: av-thump .45s cubic-bezier(.2, 1.6, .4, 1) both; }
.show-av-stamp.ok { color: #4ade80; }
.show-av-stamp.bad { color: #ff6b60; }
.show-av-stamp b { font-size: clamp(40px, 6.5vw, 120px); line-height: 1.1; }
.show-av-stamp span { font-size: clamp(16px, 2.2vw, 40px); font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .show-av-stamp { animation: none; } .show-av-half .fill { transition: none; } }

/* ⚡ «الإجراءات السريعة» (Nasser 2026-11-15): one compact grid of icons at the bottom, within a thumb's reach; on a
   computer it sits as a small card at the bottom centre. */
.quick-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px 6px; }
.qi { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 2px; border: 0; background: none; color: var(--ink);
  font: inherit; text-decoration: none; cursor: pointer; }
.qi-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); }
.qi-icon svg { width: 24px; height: 24px; }
.qi-label { font-size: 11.5px; font-weight: 800; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.qi.on .qi-icon { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.qi:disabled { opacity: .45; cursor: default; }
.qi:not(:disabled):active .qi-icon { transform: scale(.94); }
@keyframes quick-up { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

/* /tv, the room screen's way in (Nasser 2026-11-15, the approved renders on quizboard-app design/screen-entry): the QR
   and pairing code beside three steps, or the «BB-» key on boxes beside a keyboard a TV remote moves over. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.screen-page .tv-entry { min-height: calc(100dvh - 2 * clamp(16px, 3vw, 48px)); display: grid; align-items: center; color: var(--on-navy); }
.tv-entry .tv-pane { display: grid; grid-template-columns: 1fr auto; gap: clamp(24px, 5vw, 96px); align-items: center; }
.tv-entry .tv-pane[aria-hidden="true"] { display: none; }
.tv-info { display: grid; gap: 22px; justify-items: start; }
.tv-title { display: flex; align-items: center; gap: 18px; margin: 0; font-size: clamp(26px, 3.2vw, 52px); }
.tv-title img { border-radius: 18px; background: var(--navy-2); padding: 8px; }
.tv-steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 14px; font-size: clamp(18px, 2vw, 32px); font-weight: 800; }
.tv-steps li { counter-increment: s; display: flex; align-items: center; gap: 14px; }
.tv-steps li::before { content: counter(s); display: grid; place-items: center; flex: none; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--gold); color: var(--navy); font-size: .9em; }
.tv-switch { border-radius: 999px; padding: 12px 24px; font-size: clamp(16px, 1.6vw, 24px); }
.tv-host { padding: 8px 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); font-weight: 800; }
.tv-card { display: grid; justify-items: center; gap: 10px; width: clamp(280px, 32vw, 460px); padding: 22px; border-radius: 28px; background: #fff; color: var(--navy); }
.tv-qr { width: 100%; aspect-ratio: 1; display: grid; place-items: center; }
.tv-qr img { width: 100%; height: 100%; }
.tv-wait { color: #6b7280; }
.tv-or { font-size: 14px; color: #475569; }
.tv-pair-code { font-size: clamp(40px, 5vw, 72px); letter-spacing: .12em; font-weight: 900; line-height: 1; }
.tv-status { min-height: 1.2em; font-weight: 800; color: #047857; text-align: center; }
.tv-entry.paired .tv-card { box-shadow: 0 0 0 6px var(--gold); }
.tv-form { display: grid; justify-items: center; gap: 14px; text-align: center; }
.tv-logo { border-radius: 24px; background: var(--navy-2); padding: 10px; }
.tv-title-center { margin: 0; font-size: clamp(26px, 3.2vw, 52px); }
.tv-lead, .tv-where { margin: 0; color: #a9b6dd; }
.tv-where { max-width: 46ch; font-size: 14px; }
.tv-boxes { position: relative; display: flex; align-items: center; gap: 8px; }
.tv-prefix { font-size: clamp(28px, 3vw, 44px); font-weight: 900; margin-inline-end: 6px; }
.tv-box { display: grid; place-items: center; width: clamp(40px, 4vw, 56px); height: clamp(52px, 5.2vw, 72px); border-radius: 12px; background: #fff; color: var(--navy);
  font-size: clamp(26px, 2.8vw, 40px); font-weight: 900; }
.tv-box.gap { margin-inline-start: 12px; }
.tv-box.next { box-shadow: 0 0 0 4px var(--gold); }
.tv-code-input { position: absolute; inset: 0; opacity: 0; width: 100%; font-size: 16px; }
.tv-actions { display: flex; gap: 20px; }
.tv-actions .link-button { color: var(--on-navy); font-weight: 800; text-decoration: none; font-size: 18px; }
.tv-open { min-width: 260px; }
.tv-keys { display: grid; grid-template-columns: repeat(8, clamp(40px, 4vw, 56px)); gap: 8px; direction: ltr; }
.tv-keys button { height: clamp(40px, 4vw, 56px); border: 1px solid rgba(255, 255, 255, .25); border-radius: 12px; background: rgba(255, 255, 255, .1); color: var(--on-navy);
  font: inherit; font-size: clamp(18px, 1.8vw, 26px); font-weight: 800; cursor: pointer; }
.tv-keys button:focus-visible, .tv-keys button:hover { background: var(--gold); color: var(--navy); outline: none; }
.tv-keys .wide { grid-column: span 3; }
@media (max-width: 760px) {
  .tv-entry .tv-pane { grid-template-columns: 1fr; justify-items: center; }
  .tv-keys { grid-template-columns: repeat(6, 44px); }
}

/* The coupon field and its button (UX_RULES §1); «لصق» is inside the field (.code-field). */
.coupon-form .paste-btn { flex: none; font-weight: 800; }
/* «نسخة تجريبية» / «حساب داخلي» inside the coordinator's menu instead of a strip over the page (Nasser 2026-11-15). */
.coord-flags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; padding: 0 12px; }
.coord-flags span { padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; background: #fff3c4; color: #7a5300; }

/* The coordinator's correction board (docs/REVIEW_BOARD.md §1, Nasser 2026-11-16, look «د»): a white card per group
   with an edge in its colour, the words as solid chips side by side, no names. */
/* Never squeezed by the scrolling body: with many words the board grows and the body scrolls (Nasser 2026-11-16). */
.bd { flex: none; display: flex; flex-direction: column; gap: 8px; }
.bd > * { flex: none; }
.bd-card { --c: var(--muted); padding: 8px 10px 10px; border-radius: 18px; background: var(--surface); border-inline-start: 6px solid var(--c); }
.bd-card.wait { --c: #e0a800; }
.bd-card.ok { --c: var(--ok); }
.bd-card.half { --c: #f0a316; }
.bd-card.bad { --c: var(--bad); }
.bd-card.trust { --c: #1d6bf3; }
.bd-head { display: flex; align-items: center; gap: 8px; margin: 0 2px 6px; font-size: 14px; }
.bd-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.bd-count { min-width: 22px; padding: 0 7px; border-radius: 10px; background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 800; text-align: center; }
.bd-all { margin-inline-start: auto; padding: 4px 6px; border: 0; background: none; color: #1d6bf3; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.bd-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.bd-chip { position: relative; display: inline-flex; align-items: center; gap: 5px; min-height: 42px; padding: 0 12px; border: 2px solid transparent;
  border-radius: 12px; background: var(--c); color: #fff; font: inherit; font-size: 17px; font-weight: 800; cursor: pointer; touch-action: manipulation;
  -webkit-user-select: none; user-select: none; }
.bd-card.wait .bd-chip { background: var(--surface); color: var(--ink); border: 2px dashed var(--c); }
.bd-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: rgba(255, 255, 255, 0.28); font-size: 11.5px; }
.bd-card.wait .bd-n { background: var(--bg); color: var(--muted); }
.bd-spark { font-size: 13px; }
.bd-card.wait .bd-spark.ok { color: var(--ok); }
.bd-card.wait .bd-spark.bad { color: var(--bad); }
.bd-chip.locked { opacity: 0.6; }
.bd-chip.flag { border-color: #fff; box-shadow: 0 0 0 2px var(--buzzer); }
.bd-flag { font-size: 12px; }
.bd-chip.on { border-color: #fff; box-shadow: 0 0 0 3px var(--navy); }
.bd-card.wait .bd-chip.on { border: 2px solid var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.bd-chip.on::after { content: '✓'; position: absolute; top: -8px; inset-inline-end: -6px; display: grid; place-items: center; width: 20px; height: 20px;
  border-radius: 50%; background: var(--navy); color: #fff; font-size: 11px; }
:root[data-theme="night"] .bd-chip.on { box-shadow: 0 0 0 3px var(--letter); }
:root[data-theme="night"] .bd-chip.on::after { background: var(--letter); color: var(--navy); }
.bd-empty { margin: 0; padding: 8px 12px; border-radius: 14px; background: var(--surface); color: var(--muted); font-size: 13px; }
.bd-bar { display: flex; flex-direction: column; gap: 8px; }
.bd-bar-top { display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.bd-acts { display: flex; gap: 8px; }
.bd-acts button { flex: 1; min-height: 54px; border: 0; border-radius: 16px; color: #fff; font: inherit; font-size: 17px; font-weight: 900; cursor: pointer; }
.bd-acts .bd-ok { background: var(--ok); }
.bd-acts .bd-half { background: #f0a316; }
.bd-acts .bd-bad { background: var(--bad); }
.bd-acts .bd-more { flex: 0 0 54px; background: var(--surface); color: var(--ink); }
:root[data-theme="night"] .bd-chip, :root[data-theme="night"] .bd-acts .bd-ok, :root[data-theme="night"] .bd-acts .bd-bad { color: #0b1d51; }
:root[data-theme="night"] .bd-card.wait .bd-chip { color: var(--ink); }
.bd-sheet-row { display: flex; flex-wrap: wrap; gap: 8px; }
.bd-names { margin: 0; color: var(--muted); }

/* «كلمة موثوقة» and «اعتراض جماعي» (docs/REVIEW_BOARD.md §2–3). */
.trust-mark, .bd-trust { display: inline-grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 50%; background: #1d6bf3; color: #fff;
  font-size: 11px; font-weight: 900; cursor: pointer; }
.bd-card.trust .bd-trust { background: #fff; color: #1d6bf3; }
.rv-objs { flex: none; color: var(--bad); font-size: 12px; font-weight: 800; }
.obj-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; margin: 0 4px 6px; padding: 0 12px;
  border: 1.5px solid var(--bad); border-radius: 18px; background: var(--surface); color: var(--bad); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.obj-btn.mine { background: var(--bad); color: #fff; }
.obj-n { font-size: 12px; opacity: 0.85; }
.obj-note { margin: 0 4px 6px; color: var(--muted); font-size: 13px; }
.obj-note.bad { color: var(--bad); font-weight: 700; }
.obj-banner { padding: 10px 12px; border: 2px solid var(--buzzer); border-radius: 18px; background: var(--surface); }
.obj-banner p { margin: 0 0 6px; }
.obj-acts { display: flex; gap: 8px; }
.obj-acts button { flex: 1; min-height: 44px; border: 0; border-radius: 12px; color: #fff; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
.obj-keep { background: var(--ok); }
.obj-over { background: var(--bad); }
.show-objection { margin: 0 0 16px; padding: 14px 22px; border: 3px solid var(--buzzer); border-radius: 22px; background: var(--surface); font-size: 1.4em; font-weight: 800; }
.show-trust { display: inline-grid; place-items: center; width: 0.9em; height: 0.9em; margin-inline-start: 8px; border-radius: 50%; background: #1d6bf3; color: #fff; font-size: 0.6em; vertical-align: middle; }

/* «افتح في التطبيق» (migration 041). */
.host-code { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.host-qr { width: 240px; height: 240px; padding: 10px; border-radius: 16px; background: #fff; }
.host-code.over .host-qr { opacity: 0.2; }
.host-url { max-width: 100%; margin: 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.host-acts { display: flex; gap: 8px; }
.host-linked { margin: 0; color: var(--ok); font-weight: 800; }

/* The player's correction page in piles («وش؟» app look «ب», Nasser 2026-11-17): their answer, then small chips. */
.pl-mine { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 18px; background: var(--surface); }
.pl-mine.ok { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--surface)); }
.pl-mine.bad { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 9%, var(--surface)); }
.pl-mine-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--muted); color: #fff; font-size: 20px; font-weight: 900; }
.pl-mine.ok .pl-mine-icon { background: var(--ok); }
.pl-mine.bad .pl-mine-icon { background: var(--bad); }
.pl-mine-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pl-mine-label { font-size: 13px; color: var(--muted); }
.pl-mine-word { display: inline-flex; align-items: center; gap: 6px; font-size: 26px; line-height: 1.3; overflow-wrap: anywhere; }
.pl-mine-state { font-weight: 800; color: var(--muted); }
.pl-mine.ok .pl-mine-state { color: var(--ok); }
.pl-mine.bad .pl-mine-state { color: var(--bad); }
.pl-mine-none { margin: 2px 0 0; }
.pl-mine .appeal-raise { background: var(--gold); color: var(--navy); min-height: 44px; padding-inline: 14px; font-size: 16px; }
.pl-mine .appeal-lock, .pl-mine-note { flex: none; max-width: 45%; margin: 0; font-size: 13px; color: var(--muted); }
.pl-piles { display: flex; flex-direction: column; gap: 12px; }
.pl-head { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--muted); }
.pl-head b { font-size: 18px; }
.pl-icon { display: grid; place-items: center; width: 24px; height: 24px; font-weight: 900; }
.pl-pile.ok .pl-head { color: var(--ok); }
.pl-pile.bad .pl-head { color: var(--bad); }
.pl-count { min-width: 26px; padding: 0 8px; border-radius: 999px; background: var(--muted); color: #fff; text-align: center; font-weight: 800; }
.pl-pile.ok .pl-count { background: var(--ok); }
.pl-pile.bad .pl-count { background: var(--bad); }
.pl-rule { flex: 1; height: 1px; background: currentColor; opacity: 0.35; }
.pl-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 12px; border: 1.5px solid var(--muted); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 17px; cursor: pointer; }
.pl-pile.ok .pl-chip { border-color: color-mix(in srgb, var(--ok) 55%, var(--surface)); }
.pl-pile.bad .pl-chip { border-color: color-mix(in srgb, var(--bad) 45%, var(--surface)); }
.pl-pile.wait .pl-chip { border-color: color-mix(in srgb, var(--muted) 55%, var(--surface)); }
.pl-chip.mine { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.pl-chip b { font-weight: 800; }
.pl-n { font-size: 13px; color: var(--muted); }
.pl-chip.mine .pl-n { color: color-mix(in srgb, var(--on-navy) 70%, transparent); }
.pl-half { color: var(--gold); font-weight: 900; }
.pl-obj { padding: 1px 8px; border-radius: 999px; background: color-mix(in srgb, var(--bad) 14%, var(--surface)); color: var(--bad); font-size: 13px; font-weight: 800; }
.pl-obj.mine { background: var(--bad); color: var(--on-bad); }
.pl-obj.review { background: var(--gold); color: var(--navy); }
.pl-empty { margin: 0; }
.pl-sheet-word { font-size: 32px; margin: 0; }
.pl-sheet-trust { margin: 0; color: #1d6bf3; font-weight: 700; }
.pl-bar { height: 8px; border-radius: 999px; background: var(--band); overflow: hidden; display: flex; justify-content: flex-start; }
.pl-bar-fill { display: block; height: 100%; background: var(--bad); border-radius: 999px; }
.pl-bar-fill.w0 { width: 0; } .pl-bar-fill.w1 { width: 10%; } .pl-bar-fill.w2 { width: 20%; } .pl-bar-fill.w3 { width: 30%; }
.pl-bar-fill.w4 { width: 40%; } .pl-bar-fill.w5 { width: 50%; } .pl-bar-fill.w6 { width: 60%; } .pl-bar-fill.w7 { width: 70%; }
.pl-bar-fill.w8 { width: 80%; } .pl-bar-fill.w9 { width: 90%; } .pl-bar-fill.w10 { width: 100%; }
.pl-object { min-height: 52px; border: 0; border-radius: 16px; background: var(--bad); color: var(--on-bad); font: inherit; font-size: 18px; font-weight: 800; cursor: pointer; }
.pl-object.mine { background: var(--surface); color: var(--bad); border: 2px solid var(--bad); }
/* The banner of a word taken to the coordinator: gold, for everyone. */
.obj-banner { border: 0; background: var(--gold); color: var(--navy); }
.obj-banner .muted { color: var(--navy); opacity: 0.8; }
/* Tablet and desktop: the player's answer, the banners and the points on the side; the piles side by side. */
@media (min-width: 900px) {
  .screen.pl-screen { max-width: 1100px; }
  .pl-screen .rv-body { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; align-items: start; column-gap: 20px; }
  .pl-screen .rv-body > :not(.pl-piles) { grid-column: 1; }
  .pl-screen .rv-body > .pl-piles { grid-column: 2; grid-row: 1 / span 20; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .pl-screen .pl-chip { font-size: 19px; min-height: 48px; }
}
.overlay.still, .overlay.still .sheet { animation: none; }

/* Test mode for visitors (UX_RULES §5; GAMES_UNIFIED §10.4, persona round 2): one small line at the very top, in the
   page's flow, so it never covers a button; ✕ hides it on this device. */
.float-note { position: static; display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; margin: 0;
  padding: 0 4px 0 12px; background: #fef3c7; color: #78350f; font-size: 12px; font-weight: 700; line-height: 1.4; text-align: center; }
.float-note[hidden] { display: none; }
.float-note p { margin: 0; flex: 0 1 auto; padding-block: 4px; }
.float-note-x { flex: none; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; font-size: 13px; cursor: pointer; }

.avatar-row { display: flex; align-items: center; gap: 8px; }
.avatar-row .gu-avatars { flex: 1; min-width: 0; }
.avatar-row [data-gu-more] { flex: none; }
/* 150 symbols: game-ui 1.2's open row scrolls inside a box rather than pushing «يلا نلعب» off the page. */
.avatar-row { --gu-avatars-max: 264px; }
.avatar-row .gu-avatars.gu-all { align-content: flex-start; }
/* P5 (GAMES_UNIFIED §3): the phone's bottom bar replaces the drawer on the coordinator's pages; «حروفي وخاناتي». */
/* GAMES_UNIFIED §3.1 (nhmsv#783): the coordinator keeps ☰ beside 🔔 and 🌙 on every page, phone and computer. */
.mine-sets { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mine-set { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; }
.mine-set-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mine-set-head form { margin: 0; }
.mine-fields { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.mine-fields span { background: var(--mine); border-radius: 999px; padding: 2px 10px; font-size: 14px; font-weight: 700; }
.danger-link { color: var(--bad); }
.mine-head { font-size: 20px; font-weight: 800; margin: 12px 0 0; }
.panel-nav a span, .panel-nav .panel-new span { white-space: nowrap; }
@media (max-width: 379px) { .panel-nav a span, .panel-nav .panel-new span { font-size: 11px; } }

/* P7 (GAMES_UNIFIED §3): a small QR + code card in the lobby that opens the one share sheet; «المزيد» beside the main
   button at the thumb in every phase. */
.share-mini { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--surface); color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.share-mini-qr { flex: none; background: #fff; border-radius: 12px; padding: 4px; line-height: 0; }
.share-mini-qr .qr { width: 64px; height: 64px; }
.share-mini-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.share-mini-code { font-size: 28px; font-weight: 800; letter-spacing: 0.12em; color: var(--letter); text-align: start; }
.share-mini-hint { font-size: 14px; font-weight: 700; color: var(--accent-ink, var(--ink)); text-decoration: underline; }
.share-body { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.share-body .qr.big { width: min(72vw, 300px); height: auto; background: #fff; padding: 10px; border-radius: 18px; }
.share-body .code { font-size: clamp(36px, 9vw, 56px); letter-spacing: 0.18em; }
.share-body .invite-icons { width: 100%; }
.share-body .screen-open, .share-body .share-app { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.share-body .share-app svg { width: 20px; height: 20px; }
.more-btn { width: auto; min-width: 64px; padding: 4px 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font: inherit; font-size: 12px; font-weight: 800; }
.more-btn svg { width: 22px; height: 22px; }
.lobby-bolt.more-btn { width: 64px; height: 64px; border-radius: 50%; padding: 0; }
@media (min-width: 900px) {
  .coord-lobby { grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
  .coord-lobby .lobby-share { align-self: start; }
}

/* P4 (GAMES_UNIFIED §1): «مسح QR» beside «لصق»; the camera view over the page. */
.scan-overlay { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 24px 16px; background: rgba(5, 10, 30, 0.92); color: #fff; }
.scan-box { position: relative; width: min(86vw, 380px); aspect-ratio: 1; border-radius: 24px; overflow: hidden; background: #000; }
.scan-box video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 14%; border: 3px solid var(--gold); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.35); }
.scan-note { margin: 0; text-align: center; font-weight: 700; max-width: 380px; }
.scan-close { color: #fff; border-color: rgba(255, 255, 255, 0.5); min-width: 160px; }
.scan-btn { flex: none; min-width: 52px; padding-inline: 12px; display: inline-flex; align-items: center; justify-content: center; }
/* «فلان يريد الرجوع» (GAMES_UNIFIED §2.2): on top of the coordinator's page until answered. */
.rejoin-asks { position: fixed; z-index: 40; inset-inline: 0; top: max(12px, env(safe-area-inset-top)); margin-inline: auto; width: min(560px, calc(100% - 32px));
  display: flex; flex-direction: column; gap: 8px; }
.rejoin-ask { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 18px;
  background: var(--surface); color: var(--ink); border: 2px solid var(--gold); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); }
.rejoin-ask p { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.rejoin-acts { display: flex; gap: 8px; flex: none; }
.rejoin-acts button { min-height: 44px; padding-inline: 14px; font-size: 15px; }
.rejoin-wait .rejoin-spinner { font-size: 40px; margin: 0; animation: rejoin-pulse 1.6s ease-in-out infinite; }
@keyframes rejoin-pulse { 50% { opacity: 0.4; } }
@media (prefers-reduced-motion: reduce) { .rejoin-wait .rejoin-spinner { animation: none; } }
.rejoin-wait [hidden] { display: none; }

/* P9: a player picks their team. */
.team-join { width: 100%; min-height: 44px; font-size: 15px; margin: 6px 0; }
.team-mine { margin: 6px 0; font-weight: 800; color: var(--good, var(--accent)); }
/* GAMES_PHASE2_SPEC §1: the room screen in four states; nothing under 28px on a 1080p screen. */
.tv-one-line { margin: 0; font-size: clamp(24px, 2.4vw, 46px); font-weight: 800; }
.tv-qr-pane .tv-card { width: clamp(320px, 38vw, 620px); }
.tv-qr-pane .tv-pair-code { font-size: clamp(48px, 6vw, 110px); }
.tv-qr-pane .tv-or { display: none; }
.tv-qr-pane .tv-switch { font-size: clamp(16px, 1.5vw, 28px); padding: 10px 22px; color: #fff; background: transparent; border: 2px solid rgba(255, 255, 255, 0.45); box-shadow: none; }
.show-count { margin: 0; font-size: clamp(22px, 2.4vw, 46px); font-weight: 800; }
.show-status { margin: 0; text-align: center; font-size: clamp(22px, 2.2vw, 42px); font-weight: 800; color: #a9b6dd; }
.show-legend { font-size: clamp(16px, 1.5vw, 30px); }
.show-section, .show-award small { font-size: clamp(16px, 1.5vw, 30px); }
.show-league-row, .show-kings { font-size: clamp(16px, 1.6vw, 32px); }
.show-brand { font-size: clamp(20px, 1.8vw, 34px); }

/* «بطاقتي» (GAMES_PHASE2_SPEC §4). */
.my-card { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; }
.my-card svg { width: 22px; height: 22px; }
/* GAMES_PHASE2_SPEC §6: «ابدأ أول لعبة» and «الدليل». */
.first-steps { display: flex; flex-direction: column; gap: 10px; }
.first-steps h2 { margin: 0; font-size: 18px; }
.first-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.first-card { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.first-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: var(--navy); font-weight: 800; }
.first-guide { align-self: flex-start; font-weight: 700; }
@media (max-width: 420px) { .first-cards { grid-template-columns: 1fr; } .first-card { flex-direction: row; flex-wrap: wrap; align-items: center; } .first-card .small { flex-basis: 100%; } }
.guide-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.guide-item { padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.guide-item h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 18px; }
.guide-item p { margin: 0 0 6px; }
.guide-n { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: var(--gold); font-size: 15px; }
.guide-contact { display: flex; flex-wrap: wrap; gap: 8px; }
/* The first steps sit right under the greeting, across the page. */
.hx-home:has(.first-steps) { grid-template-areas: "title" "first" "main" "side" "recent" "extra"; }
.hx-home .first-steps { grid-area: first; }
@media (min-width: 900px) {
  .hx-home:has(.first-steps) { grid-template-areas: "title title" "first first" "main side" "recent side" "recent extra"; grid-template-rows: auto auto auto auto 1fr; }
}

/* GAMES_PHASE2_SPEC §5: the landing page ends with «ابدأ الآن» and «انضم للعبة». */
.cta-join { margin: 16px auto 0; max-width: 480px; display: flex; flex-direction: column; gap: 8px; text-align: center; font-weight: 800; font-size: 18px; }
.cta-join-row { display: flex; gap: 8px; }
.cta-join-row input { flex: 1; min-width: 0; text-align: center; letter-spacing: 0.12em; font-size: 20px; }
.cta-join-row button { flex: none; min-width: 96px; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 640px) and (max-width: 899px) { .steps { grid-template-columns: 1fr; } }
/* GAMES_PHASE2_SPEC §7 (nhmsv#765): language then theme, two 44px icon buttons at the end of the header, before the
   account; on a phone in the header when it fits (the coordinator's pages, which have no ☰ since P5), else under ☰.
   The theme shows the sun at night (to go to day) and the moon by day. */
.top-links .lang-button, .top-links .theme-button { width: 44px; height: 44px; min-width: 44px; display: inline-grid; place-items: center; padding: 0; text-decoration: none; }
.top-links .lang-button span { font-weight: 800; font-size: 16px; line-height: 1; }
.theme-button .theme-sun { display: none; }
:root[data-theme="night"] .theme-button .theme-sun { display: block; }
:root[data-theme="night"] .theme-button .theme-moon { display: none; }
@media (max-width: 899px) {
  body.has-panel .top-links { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
  body.has-panel .top-links   body.has-panel .top-links .icon-button svg { width: 20px; height: 20px; }
}

/* The toast as a popover over a game-ui sheet: keep its own place and look, not the popover's centred box. */
.toast[popover] { bottom: auto; margin-block: 0; overflow: visible; }

/* Room reactions on the screen (GAMES_PHASE2_SPEC §7): each floats up from the bottom and fades in about two seconds;
   the place across (x0–x9) and the sway (s0–s5) come from its number, so a burst spreads out. */
.show-cheers { position: fixed; inset: 0; z-index: 30; pointer-events: none; overflow: hidden; }
.show-cheer { position: absolute; bottom: -12vh; display: flex; flex-direction: column; align-items: center; gap: .2vh; opacity: 0;
  animation: cheer-up 2.2s ease-out both; }
.show-cheer b { font-size: 9vh; line-height: 1; font-weight: 400; filter: drop-shadow(0 .6vh 1vh rgba(0, 0, 0, .25)); }
.show-cheer i { font-style: normal; font-size: 3.4vh; line-height: 1; }
.show-cheer.x0 { left: 6%; } .show-cheer.x1 { left: 15%; } .show-cheer.x2 { left: 24%; } .show-cheer.x3 { left: 33%; } .show-cheer.x4 { left: 42%; }
.show-cheer.x5 { left: 51%; } .show-cheer.x6 { left: 60%; } .show-cheer.x7 { left: 69%; } .show-cheer.x8 { left: 78%; } .show-cheer.x9 { left: 87%; }
.show-cheer.s1, .show-cheer.s4 { --sway: -3vw; } .show-cheer.s2, .show-cheer.s5 { --sway: 3vw; }
@keyframes cheer-up {
  0% { transform: translate(0, 0) scale(.6); opacity: 0; }
  12% { opacity: 1; transform: translate(0, -14vh) scale(1.05); }
  70% { opacity: 1; }
  100% { transform: translate(var(--sway, 0), -62vh) scale(1); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .show-cheer { animation: cheer-still 2s ease-out both; bottom: 8vh; }
  @keyframes cheer-still { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
}

/* The phone's row of six reactions, outside play only: in game-ui's dock at the thumb (the sound hint sits above it). */
.cheer-dock { max-width: 560px; justify-content: center; }
.cheer-dock .cheer-row { flex: 1 1 auto; }
body:has(.cheer-dock) .sound-hint { bottom: calc(92px + env(safe-area-inset-bottom)); }
.cheer-row { display: flex; justify-content: center; gap: 6px; flex-wrap: nowrap; }
.cheer-row button { flex: 1 1 0; max-width: 56px; min-height: 48px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
  font-size: 24px; line-height: 1; cursor: pointer; touch-action: manipulation; }
.cheer-row button:active { transform: scale(.92); }
.cheer-row button.sent { animation: cheer-tap .5s ease-out; }
.cheer-row button:disabled { opacity: .5; }
@keyframes cheer-tap { 40% { transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) { .cheer-row button.sent { animation: none; } }
/* Reactions in the player's word sheet, for «أغرب إجابات الليلة» (option «أ», Nasser 2026-11-20): the shared six. */
.pl-react { font-size: 12px; font-weight: 800; background: var(--mine); border-radius: 999px; padding: 0 6px; }
.pl-reacts { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.pl-react-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.pl-react-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; min-height: 56px; border: 2px solid var(--line); border-radius: 16px;
  background: var(--surface); font: inherit; font-size: 24px; cursor: pointer; }
.pl-react-btn b { font-size: 14px; }
.pl-react-btn.on { border-color: var(--accent); background: var(--mine); }

/* The shared plan card (Nasser 2026-11-20): the unit after the price («/ يوم»), and «ألعاب بلا حد طوال مدة الباقة.». */
.price-card .price .price-days { font-family: var(--font); font-size: 16px; font-weight: 700; color: var(--muted); }
.hx-unlimited { margin: 8px 0 0; font-size: 14px; font-weight: 700; }

/* The sound in a fixed corner of the room screen (GAMES_PHASE2_SPEC §3): a tap mutes or unmutes this screen. */
.show-sound-corner { position: fixed; top: clamp(12px, 1.4vw, 24px); inset-inline-end: clamp(12px, 1.4vw, 24px); z-index: 31; display: inline-flex; align-items: center; justify-content: center;
  width: clamp(44px, 3.4vw, 64px); height: clamp(44px, 3.4vw, 64px); padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.35); color: #fff; cursor: pointer; }
.show-sound-corner svg { width: 60%; height: 60%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.show-sound-corner.off { color: rgba(255, 255, 255, 0.6); }
/* «ملء الشاشة» beside it (GAMES_UNIFIED §9.10). */
.show-full-corner { position: fixed; top: clamp(12px, 1.4vw, 24px); inset-inline-end: calc(clamp(12px, 1.4vw, 24px) * 2 + clamp(44px, 3.4vw, 64px)); z-index: 31;
  display: inline-flex; align-items: center; justify-content: center; width: clamp(44px, 3.4vw, 64px); height: clamp(44px, 3.4vw, 64px); padding: 0; border: 0;
  border-radius: 50%; background: rgba(0, 0, 0, 0.35); color: #fff; cursor: pointer; }
.show-full-corner[hidden] { display: none; }
.show-full-corner svg { width: 55%; height: 55%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* A player's header in the game (nhmsv GAMES_UNIFIED §3.1): the avatar, the name and two chips (points and place, or
   in team mode the team in its colour and its place) instead of the logo; then 🌙, 🔊 and ☰ from the edge. The menu
   holds «الخروج من اللعبة» and «تكبير الخط» only. The coordinator keeps the game's own header. */
.play-btn { display: none; width: 44px; height: 44px; min-width: 44px; padding: 0; place-items: center; }
.play-btn svg { width: 20px; height: 20px; }
body.as-player .play-btn { display: inline-grid; }
body.as-player .top .brand, body.as-player #code-pill, body.as-player #theme-toggle, body.as-player #sound-toggle,
body.as-player #music-choice, body.as-player .menu-lang, body.as-player .menu-version { display: none; }
.play-btn .sound-off { display: none; }
.play-btn[aria-pressed="false"] .sound-on { display: none; }
.play-btn[aria-pressed="false"] .sound-off { display: block; }
.me-head { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--on-navy); }
.me-head[hidden] { display: none; }
.me-avatar { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: var(--navy);
  font-size: 26px; font-weight: 800; line-height: 1; border: 3px solid var(--gold); }
.me-avatar.team-ring { background: var(--surface); }
.me-avatar.team-0 { border-color: #d97706; } .me-avatar.team-1 { border-color: #2563eb; } .me-avatar.team-2 { border-color: #16a34a; }
.me-avatar.team-3 { border-color: #db2777; } .me-avatar.team-4 { border-color: #7c3aed; } .me-avatar.team-5 { border-color: #0891b2; }
.me-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.me-text b { font-size: 17px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.me-chip { padding: 1px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); font-size: 13px; font-weight: 700; white-space: nowrap; }
.me-chip.team-chip { color: #fff; }
.me-chip.team-0 { background: #d97706; } .me-chip.team-1 { background: #2563eb; } .me-chip.team-2 { background: #16a34a; }
.me-chip.team-3 { background: #db2777; } .me-chip.team-4 { background: #7c3aed; } .me-chip.team-5 { background: #0891b2; }
/* The player keeps this header on the full-screen views too (the round, the correction): the screen takes the rest,
   and the screen's own ☰ steps aside for the header's. */
body.full.as-player .top { display: flex; }
body.full.as-player .screen { height: calc(var(--vh, 100dvh) - 72px); }
body.as-player main [data-menu-button] { display: none; }
/* The join page (nhmsv GAMES_UNIFIED §2.3, the same in the four games): one card, the code in big digits, «لصق» and
   «مسح QR» under it, the name, the avatars, «انضمام», then «أنا هو، رجّعني». */
.join-page { width: min(560px, 100%); margin: 12px auto 32px; display: flex; flex-direction: column; gap: 18px; padding: 24px 20px; border: 1px solid var(--line); }
.join-page h1 { font-size: 26px; }
.join-page .join-code { width: 100%; text-align: center; font-size: 34px; letter-spacing: 0.14em; font-weight: 800; font-variant-numeric: tabular-nums; }
.join-page .code-locked { text-align: center; font-size: 34px; }
.join-ok { color: var(--ok, #16a34a); font-weight: 700; font-size: 14px; text-align: center; }
.join-rejoin, .join-other { align-self: center; text-align: center; font-size: 15px; }
.join-page .reclaim { padding: 12px; border-radius: 16px; background: var(--bg); }
.landing-page .cta-join { margin-top: 12px; }
/* The join page's header keeps its dark-mode button on a phone too (GAMES_UNIFIED §2.3). */
.top-links.join-links { display: flex; align-items: center; margin-inline-start: auto; }
.top-links.join-links .icon-button svg { width: 20px; height: 20px; }

/* The locked code (from a QR or /j/<code>): the same big field, tinted and read-only, as in the shared mockup. */
.join-page .code-locked { display: block; width: 100%; padding: 14px 12px; border: 2px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  text-align: center; font-size: 34px; letter-spacing: 0.14em; font-weight: 800; color: var(--ink); }

/* The coordinator's home in the four games' one order (nhmsv GAMES_UNIFIED §3.2, Nasser 2026-11-20, nhmsv#783):
   a navy welcome card with «لعبة جديدة» and the mascot, four tiles, a small plan card, the open and latest games. */
.ch-home { display: grid; gap: 14px; max-width: 760px; margin-inline: auto; }
.ch-hero { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px; border-radius: 22px; color: #fff;
  background-color: var(--navy); background-image: repeating-conic-gradient(from 0deg at 0% 100%, var(--rays) 0 6deg, transparent 6deg 14deg); }
.ch-hero h1 { margin: 0; color: #fff; font-size: clamp(26px, 6vw, 34px); }
.ch-hero p { margin: 4px 0 14px; color: color-mix(in srgb, #fff 80%, transparent); }
.ch-hero-acts form { margin: 0; }
.ch-new { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding-inline: 22px; border: 0; border-radius: 999px;
  background: var(--gold); color: var(--navy); font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; box-shadow: 0 4px 0 color-mix(in srgb, var(--gold) 60%, #000); }
.ch-new span { font-size: 1.3em; line-height: 1; }
.ch-mascot { flex: none; width: clamp(88px, 24vw, 130px); height: auto; }
.ch-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ch-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 92px; padding: 12px 6px;
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); text-decoration: none; text-align: center; }
.ch-tile svg { width: 28px; height: 28px; color: var(--navy-2); }
.ch-tile b { font-size: 14px; line-height: 1.3; }
.ch-tile:hover, .ch-tile:focus-visible { border-color: var(--gold); }
.ch-plan { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.ch-plan p { margin: 0; }
.ch-plan-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ch-plan-head strong { font-size: 18px; }
.ch-chip { flex: none; padding: 4px 12px; border-radius: 999px; background: var(--gold); color: var(--navy); font-size: 13px; font-weight: 800; }
.ch-chip.over { background: var(--bad); color: #fff; }
.ch-games { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.ch-games-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ch-games-head h2 { margin: 0; font-size: 18px; }
.ch-games-head a { font-weight: 700; text-decoration: none; }
html[data-theme="night"] .ch-tile svg { color: var(--gold); }
@media (max-width: 359px) { .ch-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ch-home > * { grid-area: auto; min-width: 0; }

/* Every code field (nhmsv GAMES_UNIFIED §1, Nasser 2026-11-21, as in the «وش؟» app): game-ui 1.5's gu-code-field places
   «مسح QR» (shell.js, where a camera can be asked for) inside the start and «لصق» inside the end, icons only, 44px; here
   only the code centred in the game's own fields and the icons in the game's colour. */
.code-field { display: block; width: 100%; min-width: 0; }
.code-field > input { width: 100%; text-align: center; }
.code-field > .code-input { letter-spacing: 0.12em; }
.code-field .gu-code-icon { min-height: 44px; min-width: 44px; margin: 0; box-shadow: none; color: var(--letter); }
.code-field .gu-code-icon:hover { background: var(--band); }
.code-field .gu-code-icon svg { width: 24px; height: 24px; }
.coupon-form .row .code-field { flex: 1; }
/* The room screen's boxes: «لصق» after the last box, «مسح QR» (rare on a screen) before «BB-». */
.tv-boxes .code-ic { position: relative; inset: auto; transform: none; z-index: 1; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .1); color: var(--on-navy);
  display: grid; place-items: center; cursor: pointer; margin-inline-start: 8px; }
.tv-boxes .code-ic:focus-visible, .tv-boxes .code-ic:hover { background: var(--gold); color: var(--navy); outline: none; }
.tv-boxes .code-ic svg { width: 28px; height: 28px; }
.tv-boxes .code-ic.scan-btn { order: -1; margin-inline: 0 8px; }

/* The avatar row (GAMES_UNIFIED §2, Nasser 2026-11-21): one row, no sideways scroll, 4 to 6 by the width, then
   «المزيد»; the first free one is chosen with a clear ring. The page puts six in the row; the narrower rows hide the
   last ones (they stay in «المزيد»). */
.avatar-row { container-type: inline-size; }
.avatar-row .gu-avatars { gap: 8px; padding: 6px; }
/* Each avatar in its own tile (as in the «وش؟» app and Jeoboard): a light border and background, the chosen one with a
   clear ring, a taken one faded in place; «المزيد» is a tile of the same size at the row's end. Tiles are 50px, so
   4 + «المزيد» fit a 360px phone; wider rows show 5 or 6. */
.avatar-row .gu-avatar { width: 50px; height: 50px; }
.avatar-row .gu-avatar span { border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); font-size: 28px; }
.avatar-row .gu-avatar input:checked + span { border: 2px solid var(--brand); box-shadow: none; background: var(--surface); }
.avatar-row [data-gu-more] { width: 50px; height: 50px; min-height: 50px; padding: 0; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg);
  font-size: 11.5px; font-weight: 800; line-height: 1.1; white-space: normal; }
.avatar-row .gu-avatars:not(.gu-all) { flex: none; }
@container (max-width: 413px) { .avatar-row .gu-avatars:not(.gu-all) .gu-avatar:nth-child(n+6) { display: none; } }
@container (max-width: 355px) { .avatar-row .gu-avatars:not(.gu-all) .gu-avatar:nth-child(n+5) { display: none; } }

/* «بياناتي» (nhmsv GAMES_UNIFIED §7): one compact card, a row per field, a sheet per field (partials/account_card.php). */
.ac-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.ac-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ac-top .avatar { width: 44px; height: 44px; font-size: 20px; }
.ac-title { margin: 0; font-size: 18px; font-weight: 800; flex: 1; }
.ac-top .coord-flags { margin: 0; padding: 0; }
.ac-saved { margin: 0; }
.ac-rows { margin: 0; display: flex; flex-direction: column; }
/* The label over its value, the button at the end: the value gets the row's width (Nasser 2026-11-21: tidy, one line). */
.ac-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; min-height: 60px; padding: 8px 0; }
.ac-row dt { grid-column: 1; grid-row: 1; }
.ac-row dd { grid-column: 1; grid-row: 2; }
.ac-row .ac-edit { grid-row: 1 / span 2; }
.ac-row + .ac-row { border-top: 1px solid var(--band); }
.ac-row dt { color: var(--muted); font-size: 12.5px; font-weight: 700; line-height: 1.3; }
.ac-row dd { margin: 0; font-size: 15px; font-weight: 700; min-width: 0; overflow-wrap: anywhere; text-align: start; }
.ac-row dd [dir="ltr"] { unicode-bidi: isolate; }
#phone.ac-row dd [dir="ltr"] { white-space: nowrap; font-size: 14px; letter-spacing: -0.01em; }
/* The e-mail keeps one line (Nasser 2026-11-21): a long address ends in «…» (its title holds the whole); the flag sits by the label. */
.ac-row dd.ac-email { overflow-wrap: normal; }
.ac-row dd .ac-one { display: inline-block; vertical-align: bottom; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-row dd.ac-empty { color: var(--muted); font-weight: 500; opacity: 0.8; }
.ac-flag { font-size: 12px; font-weight: 800; white-space: nowrap; }
.ac-flag.ok { color: var(--ok); }
.ac-flag.wait { color: #b47d00; }
.ac-edit { grid-column: 2; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; background: var(--band);
  color: var(--letter); font-size: 18px; line-height: 1; text-decoration: none; }
.ac-edit:hover { background: var(--bg); }
.ac-sheet .gu-sheet-body label { margin-bottom: -8px; }
.ac-sheet .gu-sheet-body p { margin: 0; }
.ac-close { text-decoration: none; font-size: 18px; }
.ac-remove { align-self: center; background: transparent; border: 0; color: var(--bad); font-weight: 700; font-size: 14px; min-height: 44px; padding: 0 12px; cursor: pointer; }
/* Without script the sheet is the page's own open dialog, not a modal one: keep it at the bottom over the page. */
.ac-sheet[open]:not(:modal) { position: fixed; inset: auto 0 0 0; z-index: 30; animation: none; box-shadow: 0 -8px 40px rgba(11, 29, 81, 0.35); }
@media (min-width: 760px) { .ac-sheet[open]:not(:modal) { inset: 10vh 0 auto 0; } }

/* «كيف أدير اللعبة؟» (GAMES_UNIFIED §8.1, Feudboard's pattern): a contents row, numbered steps, small headings in «أثناء اللعب». */
.guide-toc { display: flex; flex-wrap: wrap; gap: 8px; }
.guide-toc a { padding: 6px 12px; border-radius: 999px; background: var(--band); color: var(--letter); font-size: 13.5px; font-weight: 700; text-decoration: none; }
.guide-item { scroll-margin-top: 80px; }
.guide-item h3 { margin: 10px 0 4px; font-size: 15.5px; color: var(--letter); }
.guide-steps { margin: 0 0 6px; padding-inline-start: 22px; display: grid; gap: 6px; line-height: 1.7; }

/* «ألعابي» (GAMES_UNIFIED §8.4, as in «وش قالوا؟»): six figures that each open the past games under their filter (a zero
   is not a link), «ألعاب مفتوحة», then «ألعابي السابقة» with a search, the filters, a chip that clears them and «عرض المزيد». */
.gm-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 600px) { .gm-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .gm-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.gm-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink);
  text-decoration: none; min-height: 72px; }
.gm-tile b { font-size: 22px; font-weight: 800; color: var(--letter); }
.gm-tile span { font-size: 12.5px; color: var(--muted); font-weight: 700; line-height: 1.3; }
a.gm-tile:hover, a.gm-tile:focus-visible { border-color: var(--letter); }
.gm-tile.zero b { color: var(--muted); }
.gm-head { margin: 8px 0 0; font-size: 17px; }
.gm-none { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.gm-none form { margin: 0; }
.gm-search { display: flex; gap: 8px; }
.gm-search input { flex: 1; min-width: 0; }
.gm-active { margin: 0; }
.gm-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--band); color: var(--letter);
  font-weight: 800; font-size: 14px; text-decoration: none; }
.gm-more { justify-self: center; align-self: center; }

/* The bell's list (GAMES_UNIFIED §8.2): a small window under the bell, 360px on a computer and min(360px, 100vw - 24px)
   on a phone, kept inside the screen there; it closes with a tap outside or Esc (shell.js). */
@media (max-width: 600px) { .bell-panel { position: fixed; top: 64px; inset-inline: auto 12px; } }


/* «الأجهزة المرتبطة» (GAMES_UNIFIED §8.9): each sign-in with its browser, its date and «إلغاء». */
.dv-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.dv-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; }
.dv-row + .dv-row { border-top: 1px solid var(--band); }
.dv-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dv-row form { margin: 0; }
.dv-end { color: var(--bad); font-weight: 700; min-height: 44px; }

/* «حذف حسابي» (GAMES_UNIFIED §8.10): what goes and what stays, as two short lists. */
.delete-list { margin: 0 0 8px; padding-inline-start: 20px; display: grid; gap: 4px; line-height: 1.6; }

/* «كيف كانت اللعبة؟» after the honour board (GAMES_UNIFIED §9.9): five 44px stars, the coordinator's only. */
.rating-card { margin: 8px auto 0; max-width: 360px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-align: center; }
.rating-q { margin: 0 0 6px; font-weight: 700; }
.rating-stars { display: flex; justify-content: center; gap: 4px; }
.rating-star { width: 44px; height: 44px; padding: 0; border: 0; background: none; font-size: 30px; line-height: 1; color: var(--silver); cursor: pointer; }
.rating-star.on { color: #f5b301; }
[data-theme="night"] .rating-star:not(.on) { color: #6474ad; }
.rating-card .small { margin: 6px 0 0; }
/* The coordinator's header (GAMES_UNIFIED §9.1, nhmsv 701796e): «<name> · منسق» beside the logo and the plan badge
   under it from 600px; a phone keeps its one-row bar and has both at the head of ☰; a computer (the side menu, 900px
   and up) has both under the logo there. */
.top-who { display: none; }
@media (min-width: 600px) {
  .top:has(.top-who) .brand { flex: none; }
  .top-who { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; color: var(--on-navy); text-decoration: none; line-height: 1.3; }
}
@media (min-width: 900px) { body.has-side .top-who { display: none; } body.has-side .top:has(.top-who) .brand { flex: 1; } }
.top-who-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; opacity: 0.9; }
.top-badge { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 1px 9px; border-radius: 999px; background: #fff1c2; color: #0b1d51; font-size: 12px; font-weight: 700; text-decoration: none; }
.top-badge.over { background: #ffe1de; color: #8a1c12; }
.menu-head { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 14px 6px; color: var(--ink); text-decoration: none; }
.menu-who { font-weight: 700; font-size: 14px; }
.menu-head .top-badge { white-space: normal; }
.coord-badge { align-self: flex-start; margin: -6px 12px 10px; white-space: normal; }

/* «ثيم صفحاتك» (nhmsv GAMES_UNIFIED §9.14; Feudboard's three options): the identity above, or one of two themes on
   <html data-palette>, for a coordinator's pages and their games. The «بس!» red stays: it is the game. Day first, then
   night, which outweighs it. Every text pair is AA-checked by tests/PaletteTest.php. */
:root[data-palette="apricot"] {
  --navy: #3d1a5c;
  --navy-2: #5b2a86;
  --gold: #ff8a1f;
  --gold-2: #ffb066;
  --rays: rgba(255, 176, 102, 0.08);
  --bg: #fff6ec;
  --surface: #ffffff;
  --mine: #ffe6cc;
  --line: #f1dfcc;
  --ink: #2b1a0e;
  --muted: #6b5240;
  --accent: #ff8a1f;
  --on-accent: #3a1a00;
  --letter: #5b2a86;
  --scrim: rgba(61, 26, 92, 0.35);
  --menu: #ffffff;
  --silver: #e2cdb8;
  --band: #fbecdc;
  --soft: #ffe6cc;
}
:root[data-palette="fuchsia"] {
  --navy: #5c1460;
  --navy-2: #701a75;
  --gold: #ffd43b;
  --gold-2: #ffe27a;
  --rays: rgba(255, 226, 122, 0.08);
  --bg: #fdf4ff;
  --surface: #ffffff;
  --mine: #fff0b3;
  --line: #f0dcf3;
  --ink: #2a0e2e;
  --muted: #6e4a72;
  --accent: #ffd43b;
  --on-accent: #3a2600;
  --letter: #a21caf;
  --scrim: rgba(92, 20, 96, 0.35);
  --menu: #ffffff;
  --silver: #e6cdea;
  --band: #f7e8fa;
  --soft: #fff0b3;
}
:root[data-palette="apricot"][data-theme="night"] {
  --bg: #1e0f2e;
  --surface: #2e1846;
  --mine: #3d2250;
  --line: #4a2c66;
  --ink: #fff1e3;
  --muted: #dcc4b0;
  --letter: #ffb066;
  --on-accent: #3a1a00;
  --scrim: rgba(10, 4, 16, 0.6);
  --menu: #2e1846;
  --band: #26123a;
  --soft: #3a2340;
  --silver: #6b4a86;
}
:root[data-palette="fuchsia"][data-theme="night"] {
  --bg: #24082a;
  --surface: #3a0f40;
  --mine: #4a1a50;
  --line: #5c2463;
  --ink: #fdf0ff;
  --muted: #dfbfe3;
  --letter: #ffd43b;
  --on-accent: #3a2600;
  --scrim: rgba(12, 2, 14, 0.6);
  --menu: #3a0f40;
  --band: #2e0b34;
  --soft: #45203f;
  --silver: #7a4a80;
}
.theme-choices { display: grid; gap: 8px; }
.theme-choice { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.theme-choice:has(input:checked) { border-color: var(--letter); box-shadow: 0 0 0 2px var(--letter) inset; }
.theme-choice input { width: 20px; height: 20px; accent-color: var(--letter); }
.theme-swatch { display: inline-flex; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.theme-swatch i { display: block; width: 18px; height: 24px; }
.theme-swatch-identity i:nth-child(1) { background: #0b1d51; } .theme-swatch-identity i:nth-child(2) { background: #ffb800; } .theme-swatch-identity i:nth-child(3) { background: #eef2ff; }
.theme-swatch-apricot i:nth-child(1) { background: #3d1a5c; } .theme-swatch-apricot i:nth-child(2) { background: #ff8a1f; } .theme-swatch-apricot i:nth-child(3) { background: #fff6ec; }
.theme-swatch-fuchsia i:nth-child(1) { background: #5c1460; } .theme-swatch-fuchsia i:nth-child(2) { background: #ffd43b; } .theme-swatch-fuchsia i:nth-child(3) { background: #fdf4ff; }
/* A themed room screen: the theme's own stage instead of the navy artwork, and its muted text from the theme. */
:root[data-palette] body.screen-page:not(.show-day):not(.show-contrast) { background: repeating-conic-gradient(from 0deg at 50% 120%, var(--rays) 0deg 6deg, transparent 6deg 15deg), var(--navy); }
:root[data-palette] body.screen-page .show-muted, :root[data-palette] body.screen-page .show-link { color: color-mix(in srgb, var(--on-navy) 78%, var(--navy)); }
.theme-name { flex: 1; }
.theme-preview { padding: 10px 4px; }
/* «خاناتي المحفوظة» by CSV (GAMES_UNIFIED §9.14): the links, then the import with one line per row in the preview. */
.sets-csv-links { margin-top: 12px; }
.sets-csv { margin-top: 12px; }
.sets-csv summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.sets-csv textarea { width: 100%; font-family: ui-monospace, monospace; font-size: 13px; }
.csv-preview { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 6px; }
.csv-preview li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); }
.csv-preview li.bad { border-color: var(--bad); }
.csv-line { font-size: 12px; color: var(--muted); }
.csv-error { color: #b42318; font-size: 13px; font-weight: 600; }
[data-theme="night"] .csv-error { color: var(--bad); }
.csv-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.csv-pick-btn { cursor: pointer; }
.csv-pick:focus-within .csv-pick-btn { outline: 3px solid var(--focus, #2f6fed); outline-offset: 2px; }
.csv-pick-name { min-width: 0; overflow-wrap: anywhere; }
.csv-pick-template { margin-inline-start: auto; }

/* «الموسيقى» in the menu as three choices (persona round 2). */
.menu-music { cursor: default; flex-wrap: wrap; }
.menu-music > span:first-of-type { flex: 1; }
.menu-seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 12px; background: var(--band); }
.menu-seg button { min-height: 40px; min-width: 52px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.menu-seg button[aria-checked="true"] { background: var(--surface); font-weight: 700; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
/* The join page: «الرئيسية» as text beside the theme button; a one-line footer. */
.top-home { color: var(--on-navy); font-weight: 700; font-size: 15px; padding: 10px 6px; text-decoration: none; }
.foot-short { padding-block: 12px 20px; }
/* «كيف تُلعب» (GAMES_UNIFIED §10.1). */
.howto-ctas { justify-content: flex-start; }

/* The visitor's header (GAMES_UNIFIED §11, Nasser 2026-11-22): from 1100px the logo, three links, language, theme,
   «انضم للعبة» (outline) and «دخول المنسق» (filled); below it the logo, a small «دخول» and ☰. */
.top .vis-login { height: 38px; padding: 0 14px; font-size: 14px; background: var(--gold); color: var(--navy); border-color: var(--gold); margin-inline-start: auto; }
.top .pill-outline { background: transparent; color: var(--on-navy); border-color: rgba(255, 255, 255, 0.55); box-shadow: none; }
@media (min-width: 1100px) {
  .top .vis-login, .top .vis-menu { display: none; }
}
.menu-join { margin: 6px 0; text-align: center; }
.menu-icons { display: flex; align-items: center; gap: 8px; padding: 8px 4px 4px; }
.menu-icons .icon-button.outline { border-color: var(--line); color: var(--ink); text-decoration: none; }

/* GAMES_UNIFIED §11.7: the join code field has a plain border until it is used; the accent comes with focus. */
.code-input:focus { border-color: var(--accent); }

/* The join page in the four games' one shape (GAMES_UNIFIED §12.4–12.6, reference «وش قالوا؟»): 12px fields, dashes for
   the empty code, a single 2px ring on the chosen avatar, «انضمام» flat at 56px; «المزيد» is a sheet; «أنا هو، رجّعني» is
   the same card's other content. */
.join-page .code-input, .join-page .join-code { border-radius: 12px; height: 64px; }
.join-page #name { border-radius: 12px; height: 56px; }
.join-page .join-submit { min-height: 56px; border-radius: 12px; box-shadow: none; }
.join-page .join-submit:active { transform: none; }
.join-form:not(.is-rejoin) .rejoin-only, .join-form.is-rejoin .join-only { display: none !important; }
.rejoin-lead h2 { font-size: 19px; margin: 0 0 4px; }
.join-new-name, .join-rejoin { font-weight: 700; }
.avatar-sheet .gu-sheet-body { max-height: 70dvh; }
.avatar-sheet-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.avatar-sheet-pick { aspect-ratio: 1; min-height: 44px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--bg); font-size: 26px; cursor: pointer; padding: 0; }
.avatar-sheet-pick:disabled { opacity: 0.35; cursor: not-allowed; }
.avatar-more { flex: none; }
.code-field .gu-code-icon .gu-icon { width: 24px; height: 24px; }

/* The footer in one line (GAMES_UNIFIED §12.3): the logo and name, the links, then the version and «تكبير الخط» at the other
   end; in the same 1160px container as the header; it wraps on a phone. */
.foot.foot-line, body.landing-page .foot.foot-line { max-width: 1160px; margin-inline: auto; display: flex; flex-direction: row; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 8px 20px; padding: 16px 24px max(16px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: start; }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 800; text-decoration: none; }
.foot-line .foot-links { flex: 1; justify-content: center; gap: 4px 14px; }
.foot-line .foot-links a { color: var(--muted); }
.foot-end { display: inline-flex; align-items: center; gap: 12px; }
/* §15 (Nasser 2026-11-22): under 1100px one 52px row: the icon and name at the start, ⓘ (34px, 9px corners; §16: no «A+»)
   at the end; ⓘ opens a sheet with the links one per row (44px) and the version. */
.foot-mob { display: none; }
@media (max-width: 1099.98px) {
  .foot.foot-line, body.landing-page .foot.foot-line { flex-direction: row; flex-wrap: nowrap; justify-content: space-between; text-align: start;
    min-height: 52px; box-sizing: border-box; padding-block: 0 env(safe-area-inset-bottom); gap: 12px; }
  .foot-line .foot-links, .foot-line .foot-end { display: none; }
  .foot-mob { display: inline-flex; align-items: center; gap: 8px; }
}
.foot-mob-btn { width: 34px; height: 34px; min-height: 0; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; cursor: pointer; box-shadow: none; }
.foot-mob-btn svg { width: 18px; height: 18px; }
.foot-sheet-links { display: flex; flex-direction: column; }
.foot-sheet-links a { display: flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.foot-sheet-version { margin: 12px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.pay-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 8px 0 0; font-size: 13px; color: var(--muted); }
/* The join page's master design (nhmsv GAMES_UNIFIED §13, Nasser 2026-11-22): the same structure and sizes in the four
   games, as these same-named variables; only colours, logo and name, decorations and identity icons differ. Last in
   the file and under body.join-body, so no older join rule changes a number. */
body.join-body {
  /* §17.1 (Nasser 2026-11-22): the same numbers as --auth-* (title 22, name 46 r9, button 48 r9, card 20 inside r14);
     the code field stays 60. */
  --join-bar-h: 64px; --join-card-max: 420px; --join-gap-top: 20px; --join-card-pad: 20px; --join-card-r: 14px; --join-section-gap: 20px;
  --join-code-h: 60px; --join-name-h: 46px; --join-btn-h: 48px; --join-avatar: 48px; --join-avatar-gap: 8px;
  --join-title: 22px; --join-label: 14px; --join-hint: 12px; --join-field-r: 9px; --join-btn-r: 9px; --join-side: 20px;
  /* Tajawal first, so the code's digits look as they do in the other three games (Coordinator 2026-11-22). */
  --font: 'Tajawal', 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  display: flex; flex-direction: column; min-height: 100dvh;
}
@media (max-width: 374.98px) { body.join-body { --join-side: 16px; } }
/* The bar: the logo and name at the start, «الرئيسية» in the middle, the theme icon at the end; nothing else. */
body.join-body .top { display: grid; grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr); align-items: center; gap: 8px; max-width: none; box-sizing: border-box;
  height: calc(var(--join-bar-h) + env(safe-area-inset-top)); padding-block: env(safe-area-inset-top) 0; padding-inline: var(--join-side); margin: 0; }
body.join-body .top .brand { justify-self: start; flex: none; min-width: 0; white-space: nowrap; }
body.join-body .top .join-links { display: contents; }
body.join-body .top .top-home { justify-self: center; grid-column: 2; padding: 10px 6px; }
body.join-body .top .theme-button { justify-self: end; grid-column: 3; }
/* The card: 20px under the bar, centred at 420px, 20px inside, radius 14, 20px between its sections. */
body.join-body main.wrap { flex: 1 0 auto; max-width: none; width: 100%; box-sizing: border-box; padding: var(--join-gap-top) var(--join-side) 0; gap: 0; }
body.join-body .join-page { width: 100%; max-width: var(--join-card-max); box-sizing: border-box; margin: 0 auto; padding: var(--join-card-pad); border-radius: var(--join-card-r); gap: var(--join-section-gap); box-shadow: none; }
body.join-body .join-page h1 { font-family: var(--font); font-size: var(--join-title); font-weight: 800; line-height: 1.3; margin: 0; }
body.join-body .join-page .field-group > label, body.join-body .join-page .field-group > span:first-child, body.join-body .avatar-pick legend { font-size: var(--join-label); font-weight: 500; }
body.join-body .join-page .small, body.join-body .join-page .muted.small { font-size: var(--join-hint); font-weight: 400; }
body.join-body .join-page .join-code, body.join-body .join-page .code-input { height: var(--join-code-h); min-height: 0; box-sizing: border-box; border-radius: var(--join-field-r); padding-block: 0; }
body.join-body .join-page .code-locked { height: var(--join-code-h); box-sizing: border-box; border-radius: var(--join-field-r); padding-block: 0; display: flex; align-items: center; justify-content: center; }
body.join-body .join-page #name { height: var(--join-name-h); min-height: 0; box-sizing: border-box; border-radius: var(--join-field-r); padding-block: 0; }
body.join-body .join-page .join-submit { height: var(--join-btn-h); min-height: 0; box-sizing: border-box; border-radius: var(--join-btn-r); box-shadow: none; padding-block: 0;
  display: flex; align-items: center; justify-content: center; line-height: 1; padding-top: 3px; }
/* «اختر أفاتارك», its line, then 48px tiles 8px apart and «المزيد» as a tile of the same size: always five in the row
   (no sideways scroll). */
body.join-body .avatar-pick legend { margin-bottom: 0; color: var(--muted); }
body.join-body .avatar-hint { display: block; margin-bottom: 8px; }
body.join-body .avatar-row { gap: var(--join-avatar-gap); }
body.join-body .avatar-row .gu-avatars { gap: var(--join-avatar-gap); padding: 0; }
/* min(48px, (the row's width − 5 × 8px) / 6), so five and «المزيد» always fit one row: 46px at 390, 42px at 360. */
body.join-body .avatar-row .gu-avatar, body.join-body .avatar-row .avatar-more { --join-avatar-fit: min(var(--join-avatar), calc((100cqi - 5 * var(--join-avatar-gap)) / 6));
  width: var(--join-avatar-fit); height: var(--join-avatar-fit); min-height: 0; box-sizing: border-box; }
body.join-body .avatar-row .gu-avatar span { font-size: 26px; }
body.join-body .avatar-row .avatar-more { flex: none; min-width: 0; padding: 0; border-radius: 14px; font-size: 11.5px; line-height: 1.1; white-space: normal; }
body.join-body .avatar-row .gu-avatars:not(.gu-all) .gu-avatar:nth-child(5):not(.gu-extra) { display: grid; }
body.join-body .avatar-sheet-pick { width: var(--join-avatar); height: var(--join-avatar); min-height: 0; justify-self: center; }
/* The footer at the bottom, in the middle: «سياسة الخصوصية · الشروط والأحكام». */
body.join-body .foot-short { margin-top: auto; padding-block: 16px max(16px, env(safe-area-inset-bottom)); }
body.join-body .foot-short .foot-links { gap: 8px; }

/* «دخول المنسق» and «حساب منسق جديد» master design (nhmsv GAMES_UNIFIED §14, Nasser 2026-11-22, Feudboard's pilot values):
   the same structure and sizes in the four games, as --auth-* variables of the same names. UI only: the forms, their
   fields, links and checks are unchanged. Tajawal first; title 800, labels 700, text 400. */
body.auth-body {
  --auth-bar-h: 64px; --auth-card-max: 420px; --auth-gap-top: 20px; --auth-card-pad: 20px; --auth-card-r: 14px; --auth-icon: 48px;
  --auth-title: 22px; --auth-text: 13px; --auth-input-h: 46px; --auth-btn-h: 48px; --auth-btn2-h: 42px; --auth-r: 9px;
  --auth-field-gap: 14px; --auth-section-gap: 20px; --auth-side: 20px;
  --font: 'Tajawal', 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
@media (max-width: 374.98px) { body.auth-body { --auth-side: 16px; } }
body.auth-body .top { box-sizing: border-box; height: calc(var(--auth-bar-h) + env(safe-area-inset-top)); padding-block: env(safe-area-inset-top) 0; }
body.auth-body main.wrap { max-width: none; width: 100%; box-sizing: border-box; padding-top: var(--auth-gap-top); padding-inline: var(--auth-side); gap: 0; }
body.auth-body .auth { max-width: var(--auth-card-max); padding-block: 0; gap: 0; }
body.auth-body .auth-card { box-sizing: border-box; padding: var(--auth-card-pad); border-radius: var(--auth-card-r); box-shadow: none; gap: var(--auth-section-gap); }
body.auth-body .auth-head { gap: 6px; }
body.auth-body .auth-head img { width: var(--auth-icon); height: var(--auth-icon); border-radius: 12px; margin: 0; }
body.auth-body .auth-head h1 { font-family: var(--font); font-size: var(--auth-title); font-weight: 800; line-height: 1.3; margin: 0; }
body.auth-body .auth-head p, body.auth-body .field-group label, body.auth-body .label-row, body.auth-body .label-row a, body.auth-body .muted.small,
body.auth-body .auth-sep { font-size: var(--auth-text); line-height: 1.5; }
body.auth-body .auth-head p, body.auth-body .muted.small, body.auth-body .auth-sep { font-weight: 400; }
body.auth-body .field-group label { font-weight: 700; }
body.auth-body .auth-form { gap: var(--auth-field-gap); }
body.auth-body .auth-form .primary { margin-top: calc(var(--auth-section-gap) - var(--auth-field-gap)); }
body.auth-body .auth-card input:not([type="radio"]):not([type="checkbox"]) { box-sizing: border-box; height: var(--auth-input-h); min-height: 0; border-radius: var(--auth-r); padding-block: 0; }
body.auth-body .auth-card button.primary, body.auth-body .auth-card .button.primary { box-sizing: border-box; height: var(--auth-btn-h); min-height: 0; border-radius: var(--auth-r); box-shadow: none; padding-block: 0; }
body.auth-body .auth-card .button.ghost { box-sizing: border-box; height: var(--auth-btn2-h); min-height: 0; border-radius: var(--auth-r); box-shadow: none; padding-block: 0; display: flex; align-items: center; justify-content: center; }
body.auth-body .auth-card button.primary, body.auth-body .auth-card .button.primary, body.auth-body .auth-card .button.ghost { display: flex; align-items: center; justify-content: center; line-height: 1; padding-top: 3px; }
body.auth-body .auth-card .primary:active, body.auth-body .auth-card .button:active { transform: none; }
/* The eye inside the password field, at the same place in every game: 8px from the field's end, centred. */
body.auth-body .pw-reveal { inset-inline-end: 8px; width: 36px; height: 36px; border-radius: 8px; }
body.auth-body .pw-reveal svg { width: 20px; height: 20px; }
body.auth-body .password-field input { padding-inline-end: 48px; }

/* The footer at the bottom of a short page, as in «وش قالوا؟» (Coordinator for Nasser, 2026-11-22): the page is a
   column, the main part grows, and the footer is a full-width bar on the surface colour with one line above it. */
body:has(> footer.foot-line) { display: flex; flex-direction: column; min-height: 100dvh; }
body:has(> footer.foot-line) > main.wrap { flex: 1 0 auto; width: 100%; box-sizing: border-box; }
body:has(> footer.foot-line) > header.top { width: 100%; box-sizing: border-box; flex: none; }
.foot.foot-line, body.landing-page .foot.foot-line { max-width: none; width: 100%; box-sizing: border-box; margin: 0; flex: none;
  background: var(--surface); border-top: 1px solid var(--line); padding-inline: max(24px, calc((100% - 1160px) / 2 + 24px)); }
@media (max-width: 1099.98px) { .foot.foot-line, body.landing-page .foot.foot-line { padding-inline: 20px; } }
@media (max-width: 374.98px) { .foot.foot-line, body.landing-page .foot.foot-line { padding-inline: 16px; } }

/* «باقتك» on the coordinator home (nhmsv GAMES_UNIFIED §18.2, Nasser 2026-11-22), as in the other games: the title and
   its chip, one line, then «جدّد أو غيّر الباقة» across the card in the game's identity colour, 48px, radius 9, flat. */
.ch-plan { gap: 10px; }
.ch-plan .ch-plan-btn { display: flex; align-items: center; justify-content: center; width: 100%; box-sizing: border-box; height: 48px; min-height: 0;
  margin-top: 4px; padding: 3px 12px 0; border: 0; border-radius: 9px; box-shadow: none; background: var(--navy); color: #fff;
  font-size: 15px; font-weight: 800; line-height: 1; white-space: nowrap; text-decoration: none; transform: none; }
.ch-plan .ch-plan-btn:hover, .ch-plan .ch-plan-btn:focus-visible { filter: brightness(1.15); }
.ch-plan .ch-plan-btn:active { transform: none; box-shadow: none; }
[data-theme="night"] .ch-plan .ch-plan-btn { background: var(--gold); color: #0b1d51; }

/* «لعبة جديدة» (nhmsv GAMES_UNIFIED §18.4, draft for Nasser): one page, the same structure in the four games; only the
   rows differ. Buttons as §18.2: the identity colour, 48px, radius 9, flat. */
.ng-page { display: grid; gap: 20px; align-items: start; }
.ng-main { display: grid; gap: 14px; min-width: 0; }
.ng-head h1 { margin: 0; font-size: 24px; }
.ng-head p { margin: 4px 0 0; }
.ng-btn { display: flex; align-items: center; justify-content: center; width: 100%; box-sizing: border-box; height: 48px; min-height: 0; padding: 3px 14px 0;
  border: 0; border-radius: 9px; box-shadow: none; background: var(--navy); color: #fff; font: inherit; font-size: 16px; font-weight: 800; line-height: 1; cursor: pointer; }
.ng-btn:hover, .ng-btn:focus-visible { filter: brightness(1.15); }
.ng-btn:active { transform: none; box-shadow: none; }
[data-theme="night"] .ng-btn { background: var(--gold); color: #0b1d51; }
.ng-quick { display: grid; gap: 12px; padding: 14px; border: 2px solid var(--navy); border-radius: 14px; background: var(--surface); }
[data-theme="night"] .ng-quick { border-color: var(--gold); }
.ng-quick-head { margin: 0; }
.ng-quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.ng-quick-grid div { padding: 8px 10px; border-radius: 9px; background: var(--soft); }
.ng-quick-grid dt { font-size: 12px; color: var(--muted); }
.ng-quick-grid dd { margin: 2px 0 0; font-weight: 800; }
.ng-or { margin: 6px 0 0; font-family: var(--font); font-size: 15px; font-weight: 800; line-height: 1.25; color: var(--muted); }
.ng-form { display: grid; gap: 12px; }
.ng-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; border: 0; }
.ng-mode { position: relative; display: block; cursor: pointer; }
.ng-mode input { position: absolute; opacity: 0; pointer-events: none; }
.ng-mode-body { display: grid; gap: 4px; height: 100%; box-sizing: border-box; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.ng-mode-body small { color: var(--muted); font-size: 12px; }
.ng-mode input:checked + .ng-mode-body { border: 2px solid var(--navy); padding: 11px; background: var(--soft); }
[data-theme="night"] .ng-mode input:checked + .ng-mode-body { border-color: var(--gold); }
.ng-mode input:focus-visible + .ng-mode-body { outline: 2px solid var(--gold); outline-offset: 2px; }
.ng-rows, .ng-adv { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.ng-row { display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box; min-height: 56px; padding: 8px 14px; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.ng-rows > .ng-row:last-child, .ng-adv-body > .ng-row:last-of-type { border-bottom: 0; }
.ng-ic svg { width: 20px; height: 20px; color: var(--muted); display: block; }
.ng-label { flex: 1; font-weight: 700; }
.ng-val { color: var(--navy-2, var(--navy)); font-weight: 800; }
[data-theme="night"] .ng-val { color: var(--gold); }
.ng-chev { width: 16px; height: 16px; color: var(--muted); }
html[dir="ltr"] .ng-chev { transform: scaleX(-1); }
.ng-row-seg { cursor: default; flex-wrap: wrap; }
.ng-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.ng-seg label { position: relative; }
.ng-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ng-seg span { display: block; min-width: 40px; padding: 8px 10px; text-align: center; font-weight: 700; cursor: pointer; }
.ng-seg label + label span { border-inline-start: 1px solid var(--line); }
.ng-seg input:checked + span { background: var(--navy); color: #fff; }
[data-theme="night"] .ng-seg input:checked + span { background: var(--gold); color: #0b1d51; }
.ng-seg input:disabled + span { opacity: .35; cursor: not-allowed; }
.ng-seg input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: -2px; }
.ng-adv summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 14px; font-weight: 800; cursor: pointer; }
.ng-adv-body { border-top: 1px solid var(--line); padding-bottom: 10px; }
.ng-adv-body > p { margin: 8px 14px 0; }
.ng-check input { width: 22px; height: 22px; }
.ng-choices { display: grid; gap: 0; }
.ng-choice { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.ng-choice span { display: grid; gap: 2px; }
.ng-choice small { color: var(--muted); font-size: 12px; }
.ng-choice input { width: 20px; height: 20px; flex: none; accent-color: var(--navy); }
[data-theme="night"] .ng-choice input { accent-color: var(--gold); }
.ng-choice-group { margin: 12px 0 0; font-size: 13px; font-weight: 800; color: var(--muted); }
.ng-choices .ng-btn { margin-top: 16px; }
.ng-dock { display: grid; gap: 8px; }
.ng-dock-line { display: flex; justify-content: space-between; gap: 10px; margin: 0; font-size: 12.5px; color: var(--muted); }
.ng-sum { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ng-coupons { flex: none; }
.ng-aside { display: none; }
.top-back { display: none; }
/* A phone: no bottom bar on this page, «‹ رجوع» at the bar's start, and the dock fixed at the bottom. */
@media (max-width: 899.98px) {
  body.ng-body .panel-nav { display: none; }
  body.ng-body .top-back { display: inline-flex; align-items: center; gap: 4px; padding: 10px 4px; color: #fff; font-weight: 800; text-decoration: none; }
  body.ng-body .top .brand { display: none; }
  body.ng-body main.wrap { padding-bottom: 130px; }
  .ng-dock { position: fixed; inset-inline: 0; bottom: 0; z-index: 16; padding: 10px 16px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
    background: var(--surface); }
}
/* A computer: the settings in a column, «ملخص اللعبة» fixed beside them; the dock's work is the summary's. */
@media (min-width: 1100px) {
  .ng-page { grid-template-columns: minmax(0, 1fr) 320px; max-width: 1040px; margin: 0 auto; }
  .ng-quick { grid-template-columns: minmax(0, 1fr) 220px; align-items: center; }
  .ng-quick-head { grid-column: 1 / -1; }
  .ng-quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ng-dock { display: none; }
  .ng-aside { position: sticky; top: 16px; display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
  .ng-aside h2 { margin: 0; font-size: 17px; }
  .ng-aside-list { margin: 0; }
  .ng-aside-list div { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .ng-aside-list dt { color: var(--muted); }
  .ng-aside-list dd { margin: 0; font-weight: 800; color: var(--navy-2, var(--navy)); }
  [data-theme="night"] .ng-aside-list dd { color: var(--gold); }
  .ng-aside p { margin: 0; }
}
/* §18.5: the panel pages already show no footer (body.has-panel .foot); its links and the version live in «المزيد». */
.mx-version { margin: 4px 0 36px; }

/* The TV's waiting screen (nhmsv GAMES_UNIFIED §19.3): the name large, one line, and three how-to cards in one place
   taking turns every 8 seconds, then «نظّم لعبتك الخاصة» (32s cycle). With reduced motion all four stand side by side. */
.show-idle { gap: 2vh; }
.show-idle-name { font-size: clamp(40px, 6vw, 120px); }
.show-howto { position: relative; width: min(70vw, 900px); height: min(46vh, 420px); margin-top: 2vh; }
.show-howto-card { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5vh;
  padding: 3vh 3vw; border-radius: 28px; background: rgba(255, 255, 255, 0.08); opacity: 0; animation: show-howto 32s infinite; }
.show-howto-card.c2 { animation-delay: 8s; }
.show-howto-card.c3 { animation-delay: 16s; }
.show-howto-card.c4 { animation-delay: 24s; }
.show-howto-own .show-howto-site { font-weight: 800; opacity: 1; color: var(--gold); }
.show-howto-card img { width: auto; max-width: 100%; height: min(20vh, 180px); object-fit: contain; }
.show-howto-card b { display: flex; align-items: center; gap: 0.6em; font-size: clamp(26px, 3.4vw, 60px); font-weight: 800; }
.show-howto-card > span { font-size: clamp(18px, 2vw, 34px); opacity: 0.85; max-width: 26em; }
.show-howto-n { display: inline-flex; align-items: center; justify-content: center; width: 1.4em; height: 1.4em; border-radius: 50%; background: var(--gold); color: #0b1d51; font-size: 0.8em; }
@keyframes show-howto { 0% { opacity: 0; } 1.5%, 23.5% { opacity: 1; } 25%, 100% { opacity: 0; } }
body.screen-page.show-day .show-howto-card { background: rgba(11, 29, 81, 0.06); }
@media (prefers-reduced-motion: reduce) {
  .show-howto { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2vw; width: min(92vw, 1400px); height: auto; }
  .show-howto-card { position: static; opacity: 1; animation: none; }
}
