/* Deuce Day — "stadium night". Tokens from exports/design-v2 (Styleguide board). No rounded corners, 4 px grid. */
/* INFRA-02 3.2: self-hosted fonts (web/fonts/, Fontsource 5.3.0 latin, SIL OFL 1.1 - web/fonts/OFL.txt); no third-party
   font host. Five faces: other weights map to the nearest one (Space Grotesk 600 -> 700, Inter 500 -> 400, 700 -> 600). */
@font-face { font-family: Silkscreen; src: url(fonts/silkscreen-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url(fonts/space-grotesk-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url(fonts/space-grotesk-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: Inter; src: url(fonts/inter-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url(fonts/inter-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
:root {
  --ground: #0B1020; --surface: #121A2F; --board: #05070F; --line: #243052; --line-2: #3A4A7A;
  --ink: #EEF2FA; --muted: #8C98B8; --faint: #4A5578; --accent: #D4FF3A; --accent-2: #EEFF9A;
  --clay: #D8703E; --glass: #39D0FF; --match: #1E7A48; --close: #B8861B; --no: #2A3350; --no-ink: #C9D2EA;
  --empty: #0F1628; --select: #1C2744; --fail: #7A2E2E;
  --track: var(--clay);
  --led: Silkscreen, ui-monospace, monospace; --head: 'Space Grotesk', system-ui, sans-serif; --body: Inter, system-ui, sans-serif;
  --gap: 24px;
}
body.padel { --track: var(--glass); }
* { box-sizing: border-box; border-radius: 0; }
[hidden] { display: none !important; }
html { background: var(--ground); }
body { margin: 0; background: var(--ground); color: var(--ink); font: 15px/1.5 var(--body); min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent); } a:hover { color: var(--accent-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; width: 100%; }
.led { font-family: var(--led); letter-spacing: 2px; }
.label { font-family: var(--led); font-size: 11px; letter-spacing: 3px; color: var(--muted); text-transform: uppercase; }
h1, h2, h3 { font-family: var(--head); margin: 0; }
h1 { font-weight: 700; font-size: 28px; letter-spacing: -.3px; }
.muted { color: var(--muted); }

/* header */
.site-head { border-bottom: 1px solid var(--line); background: var(--ground); }
.site-head .wrap { height: 64px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand i { width: 12px; height: 12px; background: var(--accent); display: inline-block; }
.brand b { font: 400 22px var(--led); letter-spacing: 2px; } .brand b span { color: var(--accent); }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { padding: 10px 14px; text-decoration: none; color: var(--muted); font: 600 15px var(--head); border-bottom: 3px solid transparent; }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--track); }
.nav a:hover { color: var(--ink); }
.head-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pill { font: 400 13px var(--led); letter-spacing: 1px; color: var(--accent); background: var(--surface); border: 1px solid var(--line); padding: 8px 12px; white-space: nowrap; }
.icon-btn { width: 44px; height: 44px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.btn { height: 44px; padding: 0 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 700 15px var(--head); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:hover { border-color: var(--line-2); color: var(--ink); }
.btn.primary { background: var(--accent); color: var(--ground); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-2); }
.btn.big { height: 52px; padding: 0 22px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.menu-btn { display: none; }

main { flex: 1; }
.page { padding-top: 24px; padding-bottom: 48px; display: flex; flex-direction: column; gap: var(--gap); }   /* INFRA-02: top/bottom only - the shorthand removed .wrap's 16 px side gutter */

/* stage */
.stage { position: relative; background: var(--board); border: 1px solid var(--line); overflow: hidden; aspect-ratio: 7 / 3; width: 100%; }
/* COURT-01: the tennis court (web/js/court.js) is a 1120 x 480 frame - a 7:3 box at every width, the whole frame, nothing
   cropped (brief v1.7 Block 5: the 5:3 phone box of v1 is gone). Padel stays on the Defold stage: 8:3. */
body.padel .stage { aspect-ratio: 8 / 3; }
/* PLAY-02 Block 6c: while padel is closed - one still picture of the court, the «opens soon» card under it (beside it on
   a desktop) */
.padel-still { margin: 0 0 16px; border: 1px solid var(--line); background: var(--board); }
.padel-still img { display: block; width: 100%; height: auto; aspect-ratio: 1120 / 420; }
.stage-box { position: absolute; inset: 0; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; pointer-events: none; }
.stage-unsupported::after { content: 'The court needs WebGL. The game works without it.'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font: 13px var(--body); }
.hud { position: absolute; background: var(--board); border: 1px solid var(--line); padding: 10px 14px; font: 400 14px var(--led); letter-spacing: 2px; color: var(--ink); z-index: 2; white-space: nowrap; }
.hud.tl { top: 16px; left: 16px; } .hud.tr { top: 16px; right: 16px; color: var(--accent); }
.hud .t { color: var(--track); }
/* GAME-09: the flag the player has earned (or the colour of the continent) - the last child of the first chip, made by
   web/js/hudflag.js. ART-08's 12 x 8 master on a canvas at a whole multiple: 3x, and 2x while the stage is narrower than
   480 px (the row of stagechips.js; the media query below is the same width before that script has run). The box takes
   width only: the picture hangs on the chip's middle line (the chip is its containing block), so the chip is not a pixel
   taller. `inset` and `pointer-events` undo `.stage canvas` above, which is written for the engine's canvas. */
.hud .hud-flag { display: inline-block; width: 36px; height: 0; margin-left: 6px; vertical-align: baseline; }
.hud .hud-flag canvas { position: absolute; inset: 50% auto auto auto; display: block; width: 36px; height: 24px; margin-top: -12px; image-rendering: pixelated; pointer-events: auto; box-shadow: 0 0 0 1px var(--line); }
.chips-row .hud .hud-flag { width: 24px; margin-left: 4px; }
.chips-row .hud .hud-flag canvas { width: 24px; height: 16px; margin-top: -8px; }
@media (max-width: 479.98px) {
  .hud .hud-flag { width: 24px; margin-left: 4px; }
  .hud .hud-flag canvas { width: 24px; height: 16px; margin-top: -8px; }
}
.hud.banner { bottom: 18px; left: 50%; transform: translateX(-50%); color: var(--accent); border-color: var(--line-2); font-size: 16px; padding: 12px 20px; display: none; }
.hud.banner.show { display: block; }
.dots { position: absolute; bottom: 16px; left: 16px; display: flex; gap: 6px; z-index: 2; }
.dots span { width: 14px; height: 14px; background: var(--no); display: inline-block; }
.dots span.used { background: var(--accent); }
.dots span.win { background: var(--match); }
.sound-btn { position: absolute; bottom: 12px; right: 12px; width: 44px; height: 44px; background: var(--board); border: 1px solid var(--line); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2; }
.sound-btn[aria-pressed="false"] { color: var(--muted); }

/* umpire */
.umpire { background: var(--board); border: 1px solid var(--line); border-left: 4px solid var(--accent); padding: 14px 18px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: -12px; min-height: 56px; }
.umpire .who { font: 400 11px var(--led); letter-spacing: 2px; color: var(--accent); white-space: nowrap; }
.umpire .line { font: 600 17px var(--head); color: var(--ink); }
.umpire .meta { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.umpire-portrait { position: relative; width: 102px; height: 96px; flex: none; margin: -10px 0 -14px -8px; align-self: flex-end; }
.umpire-portrait img { position: absolute; inset: 0; width: 102px; height: 96px; image-rendering: pixelated; }

/* layout */
.cols { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: flex-start; }
.col-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.col-side { flex: 1 1 300px; display: flex; flex-direction: column; gap: 16px; }
.head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* guess form + autocomplete */
.guess-form { position: relative; display: flex; gap: 8px; }
.guess-form input { flex: 1 1 auto; min-width: 0; height: 52px; padding: 0 16px; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); font: 17px var(--body); }
.guess-form input::placeholder { color: #6F7B9C; }
.guess-form input:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
.guess-form input[disabled] { opacity: .6; }
.suggest { position: absolute; top: 56px; left: 0; right: 104px; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 16px 40px rgba(0,0,0,.45); z-index: 5; display: flex; flex-direction: column; gap: 2px; }
.suggest[hidden] { display: none; }
.suggest li { padding: 12px; display: flex; justify-content: space-between; gap: 12px; cursor: pointer; min-height: 44px; align-items: center; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--select); }
.suggest li .hint { color: var(--muted); font-size: 13px; white-space: nowrap; }
.suggest li.used { opacity: .45; }
/* PLAY-02 Block 6a: a player of the other tour after the first guess - greyed, not a guess, the reason beside the name */
.suggest li.blocked { opacity: .5; cursor: not-allowed; }
.suggest li.blocked .hint { white-space: normal; text-align: right; font-size: 12px; }
.form-msg { min-height: 20px; font-size: 13px; color: var(--muted); margin: -8px 0 0; }

/* guess table */
.table-scroll { overflow-x: auto; }
.gtable { min-width: 760px; display: flex; flex-direction: column; gap: 6px; }
.grow { display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(8, minmax(0, 1fr)); gap: 6px; }   /* PLAY-01 M4: minmax(0, …) - every row gets the same tracks, whatever its name */
.grow.head { font: 400 10px var(--led); letter-spacing: 1px; color: var(--muted); align-items: end; }
/* PLAY-01 M4: one grid for the header and the rows - every header stands centred over its column (no padding of its
   own, which shifted the header against the cells) and its label never runs into the next one */
.grow.head:not(.rally-row) > div { display: flex; justify-content: center; align-items: flex-end; text-align: center; white-space: nowrap; min-width: 0; }   /* (flex: a label wider than its column still stands on its middle) */
.grow.head:not(.rally-row) > div > span { margin-right: -1px; }   /* the letter-spacing after the last letter, so the word's own middle is the column's */
/* PLAY-01 M1-M3: the first visit's four lines and the example row; under the table the gender, «So far» and how many fit */
.m-intro { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); background: var(--surface); padding: 10px 12px; font-size: 13px; line-height: 1.35; }
.m-intro p { margin: 0; }
.m-intro .m-ex { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
.m-intro .m-ex .cell { min-height: 26px; padding: 3px 2px; font-size: 11px; font-weight: 400; }   /* (400: the weight the page already loads - no new font file) */
.m-intro .m-ex-cap { font-size: 11px; color: var(--muted); }
.m-intro .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.m-intro .btn { min-height: 44px; padding: 0 14px; }
@media (max-height: 760px) { .m-intro { gap: 3px; padding: 6px 10px; font-size: 12.5px; line-height: 1.3; } }   /* COURT-01: the 5:3 court is taller - the input stays in the first screen at 360 x 740 */
.m-know { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--ink); }
.m-know p { margin: 0; }
.m-know .m-fit { color: var(--muted); }
.grow .who { background: var(--surface); border: 1px solid var(--line); padding: 12px 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; min-height: 48px; }
.grow .who small { font: 400 11px var(--led); color: var(--muted); }
.cell { padding: 12px 6px; text-align: center; font-weight: 600; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; }
.cell.match { background: var(--match); color: #fff; }
.cell.close { background: var(--close); color: var(--ground); }
.cell.no { background: var(--no); color: var(--no-ink); font-weight: 400; }
.grow.empty > div { background: var(--empty); border: 1px dashed var(--line); min-height: 40px; }
.grow.empty .who { color: var(--muted); font: 400 11px var(--led); padding: 12px 14px; }
.flip { animation: flip .32s ease-out both; }
@keyframes flip { from { transform: rotateX(90deg); filter: brightness(2.2); } to { transform: rotateX(0); filter: none; } }
.slide { animation: slide .16s ease-out both; }
@keyframes slide { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
.nudge-up { animation: nu .3s 2; } .nudge-down { animation: nd .3s 2; } .nudge-left { animation: nl .3s 2; } .nudge-right { animation: nr .3s 2; }
@keyframes nu { 50% { transform: translateY(-4px); } } @keyframes nd { 50% { transform: translateY(4px); } }
@keyframes nl { 50% { transform: translateX(-4px); } } @keyframes nr { 50% { transform: translateX(4px); } }
.arrow { display: inline-block; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; font-size: 14px; color: var(--muted); }
.legend i { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; margin-right: 6px; }
.legend .note { margin-left: auto; }

/* side cards */
.card { background: var(--surface); border: 1px solid var(--line); padding: 20px; }
.card.dark { background: var(--board); }
.card.accent { background: var(--accent); color: var(--ground); border-color: var(--accent); text-decoration: none; display: block; }
.card.accent .label { color: var(--ground); }
/* PLAY-02 Block 6b: a side card's label stays on one line at every width ("UNLIMITED · $4.99 / 3 MONTHS" wrapped under
   a one-line heading beside it) - tighter, never wrapped */
.col-side .card .label { white-space: nowrap; letter-spacing: 1px; }
.card.link { text-decoration: none; color: var(--ink); display: block; border-left: 4px solid var(--track); }
.card.link.glass { border-left-color: var(--glass); } .card.link.clay { border-left-color: var(--clay); }
.card h3, .card h2 { font: 700 19px/1.25 var(--head); margin: 8px 0 6px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.card.accent p, .card.accent h3, .card.accent h2 { color: var(--ground); }
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 0; }
.chip { font-size: 12px; padding: 8px 4px; text-align: center; border: 1px dashed var(--line-2); color: var(--muted); }
.chip.match { background: var(--match); color: #fff; border-color: var(--match); font-weight: 600; }
.chip.close { background: var(--close); color: var(--ground); border-color: var(--close); font-weight: 600; }
.form-nums { display: flex; gap: 24px; margin: 12px 0; }
.form-nums b { display: block; font: 400 26px var(--led); color: var(--accent); }
.form-nums b.w { color: var(--ink); }
.form-nums span { font-size: 13px; color: var(--muted); }

/* reveal / solved */
.reveal { background: var(--board); border: 1px solid var(--line); padding: 28px; }
.reveal .name { font: 400 34px/1.25 var(--led); letter-spacing: 4px; color: var(--accent); margin: 14px 0 18px; min-height: 42px; }
.reveal .facts { display: flex; flex-wrap: wrap; gap: 8px; }
.reveal .facts span { border: 1px solid var(--line-2); background: var(--surface); padding: 6px 12px; font-size: 14px; }
.reveal .fine { color: var(--muted); font-size: 14px; margin-top: 16px; }
.share-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.share-grid { background: var(--board); border: 1px solid var(--line); padding: 16px; font: 400 11px var(--led); letter-spacing: 2px; }
.share-grid .row { display: flex; gap: 4px; margin: 4px 0; } .share-grid .row i { width: 16px; height: 16px; display: inline-block; }
.share-grid i.match { background: var(--match); } .share-grid i.close { background: var(--close); } .share-grid i.no { background: var(--no); }
.share-actions { display: flex; flex-direction: column; gap: 10px; }
.duel-grids { display: flex; gap: 16px; flex-wrap: wrap; }

/* stats modal */
dialog { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); padding: 0; max-width: 560px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(5,7,15,.75); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.dist { display: flex; flex-direction: column; gap: 6px; }
.dist div { display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: center; font: 400 12px var(--led); }
.dist .bar { background: var(--no); color: var(--ink); padding: 2px 6px; min-width: 22px; text-align: right; font: 600 12px var(--body); }
.dist .bar.hit { background: var(--match); } .dist .bar.fail { background: var(--fail); }
.how-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 14px; }

/* footer */
.site-foot { border-top: 1px solid var(--line); margin-top: 32px; }
.site-foot .wrap { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; font-size: 13px; color: var(--muted); }
.site-foot nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px 16px; } .site-foot a { color: var(--ink); }
.toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(20px); background: var(--accent); color: var(--ground); font: 700 15px var(--head); padding: 12px 20px; opacity: 0; transition: opacity .15s, transform .15s; z-index: 50; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* content pages */
.prose { max-width: 720px; } .prose p, .prose li { color: #C9D2EA; } .prose h2 { margin: 24px 0 8px; font-size: 20px; }
.notice { border: 1px solid var(--line-2); background: var(--surface); padding: 16px 20px; }
/* INFRA-02 3.12: Terms / Privacy / Refunds (the reference's document styles in the game shell) */
.wrap.prose { padding-left: 16px; padding-right: 16px; }   /* .page's padding shorthand removed the side gutter */
.doc { display: block; } .doc > * { margin: 0; } .doc > * + * { margin-top: 12px; } .doc > h1 { margin-top: 8px; }
.doc > h2 { margin-top: 28px; } .doc > h2 + * { margin-top: 8px; } .doc .updated { margin-top: 8px; }
.doc .updated, .doc .operator { color: var(--muted); font-size: 14px; margin: 0; }
.doc .short { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 16px 20px; color: var(--ink); }
.doc ul { padding-left: 20px; margin: 0; } .doc li + li { margin-top: 4px; }
/* 404 (INFRA-02 3.2: the reference's OUT. page) */
.out { padding-top: 72px; } .out .big { font: 400 clamp(64px, 16vw, 160px)/1 var(--led); color: var(--accent); letter-spacing: 6px; margin: 0; }
.out p { color: var(--muted); font-size: 18px; margin: 16px 0 24px; } .out nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 28px; }

/* mobile (Mobile-Tennis board, 390 px) */
.tabs { display: none; }
.bottom-bar { display: none; }
@media (max-width: 720px) {
  :root { --gap: 16px; }
  .nav, .head-tools .icon-btn.help, .head-tools .btn.unlimited { display: none; }
  .menu-btn { display: inline-flex; }
  .site-head .wrap { height: 56px; gap: 12px; }
  .brand b { font-size: 18px; }
  .head-tools .pill { border: 0; background: none; padding: 4px; }
  .nav.open { display: flex; position: absolute; top: 56px; left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--line); z-index: 20; margin: 0; padding: 8px; }
  .tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border: 1px solid var(--line); }   /* PLAY-03 Block 5: «Tennis | Padel · soon» - as many columns as tabs (was three: Today | Padel | Rally) */
  .tabs a { padding: 12px; text-align: center; text-decoration: none; color: var(--muted); font: 600 15px var(--head); min-height: 44px; }
  .tabs a[aria-current="page"] { background: var(--track); color: var(--ground); }
  .page { padding-top: 12px; }
  .hud { font-size: 10px; padding: 6px 8px; letter-spacing: 1px; } .hud.tl { top: 8px; left: 8px; } .hud.tr { top: 8px; right: 8px; }
  .hud.banner { font-size: 10px; bottom: 8px; padding: 6px 10px; }
  .dots { bottom: 8px; left: 8px; gap: 3px; } .dots span { width: 8px; height: 8px; }
  .sound-btn { width: 32px; height: 32px; bottom: 6px; right: 6px; }
  .hud .long { display: none; }
  .umpire { margin-top: -8px; padding: 10px 12px; } .umpire .line { font-size: 15px; } .umpire .meta { display: none; }
  .umpire-portrait, .umpire-portrait img { width: 67px; height: 64px; } .umpire-portrait img { image-rendering: auto; } .umpire-portrait { margin: -6px 0 -10px -4px; }
  .guess-form { position: sticky; top: 0; z-index: 10; background: var(--ground); padding: 8px 0; }
  .suggest { right: 0; top: 60px; }
  .gtable { min-width: 560px; }
  .grow { grid-template-columns: minmax(0, 1.5fr) repeat(8, minmax(0, 1fr)); gap: 4px; }
  .grow .who { padding: 8px; font-size: 13px; }
  .cell { padding: 8px 2px; font-size: 12px; min-height: 40px; }
  .grow.head .full { display: none; } .grow.head .short { display: inline; }
  .col-side { display: none; } body.done .col-side { display: flex; }
  .share-panel { grid-template-columns: 1fr; }
  .reveal { padding: 18px; } .reveal .name { font-size: 22px; letter-spacing: 2px; }
  .bottom-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: sticky; bottom: 0; background: var(--ground); padding: 12px 16px; border-top: 1px solid var(--line); z-index: 9; }
  .bottom-bar a { min-height: 52px; }
  .legend .note { margin-left: 0; }
  .site-foot nav { margin-left: 0; }
}
.grow.head .short { display: none; }
@media (max-width: 720px) { .grow.head .short { display: inline; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 150ms !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; transition-delay: 0s !important; }
  .flip, .slide { animation-name: fade !important; }
  .nudge-up, .nudge-down, .nudge-left, .nudge-right { animation: none !important; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* VIRAL-01: stamps, duel verdict, share sheet */
.stamp { font: 700 40px var(--led); letter-spacing: 2px; line-height: 1; margin-bottom: 8px; }
.verdict { margin: 12px 0 0; font: 600 18px var(--head); color: var(--ink); }
.verdict .who { font: 400 11px var(--led); letter-spacing: 2px; color: var(--accent); margin-right: 10px; }
#share-modal { max-width: 980px; width: calc(100% - 32px); }
.share-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.share-card { margin: 0; background: var(--board); border: 1px solid var(--line); padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.share-card img { width: 100%; height: auto; display: block; image-rendering: auto; }
.share-card figcaption { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
@media (max-width: 720px) { .stamp { font-size: 28px; } .share-cards { grid-template-columns: 1fr 1fr; } }

/* ART-03: the umpire's place under her portrait (CHAIR / VIDEO BOOTH), small Silkscreen caps */
.umpire-label{position:absolute;left:50%;bottom:16px;transform:translateX(-50%);padding:2px 4px;background:rgba(11,16,32,.88);font:8px/1 Silkscreen,ui-monospace,monospace;letter-spacing:.08em;color:#D4FF3A;white-space:nowrap;z-index:1}
@media (max-width:600px){.umpire-label{font-size:7px;bottom:12px;padding:1px 3px}}
/* ART-03: three free matches a day - the counter line and the Unlimited card */
.limit-line{margin:14px 0 0;font:11px/1.6 Silkscreen,ui-monospace,monospace;letter-spacing:.06em;color:#D4FF3A;display:flex;flex-wrap:wrap;gap:4px 10px;align-items:center}
.limit-line a{color:#EEF2FA;text-decoration:underline;min-height:44px;display:inline-flex;align-items:center}
dialog.limit-card{max-width:420px;width:calc(100% - 32px);box-sizing:border-box;background:#0B1020;color:#EEF2FA;border:2px solid #D4FF3A;padding:22px 20px 16px;text-align:center}
dialog.limit-card::backdrop{background:rgba(5,7,15,.78)}
.limit-card .lc-label{font:11px/1 Silkscreen,ui-monospace,monospace;letter-spacing:.12em;color:#D4FF3A}
.limit-card h2{font-size:24px;line-height:1.15;margin:10px 0 12px}
.limit-card .lc-price{font:12px/1 Silkscreen,ui-monospace,monospace;color:#9AA6C7;letter-spacing:.08em}
.limit-card .lc-price b{font:28px/1 Silkscreen,ui-monospace,monospace;color:#D4FF3A;letter-spacing:0}
.limit-card .lc-perks{list-style:none;padding:0;margin:14px 0;display:grid;gap:6px;font:12px/1.4 Silkscreen,ui-monospace,monospace;letter-spacing:.04em}
.limit-card .lc-perks li::before{content:"✓ ";color:#D4FF3A}
.limit-card .lc-reset{font:11px/1.4 Silkscreen,ui-monospace,monospace;color:#9AA6C7;letter-spacing:.06em;margin:0 0 14px}
.limit-card .lc-buy{width:100%;min-height:48px;font:12px/1.3 Silkscreen,ui-monospace,monospace;letter-spacing:.04em;white-space:normal}
.limit-card .lc-buy[disabled]{opacity:.55;cursor:not-allowed;background:#121A2F;color:#C9D2EA;border:1px dashed #3A4670}
.limit-card .lc-not{display:block;margin:10px auto 0;min-height:44px;min-width:120px;background:none;border:0;color:#EEF2FA;text-decoration:underline;font:14px Inter,system-ui,sans-serif;cursor:pointer}
.limit-card .lc-note{font-size:11px;color:#7F8AAA;margin:6px 0 0}
/* PAY-02: two passes - 3 and 12 months - one payment each */
.limit-card .lc-buys{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.limit-card .lc-once{font-size:12px;color:#C9D2EA;margin:8px 0 0;text-align:center}
@media (max-width:380px){.limit-card .lc-buys{grid-template-columns:1fr}}
@media (max-width:400px){dialog.limit-card{padding:18px 14px 12px}.limit-card h2{font-size:21px}}
/* ART-03 3.9: 360 px phones - the header keeps inside the screen (brand, streak, stats, menu) */
@media (max-width: 380px) {
  .site-head .wrap { gap: 6px; }
  .head-tools { gap: 2px; }
  .brand b { font-size: 16px; }
  .head-tools .pill { padding: 4px 2px; font-size: 10px; }
}
@media (max-width: 720px) { .limit-line { padding: 0 16px; } }

/* GAME-03 dev events panel (127.0.0.1 with ?events=1) */
.events-panel{position:fixed;right:8px;bottom:8px;z-index:90;width:min(420px,calc(100vw - 16px));max-height:40vh;overflow:auto;background:#05070F;border:1px solid #3A4A7A;color:#EEF2FA;font:11px/1.35 ui-monospace,Menlo,monospace;padding:8px}
.events-panel .ev-head{font:400 10px Silkscreen,monospace;color:#D4FF3A;letter-spacing:1px;margin-bottom:4px}
.events-panel .ev{border-top:1px solid #243052;padding:3px 0;word-break:break-all}.events-panel .ev b{color:#D4FF3A}.events-panel .ev span{color:#8C98B8}

/* INFRA-02 3.10: the unlock after the checkout */
@media (prefers-reduced-motion: no-preference) { .price.unlocked-now { animation: unlockNow 1.2s ease-out 1; } }
@keyframes unlockNow { 0% { box-shadow: 0 0 0 0 rgba(212,255,58,.9); } 100% { box-shadow: 0 0 0 24px rgba(212,255,58,0); } }
.price.unlocked-now { border-color: var(--accent); }

/* GAME-06 3.7: the season strip under the header */
.ss-strip { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; min-height: 44px; padding: 6px 16px; box-sizing: border-box; border-bottom: 1px solid var(--line); background: var(--board); color: var(--ink) !important; text-decoration: none; }
.ss-strip:hover .ss-label { color: var(--accent); }
.ss-sq { width: 8px; height: 8px; background: var(--accent); flex: none; }
.ss-label { font: 600 13px Inter, system-ui, sans-serif; letter-spacing: 0; }   /* FIX-02: «Season: Oct–Dec · Indoor & Finals» in plain words */
.ss-left { font: 12px Inter, system-ui, sans-serif; color: var(--muted); margin-left: -6px; }
.ss-first { flex: 0 0 100%; font: 13px/1.4 Inter, system-ui, sans-serif; color: var(--ink); }
.ss-next { font: 12px Inter, system-ui, sans-serif; color: var(--muted); }

/* ================================================================================================================
   WEB-03: the desktop interface of the older court pages (Mystery, Rally, Padel) - the same grid as the desktop block
   of web/g3.css: from 1024 x 600 up the court and the umpire are the left column, .col-main is the play panel, the
   .col-side cards sit under the court. Phone and middle widths keep every rule above.
   ================================================================================================================ */
@media (min-width: 1024px) and (min-height: 600px) {
  body.g3m, body.padel { height: 100vh; display: flex; flex-direction: column; }
  body.g3m > main, body.padel > main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  body.g3m .wrap.page, body.padel .wrap.page { flex: 1 1 auto; min-height: 0; max-width: 1680px; padding: 16px 24px 12px; display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(400px, 30vw, 480px); grid-template-rows: auto auto auto auto minmax(0, 1fr); column-gap: 24px; row-gap: 0; }   /* (FIX-02: row 3 = «Play unlimited» under the court) */
  body.g3m .wrap.page > .tabs, body.padel .wrap.page > .tabs { grid-column: 1 / -1; grid-row: 1; }
  body.g3m .wrap.page > .stage, body.padel .wrap.page > .stage { grid-column: 1; grid-row: 2; }
  body.g3m .wrap.page > .umpire, body.padel .wrap.page > .umpire { grid-column: 1; grid-row: 4; margin-top: 0; }
  body.g3m .cols, body.padel .cols { display: contents; }
  /* the play panel */
  body.g3m .col-main, body.padel .col-main, body.padel #soon { grid-column: 2; grid-row: 2 / 6; min-height: 0; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); padding: 16px; gap: 12px; }
  body.padel #soon[hidden], body.padel .cols[hidden] > *, body.padel.soon .col-main, body.padel.soon .col-side { display: none; }
  body.padel .wrap.page > .padel-still { grid-column: 1; grid-row: 2 / 6; align-self: start; margin: 0; }   /* (PLAY-02 Block 6c) */
  body.g3m .col-main .head-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  body.g3m .col-main .guess-form input, body.padel .col-main .guess-form input { background: var(--ground); }
  /* the guess table in the panel: the phone's compact cells, no sideways scroll */
  body.g3m .col-main .table-scroll, body.padel .col-main .table-scroll { overflow-x: hidden; }
  body.g3m .col-main .gtable, body.padel .col-main .gtable { min-width: 0 !important; gap: 4px; }
  body.g3m .col-main .grow:not(.rally-row), body.padel .col-main .grow { grid-template-columns: minmax(0, 2.5fr) repeat(8, minmax(0, 1fr)); gap: 3px; }
  body.g3m .col-main .grow .who, body.padel .col-main .grow .who { padding: 4px 5px; font-size: 12px; line-height: 1.2; min-height: 36px; gap: 4px; overflow: hidden; overflow-wrap: anywhere; }   /* (RELEASE-01: a long surname breaks inside its cell instead of being cut) */
  body.g3m .col-main .grow .who small, body.padel .col-main .grow .who small { font-size: 9px; }
  body.g3m .col-main .cell, body.padel .col-main .cell { padding: 4px 1px; font-size: 11px; min-height: 36px; }
  body.g3m .col-main .grow.empty > div, body.padel .col-main .grow.empty > div { min-height: 30px; }
  body.g3m .col-main .grow.empty .who, body.padel .col-main .grow.empty .who { padding: 4px 6px; }
  body.g3m .col-main .grow.head .full, body.padel .col-main .grow.head .full { display: none; }
  body.g3m .col-main .grow.head .short, body.padel .col-main .grow.head .short { display: inline; }
  body.g3m .col-main .legend, body.padel .col-main .legend { gap: 6px 12px; font-size: 12px; } body.g3m .col-main .legend .note { margin-left: 0; }
  /* Rally in the panel: a compact prompt box, the answers table in the phone's columns */
  body.g3m .col-main .prompt-box { padding: 14px 16px; gap: 10px; flex: none; }
  body.g3m .col-main .prompt-box h2 { font-size: 23px; margin: 0; }
  body.g3m .col-main .rally-row { grid-template-columns: 22px 2fr 1.4fr .9fr .7fr; font-size: 12px; gap: 3px; }
  body.g3m .col-main .rally-row .prompt, body.g3m .col-main .rally-row .ans { display: block; padding: 6px 8px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.g3m .col-main .rally-row .cell, body.g3m .col-main .rally-row .who { min-height: 30px; padding: 2px 1px; justify-content: center; }
  body.g3m[data-mode="rally"] .col-main .table-scroll { flex: none; overflow: visible; }
  body.g3m .col-main .rally-row.empty > div { min-height: 30px; }
  body.g3m .col-main .rally-row.head { align-items: end; }
  body.g3m .col-main h1 { font-size: 20px; }
  body.g3m[data-mode="rally"] .col-main { gap: 10px; }
  body.g3m[data-mode="rally"] .col-main .form-msg { min-height: 0; margin: 0; }
  body.g3m[data-mode="rally"] .col-main .head-row { flex-direction: row; align-items: baseline; gap: 4px 12px; }
  /* under the court: the side cards, two in a row */
  body.g3m .col-side, body.padel .col-side { grid-column: 1; grid-row: 5; min-height: 0; overflow: hidden; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; padding-top: 12px; align-content: start; }
  body.g3m .col-side > .card, body.padel .col-side > .card { grid-column: span 3; padding: 12px 14px; }
  body.g3m .col-side > a.card, body.padel .col-side > a.card { grid-column: span 2; }
  body.g3m .col-side .card h2, body.g3m .col-side .card h3, body.padel .col-side .card h2, body.padel .col-side .card h3 { font-size: 15px; margin: 4px 0 2px; }
  body.g3m .col-side .card p, body.padel .col-side .card p { font-size: 12px; }
  body.g3m .col-side .chips { margin: 8px 0; } body.g3m .col-side .form-nums { margin: 6px 0; }
  body.g3m .col-side > .card.tiers { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 16px; }
  body.g3m .col-side > .card.tiers > .label, body.g3m .col-side > .card.tiers > p { grid-column: 1 / -1; display: block; margin: 0; }
  body.g3m .col-side > .card.tiers > div { margin: 2px 0; grid-template-columns: 84px 1fr; gap: 8px; font-size: 13px; }
  body.g3m .col-side > a.card p { display: none; }
  /* PLAY-02 Block 6b (the founder: "broken, not centred"): 16 px between the cards and their rows, a card alone in its
     row (Rally's padel card) as wide as the column */
  body.g3m .col-side, body.padel .col-side { gap: 16px; padding-top: 16px; }
  body.g3m[data-mode="rally"] .col-side > a.card { grid-column: 1 / -1; }
  body.g3m .col-side .card .label, body.padel .col-side .card .label { font-size: 10px; letter-spacing: .5px; }   /* (1024 px: two cards of a row are 268 px wide) */
  /* the header and the footer follow the same 1680 px box; the footer stays on the screen, one small line */
  body.g3m > .g3-mhead { padding-left: max(24px, calc(50% - 816px)); padding-right: max(24px, calc(50% - 816px)); }
  body.padel > .site-head .wrap { max-width: 1680px; padding-left: 24px; padding-right: 24px; }
  body.g3m > .site-foot, body.padel > .site-foot { margin-top: 0; }
  body.g3m > .site-foot .wrap, body.padel > .site-foot .wrap { max-width: 1680px; padding: 7px 24px; font-size: 12px; gap: 6px 16px; }
}
/* INFRA-03: with Feedback and Discord in it the footer's line no longer fits a 1280 px window at 12 px (it wrapped, and
   Rally's panel lost a line and scrolled): below 1366 px it is set one size smaller and tighter, so it stays one line */
@media (min-width: 1024px) and (max-width: 1365px) and (min-height: 600px) {
  body.g3m > .site-foot .wrap, body.padel > .site-foot .wrap { font-size: 11px; gap: 6px 12px; }
  body.g3m > .site-foot nav, body.padel > .site-foot nav { gap: 8px 12px; }
}
/* a low desktop window: only the two cards the page needs under the court (the links to other modes come back from 860 px);
   Rally's heading loses its second line so that the prompt and all seven rows of the table fit */
@media (min-width: 1024px) and (min-height: 600px) and (max-height: 859px) {
  body.g3m .col-side > a.card, body.padel .col-side > a.card { display: none; }
  body.g3m[data-mode="rally"] .col-main > div:first-child p { display: none; }
  body.g3m[data-mode="rally"] .col-main .prompt-box { padding: 12px 14px; gap: 8px; }
  body.g3m[data-mode="rally"] .col-main .prompt-box h2 { font-size: 21px; }
}

/* ENCY-01: the players section - players.html (the index) and players/<id>.html (tools/ency.py, js/players_page.js).
   Only the font files About already loads (Silkscreen 400, Space Grotesk 700, Inter 400): no 500 / 600 weights here (Y9). */
html.pp-wait #pp { visibility: hidden; }
.pp-crumb { margin: 0; } .pp-crumb a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; } .pp-crumb a::before { content: '‹'; margin-right: 8px; }
.pp-crumb a:hover { color: var(--ink); }
.pp-card { display: flex; gap: 16px; align-items: flex-end; border: 1px solid var(--line); border-left: 4px solid var(--track); background: var(--board); padding: 16px 16px 0; margin-top: -12px; }
.pp-sil { height: 168px; width: auto; flex: none; image-rendering: pixelated; }
.pp-who { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; padding-bottom: 16px; }
/* ART-08: a flag is the nation's 12 x 8 master - one sprite (assets/g3/flags.png, 8 x 9 cells since ENCY-05), 3x on a card, 2x in the lists, never smoothed;
   the page names the cell: .f-XXX { --fx: column; --fy: row } (tools/ency.py) */
.pp-flag { display: inline-block; width: 36px; height: 24px; flex: none; background: url(assets/g3/flags.png) calc(var(--fx) * -36px) calc(var(--fy) * -24px) / 288px 216px no-repeat; image-rendering: pixelated; box-shadow: 0 0 0 2px var(--ground), 0 0 0 3px var(--line-2); }
.pp-card h1 { font: 400 22px/1.25 var(--led); letter-spacing: 1px; text-transform: uppercase; overflow-wrap: anywhere; }
.pp-card h1 .pp-board { display: block; } .pp-card h1 .pp-true { display: block; margin-top: 6px; font: 700 16px/1.2 var(--head); letter-spacing: 0; text-transform: none; color: #C9D2EA; }
.pp-status { margin: 0; font: 400 11px var(--led); letter-spacing: 2px; text-transform: uppercase; color: var(--accent); }
.prose .pp-tag { margin: 0; font: 700 16px/1.35 var(--head); color: var(--ink); }
.pp-stats { width: 100%; border-collapse: collapse; }
.pp-stats caption { text-align: left; padding-bottom: 8px; }
.pp-stats th, .pp-stats td { text-align: left; vertical-align: top; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15px; }
.pp-stats th { width: 44%; padding-right: 12px; font-weight: 400; color: var(--muted); }
.pp-stats td { color: var(--ink); }
.pp-slams { list-style: none; margin: 4px 0 0; padding: 0; } .prose .pp-slams li { color: #C9D2EA; } .pp-slams span { color: var(--muted); }
.pp-story p { margin: 0 0 12px; font-size: 16px; line-height: 1.6; } .pp-story p:last-child { margin-bottom: 0; }
.pp-moments { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line-2); }
.pp-moments li { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 10px; padding: 6px 0 6px 12px; }
.pp-moments b { font: 400 11px/2 var(--led); letter-spacing: 1px; color: var(--accent); }
.pp-dyk { margin: 0; padding-left: 20px; } .pp-dyk li { margin-bottom: 6px; }
.prose .pp-src { margin: 0; font-size: 13px; color: var(--muted); } .pp-src a { display: inline-block; padding: 6px 0; }
.prose .pp-soon { margin: 0; color: var(--muted); }
.pp-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 0; }
.pp-lock .pp-ump { display: flex; align-items: flex-end; gap: 14px; border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--board); padding: 12px 16px 0 8px; }
.pp-lock .pp-ump img { flex: none; image-rendering: pixelated; } .pp-lock .pp-ump > div { padding-bottom: 14px; min-width: 0; }
.pp-lock h1 { font-size: 24px; margin-top: 4px; } .pp-lock h1:focus { outline: none; }
.pp-index { max-width: 720px; }
.pp-lead { margin: 0; color: #C9D2EA; }
.pp-tools { display: flex; flex-direction: column; gap: 10px; }
.pp-q { width: 100%; height: 48px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); font: 400 16px var(--body); border-radius: 0; -webkit-appearance: none; appearance: none; }
.pp-q::placeholder { color: var(--muted); }
.pp-filters { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.pp-seg { display: inline-flex; }
.pp-seg button { min-height: 44px; padding: 0 14px; margin-left: -1px; background: var(--surface); border: 1px solid var(--line-2); color: var(--muted); font: 700 14px var(--head); cursor: pointer; }
.pp-seg button:first-child { margin-left: 0; }
.pp-seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--ground); position: relative; }
.pp-count { margin: 0; font: 400 11px var(--led); letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.pp-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.pp-list a { display: grid; grid-template-columns: 24px minmax(0, 1fr) 40px 50px; align-items: center; gap: 12px; min-height: 48px; padding: 4px 2px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.pp-list a:hover { background: var(--surface); color: var(--ink); }
.pp-list .pp-flag { width: 24px; height: 16px; background-position: calc(var(--fx) * -24px) calc(var(--fy) * -16px); background-size: 192px 144px; box-shadow: 0 0 0 1px var(--line-2); }
.pp-n { display: flex; align-items: center; gap: 8px; min-width: 0; font: 700 15px var(--head); } .pp-n > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-mark { flex: none; font: 400 9px var(--led); letter-spacing: 1px; padding: 3px 5px 2px; background: var(--accent); color: var(--ground); }
.pp-b, .pp-t { font-size: 13px; color: var(--muted); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.pp-t { color: var(--ink); }
.pp-cols { display: grid; grid-template-columns: 27px minmax(0, 1fr) 40px 50px; gap: 12px; padding: 0 2px; margin-bottom: -16px; font: 400 9px var(--led); letter-spacing: 1px; color: var(--muted); text-align: right; }
.pp-cols span:first-child { grid-column: 3; }
.pp-none { margin: 0; color: var(--muted); }
/* the older header's line (brand, navigation, tools) needs about 1045 px - 1140 px with the Rankings entry - and pushed the
   page sideways below that: the navigation folds into the menu button from the phone breakpoint up to 1159 px, as it
   does on the phone. ENCY-01 did it for the players section; RELEASE-01 3.2 for every page of the older shell (About,
   the legal pages, Cards, Unlimited). */
@media (min-width: 721px) and (max-width: 1159px) {
  .site-head .nav { display: none; }
  .site-head .menu-btn { display: inline-flex; }
  .site-head .nav.open { display: flex; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--line); z-index: 20; margin: 0; padding: 8px; }
}
@media (max-width: 640px) {
  .pp-card { gap: 12px; padding: 12px 12px 0; margin-top: -4px; } .pp-sil { height: 132px; } .pp-card h1 { font-size: 18px; }
  .pp-stats th { width: 46%; } .pp-moments li { grid-template-columns: 64px minmax(0, 1fr); }
  .pp-cta .btn { flex: 1 1 100%; }
  .pp-list .pp-n > span:first-child { white-space: normal; overflow: visible; line-height: 1.2; }   /* a long name takes a second line, it is not cut */
}
.about-player { margin: 12px 0 0; font: 700 15px var(--head); } .about-player a { display: inline-flex; align-items: center; min-height: 44px; }
.pcard .about-player { margin: 0; font-size: 14px; }

/* ENCY-02: the career block, the timeline, the trophy shelf, the tournaments (tools/ency.py, tools/ency_facts.py) */
.pp-lefty { transform: scaleX(-1); }
.pp-shelf { border: 1px solid var(--line); background: var(--board); padding: 10px 12px; margin-top: -12px; }
.pp-shelf-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-end; }
.pp-shelf-g { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: flex-end; }
.sh-defs { position: absolute; }
.sh { display: block; width: 24px; height: 28px; color: var(--ink); image-rendering: pixelated; shape-rendering: crispEdges; }
.sh-ao { color: #39D0FF; } .sh-rg { color: #D8703E; } .sh-wim { color: #5B6B3A; --rim: #F2E6C9; } .sh-uso { color: #D4FF3A; }
.sh-tf { color: #F2E6C9; } .sh-no1 { color: #D4FF3A; } .sh-hof { color: #F2E6C9; }
.sh-gold { color: #F2C744; --rim: #8C98B8; } .sh-silver { color: #C9D2EA; --rim: #8C98B8; } .sh-bronze { color: #C77B4A; --rim: #8C98B8; }
.sh-more { font: 400 11px var(--led); letter-spacing: 1px; color: var(--muted); padding: 0 2px 4px; }
.pp-stats i { font-style: normal; color: #C9D2EA; }
.pp-career th a, .pp-career td a, .pp-dates a { color: inherit; }
p.pp-indep { margin: 0 auto; padding-top: 8px; padding-bottom: 24px; font-size: 13px; color: var(--muted); }
.pp-switch { margin: 0; display: flex; gap: 6px; } .pp-switch a, .pp-switch b { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-2); font: 700 14px var(--head); text-decoration: none; }
.pp-switch a { color: var(--muted); background: var(--surface); } .pp-switch b { color: var(--ground); background: var(--accent); border-color: var(--accent); }
.tp-court { flex: none; align-self: flex-end; display: block; margin-bottom: 16px; image-rendering: pixelated; shape-rendering: crispEdges; }
/* ART-08: a major's own icon (19 x 19) - 5x on its card (4x on the phone), 2x in the list, never smoothed */
.tp-icon { flex: none; align-self: flex-end; display: block; width: 95px; height: 95px; margin-bottom: 16px; image-rendering: pixelated; }
.tp-mini { display: block; width: 38px; height: 38px; image-rendering: pixelated; }
.tp-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; } .prose .tp-facts li { color: #C9D2EA; }
.tp-champs { margin: 0; padding-left: 20px; columns: 2; column-gap: 28px; } .tp-champs li { margin-bottom: 4px; break-inside: avoid; }
.prose h3 { margin: 12px 0 6px; font: 400 11px var(--led); letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.prose .tp-only { margin: 0; font-size: 13px; color: var(--muted); }
.pp-index h2 { margin: 12px 0 -8px; font: 400 11px var(--led); letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.tp-list a { grid-template-columns: 38px minmax(0, 1fr) minmax(0, 110px) minmax(0, 96px) 40px; }
.tp-city, .tp-surf { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* RELEASE-01 3.2: a long city (Indian Wells, California; Roquebrune-Cap-Martin) takes a second line instead of being cut */
.tp-city { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; overflow-wrap: anywhere; }
.tp-noflag { background: none; box-shadow: none !important; }
/* ENCY-05: the champions' roads - «Road to the title» under the career block: one <details> per title (newest first), a small
   table Round · Opponent · Score. Phone first: three fixed columns that fit 390 px without sideways scroll; the score wraps */
.pp-roads { border-bottom: 1px solid var(--line); }
.pp-road { border-top: 1px solid var(--line); }
.pp-road summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font: 700 15px var(--head); color: var(--ink); }
.pp-road summary::marker { color: var(--muted); }
.pp-road table { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 0 0 12px; }
.pp-road th, .pp-road td { text-align: left; vertical-align: top; padding: 7px 8px 7px 0; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.3; }
.pp-road td:nth-child(2) { overflow-wrap: anywhere; } .pp-road td:last-child span { white-space: nowrap; }      /* a set is never cut */
.pp-road th { font: 400 9px var(--led); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.pp-road th:first-child { width: 29%; } .pp-road th:last-child { width: 36%; padding-right: 0; } .pp-road td:last-child { padding-right: 0; font-variant-numeric: tabular-nums; color: var(--muted); }
.pp-road td:first-child { color: var(--muted); } .pp-road td a { color: inherit; }
@media (max-width: 640px) {
  .tp-court { width: 60px; height: 92px; } .tp-icon { width: 76px; height: 76px; } .tp-champs { columns: 1; }
  .tp-list a { grid-template-columns: 38px minmax(0, 1fr) minmax(0, 84px) 40px; } .tp-list .tp-surf { display: none; }
}

/* RELEASE-01 3.2 (Z3b): the chips of a court page on the phone. On a stage narrower than 480 px the two chips sit in
   one centred row at the top - over the sea, between the stands - and web/js/stagechips.js scales the row to fit (text
   never under 9 px). Before the script has run they already meet at the centre line. A status chip that does not fit
   stands under the stage as a line of text (.chip-under). */
@media (max-width: 479.98px) {
  .stage > .hud.tl, .g3-stage > .tag.l { left: auto; right: calc(50% + 2px); top: 2px; }
  .stage > .hud.tr, .g3-stage > .tag.r { right: auto; left: calc(50% + 2px); top: 2px; }
}
.chip-under { position: static !important; display: block; margin: 0; padding: 4px 8px 5px; text-align: center; font: 400 10px Silkscreen, ui-monospace, monospace; letter-spacing: 1px;
  color: var(--accent); background: var(--board); border: 0; border-bottom: 1px solid var(--line); white-space: normal; overflow-wrap: anywhere; }      /* (a long status wraps - it is never cut) */
/* directly under the stage: the older court pages lay their blocks out with a gap and bleed the stage to the screen's edges */
.g3m .wrap.page > .chip-under { margin: -12px -16px 0; }
body.padel .wrap.page > .chip-under { margin-top: -16px; }

/* RELEASE-01 3.2 (Z3): tap targets on the phone - the hit area is at least 44 px high, the drawing stays as it was */
@media (max-width: 720px) {
  .site-foot nav { gap: 0 4px; }
  .site-foot nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 6px; }   /* (PLAY-01: «X» is one letter - 44 px wide all the same) */
  .brand { min-height: 44px; }
  body.padel .sound-btn { width: 44px; height: 44px; bottom: 4px; right: 4px; }      /* as on the Mystery and Rally pages */
  .out nav { gap: 0 8px; } .out nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; }
  .pp-career th > a:only-child { display: inline-flex; align-items: center; min-height: 44px; }      /* a row whose label is the link (ATP Finals, Davis Cup) */
  a.tap { display: inline-flex; align-items: center; min-height: 44px; }      /* a link that stands alone on its line */
}

/* RELEASE-01 3.2: a court page of the older shell on the desktop when the day's free matches are used up. The lock
   panel stands above the grid; the one-screen frame would then cut the cards under the court, so in this state the
   page is as tall as its content and scrolls. */
@media (min-width: 1024px) and (min-height: 600px) {
  body.g3m:has(#lock-panel), body.padel:has(#lock-panel) { height: auto; min-height: 100vh; }
}

/* (FIX-01 Block 5: the sprite web/assets/g3/flags.png is 8 x 7 cells - the 48 nations, the tournaments' three badges, five
   black cells - so its sizes above are 288 x 168 and 192 x 112) */
/* (ENCY-05: 8 x 9 cells - 62 nations, the three badges, seven black cells - so the sizes are 288 x 216 and 192 x 144; the
   cells follow flags.json `order`, alphabetical: tools/ency.py flags() names them, nothing else does) */
/* FIX-01 Block 2: the encyclopedia - the breadcrumb starts with Encyclopedia («‹ ENCYCLOPEDIA · THE PLAYERS»); a
   tournament's reigning champions, first above its records (a flag at the lists' size, the name, the year); the line
   «2026: Alcaraz · Rybakina» under a tournament's name in the index, on a wide window; «(to 9 Nov 2026)» after a number */
.pp-crumb a + a::before { content: '·'; margin: 0 8px; }
.tp-holders .pp-flag { width: 24px; height: 16px; background-position: calc(var(--fx) * -24px) calc(var(--fy) * -16px); background-size: 192px 144px; box-shadow: 0 0 0 1px var(--line-2); vertical-align: -2px; margin-right: 4px; }
.tp-holders .tp-year { color: var(--muted); margin-left: 4px; }
.pp-asof { color: var(--muted); font-size: 13px; white-space: nowrap; }
.tp-hold { display: none; }
@media (min-width: 721px) {
  .tp-list li:has(.tp-hold) > a { border-bottom: 0; }
  .tp-hold { display: block; margin: -6px 0 0; padding: 0 2px 8px 52px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
  .tp-list .tp-hold a { display: inline; min-height: 0; padding: 0; border: 0; background: none; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
  .tp-list .tp-hold a:hover { background: none; color: var(--accent-2); }
}

/* FIX-02 Block 3 (the founder's addition, 17 Nov): Unlimited in gold - the card a player with Unlimited sees first on
   unlimited.html, «Extend» over the buy buttons, the return from checkout with confetti */
.unl-card { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border: 2px solid #E8B931; background: linear-gradient(180deg, rgba(232, 185, 49, .18), rgba(232, 185, 49, .05)); }
.unl-card .unl-k { font: 400 11px var(--led); letter-spacing: 2px; color: #E8B931; }
.unl-card h2 { margin: 0; font: 700 26px/1.15 var(--head); color: #F5D46A; }
.unl-gives { margin: 0; padding-left: 20px; color: var(--ink); font-size: 16px; line-height: 1.5; }
.unl-ump { margin: 4px 0 0; font: 600 16px var(--head); color: var(--ink); } .unl-ump .who { font: 400 10px var(--led); letter-spacing: 2px; color: #E8B931; margin-right: 6px; }
.unl-extend { margin: 0; font: 600 15px var(--head); color: #F5D46A; }
.unl-card.celebrate { animation: unl-pop .7s ease-out; }
@keyframes unl-pop { 0% { transform: scale(.94); box-shadow: 0 0 0 0 rgba(232, 185, 49, .7); } 60% { transform: scale(1.02); box-shadow: 0 0 0 14px rgba(232, 185, 49, 0); } 100% { transform: none; } }
.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 60; }
.confetti i { position: absolute; top: -14px; width: 8px; height: 12px; animation-name: conf-fall; animation-timing-function: cubic-bezier(.3, .6, .6, 1); animation-fill-mode: forwards; }
@keyframes conf-fall { to { transform: translate(var(--dx), 108vh) rotate(var(--r)); } }
@media (prefers-reduced-motion: reduce) { .unl-card.celebrate { animation: none; } }

/* PLAY-03 Block 4: the tennis Mystery board has nine columns - «M/W» first (narrow), then the eight clues; the board
   still scrolls sideways inside its own box on a phone, the page never does (web/js/track.js TENNIS_BOARD) */
.gtable.mw .grow { grid-template-columns: minmax(0, 2.2fr) minmax(0, .8fr) repeat(8, minmax(0, 1fr)); }
@media (max-width: 720px) {
  .gtable.mw { min-width: 600px; }
  .gtable.mw .grow { grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr) repeat(8, minmax(0, 1fr)); }
}
@media (min-width: 1024px) and (min-height: 600px) {
  body.g3m .col-main .gtable.mw .grow:not(.rally-row) { grid-template-columns: minmax(0, 2.5fr) minmax(0, .8fr) repeat(8, minmax(0, 1fr)); }
}
