/* =========================================================
   Putt Planner styles
   Deep green, warm ivory, brass used sparingly. Every size, colour, space, radius and shadow
   comes from a token in :root (docs\design-spec.md, section 2); a component rule never types a
   raw font size, text colour, spacing value, radius or shadow.
   ========================================================= */

/* Heading font, served from this site (vendor/fonts; SIL Open Font License, see OFL.txt there).
   One variable file per alphabet covers the weights used: 500, 600 and 700. */
@font-face {
  font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url(vendor/fonts/cormorant-garamond-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url(vendor/fonts/cormorant-garamond-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* =========================================================
   1. TOKENS
   ========================================================= */
:root {
  /* ---------- palette ---------- */
  --green-950: #0c1c14;
  --green-900: #11261b;
  --green-800: #173526;
  --green-700: #1f4a34;
  --green-600: #2a6044;
  --green-100: #e4ede5;
  --ivory:     #f6f2e8;   /* page background */
  --paper:     #fffdf8;   /* card background */
  --paper-2:   #faf6ec;   /* tile / inset background */
  --rule:        #e0d9c6; /* hairlines, card borders */
  --rule-strong: #cfc6ae; /* input borders, dividers that must be seen */
  --brass:       #b3925a; /* decorative lines only, never text, never a state */
  --brass-light: #d3b783; /* accent text on dark green */
  --brass-ink:   #765a26; /* eyebrow text on light */

  /* ---------- text: three tones on light, two on dark ---------- */
  --text:        #1b221d; /* primary   14.53:1 on ivory, 15.97:1 on paper */
  --text-muted:  #5c665e; /* secondary  5.34:1 on ivory,  5.87:1 on paper, 4.99:1 on green-100 */
  --text-accent: #765a26; /* eyebrows   5.76:1 on ivory,  6.34:1 on paper */
  --text-on-dark:       #fbf8ef; /* 15.02:1 on green-900, 12.57:1 on green-800 */
  --text-on-dark-muted: #b9c6bb; /*  9.00:1 on green-900,  7.54:1 on green-800 */
  --link: var(--green-700);      /*  9.00:1 on ivory */
  --ink: var(--text);            /* legacy names */
  --muted: var(--text-muted);

  /* ---------- access colours: dots, map markers, fills only ---------- */
  --acc-public:  #2f7d4f;
  --acc-private: #b8891f; /* 2.83:1 on ivory: never text, always next to a text label */
  --acc-other:   #2f6fad;
  --acc-semi: var(--acc-other); --acc-resort: var(--acc-other); --acc-unknown: var(--acc-other);

  /* ---------- state colours ---------- */
  --check-on:  #2f7d4f;  /* feature present: 4.96:1 on paper */
  --check-off: #c9c3b3;  /* feature not listed: decorative; the item's text stays --text-muted (5.87:1) */
  --star-on:   #8a6a1a;  /* filled rating star: 4.97:1 on paper */
  --star-off:  #8a8f88;  /* empty star outline: 3.25:1 on paper */
  --danger:    #9b2c1c;  /* errors only: 6.78:1 on ivory */
  --warn-bg:   #f8efd9;  /* confirmations and notes */
  --warn-rule: #dcc79b;

  /* ---------- type ---------- */
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;

  --fs-display: 44px;  --lh-display: 48px;  /* serif 600 */
  --fs-title:   32px;  --lh-title:   36px;  /* serif 600 */
  --fs-h2:      24px;  --lh-h2:      28px;  /* serif 600 */
  --fs-h3:      20px;  --lh-h3:      24px;  /* serif 600 */
  --fs-body:    16px;  --lh-body:    24px;  /* sans 400 */
  --fs-small:   14px;  --lh-small:   20px;  /* sans 400 / 600 */
  --fs-label:   12px;  --lh-label:   16px;  /* sans 600, uppercase */
  --track-label: .08em;
  --track-display: -.01em;
  --fw-regular: 400; --fw-strong: 600;
  --measure: 68ch;

  /* ---------- spacing: 4px base ---------- */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
  --gutter: 32px;
  --card-pad: 24px;

  /* ---------- shape ---------- */
  --r-sm: 8px;
  --r-md: 12px;
  --r-pill: 999px;
  --border: 1px solid var(--rule);
  --border-strong: 1px solid var(--rule-strong);
  --shadow-1: 0 1px 2px rgba(17, 38, 27, .05), 0 4px 12px -6px rgba(17, 38, 27, .12);
  --shadow-2: 0 2px 6px rgba(12, 28, 20, .10), 0 16px 40px -12px rgba(12, 28, 20, .35);
  --shadow: var(--shadow-1);

  /* ---------- icons, controls, focus ---------- */
  --icon: 20px;  --icon-sm: 16px;  --icon-stroke: 1.75px;
  --control-h: 40px;
  --control-h-touch: 44px;
  --focus: 0 0 0 2px var(--paper), 0 0 0 4px var(--green-700);
  --focus-on-dark: 0 0 0 2px var(--green-900), 0 0 0 4px var(--brass-light);
  --hover: rgba(17, 38, 27, .06);           /* quiet buttons */
  --scrim: rgba(12, 28, 20, .66);           /* behind dialogs and sheets */

  /* ---------- layout ---------- */
  --nav-w: 236px;
  --content-max: 1200px;
  --course-max: 960px;
  --tab-h: 64px;
  --head-h: 56px;          /* phones: the header with the site's name and the search */
}
@media (max-width: 767px) {
  :root {
    --fs-display: 32px; --lh-display: 36px;
    --fs-title:   28px; --lh-title:   32px;
    --gutter: 16px; --card-pad: 16px;
  }
}
@media (pointer: coarse) { :root { --control-h: var(--control-h-touch); } }

/* =========================================================
   2. BASE
   ========================================================= */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font: var(--fw-regular) var(--fs-body)/var(--lh-body) var(--sans);
  color: var(--text); background: var(--ivory);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-underline-offset: 3px; }
[hidden] { display: none !important; }
p { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: var(--fw-strong); font-variant-numeric: lining-nums; color: var(--text); }
h1 { font-size: var(--fs-display); line-height: var(--lh-display); letter-spacing: var(--track-display); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-h3); }

.eyebrow, .label {
  margin: 0; font-size: var(--fs-label); line-height: var(--lh-label); font-weight: var(--fw-strong);
  letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text-accent);
}
.na { color: var(--text-muted); font-family: var(--sans); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: var(--fw-regular); }

/* one icon set: line icons on a 24-unit box */
svg { flex: none; }
.btn svg, .ilink svg, .nav-links svg, .nav-acct svg, .fbar svg, .qs svg, .cp-back svg, .card-share svg, .fav svg, .dlg-x svg, .clear-x svg, .lay-btn svg, .qbtn svg, .sl-tray-n svg, .ys-btn svg {
  fill: none; stroke: currentColor; stroke-width: var(--icon-stroke); stroke-linecap: round; stroke-linejoin: round;
}

/* focus: a gap of paper and a green ring; on dark green, a brass ring */
:focus-visible { outline: none; box-shadow: var(--focus); }
.on-dark :focus-visible, .hero :focus-visible { box-shadow: var(--focus-on-dark); }
.hero-card :focus-visible { box-shadow: var(--focus); }

/* =========================================================
   3. SHELL AND NAVIGATION
   ========================================================= */
.shell { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); height: 100%; }

.nav {
  display: flex; flex-direction: column; min-height: 0; overflow-y: auto;
  padding: var(--sp-6) 0 var(--sp-5);
  color: var(--text-on-dark-muted); background: var(--green-950);
}
.brand { display: block; padding: 0 var(--sp-5) var(--sp-5); text-decoration: none; }
.brand-name { display: block; font-family: var(--serif); font-size: var(--fs-title); line-height: var(--lh-title); font-weight: var(--fw-strong); color: var(--text-on-dark); }
.brand::after { content: ""; display: block; width: 36px; height: 1px; margin-top: var(--sp-4); background: var(--brass); }

.nav-links { list-style: none; margin: 0; padding: 0 var(--sp-3); display: grid; gap: var(--sp-1); }
.nav-links a, .nav-acct li > a, .nav-tab {
  position: relative; display: flex; align-items: center; gap: var(--sp-3);
  min-height: var(--control-h); padding: 0 var(--sp-3);
  font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-on-dark-muted); text-decoration: none;
  border-radius: var(--r-sm);
}
.nav-tab { width: 100%; font-family: inherit; font-weight: var(--fw-regular); background: none; border: 0; cursor: pointer; }
.nav-links a:hover, .nav-acct li > a:hover, .nav-tab:hover { background: rgba(255, 255, 255, .06); color: var(--text-on-dark); }
.nav-links a[aria-current="page"], .nav-acct li > a[aria-current="page"], .nav-tab.is-current { background: rgba(255, 255, 255, .06); color: var(--text-on-dark); font-weight: var(--fw-strong); }
.nav-links svg, .nav-acct li > a svg { width: var(--icon); height: var(--icon); }
.nav-links .nav-m, .m-head { display: none; }

/* quick search: the filter bar's search field, in the side navigation; its matches in a list beside it */
.qs { margin: 0 var(--sp-3) var(--sp-4); }
.qs .qs-box { flex: none; min-width: 0; }
.qs .qs-close { display: none; }
.qs-pop {
  position: fixed; z-index: 1600; top: var(--qs-top, var(--sp-8)); left: var(--qs-left, var(--sp-4)); width: min(400px, calc(100vw - var(--qs-left, var(--sp-4)) - var(--sp-4)));
  max-height: calc(100vh - var(--qs-top, var(--sp-8)) - var(--sp-4)); overflow-y: auto; padding: var(--sp-1);
  color: var(--text); background: var(--paper); border: var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-2);
}
.qs-list { list-style: none; margin: 0; padding: 0; }
.qs-o { display: grid; gap: var(--sp-1); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); cursor: pointer; }
.qs-o:hover, .qs-o[aria-selected="true"] { background: var(--green-100); }
.qs-o[aria-selected="true"] { box-shadow: inset 2px 0 0 var(--green-700); }
.qs-nm { font-size: var(--fs-small); line-height: var(--lh-small); font-weight: var(--fw-strong); }
.qs-pl { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--sp-3); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.qs-pl .tag { font-weight: var(--fw-regular); color: var(--text-muted); }
.qs-all { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 var(--sp-3); margin-top: var(--sp-1); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: var(--fw-strong); color: var(--link); border-top: var(--border); border-radius: 0 0 var(--r-sm) var(--r-sm); }
.qs-all .n { font-weight: var(--fw-regular); color: var(--text-muted); }
.qs-empty { padding: var(--sp-3); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }

.nav-acct { margin: var(--sp-5) var(--sp-3) 0; padding: var(--sp-4) var(--sp-3) 0; border-top: 1px solid rgba(255, 255, 255, .09); font-size: var(--fs-small); line-height: var(--lh-small); }
.nav-acct .eyebrow { color: var(--brass-light); }
.nav-who { margin: var(--sp-1) 0 var(--sp-2); font-weight: var(--fw-strong); color: var(--text-on-dark); overflow-wrap: anywhere; }
.nav-acct ul { list-style: none; display: grid; gap: var(--sp-1); margin: 0 calc(-1 * var(--sp-3)); padding: 0; }
.nav-acct li > a .n { margin-left: auto; font-weight: var(--fw-strong); color: var(--brass-light); font-variant-numeric: tabular-nums; }
.nav-acct .linkbtn {
  display: block; width: 100%; padding: var(--sp-2) var(--sp-3);
  font-weight: var(--fw-regular); text-align: left; color: var(--text-on-dark-muted); text-decoration: none; border-radius: var(--r-sm);
}
.nav-acct .linkbtn:hover { color: var(--text-on-dark); background: rgba(255, 255, 255, .06); text-decoration: underline; }
/* signed out: Create account (primary on dark) and Sign in (secondary on dark) */
.nav-join, .nav-signin {
  display: flex; align-items: center; justify-content: center; min-height: var(--control-h);
  font-size: var(--fs-small); line-height: var(--lh-small); font-weight: var(--fw-strong); text-decoration: none; border-radius: var(--r-sm);
}
.nav-join { color: var(--green-950); background: var(--brass-light); }
.nav-join:hover { background: var(--text-on-dark); }
.nav-signin { margin-top: var(--sp-2); color: var(--text-on-dark); border: 1px solid rgba(211, 183, 131, .55); }
.nav-signin:hover { background: rgba(255, 255, 255, .06); border-color: var(--brass-light); }
.nav-acct .hint { margin-top: var(--sp-2); font-size: var(--fs-label); line-height: var(--lh-label); color: var(--text-on-dark-muted); }
.nav-acct .rm-confirm { margin: var(--sp-2) 0 0; color: var(--text-on-dark); background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16); }

/* ---------- main column, pages ---------- */
.main { position: relative; min-width: 0; min-height: 0; height: 100%; overflow-y: auto; }
.page { max-width: calc(var(--content-max) + 2 * var(--gutter)); margin: 0 auto; padding: var(--sp-7) var(--gutter) var(--sp-8); }
.page-head { margin-bottom: var(--sp-7); }
.page-head .eyebrow + h1 { margin-top: var(--sp-2); }
.lede { margin-top: var(--sp-2); max-width: var(--measure); color: var(--text-muted); }

/* =========================================================
   4. COMPONENTS
   ========================================================= */
/* ---------- card: one style for the whole site ---------- */
.card { background: var(--paper); border: var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-1); }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-2) var(--sp-4); margin-bottom: var(--sp-4); }
.sec-head h2 { min-width: 0; }
.sec-head .eyebrow { margin-bottom: var(--sp-1); }
.sec-head > :last-child:not(:first-child) { margin-left: auto; }
.more { font-size: var(--fs-small); line-height: var(--lh-small); font-weight: var(--fw-strong); white-space: nowrap; }
.more::after { content: " \2192"; }
.sec-note { margin: calc(-1 * var(--sp-2)) 0 var(--sp-4); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-6); align-items: start; }
.stack { display: grid; gap: var(--sp-6); }
.empty { padding: var(--sp-6) var(--sp-5); text-align: center; color: var(--text-muted); }
.empty strong { display: block; margin-bottom: var(--sp-1); font-family: var(--serif); font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-strong); color: var(--text); }
.empty-card { padding: var(--card-pad); color: var(--text-muted); }

/* ---------- tiles: label over a number (stat tiles, price tiles, home figures) ---------- */
.tiles { display: grid; gap: var(--sp-2); }
.tiles-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
.tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); }
.tiles-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tile { min-width: 0; padding: var(--sp-3) var(--sp-4); background: var(--paper-2); border: var(--border); border-radius: var(--r-sm); }
.tile .v {
  display: block; margin-top: var(--sp-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-family: var(--serif); font-size: var(--fs-title); line-height: var(--lh-title); font-weight: var(--fw-strong);
  font-variant-numeric: tabular-nums lining-nums; color: var(--text);
}
.tile .v .na, .tile .v.na { font-family: var(--sans); font-size: var(--fs-small); line-height: var(--lh-title); }
.tile .v .na { line-height: inherit; }
/* a word, not a number (difficulty): sans, body size */
.tile-diff .v { font-family: var(--sans); font-size: var(--fs-body); line-height: var(--lh-title); }
.tile-diff .pips { font-size: var(--fs-body); font-weight: var(--fw-strong); white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  height: var(--control-h); padding: 0 var(--sp-4);
  font: var(--fw-strong) var(--fs-small)/var(--lh-small) var(--sans); white-space: nowrap; text-decoration: none;
  color: var(--text); background: var(--paper); border: var(--border-strong); border-radius: var(--r-sm); cursor: pointer;
}
.btn:hover { background: var(--paper-2); }
.btn svg { width: var(--icon-sm); height: var(--icon-sm); }
.btn.primary { padding: 0 var(--sp-5); color: var(--text-on-dark); background: var(--green-800); border-color: var(--green-800); }
.btn.primary:hover { background: var(--green-900); border-color: var(--green-900); }
.btn[aria-pressed="true"] { background: var(--green-100); border-color: var(--green-700); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.danger { color: var(--text-on-dark); background: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: var(--green-950); border-color: var(--green-950); }
.btn.sq { width: var(--control-h); padding: 0; }
.linkbtn {
  display: inline; padding: 0; font: inherit; font-weight: var(--fw-strong); color: var(--link);
  text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; cursor: pointer;
}
.linkbtn:hover { color: var(--green-950); }
/* quiet icon buttons: favorite, shortlist, share on cards, close (.qbtn: any other) */
.fav, .card-share, .dlg-x, .qbtn {
  display: inline-grid; place-items: center; flex: 0 0 auto; width: var(--control-h); height: var(--control-h); padding: 0;
  font-family: var(--sans); color: var(--text-muted); background: none; border: 0; border-radius: var(--r-sm); cursor: pointer;
}
.fav:hover, .card-share:hover, .dlg-x:hover, .qbtn:hover { color: var(--text); background: var(--hover); }
.fav svg, .card-share svg, .dlg-x svg, .qbtn svg { width: var(--icon); height: var(--icon); }
/* the favorite star: outline when off, filled green when on */
.fav[aria-pressed="true"] { color: var(--green-700); }
.fav[aria-pressed="true"] svg { fill: currentColor; }
/* the shortlist toggle: a list with a plus; on the shortlist, green with a tick (shape and colour both change) */
.sl-btn .i-on, .sl-tray-n .i-on { display: none; }
.sl-btn[aria-pressed="true"] { color: var(--green-700); }
.sl-btn[aria-pressed="true"] .i-add { display: none; }
.sl-btn[aria-pressed="true"] .i-on { display: inline; }

/* ---------- form controls ---------- */
.field { display: block; min-width: 0; }
input[type="search"], select, .su-input, .rd-field input[type="date"], .share-field input {
  width: 100%; height: var(--control-h); padding: 0 var(--sp-3);
  font: var(--fw-regular) var(--fs-small)/var(--lh-small) var(--sans); color: var(--text);
  background: var(--paper); border: var(--border-strong); border-radius: var(--r-sm);
}
input::placeholder { color: var(--text-muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--green-700); }
select.is-set { font-weight: var(--fw-strong); border-color: var(--green-700); }

/* ---------- segmented control (List | Map, Full | Short, Shot | Hazard) ---------- */
.seg { display: inline-flex; padding: var(--sp-1); gap: var(--sp-1); background: var(--paper-2); border: var(--border-strong); border-radius: var(--r-pill); }
.seg button, .seg a {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: calc(var(--control-h) - 2 * var(--sp-1) - 2px); padding: 0 var(--sp-4);
  font: var(--fw-strong) var(--fs-small)/var(--lh-small) var(--sans); color: var(--text-muted); text-decoration: none;
  background: none; border: 0; border-radius: var(--r-pill); cursor: pointer;
}
.seg button:hover, .seg a:hover { color: var(--text); background: var(--hover); }
.seg button[aria-pressed="true"], .seg a[aria-current="true"] { color: var(--text-on-dark); background: var(--green-700); }

/* ---------- tags: access dot + word; price tier; difficulty pips ---------- */
.tag { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: var(--fw-strong); color: var(--text); white-space: nowrap; }
.tag::before { content: ""; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--acc-unknown); }
.tag-public::before { background: var(--acc-public); }
.tag-private::before { background: var(--acc-private); }
.tag-unknown { font-weight: var(--fw-regular); color: var(--text-muted); }

.price { display: inline-flex; align-items: baseline; font-size: var(--fs-small); line-height: var(--lh-small); font-weight: var(--fw-strong); color: var(--link); white-space: nowrap; letter-spacing: .04em; }
.price i { font-style: normal; color: var(--check-off); }
.price.is-est { color: var(--text-muted); }

.pips { display: inline-flex; align-items: center; gap: var(--sp-2); white-space: nowrap; }
.pips i { display: inline-flex; gap: var(--sp-1); }
.pips i b { width: 6px; height: 6px; border-radius: 50%; background: var(--rule-strong); }
.pips i b.on { background: var(--green-700); }

/* golfer rating: one filled star, the average, the count */
.rv-badge { display: inline-flex; align-items: center; font-size: var(--fs-small); line-height: var(--lh-small); white-space: nowrap; }
.rv-badge > span:first-child { display: inline-flex; align-items: center; gap: var(--sp-1); }
.rv-badge svg { width: var(--icon-sm); height: var(--icon-sm); fill: var(--star-on); stroke: var(--star-on); stroke-width: 1.5; stroke-linejoin: round; }
.rv-badge b { font-weight: var(--fw-strong); }
.rv-badge .n { color: var(--text-muted); }
button.rv-badge { padding: 0; font: inherit; color: var(--text); background: none; border: 0; cursor: pointer; }
button.rv-badge:hover .n { text-decoration: underline; }

/* ---------- course card (Courses list, home page) ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-4); }
.ccard { position: relative; min-width: 0; background: var(--paper); border: var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-1); transition: border-color .15s ease, box-shadow .15s ease; }
.ccard:hover { border-color: var(--rule-strong); box-shadow: var(--shadow-2); }
.ccard-a { display: block; height: 100%; padding: var(--sp-4); color: inherit; text-decoration: none; border-radius: inherit; }
.ccard .c-nm {
  margin-right: calc(3 * var(--control-h) - var(--sp-2));
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.ccard .c-nm.unnamed { font-style: italic; color: var(--text-muted); }
.ccard.bare .c-nm { margin-right: 0; }
.ccard .c-loc { margin-top: var(--sp-1); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.ccard .c-facts { margin-top: var(--sp-2); font-size: var(--fs-small); line-height: var(--lh-small); font-variant-numeric: tabular-nums lining-nums; }
.ccard .c-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-4); margin-top: var(--sp-3); font-size: var(--fs-small); line-height: var(--lh-small); }
.ccard .c-diff { color: var(--text-muted); }
.ccard .c-dist { margin-left: auto; font-weight: var(--fw-strong); color: var(--text); }
.ccard .c-round b { font-weight: var(--fw-strong); }
.ccard .c-acts { position: absolute; top: var(--sp-1); right: var(--sp-1); display: flex; }
/* the course picked on the map, or opened last */
.ccard.active { background: var(--green-100); box-shadow: inset 2px 0 0 var(--green-700), var(--shadow-1); }
/* Share: the word shows only as "Link copied" */
.card-share .t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.card-share.done .t {
  top: var(--sp-1); right: calc(var(--control-h) + var(--sp-1)); width: auto; height: auto; overflow: visible; clip: auto; padding: var(--sp-1) var(--sp-2);
  font-size: var(--fs-label); line-height: var(--lh-label); font-weight: var(--fw-strong); color: var(--text-on-dark); background: var(--green-800); border-radius: var(--r-sm);
}
.ccard > .share-field { padding: 0 var(--sp-4) var(--sp-4); }
.share-field label { display: grid; gap: var(--sp-1); font-size: var(--fs-label); line-height: var(--lh-label); color: var(--text-muted); }
/* compact cards ("Courses nearby"): tighter padding, no shadow of their own inside their section card */
.cards-compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--sp-3); }
.cards-compact .ccard { box-shadow: none; }
.cards-compact .ccard-a { padding: var(--sp-3) var(--sp-4); }
/* home page rows of cards: a scrolling row on a phone */
.cards-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- feature checklist (Course features, Clubhouse) ---------- */
.checks { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: var(--sp-6); }
.ck {
  display: flex; align-items: flex-start; gap: var(--sp-2); break-inside: avoid;
  min-height: 32px; padding: var(--sp-1) 0; color: var(--text-muted);
}
.ck svg { flex: 0 0 var(--icon-sm); width: var(--icon-sm); height: var(--icon-sm); margin-top: var(--sp-1); fill: none; stroke: var(--check-off); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ck.is-on { color: var(--text); }
.ck.is-on svg { stroke: var(--check-on); stroke-width: 2.25; }

/* ---------- filter bar (Courses and Rankings: the same component) ---------- */
.fbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.fbar-search { position: relative; flex: 1 1 240px; min-width: 240px; }
.fbar-search .i-search { position: absolute; left: var(--sp-3); top: 50%; width: var(--icon-sm); height: var(--icon-sm); margin-top: calc(var(--icon-sm) / -2); color: var(--text-muted); pointer-events: none; }
.fbar-search input { padding-left: calc(var(--sp-3) + var(--icon-sm) + var(--sp-2)); padding-right: var(--control-h); }
.fbar-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.clear-x { position: absolute; right: 0; top: 0; display: grid; place-items: center; width: var(--control-h); height: var(--control-h); padding: 0; color: var(--text-muted); background: none; border: 0; border-radius: var(--r-sm); cursor: pointer; }
.clear-x:hover { color: var(--text); background: var(--hover); }
.clear-x svg { width: var(--icon-sm); height: var(--icon-sm); }
.fbar .near[aria-pressed="true"] { background: var(--green-100); border-color: var(--green-700); }
.fbar-more { display: contents; }
.fbar-more .field { flex: 0 1 160px; min-width: 128px; }
.fbar-more .fl, .fbar-sheet-h, .fbar-sheet-foot { display: none; }
.fbar-toggle { display: none; }
.fbar-toggle .n {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 var(--sp-1);
  font-size: var(--fs-label); line-height: var(--lh-label); color: var(--text-on-dark); background: var(--green-700); border-radius: var(--r-pill);
}
.fbar-clear { margin-left: var(--sp-2); font-size: var(--fs-small); line-height: var(--lh-small); }
.count { margin: var(--sp-3) 0 0; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.count a { font-weight: var(--fw-strong); }
@media (min-width: 768px) and (max-width: 1023px) {
  /* search and Near me on the first row, the four menus on the second */
  .fbar-search { flex-basis: calc(100% - 160px); }
  .fbar-more { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-2); flex: 1 1 100%; }
  .fbar-more .field { flex: none; }
}

/* ---------- dialogs and sheets ---------- */
.dlg {
  width: min(440px, calc(100vw - 2 * var(--sp-4))); max-height: calc(100vh - 2 * var(--sp-4)); padding: var(--sp-5); overflow-y: auto;
  color: var(--text); background: var(--paper); border: var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-2);
}
.dlg::backdrop { background: var(--scrim); }
.dlg h2 { padding-right: var(--sp-6); }
.dlg-x { position: absolute; top: var(--sp-2); right: var(--sp-2); }
.hc-sub { margin-top: var(--sp-2); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }

/* ---------- small notes and confirmations ---------- */
.rm-confirm { padding: var(--sp-3) var(--sp-4); font-size: var(--fs-small); line-height: var(--lh-small); background: var(--warn-bg); border: 1px solid var(--warn-rule); border-radius: var(--r-sm); }
.rm-confirm p.rm-acts { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.fine { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }

/* =========================================================
   5. HOME
   ========================================================= */
/* ---------- hero (signed out) ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden; color: var(--text-on-dark);
  background: linear-gradient(135deg, var(--green-800) 0%, var(--green-900) 45%, var(--green-950) 100%);
}
.hero-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.hero-scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(12, 28, 20, .05) 30%, rgba(12, 28, 20, .82) 100%); }
.hero.no-img .hero-img, .hero.no-img .hero-scrim { display: none; }
.hero-in {
  display: grid; grid-template-columns: minmax(0, 1fr) 400px; align-items: end; gap: var(--sp-7);
  min-height: 560px; max-width: calc(var(--content-max) + 2 * var(--gutter)); margin: 0 auto;
  padding: var(--sp-8) var(--gutter) var(--sp-7);
}
.hero h1 { color: var(--text-on-dark); }
.hero-sub { margin-top: var(--sp-4); max-width: var(--measure); color: var(--text-on-dark); }
.hero-card { align-self: center; padding: var(--card-pad); color: var(--text); box-shadow: var(--shadow-2); }
.hc-title, .acct-h, .dlg h2 { font-size: var(--fs-h3); line-height: var(--lh-h3); color: var(--text); }
.hc-title:focus, .acct-h:focus, .dlg h2:focus, .acct-card h2:focus, #home-h:focus, #nf-h:focus, #rd-h:focus, .sec-head h2:focus { outline: none; box-shadow: none; }
/* the imagery credit: one thin line over the bottom of the photograph */
.hero-credit {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: var(--sp-1) var(--gutter);
  font-size: var(--fs-label); line-height: var(--lh-label); color: var(--text-on-dark-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: rgba(12, 28, 20, .72);
}
.hero-credit a { color: var(--text-on-dark); }

/* ---------- home content ---------- */
.view-home .page { padding-top: var(--sp-6); }
.kpis { margin-bottom: var(--sp-6); }
.kpis .tile { background: var(--paper); box-shadow: var(--shadow-1); }
.grid-2 > .stack > .card { padding: var(--card-pad); }
.toplist { list-style: none; margin: 0; padding: 0; }
.toplist a {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) 0; color: inherit; text-decoration: none; border-top: var(--border);
}
.toplist a:hover .nm { color: var(--link); text-decoration: underline; }
.toplist .pos, .toplist .sc { font-family: var(--serif); font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-strong); font-variant-numeric: lining-nums; }
.toplist .pos { color: var(--text-accent); }
.toplist .sc { color: var(--link); }
.toplist .nm { display: block; font-weight: var(--fw-strong); }
.toplist .pl { display: block; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }

.bars { display: grid; gap: var(--sp-2); }
.bar {
  display: grid; grid-template-columns: 128px minmax(0, 1fr) 32px; align-items: center; gap: var(--sp-3);
  width: 100%; padding: var(--sp-1) 0; font: inherit; font-size: var(--fs-small); line-height: var(--lh-small);
  color: inherit; text-align: left; background: none; border: 0; border-radius: var(--r-sm); cursor: pointer;
}
.bar:hover .bar-name { color: var(--link); text-decoration: underline; }
.bar-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-name .sym { display: inline-block; min-width: 40px; font-weight: var(--fw-strong); color: var(--link); }
.bar-track { display: flex; height: 8px; background: var(--rule); border-radius: var(--r-pill); overflow: hidden; }
.bar-fill { display: block; flex: 0 0 auto; height: 100%; min-width: 3px; background: var(--green-700); }
.bar-fill.public { background: var(--acc-public); }
.bar-fill.semi, .bar-fill.resort, .bar-fill.unknown { background: var(--acc-other); }
.bar-fill.private { background: var(--acc-private); }
.bar-n { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-muted); }
.bars-note { margin-top: var(--sp-1); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.bar-fill.est, .swatch-est { background: repeating-linear-gradient(135deg, var(--brass) 0 3px, var(--warn-bg) 3px 6px); }
.swatch-est { display: inline-block; width: 16px; height: 8px; margin-right: var(--sp-2); border-radius: var(--r-pill); }

/* ---------- home, signed in ---------- */
#home-in .page-head { margin-bottom: var(--sp-7); }
.home-sec + .home-sec { margin-top: var(--sp-6); }
.sec-acts { display: flex; align-items: center; gap: var(--sp-4); margin-left: auto; }
.empty-card .acct-acts { margin-top: var(--sp-3); }

/* ---------- sign-up form (hero card and dialog) ---------- */
.su { display: grid; gap: var(--sp-3); margin-top: var(--sp-4); }
.su-set { min-width: 0; margin: 0; padding: 0; border: 0; }
.su-seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-1); padding: var(--sp-1); background: var(--paper-2); border: var(--border-strong); border-radius: var(--r-sm); }
.su-seg input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.su-seg label {
  display: flex; align-items: center; justify-content: center; min-height: var(--control-h);
  font-size: var(--fs-small); line-height: var(--lh-small); font-weight: var(--fw-strong); color: var(--text-muted);
  border-radius: var(--r-sm); cursor: pointer; user-select: none;
}
.su-seg label:hover { color: var(--text); background: var(--hover); }
.su-seg input:checked + label { color: var(--text-on-dark); background: var(--green-700); }
.su-seg input:focus-visible + label { box-shadow: var(--focus); }
.su-label { display: block; margin-bottom: var(--sp-1); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: var(--fw-strong); }
.su-label .opt { font-weight: var(--fw-regular); color: var(--text-muted); }
.su-input { height: var(--control-h-touch); font-size: var(--fs-body); }
.su-input[aria-invalid="true"] { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.su-hint { margin-top: var(--sp-1); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.su-sent { font-size: var(--fs-small); line-height: var(--lh-small); overflow-wrap: anywhere; }
.su-input[name="code"] { letter-spacing: .2em; font-variant-numeric: tabular-nums; }
.su-msg:empty { margin-top: calc(-1 * var(--sp-3)); }
.su-msg p { font-size: var(--fs-small); line-height: var(--lh-small); }
.su-err { font-weight: var(--fw-strong); color: var(--danger); }
.su-tip { padding: var(--sp-2) var(--sp-3); background: var(--warn-bg); border: 1px solid var(--warn-rule); border-radius: var(--r-sm); overflow-wrap: anywhere; }
.su-btn {
  height: var(--control-h-touch); padding: 0 var(--sp-5); font: var(--fw-strong) var(--fs-small)/var(--lh-small) var(--sans);
  color: var(--text-on-dark); background: var(--green-800); border: 0; border-radius: var(--r-sm); cursor: pointer;
}
.su-btn:hover { background: var(--green-900); }
.su-btn:disabled { opacity: .4; cursor: progress; }
.su-note { padding: var(--sp-2) var(--sp-3); font-size: var(--fs-label); line-height: var(--lh-label); color: var(--text-accent); background: var(--warn-bg); border: 1px dashed var(--warn-rule); border-radius: var(--r-sm); }
.su-alt { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.su-or { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.su-or::before, .su-or::after { content: ""; flex: 1; height: 1px; background: var(--rule-strong); }
/* "Continue with Google / Apple" placeholders: white, outlined, label and logo per each company's button guidance */
.su-pv { display: grid; gap: var(--sp-2); }
.pv-btn {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-3); width: 100%; height: var(--control-h-touch); padding: 0 var(--sp-3);
  font: var(--fw-strong) var(--fs-small)/var(--lh-small) var(--sans); color: var(--text); background: var(--paper);
  border: 1px solid var(--text-muted); border-radius: var(--r-sm); cursor: pointer;
}
.pv-btn:hover { background: var(--paper-2); }
.pv-btn .pv-logo { width: var(--icon); height: var(--icon); }
.pv-apple { border-color: var(--text); }

/* ---------- signed-in panels and favorites ---------- */
.acct-panel > p, .acct-body > p { margin-top: var(--sp-2); font-size: var(--fs-small); line-height: var(--lh-small); }
.acct-who b { overflow-wrap: anywhere; }
.acct-note { margin-bottom: var(--sp-3); padding: var(--sp-2) var(--sp-3); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--link); background: var(--green-100); border-radius: var(--r-sm); }
p.acct-acts { display: flex; flex-wrap: wrap; justify-content: inherit; gap: var(--sp-2); margin-top: var(--sp-4); }
.empty p.acct-acts { justify-content: center; }
p.acct-links { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-5); margin-top: var(--sp-3); font-size: var(--fs-small); line-height: var(--lh-small); }
.acct-panel .su-note, .acct-body .su-note { margin-top: var(--sp-3); }
.acct-rm { margin-top: var(--sp-3); font-size: var(--fs-small); line-height: var(--lh-small); }
.acct-card .acct-body { padding: 0 var(--card-pad) var(--card-pad); }
.acct-card .sec-head, .acct-card .card-head { padding: var(--card-pad) var(--card-pad) 0; }
.sv-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: var(--sp-6); align-items: start; }
.sv-rows { list-style: none; margin: 0; padding: 0; }
.sv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: var(--sp-2) var(--sp-4); padding: var(--sp-4) var(--card-pad); border-bottom: var(--border); }
.sv-row:last-child { border-bottom: 0; }
.sv-main { min-width: 0; color: inherit; text-decoration: none; }
.sv-main .nm { display: block; font-family: var(--serif); font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-strong); }
.sv-main:hover .nm { color: var(--link); text-decoration: underline; }
.sv-main .pl { display: block; margin-top: var(--sp-1); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.sv-tags { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--sp-1) var(--sp-4); }
.sv-kept { margin-top: var(--sp-4); }
.price.none { font-weight: var(--fw-regular); letter-spacing: 0; color: var(--text-muted); }

/* =========================================================
   6. COURSES PAGE: list beside the map
   ========================================================= */
.view-courses { display: flex; flex-direction: column; height: 100%; padding: var(--sp-6) var(--gutter) 0; }
.cs-head { margin-bottom: var(--sp-4); }
.view-courses .count { margin-bottom: var(--sp-4); }
.cs-modes { display: none; }
.cs-body { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 0; margin: 0 calc(-1 * var(--gutter)); border-top: var(--border); }
.cs-list { min-height: 0; overflow-y: auto; background: var(--paper); border-right: var(--border); }
/* the list column: compact cards, divided by rules */
.cs-list .ccard { border: 0; border-bottom: var(--border); border-radius: 0; box-shadow: none; }
.cs-list .ccard-a { padding: var(--sp-3) var(--sp-4); border-radius: 0; }
.cs-list .ccard:hover { background: var(--paper-2); box-shadow: none; }
.cs-list .ccard.active { background: var(--green-100); box-shadow: inset 2px 0 0 var(--green-700); }
.cs-list .ccard-a:focus-visible { box-shadow: inset 0 0 0 2px var(--green-700); }
.cs-list .empty { padding: var(--sp-6) var(--sp-4); }
.cs-map { position: relative; min-width: 0; min-height: 0; }
#map { position: absolute; inset: 0; background: var(--rule); font-family: var(--sans); }
.legend {
  position: absolute; left: var(--sp-3); bottom: var(--sp-6); z-index: 500; display: grid; gap: var(--sp-1);
  padding: var(--sp-2) var(--sp-3); background: var(--paper); border: var(--border); border-radius: var(--r-sm); box-shadow: var(--shadow-1);
}
.legend:empty { display: none; }
.cs-peek { position: absolute; left: var(--sp-3); right: var(--sp-3); bottom: var(--sp-3); z-index: 1100; }
.cs-peek .ccard { box-shadow: var(--shadow-2); }
.cs-peek .dlg-x { position: absolute; top: calc(-1 * var(--control-h) - var(--sp-2)); right: 0; color: var(--text); background: var(--paper); box-shadow: var(--shadow-1); }
@media (min-width: 768px) and (max-width: 1023px) { .cs-body { grid-template-columns: 340px minmax(0, 1fr); } }

/* ---------- map markers, clusters, the visitor's spot ---------- */
.pin {
  width: 15px; height: 15px; border-radius: 50%; background: var(--acc-other);
  border: 2px solid var(--paper); box-shadow: var(--shadow-1); transition: transform .12s ease;
}
.pin.public { background: var(--acc-public); }
.pin.private { background: var(--acc-private); }
.leaflet-marker-icon:hover .pin, .pin.hot { transform: scale(1.4); }
.pin.active { transform: scale(1.6); border-color: var(--green-950); outline: 2px solid var(--paper); }
/* a bubble: one deep green, three sizes by count (2-9, 10-49, 50+), the count in the sans */
.cluster {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  font: var(--fw-strong) var(--fs-small)/1 var(--sans); font-variant-numeric: lining-nums tabular-nums; color: var(--text-on-dark);
  background: var(--green-800); border: 2px solid var(--paper); box-shadow: var(--shadow-1); cursor: pointer; transition: background-color .15s ease;
}
.cluster.c2 { width: 40px; height: 40px; }
.cluster.c3 { width: 48px; height: 48px; }
.leaflet-marker-icon:hover .cluster { background: var(--green-950); }
/* the bubble that holds the course pointed at or picked (its pin is drawn over it) */
.cluster.hot { outline: 2px solid var(--brass); outline-offset: 1px; }
/* pins and bubbles fade in as they appear (zooming splits or merges them); none with reduced motion */
#map .cluster, #map .pin { animation: mk-in .2s ease-out; }
@keyframes mk-in { from { opacity: 0; } }
.leaflet-marker-icon:focus-visible { outline: none; box-shadow: none; }
.leaflet-marker-icon:focus-visible .cluster, .leaflet-marker-icon:focus-visible .pin { box-shadow: var(--focus); }
.me { width: 14px; height: 14px; border-radius: 50%; background: var(--acc-other); border: 2px solid var(--paper); box-shadow: 0 0 0 6px rgba(47, 111, 173, .22); }
.leaflet-tooltip {
  padding: var(--sp-1) var(--sp-2); font: var(--fw-strong) var(--fs-small)/var(--lh-small) var(--sans); color: var(--text);
  background: var(--paper); border: var(--border); border-radius: var(--r-sm); box-shadow: var(--shadow-1);
}
.leaflet-tooltip::before { display: none; }
.leaflet-tooltip .tip-rk { display: block; font-weight: var(--fw-regular); font-size: var(--fs-label); line-height: var(--lh-label); color: var(--text-muted); }
.leaflet-bar a { color: var(--link); }
.leaflet-control-layers { border-radius: var(--r-sm) !important; font-size: var(--fs-small); }

/* =========================================================
   7. RANKINGS
   ========================================================= */
.lists { margin-bottom: var(--sp-5); }
.lists a .n { display: inline-flex; align-items: baseline; gap: var(--sp-1); font-weight: var(--fw-regular); }
.lists a .n b { font-weight: var(--fw-strong); }
.lists a .n small { font-size: var(--fs-label); line-height: var(--lh-label); }
#view-rankings .fbar { margin-top: 0; }
#view-rankings .count { margin-bottom: var(--sp-4); }
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-small); line-height: var(--lh-small); }
.tbl th { position: sticky; top: 0; padding: 0; text-align: left; white-space: nowrap; background: var(--paper-2); border-bottom: var(--border-strong); }
.tbl th button, .tbl th .h {
  display: inline-flex; align-items: center; gap: var(--sp-1); width: 100%; padding: var(--sp-3);
  font: inherit; font-size: var(--fs-label); line-height: var(--lh-label); font-weight: var(--fw-strong); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text-muted);
}
.tbl th button { background: none; border: 0; cursor: pointer; }
.tbl th.num button, .tbl th.num .h { justify-content: flex-end; }
.tbl th[aria-sort] button { color: var(--text); }
.tbl th button::after { content: ""; border-left: 4px solid transparent; border-right: 4px solid transparent; opacity: 0; }
.tbl th[aria-sort="ascending"] button::after { border-bottom: 5px solid var(--text-accent); opacity: 1; }
.tbl th[aria-sort="descending"] button::after { border-top: 5px solid var(--text-accent); opacity: 1; }
.tbl td { height: 48px; padding: var(--sp-2) var(--sp-3); border-bottom: var(--border); vertical-align: middle; }
.tbl th:first-child button, .tbl th:first-child .h, .tbl td:first-child { padding-left: var(--sp-4); }
.tbl th:last-child .h, .tbl td:last-child { padding-right: var(--sp-4); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr.r { cursor: pointer; }
.tbl tbody tr.r:hover td { background: var(--paper-2); }
.tbl tbody tr.r.active td { background: var(--green-100); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl td.c-rank, .tbl td.c-score { font-family: var(--serif); font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-strong); font-variant-numeric: lining-nums; }
.tbl td.c-rank { width: 56px; color: var(--text-accent); }
.tbl td.c-score { color: var(--link); }
.tbl td.c-name { min-width: 190px; }
.tbl td.c-name a { font-weight: var(--fw-strong); color: var(--text); text-decoration: none; }
.tbl td.c-name a:hover { color: var(--link); text-decoration: underline; }
.tbl td.c-name .sub { display: none; color: var(--text-muted); }
.tbl td.c-name .sub .pr { display: none; }
.tbl td.c-name .dist { display: block; font-weight: var(--fw-strong); color: var(--text-muted); }
.tbl td.c-place { white-space: nowrap; color: var(--text-muted); }
.tbl td.c-place .sm { display: block; }
.tbl td.c-access, .tbl td.c-diff, .tbl td.c-price { white-space: nowrap; }
.tbl .c-fav { width: 48px; padding-top: 0; padding-bottom: 0; text-align: right; }
.tbl .fav-m { display: none; }
.tbl tr.group td {
  height: auto; padding: var(--sp-5) var(--sp-3) var(--sp-2); font-size: var(--fs-label); line-height: var(--lh-label); font-weight: var(--fw-strong);
  letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text-accent); background: var(--paper); border-bottom: var(--border-strong);
}
.tbl tr.group .note { margin-left: var(--sp-2); font-weight: var(--fw-regular); letter-spacing: 0; text-transform: none; color: var(--text-muted); }
.tbl td.empty { height: auto; }
@media (max-width: 1440px) { .tbl .c-place { display: none; } .tbl td.c-name .sub { display: block; } }
@media (max-width: 1280px) { .tbl .c-slope { display: none; } }
@media (max-width: 1180px) { .tbl .c-par, .tbl .c-yards { display: none; } }
@media (max-width: 1060px) { .tbl .c-diff { display: none; } }

/* =========================================================
   8. COURSE PAGE
   ========================================================= */
.page.course { max-width: calc(var(--course-max) + 2 * var(--gutter)); padding-top: var(--sp-5); }
.page.course > #cp-body > * + * { margin-top: var(--sp-6); }
.page.course > #cp-body > .cp-top + * { margin-top: var(--sp-3); }
.cp-top { margin: 0; }
.cp-back {
  display: inline-flex; align-items: center; gap: var(--sp-1); min-height: var(--control-h); padding-right: var(--sp-2);
  font-size: var(--fs-small); line-height: var(--lh-small); font-weight: var(--fw-strong); color: var(--text-muted); text-decoration: none; border-radius: var(--r-sm);
}
.cp-back:hover { color: var(--text); }
.cp-back svg { width: var(--icon-sm); height: var(--icon-sm); }

/* ---------- the top card ---------- */
.cp-head { padding: var(--card-pad); }
.cp-r1 { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); }
.cp-name { display: flex; align-items: flex-start; gap: var(--sp-1); margin-top: var(--sp-2); }
.cp-name h1 { min-width: 0; }
.cp-name h1.unnamed { font-style: italic; }
.cp-name .fav { margin-top: var(--sp-1); }
.cp-name .fav svg { width: 24px; height: 24px; }
.cp-name .sl-btn { margin-top: var(--sp-1); }
/* "Hosts <event>, <dates>": one quiet line under access and price */
.cp-event { margin-top: var(--sp-1); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.cp-where { display: flex; flex-wrap: wrap; gap: 0 var(--sp-4); margin-top: var(--sp-2); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.cp-where a { color: inherit; overflow-wrap: anywhere; }
.cp-by { margin-top: var(--sp-1); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.cp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-4); margin-top: var(--sp-4); }
.cp-meta .price { font-size: var(--fs-small); }
#cp-rv:empty { display: none; }
.cp-rank { margin-top: var(--sp-1); font-size: var(--fs-small); line-height: var(--lh-small); }
.cp-rank a { color: var(--text-muted); text-decoration: none; }
.cp-rank a:hover { color: var(--link); text-decoration: underline; }
.cp-head .tiles { margin-top: var(--sp-5); }
.cp-dnote { margin-top: var(--sp-3); max-width: var(--measure); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.cp-dnote.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.cp-more { font-size: var(--fs-small); line-height: var(--lh-small); }
.cp-act { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-4); margin-top: var(--sp-5); }
.cp-btns { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.cp-links { display: flex; justify-content: flex-end; gap: var(--sp-1); margin: var(--sp-5) calc(-1 * var(--sp-2)) calc(-1 * var(--sp-2)); padding-top: var(--sp-2); border-top: var(--border); }
.ilink { display: inline-grid; place-items: center; min-width: var(--control-h); height: var(--control-h); color: var(--text-muted); border-radius: var(--r-sm); text-decoration: none; }
.ilink:hover { color: var(--text); background: var(--hover); }
.ilink svg { width: var(--icon); height: var(--icon); }
.ilink-t { display: none; }
.share-btn.done { background: var(--green-900); }
.cp-head .share-field { margin-top: var(--sp-3); }

/* ---------- "Rate this course": five star buttons, a radio group ---------- */
.rate { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-3); }
.rate-l { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.rate-row { display: inline-flex; }
.rate-star {
  display: grid; place-items: center; width: var(--control-h); height: var(--control-h); padding: 0;
  color: var(--star-off); background: none; border: 0; border-radius: var(--r-sm); cursor: pointer;
}
.rate-star svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.rate-star.on { color: var(--star-on); }
.rate-star.on svg { fill: currentColor; }
.rate.pre .rate-star.on svg { opacity: .6; }
.rate .linkbtn { font-size: var(--fs-small); line-height: var(--lh-small); }

/* ---------- sections ---------- */
.cp-sec { padding: var(--card-pad); }
.cp-sec .sec-head { align-items: center; }
.cp-sum { margin-top: var(--sp-4); max-width: var(--measure); }
.cp-notes { display: grid; gap: var(--sp-2); }
.cp-note { padding: var(--sp-2) var(--sp-4); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); background: var(--paper-2); border: var(--border); border-radius: var(--r-sm); }
.cp-report { text-align: right; font-size: var(--fs-small); line-height: var(--lh-small); }
.cp-report a { color: var(--text-muted); }
.table-scroll { overflow-x: auto; }
.mini { width: 100%; border-collapse: collapse; font-size: var(--fs-small); line-height: var(--lh-small); }
.mini th { padding: var(--sp-2) var(--sp-2) var(--sp-2) 0; text-align: left; font-size: var(--fs-label); line-height: var(--lh-label); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text-muted); border-bottom: var(--border-strong); }
.mini td { padding: var(--sp-2) var(--sp-2) var(--sp-2) 0; border-bottom: var(--border); }
.mini .num { text-align: right; padding-right: 0; font-variant-numeric: tabular-nums; }
.mini tr:last-child td { border-bottom: 0; }

/* ---------- golfer reviews ---------- */
.stars { position: relative; display: inline-block; line-height: 0; white-space: nowrap; vertical-align: middle; }
.stars svg { width: var(--icon-sm); height: var(--icon-sm); fill: none; stroke: var(--star-off); stroke-width: 1.5; stroke-linejoin: round; }
.stars .st-on { position: absolute; left: 0; top: 0; overflow: hidden; }
.stars .st-on svg { fill: var(--star-on); stroke: var(--star-on); }
.rv-sum { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); }
.rv-sum .big { font-family: var(--serif); font-size: var(--fs-title); line-height: var(--lh-title); font-weight: var(--fw-strong); color: var(--text); font-variant-numeric: lining-nums; }
.rv-sum .of { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.rv-empty { color: var(--text-muted); }
.rv-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin-top: var(--sp-4); }
.rv-list { list-style: none; margin: var(--sp-4) 0 0; padding: 0; }
.rv-item { padding: var(--sp-4) 0; border-top: var(--border); }
.rv-item:last-child { padding-bottom: 0; }
.rv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); margin-bottom: var(--sp-1); font-size: var(--fs-small); line-height: var(--lh-small); }
.rv-meta b { overflow-wrap: anywhere; }
.rv-you { padding: 0 var(--sp-2); font-size: var(--fs-label); line-height: var(--lh-label); font-weight: var(--fw-strong); color: var(--link); background: var(--green-100); border-radius: var(--r-pill); }
.rv-date { color: var(--text-muted); }
.rv-text { margin-top: var(--sp-2); max-width: var(--measure); white-space: pre-wrap; overflow-wrap: anywhere; }
/* the review panel */
.rv-form .su-set legend { padding: 0; }
.rv-pick { position: relative; display: inline-flex; margin-left: calc(-1 * var(--sp-2)); }
.rv-pick input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.rv-pick label { display: grid; place-items: center; width: var(--control-h-touch); height: var(--control-h-touch); color: var(--star-off); border-radius: var(--r-sm); cursor: pointer; }
.rv-pick label svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.rv-pick label.on { color: var(--star-on); }
.rv-pick label.on svg { fill: currentColor; }
.rv-pick.pre label.on svg { opacity: .6; }
.rv-pick input:focus-visible + label { box-shadow: var(--focus); }
.rv-val { margin-top: var(--sp-1); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: var(--fw-strong); color: var(--text); }
textarea.rv-text { height: auto; min-height: 112px; margin: 0; padding: var(--sp-2) var(--sp-3); line-height: var(--lh-body); resize: vertical; }
.rv-count { margin-top: var(--sp-1); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); text-align: right; font-variant-numeric: tabular-nums; }
.rv-form .rv-acts { margin-top: 0; }
.rv-form .rv-del { margin-left: auto; color: var(--danger); }

/* ---------- course layout: the aerial photo, the centrepiece ---------- */
.lay { --lay-h: clamp(300px, 56vh, 460px); }
.lay > .sec-head { margin-bottom: var(--sp-4); }
/* "Print yardage sheet": a quiet action on the heading's line */
.ys-btn { display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--control-h); font-size: var(--fs-small); line-height: var(--lh-small); }
.ys-btn svg { width: var(--icon-sm); height: var(--icon-sm); }
.lay-frame { display: grid; grid-template-columns: minmax(0, 1fr); background: var(--paper); border: var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-1); overflow: hidden; }
.lay-stage { position: relative; z-index: 0; height: var(--lay-h); background: var(--green-900); }
.lay-map { position: absolute; inset: 0; background: var(--green-900); font-family: var(--sans); }
.lay-map .leaflet-control-attribution { background: rgba(255, 253, 248, .82); }
.lay-tools { position: absolute; top: var(--sp-2); right: var(--sp-2); z-index: 1001; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--sp-2); max-width: calc(100% - 64px); }
.lay-btn {
  display: inline-flex; align-items: center; gap: var(--sp-2); height: 32px; padding: 0 var(--sp-3);
  font: var(--fw-strong) var(--fs-small)/var(--lh-small) var(--sans); color: var(--text); white-space: nowrap;
  background: var(--paper); border: var(--border-strong); border-radius: var(--r-sm); box-shadow: var(--shadow-1); cursor: pointer;
}
.lay-btn:hover { background: var(--paper-2); }
.lay-btn.sq { flex: 0 0 32px; width: 32px; padding: 0; justify-content: center; }
.lay-btn svg { width: var(--icon-sm); height: var(--icon-sm); }
.lay-btn .i-close, .lay-btn[aria-expanded="true"] .i-open { display: none; }
.lay-btn[aria-expanded="true"] .i-close { display: block; }
.lay-btn[aria-expanded="true"], .lay-btn[aria-pressed="true"] { color: var(--text-on-dark); background: var(--green-800); border-color: var(--green-800); }
.lay-step {
  position: absolute; left: 50%; bottom: var(--sp-7); transform: translateX(-50%); z-index: 1001;   /* clear of the two-line credit at the bottom right */
  display: flex; align-items: center; gap: var(--sp-2); width: max-content; max-width: calc(100% - var(--sp-5)); padding: var(--sp-1);
  background: rgba(12, 28, 20, .82); border-radius: var(--r-sm); box-shadow: var(--shadow-2);
}
.lay-step .cap { min-width: 0; padding: 0 var(--sp-2); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: var(--fw-strong); color: var(--text-on-dark); text-align: center; }
.lay-step .cap span + span::before { content: " \00b7  "; }
.lay-step .lay-btn { flex-shrink: 0; box-shadow: none; }
.lay-hint {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1002; margin: 0; padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-small); line-height: var(--lh-small); font-weight: var(--fw-strong); color: var(--text-on-dark); white-space: nowrap;
  background: rgba(12, 28, 20, .84); border-radius: var(--r-sm); opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.lay-hint.on { opacity: 1; }
.lay-scale {
  height: 18px; margin: 0 0 var(--sp-2) var(--sp-2) !important; padding: 0 var(--sp-1);
  font: var(--fw-strong) var(--fs-label)/var(--lh-label) var(--sans); color: var(--text-on-dark); white-space: nowrap;
  text-shadow: 0 0 3px var(--green-950), 0 0 2px var(--green-950); border: 2px solid var(--text-on-dark); border-top: 0;
}
.lay-side { min-width: 0; padding: var(--sp-4); }
.lay-title { display: none; }
.lay-title .nm { margin-top: var(--sp-1); font-family: var(--serif); font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: var(--fw-strong); color: var(--text); }
.lay-note { margin-bottom: var(--sp-3); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.lay-tint { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); }
.lay-tint .lay-btn { box-shadow: none; }
.tint-key { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); font-size: var(--fs-label); line-height: var(--lh-label); color: var(--text-muted); }
.tint-key .ramp { width: 64px; height: 8px; border-radius: var(--r-pill); background: linear-gradient(90deg, rgb(166, 27, 27), rgb(232, 134, 46), rgb(247, 230, 161)); }
.tint-key .nr { flex: 1 1 100%; display: inline-flex; align-items: center; gap: var(--sp-2); }
.tint-key .nr i { width: 10px; height: 10px; border-radius: 50%; background: var(--rule); border: 1px dashed var(--text-muted); }
/* close-up card for the selected hole or green */
.lay-card { order: 1; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4) var(--sp-6); padding: var(--sp-4) var(--card-pad); border-top: var(--border); }
.hc-head h3 { margin-top: var(--sp-1); font-size: var(--fs-h2); line-height: var(--lh-h2); color: var(--text); }
.hc-sum { margin-top: var(--sp-1); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: var(--fw-strong); color: var(--text); }
.hc-acts { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.hc-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--sp-2) var(--sp-5); margin: 0; align-content: start; }
.hc-facts > div { min-width: 0; padding-top: var(--sp-2); border-top: var(--border); }
.hc-facts dt { font-size: var(--fs-label); line-height: var(--lh-label); font-weight: var(--fw-strong); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text-accent); }
.hc-facts dd { margin: 0; font-family: var(--serif); font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-strong); color: var(--text); font-variant-numeric: lining-nums; }
.hc-facts dd small { display: block; margin-top: var(--sp-1); font-family: var(--sans); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: var(--fw-regular); color: var(--text-muted); }
.lay-foot { order: 2; padding: var(--sp-3) var(--sp-4); background: var(--paper-2); border-top: var(--border); }
.lay-foot .fine { margin-top: var(--sp-2); }
.lay-key:empty + .fine { margin-top: 0; }
.lay-cards { margin-top: var(--sp-4); padding: var(--card-pad); background: var(--paper); border: var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-1); }
.lay-cards h3 { margin-bottom: var(--sp-1); }
.sc-loose { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: var(--sp-1) var(--sp-6); }
/* hole list, laid out like a scorecard: one column per hole, each a button */
.sc-grp { margin-top: var(--sp-3); }
.sc-h { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-1); font-size: var(--fs-small); line-height: var(--lh-small); }
.sc-h b { font-family: var(--serif); font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-strong); color: var(--text); }
.sc-h .n { margin-left: auto; font-size: var(--fs-label); line-height: var(--lh-label); color: var(--text-muted); white-space: nowrap; }
.sc-h .sw { flex: 0 0 12px; height: 12px; border-radius: 50%; border: 1px solid var(--green-950); }
.scard { display: grid; grid-template-columns: 40px repeat(9, minmax(0, 1fr)); background: var(--paper); border: var(--border-strong); border-radius: var(--r-sm); overflow: hidden; }
.scard + .scard { margin-top: var(--sp-1); }
.sc-k, .sc-c { display: grid; grid-auto-rows: 24px; align-items: center; }
.sc-k { background: var(--paper-2); border-right: var(--border-strong); }
.sc-k span { padding-left: var(--sp-1); font-size: var(--fs-label); line-height: var(--lh-label); font-weight: var(--fw-strong); text-transform: uppercase; color: var(--text-muted); }
.sc-k span + span, .sc-c span { border-top: var(--border); }
.sc-c { justify-items: stretch; min-width: 0; padding: 0; text-align: center; font: inherit; color: var(--text); background: none; border: 0; border-right: var(--border); }
button.sc-c { cursor: pointer; }
.sc-c:nth-child(10) { border-right: 0; }
.sc-c b { font-family: var(--serif); font-size: var(--fs-h3); line-height: 24px; font-weight: var(--fw-strong); color: var(--text); font-variant-numeric: lining-nums; }
.sc-c span { font-size: var(--fs-label); line-height: 23px; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
.sc-c .yd { letter-spacing: -.02em; color: var(--text); }
button.sc-c:hover { background: var(--green-100); }
.sc-c[aria-pressed="true"] { background: var(--green-800); }
.sc-c[aria-pressed="true"] b, .sc-c[aria-pressed="true"] .yd { color: var(--text-on-dark); }
.sc-c[aria-pressed="true"] span { color: var(--text-on-dark-muted); border-top-color: rgba(255, 255, 255, .16); }
.sc-c:focus-visible { box-shadow: inset 0 0 0 2px var(--green-700); }
.sc-grp .fine { margin-top: var(--sp-2); }
/* pre-built pages: the scorecard as a table (app.js redraws it as the hole buttons) */
table.sc-t { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; background: var(--paper); border: var(--border-strong); border-radius: var(--r-sm); overflow: hidden; }
table.sc-t + table.sc-t { margin-top: var(--sp-1); }
.sc-t th, .sc-t td { height: 24px; padding: 0; text-align: center; border-right: var(--border); border-top: var(--border); }
.sc-t tr:first-child th { border-top: 0; }
.sc-t tr > :last-child { border-right: 0; }
.sc-t th[scope="row"] { width: 40px; padding-left: var(--sp-1); text-align: left; font-size: var(--fs-label); line-height: var(--lh-label); text-transform: uppercase; color: var(--text-muted); background: var(--paper-2); border-right-color: var(--rule-strong); }
.sc-t th[scope="col"] { font-family: var(--serif); font-size: var(--fs-h3); line-height: var(--lh-h3); color: var(--text); font-variant-numeric: lining-nums; }
.sc-t td { font-size: var(--fs-label); line-height: var(--lh-label); color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sc-t td.yd { letter-spacing: -.02em; color: var(--text); }
/* map key */
.lay-key { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); font-size: var(--fs-label); line-height: var(--lh-label); color: var(--text-muted); }
.lay-key:empty { display: none; }
.lay-key span { display: inline-flex; align-items: center; gap: var(--sp-2); white-space: nowrap; }
.lay-key i { flex: 0 0 14px; height: 10px; border-radius: 0; border: 1.5px solid var(--text-muted); }
.lay-key .k-greens { border-color: #2fae69; background: rgba(53, 224, 127, .2); }
.lay-key .k-fairways { border-color: #8fc474; }
.lay-key .k-bunkers { border-color: #c9ad62; background: rgba(243, 226, 174, .35); }
.lay-key .k-water { border-color: #5a9fd6; background: rgba(63, 143, 208, .16); }
.lay-key .k-tees { border-color: var(--rule-strong); }
.lay-key .k-ranges { border-style: dotted; }
.lay-key .k-outline { border: 1.5px dashed var(--brass); }
.lay-key .k-line { height: 0; border: 0; border-top: 1.5px solid var(--text-muted); border-radius: 0; }
.lay-key .k-cup { flex-basis: 8px; height: 8px; border: 0; border-radius: 0; background: #e5352b; clip-path: polygon(0 0, 100% 50%, 0 100%); }
/* on the photo: hole numbers with their yardage, and cup flags */
.hole-mk { overflow: visible; }
.hole-no {
  display: grid; place-items: center; width: 18px; height: 18px; margin: -1px;
  font: var(--fw-strong) var(--fs-label)/1 var(--sans); border: 1px solid var(--green-950); border-radius: 50%; box-shadow: var(--shadow-1); cursor: pointer;
}
.hole-no.nr { border-style: dashed; }
.hole-no.on { transform: scale(1.3); background: #ffd166 !important; color: var(--green-950) !important; }
.hole-yd {
  position: absolute; left: 20px; top: 0; padding: 0 var(--sp-1);
  font: var(--fw-strong) var(--fs-label)/var(--lh-label) var(--sans); color: var(--text-on-dark); white-space: nowrap;
  background: rgba(12, 28, 20, .55); border-radius: var(--r-sm); pointer-events: none;
}
.hole-yd i { display: none; font-style: normal; }
.is-near .hole-yd i { display: inline; }
.no-yd .hole-yd { display: none; }
.cup { display: block; width: 12px; height: 18px; overflow: visible; fill: none; stroke: var(--paper); stroke-width: 1.6; stroke-linecap: round; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .7)); }
.cup .f { fill: #e5352b; stroke: var(--paper); stroke-width: .9; stroke-linejoin: round; }
.lay-map.is-close path.lay-p { fill-opacity: 0; }
.lay-map.is-close path.lay-greens { fill-opacity: .03; }
@media (min-width: 768px) { .lay { --lay-h: clamp(420px, 62vh, 640px); } }
/* wide screens: hole list beside the photo, close-up card and key beneath both */
@media (min-width: 1180px) {
  .lay-frame { grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: var(--lay-h); }
  .lay-stage { height: auto; }
  .lay-side { min-height: 0; overflow-y: auto; border-left: var(--border); }
  .lay-card, .lay-foot { grid-column: 1 / -1; }
  .lay-card { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); }
}
@media (max-width: 1179px) { .lay-side { order: 2; } .lay-foot { order: 3; } }
/* full-window view: the same map grown to fill the window, hole list alongside */
.lay-frame.expanded { position: fixed; inset: 0; z-index: 2000; grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: minmax(0, 1fr); border: 0; border-radius: 0; }
.lay-frame.expanded .lay-stage { height: auto; min-height: 0; }
.lay-frame.expanded .lay-side { order: 0; min-height: 0; overflow-y: auto; padding: var(--sp-5); border-left: var(--border); }
.lay-frame.expanded .lay-title { display: block; margin-bottom: var(--sp-3); padding-bottom: var(--sp-3); border-bottom: var(--border); }
.lay-frame.expanded .lay-card { grid-column: 1 / -1; max-height: 30vh; overflow-y: auto; }
.lay-frame.expanded .lay-foot { grid-column: 1 / -1; }

/* =========================================================
   9. MY ROUNDS (members only): list, round editor, pins on the layout photo
   ========================================================= */
.rd-top { margin-bottom: var(--sp-4); }
.rd-rows { list-style: none; margin: 0; padding: 0; }
.rd-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--sp-2) var(--sp-5); padding: var(--sp-4) var(--card-pad); border-bottom: var(--border); }
.rd-row:last-child { border-bottom: 0; }
.rd-main .nm { display: block; font-family: var(--serif); font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-strong); color: inherit; text-decoration: none; }
.rd-main a.nm:hover { color: var(--link); text-decoration: underline; }
.rd-main .nm.unnamed { font-style: italic; color: var(--text-muted); }
.rd-main .pl { display: block; margin-top: var(--sp-1); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.rd-score, .rd-total { display: flex; align-items: baseline; gap: var(--sp-2); white-space: nowrap; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.rd-score b, .rd-total b { font-family: var(--serif); font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: var(--fw-strong); color: var(--text); font-variant-numeric: lining-nums; }
.rd-score .tp, .rd-total .tp { font-weight: var(--fw-strong); color: var(--link); }
.rd-acts { display: flex; gap: var(--sp-2); }
.rd-row .rm-confirm { grid-column: 1 / -1; }
.rd-sec { margin-top: var(--sp-5); padding: var(--card-pad); }
.rd-sec h2 { margin-bottom: var(--sp-3); }
.rd-set { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-3) var(--sp-5); align-items: start; }
.rd-field { min-width: 0; }
.rd-field input, .rd-field select { height: var(--control-h-touch); }
.rd-course { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-1) var(--sp-3); min-height: var(--control-h-touch); padding-top: var(--sp-2); }
.rd-course b { font-family: var(--serif); font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-strong); }
.rd-course .pl { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.rd-found { list-style: none; margin: var(--sp-2) 0 0; padding: 0; }
.rd-found:empty { display: none; }
.rd-found button { display: block; width: 100%; min-height: var(--control-h-touch); padding: var(--sp-2) var(--sp-3); font: inherit; text-align: left; color: var(--text); background: none; border: 0; border-bottom: var(--border); cursor: pointer; }
.rd-found button:hover, .rd-found button:focus-visible { background: var(--green-100); }
.rd-found button b { display: block; font-weight: var(--fw-strong); }
.rd-found button span { display: block; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.rd-found .none { padding: var(--sp-2) var(--sp-3); color: var(--text-muted); }
/* scorecard: one cell per hole (number, par, strokes), nine to a row with the row's total at the end */
.rd-nine { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)) minmax(0, 1.15fr); background: var(--paper); border: var(--border-strong); border-radius: var(--r-sm); overflow: hidden; }
.rd-nine + .rd-nine { margin-top: var(--sp-2); }
.rd-c { display: grid; justify-items: stretch; min-width: 0; padding-bottom: var(--sp-2); text-align: center; border-right: var(--border); }
.rd-c:last-child { border-right: 0; }
.rd-h { display: grid; padding: var(--sp-1) 2px; font: inherit; color: var(--text); background: var(--paper-2); border: 0; border-bottom: var(--border); cursor: pointer; }
.rd-h b { font-family: var(--serif); font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-strong); color: var(--text); font-variant-numeric: lining-nums; }
.rd-h span { font-size: var(--fs-label); line-height: var(--lh-label); color: var(--text-muted); white-space: nowrap; }
.rd-h:hover { background: var(--green-100); }
.rd-c.cur .rd-h { background: var(--green-800); }
.rd-c.cur .rd-h b { color: var(--text-on-dark); }
.rd-c.cur .rd-h span { color: var(--text-on-dark-muted); }
.rd-s { width: calc(100% - var(--sp-2)); height: var(--control-h-touch); margin: var(--sp-2) var(--sp-1) 0; padding: 0; font: var(--fw-strong) var(--fs-body)/var(--lh-body) var(--sans); text-align: center; color: var(--text); background: var(--paper); border: var(--border-strong); border-radius: var(--r-sm); font-variant-numeric: lining-nums; }
.rd-s[aria-invalid="true"] { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.rd-m { display: block; min-height: var(--lh-label); margin-top: var(--sp-1); font-size: var(--fs-label); line-height: var(--lh-label); color: var(--text-muted); white-space: nowrap; overflow: hidden; }
.rd-t { align-content: center; gap: var(--sp-1); padding: var(--sp-2) var(--sp-1); background: var(--paper-2); }
.rd-t .k { font-size: var(--fs-label); line-height: var(--lh-label); font-weight: var(--fw-strong); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text-accent); }
.rd-t b { font-family: var(--serif); font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: var(--fw-strong); color: var(--text); font-variant-numeric: lining-nums; }
.rd-t span:last-child { font-size: var(--fs-label); line-height: var(--lh-label); color: var(--text-muted); }
.rd-total:empty { display: none; }
.rd-total { margin-top: var(--sp-3); }
.rd-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.rd-step { display: inline-flex; align-items: center; gap: var(--sp-1); }
.rd-step .cap { min-width: 120px; padding: 0 var(--sp-2); font-weight: var(--fw-strong); text-align: center; }
.rd-tools .btn, .rd-tools .seg button { min-height: var(--control-h); }
.rd-tools .seg button { min-width: 84px; }
.rd-status { min-height: var(--lh-small); margin: var(--sp-3) 0; font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.rd-map .lay { --lay-h: clamp(340px, 62vh, 620px); }
.rd-map .lay > .sec-head, .rd-map .lay-side, .rd-map .lay-card, .rd-map .lay-cards, .rd-map .lay-step, .rd-map #lay-expand { display: none !important; }
.rd-map .lay-frame { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
.rd-map .lay-stage { height: var(--lay-h); }
.rd-map .lay-foot { grid-column: 1; }
.rd-map .leaflet-container, .rd-map .leaflet-grab { cursor: crosshair; }
.rd-mk { overflow: visible; }
.rd-pin {
  display: grid; place-items: center; width: 24px; height: 24px; margin: 2px;
  font: var(--fw-strong) var(--fs-label)/1 var(--sans); color: var(--green-950); background: var(--paper);
  border: 2px solid var(--green-950); border-radius: 50%; box-shadow: var(--shadow-1); cursor: grab;
}
.rd-pin i { font-style: normal; }
.rd-pin.hazard { width: 20px; height: 20px; margin: var(--sp-1); color: var(--text-on-dark); background: #c8321e; border-color: var(--paper); border-radius: 0; transform: rotate(45deg); }
.rd-pin.hazard i { transform: rotate(-45deg); }
.rd-pin.dim { opacity: .45; }
.rd-pin.sel { opacity: 1; outline: 3px solid #ffd166; outline-offset: 1px; }
.leaflet-marker-icon.rd-mk:focus-visible { outline: none; box-shadow: none; }
.leaflet-marker-icon.rd-mk:focus-visible .rd-pin { box-shadow: var(--focus); }
.rd-pins { list-style: none; display: grid; gap: var(--sp-2); margin: var(--sp-3) 0 0; padding: 0; }
.rd-pins:empty { display: none; }
.rd-pins li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); padding: var(--sp-1) var(--sp-2); border: var(--border); border-radius: var(--r-sm); }
.rd-pins li.sel { background: var(--green-100); border-color: var(--green-700); }
.rd-pinbtn { display: inline-flex; align-items: center; gap: var(--sp-2); flex: 1 1 140px; min-height: var(--control-h-touch); padding: 0 var(--sp-2); font: inherit; font-weight: var(--fw-strong); text-align: left; color: var(--text); background: none; border: 0; border-radius: var(--r-sm); cursor: pointer; }
.rd-pinbtn .rd-pin { box-shadow: none; cursor: inherit; }
.rd-save { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin-top: var(--sp-4); }
.rd-save .rd-delete { margin-left: var(--sp-2); color: var(--danger); }
.rd-save .rm-confirm { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
#rd-msg { margin-top: var(--sp-3); }
.rd-guard { margin-bottom: var(--sp-1); }
.rd-log svg { flex: 0 0 auto; }

/* ---------- not found; the old "#/..." addresses ---------- */
.nf-links { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.boot-hash .main > .view { visibility: hidden; }

/* touch screens: every control at least 44px */
@media (pointer: coarse) {
  .linkbtn { display: inline-flex; align-items: center; min-height: var(--control-h-touch); }
  .rate-star, .fav, .card-share, .dlg-x, .qbtn, .ilink, .clear-x { width: var(--control-h-touch); height: var(--control-h-touch); }
  .pl-auto a, .pp-when a, .pp-tip a { display: inline-flex; align-items: center; min-height: var(--control-h-touch); }
  .pl-pick select { height: var(--control-h-touch); }
}

/* =========================================================
   9b. EVENTS, TOURNAMENT WEEKS, SHORTLIST AND COMPARE
   ========================================================= */
/* ---------- events: one card per month, an event per row ---------- */
.ev-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-5); margin-top: var(--sp-4); }
.fbar-ev .field { flex: 0 1 240px; }
.ev-body { margin-top: var(--sp-6); }
.ev-month + .ev-month { margin-top: var(--sp-6); }
.ev-month > h2 { margin-bottom: var(--sp-4); }
.ev-rows { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.ev { padding: var(--sp-4) var(--card-pad); border-bottom: var(--border); }
.ev:last-child { border-bottom: 0; }
.ev:focus { outline: none; box-shadow: none; }
.ev.is-target { background: var(--green-100); }
.ev .eyebrow { margin-bottom: var(--sp-1); }
.ev-when { margin-top: var(--sp-1); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: var(--fw-strong); font-variant-numeric: tabular-nums lining-nums; }
.ev-month[aria-labelledby="ev-m-tba"] .ev-when { max-width: var(--measure); font-weight: var(--fw-regular); color: var(--text-muted); }
.ev-where { margin-top: var(--sp-1); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.ev-sum { margin-top: var(--sp-2); max-width: var(--measure); }
.ev-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-4); margin-top: var(--sp-3); font-size: var(--fs-small); line-height: var(--lh-small); }
.ev-foot a { font-weight: var(--fw-strong); }
.ev-open { color: var(--text-muted); }
/* the next three events: Home (a card among the ranking cards; signed in, a section of its own) */
.toplist.ev-top a { grid-template-columns: minmax(0, 1fr); }
.hi-ev { padding: 0 var(--card-pad); }
.hi-ev .toplist li:first-child a { border-top: 0; }
.ev-ready h2 { padding-right: var(--sp-6); }
.ev-ready .hc-sub b { overflow-wrap: anywhere; }

/* ---------- tournament-week guides ---------- */
.gd-page { max-width: calc(var(--course-max) + 2 * var(--gutter)); padding-top: var(--sp-5); }
.gd-page .cp-top { margin-bottom: var(--sp-3); }
.gd-when { margin-top: var(--sp-3); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.gd-when b { font-weight: var(--fw-strong); color: var(--text); }
.gd-note { margin-top: var(--sp-1); max-width: var(--measure); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.gd-intro { margin-top: var(--sp-4); max-width: var(--measure); }
.gd-acts { margin-top: var(--sp-5); }
.gd-secs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); align-items: start; }
.gd-sec { padding: var(--card-pad); }
.gd-sec h2 { margin-bottom: var(--sp-4); }
.gd-sec p { max-width: var(--measure); }
.gd-near { margin-top: var(--sp-7); }
.gd-out { margin-top: var(--sp-6); }

/* ---------- compare: a table, the first column held in place while the courses scroll ---------- */
.cmp-note { margin-bottom: var(--sp-4); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.cmp-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-5); margin-bottom: var(--sp-5); }
.cmp-add { flex: 0 1 360px; min-width: 0; }
.cmp-one { margin-top: var(--sp-3); }
.cmp-card { overflow: hidden; }
.cmp-card .table-scroll { position: relative; }        /* holds the screen-reader words in the cells, so they never widen the page */
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-small); line-height: var(--lh-small); }
.cmp th, .cmp td { padding: var(--sp-3) var(--sp-4); text-align: left; vertical-align: top; border-bottom: var(--border); }
.cmp td, .cmp thead th { min-width: 200px; font-variant-numeric: tabular-nums lining-nums; }
.cmp thead th, .cmp thead td { vertical-align: bottom; background: var(--paper-2); border-bottom: var(--border-strong); }
.cmp th[scope="row"], .cmp .cmp-k {
  position: sticky; left: 0; z-index: 1; width: 176px; min-width: 144px;
  font-weight: var(--fw-strong); color: var(--text); background: var(--paper); box-shadow: inset -1px 0 0 var(--rule);
}
.cmp thead .cmp-k { background: var(--paper-2); }
.cmp tbody tr:last-child > * { border-bottom: 0; }
.cmp-h { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-2); }
.cmp-h a { font-family: var(--serif); font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-strong); color: var(--text); text-decoration: none; }
.cmp-h a:hover { color: var(--link); text-decoration: underline; }
.cmp-h .qbtn { margin: calc(-1 * var(--sp-2)) calc(-1 * var(--sp-2)) 0 0; }
.cmp tr.cmp-grp th { padding-top: var(--sp-5); background: var(--paper); border-bottom: var(--border-strong); }
.cmp-gt { position: sticky; left: var(--sp-4); font-size: var(--fs-label); line-height: var(--lh-label); font-weight: var(--fw-strong); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text-accent); }
.cmp .ck { min-height: 0; padding: 0; }
.cmp .ck svg { margin-top: 2px; }

/* ---------- the shortlist page and the tray ---------- */
.sl-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sp-4); margin-bottom: var(--sp-6); }
.sl-title { flex: 0 1 360px; min-width: 0; }
.sl-acts { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
#sl-body > .sl-acts { margin-bottom: var(--sp-6); }
#sl-saved { margin-bottom: var(--sp-5); }
.sl-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: var(--sp-6); align-items: start; }
.sl-map { grid-column: 2; grid-row: 1; position: sticky; top: var(--sp-5); height: 400px; overflow: hidden; }
.sl-cards { grid-column: 1; grid-row: 1; }
.sl-tray {
  position: fixed; z-index: 1300; left: calc(var(--nav-w) + var(--sp-4)); bottom: var(--sp-4);
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); max-width: calc(100vw - var(--nav-w) - 2 * var(--sp-4));
  padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4); box-shadow: var(--shadow-2);
}
.sl-tray-n {
  display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--control-h); border-radius: var(--r-sm);
  font-size: var(--fs-small); line-height: var(--lh-small); font-weight: var(--fw-strong); color: var(--text); text-decoration: none;
}
.sl-tray-n:hover > span:first-of-type { text-decoration: underline; }
.sl-tray-n svg { width: var(--icon); height: var(--icon); }
.sl-tray-n b {
  display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 var(--sp-1);
  font-size: var(--fs-label); line-height: var(--lh-label); color: var(--text-on-dark); background: var(--green-700); border-radius: var(--r-pill);
}
.sl-tray { max-width: min(480px, calc(100vw - var(--nav-w) - 2 * var(--sp-4))); }
@media (min-width: 768px) {
  /* Courses: the tray stays over the list column, clear of the map's legend and credits */
  body[data-view="courses"] .sl-tray { max-width: calc(400px - 2 * var(--sp-4)); }
}
.sl-tray .share-btn.done { color: var(--text-on-dark); border-color: var(--green-900); }
.sl-tray-msg, .sl-tray .share-field { flex: 1 1 100%; padding-bottom: var(--sp-1); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.has-tray .page { padding-bottom: calc(2 * var(--sp-8)); }
.has-tray .cs-list { padding-bottom: calc(var(--sp-8) + var(--sp-6)); }
@media (max-width: 1023px) {
  .gd-secs { grid-template-columns: minmax(0, 1fr); }
  .sl-grid { grid-template-columns: minmax(0, 1fr); }
  .sl-map { grid-column: auto; grid-row: auto; position: relative; top: auto; height: 280px; }
  .sl-cards { grid-column: auto; grid-row: auto; }
}

/* =========================================================
   9c. PASSPORT AND PICTURES TO SHARE
   ========================================================= */
/* ---------- "Played": the small mark on cards and rows, the course page control ---------- */
.pl-tag { display: inline-flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: var(--fw-strong); color: var(--text); white-space: nowrap; }
.pl-tag svg, .pl-btn[aria-pressed="true"] svg, .b-nm svg {
  flex: 0 0 var(--icon-sm); width: var(--icon-sm); height: var(--icon-sm);
  fill: none; stroke: var(--check-on); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round;
}
.cp-played { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); margin-top: var(--sp-4); font-size: var(--fs-small); line-height: var(--lh-small); }
.cp-played .linkbtn { font-size: var(--fs-small); }
.pl-when { color: var(--text-muted); }
.pl-auto { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-4); }
.pl-auto a { font-weight: var(--fw-strong); }
.pl-pick { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); }
.pl-pick select { width: auto; min-width: 128px; }
.pl-msg:empty { display: none; }
.pl-msg { color: var(--danger); font-weight: var(--fw-strong); }

/* ---------- the passport page ---------- */
.pp-top { padding: var(--card-pad); }
.pp-big { color: var(--text-muted); }
.pp-big b {
  margin-right: var(--sp-1); font-family: var(--serif); font-size: var(--fs-title); line-height: var(--lh-title); font-weight: var(--fw-strong);
  font-variant-numeric: tabular-nums lining-nums; color: var(--text);
}
.pp-track { display: block; height: var(--sp-2); margin-top: var(--sp-3); overflow: hidden; background: var(--rule); border-radius: var(--r-pill); }
.pp-fill { display: block; height: 100%; background: var(--green-700); border-radius: var(--r-pill); }
.pp-tiles { margin-top: var(--sp-5); }
.pp-acts { margin-top: var(--sp-5); }
.pp-sec { margin-top: var(--sp-6); padding: var(--card-pad); }
.pp-count { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
/* the map: every course a dot, played ones filled green; drawn to the width of the card */
.pp-map { position: relative; background: var(--paper-2); border: var(--border); border-radius: var(--r-sm); }
.pp-map svg { display: block; width: 100%; height: auto; }
.pp-dot circle { fill: var(--rule-strong); }
.pp-dot.on circle { fill: var(--green-700); stroke: var(--paper); stroke-width: 1.5; }
.pp-dot:focus, .pp-dot:focus-visible { outline: none; box-shadow: none; }
.pp-ring { fill: none; stroke: var(--green-700); stroke-width: 2; pointer-events: none; }
.pp-tip {
  position: absolute; z-index: 2; display: grid; gap: var(--sp-1); max-width: min(280px, 90%); padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted);
  background: var(--paper); border: var(--border); border-radius: var(--r-sm); box-shadow: var(--shadow-2);
  transform: translate(-50%, calc(-100% - var(--sp-3)));
}
.pp-tip.below { transform: translate(-50%, var(--sp-4)); }
.pp-tip a { font-weight: var(--fw-strong); }
.pp-legend { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-5); margin-top: var(--sp-3); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.pp-legend span { display: inline-flex; align-items: center; gap: var(--sp-2); }
.pp-key { display: inline-block; width: var(--sp-2); height: var(--sp-2); border-radius: 50%; background: var(--rule-strong); }
.pp-key.on { width: var(--sp-3); height: var(--sp-3); background: var(--green-700); }
.pp-credit { margin-top: var(--sp-1); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
/* badges: earned first, then the rest, pale (the checklist's present / absent look), each with a medallion */
.badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sp-3); }
.badge { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; padding: var(--sp-3) var(--sp-4); color: var(--text-muted); background: var(--paper-2); border: var(--border); border-radius: var(--r-sm); }
.badge > div { min-width: 0; }
.medal { flex: 0 0 auto; width: 48px; height: 48px; fill: none; stroke: var(--check-off); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.medal .m-in { stroke-width: 1; }
.medal text { fill: var(--check-off); stroke: none; font-family: var(--sans); font-size: var(--fs-small); font-weight: var(--fw-strong); }
.badge.is-on { color: var(--text); }
.badge.is-on .medal { stroke: var(--green-700); }
.badge.is-on .medal .m-ring { stroke: var(--brass); }
.badge.is-on .medal text { fill: var(--green-700); }
.b-nm { display: flex; align-items: center; gap: var(--sp-1); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: var(--fw-strong); }
.badge:not(.is-on) .b-nm svg { stroke: var(--check-off); stroke-width: 1.5; }
.b-note { margin-top: var(--sp-1); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
/* the courses played, newest first */
.pp-rows { list-style: none; margin: 0 calc(-1 * var(--card-pad)) calc(-1 * var(--card-pad)); padding: 0; }
.pp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--sp-2) var(--sp-5); padding: var(--sp-4) var(--card-pad); border-top: var(--border); }
.pp-main .nm { font-family: var(--serif); font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-strong); color: var(--text); text-decoration: none; }
.pp-main .nm:hover { color: var(--link); text-decoration: underline; }
.pp-main .pl { display: block; margin-top: var(--sp-1); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.pp-when { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end; gap: var(--sp-1) var(--sp-4); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.pp-when a { font-weight: var(--fw-strong); }
.pp-empty { color: var(--text-muted); }
/* home, signed in: one line leading to the passport */
.pp-mini {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0 var(--sp-4); padding: var(--sp-4) var(--card-pad);
  color: var(--text-muted); text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.pp-mini:hover { border-color: var(--rule-strong); box-shadow: var(--shadow-2); }
.pp-mini b { margin-right: var(--sp-1); font-family: var(--serif); font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: var(--fw-strong); color: var(--text); font-variant-numeric: tabular-nums lining-nums; }
.pp-mini .more { color: var(--link); }
.pp-mini .pp-track { grid-column: 1 / -1; }

/* ---------- the picture dialog ---------- */
.dlg-pic { width: min(560px, calc(100vw - 2 * var(--sp-4))); }
.pic-frame {
  display: grid; place-items: center; height: min(56vh, 560px); margin-top: var(--sp-4); padding: var(--sp-3);
  background: var(--paper-2); border: var(--border); border-radius: var(--r-sm);
}
.pic-frame.land { height: auto; aspect-ratio: 1200 / 630; }
.pic-frame img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; box-shadow: var(--shadow-1); }
.pic-frame.land img { width: 100%; }
.pic-wait { font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-muted); }
.pic-acts { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); }
.pic-acts:empty { display: none; }
#pic-msg { margin-top: var(--sp-3); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--danger); font-weight: var(--fw-strong); }
#pic-msg:empty { display: none; }

/* =========================================================
   10. NARROWER SCREENS
   ========================================================= */
@media (max-width: 1023px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .hero-in { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 240px; }
  .hero-scrim { background: linear-gradient(180deg, rgba(12, 28, 20, .05) 0, rgba(12, 28, 20, .82) 220px, var(--green-950) 340px); }
  .hero-card { max-width: 480px; }
  .hero-in { padding-bottom: var(--sp-8); }
  .cards-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sv-grid { grid-template-columns: minmax(0, 1fr); }
}

/* phones: the side navigation becomes a tab bar at the bottom */
@media (max-width: 767px) {
  .shell { display: block; }
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1400; flex-direction: row; overflow: visible;
    height: var(--tab-h); padding: 0 0 env(safe-area-inset-bottom); border-top: 1px solid var(--green-950);
  }
  .brand, .nav-acct { display: none; }
  /* five tabs, the same signed in and out: Home, Courses, Rankings, Events, Account */
  .nav-links { display: flex; flex: 1; gap: 0; padding: 0; }
  .nav-links li { flex: 1; min-width: 0; }
  .nav-links .nav-m { display: block; }
  .nav-links a, .nav-tab {
    flex-direction: column; justify-content: center; gap: var(--sp-1); height: var(--tab-h); padding: 0 2px;
    font-size: var(--fs-label); line-height: var(--lh-label); border-radius: 0; white-space: nowrap;
  }
  .nav-tab[aria-expanded="true"] { color: var(--text-on-dark); background: rgba(255, 255, 255, .06); }
  /* the Account tab's box: the side navigation's account box, over the tab bar */
  .nav.acct-open .nav-acct {
    position: fixed; left: var(--gutter); right: var(--gutter); bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + var(--sp-2)); z-index: 1401;
    display: block; max-height: calc(100% - var(--tab-h) - var(--head-h) - var(--sp-5)); overflow-y: auto; margin: 0; padding: var(--sp-4);
    background: var(--green-950); border: 1px solid rgba(255, 255, 255, .09); border-radius: var(--r-md); box-shadow: var(--shadow-2);
  }
  .nav.acct-open .nav-acct ul { margin: 0 calc(-1 * var(--sp-2)); }
  .nav-acct li > a, .nav-acct .linkbtn { min-height: var(--control-h-touch); }
  /* the header: the site's name and the course search */
  .m-head {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1400; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
    height: var(--head-h); padding: 0 var(--sp-2) 0 var(--gutter); background: var(--green-950); border-bottom: 1px solid rgba(255, 255, 255, .09);
  }
  .m-brand { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--serif); font-size: var(--fs-h3); line-height: var(--lh-h3); font-weight: var(--fw-strong); color: var(--text-on-dark); text-decoration: none; }
  .m-head .qbtn, .qs-close { color: var(--text-on-dark-muted); }
  .m-head .qbtn:hover, .qs-close:hover { color: var(--text-on-dark); background: rgba(255, 255, 255, .06); }
  /* the search, opened from the header: over the page, its matches under the field */
  .qs { display: none; margin: 0; }
  .qs-on .qs { position: fixed; inset: 0; z-index: 1600; display: flex; flex-direction: column; background: var(--scrim); }
  .qs-bar { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--gutter); background: var(--green-950); }
  .qs-bar .qs-box { flex: 1 1 auto; }
  .qs .qs-close { display: inline-grid; }
  .qs-on .qs-pop { position: static; width: auto; max-height: none; min-height: 0; flex: 0 1 auto; margin: 0; border-radius: 0 0 var(--r-md) var(--r-md); }
  .qs-o { min-height: var(--control-h-touch); }
  .main { height: calc(100% - var(--tab-h) - var(--head-h)); margin-top: var(--head-h); }
  .page { padding: var(--sp-6) var(--gutter) var(--sp-7); }
  .page-head { margin-bottom: var(--sp-6); }
  .tiles-3 { gap: var(--sp-2); }
  .tile { padding: var(--sp-3); }
  .hero-in { padding-top: 200px; gap: var(--sp-5); }
  .hero-card { max-width: none; }
  .bar { grid-template-columns: 104px minmax(0, 1fr) 28px; }
  /* home rows of cards: one scrolling row of 280px cards */
  .cards-row { display: flex; gap: var(--sp-3); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) var(--sp-2); }
  .cards-row > .ccard { flex: 0 0 280px; scroll-snap-align: start; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .sec-acts { margin-left: 0; }

  /* the filter bar: [search] [near me] [filters (n)]; the menus open in a sheet from the bottom */
  .fbar { flex-wrap: nowrap; }
  .fbar-search { flex: 1 1 auto; min-width: 0; }
  .fbar .near { width: var(--control-h); padding: 0; flex: 0 0 auto; }
  .fbar .near .t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .fbar-toggle { display: inline-flex; flex: 0 0 auto; }
  .fbar-clear { display: none; }
  .fbar-more { display: none; }
  .fbar.open::before { content: ""; position: fixed; inset: 0; z-index: 1500; background: var(--scrim); }
  .fbar.open .fbar-more {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1501; display: grid; gap: var(--sp-4); max-height: 90vh; overflow-y: auto;
    padding: var(--sp-5) var(--gutter) calc(var(--sp-5) + env(safe-area-inset-bottom));
    background: var(--paper); border-radius: var(--r-md) var(--r-md) 0 0; box-shadow: var(--shadow-2);
  }
  .fbar-more .field { flex: none; }
  .fbar-more .fl { display: block; margin-bottom: var(--sp-1); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: var(--fw-strong); }
  .fbar-more select { height: var(--control-h-touch); }
  .fbar-sheet-h { display: block; font-family: var(--serif); font-size: var(--fs-h2); line-height: var(--lh-h2); font-weight: var(--fw-strong); }
  .fbar-sheet-foot { display: flex; align-items: center; gap: var(--sp-4); }
  .fbar-sheet-foot .btn { flex: 1 1 auto; height: var(--control-h-touch); }

  /* Courses: List | Map, one at a time */
  .view-courses { padding-top: var(--sp-5); }
  .cs-head { margin-bottom: var(--sp-3); }
  .view-courses .count { margin: var(--sp-2) 0; }
  .cs-modes { display: flex; margin-bottom: var(--sp-3); }
  .cs-modes button { flex: 1; min-height: calc(var(--control-h-touch) - 2 * var(--sp-1) - 2px); }
  .cs-body { display: block; position: relative; margin: 0 calc(-1 * var(--gutter)); }
  .cs-list { height: 100%; padding: var(--sp-3) var(--gutter) var(--sp-5); background: none; border: 0; }
  .cs-list .ccard { border: var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-1); }
  .cs-list .ccard + .ccard { margin-top: var(--sp-3); }
  .cs-list .ccard-a { padding: var(--sp-4); border-radius: inherit; }
  .cs-map { position: absolute; inset: 0; }
  .view-courses[data-mode="list"] .cs-map { visibility: hidden; }
  .view-courses[data-mode="map"] .cs-list { visibility: hidden; }
  .legend { top: var(--sp-3); bottom: auto; }
  .cs-peek { bottom: var(--sp-6); }
  .cs-peek .dlg-x { z-index: 1; top: var(--sp-1); right: calc(2 * var(--control-h-touch) + var(--sp-1)); box-shadow: none; background: none; }

  /* rankings: keep the essentials */
  .lists { display: flex; }
  .lists a { flex: 1; }
  .tbl .c-place, .tbl .c-par, .tbl .c-yards, .tbl .c-slope, .tbl .c-diff, .tbl .c-price, .tbl .c-fav { display: none; }
  .tbl td.c-name .sub .pr { display: block; }
  .tbl th button, .tbl th .h, .tbl td { padding-left: var(--sp-2); padding-right: var(--sp-2); }
  .tbl td.c-rank { width: 44px; }
  .tbl td.c-name { min-width: 0; width: 62%; }
  .tbl .fav-m { display: block; margin: var(--sp-1) calc(-1 * var(--sp-2)) 0 0; text-align: right; }

  /* course page */
  .page.course { padding-top: var(--sp-3); }
  /* the top card as one column: Share becomes the first, full-width button of the action rows */
  .cp-head { display: flex; flex-direction: column; }
  .cp-r1, .cp-act { display: contents; }
  .cp-head .rate { order: 1; margin-top: var(--sp-5); }
  .cp-head .share-btn { order: 2; width: 100%; height: var(--control-h-touch); margin-top: var(--sp-4); }
  .cp-head .cp-btns { order: 3; margin-top: var(--sp-2); }
  .cp-head .share-field { order: 2; }
  .cp-links { order: 4; }
  .tiles-5 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tiles-5 .tile { grid-column: span 2; }
  .tiles-5 .tile:nth-child(n + 4) { grid-column: span 3; }
  .tile .v { font-size: var(--fs-h2); line-height: var(--lh-h2); }
  .tile .v .na, .tile .v.na, .tile-diff .v { line-height: var(--lh-h2); }
  .tile-diff .pips i { display: none; }
  .tile-diff .v { white-space: normal; }
  .rate-l { flex: 1 1 100%; }
  .cp-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cp-btns .btn { width: 100%; height: var(--control-h-touch); }
  .cp-played .btn { flex: 1 1 auto; height: var(--control-h-touch); }
  .cp-links { justify-content: space-around; }
  .ilink { height: auto; padding: var(--sp-1) var(--sp-2); gap: var(--sp-1); }
  .ilink-t { display: block; font-size: var(--fs-label); line-height: var(--lh-label); }
  .checks { font-size: var(--fs-small); line-height: var(--lh-small); column-gap: var(--sp-4); }
  .ck { min-height: 28px; }
  .ck svg { margin-top: 2px; }
  .lay > .sec-head { margin-bottom: var(--sp-3); }
  .lay-side, .lay-card { padding: var(--sp-4); }
  .hc-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2) var(--sp-4); }
  .lay-btn { padding: 0 var(--sp-2); }
  .lay-step { bottom: var(--sp-7); }
  .lay-step .cap span { display: block; }
  .lay-step .cap span + span { font-weight: var(--fw-regular); }
  .lay-step .cap span + span::before { content: none; }
  .lay-step #lay-green { display: none; }
  #lay-expand span { display: none; }
  .lay-map .leaflet-bottom.leaflet-right { max-width: calc(100% - 150px); }
  .scard { grid-template-columns: 36px repeat(9, minmax(0, 1fr)); }
  .lay-frame.expanded { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto auto; }
  .lay-frame.expanded .lay-side { order: 2; max-height: 30vh; padding: var(--sp-3) var(--sp-4); border-left: 0; border-top: var(--border); }
  .lay-frame.expanded .lay-card { max-height: 24vh; }
  .lay-frame.expanded .lay-foot { display: none; }
  /* the review panel becomes a sheet from the bottom */
  .dlg { width: 100%; max-width: none; max-height: 90vh; margin: auto 0 0; border-radius: var(--r-md) var(--r-md) 0 0; }

  /* favorites, rounds */
  .sv-row { grid-template-columns: minmax(0, 1fr) auto; }
  .sv-tags { grid-column: 1; grid-row: 2; justify-content: flex-start; }
  .sv-row .sl-btn { grid-column: 2; grid-row: 1; justify-self: end; }
  .sv-rm { grid-column: 2; grid-row: 2; }

  /* events: the two menus one above the other; the shortlist tray just above the tab bar */
  .fbar-ev { flex-wrap: wrap; }
  .fbar-ev .field { flex: 1 1 100%; }
  .sl-tray { left: var(--gutter); right: var(--gutter); bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + var(--sp-2)); max-width: none; }
  .sl-tray { gap: var(--sp-2); padding-left: var(--sp-3); }
  .sl-tray-n { margin-right: auto; }
  .sl-tray .btn { padding: 0 var(--sp-3); }
  body[data-view="courses"][data-csmode="map"] .sl-tray { display: none; }
  .has-tray .cs-list { padding-bottom: calc(var(--sp-8) + var(--sp-7)); }
  .cards-row .ccard .c-nm { -webkit-line-clamp: 3; line-clamp: 3; }
  .cmp th[scope="row"], .cmp .cmp-k { width: 128px; min-width: 128px; }
  .cmp td, .cmp thead th { min-width: 176px; }
  .rd-row { grid-template-columns: minmax(0, 1fr) auto; }
  .rd-acts { grid-column: 1 / -1; }
  .rd-acts .btn { flex: 1; }
  .rd-set { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rd-set .rd-field:first-child { grid-column: 1 / -1; }
  .rd-nine { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .rd-c { border-bottom: var(--border); }
  .rd-c:nth-child(5n) { border-right: 0; }
  .rd-c:nth-child(n + 6) { border-bottom: 0; }
  .rd-tools .rd-step { flex: 1 1 100%; justify-content: space-between; }
  .rd-tools .rd-type { flex: 1 1 100%; display: flex; }
  .rd-tools .rd-type button { flex: 1; }
  .rd-tools > .btn { flex: 1; }
  .rd-map .lay { --lay-h: clamp(300px, 54vh, 460px); }
  .rd-save .btn { flex: 1; }

  /* passport, "Played", the picture dialog */
  .cp-head .cp-played { order: 3; }
  .pp-row { grid-template-columns: minmax(0, 1fr); }
  .pp-when { justify-content: flex-start; }
  .badges { grid-template-columns: minmax(0, 1fr); }
  .pp-acts .btn, .pic-acts .btn { flex: 1 1 auto; width: 100%; height: var(--control-h-touch); }
  .pp-acts { display: flex; }
  .pic-frame { height: min(52vh, 480px); }
  .pic-frame.land { height: auto; }
}
/* the narrowest phones: three tiles in a row keep their longest label ("COUNTIES") clear of the edge */
@media (max-width: 359px) { .tiles-3 .tile { padding-left: var(--sp-2); padding-right: var(--sp-2); } }
@media (max-width: 319px) { .checks { columns: 1; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* =========================================================
   10b. SKIP LINK, NOTES OF THE APP ITSELF, BOOKING LINKS, NARROW TOP CARD
   ========================================================= */
/* "Skip to main content": the first stop of the keyboard, shown only while it has the focus */
.skip {
  position: fixed; top: var(--sp-2); left: var(--sp-2); z-index: 3000; padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-small); line-height: var(--lh-small); font-weight: var(--fw-strong); color: var(--text);
  background: var(--paper); border: var(--border-strong); border-radius: var(--r-sm); box-shadow: var(--shadow-2);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }
.main:focus { outline: none; box-shadow: none; }
/* the course data could not be loaded */
.load-err { max-width: calc(var(--measure) + 2 * var(--card-pad)); margin: var(--sp-5) var(--gutter) 0; padding: var(--card-pad); }
.load-err p + p { margin-top: var(--sp-3); }
/* a new build has taken over this open page (app.js: registerOffline) */
.sw-note {
  position: fixed; left: 50%; bottom: var(--sp-5); z-index: 1500; transform: translateX(-50%);
  display: flex; align-items: center; gap: var(--sp-3); max-width: calc(100% - 2 * var(--gutter)); padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-small); line-height: var(--lh-small); color: var(--text-on-dark); background: var(--green-950);
  border-radius: var(--r-sm); box-shadow: var(--shadow-2);
}
.sw-note .linkbtn { min-height: 24px; color: var(--brass-light); }
.sw-note .linkbtn:hover { color: var(--text-on-dark); }
.sw-note .linkbtn:focus-visible { box-shadow: var(--focus-on-dark); }
/* offline: the layout is drawn without its photograph */
.lay-off {             /* under the zoom buttons (top left of the photograph) */
  position: absolute; left: var(--sp-2); top: 88px; z-index: 1001; margin: 0; padding: var(--sp-1) var(--sp-2);
  font-size: var(--fs-label); line-height: var(--lh-label); font-weight: var(--fw-strong); color: var(--text-on-dark);
  background: rgba(12, 28, 20, .82); border-radius: var(--r-sm);
}
/* the offline page (sw.js serves it for an address never opened): no navigation, so the page scrolls itself */
.offline-page .main { height: auto; margin: 0; }
/* the hero's sign-up card is drawn by app.js: until then its place is kept (no jump when it appears) */
.hero-card:empty { visibility: hidden; }
@media (min-width: 1024px) { .hero-card:empty { min-height: 430px; } }   /* the sign-up card's height, signed out */
/* small text links that stand on their own (not inside a sentence): at least 24px tall to press (WCAG 2.5.8) */
.more, .ev-foot a, .cp-where a, .cp-rank a, .cp-event a, button.linkbtn[data-acct="mode"] { display: inline-block; padding-top: 2px; padding-bottom: 2px; }
/* "Book a tee time" on the compare table: a small link, a 24px target */
.cmp-book { display: inline-flex; align-items: center; min-height: 24px; font-weight: var(--fw-strong); }
/* The top card's five figures: when the card is narrow (a tablet beside the navigation, a printed page) they go
   three and two to a row, and the difficulty word wraps rather than being cut short */
.cp-head { container: cphead / inline-size; }
.tile-diff .v { white-space: normal; overflow: visible; text-overflow: clip; }
.tile-diff .pips { flex-wrap: wrap; row-gap: 0; white-space: normal; }
@container cphead (max-width: 880px) {
  .tiles-5 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tiles-5 .tile { grid-column: span 2; }
  .tiles-5 .tile:nth-child(n + 4) { grid-column: span 3; }
}
@media (max-width: 767px) {
  .sw-note { bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + var(--sp-2)); }
  .cp-btns .cp-book { grid-column: 1 / -1; }
  /* the hero: a phone shows the top of it as a photograph (its own smaller slice: index.html, hero-src-phone) */
  .hero-img { bottom: auto; height: 360px; }
  /* "Step through the holes" sits in a bar under the photograph, clear of the photograph's credit line */
  .lay-stage.has-step { height: calc(var(--lay-h) + 56px); }
  .lay-stage.has-step .lay-map { bottom: 56px; }
  .lay-stage.has-step .lay-step {
    left: 0; right: 0; bottom: 0; transform: none; width: auto; max-width: none; height: 56px;
    justify-content: space-between; padding: var(--sp-2) var(--sp-3); background: var(--green-900); border-radius: 0; box-shadow: none;
  }
  .lay-stage.has-step .lay-step .cap { flex: 1 1 auto; }
  .lay-stage.has-step .lay-step .lay-btn.sq { flex-basis: 40px; width: 40px; height: 40px; }
  .rd-map .lay-stage.has-step { height: var(--lay-h); }
  .rd-map .lay-stage.has-step .lay-map { bottom: 0; }
}

/* =========================================================
   11. PRINT
   Any page: the content alone (no navigation, trays, buttons or dialogs), no aerial photographs or map tiles.
   The yardage sheet (app.js: printSheet): body.printing-sheet prints #print-sheet and nothing else.
   ========================================================= */
.print-sheet { display: none; }
@media print {
  @page { margin: 12mm; }
  html, body { height: auto; background: var(--paper); }
  body { font-size: var(--fs-small); line-height: var(--lh-small); }
  .shell { display: block; height: auto; }
  .main { height: auto; margin: 0; overflow: visible; }
  .nav, .sl-tray, .dlg, .qs-pop, .fbar, .cs-modes, .cp-top, .cp-act, .cp-links, .cp-played, .c-acts, .lay-tools, .lay-step, .lay-hint, .lay-tint,
  .hero-card, .ys-btn, .share-btn, .fav, .qbtn, .rate, .cp-more, .share-field, .rv-acts, .cp-report, .ev-acts, .gd-acts, .gd-out, .nf-links, .sl-acts, .sl-tools, .cmp-tools, .rd-tools, .rd-save, .pp-acts { display: none !important; }
  /* the aerial photography is not printed: the layout photo, the home page's picture, the maps' tiles */
  .lay-stage, .hero-img, .hero-scrim, .hero-credit, .leaflet-tile-pane, .cs-map, .sl-map, .rd-map .lay { display: none !important; }
  .hero { color: var(--text); background: none; }
  .hero h1, .hero-sub { color: var(--text); }
  .hero-in { min-height: 0; padding: 0 0 var(--sp-5); }
  .page, .view-courses { padding: 0; max-width: none; height: auto; }
  .cs-body { display: block; margin: 0; border: 0; }
  .cs-list { overflow: visible; border: 0; }
  .card, .ccard, .tile, .lay-frame, .lay-cards { box-shadow: none !important; }
  .card, .ccard, .lay-frame, .lay-cards, section, .tile, table { break-inside: avoid; }
  a { color: var(--text); text-decoration: none; }
  .lay-frame { display: block; }
  .lay-frame.expanded { position: static; }

  /* the yardage sheet alone */
  body.printing-sheet .shell, body.printing-sheet > dialog, body.printing-sheet .sl-tray { display: none !important; }
  body.printing-sheet .print-sheet { display: block; }
}
/* the yardage sheet: one page, black on white */
.ys { color: var(--text); font-family: var(--sans); font-size: var(--fs-small); line-height: var(--lh-small); }
.ys-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); padding-bottom: var(--sp-2); border-bottom: 1px solid var(--text); }
.ys-head h1 { font-size: var(--fs-title); line-height: var(--lh-title); color: var(--text); }
.ys-head p { margin-top: var(--sp-1); color: var(--text-muted); }
.ys-head .ys-date { white-space: nowrap; }
.ys-set { margin-top: var(--sp-4); }
.ys-set h2 { font-size: var(--fs-h3); line-height: var(--lh-h3); }
.ys-tee { margin-top: var(--sp-1); color: var(--text-muted); }
.ys-t { width: 100%; margin-top: var(--sp-2); table-layout: fixed; border-collapse: collapse; font-variant-numeric: tabular-nums lining-nums; }
.ys-t th, .ys-t td { height: 22px; padding: 0 var(--sp-1); text-align: center; white-space: nowrap; border: 1px solid var(--text-muted); }
.ys-t th[scope="row"] { width: 56px; text-align: left; font-size: var(--fs-label); line-height: var(--lh-label); letter-spacing: var(--track-label); text-transform: uppercase; }
.ys-t thead th { font-weight: var(--fw-strong); background: var(--paper-2); }
.ys-t .ys-sum { width: 64px; font-weight: var(--fw-strong); }
.ys-note { margin-top: var(--sp-2); font-size: var(--fs-label); line-height: var(--lh-label); color: var(--text-muted); }
.ys-map { margin: var(--sp-4) 0 0; text-align: center; }
.ys-svg { display: block; width: 100%; }
.ys-map figcaption { margin-top: var(--sp-1); font-size: var(--fs-label); line-height: var(--lh-label); color: var(--text-muted); text-align: right; }
.ys-svg path { vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.ys-fairways { fill: none; stroke: var(--text-muted); stroke-width: .75px; }
.ys-water { fill: url(#ys-hatch); stroke: var(--text); stroke-width: .75px; }
.ys-bunkers { fill: url(#ys-dots); stroke: var(--text-muted); stroke-width: .5px; }
.ys-tees { fill: none; stroke: var(--text-muted); stroke-width: .5px; }
.ys-greens { fill: var(--rule); stroke: var(--text); stroke-width: 1px; }
.ys-line { fill: none; stroke: var(--text-muted); stroke-width: .5px; stroke-dasharray: 2 3; }
#ys-hatch line { stroke: var(--text-muted); stroke-width: .5px; vector-effect: non-scaling-stroke; }
#ys-dots circle { fill: var(--text-muted); }
.ys-no circle { fill: var(--paper); stroke: var(--text); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.ys-no text { fill: var(--text); font-family: var(--sans); font-weight: var(--fw-strong); text-anchor: middle; dominant-baseline: central; }
.ys-foot { margin-top: var(--sp-3); padding-top: var(--sp-1); font-size: var(--fs-label); line-height: var(--lh-label); color: var(--text-muted); border-top: 1px solid var(--rule-strong); }
