/* Attest Golf — one stylesheet. Light by default, dark optional. */
:root {
  color-scheme: light;
  --paper: #F5F6F3;
  --surface: #FFFFFF;
  --surface-2: #EEF1EC;
  --ink: #14201A;
  --muted: #5D6A62;
  --faint: #8A958E;
  --line: #DFE4DE;
  --green: #1D5A3E;
  --green-ink: #FFFFFF;
  --green-soft: #E6EEE8;
  --ochre: #94660F;
  --ochre-soft: #FBF3E0;
  --red: #A3352E;
  --radius: 14px;
  --radius-s: 10px;
  --tabbar: 64px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #121915;
  --surface: #1A231E;
  --surface-2: #233029;
  --ink: #EEF3EF;
  --muted: #A3B1A8;
  --faint: #7D8B83;
  --line: #2D3A33;
  --green: #7CC39C;
  --green-ink: #0D1A13;
  --green-soft: #1F3328;
  --ochre: #E2B866;
  --ochre-soft: #33291A;
  --red: #F09A92;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.45 var(--font); -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--green); }
:focus-visible { outline: 2.5px solid var(--green); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- layout ---------- */
#view {
  max-width: 640px; margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 12px) 16px calc(var(--tabbar) + env(safe-area-inset-bottom) + 28px);
}
body.in-flow #view { padding-bottom: calc(env(safe-area-inset-bottom) + 120px); }
body.in-flow #tabs { display: none; }
.page-head { margin: 8px 0 18px; }
.page-head h1, .flow-top h1 { font-family: var(--display); }
h1 { font-size: 30px; line-height: 1.1; letter-spacing: -0.02em; margin: 0; font-weight: 700; }
h2 { font-size: 18px; line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 10px; font-weight: 650; }
h3 { font-size: 16px; margin: 0; font-weight: 600; }
.wordmark { margin: 0 0 4px; font-weight: 700; color: var(--green); font-size: 15px; letter-spacing: -0.01em; }
.lead { color: var(--muted); margin: 6px 0 0; font-size: 16px; }
.fine { color: var(--muted); font-size: 13.5px; line-height: 1.45; margin: 8px 0 0; }
.center { text-align: center; }
.muted { color: var(--muted); font-weight: 400; }
.est { font-size: 11.5px; font-weight: 600; color: var(--ochre); background: var(--ochre-soft); border-radius: 6px; padding: 1px 6px; vertical-align: 2px; }

/* ---------- groups (inset grouped lists) ---------- */
.group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 14px; }
.group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.more-link { font-size: 15px; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.month { font-size: 13px; color: var(--muted); font-weight: 600; margin: 0 0 2px; }
.li { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 9px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.group > .li:first-child, .group > h2 + .li, .group > h3 + .li, .group > .group-head + .li { border-top: 0; }
.li-main { flex: 1; min-width: 0; }
.li-main b { font-weight: 600; }
.li-main small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 1px; }
.li-val { font-weight: 600; text-align: right; white-space: nowrap; }
.li-val small { color: var(--muted); font-weight: 500; }
.li .ic:last-child { color: var(--faint); flex: none; }
.li.used .li-val { color: var(--green); }
.btn-li { width: 100%; background: none; border: 0; border-top: 1px solid var(--line); text-align: left; padding: 9px 0; cursor: pointer; }
.group > h2 + .btn-li { border-top: 0; }
.li-score { text-align: right; }
.li-score b { display: block; font-size: 22px; font-weight: 650; line-height: 1.1; }
.li-score small { color: var(--muted); font-size: 13px; }
.good { color: var(--green); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}
.btn:active { transform: scale(.985); }
.btn.primary { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.btn.danger { color: var(--red); }
.btn.block { width: 100%; margin: 0 0 10px; }
.btn.big { min-height: 56px; font-size: 17px; margin-bottom: 16px; }
.btn.small { min-height: 44px; padding: 0 14px; font-size: 15px; }
.btn:disabled { opacity: .45; cursor: default; }
.btn-row { display: flex; gap: 10px; margin: 12px 0; }
.btn-row > .btn { flex: 1; }
.btn-row.wrap { flex-wrap: wrap; }
.icon-btn { min-width: 48px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; border-radius: 12px; cursor: pointer; color: var(--ink); }
.link-btn { background: none; border: 0; color: var(--green); font-weight: 600; padding: 0 4px; min-height: 44px; cursor: pointer; font-size: 15px; }
.nav-back { display: inline-flex; align-items: center; gap: 2px; background: none; border: 0; color: var(--green); font-size: 16px; min-height: 44px; padding: 0 8px 0 0; margin-left: -6px; cursor: pointer; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; font-size: 100px; cursor: pointer; }

/* ---------- segmented / chips ---------- */
.seg { display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 3px; margin: 0 0 6px; }
.seg button { flex: 1; min-height: 44px; border: 0; background: none; border-radius: 9px; font-weight: 600; font-size: 15px; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 32, 26, .12); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-width: 48px; min-height: 48px; padding: 4px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 17px; cursor: pointer;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1;
}
.chip small { font-size: 11px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.chip.on { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.chip.on small { color: var(--green-ink); opacity: .85; }
.chips.score-chips { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.chips.score-chips .chip { min-width: 0; padding: 4px 0; min-height: 56px; }
.chips.zone-chips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.chips.zone-chips .chip { min-width: 0; padding: 4px 2px; min-height: 56px; }
.chips.small .chip { font-size: 15px; min-height: 44px; }
.chips:not(.score-chips):not(.zone-chips) > .chip { flex: 1; }
.mini-seg { display: flex; gap: 6px; }
.stepper { display: flex; gap: 8px; margin-top: 8px; }

/* ---------- fields ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; flex: 1; min-width: 0; }
.field > span { font-size: 14px; color: var(--muted); font-weight: 500; }
.field.inline { flex-direction: row; align-items: center; margin-top: 10px; }
.field.inline input { flex: 1; }
.field-row { display: flex; gap: 10px; }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s);
  background: var(--surface); font-size: 16px;
}
textarea { min-height: 72px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px var(--green-soft); }
input.need { border-color: var(--ochre); background: var(--ochre-soft); }
.search { display: flex; gap: 8px; }
.search .btn { padding: 0 14px; }
.switch { display: flex; align-items: center; gap: 12px; min-height: 48px; border-top: 1px solid var(--line); cursor: pointer; }
.group h2 + .switch { border-top: 0; }
.switch input { width: 22px; min-height: 22px; height: 22px; accent-color: var(--green); }

/* ---------- notes, banners ---------- */
.note { display: flex; gap: 10px; align-items: flex-start; background: var(--green-soft); color: var(--ink); border-radius: var(--radius-s); padding: 11px 12px; margin: 0 0 12px; font-size: 14.5px; }
.note .ic { flex: none; margin-top: 1px; color: var(--green); }
.note.warn { background: var(--ochre-soft); }
.note.warn .ic { color: var(--ochre); }
.demo-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 12px; padding: 8px 8px 8px 14px; border-radius: var(--radius-s); background: var(--ink); color: var(--paper); font-size: 14px; }
.demo-bar .btn { background: var(--paper); color: var(--ink); border: 0; flex: none; }
.demo-bar.update { background: var(--green); color: var(--green-ink); }
:root[data-theme="dark"] .demo-bar:not(.update) { background: var(--surface-2); color: var(--ink); }
:root[data-theme="dark"] .demo-bar:not(.update) .btn { background: var(--ink); color: var(--paper); }
.resume { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: var(--radius-s); padding: 10px 10px 10px 14px; margin: 0 0 12px; text-decoration: none; color: var(--ink); }
.resume.warn { border-left-color: var(--ochre); }
.resume small { display: block; color: var(--muted); font-size: 13.5px; }
.errors p { color: var(--red); margin: 6px 0 0; }
.mock { color: var(--ochre); font-weight: 600; }

/* ---------- home ---------- */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0 0 14px; }
.kpi { background: var(--surface); padding: 13px 14px 12px; display: flex; flex-direction: column; color: var(--ink); text-decoration: none; min-height: 92px; }
.k-label { font-size: 13.5px; color: var(--muted); }
.k-val { font-size: 30px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; margin-top: 2px; }
.kpi small { color: var(--faint); font-size: 12.5px; }
.legend { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.legend .ln { display: inline-block; width: 16px; height: 0; border-top: 2px solid var(--green); }
.legend .ln.roll { border-top: 2px dashed var(--faint); margin-left: 6px; }
.chart { width: 100%; height: auto; display: block; margin-top: 6px; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--faint); font-size: 10.5px; font-family: var(--font); }
.chart .line { fill: none; stroke: var(--green); stroke-width: 2; stroke-linejoin: round; }
.chart .roll { fill: none; stroke: var(--faint); stroke-width: 1.6; stroke-dasharray: 4 4; }
.chart .dot { fill: var(--surface); stroke: var(--green); stroke-width: 1.8; }
.coach .coach-title { font-size: 19px; font-weight: 650; margin: 0 0 6px; letter-spacing: -0.01em; }
.coach p { margin: 0 0 8px; }
.coach .advice { border-left: 3px solid var(--green); padding-left: 10px; }
.coach .recur { color: var(--muted); font-size: 14.5px; }
.coach .recur.yes { color: var(--ochre); font-weight: 600; }
.coach .pattern { font-size: 14.5px; color: var(--muted); margin-top: 10px; }
.coach .btn { margin-top: 6px; }
.others summary { min-height: 44px; display: flex; align-items: center; color: var(--green); font-weight: 600; cursor: pointer; margin-top: 8px; }
.other { border-top: 1px solid var(--line); padding: 10px 0 2px; }
.other p { color: var(--muted); font-size: 14.5px; margin: 2px 0 0; }
.empty-state p { color: var(--muted); }

/* ---------- report / scorecard ---------- */
.score-hero { display: flex; align-items: center; gap: 18px; margin: 0 0 14px; }
.score-hero .big { font-family: var(--display); font-size: 64px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.score-hero small { display: block; color: var(--muted); }
.hero-side { display: flex; flex-direction: column; gap: 2px; color: var(--muted); }
.hero-side .topar { font-size: 24px; font-weight: 650; color: var(--ink); }
.sc-wrap { display: flex; flex-direction: column; gap: 10px; overflow-x: auto; }
.sc { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: 14px; }
.sc th, .sc td { text-align: center; padding: 0; height: 30px; border-bottom: 1px solid var(--line); }
.sc thead th { font-size: 12px; color: var(--muted); font-weight: 600; height: 24px; }
.sc th[scope="row"] { text-align: left; width: 46px; font-size: 12px; color: var(--muted); font-weight: 600; }
.sc .tot { width: 34px; font-weight: 650; }
.sc tr.par td { color: var(--muted); font-size: 13px; }
.sc tr.score td { height: 36px; }
.sc tr.sub td { font-size: 12.5px; color: var(--muted); height: 26px; }
.mk { display: inline-flex; align-items: center; justify-content: center; width: 25px; height: 25px; font-weight: 650; font-size: 14.5px; }
.mk.birdie { border: 1.5px solid var(--ink); border-radius: 50%; }
.mk.eagle { border: 1.5px solid var(--ink); border-radius: 50%; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--ink); }
.mk.bogey { border: 1.5px solid var(--ink); border-radius: 3px; }
.mk.double { border: 1.5px solid var(--ink); border-radius: 3px; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--ink); }
.mk.empty { color: var(--faint); }
.fw-hit { color: var(--green); font-size: 10px; }
.miss { color: var(--ochre); font-weight: 700; }
.sc-key { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12.5px; color: var(--muted); align-items: center; }
.sc-key .mk { width: 20px; height: 20px; font-size: 11.5px; margin-right: 3px; }
.sc-total { margin-left: auto; color: var(--ink); }
.photo-box summary { min-height: 44px; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
.photo-box img, .scan-preview { width: 100%; border-radius: var(--radius-s); margin-top: 8px; border: 1px solid var(--line); }
.split { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; margin: 12px 0 8px; }

.split .bar-seg, .split-key .sw { display: block; min-width: 3px; }
.split .c1, .split-key .c1 { background: var(--green); }
.split .c2, .split-key .c2 { background: color-mix(in srgb, var(--green) 45%, var(--surface)); }
.split .c3, .split-key .c3 { background: color-mix(in srgb, var(--ochre) 45%, var(--surface)); }
.split .c4, .split-key .c4 { background: var(--ochre); }
.split .c5, .split-key .c5 { background: var(--red); }
.split-key { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.split-key span { display: inline-flex; align-items: center; gap: 5px; }
.split-key .sw { width: 9px; height: 9px; border-radius: 3px; }
.split-key b { color: var(--ink); font-weight: 600; }
.sub-h { margin: 16px 0 6px; font-size: 15px; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.tbl th, .tbl td { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: center; }
.tbl thead th { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.tbl tbody th { text-align: left; font-weight: 650; }
.tbl tbody th small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.hole-tbl input { min-height: 44px; padding: 6px; text-align: center; }
.prose p, .prose li { color: var(--ink); font-size: 15px; }
.prose ul { padding-left: 20px; margin: 8px 0 0; }

/* ---------- practice ---------- */
.plan { list-style: none; margin: 0 0 14px; padding: 0; }
.drill { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 10px; }
.drill-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.drill-head small { color: var(--muted); font-size: 13px; }
.drill-min { flex: none; width: 52px; height: 52px; border-radius: 12px; background: var(--green-soft); color: var(--green); display: flex; align-items: center; justify-content: center; font-weight: 650; font-size: 14px; text-align: center; line-height: 1.1; }
.drill p { margin: 6px 0 0; font-size: 15px; }
.drill-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.drill-meta span { font-size: 14.5px; }

/* ---------- flows ---------- */
.flow-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 6px; margin: 0 -16px 12px; padding: calc(env(safe-area-inset-top) + 4px) 8px 6px; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
#view > .flow > .flow-top, .flow .flow-top { margin-top: calc(-12px - env(safe-area-inset-top)); }
.flow-top h1 { flex: 1; font-size: 18px; text-align: center; letter-spacing: -0.01em; }
.flow-top h1 small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.flow-top .spacer { width: 48px; }
.flow-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.flow-bar > * { max-width: 608px; margin-left: auto; margin-right: auto; }
.flow-bar .btn.block { margin-bottom: 8px; }
.flow-bar .btn.block:last-of-type { margin-bottom: 0; }
.flow-bar .fine { margin-top: 6px; }
.flow-bar.two { display: flex; gap: 10px; }
.flow-bar.two .btn { flex: 1; margin: 0; }
.flow-bar.two .btn.primary { flex: 1.6; }
.choice { display: flex; gap: 14px; align-items: flex-start; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; margin: 0 0 12px; cursor: pointer; min-height: 88px; }
.choice .ic { flex: none; color: var(--green); margin-top: 2px; }
.choice b { display: block; font-size: 17px; font-weight: 650; }
.choice small { display: block; color: var(--muted); font-size: 14.5px; margin-top: 3px; }
.holes { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; margin: 0 0 12px; }
.hd { min-height: 44px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; padding: 0; }
.hd.done { color: var(--ink); background: var(--green-soft); border-color: transparent; }
.hd.cur { background: var(--green); color: var(--green-ink); border-color: var(--green); }
.hole-info { display: flex; gap: 16px; font-size: 15px; color: var(--muted); margin: 0 0 6px; }
.hole-info b { color: var(--ink); font-size: 20px; }
.need-par { color: var(--ochre); font-weight: 600; }
.entry-sec { padding: 12px 0; border-bottom: 1px solid var(--line); }
.entry-sec h2 { font-size: 16px; margin-bottom: 8px; }
.entry-sec h2 small { font-weight: 400; color: var(--muted); font-size: 13.5px; margin-left: 4px; }
.entry-sec.gir p { margin: 0 0 8px; font-size: 14.5px; color: var(--muted); }
.entry > .link-btn { margin-top: 6px; }
.scan-tbl td { padding: 3px 2px; }
.scan-tbl input, .scan-tbl select { min-height: 44px; padding: 4px; text-align: center; font-size: 16px; min-width: 52px; }
.scan-tbl select { text-align-last: center; min-width: 64px; padding: 4px 2px; }
.scan-tbl .flag { border: 2px solid var(--ochre); background: var(--ochre-soft); }
.scan-tbl .flag.unclear, .scan-tbl .flag.conflict, .scan-tbl .flag.invalid { border-style: dashed; }
.restore-plan { margin-top: 12px; padding: 12px; background: var(--surface-2); border-radius: var(--radius-s); }
.restore-plan ul { margin: 6px 0; padding-left: 20px; }
.share-canvas { width: 100%; max-width: 360px; display: block; margin: 0 auto 14px; border-radius: 12px; border: 1px solid var(--line); }
.card-preview { overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 14px; padding: 10px; }
.card-scale { transform-origin: top left; }

/* ---------- onboarding ---------- */
.onboarding { padding-top: 6vh; }
.brand-mark { width: 64px; height: 64px; border-radius: 18px; background: var(--green); color: var(--green-ink); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.onboarding h1 { font-size: 34px; }
.onboarding .lead { font-size: 17px; margin: 10px 0 18px; }
.steps { padding-left: 22px; margin: 0 0 22px; }
.steps li { margin: 0 0 10px; }

/* ---------- tab bar ---------- */
#tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; justify-content: space-around;
  padding: 4px 4px env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}
.tab { flex: 1; max-width: 120px; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--faint); font-size: 11px; font-weight: 600; }
.tab.on { color: var(--green); }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 16px); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 30; background: var(--ink); color: var(--paper); padding: 11px 16px; border-radius: 12px; font-size: 15px; max-width: min(92vw, 460px); text-align: center; transition: opacity .2s ease, transform .2s ease; }
body.in-flow .toast { bottom: calc(env(safe-area-inset-bottom) + 96px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--red); color: #fff; }

/* ---------- print ---------- */
#print-root { display: none; }
@media print {
  @page { size: letter landscape; margin: 0.25in; }
  body { background: #fff; }
  #view, #tabs, .toast { display: none !important; }
  #print-root { display: block; }
}

/* Course scorecard: a visible alternative, with simple optional directions. */
.course-card-link{align-items:center;color:var(--ink);text-decoration:none;margin:16px 0 22px}
.course-card-link>span{flex:1}.course-card-link>.ic:last-child{flex:0 0 20px}
.course-help-link{display:flex;align-items:center;min-height:48px;margin:-4px 0 16px;font-weight:600}
.plain-steps{padding-left:24px}.plain-steps li{margin:14px 0;padding-left:4px}
.card-example{width:100%;min-width:0;margin-top:12px}.card-example th:first-child{width:40%;text-align:left}.card-example td{font-weight:750;font-size:18px;color:var(--green)}
.example-label{font-size:13px;font-weight:700;color:var(--muted)}
.optional-tracking>summary,.course-guide-inline>summary{padding:12px 0;min-height:48px;cursor:pointer;font-weight:700;line-height:1.4}
.tee-key{padding-left:20px}.tee-key li{margin:8px 0}.tee-key b{display:inline-block;min-width:28px}
.course-card-guide>.btn{margin-top:12px}.course-guide-inline{margin-top:12px}
.course-guide-inline .lead{font-size:17px}.scan-card-types{flex-wrap:wrap}.scan-card-types button{flex:1 1 135px;white-space:normal;min-height:48px;padding:10px}
.course-card-guide{padding-bottom:40px}.course-guide-inline .group{padding:14px}

/* Pre-round paper key; no live round tracking or phone prompts. */
.paper-key-row{display:grid;grid-template-columns:82px 1fr;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}
.paper-key-row>span{line-height:1.5}.putt-distance-key{display:grid;grid-template-columns:repeat(5,1fr);gap:5px;margin:16px 0}
.putt-distance-key>div{padding:10px 3px;text-align:center;background:var(--green-soft);border-radius:9px;color:var(--green)}
.putt-distance-key b{display:block;font-size:23px;margin-bottom:5px}.putt-distance-key span{display:block;font-size:12px;font-weight:650;line-height:1.35}
.paper-promise{border-left:4px solid var(--green);padding:12px 16px;background:var(--green-soft);border-radius:0 10px 10px 0;margin:20px 0}
@media(max-width:350px){.paper-key-row{grid-template-columns:68px 1fr;gap:8px}.putt-distance-key span{font-size:11px}}


/* Scan page: action bar sits in the page flow so it never covers content */
.flow-bar.inline { position: sticky; left: auto; right: auto; bottom: 0; margin: 16px -16px 0; }
body.in-flow #view:has(.flow-bar.inline) { padding-bottom: 0; }
.scan-privacy { margin-top: 12px; }

/* Course scorecard setup screen */
.step-tag { margin: 0 0 2px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.row-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; margin-top: 8px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.row-toggle small { display: block; margin-top: 2px; font-weight: 400; color: var(--muted); }
.row-toggle .tick { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 15px; color: transparent; }
.row-toggle[aria-checked="true"] { border-color: var(--green); background: var(--green-soft); }
.row-toggle[aria-checked="true"] .tick { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.row-toggle.fixed { opacity: .8; cursor: default; }
.label-list { list-style: none; counter-reset: lab; margin: 12px 0; padding: 0; }
.label-list li { counter-increment: lab; display: flex; align-items: center; gap: 12px; margin-top: 8px; padding: 12px 14px; border: 1.5px dashed var(--line); border-radius: 10px; font-size: 19px; letter-spacing: .04em; }
.label-list li::before { content: counter(lab); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; letter-spacing: 0; }

/* Logo placements */
.brand-logo { display: block; width: min(220px, 62vw); height: auto; margin: 0 0 18px; border-radius: 28px; box-shadow: 0 8px 24px rgba(20, 40, 30, .12); }
.about-icon { display: block; margin: 0 0 12px; border-radius: 16px; }
.par3-note { margin: 12px 0 0; padding: 10px 12px; border-left: 4px solid var(--green); background: var(--green-soft); border-radius: 0 10px 10px 0; line-height: 1.5; }

/* Course scout */
.scout-tips { margin: 0; padding: 0; list-style: none; }
.scout-tips li { padding: 10px 0; border-top: 1px solid var(--line); line-height: 1.55; }
.scout-tips li:first-child { border-top: 0; padding-top: 2px; }
.scout-summary { margin: 12px 0; padding: 12px 14px; border-left: 4px solid var(--green); background: var(--green-soft); border-radius: 0 10px 10px 0; line-height: 1.6; }
.scout-summary p { margin: 0; }
.scout-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px !important; }

/* Sample-size and validation messages */
.k-val.nd { font-size: 17px; font-weight: 600; line-height: 1.3; color: var(--muted); }
.entry-issue { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 12px; padding: 10px 12px; border: 1.5px solid var(--red, #a33); border-radius: 10px; background: var(--surface); color: var(--ink); line-height: 1.45; }
.entry-issue .ic { flex: none; margin-top: 1px; color: var(--red, #a33); }
.hd.bad { box-shadow: inset 0 0 0 2px var(--red, #a33); }
.ta [role="option"].active, .ta [role="option"][aria-selected="true"] { background: var(--green-soft); }
.ta [role="listbox"] { margin-top: 4px; }

/* 2.8.0: five-row key, and review pages that always scroll to the end */
.putt-distance-key.three { grid-template-columns: repeat(3, 1fr); }
.sc-wrap, .tbl-wrap { overflow-y: hidden; overscroll-behavior-x: contain; }
textarea { scroll-margin-bottom: 140px; }

/* 2.9.0 — unified screen design. Print-card CSS remains isolated. */
:root {
  --paper:#F5F6F3; --surface:#FFFFFF; --surface-2:#EEF1EC;
  --ink:#14201A; --muted:#5D6A62; --faint:#637168; --line:#DFE4DE;
  --green:#1D5A3E; --green-soft:#E6EEE8; --ochre:#94660F; --ochre-soft:#FBF3E0;
  --radius:14px; --radius-s:10px; --tabbar:72px;
  --display:ui-serif,"New York",Georgia,serif;
  --shadow:0 1px 2px #14201a04,0 8px 24px -16px #14201a28;
  --map-ground:#E9F0E4; --map-fringe:#D3E3CE; --map-green:#BFD7B8;
  --map-contour:#77966F; --map-ink:#1F3D2B;
}
:root[data-theme="dark"] {
  --paper:#121915; --surface:#1A231E; --surface-2:#233029;
  --ink:#EEF3EF; --muted:#A3B1A8; --faint:#A3B1A8; --line:#34443A;
  --green:#7CC39C; --green-ink:#0D1A13; --green-soft:#1F3328;
  --ochre:#E2B866; --ochre-soft:#33291A; --red:#F09A92;
  --shadow:0 1px 2px #0002,0 8px 24px -16px #0009;
  --map-ground:#1C2B21; --map-fringe:#293F2D; --map-green:#36583C;
  --map-contour:#789C72; --map-ink:#CBE5C4;
}
html { scroll-padding-bottom:140px; }
body { background:var(--paper); font-size:16px; line-height:1.5; }
#view { padding-top:calc(env(safe-area-inset-top) + 24px); }
.page,.flow { min-width:0; }
.page-head { margin:8px 0 24px; }
h1 { font-size:34px; font-weight:650; letter-spacing:-.045em; line-height:1.12; overflow-wrap:anywhere; }
.page-head h1,.flow-top h1 { font-family:var(--font); }
h2 { font-size:18px; line-height:1.35; margin-bottom:16px; letter-spacing:-.025em; }
h3 { line-height:1.4; }
.wordmark,.step-tag,.month,.scout-label { font-size:12px; font-weight:650; letter-spacing:.08em; text-transform:uppercase; }
.wordmark { display:flex; align-items:center; gap:8px; margin-bottom:12px; }
.wordmark::before { content:""; width:6px; height:6px; background:var(--ochre); border-radius:50%; }
.lead { margin-top:8px; line-height:1.55; }
.fine { line-height:1.55; }
.group,.choice,.drill,.resume { box-shadow:var(--shadow); }
.group { padding:24px; margin-bottom:16px; }
.group-head { align-items:center; flex-wrap:wrap; gap:0 16px; }
.group-head h2 { margin-bottom:8px; }
.group-head .more-link { margin-top:-8px; }
.li { gap:12px; min-height:64px; padding:12px 0; }
.li-main small { margin-top:4px; line-height:1.5; }
.li-val { max-width:48%; white-space:normal; overflow-wrap:anywhere; font-size:18px; }
.li-val small { font-size:12px; }
.li-main { overflow-wrap:anywhere; }
.round-row .li-score { flex:none; min-width:42px; }
.li-score b { font-family:var(--display); font-size:32px; font-weight:500; }
.btn { min-height:52px; border-radius:10px; padding:12px 18px; line-height:1.4; transition:transform .14s ease,background .14s ease,box-shadow .14s ease; }
.btn.primary { box-shadow:0 2px 4px #14201a0a,0 6px 16px -10px var(--green); }
.btn.big { min-height:56px; font-size:16px; }
.btn-row { gap:8px; flex-wrap:wrap; }
.btn-row>.btn { flex:1 1 128px; }
.btn:active,.choice:active,.chip:active,.link.li:active { transform:scale(.98); }
a.choice { color:var(--ink); text-decoration:none; }
.choice { padding:20px; gap:16px; align-items:center; margin-bottom:16px; }
.choice>span { min-width:0; flex:1; }
.choice .ic { flex:none; margin:0; }
.choice>.ic:first-child { padding:10px; box-sizing:content-box; background:var(--green-soft); border-radius:12px; width:24px; height:24px; }
.choice b { font-size:16px; line-height:1.4; }
.choice small { font-size:14px; line-height:1.5; margin-top:4px; }
.course-card-link { margin:0 0 16px; }
.home>.btn.big { margin-bottom:16px; }
.kpis { gap:0; background:var(--surface); margin:24px 0 16px; box-shadow:var(--shadow); }
.kpi { padding:20px; border:0; border-right:1px solid var(--line); border-bottom:1px solid var(--line); border-radius:0; min-width:0; }
.kpi:nth-child(even) { border-right:0; }
.kpi:nth-last-child(-n+2) { border-bottom:0; }
.k-label { color:var(--muted); font-size:12px; font-weight:600; line-height:1.4; }
.k-val { font-family:var(--display); font-weight:500; font-size:42px; line-height:1.2; margin:8px 0 4px; letter-spacing:-.045em; }
.home-metrics .kpi:first-child { background:var(--green-soft); }
.home-metrics .kpi:first-child .k-val { color:var(--green); }
.k-val.nd { font-family:var(--font); font-size:16px; letter-spacing:0; }
.kpi small { color:var(--muted); line-height:1.5; }
.score-hero { padding:24px; margin:0 0 16px; border:1px solid var(--line); border-radius:var(--radius); background:var(--green-soft); gap:24px; flex-wrap:wrap; }
.score-hero .big { font-size:80px; font-weight:500; letter-spacing:-.06em; color:var(--green); }
.hero-side { flex:1; min-width:120px; font-size:14px; gap:8px; }
.hero-side .topar { font-family:var(--display); font-size:32px; font-weight:500; }
.coach { border-top:2px solid var(--green); }
.coach .coach-title { font-size:22px; font-weight:600; line-height:1.35; margin:0 0 12px; }
.coach p { margin-bottom:12px; }
.coach .advice { border:0; padding:16px; border-radius:10px; background:var(--green-soft); }
.coach .btn { width:100%; }
.legend { flex-wrap:wrap; }
.chart .axis { fill:var(--muted); font-size:11px; }
.chart .line { stroke-width:2.5; }
.chart .roll { stroke:var(--ochre); }
.legend .ln.roll { border-color:var(--ochre); }
.chart .dot { stroke-width:2; }
.split { height:8px; margin:20px 0 12px; }
.split-key { gap:8px 16px; }
.split-key .sw { border-radius:50%; }
.scorecard-panel { padding:20px 12px; }
.scorecard-panel h2 { margin-left:8px; }
.sc-wrap { gap:16px; }
.sc { background:var(--surface); font-variant-numeric:tabular-nums; }
.sc th,.sc td { border:1px solid var(--line); height:36px; }
.sc thead th { background:var(--green-soft); color:var(--green); height:32px; }
.sc th[scope="row"] { padding-left:4px; }
.sc .tot { background:var(--surface-2); }
.sc tr.score td { height:44px; }
.sc tr.sub td { height:32px; }
.sc-key { padding:0 8px; gap:12px; }
.tbl th,.tbl td { padding:12px 8px; }
.tbl thead th { background:var(--surface-2); }
.tbl { font-size:14px; }
.tbl-wrap { max-width:100%; }
.drill { padding:24px; margin-bottom:16px; }
.drill-head { padding-bottom:16px; border-bottom:1px solid var(--line); margin-bottom:16px; }
.drill-head h2 { margin-bottom:4px; }
.drill-min { font-family:var(--display); width:64px; height:64px; border-radius:50%; font-size:20px; font-weight:500; }
.drill p { margin-top:12px; }
.drill-meta { gap:8px 16px; }
.session-summary { margin-top:24px; padding:24px; border-radius:14px; background:var(--green-soft); }
.session-summary h2 { margin:8px 0 16px; }
.session-timeline { display:flex; gap:4px; margin-top:16px; }
.session-timeline span { background:var(--surface); padding:8px 0; border-radius:4px; font-size:12px; text-align:center; }
.seg { padding:4px; gap:4px; border-radius:12px; margin-bottom:16px; }
.seg button { padding:8px; line-height:1.4; }
.seg .on { box-shadow:0 1px 4px #14201a12; }
.field { gap:8px; margin-bottom:16px; }
.field>span { font-size:13px; font-weight:600; }
.field-row { gap:16px; flex-wrap:wrap; }
.field-row>.field { flex:1 1 120px; }
input,select,textarea { min-height:52px; padding:12px; line-height:1.5; }
.field.inline { flex-wrap:wrap; }
.field.inline input { min-width:120px; }
.flow-top { margin-bottom:24px; padding-bottom:12px; border-bottom:1px solid var(--line); }
#view>.flow>.flow-top,.flow .flow-top { margin-top:calc(-24px - env(safe-area-inset-top)); }
.flow-top h1 { font-size:18px; letter-spacing:-.025em; line-height:1.4; }
.flow-intro { padding:8px 0 24px; }
.flow-intro h2 { font-family:var(--display); font-size:30px; font-weight:500; margin:8px 0; }
.flow-bar { padding-top:16px; }
.flow-bar.two { gap:8px; }
.flow-bar .btn { min-width:0; }
.entry-sec { padding:24px 0; }
.entry-sec h2 { margin-bottom:12px; }
.hole-info { padding:16px; background:var(--green-soft); border-radius:10px; flex-wrap:wrap; }
.hole-info b { font-family:var(--display); font-size:28px; font-weight:500; }
.holes { grid-template-columns:repeat(6,minmax(44px,1fr)); gap:8px; }
.hd { min-width:44px; min-height:44px; }
.chip { padding:10px 12px; border-radius:10px; line-height:1.4; }
.chips.score-chips { grid-template-columns:repeat(auto-fit,minmax(44px,1fr)); gap:8px; }
.chips.zone-chips { grid-template-columns:repeat(auto-fit,minmax(52px,1fr)); gap:8px; }
.scan-sheet { background:var(--surface); border:1px solid var(--line); border-radius:12px; margin:16px 0; }
.scan-tbl { border-collapse:separate; border-spacing:0; }
.scan-tbl thead th { color:var(--ink); }
.scan-tbl tbody th { position:sticky; left:0; z-index:1; background:var(--surface-2); text-align:center; }
.scan-tbl td { padding:6px 4px; }
.scan-tbl input,.scan-tbl select { min-height:48px; }
.scan-tbl .flag { box-shadow:inset 3px 0 var(--ochre); }
.scan-review .lead { padding:16px; background:var(--ochre-soft); border-radius:10px; }
.card-preview { box-shadow:0 2px 3px #14201a0a,0 16px 32px -20px #14201a55; padding:12px; margin:24px 0; border-radius:6px; }
.card-preview.enlarged { overflow:auto; max-height:72vh; }
.print-intro { padding-left:16px; border-left:2px solid var(--ochre); }
.card-example { border:1px solid var(--line); }
.card-example th,.card-example td { border:1px solid var(--line); }
.card-example td { font-family:var(--display); font-weight:500; }
.row-toggle { padding:16px; border-width:1px; margin-top:8px; }
.row-toggle[aria-checked="true"] { box-shadow:inset 3px 0 var(--green); }
.label-list li { padding:16px; border-width:1px; background:var(--surface); }
.paper-promise,.par3-note,.scout-summary { border-left-width:2px; padding:16px; }
.putt-distance-key { gap:8px; }
.putt-distance-key b { font-family:var(--display); font-size:32px; font-weight:500; }
.scout-tips li { padding:16px 0; }
.scout-summary { margin:24px 0; }
.share-canvas { box-shadow:var(--shadow); border-radius:14px; margin-bottom:24px; }
.switch { padding:12px 0; gap:16px; min-height:56px; }
.switch input { flex:none; }
.prose p,.prose li { font-size:16px; line-height:1.65; }
.prose li { margin-top:8px; }
summary { min-height:44px; cursor:pointer; }
.onboarding { padding:16px 0 24px; }
.brand-logo { width:144px; height:144px; margin:32px 0 24px; border-radius:20px; box-shadow:var(--shadow); }
.onboarding h1 { font-family:var(--display); font-size:48px; font-weight:500; letter-spacing:-.05em; }
.onboarding .lead { font-size:18px; margin:16px 0 24px; }
.steps { list-style:none; padding:0; counter-reset:step; margin-bottom:24px; }
.steps li { counter-increment:step; position:relative; padding:16px 0 16px 48px; border-top:1px solid var(--line); margin:0; }
.steps li::before { content:counter(step,decimal-leading-zero); position:absolute; left:0; top:16px; color:var(--green); font-family:var(--display); font-size:24px; }
.about-icon { box-shadow:var(--shadow); }
#tabs { padding-top:8px; }
.tab { min-height:64px; font-size:11px; color:var(--muted); gap:4px; padding:4px; }
.tab .ic { box-sizing:content-box; padding:4px 12px; border-radius:10px; }
.tab.on .ic { background:var(--green-soft); }
.tab.on { color:var(--green); }
.ic { flex-shrink:0; vertical-align:middle; }
.green-misses { margin-top:24px; border-top:1px solid var(--line); padding-top:24px; }
.green-misses h3 { margin-bottom:16px; }
.green-map { display:block; max-width:350px; margin:0 auto; font-family:var(--font); }
.green-ground { fill:var(--map-ground); }
.green-fringe { fill:var(--map-fringe); }
.green-surface { fill:var(--map-green); stroke:var(--map-ink); stroke-width:1.5; }
.green-contour { fill:none; stroke:var(--map-contour); stroke-width:2; stroke-linecap:round; }
.green-pin { stroke:var(--map-ink); stroke-width:2.5; stroke-linecap:round; }
.green-flag { fill:var(--map-ink); }
.miss-circle { fill:var(--green); }
.miss-circle.zero { fill:none; stroke:var(--map-ink); stroke-width:1.5; stroke-dasharray:3 4; }
.miss-count { fill:var(--green-ink); font-size:18px; font-weight:600; }
.miss-count.zero,.miss-label { fill:var(--map-ink); }
.miss-label { font-size:13px; font-weight:600; }
.green-caption { fill:var(--map-ink); font-size:10px; }
.bunker-line { display:flex; align-items:center; flex-wrap:wrap; gap:8px; background:var(--ochre-soft); color:var(--ochre); padding:12px; border-radius:10px; margin-top:12px; font-size:13px; }
.bunker-line b { font-family:var(--display); font-size:24px; margin-left:auto; }
.bunker-line small { flex-basis:100%; color:var(--muted); }
@keyframes pageIn { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }
@keyframes numberIn { from { opacity:.3; transform:translateY(3px); } to { opacity:1; transform:none; } }
@media (prefers-reduced-motion:no-preference) {
  .page,.flow { animation:pageIn .22s ease-out both; }
  .k-val,.score-hero .big { animation:numberIn .35s ease-out both; }
}
@media(max-width:380px) {
  .group,.drill { padding:16px; }
  .choice { padding:16px; gap:12px; }
  .choice>.ic:first-child { padding:8px; width:20px; height:20px; }
  .kpi { padding:16px; } .k-val { font-size:36px; }
  .scorecard-panel { padding:16px 8px; }
  .sc th[scope="row"] { width:40px; } .sc .tot { width:28px; }
  .mk { width:21px; height:24px; font-size:13px; }
  .holes { gap:4px; }
  .btn { padding:12px; }
}
@media(min-width:700px) { #view { padding-top:calc(env(safe-area-inset-top) + 40px); } }
@media print {
  :root,:root[data-theme="dark"] { color-scheme:light; --paper:#fff; --surface:#fff; --ink:#000; --muted:#333; --line:#aaa; --green:#000; --green-soft:#fff; }
  body { background:#fff; }
  .group,.choice,.drill,.resume,.card-preview,.kpis { box-shadow:none; }
  *,*::before,*::after { animation:none !important; transition:none !important; }
}
.chart-value { fill:var(--green); font-family:var(--font); font-size:12px; font-weight:650; paint-order:stroke; stroke:var(--surface); stroke-width:4px; stroke-linejoin:round; }
svg.split { display:block; }
.split rect { stroke:var(--surface); stroke-width:4px; }
.split rect.c1 { fill:var(--green); }
.split rect.c2 { fill:color-mix(in srgb,var(--green) 45%,var(--surface)); }
.split rect.c3 { fill:color-mix(in srgb,var(--ochre) 45%,var(--surface)); }
.split rect.c4 { fill:var(--ochre); }
.split rect.c5 { fill:var(--red); }
.toast.error { color:var(--surface); }

/* 2.9.1: verified fixes and finishing polish */
:root { --map-stripe: rgba(255, 255, 255, .30); --sand: #EADDBB; --sand-line: #B4955A; }
:root[data-theme="dark"] { --map-stripe: rgba(255, 255, 255, .035); --sand: #4A4131; --sand-line: #B4955A; }
/* Fixed bottom bars: the page always scrolls far enough to reveal the last row. The bar height is measured in app.js. */
body.in-flow #view { padding-bottom: calc(var(--flow-bar-h, 120px) + 32px); }
body.in-flow #view:has(.flow-bar.inline) { padding-bottom: 0; }
/* Page titles in the serif display face */
.page-head h1 { font-family: var(--display); font-weight: 600; font-size: 36px; line-height: 1.1; letter-spacing: -.02em; }
/* Green-miss map */
.green-map { max-width: 360px; }
.green-stripe { fill: var(--map-stripe); }
.green-sheen { fill: #FFFFFF; opacity: .2; }
:root[data-theme="dark"] .green-sheen { opacity: .05; }
.green-hole { fill: var(--map-ink); }
.miss-leader { stroke: var(--map-ink); stroke-width: 1.2; stroke-dasharray: 2 4; opacity: .5; }
.miss-circle { stroke: var(--map-ground); stroke-width: 3; }
.miss-pct { font-size: 12px; font-weight: 500; fill: var(--map-ink); opacity: .75; }
.bunker-line { flex-wrap: nowrap; gap: 12px; padding: 12px 14px; }
.bunker-line .sand-ic { flex: none; }
.bunker-line .sand-ic path { fill: var(--sand); stroke: var(--sand-line); stroke-width: 1.5; stroke-dasharray: 3 3; }
.bunker-line .bl-text { flex: 1; min-width: 0; color: var(--ink); }
.bunker-line .bl-text b { display: block; margin: 0; font-family: var(--font); font-size: 15px; font-weight: 600; }
.bunker-line .bl-text small { display: block; flex-basis: auto; font-size: 13px; color: var(--muted); }
.bunker-line .bl-num { font-family: var(--display); font-size: 30px; line-height: 1; color: var(--ink); }
/* Scan review: compact symbols fit the columns, legend explains them */
.scan-tbl select { min-width: 52px; font-size: 17px; text-align: center; }
.scan-tbl input { min-width: 44px; }
.scan-legend { margin: 10px 0 0; font-size: 13px; line-height: 1.7; color: var(--muted); }
.scan-legend b { color: var(--ink); margin-right: 4px; }
.scan-legend b + * , .scan-legend b:not(:first-child) { margin-left: 8px; }
/* Course editor: full-size tap targets */
.hole-tbl input { min-width: 44px; }
/* Manual entry chips */
.chips.tee-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chips.tee-chips .chip { min-width: 0; }
.chips.zone-chips { grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); }
/* Scorecard type picker: three even columns */
.seg.scan-card-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg.scan-card-types button { font-size: 14px; line-height: 1.25; padding: 8px 6px; }
/* Root-cause fix: an animation that leaves a transform on the page makes the page the containing block for
   position: fixed, so bottom bars stuck to the page instead of the screen. Animate in, then leave no transform. */
#view > .page, #view > .flow { animation-fill-mode: backwards; }
#view > .flow { animation-name: flowIn; }
@keyframes flowIn { from { opacity: 0; } to { opacity: 1; } }
.scan-tbl th, .scan-tbl td { padding-left: 3px; padding-right: 3px; }
.scan-tbl select { min-width: 48px; }
:root:not([data-theme="dark"]) .need-par { color: #7A540C; }


/* ===== Pencil & Pin theme: navy, sand and off-white. Appended last so it wins. ===== */
:root {
  --paper:#FAF8F2; --surface:#FFFFFF; --surface-2:#F1ECDF;
  --ink:#1C2733; --muted:#4A5663; --faint:#5C6773; --line:#E3D9C4;
  --green:#203449; --green-ink:#FFFFFF; --green-soft:#E9EEF3;
  --brass:#7A6330; --ochre:#94660F; --ochre-soft:#FBF3E0;
  --shadow:0 1px 2px #1c273304,0 8px 24px -16px #1c273330;
}
:root[data-theme="dark"] {
  --paper:#0F1A24; --surface:#162532; --surface-2:#1E3040;
  --ink:#E8E6DF; --muted:#AEB8C2; --faint:#A0ABB6; --line:#2B3D4F;
  --green:#A9C1DB; --green-ink:#10202E; --green-soft:#1B2E40;
  --brass:#D9C58F; --ochre:#E2B866; --ochre-soft:#33291A; --red:#F09A92;
  --shadow:0 1px 2px #0002,0 8px 24px -16px #0009;
}
body { background: var(--paper); }
.btn.primary { box-shadow: 0 10px 22px -12px rgba(32, 52, 73, .6); }
.wordmark.brand { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; text-transform: none; letter-spacing: -.01em; font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--green); }
.wordmark.brand::before { display: none; }
.pp-mark { flex: none; color: var(--green); }
.resume.install { border-left-color: var(--brass); }
.resume.install small { display: block; margin-top: 2px; }
.brand-logo { box-shadow: 0 8px 24px rgba(28, 39, 51, .18); }

/* Pencil & Pin 3.0.1 — quiet type, paper tones, clearer priorities. */
:root { --radius:8px; --radius-s:6px; --green-soft:#F1ECDF; --shadow:none; }
:root[data-theme="dark"] { --green-soft:#1E3040; --shadow:none; }
.group,.choice,.drill,.resume,.kpis,.btn.primary,.brand-logo,.about-icon { box-shadow:none; }
.group { border-radius:8px; }
.btn { border-radius:6px; }
.page-head h1,.flow-top h1 { font-family:var(--display); }
h2 { letter-spacing:-.015em; }
.home-metrics { margin-top:8px; }
.home-metrics .kpi:first-child { background:var(--surface-2); }
.home>.coach { margin-top:8px; }
.coach { border-top:3px solid var(--green); padding:24px; }
.coach>h2 { color:var(--muted); font-size:13px; font-weight:600; margin-bottom:12px; letter-spacing:.025em; }
.coach .coach-title { font-family:var(--display); font-weight:600; font-size:28px; line-height:1.2; letter-spacing:-.025em; margin-bottom:20px; }
.coach .advice { background:var(--surface-2); border-radius:4px; line-height:1.6; margin:0 0 16px; }
.advice-label { display:block; color:var(--muted); font-size:12px; font-weight:650; margin-bottom:6px; }
.coach>.btn { width:auto; min-width:160px; margin:0 0 4px; }
.coach-basis { border-top:1px solid var(--line); margin-top:20px; padding-top:4px; }
.coach-basis summary,.others summary { min-height:44px; padding:12px 0; cursor:pointer; font-size:14px; color:var(--muted); }
.coach-basis p { font-size:14px; line-height:1.6; }
.home-prep { display:flex; gap:20px; margin:4px 0 24px; flex-wrap:wrap; }
.prep-link { display:flex; align-items:center; gap:8px; min-height:44px; color:var(--ink); font-size:14px; text-decoration:none; border-bottom:1px solid var(--line); }
.prep-link .ic { flex:none; }
.home-backup { border-top:1px solid var(--line); padding-top:16px; }
.score-hero { background:var(--surface-2); border-radius:6px; }
.round-takeaway { border-left:2px solid var(--green); padding:4px 0 4px 16px; margin:20px 0 24px; }
.round-takeaway h2 { font-size:13px; margin:0 0 4px; color:var(--muted); }
.round-takeaway p { margin:0; font-size:15px; }
.demo-bar { border-radius:6px; }
#tabs { max-width:640px; margin-inline:auto; }
.tab.on::before { box-shadow:none; }
.onboarding { padding-top:12px; }
.onboarding .wordmark.brand { margin-bottom:32px; font-size:24px; }
.onboarding .wordmark.brand::before { display:none; }
.onboarding h1 { font-size:clamp(34px,5vw,48px); line-height:1.08; font-weight:500; letter-spacing:-.04em; }
.onboarding .lead { font-size:17px; line-height:1.65; margin:20px 0 24px; }
.intro-actions { max-width:380px; }
.storage-note { max-width:380px; margin:14px 0 24px; }
.paper-demo { margin:20px 0 28px; padding:24px; border:1px solid var(--line); background:var(--surface); border-radius:4px; }
.paper-demo figcaption { font-size:13px; font-weight:600; color:var(--muted); margin-bottom:16px; }
.intro-card { width:100%; border-collapse:collapse; font-size:14px; }
.intro-card th,.intro-card td { border:1px solid var(--line); padding:10px 8px; text-align:center; }
.intro-card th { font-size:11px; color:var(--muted); font-weight:600; }
.intro-card th:first-child { text-align:left; }
.intro-card thead { background:var(--surface-2); }
.pencil-row td { font:italic 23px/1.2 Georgia,serif; color:var(--ink); }
.example-result { border-top:2px solid var(--green); margin-top:24px; padding-top:16px; }
.example-label { display:block; font-size:12px; color:var(--muted); margin-bottom:8px; }
.example-result h2 { font:500 25px/1.2 var(--display); margin:0 0 10px; }
.example-result p { font-size:14px; margin:0; line-height:1.5; }
.paper-demo>.fine { font-size:12px; margin-top:16px; }
.intro-steps { margin:0; padding:0; }
.intro-steps li { padding:16px 0 16px 46px; margin:0; }
.intro-steps li>b,.intro-steps li>span { display:block; }
.intro-steps li>span { color:var(--muted); margin-top:4px; font-size:14px; }
@media (min-width:960px) {
 body[data-screen="onboarding"] #view,body[data-screen="home"] #view { max-width:1080px; padding-inline:32px; }
 body[data-screen="onboarding"] #view { padding-top:52px; }
 .onboarding { display:grid; grid-template-columns:1fr 1fr; gap:32px 64px; align-items:center; }
 .onboarding .paper-demo { margin:0; }
 .onboarding .intro-steps { grid-column:1/-1; display:grid; grid-template-columns:repeat(3,1fr); gap:24px; margin-top:12px; }
 .home:has(.home-metrics) { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:0 28px; align-items:start; }
 .home:has(.home-metrics)>* { grid-column:1/-1; }
 .home:has(.home-metrics)>.page-head { grid-column:1; grid-row:1; }
 .home:has(.home-metrics)>.btn.big { grid-column:2; grid-row:1; width:auto; justify-self:end; align-self:center; min-width:220px; }
 .home:has(.home-metrics)>.home-metrics { grid-column:1; grid-row:2; margin:0 0 24px; }
 .home:has(.home-metrics)>.coach { grid-column:2; grid-row:2 / span 3; margin:0 0 24px; }
 .home:has(.home-metrics)>.home-prep { grid-column:1; grid-row:3; }
 .home:has(.home-metrics)>.home-trend { grid-column:1; }
 .home:has(.home-metrics)>.home-recent { grid-column:2; }
 body[data-screen="home"] #tabs { max-width:1016px; }
}
@media (max-width:420px) {
 .group,.coach { padding:20px; }
 .paper-demo { padding:18px; }
 .home-prep { display:block; }
 .prep-link { justify-content:flex-start; }
 .prep-link .ic:last-child { margin-left:auto; }
}
@media (prefers-reduced-motion:no-preference) { .page { animation:none; } }
@media print {
 .intro-actions,#tabs { display:none!important; }
 .onboarding { display:block; }
 .group,.paper-demo { break-inside:avoid; }
}
