/* ---------- Design tokens ---------- */
:root{
  /* Fairway greens */
  --green-950:#062a1c;
  --green-900:#0b3d2b;
  --green-800:#0f5132;
  --green-700:#137047;
  --green-600:#2f8f5f;
  --green-500:#4bb37b;
  --green-100:#d7f0e1;
  --green-50:#eaf7ef;

  /* Sky */
  --sky-500:#3b82f6;
  --sky-400:#60a5fa;

  /* Neutrals — warm parchment */
  --sand-50:#faf7f2;
  --sand-100:#f2ede3;
  --sand-200:#e6dfd0;
  --ink-900:#111713;
  --ink-700:#2b3830;
  --ink-500:#5a6b62;
  --ink-400:#7b8b83;
  --line:#dcd6c8;

  /* Score palette */
  --s-prime:#0f7a3c;
  --s-great:#3a9b4a;
  --s-good:#c39a1e;
  --s-ok:#d97706;
  --s-bad:#c2410c;
  --s-nogo:#991b1b;

  --radius:16px;
  --radius-sm:10px;
  --shadow-sm:0 1px 2px rgba(6,42,28,.06), 0 2px 6px rgba(6,42,28,.05);
  --shadow-md:0 10px 30px -12px rgba(6,42,28,.25);
  --wrap-max:1120px;

  /* Single sans-serif family used for both display and body — we differentiate
     via weight (900/800 for display, 400–600 for body) and letter-spacing. */
  --font-display:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-sans:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
}

*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:var(--font-sans);
  color:var(--ink-900);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(75,179,123,.18), transparent 60%),
    radial-gradient(900px 500px at -5% 10%, rgba(59,130,246,.10), transparent 60%),
    var(--sand-50);
  -webkit-font-smoothing:antialiased;
  line-height:1.55;
}
img,svg{display:block;max-width:100%}
a{color:var(--green-800);text-decoration:none}
a:hover{text-decoration:underline}
button{font:inherit;cursor:pointer}
h1,h2,h3{font-family:var(--font-display);font-weight:800;letter-spacing:-0.025em;line-height:1.1;color:var(--ink-900);margin:0}
h1{font-size:clamp(2rem,5vw,3.6rem);font-weight:900}
h2{font-size:clamp(1.5rem,3vw,2.2rem)}
h3{font-size:1.15rem}
.wrap{max-width:var(--wrap-max);margin:0 auto;padding:0 20px}
.muted{color:var(--ink-500);font-weight:500}

/* ---------- Header ---------- */
.site-header{position:sticky;top:0;z-index:20;backdrop-filter:blur(10px);background:rgba(250,247,242,.75);border-bottom:1px solid var(--line)}
.header-inner{display:flex;align-items:center;justify-content:space-between;height:64px}
.brand{display:flex;align-items:center;gap:10px;color:var(--green-800);text-decoration:none;font-family:var(--font-display);font-weight:900;font-size:1.15rem}
.brand:hover{text-decoration:none}
/* Logo mark uses baked-in warm-gold colors (Direction 5A dimple constellation).
   No color inheritance needed — the palette IS the identity. */
.logo{width:32px;height:32px;flex:none}
.brand-accent{color:var(--green-600)}
.site-nav{display:flex;gap:20px;font-weight:500}
.site-nav a{color:var(--ink-700)}
/* Hamburger — hidden on desktop, shown on mobile via media query below */
.nav-toggle{position:absolute;left:-9999px;opacity:0}
.nav-burger{display:none;cursor:pointer;padding:8px;margin-left:auto;border-radius:8px;user-select:none;color:var(--ink-900)}
.nav-burger:hover{background:rgba(0,0,0,.05)}
.nav-burger svg{display:block;width:26px;height:26px}
.nav-burger .icon-close{display:none}

/* ---------- Hero ---------- */
.hero{padding:56px 0 40px}
.hero h1{max-width:820px}
.lede{font-size:clamp(1.05rem,1.6vw,1.25rem);color:var(--ink-700);max-width:760px;margin:16px 0 28px}

/* Search */
.search{display:flex;gap:10px;flex-wrap:wrap;max-width:820px;position:relative;align-items:center}
.search-field{
  flex:1 1 320px;display:flex;align-items:center;gap:8px;
  background:#fff;border:1px solid var(--line);border-radius:999px;padding:6px 8px 6px 16px;
  position:relative;
  box-shadow:var(--shadow-sm);transition:border-color .15s, box-shadow .15s;
  min-width:0;
}
.search-field:focus-within{border-color:var(--green-600);box-shadow:0 0 0 4px rgba(75,179,123,.18)}
.search-field .icon{width:20px;height:20px;color:var(--ink-500);flex:0 0 auto}
#q{flex:1;border:0;outline:0;padding:12px 0;font-size:1rem;background:transparent;min-width:0}
.ghost{background:transparent;border:0;padding:8px;border-radius:999px;color:var(--ink-500);display:inline-flex}
.ghost:hover{background:var(--sand-100);color:var(--green-800)}
.ghost svg{width:20px;height:20px}

/* Date field */
.date-field{
  display:flex;align-items:center;gap:8px;
  background:#fff;border:1px solid var(--line);border-radius:999px;padding:6px 14px;
  box-shadow:var(--shadow-sm);transition:border-color .15s, box-shadow .15s;
  min-width:0;
}
.date-field:focus-within{border-color:var(--green-600);box-shadow:0 0 0 4px rgba(75,179,123,.18)}
.date-field .icon{width:18px;height:18px;color:var(--ink-500);flex:0 0 auto}
#date{border:0;outline:0;padding:12px 0;font-size:1rem;background:transparent;font-family:inherit;color:var(--ink-900);min-width:130px}
#date::-webkit-calendar-picker-indicator{cursor:pointer;opacity:.6}
#date::-webkit-calendar-picker-indicator:hover{opacity:1}

/* Date chips */
.date-chips{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px;max-width:820px}
.date-chip{
  background:#fff;border:1px solid var(--line);border-radius:999px;padding:8px 14px;font-size:.88rem;font-weight:600;color:var(--ink-700);
  cursor:pointer;transition:all .15s;
}
.date-chip:hover{border-color:var(--green-600);color:var(--green-800)}
.date-chip.active{background:var(--green-800);color:#fff;border-color:var(--green-800)}
.date-chip .chip-sub{opacity:.7;font-weight:500;margin-left:4px;font-size:.78rem}
.primary{
  background:var(--green-800);color:#fff;border:0;border-radius:999px;padding:14px 22px;font-weight:600;
  box-shadow:var(--shadow-sm);transition:transform .05s ease, background .15s ease;
}
.primary:hover{background:var(--green-900)}
.primary:active{transform:translateY(1px)}
.status{margin-top:12px;color:var(--ink-500);min-height:1.4em}
.status.error{color:#b91c1c}
.status.error strong{display:block;font-weight:600;margin-bottom:4px}
.status.error .status-details{margin:6px 0;color:#7f1d1d;font-weight:400}
.status.error .status-details summary{cursor:pointer;color:#b91c1c;text-decoration:underline;text-underline-offset:2px;font-weight:500;display:inline-block;padding:2px 0}
.status.error .status-details summary:hover{color:#7f1d1d}
.status.error .status-details[open] summary{margin-bottom:6px}
.status.error .status-details > *:not(summary){display:block;font-size:.94em;line-height:1.5;color:#5b1a1a}
.status.error .status-fallback{display:block;margin-top:6px;color:var(--ink-500);font-weight:400}

.suggestions{
  position:absolute;top:calc(100% + 8px);left:0;right:0;background:#fff;border:1px solid var(--line);
  border-radius:14px;box-shadow:var(--shadow-md);overflow:hidden;overflow-y:auto;z-index:50;
  max-height:min(60vh, 460px);
}
.suggestions button{
  display:flex;align-items:center;gap:12px;width:100%;text-align:left;background:transparent;border:0;padding:12px 16px;font-size:.98rem;font-family:inherit;color:inherit;cursor:pointer;
}
.suggestions button:hover,.suggestions button:focus{background:var(--sand-100)}
.suggestions .sug-icon{
  flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;
  border-radius:8px;background:var(--green-100,#e0efe6);font-size:1.1rem;
}
.suggestions .sug-icon-pin{background:var(--sand-100);}
.suggestions .sug-body{display:flex;flex-direction:column;line-height:1.25;min-width:0;flex:1}
.suggestions .sug-body strong{font-weight:700;color:var(--ink-900);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.suggestions .sug-sub{color:var(--ink-500);font-size:.82rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.suggestions .sug-dist{
  flex-shrink:0;font-size:.75rem;font-weight:700;color:var(--green-800);
  background:#e8f3ec;border:1px solid var(--green-600);border-radius:999px;
  padding:3px 9px;letter-spacing:.02em;
}
.suggestions .sug-dist.far{
  color:var(--ink-500);background:var(--sand-100);border-color:var(--line);font-weight:600;
}

/* Bottom-of-results "Nearby courses" list — shown after a geolocation-based search */
.nearby-bottom{margin-top:32px;min-width:0}
/*
  Grid tracks use minmax(0, 1fr) instead of 1fr so children with unbreakable
  meta content (rating chip + distance chip, both flex 0 0 auto) cannot force
  their track to grow past the container. Without this, the intrinsic min-width
  of a card is honored ahead of the fractional share, and 3 columns of ~380px
  overflow the 1080px grid container at viewports below ~1300px.
*/
.nearby-bottom-list{
  display:grid;
  grid-template-columns:minmax(0, 1fr);
  gap:10px;
  margin-top:12px;
  min-width:0;
}
@media(min-width:640px){.nearby-bottom-list{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr)}}
@media(min-width:960px){.nearby-bottom-list{grid-template-columns:repeat(3, minmax(0, 1fr))}}
.nearby-bottom-list .nb-course{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  background:#fff;border:1px solid var(--line);border-radius:14px;
  padding:14px 16px;text-align:left;font:inherit;color:inherit;
  cursor:pointer;transition:border-color .15s, box-shadow .15s, transform .05s;
}
.nearby-bottom-list .nb-course:hover{border-color:var(--green-600);box-shadow:var(--shadow-sm)}
.nearby-bottom-list .nb-course:active{transform:scale(.995)}
/* Each card is a flex row: [name (grows, truncates)] [meta (fixed content)].
   min-width:0 on the card itself is critical — without it, the flex child's
   min-content width leaks upward into the grid track. */
.nearby-bottom-list .nb-course{min-width:0}
.nearby-bottom-list .nb-name{font-weight:700;color:var(--ink-900);flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nearby-bottom-list .nb-meta{display:flex;align-items:center;gap:8px;flex:0 0 auto;min-width:0}
.nearby-bottom-list .nb-rating{
  color:#8a5c00;font-size:.78rem;font-weight:700;white-space:nowrap;
  display:inline-flex;align-items:baseline;gap:2px;
}
.nearby-bottom-list .nb-rating[data-loading]{min-width:0;color:transparent}
.nearby-bottom-list .nb-rating-count{color:var(--ink-500);font-weight:500}
.nearby-bottom-list .nb-dist{
  color:var(--ink-500);background:var(--sand-100);border:1px solid var(--line);
  border-radius:999px;padding:3px 10px;font-size:.78rem;font-weight:600;
  white-space:nowrap;flex:0 0 auto;
}
.nearby-bottom-list .nb-loading,
.nearby-bottom-list .nb-empty{
  grid-column:1/-1;display:flex;align-items:center;justify-content:center;gap:12px;
  padding:20px;color:var(--ink-500);font-size:.92rem;
  background:#fff;border:1px solid var(--line);border-radius:14px;
  flex-wrap:wrap;text-align:center;
}
.nearby-bottom-list .nb-retry{
  background:var(--green-800);color:#fff;border:0;border-radius:999px;
  padding:6px 14px;font-size:.85rem;font-weight:600;cursor:pointer;
  transition:background .15s;
}
.nearby-bottom-list .nb-retry:hover{background:var(--green-600)}

/* -----------------------------------------------------
   Course info panel (Google Places details for picked course)
----------------------------------------------------- */
.course-info{
  /* Section heading ("Book a tee time") sits above with its own margin;
     this panel is the section body so it just needs a small breathing gap. */
  margin:0 0 8px;
  background:#fff;border:1px solid var(--line);border-radius:14px;
  padding:14px 18px;
  display:flex;flex-direction:column;gap:8px;
}
.course-info .ci-header{
  display:flex;flex-wrap:wrap;align-items:center;gap:6px 4px;
  font-size:.95rem;
}
.course-info .ci-rating{color:#8a5c00;font-weight:700}
.course-info .ci-rating strong{font-size:1.05rem;letter-spacing:.01em;margin:0 2px}
.course-info .ci-rating .ci-muted{color:var(--ink-500);font-weight:500}
.course-info .ci-price{color:var(--ink-700);font-weight:700;letter-spacing:.02em}
.course-info .ci-open{
  color:#0f5132;background:#e6f4ea;border:1px solid #cfe7d5;
  border-radius:999px;padding:2px 10px;font-size:.78rem;font-weight:700;letter-spacing:.02em;
}
.course-info .ci-closed{
  color:#7a1f1f;background:#fdecec;border:1px solid #f4c8c8;
  border-radius:999px;padding:2px 10px;font-size:.78rem;font-weight:700;letter-spacing:.02em;
}
.course-info .ci-dot{color:var(--ink-400);margin:0 4px;font-weight:400}
.course-info .ci-hours{color:var(--ink-700);font-size:.9rem}
.course-info .ci-summary{color:var(--ink-700);font-size:.9rem;line-height:1.45}
.course-info .ci-actions{
  display:flex;flex-wrap:wrap;gap:8px;margin-top:4px;
}
.course-info .ci-action{
  display:inline-flex;align-items:center;gap:6px;
  background:var(--sand-100);border:1px solid var(--line);border-radius:999px;
  padding:6px 12px;color:var(--ink-900);font-size:.85rem;font-weight:600;
  text-decoration:none;transition:border-color .15s,background .15s,color .15s;
  max-width:100%;
}
.course-info .ci-action:hover{border-color:var(--green-600);background:#fff;color:var(--green-800)}
.course-info .ci-action svg{flex:0 0 auto;color:var(--green-800)}
.course-info .ci-action span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}

/* Skeleton while Place Details is loading */
.course-info .ci-skeleton{display:flex;flex-direction:column;gap:10px}
.course-info .ci-skel-line{height:14px;border-radius:6px;background:linear-gradient(90deg,#efece6 25%,#f6f4ef 37%,#efece6 63%);background-size:400% 100%;animation:ci-shimmer 1.4s ease-in-out infinite}
.course-info .ci-skel-w40{width:40%}
.course-info .ci-skel-actions{display:flex;gap:8px}
.course-info .ci-skel-pill{display:inline-block;width:90px;height:26px;border-radius:999px;background:linear-gradient(90deg,#efece6 25%,#f6f4ef 37%,#efece6 63%);background-size:400% 100%;animation:ci-shimmer 1.4s ease-in-out infinite}
@keyframes ci-shimmer{0%{background-position:100% 50%}100%{background-position:0 50%}}

/* "Load 10 more" button spans the full grid width, matches card styling */
.nearby-bottom-list .nb-load-more{
  grid-column:1/-1;
  background:#fff;color:var(--green-800);
  border:1px solid var(--line);border-radius:14px;
  padding:14px 20px;font-size:.95rem;font-weight:700;cursor:pointer;
  transition:background .15s,border-color .15s,transform .05s;
  margin-top:2px;
  font-family:inherit;
}
.nearby-bottom-list .nb-load-more:hover{
  background:var(--green-50,#eef7f0);
  border-color:var(--green-800);
}
.nearby-bottom-list .nb-load-more:active{transform:translateY(1px)}
.nearby-bottom-list .nb-spinner{
  width:14px;height:14px;border-radius:50%;
  border:2px solid var(--line);border-top-color:var(--green-600);
  animation:nb-spin .8s linear infinite;flex:0 0 auto;
}
@keyframes nb-spin{to{transform:rotate(360deg)}}

/* Nearby courses chip row — contain layout so async population doesn't shift the page */
.nearby-courses{
  overflow-anchor:none;contain:layout;
  margin-top:14px;padding:14px 16px 12px;border:1.5px dashed var(--green-600);
  border-radius:var(--radius-sm);background:linear-gradient(180deg, #f4faf6, #fff);
}
.nearby-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:10px}
.nearby-title{font-family:var(--font-display);font-weight:800;color:var(--green-800);font-size:.98rem}
.nearby-list{display:flex;flex-wrap:wrap;gap:8px}
.course-chip{
  display:inline-flex;align-items:center;gap:8px;background:#fff;border:1.5px solid var(--line);
  border-radius:999px;padding:7px 12px 7px 14px;cursor:pointer;font-family:inherit;color:var(--ink-900);
  font-size:.9rem;transition:border-color .15s, background .15s, transform .1s;box-shadow:var(--shadow-sm);
}
.course-chip:hover{border-color:var(--green-800);background:#f4faf6;transform:translateY(-1px)}
.course-chip-name{font-weight:600}
.course-chip-dist{color:var(--ink-500);font-size:.8rem;background:var(--sand-100);padding:2px 8px;border-radius:999px}

/* ---------- Empty state ---------- */
.empty-state{padding:32px 0 80px}
.empty-card{
  background:#fff;border:1.5px solid var(--line);border-radius:var(--radius);
  padding:36px 28px;box-shadow:var(--shadow-md);
  text-align:center;max-width:560px;margin:0 auto;
}
.empty-icon{
  font-size:2.6rem;line-height:1;margin-bottom:14px;
  display:inline-flex;align-items:center;justify-content:center;
  width:72px;height:72px;border-radius:50%;
  background:linear-gradient(180deg,#e8f3ec,#f4faf6);
  border:1.5px solid var(--green-600);
}
.empty-title{
  font-family:var(--font-display);font-weight:900;font-size:1.6rem;
  color:var(--green-800);margin:6px 0 10px;letter-spacing:-.01em;
}
.empty-sub{color:var(--ink-700);font-size:1rem;line-height:1.55;margin:0 auto 22px;max-width:440px}
.empty-hints{
  list-style:none;padding:0;margin:0;text-align:left;
  display:flex;flex-direction:column;gap:10px;max-width:420px;margin:0 auto;
}
.empty-hints li{
  display:flex;align-items:flex-start;gap:12px;
  background:var(--sand-100);border:1px solid var(--line);border-radius:12px;
  padding:12px 14px;font-size:.94rem;color:var(--ink-700);
}
.empty-hints li em{color:var(--ink-900);font-style:normal;font-weight:600;background:#fff;padding:1px 6px;border-radius:6px;border:1px solid var(--line)}
.eh-bullet{
  flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;
  width:28px;height:28px;border-radius:8px;background:#fff;border:1px solid var(--line);font-size:1rem;
}
@media(max-width:640px){
  .empty-card{padding:26px 20px}
  .empty-title{font-size:1.35rem}
  .empty-icon{width:60px;height:60px;font-size:2.1rem}
}

/* Nearby-courses block inside empty state */
.empty-nearby{
  margin:0 auto 22px;text-align:left;
  padding:14px 16px 14px;border:1.5px dashed var(--green-600);
  border-radius:14px;background:linear-gradient(180deg, #f4faf6, #fff);
  animation:fadein .35s ease;
}
@keyframes fadein{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
.en-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:10px;gap:8px;flex-wrap:wrap}
.en-title{font-family:var(--font-display);font-weight:800;color:var(--green-800);font-size:.98rem}
.en-list{display:flex;flex-wrap:wrap;gap:8px}
.en-list .course-chip.use-loc{background:var(--green-800);border-color:var(--green-800);color:#fff}
.en-list .course-chip.use-loc:hover{background:#0a3d24;border-color:#0a3d24}

/* Show-all / show-fewer toggle inside chip lists */
.en-toggle{
  display:inline-flex;align-items:center;gap:6px;
  background:transparent;border:1.5px dashed var(--green-800);
  color:var(--green-800);border-radius:999px;
  padding:8px 14px;font-family:var(--font-body);
  font-weight:700;font-size:.86rem;cursor:pointer;
  transition:all .15s ease;
}
.en-toggle:hover{background:var(--green-800);color:#fff;border-style:solid}
.en-toggle-more{
  background:var(--sand-100);color:var(--green-800);
  padding:2px 8px;border-radius:999px;font-size:.75rem;font-weight:700;
}
.en-toggle:hover .en-toggle-more{background:#fff;color:var(--green-800)}

/* Soft loading hint while we resolve permission + fetch nearby */
.empty-geo-status{
  margin:0 auto 18px;font-size:.88rem;color:var(--ink-500);
  display:inline-flex;align-items:center;gap:8px;
}
/* HTML [hidden] attribute must beat the class's display:inline-flex — without
   this, hideEmptyGeoStatus() would set hidden=true but the spinner would still
   show because class specificity > user-agent [hidden] rule. */
.empty-geo-status[hidden]{display:none !important;}
.empty-geo-status.loading::before{
  content:'';display:inline-block;width:12px;height:12px;border-radius:50%;
  border:2px solid var(--green-600);border-top-color:transparent;
  animation:spin .8s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* ---------- Results ---------- */
.results{padding:8px 0 60px}
/* Offset scroll anchoring for the sticky header so the location name isn't hidden. */
.results-head{scroll-margin-top:96px}
@media(max-width:640px){.results-head{scroll-margin-top:76px}}
.results-head{
  display:grid;grid-template-columns:1fr;gap:20px;
  background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:24px;
  box-shadow:var(--shadow-md);
}
@media(min-width:780px){.results-head{grid-template-columns:1fr auto;align-items:center}}
.place-name{font-family:var(--font-display);font-weight:900;font-size:clamp(1.5rem,3vw,2rem)}
.place-meta{color:var(--ink-500);margin:6px 0 0}

/* Share button — sits under place meta on mobile, inline-right on desktop */
.results-head-title{display:flex;flex-direction:column;gap:6px}
.share-btn{
  align-self:flex-start;
  margin-top:10px;
  display:inline-flex;align-items:center;gap:8px;
  background:#fff;color:var(--green-800);
  border:1px solid var(--line);border-radius:999px;
  padding:8px 14px;font-size:.9rem;font-weight:700;cursor:pointer;
  transition:background .15s,border-color .15s,transform .05s;
  font-family:inherit;
}
.share-btn:hover{background:var(--green-50,#eef7f0);border-color:var(--green-800)}
.share-btn:active{transform:translateY(1px)}
.share-btn svg{flex:0 0 auto}

/* Star / Save-to-favorites button — sits inline with Share */
.star-btn{
  align-self:flex-start;
  margin-top:10px;
  margin-right:8px;
  display:inline-flex;align-items:center;gap:8px;
  background:#fff;color:var(--green-800);
  border:1px solid var(--line);border-radius:999px;
  padding:8px 14px;font-size:.9rem;font-weight:700;cursor:pointer;
  transition:background .15s,border-color .15s,transform .05s,color .15s;
  font-family:inherit;
}
.star-btn:hover{background:var(--green-50,#eef7f0);border-color:var(--green-800)}
.star-btn:active{transform:translateY(1px)}
.star-btn svg{flex:0 0 auto;transition:fill .15s,stroke .15s}
.star-btn.is-on{
  background:#fff8e1;
  border-color:#f5c518;
  color:#8a6d00;
}
.star-btn.is-on svg{fill:#f5c518;stroke:#e0a800}

/* Wrapper that puts Star + Share side by side under the place meta */
.results-actions{
  display:flex;flex-wrap:wrap;gap:8px;
  margin-top:10px;
}
.results-actions .star-btn,
.results-actions .share-btn{margin-top:0}

/* Toast for copy-to-clipboard fallback */
.share-toast{
  position:fixed;left:50%;bottom:24px;transform:translateX(-50%) translateY(20px);
  background:var(--ink-900,#0f1f16);color:#fff;
  padding:12px 20px;border-radius:999px;font-size:.9rem;font-weight:600;
  box-shadow:0 10px 24px rgba(0,0,0,.18);
  opacity:0;pointer-events:none;
  transition:opacity .18s,transform .18s;
  z-index:9999;
}
.share-toast.is-visible{opacity:1;transform:translateX(-50%) translateY(0)}

/* ============================================================
   Score badge — Mock D hybrid layout

   Desktop (>= 720px):  Hero globe + secondary orb + verdict, side-by-side
   Mobile  (<  720px):  Segmented toggle + single hero globe + verdict, stacked
   ============================================================ */

.score-badge{display:flex;flex-direction:column;gap:16px;min-width:0}

/* Layout container */
.score-layout{display:flex;gap:32px;align-items:center}
.score-hero{display:flex;flex-direction:column;align-items:center;gap:12px;flex:0 0 auto}
.score-side{display:flex;flex-direction:column;gap:22px;flex:1;min-width:0}
.score-side-row{display:flex;align-items:center;gap:16px}

/* Hero caption below big globe */
.score-caption{font-size:.78rem;text-transform:uppercase;letter-spacing:.08em;color:var(--ink-500);font-weight:600;text-align:center}
.score-caption .muted{text-transform:none;letter-spacing:0;font-weight:500;color:var(--ink-500)}
/* Do NOT force line-break inside .muted here — keeps "Peak window · 7 AM" on one line */

/* Secondary column text block */
.score-side-text{display:flex;flex-direction:column;gap:2px;min-width:0}
.score-side-label{font-size:.72rem;text-transform:uppercase;letter-spacing:.08em;color:var(--ink-500);font-weight:700}
.score-side-val{font-family:var(--font-display);font-weight:800;font-size:1.05rem;color:var(--ink-900);letter-spacing:-0.01em;line-height:1.2}
.score-side-hint{font-size:.85rem;color:var(--ink-500);line-height:1.4;margin-top:2px;max-width:34ch}

/* Verdict sits below the secondary orb on desktop — normal styles apply */

/* Mobile-only segmented toggle. Default hidden; shown via media query. */
.score-toggle-wrap{display:none;justify-content:center;margin-bottom:4px}
.score-toggle{
  display:inline-flex;
  background:var(--sand-100, #f3f0e6);
  border:1px solid var(--line, #e5e2d6);
  border-radius:999px;
  padding:4px;
}
.score-toggle button{
  background:transparent;
  border:0;
  padding:8px 18px;
  font-family:inherit;
  font-size:.85rem;
  font-weight:700;
  color:var(--ink-500);
  border-radius:999px;
  cursor:pointer;
  letter-spacing:.01em;
  transition:background .18s ease, color .18s ease, box-shadow .18s ease;
}
.score-toggle button.active{
  background:#fff;
  color:var(--s-prime, #0f5132);
  box-shadow:0 1px 3px rgba(0,0,0,0.08), 0 0 0 1px rgba(15,81,50,0.1);
}
.score-toggle button .muted{color:inherit;opacity:.7;font-weight:600;margin-left:2px}

/* Mobile-only verdict block (below hero). Default hidden; shown on mobile. */
.score-verdict-mobile{display:none;text-align:center;max-width:38ch;margin:0 auto}
.score-verdict-mobile .verdict-sub{margin:6px auto 0}

/* Score-badge specific breakpoint: swap to mobile layout below 720px.
   This is INDEPENDENT of the app's global .site-nav/.hero breakpoint (520px)
   because the score's side-by-side layout gets cramped below ~720px, while
   the rest of the app can still render happily at that width. */
@media (max-width: 719px){
  .score-badge{align-items:stretch}
  .score-toggle-wrap{display:flex}
  .score-layout{flex-direction:column;gap:16px;align-items:center}
  .score-hero{width:100%}
  .score-hero .score-ring{width:220px;height:220px}
  .score-hero .score-ring .score-num{font-size:4.6rem}
  .score-caption{font-size:.85rem;letter-spacing:.1em}
  .score-side{display:none}
  .score-verdict-mobile{display:block}
}

/* Solid globe score badge — inspired by the OG share card.
   Structure per block:
     .score-ring (positioning wrapper — dictates size)
       svg (stroke ring = arc showing % full of the score)
       .score-num (huge white numeral centered inside the globe)
   The globe itself is a radial-gradient background on .score-ring::before,
   colored by the .ring-{prime|great|good|ok|bad|nogo} class we already toggle. */
/* Globe recipe — solid orb with glossy highlight, huge white numeral,
   translucent progress arc. Applied to both hero (large) and secondary
   (small) variants; size is set by variant-specific selectors below. */
.score-ring{
  position:relative;
  width:200px;height:200px;      /* Desktop hero default */
  flex:0 0 auto;
  border-radius:50%;
  /* Neutral placeholder background before a score loads */
  background:radial-gradient(circle at 30% 28%, #86efac 0%, #16a34a 55%, #14532d 100%);
  box-shadow:
    0 18px 40px -12px rgba(15,81,50,0.45),
    0 4px 12px -4px rgba(15,81,50,0.3),
    inset 0 3px 12px rgba(255,255,255,0.22),
    inset 0 -4px 14px rgba(0,0,0,0.18);
  transition:background .3s ease, box-shadow .3s ease;
}
/* Glossy specular highlight on the top-left — cheap but sells the "3D orb" feel */
.score-ring::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:50%;
  background:radial-gradient(circle at 32% 25%, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0) 45%);
  pointer-events:none;
}
/* Progress arc lives on top of the globe as an SVG ring.
   We keep the existing SVG markup (viewBox 0 0 120, r=52, stroke-width=10)
   and just restyle strokes: track becomes a translucent white ring, foreground
   becomes a bright white arc that shows how full the score is. */
.score-ring svg{
  position:absolute;
  inset:0;
  width:100%;height:100%;
  transform:rotate(-90deg);
  pointer-events:none;
  /* Slight nudge so the ring sits just inside the globe edge, not on top */
  padding:6px;
  box-sizing:border-box;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,0.25));
}
.ring-bg{fill:none;stroke:rgba(255,255,255,0.18);stroke-width:6}
.ring-fg{
  fill:none;
  stroke:rgba(255,255,255,0.95);
  stroke-width:6;
  stroke-linecap:round;
  transition:stroke-dashoffset .8s cubic-bezier(.2,.8,.2,1), stroke .3s;
}
/* Numeral sits dead-center, big and white — matches OG card treatment */
/* Hero numeral — huge, white, dead-center */
.score-num{
  position:absolute;inset:0;
  display:flex;align-items:center;justify-content:center;
  flex-direction:column;
  font-family:var(--font-display);
  font-weight:900;
  font-size:4.1rem;               /* Desktop hero default */
  line-height:1;
  color:#ffffff;
  letter-spacing:-0.04em;
  text-shadow:0 2px 10px rgba(0,0,0,0.28);
  padding-top:2px;
  transition:font-size .3s ease;
}
.score-num small{
  font-size:.24em;
  color:rgba(255,255,255,0.78);
  font-weight:700;
  letter-spacing:.06em;
  margin-top:6px;
  text-shadow:none;
}

/* Small variant (secondary daily-average orb on desktop) */
.score-ring.score-ring-sm{width:84px;height:84px}
.score-ring.score-ring-sm svg{padding:5px;filter:drop-shadow(0 1px 2px rgba(0,0,0,0.22))}
.score-ring.score-ring-sm .ring-bg{stroke-width:5}
.score-ring.score-ring-sm .ring-fg{stroke-width:5}
.score-ring.score-ring-sm .score-num{font-size:1.85rem;text-shadow:0 1px 4px rgba(0,0,0,0.28)}
.score-ring.score-ring-sm .score-num small{font-size:.28em;margin-top:2px}
/* Zero-state ("–") stays white but softer so it clearly reads as "waiting for data" */
.score-num:has(> span:empty), .score-num > span:empty::before{
  /* fallback for browsers without :has — the text "–" is set in HTML anyway */
}
.verdict-label{font-family:var(--font-display);font-weight:900;font-size:1.5rem;line-height:1.1}
.verdict-sub{color:var(--ink-500);margin-top:4px;max-width:32ch}

/* "How this will play" one-line tip.
   Sits between the "Conditions at peak window" chip (h3.section-title) and the
   factors grid. Small caps label + a clickable link that deep-scrolls to the
   matching FAQ. Uses accent color so it registers as interactive without
   competing with the score orbs above. */
.peak-tip{
  margin-top:6px;
  display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;
  padding:10px 14px;
  background:linear-gradient(180deg, var(--sand-50, #fbfaf5) 0%, #fff 100%);
  border:1px solid var(--line);
  border-left:3px solid var(--accent-500, #0f5132);
  border-radius:var(--radius-sm);
}
.peak-tip-label{
  font-size:.72rem;text-transform:uppercase;letter-spacing:.09em;
  color:var(--ink-500);font-weight:700;
  flex:0 0 auto;
}
.peak-tip-text{
  color:var(--ink-900);
  font-weight:500;
  text-decoration:none;
  transition:color .15s ease;
  flex:1 1 auto;
  min-width:0;
  line-height:1.4;
}
/* Trailing chevron cues that the tip is clickable and reveals more (FAQ). */
.peak-tip-text::after{
  content:" \2192";
  color:var(--accent-500, #0f5132);
  font-weight:700;
  white-space:nowrap;
  margin-left:2px;
  transition:transform .15s ease, margin-left .15s ease;
  display:inline-block;
}
.peak-tip-text:hover,
.peak-tip-text:focus-visible{
  color:var(--accent-500, #0f5132);
}
.peak-tip-text:hover::after,
.peak-tip-text:focus-visible::after{
  margin-left:6px;
}
.peak-tip-text:focus-visible{outline:2px solid var(--accent-500, #0f5132);outline-offset:3px;border-radius:2px}

/* Second chip: "Yardage today" ball-carry advisory. Sits directly below the
   "How this will play" chip. Uses an amber left-border to visually distinguish
   carry-yardage advice (data-driven, always-on when meaningful) from the
   dominant-factor playing tip (situational). Amber picks up the sun/heat
   semantics of temperature the same way the sand-50 tile background does. */
.peak-tip.peak-tip-carry{
  margin-top:6px;
  border-left:3px solid #c07f00;
}
.peak-tip.peak-tip-carry .peak-tip-text::after{color:#c07f00}
.peak-tip.peak-tip-carry .peak-tip-text:hover,
.peak-tip.peak-tip-carry .peak-tip-text:focus-visible{color:#c07f00}
.peak-tip.peak-tip-carry .peak-tip-text:focus-visible{outline-color:#c07f00}

/* When a user deep-links to a FAQ via #faq-* the anchor sits near the top of
   the viewport. Give the target a scroll-margin so the fixed nothing-visible
   overlaps the summary, and briefly highlight it so the user sees where their
   click landed. */
.faq details{scroll-margin-top:80px}
.faq details:target > summary{
  background:var(--sand-100, #f2efe6);
  border-radius:6px;
  transition:background .3s ease;
}
@media (max-width:520px){
  .peak-tip{flex-direction:column;gap:4px;align-items:flex-start}
}

/* Factors grid */
.factors{
  margin-top:12px;display:grid;gap:12px;
  grid-template-columns:repeat(auto-fill, minmax(160px, 1fr));
}
.factor{
  background:#fff;border:1px solid var(--line);border-radius:var(--radius-sm);padding:12px 14px;
  display:flex;flex-direction:column;gap:6px;position:relative;overflow:hidden;
}
.factor .f-label{font-size:.78rem;text-transform:uppercase;letter-spacing:.08em;color:var(--ink-500);font-weight:600;display:flex;align-items:center;gap:6px}
.factor .f-val{font-family:var(--font-display);font-weight:700;font-size:1.4rem;line-height:1}
.factor .f-sub{color:var(--ink-500);font-size:.85rem}
.factor .f-bar{height:6px;background:var(--sand-100);border-radius:4px;overflow:hidden;margin-top:2px}
.factor .f-bar > span{display:block;height:100%;border-radius:4px;background:var(--green-600);width:0;transition:width .8s ease}
.wind-compass{width:42px;height:42px;position:absolute;top:8px;right:8px;color:var(--green-800)}
.wind-compass .arrow{transition:transform .6s ease}

/* Section titles */
.section-title{margin:36px 0 12px;font-family:var(--font-display);font-weight:900;font-size:1.4rem}

/* Best windows */
.best-windows{display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}
.window-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius-sm);padding:14px 16px;display:flex;align-items:center;gap:14px;box-shadow:var(--shadow-sm)}
.window-rank{
  width:34px;height:34px;border-radius:50%;background:var(--green-800);color:#fff;
  display:flex;align-items:center;justify-content:center;font-weight:800;font-family:var(--font-display);
  flex:0 0 auto;
}
.window-time{font-weight:700}
.window-sub{color:var(--ink-500);font-size:.88rem}
.window-score{margin-left:auto;font-family:var(--font-display);font-weight:900;font-size:1.4rem}

/* Week (7-day at-a-glance) */
.week-scroller{overflow-x:auto;padding:6px 0 14px;margin:0 -20px;padding-left:20px;padding-right:20px}
.week{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(160px, 1fr);gap:12px;min-width:min-content}
@media(min-width:900px){.week{grid-template-columns:repeat(7, minmax(0,1fr));grid-auto-flow:row}}
.day-card{
  position:relative;background:#fff;border:1.5px solid var(--line);border-radius:var(--radius-sm);
  padding:14px 14px 12px;text-align:left;cursor:pointer;transition:transform .1s ease, border-color .15s, box-shadow .15s;
  display:flex;flex-direction:column;gap:10px;box-shadow:var(--shadow-sm);
  font-family:inherit;color:inherit;
}
.day-card:hover{border-color:var(--green-600);transform:translateY(-1px);box-shadow:var(--shadow-md)}
.day-card.selected{border-color:var(--green-800);box-shadow:0 0 0 3px rgba(15,81,50,.15), var(--shadow-md);background:linear-gradient(180deg, #fff, #f4faf6)}
.day-card.disabled{opacity:.55;background:#f4f1ea}
.day-card.disabled:hover{transform:none}
.best-badge{
  position:absolute;top:-8px;right:10px;background:var(--green-800);color:#fff;
  font-size:.68rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;
  padding:3px 8px;border-radius:999px;box-shadow:var(--shadow-sm);
}
.day-head{display:flex;align-items:baseline;gap:8px}
.day-dow{font-family:var(--font-display);font-weight:900;font-size:1.05rem;color:var(--ink-900)}
.day-date{font-size:.82rem;color:var(--ink-500);font-weight:500}
.day-scores{display:flex;gap:16px;align-items:flex-end}
.day-score-block{display:flex;flex-direction:column;gap:2px}
.day-score-num{font-family:var(--font-display);font-weight:900;font-size:2rem;line-height:1}
.day-score-num.sm{font-size:1.35rem;opacity:.85}
.day-card.disabled .day-score-num{color:var(--ink-400)!important}
.day-score-cap{font-size:.72rem;text-transform:uppercase;letter-spacing:.06em;color:var(--ink-500);font-weight:600}
.day-stats{display:grid;grid-template-columns:1fr 1fr;gap:4px 10px;font-size:.82rem;color:var(--ink-700);border-top:1px dashed var(--line);padding-top:8px;margin-top:2px}
.day-stat{display:flex;align-items:center;gap:5px}
.day-stat-icon{font-size:.9em}

/* Hourly */
.hourly-scroller{overflow-x:auto;padding:6px 0 14px;margin:0 -20px;padding-left:20px;padding-right:20px}
.hourly{display:flex;gap:8px;min-width:min-content}
.hour{
  flex:0 0 auto;width:78px;background:#fff;border:1px solid var(--line);border-radius:12px;
  padding:10px 8px;text-align:center;display:flex;flex-direction:column;gap:4px;position:relative;
}
.hour.now{border-color:var(--green-600);box-shadow:0 0 0 3px rgba(75,179,123,.2)}
.hour.peak{background:linear-gradient(180deg, #fff, #eaf7ef);border-color:var(--green-500)}
.hour.dark{background:#f4f1ea;opacity:.55}
.hour.dark .h-score{color:var(--ink-500)!important}
.h-badge{color:var(--green-800);margin-left:4px;font-size:.85rem}
.h-badge.dark{color:var(--ink-500)}
.empty-windows{
  background:#fff;border:1px dashed var(--line);border-radius:var(--radius-sm);
  padding:16px 18px;display:flex;flex-direction:column;gap:4px;
}
.empty-windows strong{font-family:var(--font-display);font-size:1.05rem}
.hour .h-time{font-size:.78rem;color:var(--ink-500);font-weight:600}
.hour .h-score{font-family:var(--font-display);font-weight:900;font-size:1.3rem;line-height:1}
.hour .h-temp{font-size:.85rem;color:var(--ink-700)}
.hour .h-wind{font-size:.72rem;color:var(--ink-500)}
.hour .h-dot{width:100%;height:4px;border-radius:3px;background:var(--sand-200);overflow:hidden;margin-top:4px}
.hour .h-dot > span{display:block;height:100%;background:var(--green-600)}

/* Score colors (used inline via JS setting a class) */
/* Numeric color inside the globe stays white (better contrast on the solid fill)
   than the previous per-tier ink colors. We keep the classes as no-ops in case
   they're used elsewhere in the tree (day tiles, mini-badges). */
/* Inside a globe (.score-ring), the big numeral is always white regardless of
   which tier class .setSingleRing() puts on it. This overrides the generic
   .score-{tier} text colors used elsewhere. */
.score-num.score-prime, .score-num.score-great, .score-num.score-good,
.score-num.score-ok,    .score-num.score-bad,    .score-num.score-nogo,
.score-ring .score-num, .score-ring .score-num > span{ color:#ffffff !important; }
.score-ring .score-num small{ color:rgba(255,255,255,0.78) !important; }

/* Elsewhere in the app (day cards, hourly list, etc.) still uses these text
   colors — leave them intact. */
.score-prime{color:var(--s-prime)}
.score-great{color:var(--s-great)}
.score-good{color:var(--s-good)}
.score-ok{color:var(--s-ok)}
.score-bad{color:var(--s-bad)}
.score-nogo{color:var(--s-nogo)}

/* Globe background per score tier — matches the .ring-* class the app already
   applies to the foreground stroke element. We select the parent .score-ring
   via :has() (modern browsers) and re-color the whole orb.
   Colors mirror the --s-* tokens but as gradients with a light center. */
.score-ring:has(.ring-prime){
  background:radial-gradient(circle at 30% 28%, #86efac 0%, #16a34a 55%, #052e16 100%);
  box-shadow:0 18px 40px -12px rgba(15,122,60,0.5), 0 4px 12px -4px rgba(15,122,60,0.35), inset 0 3px 12px rgba(255,255,255,0.22), inset 0 -4px 14px rgba(0,0,0,0.22);
}
.score-ring:has(.ring-great){
  background:radial-gradient(circle at 30% 28%, #a7f3d0 0%, #22c55e 55%, #14532d 100%);
  box-shadow:0 18px 40px -12px rgba(58,155,74,0.5), 0 4px 12px -4px rgba(58,155,74,0.35), inset 0 3px 12px rgba(255,255,255,0.22), inset 0 -4px 14px rgba(0,0,0,0.22);
}
.score-ring:has(.ring-good){
  background:radial-gradient(circle at 30% 28%, #fde68a 0%, #eab308 55%, #713f12 100%);
  box-shadow:0 18px 40px -12px rgba(195,154,30,0.5), 0 4px 12px -4px rgba(195,154,30,0.35), inset 0 3px 12px rgba(255,255,255,0.24), inset 0 -4px 14px rgba(0,0,0,0.22);
}
.score-ring:has(.ring-ok){
  background:radial-gradient(circle at 30% 28%, #fed7aa 0%, #f97316 55%, #7c2d12 100%);
  box-shadow:0 18px 40px -12px rgba(217,119,6,0.5), 0 4px 12px -4px rgba(217,119,6,0.35), inset 0 3px 12px rgba(255,255,255,0.24), inset 0 -4px 14px rgba(0,0,0,0.22);
}
.score-ring:has(.ring-bad){
  background:radial-gradient(circle at 30% 28%, #fecaca 0%, #dc2626 55%, #7f1d1d 100%);
  box-shadow:0 18px 40px -12px rgba(194,65,12,0.5), 0 4px 12px -4px rgba(194,65,12,0.35), inset 0 3px 12px rgba(255,255,255,0.24), inset 0 -4px 14px rgba(0,0,0,0.22);
}
.score-ring:has(.ring-nogo){
  background:radial-gradient(circle at 30% 28%, #fca5a5 0%, #b91c1c 55%, #450a0a 100%);
  box-shadow:0 18px 40px -12px rgba(153,27,27,0.55), 0 4px 12px -4px rgba(153,27,27,0.4), inset 0 3px 12px rgba(255,255,255,0.22), inset 0 -4px 14px rgba(0,0,0,0.25);
}
/* Ring foreground stays white regardless of tier — the tier communicates via
   the globe color, so we override the previous per-tier stroke colors. */
.ring-prime,.ring-great,.ring-good,.ring-ok,.ring-bad,.ring-nogo{stroke:rgba(255,255,255,0.95)!important}
.bg-prime{background:var(--s-prime)!important}
.bg-great{background:var(--s-great)!important}
.bg-good{background:var(--s-good)!important}
.bg-ok{background:var(--s-ok)!important}
.bg-bad{background:var(--s-bad)!important}
.bg-nogo{background:var(--s-nogo)!important}

/* ---------- How it works ---------- */
.how{padding:60px 0;background:linear-gradient(180deg, transparent, #fff)}
.how-grid{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));margin-top:28px}
.how-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius-sm);padding:20px}
.how-icon{font-size:1.6rem;margin-bottom:8px}
.how-card h3{font-family:var(--font-display);font-size:1.1rem;margin-bottom:4px}
.how-card p{color:var(--ink-500);margin:4px 0 0;font-size:.94rem}

.scale{margin-top:36px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:24px}
.scale h3{font-family:var(--font-display);font-size:1.2rem;margin-bottom:14px}
.scale-row{display:flex;align-items:center;gap:12px;padding:8px 0;border-bottom:1px dashed var(--line)}
.scale-row:last-child{border-bottom:0}
.chip{
  display:inline-block;padding:4px 10px;border-radius:999px;font-weight:700;font-size:.85rem;color:#fff;min-width:80px;text-align:center;
}
.s-prime{background:var(--s-prime)}
.s-great{background:var(--s-great)}
.s-good{background:var(--s-good)}
.s-ok{background:var(--s-ok)}
.s-bad{background:var(--s-bad)}
.s-nogo{background:var(--s-nogo)}

/* ---------- FAQ ---------- */
.faq{padding:60px 0;background:#fff;border-top:1px solid var(--line)}
.faq h2{margin-bottom:16px}
.faq details{border-top:1px solid var(--line);padding:16px 0}
.faq details:last-of-type{border-bottom:1px solid var(--line)}
.faq summary{cursor:pointer;font-weight:700;font-family:var(--font-display);font-size:1.05rem;list-style:none;display:flex;justify-content:space-between;align-items:center}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";font-family:var(--font-sans);color:var(--green-800);font-weight:700;font-size:1.4rem;transition:transform .2s}
.faq details[open] summary::after{transform:rotate(45deg)}
.faq p{color:var(--ink-700);margin:8px 0 0}
.faq p small{color:var(--ink-600);font-size:.86rem;font-style:italic}
.faq-table-wrap{margin:12px 0 4px;overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--line);border-radius:8px;background:#fff}
.faq-table{width:100%;border-collapse:collapse;font-family:var(--font-sans);font-size:.94rem;color:var(--ink-800)}
.faq-table thead th{background:var(--paper-200);color:var(--ink-900);text-align:left;font-weight:700;padding:10px 14px;border-bottom:1px solid var(--line);white-space:nowrap}
.faq-table tbody td{padding:10px 14px;border-bottom:1px solid var(--line-100, #eee)}
.faq-table tbody tr:last-child td{border-bottom:none}
.faq-table tbody tr:nth-child(even){background:#faf8f4}
.faq-table tbody td:nth-child(2){font-variant-numeric:tabular-nums;color:var(--ink-900);font-weight:600}
.faq-table tbody td:nth-child(3){color:var(--ink-700)}
/* Wind table has TWO numeric-primary columns — make col 3 match col 2's weight
   and numeric alignment when we opt-in via the wide variant. */
.faq-table--wind tbody td:nth-child(2),
.faq-table--wind tbody td:nth-child(3){
  font-variant-numeric:tabular-nums;color:var(--ink-900);font-weight:600;
}
/* Inline "(one club more)" hint sits below the yardage on the wind table and
   is muted so the yardage number reads first. Uses inline-block + top margin so
   it wraps cleanly on narrow screens instead of squishing next to the yardage. */
.faq-table-note{
  display:inline-block;
  margin-top:2px;
  color:var(--ink-600);
  font-weight:400;
  font-size:.86rem;
  font-variant-numeric:normal;
}
@media (max-width:640px){
  .faq-table{font-size:.88rem}
  .faq-table thead th,.faq-table tbody td{padding:8px 10px}
  .faq-table-note{display:block;margin-top:2px}
}

/* ---------- Footer ---------- */
.site-footer{padding:28px 0 40px;color:var(--ink-500);border-top:1px solid var(--line);background:var(--sand-100)}
.site-footer p{margin:2px 0}
.site-footer a{color:var(--green-800)}
.footer-directory{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:10px;font-size:14px}
.footer-directory a{color:var(--green-800);text-decoration:none;font-weight:600}
.footer-directory a:hover{text-decoration:underline}
.footer-directory span{color:var(--ink-300)}

/* ---------- Skeleton ---------- */
.skeleton{position:relative;overflow:hidden;background:var(--sand-200);border-radius:6px;color:transparent}
.skeleton::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.6),transparent);animation:shimmer 1.4s infinite}
@keyframes shimmer{from{transform:translateX(-100%)}to{transform:translateX(100%)}}

/* ---------- Nearby loading skeletons ---------- */
.nb-loading-live{
  grid-column:1 / -1;
  color:var(--ink-500);
  font-size:.9rem;
  padding:0 2px 6px;
}
.nb-skeleton{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 14px;
  background:#fff;
  border:1px solid var(--sand-300, #e6e2d5);
  border-radius:14px;
  min-height:52px;
}
.nb-skel-name{
  display:block;height:14px;width:60%;
  background:linear-gradient(90deg, #eef1ec 0%, #f8faf6 50%, #eef1ec 100%);
  background-size:200% 100%;
  border-radius:6px;
  animation:nbSkelShimmer 1.4s infinite linear;
}
.nb-skel-dist{
  display:block;height:14px;width:44px;
  background:linear-gradient(90deg, #eef1ec 0%, #f8faf6 50%, #eef1ec 100%);
  background-size:200% 100%;
  border-radius:20px;
  animation:nbSkelShimmer 1.4s infinite linear;
}
@keyframes nbSkelShimmer{
  from{background-position:200% 0}
  to{background-position:-200% 0}
}
@media (prefers-reduced-motion: reduce){
  .nb-skel-name, .nb-skel-dist{animation:none;background:#eef1ec}
}

/* ---------- Try Another Course module ---------- */
.try-another{margin-top:40px}
.ta-card{
  background:linear-gradient(180deg, var(--green-50) 0%, #ffffff 100%);
  border:1px solid var(--green-100);
  border-radius:20px;
  padding:24px;
  box-shadow:var(--shadow-sm);
}
.ta-head{margin-bottom:16px}
.ta-title{
  margin:0;
  font-size:1.25rem;
  font-weight:800;
  color:var(--ink-900);
  letter-spacing:-.01em;
}
.ta-sub{margin:4px 0 0;color:var(--ink-500);font-size:.95rem}
.ta-actions{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
}
@media(min-width:640px){.ta-actions{grid-template-columns:1fr 1fr 1fr}}
.ta-btn{
  display:flex;
  align-items:center;
  gap:14px;
  width:100%;
  padding:14px 16px;
  background:#ffffff;
  border:1px solid var(--green-100);
  border-radius:14px;
  cursor:pointer;
  text-align:left;
  transition:border-color .15s, box-shadow .15s, transform .05s;
  color:var(--ink-900);
  font:inherit;
}
.ta-btn:hover{border-color:var(--green-600);box-shadow:var(--shadow-sm)}
.ta-btn:active{transform:scale(.995)}
.ta-btn:focus-visible{outline:2px solid var(--green-600);outline-offset:2px}
.ta-btn svg{
  width:22px;height:22px;
  color:var(--green-700);
  flex:0 0 auto;
}
.ta-btn-label{display:flex;flex-direction:column;gap:2px;min-width:0}
.ta-btn-title{font-weight:700;color:var(--ink-900);line-height:1.2}
.ta-btn-sub{font-size:.82rem;color:var(--ink-500);line-height:1.2}

/* ---------- Small screens ---------- */
@media(max-width:520px){
  .site-header{background:rgba(250,247,242,.98)}
  .header-inner{position:relative;flex-wrap:wrap;height:auto;min-height:64px;padding-top:12px;padding-bottom:12px}
  .nav-burger{display:flex;align-items:center}
  .site-nav{display:none;flex-basis:100%;flex-direction:column;gap:0;margin-top:12px;padding-top:8px;border-top:1px solid var(--line);background:var(--cream-50,#faf7f2)}
  .site-nav a{padding:14px 4px;border-bottom:1px solid rgba(0,0,0,.05);font-size:1rem;color:var(--ink-900)}
  .site-nav a:last-child{border-bottom:none}
  .nav-toggle:checked ~ .site-nav{display:flex}
  .nav-toggle:checked ~ .nav-burger .icon-open{display:none}
  .nav-toggle:checked ~ .nav-burger .icon-close{display:block}
  /* Score-badge mobile layout is handled by its own 720px breakpoint above,
     which fires before this 520px breakpoint. Nothing extra needed here. */
  .hero{padding:32px 0 24px}
  .date-field{flex:1 1 100%}
  #date{width:100%}
  .ta-card{padding:18px}
}

/* ---------- Saved locations (Favorites + Recent) ---------- */
.empty-saved-host{margin-bottom:22px}
.ta-saved-host{margin:14px 0 6px}
.saved-row{margin-bottom:14px}
.saved-row:last-child{margin-bottom:0}
.saved-row-title{
  font-size:.78rem;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--ink-500);
  margin-bottom:8px;
}
.saved-row-chips{
  display:flex;flex-wrap:wrap;gap:8px;
}
.saved-chip{
  display:inline-flex;align-items:center;gap:10px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:999px;
  padding:8px 14px 8px 10px;
  font-family:inherit;font-size:.9rem;font-weight:600;
  color:var(--ink-900);
  cursor:pointer;
  transition:background .15s,border-color .15s,transform .05s;
  max-width:100%;
  text-align:left;
}
.saved-chip:hover{background:var(--green-50,#eef7f0);border-color:var(--green-800)}
.saved-chip:active{transform:translateY(1px)}
.saved-chip.is-fav{border-color:#f5c518;background:#fffdf5}
.saved-chip.is-fav:hover{background:#fff8e1;border-color:#e0a800}
.sc-icon{
  display:inline-flex;align-items:center;justify-content:center;
  width:22px;height:22px;flex:0 0 auto;
  font-size:.95rem;line-height:1;
}
.sc-body{display:inline-flex;flex-direction:column;line-height:1.15;min-width:0}
.sc-name{
  font-weight:700;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  max-width:210px;
}
.sc-meta{
  font-size:.72rem;font-weight:500;color:var(--ink-500);
  letter-spacing:.02em;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  max-width:210px;
}

@media (max-width:520px){
  .sc-name, .sc-meta{max-width:160px}
}

/* ─────────────────────────────────────────────────────────────
   Back-to-search FAB (mobile-only)
   ─────────────────────────────────────────────────────────────
   Fixed to lower-right, appears once user scrolls past the search
   box. Uses env(safe-area-inset-*) so it clears the iOS home-bar
   and doesn't overlap the notch. Hidden by default (JS sets the
   [hidden] attribute) and hidden entirely on tablet/desktop where
   the search box is always one short scroll away.
*/
/* Matches the styling of the back-to-top button used across the directory
   pages so the whole site behaves consistently. Visible on all viewports.
   Uses inline-flex + opacity toggling driven by the .is-visible class.
   Keeps the safe-area insets so it clears the iOS home indicator. */
.back-to-top{
  position:fixed;
  right:calc(env(safe-area-inset-right, 0px) + 20px);
  bottom:calc(env(safe-area-inset-bottom, 0px) + 20px);
  z-index:50;

  width:48px;
  height:48px;
  border-radius:50%;
  border:none;
  padding:0;

  background:var(--accent-500, #0f5132);
  color:var(--cream, #faf3e2);
  box-shadow:0 4px 14px rgba(0,0,0,.18);

  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-family:inherit;

  opacity:0;
  transform:translateY(12px);
  pointer-events:none;
  transition:opacity .22s ease, transform .22s ease, background .18s ease;

  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
.back-to-top.is-visible{
  opacity:1;
  transform:translateY(0);
  pointer-events:auto;
}
.back-to-top:hover{
  background:var(--green-mid, #0a3d24);
}
.back-to-top:focus-visible{
  outline:2px solid var(--gold, #f4b53f);
  outline-offset:3px;
}
.back-to-top svg{
  width:22px;
  height:22px;
  display:block;
  pointer-events:none;
}
.back-to-top[hidden]{display:none !important}

@media (max-width:600px){
  .back-to-top{
    right:calc(env(safe-area-inset-right, 0px) + 14px);
    bottom:calc(env(safe-area-inset-bottom, 0px) + 14px);
    width:44px;
    height:44px;
  }
  .back-to-top svg{width:20px;height:20px}
}

@media (prefers-reduced-motion:reduce){
  .back-to-top{
    transition:opacity .12s ease;
    transform:none;
  }
  .back-to-top.is-visible{transform:none}
}
