/* TALI: one stylesheet for every page (docs/DESIGN.md, the 2026-12-03 grammar; the prototype in
   docs/design/proto-2026-12-03 wins where a value differs). Light page, one dark block (the globe),
   one filled button (the draw button). Section bands of 8 px gray and 1 px lines. */

:root {
  --ink: #191f28; --sub: #596373; --line: #eceff2; --line-strong: #cdd3da; --bg: #fff; --band: #f2f4f6;
  --brand: #dc2b24; --brand-press: #b9211b; --on-brand: #fff;
  --night: #0c1433; --night-2: #1a2a66;
  --hit: #ffd84a; --win: #fff1bf; --win-ink: #8a4b00; --sum: #fff7d6; --focus: #2b6cff;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, "Segoe UI", Roboto, sans-serif;
  --r-2: 8px; --r-3: 12px; --r-4: 16px; --r-5: 20px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body { margin: 0; font: 400 15px/1.5 var(--font); color: var(--ink); background: var(--bg); display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
:lang(ko) { word-break: keep-all; overflow-wrap: anywhere; }
:lang(ar) :is(*, *::before, *::after) { letter-spacing: normal !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
/* one link look (docs/DESIGN.md): the text's own colour, underlined in the strong line colour */
a { color: inherit; text-decoration: underline 1px var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
main { flex: 1 0 auto; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 16px; width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1 { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 700; letter-spacing: -.01em; }
h2 { margin: 0 0 10px; font-size: 16px; line-height: 1.35; font-weight: 700; }
h3 { margin: 16px 0 8px; font-size: 15px; font-weight: 700; }
p { margin: 0 0 10px; }
ivel-bar { display: block; height: 44px; }
@media print { ivel-bar { display: none; } }

/* ------------------------------------------------------------------ buttons, chips, links */
.btn, .btn-quiet, .ghost { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: var(--r-2); background: #fff; color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn { font-weight: 700; border-color: var(--ink); }
.btn-quiet, .ghost { min-height: 40px; font-size: 14px; padding: 0 14px; }
.btn:hover, .btn-quiet:hover, .ghost:hover { background: var(--band); }
.btn:disabled, .btn-quiet:disabled, .ghost:disabled { color: var(--sub); border-color: var(--line); background: #fff; cursor: default; }
.ghost svg, .btn svg { width: 16px; height: 16px; flex: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: #fff; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; }
.chip small { font-size: 13px; font-weight: 500; color: var(--sub); }
/* at phone width the small word sits above its value, so the three chips keep one line in every language */
@media (max-width: 479px) { .opts { flex-wrap: nowrap; } .opts .chip { height: 44px; padding: 0 10px; font-size: 13px; border-radius: var(--r-3); min-width: 0; }
  .opts .chip:has(small) { flex-direction: column; justify-content: center; align-items: flex-start; gap: 0; line-height: 1.2; }
  .opts .chip small { font-size: 11px; } }
.chip:hover { background: var(--band); }
.chip[aria-current] { border-color: var(--ink); }
.more { font-size: 14px; font-weight: 600; color: var(--ink); }
.note, .checked { font-size: 13px; color: var(--sub); margin: 10px 0 0; }

/* ------------------------------------------------------------------ the title row and the one language button */
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; }
.head h1 { min-width: 0; }
.lang { position: relative; flex: none; }
.lang summary { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r-2);
  font-size: 13px; font-weight: 600; color: var(--sub); white-space: nowrap; cursor: pointer; list-style: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary svg { width: 16px; height: 16px; }
.lang[open] summary { border-color: var(--ink); color: var(--ink); }
.lang nav { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 30; display: grid; grid-template-columns: repeat(2, 132px); padding: 6px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r-3); box-shadow: 0 12px 28px -14px rgba(25, 31, 40, .45); }
.lang nav > * { display: flex; align-items: center; min-height: 40px; padding: 0 12px; font-size: 14px; color: var(--ink); text-decoration: none; border-radius: var(--r-2); }
.lang nav a:hover { background: var(--band); }
.lang nav [aria-current] { font-weight: 700; color: var(--sub); }
.foot .lang nav { top: auto; bottom: calc(100% + 6px); inset-inline-end: auto; inset-inline-start: 0; }
.when { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 4px 0 12px; font-size: 14px; color: var(--sub); }
.when b { color: var(--ink); font-weight: 600; }
/* the countdown and its "?" wrap as one, so the "?" never starts a line alone */
.cd-q { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cd { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); background: var(--band); border-radius: 6px; padding: 2px 8px; font-size: 13px; unicode-bidi: isolate; }

/* ------------------------------------------------------------------ the globe: the one dark, living block */
.core { display: grid; gap: 12px; min-width: 0; }
.stage { position: relative; border-radius: var(--r-5); overflow: hidden; color: #fff;
  background: radial-gradient(120% 70% at 50% 0%, rgba(120, 150, 255, .34), transparent 60%), linear-gradient(180deg, var(--night-2), var(--night) 70%); }
.stage canvas { display: block; width: 100%; height: 370px; }
.snd { position: absolute; top: 10px; inset-inline-end: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; display: grid; place-items: center; }
.snd svg { width: 20px; height: 20px; }
.snd .mute { display: none; }
.snd[aria-pressed="false"] .wave { display: none; }
.snd[aria-pressed="false"] .mute { display: inline; }
.stage .note { position: absolute; top: 14px; inset-inline-start: 16px; inset-inline-end: 60px; margin: 0; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .86); }
.tray { position: absolute; inset-inline: 12px; bottom: 14px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--gap, 8px); direction: ltr; }
.tray.two { bottom: 10px; }
.tray .ex-set { display: inline-flex; align-items: center; gap: var(--gap, 8px); }
.tray .ball, .tray .slot { --d: var(--tray-d, 46px); }
.tray { --tray-d: var(--d, 46px); }
.slot { width: var(--tray-d); height: var(--tray-d); border-radius: 50%; border: 1.5px dashed rgba(255, 255, 255, .28); flex: none; }
.tray .plus, .tray .ex-set .plus { color: #fff; font-weight: 700; }
.fly { position: absolute; left: 0; top: 0; will-change: transform; z-index: 2; }

/* a ball: colour rim, white face, dark number (the static pages set --c per ball; no colour: a neutral rim) */
.ball { --c: #cdd3da; --d: 30px; width: var(--d); height: var(--d); flex: none; border-radius: 50%; display: inline-grid; place-items: center;
  font-weight: 800; font-size: calc(var(--d) * .42); line-height: 1; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums;
  background: radial-gradient(circle at 31% 24%, rgba(255, 255, 255, .95) 0 5%, rgba(255, 255, 255, 0) 22%),
    radial-gradient(circle at 50% 50%, #fff 0 45%, rgba(255, 255, 255, 0) 47%),
    radial-gradient(circle at 36% 30%, color-mix(in srgb, var(--c) 78%, #fff), var(--c) 52%, color-mix(in srgb, var(--c) 66%, var(--ink)) 100%);
  box-shadow: inset 0 calc(var(--d) * -.06) calc(var(--d) * .12) rgba(0, 0, 0, .2), 0 1px 3px rgba(0, 0, 0, .22); }
.tray .ball { box-shadow: inset 0 calc(var(--d) * -.06) calc(var(--d) * .12) rgba(0, 0, 0, .2), 0 2px 5px rgba(0, 0, 0, .28); }
.ball.dim { --c: var(--line-strong) !important; color: var(--sub); }
.ball.hit { box-shadow: 0 0 0 2px var(--hit), 0 0 12px 1px rgba(255, 216, 74, .6); }
.balls { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 5px; direction: ltr; }
.balls .plus, .ex-set .plus { color: var(--sub); font-weight: 700; margin: 0 1px; }
/* the "+" and the balls after it wrap as one: the sign never ends a line alone (tests/markup.test.mjs) */
.ex-set { display: inline-flex; align-items: center; gap: inherit; white-space: nowrap; }

/* ------------------------------------------------------------------ the one filled button and the chips */
.draw { height: 60px; width: 100%; border: 0; border-radius: var(--r-4); background: var(--brand); color: var(--on-brand); font-size: 20px; font-weight: 700; letter-spacing: .01em;
  box-shadow: 0 4px 0 var(--brand-press); transition: transform .06s, box-shadow .06s; touch-action: manipulation; }
.draw:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--brand-press); }
.opts { display: flex; gap: 6px; flex-wrap: wrap; }
.live { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--sub); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; }

/* ------------------------------------------------------------------ my slip: five rows, like the paper one */
.side { display: grid; gap: 12px; min-width: 0; align-content: start; }
.slip { border: 1px solid var(--line-strong); border-radius: var(--r-4); padding: 16px; min-width: 0; }
.slip-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-bottom: 8px; }
.slip-top h2 { margin: 0; font-size: 16px; }
.slip-top .no { font-size: 13px; color: var(--sub); font-weight: 600; }
.slip-top .cost { margin-inline-start: auto; font-size: 13px; color: var(--sub); font-variant-numeric: tabular-nums; }
.sum { margin: 0 0 8px; padding: 10px 12px; border-radius: var(--r-3); background: var(--sum); font-weight: 700; font-size: 15px; }
/* the balls of a row shrink to fit the card: --n balls a row and a "+" (--plus) beside the letter and the x */
.rows { list-style: none; margin: 0; padding: 0; container-type: inline-size; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-height: 48px; padding: 4px 0; border-top: 1px solid var(--line); min-width: 0; }
.row:first-child { border-top: 0; }
.row .k { width: 18px; flex: none; font-size: 13px; font-weight: 700; color: var(--sub); }
/* the balls keep their line; a result that does not fit beside them goes under, at the end */
.row .balls { flex: none; max-width: calc(100% - 24px); gap: 7px; flex-wrap: wrap; row-gap: 6px; }
.row .ball, .row .ph { --d: clamp(22px, calc((100cqw - 61px - var(--plus, 0px)) / var(--n, 6) - 7px), 34px); width: var(--d); height: var(--d); }
.row .ball { box-shadow: inset 0 -2px 4px rgba(0, 0, 0, .18), 0 1px 2px rgba(0, 0, 0, .18); }
.row .ball.hit { box-shadow: 0 0 0 2px var(--hit), 0 1px 2px rgba(0, 0, 0, .18); }
.row .ph { border-radius: 50%; border: 1.5px dashed var(--line-strong); flex: none; }
.row .x { margin-inline-start: auto; flex: none; width: 36px; height: 36px; border: 0; background: none; color: var(--sub); border-radius: 50%; display: grid; place-items: center; }
.row .x:hover { background: var(--band); }
.row .x svg { width: 16px; height: 16px; }
/* a slip whose results do not all fit beside the balls puts every one under them (assets/kit/core.mjs alignRes) */
.rows.res-under .row::after { content: ""; order: 2; flex-basis: 100%; height: 0; }
.rows.res-under .res { order: 3; margin-inline-start: 24px; }
.row .res { margin-inline-start: auto; flex: none; font-size: 13px; font-weight: 700; color: var(--sub); white-space: nowrap; }
.row .res.win { color: var(--win-ink); background: var(--win); border-radius: 6px; padding: 2px 8px; }
.row.new { animation: flash .9s ease-out; }
@keyframes flash { from { background: var(--win); } to { background: transparent; } }
.slip-end { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.waiting { padding: 12px 16px; border-radius: var(--r-4); background: var(--band); }
.waiting .wait-h { margin: 0 0 4px; font-size: 14px; font-weight: 700; }
.waiting .row { border-top-color: var(--line-strong); min-height: 40px; }
.toast { position: fixed; inset-inline: 16px; bottom: 16px; margin: 0 auto; max-width: 420px; background: var(--ink); color: #fff; border-radius: var(--r-3);
  padding: 6px 6px 6px 14px; display: flex; align-items: center; gap: 12px; font-size: 14px; z-index: 60; min-height: 48px; }
.toast button { margin-inline-start: auto; min-height: 36px; padding: 0 10px; border: 0; background: none; color: var(--hit); font-weight: 700; border-radius: var(--r-2); }
.got { border: 1px dashed var(--line-strong); border-radius: var(--r-4); padding: 14px 16px; }
.got .slip-top { margin-bottom: 4px; }
.got-end { display: flex; justify-content: flex-end; margin-top: 8px; }
.past summary { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; font-weight: 700; cursor: pointer; list-style: none; }
.past summary::-webkit-details-marker { display: none; }
.past summary::after { content: ""; width: 8px; height: 8px; margin-inline-start: auto; border-right: 2px solid var(--sub); border-bottom: 2px solid var(--sub); transform: rotate(45deg); }
.past[open] summary::after { transform: rotate(-135deg); }
.past summary span { font-size: 13px; color: var(--sub); font-weight: 600; }
.past > ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.past-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 4px; font-size: 13px; }
.past-h .ball { --d: 26px; }
.past-s { font-weight: 700; color: var(--sub); }
.past-s.win { color: var(--win-ink); }
.past .row { min-height: 40px; }
.type summary { display: inline-flex; align-items: center; min-height: 40px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink); }
.type form { display: grid; gap: 8px; margin-top: 6px; }
.own { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; direction: ltr; }
.own input { width: 44px; height: 44px; text-align: center; font-size: 16px; font-weight: 600; border: 1px solid var(--line-strong); border-radius: var(--r-2); padding: 0; background: #fff; }
.own .ex-set { gap: 6px; }
.type .msg { margin: 0; font-size: 13px; color: var(--brand); min-height: 1em; }
.type .msg:empty { display: none; }

/* the way list: name and one short line each; the chosen one marked */
.dlg { width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 48px); padding: 0; border: 0; border-radius: var(--r-4); color: var(--ink); background: #fff;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .45); }
.dlg::backdrop { background: rgba(12, 20, 51, .5); }
.dlg-top { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 12px 8px 8px 16px; background: #fff; }
.dlg-top h2 { margin: 0; }
.dlg-x { width: 44px; height: 44px; border: 0; background: none; border-radius: 50%; display: grid; place-items: center; color: var(--sub); }
.dlg-x:hover { background: var(--band); }
.dlg-x svg { width: 18px; height: 18px; }
.way-list { list-style: none; margin: 0; padding: 0 12px; display: grid; gap: 6px; }
.way-b { display: grid; gap: 2px; width: 100%; min-height: 52px; padding: 8px 40px 8px 12px; text-align: start; border: 1px solid var(--line-strong); border-radius: var(--r-3); background: #fff; position: relative; }
.way-b b { font-size: 15px; }
.way-b small { font-size: 13px; color: var(--sub); }
.way-b[aria-pressed="true"] { border: 2px solid var(--ink); padding: 7px 39px 7px 11px; }
.way-b[aria-pressed="true"]::after { content: ""; position: absolute; inset-inline-end: 16px; top: 50%; width: 6px; height: 12px; border-right: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink); transform: translateY(-65%) rotate(45deg); }
[dir=rtl] .way-b { padding: 8px 12px 8px 40px; }
[dir=rtl] .way-b[aria-pressed="true"] { padding: 7px 11px 7px 39px; }
.way-opt { padding: 12px 16px 16px; }
.way-opt:empty { display: none; }
.so-d { margin: 0 0 10px; font-size: 14px; color: var(--sub); }
.so-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0; font-size: 14px; font-weight: 600; }
.so-c { color: var(--sub); font-weight: 500; }
.so-x, .seg { min-height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; font-size: 13px; font-weight: 600; }
.seg[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.nbs { display: grid; grid-template-columns: repeat(min(var(--cols), 9), minmax(0, 1fr)); gap: 4px; direction: ltr; }
.nb { min-height: 36px; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r-2); background: #fff; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.nb[data-state="keep"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.nb[data-state="skip"] { color: var(--sub); text-decoration: line-through; background: var(--band); }
.so-steps { display: grid; gap: 6px; }
.st { display: grid; grid-template-columns: minmax(0, 1fr) 36px minmax(64px, auto) 36px; align-items: center; gap: 6px; font-size: 14px; }
.st button { height: 36px; border: 1px solid var(--line-strong); border-radius: var(--r-2); background: #fff; font-size: 16px; font-weight: 700; }
.st b { text-align: center; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ sections under the core */
.sec { border-top: 8px solid var(--band); margin: 20px -16px 0; padding: 20px 16px; }
.sec:last-child { padding-bottom: 28px; }
.side .sec { margin: 0; border: 1px solid var(--line-strong); border-radius: var(--r-4); padding: 16px; }
.last { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.last .d { font-size: 13px; color: var(--sub); }
.last .balls { flex-wrap: wrap; row-gap: 6px; }
.last .ball { --d: 32px; }
.draws { width: 100%; border-collapse: collapse; }
.draws th { text-align: start; font-size: 13px; color: var(--sub); font-weight: 600; border-bottom: 1px solid var(--line-strong); padding: 6px 0; padding-inline-end: 8px; }
.draws td { border-bottom: 1px solid var(--line); padding: 8px 8px 8px 0; vertical-align: middle; }
[dir=rtl] .draws td { padding: 8px 0 8px 8px; }
.draws .d { width: 1%; white-space: nowrap; padding-inline-end: 24px; font-size: 14px; }
.draws a { white-space: nowrap; }
.draws .balls { flex-wrap: wrap; row-gap: 4px; }
.draws .ball { --d: 30px; }
.years { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin: 12px 0; font-size: 14px; }
.years [aria-current] { font-weight: 700; }
.fold > summary, .info-more > summary, .more-fold > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; font-weight: 700; cursor: pointer; list-style: none; }
.fold > summary::-webkit-details-marker, .info-more > summary::-webkit-details-marker, .more-fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after, .info-more > summary::after, .more-fold > summary::after { content: ""; width: 8px; height: 8px; margin-inline-start: auto; border-right: 2px solid var(--sub); border-bottom: 2px solid var(--sub); transform: rotate(45deg); flex: none; }
.fold[open] > summary::after, .info-more[open] > summary::after, .more-fold[open] > summary::after { transform: rotate(-135deg); }
.grid.freq { display: grid; grid-template-columns: repeat(min(var(--cols), 10), minmax(0, 1fr)); gap: 4px; direction: ltr; }
.fbox { display: grid; place-items: center; height: 44px; border-radius: var(--r-2); line-height: 1.1; background: #fff; border: 1px solid var(--line); }
.fbox b { font-size: 14px; color: var(--ink); }
.fbox i { font-style: normal; font-size: 12px; font-weight: 600; color: var(--sub); }
.fbox.l1 { background: var(--sum); } .fbox.l2 { background: var(--win); } .fbox.l3 { background: var(--hit); } .fbox.l4 { background: var(--win-ink); }
.fbox.b { border-style: dashed; }
.fbox.l3 i { color: var(--win-ink); } .fbox.l4 b, .fbox.l4 i { color: #fff; }
.scale { display: flex; align-items: center; gap: 3px; margin: 10px 0 0; font-size: 13px; color: var(--sub); }
.scale .fbox { width: 26px; height: 12px; border-radius: 3px; }
.scale span:first-child { margin-inline-end: 6px; }
.scale span:last-child { margin-inline-start: 6px; }
.slip-label { color: var(--sub); font-size: 13px; font-weight: 700; margin: 12px 0 6px; }
.kv, .facts dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 16px; margin: 0; font-size: 14px; }
.facts dl > div { display: contents; }
.facts dt, .facts dd { padding: 8px 0; border-top: 1px solid var(--line); }
.facts dl > div:first-child > * { border-top: 0; }
.facts dt { color: var(--sub); }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.how { margin: 0 0 10px; font-size: 15px; }
.guide p { max-width: 70ch; margin: 0 0 10px; }
.odds table, .tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 14px; }
.odds th, .tbl th { text-align: start; font-size: 13px; color: var(--sub); font-weight: 600; border-bottom: 1px solid var(--line-strong); padding: 6px 0; padding-inline-end: 8px; }
.odds td, .tbl td { border-bottom: 1px solid var(--line); padding: 8px 0; padding-inline-end: 8px; white-space: nowrap; }
.odds td:last-child, .odds th:last-child { text-align: end; padding-inline-end: 0; }
.odds td.pz { white-space: normal; line-height: 1.25; }
.odds .pz-r { display: block; font-size: 12px; color: var(--sub); }
.odds .pz b { font-weight: 700; white-space: nowrap; }
@media (max-width: 639px) {
  .odds tr { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); column-gap: 8px; border-bottom: 1px solid var(--line); }
  .odds td:first-child { white-space: normal; }
  .odds .pips { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 3px 0; }
  .odds thead tr { border-bottom: 1px solid var(--line-strong); }
  .odds th, .odds td { border-bottom: 0; }
  .odds th.pz, .odds td.pz { grid-column: 1 / -1; text-align: end; padding-top: 0; }
  .odds td.pz:empty { display: none; }
  .odds .pz-r { display: inline; margin-inline-end: 6px; }
  .odds td:nth-child(2), .odds th:nth-child(2) { text-align: end; padding-inline-end: 0; }
  .draw-facts td:nth-child(2) { white-space: normal; }
}
.pips { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; direction: ltr; }
.pip { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--line-strong); }
.pip.on { background: var(--ink); border-color: var(--ink); }
.pip.b { border-color: var(--win-ink); }
.pip.b.on { background: var(--hit); }
.pip.sz { border-radius: 3px; }
.pip.miss { border-style: dashed; }
.pips .plus { color: var(--sub); font-size: 13px; margin: 0 2px; }
.games { display: flex; flex-wrap: wrap; gap: 8px; }
.games a { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: none; }
.games a:hover { background: var(--band); }
.games .all { font-weight: 700; }
.line-link { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none; }
.line-link small { color: var(--sub); font-weight: 500; font-size: 13px; }
.line-link::after { content: ""; width: 7px; height: 7px; margin-inline-start: auto; border-right: 2px solid var(--sub); border-top: 2px solid var(--sub); transform: rotate(45deg); flex: none; }
[dir=rtl] .line-link::after { transform: rotate(-135deg); }
.line-link:hover b { text-decoration: underline; }

/* the home: every game, by country */
.countries { columns: 3 260px; column-gap: 24px; }
.country { break-inside: avoid; margin: 0 0 16px; }
.country h3 { font-size: 13px; color: var(--sub); margin: 0 0 6px; }
.country ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.game-card { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; min-height: 44px; padding: 10px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.country li:first-child .game-card { border-top: 0; }
.g-name { font-weight: 600; font-size: 15px; }
.g-days { font-size: 13px; color: var(--sub); }
.game-card:hover .g-name { text-decoration: underline; }
.pool-entry { display: flex; align-items: center; gap: 12px; min-height: 56px; color: var(--ink); text-decoration: none; }
.pool-entry span { display: grid; gap: 1px; flex: 1; }
.pool-entry b { font-size: 15px; }
.pool-entry small { font-size: 13px; color: var(--sub); }
.pool-entry .go { flex: none; color: var(--sub); }
[dir=rtl] .pool-entry .go { transform: scaleX(-1); }
.cycle-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; font-size: 14px; }

/* the short pitch at the end of a page: a quiet card, the link to the about page */
.pr-teaser { display: grid; gap: 8px; margin: 0; padding: 16px; border: 1px solid var(--line-strong); border-radius: var(--r-4); text-decoration: none; color: var(--ink); }
.pr-t { font-size: 16px; font-weight: 700; line-height: 1.35; }
.pr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pr-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px 4px 7px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--band); }
.pr-chip svg, .pr-go svg { width: 14px; height: 14px; flex: none; }
.pr-chip svg { color: var(--ink); }
.pr-go { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; color: var(--ink); }
.pr-teaser:hover .pr-go { text-decoration: underline; }
[dir=rtl] .pr-go svg { transform: scaleX(-1); }

/* "?" tips next to words a beginner may not know (templates/_tip.html, assets/kit/tips.mjs) */
.tip { position: relative; flex: none; }
.tip.q { display: inline-flex; vertical-align: middle; margin-inline-start: 4px; position: relative; }
.tip-q { position: relative; display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--sub); }
.tip-q::before { content: ""; position: absolute; inset: -10px; }
.tip-q:hover, .tip.q.open .tip-q { color: var(--ink); }
.tip-body { display: none; position: absolute; z-index: 40; top: calc(100% + 8px); inset-inline-start: -8px; width: min(300px, calc(100vw - 24px));
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 400; line-height: 1.5; padding: 12px 14px; border-radius: var(--r-3); text-align: start; white-space: normal;
  box-shadow: 0 12px 28px -12px rgba(25, 31, 40, .5); transform: translateX(var(--dx, 0)); }
.tip-body b { display: block; margin-bottom: 4px; font-weight: 700; }
@media (hover: hover) { .tip:hover .tip-body { display: block; } }
.tip.open .tip-body { display: block; }
.tip.shut .tip-body { display: none; }
.cd[hidden] + .tip.q { display: none; }

/* ------------------------------------------------------------------ the footer, feedback, consent */
.foot { margin-top: 0; border-top: 8px solid var(--band); font-size: 14px; color: var(--sub); }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-top: 16px; padding-bottom: 24px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 16px; margin: 0; }
.foot-links a, .foot .link { display: inline-flex; align-items: center; min-height: 40px; color: var(--sub); white-space: nowrap; }
.foot .link { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline 1px var(--line-strong); text-underline-offset: 3px; }
.foot-links a:hover, .foot .link:hover { color: var(--ink); }
.foot .lang { margin-inline-start: auto; }
html:not([data-api=on]) [data-fb], html:not([data-api=on]) .fb-row { display: none; }
.fb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
html:not([data-region=br]):not([data-region=kr]) [data-consent] { display: none; }
.fb { width: min(460px, calc(100vw - 24px)); padding: 0; border: 0; border-radius: var(--r-4); background: #fff; color: var(--ink); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .45); }
.fb::backdrop { background: rgba(12, 20, 51, .5); }
.fb-in { display: grid; gap: 12px; padding: 16px; }
.fb-top { display: flex; align-items: center; justify-content: space-between; }
.fb-top h2 { margin: 0; font-size: 16px; }
.fb-x { width: 44px; height: 44px; border: 0; background: none; border-radius: 50%; font-size: 26px; line-height: 1; color: var(--sub); }
.fb-kinds { display: flex; gap: 6px; }
.fb-kinds label { position: relative; }
.fb-kinds input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.fb-kinds span { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 14px; font-weight: 600; }
.fb-kinds input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.fb-kinds input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.fb textarea, .fb-opt input { width: 100%; font-size: 16px; line-height: 1.45; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-2); background: #fff; }
.fb textarea { resize: vertical; min-height: 120px; }
.fb .hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.fb-who, .fb-note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--sub); }
.fb-opt { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.fb-opt label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.fb-end { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fb-msg { margin: 0; font-size: 14px; font-weight: 600; color: var(--brand); }
.fb-msg.ok { color: var(--ink); }
/* ad consent (assets/kit/consent.mjs): Brazil and South Korea only. Decline and Accept look the same on purpose.
   Placement: never over the draw button or the tray (narrow: the top edge; wide: the bottom corner, clear of the column) */
.consent { position: fixed; left: 50%; top: 6px; transform: translateX(-50%); z-index: 50; width: min(560px, calc(100vw - 24px));
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 14px; border-radius: var(--r-3);
  background: var(--ink); color: #fff; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .5); font-size: 14px; }
.consent .c-text { flex: 1 1 220px; margin: 0; line-height: 1.45; }
.consent .c-text a { color: var(--hit); white-space: nowrap; }
.consent:not([data-region=br]) [data-for=br], .consent:not([data-region=kr]) [data-for=kr] { display: none; }
.c-btns { display: flex; gap: 8px; flex: none; }
.c-btns button { min-width: 84px; min-height: 40px; padding: 0 14px; border-radius: var(--r-2); border: 1px solid rgba(255, 255, 255, .5); background: transparent; color: #fff; font-size: 14px; font-weight: 700; }
.c-btns button:hover { border-color: #fff; }
@media (min-width: 1100px) {
  .consent { top: auto; bottom: 12px; left: auto; inset-inline-start: 12px; transform: none; width: 300px; padding: 10px 12px; gap: 8px; font-size: 13px; }
  .consent .c-text { flex-basis: 100%; }
  .c-btns { width: 100%; }
  .c-btns button { flex: 1; }
}
@media (max-width: 639px) {
  .consent { padding: 9px 12px; gap: 6px 10px; font-size: 13px; }
  .consent .c-text { flex-basis: 100%; }
  .c-btns { width: 100%; }
  .c-btns button { flex: 1; }
}

/* ------------------------------------------------------------------ result, pool and about pages */
.page { padding-top: 14px; padding-bottom: 28px; }
.page > h1 { margin: 6px 0 10px; }
.lead { color: var(--sub); font-size: 15px; margin: 0 0 16px; max-width: 62ch; }
.crumb { font-size: 13px; color: var(--sub); margin: 0; }
.crumb a { color: var(--sub); }
.card { border: 1px solid var(--line-strong); border-radius: var(--r-4); padding: 16px; margin-top: 16px; min-width: 0; }
.card > h2:first-child { margin-top: 0; }
.now { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border: 1px solid var(--line-strong); border-radius: var(--r-4); margin: 0 0 12px; overflow: hidden; }
.now-cell { padding: 14px 16px 16px; min-width: 0; container-type: inline-size; }
.now-cell + .now-cell { border-inline-start: 1px solid var(--line); }
.now.one { grid-template-columns: minmax(0, 1fr); }
.now-label { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--ink); }
.now-label span { color: var(--sub); font-weight: 600; margin-inline-start: 6px; }
/* one draw on one line where it fits: --k is the number of balls (7 when unset) */
.now-balls { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; direction: ltr; }
.now-balls .ball { --d: clamp(28px, calc((100cqw - (var(--k, 7) - 1) * 6px - 18px) / var(--k, 7)), 42px); }
.now-link { font-size: 14px; font-weight: 600; }
.now .cd { display: flex; gap: 6px 18px; flex-wrap: wrap; margin: 0; background: none; padding: 0; font-size: inherit; }
.now .cd span { display: inline-flex; align-items: baseline; gap: 4px; }
.now .cd b { font-size: 32px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
.now .cd i { font-style: normal; font-size: 13px; color: var(--sub); font-weight: 600; }
.draw-now .now-balls { margin-bottom: 14px; }
.draw-go { min-height: 44px; }
.latest-now { margin: 4px 0 16px; }
.latest-now.side .now-balls .ball { --d: 34px; }
.latest-now.side .now-balls { gap: 6px; margin-bottom: 10px; }
.latest-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0; }
.latest-acts:empty { display: none; }
.check-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 16px; }
.check-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.check-form legend { font-size: 13px; font-weight: 700; color: var(--sub); padding: 0; margin-bottom: 4px; }
.check-form .nums { display: flex; flex-wrap: wrap; gap: 6px; }
.check-form input { width: 44px; height: 44px; font-size: 16px; font-weight: 600; text-align: center; border: 1px solid var(--line-strong); border-radius: var(--r-2); padding: 0; background: #fff; }
.check-form .b input { border-style: dashed; }
.check-out { flex-basis: 100%; margin: 0; min-height: 1.4em; font-weight: 700; }
.check-hint { margin: -4px 0 10px; font-size: 14px; color: var(--sub); }
.month { border-top: 1px solid var(--line); }
.month:first-of-type { border-top: 0; }
.month summary { display: flex; align-items: center; gap: 10px; min-height: 48px; cursor: pointer; list-style: none; font-weight: 700; font-size: 15px; }
.month summary::-webkit-details-marker { display: none; }
.month summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--sub); border-bottom: 2px solid var(--sub); transform: rotate(-45deg); flex: none; margin-inline-end: 2px; }
.month[open] summary::before { transform: translateY(-2px) rotate(45deg); }
[dir=rtl] .month:not([open]) summary::before { transform: rotate(135deg); }
.month summary small { font-size: 13px; font-weight: 500; color: var(--sub); }
.month summary .best { margin-inline-start: auto; font-size: 12px; font-weight: 700; background: var(--win); color: var(--win-ink); border-radius: 6px; padding: 2px 8px; }
.month summary .best:empty { display: none; }
.month .draws { margin-bottom: 12px; }
.top-nums .balls { gap: 8px; flex-wrap: wrap; }
.top-nums .ball { --d: 38px; }
.pager, .draw-pager { margin-top: 20px; }
.pager { display: flex; gap: 18px; }
.draw-pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 12px; }
.draw-pager a { display: grid; font-weight: 600; min-height: 44px; align-content: center; }
.draw-pager a small { font-size: 12px; color: var(--sub); font-weight: 600; }
.draw-pager [rel="next"] { text-align: end; }
.draw-pager .draw-year { font-size: 14px; text-align: center; }
@media (max-width: 520px) { .draw-pager { grid-template-columns: 1fr 1fr; } .draw-pager .draw-year { grid-column: 1 / -1; grid-row: 2; } }
.mine-check { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.mine-check h3 { margin: 0 0 8px; }
.mine-rows, .hits-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mine-rows li, .hits-lines li { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.mine-rows .tag { font-size: 13px; color: var(--sub); min-width: 1.2em; font-weight: 700; }
/* numbers that did not match: grey rim and the secondary text colour, never faded (docs/DESIGN.md) */
.mine-rows .ball:not(.hit), .hits-lines .ball:not(.hit) { --c: var(--line-strong) !important; color: var(--sub); }
.mine-res { font-size: 14px; color: var(--sub); }
.mine-rows li.won .mine-res { color: var(--win-ink); background: var(--win); border-radius: 6px; padding: 2px 8px; font-weight: 700; }
.draw-prizes tbody tr.on, .draw-prizes tbody tr.on td { background: var(--win); }
.draw-prizes .wn-l { display: none; }
@media (max-width: 639px) { .draw-prizes .wn-l { display: inline; font-size: 12px; color: var(--sub); } }
.hits-one { margin: 0 0 12px; font-weight: 600; }
.hits-lines { margin-bottom: 12px; gap: 10px; }
.hits-res { display: grid; gap: 2px; font-size: 14px; }
.hits-res b { color: var(--win-ink); }
.hits-res small { color: var(--sub); font-size: 13px; }
.hits-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.hits-stats div { display: grid; gap: 4px; }
.hits-stats dt { font-size: 13px; color: var(--sub); }
.hits-stats dd { margin: 0; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hits-tiers .muted, .shop-regions .muted, .shops .muted { color: var(--sub); }
.hits-tiers tr.m td { color: var(--sub); }
.hits-cc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.hits-cc-list li { display: inline-flex; gap: 6px; }
.week-lines { flex-direction: column; gap: 8px; }
.hits-top .balls { flex-wrap: wrap; gap: 8px; margin: 0; }
.hits-go { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.shop-regions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 12px; font-size: 14px; }
.shop-regions .chip { height: auto; min-height: 28px; padding: 2px 10px; font-weight: 500; }
.shop-list { margin: 0; padding-inline-start: 1.6em; display: grid; gap: 8px; }
.shop-list li { line-height: 1.4; }
.shop-list small { display: block; color: var(--sub); font-size: 13px; overflow-wrap: anywhere; }
.shop-k { font-size: 12px; color: var(--sub); border: 1px solid currentColor; border-radius: 4px; padding: 0 5px; margin-inline-start: 4px; white-space: nowrap; }
.qr-box { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 10px; }
.qr-hint { margin: 0; font-size: 14px; color: var(--sub); }
.qr-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.qr-file { position: relative; display: inline-flex; align-items: center; }
.qr-file input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.qr-file:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.qr-text { font-size: 15px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-2); width: 100%; max-width: 520px; }
.qr-cam:not([hidden]) { display: grid; gap: 8px; justify-items: start; }
.qr-cam video { width: 100%; max-width: 420px; aspect-ratio: 1; object-fit: cover; background: var(--night); border-radius: var(--r-3); }
.qr-out { margin: 0; min-height: 1.4em; font-weight: 600; }
.tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 8px; }
.tiles a { display: grid; gap: 1px; height: 100%; min-height: 44px; padding: 9px 12px 10px; border: 1px solid var(--line-strong); border-radius: var(--r-3); color: var(--ink); text-decoration: none; font-weight: 700; }
.tiles a:hover { background: var(--band); }
.tiles span { font-size: 12px; font-weight: 500; color: var(--sub); }
.prose { max-width: 720px; }
.prose h2 { margin-top: 24px; }
.prose p, .prose li { line-height: 1.65; }
.chips { display: flex; flex-wrap: wrap; gap: 8px 16px; list-style: none; padding: 0; margin: 0 0 16px; max-width: 720px; }
.chips li { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.chips svg { flex: none; color: var(--ink); }
@media (max-width: 759px) { .chips { flex-direction: column; gap: 4px; } }
.mail-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.mail-row .btn { font-size: 16px; }

/* the pool page: skin only (assets/pool.js keeps its behaviour) */
.steps-how { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 640px; }
.steps-how li { display: grid; justify-items: center; align-content: start; gap: 8px; padding: 12px 6px 10px; border: 1px solid var(--line-strong); border-radius: var(--r-3); text-align: center; font-size: 13px; font-weight: 600; line-height: 1.3; }
.steps-how svg { height: 32px; width: auto; max-width: 100%; }
.pool-now select { width: 100%; max-width: 340px; min-height: 44px; font-weight: 700; border: 1px solid var(--line-strong); border-radius: var(--r-2); padding: 0 10px; background: #fff; }
.draw-zone { margin: -4px 0 8px; font-size: 13px; color: var(--sub); }
.pick-date input { font-size: 16px; font-weight: 700; height: 44px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r-2); background: #fff; }
.warn, .sent { margin: 0 0 12px; padding: 10px 14px; background: var(--sum); border-radius: var(--r-3); font-size: 14px; font-weight: 600; }
.sent { margin: 10px 0 0; }
.join { margin: 0 0 14px; }
.join .btn { width: 100%; max-width: 420px; min-height: 50px; font-size: 16px; }
.pool { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); grid-template-areas: "form board"; gap: 20px; align-items: start; }
.pool.has-result { grid-template-areas: "board preview"; }
.pool > .slip { grid-area: form; }
.pool .board { grid-area: board; }
.pool .slip-head { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.pool .slip-name { font-weight: 700; font-size: 16px; }
.add .auto { width: 100%; min-height: 48px; font-size: 16px; margin: 2px 0 12px; }
.pool .grid { display: grid; grid-template-columns: repeat(min(var(--cols), 9), minmax(0, 52px)); gap: 4px; direction: ltr; }
.pool .box { min-height: 40px; aspect-ratio: 1; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: #fff; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pool .box:hover { background: var(--band); }
.pool .box[data-state="keep"] { border: 0; color: var(--ink); font-weight: 800;
  background: radial-gradient(circle at 50% 50%, #fff 0 45%, rgba(255, 255, 255, 0) 47%), radial-gradient(circle at 36% 30%, color-mix(in srgb, var(--c, #cdd3da) 78%, #fff), var(--c, #cdd3da) 52%, color-mix(in srgb, var(--c, #cdd3da) 66%, var(--ink)) 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.preview { grid-area: preview; margin: 0; }
.preview img { display: block; width: 100%; height: auto; border-radius: var(--r-3); border: 1px solid var(--line); }
.add .slip-head { flex-wrap: nowrap; }
.add-name { display: grid; gap: 4px; flex: 1 1 auto; min-width: 0; }
.add-label { font-size: 13px; font-weight: 700; color: var(--sub); }
.add-name input { width: 100%; height: 44px; font-size: 16px; font-weight: 700; border: 1px solid var(--line-strong); border-radius: var(--r-2); padding: 0 12px; background: #fff; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 6px; }
.label-row .slip-label { margin: 0; }
.slip-label b { color: var(--ink); font-variant-numeric: tabular-nums; margin-inline-start: 4px; }
.pool .bar { margin-top: 16px; }
.pool .err { color: var(--brand); font-weight: 600; font-size: 14px; margin: 0 0 8px; }
.pool .err:empty { display: none; }
.add .bar .btn, .win .bar .btn { width: 100%; min-height: 48px; }
.full { font-weight: 700; margin: 0; }
.win .check-form { margin: 4px 0 12px; }
.receipt { border: 1px solid var(--line-strong); border-radius: var(--r-4); padding: 16px; }
.r-top { position: relative; }
.r-title { display: block; font-size: 16px; font-weight: 700; }
.r-sub { display: block; font-size: 13px; color: var(--sub); }
.r-rule { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.r-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--sub); margin: 0; }
.icon-btn { position: absolute; inset-inline-end: -6px; top: -4px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r-2); background: #fff; color: var(--sub); }
.people { list-style: none; margin: 0; padding: 0; font-variant-numeric: tabular-nums; }
.p-empty { padding: 10px 0 14px; font-size: 14px; font-weight: 600; color: var(--sub); }
.p-row { position: relative; display: grid; grid-template-columns: 2.4ch minmax(0, 1fr) auto; grid-template-areas: "rank name score" ". balls balls"; align-items: center; gap: 4px 8px; padding: 8px; margin: 0 -8px; border-bottom: 1px solid var(--line); }
.p-row:last-child { border-bottom: 0; }
.p-row.group { border-top: 1px solid var(--line-strong); }
.rank { grid-area: rank; font-weight: 800; font-size: 16px; }
.p-name { grid-area: name; font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score { grid-area: score; min-width: 3ch; font-weight: 700; text-align: end; white-space: nowrap; }
.p-row.won .score { font-size: 13px; background: var(--band); border-radius: 6px; padding: 3px 8px; }
.p-row.top.won .score { background: var(--hit); color: var(--win-ink); }
.p-balls { grid-area: balls; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; direction: ltr; }
.people .fold { padding: 10px 0 2px; text-align: center; }
.pb { --d: 30px; }
.pb.hit { box-shadow: 0 0 0 3px var(--hit); }
.pb.bon { box-shadow: 0 0 0 2px var(--hit); }
.pb.miss { opacity: .4; }
.board.done .pb.hit, .board.done .pb.bon, .board.done .pb.miss { animation: turn 400ms ease-in-out var(--t, 0ms) both; }
@keyframes turn { 0% { transform: scaleX(1); } 50% { transform: scaleX(0); } 100% { transform: scaleX(1); } }
.board.done .rank, .board.done .score { animation: rise 300ms ease-out var(--end, 0ms) both; }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } }
.board.done .p-row.top { background: var(--win); }
.board-foot { flex-wrap: wrap; gap: 10px; }
.next-acts { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.next-acts .btn, .next-acts .btn-quiet { flex: 1 1 auto; min-height: 48px; }
.share-wrap { position: relative; display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.share-wrap .tip { position: static; }
.tip-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--sub); }
.tip-btn:hover, .tip.open .tip-btn { color: var(--ink); }
.share-wrap .tip-body { inset-inline-start: 0; inset-inline-end: auto; }
.result-acts { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.merge { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.merge input { flex: 1 1 200px; min-width: 0; height: 40px; font-size: 15px; border: 1px solid var(--line-strong); border-radius: var(--r-2); padding: 0 10px; background: #fff; }
.merge .err { flex-basis: 100%; margin: 0; }
.fallback { display: block; width: 100%; margin-top: 10px; font: 13px/1.4 ui-monospace, Consolas, monospace; border: 1px solid var(--line-strong); border-radius: var(--r-2); padding: 8px; resize: vertical; background: #fff; }
.board-note { margin: 0 0 12px; font-size: 14px; color: var(--sub); }
.last-link { align-self: center; font-size: 13px; font-weight: 700; color: var(--ink); background: var(--sum); border-radius: 6px; padding: 4px 8px; }
#next-acts:not([hidden]) { animation: pool-appear .3s ease-out var(--appear, 0ms) both; }
@keyframes pool-appear { from { opacity: 0; visibility: hidden; } to { opacity: 1; visibility: visible; } }
@media (max-width: 759px) {
  .pool, .pool.has-result { grid-template-columns: minmax(0, 1fr); grid-template-areas: "board" "form"; gap: 16px; }
  .pool.is-empty { grid-template-areas: "form" "board"; }
  .preview { display: none; }
  .pool-now select { max-width: none; }
  .p-balls .ball { --d: 28px; }
  .join .btn { max-width: none; }
  .now { grid-template-columns: minmax(0, 1fr); }
  .now-cell + .now-cell { border-inline-start: 0; border-top: 1px solid var(--line); }
  .now .cd b { font-size: 28px; }
  .draws thead { display: none; }
  .draws tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0 10px; }
  .draws td { display: block; border: 0; padding: 0; }
  .draws .d { width: auto; font-size: 13px; color: var(--sub); margin-bottom: 4px; }
  .draws .d a { color: var(--sub); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* the about page: the site's pitch and the engine record */
.pr { max-width: 720px; }
.pr-hero { padding: 20px 0 4px; }
.pr-kicker { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--sub); }
.pr-hero h1 { margin: 0 0 10px; font-size: 24px; line-height: 1.3; }
.pr-sub { margin: 0 0 16px; font-size: 15px; color: var(--sub); max-width: 36em; }
.pr-vs, .pr-has { margin: 24px 0 0; }
.pr-vs h2, .pr-has h2 { margin: 0 0 12px; }
.pr-vs table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line-strong); border-radius: var(--r-4); overflow: hidden; font-size: 14px; }
.pr-vs th, .pr-vs td { padding: 10px 12px; text-align: start; vertical-align: top; border-top: 1px solid var(--line); }
.pr-vs thead th { border-top: 0; font-size: 13px; color: var(--sub); }
.pr-vs thead th.us { color: var(--ink); }
.pr-vs tbody th { font-weight: 700; color: var(--sub); width: 26%; }
.pr-vs td.us { font-weight: 700; background: var(--sum); }
.pr-vs td.us svg { width: 15px; height: 15px; color: var(--ink); vertical-align: -2px; margin-inline-end: 5px; }
.pr-vs td:not(.us) { color: var(--sub); }
.pr-has ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.pr-has li { display: grid; grid-template-columns: 40px 1fr; gap: 2px 12px; padding: 14px; border: 1px solid var(--line-strong); border-radius: var(--r-4); }
.pr-has i { grid-row: span 2; width: 40px; height: 40px; border-radius: var(--r-3); display: grid; place-items: center; color: var(--ink); background: var(--band); }
.pr-has i svg { width: 24px; height: 24px; }
.pr-has b { font-size: 15px; }
.pr-has span { font-size: 13px; color: var(--sub); line-height: 1.5; }
.pr-more { margin: 16px 0 10px; }
.pr-end { text-align: center; margin: 18px 0 30px; }
.dossier { margin: 24px 0; }
.ds-paper { position: relative; max-width: 560px; margin: 0 auto; padding: 20px; border-radius: var(--r-4); border: 1px solid var(--line-strong); background: var(--band); overflow: hidden; }
.ds-paper h2 { margin: 0 0 12px; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; font-weight: 800; }
.ds-no { font-size: 13px; font-weight: 700; color: var(--sub); margin-inline-start: 6px; font-variant-numeric: tabular-nums; }
.ds-stamp { position: absolute; top: 14px; inset-inline-end: 16px; margin: 0; padding: 3px 10px; border: 2px solid var(--brand); border-radius: 6px; color: var(--brand); font-size: 13px; font-weight: 800; letter-spacing: .1em; transform: rotate(-6deg); }
.ds-list { margin: 0; }
.ds-list > div { display: grid; grid-template-columns: minmax(0, 11em) 1fr; gap: 2px 12px; align-items: center; min-height: 32px; }
.ds-list dt { font-size: 13px; color: var(--sub); }
.ds-list dd { margin: 0; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rd { position: relative; display: inline-block; padding: 0; border: 0; background: none; font: inherit; color: inherit; vertical-align: middle; min-height: 24px; }
.rd .rd-t { position: relative; display: inline-block; padding: 1px 0; color: transparent; }
.rd .rd-t::after { content: ""; position: absolute; inset: 0 -4px; background: var(--ink); border-radius: 2px; transform-origin: right center; transition: transform .55s cubic-bezier(.6, 0, .2, 1); }
.rd.open .rd-t { color: var(--ink); }
.rd.open .rd-t::after { transform: scaleX(0); }
:lang(ar) .rd .rd-t::after { transform-origin: left center; }
.rd.wide { display: block; width: 100%; }
.rd.wide .rd-t { display: block; }
.rd-stamp { position: absolute; inset: 50% auto auto 50%; padding: 1px 8px; border: 2px solid var(--brand); border-radius: 4px; background: rgba(255, 255, 255, .9); color: var(--brand);
  font-size: 12px; font-weight: 800; letter-spacing: .08em; white-space: nowrap; transform: translate(-50%, -50%) rotate(-5deg); animation: ds-stamp .32s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes ds-stamp { from { opacity: 0; transform: translate(-50%, -50%) rotate(-5deg) scale(1.9); } }
.ds-last, .ds-hint { margin: 10px 0 0; }
.ds-hint { font-size: 12px; color: var(--sub); }
.dossier.still .rd .rd-t::after { transition: none; }
.dossier.still .rd-stamp { animation: none; }
.ds-list > div[hidden] { display: none; }
@media (max-width: 420px) { .ds-list > div { grid-template-columns: 1fr; gap: 0; padding: 4px 0; } .ds-paper { padding: 18px 16px; } }
.e404 { padding: 40px 0; text-align: center; }
.e404 .btn { margin-top: 12px; }

/* ------------------------------------------------------------------ wide screens: the globe on the left, the slip on the right */
@media (min-width: 900px) {
  h1, .head h1 { font-size: 24px; }
  .head { padding-top: 20px; }
  .layout { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 32px; align-items: start; }
  .lower { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 32px; }
  .lower > .sec { margin-inline: 0; padding-inline: 0; }
  .lower > .wide { grid-column: 1 / -1; }
}
@media (max-width: 899px) { .side { margin-top: 12px; } }
@media (prefers-reduced-motion: reduce) {
  .row.new, .board.done .pb.hit, .board.done .pb.bon, .board.done .pb.miss, .board.done .rank, .board.done .score, #next-acts:not([hidden]) { animation: none; }
  .draw { transition: none; }
}
/* right to left (Arabic): the page flows from the right; balls, number grids and the countdown stay left to right */
[dir=rtl] :is(.balls, .now-balls, .p-balls) { justify-content: flex-end; }
[dir=rtl] .check-form { direction: ltr; } [dir=rtl] .check-form legend { direction: rtl; }
@media print { .foot, .stage, .draw, .opts, .toast, .consent { display: none; } }
.muted { color: var(--sub); font-size: 13px; }
p.balls { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
