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

/* 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; }
.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; }

@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; }
.palette-form { display: flex; flex-direction: column; gap: 10px; }
.palette-opt { display: flex; align-items: center; gap: 12px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; font-weight: 600; }
.palette-opt:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.palette-dots { display: inline-flex; gap: 2px; }
.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; }
}
.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 { max-width: 640px; }
.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; }
.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; }
.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; }
.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; }
.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; 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; }
.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; 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; }
.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; 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; 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; }
.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; }
.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); }
.plan-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.plan-head b { margin: 0; flex: 1; }
.plan-days { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 14px; background: var(--tile); color: var(--on-brand); line-height: 1.1; }
.plan-days strong { font-size: 22px; font-weight: 800; }
.plan-days small { font-size: 11px; }
.plan-price { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; }
.plan-price strong { font-size: 20px; font-weight: 800; }
.plan-price s { color: var(--muted); font-size: 14px; }
.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; }
.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; }
.order-receipt h1 { font-size: 22px; }
.order-receipt h2 { font-size: 17px; }
