@font-face { font-family: Barlow; font-weight: 500; font-display: swap; src: url(fonts/barlow-500.woff2) format("woff2"); }
@font-face { font-family: Barlow; font-weight: 600; font-display: swap; src: url(fonts/barlow-600.woff2) format("woff2"); }
@font-face { font-family: Barlow; font-weight: 700; font-display: swap; src: url(fonts/barlow-700.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(fonts/barlow-condensed-700.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-display: swap; src: url(fonts/barlow-condensed-800.woff2) format("woff2"); }

:root {
  color-scheme: light;
  --ground: #F4F6EE;
  --surface: #FFFFFF;
  --ink: #102A1E;
  --muted: #4A5D52;
  --line: #DCE3D3;
  --line-soft: #E6EBDF;
  --fairway: #0F3D2B;
  --fairway-2: #134832;
  --gold: #E8B931;
  --sand-edge: #B89656;
  --band: #9CC7A9;
  --track: #EEF3E7;
  --display: "Barlow Condensed", Barlow, system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 500 16px/1.45 Barlow, system-ui, sans-serif; }
main { max-width: 480px; margin: 0 auto; padding: 24px 20px 92px; }
.tab { display: flex; flex-direction: column; gap: 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
h1, h2, p { margin: 0; }
h2 { font-family: var(--display); font-size: 22px; font-weight: 700; text-transform: uppercase; }
section > h2 { margin-bottom: 8px; }
.title { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 34px; font-weight: 800; letter-spacing: .01em; line-height: 1; text-transform: uppercase; }
.flag line { stroke: var(--fairway); stroke-width: 2.5; stroke-linecap: round; }
.flag path { fill: var(--gold); stroke: var(--fairway); stroke-width: 1.5; stroke-linejoin: round; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mown { background: repeating-linear-gradient(90deg, var(--fairway) 0 30px, var(--fairway-2) 30px 60px); color: #fff; }
.eyebrow { font-size: 13px; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .08em; }
.note { color: var(--muted); font-size: 14px; }
.note p + p { margin-top: 8px; }
.split { display: flex; justify-content: space-between; gap: 12px; }
.strong { font-weight: 700; }

button { font: inherit; font-weight: 700; min-height: 48px; padding: 8px 16px; border: 0; border-radius: 14px; cursor: pointer; background: var(--fairway); color: #fff; }
button:disabled { opacity: .35; cursor: default; }
button.quiet { background: none; padding: 8px; min-height: 44px; }
button.quiet { color: var(--muted); font-weight: 600; padding-left: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
select, input { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-height: 48px; }
.pill select { background: var(--gold); color: var(--fairway); font-weight: 700; font-size: 14px; border: 0; border-radius: 999px; min-height: 44px; padding: 6px 12px; }

.groups { display: flex; flex-direction: column; gap: 16px; }
.group-head { padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 10px; }
.group-club, .group-score { font-family: var(--display); font-size: 36px; font-weight: 800; line-height: 1; }
.group-club { text-transform: uppercase; }
.group-right { text-align: right; }
.group-right span { font-size: 12px; font-weight: 600; color: #CFE0D5; }
.group-head svg { width: 100%; height: auto; display: block; }
.group-head text { fill: #fff; font: 700 13px Barlow, sans-serif; }
.group-plan { padding: 14px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.goal { font-weight: 700; }
.group-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) 50px; gap: 10px; align-items: center; padding: 9px 14px; border-top: 1px solid var(--line-soft); font-size: 14px; }
.group-row > .strong:last-child { text-align: right; }
.headline { font-weight: 600; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.card.pad { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.card.pad > h2 { margin: 0; }
.card-head { padding: 10px 14px; background: var(--fairway); color: #fff; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.step-club { font-weight: 700; }
.step-goal { font-size: 13px; color: var(--muted); }

.tiles { border-radius: 20px; padding: 16px 8px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tiles > div { text-align: center; padding: 0 6px; font-size: 13px; font-weight: 600; color: #E4EEE7; }
.tiles > div + div { border-left: 1px solid #2E6A4E; }
.tiles strong { display: block; font: 800 44px/1 var(--display); color: #fff; }
.tiles > div:first-child strong { color: var(--gold); }

.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.chart text { fill: var(--muted); font: 600 12px Barlow, sans-serif; }
.chart text.value { fill: var(--ink); font-size: 13px; font-weight: 700; }
.usual { stroke: var(--sand-edge); stroke-width: 1.5; stroke-dasharray: 4 5; }
.series { fill: none; stroke: var(--fairway); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.dot { fill: var(--fairway); }
.dot.best { fill: var(--gold); stroke: var(--fairway); stroke-width: 2; }
.crosshair { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.tooltip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; padding: 6px 8px; border-radius: 6px; white-space: nowrap; transform: translateX(-50%); }

.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 10px 8px 0; text-align: right; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; }
th:first-child, td:first-child { text-align: left; }
.heat { border-collapse: separate; border-spacing: 3px; width: auto; min-width: 100%; }
.heat th, .heat td { border: 0; padding: 0; text-align: center; font-size: 12px; font-weight: 700; }
.heat th { padding-bottom: 2px; line-height: 1.2; }
.heat th:first-child, .heat td:first-child { position: sticky; left: 0; background: var(--surface); text-align: left; font-size: 13px; padding-right: 6px; z-index: 1; color: var(--ink); }
.heat td.cell { height: 30px; min-width: 44px; border-radius: 6px; }
.h0 { background: #0F3D2B; color: #fff; } .h1 { background: #2E7A55; color: #fff; } .h2 { background: #7FB894; }
.h3 { background: #C5DFC9; } .h4 { background: #E9F0E3; }
.heat td.empty { background: var(--ground); }
.heat td.low { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 2px var(--edge); }
.heat td.low.h0 { --edge: #0F3D2B; } .heat td.low.h1 { --edge: #2E7A55; } .heat td.low.h2 { --edge: #7FB894; }
.heat td.low.h3, .heat td.low.h4 { --edge: #C5DFC9; }

.launch-head { display: flex; justify-content: space-between; padding: 0 44px 0 58px; font-size: 12px; font-weight: 700; color: var(--muted); }
.launch-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) 44px; align-items: center; margin-top: 4px; font-size: 12px; font-weight: 700; }
.launch-value { text-align: right; }
.lane { position: relative; height: 26px; background: var(--track); border-radius: 6px; }
.lane .centre { position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1.5px dashed var(--sand-edge); }
.lane .bar { position: absolute; top: 9px; height: 8px; border-radius: 4px; background: var(--band); }
.lane .mid { position: absolute; top: 6px; width: 14px; height: 14px; margin-left: -7px; border-radius: 7px; background: #fff; border: 3px solid var(--fairway); }

.club-row { padding: 10px 14px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 6px; }
.club-name { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; }
.chip { width: 26px; height: 26px; border-radius: 13px; border: 2px solid var(--fairway); background: var(--ground); color: var(--fairway); font: 800 15px var(--display); display: flex; align-items: center; justify-content: center; }
.chip.top { background: var(--gold); }
.club-score { font: 700 22px var(--display); }
.club-detail { font-size: 13px; color: var(--muted); }
.gaps { border-radius: 16px; padding: 16px; }
.gaps p { margin-top: 6px; font-size: 15px; }
details { font-size: 14px; }
summary { cursor: pointer; color: var(--muted); padding: 8px 0; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs button { min-height: 60px; background: none; color: var(--muted); border-radius: 0; font-size: 14px; font-weight: 600; }
.tabs button[aria-current="page"] { color: var(--fairway); font-weight: 700; box-shadow: inset 0 3px 0 var(--gold); }

.login { max-width: 340px; padding-top: 18vh; }
.login form { display: grid; gap: 10px; margin-top: 20px; }
.login label { font-size: 14px; color: var(--muted); }
.login input { width: 100%; }
.error { color: #A3211A; margin: 0; font-weight: 600; }
@media print { button, details, .tabs { display: none; } }

.lesson-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
.lesson-stats dt { font-size: 12px; font-weight: 600; color: var(--muted); }
.lesson-stats dd { margin: 0; font-size: 14px; font-weight: 700; }
.lesson-link { margin-top: 8px; }
.lesson-link a { color: var(--fairway); font-weight: 700; }

.split-meter { display: flex; gap: 2px; background: none; border-radius: 0; overflow: visible; }
.split-meter i { display: block; height: 8px; min-width: 4px; border-radius: 4px; }
.lateral { background: var(--fairway); }
.depth { background: var(--gold); }
.share-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.share-text { font-size: 12px; font-weight: 500; color: var(--muted); }
.share-key { display: flex; gap: 16px; font-size: 13px; font-weight: 600; color: var(--muted); }
.share-key span { display: flex; align-items: center; gap: 6px; }
.share-key i { display: block; width: 12px; height: 12px; border-radius: 6px; }
