/* Hub UI v2: the bolder look for the menus (owner approved the look, 22 Nov). Loaded after styles.css and board.css.
   Only restyles the header, the top menu, the phone tab bar and the More sheet. No page text, links or scripts change.
   Uses the tokens from styles.css (--hero-grad, --violet-2, --sky, --tile-*). Not loaded on race.html / golf.html yet (B2). */

/* Header: a thin colour line under it, and a roomier logo. */
header.top { border-bottom: 0; box-shadow: 0 1px 0 var(--line); }
header.top::after { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--violet), var(--violet-2) 45%, var(--sky)); }
.brand-name { font-weight: 900; }

/* Top menu (computers and tablets): pill tabs, the current one filled with the brand gradient. */
.tabs a, .tabs .dd > summary { font-weight: 700; }
.tabs a:hover, .tabs .dd > summary:hover, .tabs .dd[open] > summary { color: var(--ink); background: color-mix(in srgb, var(--violet) 10%, var(--surface)); }
.tabs a[aria-current="page"], .tabs .dd.on > summary { color: #fff; background: linear-gradient(135deg, #1F5AE6, var(--violet-2)); box-shadow: 0 6px 16px -8px var(--violet); }
.tabs .dd-menu { border-radius: 20px; border-color: color-mix(in srgb, var(--violet) 22%, var(--line)); box-shadow: 0 24px 48px -20px rgba(31, 90, 230, .45); }
.tabs .dd-menu a:hover { background: color-mix(in srgb, var(--violet) 10%, var(--surface)); }
.tabs .dd-menu a[aria-current="page"] { color: var(--violet); background: color-mix(in srgb, var(--violet) 12%, var(--surface)); }

/* Play free: the bright mint button; Connect wallet stays dark. */
.btn-play-free { background: #3CF2A5; color: #0B2A1E; font-weight: 800; box-shadow: 0 8px 18px -10px #3CF2A5; }
.btn-play-free:hover { filter: brightness(1.04); transform: translateY(-1px); }

/* One break point at 761 px, and no second row in between: the menu stays on one line from 761 px up. */
@media (min-width: 761px) {
  .top-row { flex-wrap: nowrap; gap: 10px; }
  .tabs { order: 0; flex: 1 1 auto; justify-content: flex-end; width: auto; }
  .btn-play-free { margin-left: 0; flex: none; white-space: nowrap; }
  .top-row .btn-wallet { flex: none; white-space: nowrap; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .brand-name { font-size: 1.12rem; }
  .tabs a, .tabs .dd > summary { padding: 9px 9px; font-size: 14.5px; }
  .btn-play-free, .top-row .btn-wallet { padding-left: 12px; padding-right: 12px; font-size: .88rem; }
}

/* Phone tab bar: dark, rounded on top, the current tab a gradient pill. */
@media (max-width: 760px) {
  .top-row .btn-wallet { white-space: nowrap; padding-left: 12px; padding-right: 12px; font-size: .86rem; }
  .top-row { gap: 8px; }
  .brand-name { font-size: 1.08rem; }
  .brand-mark { display: none; }
  .top-row .btn-play-free, .top-row .btn-wallet { padding-left: 11px; padding-right: 11px; font-size: .84rem; }
  .tabbar { background: #14161F; border-radius: 22px 22px 0 0; box-shadow: 0 -10px 30px -12px rgba(20, 22, 31, .55); }
  .tabbar a, .tabbar button { border-radius: 16px; font-weight: 700; }
  .tabbar a[aria-current="page"], .tabbar .tb-more.on, .tabbar .tb-more[aria-expanded="true"] { color: #fff; background: linear-gradient(135deg, #1F5AE6, var(--violet-2)); }
  .more-panel { border-radius: 26px 26px 0 0; }
  .more-panel .ms-h { color: var(--violet); font-weight: 800; letter-spacing: .06em; }
  .more-panel a { border-radius: 18px; }
  .more-panel a[aria-current="page"] { background: color-mix(in srgb, var(--violet) 12%, var(--surface)); }
}
@media (prefers-reduced-motion: reduce) { .btn-play-free:hover { transform: none; } }

/* ───── Home page (C): gradient hero, "Today" card, colourful game tiles, start sheet ───── */
.home-hero.stage { background:
  linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 28px 28px,
  linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 28px 28px, var(--hero-grad); border-radius: var(--r-xl); }
.home-hero.stage .btn-primary { background: #3CF2A5; color: #0B2A1E; font-weight: 800; box-shadow: 0 12px 24px -12px #3CF2A5; }


.welcome-also .gtile > span { color: #fff; box-shadow: 0 10px 18px -12px rgba(20, 22, 31, .6); }
.gtile:nth-of-type(5n+1) > span { background: var(--tile-blue); }
.gtile:nth-of-type(5n+2) > span { background: var(--tile-violet); }
.gtile:nth-of-type(5n+3) > span { background: var(--tile-mint); }
.gtile:nth-of-type(5n+4) > span { background: var(--tile-sun); }
.gtile:nth-of-type(5n) > span { background: var(--tile-hot); }
/* One icon per game everywhere (D-748): the emoji and its tile colour come from web/games.json ("icon", "accent").
   A game's tile keeps its colour wherever it sits (the position colours above are only for non-game tiles). */
:is(.gtile, .g) > .gi.acc-blue { background: var(--tile-blue); }
:is(.gtile, .g) > .gi.acc-violet { background: var(--tile-violet); }
:is(.gtile, .g) > .gi.acc-mint { background: var(--tile-mint); }
:is(.gtile, .g) > .gi.acc-sun { background: var(--tile-sun); }
:is(.gtile, .g) > .gi.acc-hot { background: var(--tile-hot); }
/* The same emoji in the Games drop-down and the phone More sheet (written by tools/site-nav.mjs). */
.mi { display: inline-grid; place-items: center; width: 24px; height: 24px; font-size: 19px; line-height: 1; }
.dd-menu .mi { width: 22px; margin-right: 8px; vertical-align: -5px; font-size: 17px; }
.welcome-also .gtile { border: 1px solid var(--line); transition: transform .15s ease, box-shadow .15s ease; }
.welcome-also .gtile:hover { box-shadow: 0 18px 30px -20px rgba(31, 90, 230, .55); }
.game-head { font-weight: 900; }

/* Start sheet: opens on tap of the home "Play free" button; a bottom sheet on phones, a centred card on computers. */
.ss-back { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgba(20, 22, 31, .55); animation: ss-fade .16s ease; }
.ss-card { width: min(480px, 100%); box-sizing: border-box; padding: var(--sp-5) var(--sp-5) calc(var(--sp-5) + env(safe-area-inset-bottom, 0px)); border-radius: var(--r-xl) var(--r-xl) 0 0; background: var(--surface); color: var(--ink); box-shadow: 0 -20px 50px -20px rgba(20, 22, 31, .6); animation: ss-up .2s ease; }
.ss-card h2 { margin: 0 0 var(--sp-2); font: 900 1.5rem/1.15 var(--display); }
.ss-card p { margin: 0 0 var(--sp-4); color: var(--muted); }
.ss-card .ss-go, .ss-card .ss-wallet, .ss-card .ss-close { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; margin-top: var(--sp-2); border-radius: 16px; font: 800 1rem/1 var(--body); text-decoration: none; cursor: pointer; border: 0; }
.ss-card .ss-go { background: #3CF2A5; color: #0B2A1E; }
.ss-card .ss-wallet { background: #14161F; color: #fff; }
.ss-card .ss-close { background: transparent; color: var(--muted); font-weight: 700; }
@media (min-width: 761px) { .ss-back { align-items: center; } .ss-card { border-radius: var(--r-xl); } }
@keyframes ss-up { from { transform: translateY(24px); opacity: .5; } }
@keyframes ss-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ss-back, .ss-card { animation: none !important; } .welcome-also .gtile { transition: none; } }

/* Very small phones (320 px): the wallet button was 27 px too wide; tighter gaps and type so the top bar fits. */
@media (max-width: 340px) {
  .top-row { gap: 6px; }
  .top-row .btn-play-free, .top-row .btn-wallet { padding-left: 7px; padding-right: 7px; font-size: .78rem; }
  .top-row .hw-wrap { min-width: 0; }
}

/* Home: "How it works" strip (3 steps and one line per section; Marketing M-509). */
.how-strip { margin: var(--sp-5, 24px) 0; padding: var(--sp-4, 16px); background: var(--surface, #fff); border: 1px solid var(--line, #E2E4EA); border-radius: 18px; }
.how-strip h2 { margin: 0 0 var(--sp-3, 12px); font-size: 1.15rem; }
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.how-steps li { display: flex; gap: 10px; align-items: flex-start; font-size: .98rem; line-height: 1.4; }
.how-steps li > span { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: #fff; background: linear-gradient(135deg, #1F5AE6, var(--violet-2, #6B3DFF)); }
.how-steps a { font-weight: 700; white-space: nowrap; }
.how-links { list-style: none; margin: var(--sp-4, 16px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.how-links a { display: block; height: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--line, #E2E4EA); border-radius: 12px; color: inherit; text-decoration: none; }
.how-links a:hover, .how-links a:focus-visible { border-color: var(--violet, #6B3DFF); }
.how-links b { display: block; font-size: .95rem; }
.how-links span { display: block; margin-top: 2px; font-size: .85rem; color: var(--muted, #5B6070); line-height: 1.3; }
@media (max-width: 400px) { .how-strip { padding: 12px; } .how-steps a { white-space: normal; } }

/* Leaderboards and Results: a game with no board or results yet is greyed, still tappable (it says so and links to its page). */
.lb-games button.soon { opacity: .6; border-style: dashed; }
.lb-games button.soon[aria-pressed="true"] { opacity: 1; }

/* Leaderboards and Results: the game chips wrap to rows instead of running off the edge (phone, desktop, light and dark). */
.lb-games { flex-wrap: wrap; overflow: visible; row-gap: 8px; }
.lb-games button { flex: 0 1 auto; max-width: 100%; min-height: 44px; white-space: normal; text-align: center; }

/* Results and Leaderboards pickers: the game's games.json icon before its name (Speed, D-748). */
.lb-games button .mi { width: 20px; height: 20px; margin-right: 6px; vertical-align: -4px; font-size: 16px; }
/* ── Icon badge, one look everywhere (D-871): the emoji in a rounded badge in the game's colour, with a light inner ring
   and a soft shadow so it reads in light and dark. Sizes: Home tiles 58, All games cards 52, More sheet 36, drop-down 24. ── */
.gi { display: inline-grid; place-items: center; flex: none; line-height: 1; color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35), inset 0 -10px 16px -8px rgba(0, 0, 0, .18), 0 10px 18px -10px rgba(20, 22, 31, .55); }

.gtile > .gi { width: 58px; height: 58px; border-radius: 17px; font-size: 34px; }
.welcome-also .gtile > .gi { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35), inset 0 -10px 16px -8px rgba(0, 0, 0, .18), 0 10px 18px -10px rgba(20, 22, 31, .55); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.gi, .welcome-also .gtile > .gi) { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .28), 0 0 0 1px rgba(255, 255, 255, .08), 0 10px 18px -10px #000; } }
:root[data-theme="dark"] :is(.gi, .welcome-also .gtile > .gi) { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .28), 0 0 0 1px rgba(255, 255, 255, .08), 0 10px 18px -10px #000; }
.g > .g-ic.gi { width: 52px; height: 52px; border-radius: 15px; font-size: 30px; }
.more-panel .mi.gi { width: 36px; height: 36px; border-radius: 11px; font-size: 21px; }
.dd-menu .mi.gi { width: 24px; height: 24px; border-radius: 7px; font-size: 14px; margin-right: 10px; vertical-align: -6px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
:is(.more-panel, .dd-menu) .mi.gi.acc-blue { background: var(--tile-blue); }
:is(.more-panel, .dd-menu) .mi.gi.acc-violet { background: var(--tile-violet); }
:is(.more-panel, .dd-menu) .mi.gi.acc-mint { background: var(--tile-mint); }
:is(.more-panel, .dd-menu) .mi.gi.acc-sun { background: var(--tile-sun); }
:is(.more-panel, .dd-menu) .mi.gi.acc-hot { background: var(--tile-hot); }
/* Quick Call on Home (UI Hub, M-889 item 3), moved from quick-call.css (D-1011): one stylesheet fewer that blocks the first paint. */
.qc { margin: var(--sp-5, 24px) 0; padding: var(--sp-4, 16px); background: var(--surface, #fff); border: 1px solid var(--line, #E2E4EA); border-radius: 18px; }
.qc h2 { margin: 0 0 4px; font-size: 1.25rem; }
.qc .qc-tag { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; vertical-align: middle; background: var(--violet-soft, #E3EFE7); color: var(--ink, #22302B); }
.qc p { margin: 4px 0; line-height: 1.4; }
.qc-picks { display: grid; gap: 8px; margin-top: 12px; min-height: 196px; align-content: start; }
.qc-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 60px; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--line, #E2E4EA); background: var(--paper, #F4F5FB); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.qc-pick b { font-size: 1.02rem; overflow-wrap: anywhere; }
.qc-pick span { font-size: .85rem; color: var(--muted, #5E6B63); }
.qc-pick.on { border-color: #1F5AE6; }
.qc-pick:disabled { cursor: default; }
.qc-pick:disabled:not(.on) { opacity: .55; }
.qc-out { min-height: 200px; margin-top: 10px; }
@media (max-width: 400px) { .qc-out { min-height: 270px; } }   /* holds the result at 320 px (Repo Lens 3, R3-53) */
.qc-win { font-weight: 900; font-size: 1.2rem; color: #137a4b; }   /* 5.37:1 on the light card */
/* Dark card (#1B1C22): mint #5CCB9A is 8.47:1 (Repo Lens 3 fix A, R3-53: #137a4b was 3.17:1). */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .qc-win { color: #5CCB9A; } }
:root[data-theme="dark"] .qc-win { color: #5CCB9A; }
.qc-miss { font-weight: 800; font-size: 1.1rem; }
.qc-err { color: var(--rose, #B4432F); }
.qc-bar { height: 6px; margin-top: 8px; border-radius: 999px; background: linear-gradient(90deg, #1F5AE6 0 30%, var(--line, #E2E4EA) 30%); background-size: 200% 100%; animation: qc-run 1.2s linear infinite; }
@keyframes qc-run { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .qc-bar { animation: none; } }
.qc-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.qc-row .btn { min-height: 48px; }
.how-gloss { margin: 10px 0 0; font-size: .85rem; color: var(--muted, #5E6B63); }

/* ── D-1081 page polish kit (UI Hub, Tue 1 Dec 2026): claude/uihub/POLISH-PATTERNS-2026-12-02.md ──
   Six shared pieces so every game page looks the same. Style only. Prefix kg-. */
/* 1. card: one box per idea */
.kg-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg, 20px); padding: 16px; box-shadow: var(--shadow); margin: 0 0 14px; min-width: 0; }
.kg-card > h2, .kg-card > h3 { font-size: 1.05rem; margin: 0 0 8px; }
.kg-card > p { margin: 6px 0; }
@media (min-width: 760px) { .kg-card { padding: 20px; } }
/* 2. your move: one sentence + one primary button (full width on phones) */
.kg-next { display: flex; flex-direction: column; gap: 10px; }
.kg-next .kg-next-t { font-size: 1.05rem; font-weight: 700; margin: 0; }
.kg-next .btn { min-height: 48px; width: 100%; justify-content: center; }
@media (min-width: 560px) { .kg-next .btn { width: auto; align-self: flex-start; } }
/* 3. rows: a table on wide screens, stacked rows on phones (td carries data-label) */
.kg-rows { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
.kg-rows th { text-align: left; font-size: .8rem; font-weight: 700; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.kg-rows td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; overflow-wrap: normal; word-break: normal; }
.kg-rows .kg-num { text-align: right; white-space: nowrap; }
@media (max-width: 559px) {
  .kg-rows thead { display: none; }
  .kg-rows, .kg-rows tbody, .kg-rows tr { display: block; width: 100%; }
  .kg-rows tr { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .kg-rows td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0; border: 0; min-width: 0; }
  .kg-rows td:first-child { font-weight: 700; }
  .kg-rows td[data-label]:not(:first-child)::before { content: attr(data-label); color: var(--muted); font-size: .8rem; font-weight: 600; }
  .kg-rows .kg-num { text-align: left; }
}
/* 4. a name or address on ONE line, never broken letter by letter (text from KNames.name(a) || KNames.short(a)) */
.kg-who { display: inline-block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.kg-who.kg-addr, .kg-who .kn-addr { font-family: ui-monospace, Consolas, monospace; font-size: .9em; }
/* 5. "More": everything that isn't this round / your pick / your next step, closed on load */
.kg-more { border-top: 1px solid var(--line); }
.kg-more:last-of-type { border-bottom: 1px solid var(--line); }
.kg-more > summary { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 800; font-size: 16px; color: var(--ink); cursor: pointer; list-style: none; }
.kg-more > summary::-webkit-details-marker { display: none; }
.kg-more > summary::after { content: "›"; font-size: 22px; line-height: 1; color: var(--muted); transition: transform .15s ease; }
.kg-more[open] > summary::after { transform: rotate(90deg); }
.kg-more > :not(summary) { margin-bottom: 14px; max-width: 100%; overflow-x: auto; }
@media (prefers-reduced-motion: reduce) { .kg-more > summary::after { transition: none; } }
/* 6. pick grid: equal-height choice cards + a Select all / None row */
.kg-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.kg-bar .kg-count { margin-left: auto; color: var(--muted); font-size: .9rem; }
.kg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 0; padding: 0; }
@media (min-width: 760px) { .kg-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }
.kg-grid > label { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: var(--r-md, 14px); background: var(--surface); cursor: pointer; min-width: 0; }
.kg-grid > label > input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--violet); }
.kg-grid > label > .kg-who { flex: 1; }
.kg-grid > label:has(input:checked) { border-color: var(--violet); background: var(--violet-soft); }
.kg-grid > label:focus-within { outline: 3px solid var(--violet); outline-offset: 2px; }
/* a short one-line notice (test weeks, switched-off prizes): one sentence, no second line */
.kg-banner { margin: 0 0 12px; padding: 8px 12px; border-radius: var(--r-sm, 10px); background: var(--sun-soft); color: var(--ink); font-size: .92rem; }
/* a thin luck/progress bar, 0–100% from --v */
.kg-meter { display: inline-block; width: 64px; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; vertical-align: middle; }
.kg-meter > i { display: block; height: 100%; width: calc(var(--v, 0) * 1%); background: var(--mint); }

/* ── D-1094/D-1095 card flow (UI Hub, Wed 2 Dec 2026; web/card-flow.js): one card at a time, a progress strip, a calm
   leave/enter, an "All done" screen, and a Send bar that is always in view (pinned at the bottom on a phone). ── */
.kg-flow { position: relative; }
.kg-flow-strip { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; color: var(--muted); font-size: .9rem; }
.kg-flow-dots { display: flex; gap: 4px; flex-wrap: wrap; }
.kg-flow-dots > i { width: 8px; height: 8px; border-radius: 99px; background: var(--line); }
.kg-flow-dots > i.on { background: var(--violet); }
.kg-flow-count { margin-left: auto; white-space: nowrap; }
.kg-flow-stage { position: relative; display: grid; min-height: 200px; }
.kg-flow-card { grid-area: 1 / 1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg, 20px); padding: 20px 16px; box-shadow: var(--shadow); min-width: 0;
  transition: opacity .2s ease, transform .2s ease; }
.kg-flow-card.kg-flow-in { opacity: 0; transform: translateX(24px); }
.kg-flow-card.kg-flow-out { opacity: 0; transform: translateX(-24px); pointer-events: none; }
.kg-flow-card h3 { font-size: 1.15rem; margin: 0 0 8px; }
.kg-flow-card .kg-flow-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.kg-flow-card .kg-flow-choices > .btn { min-height: 56px; font-size: 1.05rem; justify-content: center; }
.kg-flow-done, .kg-flow-full { text-align: center; padding: 18px 4px; }
.kg-flow-note { min-height: 1.3em; margin: 8px 0 0; font-size: .92rem; }
.kg-flow-answers { margin-top: 12px; }
.kg-flow-list { margin: 0; padding-left: 20px; font-size: .92rem; }
.kg-flow-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 14px; }
.kg-flow-bar .btn { min-height: 48px; }
.kg-flow-mana { color: var(--muted); font-size: .85rem; }
.kg-flow-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: .8rem; margin: 0 0 8px; }   /* game length on a card, e.g. "12-hour game · ends 12:30 PM ET" (Daily Card ask) */
.kg-flow-bar-full .btn { box-shadow: 0 0 0 3px var(--violet-soft); }
/* phones: pinned just above the bottom menu (nav.tabbar, 66 px, shown at 760 px and below) */
@media (max-width: 760px) {
  .kg-flow { padding-bottom: 96px; }
  .kg-flow-bar { position: fixed; left: 0; right: 0; bottom: calc(66px + env(safe-area-inset-bottom, 0px)); z-index: 35; margin: 0; padding: 10px 16px;
    background: var(--surface); border-top: 1px solid var(--line); box-shadow: var(--shadow); flex-direction: column; align-items: stretch; }
  .kg-flow-bar .btn { width: 100%; justify-content: center; }
  .kg-flow-mana { text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .kg-flow-card { transition: none; } }

/* One countdown for every game (owner bot review bug 2; web/countdown.js). Site variables only. */
.kg-countdown { display: inline-block; font-size: .9rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.kg-countdown.soon { color: var(--sun-ink, var(--sun)); }   /* RL3 on PR 324: 5.9:1 light, 9.1:1 dark */
.kg-countdown.done { color: var(--muted); font-weight: 400; }

/* ── Pick status (D-742; owner on the card mock, Tue 24 Nov: no counts, no glow). Hub's data sets data-pick on each All
   games card and Home tile; these styles are shared so Home uses the same look. ── */
:is(.g, .gtile)[data-pick="open"] { border: 2px solid var(--acc, var(--violet)); }
.g[data-pick="open"] { padding: 13px; }
:is(.g, .gtile)[data-game] { --acc: var(--violet); }
:is(.g, .gtile):has(> .gi.acc-blue) { --acc: #1F5AE6; }
:is(.g, .gtile):has(> .gi.acc-violet) { --acc: #7B4DFF; }
:is(.g, .gtile):has(> .gi.acc-mint) { --acc: #0E9F6E; }
:is(.g, .gtile):has(> .gi.acc-sun) { --acc: #E0952A; }
:is(.g, .gtile):has(> .gi.acc-hot) { --acc: #F0527A; }
.g-st .chip { font-size: 13px; font-weight: 800; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
[data-pick="open"] .g-st .chip { background: color-mix(in srgb, var(--acc) 14%, var(--surface)); color: color-mix(in srgb, var(--acc) 80%, var(--ink)); }
[data-pick="done"] .g-st .chip { background: var(--mint-soft); color: color-mix(in srgb, var(--mint) 75%, var(--ink)); }
[data-pick="closed"] .g-st .chip { background: var(--line); color: var(--muted); }

/* Rules: the one shared "How rewards work for every game" section above the game tabs (same words for every game). */
.rules-shared { margin: 0 0 28px; }
.rules-shared h2 { margin-bottom: 6px; }
.rules-shared .steps { margin-top: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.rules-link { margin: 6px 0 14px; }

/* Home: space kept for boxes that fill in a moment after the page opens, so the page doesn't jump as they arrive
   (layout shift; UI Hub, M-904 item 6). The space applies only while a box is still empty: once filled it takes its own
   height, and every one of these boxes shows a plain line when there is nothing to list. */
#band:empty { min-height: 120px; }
#open-questions:empty { min-height: 220px; }
#locked-questions:empty { min-height: 96px; }
#ticker:empty { min-height: 132px; }
#results-list:empty { min-height: 240px; }
#lb-weeks:empty, #lb-kind:empty { min-height: 40px; }
#lb-me:empty { min-height: 1.4em; }
@media (max-width: 640px) { #band:empty { min-height: 150px; } #open-questions:empty { min-height: 260px; } }

/* Every page: the main area is at least one screen tall, so the footer starts below the first screen and doesn't jump
   while boxes fill in (layout shift; Speed, layout-jump PR). */
main { min-height: 100vh; min-height: 100svh; }
/* Games page: while the list still shows only "Loading the games…", keep a screen of space for it. */
#g-live:has(> .note:only-child) { min-height: 100vh; min-height: 100svh; }
/* Fantasy on a phone: the five team slots and the "Your move" line keep their space until they fill in. */
@media (max-width: 640px) { #fx-slots:empty { min-height: 380px; } #fx-next:empty { min-height: 76px; } }
/* #68 (site review, 4 Dec): Home game tiles on a phone. The icon sits beside the name, the line under it is kept to
   three lines, and Tonight's card spans the row, so the game list is about a third shorter at 390 px. */
@media (max-width: 480px) {
  #welcome-games { gap: 10px; }
  #welcome-games .gtile { min-height: 0; display: grid; grid-template-columns: 32px 1fr; column-gap: 8px; row-gap: 2px; align-items: center; padding: 10px 12px; }
  #welcome-games .gtile > div { display: contents; }
  #welcome-games .gtile > span[aria-hidden] { width: 32px; height: 32px; font-size: 18px; border-radius: 9px; display: grid; place-items: center; margin: 0; }
  #welcome-games .gtile b { line-height: 1.2; }
  #welcome-games .gtile p { grid-column: 1 / -1; margin: 0; font-size: .875rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  #welcome-games .gtile[data-game="daily-card"] { grid-column: 1 / -1; }
}
/* D-1112 / #72: the small "Share this game" link (web/nav.js). Out of the way: one quiet line, right-aligned, or the
   last item of a page's own links row. */
.share-line { margin: var(--sp-5, 24px) 0 var(--sp-3, 12px); text-align: right; font-size: .875rem; }
.share-line .share-link { display: inline-block; padding: 10px 0; color: var(--muted, #4B4766); }
.share-link { white-space: nowrap; }
.share-note { color: var(--muted, #4B4766); overflow-wrap: anywhere; }
