/* The fonts and tokens.css are linked before this file by Http\Asset::stylesheets() (each with its own ?v=), not @import-ed. */

/* The public pages' layout. Colours come only from tokens.css. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; 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; }
img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-weight: 800; line-height: 1.25; text-wrap: balance; margin: 0 0 12px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Test strip (PLATFORM_MODES.md §2): thin, amber, drawn by the server, no close button. */
.test-strip { margin: 0; padding: 4px max(16px, env(safe-area-inset-right)) 4px max(16px, env(safe-area-inset-left)); background: var(--strip-bg); color: var(--strip-ink); font-size: 13px; text-align: center; }

/* Top bar: the plum band in both themes. */
.top { background: var(--brand); color: var(--on-brand); padding-top: env(safe-area-inset-top); }
.top-in { max-width: var(--content-max); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand img { border-radius: 9px; flex: none; }
.brand span { display: grid; min-width: 0; }
.brand strong { font-size: 20px; font-weight: 800; line-height: 1.2; }
.brand small { font-size: 13px; opacity: 0.85; }
.top-tools { display: flex; gap: 8px; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.28); background: transparent; color: inherit; cursor: pointer; padding: 0; }
.icon-btn:hover { background: rgba(255, 255, 255, 0.1); }
.icon-btn svg { width: 18px; height: 18px; }

/* Content widths (LAYOUT_WIDTH.md): pages up to 1920px centred; long text about 70 characters. */
main { flex: 1; width: 100%; }
main.wide { max-width: var(--content-max); margin-inline: auto; padding: 32px max(16px, env(safe-area-inset-right)) 48px max(16px, env(safe-area-inset-left)); display: grid; gap: 48px; }
main.narrow { padding: 32px max(16px, env(safe-area-inset-right)) 48px max(16px, env(safe-area-inset-left)); }
.prose { max-width: 70ch; margin-inline: auto; }
.prose.center { text-align: center; }

/* Landing hero with the board. */
.hero { display: grid; gap: 32px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.hero h1 { font-size: clamp(32px, 5vw, 52px); }
.lead { font-size: 19px; color: var(--muted); max-width: 46ch; }
.badge-soon { display: inline-block; margin-bottom: 14px; padding: 4px 14px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 14px; }
.board { background: var(--brand); border-radius: 22px; padding: 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 560px; width: 100%; justify-self: center; }
.board-cat { background: color-mix(in srgb, var(--cat) 55%, var(--brand)); color: #ffffff; border-radius: 10px; font-size: 13px; font-weight: 700; text-align: center; padding: 6px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-tile { display: grid; place-items: center; background: var(--tile); color: #ffffff; border-radius: 12px; font-weight: 800; font-size: clamp(16px, 2.6vw, 24px); padding-block: 14px; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.board-tile.is-picked { background: var(--accent); color: var(--on-accent); }
.board-tile.is-done { opacity: 0.3; }

.section h2 { font-size: 26px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); list-style: none; margin: 0; padding: 0; }
.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li b::before { content: counter(step); display: inline-grid; place-items: center; width: 30px; height: 30px; margin-inline-end: 10px; border-radius: 9px; background: var(--tile); color: #ffffff; font-weight: 800; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; min-width: 0; }
.card b { display: block; font-size: 18px; margin-bottom: 6px; }
.card p { margin: 0; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; text-decoration: none; font-family: inherit; font-size: 16px; cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 800; box-shadow: 0 5px 0 var(--accent-shadow); }
.btn.primary:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--accent-shadow); }

/* Footer */
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; padding-bottom: env(safe-area-inset-bottom); }
.foot-in { max-width: var(--content-max); margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding: 16px max(16px, env(safe-area-inset-right)) 16px max(16px, env(safe-area-inset-left)); }
.foot-links { display: flex; gap: 16px; }
.foot-version { font-variant-numeric: tabular-nums; font-family: var(--font-num); }

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

/* Coordinator accounts (nhmsv USER_AUTH_FLOW.md), the same screens as Feudboard: narrow centred forms, the code
   screen and the account page. Colours from tokens.css only. */
.stack { display: flex; flex-direction: column; gap: 14px; }
.small { font-size: 13px; }
.center { text-align: center; }
.top-account { color: inherit; font-weight: 700; text-decoration: none; padding: 0 12px; height: 36px; display: inline-flex; align-items: center; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.28); white-space: nowrap; }
.top-account:hover { background: rgba(255, 255, 255, 0.1); }
.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; margin: 0; }
.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(--accent); outline-offset: 1px; border-color: var(--accent); }
.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(--ink); }
.code-input { text-align: center; font-weight: 800; font-size: 28px; letter-spacing: .4em; }
.btn.wide { width: 100%; }
.btn.danger-text { color: var(--bad); }
.alert { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); color: var(--bad); border-radius: 12px; padding: 10px 14px; font-weight: 600; margin: 0; }
.alert a { color: inherit; }
.notice { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ink); border-radius: 12px; padding: 10px 14px; font-weight: 600; margin: 0; }
.note { background: var(--strip-bg); color: var(--strip-ink); border-radius: 12px; padding: 10px 14px; margin: 0; }
.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(--ink); text-decoration: underline; font: inherit; font-weight: 700; cursor: pointer; padding: 6px; }
.link-button:disabled { color: var(--muted); cursor: default; text-decoration: none; }
.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; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 16px; align-items: start; }
.account-grid h2 { font-size: 20px; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; }
main.account { max-width: var(--content-max); margin-inline: auto; }
@media (max-width: 420px) {
  .top-account { font-size: 14px; padding: 0 10px; }
  .brand strong { font-size: 18px; }
  .brand small { display: none; }
  .ta-full { display: none; }
  .ta-short { display: inline; }
}
.cookie-list { list-style: none; padding: 0; display: grid; gap: 8px; }
.cookie-list li { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.verify-phone b, [dir="ltr"] { unicode-bidi: isolate; }
.verify-phone b { direction: ltr; display: inline-block; }

/* ---- Live game, stage mode: the coordinator's control page ----------------------------------------------------- */
.game-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.game-list a { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; text-decoration: none; }
.state-pill { margin-inline-start: auto; font-size: 13px; padding: 2px 10px; border-radius: 999px; background: var(--line); }
.state-pill.state-finished { background: color-mix(in srgb, var(--ok) 18%, var(--surface)); }
.game-setup { width: 100%; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 6px 14px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 800; margin-bottom: 4px; }
select { width: 100%; min-height: 46px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); padding: 0 12px; font: inherit; }
.control { max-width: 720px; margin-inline: auto; display: flex; flex-direction: column; gap: 14px; }
.control-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.control-head h1 { margin: 0; font-size: 26px; }
.timer { min-width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--brand); color: var(--on-brand); font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.timer.is-low { background: var(--bad); }
.scores { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 8px; }
.scores li { background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 12px; display: grid; gap: 2px; }
.scores li.is-turn { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.scores b { font-size: 22px; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.powers { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 12px; font-weight: 600; cursor: pointer; }
.chip:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--surface)); }
.pick-board { display: grid; gap: 6px; background: var(--brand); padding: 8px; border-radius: 14px; }
.pick-board.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pick-board.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.pick-cat { color: #ffffff; background: color-mix(in srgb, var(--cat) 55%, var(--brand)); border-radius: 8px; font-size: 11px; font-weight: 700; text-align: center; padding: 4px 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-tile { min-height: 46px; border: 0; border-radius: 10px; background: var(--tile); color: #ffffff; font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.pick-tile:hover, .pick-tile:focus-visible { background: var(--accent); color: var(--on-accent); }
.pick-tile.is-played { background: transparent; border: 1px dashed color-mix(in srgb, var(--cat) 40%, transparent); cursor: default; }
.q-text { font-size: 20px; font-weight: 700; margin: 0; }
.answers { display: grid; gap: 8px; }
.answer { min-height: 52px; text-align: start; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.answer.is-correct { border-color: var(--ok); }
.answer.is-chosen { box-shadow: 0 0 0 2px var(--ink) inset; }
.answer:disabled { cursor: default; opacity: .55; }
.answer.is-correct:disabled { opacity: 1; }
.steal-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.power-pill { background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 1px 10px; font-weight: 800; }
.result { font-size: 18px; font-weight: 800; margin: 0; }
.result-correct, .result-steal_correct { color: var(--ok); }
.result-wrong, .result-timeout, .result-steal_wrong { color: var(--bad); }
.ranking { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ranking li { display: flex; gap: 12px; align-items: center; font-size: 18px; font-weight: 700; }
.ranking li span { margin-inline-start: auto; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.ranking .place-1 { color: var(--ok); }
.screen-link { overflow-wrap: anywhere; }
/* Contest mode: the join code, the players, the draw, the contestant's phone */
.mode-choice { align-items: flex-start; }
.mode-choice input { margin-top: 5px; }
.code-text { margin: 0; font-size: 40px; font-weight: 800; letter-spacing: .08em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; font-family: var(--font-num); unicode-bidi: isolate; }
.join-card { text-align: center; justify-items: center; }
.join-qr { background: #ffffff; border-radius: 12px; padding: 6px; max-width: 100%; height: auto; }
.names { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.names li { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 14px; font-weight: 700; background: var(--surface); }
.names li.is-me, .scores li.is-me, .draw-order li.is-me, .ranking li.is-me { outline: 2px solid var(--accent); outline-offset: 2px; }
form.inline { display: inline; }
.draw-order { margin: 0; padding-inline-start: 1.4em; display: grid; gap: 6px; font-size: 20px; font-weight: 800; }
.locked-code { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 6px 0; }
/* The game code in big digits (nhmsv GAMES_UNIFIED §2.3): typed, or locked from a link with the confirm line under it. */
.gu-code input.code-big { font-family: var(--font-num); font-size: 32px; font-weight: 800; letter-spacing: .14em; text-align: center; min-height: 64px; font-variant-numeric: tabular-nums; }
.gu-code input.code-big::placeholder { color: var(--muted); opacity: .5; }
.gu-code.code-locked input.code-big { background: color-mix(in srgb, var(--brand) 8%, var(--surface)); border-color: color-mix(in srgb, var(--brand) 25%, var(--line)); pointer-events: none; }
.join .gu-code-tools > * { flex: 1 1 0; justify-content: center; }
.join form .other-code a { margin-top: 0; }
.rejoin-link { text-align: center; margin: 0; }
.rejoin-link a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; }
.rejoin-other { display: none; margin-top: 16px; }
.rejoin-other:target { display: block; }
.gu-code .code-ok { margin: 0; color: var(--ok); font-weight: 600; }
.top-player .brand strong { font-size: 20px; }
.other-code a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; margin-top: 18px; }
.steal-btn { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-size: 20px; min-height: 56px; }
.answer.is-wrong { border-color: var(--bad); }
.screen-scores[hidden] { display: none; }
.screen-join { margin: auto; width: min(1500px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2vh 3vw; align-items: center; }
.screen-join-code { display: grid; gap: 1vh; }
.screen-join-label, .screen-join-url { margin: 0; font-size: 3vh; font-weight: 700; }
.screen-code { margin: 0; font-size: 14vh; font-weight: 800; letter-spacing: .06em; direction: ltr; text-align: start; font-variant-numeric: tabular-nums; font-family: var(--font-num); color: var(--accent); }
.screen-join-link { margin: 0; font-size: 2.4vh; direction: ltr; text-align: start; overflow-wrap: anywhere; opacity: .85; }
.screen-qr { background: #ffffff; border-radius: 2vh; padding: 1vh; width: 34vh; height: 34vh; }
.screen-names { grid-column: 1 / -1; list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1.2vh 1.2vw; }
.screen-names li { background: var(--tile); border-radius: 999px; padding: 1vh 2vw; font-size: 3.4vh; font-weight: 800; }
.screen-names .screen-none { background: transparent; opacity: .75; }
.screen-draw { margin: auto; display: grid; gap: 3vh; text-align: center; }
.screen-order { margin: 0; padding: 0; list-style-position: inside; display: grid; gap: 1.6vh; font-size: 5vh; font-weight: 800; }
.screen-auto { border: 2px dashed var(--accent); padding: .3vh 1.2vw; border-radius: 1vh; }
@media (max-width: 700px) { .screen-join { grid-template-columns: 1fr; } }

/* ---- The big screen (TV / projector): fills the screen, readable from across the room ------------------------- */
body.screen-page { min-height: 100dvh; background: var(--brand); color: #ffffff; }
.screen { height: 100dvh; overflow: hidden; display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 1.6vh; padding: 1.6vh 2vw; }
.screen-msg { min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 20px; text-align: center; font-size: 3vh; }
.screen-top { display: flex; align-items: center; gap: 14px; font-size: 3vh; min-height: 9vh; }
.screen-top img { border-radius: 10px; }
.screen-timer[hidden] { display: none; }
.screen-timer { margin-inline-start: auto; min-width: 9vh; height: 9vh; border-radius: 2vh; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: 5vh; font-weight: 800; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.screen-timer.is-low { background: var(--bad); color: #ffffff; }
.screen-scores { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14vw, 1fr)); gap: 1vw; }
.screen-scores li { background: var(--tile); border-radius: 1.5vh; padding: .8vh 1vw; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 1vw; border: 3px solid transparent; }
.screen-scores .screen-powers { grid-column: 1 / -1; }
.screen-scores li.is-turn { border-color: var(--accent); }
.screen-team { font-size: 2.6vh; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screen-score { font-size: 4vh; font-weight: 800; font-variant-numeric: tabular-nums; font-family: var(--font-num); direction: ltr; unicode-bidi: isolate; }
.screen-powers { font-size: 1.8vh; opacity: .85; }
.screen-stage { display: flex; flex-direction: column; gap: 1.4vh; min-height: 0; }
.screen-banner { margin: 0; text-align: center; font-size: 3vh; font-weight: 800; }
.screen-msg-text { margin: auto; font-size: 3.4vh; }
.screen-board { flex: 1; min-height: 0; display: grid; gap: 1vh; grid-template-rows: auto; grid-auto-rows: minmax(0, 1fr); }
.screen-board.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.screen-board.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.screen-cat { background: color-mix(in srgb, var(--cat) 55%, var(--brand)); border-radius: 1.2vh; display: grid; place-items: center; text-align: center; padding: 1vh .5vw; font-size: 2.4vh; font-weight: 800; }
.screen-tile { background: var(--tile); border-radius: 1.4vh; display: grid; place-items: center; font-size: 5.4vh; font-weight: 800; font-variant-numeric: tabular-nums; font-family: var(--font-num); min-height: 0; }
.screen-tile.is-played { background: transparent; border: 2px dashed color-mix(in srgb, var(--cat) 35%, transparent); }
.screen-question { margin: auto; width: min(1400px, 100%); display: grid; gap: 2vh; }
.screen-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 2vw; align-items: center; font-size: 3vh; }
.screen-value { background: var(--accent); color: var(--on-accent); padding: .4vh 1.4vw; border-radius: 1vh; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.screen-power { border: 2px solid var(--accent); padding: .3vh 1.2vw; border-radius: 1vh; }
.screen-q { margin: 0; font-size: 5vh; font-weight: 800; line-height: 1.3; }
.screen-steal { margin: 0; font-size: 3.4vh; font-weight: 800; color: var(--accent); }
.screen-options { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.2vh; }
.screen-option { background: var(--tile); border-radius: 1.6vh; padding: 1.4vh 2vw; font-size: 3.6vh; font-weight: 700; border: 4px solid transparent; }
.screen-option.is-removed { opacity: .25; text-decoration: line-through; }
.screen-option.is-correct { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 35%, var(--tile)); }
.screen-option.is-wrong { border-color: var(--bad); }
.screen-result { margin: 0; font-size: 3.6vh; font-weight: 800; }
.screen-final { margin: auto; display: grid; gap: 3vh; text-align: center; }
.screen-winner { margin: 0; font-size: 7vh; font-weight: 800; color: var(--accent); }
.screen-ranking { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.4vh; font-size: 4vh; }
.screen-ranking li { display: flex; gap: 2vw; justify-content: center; }
@media (prefers-reduced-motion: no-preference) { .screen-tile, .screen-option { transition: background .3s, border-color .3s; } }

/* ---- Plans and invoices (phase 5): «الباقات», «فواتيري» and one invoice. Colours from tokens.css only. ------------ */
.billing { width: 100%; max-width: 1100px; margin-inline: auto; display: flex; flex-direction: column; gap: 16px; }
.billing.auth { max-width: 640px; }
.billing-grid { display: grid; gap: 16px; align-items: start; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .billing-grid { grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr); } }
.plan-now.is-over { border-color: var(--bad); }
.plan-left { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; }
.plan-left li { display: flex; flex-direction: column; align-items: center; min-width: 84px; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.plan-left strong { font-size: 26px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.plan-left span { font-size: 13px; color: var(--muted); }
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { flex: 1; text-transform: uppercase; }
.plan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.plan-item.is-current { border-color: var(--accent); }
.plan-item.is-discounted { border-color: var(--ok); }
/* The shared plan card (nhmsv GAMES_PHASE2_SPEC §7): the name, then the length and the price, then three short points. */
.plan-name { font-size: 20px; font-weight: 800; }
.plan-meta { margin: 0; color: var(--muted); }
.plan-price { font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.plan-price strong { font-size: 20px; font-weight: 800; color: var(--ink); }
.plan-price s { color: var(--muted); font-size: 14px; }
.plan-points { margin: 0; padding-inline-start: 20px; display: grid; gap: 4px; }
.plan-badge { align-self: flex-start; padding: 2px 12px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 13px; }
.card .plan-saving { color: var(--ink); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
a.chip { text-decoration: none; }
.chip.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--surface)); }
.order-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.order-list a { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; text-decoration: none; }
.order-list a b { margin: 0; }
.order-list .is-dim { opacity: 0.7; }
.order-amount { margin-inline-start: auto; font-weight: 800; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.order-pill { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--line); color: var(--ink); }
.order-pill.tone-ok { background: color-mix(in srgb, var(--ok) 22%, var(--surface)); }
.order-pill.tone-bad { background: color-mix(in srgb, var(--bad) 18%, var(--surface)); color: var(--bad); }
.order-pill.tone-wait { background: var(--strip-bg); color: var(--strip-ink); }
.order-head { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.order-big { font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.order-receipt h1 { font-size: 22px; }
.order-receipt h2 { font-size: 17px; }

/* The signed-in coordinator's side menu (Nasser 2026-11-03: «قائمة جانبية مثل باقي المنصات، ولكل منصة هويتها», as on
   Feudboard): the panel's shape in this platform's colours (--side-* and the gold --accent in tokens.css, AA checked in
   tests/AdminTest.php). On a phone it folds into a bar: brand and tools, then a row of links that scrolls sideways. */
.coord-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100dvh; width: 100%; }
.coord-side { background: var(--side-bg); color: var(--side-ink); position: sticky; top: 0; height: 100dvh; 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-brand img { border-radius: 9px; flex: none; }
.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, .coord-nav .ic3 { flex: none; }
.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-btn { color: var(--side-ink); border-color: color-mix(in srgb, var(--side-ink) 35%, transparent); }
.coord-tools .icon-btn:hover { background: color-mix(in srgb, var(--side-ink) 14%, transparent); }
.coord-version { color: var(--side-muted); font-size: 12px; margin: 0; }
.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; }
@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: max(10px, env(safe-area-inset-top)) 12px 8px; z-index: 5; }
  .coord-who, .coord-plan, .coord-state, .coord-version { display: none; }
  .coord-foot { margin: 0; margin-inline-start: auto; padding: 0; }
  .coord-nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .coord-nav ul { flex-direction: row; gap: 6px; padding-block: 4px 2px; }
  .coord-nav a { padding: 8px 12px; white-space: nowrap; font-size: 14px; gap: 8px; }
  .coord-main { padding: 20px 16px 40px; }
  .coord-main > .test-strip { margin: -20px -16px 0; }
}

/* Five places (Nasser 2026-11-03, like Busboard and Feudboard): «لعبة جديدة» stands out in the identity's gold on the
   side menu, and on a phone the five sit in a bar fixed to the bottom with «لعبة جديدة» a raised round button. */
.coord-nav .nav-new a { background: color-mix(in srgb, var(--accent) 22%, transparent); margin-block: 4px; }
.coord-nav .nav-new a.active { background: var(--accent); color: var(--on-accent); }
@media (max-width: 860px) {
  .coord-nav { position: fixed; inset-inline: 0; bottom: 0; z-index: 20; order: 0; flex-basis: auto; overflow: visible; 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 / 0.08); }
  .coord-nav ul { flex-direction: row; gap: 0; justify-content: space-around; align-items: flex-end; padding: 0; }
  .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; white-space: nowrap; }
  .coord-nav a:hover { background: none; }
  .coord-nav a.active { background: none; color: var(--ink); }
  .coord-nav a .ic3 { width: 28px; height: 28px; padding: 2px 10px; box-sizing: content-box; border-radius: 999px; }
  .coord-nav a.active .ic3 { background: color-mix(in srgb, var(--accent) 35%, transparent); }
  .coord-nav .nav-new a, .coord-nav .nav-new a:hover, .coord-nav .nav-new a.active { background: none; color: var(--ink); margin-top: -28px; font-weight: 800; gap: 6px; }
  .coord-nav .nav-new .ic3, .coord-nav .nav-new a.active .ic3 { width: 58px; height: 58px; padding: 9px; box-sizing: border-box; border-radius: 18px; background: var(--brand);
    box-shadow: 0 6px 16px color-mix(in srgb, var(--accent-shadow) 55%, transparent), 0 0 0 5px var(--surface); }
  .coord-main { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
}

/* «الرئيسية»: the plan card in the side menu's colours, figures, open games. */
.page-title { font-size: 26px; margin: 0; }
/* «الرئيسية»'s top (Nasser 2026-11-18: «المساحات هنا كبيرة»): the greeting and the plan strip side by side on a
   computer, one under the other on a phone, each a single short row. */
.dash-plan { display: flex; align-items: center; gap: 12px; background: var(--side-bg); color: var(--side-ink); border-radius: 16px; padding: 10px 14px; min-width: 0; }
.dash-plan-main { display: flex; flex-direction: column; gap: 0; min-width: 0; flex: 1; line-height: 1.4; }
.dash-plan-title { font-size: 17px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.dash-plan-line { font-size: 13px; color: var(--side-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-plan-left { background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 0 10px; font-weight: 800; font-size: 12px; }
.dash-plan-acts { display: flex; gap: 8px; flex: none; }
.dash-plan-acts .btn { min-height: 36px; padding: 0 14px; font-size: 14px; }
.dash-plan .btn.dash-plan-btn { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.dash-plan .btn.ghost-on-dark { background: transparent; color: var(--side-ink); border-color: color-mix(in srgb, var(--side-ink) 40%, transparent); }
@media (max-width: 600px) { .dash-plan { flex-wrap: wrap; } .dash-plan-acts { width: 100%; } .dash-plan-acts .btn { flex: 1; } }
.dash-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 600px) {
  .dash-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dash-tile { padding: 8px 10px; }
  .dash-tile strong { font-size: 20px; }
}
.dash-tile { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; }
.dash-tile strong { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dash-head h2 { margin: 0; }

/* «المزيد» (like Busboard's): the account, grouped rows with an icon. */
.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; flex: none; }
.mx-who { display: flex; flex-direction: column; gap: 2px; }
.mx-head { font-size: 14px; color: var(--muted); margin: 6px 4px -10px; }
.mx-list { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.mx-list > * + * { 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; }
.mx-row:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.mx-ic { width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--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-danger { color: var(--bad); }
.mx-danger .mx-ic { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }

/* The control panel at one glance on a phone (Nasser 2026-11-03, as on Feudboard): scores in one row, answers in two
   columns (one per line on a phone, Nasser 2026-11-06), the turn's actions in one row, the screen link folded once the game has started. */
.control { gap: 10px; }
.control .card { padding: 14px 16px; }
.control-head h1 { font-size: 22px; }
.scores { display: flex; gap: 6px; overflow-x: auto; }
.scores li { flex: 1 0 auto; min-width: 92px; padding: 6px 10px; gap: 0; }
.scores li span { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scores b { font-size: 20px; }
.scores small { font-size: 11px; }
/* On a phone every option on its own line (Nasser 2026-11-06); two columns from a tablet up. */
.answers { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .answers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.answer { min-height: 56px; padding: 8px 12px; font-size: 15px; }
.q-text { font-size: 18px; }
.turn-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.turn-actions:empty { display: none; }
.turn-actions > form { flex: 1 1 auto; margin: 0; }
.turn-actions .steal-row { flex: 2 1 auto; }
.screen-card > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
.screen-card > summary::-webkit-details-marker { display: none; }
.screen-card > summary::after { content: '⌄'; color: var(--muted); }
.screen-card[open] > summary::after { content: '⌃'; }
.screen-card > summary h2 { margin: 0; font-size: 17px; }
.pick-tile { min-height: 42px; }
/* A computer shows the grouped side menu (.coord-desk, every place, no «المزيد»); the five-place bar (.coord-nav) is
   the phone's (Nasser 2026-11-03, as on Feudboard). */
.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, .coord-desk .ic3 { flex: none; }
/* On the computer «لعبة جديدة» is the home page's own button, not a menu row (Nasser 2026-11-18); phones keep it in the bar. */
.coord-desk .nav-new { display: none; }
.coord-group { margin: 16px 16px 4px; font-size: 12px; font-weight: 700; color: var(--side-muted); }
@media (max-width: 860px) {
  .coord-desk { display: none; }
  .coord-nav { display: block; }
}

/* «المزيد» folds that open in place (the following screen's link). */
.mx-fold > summary { list-style: none; }
.mx-fold > summary::-webkit-details-marker { display: none; }
.mx-body { padding: 0 16px 16px; }

/* Sound and motion on the big screen (Nasser 2026-11-03, as on Feudboard): the tap that allows sound, scores that
   count up, the team whose turn it is pulsing, the question coming in, a correct or wrong answer, and confetti for the
   winner. None with reduced motion. The panel's «صوت الشاشة»: mute and the volume in steps of 25. */
/* The screen's small notes sit in the empty middle of the top bar, never over the board or the ranking (Coordinator
   2026-11-13): «اضغط هنا لتشغيل الصوت» until sound runs, and «اتصال ضعيف…» while the screen gets no answer. */
.screen-notes { position: fixed; top: 2.2vh; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 1vw; max-width: 46vw; pointer-events: none; }
.screen-notes > * { pointer-events: auto; }
.sound-unlock { border: 0; border-radius: 999px; padding: .8vh 1.4vw; background: var(--accent); color: var(--on-accent); font: inherit; font-size: 1.9vh; font-weight: 800; line-height: 1.4; white-space: nowrap; cursor: pointer; box-shadow: 0 .6vh 2vh rgb(0 0 0 / .3); }
.sound-unlock:focus-visible { outline: .4vh solid #ffffff; outline-offset: .3vh; }
.sound-unlock[hidden], .screen-weak[hidden] { display: none; }
.screen-weak { margin: 0; display: inline-flex; align-items: center; gap: .6vw; border-radius: 999px; padding: .8vh 1.4vw; background: var(--bad); color: #ffffff; font-size: 1.9vh; font-weight: 800; line-height: 1.4; white-space: nowrap; }
.screen-weak .follow-dot { background: #ffffff; }
.screen-score.is-bump { color: var(--accent); }
.screen-scores li.is-turn { animation: turn-pulse 1.6s ease-in-out infinite; }
.screen-question { animation: q-in .45s ease-out both; }
.screen-option.is-correct { animation: right-pop .5s ease-out both; }
.screen-option.is-wrong { animation: wrong-shake .45s ease-in-out both; }
@keyframes turn-pulse { 50% { box-shadow: 0 0 0 .6vh color-mix(in srgb, var(--accent) 45%, transparent); } }
@keyframes q-in { from { opacity: 0; transform: scale(.94) rotateX(25deg); } to { opacity: 1; transform: none; } }
@keyframes right-pop { 40% { transform: scale(1.06); } }
@keyframes wrong-shake { 20%, 60% { transform: translateX(-1vw); } 40%, 80% { transform: translateX(1vw); } }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 40; }
.confetti-bit { position: absolute; top: -4vh; inset-inline-start: var(--x); width: 1.2vh; height: 2vh; border-radius: .3vh; animation: confetti-fall 3s var(--d) ease-in both; }
.confetti-bit.c0 { background: var(--accent); }
.confetti-bit.c1 { background: #ffffff; }
.confetti-bit.c2 { background: var(--cat); }
.confetti-bit.c3 { background: var(--accent-shadow); }
@keyframes confetti-fall { to { transform: translateY(110vh) rotate(var(--r)); } }
@media (prefers-reduced-motion: reduce) {
  .screen-scores li.is-turn, .screen-question, .screen-option.is-correct, .screen-option.is-wrong { animation: none; }
  .confetti { display: none; }
}
.screen-sound { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.screen-sound form { margin: 0; }
.vol-steps { display: inline-flex; gap: 4px; }
.vol-btn { min-width: 52px; min-height: 36px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.vol-btn.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* «سجل اللعبة»: one card per action, the time and who did it on top. */
.log-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.log-row { display: grid; gap: 4px; padding: 12px 16px; }
.log-row p { margin: 0; }
.log-meta { display: flex; gap: 10px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.log-actor { margin-inline-start: auto; }
.log-what { font-weight: 700; }
.log-answer, .log-timeout { border-inline-start: 4px solid var(--line); }
.log-end { border-inline-start: 4px solid var(--accent); }
.game-log-link { margin-inline-start: 4px; }
.game-list li.card { display: grid; gap: 6px; }

/* ---- The showcase (docs/SHOWCASE_PLAN.md, Nasser 2026-11-05) ------------------------------------------------------
   Team colours (tokens.css --team-1 … --team-6) by the team's place in the turn order. On the big screen: the picked
   square flashes, then panels in the middle: the announcement (team, category, value, power), «3، 2، 1», the result
   with each team's points, and «الدور الآن على». The options come in one by one after the announcement. On a phone and
   the coordinator's panel: a small announcement card and the result card. With reduced motion the panels show still. */
.team-1 { --team: var(--team-1); }
.team-2 { --team: var(--team-2); }
.team-3 { --team: var(--team-3); }
.team-4 { --team: var(--team-4); }
.team-5 { --team: var(--team-5); }
.team-6 { --team: var(--team-6); }
.screen-tile.is-picked { background: var(--team); color: #ffffff; animation: tile-flash .5s steps(2, jump-none) 2 both, tile-grow .4s .8s ease-in both; position: relative; z-index: 5; }
@keyframes tile-flash { 0%, 100% { background: var(--team); } 50% { background: #ffffff; color: var(--team); } }
@keyframes tile-grow { to { transform: scale(1.35); box-shadow: 0 0 0 1.2vh color-mix(in srgb, var(--team) 45%, transparent); } }
.screen-who { background: var(--team); color: #ffffff; padding: .4vh 1.4vw; border-radius: 1vh; font-weight: 800; }
.show { position: fixed; inset: 0; z-index: 30; display: grid; place-content: center; justify-items: center; gap: 1.6vh; text-align: center; padding: 4vh 4vw; color: #ffffff;
  background: radial-gradient(circle at center, color-mix(in srgb, var(--team, var(--brand)) 92%, #000000) 0%, color-mix(in srgb, var(--team, var(--brand)) 55%, var(--brand)) 70%); animation: show-in .35s ease-out both; }
.show p { margin: 0; }
.show-who { font-size: 4.4vh; font-weight: 800; }
.show-cat { font-size: 5vh; font-weight: 700; opacity: .92; }
.show-value { font-size: 22vh; line-height: 1; font-weight: 900; font-variant-numeric: tabular-nums; font-family: var(--font-num); direction: ltr; text-shadow: 0 1vh 4vh rgb(0 0 0 / .35); }
.show-power { font-size: 4vh; font-weight: 800; border: .4vh solid rgb(255 255 255 / .55); border-radius: 999px; padding: .6vh 2.4vw; }
.show-power.has-power { background: var(--accent); color: var(--on-accent); border-color: var(--accent); animation: power-pop .5s .7s ease-out both; }
.show-note { font-size: 3vh; opacity: .9; }
.show-number { font-size: 40vh; line-height: 1; font-weight: 900; animation: count-pop .6s ease-out both; }
.show-title { font-size: 11vh; font-weight: 900; line-height: 1.1; animation: count-pop .5s ease-out both; }
.show-points { display: flex; gap: 2vw; align-items: baseline; font-size: 5vh; font-weight: 800; }
.show-points b { font-variant-numeric: tabular-nums; font-family: var(--font-num); direction: ltr; unicode-bidi: isolate; }
.show-points b.is-up { color: var(--accent); }
.show-points b.is-down { color: #ffd1dc; }
.show-result.result-wrong, .show-result.result-timeout { background: radial-gradient(circle at center, color-mix(in srgb, var(--bad) 80%, #000000) 0%, var(--brand) 75%); }
.show-result.result-wrong .show-title, .show-result.result-timeout .show-title { animation: wrong-shake .5s ease-in-out both; }
.show-result { animation: show-in .35s ease-out both, show-out .5s 4.6s ease-in both; }
.show-turn .show-name { font-size: 12vh; font-weight: 900; animation: count-pop .5s ease-out both; }
@keyframes show-in { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: none; } }
@keyframes show-out { to { opacity: 0; visibility: hidden; } }
@keyframes count-pop { from { opacity: 0; transform: scale(.5); } 60% { transform: scale(1.12); } to { opacity: 1; transform: none; } }
@keyframes power-pop { from { transform: scale(.4) rotate(-8deg); } 70% { transform: scale(1.15); } to { transform: none; } }
.screen-question.is-staged { animation: none; }
.screen-question.is-staged .screen-q { animation: q-in .45s ease-out both; }
.screen-question.is-staged .screen-option { animation: opt-in .4s ease-out both; }
.screen-question.is-staged .opt-1 { animation-delay: .35s; }
.screen-question.is-staged .opt-2 { animation-delay: .7s; }
.screen-question.is-staged .opt-3 { animation-delay: 1.05s; }
@keyframes opt-in { from { opacity: 0; transform: translateY(2vh); } to { opacity: 1; transform: none; } }
.screen-option.is-chosen { border-color: #ffffff; animation: chosen-glow .5s ease-in-out infinite alternate; }
@keyframes chosen-glow { to { box-shadow: 0 0 0 .8vh rgb(255 255 255 / .35); } }
.confetti.team-1 .confetti-bit.c0, .confetti.team-1 .confetti-bit.c2,
.confetti.team-2 .confetti-bit.c0, .confetti.team-2 .confetti-bit.c2,
.confetti.team-3 .confetti-bit.c0, .confetti.team-3 .confetti-bit.c2,
.confetti.team-4 .confetti-bit.c0, .confetti.team-4 .confetti-bit.c2,
.confetti.team-5 .confetti-bit.c0, .confetti.team-5 .confetti-bit.c2,
.confetti.team-6 .confetti-bit.c0, .confetti.team-6 .confetti-bit.c2 { background: var(--team); }
.confetti { z-index: 45; }
@media (prefers-reduced-motion: reduce) {
  .show, .show-result, .show-number, .show-title, .show-power.has-power, .show-turn .show-name, .screen-tile.is-picked,
  .screen-question.is-staged .screen-q, .screen-question.is-staged .screen-option, .screen-option.is-chosen { animation: none; }
}

/* On a phone and the coordinator's panel: the announcement card while the showcase runs, and the result card. */
.card.intro-card { background: var(--team, var(--brand)); border-color: transparent; color: #ffffff; text-align: center; gap: 8px; }
.card.intro-card p, .card.phone-result p { margin: 0; color: #ffffff; }
.card.intro-card b, .card.phone-result b { display: inline; font-size: inherit; margin: 0; }
.intro-card .intro-value { font-size: 56px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; font-family: var(--font-num); direction: ltr; }
.intro-card .intro-power { align-self: center; background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 4px 14px; font-weight: 800; }
.intro-card .intro-wait { opacity: .85; font-size: 14px; }
.card.phone-result { text-align: center; color: #ffffff; background: var(--team, var(--brand)); border-color: transparent; gap: 6px; animation: show-in .35s ease-out both; }
.phone-result .phone-result-title { font-size: 34px; font-weight: 900; }
.phone-result .phone-result-points { font-size: 26px; font-weight: 800; direction: ltr; unicode-bidi: isolate; }
.card.phone-result.result-wrong, .card.phone-result.result-timeout { background: var(--bad); }
.phone-result.result-wrong .phone-result-title, .phone-result.result-timeout .phone-result-title { animation: wrong-shake .5s ease-in-out both; }
.your-turn { animation: turn-pulse 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .phone-result, .phone-result .phone-result-title, .your-turn { animation: none; } }

/* Showcase «ب» (docs/SHOWCASE_PLAN.md): the ring around the screen's timer (gold, orange at half, red and shaking in the
   last five), the scores sliding to their order with a crown and «🔥», the shield of «حماية», the removed option
   cracking, the value growing with «مضاعفة» and «حظ», the steal alarm, the squares a team took in its colour, and
   «بقي n» near the end. */
@property --left { syntax: "<number>"; inherits: false; initial-value: 1; }
.screen-timer { --left: 1; --ring: var(--accent); position: relative; border-radius: 50%; min-width: 11vh; width: 11vh; height: 11vh; color: #ffffff; background: conic-gradient(var(--ring) calc(var(--left) * 360deg), rgb(255 255 255 / .14) 0); transition: --left .9s linear; }
.screen-timer::before { content: ''; position: absolute; inset: 1vh; border-radius: 50%; background: var(--brand); z-index: 0; }
.screen-timer { isolation: isolate; }
.screen-timer::before { z-index: -1; }
.screen-timer.is-mid { --ring: var(--orange); }
.screen-timer.is-low { --ring: var(--bad); background: conic-gradient(var(--ring) calc(var(--left) * 360deg), rgb(255 255 255 / .14) 0); color: #ffffff; animation: timer-shake .5s ease-in-out infinite; }
@keyframes timer-shake { 25% { transform: rotate(-6deg) scale(1.06); } 75% { transform: rotate(6deg) scale(1.06); } }
.screen-scores li { position: relative; }
.screen-scores li.is-moving { transform: translateX(var(--fx, 0)); }
.screen-scores li.is-sliding { transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.screen-scores li.is-lead { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.screen-scores li.is-crowned { animation: crown-pop .7s ease-out both; }
.screen-scores li.is-shielded::after { content: '🛡️'; position: absolute; inset-block-start: -1.4vh; inset-inline-end: -0.6vw; font-size: 4vh; animation: shield-pulse 1.2s ease-in-out infinite; }
.screen-scores li::before { content: ''; position: absolute; inset-inline-start: 0; inset-block: 1vh; width: .6vh; border-radius: .3vh; background: var(--team, transparent); }
.screen-streak { margin-inline-start: .8vw; color: var(--accent); font-weight: 800; }
@keyframes crown-pop { 40% { transform: scale(1.08); box-shadow: 0 0 0 1vh color-mix(in srgb, var(--accent) 40%, transparent); } }
@keyframes shield-pulse { 50% { transform: scale(1.18); } }
.screen-tile.is-taken { background: color-mix(in srgb, var(--team) 30%, transparent); border: 2px solid color-mix(in srgb, var(--team) 70%, transparent); font-size: 2vh; color: rgb(255 255 255 / .8); }
.screen-tile.is-flipping { animation: tile-flip .7s ease-in-out both; }
@keyframes tile-flip { from { transform: rotateY(0); } 50% { transform: rotateY(90deg); } to { transform: rotateY(0); } }
.screen-option.is-removing { animation: opt-in .4s ease-out both, crack 0.6s 1.6s ease-in both; }
.screen-question.is-staged .screen-option.is-removing { animation: opt-in .4s ease-out both, crack 0.6s 1.6s ease-in both; }
@keyframes crack { 0% { transform: none; } 20% { transform: translateX(-.6vw) rotate(-1deg); } 40% { transform: translateX(.6vw) rotate(1deg); } 100% { opacity: .25; text-decoration: line-through; transform: scale(.97); } }
.show-value.is-boosted { color: var(--accent); }
.show-steal .show-name { font-size: 13vh; font-weight: 900; animation: count-pop .45s ease-out both; }
.show-steal { animation: show-in .25s ease-out both, steal-flash .3s .25s steps(2, jump-none) 2; }
@keyframes steal-flash { 50% { filter: brightness(1.5); } }
.show-final { background: #ffffff; color: var(--brand); border-radius: 999px; padding: .6vh 2.4vw; font-weight: 900; font-size: 4vh; }
.show-streak { font-size: 4vh; font-weight: 800; color: var(--accent); }
.screen-left { margin-inline-start: 1.4vw; background: var(--bad); color: #ffffff; border-radius: 999px; padding: .3vh 1.2vw; font-size: 2.4vh; }
@media (prefers-reduced-motion: reduce) {
  .screen-timer.is-low, .screen-scores li.is-crowned, .screen-scores li.is-shielded::after, .screen-tile.is-flipping, .screen-option.is-removing,
  .screen-question.is-staged .screen-option.is-removing, .show-steal, .show-steal .show-name { animation: none; }
  .screen-option.is-removing { opacity: .25; text-decoration: line-through; }
  .screen-scores li.is-sliding { transition: none; }
}

/* Showcase «ج» (docs/SHOWCASE_PLAN.md): a team joining comes in with its colour, the draw's places spin and land, the
   board opens category by category, and the end shows the places from the last to the first on a podium, then the
   game's highlights. */
.screen-names li.is-new { animation: count-pop .5s ease-out both; }
.screen-names li { border-inline-start: .8vh solid var(--team, transparent); }
.screen-order li { border-radius: 1.4vh; padding: .6vh 2vw; }
.screen-order li.is-spinning { opacity: .65; filter: blur(.5px); }
.screen-order li.is-landed { background: var(--team); animation: count-pop .4s ease-out both; }
.screen-board.is-opening .screen-cat, .screen-board.is-opening .screen-tile { animation: board-open .45s calc(var(--i, 0) * .12s) ease-out both; }
@keyframes board-open { from { opacity: 0; transform: rotateX(90deg); } to { opacity: 1; transform: none; } }
.screen-final { width: min(1500px, 100%); gap: 1.6vh; }
.screen-final .screen-winner { font-size: 5.4vh; }
.screen-winner.is-waiting, .screen-final .is-waiting { visibility: hidden; }
.screen-final .is-shown { animation: count-pop .55s ease-out both; }
.screen-podium { display: flex; justify-content: center; align-items: flex-end; gap: 1.4vw; min-height: 24vh; }
.podium-step { order: 2; width: min(24vw, 360px); display: grid; align-content: start; justify-items: center; gap: .3vh; padding: 1.2vh 1vw; border-radius: 2vh 2vh .6vh .6vh; background: var(--team, var(--tile)); color: #ffffff; }
.podium-1 { order: 2; min-height: 24vh; box-shadow: 0 0 0 .6vh color-mix(in srgb, var(--accent) 60%, transparent); }
.podium-2 { order: 1; min-height: 18vh; }
.podium-3 { order: 3; min-height: 14vh; }
.podium-name { font-size: 3vh; font-weight: 800; }
.podium-score { font-size: 4.4vh; font-weight: 900; font-variant-numeric: tabular-nums; font-family: var(--font-num); direction: ltr; }
.podium-place { font-size: 4.4vh; font-weight: 900; opacity: .9; }
.screen-ranking li { border-radius: 1.2vh; padding: .4vh 2vw; border-inline-start: .8vh solid var(--team, transparent); }
.screen-summary { display: grid; gap: .8vh; }
.summary-title { margin: 0; font-size: 2.6vh; font-weight: 800; color: var(--accent); }
.summary-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(14vw, 1fr)); gap: 1vw; }
.summary-card { display: grid; gap: .2vh; justify-items: center; background: var(--tile); border-radius: 1.6vh; padding: .8vh 1vw; border-top: .6vh solid var(--team, var(--accent)); }
.summary-what { font-size: 2vh; opacity: .85; }
.summary-who { font-size: 2.6vh; font-weight: 800; }
.summary-how { font-size: 2.2vh; font-weight: 700; color: var(--accent); }
.summary-how.is-num { direction: ltr; unicode-bidi: isolate; }
@media (prefers-reduced-motion: reduce) {
  .screen-names li.is-new, .screen-order li.is-landed, .screen-board.is-opening .screen-cat, .screen-board.is-opening .screen-tile, .screen-final .is-shown { animation: none; }
}

/* Showcase «د» (docs/SHOWCASE_PLAN.md): the contestant's phone in their team's colour, the big pulsing «سرقة», the
   reactions bar and «أصوات الجوال», and the reactions floating up the big screen. */
.control.play { border-top: 6px solid var(--team, transparent); padding-top: 10px; }
.control.play .scores li.is-me { box-shadow: inset 0 0 0 2px var(--team, var(--accent)); }
.steal-btn { animation: steal-pulse 1s ease-in-out infinite; }
@keyframes steal-pulse { 50% { transform: scale(1.03); box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 35%, transparent); } }
.phone-extras { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.reactions { display: flex; gap: 6px; margin: 0; }
.react-btn { min-width: 44px; min-height: 44px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-size: 22px; cursor: pointer; }
.react-btn:active { transform: scale(.9); }
.phone-sound[hidden] { display: none; }
.reaction { position: fixed; bottom: -12vh; inset-inline-start: var(--x); z-index: 35; display: grid; justify-items: center; pointer-events: none; animation: float-up 2s ease-out both; }
.reaction-emoji { font-size: 9vh; line-height: 1; }
.reaction-name { font-size: 2vh; font-weight: 800; color: #ffffff; background: var(--team, var(--tile)); border-radius: 999px; padding: .2vh 1vw; }
@keyframes float-up { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; transform: translateY(-20vh) scale(1.1); } 100% { transform: translateY(-95vh) scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .steal-btn { animation: none; }
  .reaction { animation: none; bottom: 14vh; }
}

/* A running game, full screen (Nasser 2026-11-06): no header, footer or menu; the panel or the phone fills the page,
   larger, with its own bar (leave, the test badge, the timer, full screen). Phones keep a single column; from a tablet
   up the panel grows wider and the text bigger. */
body.game-page { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink);
  padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
.game-main { min-height: calc(100dvh - 24px); }
.game-page .control { max-width: 1100px; gap: 12px; }
.game-page .control-head { position: sticky; top: 0; z-index: 10; background: var(--bg); padding-block: 4px; gap: 8px; }
.game-page .control-head h1 { flex: 1; font-size: 20px; margin: 0; }
.game-page .control-head .timer { order: 3; }
.game-page .game-exit { order: -1; }
.game-page .game-fs { order: 4; }
.game-page .game-fs.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.game-page .game-test { font-size: 12px; }
.game-page .q-text { font-size: 22px; line-height: 1.5; }
.game-page .answer { min-height: 60px; font-size: 18px; }
.game-page .scores li { min-width: 110px; }
.game-page .scores b { font-size: 24px; }
@media (min-width: 900px) {
  .game-page .control-head h1 { font-size: 26px; }
  .game-page .q-text { font-size: 30px; }
  .game-page .answer { min-height: 76px; font-size: 22px; }
  .game-page .scores b { font-size: 30px; }
  .game-page .pick-tile { min-height: 64px; font-size: 22px; }
  .game-page .card { padding: 20px 24px; }
}
.game-page .q-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 15px; color: var(--muted); }
.game-page .q-meta b { display: inline-block; margin: 0; background: var(--accent); color: var(--on-accent); border-radius: 10px; padding: 2px 12px; font-size: 20px; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.game-page .card p.q-text { color: var(--ink); font-weight: 800; }
.game-page .game-test { background: var(--strip-bg); color: var(--strip-ink); border-radius: 999px; padding: 3px 10px; font-weight: 700; }
@media (min-width: 900px) { .game-page .q-meta { font-size: 18px; } .game-page .q-meta b { font-size: 26px; } }

/* The teams' cards (Nasser 2026-11-06): the team's colour as a band, the name and the «الدور» tag, the score large, and
   every power as an icon (the used ones faded and struck). On a phone they scroll sideways when more than three. */
.scores.team-cards { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(104px, 1fr); gap: 8px; overflow-x: auto; padding-bottom: 2px; scroll-snap-type: x proximity; }
.team-card { position: relative; display: grid; gap: 4px; padding: 10px 9px 8px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); scroll-snap-align: start; overflow: hidden; min-width: 0; }
.team-card::before { content: ''; position: absolute; inset-block-start: 0; inset-inline: 0; height: 5px; background: var(--team, var(--accent)); }
.team-card.is-turn { border-color: var(--team, var(--accent)); box-shadow: 0 0 0 2px var(--team, var(--accent)) inset, 0 6px 16px color-mix(in srgb, var(--team, var(--accent)) 25%, transparent); }
.team-card.is-me { outline: none; background: color-mix(in srgb, var(--team, var(--accent)) 9%, var(--surface)); }
.tc-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.tc-name { font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-turn { flex: none; font-size: 11px; font-weight: 800; color: #ffffff; background: var(--team, var(--brand)); border-radius: 999px; padding: 1px 8px; }
.team-card .tc-score { font-size: 26px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.tc-powers { display: flex; flex-wrap: wrap; gap: 3px; }
.tc-power { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 2px; border-radius: 7px; font-size: 12px; background: color-mix(in srgb, var(--team, var(--accent)) 14%, var(--surface)); }
.tc-power.is-used { opacity: .35; filter: grayscale(1); text-decoration: line-through; background: transparent; }
@media (min-width: 700px) { .scores.team-cards { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); overflow: visible; } .team-card .tc-score { font-size: 30px; } }

/* Choosing a power (Nasser 2026-11-06): a card per power with its icon, name and what it does; the chosen one in the
   identity's gold; the used ones locked. Two columns on a phone, five in a row on a computer. */
.power-picker { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.power-picker legend { grid-column: 1 / -1; padding: 0; margin-bottom: 6px; font-size: 14px; font-weight: 800; }
.power-card { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s, transform .1s; }
.power-card input { position: absolute; opacity: 0; pointer-events: none; }
.power-card .pc-icon { grid-row: 1 / 3; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-size: 20px; font-weight: 800; background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.power-card .pc-name { font-weight: 800; font-size: 15px; }
.power-card .pc-desc { font-size: 12px; color: var(--muted); line-height: 1.35; }
.power-card:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface)); box-shadow: 0 0 0 2px var(--accent) inset; }
.power-card:has(input:checked) .pc-icon { background: var(--accent); color: var(--on-accent); }
.power-card:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.power-card:active { transform: scale(.98); }
.power-card.is-used { cursor: not-allowed; opacity: .45; }
.power-card.is-used .pc-icon { filter: grayscale(1); }
.power-card.is-none .pc-icon { background: color-mix(in srgb, var(--muted) 14%, var(--surface)); }
.pc-note { grid-column: 1 / -1; margin: 2px 0 0; font-size: 12px; color: var(--muted); }
@media (min-width: 900px) { .power-picker { grid-template-columns: repeat(5, minmax(0, 1fr)); } .power-card { grid-template-columns: 1fr; justify-items: center; text-align: center; row-gap: 4px; } .power-card .pc-icon { grid-row: auto; } }

/* On a computer the three options sit in one row (Nasser 2026-11-06): the panel, the phone page and the big screen. */
@media (min-width: 900px) {
  .answers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .answers.opts-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screen-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .screen-options.opts-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screen-option { display: grid; place-items: center; text-align: center; min-height: 14vh; }
}
/* Two or three teams fit side by side on a phone; four to six scroll sideways. */
.scores.team-cards.count-2, .scores.team-cards.count-3 { grid-auto-flow: row; overflow: visible; }
.scores.team-cards.count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.scores.team-cards.count-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tc-head { flex-wrap: wrap; row-gap: 2px; }
@media (max-width: 699px) { .count-3 .team-card .tc-score { font-size: 22px; } .count-3 .tc-name { font-size: 13px; } }

/* The board for everyone (Nasser 2026-11-06): only the team whose turn it is can tap; the others see it locked. The
   chosen square crosses its category column and value row in the team's colour, flashing, before the announcement. */
.pick-board { position: relative; }
.pick-board.is-locked .pick-tile:not(.is-played) { display: grid; place-items: center; opacity: .7; cursor: not-allowed; }
.pick-board.is-locked:not(.is-crossing) { filter: saturate(.6); }
.pick-board.is-crossing .pick-tile:not(.is-picked) { opacity: .35; }
.pick-board.is-crossing .in-col, .pick-board.is-crossing .in-row { opacity: 1; background: color-mix(in srgb, var(--team, var(--accent)) 55%, var(--tile)); color: #ffffff; animation: cross-flash .5s ease-in-out 3 both; }
.pick-board.is-crossing .pick-cat.in-col { background: var(--team, var(--accent)); }
.pick-board.is-crossing .is-picked { opacity: 1; background: var(--team, var(--accent)); color: #ffffff; box-shadow: 0 0 0 3px #ffffff, 0 0 18px var(--team, var(--accent)); animation: tile-flash .5s steps(2, jump-none) 4 both; position: relative; z-index: 2; }
.pick-board.is-crossing:not([class*="team-"]) .is-picked { color: var(--on-accent); }
@keyframes cross-flash { 50% { filter: brightness(1.45); } }
.screen-board.is-crossing .screen-tile:not(.is-picked) { opacity: .4; }
.screen-board.is-crossing .in-col, .screen-board.is-crossing .in-row { opacity: 1; background: color-mix(in srgb, var(--team) 50%, var(--tile)); animation: cross-flash .45s ease-in-out 2 both; }
.screen-board.is-crossing .screen-cat.in-col { background: var(--team); }
@media (prefers-reduced-motion: reduce) {
  .pick-board.is-crossing .in-col, .pick-board.is-crossing .in-row, .pick-board.is-crossing .is-picked,
  .screen-board.is-crossing .in-col, .screen-board.is-crossing .in-row { animation: none; }
}

/* The random pick when the pick time runs out (Nasser 2026-11-06): one square lit at a time, slowing down, then the
   drawn one; on the phones the cross waits until it lands. The picker's own board locks at once. */
.screen-tile.is-roll { background: var(--accent); color: var(--on-accent); transform: scale(1.06); box-shadow: 0 0 2vh color-mix(in srgb, var(--accent) 60%, transparent); }
.screen-roulette { color: var(--accent); animation: count-pop .4s ease-out both; }
.pick-board.is-rolling .in-col, .pick-board.is-rolling .in-row, .pick-board.is-rolling .is-picked { animation: none; background: var(--tile); color: #ffffff; box-shadow: none; opacity: .5; }
.pick-board.is-rolling .pick-cat.in-col { background: color-mix(in srgb, var(--cat) 55%, var(--brand)); }
.pick-board .pick-tile.is-roll { opacity: 1 !important; background: var(--accent) !important; color: var(--on-accent) !important; transform: scale(1.06); }
.pick-board.is-timeout { filter: grayscale(.6); }
.pick-timeout[hidden] { display: none; }

/* «اختيار عشوائي» (Nasser 2026-11-06): after the roulette, the team's power window with a bar running out, on the
   screen (a panel over the crossed board) and on the phones and the panel (the power cards and «ابدأ السؤال»). */
.show-power-window .show-value { font-size: 16vh; }
.show-bar { width: min(60vw, 900px); height: 1.6vh; border-radius: 999px; background: rgb(255 255 255 / .25); overflow: hidden; }
.show-bar-fill { display: block; height: 100%; background: var(--accent); transform-origin: right; transform: scaleX(var(--from, 1)); animation: bar-out var(--ms, 5s) linear forwards; }
@keyframes bar-out { to { transform: scaleX(0); } }
.power-window { border: 2px solid var(--team, var(--accent)); }
.power-window .pw-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin: 0; font-size: 16px; }
.power-window .pw-tile { color: var(--muted); }
.power-window .pw-tile b { display: inline; background: var(--accent); color: var(--on-accent); border-radius: 8px; padding: 0 8px; }
.power-window .pw-bar { margin: 0; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.power-window .pw-fill { display: block; height: 100%; background: var(--team, var(--accent)); transform-origin: right; }
@media (prefers-reduced-motion: reduce) { .show-bar-fill { animation: none; } }
.power-window .pw-fill { transform: scaleX(var(--from, 1)); animation: bar-out var(--ms, 5s) linear var(--delay, 0s) forwards; }
.power-window form.is-waiting { opacity: .45; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .power-window .pw-fill { animation: none; } }
[dir="ltr"] .show-bar-fill, [dir="ltr"] .power-window .pw-fill { transform-origin: left; }

/* «لعبة جديدة», design «ج» (Nasser 2026-11-06): «ابدأ بسرعة» and «الإعدادات» side by side on a computer (two
   columns that fold into one under ~900px, flush to the side menu, LAYOUT_WIDTH.md), one column on a phone with a bar
   fixed above the bottom menu. The settings are rows with the chosen value; a row opens to change it. */
.game-setup { display: flex; flex-direction: column; gap: 8px; }
.setup-sub { margin: 0 0 8px; }
.setup { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 20px; align-items: start; max-width: 1400px; }
.setup h2 { font-size: 19px; margin: 0; }
.setup .card b { display: inline; font-size: inherit; margin: 0; }
.setup-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 10px; }
.setup-tile { position: relative; border: 2px solid var(--line); border-radius: 16px; padding: 14px; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; cursor: pointer; background: var(--surface); }
.setup-tile input { position: absolute; opacity: 0; pointer-events: none; }
.setup-tile .st-icon { grid-row: 1 / 3; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.setup-tile b { font-size: 16px; }
.setup-tile .st-hint { font-size: 12.5px; color: var(--muted); }
.setup-tile:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); box-shadow: 0 0 0 2px var(--accent) inset; }
.setup-tile:has(input:checked) .st-icon { background: var(--accent); }
.setup-tile:has(input:focus-visible) { outline: 3px solid var(--info); outline-offset: 2px; }
.setup-teams { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.setup-teams legend { font-weight: 800; padding: 0; margin-bottom: 8px; }
.setup-contest-note { display: none; margin: 0; }
.setup:has(input[name=mode][value=contest]:checked) .setup-contest-note { display: block; }
.setup:has(input[name=mode][value=contest]:checked) .team-inputs { display: none; }
.team-inputs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: 8px; }
.team-input { display: flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.team-input[hidden] { display: none; }
.team-input .ti-band { width: 8px; flex: none; background: var(--team, var(--muted)); }
.team-input input { border: 0; border-radius: 0; flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; font: inherit; background: transparent; color: var(--ink); }
.team-input input:focus { outline: none; }
.team-input:focus-within { border-color: var(--team, var(--accent)); }
.team-input.team-1 { --team: var(--team-1); } .team-input.team-2 { --team: var(--team-2); } .team-input.team-3 { --team: var(--team-3); }
.team-input.team-4 { --team: var(--team-4); } .team-input.team-5 { --team: var(--team-5); } .team-input.team-6 { --team: var(--team-6); }
.team-add { min-height: 44px; border: 1.5px dashed var(--line); border-radius: 12px; background: none; color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.team-add:hover { color: var(--ink); border-color: var(--muted); }
.setup-settings { display: flex; flex-direction: column; gap: 4px; }
.setup-settings > .muted { margin: 0 0 6px; }
.set-row { border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 4px; cursor: pointer; font-weight: 600; min-height: 48px; }
.set-row > summary::-webkit-details-marker { display: none; }
.set-row > summary b { color: var(--muted); font-weight: 700; text-align: end; white-space: nowrap; }
.set-row > summary > span { min-width: 0; }
.set-row > summary b::after { content: '‹'; margin-inline-start: 8px; display: inline-block; transition: transform .15s; }
[dir=ltr] .set-row > summary b::after { content: '›'; }
.set-row[open] > summary b::after { transform: rotate(-90deg); }
.set-body { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; padding: 0 4px 16px; }
.set-body select { min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line); padding: 0 12px; font: inherit; background: var(--surface); color: var(--ink); max-width: 100%; }
.set-body p { margin: 0; }
.set-power { display: none; flex-direction: column; gap: 6px; }
.setup:has(input[name=pick_mode][value=random]:checked) .set-power { display: flex; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: color-mix(in srgb, var(--muted) 12%, var(--surface)); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 8px 14px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--muted); }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .15); }
.seg input:focus-visible + span { outline: 3px solid var(--info); }
/* Choosing the categories (Nasser 2026-11-06): one per row (the names are long), «اخترت 2 من 5 · باقي 3» above
   with a bar, and at the limit the others lock until one is unticked (shell.js). */
.cat-list { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.setup:has(input[name=random][value='1']:checked) .cat-list { display: none; }
.cat-count { position: sticky; top: 0; z-index: 2; margin: 0 0 4px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--line);
  display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; }
.cat-list.is-full .cat-count { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.cat-meter { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.cat-meter-fill { display: block; height: 100%; width: calc(var(--done, 0) * 100%); background: var(--accent-shadow); border-radius: inherit; transition: width .2s; }
.cat-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.cat-row input { position: absolute; opacity: 0; pointer-events: none; }
.cat-box { flex: none; width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line); display: grid; place-items: center; transition: background .15s, border-color .15s; }
.cat-box::after { content: ''; width: 10px; height: 6px; border: solid var(--on-accent); border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translateY(-1px); opacity: 0; }
.cat-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.cat-text small { font-size: 12px; color: var(--muted); }
.cat-text b { font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.cat-row:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.cat-row:has(input:checked) .cat-box { background: var(--accent); border-color: var(--accent); }
.cat-row:has(input:checked) .cat-box::after { opacity: 1; }
.cat-row:has(input:focus-visible) { outline: 3px solid var(--info); outline-offset: 2px; }
.cat-row:has(input:disabled) { opacity: .45; cursor: not-allowed; }
@media (min-width: 1200px) { .cat-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .cat-count { grid-column: 1 / -1; } .setup:has(input[name=random][value='1']:checked) .cat-list { display: none; } }
.set-switch { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 4px; cursor: pointer; font-weight: 600; }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 28px; border-radius: 999px; background: color-mix(in srgb, var(--muted) 35%, var(--surface)); position: relative; cursor: pointer; margin: 0; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: inset-inline-start .15s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { inset-inline-start: 21px; }
.switch:focus-visible { outline: 3px solid var(--info); outline-offset: 2px; }
.setup-cta { display: none; }
@media (max-width: 860px) {
  .setup-go { display: none; }
  .setup-cta { display: flex; position: fixed; inset-inline: 0; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 15; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 16px; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 14px rgb(0 0 0 / .06); }
  .setup-cta p { margin: 0; line-height: 1.3; }
  .setup-cta .btn { flex: 1; max-width: 240px; }
  .game-setup { padding-bottom: 72px; }
  /* Signed in, the bar sits on the bottom menu whose «+» rises 28px into it (Nasser 2026-11-06: «متداخلة»): room under
     the button for the circle. */
  .coord-page .setup-cta { padding-bottom: 38px; z-index: 4; }
  .coord-page .game-setup { padding-bottom: 104px; }
}

/* Over the page, never above or below the question (Nasser 2026-11-06: «فوقه كصفحة منبثقة … ما يصعدها وينزلها كل
   مرة»): the power window, the power sheet, the announcement and the result. A sheet at the bottom of a phone, in the
   middle of a computer; .is-dim darkens the page under it. */
.overlay { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); pointer-events: none; }
.overlay[hidden] { display: none; }
.overlay > .card { pointer-events: auto; width: min(560px, 100%); max-height: calc(100dvh - 24px); overflow-y: auto; box-shadow: 0 18px 50px rgb(0 0 0 / .35); animation: sheet-up .28s cubic-bezier(.2, .9, .3, 1.1) both; }
.overlay.is-dim { pointer-events: auto; background: rgb(10 12 15 / .55); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 900px) { .overlay.is-dim { align-items: center; } .overlay > .card { width: min(720px, 100%); } }
@media (prefers-reduced-motion: reduce) { .overlay > .card { animation: none; } }
.overlay-btn { background: #ffffff; color: var(--ink); border-color: #ffffff; font-weight: 800; }
.power-window, .power-sheet { background: var(--surface); }
.power-sheet .ps-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin: 0; font-size: 16px; color: var(--ink); }
.power-sheet .ps-head b { display: inline; font-size: inherit; margin: 0; }
.power-sheet .ps-tile { background: var(--accent); color: var(--on-accent); border-radius: 8px; padding: 0 8px; font-weight: 800; }
.power-picker.is-instant legend { display: none; }
button.power-card { font: inherit; color: var(--ink); text-align: start; width: 100%; }
button.power-card:hover:not(:disabled) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
button.power-card:focus-visible { outline: 3px solid var(--info); outline-offset: 2px; }
button.power-card.is-none { grid-column: 1 / -1; }
@media (min-width: 900px) { .power-picker.is-instant { grid-template-columns: repeat(4, minmax(0, 1fr)); } button.power-card.is-none { grid-column: 1 / -1; grid-template-columns: auto 1fr; justify-items: start; text-align: start; } button.power-card.is-none .pc-icon { grid-row: 1 / 3; } }
.pick-timeout:not([hidden]) { position: fixed; inset-inline: 12px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 41; margin: 0; box-shadow: 0 10px 30px rgb(0 0 0 / .3); animation: sheet-up .28s ease-out both; }

/* The game bar's sound icon (Nasser 2026-11-06: «مجرد أيقونة صغيرة فوق بجانب وضع الاختبار»). */
.game-sound .snd-on, .game-sound.on .snd-off { display: none; }
.game-sound.on .snd-on { display: block; }
.game-sound.on { background: color-mix(in srgb, var(--accent) 35%, var(--surface)); }
.control-head form.inline { display: contents; }

/* Smaller team cards at the top of a phone (Nasser 2026-11-06: «يحتاج إلى تصغير شوية ويكون في الأعلى»). */
@media (max-width: 699px) {
  .control .scores.team-cards { gap: 6px; grid-auto-columns: minmax(92px, 1fr); }
  .control .team-card { padding: 7px 8px 6px; gap: 2px; border-radius: 12px; }
  .control .team-card::before { height: 4px; }
  .control .tc-name { font-size: 12.5px; }
  .control .tc-turn { font-size: 10px; padding: 0 6px; }
  .control .team-card .tc-score, .control .count-3 .team-card .tc-score { font-size: 20px; }
  .control .tc-power { min-width: 18px; height: 18px; font-size: 10.5px; border-radius: 5px; }
  .control .tc-powers { gap: 2px; }
}

/* «إيقاف مؤقت» and «إنهاء اللعبة» (Nasser 2026-11-06). */
.paused-card { text-align: center; align-items: center; }
.paused-card h2 { margin: 0; font-size: 26px; }
.paused-card form, .paused-card details { width: 100%; }
.paused-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 24px; font-weight: 900; letter-spacing: -2px; animation: paused-beat 1.6s ease-in-out infinite; }
@keyframes paused-beat { 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .paused-icon, .screen-paused-icon { animation: none; } }
.game-pause.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.end-confirm > summary { list-style: none; cursor: pointer; }
.end-confirm > summary::-webkit-details-marker { display: none; }
.end-confirm[open] { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.end-confirm p { margin: 0; }
.btn.danger-fill { background: var(--bad); border-color: var(--bad); color: #ffffff; font-weight: 800; }
.screen-paused { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2vh; min-height: 50vh; text-align: center; animation: show-in .35s ease-out both; }
.screen-paused-icon { display: grid; place-items: center; width: 18vh; height: 18vh; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 7vh; font-weight: 900; letter-spacing: -.5vh; animation: paused-beat 1.6s ease-in-out infinite; }
.screen-paused-title { margin: 0; font-size: 8vh; font-weight: 900; }
.screen-paused-hint { margin: 0; font-size: 3.2vh; opacity: .8; }
.game-page .control-head h1 { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* «القرعة» (Nasser 2026-11-06): face-down cards shuffle, then the numbered slots fill one by one, each card flipping
   to its team. The big screen drives it from game.js (.is-open); phones and the panel flip by CSS delays. */
.screen-draw { width: 100%; max-width: 1500px; }
.draw-title { font-size: 6vh; letter-spacing: .02em; }
.draw-deck { position: relative; height: 16vh; }
.draw-ghost { position: absolute; inset-inline-start: calc(50% - 5vh); top: 0; width: 10vh; height: 14vh; border-radius: 1.6vh; display: grid; place-items: center; font-size: 6vh; font-weight: 900;
  color: var(--on-accent); background: repeating-linear-gradient(45deg, var(--accent) 0 1.2vh, var(--accent-shadow) 1.2vh 2.4vh); box-shadow: 0 1vh 3vh rgb(0 0 0 / .4);
  transform: translateX(var(--dx, 0)); transition: transform .35s ease, opacity .35s ease; }
.is-shuffling .draw-ghost { animation: draw-shuffle .42s ease-in-out var(--d, 0s) infinite alternate; }
.draw-ghost.is-gone { opacity: 0; transform: translateX(var(--dx, 0)) translateY(12vh) scale(.6); }
@keyframes draw-shuffle { from { transform: translateX(calc(var(--dx, 0) * -1)) rotate(-8deg); } to { transform: translateX(var(--dx, 0)) rotate(8deg) translateY(-1.5vh); } }
.draw-slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(22vw, 260px), 1fr)); gap: 2vh 1.6vw; }
.draw-slot { display: flex; flex-direction: column; align-items: center; gap: 1vh; }
.draw-num { display: grid; place-items: center; width: 6vh; height: 6vh; border-radius: 50%; background: rgb(255 255 255 / .12); font-size: 3.4vh; font-weight: 900; }
.draw-card { width: 100%; height: 18vh; perspective: 1000px; }
.draw-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3, 1.4, .5, 1); }
.draw-card.is-open .draw-inner { transform: rotateY(180deg); }
.draw-back, .draw-face { position: absolute; inset: 0; border-radius: 2vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8vh; backface-visibility: hidden; -webkit-backface-visibility: hidden; padding: 1vh; }
.draw-back { background: repeating-linear-gradient(45deg, rgb(255 255 255 / .1) 0 1.2vh, rgb(255 255 255 / .04) 1.2vh 2.4vh); border: .3vh dashed rgb(255 255 255 / .3); font-size: 6vh; font-weight: 900; opacity: .7; }
.draw-face { transform: rotateY(180deg); background: var(--team, var(--accent)); color: #ffffff; box-shadow: 0 1vh 3vh color-mix(in srgb, var(--team, var(--accent)) 45%, transparent); }
.draw-name { font-size: 4.4vh; font-weight: 900; text-align: center; overflow-wrap: anywhere; line-height: 1.15; }
.draw-first { background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: .3vh 1.4vh; font-size: 2.2vh; font-weight: 800; }
.screen-draw.is-done .draw-slot:first-child .draw-face { animation: draw-glow 1.2s ease-in-out infinite alternate; }
@keyframes draw-glow { to { box-shadow: 0 0 0 .6vh var(--accent), 0 1vh 4vh color-mix(in srgb, var(--accent) 60%, transparent); } }
.draw-card.team-1 { --team: var(--team-1); } .draw-card.team-2 { --team: var(--team-2); } .draw-card.team-3 { --team: var(--team-3); }
.draw-card.team-4 { --team: var(--team-4); } .draw-card.team-5 { --team: var(--team-5); } .draw-card.team-6 { --team: var(--team-6); }
/* Phones and the panel: smaller, flipping in turn. */
.small-slots { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.small-slots .draw-num { width: 28px; height: 28px; font-size: 14px; background: color-mix(in srgb, var(--muted) 18%, var(--surface)); }
.small-slots .draw-card { height: 84px; }
.small-slots .draw-back, .small-slots .draw-face { border-radius: 14px; gap: 4px; padding: 6px; }
.small-slots .draw-back { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--muted) 16%, var(--surface)) 0 8px, var(--surface) 8px 16px); border: 2px dashed var(--line); font-size: 28px; color: var(--muted); }
.small-slots .draw-name { font-size: 16px; }
.small-slots .draw-first { font-size: 11px; padding: 1px 8px; }
.small-slots .draw-inner { animation: draw-flip .6s cubic-bezier(.3, 1.4, .5, 1) both; }
.small-slots .flip-0 .draw-inner { animation-delay: 1.3s; } .small-slots .flip-1 .draw-inner { animation-delay: 1.85s; } .small-slots .flip-2 .draw-inner { animation-delay: 2.4s; }
.small-slots .flip-3 .draw-inner { animation-delay: 2.95s; } .small-slots .flip-4 .draw-inner { animation-delay: 3.5s; } .small-slots .flip-5 .draw-inner { animation-delay: 4.05s; }
@keyframes draw-flip { from { transform: none; } to { transform: rotateY(180deg); } }
.small-slots .draw-slot.is-me .draw-face { outline: 3px solid var(--accent); outline-offset: 2px; }
.draw-mine { margin: 0; font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .is-shuffling .draw-ghost, .screen-draw.is-done .draw-slot:first-child .draw-face { animation: none; } .draw-inner { transition: none; } .small-slots .draw-inner { animation-duration: .01s; animation-delay: 0s !important; } }
.small-slots.count-2, .small-slots.count-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.small-slots.count-3, .small-slots.count-5, .small-slots.count-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.screen-draw.is-done .draw-deck { visibility: hidden; }
/* The join page (Nasser 2026-11-06): «QR» next to the code, the camera in a sheet, and the avatars. */
.code-row { display: flex; gap: 8px; align-items: stretch; }
.code-row input { flex: 1; min-width: 0; }
.qr-video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; background: #000000; }
.avatar-pick { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
/* One row of free avatars, the rest under «المزيد» (templates/partials/avatars.php): the button stays on the first screen. */
.avatar-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
/* «المزيد» is the row's sixth cell; opened, it takes the whole width under the row, its pill first and the rest after it. */
.avatar-more { min-width: 0; }
.avatar-more > summary { list-style: none; cursor: pointer; display: grid; place-items: center; aspect-ratio: 1; border-radius: 999px; border: 2px solid var(--line);
  background: var(--surface); color: var(--brand); font-weight: 800; font-size: 13px; }
.avatar-more > summary::-webkit-details-marker { display: none; }
.avatar-more[open] { grid-column: 1 / -1; }
.avatar-more[open] > summary { border-color: var(--brand); width: calc((100% - 40px) / 6); margin-bottom: 8px; }
.avatar-hint { margin: 0; }
.avatar-pick legend { padding: 0; margin-bottom: 8px; font-weight: 700; }
.avatar-opt { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); font-size: 26px; cursor: pointer; transition: transform .1s, border-color .15s; }
.avatar-opt input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-opt:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 22%, var(--surface)); transform: scale(1.06); box-shadow: 0 0 0 2px var(--accent) inset; }
.avatar-opt:has(input:focus-visible) { outline: 3px solid var(--info); outline-offset: 2px; }
.avatar-opt.is-taken { cursor: not-allowed; opacity: .3; filter: grayscale(1); }
.avatar { display: inline-block; margin-inline-end: .25em; }
.draw-avatar { font-size: 5vh; line-height: 1; }
.small-slots .draw-avatar { font-size: 22px; }

/* The waiting room (Nasser 2026-11-06): the code as digit tiles with the QR and link, six seats for the players, the
   coordinator's own seat as a sheet, and «ابدأ اللعبة» fixed at the bottom of a phone. Two columns on a computer. */
.lobby { display: grid; gap: 16px; }
@media (min-width: 900px) { .lobby.is-contest { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; } .lobby-start { grid-column: 1 / -1; } }
.lobby-join { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; background: var(--side-bg); color: var(--side-ink); border: 0; }
.lobby-join .muted { color: var(--side-muted); }
.lj-label { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--side-muted); }
.lj-code { margin: 0; display: flex; gap: 6px; direction: ltr; }
.lj-digit { display: grid; place-items: center; width: clamp(36px, 10vw, 52px); height: clamp(48px, 13vw, 66px); border-radius: 12px; background: color-mix(in srgb, var(--side-ink) 10%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--side-ink) 22%, transparent); font-size: clamp(26px, 7vw, 38px); font-weight: 900; font-variant-numeric: tabular-nums; font-family: var(--font-num); color: var(--accent); }
.lj-digit.gap { margin-inline-start: 10px; }
.lj-qr { background: #ffffff; border-radius: 18px; padding: 10px; box-shadow: 0 10px 30px rgb(0 0 0 / .25); }
.lj-qr img { display: block; width: clamp(150px, 42vw, 190px); height: auto; }
.lj-link { margin: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; font-size: 14px; }
.lj-link a { color: var(--side-ink); overflow-wrap: anywhere; }
.lobby-join .lj-copy { background: transparent; color: var(--side-ink); border-color: color-mix(in srgb, var(--side-ink) 35%, transparent); min-height: 34px; }
.lobby-join .lj-copy[hidden] { display: none; }
.lj-hint { margin: 0; max-width: 34ch; }
.lobby-players { display: flex; flex-direction: column; gap: 12px; }
.lp-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lp-head h2 { margin: 0; font-size: 19px; }
.lp-count { font-size: 14px; color: var(--muted); background: color-mix(in srgb, var(--muted) 12%, var(--surface)); border-radius: 999px; padding: 3px 12px; }
.lp-count b { display: inline; font-size: 16px; margin: 0; color: var(--ink); }
.lp-seats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 1200px) { .lp-seats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lp-seat { position: relative; display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px 10px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); min-width: 0; }
.lp-seat.is-taken { border-color: color-mix(in srgb, var(--team, var(--accent)) 55%, var(--line)); background: color-mix(in srgb, var(--team, var(--accent)) 8%, var(--surface)); animation: seat-in .35s ease-out both; }
.lp-seat.is-empty { border-style: dashed; }
.lp-seat.team-1 { --team: var(--team-1); } .lp-seat.team-2 { --team: var(--team-2); } .lp-seat.team-3 { --team: var(--team-3); }
.lp-seat.team-4 { --team: var(--team-4); } .lp-seat.team-5 { --team: var(--team-5); } .lp-seat.team-6 { --team: var(--team-6); }
.lp-avatar { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-size: 22px; background: color-mix(in srgb, var(--team, var(--muted)) 18%, var(--surface)); font-weight: 800; }
.lp-name { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-name small { font-size: 11px; font-weight: 700; color: var(--muted); }
.lp-seat.is-empty .lp-name { font-weight: 500; font-size: 13px; }
.lp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); opacity: .5; animation: seat-wait 1.4s ease-in-out infinite; }
.lp-remove { margin: 0; }
.lp-remove .icon-btn { width: 30px; height: 30px; border-color: var(--line); color: var(--muted); }
.lp-remove .icon-btn:hover { color: var(--bad); border-color: var(--bad); }
@keyframes seat-in { from { transform: scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes seat-wait { 50% { opacity: 1; transform: scale(1.4); } }
@media (prefers-reduced-motion: reduce) { .lp-seat.is-taken, .lp-dot { animation: none; } }
.host-join > summary { list-style: none; }
.host-join > summary::-webkit-details-marker { display: none; }
.lp-host-btn { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; border: 1.5px dashed var(--accent-shadow); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); cursor: pointer; font-size: 22px; }
.lp-host-btn > span:last-child { display: flex; flex-direction: column; font-size: 15px; }
.lp-host-btn b { display: inline; font-size: inherit; margin: 0; }
.lp-host-btn small { font-size: 12px; color: var(--muted); }
.host-sheet .card h2 { margin: 0; font-size: 20px; }
.lp-host-note { margin: 0; }
.lobby-start { display: flex; flex-direction: column; gap: 8px; }
.lobby-start p { margin: 0; text-align: center; }
.lobby-go:disabled { opacity: .5; box-shadow: none; cursor: not-allowed; }
@media (max-width: 860px) {
  .lobby.is-contest .lobby-start { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 6; background: var(--bg); padding: 8px 0; box-shadow: 0 -10px 14px -10px rgb(0 0 0 / .15); }
}

/* The result's colour (Nasser 2026-11-06): right is green, wrong is red, out of time is orange, whatever the team's
   colour; and it shows for two seconds at most, then the answers are in view again. */
.show-result.result-correct, .show-result.result-steal_correct { background: radial-gradient(circle at center, color-mix(in srgb, var(--ok) 85%, #000000) 0%, var(--brand) 75%); }
.show-result.result-wrong, .show-result.result-steal_wrong { background: radial-gradient(circle at center, color-mix(in srgb, var(--bad) 80%, #000000) 0%, var(--brand) 75%); }
.show-result.result-timeout { background: radial-gradient(circle at center, color-mix(in srgb, var(--orange) 85%, #000000) 0%, var(--brand) 75%); }
.show-result { animation: show-in .3s ease-out both, show-out .35s 1.9s ease-in both; }
.card.phone-result.result-correct, .card.phone-result.result-steal_correct { background: var(--ok); }
.card.phone-result.result-wrong, .card.phone-result.result-steal_wrong { background: var(--bad); }
.card.phone-result.result-timeout { background: var(--orange); }
.overlay.is-result { animation: show-out .3s 1.9s ease-in both; }
@media (prefers-reduced-motion: reduce) { .overlay.is-result { animation: show-out 0s 2s both; } }

/* The teams' cards for up to six (Nasser 2026-11-06): one row; the team whose turn it is gets the wide card with its
   powers, the others shrink to the avatar, the name and the score. */
.control .scores.team-cards { display: flex; gap: 6px; overflow: visible; padding: 0; }
.control .scores.team-cards .team-card { flex: 1 1 0; min-width: 0; padding: 6px 8px 6px; gap: 2px; transition: flex-grow .35s ease, background .2s; }
.control .scores.team-cards .team-card.is-turn { flex-grow: 2.4; }
.control .scores.team-cards .team-card:not(.is-turn) .tc-powers, .control .scores.team-cards .team-card:not(.is-turn) .tc-turn { display: none; }
.control .team-card .tc-head { flex-wrap: nowrap; }
.control .team-card .tc-name { font-size: 12.5px; }
.control .team-card .tc-score { font-size: 19px; }
.control .team-card.is-turn .tc-score { font-size: 24px; }
.control .count-5 .team-card:not(.is-turn) .tc-name, .control .count-6 .team-card:not(.is-turn) .tc-name { font-size: 11px; }
.control .count-5 .team-card:not(.is-turn) .tc-score, .control .count-6 .team-card:not(.is-turn) .tc-score { font-size: 16px; }
@media (min-width: 900px) { .control .team-card .tc-name { font-size: 15px; } .control .team-card .tc-score { font-size: 26px; } .control .team-card.is-turn .tc-score { font-size: 32px; } }
@media (prefers-reduced-motion: reduce) { .control .scores.team-cards .team-card { transition: none; } }
/* Each card: the avatar, the name, the score; the wide card (whose turn) lays them side by side with the powers. */
.tc-avatar { display: none; }
.control .team-card { text-align: center; justify-items: center; }
.control .team-card .tc-avatar { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 16px; font-weight: 800; background: color-mix(in srgb, var(--team, var(--muted)) 16%, var(--surface)); }
.control .team-card .tc-head { justify-content: center; max-width: 100%; }
.control .team-card .tc-name { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.control .scores.team-cards .team-card.is-turn { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: 'av head' 'av score' 'pw pw'; column-gap: 8px; text-align: start; justify-items: start; align-items: center; }
.control .team-card.is-turn .tc-avatar { grid-area: av; width: 38px; height: 38px; font-size: 22px; }
.control .team-card.is-turn .tc-head { grid-area: head; justify-content: flex-start; gap: 6px; }
.control .team-card.is-turn .tc-score { grid-area: score; }
.control .team-card.is-turn .tc-powers { grid-area: pw; }
.control .scores.team-cards .team-card.is-turn .tc-turn { display: none; }
.control .team-card.is-turn .tc-name { font-size: 14px; }
/* Five or six teams on a phone (Nasser 2026-11-06): two rows of three, every name readable; the turn's card stays
   highlighted and shows its powers under the score. */
@media (max-width: 699px) {
  .control .scores.team-cards.count-5, .control .scores.team-cards.count-6 { display: grid; grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .control .scores.team-cards.count-5 .team-card.is-turn, .control .scores.team-cards.count-6 .team-card.is-turn { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: none; justify-items: center; text-align: center; }
  .control .scores.team-cards.count-5 .team-card.is-turn > *, .control .scores.team-cards.count-6 .team-card.is-turn > * { grid-area: auto; }
  .control .count-5 .team-card.is-turn .tc-avatar, .control .count-6 .team-card.is-turn .tc-avatar { width: 26px; height: 26px; font-size: 16px; }
  .control .count-5 .team-card.is-turn .tc-head, .control .count-6 .team-card.is-turn .tc-head { justify-content: center; }
  .control .count-5 .team-card .tc-name, .control .count-6 .team-card .tc-name, .control .count-5 .team-card:not(.is-turn) .tc-name, .control .count-6 .team-card:not(.is-turn) .tc-name { font-size: 13px; }
  .control .count-5 .team-card .tc-score, .control .count-6 .team-card .tc-score, .control .count-5 .team-card:not(.is-turn) .tc-score, .control .count-6 .team-card:not(.is-turn) .tc-score { font-size: 18px; }
  .control .count-5 .team-card.is-turn .tc-powers, .control .count-6 .team-card.is-turn .tc-powers { justify-content: center; }
}

/* The winners' ceremony on the big screen (Nasser 2026-11-06): spotlight cards for the third, the second and the
   champion, then the podium. */
.ceremony { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6vh; text-align: center; color: #ffffff;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--team, var(--accent)) 70%, #000000) 0%, rgb(8 10 13 / .96) 62%); animation: cer-in .45s cubic-bezier(.2, 1.3, .4, 1) both; overflow: hidden; }
.ceremony.is-leaving { animation: cer-out .45s ease-in both; }
.cer-label { margin: 0; font-size: 4.4vh; font-weight: 800; letter-spacing: .04em; opacity: .9; }
.cer-medal { font-size: 14vh; line-height: 1; filter: drop-shadow(0 1.5vh 3vh rgb(0 0 0 / .5)); animation: medal-drop .7s cubic-bezier(.2, 1.4, .4, 1) .15s both; }
.cer-avatar { display: grid; place-items: center; width: 16vh; height: 16vh; border-radius: 50%; font-size: 10vh; background: rgb(255 255 255 / .12); box-shadow: 0 0 0 .8vh var(--team, var(--accent)); animation: count-pop .6s ease-out .3s both; }
.cer-name { margin: 0; font-size: 9vh; font-weight: 900; line-height: 1.05; text-shadow: 0 .6vh 2vh rgb(0 0 0 / .4); animation: count-pop .5s ease-out .45s both; }
.cer-score { font-size: 7vh; font-weight: 900; font-variant-numeric: tabular-nums; font-family: var(--font-num); direction: ltr; color: var(--accent); }
.ceremony.is-champion { background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--accent) 35%, var(--team, #000000)) 0%, color-mix(in srgb, var(--team, #000000) 55%, #000000) 45%, rgb(5 6 8) 75%); }
.ceremony.is-champion .cer-label { font-size: 8vh; color: var(--accent); text-shadow: 0 0 3vh color-mix(in srgb, var(--accent) 70%, transparent); animation: count-pop .6s ease-out both; }
.ceremony.is-champion .cer-medal { font-size: 20vh; animation: medal-drop .8s cubic-bezier(.2, 1.4, .4, 1) .1s both, cup-shine 1.6s ease-in-out 1s infinite alternate; }
.ceremony.is-champion .cer-name { font-size: 12vh; }
.cer-beams { position: absolute; inset: -50%; background: repeating-conic-gradient(from 0deg, rgb(255 255 255 / .09) 0deg 10deg, transparent 10deg 30deg); animation: beams-spin 18s linear infinite; pointer-events: none; z-index: -1; }
body.screen-page.is-dimmed .screen { filter: brightness(.25); transition: filter .5s; }
body.screen-page .screen { transition: filter .5s; }
@keyframes cer-in { from { opacity: 0; transform: scale(1.12); } to { opacity: 1; transform: none; } }
@keyframes cer-out { to { opacity: 0; transform: scale(.85) translateY(10vh); } }
@keyframes medal-drop { from { transform: translateY(-40vh) rotate(-25deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes cup-shine { to { transform: scale(1.08) rotate(-4deg); filter: drop-shadow(0 0 4vh color-mix(in srgb, var(--accent) 80%, transparent)); } }
@keyframes beams-spin { to { transform: rotate(360deg); } }
/* The podium after the ceremony: medals, avatars, steps that rise. */
.screen-podium { gap: 1.2vw; min-height: 34vh; }
.podium-step { position: relative; gap: .6vh; padding: 1.6vh 1vw 2vh; border-radius: 2.4vh 2.4vh .8vh .8vh; background: linear-gradient(180deg, color-mix(in srgb, var(--team, var(--tile)) 92%, #ffffff), var(--team, var(--tile))); box-shadow: 0 1.6vh 4vh rgb(0 0 0 / .35); }
.podium-1 { min-height: 34vh; box-shadow: 0 0 0 .6vh var(--accent), 0 2vh 6vh color-mix(in srgb, var(--accent) 35%, transparent); }
.podium-2 { min-height: 26vh; }
.podium-3 { min-height: 20vh; }
.podium-medal { font-size: 7vh; line-height: 1; margin-top: -6vh; filter: drop-shadow(0 .8vh 1.6vh rgb(0 0 0 / .4)); }
.podium-1 .podium-medal { font-size: 9vh; margin-top: -7vh; }
.podium-avatar { font-size: 6vh; line-height: 1; }
.podium-1 .podium-name { font-size: 4vh; }
.podium-1 .podium-score { font-size: 5.6vh; }
.screen-final .podium-step.is-shown { animation: podium-rise .7s cubic-bezier(.2, 1.3, .4, 1) both; transform-origin: bottom; }
@keyframes podium-rise { from { transform: scaleY(.1) translateY(10vh); opacity: 0; } to { transform: none; opacity: 1; } }
.screen-ranking.is-waiting { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .ceremony, .cer-medal, .cer-avatar, .cer-name, .cer-beams, .screen-final .podium-step.is-shown { animation: none !important; } }
.podium-step { padding-top: 5vh; }
.podium-medal, .podium-1 .podium-medal { position: absolute; top: -5vh; inset-inline: 0; margin: 0 auto; text-align: center; }
.screen-final .screen-winner { margin-bottom: 6vh; }

/* The contestant's waiting room (Nasser 2026-11-06): the page alone, joyful and moving. */
.play-lobby { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 14px 22px; border-radius: 24px; overflow: hidden; text-align: center;
  background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--team, var(--accent)) 30%, var(--surface)) 0%, var(--surface) 60%); border: 1.5px solid color-mix(in srgb, var(--team, var(--accent)) 35%, var(--line)); }
.play-lobby.team-1 { --team: var(--team-1); } .play-lobby.team-2 { --team: var(--team-2); } .play-lobby.team-3 { --team: var(--team-3); }
.play-lobby.team-4 { --team: var(--team-4); } .play-lobby.team-5 { --team: var(--team-5); } .play-lobby.team-6 { --team: var(--team-6); }
.pl-bubbles { position: absolute; inset: 0; pointer-events: none; }
.pl-bubbles i { position: absolute; bottom: -30px; width: 14px; height: 14px; border-radius: 50%; background: color-mix(in srgb, var(--team, var(--accent)) 40%, transparent); animation: pl-float 7s linear infinite; }
.pl-bubbles i:nth-child(1) { inset-inline-start: 8%; animation-delay: 0s; }
.pl-bubbles i:nth-child(2) { inset-inline-start: 24%; width: 9px; height: 9px; animation-delay: 1.4s; background: color-mix(in srgb, var(--accent) 70%, transparent); }
.pl-bubbles i:nth-child(3) { inset-inline-start: 46%; width: 18px; height: 18px; animation-delay: 2.8s; }
.pl-bubbles i:nth-child(4) { inset-inline-start: 64%; width: 8px; height: 8px; animation-delay: .7s; background: color-mix(in srgb, var(--accent) 70%, transparent); }
.pl-bubbles i:nth-child(5) { inset-inline-start: 80%; animation-delay: 3.9s; }
.pl-bubbles i:nth-child(6) { inset-inline-start: 92%; width: 10px; height: 10px; animation-delay: 5.1s; }
@keyframes pl-float { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-560px) scale(1.1); opacity: 0; } }
.pl-me { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pl-me-avatar { display: grid; place-items: center; width: 116px; height: 116px; border-radius: 50%; font-size: 66px; background: var(--surface);
  box-shadow: 0 0 0 6px var(--team, var(--accent)), 0 14px 30px color-mix(in srgb, var(--team, var(--accent)) 40%, transparent); animation: pl-bounce 2.4s ease-in-out infinite; }
.is-first .pl-me-avatar { animation: pl-arrive .8s cubic-bezier(.2, 1.5, .4, 1) both, pl-bounce 2.4s ease-in-out .8s infinite; }
@keyframes pl-bounce { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-8px) rotate(-4deg); } 50% { transform: translateY(0) rotate(0); } 75% { transform: translateY(-5px) rotate(3deg); } }
@keyframes pl-arrive { from { transform: scale(.2) rotate(-30deg); opacity: 0; } to { transform: none; opacity: 1; } }
.pl-me-title { margin: 8px 0 0; font-size: 28px; font-weight: 900; color: var(--ink); }
.is-first .pl-me-title { animation: count-pop .5s ease-out .3s both; }
.pl-me-name { margin: 0; font-size: 18px; font-weight: 800; color: var(--team, var(--ink)); }
.pl-wait { margin: 0; display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); font-weight: 700; font-size: 14px; }
.pl-dots { display: inline-flex; gap: 4px; }
.pl-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--team, var(--accent)); animation: pl-dot 1.2s ease-in-out infinite; }
.pl-dots i:nth-child(2) { animation-delay: .15s; } .pl-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes pl-dot { 0%, 80%, 100% { transform: scale(.6); opacity: .4; } 40% { transform: scale(1.2); opacity: 1; } }
.pl-room { position: relative; width: 100%; display: flex; flex-direction: column; gap: 8px; }
.pl-count { margin: 0; font-size: 14px; color: var(--muted); font-weight: 700; }
.pl-count b { display: inline; font-size: 18px; color: var(--ink); margin: 0; }
.pl-seats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pl-seat { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 8px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line); min-width: 0; }
.pl-seat.team-1 { --team: var(--team-1); } .pl-seat.team-2 { --team: var(--team-2); } .pl-seat.team-3 { --team: var(--team-3); }
.pl-seat.team-4 { --team: var(--team-4); } .pl-seat.team-5 { --team: var(--team-5); } .pl-seat.team-6 { --team: var(--team-6); }
.pl-seat-avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-size: 26px; background: color-mix(in srgb, var(--team, var(--muted)) 16%, var(--surface)); font-weight: 800; }
.pl-seat-name { max-width: 100%; font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-seat.is-taken { border-color: color-mix(in srgb, var(--team, var(--accent)) 50%, var(--line)); }
.pl-seat.is-me { box-shadow: 0 0 0 2px var(--accent); }
.pl-seat.is-empty { border-style: dashed; background: transparent; }
.pl-seat.is-empty .pl-seat-avatar { color: var(--muted); background: transparent; border: 2px dashed var(--line); animation: pl-dot 2.4s ease-in-out infinite; }
.pl-seat.is-empty .pl-seat-name { color: var(--muted); font-weight: 500; font-size: 11.5px; }
.is-first .pl-seat.is-taken { animation: seat-in .4s ease-out both; }
.is-first .pl-seat.is-taken:nth-child(2) { animation-delay: .08s; } .is-first .pl-seat.is-taken:nth-child(3) { animation-delay: .16s; }
.is-first .pl-seat.is-taken:nth-child(4) { animation-delay: .24s; } .is-first .pl-seat.is-taken:nth-child(5) { animation-delay: .32s; } .is-first .pl-seat.is-taken:nth-child(6) { animation-delay: .4s; }
.pl-seat.is-new { animation: pl-join .7s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes pl-join { 0% { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.12); box-shadow: 0 0 0 6px color-mix(in srgb, var(--team, var(--accent)) 35%, transparent); } 100% { transform: none; opacity: 1; } }
.pl-tip { margin: 0; font-size: 13px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .pl-bubbles i, .pl-me-avatar, .pl-dots i, .pl-seat, .pl-seat-avatar { animation: none !important; } }
/* Thin cards on a phone (Nasser 2026-11-06: «أقل مساحة»): avatar, name and score on one line; only the turn's card
   adds a second line with its powers. Two rows of three from five teams. */
@media (max-width: 699px) {
  .control .scores.team-cards .team-card, .control .scores.team-cards .team-card.is-turn,
  .control .scores.team-cards.count-5 .team-card.is-turn, .control .scores.team-cards.count-6 .team-card.is-turn {
    display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 4px 5px; padding: 5px 6px 4px; text-align: start; min-height: 0; border-radius: 10px; }
  .control .scores.team-cards .team-card::before { height: 3px; }
  .control .scores.team-cards .team-card .tc-avatar { width: 20px; height: 20px; font-size: 13px; flex: none; }
  .control .scores.team-cards .team-card .tc-head { flex: 1 1 0; min-width: 0; justify-content: flex-start; }
  .control .scores.team-cards .team-card .tc-name { font-size: 12px; }
  .control .scores.team-cards .team-card .tc-score, .control .scores.team-cards .team-card.is-turn .tc-score { font-size: 15px; line-height: 1; flex: none; }
  .control .scores.team-cards .team-card.is-turn .tc-powers { flex-basis: 100%; justify-content: center; gap: 3px; }
  .control .scores.team-cards .team-card.is-turn .tc-power { min-width: 18px; height: 18px; font-size: 10.5px; }
  .control .scores.team-cards.count-5, .control .scores.team-cards.count-6 { align-items: start; gap: 5px; }
}
@media (max-width: 699px) {
  .control .scores.team-cards .team-card.is-turn .tc-powers { flex-wrap: nowrap; gap: 2px; }
  .control .scores.team-cards .team-card.is-turn .tc-power { min-width: 0; width: 17px; height: 17px; padding: 0; font-size: 10px; border-radius: 5px; }
}
/* One size for every card (Nasser 2026-11-06): the powers are not on the cards at all; the team sees its powers when it
   chooses one. */
.control .scores.team-cards .team-card .tc-powers, .control .scores.team-cards .team-card.is-turn .tc-powers { display: none; }
.control .scores.team-cards .team-card, .control .scores.team-cards .team-card.is-turn { flex-grow: 1; }

/* The board on a phone (Nasser 2026-11-06, second word: «الرجوع إلى الطريقة السابقة»): the categories stay on top as
   columns, their (short) names in small type over up to two lines, the age-group prefix hidden. The TV is unchanged. */
@media (max-width: 600px) {
  .control .pick-board { gap: 5px; padding: 8px; }
  .control .pick-board .pc-pre { display: none; }
  .control .pick-board .pick-cat { white-space: normal; font-size: 10px; line-height: 1.2; padding: 4px 3px; }
  .control .pick-board .pc-label { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 2.4em; word-break: break-word; }
  .control .pick-board .pick-tile { font-size: 14px; }
}

/* The host's bar on their own phone in the waiting room (Nasser 2026-11-06): «ابدأ اللعبة» and «خيارات المنسق». */
.host-bar { position: sticky; bottom: 0; z-index: 8; display: flex; gap: 8px; align-items: center; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: var(--bg); box-shadow: 0 -10px 14px -10px rgb(0 0 0 / .15); }
.host-bar > form { flex: 1; margin: 0; }
.host-bar .btn:disabled { opacity: .5; box-shadow: none; }
.host-menu > summary { list-style: none; gap: 6px; padding: 0 14px; }
.host-menu > summary::-webkit-details-marker { display: none; }
.host-sheet-card h2 { margin: 0; font-size: 20px; }
.hs-code { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px; border-radius: 16px; background: var(--side-bg); color: var(--side-ink); text-align: center; }
.hs-code p { margin: 0; }

/* Answers on the big screen one above the other, each on one line and the whole width, with a letter the audience can
   call out (Nasser 2026-11-06); the same letters on the phones and the panel. */
.screen-options, .screen-options.opts-2 { grid-template-columns: minmax(0, 1fr) !important; gap: 1.4vh; max-width: 1400px; margin-inline: auto; width: 100%; }
.screen-option { display: flex; align-items: center; gap: 2vw; padding: 1.6vh 1.6vw; font-size: 4.4vh; text-align: start; }
.screen-option .opt-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-key { flex: none; display: inline-grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: .5em; background: rgb(255 255 255 / .12); font-weight: 900; font-size: .8em; }
.screen-option .opt-key { background: var(--accent); color: var(--on-accent); }
.screen-option.is-removed .opt-key { background: rgb(255 255 255 / .12); color: inherit; }
.answer .opt-key { margin-inline-end: 10px; background: color-mix(in srgb, var(--muted) 16%, var(--surface)); color: var(--ink); font-size: .85em; }
.answer { display: flex; align-items: center; text-align: start; }
/* A team without an avatar (stage mode): a dot in its colour. */
.control .team-card .tc-avatar:empty { background: var(--team, var(--muted)); width: 12px; height: 12px; }

/* The score as a stock chart after an answer (Nasser 2026-11-06). */
.show-result.has-chart { animation: show-in .3s ease-out both, show-out .35s 2.9s ease-in both; }
.stock { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1.6vw; width: min(80vw, 1100px); padding: 1.4vh 2vw; border-radius: 2vh; background: rgb(0 0 0 / .28); }
.stock-name { font-size: 4vh; font-weight: 800; }
.stock-svg { width: 100%; height: 12vh; overflow: visible; }
.stock-line { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: stock-draw 1.1s .35s ease-out forwards; }
.stock-area { opacity: 0; animation: stock-fade .6s 1s ease-out forwards; }
.stock-dot { opacity: 0; animation: stock-fade .3s 1.4s ease-out forwards, stock-pulse 1s 1.5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.stock.is-up .stock-line, .stock.is-up .stock-dot { stroke: var(--accent); fill: var(--accent); }
.stock.is-up .stock-line { fill: none; }
.stock.is-up .stock-area { fill: color-mix(in srgb, var(--accent) 28%, transparent); }
.stock.is-down .stock-line, .stock.is-down .stock-dot { stroke: #ff6b81; fill: #ff6b81; }
.stock.is-down .stock-line { fill: none; }
.stock.is-down .stock-area { fill: color-mix(in srgb, #ff6b81 25%, transparent); }
.stock-nums { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: .2vh 1vw; direction: ltr; text-align: start; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.stock-from { font-size: 2.6vh; opacity: .65; text-decoration: line-through; grid-column: 1 / -1; }
.stock-arrow { font-size: 4vh; animation: stock-fade .3s 1.3s ease-out both; }
.stock.is-up .stock-arrow, .stock.is-up .stock-delta { color: var(--accent); }
.stock.is-down .stock-arrow, .stock.is-down .stock-delta { color: #ff6b81; }
.stock-to { font-size: 6vh; font-weight: 900; }
.stock-delta { grid-column: 1 / -1; font-size: 3vh; font-weight: 800; animation: count-pop .4s 1.3s ease-out both; }
@keyframes stock-draw { to { stroke-dashoffset: 0; } }
@keyframes stock-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes stock-pulse { 50% { transform: scale(1.5); } }
@media (prefers-reduced-motion: reduce) { .stock-line, .stock-area, .stock-dot, .stock-arrow, .stock-delta { animation: none; opacity: 1; stroke-dashoffset: 0; } }

/* The coordinator's waiting room on a computer gets the room it needs (Nasser 2026-11-06: «العرض غير سليم»): the
   code's digits size to their card, the seats show whole words. */
.control:has(> .lobby.is-contest) { max-width: 1200px; }
.lobby-join { container-type: inline-size; }
.lj-code { gap: clamp(3px, 1.5cqi, 8px); max-width: 100%; }
.lj-digit { width: clamp(28px, 11cqi, 56px); height: clamp(40px, 15cqi, 72px); font-size: clamp(22px, 9cqi, 40px); border-radius: clamp(8px, 3cqi, 14px); }
.lj-digit.gap { margin-inline-start: clamp(4px, 3cqi, 14px); }
.lp-seats { grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); }
@media (min-width: 1200px) { .lp-seats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* «شاشة العرض»: four blocks, side by side on a computer, stacked on a phone. */
.control:has(> .lobby.is-contest) > .screen-card { width: 100%; }
.screen-card > summary { padding-block: 2px; }
.sc-title { display: inline-flex; align-items: center; gap: 8px; }
.sc-title h2 { margin: 0; font-size: 18px; }
.sc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 12px; margin-top: 12px; }
.sc-block { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: color-mix(in srgb, var(--muted) 5%, var(--surface)); min-width: 0; }
.sc-block h3 { margin: 0; font-size: 15px; }
.sc-block p { margin: 0; }
.sc-main { grid-column: 1 / -1; }
.sc-url { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: 10px; background: var(--surface); border: 1px dashed var(--line); min-width: 0; }
.sc-url a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: 14px; }
.sc-url .btn[hidden] { display: none; }
.sc-unpair { margin: 0; }
.sc-row form, .sc-seg form { margin: 0; }
.sc-toggle.is-on { background: color-mix(in srgb, var(--accent) 30%, var(--surface)); border-color: var(--accent); }
.sc-seg { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: color-mix(in srgb, var(--muted) 12%, var(--surface)); align-self: flex-start; }
.sc-seg button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.sc-seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .15); }
.sc-seg button:disabled { opacity: .45; cursor: not-allowed; }
@media (min-width: 1000px) { .sc-main { grid-column: auto; } .sc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* «شاشة العرض» behind one button, in a sheet over the page (Nasser 2026-11-06). */
.screen-card > summary.sc-open { list-style: none; display: inline-flex; gap: 8px; }
.screen-card > summary.sc-open::after { content: none; }
.screen-card:not([open]) .sc-sheet { display: none; }
.sc-sheet > .sc-card { width: min(860px, 100%); }
.sc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sc-head h2 { margin: 0; font-size: 19px; }
.sc-close { border-color: var(--line); color: var(--ink); }
.sc-sheet .sc-grid { margin-top: 0; }
@media (min-width: 900px) { .sc-sheet .sc-main { grid-column: 1 / -1; } }
/* The start bar on a phone: only the hint and the button, at the very bottom (above the menu bar when there is one). */
@media (max-width: 860px) {
  .lobby.is-contest .lobby-start { bottom: env(safe-area-inset-bottom); }
  .coord-page .lobby.is-contest .lobby-start { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
.lobby-note { margin: 0; }
@media (min-width: 900px) { .lobby-note { grid-column: 1 / -1; } }

/* The contestant's waiting room follows the game's theme (Nasser 2026-11-06: «اللون المتدرج متناسق مع لون الثيم»):
   the gradient, the border, the bubbles, the dots and the avatar's ring come from the identity's colours (one theme since
   2026-11-17, light or dark); the team's colour stays on its seat and its name. */
.play-lobby { background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--accent) 38%, var(--surface)) 0%, color-mix(in srgb, var(--brand) 6%, var(--surface)) 55%, var(--surface) 100%);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.pl-bubbles i, .pl-bubbles i:nth-child(2), .pl-bubbles i:nth-child(4) { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.pl-bubbles i:nth-child(odd) { background: color-mix(in srgb, var(--brand) 25%, transparent); }
.pl-dots i { background: var(--accent-shadow); }
.pl-me-avatar { box-shadow: 0 0 0 6px var(--accent), 0 0 0 9px color-mix(in srgb, var(--brand) 20%, transparent), 0 14px 30px color-mix(in srgb, var(--accent-shadow) 45%, transparent); }
.control.play:has(.play-lobby) { border-top-color: var(--accent); }
.pl-me-name { color: var(--ink); opacity: .8; }

/* Joining feels like jelly, leaving falls away (Nasser 2026-11-06): on the big screen's list, the coordinator's seats
   and the phones' seats; a removed phone's page drops with «أزالك المنسق». */
@keyframes jelly-in {
  0% { transform: scale(.2); opacity: 0; }
  35% { transform: scale(1.18, .82); opacity: 1; }
  55% { transform: scale(.88, 1.12); }
  72% { transform: scale(1.06, .95); }
  86% { transform: scale(.98, 1.02); }
  100% { transform: none; }
}
@keyframes drop-out {
  0% { transform: none; opacity: 1; }
  25% { transform: rotate(-6deg) scale(1.05); }
  45% { transform: rotate(5deg); }
  100% { transform: translateY(60px) rotate(18deg) scale(.6); opacity: 0; }
}
.screen-names li.is-new, .pl-seat.is-new, .lp-seat.is-new { animation: jelly-in .8s cubic-bezier(.3, 1.4, .5, 1) both; }
.screen-names li.is-leaving { animation: drop-out .85s ease-in both; background: color-mix(in srgb, var(--bad) 45%, var(--tile)); }
.lp-seat.is-leaving { animation: drop-out .55s ease-in both; border-color: var(--bad); }
.control.is-kicked { animation: drop-out 1s ease-in both; pointer-events: none; }
.kicked { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px; background: color-mix(in srgb, var(--bad) 88%, #000000); color: #ffffff; text-align: center; animation: jelly-in .6s ease-out .25s both; }
.kicked p { margin: 0; font-size: 28px; font-weight: 900; }
@media (prefers-reduced-motion: reduce) { .screen-names li.is-new, .pl-seat.is-new, .lp-seat.is-new, .screen-names li.is-leaving, .lp-seat.is-leaving, .control.is-kicked, .kicked { animation: none; } }

/* The waiting room as a workspace (Nasser 2026-11-06): the QR opens big in a sheet; «ابدأ اللعبة» and «خيارات» side by
   side; on a phone a slim top (the code beside a small QR), the contestants two per line, the bar fixed at the bottom. */
.lj-qr-fold > summary { list-style: none; cursor: zoom-in; position: relative; }
.lj-qr-fold > summary::-webkit-details-marker { display: none; }
.lj-qr-card { align-items: center; text-align: center; background: var(--side-bg); color: var(--side-ink); }
.lj-qr-card .muted { color: var(--side-muted); }
.lj-qr-big { display: block; width: min(320px, 78vw); height: auto; background: #ffffff; border-radius: 18px; padding: 12px; }
.lj-code-big .lj-digit { width: 42px; height: 56px; font-size: 32px; }
.ls-row { display: flex; gap: 8px; align-items: stretch; }
.ls-row > form { flex: 1; min-width: 0; margin: 0; }
.lobby-more > summary { list-style: none; }
.lobby-more > summary::-webkit-details-marker { display: none; }
.ls-more { height: 100%; min-width: 52px; padding: 0 12px; display: grid; place-items: center; }
.lm-card { gap: 14px; }
.lm-card .sc-block { margin: 0; }
@media (max-width: 899px) {
  .control:has(> .lobby.is-contest) { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .control:has(> .lobby.is-contest) > .control-head { margin-bottom: 6px; min-height: 0; }
  .control:has(> .lobby.is-contest) > .control-head h1 { font-size: 16px; }
  .control:has(> .lobby.is-contest) > .screen-card > summary,
  .control:has(> .lobby.is-contest) > p.center,
  .control:has(> .lobby.is-contest) > .end-confirm, .control:has(> .lobby.is-contest) > .end-sheet { display: none; }
  .lobby.is-contest { gap: 10px; }
  .lobby.is-contest .lobby-join > .lj-link, .lobby.is-contest .lobby-join > .lj-hint { display: none; }
  .lobby.is-contest .lobby-join .lj-digit { width: clamp(26px, 8.5cqi, 40px); height: clamp(34px, 11cqi, 50px); font-size: clamp(18px, 6.5cqi, 28px); border-radius: 8px; }
  .lobby.is-contest .lobby-players { padding: 12px; gap: 10px; }
  .lobby.is-contest .lp-seats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .lobby.is-contest .lp-seat { min-height: 50px; padding: 6px 8px; gap: 8px; }
  .lobby.is-contest .lp-avatar { width: 34px; height: 34px; font-size: 19px; }
  .lobby.is-contest .lp-name { font-size: 14px; }
  .lobby.is-contest .lobby-start, .coord-page .lobby.is-contest .lobby-start { position: fixed; inset-inline: 0; bottom: 0; z-index: 30; margin: 0; padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--bg); box-shadow: 0 -8px 20px rgb(0 0 0 / .14); gap: 6px; }
  .coord-page .lobby.is-contest .lobby-start { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .lobby.is-contest .lobby-start p { font-size: 12px; }
}

/* Nasser 2026-11-06 (second pass): on a phone the code alone at the very top (the state title gives it its place), and
   the bottom bar QR 20% · «ابدأ اللعبة» 60% · «خيارات» 20%. */
.lj-qr-fold.in-bar { display: none; }
@media (max-width: 899px) {
  .control:has(> .lobby.is-contest) > .control-head h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .control:has(> .lobby.is-contest) > .control-head:not(:has(> :not(h1))) { display: none; }
  .lobby.is-contest .lobby-join { flex-direction: row; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; text-align: start; }
  .lobby.is-contest .lj-label { font-size: 12px; flex: none; }
  .lobby.is-contest .lj-qr-fold.in-card { display: none; }
  .lobby.is-contest .ls-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr) minmax(0, 1fr); gap: 8px; height: 58px; }
  .lobby.is-contest .ls-row > form, .lobby.is-contest .ls-row > form .lobby-go { height: 100%; }
  .lobby.is-contest .lobby-more, .lobby.is-contest .ls-more { width: 100%; min-width: 0; }
  .lj-qr-fold.in-bar { display: block; min-width: 0; height: 58px; }
  .lobby.is-contest .lobby-more { height: 58px; }
  .lobby.is-contest .ls-more { height: 58px; }
  .lj-qr-fold.in-bar > .lj-qr { height: 58px; box-sizing: border-box; background: #ffffff; display: grid; place-items: center; padding: 4px; border-radius: 12px; box-shadow: 0 0 0 1.5px var(--line); }
  .lj-qr-fold.in-bar > .lj-qr img { width: 48px; height: 48px; }
}

/* Country flags as pictures (Nasser 2026-11-06): big under the question, a line high inside an answer. */
.q-flags, .screen-q-flags { margin: 4px 0 8px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.flag-big { display: block; width: min(200px, 52vw); height: auto; aspect-ratio: 4 / 3; border-radius: 12px; box-shadow: 0 8px 24px rgb(0 0 0 / .28), 0 0 0 1px rgb(0 0 0 / .08); background: #ffffff; }
.screen-q-flags { margin: 0 0 1vh; }
.screen-q-flags .flag-big { width: auto; height: clamp(90px, 18vh, 300px); border-radius: 14px; }
.flag-inline { display: inline-block; vertical-align: -0.2em; width: 1.6em; height: auto; aspect-ratio: 4 / 3; border-radius: 3px; box-shadow: 0 0 0 1px rgb(0 0 0 / .12); margin-inline: .15em; }
.answer .flag-inline, .screen-option .flag-inline { width: 2.2em; }
/* A used power (Nasser 2026-11-06): plainly locked, never tapped again: hatched, grey, its name struck, a «🔒 استُعملت»
   badge, and no hover or press. */
.power-card.is-used, button.power-card.is-used:hover { opacity: 1; cursor: not-allowed; pointer-events: none; border-style: dashed; border-color: var(--line); color: var(--muted);
  background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--muted) 10%, var(--surface)) 0 8px, var(--surface) 8px 16px); box-shadow: none; transform: none; }
.power-card.is-used .pc-icon { filter: grayscale(1); opacity: .5; background: color-mix(in srgb, var(--muted) 14%, var(--surface)); }
.power-card.is-used .pc-name { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }
.power-card.is-used .pc-desc { display: none; }
.power-card.is-used .pc-name { grid-row: 1; grid-column: 2; }
@media (min-width: 900px) { .pc-lock, .power-card.is-used .pc-name { grid-row: auto; grid-column: auto; justify-self: center; } }
.pc-lock { grid-row: 2; grid-column: 2; justify-self: start; margin-top: 4px; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--muted) 22%, var(--surface)); color: var(--ink); }

/* The right answer on the big screen (Nasser 2026-11-06: «لون أخضر متدرج يمثل لون الفوز والانتصار»): green from the
   centre to the edges, never mixed with the theme's colour; the rising line and the streak in light green too. Wrong
   stays all red and out of time all orange the same way. */
.show-result.result-correct, .show-result.result-steal_correct {
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--ok) 88%, #ffffff) 0%, var(--ok) 28%, color-mix(in srgb, var(--ok) 55%, #000000) 70%, color-mix(in srgb, var(--ok) 30%, #000000) 100%); }
.show-result.result-wrong, .show-result.result-steal_wrong {
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--bad) 85%, #ffffff) 0%, var(--bad) 28%, color-mix(in srgb, var(--bad) 55%, #000000) 70%, color-mix(in srgb, var(--bad) 30%, #000000) 100%); }
.show-result.result-timeout {
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--orange) 85%, #ffffff) 0%, var(--orange) 28%, color-mix(in srgb, var(--orange) 55%, #000000) 70%, color-mix(in srgb, var(--orange) 30%, #000000) 100%); }
.show-result.result-correct .stock, .show-result.result-steal_correct .stock { background: rgb(0 0 0 / .22); }
.show-result.result-correct .stock.is-up .stock-line, .show-result.result-correct .stock.is-up .stock-dot,
.show-result.result-steal_correct .stock.is-up .stock-line, .show-result.result-steal_correct .stock.is-up .stock-dot { stroke: color-mix(in srgb, var(--ok) 35%, #ffffff); fill: color-mix(in srgb, var(--ok) 35%, #ffffff); }
.show-result.result-correct .stock.is-up .stock-line, .show-result.result-steal_correct .stock.is-up .stock-line { fill: none; }
.show-result.result-correct .stock.is-up .stock-area, .show-result.result-steal_correct .stock.is-up .stock-area { fill: rgb(255 255 255 / .18); }
.show-result.result-correct .show-streak, .show-result.result-steal_correct .show-streak { color: #ffffff; }

/* «نمط العرض» on the big screen (tokens --scr-* in tokens.css): background, text, and a visible edge on every panel
   (squares, answers, teams, names) for the projector and the bright hall. Overlays keep their own colours. */
body.screen-page { background: var(--scr-bg); color: var(--scr-ink); }
.screen-timer { color: var(--scr-ink); }
.screen-timer::before { background: var(--scr-bg); }
.screen-tile, .screen-option, .screen-scores li, .screen-names li { box-shadow: inset 0 0 0 2px var(--scr-edge); }
.screen-tile.is-taken { color: color-mix(in srgb, var(--scr-ink) 80%, transparent); }
:root[data-look="projector"] .screen-timer { background: conic-gradient(var(--ring) calc(var(--left) * 360deg), rgb(0 0 0 / .12) 0); }
:root[data-look="projector"] .screen-tile.is-played, :root[data-look="projector"] .screen-tile:empty { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--scr-edge) 50%, transparent); }
:root[data-look="projector"] .screen-option.is-removed .opt-key { background: rgb(0 0 0 / .08); }
:root[data-look="projector"] .screen-top { color: var(--scr-ink); }
:root[data-look="contrast"] .screen-q, :root[data-look="contrast"] .screen-option, :root[data-look="contrast"] .screen-tile { font-weight: 900; }
:root[data-look="contrast"] .screen-tile, :root[data-look="contrast"] .screen-option, :root[data-look="contrast"] .screen-scores li { box-shadow: inset 0 0 0 3px var(--scr-edge); }

/* The choice on the panel: three cards with a small preview of each look. */
.look-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.look-pick form { margin: 0; }
.look-card { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; text-align: center; }
.look-card b { font-size: 14px; }
.look-card small { font-size: 11px; color: var(--muted); line-height: 1.3; }
.look-card.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.look-swatch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; width: 64px; padding: 6px; border-radius: 8px; }
.look-swatch i { height: 12px; border-radius: 3px; }
.look-tv .look-swatch { background: var(--brand); } .look-tv .look-swatch i { background: var(--tile); }
.look-projector .look-swatch { background: var(--look-projector-bg); } .look-projector .look-swatch i { background: var(--look-projector-tile); box-shadow: inset 0 0 0 1px var(--look-projector-edge); }
.look-contrast .look-swatch { background: var(--look-contrast-bg); } .look-contrast .look-swatch i { background: var(--look-contrast-tile); box-shadow: inset 0 0 0 1px var(--look-contrast-edge); }
@media (max-width: 420px) { .look-card small { display: none; } }

/* Paused: the pause window is always the top layer, whatever else is open (Nasser 2026-11-06). */
.overlay[data-paused] { z-index: 60; pointer-events: auto; }

/* The coordinator's bell (nhmsv NOTIFICATIONS.md §4, Nasser 2026-11-07): the unread count in red up to 9, the last five
   above it at the foot of the side menu (below the bar on a phone), and «عرض الكل». No script. */
.coord-bell { position: relative; }
.coord-bell > summary { position: relative; list-style: none; cursor: pointer; }
.coord-bell > summary::-webkit-details-marker { display: none; }
.coord-bell .bell-count { position: absolute; top: -6px; inset-inline-end: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--bad);
  color: #ffffff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }
.coord-bell .bell-panel { position: fixed; bottom: 96px; inset-inline-start: 16px; z-index: 60; width: min(320px, calc(100vw - 24px)); padding: 12px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 14px 40px rgb(0 0 0 / .25); display: flex; flex-direction: column; gap: 6px; text-align: start; }
.bell-item { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 10px; color: var(--muted); text-decoration: none; line-height: 1.45; }
.bell-item strong { font-size: 14px; }
.bell-item.unread { color: var(--ink); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.bell-item.unread strong::before { content: '● '; color: var(--bad); font-size: 10px; vertical-align: 2px; }
.bell-item:hover { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.coord-bell .bell-all { align-self: center; font-weight: 700; color: var(--ink); }
@media (max-width: 860px) { .coord-bell .bell-panel { position: fixed; top: 60px; bottom: auto; inset-inline: 12px; width: auto; } }

/* «الإشعارات» page: the list, then what reaches the coordinator with the optional types' mute. */
.notify-page { display: flex; flex-direction: column; gap: 14px; }
.notify-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.notify-items a { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); text-decoration: none; }
.notify-items a.unread { color: var(--ink); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.notify-new { display: inline-block; margin-inline-start: 6px; padding: 1px 8px; border-radius: 999px; background: var(--bad); color: #ffffff; font-size: 11px; font-weight: 800; vertical-align: 2px; }
.notify-items time { font-size: 12px; color: var(--muted); }
.notify-types { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.notify-types li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; }
.notify-types li + li { border-top: 1px solid var(--line); }
.notify-types form { margin: 0; }

.notify-types .nt-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notify-types .nt-text b { display: inline; }
.nt-basic { display: inline-block; margin-inline-start: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: color-mix(in srgb, var(--muted) 14%, var(--surface)); color: var(--muted); vertical-align: 2px; }

/* The choice live on everyone else's board (Nasser 2026-11-07): the category column and the value row light up, the
   square stands out, and a line above the board says who chooses what. */
.preview-note { margin: 0 0 8px; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 22%, var(--surface)); font-weight: 800; text-align: center; animation: count-pop .3s ease-out both; }
.pick-board.is-previewing .pick-cat.pv-col { background: var(--accent); color: var(--on-accent); }
.pick-board.is-previewing .pick-tile.pv-col, .pick-board.is-previewing .pick-tile.pv-row { background: color-mix(in srgb, var(--accent) 30%, var(--tile)); }
.pick-board.is-previewing .pick-tile.pv-tile { background: var(--accent); color: var(--on-accent); transform: scale(1.08); box-shadow: 0 0 0 3px #ffffff, 0 8px 22px rgb(0 0 0 / .35); z-index: 2; position: relative; transition: transform .15s; }
@media (prefers-reduced-motion: reduce) { .preview-note { animation: none; } .pick-board.is-previewing .pick-tile.pv-tile { transform: none; } }
.pick-board.is-locked.is-previewing { filter: none; }
.pick-board.is-locked.is-previewing .pick-tile:not(.pv-col):not(.pv-row) { opacity: .45; }
.pick-board.is-locked.is-previewing .pick-tile.pv-col, .pick-board.is-locked.is-previewing .pick-tile.pv-row { opacity: .9; }
.pick-board.is-locked.is-previewing .pick-tile.pv-tile { opacity: 1; }
/* The contestant's own result on their phone (Nasser 2026-11-07): the whole screen green or red from the centre, the
   card clear on it, and the score chart sized for the phone; it stays a little longer than others' results. */
.overlay.is-result.is-mine { align-items: center; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--ok) 85%, #ffffff) 0%, var(--ok) 30%, color-mix(in srgb, var(--ok) 45%, #000000) 100%); animation: show-out .3s 2.6s ease-in both; }
.overlay.is-result.is-mine.mine-down { background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--bad) 85%, #ffffff) 0%, var(--bad) 30%, color-mix(in srgb, var(--bad) 45%, #000000) 100%); }
.overlay.is-mine > .card.phone-result { background: transparent; box-shadow: none; gap: 14px; padding: 28px 16px; }
.overlay.is-mine .phone-result-title { font-size: 40px; text-shadow: 0 4px 18px rgb(0 0 0 / .25); animation: count-pop .5s ease-out both; }
.pr-stock { width: 100%; display: grid; grid-template-columns: 1fr; gap: 10px; padding: 14px 12px; border-radius: 18px; background: rgb(0 0 0 / .22); }
.pr-stock .stock-svg { width: 100%; height: 90px; }
.pr-stock .stock-nums { display: flex; align-items: baseline; justify-content: center; gap: 10px; direction: ltr; color: #ffffff; }
.pr-stock .stock-from { font-size: 18px; opacity: .7; text-decoration: line-through; }
.pr-stock .stock-arrow { font-size: 20px; }
.pr-stock .stock-to { font-size: 44px; font-weight: 900; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.pr-stock .stock-delta { font-size: 20px; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: rgb(255 255 255 / .2); }
.pr-stock.is-up .stock-line, .pr-stock.is-up .stock-dot { stroke: #ffffff; fill: #ffffff; }
.pr-stock.is-down .stock-line, .pr-stock.is-down .stock-dot { stroke: #ffffff; fill: #ffffff; }
.pr-stock .stock-line { fill: none; }
.pr-stock .stock-area { fill: rgb(255 255 255 / .18); }
@media (prefers-reduced-motion: reduce) { .overlay.is-result.is-mine, .overlay.is-mine .phone-result-title { animation: none; } }
.overlay.is-mine .pr-stock .stock-to { font-size: 52px; line-height: 1; color: #ffffff; }
.overlay.is-mine .pr-stock .stock-delta { color: #ffffff; background: rgb(255 255 255 / .22); }
.overlay.is-mine .pr-stock .stock-arrow { color: #ffffff; }
.overlay.is-mine .pr-stock .stock-from { color: #ffffff; }
.pr-stock .stock-nums > * { direction: ltr; unicode-bidi: isolate; }
/* «عرض كما يراه المنسق» from the admin panel: a read-only strip on top (nhmsv ADMIN_UNIFIED_PAGES.md §2). */
.view-as-strip { margin: -32px calc(-1 * clamp(16px, 4vw, 48px)) 16px; padding: 8px 16px; background: var(--ink); color: var(--surface); font-size: 14px; text-align: center; }
.view-as-strip a { color: inherit; text-decoration: underline; margin-inline-start: 8px; }

/* The hand-written art (docs/ART.md). An empty list: its picture above the line of text (the files keep to greys and
   the gold, so they sit on a light or a dark card). An inline icon takes the colour of the text around it. */
.empty-state { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-block: 22px; text-align: center; }
.empty-state img { width: min(240px, 70%); height: auto; }
.empty-state.is-small { padding-block: 8px; }
.empty-state.is-small img { width: min(160px, 50%); }
.empty-state p { margin: 0; }
.art-icon { display: block; flex: none; }

/* Public pages (note per1jb8k2m4n6p0r3t5v). The header: the name never wraps or meets the sign-in link (320 px up). */
.brand strong { white-space: nowrap; }
.top-tools { flex: none; align-items: center; }
.ta-short { display: none; }
@media (max-width: 420px) { .ta-full { display: none; } .ta-short { display: inline; } }
@media (max-width: 359px) {
  .top-in { gap: 8px; padding-inline: 12px; }
  .brand { gap: 8px; }
  .brand img { width: 30px; height: 30px; }
  .brand strong { font-size: 17px; }
  .top-tools { gap: 6px; }
}
/* The landing scene: the board on a TV with its stand, and two phones in front (HTML and CSS only, no image). */
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.hero-gets { max-width: 52ch; }
.scene { position: relative; width: 100%; max-width: 600px; justify-self: center; padding-bottom: 116px; }
.scene-tv { background: var(--brand); border: 4px solid var(--tile); border-radius: 22px; padding: 8px; box-shadow: 0 18px 40px color-mix(in srgb, var(--brand) 28%, transparent); }
.scene-tv .board { max-width: none; border-radius: 14px; padding: 8px; gap: 8px; }
.scene-tv .board-tile { padding-block: 10px; border-radius: 10px; }
.scene-scores { display: flex; justify-content: center; gap: 10px; padding: 4px 8px 6px; }
.scene-score { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; background: var(--tile); color: var(--on-brand); font-size: 13px; font-weight: 700; white-space: nowrap; }
.scene-score.is-turn { box-shadow: 0 0 0 2px var(--accent); }
.scene-score b { font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.scene-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--team-2); }
.scene-dot.team-a { background: var(--team-1); }
.scene-stand { display: block; width: 28%; height: 12px; margin-inline: auto; background: var(--tile); border-radius: 0 0 12px 12px; }
.scene-phone { position: absolute; bottom: 0; width: clamp(112px, 29%, 150px); display: grid; gap: 6px; padding: 14px 9px 12px; background: var(--surface); color: var(--ink); border: 3px solid var(--brand); border-radius: 22px; box-shadow: 0 12px 26px color-mix(in srgb, var(--brand) 32%, transparent); font-size: 12px; line-height: 1.3; text-align: center; }
.scene-phone.is-a { inset-inline-start: 5%; transform: rotate(-4deg); }
.scene-phone.is-b { inset-inline-end: 5%; transform: rotate(4deg); }
.scene-phone b { font-size: 13px; }
.scene-notch { justify-self: center; width: 34%; height: 4px; border-radius: 4px; background: var(--line); }
.scene-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.scene-mini i { height: 16px; border-radius: 5px; background: var(--tile); }
.scene-mini i.is-picked { background: var(--accent); box-shadow: 0 0 0 2px var(--accent-shadow); }
.scene-cta { padding: 4px 6px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-weight: 800; }
.scene-opt { padding: 3px 6px; border-radius: 8px; border: 1.5px solid var(--line); font-weight: 600; }
.scene-opt.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
:root[data-theme="dark"] .scene-phone { border-color: var(--cat); }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .scene-phone { border-color: var(--cat); } }
/* The first-game steps' call to action, and the big-groups answer. */
.start-cta { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.start-cta p { flex: 1 1 320px; color: var(--ink); font-weight: 600; }
.start-cta .badge-soon { margin: 0; align-self: center; }
.big-groups { grid-column: 1 / -1; border-color: var(--accent-shadow); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.big-groups p { color: var(--ink); max-width: 80ch; }
.big-groups p + p { margin-top: 6px; }
/* /pricing and /about. */
.pricing { max-width: 960px; margin-inline: auto; gap: 20px; }
.pricing h1 { font-size: clamp(28px, 4vw, 40px); }
.pricing h2 { font-size: 22px; margin: 0; }
.pricing .lead { max-width: 60ch; }
.pricing-trial { border-color: var(--accent-shadow); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.pricing-trial p { color: var(--ink); }
.pricing-trial p:first-of-type { font-size: 18px; font-weight: 700; }
.pricing-soon { font-weight: 700; margin: 0; }
.pricing-business p { color: var(--ink); }
.about .facts, .about dl.card { padding: 16px 18px; }
.terms section h2 { font-size: 20px; margin-bottom: 6px; }
.terms section p { margin-bottom: 6px; }
.foot-links { flex-wrap: wrap; }
.foot-support { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
@media (max-width: 600px) { .scene { padding-bottom: 148px; } }

/* ---- Persona test of two full games (2026-11-08), fixed 2026-11-13 ------------------------------------------------ */
/* Names in the phones' score bar were cut to one letter («ا…», «👑 ال…»): each thin card now gives its second line to the
   whole name (up to two lines); the avatar and the score share the first. The leader's crown sits beside the name. */
.tc-crown { flex: none; font-size: 12px; line-height: 1; }
@media (max-width: 699px) {
  .control .scores.team-cards[class] .team-card[class] { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: 'av score' 'head head'; align-items: center; justify-items: stretch; gap: 2px 4px; text-align: start; }
  .control .scores.team-cards[class] .team-card[class] > .tc-avatar { grid-area: av; }
  .control .scores.team-cards[class] .team-card[class] > .tc-score { grid-area: score; justify-self: end; }
  .control .scores.team-cards[class] .team-card[class] > .tc-head { grid-area: head; justify-content: flex-start; gap: 3px; min-width: 0; }
  .control .scores.team-cards[class] .team-card[class] .tc-name { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; line-height: 1.25; font-size: 11.5px; text-align: start; }
}
/* The page's title was cut too («ال…»): the test-mode tag moves to its own thin line above the bar. */
.game-page .control-head { flex-wrap: wrap; }
.game-page .control-head .game-test { order: -1; flex: 1 0 100%; text-align: center; font-size: 10.5px; line-height: 1.5; padding: 0 6px; border-radius: 6px; }
.game-page .control-head h1 { flex: 1 1 3.5em; min-width: 3.5em; }
/* «سرقة!» stays still (its pulse changed its size, so it was hard to tap): only a glow breathes around it. */
.steal-btn { animation: steal-glow 1.2s ease-in-out infinite; }
@keyframes steal-glow { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 35%, transparent); } }
@media (prefers-reduced-motion: reduce) { .steal-btn { animation: none; } }
/* The power sheet: «بلا قوة» is first and marked as the default. */
button.power-card.is-none.is-default { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface)); box-shadow: 0 0 0 2px var(--accent) inset; }
button.power-card.is-none.is-default .pc-icon { background: var(--accent); color: var(--on-accent); }
/* The result on the coordinator's panel: a line in the page above the question, never over its buttons. */
.result-inline > .card.phone-result { padding: 10px 14px; gap: 2px; animation: show-in .3s ease-out both; }
.result-inline .phone-result .phone-result-title { font-size: 22px; animation: none; }
.result-inline .phone-result .phone-result-points { font-size: 18px; }
@media (prefers-reduced-motion: reduce) { .result-inline > .card.phone-result { animation: none; } }
/* The right answer on a phone: a full green frame with its tick, and the chosen wrong one clearly red. */
.control .answer.is-correct { border-width: 3px; border-color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 26%, transparent); font-weight: 800; }
.control .answer.is-wrong { border-width: 3px; border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--surface)); }
.play .answer.is-correct { animation: count-pop .5s ease-out both; }
.play .answer.is-correct::after { content: '✓'; margin-inline-start: auto; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ok); color: #ffffff; font-weight: 900; }
@media (prefers-reduced-motion: reduce) { .play .answer.is-correct { animation: none; } }
/* The contestant's ending: their place and score big; the winner's card glows (confetti and sound from game.js). */
.play-final { text-align: center; justify-items: center; gap: 6px; border-top: 6px solid var(--team, var(--accent)); }
.play-final .pf-medal { font-size: 64px; line-height: 1.1; }
.play-final h2 { margin: 0; font-size: 28px; }
.play-final .pf-score { margin: 0; display: grid; justify-items: center; }
.play-final .pf-score b { font-size: 44px; font-weight: 900; line-height: 1.1; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.play-final.is-winner { background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--accent) 38%, var(--surface)), var(--surface) 72%); }
.play-final.is-winner .pf-medal { animation: count-pop .7s ease-out both; }
@media (prefers-reduced-motion: reduce) { .play-final.is-winner .pf-medal { animation: none; } }
.tie-tag { font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; }

/* The big screen's ending fits one screen (1920×1080 cut «أبرز لحظات اللعبة»): the podium takes the height that is
   left, the places after the third are pills in one row (their colour band no longer hangs at the screen's edge). */
.screen-stage > .screen-final { flex: 1; min-height: 0; margin: 0 auto; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 1.4vh; align-content: stretch; }
.screen-final .screen-winner { font-size: 5vh; margin-bottom: 7.5vh; }
.screen-final .screen-podium { min-height: 0; height: 100%; align-items: flex-end; }
.screen-final .podium-step { min-height: 0; align-content: center; }
.screen-final .podium-1 { height: 100%; }
.screen-final .podium-2 { height: 80%; }
.screen-final .podium-3 { height: 64%; }
.screen-final .screen-ranking { display: flex; flex-wrap: wrap; justify-content: center; gap: 1vh 1vw; font-size: 3vh; }
.screen-final .screen-ranking li { align-items: center; gap: 1vw; padding: .5vh 1.6vw; border-radius: 999px; background: var(--tile); border-inline-start: .8vh solid var(--team, transparent); }
.screen-final .screen-ranking .screen-score { font-size: 3vh; }
.podium-tie { font-size: 1.8vh; font-weight: 700; line-height: 1.6; background: rgb(255 255 255 / .22); border-radius: 999px; padding: 0 1vw; }
.screen-final .summary-card { padding: .6vh 1vw; }
/* The countdown stays readable over the red «يسرق!» panel and every other panel: on top, with its own dark disc. */
.screen-timer { z-index: 35; box-shadow: 0 0 0 .5vh rgb(0 0 0 / .4); }
/* The powers under each team's name on the TV were too small to read from a sofa. */
.screen-scores .screen-powers { font-size: 2.6vh; opacity: 1; letter-spacing: .2vw; }
/* Category names on the board: bigger, on two lines when long. */
.screen-cat { font-size: 2.9vh; line-height: 1.2; padding: .8vh .4vw; text-wrap: balance; }
/* The big screen is exactly one screen tall, whatever it shows (note d8ea, 2026-11-13): as a growing flex child of the
   page its height followed its content, so a tall ending ran below the TV's edge instead of fitting. */
body.screen-page { height: 100dvh; overflow: hidden; }
body.screen-page > .screen { flex: 0 0 auto; height: 100dvh; }
/* The leader's crown on a phone's thin card sits on the avatar's corner, so the name keeps its whole line. */
@media (max-width: 699px) {
  .control .scores.team-cards[class] .team-card[class] .tc-crown { position: absolute; top: 0; inset-inline-start: 20px; font-size: 11px; }
  .control .scores.team-cards[class] .team-card[class] .tc-name { overflow-wrap: break-word; }
}
.play-final .pf-score b { color: var(--ink); }
.screen-final .screen-winner { margin-bottom: 5.5vh; }
.screen-final .podium-step { padding: 4.2vh 1vw 1vh; gap: .2vh; align-content: end; }
.screen-final .podium-2 { height: 84%; }
.screen-final .podium-3 { height: 70%; }
.screen-final .podium-avatar { font-size: 4.6vh; }
.screen-final .podium-step .podium-name { font-size: 3vh; line-height: 1.25; }
.screen-final .podium-1 .podium-name { font-size: 3.4vh; }
.screen-final .podium-step .podium-score { font-size: 4vh; line-height: 1.2; }
.screen-final .podium-1 .podium-score { font-size: 4.8vh; }
.screen-final .podium-step .podium-tie { position: absolute; top: 1vh; inset-inline-end: 1vh; }

/* /tv: the screen's code field on a TV (Game\TvCodes), and the codes on the coordinator's «شاشة العرض». */
.tv-code-line { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tv-code { font-size: 20px; font-weight: 900; letter-spacing: .06em; background: color-mix(in srgb, var(--accent) 22%, var(--surface)); border-radius: 8px; padding: 2px 10px; }
/* Optional rules and helpers of 2026-11-13: the «إنجليزي» tag on an English-language category, and «إزالة جميع اللاعبين». */
.cat-lang { display: inline-block; font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; vertical-align: middle; }
.cat-lang.cat-season { border-color: var(--accent); color: var(--ink); }
.lp-clear { margin-top: 8px; text-align: center; }

/* The coordinator's success screens (note suc3jb): the card after creating a game, and the result's summary. */
.created-actions { justify-content: flex-start; }
.result-winner { margin: 0; font-size: 20px; font-weight: 900; text-align: center; }

/* «لاعبون تجريبيون» (Game\TestPlayers): the sheet in the waiting room and the trial note. */
.bots-add { margin-top: 8px; }
.bots-set { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.bots-set legend { font-weight: 700; padding: 0; margin-bottom: 4px; }
.bots-set p { margin: 0; }
.bots-confirm { align-items: flex-start; }
.bots-trial { border-inline-start: 4px solid var(--info); }
.lp-seat.is-bot .lp-name { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; font-size: 13px; }

/* The drawn art in the game (docs/ART.md «Integration notes»): masks keep the strict CSP and take the colour around them. */
.icon-power, .icon-crown, .cat-icon { display: inline-block; width: 24px; height: 24px; vertical-align: middle; background: center / contain no-repeat; }
.icon-power-help { background-image: url("/img/3d/power-help.webp?v=1"); }
.icon-power-double { background-image: url("/img/3d/power-double.webp?v=1"); }
.icon-power-luck { background-image: url("/img/3d/power-luck.webp?v=1"); }
.icon-power-steal { background-image: url("/img/3d/power-steal.webp?v=1"); }
.icon-power-protect { background-image: url("/img/3d/power-protect.webp?v=1"); }
.icon-power-none { background-image: url("/img/3d/power-none.webp?v=1"); }
.icon-crown { background-image: url("/img/3d/medal-1.webp?v=1"); margin-inline-end: .25em; }
.cat-icon[data-cat-icon="animals"] { background-image: url("/img/3d/cat-science.webp?v=1"); }
.cat-icon[data-cat-icon="arabic"] { background-image: url("/img/3d/cat-literature.webp?v=1"); }
.cat-icon[data-cat-icon="arts"] { background-image: url("/img/3d/cat-art.webp?v=1"); }
.cat-icon[data-cat-icon="books"] { background-image: url("/img/3d/cat-literature.webp?v=1"); }
.cat-icon[data-cat-icon="brands"] { background-image: url("/img/3d/cat-general.webp?v=1"); }
.cat-icon[data-cat-icon="cars"] { background-image: url("/img/3d/cat-tech.webp?v=1"); }
.cat-icon[data-cat-icon="coins"] { background-image: url("/img/3d/cat-general.webp?v=1"); }
.cat-icon[data-cat-icon="cooking"] { background-image: url("/img/3d/cat-food.webp?v=1"); }
.cat-icon[data-cat-icon="economy"] { background-image: url("/img/3d/cat-general.webp?v=1"); }
.cat-icon[data-cat-icon="emoji"] { background-image: url("/img/3d/cat-general.webp?v=1"); }
.cat-icon[data-cat-icon="english"] { background-image: url("/img/3d/cat-literature.webp?v=1"); }
.cat-icon[data-cat-icon="food"] { background-image: url("/img/3d/cat-food.webp?v=1"); }
.cat-icon[data-cat-icon="games"] { background-image: url("/img/3d/cat-tech.webp?v=1"); }
.cat-icon[data-cat-icon="general"] { background-image: url("/img/3d/cat-general.webp?v=1"); }
.cat-icon[data-cat-icon="generic"] { background-image: url("/img/3d/cat-general.webp?v=1"); }
.cat-icon[data-cat-icon="geography"] { background-image: url("/img/3d/cat-geography.webp?v=1"); }
.cat-icon[data-cat-icon="health"] { background-image: url("/img/3d/cat-science.webp?v=1"); }
.cat-icon[data-cat-icon="history"] { background-image: url("/img/3d/cat-history.webp?v=1"); }
.cat-icon[data-cat-icon="kids"] { background-image: url("/img/3d/cat-general.webp?v=1"); }
.cat-icon[data-cat-icon="math"] { background-image: url("/img/3d/cat-science.webp?v=1"); }
.cat-icon[data-cat-icon="music"] { background-image: url("/img/3d/cat-art.webp?v=1"); }
.cat-icon[data-cat-icon="places"] { background-image: url("/img/3d/cat-countries.webp?v=1"); }
.cat-icon[data-cat-icon="plants"] { background-image: url("/img/3d/cat-science.webp?v=1"); }
.cat-icon[data-cat-icon="religion"] { background-image: url("/img/3d/cat-ramadan.webp?v=1"); }
.cat-icon[data-cat-icon="riddles"] { background-image: url("/img/3d/cat-general.webp?v=1"); }
.cat-icon[data-cat-icon="science"] { background-image: url("/img/3d/cat-science.webp?v=1"); }
.cat-icon[data-cat-icon="sea"] { background-image: url("/img/3d/cat-geography.webp?v=1"); }
.cat-icon[data-cat-icon="space"] { background-image: url("/img/3d/cat-science.webp?v=1"); }
.cat-icon[data-cat-icon="sports"] { background-image: url("/img/3d/cat-sports.webp?v=1"); }
.cat-icon[data-cat-icon="technology"] { background-image: url("/img/3d/cat-tech.webp?v=1"); }
.cat-icon[data-cat-icon="time"] { background-image: url("/img/3d/cat-general.webp?v=1"); }
.cat-icon[data-cat-icon="true-false"] { background-image: url("/img/3d/cat-general.webp?v=1"); }
.cat-icon[data-cat-icon="weather"] { background-image: url("/img/3d/cat-geography.webp?v=1"); }
.screen-cat { gap: .4vh; }
.screen-cat .cat-icon { width: 3.4vh; height: 3.4vh; opacity: .9; }
.screen-powers .icon-power { width: max(18px, 2.4vh); height: max(18px, 2.4vh); margin-inline-end: .5vw; }
.screen-scores .screen-powers .icon-power { width: max(18px, 3vh); height: max(18px, 3vh); }
.show-power .icon-power, .screen-power .icon-power { margin-inline-end: .2em; }
.summary-who .icon-power { width: 1em; height: 1em; }
.screen-names .screen-none { display: grid; justify-items: center; gap: 1vh; }
.screen-names .screen-none img { width: min(240px, 30vh); height: auto; }
.podium-medal img, .cer-medal img, .pf-medal img { display: block; width: 1em; height: 1em; margin-inline: auto; }
/* The category icon sits above its name, as on the screen: the name keeps the whole width of a narrow column. */
.pick-cat .ic3 { display: block; margin: 0 auto 2px; }
.pc-label { display: block; overflow: hidden; text-overflow: ellipsis; }
.tc-power .ic3, .tc-crown .ic3 { display: block; }
.intro-power .ic3 { vertical-align: -6px; }
.final-podium { display: block; width: 100%; max-width: 320px; height: auto; margin: 0 auto; }
.result-cup { width: 28px; height: 28px; vertical-align: -6px; }

/* «جرّب لعبة تجريبية» (Game\DemoGames, docs/DEMO_GAME.md). */
.hero-try { display: grid; gap: 4px; justify-items: start; margin-top: 4px; }
.hero-try .btn { width: auto; }
.demo-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; }
.demo-end { margin: 0; }
.demo-refused img { display: block; margin: 0 auto 8px; height: auto; max-width: 100%; }

/* «ادعُ صديقاً» on «الباقات» (Billing\Referrals) */
.invite-card h2 { margin: 0; font-size: 18px; }
.invite-link { margin: 0; overflow-wrap: anywhere; }
.invite-rewards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.invite-rewards li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.invite-state { padding: 1px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid var(--line); }
.invite-state.is-valid { background: var(--accent); color: var(--on-accent); border-color: transparent; }

/* /tv: the reverse way beside the typed key (Game\ScreenPairing) */
/* «كم لاعباً تقريباً؟» on «لعبة جديدة», stage games only (docs/PLAYER_STATS.md) */
.setup-players { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-block: 8px; }
.setup-players input { width: 7em; }
.setup:has(input[name=mode][value=contest]:checked) .setup-players { display: none; }

/* «كيف كانت اللعبة؟» on the coordinator's result (docs/PLAYER_STATS.md): five stars, 1 first in reading order */
.rate-stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; border: 0; padding: 0; margin: 0; }
.rate-stars legend { margin-block-end: 6px; }
.rate-stars label { cursor: pointer; font-size: 32px; line-height: 1; color: var(--line); }
.rate-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate-stars label:hover, .rate-stars label:hover ~ label, .rate-stars label:has(input:checked), .rate-stars label:has(input:checked) ~ label { color: var(--accent); }
.rate-stars label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.rate-card textarea { width: 100%; }
.rate-given { color: var(--accent); letter-spacing: 2px; }

/* «أسئلتي» (migration 024): the coordinator's own categories and questions; «فئتي» in «لعبة جديدة». */
.cat-lang.cat-mine { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.mq-options, fieldset.mq-type { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
fieldset.mq-type { flex-direction: row; flex-wrap: wrap; }
.mq-option { display: flex; gap: 8px; align-items: center; }
.mq-option input:not([type]) { flex: 1; min-width: 0; }
.mq-correct { display: flex; align-items: center; gap: 4px; flex: none; min-height: 44px; }
.mq-type:has(input[value="tf"]:checked) ~ .mq-options [data-mq-choice] { display: none; }
.mq-q summary { display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.mq-q > form, .mq-q > .row-actions { margin-top: 12px; }
.mq-off summary > span:first-child { color: var(--muted); text-decoration: line-through; }
.mq-q textarea, .account textarea { width: 100%; }
/* «لصق» beside the code fields (nhmsv UX_RULES.md §1; templates/partials/paste.php, paste.js): at least 44px tall. */
.paste-btn { min-height: 44px; }
.coupon-row .paste-btn { padding: 0 12px; }
/* The platform's state in the coordinator menu's foot, instead of a strip over their pages (quizboard#346). */
.coord-state { color: var(--side-muted); font-size: 12px; text-decoration: none; }
.coord-state:hover { color: var(--side-ink); text-decoration: underline; }
.state-line { display: block; }

/* The team whose turn it is fills with its own colour, the others step back (Nasser 2026-11-16: not just a frame), on
   the big screen, the coordinator's panel and the phones. Team colours carry white text at AA for large text. */
.screen-scores.has-turn li:not(.is-turn) { opacity: .55; }
.screen-scores li.is-turn { background: var(--team, var(--accent)); border-color: var(--team, var(--accent)); color: #ffffff; opacity: 1; }
.screen-scores li.is-turn .screen-powers { opacity: 1; }
.scores.team-cards.has-turn .team-card:not(.is-turn) { opacity: .6; background: color-mix(in srgb, var(--muted) 10%, var(--surface)); }
.team-card.is-turn { background: var(--team, var(--accent)); color: #ffffff; }
.team-card.is-turn::before { background: color-mix(in srgb, #ffffff 35%, transparent); }
.team-card.is-turn .tc-turn { background: #ffffff; color: var(--team, var(--brand)); }
.team-card.is-turn .tc-power { color: inherit; }
.team-card.is-turn .tc-power.is-used { opacity: .45; }
/* Stage mode, time up (Nasser 2026-11-16): the screen says so while the coordinator decides. */
.screen-timeup { margin: 0; align-self: center; padding: 1vh 3vw; border-radius: 999px; background: var(--bad); color: #ffffff; font-size: 4vh; font-weight: 900; }
.alert.time-up b { margin-inline-end: 6px; }
/* «قرعة ترتيب الفرق» (Nasser 2026-11-16): stage mode only; contest games always draw. */
.setup-draw { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.setup:has(input[name=mode][value=contest]:checked) .setup-draw { display: none; }
/* /tv: the code in boxes (Nasser 2026-11-16), left to right, the real field over them (transparent) for typing. */

/* /tv, laid out like the Wesh app's screen pages (Nasser 2026-11-16): two ways, one at a time. Sizes follow the
   screen's height so a TV, a projector and a laptop look alike; a portrait phone gets one column and its own keyboard. */
body.tv-entry { background: radial-gradient(ellipse 70% 80% at 72% 18%, color-mix(in srgb, var(--tile) 85%, var(--brand)), var(--brand) 75%) fixed, var(--brand); color: #ffffff; overflow: auto; }
.tv-stage { min-height: 100dvh; display: grid; place-items: center; padding: 4vh 4vw; }
.tv-way { width: min(100%, 1700px); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6vw; }
.tv-way[hidden] { display: none; }
.tv-way-code:not(.has-keys) { grid-template-columns: minmax(0, 1fr); }
.tv-side { display: grid; justify-items: center; gap: 2.2vh; text-align: center; min-width: 0; }
.tv-icon { width: 15vh; height: 15vh; border-radius: 3.4vh; }
.tv-title { margin: 0; font-size: 5.6vh; font-weight: 800; line-height: 1.2; }
.tv-title.is-inline { display: flex; align-items: center; gap: 2.2vh; }
.tv-title.is-inline img { width: 11.5vh; height: 11.5vh; border-radius: 2.6vh; flex: none; }
.tv-lead { margin: 0; font-size: 3vh; color: rgb(255 255 255 / .72); }
.tv-error { margin: 0; font-size: 2.6vh; font-weight: 800; background: var(--bad); color: #ffffff; border-radius: 1.4vh; padding: 1.2vh 2vw; }
.tv-form { display: grid; justify-items: center; gap: 2vh; width: 100%; }
.tv-field { display: flex; align-items: center; gap: 1.6vh; font-size: 5.4vh; font-weight: 800; max-width: 100%; }
.tv-prefix { font-weight: 800; }
.tv-field input { width: 9.5ch; max-width: 60vw; border: 0; border-bottom: .5vh solid var(--accent); background: transparent; color: inherit; font: inherit; letter-spacing: .08em; text-transform: uppercase; outline: none; border-radius: 0; padding: 0 .2em; box-shadow: none; min-height: 0; }
.tv-field.has-boxes { position: relative; }
.tv-field.has-boxes input { position: absolute; inset: 0; width: 100%; max-width: none; height: 100%; opacity: 0; border: 0; cursor: text; caret-color: transparent; }
.tv-boxes { display: flex; gap: 1.1vh; direction: ltr; }
.tv-boxes .tv-cell:nth-child(5) { margin-inline-start: 1.6vh; }
.tv-cell { display: grid; place-items: center; width: 7vh; height: 9.2vh; border-radius: 1.6vh; background: #ffffff; color: var(--brand); border: .45vh solid transparent; font-size: 5.6vh; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.tv-cell.is-extra:not(.is-filled):not(.is-active) { opacity: .7; }
.tv-cell.is-active { border-color: var(--accent); box-shadow: 0 0 0 .4vh color-mix(in srgb, var(--accent) 35%, transparent); }
.tv-host { margin: 0; font-size: 2.6vh; color: rgb(255 255 255 / .62); }
.tv-paste-hint { margin: 0; font-size: 2.4vh; color: rgb(255 255 255 / .8); }
.tv-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1vh 4vh; }
.tv-link { display: inline-flex; align-items: center; gap: 1vh; border: 0; background: transparent; color: #ffffff; font: inherit; font-size: 2.8vh; font-weight: 800; padding: 1vh 1.4vh; border-radius: 1.2vh; cursor: pointer; min-height: 44px; }
.tv-link[hidden] { display: none; }
.tv-ico { width: 1.15em; height: 1.15em; flex: none; }
.tv-open { border: 0; border-radius: 999px; padding: 1.6vh 5vw; background: var(--accent); color: var(--on-accent); font: inherit; font-size: 3vh; font-weight: 800; cursor: pointer; min-height: 44px; }
.tv-way-code.has-keys .tv-open { display: none; }
.tv-keys { display: grid; grid-template-columns: repeat(8, 7.2vh); gap: 1.1vh; }
.tv-keys[hidden] { display: none; }
.tv-key { display: grid; place-items: center; height: 7.2vh; border-radius: 1.4vh; border: 1px solid rgb(255 255 255 / .22); background: rgb(255 255 255 / .08); color: #ffffff; font: inherit; font-size: 3.4vh; font-weight: 800; cursor: pointer; padding: 0; }
.tv-key.is-back { grid-column: span 1; font-size: 3.2vh; }
.tv-key.is-open { grid-column: 1 / -1; font-size: 2.8vh; border-color: color-mix(in srgb, var(--accent) 70%, transparent); color: var(--accent); }
.tv-key:hover { background: rgb(255 255 255 / .16); }
.tv-key:focus-visible, .tv-key:focus { outline: none; background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tv-link:focus-visible, .tv-open:focus-visible, .tv-pill:focus-visible { outline: .5vh solid #ffffff; outline-offset: .4vh; }
.tv-way-pair .tv-side { justify-items: start; text-align: start; gap: 3vh; }
.tv-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.2vh; counter-reset: tv-step; }
.tv-steps li { counter-increment: tv-step; display: flex; align-items: center; gap: 2vh; font-size: 3.6vh; font-weight: 800; }
.tv-steps li::before { content: counter(tv-step); display: grid; place-items: center; flex: none; width: 6.4vh; height: 6.4vh; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 3.2vh; }
.tv-done { margin: 0; font-size: 3vh; font-weight: 800; color: var(--accent); }
.tv-actions { display: grid; justify-items: start; gap: 1.8vh; }
.tv-pill { display: inline-flex; align-items: center; gap: 1.4vh; margin: 0; border-radius: 999px; padding: 1.6vh 3.4vh; font: inherit; font-size: 3vh; font-weight: 800; min-height: 44px; }
.tv-pill.is-primary { border: 0; background: var(--accent); color: var(--on-accent); cursor: pointer; }
.tv-pill.is-plain { border: 1px solid rgb(255 255 255 / .28); background: rgb(255 255 255 / .1); }
.tv-qr-card { margin: 0; display: grid; justify-items: center; gap: 1.6vh; background: #ffffff; color: var(--brand); border-radius: 5vh; padding: 3.4vh 6vh; }
.tv-qr { width: 44vh; height: 44vh; display: block; }
.tv-qr-card figcaption { font-size: 2.4vh; color: var(--muted); }
.tv-pair-code { margin: 0; font-size: 9vh; font-weight: 800; line-height: 1; letter-spacing: .1em; font-variant-numeric: tabular-nums; font-family: var(--font-num); white-space: pre; }
@media (max-aspect-ratio: 1/1), (max-width: 760px) {
  .tv-way, .tv-way-code.has-keys { grid-template-columns: minmax(0, 1fr); gap: 4vh; }
  .tv-keys { display: none; }
  .tv-way-code.has-keys .tv-open { display: inline-block; }
  .tv-way-pair .tv-side { justify-items: center; text-align: center; }
  .tv-actions { justify-items: center; }
  .tv-qr-card { justify-self: center; padding: 3vh; border-radius: 3vh; }
  .tv-qr { width: min(60vw, 34vh); height: min(60vw, 34vh); }
  .tv-title { font-size: clamp(22px, 6.5vw, 40px); }
  .tv-title.is-inline img { width: 56px; height: 56px; }
  .tv-steps li { font-size: clamp(16px, 4.6vw, 26px); }
  .tv-steps li::before { width: 36px; height: 36px; font-size: 18px; }
  .tv-pill, .tv-lead, .tv-link, .tv-open, .tv-host { font-size: clamp(15px, 4vw, 22px); }
  .tv-cell { width: 9vw; height: 12vw; font-size: 7vw; border-radius: 2vw; }
  .tv-boxes { gap: 1.2vw; }
  .tv-boxes .tv-cell:nth-child(5) { margin-inline-start: 2vw; }
  .tv-field { font-size: 6vw; gap: 2vw; }
  .tv-pair-code { font-size: clamp(32px, 10vw, 64px); }
}

/* «ركلات الترجيح» (Game\Shootout): the tied teams with a mark per round, on the panel, the phones and the big screen. */
.so-teams { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.so-team { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--team, var(--line)); background: color-mix(in srgb, var(--team, var(--line)) 10%, transparent); }
.so-team.is-turn { background: var(--team, var(--accent)); color: #ffffff; }
.so-team.is-win { background: var(--team, var(--accent)); color: #ffffff; box-shadow: 0 0 0 3px var(--accent); }
.so-team.is-out { opacity: .45; border-style: dashed; }
.so-team.is-me .so-name { text-decoration: underline; text-underline-offset: 4px; }
.so-name { font-weight: 800; min-width: 0; overflow-wrap: anywhere; }
.so-name small { font-weight: 600; opacity: .85; }
.so-marks { display: flex; gap: 6px; direction: ltr; flex-wrap: wrap; justify-content: flex-end; }
.so-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 900; font-size: 15px; line-height: 1; background: var(--surface); color: var(--ink); border: 2px solid var(--line); }
.so-mark.is-correct { background: var(--ok); border-color: var(--ok); color: #ffffff; }
.so-mark.is-wrong, .so-mark.is-timeout { background: var(--bad); border-color: var(--bad); color: #ffffff; }
.so-mark.is-open { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.so-mark.is-none { opacity: .35; }
.so-result { margin: 0; font-weight: 800; text-align: center; }
.so-result.is-correct { color: var(--ok); }
.so-result.is-wrong, .so-result.is-timeout { color: var(--bad); }
.so-tag { background: color-mix(in srgb, var(--accent) 35%, transparent); }
/* The big screen: sizes follow the screen's height. */
.screen-shootout { width: min(100%, 1400px); margin: 0 auto; display: grid; gap: 1.6vh; align-content: start; }
.screen-shootout .so-question { gap: 1.2vh; }
.screen-shootout .screen-q { font-size: 4.2vh; }
.screen-shootout .screen-options { gap: 1vh; }
.screen-shootout .screen-option { min-height: 0; padding: 1.2vh 2vh; font-size: 3.4vh; }
.so-banner { display: flex; justify-content: center; align-items: baseline; gap: 2vw; font-size: 4.2vh; }
.so-banner .so-round { font-size: 3vh; opacity: .8; }
.screen-shootout .so-teams { gap: 1.4vh; grid-template-columns: repeat(auto-fit, minmax(min(100%, 32vh), 1fr)); }
.screen-shootout .so-team { padding: 1.2vh 2vh; border-radius: 2vh; border-width: .4vh; font-size: 3.4vh; background: color-mix(in srgb, var(--team) 22%, transparent); }
.screen-shootout .so-team.is-turn, .screen-shootout .so-team.is-win { background: var(--team); }
.screen-shootout .so-mark { width: 4.4vh; height: 4.4vh; font-size: 2.6vh; border-width: .3vh; background: rgb(255 255 255 / .12); color: inherit; border-color: rgb(255 255 255 / .3); }
.screen-shootout .so-mark.is-correct { background: var(--ok); border-color: var(--ok); }
.screen-shootout .so-mark.is-wrong, .screen-shootout .so-mark.is-timeout { background: var(--bad); border-color: var(--bad); }
.screen-shootout .so-mark.is-open { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.screen-shootout .so-result { font-size: 4vh; margin-top: 1.6vh; }
.screen-shootout .so-result.is-correct { color: var(--accent); }
.screen-shootout .so-next { margin: 0; text-align: center; font-size: 3.6vh; font-weight: 800; }
.screen-shootout .so-winner { text-align: center; font-size: 5.4vh; }
.app-qr { display: block; margin: 0 auto; width: min(240px, 70vw); height: auto; background: #ffffff; padding: 8px; border-radius: 12px; }

/* The identity's 3D icons (Theme\Icon3d, public/img/3d/; Nasser 2026-11-17): three sizes only, s 24 beside text, m 40 in
   cards and lists, l 64 for the big choices. Each file is a square with the same margin, so one size looks one size. */
.ic3 { display: inline-block; flex: none; object-fit: contain; vertical-align: middle; }
.ic-s { width: 24px; height: 24px; }
.ic-m { width: 40px; height: 40px; }
.ic-l { width: 64px; height: 64px; }
.ic3-art { display: block; height: auto; max-width: 100%; }
.btn .ic3 { margin-inline-end: 2px; }
.dash-tile { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; }
.dash-tile .ic3 { grid-row: 1 / span 2; }
.dash-tile > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The open games: one short row each (Nasser 2026-11-18). */
#open .game-list li.card { padding: 8px 14px; }
#open .game-list a .state-pill { margin-inline-start: auto; white-space: nowrap; }
@media (min-width: 601px) { #open .game-list a { flex-wrap: nowrap; } #open .game-list a > span.muted, #open .game-list a > b { white-space: nowrap; } }
.game-list a .ic3 { margin-inline-end: 4px; }
.empty-state .ic3-art { margin-inline: auto; }
/* The 3D icons in the team cards: the picture fills the power's square, which loses its tint (Nasser 2026-11-18). */
.tc-power:has(.ic3) { background: none; padding: 0; min-width: 24px; height: 24px; }
.tc-power .ic3 { width: 100%; height: 100%; }

/* Identity v2, phase 3: the coordinator's home (docs/mockups/identity-v2/coordinator-*). The plan stays one compact
   strip (Nasser 2026-11-18); icons only at 24 / 40 / 64. */
.dash-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px clamp(18px, 3vw, 32px); border-radius: 22px; color: var(--on-brand);
  background: linear-gradient(120deg, var(--brand) 40%, color-mix(in srgb, var(--brand) 70%, var(--blue))); }
.dash-hero h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); line-height: 1.25; }
.dash-hero p { margin: 4px 0 14px; color: color-mix(in srgb, var(--on-brand) 82%, transparent); }
.dash-hero-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.dash-hero .btn.ghost-on-dark { background: transparent; color: var(--on-brand); border-color: color-mix(in srgb, var(--on-brand) 40%, transparent); }
.dash-hero-mascot { width: 130px; flex: none; margin-block: -12px -26px; }
.dash-plan { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--ink); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); }
.dash-plan-line { color: var(--muted); }
.dash-plan .btn.dash-plan-btn { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.dash-plan .btn.dash-plan-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.dash-block { display: flex; flex-direction: column; gap: 14px; }
.dash-block h2 { margin: 0; font-size: 20px; }
.dash-doors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.dash-door { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--lavender); color: var(--ink); text-decoration: none; min-width: 0; }
.dash-door span { display: flex; flex-direction: column; min-width: 0; }
.dash-door b { font-size: 16px; }
.dash-door small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-door.is-phone { display: none; }
.dash-door.is-gold { background: color-mix(in srgb, var(--accent) 30%, var(--surface)); }
.dash-door:hover { outline: 2px solid color-mix(in srgb, var(--blue) 45%, transparent); }
.dash-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.dash-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; flex: 1; }
.dash-mode { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
  padding: 18px 12px; border: 2px solid var(--line); border-radius: 18px; color: var(--ink); text-decoration: none; }
.dash-mode b { font-size: 18px; }
.dash-mode small { color: var(--muted); font-size: 13px; line-height: 1.5; }
.dash-mode.is-last { border-color: var(--blue); }
.dash-mode:hover { border-color: color-mix(in srgb, var(--blue) 60%, var(--line)); }
.dash-mode-tag { position: absolute; top: 8px; inset-inline-end: 8px; background: var(--blue); color: var(--on-brand); border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 700; }
.dash-block .dash-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-tile { background: var(--lavender); border-radius: 14px; }
.dash-more, .dash-games .dg-go { color: var(--blue); font-weight: 700; text-decoration: none; white-space: nowrap; }
[dir="ltr"] .arr { display: inline-block; transform: scaleX(-1); }
.dash-games { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.dash-games a { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); text-decoration: none; }
.dash-games a:hover { border-color: color-mix(in srgb, var(--blue) 50%, var(--line)); }
.dg-short { display: none; }
.dg-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.dg-when { color: var(--muted); font-family: var(--font-num); font-size: 14px; align-self: flex-start; }
.dg-cats { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.dg-end { display: flex; align-items: center; gap: 14px; flex: none; }
.dash-pill { border-radius: 999px; padding: 2px 12px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.dash-pill.is-live { background: color-mix(in srgb, var(--ok) 16%, var(--surface)); color: var(--ok); }
.dash-pill.is-wait { background: var(--strip-bg); color: var(--strip-ink); }
.dash-empty { display: flex; align-items: center; gap: 24px; padding: 6px 4px; }
.dash-empty .ic3-art { flex: none; }
.dash-empty b { font-size: 18px; }
.dash-empty p { margin: 2px 0 10px; }
.dash-steps { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.dash-steps li { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.dash-steps li span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--lavender); color: var(--brand); font-family: var(--font-num); font-size: 14px; }
/* The desk menu: the current page is a lighter pill with a gold edge, not a gold block (coordinator-1-desktop). */
.coord-desk a.active { background: color-mix(in srgb, var(--side-ink) 14%, transparent); color: var(--side-ink); box-shadow: inset -3px 0 0 var(--accent); }
[dir="ltr"] .coord-desk a.active { box-shadow: inset 3px 0 0 var(--accent); }
@media (max-width: 1100px) { .dash-doors { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-pair { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  /* Phones follow coordinator-2-mobile: banner, four doors without a frame, the plan, the open games, then the rest. */
  .dash-hero { order: 0; } .dash-do { order: 1; } .dash-first { order: 2; } .dash-plan { order: 3; } .dash-open { order: 4; }
  .dash-do { background: none; border: 0; box-shadow: none; padding: 0; }
  .dash-do h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .dash-doors { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dash-door { background: var(--surface); border: 1px solid var(--line); }
  .dash-door.is-gold { display: none; }
  .dash-door.is-phone { display: flex; }
  .dash-block .dash-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-empty .ic3-art { width: 96px; }
  .dash-hero { padding: 18px; }
  .dash-hero-mascot { width: 96px; margin-inline-start: -8px; }
  .dash-hero p { margin-bottom: 12px; }
  .dash-hero .btn.ghost-on-dark { display: none; }
  .dash-doors { gap: 8px; }
  .dash-door { flex-direction: column; text-align: center; gap: 6px; padding: 12px 8px; }
  .dash-door small { display: none; }
  .dash-door b { font-size: 13px; white-space: nowrap; }
  .dash-mode { padding: 14px 8px; }
  .dash-games a { padding: 10px 12px; gap: 10px; }
  .dash-games b { font-size: 15px; }
  .dg-cats { display: none; }
  .dg-long { display: none; } .dg-short { display: inline; }
  .dg-when { font-size: 13px; }
  .dg-end { gap: 10px; }
  .dg-go { display: none; }
  .dash-empty { flex-direction: column; text-align: center; }
  .dash-steps { justify-content: center; }
}
/* «انتهى الوقت» with its hourglass (Nasser 2026-11-18). */
.screen-timeup { display: inline-flex; align-items: center; gap: 1.2vh; }
.screen-timeup-ic { width: 6vh; height: 6vh; margin-block: -1.5vh; }
.time-up .ic3, .pick-timeout .ic3 { vertical-align: -6px; }
/* «ألعابي» (Nasser 2026-11-18): the title and «لعبة جديدة» on one line with room under them, rows as on the home. */
.games-page { display: flex; flex-direction: column; gap: 18px; }
.games-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.games-head h1 { margin: 0; font-size: 28px; }
.games-all li { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.games-all li > a:first-child { border: 0; border-radius: 16px 16px 0 0; }
.games-all .dg-log { display: inline; align-self: flex-start; border: 0; padding: 0; margin: -8px 0 12px; margin-inline-start: 68px; font-size: 13px; color: var(--muted); text-decoration: underline; }
.dash-pill.is-done { background: var(--lavender); color: var(--brand); }
@media (max-width: 600px) {
  .games-head h1 { font-size: 24px; }
  .games-head .btn { min-height: 40px; padding: 0 14px; font-size: 15px; }
  .games-all .dg-log { margin-inline-start: 62px; }
}
/* The phone's one menu button (Nasser 2026-11-18): the bell, language, theme and sign-out in a small panel. */
.coord-mmenu { display: none; position: relative; }
.coord-mmenu > summary { list-style: none; cursor: pointer; position: relative; color: var(--side-ink); border-color: color-mix(in srgb, var(--side-ink) 35%, transparent); }
.coord-mmenu > summary::-webkit-details-marker { display: none; }
.mm-dot { position: absolute; top: 4px; inset-inline-end: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); }
.mm-panel { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 60; min-width: 210px; padding: 6px; display: flex; flex-direction: column;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 30px rgb(0 0 0 / .18); }
.mm-panel form { margin: 0; }
.mm-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-radius: 12px; background: none; color: var(--ink);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; text-align: start; }
.mm-item:hover { background: var(--lavender); }
.mm-item svg { flex: none; }
.mm-count { margin-inline-start: auto; background: var(--bad); color: var(--on-brand); border-radius: 999px; padding: 0 8px; font-size: 12px; }
.mm-out { color: var(--bad); }
/* GAMES_UNIFIED §3.1 (2026-11-20): bell, dark mode and ☰ on a computer and a phone alike; in the side menu's foot the
   panel opens upward, in the phone's top bar downward. */
.coord-tools .coord-mmenu { display: block; }
.coord-side .coord-foot { position: relative; }
.coord-side .coord-tools .coord-mmenu { position: static; }
.coord-side .mm-panel { top: auto; bottom: calc(100% + 8px); inset-inline: 0; min-width: 0; }
@media (max-width: 860px) {
  .coord-side { overflow: visible; }
  .coord-side .coord-tools .coord-mmenu { position: relative; }
  .coord-side .mm-panel { top: calc(100% + 8px); bottom: auto; inset-inline-start: auto; inset-inline-end: 0; min-width: 210px; }
}
/* The contest waiting room (Nasser 2026-11-18): on a phone it starts with the contestants; the code is in the QR sheet
   (the bottom bar), and the two ways to add someone sit behind «أضف مشاركاً». */
.lp-extra > summary { list-style: none; }
.lp-extra > summary::-webkit-details-marker { display: none; }
.lp-extra-btn { width: 100%; border-style: dashed; }
.lp-extra-card { width: min(440px, 100%); }
.lp-extra-card .lp-host-btn { width: 100%; box-sizing: border-box; color: var(--ink); text-decoration: none; }
.is-sheet-only > summary { display: none; }
@media (max-width: 899px) {
  .lobby.is-contest .lobby-join { display: none; }
}
/* «إنهاء اللعبة الآن» as a button and a confirmation sheet (Nasser 2026-11-18). */
.end-sheet { margin: 6px auto 0; width: min(360px, 100%); }
.end-sheet > summary { list-style: none; }
.end-sheet > summary::-webkit-details-marker { display: none; }
.end-btn { gap: 8px; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); background: color-mix(in srgb, var(--bad) 6%, var(--surface)); }
.end-card { width: min(440px, 100%); }
.end-card p { margin: 0; }
/* The random pick and the draw, livelier (Nasser 2026-11-18: «القرعة و الاختيار تحتاج إلى حركة تفاعلية أكثر»):
   the light leaves a short trail, the chosen square lands with a bounce and a gold ring, the board gives a small jolt;
   the draw's deck shuffles in an arc and each card pops as it turns. */
.screen-tile.is-trail, .pick-board .pick-tile.is-trail { background: color-mix(in srgb, var(--accent) 45%, var(--tile)); transition: background .3s ease; }
.screen-tile.is-roll, .pick-board .pick-tile.is-roll { transition: transform .08s ease; }
.screen-tile.is-land, .pick-board .pick-tile.is-land { position: relative; animation: pick-land .7s cubic-bezier(.3, 1.6, .5, 1) both; z-index: 2; }
.screen-tile.is-land::after, .pick-board .pick-tile.is-land::after { content: ''; position: absolute; inset: -6px; border-radius: inherit; border: 3px solid var(--accent); animation: pick-ring .9s ease-out .15s both; pointer-events: none; }
.screen-board.is-landed, .pick-board.is-landed { animation: pick-jolt .35s ease-out .1s both; }
@keyframes pick-land { 0% { transform: scale(1.06); } 35% { transform: scale(1.32); } 60% { transform: scale(.94); } 100% { transform: scale(1.12); } }
@keyframes pick-ring { from { opacity: 1; transform: scale(.9); } to { opacity: 0; transform: scale(1.7); } }
@keyframes pick-jolt { 0%, 100% { transform: none; } 30% { transform: translateY(.6vh) rotate(.3deg); } 60% { transform: translateY(-.3vh) rotate(-.2deg); } }
.is-shuffling .draw-ghost { animation: draw-shuffle-arc .5s ease-in-out var(--d, 0s) infinite alternate; box-shadow: 0 1vh 3vh rgb(0 0 0 / .4), 0 0 2vh color-mix(in srgb, var(--accent) 50%, transparent); }
@keyframes draw-shuffle-arc {
  0% { transform: translateX(calc(var(--dx, 0) * -1)) rotate(-10deg) translateY(0); }
  50% { transform: translateX(0) rotate(0) translateY(-3vh) scale(1.08); }
  100% { transform: translateX(var(--dx, 0)) rotate(10deg) translateY(0); }
}
.draw-card.is-open { position: relative; animation: draw-pop .55s cubic-bezier(.3, 1.6, .5, 1) .25s both; }
.draw-card.is-open::after { content: ''; position: absolute; inset: -1vh; border-radius: 2.6vh; border: .4vh solid var(--accent); opacity: 0; animation: pick-ring .9s ease-out .35s both; pointer-events: none; }
@keyframes draw-pop { 0% { transform: scale(1); } 45% { transform: scale(1.12); } 100% { transform: scale(1); } }
.small-slots .draw-card { animation: draw-pop .55s cubic-bezier(.3, 1.6, .5, 1) both; }
.small-slots .flip-0 .draw-card, .small-slots .flip-0.draw-card { animation-delay: 1.55s; } .small-slots .flip-1 .draw-card, .small-slots .flip-1.draw-card { animation-delay: 2.1s; }
.small-slots .flip-2 .draw-card, .small-slots .flip-2.draw-card { animation-delay: 2.65s; } .small-slots .flip-3 .draw-card, .small-slots .flip-3.draw-card { animation-delay: 3.2s; }
.small-slots .flip-4 .draw-card, .small-slots .flip-4.draw-card { animation-delay: 3.75s; } .small-slots .flip-5 .draw-card, .small-slots .flip-5.draw-card { animation-delay: 4.3s; }
@media (prefers-reduced-motion: reduce) {
  .screen-tile.is-land, .pick-board .pick-tile.is-land, .screen-board.is-landed, .pick-board.is-landed, .draw-card.is-open, .small-slots .draw-card, .is-shuffling .draw-ghost { animation: none; }
  .screen-tile.is-land::after, .pick-board .pick-tile.is-land::after, .draw-card.is-open::after { display: none; }
}
/* «مشكلة في السؤال؟» (stage mode, Nasser 2026-11-18): a quiet link under the answers, the two choices in a sheet. */
.redo-sheet { margin-top: 4px; text-align: center; }
.redo-sheet > summary { list-style: none; cursor: pointer; display: inline-block; color: var(--muted); text-decoration: underline; }
.redo-sheet > summary::-webkit-details-marker { display: none; }
.redo-card { width: min(460px, 100%); text-align: start; }
.redo-card p { margin: 0; }
.redo-choice { display: flex; flex-direction: column; gap: 4px; }
/* Identity v2, phase 3 (Nasser 2026-11-18 «ابدأ»): «لعبة جديدة», «الباقات» and «أسئلتي» with the 3D icons. */
.setup-tile .st-icon { width: 64px; height: 64px; background: none; border-radius: 0; }
.setup-tile:has(input:checked) .st-icon { background: none; }
.setup-quick h2 .ic3, .set-row summary .ic3, .coupon-form label .ic3 { vertical-align: -5px; }
.set-row summary > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.plan-now-label { display: flex; align-items: center; gap: 10px; }
.mq-title { display: flex; align-items: center; gap: 10px; }
.mq-usage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.mq-bar { display: flex; flex-direction: column; gap: 4px; }
.mq-bar meter { width: 100%; height: 10px; }
.mq-bar meter::-webkit-meter-bar { background: var(--lavender); border: 0; border-radius: 999px; }
.mq-bar meter::-webkit-meter-optimum-value { background: var(--blue); border-radius: 999px; }
.mq-bar meter::-moz-meter-bar { background: var(--blue); border-radius: 999px; }
.mq-empty .ic3-art { width: 96px; height: auto; margin-inline: auto; }
.mq-cats a .ic3 { flex: none; }
@media (max-width: 600px) { .mq-usage { grid-template-columns: 1fr; } }
.coupon-form > label[for="coupon"] { display: flex; align-items: center; gap: 8px; }
/* Identity v2, phase 4: the contestant's phone (docs/mockups/identity-v2/player-1-all.png). */
.play-lobby .pl-hero { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; }
/* The top panel in the clip's own colours (Nasser 2026-11-19: «خلفية الانتظار في الأعلى مشابهة لخلفية الفيديو»): it runs
   to the card's edges, the clip has no frame and fades at its edges, and the title and line sit on the clip's floor. */
.play-lobby .pl-hero { align-self: stretch; margin: -18px -14px 0; padding: 18px 14px 20px;
  background: linear-gradient(180deg, var(--clip-top) 18px, var(--clip-mid) 138px, var(--clip-floor) 258px, var(--clip-floor) 100%); }
.play-lobby .pl-mascot-frame { border-radius: 0; box-shadow: none; overflow: visible;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%), linear-gradient(180deg, transparent 0, #000 6%, #000 90%, transparent 100%);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%), linear-gradient(180deg, transparent 0, #000 6%, #000 90%, transparent 100%); mask-composite: intersect; }
.play-lobby .pl-hero .pl-me-title { color: #ffffff; }
.play-lobby .pl-hero .pl-wait { background: rgb(255 255 255 / .12); border-color: rgb(255 255 255 / .22); color: #ffffff; }
.pl-mascot { width: 140px; animation: pl-bob 2.4s ease-in-out infinite; }
@keyframes pl-bob { 50% { transform: translateY(-6px); } }
.play-lobby .pl-me-title { margin: 0; }
.pl-card { position: relative; width: 100%; box-sizing: border-box; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 18px; background: var(--surface); border: 1.5px solid var(--line); text-align: start; }
.pl-card .pl-me-avatar { width: 52px; height: 52px; font-size: 30px; flex: none; box-shadow: none; border: 0; background: color-mix(in srgb, var(--team, var(--blue)) 18%, var(--surface)); }
.pl-card .pl-me-name { flex: 1; min-width: 0; font-size: 18px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-ready { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--lavender); color: var(--brand); font-weight: 800; font-size: 14px; flex: none; }
.pl-powers { position: relative; width: 100%; }
.pl-powers-title { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.pl-powers ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.pl-powers li { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); font-size: 12px; font-weight: 700; }
.q-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.q-cat { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 6px; border-radius: 999px; background: var(--lavender); color: var(--brand); font-weight: 700; }
.q-meta .q-value { display: inline-block; padding: 2px 12px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-family: var(--font-num); font-size: 18px; }
.your-turn-banner { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 14px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 30%, var(--surface)); border: 1.5px solid var(--accent); color: var(--ink); animation: count-pop .45s ease-out both; }
.your-turn-banner b { display: inline; margin: 0; font-size: inherit; }
/* The contestant's own result: a light page that stays until the next turn, not a coloured flash. */
.overlay.is-result.is-mine { align-items: stretch; animation: none; background: linear-gradient(180deg, color-mix(in srgb, var(--ok) 14%, var(--bg)) 0%, var(--bg) 55%); overflow-y: auto; }
.overlay.is-result.is-mine.mine-down { background: linear-gradient(180deg, color-mix(in srgb, var(--bad) 12%, var(--bg)) 0%, var(--bg) 55%); }
.overlay.is-mine > .card.phone-result { color: var(--ink); width: min(440px, 100%); margin: auto; gap: 10px; padding: 18px 8px; }
.overlay.is-mine .card.phone-result p { color: var(--ink); }
.overlay.is-mine .pr-head { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 38px; text-shadow: none; color: var(--ok); }
.overlay.is-mine.mine-down .pr-head { color: var(--bad); }
.overlay.is-mine .card.phone-result p.pr-head { color: var(--ok); }
.overlay.is-mine.mine-down .card.phone-result p.pr-head { color: var(--bad); }
.pr-mascot { width: 150px; margin-inline: auto; animation: count-pop .6s ease-out both; }
.overlay.is-mine .pr-points { display: flex; flex-direction: column; align-items: center; gap: 0; }
.pr-points b { font-family: var(--font-num); font-size: 56px; font-weight: 900; line-height: 1.1; unicode-bidi: isolate; color: var(--brand); }
.pr-points.is-up b::before { content: '+'; }
.pr-points.is-down b { color: var(--bad); }
.pr-points span { color: var(--muted); font-weight: 700; }
.overlay.is-mine .pr-answer { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px; border: 2px solid var(--ok); background: var(--surface); text-align: start; }
.pr-answer span { display: flex; flex-direction: column; }
.pr-answer small { color: var(--muted); font-size: 12px; }
.pr-answer b { font-size: 18px; }
.pr-rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pr-rank li { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); text-align: start; }
.pr-rank li.is-me { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 8%, var(--surface)); }
.pr-rank .pr-name { flex: 1; min-width: 0; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-rank b { font-family: var(--font-num); font-size: 18px; }
.pr-place { display: grid; place-items: center; width: 40px; height: 40px; font-family: var(--font-num); font-weight: 800; color: var(--muted); }
.overlay.is-mine .pr-next { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .pl-mascot, .pr-mascot, .your-turn-banner { animation: none; } }
.overlay.is-mine .card.phone-result .pr-points b { font-size: 56px; display: block; }
.overlay.is-mine .card.phone-result .pr-answer b { font-size: 18px; display: block; }
.overlay.is-mine .card.phone-result .pr-rank b { font-size: 18px; }
.overlay.is-mine .pr-mascot { width: auto; max-width: 150px; height: 150px; object-fit: contain; }
/* «موقعك» on the contestant's own result (Nasser 2026-11-18, as on «وش تعرف؟»): the place and its change, the gap to
   the place above, and the points question by question from 0; the newest step draws itself. */
.pr-place-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; }
.overlay.is-mine .card.phone-result .pr-place-line b { font-size: 18px; }
.pr-place-line .small { width: 100%; text-align: center; color: var(--muted); }
.pr-move { display: inline-flex; padding: 2px 10px; border-radius: 999px; font-family: var(--font-num); font-weight: 800; }
.pr-move.is-up { background: color-mix(in srgb, var(--ok) 16%, var(--surface)); color: var(--ok); }
.pr-move.is-down { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); color: var(--bad); }
.pr-move.is-same { background: var(--lavender); color: var(--muted); }
.pr-chart { margin: 0; padding: 10px 12px 6px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line); text-align: start; }
.pr-chart figcaption { color: var(--muted); font-weight: 700; }
.pr-chart svg { width: 100%; height: auto; display: block; }
.prc-zero { stroke: var(--line); stroke-width: 1; }
.prc-line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.prc-new { stroke-dasharray: 1; stroke-dashoffset: 1; animation: prc-draw .7s ease-out .4s forwards; }
@keyframes prc-draw { to { stroke-dashoffset: 0; } }
.prc-dot { fill: var(--brand); stroke: var(--surface); stroke-width: 2; }
.prc-dot.is-last { fill: var(--accent); animation: count-pop .5s ease-out 1s both; }
.prc-n { fill: var(--muted); font-size: 10px; font-family: var(--font-num); }
.prc-val { fill: var(--ink); font-size: 12px; font-weight: 800; font-family: var(--font-num); direction: ltr; unicode-bidi: plaintext; }
.mine-down .prc-dot.is-last { fill: var(--bad); }
@media (prefers-reduced-motion: reduce) { .prc-new { animation: none; stroke-dashoffset: 0; } .prc-dot.is-last { animation: none; } }
/* The waiting room's mascot video (trial, Nasser 2026-11-18): a rounded square; the still picture only for reduced motion. */
.pl-mascot-frame { position: relative; display: block; width: min(240px, 70vw); aspect-ratio: 1; border-radius: 24px; overflow: hidden; box-shadow: 0 10px 28px rgb(0 0 0 / .18); -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.pl-mascot-frame::after { content: ""; position: absolute; inset: 0; }
.pl-mascot-video { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-touch-callout: none; }
.pl-mascot-still { display: none; }
@media (prefers-reduced-motion: reduce) { .pl-mascot-frame { display: none; } .pl-mascot-still { display: block; } }
/* Identity v2, phase 5: the room's screen (docs/mockups/identity-v2/screen-*.png and win-1.png). */
/* Board: open squares light with purple numbers; a played square dark with its taker's dot; the picked one gold. */
.screen-page .screen-tile { background: linear-gradient(180deg, #ffffff, var(--lavender)); color: var(--brand); box-shadow: 0 .6vh 0 color-mix(in srgb, var(--brand) 25%, #000000), 0 1vh 2vh rgb(0 0 0 / .18); }
.screen-page .screen-tile.is-played { background: color-mix(in srgb, var(--brand) 70%, #000000); box-shadow: none; border: 0; }
.screen-page .screen-tile.is-taken { background: color-mix(in srgb, var(--brand) 70%, #000000); border: 0; }
.tile-dot { width: 1.8vh; height: 1.8vh; border-radius: 50%; background: var(--team, var(--accent)); box-shadow: 0 0 1.2vh var(--team, var(--accent)); }
.tile-dot.team-1 { --team: var(--team-1); } .tile-dot.team-2 { --team: var(--team-2); } .tile-dot.team-3 { --team: var(--team-3); }
.tile-dot.team-4 { --team: var(--team-4); } .tile-dot.team-5 { --team: var(--team-5); } .tile-dot.team-6 { --team: var(--team-6); }
.screen-page .screen-tile.is-roll, .screen-page .screen-tile.is-land { background: var(--accent); color: var(--on-accent); }
.screen-page .screen-cat { background: color-mix(in srgb, var(--cat) 35%, var(--brand)); border: 1px solid color-mix(in srgb, #ffffff 14%, transparent); }
/* Countdown: the 3D number on its pedestal, «استعدوا!» and whose question it is. */
.show-count-3d { display: flex; flex-direction: column; align-items: center; gap: 1.4vh; }
.show-num-3d { height: 42vh; width: auto; animation: count-pop .55s cubic-bezier(.3, 1.6, .5, 1) both; filter: drop-shadow(0 2vh 4vh rgb(0 0 0 / .35)); }
.show-ready { font-size: 7vh; font-weight: 900; }
.show-for { font-size: 3.4vh; font-weight: 700; opacity: .9; }
/* Question: a white card, the dark letter badges, and the thinking mascot beside it. */
.screen-qwrap { margin: auto; width: min(1700px, 100%); display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 3vw; }
.screen-think { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 1vh; }
.screen-think img { height: 34vh; width: auto; animation: pl-bob 2.4s ease-in-out infinite; }
.screen-think figcaption { font-size: 2.6vh; font-weight: 700; opacity: .9; }
.screen-page .screen-question { background: #ffffff; color: var(--brand); border-radius: 3vh; padding: 3vh 2.6vw; box-shadow: 0 2vh 5vh rgb(0 0 0 / .3); }
.screen-page .screen-question .screen-meta { color: var(--muted); }
.screen-page .screen-question .screen-value { background: var(--accent); color: var(--on-accent); border-radius: 1vh; padding: .2vh 1.2vw; }
.screen-page .screen-option { background: var(--bg); color: var(--ink); border: .3vh solid var(--line); }
.screen-page .screen-option .opt-key { background: var(--brand); color: #ffffff; }
.screen-page .screen-option.is-correct { background: color-mix(in srgb, var(--ok) 16%, #ffffff); border-color: var(--ok); }
.screen-page .screen-option.is-correct .opt-key { background: var(--ok); }
.screen-page .screen-option.is-wrong { background: color-mix(in srgb, var(--bad) 10%, #ffffff); border-color: var(--bad); }
/* Reveal: mark, mascot and points on one side; the question, its answer and the places on the other. */
.show-result.show-result-v2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); place-content: center; align-items: center; gap: 4vw; text-align: center;
  background: radial-gradient(circle at 30% 50%, color-mix(in srgb, var(--brand) 70%, #ffffff 8%) 0%, var(--brand) 70%); }
.show-result-v2.result-correct, .show-result-v2.result-steal_correct { background: radial-gradient(circle at 30% 50%, color-mix(in srgb, var(--ok) 35%, var(--brand)) 0%, var(--brand) 70%); }
.show-result-v2.result-wrong, .show-result-v2.result-steal_wrong, .show-result-v2.result-timeout { background: radial-gradient(circle at 30% 50%, color-mix(in srgb, var(--bad) 32%, var(--brand)) 0%, var(--brand) 70%); }
.sr-side { display: flex; flex-direction: column; align-items: center; gap: .6vh; }
.sr-head { display: flex; align-items: center; gap: 1.4vw; font-size: 8vh; font-weight: 900; animation: count-pop .5s ease-out both; }
.sr-head img { height: 9vh; width: auto; }
.sr-mascot { height: 30vh; width: auto; animation: count-pop .6s .15s cubic-bezier(.3, 1.6, .5, 1) both; }
.sr-points b { display: block; font-family: var(--font-num); font-size: 13vh; font-weight: 900; line-height: 1; direction: ltr; unicode-bidi: isolate; color: var(--accent); text-shadow: 0 1vh 3vh rgb(0 0 0 / .35); }
.sr-points.is-down b { color: #ffffff; }
.sr-points.is-second b { font-size: 6vh; }
.sr-boost { display: inline-flex; align-items: center; gap: .6vw; padding: .6vh 1.6vw; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 2.8vh; }
.sr-boost .icon-power { width: 3.4vh; height: 3.4vh; }
.sr-for { font-size: 3.2vh; font-weight: 700; opacity: .92; }
.sr-card { background: #ffffff; color: var(--ink); border-radius: 3vh; padding: 3vh 2vw; display: flex; flex-direction: column; gap: 1.4vh; text-align: start; box-shadow: 0 2vh 5vh rgb(0 0 0 / .3); animation: q-in .45s .2s ease-out both; }
.sr-q { font-size: 3vh; font-weight: 800; color: var(--brand); }
.sr-right { display: flex; flex-direction: column; padding: 1.2vh 1.4vw; border-radius: 1.6vh; background: var(--ok); color: #ffffff; }
.sr-right small { font-size: 2vh; opacity: .9; }
.sr-right b { font-size: 3.8vh; }
.sr-rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1vh; }
.sr-rank li { display: flex; align-items: center; gap: 1vw; padding: 1vh 1.2vw; border-radius: 1.6vh; background: var(--bg); border: .3vh solid var(--line); font-size: 3vh; }
.sr-rank li.is-moved { border-color: var(--blue); }
.sr-rank img { height: 4.4vh; width: auto; }
.sr-dot { width: 1.4vh; height: 1.4vh; border-radius: 50%; background: var(--team, var(--muted)); }
.sr-name { flex: 1; min-width: 0; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-delta { font-family: var(--font-num); font-weight: 800; color: var(--ok); font-size: 2.4vh; direction: ltr; }
.sr-delta.is-down { color: var(--bad); }
.sr-score { font-family: var(--font-num); font-size: 3.4vh; direction: ltr; unicode-bidi: isolate; }
/* The winner: the cup over the title, the mascot beside the podium. */
.screen-winner { display: flex; flex-direction: column; align-items: center; gap: 1vh; }
.win-cup { height: 16vh; width: auto; filter: drop-shadow(0 0 3vh color-mix(in srgb, var(--accent) 70%, transparent)); animation: count-pop .6s ease-out both; }
.screen-podium { position: relative; }
.podium-mascot { position: absolute; inset-inline-end: 2vw; bottom: 0; height: 30vh; width: auto; animation: pl-bob 2.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .screen-think img, .podium-mascot, .show-num-3d, .sr-mascot, .sr-head { animation: none; } }
.show-result.show-result-v2 { justify-content: stretch; justify-items: stretch; padding-inline: 6vw; }
.show-result-v2 .sr-card { width: 100%; max-width: 46vw; justify-self: center; box-sizing: border-box; }

/* The test or closed state over a public page (nhmsv UX_RULES §5): a small note floating at the bottom with «إغلاق», taking
   no room from the page; never on the players' or the room's pages. */
.float-note { position: fixed; z-index: 40; inset-inline: 12px; bottom: max(12px, env(safe-area-inset-bottom)); max-width: 520px; margin-inline: auto; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 14px; background: var(--strip-bg); color: var(--strip-ink); font-size: 13px; line-height: 1.5; box-shadow: 0 8px 24px rgb(0 0 0 / .18); }
.float-note > span { flex: 1; }
.float-note-x { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; }
.float-note-x:hover { background: rgb(0 0 0 / .08); }
.float-note[hidden] { display: none; }
/* «مسح QR» beside «لصق» (GAMES_UNIFIED §1): on a phone the coupon field keeps its own line, the buttons share the next. */
@media (max-width: 600px) {
  .coupon-row { flex-wrap: wrap; }
  .coupon-row input { flex: 1 0 100%; }
  .coupon-row .btn { flex: 1 1 0; justify-content: center; }
}
/* «إغلاق اللعبة» (GAMES_UNIFIED §3): a folded confirm under the finished game's buttons. */
.end-close > summary { list-style: none; cursor: pointer; }
.end-close > summary::-webkit-details-marker { display: none; }
.end-close[open] > summary { margin-bottom: 8px; }
/* The waiting room's one share sheet (GAMES_UNIFIED §3): a small QR at the side opens it; the sheet holds the big QR, the
   code, copy / share / WhatsApp, the screen, pairing and the app. */
.lobby.is-contest .lobby-join .lj-qr img { width: 120px; }
.share-card { width: min(420px, 100%); gap: 10px; }
.share-card .sc-head { align-self: stretch; }
.share-card .sc-close { color: inherit; font-size: 22px; line-height: 1; }
.share-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-self: stretch; }
.share-row .btn { flex: 1 1 0; justify-content: center; min-width: 96px; }
.share-row .btn[hidden] { display: none; }
.share-card > .btn.wide { align-self: stretch; }
.share-card .btn { background: color-mix(in srgb, var(--side-ink) 10%, transparent); color: var(--side-ink); border-color: color-mix(in srgb, var(--side-ink) 30%, transparent); }
.screen-card.is-sheet-only > summary, .screen-card.is-sheet-only > summary.sc-open { display: none; }
/* «إعدادات متقدمة» folded under «ابدأ بسرعة» (GAMES_UNIFIED §3). */
.setup-adv > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; list-style: none; cursor: pointer; }
.setup-adv > summary::-webkit-details-marker { display: none; }
.setup-adv > summary h2 { margin: 0; }
.setup-adv-go { font-size: 22px; color: var(--muted); transition: transform .2s; }
.setup-adv[open] > summary { margin-bottom: 8px; }
.setup-adv[open] .setup-adv-go { transform: rotate(180deg); }
.setup-last { margin: -4px 0 4px; }
@media (prefers-reduced-motion: reduce) { .setup-adv-go { transition: none; } }
/* «أنا هو، رجّعني» (GAMES_UNIFIED §2.2): the offer on the join page, the waiting page, the coordinator's requests. */
.rejoin-offer { margin-bottom: 12px; border-color: var(--accent); }
.rejoin-wait .rejoin-mascot { width: 120px; margin-inline: auto; }
.rejoin-asks { border: 2px solid var(--accent); }
.rejoin-ask { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.rejoin-ask p { margin: 0; }
/* The thumb dock while a game runs (GAMES_UNIFIED §3): «التالي» standing out, «المزيد» beside it, held at the bottom. */
.dock-card { display: grid; gap: 8px; }
.dock-card form .gu-btn { width: 100%; }
.gu-dock .dock-next .gu-btn { font-size: 18px; }
.gu-dock .dock-next .gu-btn:disabled { opacity: .45; }
.dock-card .sc-close { font-size: 22px; line-height: 1; }

/* The TV's play bar and results (nhmsv GAMES_PHASE2_SPEC §1): the question number beside the name; under the podium the
   whole table, then «العب مرة أخرى؟ بانتظار المنسق». */
.screen-qno { margin-inline-start: 2vw; font-size: 3.2vh; font-weight: 800; opacity: .9; font-variant-numeric: tabular-nums; }
.screen-final .screen-ranking { width: min(1100px, 92vw); margin-inline: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(30vh, 1fr)); gap: 1.2vh 1.2vw; }
.screen-final .screen-ranking li { font-size: 3vh; }
.screen-again { margin: 2vh 0 0; text-align: center; font-size: 3.4vh; font-weight: 700; opacity: .9; }
.screen-final .screen-ranking li { align-items: center; padding: 1vh 2vw; }
.screen-final .screen-ranking li > span { white-space: nowrap; }
/* The TV's waiting room as in every game (nhmsv GAMES_PHASE2_SPEC §1): QR, code and short link on the right; the players
   with «n لاعب» on the left; «بانتظار المنسق» below. No text under 28px on a 1080p screen (2.6vh). */
.screen-join { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: 'code players' 'status status'; align-items: start; gap: 3vh 4vw; }
.screen-join-code { grid-area: code; justify-items: center; text-align: center; gap: 2vh; }
.screen-join-code .screen-qr { width: 40vh; height: 40vh; }
.screen-join-code .screen-code { font-size: 12vh; text-align: center; }
.screen-join-link { font-size: 3.4vh; text-align: center; opacity: .9; }
.screen-join-players { grid-area: players; display: grid; align-content: start; gap: 2vh; }
.screen-join-count { margin: 0; font-size: 4.4vh; font-weight: 800; }
.screen-join-players .screen-names { grid-column: auto; }
.screen-join-status { grid-area: status; margin: 0; text-align: center; font-size: 3.6vh; font-weight: 700; opacity: .85; }
.sound-unlock { font-size: 2.8vh; }
@media (max-width: 700px) { .screen-join { grid-template-columns: 1fr; grid-template-areas: 'code' 'players' 'status'; } }

/* The TV at rest (nhmsv GAMES_PHASE2_SPEC §1 «خاملة»): one centred column; text never under 28px on 1080p. */
.tv-idle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3vh; text-align: center; min-height: 100vh; }
.tv-idle-brand { display: flex; align-items: center; gap: 1.6vw; margin: 0; font-size: 5.4vh; }
.tv-idle-brand img { width: 9vh; height: 9vh; }
.tv-idle .tv-qr-card { margin: 0; }
.tv-idle .tv-qr { width: 46vh; height: 46vh; }
.tv-idle .tv-pair-code { font-size: 9vh; letter-spacing: .12em; }
.tv-idle-line { margin: 0; font-size: 3.6vh; font-weight: 700; }
.tv-corner { position: fixed; inset-block-end: 3vh; inset-inline-start: 3vw; display: inline-flex; align-items: center; gap: .8vw; border: 0; border-radius: 999px; padding: 1.2vh 2vw; background: rgb(255 255 255 / .12); color: inherit; font: inherit; font-size: 2.8vh; cursor: pointer; }
.tv-corner:focus-visible { outline: .4vh solid var(--accent); outline-offset: .3vh; }
.tv-corner .tv-ico { width: 3vh; height: 3vh; }

/* «ابدأ أول لعبة» (GAMES_PHASE2_SPEC §6): three numbered cards in a row (stacked on a phone), until a first game ends. */
.dash-first { border: 2px solid var(--accent); }
.first-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.first-step > a, .first-step > div { position: relative; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--ink); text-decoration: none; }
.first-step > a:hover { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.first-step b { display: block; }
.first-step small { display: block; color: var(--muted); }
.first-no { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 800; font-family: var(--font-num); }
/* Sound in the same place in every game (GAMES_PHASE2_SPEC §3): the screen's corner, the coordinator's «المزيد». */
.screen-page .sound-unlock { position: fixed; inset-block-end: 3vh; inset-inline-start: 2vw; z-index: 30; }
.screen-sound-state { position: fixed; inset-block-end: 3vh; inset-inline-start: 2vw; z-index: 90; font-size: 3.6vh; opacity: .75; border: 0; background: none; cursor: pointer; padding: .4vh; }
.screen-sound-state:hover, .screen-sound-state:focus-visible { opacity: 1; }
.screen-fs { position: fixed; inset-block-end: 3vh; inset-inline-end: 2vw; z-index: 90; display: inline-flex; align-items: center; gap: .6vw; border: 0; border-radius: 999px; padding: .8vh 1.2vw; background: rgb(0 0 0 / .35); color: #ffffff; font: inherit; font-size: 1.9vh; font-weight: 700; cursor: pointer; opacity: .8; }
.screen-fs:hover, .screen-fs:focus-visible { opacity: 1; }
.screen-fs svg { width: 2.6vh; height: 2.6vh; }
.screen-fs[hidden] { display: none; }
.screen-sound-state[hidden] { display: none; }
.dock-sound { display: grid; gap: 8px; }
.dock-sound .sc-seg { display: flex; gap: 6px; }
.dock-sound .sc-seg form { flex: 1; }
.dock-sound .sc-seg button { width: 100%; }
.dock-sound > form .btn { width: 100%; justify-content: center; }

/* «شارك» the result card (share-card.js, nhmsv GAMES_PHASE2_SPEC §4). */
.card-shares .chips .btn:not([hidden]) { display: inline-flex; align-items: center; gap: 6px; }
.play-final [data-share-card]:not([hidden]) { display: inline-flex; justify-content: center; align-items: center; gap: 8px; }
.card-status { margin: 0; text-align: center; }
/* «الدليل» (GAMES_PHASE2_SPEC §6). */
.guide-lead { margin-top: -8px; }
.guide-toc ol { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 16px; list-style: none; }
.guide-toc a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 700; }
.guide-part { margin-bottom: 12px; }
.guide-part h2 { display: flex; align-items: center; gap: 8px; margin: 0; }
.guide-part ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 6px; }

/* The landing page in the shared order (home.php, nhmsv GAMES_PHASE2_SPEC §5). */
.landing-mascot { display: grid; place-items: center; }
.landing-mascot .pl-mascot-frame { width: min(360px, 66vw); }
.landing-mascot .pl-mascot-still { width: min(260px, 60vw); height: auto; }
@media (prefers-reduced-motion: reduce) { .landing-mascot .pl-mascot-still { display: block; } }
.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-board { 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-board { grid-column: auto; } }
.landing-shot.is-phone img, .landing-shot.is-card img { max-width: 360px; margin-inline: auto; }
.landing-shot figcaption { color: var(--muted); font-size: 15px; text-align: center; }
.landing-trial { margin: 0 0 16px; }
#plans .plan-list + p { margin-top: 14px; }
.landing-faq { display: grid; gap: 10px; max-width: 820px; }
.landing-faq details { padding-block: 14px; }
.landing-faq summary { cursor: pointer; font-weight: 800; }
.landing-faq details p { margin: 10px 0 0; }
.landing-end input { font-size: 22px; letter-spacing: 0.2em; text-align: center; font-family: var(--font-num); }

/* Language and light/dark in the header (nhmsv GAMES_PHASE2_SPEC §7): two 44px icon buttons at the header's end, the
   language first, then the theme, then the account; «EN» / «ع» on the language button, a moon in light and a sun in dark. */
.top-tools .icon-btn, .coord-tools .icon-btn { width: 44px; height: 44px; }
.lang-btn { text-decoration: none; }
.lang-short { font-family: var(--font-num); font-weight: 800; font-size: 15px; line-height: 1; }
.mm-lang { display: inline-grid; place-items: center; width: 20px; }
.mm-lang .lang-short { font-size: 13px; }
.theme-sun { display: none; }
:root[data-theme="dark"] .theme-sun { display: block; }
:root[data-theme="dark"] .theme-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-sun { display: block; }
  :root:not([data-theme="light"]) .theme-moon { display: none; }
}

/* The reactions row on the phone (GAMES_PHASE2_SPEC §7): six, centred, outside the play moments only. */
.react-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px 0 0; }
.react-row form { margin: 0; }
.react-row.is-resting .react-btn { opacity: .45; }
.react-btn:disabled { cursor: default; }
/* The phone's own copy of a reaction it sent: phone-sized, not the TV's vh sizes. */
.reaction.is-phone { bottom: 80px; }
.reaction.is-phone .reaction-emoji { font-size: 56px; }
.reaction.is-phone .reaction-name { font-size: 13px; padding: 2px 10px; }

/* ---- The player's header (nhmsv GAMES_UNIFIED §3.1, Nasser 2026-11-20): avatar in the team's colour, the name, the
   points and place chips; from the edge ☰, 🔊, 🌙 (44px). The tools row under it keeps the timer and the host's pause. ---- */
.game-page .pl-head { position: sticky; top: 0; z-index: 11; display: flex; align-items: center; gap: 10px; margin: calc(-1 * env(safe-area-inset-top)) -16px 8px;
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px; background: var(--brand); color: var(--on-brand); }
.game-page .control.play { border-top: 0; padding-top: 0; } /* the team's colour is on the header's avatar */
.pl-head-avatar { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; font-size: 28px; line-height: 1;
  background: var(--team, var(--accent)); border: 2px solid color-mix(in srgb, var(--on-brand) 70%, transparent); }
.pl-head-who { flex: 1; min-width: 0; display: grid; gap: 4px; }
.pl-head-name { font-size: 18px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-head-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-chip { padding: 1px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; background: color-mix(in srgb, var(--on-brand) 16%, transparent); }
.pl-head-tools { flex: none; display: flex; gap: 6px; }
.pl-head .icon-btn { width: 44px; height: 44px; min-width: 44px; color: var(--on-brand); background: color-mix(in srgb, var(--on-brand) 14%, transparent); border-color: transparent; }
.game-page .control-head.pl-tools { position: static; min-height: 0; padding-block: 0; }
.game-page .control-head.pl-tools:not(:has(> :not([hidden]))) { display: none; }
#pl-menu .gu-sheet-body { display: grid; gap: 10px; }
.pl-leave { display: grid; gap: 8px; }
.pl-leave > summary { list-style: none; color: var(--bad); }
.pl-leave > summary::-webkit-details-marker { display: none; }
.pl-leave[open] > summary { display: none; }
.pl-leave-yes.gu-btn { background: var(--bad); border-color: var(--bad); }
/* «تكبير الخط»: the game below the header grows by a seventh. */

/* «غادر» (GAMES_UNIFIED §3.1): a seat whose player left stays, faded, until «أنا هو، رجّعني» brings them back. */
.is-away { opacity: .45; filter: grayscale(.8); }
.away-tag { display: inline-block; margin-inline-start: 6px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--muted); color: var(--surface); }
.lp-name small.away-tag, .pl-seat-name .away-tag { color: var(--surface); align-self: flex-start; margin-inline-start: 0; }

/* Dark mode: the lavender pills keep light text (the brand purple is too dark on the dark lavender), e.g. the question's
   category «معلومات عامة» on the phone, «جاهز», and the coordinator's dashboard steps. */
:root[data-theme="dark"] :is(.q-cat, .pl-ready, .dash-pill.is-done, .dash-steps li span, .avatar-more > summary, .pr-points b) { color: var(--ink); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(.q-cat, .pl-ready, .dash-pill.is-done, .dash-steps li span, .avatar-more > summary, .pr-points b) { color: var(--ink); }
}

/* The coordinator's ☰ (GAMES_UNIFIED §3.1, Nasser 2026-11-20): «اللغة» with the other language's name as its value, then
   «حسابي», a divider and the red «تسجيل الخروج». */
.mm-lang-row { justify-content: space-between; }
.mm-value { color: var(--muted); font-weight: 500; }
.mm-sep { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }

/* «لصق» and «مسح QR» are small icons only (Nasser 2026-11-21), so the code itself shows whole; their names stay in
   aria-label and title. */
.qr-btn, .gu-code-tools .qr-btn { flex: none; inline-size: 44px; min-inline-size: 44px; min-block-size: 44px; padding: 0; gap: 0; justify-content: center; }
.code-row .qr-btn { align-self: stretch; }

/* «بياناتي» (nhmsv GAMES_UNIFIED §7): one card, a row per field: the label, the value, a small «✏️ تغيير». */
.acct-rows { list-style: none; margin: 0; padding: 0; display: grid; }
.acct-row { display: grid; grid-template-columns: minmax(4.5em, max-content) minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.acct-row:first-child { border-top: 0; padding-top: 2px; }
.acct-row:not(:has(.acct-fold)) { grid-template-columns: minmax(4.5em, max-content) minmax(0, 1fr); }
.acct-label { color: var(--muted); font-size: 14px; }
.acct-value { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.acct-value.is-empty { color: var(--muted); font-weight: 400; }
.acct-tag { font-weight: 600; color: var(--muted); white-space: nowrap; }
.acct-tag.is-ok { color: var(--ok); }
.acct-fold > summary { list-style: none; }
.acct-fold > summary::-webkit-details-marker { display: none; }
.acct-edit { cursor: pointer; display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--ink); background: var(--surface); white-space: nowrap; }
.acct-edit:hover { border-color: var(--brand); }
.acct-sheet { gap: 12px; }
.acct-sheet .sc-head a.sc-close { display: inline-grid; place-items: center; text-decoration: none; }
.acct-remove { align-self: center; }
.acct-remove .danger-text, .acct-remove > summary.danger-text { color: var(--bad); }
@media (max-width: 420px) { .acct-row { gap: 4px 8px; } .acct-label { font-size: 13px; } .acct-value { font-size: 15px; } .acct-edit { padding: 0 10px; } }
@media (max-width: 340px) { .acct-row { grid-template-columns: minmax(0, 1fr) auto; } .acct-row > .acct-label { grid-column: 1 / -1; } .acct-row:not(:has(.acct-fold)) { grid-template-columns: minmax(0, 1fr); } }
/* The join code with its two icons on one line (Nasser 2026-11-21, as on «ربط شاشة»): the field takes the rest. */
.join-code-row { align-items: stretch; }
.join-code-row > input.code-big { flex: 1 1 auto; min-width: 0; font-size: 26px; letter-spacing: .08em; padding-inline: 8px; }
.join-code-row .gu-code-tools { display: flex; gap: 8px; flex: none; }
.join .join-code-row .gu-code-tools > .qr-btn { flex: none; inline-size: 48px; min-block-size: 64px; }
/* Every code field (GAMES_UNIFIED §1, Nasser 2026-11-21, the «وش؟» app's layout): the code centred, «مسح QR» inside
   one end and «لصق» inside the other, icons only, 44px to touch; the same on a phone and a computer. */
.code-in { position: relative; display: block; flex: 1 1 auto; min-width: 0; }
.code-in > input { display: block; width: 100%; text-align: center; padding-inline: 52px; }
.in-field { position: absolute; top: 50%; transform: translateY(-50%); inline-size: 44px; block-size: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--brand); cursor: pointer; }
.in-field[hidden] { display: none; }
.in-field:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.in-field:focus-visible { outline: 3px solid var(--brand); outline-offset: 0; }
.in-field.in-start { inset-inline-start: 4px; }
.in-field.in-end { inset-inline-end: 4px; }
.join-code-row > input.code-big { font-size: 30px; letter-spacing: .1em; }
.code-in > .code-input { letter-spacing: .3em; }
:root[data-theme="dark"] .in-field { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .in-field { color: var(--ink); } }
/* The avatar row (GAMES_UNIFIED §2, Nasser 2026-11-21): one row, no sideways scroll, 4 to 6 avatars by the row's width
   then «المزيد»; the 5th and 6th, hidden on a narrow row, are repeated at the head of «المزيد» (.av-dup). The chosen
   one has a clear ring. */
.avatar-pick { container-type: inline-size; }
.avatar-pick > .avatar-row { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.avatar-pick .avatar-more .avatar-row { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.avatar-pick .avatar-more[open] > summary { width: calc((100% - 48px) / 7); }
.avatar-pick .av-dup { display: none; }
.avatar-opt:has(input:checked) { box-shadow: 0 0 0 3px var(--accent), 0 0 0 5px color-mix(in srgb, var(--accent) 35%, transparent); }
@container (max-width: 379px) {
  .avatar-pick > .avatar-row { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .avatar-pick > .avatar-row > .avatar-opt:nth-of-type(6) { display: none; }
  .avatar-pick .av-dup:nth-of-type(2) { display: grid; }
  .avatar-pick .avatar-more .avatar-row { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .avatar-pick .avatar-more[open] > summary { width: calc((100% - 40px) / 6); }
}
@container (max-width: 299px) {
  .avatar-pick > .avatar-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .avatar-pick > .avatar-row > .avatar-opt:nth-of-type(5) { display: none; }
  .avatar-pick .av-dup:nth-of-type(1) { display: grid; }
  .avatar-pick .avatar-more .avatar-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .avatar-pick .avatar-more[open] > summary { width: calc((100% - 32px) / 5); }
}
/* The join page's code field is the kit's (shared/game-ui 1.5.0 .gu-code-field + .gu-code-icon); the coordinator's
   pages do not load the kit, so their fields keep .code-in/.in-field above (same layout). */
.gu-code-field.join-code-row > input { display: block; width: 100%; text-align: center; }

/* ---- The contestant's phone fits one screen (Nasser 2026-11-21, a 360/390 screenshot): the header on ONE line (the
   name with an ellipsis, then both chips), and in the question the timer row, the teams, the question and all its
   options without scrolling. ---- */
.pl-head-who { display: flex; align-items: center; gap: 6px; }
.pl-head-name { flex: 0 1 auto; min-width: 2.2em; }
.pl-head-chips { flex: none; flex-wrap: nowrap; gap: 4px; }
@media (max-width: 699px) {
  .game-page .pl-head { gap: 8px; padding: calc(6px + env(safe-area-inset-top)) 12px 6px; margin: calc(-1 * env(safe-area-inset-top)) -12px 4px; }
  .game-page .pl-head-avatar { width: 40px; height: 40px; font-size: 23px; }
  .game-page .pl-head-name { font-size: 16px; }
  .game-page .pl-chip { padding: 1px 7px; font-size: 12px; }
  .game-page .pl-head-tools { gap: 4px; }
  .game-page .control.play { gap: 8px; }
  .game-page .control.play .control-head.pl-tools { min-height: 0; }
  .game-page .control.play .control-head .timer { min-width: 44px; height: 44px; border-radius: 12px; font-size: 22px; }
  .game-page .control.play .card.gu-card.stack { padding: 12px 14px; gap: 8px; }
  .game-page .control.play .q-text { font-size: 18px; line-height: 1.45; }
  .game-page .control.play .answers { gap: 6px; }
  .game-page .control.play .answer { min-height: 48px; padding: 6px 12px; font-size: 16px; line-height: 1.35; }
  .game-page .control.play .your-turn-banner { padding: 6px 10px; gap: 8px; border-radius: 12px; font-size: 14px; }
  .game-page .control.play .your-turn-banner img { width: 32px; height: 32px; }
}
/* The name keeps at least eight letters at 360 (Coordinator on #297): below 400px 🌙 moves into ☰ and the chips shorten
   to «★ 300» and «#1» (the whole words stay for screen readers). */
.pl-chip .chip-short, .pl-theme-menu { display: none; }
@media (max-width: 399px) {
  .game-page .pl-head .pl-theme-head { display: none; }
  #pl-menu .pl-theme-menu { display: inline-flex; }
  .game-page .pl-chip .chip-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .game-page .pl-chip .chip-short { display: inline; }
  .game-page .pl-head-name { min-width: 5em; }
}

/* «الإشعارات» (GAMES_UNIFIED §8.2, Nasser 2026-11-21): a small panel under the bell, never the page's width — 360px on a
   computer, min(360px, 100vw − 24px) on a phone — one radius and one shadow; closes on a tap outside or Esc (shell.js). */
.coord-bell .bell-panel { width: 360px; max-width: calc(100vw - 24px); border-radius: 16px; box-shadow: 0 12px 32px rgb(0 0 0 / .22); }
@media (max-width: 860px) { .coord-bell .bell-panel { top: 60px; inset-inline-start: auto; inset-inline-end: 12px; width: min(360px, calc(100vw - 24px)); } }
/* The home's plan card (GAMES_UNIFIED §8.3): a normal card in the identity's colours, one button. */
.card.dash-plan { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.card.dash-plan .dash-plan-line { color: var(--muted); }
.card.dash-plan .btn.dash-plan-btn { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.card.dash-plan .dash-plan-left { background: var(--lavender); color: var(--brand); }
:root[data-theme="dark"] .card.dash-plan .dash-plan-left { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .card.dash-plan .dash-plan-left { color: var(--ink); } }
.dash-doors .dash-door { display: flex; }
/* «لعبة جديدة» in the tab bar is a circle in every game (GAMES_UNIFIED §8.5): here the identity's purple with a gold ring. */
@media (max-width: 860px) {
  .coord-nav .nav-new .ic3, .coord-nav .nav-new a.active .ic3 { border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--accent), 0 6px 16px color-mix(in srgb, var(--brand) 45%, transparent); }
}
/* «ألعابي» (GAMES_UNIFIED §8.4): six figures, each a link to its filter (a zero is plain), then the open and past games. */
.games-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.games-tile { display: grid; justify-items: start; gap: 2px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; min-width: 0; }
.games-tile b { font-size: 24px; font-family: var(--font-num); line-height: 1.1; }
.games-tile small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
a.games-tile:hover { border-color: var(--brand); }
.games-tile.is-on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand) inset; }
.games-tile.is-zero { opacity: .7; }
@media (max-width: 860px) { .games-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 420px) { .games-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.games-none { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; flex-wrap: wrap; }
.games-search { display: flex; gap: 8px; }
.games-search input { flex: 1; min-width: 0; }
.games-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.games-filter { padding: 4px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 700; }
.games-filter.is-on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.games-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.games-chip { padding: 2px 12px; border-radius: 999px; background: var(--lavender); color: var(--brand); text-decoration: none; font-size: 13px; font-weight: 700; }
:root[data-theme="dark"] .games-chip { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .games-chip { color: var(--ink); } }
.dash-pill.is-off { background: color-mix(in srgb, var(--muted) 16%, var(--surface)); color: var(--muted); }
.games-page .dg-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- The contestant's phone as in the «وش؟» app (Nasser 2026-11-21, his screenshots of the app). ---- */
/* The played squares show who took them (avatar) or ×, everywhere the board is drawn. */
.pick-tile.is-played { display: grid; place-items: center; font-size: 22px; line-height: 1; border: 0; background: color-mix(in srgb, var(--ink) 6%, var(--surface)); color: var(--muted); }
.pick-tile.is-played.is-missed { font-size: 18px; font-weight: 400; }
/* The clock beside the name: a white disc. */
.pl-head .pl-head-timer { order: 0; flex: none; min-width: 40px; height: 40px; border-radius: 50%; background: #ffffff; color: var(--brand); font-size: 18px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--on-brand) 25%, transparent); }
@media (max-width: 699px) {
  /* The teams' row sits in the header's purple band. */
  .game-page .control.play > .scores { margin: -4px -12px 0; padding: 6px 12px 10px; background: var(--brand); }
  .game-page .control.play > .pl-head { margin-bottom: 0; }
  .game-page .control.play .control-head.pl-tools:not(:has(.game-pause)) { display: none; }
  /* The board without a card: a banner, then the squares. */
  .game-page .control.play .card.pl-board { background: none; border: 0; box-shadow: none; padding: 0; gap: 10px; }
  .pl-banner { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0; min-height: 64px; padding: 8px 14px; border-radius: 16px; font-size: 18px; font-weight: 800; position: relative; }
  .pl-banner.is-mine { background: var(--accent); color: var(--on-accent); border: 1.5px solid color-mix(in srgb, var(--ink) 35%, transparent); }
  .pl-banner.is-mine .pl-banner-art { position: absolute; inset-inline-end: 12px; width: 52px; height: 52px; }
  .pl-banner.is-other { background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 700; }
  .pl-banner.is-other img { position: absolute; inset-inline-end: 12px; }
  .game-page .control.play .pick-board { gap: 6px; padding: 0; background: none; }
  .game-page .control.play .pick-cat { min-height: 44px; padding: 4px; border-radius: 10px; background: var(--brand); color: var(--on-brand); font-size: 13px; line-height: 1.2; }
  .game-page .control.play .pick-cat .ic3 { display: none; }
  .game-page .control.play .pick-tile { min-height: 46px; border-radius: 10px; font-size: 17px; }
  /* The question as in the app: no card, the owner's chip, the question big in the middle, the options with dark letters. */
  .game-page .control.play .card.gu-card.stack:has(form.answers) { background: none; border: 0; box-shadow: none; padding: 4px 0; text-align: center; }
  .game-page .control.play .q-meta { justify-content: center; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  .q-owner { display: inline-flex; align-items: center; gap: 4px; padding: 2px 12px; border-radius: 999px; background: var(--team, var(--brand)); color: #ffffff; font-weight: 800; }
  .game-page .control.play .q-text { font-size: 22px; font-weight: 800; text-align: center; }
  .game-page .control.play .your-turn-banner { background: none; border: 0; padding: 0; justify-content: center; color: var(--muted); animation: none; }
  .game-page .control.play .your-turn-banner img { display: none; }
  .game-page .control.play .answer { min-height: 56px; border-width: 2px; border-radius: 14px; font-size: 18px; }
  .game-page .control.play .answer .opt-key { order: 2; margin-inline-start: auto; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--surface); display: grid; place-items: center; flex: none; }
  /* The result: the whole screen under the header in green or red, the mascot with the mark, the points, «نقاطك قبل ← بعد», the line in white. */
  .overlay.is-result.is-mine { top: 0; align-items: stretch; background: var(--ok); color: #ffffff; }
  .overlay.is-result.is-mine.mine-down { background: var(--bad); }
  .overlay.is-mine .card.phone-result { background: transparent; border: 0; box-shadow: none; color: #ffffff; text-align: center; justify-items: center; }
  .overlay.is-mine .card.phone-result p.pr-head, .overlay.is-mine.mine-down .card.phone-result p.pr-head { color: #ffffff; justify-content: center; }
  .overlay.is-mine .pr-points b, .overlay.is-mine .pr-points span { color: #ffffff; }
  .overlay.is-mine .pr-place-line, .overlay.is-mine .pr-answer, .overlay.is-mine .pr-rank { display: none; }
  .overlay.is-mine .pr-chart { background: none; border: 0; color: #ffffff; }
  .overlay.is-mine .pr-chart .prc-line, .overlay.is-mine .pr-chart .prc-zero { stroke: #ffffff; }
  .overlay.is-mine .pr-chart .prc-dot { fill: #ffffff; }
  .overlay.is-mine .pr-chart text, .overlay.is-mine .pr-next { fill: #ffffff; color: #ffffff; }
  /* The waiting room: the avatar over the clip's card, then «أنت في اللعبة!», the name and the dots. */
  .game-page .play-lobby .pl-card { display: grid; justify-items: center; gap: 2px; background: none; border: 0; box-shadow: none; margin-top: -58px; text-align: center; }
  .game-page .play-lobby .pl-me-avatar { width: 96px; height: 96px; font-size: 56px; border: 5px solid var(--accent); background: var(--surface); }
  .game-page .play-lobby .pl-me-title { font-size: 26px; font-weight: 800; margin: 4px 0 0; color: var(--ink); }
  .game-page .play-lobby .pl-me-name { font-weight: 400; color: var(--muted); }
  .game-page .play-lobby .pl-wait { background: none; color: var(--muted); }
}
.pr-from-to { display: inline-flex; align-items: center; gap: 10px; margin: 6px auto; padding: 10px 18px; border-radius: 14px; background: rgb(0 0 0 / .18); color: #ffffff; }
.pr-from-to b { font-size: 26px; font-weight: 900; font-family: var(--font-num); }
.card.phone-result:not(.is-mine) .pr-from-to, .result-inline .pr-from-to { display: none; }
@media (max-width: 699px) {
  /* The teams in the purple band, as in the app: dark cards with white text, the turn's card in gold. */
  .game-page .control.play > .scores .team-card { background: color-mix(in srgb, var(--on-brand) 12%, var(--brand)); color: var(--on-brand); border: 0; border-top: 4px solid var(--team, var(--accent)); }
  .game-page .control.play > .scores .team-card.is-turn { background: var(--accent); color: var(--on-accent); }
  .game-page .control.play > .scores .team-card .tc-score { color: inherit; }
  .pl-banner.is-other { padding-inline: 52px; }
  .overlay.is-mine .card.phone-result p.pr-head { flex-wrap: nowrap; white-space: nowrap; font-size: 30px; gap: 8px; }
  .overlay.is-mine .card.phone-result p.pr-head img { width: 40px; height: 40px; }
}
@media (max-width: 699px) {
  .game-page .control.play .card.pl-board.your-turn { background: none; border: 0; box-shadow: none; padding: 0; animation: none; }
  .overlay.is-mine .pr-chart figcaption { color: #ffffff; }
}
@media (max-width: 699px) { .game-page .control.play .pick-board.is-locked .pick-tile:not(.is-played) { opacity: 1; } }
/* «بياناتي»'s buttons are round 44px icons (GAMES_UNIFIED §8.9). */
.acct-edit { width: 44px; height: 44px; min-height: 44px; padding: 0; justify-content: center; border-radius: 50%; color: var(--brand); }
:root[data-theme="dark"] .acct-edit { color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .acct-edit { color: var(--ink); } }
@media (max-width: 420px) { .acct-edit { padding: 0; } }
/* «الأجهزة المرتبطة» (GAMES_UNIFIED §8.9). */
.devices { list-style: none; margin: 0; padding: 4px 16px 12px; display: grid; gap: 6px; }
.device { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.device:first-child { border-top: 0; }
.device-name { display: grid; gap: 2px; min-width: 0; }
/* Each row as in the other games (Coordinator on #301): the small grey label above, the value in bold under it, the
   round button at the row's end; «· مؤكَّد» sits by the label. */
.acct-row, .acct-row:not(:has(.acct-fold)) { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'label btn' 'value btn'; gap: 2px 12px; }
.acct-row > .acct-label { grid-area: label; font-size: 13px; }
.acct-row > .acct-value { grid-area: value; font-size: 16px; }
.acct-row > .acct-fold { grid-area: btn; align-self: center; }
@media (max-width: 340px) { .acct-row > .acct-label { grid-column: auto; } }
/* «حذف حسابي» (GAMES_UNIFIED §8.10): what goes and what stays. */
.delete-list { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 4px; }

/* The share sheet (GAMES_UNIFIED §9.9): the code is a button that copies itself; three round icons under it. */
.lj-code-copy { border: 0; background: none; cursor: pointer; font: inherit; margin-inline: auto; position: relative; }
.share-icons { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.share-ic { display: grid; justify-items: center; gap: 4px; min-width: 64px; border: 0; background: none; color: inherit; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; text-decoration: none; position: relative; }
.share-ic svg { width: 52px; height: 52px; padding: 13px; box-sizing: border-box; border-radius: 50%; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--brand); }
.share-ic.share-wa svg { background: color-mix(in srgb, #25d366 18%, var(--surface)); color: #128c4a; }
.share-ic[hidden] { display: none; }
[data-copied]::after { content: attr(data-copied); position: absolute; left: 50%; transform: translateX(-50%); bottom: -22px; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: var(--surface); font-size: 11px; font-weight: 700; white-space: nowrap; }
.lp-extra-card form { margin: 0; }
button.lp-host-btn { width: 100%; font: inherit; font-size: 22px; text-align: start; color: var(--ink); }
.end-share { display: grid; gap: 8px; text-align: center; }
.end-share p { margin: 0; }
.first-cheer { margin: 0; padding: 12px 16px; border-radius: 14px; background: var(--accent); color: var(--on-accent); font-size: 20px; font-weight: 900; text-align: center; }
.first-cheer[hidden] { display: none; }
.plan-ending { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
/* «تكبير الخط» on the coordinator's pages too (GAMES_UNIFIED §9.7): the page body grows, the menus stay. */
.mx-row[hidden] { display: none; }
.mx-note { cursor: default; color: var(--muted); }
/* «تكبير الخط» and «صوت اللعبة» as switches (GAMES_UNIFIED §9.7, as Feudboard/Busboard): ON = brand colour with the knob
   at the start (right in Arabic), OFF = grey with the knob at the end. */
.mx-switch { flex: none; margin-inline-start: auto; position: relative; width: 46px; height: 28px; border-radius: 999px; background: color-mix(in srgb, var(--muted) 35%, var(--surface)); transition: background .15s; }
.mx-switch::after { content: ''; position: absolute; top: 3px; inset-inline-end: 3px; width: 22px; height: 22px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: inset-inline-end .15s; }
[role="switch"][aria-checked="true"] .mx-switch { background: var(--brand); }
[role="switch"][aria-checked="true"] .mx-switch::after { inset-inline-end: 21px; }
/* GAMES_UNIFIED §9.3–§9.4: «كيف أدير اللعبة؟» under the first-game steps; the running-game line and «إنهاء اللعبة». */
.first-guide { margin: 10px 0 0; text-align: center; font-weight: 700; }
.games-running { margin: 0; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--ok) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 45%, var(--line)); font-weight: 700; }
.dash-games .games-end { list-style: none; margin: -2px 0 6px; padding-inline: 14px; }
.dash-games .games-end form { margin: 6px 0 0; }
/* GAMES_UNIFIED §9.1 (Nasser 2026-11-21): «تسجيل الخروج» at the end of the computer's side menu, the plan badge on a
   ☰ menu head on a phone (the bar stays one row), the footer under every coordinator page, and the strip while the browser is offline. */
.coord-out { margin: 10px 0 0; }
.coord-out button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 16px; 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: color-mix(in srgb, var(--side-ink) 12%, transparent); }
/* ☰ head (GAMES_UNIFIED §18.1): «{name} · منسق», then the plan as a small pill in the game's accent (not a bar). */
.mm-head { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 12px 6px; color: var(--ink); text-decoration: none; }
.mm-who { max-width: 100%; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-plan { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 800; line-height: 1.6; }
@media (max-width: 860px) { .coord-out { display: none; } }
.coord-footer { order: 99; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.coord-footer nav { display: flex; flex-wrap: wrap; gap: 6px 8px; justify-content: center; font-size: 13px; color: var(--muted); }
.coord-footer a { color: var(--muted); }
@media (max-width: 860px) { .coord-footer { padding-bottom: 72px; } }
.offline-strip { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--bad); color: #ffffff; font-weight: 700; text-align: center; position: sticky; top: 8px; z-index: 30; }
.offline-strip[hidden] { display: none; }
/* The player (GAMES_UNIFIED §9.11): «كيف نلعب؟» the first time, «🔔 نبّهني», «افتح لعبتك الخاصة», «الإنترنت بطيء». */
.pl-howto { display: grid; gap: 10px; text-align: start; }
.pl-howto h2 { margin: 0; font-size: 20px; }
.pl-howto ol { margin: 0; padding-inline-start: 1.3em; display: grid; gap: 6px; }
.pl-howto[hidden], .pl-notify[hidden], .pl-sound-menu[hidden] { display: none; }
.pl-own { text-align: center; }
.pl-own h2 { margin: 0; }
.net-slow { position: fixed; top: max(10px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 80; margin: 0; padding: 6px 14px; border-radius: 999px; background: var(--warn, #b45309); color: #ffffff; font-size: 13px; font-weight: 800; box-shadow: 0 4px 14px rgb(0 0 0 / .2); }
.net-slow[hidden] { display: none; }
/* «رفع ملف CSV» (GAMES_UNIFIED §9.14): the preview, one line per row with ✓ or its error. */
.mq-csv-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 360px; overflow-y: auto; }
.mq-csv-rows li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 10px; font-size: 14px; }
.mq-csv-rows li.is-ok { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); }
.mq-csv-rows li.is-bad { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); }
.mq-csv-rows li.is-bad b { color: var(--bad); font-size: 13px; }
.mq-csv-line { color: var(--muted); font-size: 12px; white-space: nowrap; }
.mq-csv-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csv-pick { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px 10px; }
.csv-pick-btn { cursor: pointer; }
.csv-pick-btn:focus-within { outline: 3px solid var(--info); outline-offset: 2px; }
.csv-pick-name { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* «ثيم صفحاتك» (GAMES_UNIFIED §9.14): a radio row per theme with its three dots. */
.palette-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.palette-opt:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.pal-dots { display: inline-flex; gap: 4px; }
.pal-dot { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .15); }
.pal-charcoal-1 { background: var(--pal-charcoal-1); }
.pal-charcoal-2 { background: var(--pal-charcoal-2); }
.pal-charcoal-3 { background: var(--pal-charcoal-3); }
.pal-plum-1 { background: var(--pal-plum-1); }
.pal-plum-2 { background: var(--pal-plum-2); }
.pal-plum-3 { background: var(--pal-plum-3); }
.pal-wine-1 { background: var(--pal-wine-1); }
.pal-wine-2 { background: var(--pal-wine-2); }
.pal-wine-3 { background: var(--pal-wine-3); }
/* «إحصاءاتي» (GAMES_UNIFIED §9.14): the month bars and the two lists. */
.games-tabs { margin-top: -6px; }
.st-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.st-bars li { display: grid; grid-template-columns: 7.5em minmax(0, 1fr) 2em; gap: 10px; align-items: center; }
.st-bar-label { font-size: 13px; color: var(--muted); }
.st-bar { height: 12px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 10%, var(--surface)); overflow: hidden; }
.st-bar i { display: block; height: 100%; border-radius: 999px; background: var(--brand); width: 0; }
.st-bar i.w1 { width: 10%; }
.st-bar i.w2 { width: 20%; }
.st-bar i.w3 { width: 30%; }
.st-bar i.w4 { width: 40%; }
.st-bar i.w5 { width: 50%; }
.st-bar i.w6 { width: 60%; }
.st-bar i.w7 { width: 70%; }
.st-bar i.w8 { width: 80%; }
.st-bar i.w9 { width: 90%; }
.st-bar i.w10 { width: 100%; }
.st-bars b { text-align: end; }
.st-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.st-list li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--brand) 6%, var(--surface)); }
/* «عنوان المناسبة» (Game\EventTitle): the field in the game's settings, the line on the screen and on the phones. */
.set-event { display: flex; flex-direction: column; gap: 6px; }
.set-event input { width: 100%; }
.screen-event { margin-inline-start: 14px; padding: 4px 14px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 700; max-width: 45vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-event { margin: 0 0 8px; padding: 6px 12px; border-radius: 12px; background: var(--accent); color: var(--on-accent); font-weight: 700; text-align: center; overflow-wrap: anywhere; }
.set-event > label, .set-event > span:first-child { font-weight: 700; }
/* GAMES_UNIFIED §10 (2026-11-22): the public guide, the join page's home link and small footer, the landing shots. */
.htp-steps { margin: 0; padding-inline-start: 22px; display: grid; gap: 8px; }
.top-home { color: inherit; font-weight: 700; text-decoration: none; padding: 6px 10px; border-radius: 10px; }
.top-home:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.foot-min { padding: 16px; text-align: center; font-size: 13px; }
.foot-min .foot-links { justify-content: center; gap: 8px; }
.shot-open { display: block; border-radius: 16px; }
.landing-shot img { background: var(--lavender); }
.plan-players { font-size: 15px; }
.htp-devices { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.htp-devices li { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
/* The visitor's header (GAMES_UNIFIED §11, Nasser 2026-11-22): 3 links and two buttons from 1100px, else name, «دخول» and ☰. */
.top-pub .top-in { max-width: 1240px; }
.pub-links { display: flex; gap: 22px; margin-inline: auto; }
.pub-links a, .pub-menu nav a { color: inherit; text-decoration: none; font-weight: 600; }
.pub-links a:hover { text-decoration: underline; }
.top-pub .btn { min-height: 40px; padding: 0 16px; font-size: 15px; white-space: nowrap; }
.pub-join { background: transparent; color: inherit; border: 1.5px solid currentColor; box-shadow: none; }
.pub-login { background: var(--accent); color: var(--on-accent); border: 0; box-shadow: none; }
.pub-narrow, .pub-narrow-inline { display: none; }
.pub-menu { max-width: 1240px; margin-inline: auto; padding: 4px max(16px, env(safe-area-inset-right)) 16px max(16px, env(safe-area-inset-left)); display: grid; gap: 12px; border-top: 1px solid rgb(255 255 255 / .15); }
.pub-menu[hidden] { display: none; }
.pub-menu nav { display: grid; gap: 4px; }
.pub-menu nav a { padding: 10px 0; }
.pub-menu .pub-join { width: 100%; justify-content: center; }
.pub-icons { display: flex; align-items: center; gap: 8px; }
@media (max-width: 1099.98px) {
  .pub-links, .pub-wide { display: none; }
  .pub-narrow { display: inline-flex; align-items: center; justify-content: center; }
  .pub-wide-inline { display: none; }
  .pub-narrow-inline { display: inline; }
  .top-pub .btn.pub-login { min-height: 36px; padding: 0 14px; }
}
@media (min-width: 1100px) { .pub-menu { display: none !important; } }
/* «قريباً» (/soon): coordinator accounts open at launch. */
.soon-page { max-width: 640px; margin-inline: auto; padding-block: 24px; }
.soon-page .badge-soon { justify-self: start; align-self: flex-start; width: fit-content; }
/* GAMES_UNIFIED §11.5–11.7 (Nasser 2026-11-22): the visitor header full width with Busboard's sizes (68px bar, 24px edges,
   34px logo, 21px name, round 44px icons, 44px pill buttons, 10px gaps; on a phone a 38px «دخول» and a round 44px ☰),
   the sign-in labels one size, and the join title inside its card. */
.top-pub .top-in, .top-player .top-in { max-width: none; min-height: 68px; padding: 12px max(24px, env(safe-area-inset-right)) 12px max(24px, env(safe-area-inset-left)); gap: 10px; }
.top-pub .brand img, .top-player .brand img { width: 34px; height: 34px; }
.top-pub .brand strong, .top-player .brand strong { font-size: 21px; }
.top-pub .top-tools { gap: 10px; }
.top-pub .top-tools .icon-btn, .top-player .top-tools .icon-btn, .pub-icons .icon-btn { width: 44px; height: 44px; border-radius: 50%; }
.top-pub .btn { min-height: 44px; border-radius: 22px; padding: 0 18px; font-size: 15px; }
.pub-links { gap: 28px; }
@media (max-width: 1099.98px) {
  .top-pub .top-in, .top-player .top-in { padding-inline: max(20px, env(safe-area-inset-left)); }
  .top-pub .btn.pub-login { min-height: 38px; padding: 0 16px; font-size: 14px; }
  .pub-burger { border-radius: 50%; }
}
.label-row > label { font-size: 1rem; font-weight: 700; }
.join-title { font-size: 26px; margin: 0; text-align: center; }
/* Round 5 (GAMES_UNIFIED §12, Nasser 2026-11-22). */
/* §12.1 the test strip's ✕. */
.test-strip { display: flex; align-items: center; justify-content: center; gap: 8px; }
.strip-x { flex: none; width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 14px; cursor: pointer; }
.strip-x:hover { background: rgb(0 0 0 / .08); }
.strip-off .test-strip { display: none; }
/* §12.2 the header's background full width, its content in Busboard's 1160px container, 24px edges below it. */
.top-pub .top-in, .top-player .top-in { max-width: 1160px; margin-inline: auto; }
.pub-menu { max-width: 1160px; }
/* §12.3 a one-line footer. */
.foot-line .foot-in { max-width: 1160px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; color: inherit; font-weight: 800; text-decoration: none; }
.foot-brand img { border-radius: 6px; }
.foot-line .foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; flex: 1 1 auto; }
.foot-line .foot-version { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 8px; }
/* §12.4 the join page as Feudboard: one centred card, the title at its start, 12px fields, a 2px ring on the chosen
   avatar, «انضمام» flat. */
.join { max-width: 480px; }
.join-box { display: grid; gap: 16px; text-align: start; }
.join-title { font-size: 26px; margin: 0; text-align: start; }
.join-form, .join-rejoin { display: grid; gap: 16px; }
.join .gu-code-field, .join input.code-big, .join #j-name, .join #r-name, .join #r-code { border-radius: 12px; }
.join .avatar-opt { border-radius: 12px; border-width: 2px; transform: none; }
.join .avatar-opt:has(input:checked) { border-color: var(--brand); background: var(--surface); box-shadow: none; transform: none; }
.join .join-submit { min-height: 52px; border-radius: 12px; box-shadow: none; }
.join .join-submit:active { transform: none; }
/* §12.6 «أنا هو، رجّعني» swaps the card's content. */
.join-rejoin { display: none; }
.join-box:has(#rejoin:target) .join-rejoin { display: grid; }
.join-box:has(#rejoin:target) .join-form { display: none; }
.rejoin-head { font-size: 18px; margin: 0; }
/* §12.5 «المزيد» of the avatars as a sheet: from the bottom (~70% high) on a phone, centred on a computer. */
.avatar-more[open] { grid-column: auto; }
.avatar-more[open] > summary { width: auto; margin-bottom: 0; }
.av-sheet { display: none; }
.avatar-more[open] .av-sheet { display: flex; position: fixed; inset: 0; z-index: 80; background: rgb(0 0 0 / .45); align-items: flex-end; justify-content: center; }
.av-sheet-in { width: 100%; max-height: 70dvh; display: flex; flex-direction: column; gap: 12px; padding: 16px 16px max(16px, env(safe-area-inset-bottom)); background: var(--surface); color: var(--ink); border-radius: 20px 20px 0 0; box-shadow: 0 -8px 30px rgb(0 0 0 / .25); }
.av-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 18px; }
.av-sheet-x { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: inherit; font-size: 16px; cursor: pointer; }
.av-sheet-in > .avatar-row { overflow-y: auto; grid-template-columns: repeat(6, minmax(0, 1fr)) !important; padding: 4px; }
.av-sheet-in .av-dup { display: none !important; }
@media (min-width: 700px) {
  .avatar-more[open] .av-sheet { align-items: center; }
  .av-sheet-in { width: min(560px, 92vw); max-height: 70vh; border-radius: 20px; }
}
/* §12.2 the page content in the header's container, so they line up on wide screens. */
main.wide { max-width: 1160px; padding-inline: max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-left)); }
/* §12.4 «المزيد» a rounded square like the avatars. */
.join .avatar-more > summary { border-radius: 12px; aspect-ratio: 1; }
/* ==== The join page's master design (nhmsv GAMES_UNIFIED §13, Nasser 2026-11-22): the same tokens, by the same names, in
   the four games; only colours, logo/name and identity icons differ. Rejoin and the avatar sheet use them too.
   §17.1 (Nasser 2026-11-22): the numbers equal --auth-* (title 22, name 46 r9, button 48 r9, card pad 20 r14); code stays 60. ==== */
:root {
  --join-bar-h: 64px; --join-card-max: 420px; --join-gap-top: 20px; --join-card-pad: 20px; --join-card-r: 14px; --join-section-gap: 20px;
  --join-code-h: 60px; --join-name-h: 46px; --join-btn-h: 48px; --join-avatar: 48px; --join-avatar-gap: 8px;
  --join-title: 22px; --join-label: 14px; --join-hint: 12px; --join-field-r: 9px; --join-btn-r: 9px;
  --join-side: 20px;
}
@media (max-width: 374.98px) { :root { --join-side: 16px; } }
/* The bar: logo and name | «الرئيسية» | theme. */
.top-player .top-in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: var(--join-bar-h); height: var(--join-bar-h);
  max-width: none; padding-block: 0; padding-inline: var(--join-side); }
.top-player .top-home { justify-self: center; }
.top-player .top-tools { justify-self: end; }
.top-player .top-tools .icon-btn { width: 40px; height: 40px; }
/* The page: the card at the top, the footer at the bottom centre. */
main.narrow:has(> .join) { padding: var(--join-gap-top) var(--join-side) 24px; }
.join { max-width: var(--join-card-max); width: 100%; margin-inline: auto; padding: 0; gap: 0; }
.join .join-box { padding: var(--join-card-pad); gap: var(--join-section-gap); border-radius: var(--join-card-r); box-shadow: none; }
.join .join-form, .join .join-rejoin { gap: var(--join-section-gap); }
.join .join-title { font-size: var(--join-title); font-weight: 800; line-height: 1.3; }
.join .field-group { gap: 6px; }
.join .field-group > label, .join .avatar-pick legend { font-size: var(--join-label); font-weight: 500; margin: 0; }
.join .gu-code-hint, .join .field-group .small, .join .av-hint, .join .rejoin-link, .join .join-rejoin > .small { font-size: var(--join-hint); font-weight: 400; margin: 0; }
.join .gu-code-field, .join input.code-big { height: var(--join-code-h); min-height: var(--join-code-h); border-radius: var(--join-field-r); }
.join input.code-big { font-size: 26px; padding-block: 0; }
.join #j-name, .join #r-name { height: var(--join-name-h); min-height: var(--join-name-h); border-radius: var(--join-field-r); font-size: 16px; }
.join .join-submit { height: var(--join-btn-h); min-height: var(--join-btn-h); border-radius: var(--join-btn-r); box-shadow: none; font-size: 17px; padding-block: 0; }
.join .join-submit:active, .join .join-submit:hover { box-shadow: none; transform: none; }
/* Five avatars and «المزيد» in one row, each --join-avatar square (smaller only when the row has no room). */
.join .avatar-pick { gap: 6px; }
.join .avatar-pick > .avatar-row { grid-template-columns: repeat(6, minmax(0, var(--join-avatar))); gap: var(--join-avatar-gap); justify-content: start; }
.join .avatar-pick > .avatar-row > .avatar-opt { display: grid; }
.join .avatar-pick > .avatar-row > .avatar-opt:nth-of-type(n+6) { display: none; }
.join .avatar-opt, .join .avatar-more > summary { width: 100%; aspect-ratio: 1; border-radius: var(--join-field-r); font-size: 24px; }
.join .av-sheet-in .av-dup { display: none !important; }
.join .av-sheet-in .av-dup:nth-of-type(2) { display: grid !important; }
.join .av-sheet-in > .avatar-row { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; gap: var(--join-avatar-gap); }
/* The footer at the bottom centre. */
.foot-min { margin-top: auto; padding: 12px var(--join-side) max(16px, env(safe-area-inset-bottom)); font-size: var(--join-hint); }
.top-player .top-in { grid-template-columns: auto 1fr auto; gap: 12px; }
.top-player .brand { min-width: 0; }
.join .avatar-more > summary { font-size: 12px; font-weight: 700; padding: 0; }
:root[data-theme="dark"] .join .avatar-opt:has(input:checked) { border-color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .join .avatar-opt:has(input:checked) { border-color: var(--accent); } }
/* ==== «دخول المنسق» and «حساب منسق جديد» master design (nhmsv GAMES_UNIFIED §14, Nasser 2026-11-22; Feudboard's pilot
   values): the same structure and sizes in the four games, as --auth-* variables of the same names. UI only: the forms,
   their fields 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 as the join page's (§13, §14.4). */
.top-pub .top-in { min-height: var(--auth-bar-h); padding-block: 10px; }
main.narrow:has(> .auth-master) { padding: var(--auth-gap-top) var(--auth-side) 32px; }
.auth-master { max-width: var(--auth-card-max); gap: 0; }
.auth-master .auth-card { 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; line-height: 1.3; }
.auth-master .auth-head p, .auth-master .field-group label, .auth-master .label-row, .auth-master .label-row > label, .auth-master .muted.small, .auth-master .small, .auth-master .auth-sep { font-size: var(--auth-text); line-height: 1.5; }
.auth-master .field-group label, .auth-master .label-row > label { font-weight: 700; }
.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"]) { height: var(--auth-input-h); min-height: var(--auth-input-h); border-radius: var(--auth-r); }
.auth-master .btn { height: var(--auth-btn2-h); min-height: var(--auth-btn2-h); border-radius: var(--auth-r); box-shadow: none; padding-block: 0; }
.auth-master .btn.primary { height: var(--auth-btn-h); min-height: var(--auth-btn-h); box-shadow: none; }
.auth-master .btn:active, .auth-master .btn.primary:active { transform: none; box-shadow: none; }
/* The eye inside the password field, 8px from the field's end, centred. */
.auth-master .pw-reveal { inset-inline-end: 8px; top: 50%; transform: translateY(-50%); }
.auth-master .password-field input { padding-inline-end: 48px; }
/* The footer under 1100px (GAMES_UNIFIED §15): one 52px row, the name, then «A+» and ⓘ (34px, radius 9); ⓘ opens a sheet
   with the links and the version, in the style of the avatars' «المزيد». 1100px and up keep the §12.3 line. */
.foot-phone { display: none; }
.foot-sheet[hidden] { display: none !important; }
.foot-sheet:not([hidden]) { display: flex; position: fixed; inset: 0; z-index: 90; background: rgb(0 0 0 / .45); align-items: flex-end; justify-content: center; }
.foot-grip { align-self: center; width: 40px; height: 4px; border-radius: 4px; background: var(--line); }
.foot-sheet-links { display: grid; }
.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: 4px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
@media (min-width: 700px) { .foot-sheet:not([hidden]) { align-items: center; } }
@media (max-width: 1099.98px) {
  .foot-line .foot-in, .coord-footer > nav { display: none; }
  .foot-line, .coord-footer { padding: 0; }
  .foot-phone { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 52px; padding-inline: var(--join-side, 20px); border-top: 1px solid var(--line); }
  .foot-phone-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 800; text-decoration: none; min-width: 0; }
  .foot-phone-brand img { border-radius: 7px; flex: none; }
  .foot-phone-tools { display: inline-flex; gap: 8px; }
  .foot-sq { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: inline-grid; place-items: center; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; padding: 0; }
}
@media (max-width: 1099.98px) { .coord-footer { border-top: 0; } }
/* One link per row in the ⓘ sheet wherever it sits (the coordinator's footer styles its own nav as a wrapped line). */
.foot-sheet .foot-sheet-links, .coord-footer .foot-sheet .foot-sheet-links { display: grid; grid-template-columns: 1fr; gap: 0; justify-content: stretch; font-size: 15px; }
.foot-sheet .foot-sheet-links a, .coord-footer .foot-sheet .foot-sheet-links a { display: flex; align-items: center; width: 100%; min-height: 44px; color: var(--ink); text-align: start; border-bottom: 1px solid var(--line); }
/* §16 (Nasser 2026-11-22): the visitor's ☰ on a phone is a card under the button, ~300px, radius 14, a light shadow,
   anchored to the screen edge on the ☰ side; the three links, «انضم للعبة» and the icons (language, theme), no caption. */
.top-pub { position: relative; }
.pub-menu { position: absolute; z-index: 60; top: calc(100% + 6px); inset-inline-end: 12px; width: min(300px, calc(100vw - 24px)); max-width: none; margin: 0;
  padding: 12px; border: 1px solid var(--line); border-top: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink);
  box-shadow: 0 8px 24px rgb(0 0 0 / .14); display: grid; gap: 10px; }
.pub-menu nav a { padding: 10px 6px; border-radius: 10px; }
.pub-menu nav a:hover { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.pub-menu .pub-join { color: var(--ink); border-color: var(--line); }
.pub-menu .pub-icons .icon-btn { color: var(--ink); border-color: var(--line); }
/* §14 against Feudboard's shots: the platform icon as a 48×48 tile (the approved icon on a soft brand tile, not a
   free-floating logo), and the public footer as a white bar pinned to the bottom of short pages. */
.auth-master .auth-head img { box-sizing: border-box; padding: 5px; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); object-fit: contain; }
.foot { background: var(--surface); }
/* Not this phone's turn (Nasser 2026-11-22): the unplayed squares grey, as disabled, so nobody mistakes them for theirs;
   the turn owner's preview still lights its square. Played squares keep their light tile with the avatar. */
.control.play .pick-board.is-locked .pick-tile:not(.is-played):not(.pv-tile) { background: color-mix(in srgb, var(--muted) 45%, var(--surface)); color: color-mix(in srgb, var(--ink) 55%, var(--surface)); border-color: transparent; box-shadow: none; }
.control.play .pick-board.is-locked { filter: none; }
/* GAMES_UNIFIED §17.5 (Nasser 2026-11-22): the final-price line under the prices, with the refund policy (§17.2) beside it. */
.plan-final { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 0; }
.plan-final a { font-weight: 600; white-space: nowrap; }
/* «باقتك» (GAMES_UNIFIED §18.2, Nasser 2026-11-22): title and chip on one row, one line, a full-width button 48 r9. */
.card.dash-plan { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 16px; flex-wrap: nowrap; }
.dash-plan-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.dash-plan-top .dash-plan-title { font-size: 18px; min-width: 0; }
.dash-plan-top .dash-plan-left { flex: none; }
.card.dash-plan .dash-plan-line { margin: 0; white-space: normal; }
.card.dash-plan .btn.dash-plan-btn { width: 100%; height: 48px; min-height: 48px; border-radius: 9px; box-shadow: none; padding-block: 0; font-size: 15px; }
/* §18.5 (Nasser 2026-11-22): on a phone, a page with the bottom bar has no footer; its links are in «المزيد». */
@media (max-width: 860px) { .coord-footer { display: none; } }
.mx-version { text-align: center; margin: 14px 0 0; }
/* «لعبة جديدة» on one page (GAMES_UNIFIED §18.4, draft for Nasser): «ابدأ بسرعة», the two modes, rows that open
   sheets, «إعدادات متقدمة»; a sticky dock on a phone, a sticky «ملخص اللعبة» on a computer. */
.ng .ng-btn { width: 100%; height: 48px; min-height: 48px; border-radius: 9px; box-shadow: none; padding-block: 0; font-size: 16px; }
.ng-grid { display: grid; gap: 18px; align-items: start; }
.ng-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ng-quick { display: flex; flex-direction: column; gap: 12px; border: 2px solid var(--brand); padding: 16px; }
:root[data-theme="dark"] .ng-quick { border-color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ng-quick { border-color: var(--accent); } }
.ng-quick-head { margin: 0; }
.ng-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.ng-tiles > div { background: var(--lavender); border-radius: 10px; padding: 8px 12px; min-width: 0; }
.ng-tiles dt { font-size: 12px; color: var(--muted); }
.ng-tiles dd { margin: 0; font-weight: 800; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ng-or { font-size: 15px; margin: 4px 0 0; color: var(--muted); }
.ng-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ng-modes .setup-tile { padding: 10px 12px; grid-template-columns: 1fr; }
.ng-modes .setup-tile .st-icon { display: none; }
.ng-rows { padding: 0 16px; }
.ng-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line);
  background: none; color: var(--ink); font: inherit; font-weight: 600; text-align: start; cursor: pointer; }
.ng-rows > .ng-row:last-child { border-bottom: 0; }
.ng-k { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.ng-v { color: var(--brand); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
:root[data-theme="dark"] .ng-v { color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ng-v { color: var(--accent); } }
.ng-v::after { content: '‹'; margin-inline-start: 8px; color: var(--muted); }
[dir=ltr] .ng-v::after { content: '›'; }
.ng-row-seg { cursor: default; flex-wrap: wrap; }
.ng-seg { padding: 3px; gap: 2px; }
.ng-seg label span { min-width: 34px; padding-inline: 6px; }
.ng-adv { padding: 14px 16px; }
.ng-sum { display: none; }
.ng-sum h2 { margin: 0 0 6px; font-size: 17px; }
.ng-sum dl { margin: 0 0 14px; }
.ng-sum dl > 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: 800; text-align: end; }
.ng-plan { text-align: center; margin: 8px 0 0; }
.ng-dock { display: none; }
.coord-back { display: none; }
/* The sheets (the kit's gu-sheet behaviour from game-ui.js; its look here, as the coordinator pages load no kit CSS). */
.ng-sheet { width: 100%; max-width: 640px; max-height: 88dvh; margin: auto auto 0; padding: 0; border: 0; border-radius: 20px 20px 0 0; background: var(--surface); color: var(--ink); overflow: hidden; }
.ng-sheet[open] { display: flex; flex-direction: column; }
.ng-sheet::backdrop { background: rgba(10, 6, 30, .5); }
.ng-sheet .gu-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 8px; }
.ng-sheet .gu-sheet-head h2 { margin: 0; font-size: 19px; }
.ng-sheet .gu-sheet-body { display: flex; flex-direction: column; gap: 14px; padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; }
.ng-x { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.ng-sheet .setup-teams { gap: 10px; }
.ng-opt { align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 760px) { .ng-sheet { margin: auto; border-radius: 20px; } }
@media (min-width: 861px) {
  .ng-grid { grid-template-columns: minmax(0, 1fr) 300px; }
  .ng-sum { display: block; position: sticky; top: 20px; padding: 16px; }
  .ng-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .no-tabs .coord-nav { display: none; }
  .no-tabs .coord-back { display: inline-flex; align-items: center; gap: 4px; order: -1; min-height: 40px; padding: 0 12px; border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--side-ink) 35%, transparent); color: var(--side-ink); text-decoration: none; font-weight: 700; }
  .no-tabs .coord-main { padding-bottom: 150px; }
  .ng-dock { display: flex; flex-direction: column; gap: 8px; position: fixed; inset-inline: 0; bottom: 0; z-index: 20; padding: 10px 16px max(12px, env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--line); }
  .ng-dock-line { display: flex; justify-content: space-between; gap: 10px; margin: 0; font-size: 13px; color: var(--muted); }
  .ng-dock-sum { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ng-dock-plan { flex: none; }
}
@media (max-width: 860px) {
  .no-tabs .coord-side { flex-wrap: nowrap; }
  .no-tabs .coord-brand { min-width: 0; }
  .no-tabs .coord-brand span { display: none; }
}
/* End-of-game titles on the phone (GAMES_UNIFIED §19.1). */
.pf-titles { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pf-titles li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 8px 12px; border-radius: 10px; background: var(--lavender); }
.pf-titles li.is-me { box-shadow: 0 0 0 2px var(--accent) inset; }
.pf-titles small { flex-basis: 100%; }
/* The final screen at 1280 (GAMES_UNIFIED §19.1 review): the mascot stands beside the podium as its own item, never
   over a bar, and «ملء الشاشة» moves to the top corner so it never covers the highlights. */
.screen-podium .podium-mascot { position: static; order: 99; flex: none; align-self: flex-end; height: min(24vh, 100%); }
body:has(.screen-final) .screen-fs { inset-block-end: auto; inset-block-start: 2vh; }
/* «ادعُ عبر واتساب» and «نسخ الدعوة» beside the code (GAMES_UNIFIED §19.4). */
.lj-invite { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.lj-invite .btn { flex: 1 1 140px; min-height: 44px; border-radius: 9px; box-shadow: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.lj-invite .lj-invite-wa { background: var(--wa); border-color: var(--wa); color: var(--on-wa); }
.lj-invite .btn span { white-space: nowrap; }
@media (max-width: 480px) { .lj-invite .btn { flex-basis: 100%; } }
/* The final screen: the medals sit on top of their bars, clear of the names, whatever the bar's height (Coordinator
   review 2026-11-22: the bronze medal covered «النجوم» on the shorter third bar). */
.screen-final .podium-step { overflow: visible; }
.screen-final .podium-medal, .screen-final .podium-1 .podium-medal { top: -6.4vh; }
.screen-final .podium-3 .podium-medal { top: -7.2vh; }
.screen-final .podium-3 { padding-top: 1.2vh; }
.screen-final .podium-2 { padding-top: 2.4vh; }
.screen-final .podium-step .podium-name { margin-top: .6vh; }
