/* Layout: logo masthead over a faint swing-line field, one narrow column of charcoal cards, bottom tab bar like the kit. */
@font-face { font-family: "Barlow Condensed"; src: url("fonts/BarlowCondensed-BlackItalic.ttf") format("truetype"); font-weight: 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/BarlowCondensed-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-SemiBold.ttf") format("truetype"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/IBMPlexMono-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
:root {
  /* Final Round brand kit: one deliberate dark look. */
  --bg: #101310; --surface: #1B211B; --raised: #252E25; --border: #657765; --line: #2C362C;
  --ink: #F5F7F2; --muted: #B0BAB0; --lime: #C8FF00; --lime-deep: #233000; --on-lime: #101310;
  --error: #FF8585; --warning: #FFD078; --info: #83CFFF;
  --display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --nav-h: 64px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--body); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
.wrap { max-width: 640px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Masthead */
.band { padding-top: env(safe-area-inset-top, 0px); background: linear-gradient(90deg, var(--bg) 30%, rgba(16, 19, 16, .75) 62%, rgba(16, 19, 16, .35)), url("swing-lines-overlay.png") right top / cover no-repeat, var(--bg); border-bottom: 1px solid var(--line); }
.band .wrap { padding-block: 20px 22px; display: grid; gap: 10px; }
.logo { display: block; width: min(250px, 66vw); height: auto; }
.event { font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: clamp(28px, 8vw, 40px); line-height: .98; margin: 4px 0 0; text-wrap: balance; }
.status-line { font-size: 14px; color: var(--muted); margin: 0; }
.status-line b { color: var(--ink); font-weight: 600; }

/* Bottom tab bar */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 26; background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom, 0px); }
.tabs .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.tab { background: none; border: 0; color: var(--muted); padding: 9px 4px 8px; font-size: 12px; font-weight: 600; display: grid; justify-items: center; gap: 3px; cursor: pointer; min-height: var(--nav-h); }
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab[aria-selected="true"] { color: var(--lime); }

main { padding-block: 20px calc(var(--nav-h) + 110px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.panel-pad { padding: 18px; display: grid; gap: 14px; }
h2 { font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1.1; margin: 0; text-wrap: balance; }
h3 { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1.1; margin: 0; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.kicker { color: var(--lime); font-weight: 600; font-size: 13px; letter-spacing: .08em; }

/* Controls */
.btn { appearance: none; border: 0; border-radius: 10px; background: var(--lime); color: var(--on-lime); font-weight: 650; font-size: 15px; min-height: 52px; padding: 0 20px; cursor: pointer; transition: transform .16s var(--ease), background .16s var(--ease); }
.btn:active { transform: scale(.98); }
.btn:disabled { background: var(--raised); color: var(--muted); cursor: default; transform: none; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 8px; }
.btn.danger { background: transparent; color: var(--error); border: 1px solid var(--error); }
.btn.arm { background: var(--error); color: var(--on-lime); }
label.field, .field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.input, select.input, textarea.input { width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 13px 14px; font-size: 16px; min-width: 0; min-height: 52px; }
.input:focus { border-color: var(--lime); outline: none; box-shadow: 0 0 0 3px rgba(200, 255, 0, .25); }
textarea.input { min-height: 120px; resize: vertical; font-size: 14px; line-height: 1.4; }
.hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > * { min-width: 0; }

.seg { display: grid; grid-template-columns: repeat(var(--n, 2), 1fr); gap: 4px; background: var(--bg); padding: 4px; border-radius: 12px; }
.seg button { border: 0; background: transparent; border-radius: 9px; padding: 9px 4px; cursor: pointer; font-weight: 600; font-size: 15px; color: var(--muted); display: grid; gap: 1px; justify-items: center; min-height: 48px; }
.seg button small { font-size: 12px; font-weight: 400; }
.seg button[aria-pressed="true"] { background: var(--raised); color: var(--ink); }
.mode-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-pick button { align-content: start; font-weight: 400; text-align: left; border: 1.5px solid var(--line); background: var(--bg); border-radius: 12px; padding: 14px; cursor: pointer; display: grid; gap: 4px; }
.mode-pick button b { font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 26px; line-height: 1; }
.mode-pick button span { font-size: 13px; color: var(--muted); }
.mode-pick button[aria-pressed="true"] { border-color: var(--lime); background: var(--lime-deep); }
.mode-pick button[aria-pressed="true"] b { color: var(--lime); }

.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: var(--raised); color: var(--muted); white-space: nowrap; }
.chip.cut { color: var(--warning); }
.chip.wd, .chip.dq { color: var(--error); }
.chip.low, .chip.high { background: var(--lime-deep); color: var(--lime); }
.chip.live { background: var(--lime-deep); color: var(--lime); }

.notice { border-radius: 12px; padding: 14px; background: var(--lime-deep); border: 1px solid var(--lime); font-size: 14px; display: grid; gap: 8px; }
.notice.plain { background: var(--surface); border-color: var(--line); }
.linkbox { display: flex; gap: 8px; align-items: center; }
.linkbox code { flex: 1; min-width: 0; overflow-wrap: anywhere; font: 500 12px/1.4 var(--mono); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; user-select: all; }

/* The scorecard */
.card-head { display: grid; gap: 12px; padding: 16px 16px 12px; border-bottom: 1px solid var(--line); }
.card-meta { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.card-meta .count { font-family: var(--display); font-weight: 700; font-size: 20px; }
.holes { list-style: none; margin: 0; padding: 0; }
.hole { display: grid; grid-template-columns: 44px 1fr 44px; gap: 10px; align-items: center; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.hole:last-child { border-bottom: 0; }
.hole.turn { border-bottom: 2px solid var(--border); }
.hn { display: grid; justify-items: center; line-height: 1; gap: 3px; }
.hn b { font-family: var(--display); font-weight: 900; font-style: italic; font-size: 26px; }
.hn span { font-size: 11px; color: var(--muted); }
.hole select { width: 100%; min-width: 0; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 11px 10px; font-size: 15px; min-height: 46px; }
.hole select.empty { color: var(--muted); }
.hole.clash select { border-color: var(--error); }
.golfer-name { font-weight: 600; overflow-wrap: anywhere; }
.golfer-sub { font-size: 12px; color: var(--muted); }
.res { justify-self: center; }
.subtotal { display: grid; grid-template-columns: 44px 1fr 44px; gap: 10px; padding: 12px 16px; background: var(--raised); font-weight: 600; align-items: center; border-radius: 0 0 14px 14px; }
.subtotal .lab { grid-column: 2; }
.subtotal .val { justify-self: center; font-family: var(--mono); font-size: 18px; }

/* Scorecard marks: circle = under par, square = over par, doubled for 2+ */
.mk { width: 32px; height: 32px; display: inline-grid; place-items: center; font: 500 15px var(--mono); border: 1.5px solid transparent; }
.mk.u1 { border-color: var(--lime); border-radius: 50%; color: var(--lime); }
.mk.u2 { border-color: var(--lime); border-radius: 50%; color: var(--lime); outline: 1.5px solid var(--lime); outline-offset: 2px; }
.mk.o1 { border-color: var(--ink); }
.mk.o2 { border-color: var(--ink); outline: 1.5px solid var(--ink); outline-offset: 2px; }
.mk.pen { border: 1.5px dashed var(--muted); border-radius: 6px; color: var(--muted); font-size: 12px; }
.mk.wait { color: var(--muted); }

.savebar { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)); z-index: 25; background: var(--bg); border-top: 1px solid var(--line); }
.savebar .wrap { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding-block: 10px; }
.savebar p { font-size: 13px; color: var(--muted); }
.savebar p.err { color: var(--error); font-weight: 600; }

/* Leaderboards: raised rows like the kit */
.lb-head { display: grid; gap: 12px; }
.lb-cols { display: grid; grid-template-columns: 44px 40px 1fr auto; gap: 12px; padding: 0 16px; font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.lb { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.lb li > button { width: 100%; background: var(--surface); border: 1px solid transparent; border-radius: 14px; text-align: left; cursor: pointer; display: grid; grid-template-columns: 44px 40px 1fr auto; gap: 12px; padding: 14px 16px; align-items: center; }
.lb .pos { font: 500 18px var(--mono); color: var(--muted); }
.lb .av { width: 40px; height: 40px; border-radius: 50%; background: var(--raised); display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.lb .who { min-width: 0; display: grid; }
.lb .who b { overflow-wrap: anywhere; font-weight: 600; font-size: 16px; }
.lb .rds { font-size: 13px; color: var(--muted); font-family: var(--mono); }
.lb .tot { font: 500 24px var(--mono); min-width: 48px; text-align: right; display: grid; justify-items: end; line-height: 1.1; }
.lb .tot small { font: 500 12px var(--mono); color: var(--muted); margin-top: 2px; }
.lb li.me > button { background: var(--lime-deep); border-color: var(--lime); }
.lb li.me .pos, .lb li.me .tot, .lb li.me .rds { color: var(--lime); }
.lb .divider { padding: 10px 4px 2px; font-size: 13px; font-weight: 600; color: var(--warning); }
.lb li.out > button { opacity: .7; }
.under { color: var(--lime); }

.gtable { width: 100%; border-collapse: collapse; }
.gtable th, .gtable td { padding: 11px 8px; border-bottom: 1px solid var(--line); text-align: center; font-size: 14px; }
.gtable td { font-family: var(--mono); }
.gtable td:first-child { font-family: var(--body); font-weight: 600; }
.gtable th { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .06em; }
.gtable td:first-child, .gtable th:first-child { text-align: left; padding-left: 16px; }
.gtable td:last-child, .gtable th:last-child { padding-right: 16px; }
.gtable .tot { font-size: 16px; }
.scroll { overflow-x: auto; }

.rules { display: grid; gap: 16px; }
.rules ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.rules section { display: grid; gap: 6px; }

/* Sheet */
.sheet-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 40; display: grid; align-items: end; }
.sheet { background: var(--surface); border-radius: 18px 18px 0 0; max-height: 88vh; max-height: 88dvh; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding-bottom: env(safe-area-inset-bottom, 0px); width: 100%; max-width: 640px; margin: 0 auto; border-top: 1px solid var(--border); }
.sheet-top { position: sticky; top: 0; background: var(--surface); display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); gap: 12px; z-index: 1; }

/* Admin */
.admin-grid { display: grid; gap: 16px; }
.pars, .strokes { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; }
.pars input, .strokes input { width: 100%; text-align: center; padding: 9px 0; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); font: 500 15px var(--mono); }
.pars label, .strokes label { display: grid; gap: 2px; font-size: 11px; color: var(--muted); text-align: center; font-weight: 400; }
.locks { display: grid; gap: 10px; }
.lock-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; align-items: center; }
.lock-row b { grid-column: 1 / -1; }
.glist { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.glist li { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.glist li:last-child { border-bottom: 0; }
.glist select { padding: 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); min-height: 40px; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 80px + env(safe-area-inset-bottom, 0px)); z-index: 50; background: var(--raised); color: var(--ink); border: 1px solid var(--lime); padding: 12px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; max-width: calc(100% - 32px); }
.toast.bad { border-color: var(--error); color: var(--error); }
.empty-state { padding: 28px 18px; text-align: center; display: grid; gap: 8px; justify-items: center; }
.skeleton { padding: 40px 16px; text-align: center; color: var(--muted); }
.foot { text-align: center; font-size: 12px; color: var(--muted); padding-top: 8px; }

@media (min-width: 600px) {
  .hole, .subtotal { grid-template-columns: 52px 1fr 52px; }
}
@media (prefers-reduced-motion: no-preference) {
  .sheet { animation: rise .16s var(--ease); }
  @keyframes rise { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ── v2: accounts, home, organiser ── */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar .logo { width: min(190px, 52vw); }
.iconbtn { background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 10px; min-height: 40px; min-width: 40px; padding: 0 10px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: 14px; }
.iconbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--lime); color: var(--on-lime); display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; font-weight: 600; font-size: 14px; }
.back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.hero { display: grid; gap: 14px; padding-block: 8px 4px; }
.hero h2 { font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: clamp(36px, 10vw, 52px); line-height: .95; }
.hero p { color: var(--muted); font-size: 17px; max-width: 34ch; }
.stack { display: grid; gap: 10px; }
.linkbtn { background: none; border: 0; color: var(--lime); font-weight: 600; cursor: pointer; padding: 6px 0; font-size: 15px; }
.center { text-align: center; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; font-weight: 400; font-size: 14px; }
.check input { width: 22px; height: 22px; accent-color: #C8FF00; margin: 0; }
.formerr { color: var(--error); font-size: 14px; font-weight: 600; }
.formok { color: var(--lime); font-size: 14px; font-weight: 600; }

.game-card { padding: 20px 18px; display: grid; gap: 12px; position: relative; overflow: hidden; }
.game-card.next { background: var(--surface) url("swing-lines-overlay.png") right -40px top -30px / 420px auto no-repeat; border-color: var(--border); }
.game-card .kicker { margin-bottom: -4px; }
.game-card h3 { font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 32px; line-height: .95; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: var(--muted); }
.meta b { color: var(--ink); font-weight: 600; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fact { background: var(--bg); border-radius: 10px; padding: 10px; display: grid; gap: 2px; }
.fact b { font: 500 18px var(--mono); }
.fact span { font-size: 12px; color: var(--muted); }
.row-game { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; cursor: pointer; }
.row-game:last-child { border-bottom: 0; }
.row-game b { font-weight: 600; display: block; }
.row-game span { font-size: 13px; color: var(--muted); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; counter-increment: s; }
.steps li::before { content: counter(s); width: 36px; height: 36px; border-radius: 50%; background: var(--lime-deep); color: var(--lime); display: grid; place-items: center; font: 500 16px var(--mono); }
.steps b { display: block; font-weight: 600; }
.steps span { color: var(--muted); font-size: 14px; }
.section-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.feed-list { list-style: none; margin: 0; padding: 0; max-height: 380px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.feed-list li { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.feed-list li:last-child { border-bottom: 0; }
.feed-list b { font-weight: 600; }
.feed-list span { font-size: 13px; color: var(--muted); display: block; }
.sync { display: grid; gap: 4px; font-size: 14px; }
.sync .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); margin-right: 6px; }
.sync .dot.off { background: var(--muted); }
.danger-zone { border-color: rgba(255, 133, 133, .35); }
body.has-tabs main { padding-bottom: calc(var(--nav-h) + 110px + env(safe-area-inset-bottom, 0px)); }
body:not(.has-tabs) main { padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)); }
.pad { padding: 18px; display: grid; gap: 14px; }
.chip.lime { background: var(--lime-deep); color: var(--lime); }

/* ── Course artwork ── */
.course { display: block; width: 100%; height: 100%; object-fit: cover; max-width: 100%; }
.hero-art { position: relative; margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); aspect-ratio: 16 / 10; max-height: 340px; overflow: hidden; display: grid; align-items: end; }
.hero-art .course { position: absolute; inset: 0; object-position: 78% 45%; }
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16, 19, 16, 0) 35%, rgba(16, 19, 16, .85) 82%, var(--bg)); }
.hero-art h2 { position: relative; z-index: 1; padding-inline: max(16px, env(safe-area-inset-left, 0px)); margin-bottom: 2px; }
@media (min-width: 640px) { .hero-art { margin-inline: 0; border-radius: 14px; } }

.game-card.next { padding: 0; background: var(--surface); gap: 0; }
.game-card.next > :not(.card-art) { margin-inline: 18px; }
.game-card.next > .meta { margin-top: 14px; }
.game-card.next > * + * { margin-top: 12px; }
.game-card.next > :last-child { margin-bottom: 18px; }
.card-art { position: relative; aspect-ratio: 16 / 8; overflow: hidden; display: grid; align-items: end; border-radius: 13px 13px 0 0; }
.card-art .course { position: absolute; inset: 0; object-position: 82% 50%; }
.card-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(27, 33, 27, 0) 25%, rgba(27, 33, 27, .7) 65%, var(--surface)); }
.card-art-text { position: relative; z-index: 1; padding: 0 18px 2px; display: grid; gap: 4px; }
.kicker { display: inline-flex; align-items: center; gap: 6px; }
.kicker .flag-motif { width: 16px; height: 16px; }
.flag-motif { fill: none; stroke: var(--lime); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.empty-state > .flag-motif { width: 56px; height: 56px; margin-bottom: 4px; }

/* Scorecard hole markers: a pin flag over each hole number, tinted by par */
.hn { position: relative; }
.hn .pin { width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hn.p3 .pin { stroke: var(--info, #83CFFF); }
.hn.p5 .pin { stroke: var(--lime); }
.hn.p3 span { color: var(--info, #83CFFF); }
.hn.p5 span { color: var(--lime); }
.card-art.no-photo { aspect-ratio: auto; padding-top: 18px; }
.card-art.no-photo::after { display: none; }

/* ── Ticker tape ── */
.ticker { background: var(--lime); color: var(--on-lime); overflow: hidden; border-bottom: 1px solid var(--line); }
.tk-wrap { overflow: hidden; padding-left: 0; padding-right: 0; max-width: none; }
.tk-track { display: flex; width: max-content; animation: tk var(--tk-dur, 40s) linear infinite; }
.ticker:hover .tk-track, .ticker:focus-within .tk-track { animation-play-state: paused; }
.tk-run { display: flex; align-items: center; flex-shrink: 0; }
.tk-item { display: inline-flex; align-items: center; gap: 6px; padding: 9px 22px 9px 0; font-size: 14px; font-weight: 600; white-space: nowrap; }
.tk-item::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--on-lime); opacity: .35; margin-left: 16px; }
.tk-item b { font: 500 14px var(--mono); }
.tk-item b.under { color: var(--on-lime); text-decoration: underline; text-underline-offset: 3px; }
.tk-tag { background: var(--on-lime); color: var(--lime); border-radius: 5px; padding: 2px 7px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.tk-tag.warn { background: #3a2a00; color: #FFD078; }
.tk-tag.live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #FF8585; margin-right: 5px; vertical-align: 1px; animation: tkpulse 1.4s ease-in-out infinite; }
.tk-pos { font: 500 12px var(--mono); opacity: .7; }
.tk-thru { font-size: 12px; opacity: .7; font-weight: 500; }
.tk-sep { opacity: .4; margin: 0 4px; }
@keyframes tk { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes tkpulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) {
  .tk-wrap { overflow-x: auto; }
  .tk-track { animation: none; }
  .tk-run[aria-hidden] { display: none; }
}
.flag-err { color: var(--error); }
.card-meta .btn.small { min-height: 36px; }
[hidden] { display: none !important; }

/* Live card */
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgba(200, 255, 0, .6); animation: livepulse 1.6s infinite; flex: none; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(200, 255, 0, .55); } 70% { box-shadow: 0 0 0 8px rgba(200, 255, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(200, 255, 0, 0); } }
.golfer-sub.on-hole { color: var(--lime); display: flex; align-items: center; gap: 7px; font-weight: 600; }
.hole.now { background: linear-gradient(90deg, rgba(200, 255, 0, .07), transparent 70%); }
.moments { padding: 14px 16px 6px; margin-bottom: 14px; }
.mo-h { display: flex; align-items: center; gap: 9px; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 6px; }
.moments ol { list-style: none; margin: 0; padding: 0; }
.moments li { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.moments li:first-child { border-top: 0; }
.moments li > div { min-width: 0; }
.mo-note { display: block; color: var(--lime); font-size: 13px; }
.mo-when { color: var(--muted); font-size: 12px; font-family: var(--mono, monospace); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* Groups */
.joinrow { display: flex; gap: 10px; align-items: flex-end; border-top: 1px solid var(--line); }
.joinrow .field { flex: 1; }
.input.code { font-family: var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.group-head { display: grid; gap: 12px; margin-bottom: 14px; }
.prizes { border: 1px solid var(--lime); background: var(--lime-deep); border-radius: 12px; padding: 12px 14px; }
.prizes b { color: var(--lime); font-size: 13px; }
.prizes p { margin: 4px 0 0; white-space: pre-line; }
.invite { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; font-size: 14px; }
.invite .mono { font-size: 16px; letter-spacing: .1em; color: var(--lime); }
.glist.weeks li { grid-template-columns: 1fr auto auto; gap: 12px; }
#leave-group { margin-top: 14px; }
textarea.input { resize: vertical; min-height: 64px; font: inherit; }

/* Badges */
.bdgs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.bdgs.big { gap: 6px; margin: 4px 0 10px; }
.bdg { display: inline-flex; align-items: center; font: 600 11px/1 var(--body); padding: 4px 7px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.bdgs.big .bdg { font-size: 13px; padding: 6px 10px; }
.b-gold { background: #E9C46A; border-color: #E9C46A; color: #2A2000; }
.b-silver { background: #CDD5DC; border-color: #CDD5DC; color: #1C232A; }
.b-bronze { background: #C98B57; border-color: #C98B57; color: #2A1606; }
.b-top5 { border-color: var(--lime); color: var(--lime); }
.b-top10 { border-color: var(--border); color: var(--ink); }
.b-eagle_eye { background: var(--lime-deep); border-color: var(--lime); color: var(--lime); }
.b-back_nine { background: #13324A; border-color: var(--info); color: var(--info); }
.b-legend { background: var(--lime); border-color: var(--lime); color: var(--on-lime); text-transform: uppercase; letter-spacing: .06em; }
.glist.prog li { grid-template-columns: 1fr auto auto; gap: 12px; }
.lb .who .bdgs { margin-top: 5px; }
.bdgi { position: relative; display: inline-flex; align-items: center; gap: 2px; }
.bdgi img { display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.bdgi b { font: 600 11px var(--mono); color: var(--ink); margin-left: 1px; }
.bdgi.big { flex-direction: column; gap: 4px; width: 72px; text-align: center; }
.bdgi.big span { font-size: 11px; color: var(--muted); line-height: 1.2; }
.bdgi.big b { position: absolute; top: -2px; right: 6px; background: var(--lime); color: var(--on-lime); border-radius: 999px; padding: 1px 5px; }
.bdgs.big { gap: 10px 4px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.form-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: none; color: var(--lime); display: grid; place-items: center; cursor: pointer; }
.form-btn:hover, .form-btn:focus-visible { background: rgba(200, 255, 0, .08); }
.hole-form { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.hole-form .fd-head { border-radius: 18px 18px 0 0; }
.fd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 18px 18px;
  background: repeating-linear-gradient(115deg, rgba(255,255,255,.035) 0 18px, transparent 18px 36px), linear-gradient(135deg, #24461a 0%, #34661f 55%, #4c8a26 100%);
  border-bottom: 3px solid var(--lime); }
.fd-head .kicker { color: var(--lime); font-size: 12px; letter-spacing: .08em; font-weight: 700; }
.fd-head h2 { font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 46px; line-height: .9; margin: 6px 0 8px; color: #fff; }
.fd-head .btn.ghost { background: rgba(16,19,16,.35); }
.fd-avg { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.fd-avg > div:first-child { display: grid; gap: 2px; }
.fd-avg small, .fd-rounds small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.fd-avg b { font-family: var(--display); font-weight: 900; font-style: italic; font-size: 44px; line-height: 1; }
.fd-avg b.under, .fd-rounds b.under { color: var(--lime); }
.fd-rounds { display: flex; gap: 6px; }
.fd-rounds span { display: grid; gap: 2px; text-align: center; padding: 6px 10px; border-radius: 10px; background: rgba(76,138,38,.18); border: 1px solid rgba(124,191,79,.35); }
.fd-rounds b { font-size: 16px; font-weight: 700; }
.fd-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; gap: 2px; background: var(--line); }
.fd-e { background: #C8FF00; } .fd-b { background: #7cc04f; } .fd-p { background: #3d6b2c; } .fd-o { background: #5b6157; }
.fd-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; margin: 10px 0 4px; font-size: 14px; }
.fd-legend span { display: flex; align-items: center; gap: 6px; }
.fd-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.fd-legend small { color: var(--muted); }
.fd-h { margin-top: 18px; font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 24px; }
.form-list li { grid-template-columns: 28px 1fr auto auto; align-items: center; gap: 10px; }
.form-list .rk { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--line); color: var(--muted); }
.form-list li.podium { background: linear-gradient(90deg, rgba(124,191,79,.16), transparent 70%); }
.form-list li.podium .rk { background: var(--lime); color: var(--on-lime); }
.form-list .sc { font-weight: 800; font-size: 18px; min-width: 30px; text-align: right; }
.form-list .sc.under { color: var(--lime); } .form-list .sc.over { color: #e7a08a; }
.hn-btn { background: none; border: 0; color: inherit; font: inherit; padding: 4px 6px; margin: -4px -6px; border-radius: 10px; cursor: pointer; }
.hn-btn:hover, .hn-btn:focus-visible { background: rgba(124, 191, 79, .16); }
.hn-btn b { text-decoration: underline; text-decoration-color: rgba(200, 255, 0, .55); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.fd-actions { display: flex; gap: 6px; }
.fd-actions .btn.ghost { background: rgba(16, 19, 16, .35); }
.stats-list li { grid-template-columns: 28px 1fr auto; }
.topbar.inner { display: grid; grid-template-columns: 1fr auto 1fr; }
.topbar.inner > :last-child { justify-self: end; }
.topbar.inner .back { justify-self: start; }
.logo-btn { background: none; border: 0; padding: 0; cursor: pointer; line-height: 0; }
.topbar.inner .logo { width: min(124px, 34vw); height: auto; }
.fd-head { padding: 14px 16px 12px; align-items: center; }
.fd-head h2 { font-size: 36px; margin: 2px 0 0; display: inline-block; vertical-align: middle; }
.fd-head .chip { vertical-align: middle; margin-left: 8px; }
.fd-avg b { font-size: 38px; }
.form-list { overflow: visible; max-height: none; }
.sheet .glist { max-height: none; overflow: visible; }
.cr-banner { display: grid; gap: 2px; padding: 12px 16px; border-radius: 14px; border: 1px solid rgba(124, 191, 79, .4); background: linear-gradient(90deg, rgba(76, 138, 38, .22), rgba(76, 138, 38, .06)); margin-bottom: 12px; }
.cr-banner b { font-family: var(--display); font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 20px; color: var(--lime); }
.cr-banner span { font-size: 14px; color: var(--muted); }
.cr-banner.win { border-color: var(--lime); background: linear-gradient(135deg, #34661f, #24461a); }
.cr-banner.win b { font-size: 26px; } .cr-banner.win span { color: var(--ink); }
.cr-row { display: grid; grid-template-columns: 120px 1fr; gap: 10px; }
.bdg.b-course_record { background: var(--lime); color: var(--on-lime); }
.fd-head { padding: 18px 18px 16px; align-items: flex-start; }
.fd-head > div:first-child { display: grid; gap: 6px; min-width: 0; }
.fd-head .kicker { display: block; font-size: 11px; letter-spacing: .1em; }
.fd-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fd-head .fd-title h2 { display: block; font-size: 40px; line-height: .95; margin: 0; }
.fd-head .fd-title .chip { margin: 0; }
.mr-hero { padding: 0; overflow: hidden; }
.mr-hero .fd-head { border-radius: 0; }
.mr-sub { color: #dfe8d6; font-size: 14px; }
.mr-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 14px; }
.mr-tile { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--raised, #232a23); border: 1px solid var(--line); min-width: 0; }
.mr-tile small { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.mr-tile b { font-family: var(--display); font-weight: 900; font-style: italic; font-size: 34px; line-height: 1.05; }
.mr-tile b.under { color: var(--lime); }
.mr-tile span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.mr-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.mr-mini .mr-tile b { font-size: 26px; }
.mr-groups { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.mr-groups li { display: grid; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.mr-groups li:last-child { border-bottom: 0; padding-bottom: 0; }
.mr-groups li > div:first-child { display: grid; gap: 2px; }
.mr-games { list-style: none; margin: 0; padding: 0; }
.mr-fin { display: grid; justify-items: end; }
.mr-fin b { font-family: var(--display); font-weight: 900; font-style: italic; font-size: 24px; color: var(--ink); }
.mr-fin small { font-size: 12px; color: var(--muted); }
.terms h3 { margin-top: 14px; }
.terms ol { padding-left: 20px; display: grid; gap: 6px; }
.terms-box { border: 1px solid var(--line); border-radius: 12px; padding: 4px 14px 14px; margin: 12px 0; }
.terms-gate { display: grid; gap: 10px; }
.sp-list { list-style: none; margin: 0; padding: 0; }
.sp { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--line); }
.sp-img { width: 120px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--raised, #232a23); }
.sp-reel { position: relative; display: block; align-self: start; }
.sp-reel span { position: absolute; left: 6px; bottom: 6px; background: var(--lime, #C8FF00); color: #101310; font-weight: 800; font-size: 12px; padding: 2px 8px; border-radius: 99px; }
.sp-wait { display: grid; place-items: center; text-align: center; font-size: 12px; color: var(--muted); padding: 8px; }
.sp-main { display: grid; gap: 8px; min-width: 0; }
.sp-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sp-res { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.sp-res a { color: inherit; }
.sp-head { font-weight: 700; margin: 0; }
.sp.published, .sp.skipped { opacity: .75; }
.sp-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 12px; margin: 6px 0 10px; }
@media (max-width: 520px) { .sp { grid-template-columns: 1fr; } .sp-img { width: 160px; } }
.score-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.score-strip.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sc-tile { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); min-width: 0; }
.sc-tile small { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sc-tile b { font-family: var(--display); font-weight: 900; font-style: italic; font-size: 38px; line-height: 1; }
.sc-tile b small { font-family: var(--body, Inter, sans-serif); font-style: normal; font-weight: 600; font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--muted); }
.sc-tile b.under { color: var(--lime); } .sc-tile b.over { color: #e7a08a; }
.sc-tile span { font-size: 13px; color: var(--muted); }
.mo-more { display: block; margin: 4px auto 0; padding: 6px 10px; }

.card-rounds { margin: 12px 16px 0; }
