/* My golf (docs/web-account.md; redesign #340, on the site's theme #612): the site header and
   footer, tokens.css's palette, type scale, radii and shadows, style.css's buttons, fields, chips,
   tables and dialogs, a navy stage at the top of each page, and the charts and maps in viz.js.
   Motion stops for prefers-reduced-motion. */

:root {
  /* My golf sits on paper with surface cards (the app's look), so the site's --bg/--card swap. */
  --bg: var(--paper); --card: var(--surface);
  /* The app's score roles (Palette.swift: scoreEagle … scoreDouble). */
  --score-eagle: var(--flag); --score-birdie: var(--fairway); --score-par: color-mix(in srgb, var(--slate) 30%, var(--raised));
  --score-bogey: var(--water); --score-double: var(--clay);
  /* The stage (navy in both schemes, like the home page's): its quieter text and clay's dark value. */
  --stage-text: rgb(255 255 255 / 0.86); --stage-muted: rgb(255 255 255 / 0.62); --stage-line: rgb(255 255 255 / 0.12); --stage-clay: #FF6B6B;
}

main.wide { flex: 1; width: 100%; max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: var(--space-6) var(--gutter) var(--space-7); }
.figure-font, .num { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
main.wide h1 { font-size: clamp(32px, 4.6vw, 48px); margin: 0 0 var(--space-4); }
main.wide h2 { font-size: clamp(22px, 2.4vw, 26px); letter-spacing: -0.015em; margin: var(--space-7) 0 var(--space-3); }
main.wide h2.flush { margin-top: 0; }
main.wide .lead { font-size: var(--fs-l); color: var(--slate); }

/* The header: the site's glass header, with My golf's pill nav once you're signed in (the site
   links come back when you're signed out). */
.me-header #nav:not([hidden]) ~ .site-nav { display: none; }
nav.pills { position: relative; margin-left: auto; display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--raised); }
nav.pills[hidden] { display: none; }
nav.pills a { position: relative; z-index: 1; padding: 7px 16px; border-radius: 999px; color: var(--slate); font: 600 var(--fs-m)/1.2 var(--font-text);
  text-decoration: none; transition: color 0.25s var(--ease); }
nav.pills a:hover, nav.pills a[aria-current] { color: var(--ink); }
nav.pills .glider { position: absolute; z-index: 0; top: 4px; bottom: 4px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow);
  transition: left 0.45s var(--spring), width 0.45s var(--spring); }
@media (max-width: 640px) {
  .me-header .wrap:has(#nav:not([hidden])) { flex-wrap: wrap; padding-top: 8px; padding-bottom: 10px; row-gap: 8px; }
  nav.pills { margin: 0; width: 100%; justify-content: space-between; }
  nav.pills a { padding: 7px 10px; font-size: var(--fs-s); flex: 1; text-align: center; }
  html { scroll-padding-top: 130px; }
}

/* The stage: navy (in both colour schemes) with course contours (drawn by viz.js) and a soft light. */
.hero-band { position: relative; overflow: hidden; isolation: isolate; color: #fff; border-radius: var(--radius-xl); padding: clamp(24px, 4vw, 44px);
  margin-bottom: var(--space-5); box-shadow: var(--shadow-lift);
  background: radial-gradient(120% 140% at 85% 0%, color-mix(in srgb, var(--stage) 72%, #2A71CC) 0%, var(--stage) 55%, var(--stage-deep) 100%); }
@media (prefers-color-scheme: dark) { .hero-band { box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.07), var(--shadow-lift); } }
.hero-band .contours { position: absolute; inset: 0; z-index: -1; opacity: 0.22; pointer-events: none; }
.hero-band .contours path { fill: none; stroke: color-mix(in srgb, var(--stage-green) 60%, #fff); stroke-width: 1; }
.hero-band .eyebrow { margin: 0; color: var(--stage-flag); font: 700 var(--fs-xs)/1.2 var(--font-text); letter-spacing: 0.1em; text-transform: uppercase; }
main.wide .hero-band h1 { color: #fff; margin: 8px 0 22px; }
.hero-grid { display: grid; grid-template-columns: minmax(220px, 0.9fr) 1.6fr; gap: 28px; align-items: end; }
@media (max-width: 760px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-figure { font-family: var(--font-display); font-weight: 800; font-size: clamp(72px, 11vw, 112px); line-height: 0.9; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.hero-label { font-weight: 700; color: var(--stage-text); margin-top: 10px; }
.hero-note { color: var(--stage-muted); font-size: var(--fs-m); }
.hero-note.hero-lead { font-size: var(--fs-l); line-height: 1.5; max-width: 34em; color: var(--stage-text); }
.hero-trend { display: inline-flex; gap: 6px; align-items: center; margin-top: 12px; padding: 4px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--stage-green) 20%, transparent); color: color-mix(in srgb, var(--stage-green) 55%, #fff); font-weight: 700; font-size: var(--fs-s); }
.hero-trend.up { background: color-mix(in srgb, var(--stage-clay) 18%, transparent); color: color-mix(in srgb, var(--stage-clay) 60%, #fff); }
.hero-actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
/* Buttons on the stage: glass pills (the home page's chips). The sign-in button stays the brand's. */
.hero-actions button:not(.button) { min-height: 40px; border: 1px solid rgb(255 255 255 / 0.22); background: rgb(255 255 255 / 0.08); color: #fff; border-radius: 999px;
  padding: 8px 16px; font: 600 var(--fs-s)/1.2 var(--font-text); cursor: pointer; transition: background 0.2s var(--ease); }
.hero-actions button:not(.button):hover { background: rgb(255 255 255 / 0.16); }
.hero-actions button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.hero-band .button { background: var(--stage-green); color: var(--stage); }
#gate { padding-block: clamp(36px, 7vw, 80px); }
#gate h1 { font-size: clamp(36px, 6vw, 60px); max-width: 14em; }

/* The handicap chart (on the stage: white line, gold points). */
.hcap-chart { position: relative; width: 100%; }
.hcap-chart svg { display: block; width: 100%; height: 190px; overflow: visible; }
.hcap-chart .line { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.hcap-chart .area { fill: url(#hcapFill); }
.hcap-chart .plot { position: relative; }
.hcap-chart .dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--stage); border: 3px solid var(--stage-flag);
  pointer-events: none; transition: transform 0.2s var(--spring); }
.hcap-chart .dot.on { transform: scale(1.4); }
.hcap-chart .grid { stroke: var(--stage-line); stroke-dasharray: 2 5; }
.hcap-chart .axis-y, .hcap-chart .axis-x { color: var(--stage-muted); font: 600 var(--fs-xs) var(--font-display); }
.hcap-chart .axis-y { position: absolute; left: 0; z-index: 1; }
.hcap-chart .axis-y.top { top: 0; } .hcap-chart .axis-y.bottom { top: 128px; left: auto; right: 0; }
.hcap-chart .axis-x { display: flex; justify-content: space-between; margin-top: 2px; }
.hcap-chart .tip { position: absolute; transform: translate(-50%, -120%); pointer-events: none; white-space: nowrap; background: #fff; color: var(--stage);
  padding: 6px 10px; border-radius: var(--radius-s); font-weight: 700; font-size: var(--fs-s); box-shadow: 0 8px 22px rgb(0 0 0 / 0.25); opacity: 0; transition: opacity 0.15s; }
.hcap-chart .tip small { display: block; font-weight: 500; color: #5A6573; font-size: var(--fs-xs); }
.hcap-chart .tip.on { opacity: 1; }

/* Cards and tiles: surface on paper, hairline edge, the site's shadow and large radius. */
main.wide .card { background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: var(--radius-l); padding: 22px 24px; margin: 16px 0; box-shadow: var(--shadow); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin: 14px 0; }
.tile { position: relative; overflow: hidden; background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: var(--radius-l);
  padding: 18px 18px 16px; box-shadow: var(--shadow); transition: transform 0.35s var(--spring), box-shadow 0.35s var(--ease); }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.tile .value { font-family: var(--font-display); font-variant-numeric: tabular-nums; font-size: var(--fs-figure); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.tile .label { font-size: var(--fs-s); color: var(--slate); font-weight: 600; }
.tile .tile-note { font-size: var(--fs-xs); margin-top: 2px; }
.tile .meter { height: 5px; border-radius: 999px; background: var(--raised); margin-top: 12px; overflow: hidden; }
.tile .meter i { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--fairway), var(--putting));
  transition: width 1.1s var(--ease) 0.2s; }
.tile .meter.low i { background: linear-gradient(90deg, var(--clay), var(--flag)); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

/* Gain-and-lose bars: lost to the left, gained to the right of a centre line. */
.gains { display: grid; gap: 14px; }
.gain { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center; }
.gain .label { font-weight: 700; }
.gain .track { position: relative; height: 34px; background: var(--raised); border-radius: var(--radius-s); }
.gain .track::after { content: ""; position: absolute; left: 50%; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.gain .bar { position: absolute; top: 5px; bottom: 5px; border-radius: 8px; width: 0; transition: width 1s var(--ease); display: flex; align-items: center;
  font: 800 var(--fs-xs) var(--font-display); color: #fff; padding: 0 8px; white-space: nowrap; overflow: hidden; }
.gain .bar.lost { right: 50%; justify-content: flex-start; background: linear-gradient(270deg, var(--clay), var(--berry)); }
.gain .bar.won { left: 50%; justify-content: flex-end; background: linear-gradient(90deg, var(--fairway), var(--putting)); color: var(--on-fairway); }
.gain p { grid-column: 2; margin: -6px 0 0; font-size: var(--fs-s); color: var(--slate); }
@media (max-width: 480px) { .gain { grid-template-columns: 1fr; gap: 6px; } .gain p { grid-column: 1; margin: 0; } }

/* Rounds as cards with a score strip. */
.rounds { display: grid; gap: 12px; list-style: none; padding: 0; margin: 12px 0; }
.round-card { display: grid; grid-template-columns: 74px 1fr auto; gap: 16px; align-items: center; padding: 16px 18px; border-radius: var(--radius-l);
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); box-shadow: var(--shadow); color: inherit; text-decoration: none;
  transition: transform 0.35s var(--spring), box-shadow 0.35s var(--ease); }
.round-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.round-card .date { text-align: center; border-radius: var(--radius); background: var(--mint); color: var(--fairway); padding: 8px 4px; line-height: 1.1; }
.round-card .date b { display: block; font: 800 26px var(--font-display); color: var(--ink); }
.round-card .date small { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.round-card .where { font-weight: 700; }
.round-card .sub { color: var(--slate); font-size: var(--fs-s); }
.round-card .score { text-align: right; font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.round-card .score b { display: block; font-size: 30px; font-weight: 800; line-height: 1; }
.round-card .score small { color: var(--slate); font-weight: 600; font-size: var(--fs-xs); }
.round-card .tag { font-size: var(--fs-xs); color: var(--flag-ink); background: color-mix(in srgb, var(--flag) 18%, transparent); border: 0; border-radius: 999px; padding: 1px 8px; margin-left: 6px; font-weight: 700; }
@media (max-width: 560px) { .round-card { grid-template-columns: 58px 1fr; } .round-card .score { grid-column: 2; text-align: left; } .round-card .score b { display: inline; font-size: 22px; margin-right: 6px; } }
.strip { display: grid; grid-template-columns: repeat(var(--n, 18), 1fr); gap: 3px; margin-top: 8px; max-width: 360px; }
.strip i { height: 8px; border-radius: 3px; background: var(--raised); transform-origin: bottom; }
.s-eagle { background: var(--score-eagle) !important; } .s-birdie { background: var(--score-birdie) !important; } .s-par { background: var(--score-par) !important; }
.s-bogey { background: var(--score-bogey) !important; } .s-double { background: var(--score-double) !important; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: var(--fs-xs); color: var(--slate); margin: 6px 0 0; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: var(--c); }

/* A round: the stage, the scorecard and the shot map. */
.round-hero { display: flex; flex-wrap: wrap; gap: 24px; align-items: end; justify-content: space-between; }
.round-hero .big { font-family: var(--font-display); font-weight: 800; font-size: clamp(64px, 10vw, 96px); line-height: 0.9; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.round-hero .big small { font-size: 0.38em; color: var(--stage-flag); margin-left: 10px; letter-spacing: 0; }
.hero-band .tiles { margin: 0; flex: 1 1 260px; min-width: 0; max-width: 640px; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); }
.hero-band .tile { background: rgb(255 255 255 / 0.08); box-shadow: none; color: #fff; border: 1px solid var(--stage-line); }
.hero-band .tile .label { color: var(--stage-muted); }
.scorecard { overflow-x: auto; }
.scorecard table + table { margin-top: 18px; }
.scorecard table { border-collapse: separate; border-spacing: 0; width: 100%; font-variant-numeric: tabular-nums; }
.scorecard th, .scorecard td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--line); }
.scorecard th:first-child { text-align: left; color: var(--slate); font: 600 var(--fs-xs)/1.2 var(--font-text); letter-spacing: 0.06em; text-transform: uppercase; }
.scorecard tr.hole td { font-weight: 800; font-family: var(--font-display); color: var(--slate); }
.scorecard td.sum { font-weight: 800; font-family: var(--font-display); background: var(--raised); }
.scorecard tr:first-child td.sum { border-top-left-radius: var(--radius-s); border-top-right-radius: var(--radius-s); }
.scorecard tr:last-child td.sum { border-bottom-left-radius: var(--radius-s); border-bottom-right-radius: var(--radius-s); }
.scorecard tr:last-child td, .scorecard tr:last-child th { border-bottom: 0; }
.scorecard td.pick { cursor: pointer; }
.scorecard td.pick:hover span { outline: 2px solid var(--flag); outline-offset: 2px; }
.mark { display: inline-grid; place-items: center; width: 2em; height: 2em; font-weight: 800; font-family: var(--font-display); }
.mark.eagle, .mark.birdie { border-radius: 50%; background: var(--score-birdie); color: var(--on-fairway); }
/* Eagle: the flag's gold, with the stage's navy text (fixed: gold is bright in both schemes). */
.mark.eagle { background: var(--score-eagle); color: var(--stage); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--score-eagle); }
.mark.bogey { border-radius: 6px; border: 2px solid var(--score-bogey); color: var(--score-bogey); }
.mark.double { border-radius: 6px; background: var(--score-double); color: #fff; }
.pop { animation: pop 0.5s var(--spring) both; animation-delay: calc(var(--i, 0) * 35ms); }
@keyframes pop { from { transform: scale(0.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.shotmap { display: grid; grid-template-columns: minmax(260px, 380px) 1fr; gap: 22px; align-items: start; }
@media (max-width: 760px) { .shotmap { grid-template-columns: 1fr; } }
/* The map's turf is fixed deep greens, light and dark: the course drawn on it (turf, putting, sand
   and water swatches at their light values) has to read the same in both schemes, as in the app's map. */
.shotmap .canvas { position: relative; border-radius: var(--radius-l); overflow: hidden; background: linear-gradient(180deg, #1f5a2c, #174521); box-shadow: var(--shadow-lift); aspect-ratio: 3 / 5; }
@media (prefers-color-scheme: dark) { .shotmap .canvas { background: linear-gradient(180deg, #123a1c, #0d2a15); } }
.shotmap svg { display: block; width: 100%; height: 100%; }
.shotmap .rough { fill: url(#mow); }
.shotmap .fairway { fill: #7FD67F; stroke: color-mix(in srgb, #7FD67F 80%, #1C773A); stroke-width: 1; }
.shotmap .green { fill: #3CCF5A; stroke: #E4F2E9; stroke-width: 1.5; }
.shotmap .bunker { fill: #E8DCC0; stroke: color-mix(in srgb, #E8DCC0 80%, #6B5E43); }
.shotmap .water { fill: #2A71CC; opacity: 0.9; }
.shotmap .tee { fill: #E4F2E9; opacity: 0.85; }
.shotmap .playline { fill: none; stroke: rgb(255 255 255 / 0.35); stroke-width: 1.5; stroke-dasharray: 4 6; }
.shotmap .flight { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 2px 3px rgb(0 0 0 / 0.35)); }
.shotmap .flight.putt { stroke: var(--stage-flag); stroke-width: 2; }
.shotmap .land { fill: #fff; stroke: var(--stage); stroke-width: 2; }
.shotmap .pin line { stroke: #fff; stroke-width: 2; }
.shotmap .pin path { fill: var(--stage-flag); }
.shotmap .lbl { font: 700 var(--fs-xs) var(--font-display); fill: #fff; paint-order: stroke; stroke: rgb(11 36 64 / 0.85); stroke-width: 4px; stroke-linejoin: round; }
.holes-picker { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.holes-picker button { width: 40px; height: 40px; border-radius: var(--radius-s); border: 0; background: var(--raised); color: var(--ink); font: 800 var(--fs-m) var(--font-display); cursor: pointer;
  transition: transform 0.25s var(--spring), background 0.2s; }
.holes-picker button:hover { transform: translateY(-2px); }
.holes-picker button[aria-pressed=true] { background: var(--fairway); color: var(--on-fairway); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--fairway); }
.holes-picker button.noshots { opacity: 0.4; }
.shotlist { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.shotlist li { display: grid; grid-template-columns: 34px 54px 1fr auto; gap: 10px; align-items: center; background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: var(--radius); padding: 10px 14px; box-shadow: var(--shadow); }
.shotlist .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--pine); color: #fff; font: 800 var(--fs-xs) var(--font-display); }
@media (prefers-color-scheme: dark) { .shotlist .n { background: var(--raised); } }
.shotlist .club, .shotlist .yd { font: 800 18px var(--font-display); font-variant-numeric: tabular-nums; }
.hole-head { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.hole-head h3 { font: 800 28px var(--font-display); margin: 0; }

/* Range: the plot and club toggles. The plot's turf is fixed for the same reason as the shot map's. */
.range-plot { position: relative; border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow-lift); background: #1d5a2a; }
@media (prefers-color-scheme: dark) { .range-plot { background: #113a1b; } }
.range-plot svg { display: block; width: 100%; height: auto; }
.range-plot .arc { fill: none; stroke: rgb(255 255 255 / 0.28); stroke-width: 1.5; stroke-dasharray: 3 6; }
.range-plot .arc-l { font: 700 var(--fs-xs) var(--font-display); fill: rgb(255 255 255 / 0.75); }
.range-plot .ball { stroke: #fff; stroke-width: 1.5; transition: opacity 0.3s, r 0.3s var(--spring); }
.range-plot .ball.off { opacity: 0.07; }
.range-plot .mean { fill: none; stroke-width: 2; stroke-dasharray: 5 4; transition: opacity 0.3s; }
.range-plot .mean.off { opacity: 0; }
.club-toggles { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.club-toggles button { display: inline-flex; gap: 8px; align-items: center; min-height: 36px; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: var(--ink);
  border-radius: 999px; padding: 5px 14px; font: 800 var(--fs-s) var(--font-display); cursor: pointer; transition: transform 0.2s var(--spring), opacity 0.2s; }
.club-toggles button { box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent); }
.club-toggles button[aria-pressed=false] { opacity: 0.45; background: transparent; }
.club-toggles button:active { transform: scale(0.94); }
.club-toggles i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 20%, transparent); }
.club-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.club-stats .tile .value small { font-size: 16px; color: var(--slate); font-weight: 700; }

/* The bag builder: a bag of clubs, a 14-club meter, the tray and the carry ladder. */
.builder { display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: start; }
@media (max-width: 860px) { .builder { grid-template-columns: 1fr; } }
.bag-stage { position: relative; background: radial-gradient(100% 80% at 50% 0%, color-mix(in srgb, var(--fairway) 22%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: var(--radius-l); padding: 18px; box-shadow: var(--shadow); min-height: 420px; }
@media (max-width: 860px) { .bag-stage { max-width: 420px; } }
.bag-stage svg { display: block; width: 100%; height: auto; overflow: visible; }
.bag-stage .bag-body { fill: var(--pine); }
.bag-stage .bag-trim { fill: var(--flag); }
.bag-stage .bag-pocket { fill: color-mix(in srgb, #fff 10%, var(--pine)); }
.bag-stage .bag-mark { font: 800 24px var(--font-display); letter-spacing: 0.04em; }
.bag-stage .club { transition: transform 0.6s var(--spring), opacity 0.4s; cursor: pointer; }
.bag-stage .club .shaft { stroke: var(--slate); stroke-width: 3; stroke-linecap: round; }
.bag-stage .club .head { fill: color-mix(in srgb, var(--line) 60%, #fff); stroke: #5A6573; stroke-width: 1; }
.bag-stage .club .cover { fill: var(--flag); }
.bag-stage .club:hover { filter: brightness(1.12); }
.bag-stage .club.entering { animation: drop 0.7s var(--spring) both; }
@keyframes drop { from { transform: translateY(-160px) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
.bag-stage .club-tag { font: 800 11px var(--font-display); text-anchor: middle; pointer-events: none; }
.bag-stage .club:focus-visible { outline: none; }
.bag-stage .club:focus-visible .head, .bag-stage .club:focus-visible .cover { stroke: var(--flag); stroke-width: 3; }
.meter-ring { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.meter-ring svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.meter-ring .track { fill: none; stroke: var(--raised); stroke-width: 7; }
.meter-ring .fill { fill: none; stroke: var(--fairway); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset 0.7s var(--spring), stroke 0.3s; }
.meter-ring.full .fill { stroke: var(--flag); }
.meter-ring.over .fill { stroke: var(--clay); }
.meter-ring b { font: 800 26px var(--font-display); font-variant-numeric: tabular-nums; }
.tray { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.tray button { position: relative; min-width: 56px; min-height: 52px; padding: 7px 12px; border-radius: var(--radius); border: 2px dashed var(--line); background: transparent; color: var(--slate);
  font: 800 var(--fs-body) var(--font-display); cursor: pointer; transition: transform 0.3s var(--spring), background 0.2s, border-color 0.2s, color 0.2s; }
.tray button[aria-pressed=true] { border-style: solid; border-color: var(--fairway); background: var(--mint); color: var(--fairway); }
.tray button:hover { transform: translateY(-2px); }
.tray button:active { transform: scale(0.92); }
.tray button small { display: block; font: 600 var(--fs-xs) var(--font-text); color: var(--slate); }
.ladder { display: grid; gap: 4px; margin: 10px 0; }
.rung { display: grid; grid-template-columns: 48px 1fr 74px; gap: 10px; align-items: center; transition: opacity 0.3s; }
.rung .name { font: 800 var(--fs-body) var(--font-display); }
.rung .bar { height: 22px; border-radius: 8px; background: var(--raised); position: relative; overflow: hidden; }
.rung .bar i { position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); border-radius: inherit; background: linear-gradient(90deg, var(--fairway), var(--putting));
  transition: width 0.9s var(--spring); }
.rung .bar i.est { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--fairway) 70%, transparent) 0 6px, color-mix(in srgb, var(--fairway) 45%, transparent) 6px 12px); }
.rung .bar s { position: absolute; top: 0; bottom: 0; left: var(--lo); width: var(--span); background: rgb(255 255 255 / 0.35); text-decoration: none; }
.rung .yd { font: 800 var(--fs-body) var(--font-display); text-align: right; font-variant-numeric: tabular-nums; }
.gapnote { grid-column: 2 / 4; font-size: var(--fs-xs); font-weight: 700; padding: 1px 10px; border-radius: 999px; justify-self: start; margin: -1px 0; }
.gapnote.gap { background: color-mix(in srgb, var(--flag) 22%, transparent); color: var(--flag-ink); }
.gapnote.overlap { background: color-mix(in srgb, var(--water) 18%, transparent); color: var(--water); }
/* Which bag: the site's segmented control. */
.bag-tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 999px; background: var(--raised); margin: 4px 0 18px; }
.bag-tabs button { border: 0; border-radius: 999px; padding: 7px 16px; background: transparent; color: var(--slate); font: 600 var(--fs-s)/1.2 var(--font-text); cursor: pointer; transition: color 0.2s, background 0.2s; }
.bag-tabs button:hover { color: var(--ink); }
.bag-tabs button[aria-pressed=true] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.bag-tabs button:not([aria-pressed]) { color: var(--fairway); }
@media (max-width: 560px) { .bag-tabs { border-radius: var(--radius); } }
.savebar { position: sticky; bottom: 16px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 12px 12px 20px; border-radius: var(--radius-l);
  background: var(--stage); color: #fff; box-shadow: var(--shadow-lift); margin-top: 16px; animation: rise 0.45s var(--spring) both; }
@media (prefers-color-scheme: dark) { .savebar { box-shadow: inset 0 0 0 1px var(--stage-line), var(--shadow-lift); } }
.savebar .button { background: var(--stage-green); color: var(--stage); }
@keyframes rise { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Lists of things (sessions). */
.list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 10px; }
.list li { background: var(--surface); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: var(--radius-l); box-shadow: var(--shadow); transition: transform 0.35s var(--spring), box-shadow 0.35s; }
.list li:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; color: inherit; text-decoration: none; }
.list .sub { color: var(--slate); font-size: var(--fs-m); }
.list .right { text-align: right; white-space: nowrap; font: 800 18px var(--font-display); font-variant-numeric: tabular-nums; }
.tag { font-size: var(--fs-xs); color: var(--slate); border: 1px solid var(--slate); border-radius: 999px; padding: 0 8px; margin-left: 6px; }
.scroll { overflow-x: auto; margin: 12px 0; }
main.wide .card.scroll { padding: 6px 12px; }
.clubs-table th[scope], .clubs-table tbody th, .clubs-table tr > th:first-child { text-transform: none; letter-spacing: 0; }
.clubs-table tr:not(:first-child) > th { font: 800 var(--fs-body) var(--font-display); color: var(--ink); text-transform: none; letter-spacing: 0; border-bottom: 1px solid var(--line); }
.clubs-table td { color: var(--ink); }
.clubs-table tr:last-child > th { border-bottom: 0; }
tr.retired th, tr.retired td { color: var(--slate) !important; }

/* Bits and pieces. */
button.link { border: 0; background: transparent; padding: 0; color: var(--fairway); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
button.link:hover { text-decoration: underline; }
button.link.on-dark { color: #fff; margin-right: 14px; }
.link.danger { color: var(--clay); }
.back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 14px; font-weight: 700; color: var(--fairway); text-decoration: none; }
.back:hover { text-decoration: underline; }
.notice { animation: rise 0.45s var(--spring) both; margin: 0 0 16px; }
.row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.row:has(> h1) { align-items: center; }
main.wide .row:has(> h2:not(.flush)) { margin-top: var(--space-7); }
main.wide .row > h2 { margin-top: 0; }
main.wide .row h1, main.wide .row h2 { margin-bottom: 0; }
.row > a:not(.button) { font-weight: 600; text-decoration: none; }
.insights { padding-left: 18px; }
.book-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 4px; }
.book-links a.chip { color: var(--fairway); text-decoration: none; }
.book-links a.chip:hover { background: var(--mint); }

/* Empty and missing: the site's .state, with a golf ball that bounces (still with Reduce Motion). */
p.state { margin: 8px 0; }
.state.empty { padding: 48px 24px; }
.state.empty p { margin: 6px 0; }
.state.empty strong { margin-bottom: 0; }
.empty .ball { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #DFE4EA 60%, #B9C2CD); box-shadow: inset -4px -6px 10px rgb(0 0 0 / 0.12), 0 10px 18px rgb(0 0 0 / 0.12);
  animation: bounce 1.6s var(--ease) infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(-18px); } }

/* Your account, under each page. */
footer#account-bar { color: var(--slate); margin-top: var(--space-7); font-size: var(--fs-s); border-top: 1px solid var(--line); padding-top: var(--space-4); }
footer#account-bar p { margin: 0 0 6px; }
footer#account-bar .account-line { color: var(--ink); font-weight: 500; }

/* Dialogs: the site's .sheet and .form fields. */
dialog.sheet[open] { animation: rise 0.4s var(--spring) both; }
dialog.form { width: calc(100% - 32px); max-width: 480px; }
main.wide dialog h2, dialog.sheet h2 { font-size: var(--fs-h3); margin: 0 0 12px; }
dialog.form p { margin: 0 0 14px; }
dialog.form label:has(> input[type=checkbox]), dialog.form fieldset label { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; margin: 4px 16px 4px 0; }
dialog.form input:not([type=checkbox]), dialog.form select { width: 100%; }
dialog.form fieldset { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 14px 10px; margin: 0 0 14px; }
dialog.form legend { font: 600 var(--fs-s) var(--font-text); padding: 0 4px; }
dialog.form .error, form.log .error { min-height: 1em; }
dialog .actions { margin: 18px 0 0; line-height: 2.6; }
dialog .actions .button { margin-right: 10px; }
/* The site's .button sets display, which would beat the hidden attribute. */
main.wide [hidden], dialog [hidden] { display: none !important; }
#signin { text-align: center; }
#signin p { margin: 0 0 12px; }
#qr { display: flex; justify-content: center; margin: 14px 0; }
#qr svg { width: 200px; height: 200px; background: #fff; border-radius: var(--radius); padding: 6px; box-shadow: inset 0 0 0 1px var(--line); }
#signin .code { margin: 8px 0 12px; font-size: clamp(28px, 7vw, 36px); }

/* Logging a session: the site's fields, in a card-width column. */
form.log { max-width: 680px; }
form.log > p { margin: 0 0 16px; }
form.log input:not([type=file]), form.log select { width: 100%; }
form.log table { width: 100%; border-collapse: collapse; }
form.log th { font: 600 var(--fs-xs)/1.2 var(--font-text); letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate); text-align: left; padding: 6px 6px 8px; }
form.log td { padding: 4px 6px 4px 0; }
form.log td input, form.log td select { min-height: 40px; padding: 6px 10px; }
form.log input[type=file] { font: var(--fs-s) var(--font-text); color: var(--slate); }
form.log input[type=file]::file-selector-button { margin-right: 12px; min-height: var(--control-h-s); padding: 6px 14px; border: 0; border-radius: 999px;
  background: var(--raised); color: var(--ink); font: 600 var(--fs-s) var(--font-text); cursor: pointer; }

/* Motion: reveals as you scroll, and the page sliding in (View Transitions). */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }
[data-reveal].in { opacity: 1; transform: none; }
::view-transition-old(page) { animation: page-out 0.22s var(--ease) both; }
::view-transition-new(page) { animation: page-in 0.38s var(--ease) both; }
#page { view-transition-name: page; }
@keyframes page-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes page-in { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0ms !important; transition-duration: 0.001ms !important; transition-delay: 0ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* Your yardage book (#357): a cover, then a panel a hole with the hole drawn upright and still. */
.book-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 4px; }
.book-links a.chip { color: var(--fairway); text-decoration: none; }
.book-links a.chip:hover { background: var(--mint); }
.book-cover .book-who { color: #fff; font-weight: 700; font-size: 18px; margin: 0 0 10px; }
.book-cover .book-key { max-width: 44em; }
.book-hole { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 24px; align-items: start; background: var(--surface); border-radius: var(--radius);
  padding: 20px; margin: 16px 0; box-shadow: var(--shadow); }
@media (max-width: 640px) { .book-hole { grid-template-columns: 1fr; } .book-plan { max-width: 300px; } }
.book-plan svg { display: block; width: 100%; height: auto; border-radius: 14px; }
.plan .rough { fill: color-mix(in srgb, var(--turf) 16%, var(--surface)); }
.plan .fairway { fill: var(--turf); stroke: color-mix(in srgb, var(--turf) 70%, var(--ink)); stroke-width: 0.6; }
.plan .tee { fill: color-mix(in srgb, var(--turf) 55%, var(--surface)); stroke: color-mix(in srgb, var(--turf) 70%, var(--ink)); stroke-width: 0.6; }
.plan .green { fill: var(--putting); stroke: var(--fairway); stroke-width: 1.2; }
.plan .bunker { fill: var(--sand); stroke: color-mix(in srgb, var(--sand) 65%, var(--ink)); stroke-width: 0.8; }
.plan .water { fill: var(--water); }
.plan .playline { fill: none; stroke: color-mix(in srgb, var(--ink) 45%, transparent); stroke-width: 1.2; stroke-dasharray: 4 5; }
.plan .tee-mark { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.plan .pin line { stroke: var(--ink); stroke-width: 1.5; }
.plan .pin path { fill: var(--clay); }
.plan .ring { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-dasharray: 5 4; }
.plan .spot { fill: var(--flag); stroke: var(--ink); stroke-width: 1; }
.plan .lbl { font: 800 12px var(--font-display); fill: var(--ink); font-variant-numeric: tabular-nums;
  paint-order: stroke; stroke: color-mix(in srgb, var(--surface) 85%, transparent); stroke-width: 3px; stroke-linejoin: round; }
.plan .green-lbl { fill: var(--fairway); }
.plan .water-lbl { fill: var(--water); }
.book-info .hole-head h3 { font-size: 26px; }
.book-yards { margin: 12px 0; font-size: 15px; width: auto; }
.book-yards th, .book-yards td { padding: 6px 12px 6px 0; text-align: left; white-space: nowrap; }
.book-yards td { font-family: var(--font-display); font-weight: 700; }
.book-yards th { font-weight: 600; color: var(--slate); }
.book-yards .green-row td { color: var(--fairway); }
.book-shots { font-size: 15px; margin: 8px 0; }
.book-notes { margin-top: 14px; font-size: 13px; font-weight: 700; color: var(--slate); }
.book-notes .lines { height: 72px; background: repeating-linear-gradient(180deg, transparent 0 23px, var(--line) 23px 24px); }

@media (max-width: 640px) { .book-hole { grid-template-columns: minmax(0, 1fr); } .book-yards th, .book-yards td { white-space: normal; padding-right: 8px; } }

/* Printing (or saving as PDF): only the book, black on white with the light palette, a hole or two a page. */
@media print {
  :root {
    --pine: #0B2440; --fairway: #1C773A; --mint: #E4F2E9; --flag: #F5B700; --sand: #E8DCC0; --water: #2A71CC;
    --clay: #C94040; --berry: #8E2430; --paper: #FFFFFF; --surface: #FFFFFF; --raised: #ECEFF3; --line: #C9D0D8;
    --turf: #7FD67F; --putting: #3CCF5A; --ink: #000000; --slate: #3A434E;
  }
  @page { margin: 12mm; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: #fff; color: #000; font-size: 10pt; }
  main.wide { max-width: none; margin: 0; padding: 0; }
  .site-header, .site-footer, .skip-link, #gate, footer#account-bar, .back, .no-print, dialog { display: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  #page { view-transition-name: none; }
  .book-cover { background: #fff !important; color: #000; border: 2px solid var(--fairway) !important; box-shadow: none; border-radius: 6mm;
    padding: 14mm 12mm; margin: 0; break-after: page; }
  .book-cover .contours { display: none; }
  .book-cover h1 { color: #000; font-size: 32pt; }
  .book-cover .eyebrow { color: var(--fairway); }
  .book-cover .book-who { color: #000; }
  .book-cover .hero-note { color: var(--slate); font-size: 11pt; }
  .book-hole { box-shadow: none; border: 0.3mm solid var(--line); border-radius: 4mm; height: 128mm; box-sizing: border-box; overflow: hidden;
    grid-template-columns: 70mm 1fr; gap: 6mm; padding: 4mm; margin: 0 0 6mm; break-inside: avoid; page-break-inside: avoid; }
  .book-plan svg { width: auto; height: 119mm; border-radius: 2mm; }
  .book-info .hole-head h3 { font-size: 18pt; }
  .book-info .chip { background: none; border: 0.3mm solid var(--line); color: #000; }
  .book-yards { font-size: 10pt; margin: 3mm 0; }
  .book-yards th, .book-yards td { padding: 1.2mm 2mm 1.2mm 0; border-color: var(--line); }
  .book-shots { font-size: 10pt; }
  .book-notes .lines { height: 30mm; background: repeating-linear-gradient(180deg, transparent 0 7mm, var(--line) 7mm 7.3mm); }
}
/* A5 and other narrow paper: the hole above its numbers, one a page. */
@media print and (max-width: 160mm) {
  .book-hole { grid-template-columns: 1fr; height: auto; gap: 2mm; margin: 0; break-after: page; }
  .book-hole:last-child { break-after: auto; }
  .book-plan { text-align: center; }
  .book-plan svg { display: inline-block; height: 80mm; }
  .book-info .hole-head h3 { font-size: 15pt; }
  .book-yards { font-size: 8.5pt; margin: 1.5mm 0; }
  .book-yards th, .book-yards td { padding: 0.6mm 2mm 0.6mm 0; }
  .book-shots { font-size: 9pt; margin: 1.5mm 0; }
  .book-notes { margin-top: 1.5mm; }
  .book-notes .lines { height: 14mm; }
}
