/* Caddie — desert golf */
@font-face { font-family: "Fraunces"; src: url(fonts/fraunces.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url(fonts/inter.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --rock: #C84A2F; --rock-d: #8F2F1C; --rock-l: #E08A62; --rock-50: #FBE9E1;
  --sand: #F2D49B; --sand-l: #F8E7C4; --sand-d: #C9A465;
  --fair: #3F7F3A; --fair-d: #1F4D2E; --fair-l: #6AA443; --fair-50: #E6F1DC;
  --sky: #1D5A7A; --sky-d: #0F3A4A; --sky-l: #5FA3C4; --sky-50: #E3F0F6;
  --cream: #FBF5EA; --paper: #FFFDF8; --ink: #1E2A2A; --ink-2: #4A5755; --muted: #7C857F; --line: #EADFCB; --line-2: #F2E9D9;
  --green: #3E9A4A; --orange: #E8912D; --red: #D1412A;
  --r: 18px; --r-sm: 12px;
  --shadow: 0 1px 2px rgba(62, 37, 20, .06), 0 8px 24px -12px rgba(62, 37, 20, .18);
  --shadow-lg: 0 24px 60px -20px rgba(15, 58, 74, .45);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0; font: 15px/1.5 var(--sans); color: var(--ink); background: var(--cream);
  background-image: radial-gradient(1200px 500px at 85% -10%, rgba(242, 212, 155, .55), transparent 60%), radial-gradient(900px 400px at -10% 30%, rgba(224, 138, 98, .10), transparent 60%);
  background-attachment: fixed; padding-bottom: calc(78px + var(--safe-b)); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
body.modal-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; margin: 0; font-variation-settings: "SOFT" 50, "WONK" 0; }
.ic { width: 18px; height: 18px; flex: none; }
.ic.sm { width: 13px; height: 13px; vertical-align: -1px; opacity: .6; }
.muted { color: var(--muted); }
.sm { font-size: 12.5px; }
code { font-size: .88em; background: var(--line-2); padding: 1px 5px; border-radius: 5px; }
:focus-visible { outline: 3px solid var(--sky-l); outline-offset: 2px; border-radius: 8px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; color: var(--sand-l); background: linear-gradient(180deg, var(--sky-d), #134656); padding-top: env(safe-area-inset-top, 0px); }
.topbar-in { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 10px 16px 6px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.brand img { width: 40px; height: 40px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.brand-txt { display: flex; flex-direction: column; line-height: 1.1; }
.brand-txt b { font-family: var(--display); font-size: 19px; font-weight: 650; color: #FFF6E6; letter-spacing: -.01em; }
.brand-txt small { font-size: 11.5px; color: rgba(248, 231, 196, .72); letter-spacing: .02em; }
.mesa-edge { display: block; width: 100%; height: 18px; margin-bottom: -1px; }
.mesa-edge .m1 { fill: var(--rock-l); } .mesa-edge .m2 { fill: var(--rock); } .mesa-edge .m3 { fill: var(--rock-d); }
.topnav { display: none; margin-left: auto; gap: 2px; }
.gear { margin-left: auto; color: var(--sand-l); }
.gear:hover { background: rgba(255,255,255,.08); }
.nav-btn { display: flex; align-items: center; gap: 7px; border: 0; background: none; color: inherit; padding: 8px 12px; border-radius: 999px; font-weight: 550; font-size: 14px; white-space: nowrap; }
.nav-btn .lbl-short { display: none; }
.topnav .nav-btn { color: rgba(248, 231, 196, .78); }
.topnav .nav-btn:hover { color: #fff; background: rgba(255,255,255,.07); }
.topnav .nav-btn.on { background: var(--sand); color: var(--sky-d); }

/* bottom nav (mobile) */
.bottomnav { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(6, 1fr); background: rgba(255, 253, 248, .94); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + var(--safe-b)); }
.bottomnav .nav-btn { flex-direction: column; gap: 2px; padding: 6px 0 4px; font-size: 10.5px; font-weight: 600; color: var(--muted); border-radius: 12px; }
.bottomnav .nav-btn .ic { width: 22px; height: 22px; }
.bottomnav .nav-btn .lbl-long { display: none; }
.bottomnav .nav-btn .lbl-short { display: block; }
.bottomnav .nav-btn.on { color: var(--rock); }
.bottomnav .nav-btn.on .ic { background: var(--rock-50); border-radius: 10px; padding: 2px; width: 34px; height: 26px; }

/* ---------- section head ---------- */
.sec-head { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; justify-content: space-between; margin: 14px 0 16px; }
.sec-head h1 { font-size: 34px; line-height: 1.05; color: var(--sky-d); font-weight: 650; }
.eyebrow { margin: 0 0 4px; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--rock); }
.sub { margin: 6px 0 0; color: var(--ink-2); max-width: 62ch; }
.sec-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- primitives ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; }
.card.pad0 { padding: 0; overflow: hidden; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 12px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.list-head.flat { padding: 0 0 12px; border: 0; }
.list-head h2 { font-size: 19px; color: var(--sky-d); }
.list-head .muted { font-size: 12.5px; }
.btn { display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 999px; padding: 10px 16px; font-weight: 600; font-size: 14px; background: var(--rock); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 6px 14px -8px rgba(143, 47, 28, .7); transition: transform .08s, background .15s; white-space: nowrap; }
.btn:hover { background: var(--rock-d); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--sky-d); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { background: var(--sand-l); }
.btn.danger { color: var(--red); }
.btn.sm { padding: 7px 12px; font-size: 13px; }
.ib { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; background: none; border-radius: 10px; color: var(--ink-2); }
.ib:hover:not(:disabled) { background: var(--line-2); }
.ib:disabled { opacity: .25; cursor: default; }
.linkish { border: 0; background: none; padding: 0; color: var(--rock); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.pill { display: inline-block; white-space: nowrap; font: 600 10.5px/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; padding: 4px 7px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); vertical-align: 2px; }
.pill.planned { background: var(--sky-50); color: var(--sky); box-shadow: inset 0 0 0 1px rgba(29, 90, 122, .25); }
.pill.ok { background: var(--fair-50); color: var(--fair-d); }
.pill.bad { background: var(--rock-50); color: var(--rock-d); }
.pill.type { background: var(--sand-l); color: #7A5A1E; }
.pill.range { background: var(--sky-50); color: var(--sky); }
.pill.course { background: var(--fair-50); color: var(--fair-d); }
.conf { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin: 0 6px 0 2px; vertical-align: 0; box-shadow: 0 0 0 2px rgba(255,255,255,.9); }
.conf-green, .cb-green { background: var(--green); } .conf-orange, .cb-orange { background: var(--orange); } .conf-red, .cb-red { background: var(--red); }
.empty { padding: 20px; color: var(--muted); text-align: center; }
.hint { font-size: 13px; color: var(--muted); margin: 8px 0; }
.hint.pad { padding: 0 16px 14px; }
.seg { display: inline-flex; background: var(--line-2); padding: 4px; border-radius: 999px; gap: 2px; margin: 4px 0 14px; max-width: 100%; overflow-x: auto; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.seg button.on { background: var(--paper); color: var(--sky-d); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.row-actions { display: flex; gap: 6px; align-items: center; }
.row-actions.flexwrap { flex-wrap: wrap; }
ul.tight, ol.tight { padding-left: 20px; margin: 8px 0; } .tight li { margin: 5px 0; }

/* ---------- toggle + confidence ---------- */
.switch { position: relative; width: 44px; height: 26px; border-radius: 999px; border: 0; background: #D8D2C6; transition: background .2s; flex: none; padding: 0; }
.switch span { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch.on { background: var(--fair); }
.switch.on span { transform: translateX(18px); }
.confsel { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--line-2); }
.cdot { width: 26px; height: 26px; border-radius: 50%; border: 0; padding: 0; opacity: .28; transition: opacity .15s, transform .15s; }
.cdot.c-green { background: var(--green); } .cdot.c-orange { background: var(--orange); } .cdot.c-red { background: var(--red); }
.cdot.on { opacity: 1; box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px currentColor; transform: scale(.82); }
.cdot.c-green.on { color: var(--green); } .cdot.c-orange.on { color: var(--orange); } .cdot.c-red.on { color: var(--red); }
.cdot:hover { opacity: .7; }

/* ---------- bag ---------- */
.bag-grid { display: grid; gap: 0 18px; grid-template-columns: minmax(0, 1fr); }
.bag-col, .picker-grid > *, .hc-grid > * { min-width: 0; }
.clubs, .dream-list { list-style: none; margin: 0; padding: 0; }
.club { border-bottom: 1px solid var(--line-2); padding: 10px 12px 10px 14px; }
.club:last-child { border-bottom: 0; }
.club-main { display: flex; align-items: center; gap: 12px; cursor: pointer; border-radius: 10px; }
.club-badge { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font: 700 15px/1 var(--display); color: #fff; background: var(--sky); letter-spacing: -.02em; box-shadow: inset 0 -3px 0 rgba(0,0,0,.15); }
.club-badge.t-driver, .club-badge.t-wood { background: linear-gradient(160deg, #234d63, var(--sky-d)); }
.club-badge.t-hybrid { background: linear-gradient(160deg, var(--rock-l), var(--rock)); }
.club-badge.t-iron { background: linear-gradient(160deg, #6E8A86, #44605C); }
.club-badge.t-wedge { background: linear-gradient(160deg, var(--fair-l), var(--fair)); }
.club-badge.t-putter { background: linear-gradient(160deg, var(--sand), var(--sand-d)); color: #5b4313; }
.club.is-planned .club-badge { background: repeating-linear-gradient(135deg, #e2edf2 0 6px, #cfe1ea 6px 12px); color: var(--sky); box-shadow: inset 0 0 0 1.5px rgba(29,90,122,.35); }
.club-txt { min-width: 0; flex: 1; }
.club-name { font-weight: 650; font-size: 15.5px; }
.club-meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.club-dist { text-align: right; flex: none; line-height: 1.1; }
.club-dist b { display: block; font: 650 22px/1 var(--display); color: var(--sky-d); font-variant-numeric: tabular-nums; }
.club-dist b.sm { font-size: 16px; }
.club-dist span { font-size: 11px; color: var(--muted); }
.club-ctl { display: flex; align-items: center; gap: 10px; margin: 8px 0 0 58px; }
.ctl-sp { flex: 1; }
.reorder { display: flex; }
.reorder .ib { width: 30px; height: 30px; }
.club.inactive .club-badge { filter: grayscale(.7); opacity: .7; }
.club.inactive .club-name { color: var(--ink-2); }

.ladder .gap-rows { display: grid; gap: 7px; }
.gap-row { display: grid; grid-template-columns: 40px 1fr 34px; align-items: center; gap: 8px; }
.gap-club { font: 650 13px/1 var(--display); color: var(--sky-d); text-align: right; }
.gap-track { position: relative; height: 22px; background: var(--line-2); border-radius: 7px; overflow: hidden; }
.gap-total { position: absolute; inset: 0 auto 0 0; background: rgba(242, 212, 155, .7); border-radius: 7px; }
.gap-bar { position: absolute; inset: 0 auto 0 0; border-radius: 7px; opacity: .9; }
.gap-row.planned .gap-bar { background: repeating-linear-gradient(135deg, var(--sky-l) 0 5px, #9cc6da 5px 10px) !important; }
.gap-val { position: absolute; right: 8px; top: 0; line-height: 22px; font-size: 12px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.gap-val em { font-style: normal; font-weight: 500; color: var(--ink-2); }
.gap-diff { font-size: 11.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.gap-diff.warn { color: var(--rock); } .gap-diff.tight { color: var(--orange); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 5px; vertical-align: -2px; }
.legend i.hatch { background: repeating-linear-gradient(135deg, var(--sky-l) 0 3px, #9cc6da 3px 6px); }

.dream .plan { margin: 12px 14px 4px; padding: 12px 14px; border-radius: var(--r-sm); background: linear-gradient(135deg, var(--sand-l), #FDF3E0); border: 1px dashed var(--sand-d); cursor: pointer; }
.plan .plan-text { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.dream-row { display: flex; align-items: center; gap: 6px; padding: 9px 8px 9px 14px; border-bottom: 1px solid var(--line-2); }
.dream-row:last-child { border: 0; }
.dr-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; cursor: pointer; }
.dr-num { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--sand-l); color: #7A5A1E; font-weight: 700; font-size: 12px; }
.dr-txt { flex: 1; min-width: 0; }
.dream-row .club-dist b { font-size: 18px; }

/* ---------- picker ---------- */
.picker-grid { display: grid; gap: 16px; align-items: start; grid-template-columns: minmax(0, 1fr); }
.hero-pick { padding: 18px; background: radial-gradient(500px 200px at 100% 0%, rgba(242, 212, 155, .45), transparent 70%), var(--paper); scroll-margin-top: 90px; }
.yd-label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--rock); text-align: center; }
.yd-row { display: flex; align-items: center; gap: 10px; margin: 8px 0 12px; }
.step { flex: none; width: 58px; height: 58px; border-radius: 18px; border: 0; background: var(--sand-l); color: #6c4d14; font-weight: 750; font-size: 17px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.06); }
.step:active { transform: translateY(1px); background: var(--sand); }
.yd-wrap { position: relative; flex: 1; min-width: 0; }
.yd { width: 100%; text-align: center; font: 700 64px/1 var(--display); color: var(--sky-d); border: 2px solid var(--line); background: #fff; border-radius: 22px; padding: 14px 52px 12px 12px; -moz-appearance: textfield; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.yd::-webkit-outer-spin-button, .yd::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.yd:focus { outline: none; border-color: var(--sky-l); box-shadow: 0 0 0 4px rgba(95, 163, 196, .25); }
.yd-unit { position: absolute; right: 16px; bottom: 18px; font-weight: 600; color: var(--muted); font-size: 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 14px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; font-weight: 600; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--sand-d); }
.result { display: flex; gap: 16px; align-items: center; padding: 16px; border-radius: 20px; color: #FFF6E6; background: linear-gradient(135deg, var(--fair-d), var(--fair) 60%, #4f9446); box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.result::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 220px; height: 140px; border-radius: 50%; background: rgba(255,255,255,.07); }
.result.empty { background: var(--line-2); color: var(--muted); box-shadow: none; justify-content: center; }
.res-club { flex: none; width: 92px; height: 92px; border-radius: 26px; display: grid; place-items: center; background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.25); }
.res-short { font: 700 34px/1 var(--display); letter-spacing: -.03em; }
.res-body { min-width: 0; position: relative; z-index: 1; }
.res-name { font-weight: 600; font-size: 14px; opacity: .9; }
.res-name .conf { box-shadow: 0 0 0 2px rgba(255,255,255,.6); }
.res-swing { font: 650 30px/1.1 var(--display); margin: 2px 0 4px; }
.res-pct { font: 600 16px/1 var(--sans); background: rgba(255,255,255,.18); padding: 4px 8px; border-radius: 999px; vertical-align: 5px; }
.res-note { font-size: 13px; opacity: .85; }
.runner { margin: 10px 4px 0; font-size: 14px; color: var(--ink-2); }
.runner .muted { text-transform: uppercase; font-size: 11px; letter-spacing: .1em; font-weight: 700; margin-right: 6px; }
.inline-check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); margin-top: 14px; }
.inline-check input { width: 18px; height: 18px; accent-color: var(--fair); }
.chart-card { padding: 16px 0 0; }
.chart-card .list-head { padding: 0 16px 10px; }
.chart-scroll { max-height: 520px; overflow-y: auto; border-top: 1px solid var(--line-2); scroll-behavior: smooth; }
.ychart { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 14px; }
.ychart th { position: sticky; top: 0; background: var(--paper); text-align: left; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--line); z-index: 1; }
.ychart td { padding: 7px 12px; border-bottom: 1px solid var(--line-2); }
.ychart tr[data-y] { cursor: pointer; }
.ychart tr[data-y]:hover td { background: var(--sand-l); }
.ychart .yy { font-weight: 700; color: var(--sky-d); width: 56px; }
.ychart .cl { white-space: nowrap; }
.ychart tr.is-planned td.cl b { color: var(--sky); }
.ychart tr.hl td { background: var(--rock) !important; color: #fff; }
.ychart tr.hl td.muted, .ychart tr.hl .yy, .ychart tr.hl b { color: #fff !important; }
.ychart tr.hl .conf { box-shadow: 0 0 0 2px #fff; }
.r { text-align: right !important; }

/* ---------- rounds ---------- */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); }
.kpi b { display: block; font: 650 24px/1.1 var(--display); color: var(--sky-d); font-variant-numeric: tabular-nums; }
.kpi span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.rounds { display: grid; gap: 0 16px; }
.round { padding: 0; overflow: hidden; }
.round-top { display: flex; gap: 12px; align-items: center; padding: 14px 16px 10px; cursor: pointer; }
.round-date { flex: none; width: 56px; text-align: center; border-radius: 12px; background: var(--sky-50); padding: 7px 0; line-height: 1.1; }
.round-date b { display: block; font: 650 15px/1.1 var(--display); color: var(--sky-d); }
.round-date span { font-size: 11px; color: var(--sky); font-weight: 600; }
.round-info { flex: 1; min-width: 0; }
.round-course { font-weight: 700; font-size: 16px; }
.round-meta { font-size: 12.5px; color: var(--muted); }
.round-score { text-align: right; flex: none; }
.round-score b { display: block; font: 700 34px/1 var(--display); color: var(--sky-d); }
.round-score span { font-weight: 700; font-size: 13px; }
.round-score .over { color: var(--rock); } .round-score .under { color: var(--fair); }
.hdots { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; padding: 0 16px 10px; }
.hd { display: grid; place-items: center; height: 30px; border-radius: 9px; font-weight: 700; font-size: 13.5px; background: var(--line-2); font-variant-numeric: tabular-nums; }
.hd.eagle { background: #F2C14E; color: #5b4313; } .hd.birdie { background: var(--rock); color: #fff; border-radius: 50%; } .hd.par { background: var(--fair-50); color: var(--fair-d); box-shadow: inset 0 0 0 1.5px rgba(63,127,58,.35); }
.hd.bogey { background: var(--sand-l); color: #7A5A1E; } .hd.double { background: #F5D3C5; color: var(--rock-d); } .hd.worse { background: var(--rock-d); color: #fff; }
.hd.none { color: var(--muted); }
.round-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 0 16px 6px; font-size: 13px; color: var(--ink-2); }
.round-stats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.round-stats em.warn { font-style: normal; color: var(--rock); font-weight: 600; }
.dist { display: flex; flex-wrap: wrap; gap: 5px; padding: 2px 16px 12px; }
.dist i { font-style: normal; font-size: 11.5px; font-weight: 650; padding: 3px 8px; border-radius: 999px; }
.dist .birdie { background: var(--rock-50); color: var(--rock-d); } .dist .par { background: var(--fair-50); color: var(--fair-d); } .dist .bogey { background: var(--sand-l); color: #7A5A1E; } .dist .double { background: #F5D3C5; color: var(--rock-d); } .dist .worse { background: var(--rock-d); color: #fff; } .dist .eagle { background: #F2C14E; }
.more { display: block; width: 100%; border: 0; border-top: 1px solid var(--line-2); background: none; padding: 10px; font-weight: 600; color: var(--sky); font-size: 13px; }
.more:hover { background: var(--sky-50); }
.round-detail { border-top: 1px solid var(--line-2); padding: 12px 16px 16px; background: #FFFCF4; }
.sc-wrap { overflow-x: auto; margin-bottom: 10px; -webkit-overflow-scrolling: touch; }
.scorecard { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 340px; font-variant-numeric: tabular-nums; font-size: 13px; text-align: center; }
.scorecard th, .scorecard td { padding: 5px 3px; border-bottom: 1px solid var(--line-2); }
.scorecard thead th { background: var(--sky-d); color: var(--sand-l); font-weight: 650; font-size: 12px; }
.scorecard thead th:first-child { border-radius: 8px 0 0 0; } .scorecard thead th:last-child { border-radius: 0 8px 0 0; }
.scorecard tbody th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 650; padding-left: 6px; white-space: nowrap; }
.scorecard .hd { height: 26px; width: 26px; margin: 0 auto; font-size: 12.5px; }
.scorecard td.warn { color: var(--rock); font-weight: 700; }
.scorecard td.fir { color: var(--fair); font-weight: 700; }
.scorecard.edit input { width: 100%; min-width: 30px; max-width: 46px; text-align: center; border: 1px solid var(--line); border-radius: 8px; padding: 7px 0; background: #fff; font-variant-numeric: tabular-nums; font-size: 15px; }
.scorecard.edit .score-row input { font-weight: 700; border-color: var(--sand-d); background: #FFFBF0; }
.scorecard.edit .muted input { font-size: 12.5px; color: var(--muted); }
.firbtn { width: 100%; min-width: 30px; max-width: 46px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 700; color: var(--muted); }
.firbtn[data-fir="hit"] { background: var(--fair-50); color: var(--fair-d); border-color: rgba(63,127,58,.4); }
.firbtn[data-fir="L"], .firbtn[data-fir="R"] { background: var(--rock-50); color: var(--rock-d); }
.firbtn:disabled { background: var(--line-2); border-color: transparent; }
.live-tot { font-size: 14px; color: var(--ink-2); margin: 4px 0 10px; }
.rd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.rd-grid dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.rd-grid dd { margin: 0; font-weight: 600; }
.notes { background: var(--sand-l); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; color: var(--ink-2); margin: 10px 0; }

/* ---------- drills ---------- */
.drills { display: grid; gap: 0 16px; }
.drill { position: relative; overflow: hidden; display: flex; flex-direction: column; }
.drill dl { flex: 1; align-content: start; }
.drill::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--sky-l); }
.drill.w-course::before { background: var(--fair-l); }
.drill-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.drill-top .muted { text-align: right; }
.drill h3 { font-size: 21px; color: var(--sky-d); margin: 8px 0 4px; }
.drill .purpose { margin: 0 0 10px; color: var(--ink-2); }
.drill dl { margin: 0; display: grid; grid-template-columns: 74px 1fr; gap: 6px 10px; font-size: 13.5px; }
.drill dt { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--rock); padding-top: 2px; }
.drill dd { margin: 0; }
.drill-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.best { font-size: 13.5px; }

/* ---------- bucket ---------- */
.progress { height: 10px; background: var(--line-2); border-radius: 999px; overflow: hidden; margin: -4px 0 14px; }
.progress div { height: 100%; background: linear-gradient(90deg, var(--fair), var(--fair-l)); border-radius: 999px; min-width: 10px; }
.region { font-size: 13px; font-family: var(--sans); font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: var(--rock); margin: 18px 0 8px; display: flex; align-items: center; gap: 10px; }
.region::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.bucket { display: block; }
.bucket-wrap { column-gap: 16px; }
.region-block { break-inside: avoid; padding-top: 2px; }
.region-block:first-child .region { margin-top: 4px; }
.bk { display: flex; gap: 12px; padding: 14px; margin-bottom: 12px; }
.bk-check { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); background: #fff; color: transparent; display: grid; place-items: center; transition: all .15s; }
.bk-check:hover { border-color: var(--fair-l); color: var(--fair-l); }
.bk-check.on { background: var(--fair); border-color: var(--fair); color: #fff; }
.bk-txt { flex: 1; min-width: 0; cursor: pointer; }
.bk h3 { font-size: 18px; color: var(--sky-d); }
.bk p { margin: 2px 0; }
.bk .desc { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; }
.bk.st-played { background: linear-gradient(135deg, #F3F8EE, var(--paper)); }
.bk.st-played h3 { color: var(--fair-d); }
.bk.st-planned { box-shadow: inset 4px 0 0 var(--sky-l), var(--shadow); }

/* ---------- handicap ---------- */
.hc-grid { display: grid; gap: 0 16px; grid-template-columns: minmax(0, 1fr); }
.hc-hero { text-align: center; background: radial-gradient(400px 220px at 50% 0%, rgba(95,163,196,.18), transparent 70%), var(--paper); }
.hc-num { font: 700 84px/1 var(--display); color: var(--sky-d); letter-spacing: -.04em; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.hc-num.pending { color: #C3B9A6; font: 300 64px/1.1 var(--sans); letter-spacing: .06em; }
.hc-note { display: flex; gap: 10px; text-align: left; background: var(--sand-l); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; color: var(--ink-2); margin: 0 auto 12px; max-width: 460px; }
.hc-note .ic { color: var(--rock); margin-top: 2px; }
.hc-meter { position: relative; height: 24px; background: var(--line-2); border-radius: 999px; overflow: hidden; max-width: 460px; margin: 0 auto 14px; }
.hc-meter div { height: 100%; background: linear-gradient(90deg, var(--sky), var(--sky-l)); }
.hc-meter span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ink); }
.hc-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.hc-mini div { background: var(--cream); border-radius: 12px; padding: 8px; }
.hc-mini dt { font-size: 11px; color: var(--muted); font-weight: 650; }
.hc-mini dd { margin: 0; font: 650 18px/1.3 var(--display); color: var(--sky-d); }
.trend { width: 100%; height: auto; }
.trend .grid { stroke: var(--line); stroke-dasharray: 3 5; }
.trend .ax { font-size: 12px; fill: var(--muted); font-family: var(--sans); }
.trend .ln { fill: none; stroke: var(--sky); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.trend .dot { fill: var(--rock); stroke: #fff; stroke-width: 2; }
.chart-empty { text-align: center; color: var(--muted); padding: 10px 0; }
.ghost-chart { width: 100%; max-width: 360px; color: var(--line); }
.tbl-scroll { overflow-x: auto; }
.data { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.data th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.data tr.used td { background: var(--fair-50); }
.how h2 { font-size: 19px; color: var(--sky-d); margin-bottom: 6px; }
.how li { font-size: 13.5px; color: var(--ink-2); }

/* ---------- modal ---------- */
dialog { border: 0; padding: 0; border-radius: 22px; width: min(560px, calc(100vw - 20px)); max-height: calc(100dvh - 24px); background: var(--paper); color: var(--ink); box-shadow: var(--shadow-lg); }
dialog.wide { width: min(860px, calc(100vw - 20px)); }
dialog::backdrop { background: rgba(15, 30, 36, .5); backdrop-filter: blur(3px); }
dialog form { display: flex; flex-direction: column; max-height: calc(100dvh - 24px); }
.m-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px 20px; border-bottom: 1px solid var(--line-2); }
.m-head h2 { font-size: 21px; color: var(--sky-d); }
.m-body { padding: 14px 20px; overflow-y: auto; flex: 1; }
.m-body p { margin: 0 0 10px; }
.m-foot { display: flex; gap: 8px; padding: 12px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--line-2); background: var(--cream); border-radius: 0 0 22px 22px; }
.m-foot .sp { flex: 1; }
.m-h { font-size: 16px; color: var(--sky-d); margin: 10px 0 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin-bottom: 12px; }
.fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fld.full, .chk.full { grid-column: 1 / -1; }
.fld span { font-size: 12px; font-weight: 650; color: var(--ink-2); }
.fld input, .fld select, .fld textarea, .sw-row input { width: 100%; border: 1.5px solid var(--line); border-radius: 11px; padding: 10px 11px; background: #fff; font-size: 15px; min-width: 0; }
.fld input:focus, .fld select:focus, .fld textarea:focus, .sw-row input:focus, .scorecard.edit input:focus { outline: none; border-color: var(--sky-l); box-shadow: 0 0 0 3px rgba(95,163,196,.22); }
.fld textarea { resize: vertical; }
.chk { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 550; padding: 4px 0; }
.chk input { width: 19px; height: 19px; accent-color: var(--fair); }
.swings { display: grid; gap: 8px; margin: 8px 0 14px; }
.sw-row { display: grid; grid-template-columns: 1fr 110px; gap: 8px; }
.pct { position: relative; } .pct span { position: absolute; right: 12px; top: 11px; color: var(--muted); font-weight: 600; }
.ver { margin-top: 14px !important; }

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 60; background: var(--sky-d); color: #FFF6E6; padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); transition: all .25s; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--rock-d); }
.foot { display: flex; align-items: center; gap: 8px; justify-content: center; color: var(--muted); font-size: 12.5px; padding: 18px 16px 24px; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 639px) {
  .hide-sm { display: none; }
  .scorecard { font-size: 12px; min-width: 0; }
  .scorecard th, .scorecard td { padding: 5px 1px; }
  .scorecard .hd { width: 22px; height: 22px; font-size: 11.5px; border-radius: 7px; }
  .scorecard.edit input, .scorecard.edit .firbtn { min-width: 27px; font-size: 14px; padding: 6px 0; }
  .scorecard.edit .firbtn { height: 32px; }
  .m-body { padding: 12px 14px; }
}
@media (max-width: 380px) {
  .yd { font-size: 54px; } .step { width: 50px; height: 50px; }
  .res-club { width: 76px; height: 76px; } .res-short { font-size: 28px; } .res-swing { font-size: 25px; }
  .club-ctl { margin-left: 0; }
}
@media (min-width: 640px) {
  .kpis { grid-template-columns: repeat(6, 1fr); }
  .drills { grid-template-columns: 1fr 1fr; }
  .bucket-wrap { columns: 2; }
  .rounds { grid-template-columns: 1fr; }
  .sec-head h1 { font-size: 40px; }
}
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .bottomnav { display: none; }
  .topnav { display: flex; }
  .gear { margin-left: 4px; }
  .wrap { padding: 0 28px; }
  .topbar-in { padding: 12px 28px 6px; }
  .brand img { width: 46px; height: 46px; }
  .sec-head { margin: 22px 0 20px; }
  .sec-head h1 { font-size: 46px; }
  .picker-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; }
  .hero-pick { position: sticky; top: 100px; padding: 28px; }
  .yd { font-size: 92px; padding: 18px 70px 14px 16px; }
  .yd-unit { font-size: 16px; bottom: 26px; right: 22px; }
  .step { width: 72px; height: 72px; font-size: 19px; }
  .res-club { width: 120px; height: 120px; border-radius: 30px; } .res-short { font-size: 46px; } .res-swing { font-size: 38px; }
  .result { padding: 22px; gap: 22px; }
  .chart-scroll { max-height: calc(100vh - 210px); }
  .bag-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
  .club { display: flex; align-items: center; gap: 14px; padding: 9px 10px 9px 14px; }
  .club-main { flex: 1; min-width: 0; }
  .club-ctl { margin: 0; gap: 12px; }
  .club-ctl .ctl-sp { display: none; }
  .club:hover { background: #FFFBF1; }
  .hc-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: stretch; }
  .hc-grid > .card { margin-bottom: 16px; }
  .toast { bottom: 28px; }
  .rounds { grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (min-width: 1200px) {
  .drills { grid-template-columns: 1fr 1fr 1fr; }
  .bucket-wrap { columns: 3; }
  .nav-btn { padding: 8px 14px; }
}
@media (min-width: 900px) and (max-width: 1100px) {
  .topnav .nav-btn .lbl-long { display: none; } .topnav .nav-btn .lbl-short { display: inline; }
  .brand-txt small { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
