/* Sparrow Mahjong Parlor — shared styles. Palette & type from the Sparrow Graphic Standards Manual 2026:
   Parlor Cream (base) · Sparrow Red (main action) · Walnut (quiet outlines) · Ink (text, night grounds)
   · Saffron (social, loyalty, highlights) · Moss (status only). Host Grotesk display, Plus Jakarta Sans text. */
:root {
  --cream: #EFE7D6; --sparrow-red: #862626; --walnut: #8A5A3B; --ink-brand: #231F1C; --saffron: #E0A526; --moss-brand: #4F6B4A;
  --bg: var(--cream); --paper: #F7F2E8; --ink: var(--ink-brand); --muted: #6E5A4A; --rule: #D6C3AC;
  --red: var(--sparrow-red); --red-text: var(--sparrow-red); --red-soft: #F0DAD3; --on-red: var(--cream);
  --moss: var(--moss-brand); --moss-soft: #DCE3D3; --on-moss: var(--cream);
  --gold: var(--saffron); --gold-soft: #F5E3B8; --gold-ink: #6E4C08; --on-gold: var(--ink-brand);
  --r: 12px;
  --font-body: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Host Grotesk", "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  color-scheme: light;
}
/* No night mode: every page keeps the same colours whatever the phone's dark/light setting.
   (Only the TV screen opts in to the dark palette below, on purpose.) */
:root[data-theme="dark"] {
  --bg: var(--ink-brand); --paper: #2D2824; --ink: var(--cream); --muted: #B9A690; --rule: #4E3E31;
  --red-text: #E3857B; --red-soft: #4A2522;
  --moss: #7FA277; --moss-soft: #2B3628; --on-moss: #17201A;
  --gold-soft: #47391A; --gold-ink: #F0C860;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--red-text); }
.hidden { display: none !important; }
.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.grow { flex: 1; min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

.eyebrow { font-family: var(--font-body); font-weight: 700; text-transform: uppercase; letter-spacing: .18em; font-size: .72rem; color: var(--muted); }
.mark { font-family: var(--font-display); font-weight: 700; letter-spacing: -.025em; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
h1.mark { font-size: 1.9rem; }
h2.mark { font-size: 1.45rem; }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.topbar .wrap { display: flex; align-items: center; gap: 10px; height: 56px; }
.topbar img { width: 30px; height: 30px; }
.brand { font-family: var(--font-body); font-weight: 700; text-transform: uppercase; letter-spacing: .18em; font-size: .68rem; color: var(--red-text); padding-left: 4px; border-left: 1px solid var(--rule); margin-left: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Horizontal logo (guideline: red mark + ink wordmark on cream; all cream on dark). Drawn from the
   official artwork with CSS masks so the colours follow light/dark mode. */
.logo { display: inline-flex; align-items: center; gap: 7px; flex: none; }
.logo-mark { width: 27px; height: 31px; background: var(--red-text); -webkit-mask: url("img/logo-mark.svg") center / contain no-repeat; mask: url("img/logo-mark.svg") center / contain no-repeat; }
.logo-word { width: 87px; height: 29px; background: var(--ink); -webkit-mask: url("img/logo-wordmark.svg") center / contain no-repeat; mask: url("img/logo-wordmark.svg") center / contain no-repeat; }
:root[data-theme="dark"] .logo-mark { background: var(--cream); }
@media (max-width: 380px) { .logo-word { width: 72px; height: 24px; } }
#meChip { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; display: inline-block; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--paper); border: 1px solid var(--rule); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.chip.red { background: var(--red); color: var(--on-red); border-color: var(--red); }
.chip.moss { background: var(--moss-soft); color: var(--moss); border-color: transparent; }
.chip.gold { background: var(--gold-soft); color: var(--gold-ink); border-color: transparent; }
.chip.ghost { background: transparent; }

/* Cards */
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); padding: 16px; }
.card.tight { padding: 12px; }
.card.red { background: var(--red); color: var(--on-red); border-color: var(--red); }
.card.red .muted { color: color-mix(in srgb, var(--on-red) 75%, transparent); }
.card.notice { background: var(--gold-soft); border-color: transparent; color: var(--gold-ink); }
.section { margin: 18px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; gap: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--rule); background: var(--paper); font-weight: 700; text-decoration: none; color: var(--ink); }
.btn.primary { background: var(--red); border-color: var(--red); color: var(--on-red); }
.btn.saffron { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.btn.moss { background: var(--moss); border-color: var(--moss); color: var(--on-moss); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: .85rem; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible, .pick:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.iconbtn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--rule); background: var(--paper); display: inline-grid; place-items: center; font-size: 1.05rem; }

/* Forms */
label.lbl { display: block; font-weight: 700; font-size: .85rem; margin: 14px 0 6px; }
.input, select.input, textarea.input { width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--rule); background: var(--paper); font-size: 16px; }
textarea.input { min-height: 80px; }
.phone-field { display: flex; align-items: stretch; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); overflow: hidden; }
.phone-field span { display: grid; place-items: center; padding: 0 12px; background: var(--bg); border-right: 1px solid var(--rule); font-weight: 700; }
.phone-field input { border: 0; background: transparent; flex: 1; min-height: 50px; padding: 0 12px; font-size: 18px; letter-spacing: .03em; min-width: 0; }
.phone-field input:focus { outline: none; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; margin-top: 14px; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--red); flex: none; }
.err { color: var(--red-text); font-size: .85rem; min-height: 1.2em; margin: 8px 0 0; }
.code-input { letter-spacing: .5em; text-align: center; font-size: 1.5rem !important; font-weight: 700; }

/* Pick chips */
.picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--rule); background: var(--paper); font-weight: 600; font-size: .9rem; }
.pick.on { background: var(--red); border-color: var(--red); color: var(--on-red); }
.pick.on.walnut { background: var(--walnut); border-color: var(--walnut); color: var(--cream); }
.seg { display: flex; background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; font-weight: 700; font-size: .88rem; color: var(--muted); min-height: 38px; }
.seg button.on { background: var(--red); color: var(--on-red); }

/* Bottom tabs (member app) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--paper); border-top: 1px solid var(--rule); padding-bottom: env(safe-area-inset-bottom); }
.tabbar .wrap { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0 6px; }
.tabbar button { border: 0; background: transparent; padding: 8px 4px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .72rem; font-weight: 700; color: var(--muted); min-height: 56px; }
.tabbar button .ic { font-size: 1.25rem; line-height: 1.2; }
.tabbar button.on { color: var(--red-text); }
.has-tabbar { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }

/* Clock */
.clock { font-family: var(--font-display); font-variant-numeric: tabular-nums; font-size: 2.6rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.clock.over { color: var(--gold); }
.join-code { text-align: right; flex: none; line-height: 1; }
.join-code .eyebrow { color: inherit; opacity: .8; font-size: .62rem; margin-bottom: 4px; }
.join-code b { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: 6px; background: color-mix(in srgb, var(--on-red) 25%, transparent); overflow: hidden; margin-top: 12px; }
.bar > i { display: block; height: 100%; background: var(--on-red); border-radius: 6px; transition: width 1s linear; }

/* Scoreboard */
.players, .hands { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.player .input { min-width: 0; }
.player { display: flex; align-items: center; gap: 12px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); padding: 10px 12px; }
.player.lead { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.wind { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; font-size: 1.15rem; background: var(--bg); border: 1px solid var(--rule); flex: none; font-weight: 700; }
.wind.east { background: var(--red); color: var(--on-red); border-color: var(--red); }
.pname { font-weight: 700; }
.score { font-family: var(--font-display); font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.score.pos { color: var(--moss); }
.score.neg { color: var(--red-text); }
.pill { white-space: nowrap; display: inline-block; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 6px; background: var(--red); color: var(--on-red); margin-left: 6px; vertical-align: 2px; }
.pill.moss { background: var(--moss); color: var(--on-moss); }
.pill.gold { background: var(--gold); color: var(--on-gold); }
.pill.walnut { background: transparent; color: var(--walnut); border: 1px solid var(--walnut); }
.pill.ghost { background: var(--bg); color: var(--muted); border: 1px solid var(--rule); }

/* Hand list */
.hand { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); padding: 10px 12px; font-size: .9rem; }
.hand.pending { border-style: dashed; }
.hand.disputed { border-color: var(--red-text); }
.hand.void { opacity: .55; text-decoration: line-through; }
.hand .fans { color: var(--muted); font-size: .8rem; margin-top: 2px; }

/* Bottom sheet */
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(20, 16, 14, .55); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease-out; }
.sheet { background: var(--bg); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 18px 18px 0 0; padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); animation: up .2s ease-out; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; gap: 10px; }
.sheet-foot { position: sticky; bottom: calc(-24px - env(safe-area-inset-bottom)); background: var(--bg); padding: 12px 0 calc(4px + env(safe-area-inset-bottom)); margin-top: 12px; border-top: 1px solid var(--rule); }
@media (min-width: 640px) { .sheet-bg { align-items: center; } .sheet { border-radius: 18px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: .6; } }

/* Fan checklist */
.fan-group { margin-top: 14px; }
.fan { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); margin-top: 6px; }
.fan.on { border-color: var(--red); background: var(--red-soft); }
.fan.excluded { opacity: .55; }
.fan.excluded .fv { font-weight: 600; font-size: .8rem; }
.fan .fz { font-weight: 700; font-size: 1rem; flex: 0 0 4.3em; width: 4.3em; line-height: 1.2; }   /* fixed column so names line up */
.fan .fz.fz-long { font-size: .8rem; flex-basis: 5.4em; width: 5.4em; }   /* 5+ characters, same column width */
.fan .fv { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fan input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--red); margin: 0; flex: none; }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--rule); background: var(--bg); font-weight: 800; }
.stepper b { min-width: 1.2em; text-align: center; }
.total-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.total-bar .big { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Stamps */
.stamp-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.stamp-slot { aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed var(--walnut); display: grid; place-items: center; font-weight: 800; color: var(--muted); font-size: .9rem; }
.stamp-slot.free { border: 0; background: var(--gold); color: var(--on-gold); font-size: .72rem; letter-spacing: .12em; }
.stamp-slot.gift { border: 2px solid var(--gold); color: var(--gold-ink); font-size: .6rem; letter-spacing: .1em; }
.reward-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--rule); }
.reward-at { width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: var(--on-gold); display: grid; place-items: center; font-weight: 800; font-size: .85rem; flex: none; }
.stamp-grid.sm { gap: 6px; max-width: 340px; }
.stamp-grid.sm .stamp-slot { font-size: .75rem; }
.stamp-grid.sm .stamp-slot.free, .stamp-grid.sm .stamp-slot.gift { font-size: .5rem; letter-spacing: .06em; }
/* A filled slot: the dashed circle and number stay, the stamp is pressed on top like ink (a little see-through, slightly crooked). */
.stamp-slot.on { position: relative; }
.stamp-slot.on::after { content: ""; position: absolute; inset: 12%; background: url("stamp.png") center / contain no-repeat; opacity: .92; transform: rotate(var(--r, -6deg)); pointer-events: none; }
/* once stamped, the dotted circle and number give way to the stamp */
.stamp-slot.on { border-color: transparent; color: transparent; background: #f1e6d0; }
.pkg-hist { margin-top: 12px; }
.pkg-hist > summary { cursor: pointer; font-weight: 700; }
.pkg-old { padding: 10px 0; border-top: 1px solid var(--rule); }
.pkg-old:first-of-type { margin-top: 8px; }
.pkg-old > summary { cursor: pointer; list-style: none; }
.pkg-old > summary::-webkit-details-marker { display: none; }
.pkg-old[open] > summary { margin-bottom: 8px; }

/* Class packages (Intro to Mahjong) */
.pkg + .pkg { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule); }
.pkg-sec { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--rule); }
.pkg-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin: 8px 0 6px; }
.pkg-slot { border: 2px solid var(--gold); border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.pkg-slot b { font-size: 1.05rem; }
.pkg-slot span { font-size: .72rem; color: var(--muted); }
.pkg-slot.used { border: 1.5px dashed var(--rule); opacity: .6; }
.pkg-slot.used b { text-decoration: line-through; }
.pkg-slot.tap { font: inherit; color: inherit; text-align: left; background: var(--gold-soft); cursor: pointer; }
.pkg-slot.tap span { color: var(--gold-ink); font-weight: 700; }
.pkg-slot.tap:active { transform: scale(.97); }
.pkg-exp { text-align: right; flex: none; display: flex; flex-direction: column; gap: 2px; }
.pkg-exp span { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.pkg-exp b { color: var(--gold-ink); font-size: .95rem; }
.pkg-exp.soon b { color: var(--red); }
.pkg-exp.gone b { color: var(--muted); text-decoration: line-through; }
.pkg-log { margin-top: 8px; }
.pkg-log summary { cursor: pointer; color: var(--muted); }

.member-qr { width: 220px; max-width: 70vw; margin: 12px auto; background: #fff; padding: 8px; border-radius: 12px; }
.member-qr svg { display: block; width: 100%; height: auto; }

/* Menu */
.menu-sec { display: flex; align-items: center; gap: 10px; margin: 18px 2px 8px; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--red-text); font-size: .95rem; }
.menu-sec i { flex: 1; height: 2px; background: var(--gold); }
.menu-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.menu-item:last-child { border-bottom: 0; }
.menu-item.out { opacity: .5; }
.price { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Leaderboard */
.lb { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.lb th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 6px 4px; border-bottom: 1px solid var(--rule); }
.lb td { padding: 10px 4px; border-bottom: 1px solid var(--rule); }
.lb td.r, .lb th.r { text-align: right; }
.lb tr.top1 td { font-weight: 800; }
.rank { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--bg); font-weight: 800; font-size: .8rem; }
.rank.r1 { background: var(--gold); color: var(--on-gold); }
.rank.r2 { background: var(--rule); color: var(--ink); }
.rank.r3 { background: var(--walnut); color: var(--cream); }
.countdown { display: flex; gap: 8px; }
.countdown div { flex: 1; text-align: center; background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 8px 4px; }
.countdown b { display: block; font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.countdown span { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* League (member Liga tab) */
.season-hero { background: #14100f; color: #f3ead9; border-radius: 18px; padding: 18px 16px; margin-top: 16px; }
.season-hero h1 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: .01em; font-size: 1.55rem; margin: 0; color: #fff; }
.season-sub { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; opacity: .8; margin-top: 4px; }
.season-live { flex: none; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #5fd47a; background: rgba(95,212,122,.13); border-radius: 99px; padding: 5px 10px; white-space: nowrap; }
.season-cd { background: #33201f; border-radius: 14px; padding: 14px 12px 12px; margin-top: 14px; }
.season-cd .eyebrow { color: #e6c79a; margin: 0 0 8px; }
.season-cd .countdown div { background: #50363a; border-color: transparent; color: #f3ead9; }
.season-cd .countdown span { color: #e6d9cc; }
.season-cd p { margin: 10px 0 0; font-size: .86rem; opacity: .85; }
.league-hero { background: var(--red); color: var(--on-red); border-radius: 18px; padding: 20px 18px; margin-top: 16px; }
.league-hero .eyebrow { color: var(--gold); }
.league-hero h1 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em; font-size: 2.1rem; margin: 6px 0 8px; color: var(--gold); }
.league-hero p { margin: 0; opacity: .92; }
.league-hero .countdown { margin-top: 16px; }
.league-hero .countdown div { background: rgba(239,231,214,.12); border-color: transparent; }
.league-hero .countdown span { color: inherit; opacity: .75; }
.lv + .lv { margin-top: 18px; }
.lv-title { margin: 0 4px 6px; }
.lv-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-bottom: 1px solid var(--rule); }
.lv-row:last-child { border-bottom: 0; }
.lv-row.top { background: var(--gold-soft); border-radius: 10px; border-bottom-color: transparent; }
.lv-row.me .lv-name { font-weight: 800; }
.lv-rank { width: 28px; font-weight: 700; color: var(--muted); flex: none; display: grid; place-items: center; }
.lv-name { flex: 1; min-width: 0; font-size: 1.02rem; }
.lv-score { font-family: var(--font-display); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lv-score small { font-family: var(--font-body); font-weight: 600; color: var(--muted); font-size: .72rem; }
.crown { width: 26px; height: 20px; display: block; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: .9rem; z-index: 90; max-width: calc(100% - 32px); box-shadow: 0 6px 20px rgba(0,0,0,.2); animation: up .2s ease-out; }

/* Tiles (cream like real tiles in both themes) */
.tile { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 30px; height: 40px; border-radius: 5px;
  background: #FBF7EE; border: 1px solid #CDBFA6; box-shadow: 0 2px 0 #B9A88C; color: #231F1C; line-height: 1; font-family: var(--font-body); vertical-align: middle; }
.tile b { font-size: 15px; font-weight: 800; }
.tile i { font-style: normal; font-size: 10px; font-weight: 700; margin-top: 2px; }
.t-m i { color: #B03A2E; } .t-p i { color: #2F5D8A; } .t-s i { color: #3E7A3E; }
.t-h b { font-size: 19px; } .t-C b { color: #B03A2E; } .t-F b { color: #3E7A3E; }
.t-white { width: 14px; height: 20px; border: 2px solid #2F5D8A; border-radius: 3px; display: block; }
.t-fl.t-r b, .t-fl.t-r i { color: #B03A2E; } .t-fl.t-b b, .t-fl.t-b i { color: #2F5D8A; }
.tile.t-sm { width: 26px; height: 35px; } .t-sm b { font-size: 13px; } .t-sm i { font-size: 9px; } .t-h.t-sm b { font-size: 16px; } .t-sm .t-white { width: 12px; height: 17px; }
.tile.t-xs { width: 17px; height: 23px; border-radius: 3px; box-shadow: 0 1px 0 #B9A88C; } .t-xs b { font-size: 9px; } .t-xs i { font-size: 6px; margin-top: 1px; } .t-h.t-xs b { font-size: 11px; } .t-xs .t-white { width: 8px; height: 11px; border-width: 1.5px; }
.tile.t-pic { padding: 2px; } .t-pic svg { width: 100%; height: 100%; display: block; }
.t-bird { width: 78%; height: 78%; display: block; background: #2E6B3F; -webkit-mask: url("img/logo-mark.svg") center / contain no-repeat; mask: url("img/logo-mark.svg") center / contain no-repeat; }
.tile-row { display: inline-flex; flex-wrap: wrap; gap: 2px; vertical-align: middle; }
.tile-picker .tp-hand { display: flex; flex-wrap: wrap; gap: 3px; min-height: 44px; align-items: center; padding: 8px; border: 1px dashed var(--rule); border-radius: 10px; margin-top: 8px; background: var(--paper); }
.tp-pick, .tp-add { border: 0; background: none; padding: 0; line-height: 0; }
.tile-picker .tp-hand { column-gap: 10px; row-gap: 6px; }
.tp-grp { display: inline-flex; gap: 2px; }
.tp-tabs { margin-bottom: 8px; } .tp-tabs button { padding: 5px 2px; line-height: 1.15; white-space: nowrap; }
.tp-tabs .tp-zh { display: block; font-size: 1.05rem; }   /* Chinese on top, small English name under it */
.tp-tabs .tp-en { display: block; font-size: .62rem; font-weight: 600; letter-spacing: .02em; opacity: .85; }
.tp-pal .tile.t-sm { width: 32px; height: 43px; } .tp-pal .t-sm b { font-size: 15px; } .tp-pal .t-sm i { font-size: 10px; }
.tp-pal .t-h.t-sm b { font-size: 19px; } .tp-pal .t-sm .t-white { width: 14px; height: 20px; }
.tp-pal { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; justify-items: center; }
.tp-add:disabled { opacity: .3; }
.tp-msg { margin: 10px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--gold-soft); color: var(--gold-ink); }

.guide-tiles { margin-top: 6px; }
.guide-tiles .tile-row { gap: 1px; }

/* Birthday treat */
.bday { background: var(--paper); border: 1px dashed var(--gold); }
.bday.today { background: var(--gold-soft); border: 2px solid var(--gold); color: var(--gold-ink); }
.bday .pct { font-family: var(--font-display); font-weight: 800; font-size: 2rem; letter-spacing: -.03em; color: var(--red-text); line-height: 1; }
.bday.today .pct { color: var(--gold-ink); }

/* Guide */
.guide h3 { margin: 18px 0 6px; font-size: 1rem; }
.guide table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.guide td { padding: 6px 4px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.guide td:last-child { text-align: right; font-weight: 800; white-space: nowrap; }

/* Winner card */
.winner-card { text-align: center; }
.winner-card img { width: 100%; max-width: 320px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* History card: points pill on the right, status under it */
.hand-grid { display: flex; gap: 10px; align-items: flex-start; }
.hand-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.hand-side .pill { margin-left: 0; vertical-align: 0; }
.pts { display: inline-block; font-weight: 800; font-variant-numeric: tabular-nums; padding: 3px 10px; border-radius: 8px; font-size: .95rem; }
.pts.down { background: var(--red); color: var(--on-red); }
.pts.up { background: var(--red); color: var(--on-red); }   /* same red box for + and − */
.pts.zero { background: var(--bg); color: var(--muted); border: 1px solid var(--rule); }

/* Tile picker: what one tap adds (1 tile / pong / chow) */
.tp-mode { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; }
.tp-mode .pick.sm { padding: 5px 10px; min-height: 32px; font-size: .8rem; }
.tp-add { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: manipulation; }

/* Public pages (home, league, house rules): bigger logo in the header */
:is(.home, .lg, .rules) .topbar .wrap { height: 72px; }
:is(.home, .lg, .rules) .topbar .logo { gap: 9px; }
:is(.home, .lg, .rules) .topbar .logo-mark { width: 40px; height: 46px; }
:is(.home, .lg, .rules) .topbar .logo-word { width: 132px; height: 44px; }
@media (max-width: 380px) { :is(.home, .lg, .rules) .topbar .logo-mark { width: 34px; height: 39px; } :is(.home, .lg, .rules) .topbar .logo-word { width: 108px; height: 36px; } }
/* Public pages: in-page links (See the standings, How it works…) glide instead of jumping; stop below the sticky header. */
html:has(body:is(.home, .lg, .rules)) { scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html:has(body:is(.home, .lg, .rules)) { scroll-behavior: smooth; } }

/* ── Game mode: League / Santai picker, confirm sheet, table banner (play) ── */
.setup-h { font-family: var(--font-display); font-weight: 800; letter-spacing: -.03em; font-size: 1.6rem; line-height: 1.05; margin: 4px 0 0; text-transform: uppercase; }
.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-card { --mc-bg: var(--paper); position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; font: inherit; cursor: pointer;
  padding: 14px 14px 16px; border-radius: 20px; border: 2px solid var(--ink); background: var(--mc-bg); color: var(--ink); min-height: 196px;
  box-shadow: 0 4px 0 var(--ink); transition: transform .18s cubic-bezier(.3,1.6,.5,1), box-shadow .18s, opacity .2s, filter .2s; -webkit-tap-highlight-color: transparent; }
.mode-card:hover { transform: translateY(-2px) rotate(-.6deg); box-shadow: 0 6px 0 var(--ink); }
.mode-card:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.mode-card.league { --mc-bg: #E0A526; color: #231F1C; border-color: #231F1C; box-shadow: 0 4px 0 #231F1C; }
.mode-card.casual { --mc-bg: #4F6B4A; color: #EFE7D6; border-color: #231F1C; box-shadow: 0 4px 0 #231F1C; }
.mode-card .mc-icon { width: 44px; height: 44px; display: block; margin-bottom: 4px; }
.mode-card .mc-icon svg { width: 100%; height: 100%; }
.mode-card.league .mc-icon { animation: mc-wiggle 2.6s ease-in-out infinite; transform-origin: 50% 90%; }
.mode-card .mc-title { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: -.03em; font-size: 1.55rem; line-height: 1; }
.mode-card .mc-sub { font-weight: 700; font-size: .82rem; }
.mode-card .mc-list { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; font-size: .78rem; line-height: 1.3; }
.mode-card .mc-list span { padding-left: 14px; position: relative; }
.mode-card .mc-list span::before { content: ""; position: absolute; left: 1px; top: .45em; width: 7px; height: 7px; border-radius: 50%; border: 1.6px solid currentColor; }
.mode-card .mc-check { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 900;
  background: #231F1C; color: #EFE7D6; transform: scale(0); transition: transform .25s cubic-bezier(.3,1.8,.5,1); }
.mode-card.on .mc-check { transform: scale(1); }
.mode-card.on { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px #231F1C, 0 4px 0 6px #231F1C; }
.mode-card.off { opacity: .45; filter: saturate(.5); transform: scale(.97); box-shadow: 0 2px 0 #231F1C; }
.mode-card.off:hover { opacity: .8; filter: none; }
.mode-card.pop { animation: mc-pop .42s cubic-bezier(.3,1.6,.5,1); }
@keyframes mc-pop { 0% { transform: scale(.94); } 60% { transform: scale(1.04) rotate(-1deg); } 100% { transform: none; } }
@keyframes mc-wiggle { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-10deg); } 84% { transform: rotate(8deg); } 92% { transform: rotate(-4deg); } }
.setup-rest { animation: mc-rise .35s ease-out; }
@keyframes mc-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.setup-note { margin: 10px 0 0; padding: 8px 12px; border-radius: 12px; background: var(--gold-soft); color: #6E4C08; font-size: .82rem; font-weight: 600; }
.setup-go { margin-top: 14px; font-weight: 800; border: 2px solid #231F1C; box-shadow: 0 3px 0 #231F1C; }
.setup-go:active { transform: translateY(2px); box-shadow: 0 1px 0 #231F1C; }
.setup-go.go-league { background: #E0A526; color: #231F1C; }
.setup-go.go-casual { background: #4F6B4A; color: #EFE7D6; }
.confirm-mode { position: relative; border-radius: 20px; border: 2px solid #231F1C; padding: 18px 18px 20px; margin-top: 4px; overflow: hidden; }
.confirm-mode.league { background: #E0A526; color: #231F1C; }
.confirm-mode.casual { background: #4F6B4A; color: #EFE7D6; }
.confirm-mode .cm-icon { position: absolute; right: 14px; top: 14px; width: 64px; height: 64px; --mc-bg: transparent; animation: mc-wiggle 2.2s ease-in-out infinite; transform-origin: 50% 90%; }
.confirm-mode .cm-k { font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.confirm-mode .cm-title { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: -.035em; font-size: 2.3rem; line-height: .95; margin: 6px 0 4px; }
.confirm-mode .cm-meta { font-weight: 700; }
.cm-list { margin: 14px 0 0; padding: 0; list-style: none; }
.cm-list li { padding: 8px 0 8px 22px; position: relative; border-top: 1px dashed var(--rule); }
.cm-list li::before { content: "✓"; position: absolute; left: 2px; font-weight: 900; color: var(--red-text); }
.mode-banner { display: flex; align-items: center; gap: 12px; margin: 12px 0 0; padding: 12px 14px; border-radius: 16px; border: 2px solid #231F1C; box-shadow: 0 3px 0 #231F1C; }
.mode-banner.league { background: #E0A526; color: #231F1C; }
.mode-banner.casual { background: #4F6B4A; color: #EFE7D6; }
.mode-banner .mb-icon { width: 36px; height: 36px; flex: none; --mc-bg: transparent; }
.mode-banner .mb-icon svg { width: 100%; height: 100%; }
.mode-banner .mb-title { display: block; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: -.02em; font-size: 1.15rem; line-height: 1.05; }
.mode-banner .mb-sub { display: block; font-size: .82rem; font-weight: 600; }
.mode-tag { display: inline-block; margin: 2px 0 6px; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 800; border: 1.5px solid #231F1C; }
.mode-tag.league { background: #E0A526; color: #231F1C; }
.mode-tag.casual { background: #4F6B4A; color: #EFE7D6; }
@media (max-width: 360px) { .mode-cards { grid-template-columns: 1fr; } .mode-card { min-height: 0; } }
@media (prefers-reduced-motion: reduce) { .mode-card, .mode-card .mc-icon, .confirm-mode .cm-icon, .setup-rest, .mode-card.pop { animation: none !important; transition: none; } }

/* ── Guide book (clean) ── */
.guide2 .g-eyebrow { font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.guide2 .g-eyebrow:first-child { margin-top: 4px; }
.gp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gp { border: 2px solid #231F1C; border-radius: 16px; padding: 12px; box-shadow: 0 3px 0 #231F1C; }
.gp.wide { grid-column: 1 / -1; }
.gp.hu { background: #862626; color: #EFE7D6; }
.gp.zimo { background: #4F6B4A; color: #EFE7D6; }
.gp.league { background: #E0A526; color: #231F1C; }
.gp.dim { opacity: .55; box-shadow: none; }
.gp-k { font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .9; }
.gp-big { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: -.03em; font-size: 1.45rem; line-height: 1; margin: 6px 0 6px; }
.gp-l { font-size: .8rem; font-weight: 600; line-height: 1.3; }
.g-note { font-size: .8rem; color: var(--muted); margin: 8px 0 0; }
.gb-list { border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; background: var(--paper); }
.gb { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 10px 12px; font-size: .86rem; line-height: 1.35; }
.gb + .gb { border-top: 1px solid var(--rule); }
.gb-k { font-weight: 800; }
.g-fold { border: 1px solid var(--rule); border-radius: 14px; background: var(--paper); margin-bottom: 8px; overflow: hidden; }
.g-fold summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; font-weight: 800; }
.g-fold summary::-webkit-details-marker { display: none; }
.g-fold summary::after { content: "+"; font-size: 1.2rem; line-height: 1; margin-left: 10px; transition: transform .2s; }
.g-fold[open] summary::after { transform: rotate(45deg); }
.g-fold .g-count { margin-left: auto; font-size: .75rem; color: var(--muted); font-weight: 700; }
.g-fold table { margin: 0; }
.g-fold td { padding: 8px 14px; }

/* mode cards v2: icon + title on one row; rules appear as bullets after a tap */
.mode-card { min-height: 0; gap: 6px; padding: 14px 14px 16px; }
.mode-card .mc-head { display: flex; align-items: center; gap: 8px; padding-right: 30px; }
.mode-card .mc-head .mc-icon { width: 34px; height: 34px; margin: 0; flex: none; }
.mode-card .mc-title { font-size: 1.5rem; }
.mode-points { margin: 14px 0 0; padding: 4px 14px; list-style: none; border-radius: 16px; border: 1.5px solid var(--rule); }
.mode-points.league { background: var(--gold-soft); border-color: #E0A526; }
.mode-points.casual { background: var(--moss-soft); border-color: #4F6B4A; }
.mode-points li { position: relative; padding: 9px 0 9px 26px; font-weight: 600; font-size: .9rem; line-height: 1.35; }
.mode-points li + li { border-top: 1px dashed rgba(35,31,28,.2); }
.mode-points li::before { content: "✓"; position: absolute; left: 2px; top: 9px; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; font-size: .65rem; font-weight: 900; background: #231F1C; color: #EFE7D6; }
.mode-cards { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.mode-card { min-width: 0; white-space: normal; }
.mode-card .mc-check { width: 24px; height: 24px; top: 8px; right: 8px; font-size: .8rem; }
.mode-card .mc-head { padding-right: 22px; gap: 6px; }
@media (max-width: 420px) { .mode-card .mc-title { font-size: 1.2rem; } .mode-card .mc-head .mc-icon { width: 26px; height: 26px; } .mode-card { padding: 12px 12px 14px; } }

.mode-points, .mode-points.league, .mode-points.casual { background: none; border: 0; border-radius: 0; padding: 0; margin: 12px 0 0; }
.mode-points li { padding-left: 28px; }
.mode-points li::before { left: 0; }
.mode-facts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 14px; }
.mode-facts > div { border: 1px solid var(--rule); border-radius: 14px; padding: 10px 12px; }
.mode-facts .mf-k { display: block; font-size: .75rem; color: var(--muted); font-weight: 600; }
.mode-facts b { display: block; font-size: 1.05rem; margin-top: 2px; }

/* Round badge next to "Skor" (play) */
.round-badge { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; background: #862626; color: #EFE7D6; border: 2px solid #231F1C; box-shadow: 0 3px 0 #231F1C; }
.round-badge .rb-wind { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #E0A526; color: #231F1C; font-size: 1.35rem; font-weight: 800; line-height: 1; }
.round-badge .rb-txt { display: flex; flex-direction: column; line-height: 1.05; }
.round-badge .rb-k { font-size: .62rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.round-badge .rb-txt b { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; text-transform: uppercase; letter-spacing: -.01em; }
.round-badge .rb-n { padding-left: 10px; border-left: 1.5px solid rgba(239,231,214,.4); font-weight: 700; font-size: .9rem; white-space: nowrap; }

/* Round badge: plain rounded pill */
.round-badge { background: var(--paper); color: var(--ink); border: 1px solid var(--rule); box-shadow: none; padding: 5px 14px 5px 5px; }
.round-badge .rb-wind { background: none; color: var(--ink); border: 1.5px solid var(--rule); width: 34px; height: 34px; font-size: 1.2rem; }
.round-badge .rb-k { color: var(--muted); opacity: 1; }
.round-badge .rb-n { border-left-color: var(--rule); }
/* Mode chip on the clock card */
.mode-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 8px; border-radius: 999px; font-weight: 800; font-size: .85rem; border: 1.5px solid transparent; }
.mode-chip.league { background: #E0A526; color: #231F1C; }
.mode-chip.casual { background: #EFE7D6; color: #231F1C; }
.mode-chip .mc-ic { width: 18px; height: 18px; display: block; --mc-bg: transparent; }
.mode-chip .mc-ic svg { width: 100%; height: 100%; }
.mode-chip.league .mc-ic { --mc-bg: #E0A526; }
.mode-chip.casual .mc-ic { --mc-bg: #EFE7D6; }

/* ───────── Tournament (staff tab, judge page, public page) ───────── */
.t-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.t-head .t-no { margin: 2px 0 0; font-size: 2rem; }
.t-count { text-align: right; font-family: var(--font-display); font-size: 1rem; color: var(--muted); line-height: 1; }
.t-count b { font-size: 2.2rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.t-count span { display: block; font-family: var(--font-body, inherit); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; margin-top: 4px; }
.t-count.done b { color: var(--moss); }
.t-players { display: grid; gap: 6px; }
.t-player { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); }
.t-player.lead { border-color: var(--moss); box-shadow: inset 0 0 0 1px var(--moss); }
.t-wind { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--bg); border: 1px solid var(--rule); font-weight: 800; flex: none; margin-right: 6px; }
.t-player .t-wind { margin-right: 0; }
.t-total { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; font-variant-numeric: tabular-nums; min-width: 2.4em; text-align: right; }
.t-total.up { color: var(--moss); } .t-total.down { color: var(--red-text); }
.t-prev { font-weight: 800; font-size: .85rem; padding: 3px 8px; border-radius: 99px; }
.t-prev.up { background: var(--moss); color: var(--on-moss, #fff); } .t-prev.down { background: var(--red); color: var(--on-red); }
.t-entry { margin-top: 12px; }
.t-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.t-kind { min-height: 64px; border-radius: 14px; border: 1.5px solid var(--rule); background: var(--paper); font-weight: 800; font-size: 1.05rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--ink); }
.t-kind small { font-weight: 500; font-size: .72rem; color: var(--muted); }
.t-kind.on { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.t-kind.on small { color: inherit; opacity: .75; }
.t-kind.k-false_hu.on { background: var(--red); border-color: var(--red); color: var(--on-red); }
.t-kind.k-zimo.on { background: var(--moss); border-color: var(--moss); color: var(--on-moss, #fff); }
.t-who { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.t-who .pick { border-radius: 12px; display: flex; align-items: center; text-align: left; min-height: 48px; overflow: hidden; }
.t-who .pick:disabled { opacity: .35; }
.t-pts { font-family: var(--font-display); font-size: 1.6rem; min-width: 2em; text-align: center; }
.t-hands { display: grid; gap: 4px; }
.t-hand { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--rule); font-size: .92rem; }
.t-hand .btn { margin-left: auto; }
.t-clock.over { background: var(--red); border-color: var(--red); color: var(--on-red); }
.t-clock.big { font-family: var(--font-display); font-weight: 800; font-size: 2rem; font-variant-numeric: tabular-nums; padding: 8px 14px; border-radius: 14px; border: 1px solid var(--rule); background: var(--paper); white-space: nowrap; }
.t-bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.t-stage.current { border-color: var(--moss); box-shadow: inset 0 0 0 1px var(--moss); }
.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.t-card { text-align: left; background: var(--paper); border: 1.5px solid var(--rule); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 5px; color: var(--ink); font: inherit; }
.t-card.live { border-color: var(--moss); }
.t-card.done { opacity: .62; }
.t-num { font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; line-height: 1; letter-spacing: -.03em; }
.t-prog { font-weight: 800; font-size: .8rem; }
.t-bars { display: flex; gap: 3px; margin: 2px 0 4px; }
.t-bars i { flex: 1; height: 5px; border-radius: 3px; background: var(--rule); }
.t-bars i.on { background: var(--moss); }
.t-line { display: flex; justify-content: space-between; gap: 8px; font-size: .9rem; min-width: 0; }
.t-line b { font-variant-numeric: tabular-nums; }
.t-line b.lead { color: var(--moss); }
.pick.on .t-wind { background: rgba(255,255,255,.18); border-color: transparent; color: inherit; }

/* ───────── Site footer (home, league, tournament): brand + address left, links stacked on the right ───────── */
.site-foot { background: var(--ink-c, #231F1C); color: #cfc3b6; padding: 44px 0 calc(32px + env(safe-area-inset-bottom)); }
.site-foot .foot-grid { display: grid; gap: 28px; }
.site-foot .logo { display: inline-flex; align-items: center; gap: 9px; }
body footer.site-foot .logo .logo-mark { background: var(--cream-c, #EFE7D6) !important; width: 40px; height: 46px; }
body footer.site-foot .logo .logo-word { background: var(--cream-c, #EFE7D6) !important; width: 120px; height: 40px; }
.site-foot .foot-brand p { margin: 6px 0 0; font-size: .88rem; line-height: 1.5; }
.site-foot .foot-brand .logo + p { margin-top: 16px; }
.site-foot .foot-copy { color: #8f8377; font-size: .8rem !important; margin-top: 14px !important; }
.site-foot nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; align-content: start; }
.site-foot nav a { color: #fff; text-decoration: none; font-weight: 700; font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; }
.site-foot nav a:hover { color: var(--saffron-c, #E0A526); }
@media (min-width: 760px) {
  .site-foot .foot-grid { grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 40px; }
  .site-foot nav { grid-auto-flow: column; grid-template-rows: repeat(4, auto); grid-template-columns: none; gap: 14px 56px; }
}

/* ───────── Player app header: maroon bar, cream logo (always, no night mode) ───────── */
body.has-tabbar .topbar { background: var(--sparrow-red); border-bottom: 0; backdrop-filter: none; }
body.has-tabbar .topbar .logo-mark, body.has-tabbar .topbar .logo-word { background: var(--cream) !important; }
body.has-tabbar .topbar .chip { background: transparent; color: var(--cream); border-color: rgba(239,231,214,.45); }
body.has-tabbar .topbar .chip.red { background: var(--cream); color: var(--sparrow-red); border-color: var(--cream); font-weight: 800; }
body.has-tabbar .topbar .nav-btn { background: transparent; color: var(--cream); border-color: rgba(239,231,214,.45); }
body.has-tabbar .topbar :is(.chip, .nav-btn, button):focus-visible { outline-color: var(--cream); }

.tj-row { padding: 10px 0; border-top: 1px solid var(--rule); display: grid; gap: 6px; }
.tj-row:first-of-type { border-top: 0; }
.tj-picks { gap: 6px; }
.tj-picks .pick.sm { min-height: 36px; min-width: 40px; padding: 4px 10px; }
