/* r29: the light redesign (approved 27 Nov 2026). Loaded last, so it sets the shared grid, type scale and buttons for every page.
   Tokens live in /src/shared/tokens.css (ground #F6F8F5, white cards, ink #14201A, baize #0E6B43 as the only accent; dark mode is
   the same tokens in dark values). One grid: 20 px gutter, 24 px between sections, 16 px between cards, 20 px card padding.
   Type: Plus Jakarta Sans, sentence case, left aligned; 32/24/20/17/15/14, nothing under 14. Main buttons 56 px, the rest 48 px. */
:root {
  --top-h: 64px;
  --nav-h: 76px;
  --gut-l: max(20px, env(safe-area-inset-left, 0px));
  --gut-r: max(20px, env(safe-area-inset-right, 0px));
  --sec-gap: 24px;
  --card-gap: 16px;
  --card-pad: 20px;
}
body { font-size: 17px; line-height: 26px; font-weight: 400; text-align: left; }
h1, h2, h3 { font-family: var(--font-ui); letter-spacing: 0; text-wrap: pretty; text-align: left; }
h1 { font-size: 32px; line-height: 38px; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 24px; line-height: 30px; font-weight: 700; }
h3 { font-size: 20px; line-height: 26px; font-weight: 700; }
.pageTitle { font-size: 32px; line-height: 38px; font-weight: 800; letter-spacing: -0.02em; }
.secHead h2 { font-size: 24px; line-height: 30px; font-weight: 700; }
.secHead a { font-size: 15px; font-weight: 700; color: var(--brand-text); text-decoration: underline; text-underline-offset: 3px; }
.eyebrow { font: 700 14px/20px var(--font-ui); letter-spacing: 0; text-transform: none; color: var(--brand-text); }
.eyebrow.gold, .eyebrow.dim { color: var(--brand-text); }
.small, .tiny { font-size: 14px; line-height: 20px; }
.muted, .faint, .fine { color: var(--text-2); }
.view { gap: var(--sec-gap); }
#view { padding-top: 20px; }
.stack { gap: var(--card-gap); }

/* cards */
.card { background: var(--surface); border-radius: 16px; padding: var(--card-pad); box-shadow: var(--shadow); border: 1px solid var(--line); }
.card + .card { margin-top: 0; }

/* buttons */
.btn { min-height: 56px; padding: 0 24px; border-radius: 14px; font: 700 18px/24px var(--font-ui); background: var(--brand); color: var(--on-brand); text-decoration: none; }
.btn:hover { background: var(--brand-hi); }
.btn.ghost, .btn.white, .btn.ivory, .btn.secondary { background: var(--surface); color: var(--brand-text); box-shadow: inset 0 0 0 2px var(--brand); }
.btn.ghost:hover, .btn.white:hover, .btn.ivory:hover { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); }
.btn.gold { background: var(--brand); color: var(--on-brand); }
.btn.sm { min-height: 48px; font-size: 17px; padding: 0 18px; border-radius: 12px; }
.btn.danger { color: var(--danger); background: var(--surface); }
.linkbtn, .quiet a, a.alt { color: var(--brand-text); text-decoration: underline; text-underline-offset: 3px; min-height: 48px; display: inline-flex; align-items: center; font-weight: 700; }
.input { min-height: 56px; border-radius: 12px; font-size: 17px; border: 2px solid var(--line-2); background: var(--surface); }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }

/* top bar and navigation: Home / Play / Training / Community */
.wm-name { font: 800 22px/1 var(--font-ui); letter-spacing: -0.01em; }
.topnav a { min-height: 48px; font-size: 17px; font-weight: 700; border-radius: 12px; }
.topnav a[aria-current="page"] { color: var(--brand-text); box-shadow: inset 0 -3px 0 var(--brand); }
.topBtn { height: 48px; min-width: 48px; font-size: 15px; }
.me-btn { width: 48px; height: 48px; }
.tabbar { background: var(--nav-bg); border-top: 1px solid var(--line); }
.tabbar-in { height: var(--nav-h); }
.tabbar a { min-height: 56px; font-size: 14px; line-height: 20px; font-weight: 700; gap: 2px; }
.tabbar a i { width: 64px; height: 34px; }
.tabbar a svg { width: 26px; height: 26px; }

/* the Home hero: "What's your snooker level?" */
.stHero { background: var(--surface); color: var(--text); padding: var(--card-pad); gap: 12px; }
.stHero .stHeroEye { color: var(--brand-text); }
.stHeroH, .card h2.stHeroH { font: 800 32px/38px var(--font-ui); letter-spacing: -0.02em; color: var(--text); text-wrap: pretty; }
.stHeroP { font: 700 17px/26px var(--font-ui); color: var(--text); }
.stHeroSub { font: 400 17px/26px var(--font-ui); color: var(--text-2); }
.stHeroGo { margin-top: 8px; min-height: 56px; font-size: 18px; background: var(--brand); color: var(--on-brand); }
.stHeroGo:hover { background: var(--brand-hi); }
.stHeroImg { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; margin-top: 8px; background: var(--brand-soft); }
@media (min-width: 900px) {
  .stHero.first { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); column-gap: 32px; align-items: center; padding: 32px; }
  .stHero.first > :not(.stHeroImg) { grid-column: 1; }
  .stHero.first .stHeroImg { grid-column: 2; grid-row: 1 / span 6; margin: 0; aspect-ratio: 4 / 3; }
}

/* the story shots: real thumbnails, titles and live counts, as white cards */
.vShelf { display: flex; flex-direction: column; gap: var(--card-gap); }
.vHead { font-size: 24px; line-height: 30px; font-weight: 700; }
.vGrid { grid-template-columns: minmax(0, 1fr); gap: var(--card-gap); }
@media (min-width: 640px) { .vGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .vGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.vCard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 0 0 var(--card-pad); gap: 8px; overflow: hidden; }
.vCard .vThumb { border-radius: 0; aspect-ratio: 16 / 9; }
.vCard .vBody { display: flex; flex-direction: column; gap: 4px; padding: 12px var(--card-pad) 0; }
.vCard b { font: 700 20px/26px var(--font-ui); text-transform: none; }
.vCard .vStat { font: 500 15px/22px var(--font-ui); color: var(--text-2); min-height: 22px; }
.vCard .vPlay { display: flex; align-items: center; justify-content: center; min-height: 48px; margin: 8px var(--card-pad) 0; border-radius: 12px; box-shadow: inset 0 0 0 2px var(--brand); color: var(--brand-text); font: 700 17px/24px var(--font-ui); background: var(--surface); }
.vCard:hover .vPlay { background: var(--brand-soft); }
.vHero { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.vhPic { background: var(--brand-soft); }
.vhBody { padding: var(--card-pad); }
.vhEyebrow { font: 700 14px/20px var(--font-ui); color: var(--brand-text); }
.vHero h1 { font: 800 32px/38px var(--font-ui); letter-spacing: -0.02em; }
.vHero h1 span { color: var(--brand-text); }
.vhFrom { font-size: 15px; line-height: 22px; color: var(--text-2); }
.vhStat { text-align: left; font-size: 15px; line-height: 22px; color: var(--text-2); }
.vhCta .btn, .vhCta .btn.ivory { background: var(--brand); color: var(--on-brand); box-shadow: none; }
.vhCta .btn:hover { background: var(--brand-hi); }
.appsSoon { font-size: 15px; line-height: 22px; color: var(--text-2); }
.homeHero { background: var(--brand-soft); color: var(--text); }
/* 2 Dec 2026: the hero is light now, so its lines use the light text colours (they were still ivory for the old dark band: faint) */
.homeHero .heroTxt .lead, .homeHero .weekTxt { color: var(--text-2); }
.homeHero .weekTxt b, .homeHero .heroCta .alt { color: var(--text); }
.homeHero .heroCta .alt { text-decoration-color: var(--line-3); }
.homeHero .weekRow { border-top-color: var(--line); }

/* the Snooker Card */
.stPage { gap: var(--card-gap); max-width: 560px; }
.stH, .card h1.stH { font: 800 32px/38px var(--font-ui); letter-spacing: -0.02em; }
.stH2, .card h2.stH2 { font: 700 24px/30px var(--font-ui); letter-spacing: 0; }
.stSub { font-size: 17px; line-height: 26px; }
.stLevel { background: var(--surface); color: var(--text); padding: var(--card-pad); gap: 4px; }
.stLevel .stEyebrow, .stLevel .stTouchLab { color: var(--brand-text); }
.stLvLab { font-size: 17px; color: var(--text-2); }
.stLv, .card h1.stLv { font: 800 56px/60px var(--font-ui); letter-spacing: -0.03em; color: var(--brand-text); }
.stNote { font-size: 15px; line-height: 22px; color: var(--text-2); }
.stEarly { background: var(--brand-soft); color: var(--brand-text); letter-spacing: 0; }
.stTouch { border-color: var(--line-2); }
.stTouchName, .stTouchVal { color: var(--text); }
.stTouch small { color: var(--text-2); }
.stLgPhoto { box-shadow: 0 0 0 3px var(--brand-soft); }
.stLgLab { font: 500 15px/22px var(--font-ui); color: var(--text-2); }
.stLgName, .card h2.stLgName { font: 800 24px/30px var(--font-ui); }
.stLgNick { font-size: 15px; color: var(--text-2); }
.stTrLab { font: 700 15px/22px var(--font-ui); color: var(--text); }
.stTrName { font-size: 17px; font-weight: 700; }
.stTrRow i { background: var(--brand); }
.stTrRow i.them { background: var(--text-2); }
.stBarTop > b { font-size: 17px; }
.stBarVal > b { font: 800 24px/1 var(--font-ui); }
.stBar { background: var(--brand-soft); }
.stBarRow.early .stBar i { background: repeating-linear-gradient(135deg, var(--brand) 0 6px, transparent 6px 11px); box-shadow: inset 0 0 0 2px var(--brand); }
.stEarlyTag { background: var(--brand-soft); color: var(--brand-text); font: 700 14px/20px var(--font-ui); height: 24px; }
.stInsights { border-left: 0; }
.stIns { font-size: 17px; line-height: 26px; font-weight: 700; }
.stLeaks { border: 1px solid var(--line); background: var(--surface); }
.stLeakN { background: var(--brand-soft); color: var(--brand-text); }
.stLeakP { font-size: 17px; line-height: 26px; }
.stSaid { font-size: 17px; color: var(--text-2); }
.stCmp { border-left: 0; }
.stCta { background: var(--brand-soft); border-color: var(--line-2); }
.stActs { gap: 12px; }
.stActRow .btn { min-height: 56px; }
.stChip { min-height: 48px; font: 700 17px/24px var(--font-ui); }
.stChip.on { background: var(--brand-soft); color: var(--brand-text); box-shadow: inset 0 0 0 2px var(--brand); }

/* sheets and menus */
.stSheetBox, .sheet { border-radius: 20px; }

/* equal columns whatever the language (the longer label wraps instead of widening its column) */
.stSaveBtns, .stActRow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stSaveBtn, .stActRow .btn { min-height: 56px; height: auto; padding: 8px 12px; line-height: 22px; text-align: center; overflow-wrap: anywhere; }

/* one gutter: section headings sit exactly on the 20 px edge; <small> is never under 14 px */
.vHead { margin: 8px 0 0; font: 700 24px/30px var(--font-ui); letter-spacing: 0; }
small, .tiny { font-size: 14px; }
.vShelf { margin-top: 0; }
.vShelf .vHead { margin: 0; }

/* left aligned everywhere: small print and the footer links start on the gutter */
#view .fine, #view .quiet, .appsSoon, .stFine, .foot, .siteFoot, footer { text-align: left; }
footer nav, .siteFoot nav, .foot nav { justify-content: flex-start; }
.planFoot, .saveFoot, .sfFoot, p.appsSoon.quiet { text-align: left; }
.saveFoot { align-items: flex-start; }
.quietRow { align-items: flex-start; }

/* r29 fix: the hero image keeps its own 16:9 shape (it was stretched into a tall box, showing only green) */
.stHero .stHeroImg, img.stHeroImg { display: block; width: 100%; height: auto !important; aspect-ratio: 16 / 9; object-fit: cover; object-position: center 40%; border-radius: 16px; }

/* r29a: the Early read chip stays on one line beside the score; a long area name wraps instead */
.stBarVal { flex: none; white-space: nowrap; }
.stBarVal .stEarlyTag, .stEarlyTag { white-space: nowrap; flex: none; }
.stBarName { min-width: 0; flex: 1 1 auto; }

/* SEO 28 Nov: the pre-JS shell on Home (crawlable; the app replaces it on load) */
.seoShell { max-width: 720px; margin: 0 auto; padding: 24px 20px; color: var(--ink, #14201A); }
.seoShell h1 { font-size: 32px; margin: 0 0 12px; }
.seoShell h2 { font-size: 20px; margin: 24px 0 8px; }
.seoShell ul { padding-left: 20px; line-height: 1.7; }

/* Planner 29 Nov: with a plan, "See my card" is the outline button and "Continue my plan" the filled one */
.stHeroGo.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-3); }
.stHeroGo.ghost:hover { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-2); }
.stHeroPlan.stHeroFill { min-height: 56px; font-size: 18px; background: var(--brand); color: var(--on-brand); box-shadow: none; }
.stHeroPlan.stHeroFill:hover { background: var(--brand-hi); }

/* the sign-in screens: how email works, under "Email instead" (30 Nov 2026) */
.save .formNote { margin: 0; font: 500 15px/22px var(--font-ui); color: var(--text-2); }

/* build 15 (B6): "Your snooker card", the way back to the story cards (Home, Training, Account, the summary): the cover thumbnail
   (slide 1's baize green and its giant level word) and the level line */
.scEntrySlot[hidden] { display: none; }
.scEntry { display: flex; align-items: center; gap: 14px; padding: 12px 14px; min-height: 92px; text-decoration: none; color: var(--text); }
.scThumb { flex: none; position: relative; display: flex; align-items: flex-end; width: 84px; height: 104px; padding: 0 7px 9px; border-radius: 10px; background: #0E6B43; color: #fff; overflow: hidden; box-shadow: 0 6px 16px rgba(8, 40, 25, .25); text-decoration: none; }
.scThumb .scThumbBar { position: absolute; left: 6px; right: 6px; top: 6px; height: 2px; border-radius: 1px; background: rgba(255, 255, 255, .55); }
.scThumb b { font: 800 16px/1 var(--font-ui); letter-spacing: -0.04em; white-space: nowrap; }
.scThumb b.long { font-size: 13px; }
.scTx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.scEye { font: 700 13px/18px var(--font-ui); color: var(--brand-text); }
.scLv { font: 800 18px/24px var(--font-ui); letter-spacing: -0.01em; }
.scGo { font: 500 14px/20px var(--font-ui); color: var(--text-2); }
.scChev { flex: none; width: 22px; height: 22px; color: var(--text-2); }
.scChev svg { width: 100%; height: 100%; display: block; }
.stHeroHave { position: relative; }
.stHeroHave .scThumb.hero { position: absolute; right: var(--card-pad, 16px); top: var(--card-pad, 16px); }
.stHeroHave .stHeroEye, .stHeroHave .stHeroLv, .stHeroHave .stHeroLike, .stHeroHave > .stHeroSub { padding-right: 96px; }

/* b15c (1 Dec 2026, C9): the "Live frames" card on Play. r29 turned --baize-deep into the soft green band (light) and --on-baize into
   dark ink, but the card kept the old dark-band cream (#F4F0E6) text and the old #0E6B43 eyebrow: cream on pale green, "faint pink on white".
   Same fault on the Snooker Card tiles (.welCard) and the "so far" step card (.sfStep1). They read the theme's text tokens now
   (light: dark ink; dark: pale ink), the same in the web view and the app view (html[data-app]). */
.onlineCard { color: var(--text); }
.onlineCard h2 { color: var(--text); }
.onlineCard .olEyebrow, .onlineCard .olTotal, .onlineCard .olWait { color: var(--brand-text); }
.onlineCard .olLead, .onlineCard .olNote { color: var(--text-2); }
.onlineCard .olFriend { color: var(--text); }
.welCard { color: var(--text); }
.welCard .welKicker, .welCard .welSmall { color: var(--text-2); }
.sfStep1 { color: var(--text); }
.sfStep1 .sfKicker, .sfStep1 p { color: var(--text-2); }
