/* FairwayFinda Caddy — shared components.
   Built only from ff-tokens.css. Every class is ff- prefixed; nothing here
   touches an element that has not opted in with an ff- class.

   Conventions
   - One block class per component, parts as .ff-block__part, variants as
     .ff-block--variant. State is never a class: it is [aria-pressed],
     [aria-checked], [aria-current], [aria-busy], [disabled] or [data-state].
   - A parent passes state to its parts through local custom properties
     (--ff-notice-tone, --ff-marker-disc-fill …) so selectors stay one class deep.
   - Solid paper means known or chosen. Hollow dashed means estimated. Dotted
     means unknown. A gold ring outside an ink gap means "this object is selected".
   - No :hover. Press feedback is :active; keyboard focus is the one ring at the
     end of this file.

   Sections: type · button · icon button · chip + segmented · surface · sheet ·
   list row · radio card · score mark · score cell · result chip · putt ball ·
   stepper · stat tile · notice · veil + block · nav group · marker + connector ·
   caption · focus · reduced motion */


/* ---- Shared control reset ------------------------------------------------ */

.ff-button,
.ff-icon-button,
.ff-chip,
.ff-segmented__option,
.ff-list-row,
.ff-radio-card,
.ff-score-cell,
.ff-result-chip,
.ff-putt-ball,
.ff-nav-group__step,
.ff-nav-group__current,
.ff-notice__action,
.ff-notice__dismiss {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  margin: 0;
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color var(--ff-dur-press) var(--ff-ease-state),
    border-color var(--ff-dur-state) var(--ff-ease-state),
    color var(--ff-dur-state) var(--ff-ease-state),
    box-shadow var(--ff-dur-state) var(--ff-ease-state),
    transform var(--ff-dur-press) var(--ff-ease-state);
}


/* ---- Type ---------------------------------------------------------------- */

.ff-eyebrow {
  margin: 0;
  color: var(--ff-text-2);
  font: var(--ff-weight-heavy) var(--ff-size-12) / var(--ff-leading-tight) var(--ff-font-ui);
  letter-spacing: var(--ff-tracking-eyebrow);
  text-transform: uppercase;
}

.ff-numeral {
  font-family: var(--ff-font-display);
  font-weight: var(--ff-weight-display);
  font-variant-numeric: var(--ff-numeric);
  letter-spacing: var(--ff-tracking-heading);
}

.ff-icon {
  width: var(--ff-glyph);
  height: var(--ff-glyph);
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* ---- Button --------------------------------------------------------------
   <button class="ff-button ff-button--primary">Play this hole</button>
   Variants: --primary (one per view), --secondary, --quiet.
   Sizes: default 44, --lg 56. --block fills its row.
   States: :active, [disabled] / [aria-disabled="true"], [aria-busy="true"]. */

.ff-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ff-space-8);
  min-width: var(--ff-touch-min);
  min-height: var(--ff-touch-min);
  padding: 0 var(--ff-space-24);
  border: var(--ff-border) solid transparent;
  border-radius: var(--ff-radius-pill);
  background: var(--ff-surface);
  color: var(--ff-paper);
  font: var(--ff-weight-heavy) var(--ff-size-14) / var(--ff-leading-tight) var(--ff-font-ui);
  letter-spacing: var(--ff-tracking-label);
  text-transform: uppercase;
  white-space: nowrap;
}

.ff-button:active { transform: scale(var(--ff-press-scale)); }

.ff-button--primary {
  background: var(--ff-action);
  color: var(--ff-ink);
}
.ff-button--primary:active { background: var(--ff-action-press); }

.ff-button--secondary { border-color: var(--ff-line-control); }
.ff-button--secondary:active { background: var(--ff-surface-raised); }

.ff-button--quiet {
  padding: 0 var(--ff-space-12);
  background: transparent;
  text-decoration: underline;
  text-decoration-color: var(--ff-line-control);
  text-decoration-thickness: var(--ff-border-strong);
  text-underline-offset: var(--ff-space-4);
}
.ff-button--quiet:active { background: var(--ff-surface-raised); }

.ff-button--lg {
  min-height: var(--ff-touch-primary);
  padding: 0 var(--ff-space-32);
  font-size: var(--ff-size-16);
}

.ff-button--block { display: flex; width: 100%; }

/* A label can carry the choice it acts on, in sentence case:
   <button class="ff-button ff-button--primary">Start round<span class="ff-button__detail">Blue 5,890 m</span></button> */
.ff-button__detail {
  min-width: 0;
  overflow: hidden;
  font-weight: var(--ff-weight-strong);
  letter-spacing: var(--ff-tracking-normal);
  text-overflow: ellipsis;
  text-transform: none;
}

.ff-button[disabled],
.ff-button[aria-disabled="true"] {
  border-color: var(--ff-line);
  background: var(--ff-surface);
  color: var(--ff-text-3);
  text-decoration: none;
  cursor: default;
  pointer-events: none;
}

/* Busy keeps the label and adds a spinner in the label colour. */
.ff-button[aria-busy="true"] { pointer-events: none; }
.ff-button[aria-busy="true"]::before {
  content: "";
  box-sizing: border-box;
  width: var(--ff-space-16);
  height: var(--ff-space-16);
  flex: none;
  border: var(--ff-border-strong) solid currentColor;
  border-right-color: transparent;
  border-radius: var(--ff-radius-pill);
  animation: ff-spin var(--ff-dur-spin) linear infinite;
}


/* ---- Icon button ---------------------------------------------------------
   <button class="ff-icon-button" aria-label="Menu"><svg class="ff-icon">…</svg></button>
   Variants: --quiet (no edge), --primary (lime). Size: --lg 56.
   States: [aria-pressed="true"] (toggle on), :active, [disabled]. */

.ff-icon-button {
  display: inline-grid;
  place-items: center;
  width: var(--ff-touch-min);
  height: var(--ff-touch-min);
  flex: none;
  padding: 0;
  border: var(--ff-border) solid var(--ff-line-control);
  border-radius: var(--ff-radius-pill);
  background: var(--ff-surface);
  color: var(--ff-paper);
  font: var(--ff-weight-ui) var(--ff-size-24) / var(--ff-leading-display) var(--ff-font-ui);
}

.ff-icon-button:active {
  background: var(--ff-surface-raised);
  transform: scale(var(--ff-press-scale));
}

.ff-icon-button--lg { width: var(--ff-touch-primary); height: var(--ff-touch-primary); }

.ff-icon-button--quiet { border-color: transparent; background: transparent; }

.ff-icon-button--primary {
  border-color: transparent;
  background: var(--ff-action);
  color: var(--ff-ink);
}
.ff-icon-button--primary:active { background: var(--ff-action-press); }

.ff-icon-button[aria-pressed="true"] {
  border-color: var(--ff-paper);
  background: var(--ff-paper);
  color: var(--ff-ink);
}

.ff-icon-button[disabled],
.ff-icon-button[aria-disabled="true"] {
  border-color: var(--ff-line);
  background: var(--ff-surface);
  color: var(--ff-text-3);
  cursor: default;
  pointer-events: none;
}


/* ---- Chip + Segmented ----------------------------------------------------
   <div class="ff-chip-row"><button class="ff-chip" aria-pressed="true">Fairway</button>…</div>
   <div class="ff-segmented" role="radiogroup">
     <button class="ff-segmented__option" role="radio" aria-checked="true">Metres</button>…
   </div>
   One selected style for both: solid paper, ink text. */

.ff-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ff-touch-gap);
}

.ff-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ff-space-8);
  min-width: var(--ff-touch-min);
  min-height: var(--ff-touch-min);
  padding: 0 var(--ff-space-16);
  border: var(--ff-border) solid var(--ff-line-control);
  border-radius: var(--ff-radius-pill);
  background: var(--ff-surface);
  color: var(--ff-paper);
  font: var(--ff-weight-strong) var(--ff-size-14) / var(--ff-leading-tight) var(--ff-font-ui);
  white-space: nowrap;
}

.ff-chip:active {
  background: var(--ff-surface-raised);
  transform: scale(var(--ff-press-scale));
}

.ff-chip[aria-pressed="true"],
.ff-chip[aria-checked="true"] {
  border-color: var(--ff-paper);
  background: var(--ff-paper);
  color: var(--ff-ink);
}

.ff-chip[disabled],
.ff-chip[aria-disabled="true"] {
  border-color: var(--ff-line);
  color: var(--ff-text-3);
  cursor: default;
  pointer-events: none;
}

.ff-segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: var(--ff-touch-gap);
  box-sizing: border-box;
  padding: var(--ff-space-4);
  border: var(--ff-border) solid var(--ff-line);
  border-radius: var(--ff-radius-pill);
  background: var(--ff-surface);
}

.ff-segmented__option {
  min-width: var(--ff-touch-min);
  min-height: var(--ff-touch-min);
  padding: 0 var(--ff-space-12);
  border: 0;
  border-radius: var(--ff-radius-pill);
  background: transparent;
  color: var(--ff-text-2);
  font: var(--ff-weight-strong) var(--ff-size-14) / var(--ff-leading-tight) var(--ff-font-ui);
  white-space: nowrap;
}

.ff-segmented__option:active { background: var(--ff-surface-raised); }

.ff-segmented__option[aria-checked="true"],
.ff-segmented__option[aria-pressed="true"] {
  background: var(--ff-paper);
  color: var(--ff-ink);
}

.ff-segmented__option[disabled] {
  color: var(--ff-text-3);
  cursor: default;
  pointer-events: none;
}


/* ---- Surface -------------------------------------------------------------
   <section class="ff-surface">…</section>
   Variants: --raised (lifted, e1), --scrim (the only surface allowed over the
   live scene), --flush (no padding). */

.ff-surface {
  box-sizing: border-box;
  padding: var(--ff-space-16);
  border: var(--ff-border) solid var(--ff-line);
  border-radius: var(--ff-radius-16);
  background: var(--ff-surface);
  color: var(--ff-paper);
  font: var(--ff-weight-ui) var(--ff-size-16) / var(--ff-leading-body) var(--ff-font-ui);
}

.ff-surface--raised {
  background: var(--ff-surface-raised);
  box-shadow: var(--ff-e1);
}

.ff-surface--scrim {
  background: var(--ff-scrim);
  -webkit-backdrop-filter: blur(var(--ff-blur));
  backdrop-filter: blur(var(--ff-blur));
}

.ff-surface--flush { padding: 0; }


/* ---- Sheet ---------------------------------------------------------------
   <div class="ff-sheet-scrim" data-state="open"></div>
   <section class="ff-sheet" role="dialog" aria-modal="true" data-state="open">
     <div class="ff-sheet__handle"></div>
     <header class="ff-sheet__header"><h2 class="ff-sheet__title">…</h2>…</header>
     <div class="ff-sheet__body">…</div>
     <footer class="ff-sheet__footer">…</footer>
   </section>
   data-state: "open" | "closed" (default). --inline places a sheet in normal
   flow (documentation and tablet side panels). */

.ff-sheet-scrim {
  position: fixed;
  inset: 0;
  z-index: var(--ff-z-sheet);
  background: var(--ff-backdrop);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--ff-dur-exit) var(--ff-ease-exit),
    visibility 0s linear var(--ff-dur-exit);
}

.ff-sheet-scrim[data-state="open"] {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--ff-dur-enter) var(--ff-ease-enter), visibility 0s;
}

.ff-sheet {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: var(--ff-z-sheet);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 100%;
  max-width: var(--ff-measure);
  max-height: calc(100% - var(--ff-safe-top) - var(--ff-space-48));
  margin: 0 auto;
  padding:
    var(--ff-space-8)
    calc(var(--ff-space-16) + var(--ff-safe-right))
    calc(var(--ff-space-16) + var(--ff-safe-bottom))
    calc(var(--ff-space-16) + var(--ff-safe-left));
  border: var(--ff-border) solid var(--ff-line);
  border-bottom: 0;
  border-radius: var(--ff-radius-24) var(--ff-radius-24) 0 0;
  background: var(--ff-surface);
  box-shadow: var(--ff-e2);
  color: var(--ff-paper);
  font: var(--ff-weight-ui) var(--ff-size-16) / var(--ff-leading-body) var(--ff-font-ui);
  transform: translateY(100%);
  visibility: hidden;
  transition:
    transform var(--ff-dur-exit) var(--ff-ease-exit),
    visibility 0s linear var(--ff-dur-exit);
}

.ff-sheet[data-state="open"] {
  transform: none;
  visibility: visible;
  transition: transform var(--ff-dur-enter) var(--ff-ease-enter), visibility 0s;
}

.ff-sheet--inline {
  position: static;
  max-height: none;
  transform: none;
  visibility: visible;
}

/* The handle is a 24px-tall drag strip; the bar is drawn inside it. */
.ff-sheet__handle {
  display: grid;
  place-items: center;
  flex: none;
  height: var(--ff-space-24);
  touch-action: none;
}
.ff-sheet__handle::before {
  content: "";
  width: var(--ff-handle-width);
  height: var(--ff-handle-height);
  border-radius: var(--ff-radius-pill);
  background: var(--ff-line-control);
}

.ff-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ff-space-12);
  flex: none;
  padding-bottom: var(--ff-space-12);
}

.ff-sheet__title {
  margin: 0;
  color: var(--ff-paper);
  font: var(--ff-weight-display) var(--ff-size-24) / var(--ff-leading-tight) var(--ff-font-display);
  letter-spacing: var(--ff-tracking-heading);
}

/* The body scrolls, so it clips. Its padding (cancelled by the margin) leaves
   room for selection and focus rings on the controls inside. */
.ff-sheet__body {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 calc(-1 * var(--ff-space-8));
  padding: var(--ff-space-8);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.ff-sheet__footer {
  display: grid;
  gap: var(--ff-touch-gap);
  flex: none;
  padding-top: var(--ff-space-16);
}


/* ---- List row ------------------------------------------------------------
   <button class="ff-list-row">
     <span class="ff-list-row__leading">…</span>
     <span class="ff-list-row__body">
       <span class="ff-list-row__title">Mona Vale</span>
       <span class="ff-list-row__meta">18 holes · Par 72</span>
     </span>
     <span class="ff-list-row__trailing">5,810 m</span>
   </button>
   Works as <button>, <a> or a static <div>. Rows draw their own divider. */

.ff-list { display: grid; }

.ff-list-row {
  display: flex;
  align-items: center;
  gap: var(--ff-space-12);
  width: 100%;
  min-height: var(--ff-touch-primary);
  padding: var(--ff-space-8) var(--ff-space-4);
  border: 0;
  border-bottom: var(--ff-border) solid var(--ff-line);
  background: transparent;
  color: var(--ff-paper);
  font: var(--ff-weight-ui) var(--ff-size-16) / var(--ff-leading-tight) var(--ff-font-ui);
  text-align: left;
}

.ff-list-row:active { background: var(--ff-surface-raised); }

.ff-list-row[aria-current="true"] { box-shadow: inset 3px 0 0 var(--ff-gold); }

.ff-list-row[disabled],
.ff-list-row[aria-disabled="true"] {
  color: var(--ff-text-3);
  cursor: default;
  pointer-events: none;
}

.ff-list-row__leading {
  display: grid;
  place-items: center;
  flex: none;
  min-width: var(--ff-glyph);
  margin-left: var(--ff-space-8);
  color: var(--ff-text-2);
}

.ff-list-row__body {
  display: grid;
  gap: var(--ff-space-4);
  flex: 1 1 auto;
  min-width: 0;
}

.ff-list-row__title {
  overflow: hidden;
  font-weight: var(--ff-weight-strong);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ff-list-row__meta {
  color: var(--ff-text-2);
  font-size: var(--ff-size-14);
  font-variant-numeric: var(--ff-numeric);
}

.ff-list-row__trailing {
  flex: none;
  margin-right: var(--ff-space-8);
  color: var(--ff-text-2);
  font: var(--ff-weight-display) var(--ff-size-16) / var(--ff-leading-tight) var(--ff-font-display);
  font-variant-numeric: var(--ff-numeric);
}


/* ---- Search field --------------------------------------------------------
   <div class="ff-search">
     <svg class="ff-icon ff-search__icon" aria-hidden="true">…</svg>
     <input class="ff-search__input" type="search" placeholder="Search courses" aria-label="Search courses">
     <span class="ff-search__clear"><button class="ff-icon-button ff-icon-button--quiet" aria-label="Clear search">×</button></span>   (optional)
   </div>
   The one text entry. The input is the pill, so the focus ring follows its edge.
   16px text so iOS does not zoom the page on focus. */

.ff-search {
  position: relative;
  display: block;
}

.ff-search__input {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: var(--ff-touch-primary);
  margin: 0;
  padding: 0 var(--ff-space-48);
  border: var(--ff-border) solid var(--ff-line-control);
  border-radius: var(--ff-radius-pill);
  background: var(--ff-surface);
  color: var(--ff-paper);
  font: var(--ff-weight-ui) var(--ff-size-16) / var(--ff-leading-tight) var(--ff-font-ui);
  user-select: text;
  -webkit-user-select: text;
}

.ff-search__input::placeholder { color: var(--ff-text-3); }
.ff-search__input::-webkit-search-cancel-button { display: none; }

.ff-search__icon {
  position: absolute;
  top: 50%;
  left: var(--ff-space-16);
  color: var(--ff-text-2);
  transform: translateY(-50%);
  pointer-events: none;
}

.ff-search__clear {
  position: absolute;
  top: 50%;
  right: var(--ff-space-4);
  transform: translateY(-50%);
}


/* ---- Radio card ----------------------------------------------------------
   <div class="ff-radio-group" role="radiogroup" aria-label="Tee">
     <button class="ff-radio-card" role="radio" aria-checked="true">
       <span class="ff-radio-card__swatch" style="--ff-swatch:#1d4ed8"></span>
       <span class="ff-radio-card__title">Blue</span>
       <span class="ff-radio-card__meta">Men · 71.4 / 128</span>
       <span class="ff-radio-card__value">5,810<small class="ff-radio-card__unit">m</small></span>
       <span class="ff-radio-card__note">Tee positions mapped on 14 of 18 holes</span>   (optional)
     </button>…
   </div>
   The note is a caveat about the card and runs the full width under the value.
   --ff-swatch is data (a tee colour), set inline; it is the one sanctioned
   non-token colour and never carries text. */

.ff-radio-group {
  display: grid;
  gap: var(--ff-space-12);
}

.ff-radio-card {
  --ff-block-selection-label: "";
  --ff-block-selection-gap: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: var(--ff-space-12);
  row-gap: var(--ff-space-4);
  width: 100%;
  min-height: var(--ff-touch-primary);
  padding: var(--ff-space-12) var(--ff-space-16);
  border: var(--ff-border) solid var(--ff-line-control);
  border-radius: var(--ff-radius-16);
  background: var(--ff-surface);
  color: var(--ff-paper);
  font: var(--ff-weight-ui) var(--ff-size-16) / var(--ff-leading-tight) var(--ff-font-ui);
  text-align: left;
}

.ff-radio-card:active { background: var(--ff-surface-raised); }

.ff-radio-card[aria-checked="true"] {
  --ff-block-selection-label: "✓ Selected";
  --ff-block-selection-gap: var(--ff-space-8);
  border-color: transparent;
  --ff-focus-under: var(--ff-select-ring-focus);
  --ff-focus-offset-local: var(--ff-focus-offset-selected);
  background: var(--ff-surface-raised);
  box-shadow: var(--ff-select-ring);
}

.ff-radio-card[disabled],
.ff-radio-card[aria-disabled="true"] {
  border-color: var(--ff-line);
  color: var(--ff-text-3);
  cursor: default;
  pointer-events: none;
}

.ff-radio-card__swatch {
  grid-column: 1;
  grid-row: 1 / span 2;
  box-sizing: border-box;
  width: var(--ff-glyph);
  height: var(--ff-glyph);
  border: var(--ff-border-strong) solid var(--ff-paper);
  border-radius: var(--ff-radius-pill);
  background: var(--ff-swatch, var(--ff-text-3));
}

.ff-radio-card__title {
  grid-column: 2;
  font-weight: var(--ff-weight-strong);
}

.ff-radio-card__title::after {
  content: var(--ff-block-selection-label);
  display: inline-block;
  margin-inline-start: var(--ff-block-selection-gap);
  color: var(--ff-paper);
  font: var(--ff-weight-strong) var(--ff-size-14) / var(--ff-leading-tight) var(--ff-font-ui);
}

.ff-radio-card__meta {
  grid-column: 2;
  color: var(--ff-text-2);
  font-size: var(--ff-size-14);
  font-variant-numeric: var(--ff-numeric);
}

.ff-radio-card__note {
  grid-column: 2 / -1;
  grid-row: 3;
  color: var(--ff-text-2);
  font-size: var(--ff-size-14);
  font-variant-numeric: var(--ff-numeric);
}

.ff-radio-card__value {
  grid-column: 3;
  grid-row: 1 / span 2;
  font: var(--ff-weight-display) var(--ff-size-24) / var(--ff-leading-display) var(--ff-font-display);
  font-variant-numeric: var(--ff-numeric);
  letter-spacing: var(--ff-tracking-heading);
}

.ff-radio-card__unit {
  margin-left: var(--ff-space-4);
  color: var(--ff-text-2);
  font: var(--ff-weight-strong) var(--ff-size-14) / var(--ff-leading-display) var(--ff-font-ui);
  letter-spacing: var(--ff-tracking-normal);
}


/* ---- Score mark ----------------------------------------------------------
   The scorecard glyph. Shape first, colour second:
     data-score="eagle"   double circle   under
     data-score="birdie"  circle          under
     data-score="par"     no shape        par
     data-score="bogey"   square          over
     data-score="double"  double square   over   (double bogey or worse)
     data-score="unknown" no shape        unknown
   <span class="ff-score-mark" data-score="birdie">3</span>
   Size: default 26 (scorecard cell), --lg 48 (result chip). The double shapes
   draw 4px outside the box; leave that much room. Always pair the mark with a
   signed label (ScoreCell and ResultChip both have a __rel part). */

.ff-score-mark {
  display: inline-grid;
  place-items: center;
  box-sizing: border-box;
  width: var(--ff-mark-sm);
  height: var(--ff-mark-sm);
  border: var(--ff-border-strong) solid transparent;
  outline: var(--ff-border-strong) solid transparent;
  outline-offset: 2px;
  color: var(--ff-score-par);
  font: var(--ff-weight-display) var(--ff-size-16) / var(--ff-leading-display) var(--ff-font-display);
  font-variant-numeric: var(--ff-numeric);
}

.ff-score-mark--lg {
  width: var(--ff-mark-lg);
  height: var(--ff-mark-lg);
  font-size: var(--ff-size-24);
  letter-spacing: var(--ff-tracking-heading);
}

.ff-score-mark[data-score="eagle"] {
  border-color: currentColor;
  border-radius: var(--ff-radius-pill);
  outline-color: currentColor;
  color: var(--ff-score-under);
}

.ff-score-mark[data-score="birdie"] {
  border-color: currentColor;
  border-radius: var(--ff-radius-pill);
  color: var(--ff-score-under);
}

.ff-score-mark[data-score="bogey"] {
  border-color: currentColor;
  border-radius: 2px;
  color: var(--ff-score-over);
}

.ff-score-mark[data-score="double"] {
  border-color: currentColor;
  border-radius: 2px;
  outline-color: currentColor;
  color: var(--ff-score-over);
}

.ff-score-mark[data-score="unknown"] { color: var(--ff-score-unknown); }


/* ---- Score cell ----------------------------------------------------------
   <div class="ff-score-cell">
     <span class="ff-score-mark" data-score="bogey">5</span>
     <span class="ff-score-cell__rel">+1</span>
   </div>
   Static by default (34 wide minimum, nine fit a 390 phone). As a <button> add --tap
   for a 44 wide target. [aria-current="true"] marks the hole being played. */

.ff-score-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
}

.ff-score-cell {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: var(--ff-space-4);
  min-width: calc(var(--ff-mark-sm) + var(--ff-space-8));
  min-height: var(--ff-touch-primary);
  padding: var(--ff-space-8) 0 var(--ff-space-4);
  border: 0;
  border-radius: var(--ff-radius-8);
  background: transparent;
  color: var(--ff-paper);
  font-family: var(--ff-font-ui);
}

.ff-score-cell--tap { min-width: var(--ff-touch-min); }
.ff-score-cell--tap:active { background: var(--ff-surface-raised); }

.ff-score-cell[aria-current="true"] { background: var(--ff-surface-raised); }

.ff-score-cell__rel {
  color: var(--ff-text-2);
  font: var(--ff-weight-strong) var(--ff-size-12) / var(--ff-leading-display) var(--ff-font-ui);
  font-variant-numeric: var(--ff-numeric);
}


/* ---- Result chip ---------------------------------------------------------
   The big "what did you make" choice.
   <div class="ff-result-row" role="radiogroup" aria-label="Score">
     <button class="ff-result-chip" role="radio" aria-checked="false">
       <span class="ff-score-mark ff-score-mark--lg" data-score="birdie">3</span>
       <span class="ff-result-chip__name">Birdie</span>
       <span class="ff-result-chip__rel">−1</span>
     </button>…
   </div>
   Selected ([aria-checked] or [aria-pressed] = "true"): raised ground plus the
   gold selection ring. The mark keeps its own shape and colour. */

.ff-result-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: var(--ff-touch-gap);
}

.ff-result-chip {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: var(--ff-space-4);
  min-width: var(--ff-touch-primary);
  min-height: var(--ff-touch-primary);
  padding: var(--ff-space-12) var(--ff-space-4) var(--ff-space-8);
  border: var(--ff-border) solid var(--ff-line);
  border-radius: var(--ff-radius-16);
  background: var(--ff-surface);
  color: var(--ff-paper);
  font-family: var(--ff-font-ui);
}

.ff-result-chip:active {
  background: var(--ff-surface-raised);
  transform: scale(var(--ff-press-scale));
}

.ff-result-chip[aria-checked="true"],
.ff-result-chip[aria-pressed="true"] {
  border-color: transparent;
  --ff-focus-under: var(--ff-select-ring-focus);
  --ff-focus-offset-local: var(--ff-focus-offset-selected);
  background: var(--ff-surface-raised);
  box-shadow: var(--ff-select-ring);
}

.ff-result-chip[disabled],
.ff-result-chip[aria-disabled="true"] {
  color: var(--ff-text-3);
  cursor: default;
  pointer-events: none;
}

.ff-result-chip__name {
  margin-top: var(--ff-space-4);
  font: var(--ff-weight-heavy) var(--ff-size-12) / var(--ff-leading-tight) var(--ff-font-ui);
  letter-spacing: var(--ff-tracking-label);
  text-transform: uppercase;
}

.ff-result-chip__rel {
  color: var(--ff-text-2);
  font: var(--ff-weight-display) var(--ff-size-14) / var(--ff-leading-display) var(--ff-font-display);
  font-variant-numeric: var(--ff-numeric);
}


/* ---- Putt ball -----------------------------------------------------------
   <div class="ff-putt-row" role="radiogroup" aria-label="Putts">
     <button class="ff-putt-ball" role="radio" aria-checked="false">0</button>
     <button class="ff-putt-ball" role="radio" aria-checked="false" data-state="estimated">2</button>…
   </div>
   Resting: ringed. data-state="estimated": hollow dashed paper ring (the
   caddie's guess, not yet the player's). aria-checked="true": a solid paper
   ball with an ink numeral. Chosen always wins over estimated. */

.ff-putt-row {
  display: flex;
  justify-content: space-between;
  gap: var(--ff-touch-gap);
}

.ff-putt-ball {
  display: inline-grid;
  place-items: center;
  width: var(--ff-touch-primary);
  height: var(--ff-touch-primary);
  flex: none;
  padding: 0;
  border: var(--ff-border-strong) solid var(--ff-line-control);
  border-radius: var(--ff-radius-pill);
  background: var(--ff-surface);
  color: var(--ff-paper);
  font: var(--ff-weight-display) var(--ff-size-24) / var(--ff-leading-display) var(--ff-font-display);
  font-variant-numeric: var(--ff-numeric);
}

.ff-putt-ball:active {
  background: var(--ff-surface-raised);
  transform: scale(var(--ff-press-scale));
}

.ff-putt-ball[data-state="estimated"] {
  border-style: dashed;
  border-color: var(--ff-paper);
}

.ff-putt-ball[aria-checked="true"],
.ff-putt-ball[aria-pressed="true"] {
  border-style: solid;
  border-color: var(--ff-paper);
  background: var(--ff-paper);
  box-shadow: var(--ff-e1);
  color: var(--ff-ink);
}

.ff-putt-ball[disabled],
.ff-putt-ball[aria-disabled="true"] {
  border-color: var(--ff-line);
  color: var(--ff-text-3);
  cursor: default;
  pointer-events: none;
}


/* ---- Stepper -------------------------------------------------------------
   <div class="ff-stepper" role="group" aria-label="Strokes">
     <button class="ff-icon-button ff-icon-button--lg" aria-label="One fewer"><svg class="ff-icon">…</svg></button>
     <output class="ff-stepper__value">4</output>
     <button class="ff-icon-button ff-icon-button--lg" aria-label="One more"><svg class="ff-icon">…</svg></button>
   </div>
   The buttons are IconButtons; the stepper only owns layout and the value. */

.ff-stepper {
  display: inline-grid;
  grid-template-columns: auto minmax(var(--ff-touch-primary), 1fr) auto;
  align-items: center;
  gap: var(--ff-touch-gap);
}

.ff-stepper--block { display: grid; }

.ff-stepper__value {
  color: var(--ff-paper);
  font: var(--ff-weight-display) var(--ff-size-44) / var(--ff-leading-display) var(--ff-font-display);
  font-variant-numeric: var(--ff-numeric);
  letter-spacing: var(--ff-tracking-display);
  text-align: center;
}


/* ---- Stat tile -----------------------------------------------------------
   <div class="ff-stat-row">
     <div class="ff-stat-tile">
       <span class="ff-stat-tile__label">To pin</span>
       <span class="ff-stat-tile__value">148<span class="ff-stat-tile__unit">m</span></span>
       <span class="ff-stat-tile__meta">Plays 153</span>
     </div>…
   </div>
   Variants: --lg (44 numeral), --scrim (over the live scene). */

.ff-stat-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: var(--ff-space-8);
}

.ff-stat-tile {
  display: grid;
  align-content: start;
  gap: var(--ff-space-8);
  box-sizing: border-box;
  min-width: 0;
  padding: var(--ff-space-12);
  border: var(--ff-border) solid var(--ff-line);
  border-radius: var(--ff-radius-12);
  background: var(--ff-surface);
  color: var(--ff-paper);
}

.ff-stat-tile--scrim {
  background: var(--ff-scrim);
  -webkit-backdrop-filter: blur(var(--ff-blur));
  backdrop-filter: blur(var(--ff-blur));
}

.ff-stat-tile__label {
  color: var(--ff-text-2);
  font: var(--ff-weight-heavy) var(--ff-size-12) / var(--ff-leading-tight) var(--ff-font-ui);
  letter-spacing: var(--ff-tracking-eyebrow);
  text-transform: uppercase;
}

.ff-stat-tile__value {
  font: var(--ff-weight-display) var(--ff-size-32) / var(--ff-leading-display) var(--ff-font-display);
  font-variant-numeric: var(--ff-numeric);
  letter-spacing: var(--ff-tracking-display);
  white-space: nowrap;
}

.ff-stat-tile--lg { padding: var(--ff-space-16); }

.ff-stat-tile__value--lg { font-size: var(--ff-size-44); }

.ff-stat-tile__unit {
  margin-left: var(--ff-space-4);
  color: var(--ff-text-2);
  font: var(--ff-weight-strong) var(--ff-size-14) / var(--ff-leading-display) var(--ff-font-ui);
  letter-spacing: var(--ff-tracking-normal);
}

.ff-stat-tile__meta {
  color: var(--ff-text-2);
  font: var(--ff-weight-ui) var(--ff-size-14) / var(--ff-leading-tight) var(--ff-font-ui);
  font-variant-numeric: var(--ff-numeric);
}


/* ---- Notice --------------------------------------------------------------
   <div class="ff-notice ff-notice--toast" data-tone="info">
     <span class="ff-notice__glyph" aria-hidden="true"></span>
     <div class="ff-notice__body">
       <strong class="ff-notice__title">…</strong>      (optional)
       <span class="ff-notice__message">…</span>
     </div>
     <button class="ff-notice__action">Undo</button>     (optional)
   </div>
   Kinds: --inline (in flow), --toast (in .ff-notice-layer), --blocking
   (role="alertdialog", title takes .ff-notice__title--display, and
   .ff-notice__actions holds ff-buttons).
   data-tone: "info" (default) | "warn" | "error". The glyph is shape-coded:
   circle i, triangle !, octagon ×. Toast lifecycle: data-state="leaving".
   The layer sits above every surface; a screen with a bottom bar raises toasts
   by setting --ff-notice-offset on the layer or on :root. */

.ff-notice-layer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: var(--ff-z-notice);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ff-space-8);
  box-sizing: border-box;
  padding:
    0
    calc(var(--ff-space-16) + var(--ff-safe-right))
    calc(var(--ff-notice-offset, var(--ff-space-16)) + var(--ff-safe-bottom))
    calc(var(--ff-space-16) + var(--ff-safe-left));
  pointer-events: none;
}

.ff-notice-layer[data-blocking="true"] {
  top: 0;
  justify-content: center;
  padding-top: calc(var(--ff-space-24) + var(--ff-safe-top));
  background: var(--ff-backdrop);
  pointer-events: auto;
}

.ff-notice {
  --ff-notice-tone: var(--ff-info);
  --ff-notice-shape: circle(50%);
  --ff-notice-char: "i";
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: var(--ff-space-12);
  row-gap: var(--ff-space-16);
  box-sizing: border-box;
  width: 100%;
  max-width: var(--ff-measure);
  padding: var(--ff-space-12) var(--ff-space-16);
  border: var(--ff-border) solid var(--ff-line);
  border-radius: var(--ff-radius-16);
  background: var(--ff-surface);
  color: var(--ff-paper);
  font: var(--ff-weight-ui) var(--ff-size-16) / var(--ff-leading-tight) var(--ff-font-ui);
  pointer-events: auto;
}

.ff-notice[data-tone="warn"] {
  --ff-notice-tone: var(--ff-warn);
  --ff-notice-shape: polygon(50% 2%, 100% 94%, 0 94%);
  --ff-notice-char: "!";
}

.ff-notice[data-tone="error"] {
  --ff-notice-tone: var(--ff-danger);
  --ff-notice-shape: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
  --ff-notice-char: "×";
}

.ff-notice--toast {
  border-color: var(--ff-line-control);
  background: var(--ff-surface-raised);
  box-shadow: var(--ff-e2);
  animation: ff-notice-in var(--ff-dur-enter) var(--ff-ease-enter) both;
  transition:
    opacity var(--ff-dur-exit) var(--ff-ease-exit),
    transform var(--ff-dur-exit) var(--ff-ease-exit);
}

.ff-notice--toast[data-state="leaving"] {
  opacity: 0;
  transform: translateY(var(--ff-space-8));
}

.ff-notice--blocking {
  grid-template-columns: auto 1fr;
  align-items: start;
  padding: var(--ff-space-24);
  border-radius: var(--ff-radius-24);
  box-shadow: var(--ff-e2);
  animation: ff-notice-in var(--ff-dur-enter) var(--ff-ease-enter) both;
}

.ff-notice__glyph {
  display: grid;
  place-items: center;
  width: var(--ff-glyph);
  height: var(--ff-glyph);
  flex: none;
  background: var(--ff-notice-tone);
  clip-path: var(--ff-notice-shape);
  color: var(--ff-ink);
  font: var(--ff-weight-heavy) var(--ff-size-14) / var(--ff-leading-display) var(--ff-font-ui);
}
.ff-notice__glyph::before { content: var(--ff-notice-char); }

.ff-notice__body {
  display: grid;
  gap: var(--ff-space-4);
  min-width: 0;
}

.ff-notice__title { font-weight: var(--ff-weight-strong); }

.ff-notice__title--display {
  font: var(--ff-weight-display) var(--ff-size-24) / var(--ff-leading-tight) var(--ff-font-display);
  letter-spacing: var(--ff-tracking-heading);
}

.ff-notice__message { color: var(--ff-paper); }

.ff-notice__action {
  min-width: var(--ff-touch-min);
  min-height: var(--ff-touch-min);
  padding: 0 var(--ff-space-16);
  border: var(--ff-border) solid var(--ff-line-control);
  border-radius: var(--ff-radius-pill);
  background: var(--ff-ink);
  color: var(--ff-action);
  font: var(--ff-weight-heavy) var(--ff-size-14) / var(--ff-leading-tight) var(--ff-font-ui);
  letter-spacing: var(--ff-tracking-label);
  text-transform: uppercase;
  white-space: nowrap;
}

.ff-notice__action:active {
  color: var(--ff-action-press);
  transform: scale(var(--ff-press-scale));
}

.ff-notice__dismiss {
  display: inline-grid;
  place-items: center;
  width: var(--ff-touch-min);
  height: var(--ff-touch-min);
  padding: 0;
  border: 0;
  border-radius: var(--ff-radius-pill);
  background: transparent;
  color: var(--ff-text-2);
  font: var(--ff-weight-ui) var(--ff-size-24) / var(--ff-leading-display) var(--ff-font-ui);
}
.ff-notice__dismiss:active { background: var(--ff-ink); }

.ff-notice__actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  grid-column: 1 / -1;
  gap: var(--ff-touch-gap);
}

@keyframes ff-notice-in {
  from { opacity: 0; transform: translateY(var(--ff-space-16)); }
  to { opacity: 1; transform: none; }
}


/* ---- Veil + Empty / Error block ------------------------------------------
   <div class="ff-veil" data-state="open">
     <div class="ff-block" data-tone="error">
       <p class="ff-block__eyebrow">Course data</p>
       <h2 class="ff-block__title">This hole isn't mapped yet.</h2>
       <p class="ff-block__message">…</p>
       <div class="ff-block__actions"><button class="ff-button ff-button--primary">…</button></div>
     </div>
   </div>
   The veil is opaque ink above everything. The block also stands alone inside
   a surface as an empty state. data-tone: "error" tints only the eyebrow.
   .ff-spinner is the one loading indicator. */

.ff-veil {
  position: fixed;
  inset: 0;
  z-index: var(--ff-z-veil);
  display: grid;
  align-content: center;
  justify-items: center;
  box-sizing: border-box;
  padding:
    calc(var(--ff-space-24) + var(--ff-safe-top))
    calc(var(--ff-space-24) + var(--ff-safe-right))
    calc(var(--ff-space-24) + var(--ff-safe-bottom))
    calc(var(--ff-space-24) + var(--ff-safe-left));
  background: var(--ff-ink);
  color: var(--ff-paper);
  transition:
    opacity var(--ff-dur-exit) var(--ff-ease-exit),
    visibility 0s linear var(--ff-dur-exit);
}

.ff-veil[data-state="closed"] {
  opacity: 0;
  visibility: hidden;
}

.ff-veil--inline { position: static; }

.ff-block {
  --ff-block-tone: var(--ff-text-2);
  display: grid;
  justify-items: start;
  gap: var(--ff-space-12);
  width: 100%;
  max-width: var(--ff-measure);
  color: var(--ff-paper);
  font: var(--ff-weight-ui) var(--ff-size-16) / var(--ff-leading-body) var(--ff-font-ui);
  text-align: left;
}

.ff-block[data-tone="error"] { --ff-block-tone: var(--ff-danger); }
.ff-block[data-tone="warn"] { --ff-block-tone: var(--ff-warn); }

.ff-block__eyebrow {
  margin: 0;
  color: var(--ff-block-tone);
  font: var(--ff-weight-heavy) var(--ff-size-12) / var(--ff-leading-tight) var(--ff-font-ui);
  letter-spacing: var(--ff-tracking-eyebrow);
  text-transform: uppercase;
}

.ff-block__title {
  margin: 0;
  font: var(--ff-weight-display) var(--ff-size-32) / var(--ff-leading-display) var(--ff-font-display);
  letter-spacing: var(--ff-tracking-display);
}

.ff-block__message {
  margin: 0;
  color: var(--ff-text-2);
}

.ff-block__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ff-touch-gap);
  margin-top: var(--ff-space-12);
}

.ff-spinner {
  display: inline-block;
  box-sizing: border-box;
  width: var(--ff-glyph);
  height: var(--ff-glyph);
  border: 3px solid var(--ff-line);
  border-top-color: var(--ff-paper);
  border-radius: var(--ff-radius-pill);
  animation: ff-spin var(--ff-dur-spin) linear infinite;
}

@keyframes ff-spin { to { transform: rotate(360deg); } }


/* ---- Nav group -----------------------------------------------------------
   <nav class="ff-nav-group" aria-label="Hole">
     <button class="ff-nav-group__step" aria-label="Previous hole"><svg class="ff-icon">…</svg></button>
     <button class="ff-nav-group__current" aria-haspopup="dialog">
       <span class="ff-nav-group__label">Hole</span>
       <span class="ff-nav-group__value">7</span>
     </button>
     <button class="ff-nav-group__step" aria-label="Next hole">…</button>
   </nav>
   One scrim pill that floats over the scene. */

.ff-nav-group {
  display: inline-grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--ff-touch-gap);
  box-sizing: border-box;
  padding: var(--ff-space-4);
  border: var(--ff-border) solid var(--ff-line);
  border-radius: var(--ff-radius-pill);
  background: var(--ff-scrim);
  -webkit-backdrop-filter: blur(var(--ff-blur));
  backdrop-filter: blur(var(--ff-blur));
}

.ff-nav-group__step {
  display: inline-grid;
  place-items: center;
  width: var(--ff-touch-min);
  height: var(--ff-touch-min);
  padding: 0;
  border: 0;
  border-radius: var(--ff-radius-pill);
  background: transparent;
  color: var(--ff-paper);
  font: var(--ff-weight-strong) var(--ff-size-20) / var(--ff-leading-display) var(--ff-font-ui);
}

.ff-nav-group__step:active {
  background: var(--ff-surface-raised);
  transform: scale(var(--ff-press-scale));
}

.ff-nav-group__step[disabled],
.ff-nav-group__step[aria-disabled="true"] {
  color: var(--ff-text-3);
  cursor: default;
  pointer-events: none;
}

.ff-nav-group__current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--ff-space-8);
  min-width: var(--ff-touch-primary);
  min-height: var(--ff-touch-min);
  padding: 0 var(--ff-space-12);
  border: 0;
  border-radius: var(--ff-radius-pill);
  background: transparent;
  color: var(--ff-paper);
}

.ff-nav-group__current:active { background: var(--ff-surface-raised); }

.ff-nav-group__label {
  color: var(--ff-text-2);
  font: var(--ff-weight-heavy) var(--ff-size-12) / var(--ff-leading-display) var(--ff-font-ui);
  letter-spacing: var(--ff-tracking-eyebrow);
  text-transform: uppercase;
}

.ff-nav-group__value {
  font: var(--ff-weight-display) var(--ff-size-24) / var(--ff-leading-display) var(--ff-font-display);
  font-variant-numeric: var(--ff-numeric);
  letter-spacing: var(--ff-tracking-heading);
}


/* ---- Marker + connector (SVG) --------------------------------------------
   SVG presentation attributes cannot read var(), so paint comes from here and
   only geometry stays in markup. Position with a wrapper <g transform>.
   <g transform="translate(120 80)">
     <g class="ff-marker" data-state="confirmed" data-selected="true">
       <circle class="ff-marker__select" r="17.5"/>
       <circle class="ff-marker__halo" r="16"/>
       <circle class="ff-marker__disc" r="11"/>
       <text class="ff-marker__label">2</text>
     </g>
   </g>
   data-state: "confirmed" (solid paper disc, ink numeral, ink ring)
               "estimated" (hollow, paper numeral, dashed paper ring)
               "unlocated" (hollow, dotted ring, 60% opacity)
   data-selected="true" (any state): scale 1.12 and a gold ring outside an ink
   ring, so size and the double ring carry selection. Nothing on the map is lime.
   <g class="ff-connector" data-state="estimated">
     <path class="ff-connector__casing" d="…"/><path class="ff-connector__line" d="…"/>
   </g> */

.ff-marker {
  --ff-marker-disc-fill: var(--ff-marker-fill);
  --ff-marker-disc-stroke: var(--ff-marker-ink);
  --ff-marker-disc-dash: none;
  --ff-marker-disc-cap: butt;
  --ff-marker-label-fill: var(--ff-marker-ink);
  --ff-marker-halo-fill: var(--ff-marker-halo);
  --ff-marker-select-stroke: transparent;
  transform-box: fill-box;
  transform-origin: center;
  transition: scale var(--ff-dur-state) var(--ff-ease-enter);
}

.ff-marker[data-state="estimated"] {
  --ff-marker-disc-fill: var(--ff-marker-hollow);
  --ff-marker-disc-stroke: var(--ff-marker-fill);
  --ff-marker-disc-dash: var(--ff-marker-dash);
  --ff-marker-label-fill: var(--ff-marker-fill);
}

.ff-marker[data-state="unlocated"] {
  --ff-marker-disc-fill: var(--ff-marker-hollow);
  --ff-marker-disc-stroke: var(--ff-marker-fill);
  --ff-marker-disc-dash: var(--ff-marker-dot);
  --ff-marker-disc-cap: round;
  --ff-marker-label-fill: var(--ff-marker-fill);
  opacity: var(--ff-marker-unlocated-opacity);
}

.ff-marker[data-selected="true"] {
  --ff-marker-halo-fill: var(--ff-marker-ink);
  --ff-marker-select-stroke: var(--ff-marker-select);
  scale: var(--ff-marker-selected-scale);
}

.ff-marker__halo {
  fill: var(--ff-marker-halo-fill);
  stroke: none;
}

.ff-marker__select {
  fill: none;
  stroke: var(--ff-marker-select-stroke);
  stroke-width: var(--ff-marker-select-width);
}

.ff-marker__disc {
  fill: var(--ff-marker-disc-fill);
  stroke: var(--ff-marker-disc-stroke);
  stroke-width: var(--ff-marker-ring);
  stroke-dasharray: var(--ff-marker-disc-dash);
  stroke-linecap: var(--ff-marker-disc-cap);
}

.ff-marker__label {
  fill: var(--ff-marker-label-fill);
  font: var(--ff-weight-heavy) var(--ff-size-14) / var(--ff-leading-display) var(--ff-font-display);
  font-variant-numeric: var(--ff-numeric);
  text-anchor: middle;
  dominant-baseline: central;
}

.ff-connector { --ff-connector-line-dash: none; }
.ff-connector[data-state="estimated"] { --ff-connector-line-dash: var(--ff-connector-dash); }

.ff-connector__casing {
  fill: none;
  stroke: var(--ff-marker-ink);
  stroke-width: var(--ff-connector-casing-width);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ff-connector__line {
  fill: none;
  stroke: var(--ff-marker-fill);
  stroke-width: var(--ff-connector-width);
  stroke-dasharray: var(--ff-connector-line-dash);
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* ---- Caption -------------------------------------------------------------
   The caddie's one line.
   <p class="ff-caption">
     <span class="ff-caption__text">148 to the front edge, plays 153 uphill</span>
     <span class="ff-caption__tag">≈ estimated</span>      (optional)
   </p>
   One line, truncating. The tag is dashed because dashed means estimated. */

.ff-caption {
  display: flex;
  align-items: center;
  gap: var(--ff-space-8);
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  min-height: var(--ff-touch-min);
  margin: 0;
  padding: var(--ff-space-8) var(--ff-space-8) var(--ff-space-8) var(--ff-space-16);
  border: var(--ff-border) solid var(--ff-line);
  border-radius: var(--ff-radius-pill);
  background: var(--ff-scrim);
  -webkit-backdrop-filter: blur(var(--ff-blur));
  backdrop-filter: blur(var(--ff-blur));
  color: var(--ff-paper);
  font: var(--ff-weight-ui) var(--ff-size-16) / var(--ff-leading-tight) var(--ff-font-ui);
}

.ff-caption__text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ff-caption__tag {
  flex: none;
  padding: var(--ff-space-4) var(--ff-space-8);
  border: var(--ff-border) dashed var(--ff-paper);
  border-radius: var(--ff-radius-pill);
  color: var(--ff-paper);
  font: var(--ff-weight-strong) var(--ff-size-12) / var(--ff-leading-tight) var(--ff-font-ui);
  white-space: nowrap;
}


/* ---- Focus ---------------------------------------------------------------
   One ring for every ff- element: 3px white outside a 2px ink gap, keyboard
   focus only. A selected card keeps its gold ring; the white ring moves outside it. */

[class^="ff-"]:focus-visible,
[class*=" ff-"]:focus-visible {
  outline: var(--ff-focus-width) solid var(--ff-focus);
  outline-offset: var(--ff-focus-offset-local, var(--ff-focus-offset));
  box-shadow: var(--ff-focus-under, var(--ff-focus-gap));
}


/* ---- Reduced motion ------------------------------------------------------
   Scoped to ff- elements: the duration tokens collapse on the element itself,
   so every transition above resolves to instant without a specificity fight.
   Looping animation stops; busy state is still announced by aria-busy. */

@media (prefers-reduced-motion: reduce) {
  [class^="ff-"],
  [class*=" ff-"] {
    --ff-dur-press: 0ms;
    --ff-dur-state: 0ms;
    --ff-dur-enter: 0ms;
    --ff-dur-exit: 0ms;
    --ff-press-scale: 1;
    animation-iteration-count: 1;
  }

  .ff-spinner,
  .ff-button[aria-busy="true"]::before {
    animation-name: none;
  }
}
