@import url('/fonts/fonts.css');
@import url('/assets/tokens.css');

/*
 * The public pages of Feudboard (Phase 0: the landing page, privacy, errors). Colours from tokens.css; Tajawal for
 * text and headings, Poppins for codes and numbers (the games' shared fonts, GAMES_PHASE2_SPEC §2). Public pages without a side menu keep their content centred
 * (nhmsv LAYOUT_WIDTH.md §1): the landing page up to 1920px, forms and long text narrow.
 */
:root {
  --font: 'Tajawal', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --display: 'Tajawal', system-ui, sans-serif;
  --latin: 'Poppins', 'Tajawal', system-ui, sans-serif;
  --content-max: 1920px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.7; }
a { color: var(--brand-ink); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.3; margin: 0; text-wrap: balance; }
p { margin: 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.muted { color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 14px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Test strip (nhmsv PLATFORM_MODES.md §2): thin, amber, drawn by the server, no close button. */
.test-strip { background: var(--warn-bg); color: var(--warn-ink); border-bottom: 1px solid var(--warn-line); text-align: center; font-size: 13px; font-weight: 600; padding: 4px var(--gutter); }

/* Top bar */
.top { background: var(--head); color: var(--on-head); }
.top-inner { max-width: var(--content-max); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px;
  padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 20px; min-width: 0; }
.brand img { border-radius: 10px; flex: none; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-links { display: flex; gap: 8px; }
.icon-button { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid currentColor; background: transparent; color: inherit; cursor: pointer; padding: 0; opacity: .85; }
.icon-button:hover { opacity: 1; background: var(--surface); color: var(--brand-ink); }
.icon-button svg { width: 20px; height: 20px; }
/* Language and night mode (GAMES_PHASE2_SPEC §7): «EN» / «ع» and a moon, a sun in dark mode. */
.ui-lang { text-decoration: none; font-weight: 800; font-size: 15px; line-height: 1; }
.ui-lang span:lang(en) { font-family: var(--latin); }
.ui-theme .ui-sun { display: none; }
:root[data-theme="dark"] .ui-theme .ui-sun { display: block; }
:root[data-theme="dark"] .ui-theme .ui-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .ui-theme .ui-sun { display: block; }
  :root[data-theme="auto"] .ui-theme .ui-moon { display: none; }
}

/* Content */
.wrap { flex: 1; width: 100%; max-width: 760px; margin-inline: auto; padding-block: 32px 56px;
  padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 32px; }
.wrap-wide { max-width: var(--content-max); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.narrow { max-width: 560px; width: 100%; margin-inline: auto; }
.prose { max-width: 70ch; width: 100%; margin-inline: auto; }
.prose h1 { font-size: 28px; }
.prose h2 { font-size: 20px; margin-top: 8px; }
/* The site's button has the game-ui kit's look (radius 14, weight 800, the primary's 3px edge; GAMES_PHASE2_SPEC §2).
   It stays its own class where the panel squeezes buttons below the kit's 40px floor on short screens (no scrolling
   while playing, Nasser); elsewhere on the game pages the kit's gu-btn is used. */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); box-shadow: 0 3px 0 var(--brand-deep); }
.cookie-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.cookie-list li { display: flex; flex-wrap: wrap; gap: 4px 12px; }

/* Landing */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 32px; align-items: center; }
.hero-text { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hero h1 { font-size: clamp(40px, 6vw, 64px); color: var(--brand-ink); }
.hero-tagline { font-family: var(--display); font-weight: 800; font-size: clamp(20px, 2.4vw, 28px); }
.chip { align-self: flex-start; background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 2px 14px; font-weight: 700; font-size: 14px; }
.poll { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; box-shadow: 0 10px 0 var(--brand-soft); }
.poll figcaption { display: flex; flex-direction: column; gap: 2px; }
.poll-q { font-family: var(--display); font-weight: 800; font-size: 21px; line-height: 1.4; }
.poll-meta { font-size: 13px; color: var(--muted); }
.results { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.result { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; font-weight: 600; }
.result .pct { font-family: var(--display); font-weight: 800; font-variant-numeric: tabular-nums; }
.result .bar { grid-column: 1 / -1; height: 12px; border-radius: 999px; background: var(--hover); overflow: hidden; }
.result .bar i { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.result.lead .bar i { background: var(--accent); }
.result.lead .label::after { content: ' ★'; color: var(--accent); }
.result.hidden-answer .label { color: var(--muted); letter-spacing: .2em; }
.result.hidden-answer .bar i { background: var(--line); }
.w38 { width: 76%; } .w24 { width: 48%; } .w12 { width: 24%; }
.poll-note { font-size: 13px; color: var(--muted); }
/* The majlis illustration (public/assets/img/hero-majlis.svg), under the hero's two columns. */
.hero-art { grid-column: 1 / -1; justify-self: center; display: block; width: min(100%, 960px); height: auto; border-radius: 24px; }
.section { display: flex; flex-direction: column; gap: 16px; }
.section h2 { font-size: 26px; }
.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.step { display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step h3 { font-size: 18px; }
.step-n { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-family: var(--display); font-weight: 800; font-size: 20px; }
.notice { background: var(--brand-soft); border-radius: var(--radius); padding: 24px; }

/* Footer */
.foot { border-top: 1px solid var(--line); background: var(--surface); }
.foot-inner { max-width: var(--content-max); margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; font-size: 14px; color: var(--muted);
  padding-block: 16px calc(16px + env(safe-area-inset-bottom, 0px)); padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }
.foot-brand img { border-radius: 6px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 16px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Coordinator accounts (nhmsv USER_AUTH_FLOW.md): narrow centred forms, the code screen, the account page. */
.top-account { color: inherit; font-weight: 700; line-height: 1; text-decoration: none; padding: 0 12px; height: 44px; display: inline-flex; align-items: center; border-radius: 10px; border: 1px solid currentColor; }
.top-account:hover { background: var(--surface); color: var(--brand-ink); }
.auth { width: 100%; max-width: 480px; margin-inline: auto; display: flex; flex-direction: column; gap: 16px; }
.auth-card { display: flex; flex-direction: column; gap: 16px; }
.auth-head { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.auth-head img { border-radius: 14px; }
.auth-head h1 { font-size: 26px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group label, .label-row label { font-weight: 700; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; }
input:not([type="radio"]):not([type="checkbox"]) { width: 100%; min-height: 46px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); padding: 0 14px; font: inherit; }
input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.password-field { position: relative; }
.password-field input { padding-inline-end: 48px; }
.pw-reveal { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 8px; }
.pw-reveal svg { width: 20px; height: 20px; }
.pw-reveal[aria-pressed="true"] { color: var(--brand-ink); }
.paste-btn { min-height: 44px; align-self: flex-start; }
.code-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.code-tools:not(:has(> :not([hidden]))) { display: none; }
/* «مسح QR» (public/assets/paste.js, GAMES_UNIFIED §1): the camera in a dialog, closed by its button, Esc or a tap outside. */
.scan-dialog { width: min(420px, calc(100vw - 32px)); border: 0; border-radius: 20px; padding: 16px; background: var(--surface); color: var(--ink); display: grid; gap: 12px; text-align: center; }
.scan-dialog::backdrop { background: rgb(0 0 0 / .6); }
.scan-title { margin: 0; font-weight: 800; }
.scan-video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; background: var(--ink); }
.scan-status { margin: 0; color: var(--muted); font-size: 14px; }
.scan-status:empty { display: none; }
.scan-dialog .btn { min-height: 44px; }
.paste-row { display: flex; gap: 8px; align-items: stretch; }
.paste-row input { flex: 1; min-width: 0; }
.paste-row .btn { flex: none; }
.code-input { text-align: center; font-family: var(--latin); font-weight: 800; font-size: 28px; letter-spacing: .4em; }
.btn.wide { width: 100%; }
.btn.danger-text { color: var(--bad); }
.small { font-size: 13px; }
.center { text-align: center; }
.alert { background: var(--bad-soft); color: var(--bad); border-radius: 12px; padding: 10px 14px; font-weight: 600; }
.alert a { color: inherit; }
.notice { background: var(--ok-soft); color: var(--ok); border-radius: 12px; padding: 10px 14px; font-weight: 600; }
.note { background: var(--warn-bg); color: var(--warn-ink); border-radius: 12px; padding: 10px 14px; }
.auth-sep { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.auth-sep::before, .auth-sep::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.link-button { background: none; border: 0; color: var(--brand-ink); font: inherit; font-weight: 700; cursor: pointer; padding: 6px; }
.link-button:disabled { color: var(--muted); cursor: default; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.account-head { display: flex; flex-direction: column; gap: 8px; }
.account-head h1 { font-size: 30px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.palette-form { display: flex; flex-direction: column; gap: 10px; }
.palette-opt { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; font-weight: 600; }
.palette-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.palette-dots { display: inline-flex; gap: 2px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.top-account { white-space: nowrap; }
.brand { flex-shrink: 1; }
.top-links { flex-shrink: 0; }
@media (max-width: 420px) {
  .top-account { font-size: 14px; padding: 0 8px; }
  .top-links { gap: 6px; }
  .top-inner { gap: 8px; }
  .brand { font-size: 18px; gap: 8px; }
  .brand img { width: 30px; height: 30px; }
}
@media (max-width: 374px) { /* small phones: the name, «EN» and the moon still fit beside «دخول المنسقين» (GAMES_PHASE2_SPEC §7) */
  .top-inner { padding-inline: 12px; }
  .brand { font-size: 16px; gap: 6px; }
  .brand img { width: 28px; height: 28px; }
  .top-account { font-size: 13px; padding: 0 6px; }
}

/* «الباقات» (Nasser 2026-11-03): the passes on sale side by side, one column on a phone. */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px; align-items: stretch; }
.plan-card h2 { font-size: 20px; }
.plan-card .btn { margin-top: auto; }
.plan-price { font-size: 30px; font-weight: 800; color: var(--brand-ink); margin: 0; }
.plan-price s { font-size: 20px; font-weight: 600; }
.plan-price .plan-duration { display: block; font-size: 15px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.plan-price .plan-unit { font-size: 16px; font-weight: 700; color: var(--muted); }
.offer-badge { align-self: flex-start; margin: 0; background: var(--accent-soft); color: var(--ink); border-radius: 999px; padding: 2px 12px; font-size: 14px; font-weight: 700; }
.plan-points { margin: 0; padding-inline-start: 18px; }
.plan-card .field-group input { text-transform: uppercase; }

/* Stage games (docs/GAMEPLAY_PLAN.md §2): the account's games, a new game, and the control panel (phone or iPad). */
.games-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.games-head h2 { font-size: 20px; }
.games-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.games-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.code { font-family: var(--latin); font-weight: 800; letter-spacing: .12em; }
.big-code { font-size: 28px; color: var(--brand-ink); }
.game-new { max-width: 760px; width: 100%; margin-inline: auto; }
.game-new h1 { font-size: 28px; }
.game-new h2 { font-size: 20px; }
/* «ابدأ بسرعة» and the folded «إعدادات متقدمة» (GAMES_UNIFIED §3). */
.quick-facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.quick-facts li { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; min-width: 0; overflow-wrap: anywhere; }
.advanced-new > summary { list-style: none; justify-content: center; }
.advanced-new > summary::-webkit-details-marker { display: none; }
.advanced-new > summary::after { content: "▾"; margin-inline-start: 6px; }
.advanced-new[open] > summary::after { content: "▴"; }
.advanced-new[open] > summary { margin-bottom: 12px; }
.audience-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.audience-pick { display: grid; place-items: center; min-height: 64px; border: 1.5px solid var(--line); border-radius: 14px; font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none; }
.audience-pick.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
.cat-picks { display: flex; flex-direction: column; gap: 8px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 8px; }
.cat-pick { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; font-weight: 600; min-height: 48px; }
.cat-pick:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.cat-pick input, .cat-icon { flex: none; }
.cat-icon { width: 36px; height: 36px; border-radius: 9px; }
/* An empty list: its drawing (public/assets/img/empty-*.svg) above the sentence. */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.empty-state img { width: min(200px, 60%); height: auto; }
.empty-state p { margin: 0; }
.cat-pick input, .palette-opt input { width: 20px; height: 20px; accent-color: var(--brand); }
.team-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.lang-picks { display: flex; flex-wrap: wrap; gap: 10px; }
.lang-picks legend, .label-strong { font-weight: 700; margin-bottom: 6px; width: 100%; }

.panel { width: 100%; max-width: 980px; margin-inline: auto; display: flex; flex-direction: column; gap: 14px; }
.panel .card { padding: 18px; }
.panel-bar { position: sticky; top: 0; z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; background: var(--head); color: var(--on-head);
  border-radius: 16px; padding: 10px 12px; }
.panel-team { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--surface); color: var(--ink); border-radius: 12px; padding: 6px 12px;
  border: 2px solid transparent; min-width: 0; font-weight: 700; }
.panel-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-team strong { font-family: var(--display); font-size: 26px; color: var(--brand-ink); }
.panel-team.has-control { border-color: var(--accent); }
.panel-round { display: flex; flex-direction: column; align-items: center; font-weight: 800; text-align: center; font-size: 14px; }
.mult { background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 0 10px; }
.panel-hint { background: var(--brand-soft); color: var(--brand-ink); border-radius: 12px; padding: 8px 12px; font-weight: 600; }
.panel-question { font-size: 20px; line-height: 1.35; }
.panel-answers { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.panel-answers li, .panel-answers .act { display: block; margin: 0; }
.ans-tile { width: 100%; min-height: 58px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; border: 2px solid var(--line); border-radius: 14px;
  padding: 6px 10px; background: var(--surface); color: var(--ink); font: inherit; text-align: start; }
button.ans-tile { cursor: pointer; border-color: var(--brand); box-shadow: 0 3px 0 var(--brand-soft); }
button.ans-tile:active { transform: translateY(2px); box-shadow: none; }
.panel-answers li.shown .ans-tile { background: var(--ok-soft); border-color: var(--ok); }
.panel-answers li.shown .ans-done { grid-column: 3; grid-row: 1; }
.panel-answers li.shown .ans-points { display: none; }
.panel-answers li.locked .ans-tile { opacity: .55; }
.ans-n { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-family: var(--display); font-weight: 800; }
.ans-text { display: flex; flex-direction: column; min-width: 0; }
.ans-text small { font-size: 12px; line-height: 1.4; }
.ans-points { font-family: var(--display); font-weight: 800; font-size: 19px; color: var(--brand-ink); }
.ans-text strong { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.3; }
.ans-text small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ans-n { width: 26px; height: 26px; font-size: 14px; }
.ans-done { color: var(--ok); font-weight: 800; font-size: 20px; text-align: center; }
.act { display: inline; margin: 0; }
.dock-main { display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; }
.dock-main .act { flex: 1 1 0; display: flex; min-width: 0; }
.dock-main .act .btn { width: 100%; min-height: 52px; font-size: 15px; padding-inline: 8px; line-height: 1.25; }
/* The thumb dock (GAMES_UNIFIED §3): fixed at the bottom during play; the phase's step on top, «تراجع» and «المزيد» under it. */
.panel-foot.thumb-dock { position: fixed; z-index: 20; inset-inline: 0; bottom: 0; width: 100%; max-width: 980px; margin-inline: auto; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px;
  background: var(--surface); border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; box-shadow: 0 -6px 20px var(--brand-soft); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
.thumb-dock > .dock-main { grid-column: 1 / -1; }
.thumb-dock > .act .btn { min-height: 46px; }
.thumb-dock > .panel-sheet { grid-column: 2; }
.thumb-dock > .dock-main + .panel-sheet { grid-column: 1 / -1; }
.game-page .panel:has(> .thumb-dock) { padding-bottom: 150px; }
/* The question, the faceoff's count and «سؤال آخر» (Nasser 2026-11-23): the button beside the question on a wide
   screen; on a phone the question takes the whole line and the button is an icon on the count's row. */
.q-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "q swap" "count count"; align-items: start; gap: 6px 10px; }
.q-head .panel-question { grid-area: q; margin: 0; }
.q-head .faceoff-count { grid-area: count; }
.q-head .act { grid-area: swap; flex: none; }
/* The thumb dock's team buttons carry the team's name only; «ليست في القائمة» is an icon on a phone. */
.dock-main .act .btn.dock-icon { font-size: 22px; }
@media (max-width: 599px) {
  .q-head { grid-template-areas: "q q" "count swap"; align-items: center; }
  .q-head:not(:has(.q-swap)) .faceoff-count { grid-column: 1 / -1; }
  .q-head .q-swap { width: 44px; height: 44px; min-height: 44px; padding: 0; display: grid; place-items: center; font-size: 22px; border-radius: 50%; }
  .q-head .q-swap .btn-label, .dock-main .dock-icon .btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .game-page .panel-answers { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .game-page .ans-text strong { -webkit-line-clamp: 1; }
  .dock-main .act:has(.dock-icon) { flex: 0 0 64px; }
}
.panel .card.stack { gap: 10px; }
.btn.wrong { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.strikes { color: var(--bad); font-weight: 800; font-size: 26px; letter-spacing: .2em; }
/* The steal's clock on the panel (Nasser 2026-11-06): the seconds left for the stealing team, red in the last five. */
.steal-clock { margin: 0; display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.steal-clock .num { font-size: 26px; font-weight: 800; min-width: 2ch; text-align: center; }
.steal-clock.ending { background: var(--bad-soft); color: var(--bad); }
.bank { font-weight: 700; }
.bank strong { font-family: var(--display); font-size: 24px; color: var(--brand-ink); }
.lobby-steps { margin: 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 8px; }
.panel-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.screen-info { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.screen-info .code { font-size: 24px; color: var(--brand-ink); }
.more-tools { display: flex; flex-direction: column; gap: 8px; }
.more-tools[open] { flex-basis: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.more-tools summary { list-style: none; }
.more-tools summary::-webkit-details-marker { display: none; }
.fast-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.fast-head h2 { font-size: 20px; }
.fast-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.fast-q { font-weight: 700; }
.badge-shown { background: var(--ok-soft); color: var(--ok); border-radius: 999px; padding: 0 10px; font-size: 12px; margin-inline-start: 6px; }
.fast-choices { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip-btn { min-height: 44px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; padding: 0 14px; cursor: pointer; }
.chip-btn .num { font-family: var(--display); font-weight: 800; color: var(--brand-ink); }
.chip-btn.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.chip-btn.on .num { color: var(--on-brand); }
.chip-btn:disabled { cursor: default; opacity: .55; }
.chip-btn.on:disabled { opacity: 1; }
@media (max-width: 560px) {
  .panel { gap: 10px; }
  .panel .card { padding: 12px; }
  .panel-bar { grid-template-columns: 1fr 1fr; padding: 6px 8px; gap: 6px; border-radius: 14px; }
  .panel-team { padding: 4px 10px; }
  .panel-team strong { font-size: 22px; }
  .panel-question { font-size: 18px; }
  .panel-round { grid-column: 1 / -1; grid-row: 1; flex-direction: row; justify-content: center; gap: 8px; }
}
/* The code field (nhmsv USER_AUTH_FLOW.md §5أ): «أُرسل إلى», the message under the field, «إعادة الإرسال». No motion on error. */
.otp-sent bdi { font-weight: 700; }
.otp-resend { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.field-error { color: var(--bad); font-weight: 600; font-size: 14px; }
input[aria-invalid="true"] { border-color: var(--bad); }

/* The buzzers on the control panel */
.buzz-line { font-weight: 800; font-size: 18px; }
.buzz-line.has-first { background: var(--accent); color: var(--on-accent); border-radius: 12px; padding: 6px 12px; }
.trial-mark { display: inline-block; background: var(--warn-bg); color: var(--warn-ink); border-radius: 999px; padding: 0 10px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.bots-add > summary { list-style: none; width: fit-content; }
.bots-add > summary::-webkit-details-marker { display: none; }
.bots-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.bots-set { border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px 10px; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; min-width: 0; }
.bots-set legend { font-weight: 700; font-size: 14px; padding: 0 6px; }
.bots-set label { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.bots-form .note { margin: 0; }
.bots-now { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.bots-now p { margin: 0; }
.buzz-qr summary { cursor: pointer; font-weight: 700; color: var(--brand-ink); min-height: 44px; display: flex; align-items: center; }
.qr-pair { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.qr-card { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.qr-card img { width: min(200px, 60vw); height: auto; }

/* «كيف أدير اللعبة؟» */
.guide { display: flex; flex-direction: column; gap: 18px; }
.guide-toc { background: var(--brand-soft); border-radius: var(--radius); padding: 14px 18px; }
.guide-toc ol { margin: 0; padding-inline-start: 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 4px 18px; }
.guide-toc a { color: var(--brand-ink); font-weight: 700; }
.guide-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; scroll-margin-top: 16px; }
.guide-section ol { margin: 10px 0 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 8px; }
.games-head .row-actions { gap: 8px; }

/* «أسئلتي» */
.my-questions { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.my-questions .card { padding: 14px 16px; }
.answer-rows { display: flex; flex-direction: column; gap: 8px; }
.answer-row { display: grid; grid-template-columns: auto minmax(0, 2fr) 84px minmax(0, 2fr); gap: 8px; align-items: center; }
.points-input { text-align: center; }
@media (max-width: 560px) {
  .answer-row { grid-template-columns: auto minmax(0, 1fr) 72px; }
  .answer-row .aliases-input { grid-column: 2 / -1; }
}

/* The signed-in coordinator's side menu (Nasser 2026-11-03: «قائمة جانبية مثل باقي المنصات، ولكل منصة هويتها»): the
   panel's shape, this platform's colours (--side-* and the sunflower --accent in tokens.css, AA in tests/PaletteTest.php).
   On a phone it folds into a bar: brand and tools, then a row of links that scrolls sideways. */
.coord-page { background: var(--bg); }
.coord-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.coord-side { background: var(--side-bg); color: var(--side-ink); position: sticky; top: 0; z-index: 30; /* above the page, for the bell popover (§8.2) */ height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 22px 14px 18px; overflow-y: auto; }
.coord-brand { display: flex; align-items: center; gap: 10px; color: var(--side-ink); text-decoration: none; font-weight: 800; font-size: 21px; padding-inline: 8px; }
.coord-who { color: var(--side-muted); font-size: 13px; margin: 2px 8px 14px; }
.coord-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.coord-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-radius: 999px; color: var(--side-ink); text-decoration: none; font-weight: 700; }
.coord-nav a:hover { background: color-mix(in srgb, var(--side-ink) 12%, transparent); }
.coord-nav a.active { background: var(--accent); color: var(--on-accent); }
.coord-nav svg { flex: none; }
/* A computer shows the grouped side menu (.coord-desk); the five-place bar (.coord-nav) is the phone's. */
.coord-nav { display: none; }
.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(--side-ink); text-decoration: none; font-weight: 700; }
.coord-desk a:hover { background: color-mix(in srgb, var(--side-ink) 12%, transparent); }
.coord-desk a.active { background: var(--accent); color: var(--on-accent); }
.coord-desk svg { flex: none; }
.coord-desk .nav-new a { background: var(--brand); color: var(--on-brand); margin-block: 4px; }
.coord-desk .nav-new a:hover { background: var(--brand-deep); }
.coord-desk .nav-new a.active { background: var(--accent); color: var(--on-accent); }
.coord-group { margin: 16px 16px 4px; font-size: 12px; font-weight: 700; color: var(--side-muted); letter-spacing: .02em; }
/* «لعبة جديدة» stands out in the identity's colour on the side menu too. */
.coord-nav .nav-new a { background: var(--brand); color: var(--on-brand); margin-block: 4px; }
.coord-nav .nav-new a:hover { background: var(--brand-deep); }
.coord-nav .nav-new a.active { background: var(--accent); color: var(--on-accent); }
.coord-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-inline: 8px; }
.coord-plan { color: var(--side-muted); font-size: 13px; text-decoration: none; }
.coord-plan:hover { color: var(--side-ink); text-decoration: underline; }
.coord-tools { display: flex; gap: 8px; }
.coord-tools form { margin: 0; }
.coord-tools .icon-button { color: var(--side-ink); border-color: color-mix(in srgb, var(--side-ink) 35%, transparent); }
.coord-tools .icon-button:hover { background: color-mix(in srgb, var(--side-ink) 14%, transparent); color: var(--side-ink); }
.coord-version { color: var(--side-muted); font-size: 12px; margin: 0; }
.coord-bell { position: relative; }
.coord-badge { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--bad); color: var(--surface); font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }
/* The menu (☰): the language, «حسابي», «تسجيل الخروج» (GAMES_UNIFIED §3.1). Opens upward from the side menu's foot. */
.coord-tools { position: relative; }
.coord-menu { position: static; }
.coord-menu > summary { list-style: none; cursor: pointer; }
.coord-menu > summary::-webkit-details-marker { display: none; }
.coord-menu-list { position: absolute; bottom: calc(100% + 8px); inset-inline: 0; z-index: 30; display: flex; flex-direction: column;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgb(0 0 0 / .18); padding: 6px; }
.coord-menu-list a, .coord-menu-list button { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px;
  color: var(--ink); text-decoration: none; font: inherit; font-weight: 700; background: none; border: 0; width: 100%; text-align: start; cursor: pointer; }
.coord-menu-list a:hover, .coord-menu-list button:hover { background: var(--bg); }
.coord-menu-list form { margin: 0; border-top: 1px solid var(--line); padding-top: 4px; margin-top: 4px; }
.coord-menu-list .coord-menu-out { color: var(--bad); }
/* The bell's popover (GAMES_UNIFIED §8.2): 360px, min(360px, 100vw - 24px) on a phone; fixed, so the side menu's scroll
   box does not cut it. On a computer it rises above the bell at the menu's edge; on a phone it drops under the bar. */
.coord-menu-list.coord-notes { position: fixed; top: auto; bottom: 88px; inset-inline-start: 16px; inset-inline-end: auto; z-index: 40;
  width: min(360px, calc(100vw - 24px)); min-width: 0; max-height: calc(100vh - 120px); overflow-y: auto; padding: 12px; gap: 8px; white-space: normal; overflow-wrap: anywhere; }
.coord-notes-title { font-size: 16px; }
.coord-notes p { margin: 0; }
.coord-note { display: flex; flex-direction: column; gap: 2px; }
.coord-note.is-new b::before { content: '• '; color: var(--brand); }
.coord-menu-list a.coord-notes-all { justify-content: center; font-weight: 700; text-decoration: underline; }
.cnotify-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cnotify-list .is-new { border-inline-start: 4px solid var(--brand); }
.cnotify-new { display: inline-block; margin-inline-start: 6px; padding: 1px 8px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: 12px; vertical-align: middle; }
.coord-main { min-width: 0; padding: 32px clamp(16px, 4vw, 48px) 56px; display: flex; flex-direction: column; gap: 18px; }
.coord-main > .test-strip { margin: -32px calc(-1 * clamp(16px, 4vw, 48px)) 0; }
.coord-main .game-new { margin-inline: 0; }
@media (max-width: 860px) {
  .coord-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .coord-side { height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; align-content: start; gap: 8px; padding: 10px 12px 8px; z-index: 5; }
  .coord-who, .coord-version { display: none; }
  /* The plan as a small badge in the bar (§9.1); under 600px the bar stays one row: no name, no badge (it is in ☰). */
  .coord-plan { order: -1; border: 1px solid var(--side-muted); border-radius: 999px; padding: 4px 10px; font-size: 12px; white-space: nowrap; max-width: 30vw; overflow: hidden; text-overflow: ellipsis; }
  .coord-foot { flex-direction: row; align-items: center; }
  /* §18.5 (Nasser 2026-11-22): a page with the bottom tab bar shows no footer on a phone; its links are in «المزيد». */
  .coord-footer { display: none !important; }
  .coord-foot { margin: 0 0 0 0; margin-inline-start: auto; padding: 0; }
  .coord-side { overflow: visible; }
  .coord-menu { position: relative; }
  .coord-menu-list { bottom: auto; top: calc(100% + 8px); inset-inline-start: auto; inset-inline-end: 0; min-width: 220px; }
  .coord-menu-list.coord-notes { bottom: auto; top: 68px; inset-inline-start: auto; inset-inline-end: 12px; max-height: calc(100vh - 160px); }
  .coord-desk { display: none; }
  /* The five places as a bar fixed to the bottom (Nasser 2026-11-03), «لعبة جديدة» a raised round button. */
  .coord-nav { display: block; position: fixed; inset-inline: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 18px rgb(0 0 0 / .06); }
  .coord-nav ul { flex-direction: row; gap: 0; justify-content: space-around; align-items: flex-end; }
  .coord-nav li { flex: 1; display: flex; justify-content: center; }
  .coord-nav a { flex-direction: column; gap: 3px; padding: 6px 4px; border-radius: 14px; font-size: 12px; color: var(--muted); background: none; min-width: 58px; }
  .coord-nav a:hover { background: none; }
  .coord-nav a.active { background: none; color: var(--brand-ink); }
  .coord-nav a.active svg { background: var(--accent-soft); border-radius: 999px; padding: 2px 12px; width: 48px; box-sizing: content-box; }
  .coord-nav .nav-new a, .coord-nav .nav-new a:hover, .coord-nav .nav-new a.active { background: none; color: var(--brand-ink); margin-top: -28px; font-weight: 800; }
  .coord-nav .nav-new svg, .coord-nav .nav-new a.active svg { width: 58px; height: 58px; padding: 15px; box-sizing: border-box; border-radius: 50%; background: var(--brand); color: var(--on-brand);
    stroke-width: 2.8; box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 45%, transparent), 0 0 0 5px var(--surface); }
  .coord-main { padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }
  .coord-main > .test-strip { margin: -20px -16px 0; }
}

/* The control panel while an action is sent in the background (public/assets/panel.js): the tapped button pulses and
   the panel takes no second tap until the new panel is in place. */
.panel.is-busy form button { pointer-events: none; }
.panel .is-sending { opacity: .65; animation: sending .8s ease-in-out infinite alternate; }
@keyframes sending { from { opacity: .45; } to { opacity: .85; } }
@media (prefers-reduced-motion: reduce) { .panel .is-sending { animation: none; } }

/* The opening's limit (Nasser 2026-11-03): «كُشف 1 من 2», then the board locks until a team is given the round. */
.faceoff-count { margin: 0; font-weight: 700; color: var(--muted); }
.faceoff-count.is-full { color: var(--on-accent); background: var(--accent); border-radius: 12px; padding: 8px 12px; }
.ans-locked { min-width: 64px; text-align: center; font-size: 18px; opacity: .6; }

/* The fast round, one question at a time (Nasser 2026-11-03): player tabs, a strip of the five picks, the question
   with big answer buttons; player 1's answer is struck out for player 2. Works on a phone first. */
.fast-board { gap: 14px; }
.fast-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.fast-top .panel-hint { margin: 0; }
.fast-total { margin: 0; font-family: var(--display); font-weight: 800; font-size: 26px; color: var(--brand-ink); }
.fast-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fast-tabs .act, .fast-tabs .act button { width: 100%; }
.fast-tab { width: 100%; min-height: 48px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.fast-tab.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.fast-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.fast-strip .act, .fast-strip .act button { width: 100%; height: 100%; }
.strip-btn { width: 100%; min-height: 54px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); font: inherit; font-size: 12px; line-height: 1.3; padding: 4px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.strip-btn .num { font-family: var(--display); font-weight: 800; font-size: 16px; color: var(--ink); }
.strip-btn span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fast-strip li.done .strip-btn { color: var(--ink); background: var(--brand-soft); }
.fast-strip li.shown .strip-btn { border-color: var(--ok); }
.fast-strip li.on .strip-btn { border: 2.5px solid var(--brand); }
.fast-q-card { display: flex; flex-direction: column; gap: 10px; border: 1.5px solid var(--line); border-radius: 16px; padding: 14px; }
.fast-q-card .panel-question { margin: 0; }
.fast-answers { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 8px; }
.fast-ans { min-height: 58px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; padding: 8px 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: start; position: relative; }
.fast-ans small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.fast-ans .num { font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--brand-ink); }
.fast-ans.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.fast-ans.on .num, .fast-ans.on small { color: var(--on-brand); }
.fast-ans:disabled { cursor: default; }
.fast-ans.taken { opacity: .55; text-decoration: line-through; border-style: dashed; }
.taken-note { position: absolute; inset-block-start: -9px; inset-inline-end: 10px; background: var(--surface); padding: 0 6px; font-size: 11px; font-style: normal; text-decoration: none; color: var(--bad); }
.fast-other { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.fast-other .btn.on { outline: 3px solid var(--brand); outline-offset: 2px; }
.fast-nav { display: flex; justify-content: space-between; gap: 8px; }
.fast-tools { justify-content: center; }
.faceoff-next { display: block; margin-top: 2px; }
/* The screen's sound from the panel (Nasser 2026-11-03): mute or volume in four steps. */
.screen-sound { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.vol-steps { display: inline-flex; gap: 4px; }
.vol-btn { min-height: 40px; min-width: 52px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.vol-btn.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.screen-follow { display: flex; flex-direction: column; gap: 6px; }
.screen-follow p { margin: 0; }

/* «الرئيسية» (Nasser 2026-11-03): the plan card in the identity's deep blue, figures, open games, short ways. */
.page-title { font-size: 26px; margin: 0; }
/* «الرئيسية» (GAMES_UNIFIED §3.2, Nasser 2026-11-20): greeting with the mascot, four tiles, a small plan card, recent games. */
.dash-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--side-bg); color: var(--side-ink); border-radius: 22px; padding: 22px 20px; }
.dash-hero-text { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.dash-hero h1 { margin: 0; font-size: 28px; }
.dash-hero p { margin: 0; color: var(--side-muted); }
.dash-hero-new { gap: 8px; margin-top: 8px; background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.dash-hero-mascot { flex: none; display: grid; place-items: center; width: 104px; height: 104px; border-radius: 50%; background: color-mix(in srgb, var(--side-ink) 14%, transparent); }
.dash-hero-mascot img { border-radius: 18px; }
.dash-doors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dash-door { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; text-decoration: none; color: var(--ink); text-align: center; }
.dash-door strong { font-size: 13px; white-space: nowrap; }
.dash-door-ic { font-size: 28px; line-height: 1; }
.dash-plan-card { display: flex; flex-direction: column; gap: 8px; }
.dash-plan-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dash-plan-name { font-size: 20px; }
.dash-chip { background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 2px 12px; font-weight: 800; font-size: 13px; white-space: nowrap; }
.dash-plan-card p { margin: 0; }
.dash-plan-go { align-self: stretch; }
.dash-recent h2 { font-size: 18px; }
.dash-recent .games-head { flex-wrap: nowrap; }
.dash-all { font-weight: 700; color: var(--brand-ink); text-decoration: none; white-space: nowrap; }
.dash-games { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dash-game { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); }
.dash-game-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dash-state { flex: none; border-radius: 999px; padding: 2px 10px; font-size: 13px; background: var(--bg); color: var(--muted); }
.dash-state.is-live { background: var(--ok-soft); color: var(--ok); }
@media (max-width: 380px) { .dash-doors { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-hero-mascot { width: 80px; height: 80px; } .dash-hero-mascot img { width: 56px; height: 56px; } }
.ghost-on-dark { background: transparent; color: var(--side-ink); border-color: color-mix(in srgb, var(--side-ink) 40%, transparent); }
.dash-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 45%), 1fr)); gap: 10px; }
.dash-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px; }
.dash-tile strong { font-size: 26px; font-family: var(--display); color: var(--brand-ink); }
/* «ألعابي» (GAMES_UNIFIED §8.4): a tile with a value opens «ألعابي السابقة» with its filter; the pressed one is outlined. */
a.dash-tile { color: inherit; text-decoration: none; }
a.dash-tile:hover { border-color: var(--brand); }
a.dash-tile[aria-current="true"] { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.games-empty { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.games-empty p { margin: 0; }
.games-find { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.games-find input { min-height: 46px; min-width: 0; }
.games-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.games-filters .games-chip { padding: 0 10px; font-size: 14px; }
.games-chip.is-on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.games-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.games-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--brand); color: var(--brand-ink); text-decoration: none; font-weight: 700; }
.games-more { margin: 0; text-align: center; }

/* «المزيد» (like Busboard's): the account, grouped rows with an icon, folds that open in place. */
.mx-account { display: flex; align-items: center; gap: 14px; background: var(--side-bg); color: var(--side-ink); border-radius: 20px; padding: 16px 18px; }
.mx-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 800; font-size: 22px; }
.mx-who { display: flex; flex-direction: column; gap: 2px; }
.mx-head { font-size: 14px; color: var(--muted); margin: 6px 4px -6px; }
.mx-list { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.mx-version { text-align: center; margin: 4px 0 0; }
.mx-list > * + *, .mx-list > form + form { border-top: 1px solid var(--line); }
.mx-list form { margin: 0; }
.mx-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; background: none; border: 0; color: var(--ink); font: inherit; text-align: start; text-decoration: none; cursor: pointer; list-style: none; }
.mx-row::-webkit-details-marker { display: none; }
.mx-row:hover { background: var(--hover); }
.mx-list > * + .mx-row { border-top: 1px solid var(--line); } /* a line between every two rows, links and forms alike */
.mx-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; flex: none; }
.mx-ic svg { width: 18px; height: 18px; }
.mx-label { flex: 1; font-weight: 600; }
.mx-val { color: var(--muted); font-size: 13px; }
.mx-go { color: var(--muted); }
.mx-body { padding: 0 16px 16px; }
.mx-link { font-size: 14px; letter-spacing: 0; word-break: break-all; }
.mx-danger { color: var(--bad); }
.mx-danger .mx-ic { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }

/* «سجل اللعبة» (Nasser 2026-11-03): one line per action, the time, the round, what happened, the scores after it. */
.log-head { display: flex; flex-direction: column; gap: 4px; }
.log-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.log-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; padding: 10px 14px; }
.log-list li + li { border-top: 1px solid var(--line); }
.log-time { color: var(--muted); font-size: 13px; }
.log-round { background: var(--brand-soft); color: var(--brand-ink); border-radius: 999px; padding: 0 8px; font-size: 12px; font-weight: 700; }
.log-score { font-weight: 800; color: var(--brand-ink); white-space: nowrap; }
.log-list .log-undo { background: var(--warn-bg); }
.log-list .log-reveal .log-what, .log-list .log-control .log-what, .log-list .log-tiebreak_winner .log-what { font-weight: 600; }
.log-list .log-wrong .log-what { color: var(--bad); }

/* The fast round (Nasser 2026-11-03): the how-to under an icon at the bottom; a note when a player has answered all. */
.fast-help summary { cursor: pointer; color: var(--muted); font-size: 13px; list-style: none; }
.fast-help summary::-webkit-details-marker { display: none; }
.fast-done-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; background: var(--accent); color: var(--on-accent); border-radius: 14px; padding: 10px 12px; }
.panel-team.is-steal { border-color: var(--bad); }

/* The control panel fits the screen, no scrolling (Nasser: game screens fit the viewport): the page's footer is left
   out on this page, and everything that is not the play itself (buzzers, the screen's codes and sound, closing) is in
   one sheet that opens over the panel and scrolls inside itself. */
.game-page .foot { display: none; }
.game-page main.wrap { padding-block: 10px; }
.panel-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.panel-foot > .act { flex: 0 0 auto; }
.panel-sheet { flex: 1 1 auto; }
.panel-sheet > summary { list-style: none; width: 100%; justify-content: center; gap: 6px; }
.panel-sheet > summary::-webkit-details-marker { display: none; }
.panel-sheet > summary .code { font-size: 15px; }
.panel-sheet[open] > summary::before { content: ""; position: fixed; inset: 0; z-index: 30; background: var(--ink); opacity: .45; cursor: default; }
.panel-sheet-body { position: fixed; z-index: 31; inset-inline: 0; bottom: 0; max-height: 86dvh; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 12px;
  background: var(--bg); border-radius: 20px 20px 0 0; border-top: 1px solid var(--line); padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); max-width: 980px; margin-inline: auto; }
.panel-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-sheet-head h2 { margin: 0; font-size: 20px; }
/* The lobby (GAMES_UNIFIED §3): the next step, and at its side a small QR + code that opens the share sheet. */
.next-step { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.next-step-main { min-width: 0; }
.share-chip { list-style: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border: 1.5px solid var(--line); border-radius: 16px;
  background: var(--surface); cursor: pointer; text-align: center; min-width: 104px; }
.share-chip::-webkit-details-marker { display: none; }
.share-chip:hover, .share-chip:focus-visible { border-color: var(--brand); }
.share-chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.share-chip-qr { width: 72px; height: 72px; display: block; }
.share-chip-text { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.share-chip-code { font-size: 17px; color: var(--brand-ink); white-space: nowrap; }
.share-chip-more { font-size: 13px; font-weight: 800; color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
.share-sheet[open] > .share-chip::before { content: ""; position: fixed; inset: 0; z-index: 30; background: var(--ink); opacity: .45; cursor: default; }
.share-body { position: fixed; z-index: 31; inset-inline: 0; bottom: 0; max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 14px;
  background: var(--bg); border-radius: 20px 20px 0 0; border-top: 1px solid var(--line); padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); max-width: 640px; margin-inline: auto; }
.share-part { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.share-part h3 { margin: 0; font-size: 17px; }
.share-screen { border-top: 0; padding-top: 0; align-items: stretch; }
.share-qr { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.share-qr img { width: min(240px, 62vw); height: auto; border-radius: 12px; }
.share-qr figcaption { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.share-screen .mx-link { text-align: center; }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.share-actions > .btn, .share-actions > .gu-btn { flex: 1 1 140px; justify-content: center; }
.share-body .buzz-qr > summary { display: none; }
.share-body > .card h2 { font-size: 17px; margin: 0; }
.share-body > .card { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 12px 0 0; background: none; box-shadow: none; }
.result-card { align-items: center; text-align: center; }
.result-card .row-actions { justify-content: center; }
.result-art { width: 120px; height: 120px; }
.result-score { margin: 0; font-size: 20px; font-weight: 700; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: baseline; }
.result-score strong { font-family: var(--display); font-size: 30px; color: var(--brand-ink); }
.result-facts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 14px; }
/* Short screens (a phone held sideways, a small tablet): tighter, so the question, its answers and the buttons stay
   on one screen. */
@media (max-height: 760px) {
  .game-page .panel { gap: 8px; }
  .game-page .panel .card { padding: 10px 12px; }
  .game-page .panel-question { font-size: 17px; }
  .game-page .dock-main .act .btn { min-height: 46px; }
  .result-art { width: 84px; height: 84px; }
}

/* The fast round on one screen: answers side by side, tighter tabs and strip, the «finish» bar in the flow. */
.game-page .fast-board { gap: 8px; }
.game-page .fast-top { position: absolute; inset-inline-end: 16px; inset-block-start: 8px; }
.game-page .fast-board { position: relative; }
.game-page .fast-total { font-size: 18px; }
.game-page .fast-tabs { margin-inline-end: 96px; }
.game-page .fast-tab { min-height: 40px; }
.game-page .strip-btn { min-height: 42px; }
.game-page .fast-q-card { padding: 10px; gap: 8px; }
.game-page .fast-answers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.game-page .fast-ans { min-height: 46px; padding: 6px 10px; font-size: 15px; }
.game-page .fast-ans small { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 28vw; }
.game-page .fast-other .btn, .game-page .fast-nav .btn, .game-page .fast-tools .btn { min-height: 40px; padding-block: 6px; }
.game-page .fast-help { display: none; }
@media (max-height: 760px) {
  .game-page .panel-bar { padding-block: 4px; }
  .game-page .panel-hint { font-size: 13px; padding: 6px 10px; }
  .game-page .ans-text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .game-page .ans-tile { min-height: 50px; }
}
/* A phone held sideways: the site's header and the test strip give their room to the game. */
@media (max-height: 520px) {
  .game-page .top, .game-page .test-strip { display: none; }
  .game-page .panel-answers, .game-page .fast-answers { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.game-page .fast-other { grid-column: auto; align-items: stretch; }
.game-page .fast-other .btn { flex: 1 1 auto; }
.game-page .fast-q-card { position: relative; }
.game-page .fast-nav { position: absolute; inset-block-start: 4px; inset-inline-end: 8px; }
.game-page .fast-nav .btn { min-height: 34px; padding: 2px 10px; font-size: 13px; }
.panel-foot { flex-wrap: nowrap; }
.panel-sheet > summary { white-space: nowrap; overflow: hidden; }
@media (min-width: 900px) {
  .game-page .fast-answers { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .game-page .fast-ans small { max-width: 14vw; }
}
@media (max-height: 760px) {
  .game-page .panel-hint { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
  .game-page .next-step-main > .muted, .game-page .next-step-main > .small { display: none; }
  .game-page .next-step .btn { min-height: 42px; }
  .game-page .bank { margin: 0; }
}
@media (max-width: 380px) { .panel-sheet > summary .code { display: none; } }
@media (max-height: 760px) {
  .game-page .top-inner { padding-block: 4px; }
  .game-page .test-strip { font-size: 11px; padding-block: 1px; }
  .game-page main.wrap { padding-block: 6px; }
  .game-page .panel { gap: 6px; }
  .game-page .panel-team strong { font-size: 20px; }
  .game-page .ans-tile { min-height: 46px; }
  .game-page .panel-answers { gap: 6px; }
  .game-page .faceoff-count { margin: 0; font-size: 13px; }
  .game-page .fast-tab { min-height: 36px; }
  .game-page .strip-btn { min-height: 36px; }
  .game-page .strip-btn span:last-child { display: none; }
  .game-page .fast-ans { min-height: 40px; }
  .game-page .fast-q-card { padding: 8px; gap: 6px; }
  .game-page .fast-tools .btn { min-height: 38px; }
  .game-page .thumb-dock { padding-block: 6px calc(6px + env(safe-area-inset-bottom)); }
}
.game-page .panel-hint { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; font-size: 14px; }
.game-page .ans-tile { min-height: 52px; }
.game-page .panel .card.stack { gap: 8px; }
@media (min-width: 900px) { .game-page .panel-answers { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-height: 760px) {
  .game-page .ans-tile { min-height: 42px; padding-block: 2px; }
  .game-page .panel-hint { -webkit-line-clamp: 1; line-clamp: 1; }
  .game-page .fast-tools { display: grid; grid-template-columns: 1fr 1fr; }
  .game-page .fast-tools .act .btn { width: 100%; }
}

/* «لعبة جديدة» on one screen (Nasser: choices fit the viewport, no page scrolling): once the audience is picked its
   card shrinks to one row, and the categories scroll inside their own box so the teams and «ابدأ اللعبة» stay in view. */
.game-new:has(> form) { gap: 10px; }
.game-new:has(> form) .audience-picks { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.game-new:has(> form) .audience-pick { min-height: 40px; font-size: 15px; border-radius: 10px; }
.game-new:has(> form) > .card { padding: 12px 14px; gap: 8px; }
.game-new:has(> form) > .card h2 { font-size: 17px; margin: 0; }
.game-new:has(> form) > .page-title, .game-new:has(> form) > h1 { font-size: 20px; margin: 0; }
.game-new form .cat-picks > .muted.small { display: none; }
.game-new form .cat-grid { grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); max-height: max(124px, calc(100dvh - var(--new-fixed, 640px))); overflow-y: auto; overscroll-behavior: contain; padding: 2px; }
.game-new form .cat-pick { min-height: 42px; padding: 6px 10px; font-size: 14px; }
.game-new form .team-fields { grid-template-columns: 1fr 1fr; gap: 8px; }
.game-new form .lang-picks legend { margin-bottom: 2px; font-size: 14px; }
.game-new form .cat-picks h3.label-strong:has(+ p) { display: none; }
.game-new form .field-group label { font-size: 14px; }
.game-new form .lang-picks .palette-opt { min-height: 40px; }
@media (min-width: 900px) { .game-new form .cat-grid { --new-fixed: 560px; } }
@media (max-width: 899px) { .game-new form .cat-grid { --new-fixed: 675px; } }
@media (max-height: 760px) {
  .game-new > h1, .game-new > .page-title { font-size: 20px; margin: 0; }
  .game-new { gap: 8px; }
  .game-new > .card { padding: 12px 14px; gap: 8px; }
  .game-new .audience-pick { min-height: 48px; font-size: 17px; }
  .game-new .mine-start .muted { display: none; }
  .game-new:has(> form) > h1, .game-new:has(> form) > .page-title { display: none; }
  .game-new form .cat-picks .label-strong { display: none; }
  .game-new form .cat-grid { --new-fixed: 625px; max-height: max(88px, calc(100dvh - var(--new-fixed))); }
  .game-new form input { min-height: 40px; padding-block: 6px; }
  .game-new form .btn.wide { min-height: 46px; }
}

/* «إيصال الدفعة»: the payment's rows, label and value. */
.receipt-rows { margin: 0; display: flex; flex-direction: column; }
.receipt-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.receipt-rows > div:last-child { border-bottom: 0; }
.receipt-rows dt { color: var(--muted); }
.receipt-rows dd { margin: 0; font-weight: 700; text-align: end; }

/* Short phones (≤ 760 px high): during a game the site's header gives its room to the play, so the fast round fits
   too; the way out stays in «خيارات اللعبة» (the log, closing) and the browser's back. */
@media (max-height: 760px) {
  .game-page .top { display: none; }
  .game-page .fast-board { gap: 6px; }
}
/* A phone held sideways (≤ 520 px high): two columns, the question and its answers beside the action buttons, so the
   panel fits without scrolling. */
@media (max-height: 520px) and (min-width: 640px) {
  .game-page main.wrap { padding-block: 4px; }
  .game-page .panel { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 6px; align-items: start; max-width: none; }
  .game-page .panel > * { grid-column: 1; min-width: 0; }
  .game-page .panel > .panel-bar { grid-column: 1 / -1; position: static; grid-template-columns: 1fr auto 1fr; padding: 3px 8px; }
  .game-page .panel > .panel-bar .panel-round { grid-column: auto; grid-row: auto; }
  .game-page .panel > .alert, .game-page .panel > .note { grid-column: 1 / -1; margin: 0; }
  .game-page .panel > .card.stack, .game-page .panel > .fast-board { grid-row: 2 / span 4; }
  .game-page .panel > .panel-foot { grid-column: 2; }
  .game-page .panel > .panel-foot.thumb-dock { position: static; display: flex; padding: 0; border: 0; box-shadow: none; background: none; }
  .game-page .panel:has(> .thumb-dock) { padding-bottom: 0; }
  .game-page .thumb-dock > .dock-main { flex-direction: column; align-items: stretch; }
  .game-page .thumb-dock > .dock-main .act { flex: 0 0 auto; }
  .game-page .panel > .panel-foot { flex-direction: column; align-items: stretch; }
  .game-page .panel > .panel-foot > .act .btn, .game-page .panel-sheet > summary { width: 100%; min-height: 40px; }
  .game-page .panel .card { padding: 8px 10px; }
  .game-page .panel-question { font-size: 16px; }
  .game-page .ans-tile { min-height: 40px; }
  .game-page .panel-hint { -webkit-line-clamp: 1; line-clamp: 1; font-size: 12px; padding: 4px 8px; }
  .game-page .steal-clock { margin: 0; }
  .game-page .fast-tab, .game-page .strip-btn, .game-page .fast-ans { min-height: 32px; }
  .game-page .strip-btn span:last-child { display: none; }
  .game-page .fast-q-card { padding: 6px; gap: 4px; }
  .game-page .next-step h2, .game-page .result-card h2 { font-size: 18px; margin: 0; }
  .game-page .next-step-main > .muted, .game-page .next-step-main > .small, .game-page .result-art, .game-page .result-facts { display: none; }
  .game-page .next-step .btn, .game-page .result-card .btn { min-height: 36px; padding-block: 4px; }
  .game-page .big-code { font-size: 20px; }
  .game-page .panel-sheet-body, .game-page .share-body { max-height: 96dvh; }
}
@media (max-height: 520px) and (min-width: 640px) {
  /* three answers a row here, so an answer's words are never cut */
  .game-page .panel-answers { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .game-page .ans-tile { padding: 2px 8px; gap: 6px; }
  .game-page .ans-text strong { font-size: 14px; line-height: 1.2; }
  .game-page .fast-answers { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  .game-page .fast-ans { padding: 2px 8px; font-size: 14px; line-height: 1.2; }
  .game-page .fast-ans small { display: none; }
  .game-page .fast-tools .btn, .game-page .fast-other .btn { min-height: 34px; padding-block: 2px; }
  .game-page .fast-total { font-size: 15px; }
}

/* The screen entry (templates/tv/enter.php), one design for the «وش؟» family (Nasser 2026-11-15): full screen on the
   identity gradient, the QR view (steps beside a white card with the QR and the code) or the typed view. */
.tv-entry { min-height: 100dvh; display: grid; place-items: center; padding: clamp(16px, 4vw, 64px); box-sizing: border-box;
  background: linear-gradient(120deg, var(--side-bg), var(--brand) 55%, var(--brand-deep)); color: var(--on-brand); }
.tve-view[hidden] { display: none; }
.tve-qr-view { width: min(1160px, 100%); display: flex; flex-direction: column; align-items: center; gap: clamp(14px, 2.4vmin, 28px); text-align: center; }
.tve-idle-brand { display: flex; align-items: center; gap: 18px; }
.tve-idle-brand h1, .tve-code-view h1 { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(26px, 3.4vw, 44px); line-height: 1.25; }
.tve-icon { border-radius: 22%; flex: none; }
.tve-idle-line { margin: 0; font-weight: 800; font-size: clamp(20px, 3.4vmin, 40px); }
.tve-idle-type { font-size: clamp(15px, 2.6vmin, 30px); opacity: .85; }
.tve-host { display: inline-block; padding: 8px 20px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--on-brand) 40%, transparent);
  background: color-mix(in srgb, var(--on-brand) 12%, transparent); font-weight: 700; }
.tve-card { background: var(--surface); color: var(--ink); border-radius: 28px; padding: 24px 32px 28px; display: grid; justify-items: center; gap: 8px; }
.tve-qr { width: clamp(220px, 44vmin, 480px); height: auto; aspect-ratio: 1; }
.tve-code { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(40px, 8vmin, 96px); letter-spacing: .12em; color: var(--brand); min-height: 1.2em; }
.tve-status { margin: 0; min-height: 1.4em; font-weight: 700; color: var(--ok); text-align: center; }
.tve-code-view { width: min(640px, 100%); display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.tve-hint { margin: 0; color: color-mix(in srgb, var(--on-brand) 82%, transparent); font-size: clamp(15px, 1.6vw, 19px); }
.tve-form { width: 100%; display: grid; gap: 14px; }
.tve-code-view .code-input { background: var(--surface); color: var(--ink); border-color: transparent; }
.tve-code-view .btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.tve-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; }
.tve-link { min-height: 44px; border: 0; background: none; color: var(--on-brand); font: inherit; font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.tv-entry .alert { width: 100%; box-sizing: border-box; }
@media (max-width: 760px) {
  .tve-idle-brand { flex-direction: column; }
}

/* «ابدأ أول لعبة» (GAMES_PHASE2_SPEC §6): three cards on «الرئيسية» until the first finished game. */
.first-run { display: grid; gap: 12px; }
.first-run h2 { margin: 0; font-size: 20px; }
.first-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.first-step { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.first-step.now { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.first-step.done { opacity: .75; }
.first-num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: var(--on-brand);
  font-family: var(--latin, var(--font)); font-weight: 800; }
.first-step.done .first-num { background: var(--ok); }


/* «شارك» the result card (share-card.js, nhmsv GAMES_PHASE2_SPEC §4). */
.card-shares { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.card-shares .panel-hint { margin: 0; }
.share-card-btn:not([hidden]) { display: inline-flex; align-items: center; gap: 8px; }
.card-status { margin: 0; font-size: 14px; }

/* The landing page in the shared order (home.php, nhmsv GAMES_PHASE2_SPEC §5). */
.landing-shots { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); align-items: start; }
.landing-shot figure { margin: 0; display: grid; gap: 8px; }
.landing-shot img { display: block; width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.landing-shot.is-screen { grid-column: 1 / -1; }
@media (min-width: 900px) { .landing-shots { grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr) minmax(0, 1fr); align-items: center; } .landing-shot.is-screen { grid-column: auto; } }
.landing-shot.is-panel img, .landing-shot.is-card img { max-width: 320px; margin-inline: auto; }
.landing-shot figcaption { color: var(--muted); font-size: 15px; text-align: center; }
.landing-trial { margin: 0; }
.landing-plans { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.landing-plan h3 { margin: 0; font-size: 20px; }
.landing-plan .plan-price { margin: 0; }
.landing-faq { display: grid; gap: 10px; max-width: 820px; }
.landing-faq summary { cursor: pointer; font-weight: 800; }
.landing-faq details p { margin: 10px 0 0; }
.landing-end-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.landing-end-grid h3 { margin: 0; }
.landing-end-grid p { margin: 0; }

/* «فلان يريد الرجوع» on the panel (GAMES_UNIFIED §2.2). */
.rejoin-box { border: 2px solid var(--brand); border-radius: 16px; padding: 10px 12px; background: var(--brand-soft); }
.rejoin-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rejoin-item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rejoin-item span { flex: 1 1 160px; font-weight: 800; color: var(--brand-ink); }
/* «اللاعبون» (GAMES_UNIFIED §3 / §3.1, part F): each team's players; an away one faded with «غادر». */
.players-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; list-style: none; }
.players-head::-webkit-details-marker { display: none; }
.players-head h2 { margin: 0; }
.players-head::after { content: '▾'; color: var(--muted); }
.players-card[open] > .players-head::after { content: '▴'; }
.players-teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.players-teams[hidden] { display: none; }
.players-team h3 { margin: 0 0 6px; font-size: 1rem; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.players-team.team-a h3 > span:first-child { color: var(--brand-ink); }
.players-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.player-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; padding: 4px 8px; border-radius: 12px; background: var(--brand-soft); }
.players-team.team-b .player-row { background: var(--accent-soft); }
.player-row.away .player-emoji, .player-row.away .player-name { opacity: .5; }
.player-emoji { font-size: 1.4rem; line-height: 1; }
.player-name { flex: 1 1 80px; min-width: 0; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-away { font-size: .8rem; font-weight: 700; color: var(--muted); }
.player-remove summary { list-style: none; cursor: pointer; }
.player-remove summary::-webkit-details-marker { display: none; }
.player-remove[open] { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.players-all > summary { align-self: flex-start; }
/* «السماح لتطبيق «وش؟»» and «الأجهزة المرتبطة» (Http\AppPages, migration 022). */
.app-auth-list { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 4px; }
.auth-form .btn.wide + .btn.wide { margin-top: 8px; }
.device-list { list-style: none; margin: 0; padding: 8px 12px; display: grid; gap: 10px; }
.device-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.device-icon { font-size: 1.4rem; }
.device-text { flex: 1 1 160px; display: grid; min-width: 0; }
/* «حذف حسابي» (Accounts\AccountDeletion, migration 023). */
.delete-list { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 4px; }
.btn.danger { border-color: var(--bad); color: var(--bad); background: var(--bad-soft); }
/* «بياناتي» (nhmsv GAMES_UNIFIED §7): one compact card, a row per field, a sheet per change. */
.acc-card { display: grid; gap: 8px; }
.acc-card h2 { margin: 0; }
.acc-rows { list-style: none; margin: 0; padding: 0; }
/* The label small and grey above its value, the button at the end of both (GAMES_UNIFIED §8.10, as on Busboard/Jeoboard). */
.acc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label edit" "value edit"; align-items: center; gap: 2px 12px; padding: 12px 0; border-top: 1px solid var(--line); min-width: 0; }
.acc-label { grid-area: label; }
.acc-value { grid-area: value; }
.acc-edit { grid-area: edit; }
.acc-row:first-child { border-top: 0; }
.acc-label { color: var(--muted); font-size: .9rem; }
.acc-value { font-weight: 800; min-width: 0; display: flex; align-items: baseline; gap: 6px; }
/* A long e-mail or username stays on one line, cut with an ellipsis; the whole value is in its title (Coordinator). */
.acc-one { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-value > .acc-ok, .acc-value > .muted { flex: none; white-space: nowrap; }
.acc-value.muted { font-weight: 400; }
.acc-ok { color: var(--ok); font-weight: 700; font-size: .85rem; }
.acc-edit { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-size: 1.05rem; line-height: 1; } /* icon only, round (GAMES_UNIFIED §8.9) */
.acc-edit:hover { background: var(--brand-soft); }

.acc-sheet { border: 0; padding: 20px; border-radius: 20px; width: min(480px, calc(100vw - 32px)); background: var(--surface); color: var(--ink);
  box-shadow: 0 8px 0 var(--brand-soft); }
.acc-sheet[open] { display: grid; gap: 12px; }
.acc-sheet::backdrop { background: rgb(0 0 0 / .6); }
.acc-sheet:not(:modal)[open] { position: fixed; inset: auto 0 0; margin: 0 auto; z-index: 50; }
.acc-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.acc-sheet-head h2 { margin: 0; font-size: 1.15rem; }
.acc-close { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--ink); text-decoration: none; font-size: 1.1rem; }
.acc-close:hover { background: var(--brand-soft); }
.acc-remove { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.acc-remove .btn { justify-self: start; }
@media (max-width: 640px) {
  .acc-sheet { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 20px 20px 0 0; padding-bottom: max(20px, env(safe-area-inset-bottom)); }
}
/* Every code field (nhmsv GAMES_UNIFIED §1, Nasser 2026-11-21, the «وش؟» app's layout): the code in the middle, «لصق»
   inside one end and «مسح QR» inside the other, icons only, 44px to touch; the same on phones and computers. */
.code-box { position: relative; display: block; width: 100%; }
.code-box > input { width: 100%; box-sizing: border-box; text-align: center; padding-inline: 52px; min-height: 56px; }
.code-ic { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: 12px; background: transparent; color: var(--brand-ink); cursor: pointer; }
.code-ic[hidden] { display: none; }
.code-ic:hover { background: var(--brand-soft); }
.code-ic:focus-visible { outline: 3px solid var(--brand); outline-offset: 1px; }
.code-ic-scan { inset-inline-start: 6px; } /* «مسح QR» at the start (right in RTL), «لصق» at the end (Coordinator 2026-11-21) */
.code-ic-paste { inset-inline-end: 6px; }
.code-box > input { line-height: 1.2; padding-block: 12px; }

/* Offline bar and the footer under the coordinator's pages (GAMES_UNIFIED §9.1). */
.offline-bar { position: sticky; top: 0; z-index: 25; margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); font-weight: 700; text-align: center; }
.offline-bar[hidden] { display: none; }
.coord-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; margin-top: 32px; padding: 16px 0 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.coord-footer a { color: var(--muted); }
.coord-out { margin: 8px 0 0; }
.coord-out button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--side-ink); font: inherit; font-weight: 700; cursor: pointer; text-align: start; }
.coord-out button:hover { background: rgb(255 255 255 / .08); }
/* «ألعابي» (GAMES_UNIFIED §9.4): the running-game strip, «إنهاء اللعبة» under each open game; §9.5 «الإعدادات الافتراضية». */
.games-running { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); font-weight: 700; }
.games-running a { color: inherit; }
.games-end { list-style: none; margin-top: -4px; }
.games-end summary, .games-defaults summary { cursor: pointer; color: var(--bad); font-size: 14px; font-weight: 700; min-height: 32px; display: inline-flex; align-items: center; }
.games-defaults summary { color: var(--brand-ink); }
.games-end-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; }
.games-defaults p { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 0; }
@media (max-width: 599px) { .coord-plan { display: none; } }
/* The plan pill at the head of the ☰ menu (§9.1, for phones). */
/* §18.1: the ☰ head, «{الاسم} · منسق» and under it the plan as a small accent pill (not a full-width bar, not an outline). */
.coord-menu-list a.coord-menu-head { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 4px; padding: 10px 12px 8px; min-height: 0;
  border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0; margin-bottom: 4px; }
.coord-menu-who { font-weight: 700; font-size: 14px; color: var(--ink); }
.coord-menu-plan { display: inline-block; max-width: 100%; padding: 1px 9px; border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font-size: 12px; font-weight: 700; line-height: 1.6; }
/* «تكبير الخط» on the coordinator's pages (GAMES_UNIFIED §9.7) and the on/off switches of «المزيد». */
.mx-switch { margin-inline-start: auto; width: 40px; height: 24px; border-radius: 999px; background: var(--line); position: relative; flex: none; }
.mx-switch::after { content: ''; position: absolute; top: 3px; inset-inline-start: 19px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); transition: inset-inline-start .15s; }
[aria-pressed="true"] > .mx-switch { background: var(--brand); }
[aria-pressed="true"] > .mx-switch::after { inset-inline-start: 3px; } /* ON: brand track, knob at the leading end; OFF: grey, knob at the far end */
.mx-row[hidden] { display: none; }
.mx-note { cursor: default; margin: 0; }
.mx-note .mx-label { display: flex; flex-direction: column; gap: 2px; }

/* The plan's last 30 minutes on the panel (GAMES_UNIFIED §9.9). */
.plan-ending { margin: 0 0 10px; padding: 8px 12px; border-radius: 12px; background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); font-weight: 700; }
.plan-ending a { color: inherit; }

/* «كيف كانت اللعبة؟» (GAMES_UNIFIED §9.9): five stars, the chosen ones filled. */
.rate-row { display: grid; justify-items: center; gap: 4px; margin: 4px 0; }
.rate-title { margin: 0; font-weight: 800; }
.rate-stars { display: flex; gap: 4px; direction: ltr; }
.rate-star { width: 44px; height: 44px; border: 0; background: none; font-size: 30px; line-height: 1; color: var(--line); cursor: pointer; }
.rate-star.is-on { color: var(--accent); }
.rate-star:hover, .rate-star:focus-visible { color: var(--accent); }
/* «مشاركة النتيجة» (GAMES_UNIFIED §9.9): three round 56px icons with their names under them. */
.share-row { display: grid; gap: 8px; justify-items: center; }
.share-row-title { margin: 0; font-weight: 800; }
.share-row-icons { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.share-icon { display: grid; justify-items: center; gap: 6px; background: none; border: 0; padding: 0; color: var(--ink); font: inherit; cursor: pointer; }
.share-icon[hidden] { display: none; }
.share-icon-c { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); border: 1px solid var(--line); }
.share-icon:hover .share-icon-c { border-color: var(--brand); }
.share-icon-l { font-size: 13px; font-weight: 700; }

/* «ألعابي» tabs and «إحصاءاتي» (GAMES_UNIFIED §9.14). Bar heights as classes h0–h10 (no inline style). */
/* §18.3 (as Busboard): two pills, the chosen one filled in the brand colour. */
.games-tabs { display: flex; gap: 8px; margin: 0 0 14px; }
.games-tabs 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; }
.games-tabs a[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.stats-bars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; align-items: end; height: 190px; }
.stats-bars li { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.stats-bar { width: 70%; max-width: 48px; border-radius: 8px 8px 2px 2px; background: var(--brand); min-height: 3px; }
.stats-bar.h0 { height: 3px; background: var(--line); } .stats-bar.h1 { height: 10%; } .stats-bar.h2 { height: 20%; } .stats-bar.h3 { height: 30%; }
.stats-bar.h4 { height: 40%; } .stats-bar.h5 { height: 50%; } .stats-bar.h6 { height: 60%; } .stats-bar.h7 { height: 70%; } .stats-bar.h8 { height: 80%; }
.stats-bar.h9 { height: 90%; } .stats-bar.h10 { height: 100%; }
.stats-n { font-weight: 800; }
.stats-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; margin-top: 16px; }
.stats-list { margin: 0; padding-inline-start: 22px; display: grid; gap: 8px; }
.stats-list li span:first-child { font-weight: 700; margin-inline-end: 8px; }
/* «أسئلتي» CSV (GAMES_UNIFIED §9.14). */
.csv-box textarea { width: 100%; font-family: ui-monospace, monospace; font-size: 13px; }
.csv-preview { display: grid; gap: 8px; }
.csv-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.csv-pick[hidden] { display: none; }
.csv-pick input.visually-hidden { width: 1px; height: 1px; min-height: 0; padding: 0; border: 0; inset-inline-start: 0; } /* the general input width would make it page-wide */
.csv-pick { position: relative; }
.csv-pick-name { overflow-wrap: anywhere; }
.csv-errors, .csv-list { margin: 0; padding-inline-start: 22px; display: grid; gap: 4px; }

/* The visitor's header (nhmsv GAMES_UNIFIED §11, Nasser 2026-11-22): from 1100px the three links in the middle, the
   language and theme icons, «انضم للعبة» (outline) and «دخول المنسق» (filled); narrower only the name, a small filled
   «دخول» and ☰ (the three links, «انضم للعبة», language · theme · text size). */
.top-nav { display: flex; gap: 24px; flex: 1; justify-content: center; }
.top-nav a { color: inherit; text-decoration: none; font-weight: 700; white-space: nowrap; }
.top-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.top-links { align-items: center; }
.top-icons { display: inline-flex; gap: 8px; }
.top-join { color: inherit; font-weight: 700; line-height: 1; text-decoration: none; padding: 0 14px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1.5px solid currentColor; white-space: nowrap; }
.top-join:hover { background: var(--surface); color: var(--brand-ink); }
.top .top-account { background: var(--brand); border-color: var(--brand); color: var(--on-brand); padding: 0 16px; }
.top .top-account:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: var(--on-brand); }
.top-short-text { display: none; }
.top-menu { position: relative; }
.top-menu > summary { list-style: none; font-size: 20px; }
.top-menu > summary::-webkit-details-marker { display: none; }
.top-menu-list { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 30; width: min(300px, calc(100vw - 32px)); background: var(--head); color: var(--on-head);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, .18); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.top-menu-link { color: inherit; text-decoration: none; font-weight: 700; padding: 10px 8px; border-radius: 8px; }
.top-menu-link:hover { background: var(--surface); color: var(--brand-ink); }
.top-menu-list .top-join { margin-block: 6px; }
.top-menu-icons { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid currentColor; border-top-color: color-mix(in srgb, currentColor 25%, transparent); }
@media (min-width: 1100px) { .top-narrow { display: none; } }
@media (max-width: 1099.98px) {
  .top-wide { display: none; }
  .top .top-account { height: 38px; padding: 0 14px; font-size: 14px; }
  .top-wide-text { display: none; }
  .top-short-text { display: inline; }
}

/* Round 5 (nhmsv GAMES_UNIFIED §12). */
/* §12.1: the test strip's ✕. */
.test-strip { display: flex; align-items: center; justify-content: center; gap: 8px; position: relative; padding-inline: 44px; }
.test-strip[hidden] { display: none; }
.test-strip-x { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; border: 0; background: transparent; color: inherit; font-size: 14px; cursor: pointer; }
.test-strip-x:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
/* §12.2: one public container, as Busboard: at most 1160px including 24px gutters (content ≤1112px), the header's and
   footer's backgrounds full width; below 1160px full width with 24px gutters. The landing page's content uses it too. */
:root { --public-max: 1160px; }
.top-inner, .foot-inner { max-width: none; padding-inline: max(24px, calc((100% - var(--public-max)) / 2 + 24px)); }
.landing-page .wrap { max-width: var(--public-max); padding-inline: 24px; }
/* §12.3: one line, wrapping on a phone. */
.foot-links { align-items: center; gap: 8px 16px; }
.foot-links a { color: inherit; }
.foot-brand { text-decoration: none; }
.foot-end { display: inline-flex; align-items: center; gap: 12px; }
/* §12.9: ☰ round, 44px, as in the other games. */
.top-burger { border-radius: 50%; }

/* ==== «دخول المنسق» and «حساب منسق جديد» master design (nhmsv GAMES_UNIFIED §14, Nasser 2026-11-22; Feudboard the pilot):
   the same structure and sizes in the four games, as --auth-* variables of the same names. UI only: the forms, their
   fields and links are unchanged. Tajawal, title 800, labels 700, text 400. ==== */
:root {
  --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;
}
@media (max-width: 374.98px) { :root { --auth-side: 16px; } }
/* The public bar, 64px (§11, §14.4). */
.top-inner { min-height: var(--auth-bar-h); }
.wrap:has(> .auth-master) { padding-top: var(--auth-gap-top); padding-inline: var(--auth-side); gap: 0; }
.auth-master { max-width: var(--auth-card-max); gap: 0; }
.auth-master .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); }
.auth-master .auth-head { gap: 6px; }
.auth-master .auth-head img { width: var(--auth-icon); height: var(--auth-icon); border-radius: 12px; }
.auth-master .auth-head h1 { font-size: var(--auth-title); font-weight: 800; }
.auth-master .auth-head p, .auth-master .field-group label, .auth-master .label-row, .auth-master .muted.small, .auth-master .auth-sep { font-size: var(--auth-text); line-height: 1.5; }
.auth-master .auth-form { gap: var(--auth-field-gap); }
.auth-master .auth-form > .btn { margin-top: calc(var(--auth-section-gap) - var(--auth-field-gap)); }
.auth-master input:not([type="radio"]):not([type="checkbox"]) { box-sizing: border-box; height: var(--auth-input-h); min-height: var(--auth-input-h); border-radius: var(--auth-r); }
.auth-master .btn { box-sizing: border-box; height: var(--auth-btn2-h); min-height: var(--auth-btn2-h); border-radius: var(--auth-r); box-shadow: none; }
.auth-master .btn.primary { height: var(--auth-btn-h); min-height: var(--auth-btn-h); box-shadow: none; }
/* The eye inside the password field, at the same place in every game: 8px from the field's end, centred. */
.auth-master .pw-reveal { inset-inline-end: 8px; }
.auth-master .password-field input { padding-inline-end: 48px; }
/* The footer on a phone (nhmsv GAMES_UNIFIED §15): under 1100px one 52px row, name | «A+» ⓘ; ⓘ opens a sheet from the
   bottom with the links (44px rows) and the version. From 1100px the one-line footer (§12.3). */
.foot-m, .foot-sheet:not([open]) { display: none; }
@media (max-width: 1099.98px) {
  .foot-inner { display: none; }
  .coord-footer > a, .coord-footer > span:not(.foot-m-tools) { display: none; }
  .coord-footer { display: block; padding: 0; margin-top: 24px; }
  .foot-m { display: flex; align-items: center; justify-content: space-between; gap: 12px; box-sizing: border-box; height: 52px;
    padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); color: var(--muted); }
  .foot-m-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 15px; text-decoration: none; min-width: 0; }
  .foot-m-brand img { border-radius: 6px; flex: none; }
  .foot-m-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .foot-m-tools { display: inline-flex; gap: 8px; flex: none; }
  .foot-m-btn { box-sizing: border-box; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border-radius: 9px; border: 1px solid var(--line);
    background: var(--surface); color: var(--ink); font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; }
}
.foot-sheet { border: 0; padding: 0 16px max(16px, env(safe-area-inset-bottom, 0px)); margin: auto 0 0; width: 100vw; max-width: 100vw; box-sizing: border-box;
  background: var(--surface); color: var(--ink); border-radius: 18px 18px 0 0; box-shadow: 0 -12px 40px rgba(0, 0, 0, .25); transform: translateY(var(--drag, 0px)); }
.foot-sheet[open] { display: flex; flex-direction: column; max-height: 85dvh; }
.foot-sheet::backdrop { background: rgba(11, 20, 51, .45); }
.foot-sheet-grip { align-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 10px 0 4px; }
.foot-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0 8px; }
.foot-sheet-head h2 { margin: 0; font-size: 18px; }
.foot-sheet-x { width: 44px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: inherit; font-size: 16px; cursor: pointer; }
.foot-sheet-links { display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
.foot-sheet-links a { display: flex; align-items: center; min-height: 44px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 15px; }
.foot-sheet-version { margin: 0; padding-top: 12px; text-align: center; color: var(--muted); font-size: 13px; }
/* §19.4: «ادعُ عبر واتساب» and «نسخ الدعوة» under the code and the QR. */
.share-col { display: flex; flex-direction: column; align-items: stretch; gap: 8px; min-width: 0; }
.invite-row { display: flex; flex-direction: column; gap: 6px; }
.invite-row .gu-btn { justify-content: center; gap: 6px; white-space: nowrap; }
@media (max-width: 560px) {
  .next-step { grid-template-columns: minmax(0, 1fr); }
  .share-col { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .invite-row { flex: 1 1 160px; }

/* ==== «لعبة جديدة» on one page (nhmsv GAMES_UNIFIED §18.4, draft for Nasser; mockup new-game-2026-11-22.png). ==== */
.ng-page.game-new { max-width: 1120px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.ng-main { min-width: 0; gap: 14px; }
.ng-head h1 { margin: 0; }
.ng-head p { margin: 4px 0 0; }
.ng-quick { background: var(--surface); border: 2px solid var(--brand); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.ng-quick-title { margin: 0; }
.ng-facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ng-facts li { background: var(--brand-soft); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ng-facts span { font-size: 12px; color: var(--muted); }
.ng-facts strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ng-quick .btn.primary, .ng-dock .btn.primary, .ng-side .btn.primary, .ng-done.btn.primary { height: 48px; min-height: 48px; border-radius: 9px; box-shadow: none; }
.ng-or { font-size: 15px; margin: 6px 0 -4px; color: var(--muted); }
.ng-form { gap: 14px; }
.ng-rows { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.ng-row { border: 0; margin: 0; padding: 0; min-width: 0; }
.ng-rows > .ng-row + .ng-row { border-top: 1px solid var(--line); }
.ng-row > summary, .ng-seg-row { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 14px; cursor: pointer; list-style: none; box-sizing: border-box; }
.ng-row > summary::-webkit-details-marker { display: none; }
.ng-seg-row { cursor: default; justify-content: space-between; }
.ng-seg-legend { display: contents; }
.ng-seg-legend .ng-label { flex: 0 1 auto; }
.ng-ic { width: 22px; text-align: center; flex: none; }
.ng-label { flex: 1; font-weight: 700; }
.ng-val { color: var(--brand-ink); font-weight: 700; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ng-go { color: var(--muted); flex: none; }
.ng-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; margin-inline-start: auto; }
.ng-seg label { position: relative; }
.ng-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ng-seg span { display: block; padding: 7px 14px; font-weight: 700; font-size: 14px; }
.ng-seg input:checked + span { background: var(--brand); color: var(--on-brand); }
.ng-seg input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: -3px; }
.ng-sheet { display: flex; flex-direction: column; gap: 8px; padding: 4px 14px 14px; }
.ng-sheet-head { display: flex; align-items: center; justify-content: space-between; margin: 0; font-size: 17px; }
.ng-x { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: inherit; cursor: pointer; }
.ng-sheet-list { display: flex; flex-direction: column; }
.ng-opt { display: flex; align-items: center; gap: 10px; min-height: 48px; border-bottom: 1px solid var(--line); cursor: pointer; }
.ng-opt[hidden] { display: none; }
.ng-opt input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.ng-sub { margin: 10px 0 0; font-weight: 700; color: var(--muted); font-size: 13px; }
.ng-advanced { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.ng-advanced > summary { display: flex; justify-content: space-between; align-items: center; min-height: 52px; padding: 0 14px; font-weight: 700; cursor: pointer; list-style: none; }
.ng-advanced > summary::-webkit-details-marker { display: none; }
.ng-advanced > div { padding: 0 14px 14px; }
.ng-dock { display: flex; flex-direction: column; gap: 6px; }
.ng-plan { margin: 0; text-align: center; flex: none; }
.ng-dock-row { margin: 0; display: flex; justify-content: space-between; gap: 10px; min-width: 0; }
.ng-dock-line { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ng-side { display: none; }
.ng-back { display: none; }
.ng-backdrop { position: fixed; inset: 0; background: rgba(11, 20, 51, .45); z-index: 60; }
.ng-backdrop[hidden] { display: none; }
@media (max-width: 860px) {
  /* The bottom tab bar is hidden on this page; «‹ رجوع» starts the bar; the summary and the button stay at the bottom. */
  .ng-body .coord-nav { display: none; }
  .ng-body .coord-brand span { display: none; }
  .ng-body .coord-footer { display: none; }
  .ng-body .coord-main { padding-bottom: calc(132px + env(safe-area-inset-bottom)); }
  .ng-back { display: inline-flex; align-items: center; gap: 4px; order: -2; color: inherit; font-weight: 700; text-decoration: none; padding: 8px 4px; }
  .ng-dock { position: fixed; inset-inline: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line);
    padding: 8px 16px calc(10px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 18px rgb(0 0 0 / .08); }
  /* An open row is a sheet from the bottom over the backdrop. */
  .ng-row[open] > .ng-sheet { position: fixed; inset-inline: 0; bottom: 0; z-index: 61; max-height: 80dvh; overflow-y: auto; background: var(--surface);
    border-radius: 18px 18px 0 0; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); box-shadow: 0 -12px 40px rgba(0, 0, 0, .25); }
  .ng-sheet-open { overflow: hidden; }
}
@media (min-width: 861px) { .ng-x { display: none; } }
@media (min-width: 1100px) {
  /* The settings in one column, «ملخص اللعبة» fixed beside them; the bottom bar's job is the summary's. */
  .ng-page.game-new { grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; }
  .ng-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ng-dock { display: none; }
  .ng-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
  .ng-side h2 { margin: 0; font-size: 17px; }
  .ng-sum { margin: 0; }
  .ng-sum div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .ng-sum dt { color: var(--muted); }
  .ng-sum dd { margin: 0; font-weight: 700; color: var(--brand-ink); text-align: end; min-width: 0; overflow-wrap: anywhere; }
}

/* ---- The panel's play keys in the «وش؟» app's card style (Nasser 2026-11-23): a blue glass card with a diagonal
   streak of light across it, a thin light border and a soft glow; the number in a glowing yellow coin and the points in
   a yellow pill. A press sinks the key while a shine sweeps across it; the revealed answer turns green and pops;
   panel.js adds a short sound and a tick of vibration. Colours from tokens.css only. -------------------------------- */
.game-page button.ans-tile, .game-page .dock-main .btn, .game-page .q-swap {
  position: relative; overflow: hidden; isolation: isolate; -webkit-tap-highlight-color: transparent;
  transition: transform .08s ease-out, box-shadow .12s ease-out, filter .15s; }
/* The streak of light, fixed across the card as in the app. */
.game-page button.ans-tile::before, .game-page .dock-main .btn::before, .game-page .q-swap::before, .game-page .panel-answers li.shown .ans-tile::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: linear-gradient(115deg, transparent 18%, color-mix(in srgb, var(--surface) 32%, transparent) 30%, color-mix(in srgb, var(--surface) 8%, transparent) 38%, transparent 52%); }
/* The shine that runs across on a press. */
.game-page button.ans-tile::after, .game-page .dock-main .btn::after, .game-page .q-swap::after {
  content: ''; position: absolute; inset: -20% auto -20% -60%; width: 40%; pointer-events: none; transform: skewX(-20deg); opacity: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 70%, transparent), transparent); }
.game-page .is-pressed::after { animation: fb-shine .5s ease-out; }
@keyframes fb-shine { 0% { left: -60%; opacity: 1; } 100% { left: 125%; opacity: 0; } }

/* The answers: blue glass cards. */
.game-page .panel-answers .ans-tile { border-radius: 18px; }
.game-page button.ans-tile { color: var(--on-brand);
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 12%, var(--brand)) 0%, var(--brand) 45%, var(--brand-deep) 100%);
  border: 1px solid color-mix(in srgb, var(--surface) 45%, transparent);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--brand-deep) 35%, transparent), inset 0 1px 0 color-mix(in srgb, var(--surface) 35%, transparent); }
.game-page button.ans-tile .ans-text small { color: color-mix(in srgb, var(--on-brand) 75%, transparent); }
.game-page button.ans-tile:active, .game-page button.ans-tile.is-pressed { transform: translateY(2px) scale(.985);
  box-shadow: 0 3px 8px color-mix(in srgb, var(--brand-deep) 30%, transparent), inset 0 1px 0 color-mix(in srgb, var(--surface) 25%, transparent); filter: brightness(1.08); }
/* The number in a glowing yellow coin, the points in a yellow pill (as on the room screen). */
.game-page .ans-n { width: 32px; height: 32px; font-size: 15px; color: var(--on-accent);
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--surface) 45%, var(--accent)), var(--accent) 65%);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 55%, transparent); }
.game-page .ans-points { min-width: 46px; text-align: center; padding: 2px 10px; border-radius: 999px; font-size: 18px; color: var(--on-accent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 35%, var(--accent)), var(--accent));
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 45%, transparent); }
/* Revealed: green glass; locked (the faceoff is full): the glass dimmed. */
.game-page .panel-answers li.shown .ans-tile { position: relative; overflow: hidden; isolation: isolate; color: var(--on-brand); border: 1px solid color-mix(in srgb, var(--surface) 45%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 15%, var(--ok)), var(--ok) 55%, color-mix(in srgb, var(--ink) 25%, var(--ok)));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--ok) 30%, transparent); }
.game-page .panel-answers li.shown .ans-text small { color: color-mix(in srgb, var(--on-brand) 80%, transparent); }
.game-page .panel-answers li.shown .ans-done { color: var(--on-brand); }
.game-page .panel-answers li.just-shown .ans-tile { animation: fb-pop .55s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes fb-pop { 0% { transform: scale(.94); } 55% { transform: scale(1.03); } 100% { transform: scale(1); } }
.game-page .panel-answers li.locked .ans-tile { color: var(--muted); background: linear-gradient(135deg, var(--surface), var(--brand-soft)); border: 1px solid var(--line); box-shadow: none; opacity: .75; }

/* The dock: the teams as blue glass keys, «ليست في القائمة» red glass. */
.game-page .dock-main .btn { border-radius: 18px; border: 1px solid color-mix(in srgb, var(--surface) 40%, transparent); }
.game-page .dock-main .btn.primary { color: var(--on-brand);
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 12%, var(--brand)), var(--brand) 45%, var(--brand-deep));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--brand-deep) 35%, transparent), inset 0 1px 0 color-mix(in srgb, var(--surface) 35%, transparent); }
.game-page .dock-main .btn.wrong { color: var(--surface);
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 15%, var(--bad)), var(--bad) 50%, color-mix(in srgb, var(--ink) 30%, var(--bad)));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--bad) 35%, transparent), inset 0 1px 0 color-mix(in srgb, var(--surface) 35%, transparent); }
.game-page .dock-main .btn:active, .game-page .dock-main .btn.is-pressed { transform: translateY(2px) scale(.98); filter: brightness(1.1); }

/* «سؤال آخر»: a round blue glass key; the arrow turns once when pressed. */
.game-page .q-swap { color: var(--on-brand); border: 1px solid color-mix(in srgb, var(--surface) 45%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 12%, var(--brand)), var(--brand-deep));
  box-shadow: 0 6px 14px color-mix(in srgb, var(--brand-deep) 35%, transparent); }
.game-page .q-swap:active, .game-page .q-swap.is-pressed { transform: scale(.94); }
.game-page .q-swap.is-pressed > span[aria-hidden] { display: inline-block; animation: fb-turn .5s ease-out; }
@keyframes fb-turn { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .game-page .is-pressed::after, .game-page .panel-answers li.just-shown .ans-tile, .game-page .q-swap.is-pressed > span[aria-hidden] { animation: none; }
}
