/* ════════════════════════════════════════════════════════════════
   Meeting Full — every race, every runner, with accumulator slip.
   /races/meeting/<course>/<date>/full/

   Paper-themed Saturday Edition layout — matches the racecard
   component's cream + ink palette so the runner rows visually
   continue from the rest of the racecard system.

   Layout:
     • Hero (course, date, race count, jump nav)
     • Two-column grid: race sections (left) · sticky bet slip (right)
     • Mobile (≤ 900px): single column, slip becomes a bottom drawer
═══════════════════════════════════════════════════════════════════ */

/* ── Page palette ────────────────────────────────────────────── */
.page-meeting-full {
  --mf-paper:        #FAFAF7;
  --mf-card:         #FFFFFF;
  --mf-card-warm:    #F7F5EE;
  --mf-ink:          #11151F;
  --mf-ink-70:       #41474F;
  --mf-ink-40:       #9CA3AF;
  --mf-rule:         #E7E5DD;
  --mf-rule-strong:  #D6D2C5;
  --mf-gold-ink:     #9C7B12;
  --mf-gold-bright:  #D4AF37;
  --mf-gold-wash:    #FAF1D7;
  --mf-red:          #C0392B;
  --mf-emerald:      #1A7D4A;
  --mf-emerald-soft: rgba(26, 125, 74, 0.08);
}
.page-meeting-full,
.page-meeting-full .site-main {
  background: var(--mf-paper);
  color: var(--mf-ink);
}

.mf-wrap {
  max-width: 1520px;
  margin: 0 auto;
  padding: 24px 20px 200px;   /* extra bottom so mobile drawer never clips */
  font-family: var(--font-body, 'DM Sans', system-ui, sans-serif);
}

/* ── Hero ──────────────────────────────────────────────────────── */
.mf-hero {
  padding: 16px 0 18px;
  border-bottom: 1px solid var(--mf-rule-strong);
  margin-bottom: 22px;
  position: relative;
}
.mf-hero::after {
  /* gold accent strip — same Saturday Edition treatment as /races/ */
  content: '';
  position: absolute;
  left: 0; bottom: -1px;
  width: 96px; height: 2px;
  background: var(--mf-gold-bright);
}

.mf-hero__crumbs {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--mf-ink-40);
  margin-bottom: 10px;
}
.mf-hero__crumbs a {
  color: var(--mf-gold-ink);
  font-weight: 700;
  text-decoration: none;
}
.mf-hero__crumbs a:hover { text-decoration: underline; }

.mf-hero__title {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: clamp(28px, 4vw, 44px);
  margin: 0 0 6px;
  color: var(--mf-ink);
  letter-spacing: -0.01em;
}
.mf-hero__sub {
  margin: 0;
  font-size: 14px;
  color: var(--mf-ink-70);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.mf-hero__sub strong {
  color: var(--mf-ink);
  font-variant-numeric: tabular-nums;
}
.mf-dot { color: var(--mf-rule-strong); }

/* Quick race-jump chip nav — becomes sticky once the user scrolls past
   the hero so it's always reachable while they're deep in a long meeting. */
.mf-jump {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 14px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--mf-paper);
  padding: 10px 0;
  margin-bottom: -10px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.mf-jump.is-stuck {
  border-bottom-color: var(--mf-rule);
  box-shadow: 0 2px 10px -6px rgba(0, 0, 0, 0.10);
}
.mf-jump__chip {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  background: var(--mf-card);
  border: 1px solid var(--mf-rule);
  border-radius: 6px;
  text-decoration: none;
  color: var(--mf-ink-70);
  font-size: 12px;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.mf-jump__chip:hover {
  border-color: var(--mf-gold-ink);
  background: var(--mf-gold-wash);
  color: var(--mf-ink);
}
.mf-jump__chip--featured {
  border-color: var(--mf-gold-bright);
  background: var(--mf-gold-wash);
  color: var(--mf-gold-ink);
}
.mf-jump__chip--done {
  opacity: 0.62;
  background: var(--mf-card-warm);
}
.mf-jump__chip--next {
  border-color: var(--mf-emerald);
  background: var(--mf-emerald-soft);
  color: var(--mf-emerald);
}
.mf-jump__chip.is-active {
  background: var(--mf-ink);
  color: var(--mf-card);
  border-color: var(--mf-ink);
}
.mf-jump__chip.is-active .mf-jump__time,
.mf-jump__chip.is-active .mf-jump__count {
  color: inherit;
  background: rgba(255, 255, 255, 0.18);
}
.mf-jump__time { font-weight: 700; color: var(--mf-ink); font-variant-numeric: tabular-nums; }
.mf-jump__count {
  font-size: 10px;
  color: var(--mf-ink-40);
  background: var(--mf-rule);
  padding: 1px 5px;
  border-radius: 3px;
  font-variant-numeric: tabular-nums;
}
.mf-jump__status {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
}
.mf-jump__status--done {
  width: auto; height: auto;
  font-size: 10px;
  color: var(--mf-emerald);
  font-weight: 800;
}
.mf-jump__status--next {
  background: var(--mf-emerald);
  box-shadow: 0 0 6px rgba(26, 125, 74, 0.55);
  animation: mf-jump-pulse 1.6s ease-in-out infinite;
}
@keyframes mf-jump-pulse {
  0%, 100% { opacity: 1;    transform: scale(1);    }
  50%      { opacity: 0.45; transform: scale(1.35); }
}

/* ── Next-off live strip ─────────────────────────────────────── */
.mf-next-off {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin: 12px 0 20px;
  background: linear-gradient(90deg, var(--mf-emerald-soft), var(--mf-card) 70%);
  border: 1px solid var(--mf-emerald);
  border-radius: 8px;
  font-size: 13px;
}
.mf-next-off__pulse {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--mf-emerald);
  box-shadow: 0 0 8px rgba(26, 125, 74, 0.65);
  animation: mf-jump-pulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
.mf-next-off__kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mf-emerald);
}
.mf-next-off__race {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  color: var(--mf-ink);
}
.mf-next-off__time {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-weight: 700;
  font-size: 18px;
  color: var(--mf-ink);
  font-variant-numeric: tabular-nums;
}
.mf-next-off__name {
  font-weight: 600;
  color: var(--mf-ink-70);
}
.mf-next-off__race:hover .mf-next-off__name { color: var(--mf-emerald); }
.mf-next-off__count {
  font-size: 11.5px;
  color: var(--mf-ink-40);
  font-feature-settings: 'tnum';
}
.mf-next-off__countdown {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--mf-ink);
  color: var(--mf-card);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-feature-settings: 'tnum';
}

/* ── Main grid ─────────────────────────────────────────────────── */
/* When the slip is empty AND collapsed, the grid auto-shrinks the
   aside column to a thin handle so the racecard gets the full wrapper.
   Uses :has() so we don't need to babysit a class on the grid in JS. */
.mf-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}
.mf-grid:has(.mf-slip.is-empty:not(.is-open)) {
  grid-template-columns: minmax(0, 1fr) 52px;
}
@media (max-width: 1024px) {
  .mf-grid { grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; }
  .mf-grid:has(.mf-slip.is-empty:not(.is-open)) {
    grid-template-columns: minmax(0, 1fr) 52px;
  }
}
@media (max-width: 900px) {
  .mf-grid { grid-template-columns: 1fr; gap: 0; }
  .mf-grid:has(.mf-slip.is-empty:not(.is-open)) {
    grid-template-columns: 1fr;
  }
}

/* ── Race section ──────────────────────────────────────────────── */
.mf-races { min-width: 0; } /* prevent grid blow-out */

.mf-race {
  margin-bottom: 24px;
  padding: 14px 16px 4px;
  background: var(--mf-card);
  border: 1px solid var(--mf-rule);
  border-radius: 10px;
  scroll-margin-top: 80px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: border-color 0.18s;
}
.mf-race--featured {
  border-color: var(--mf-gold-bright);
  background: linear-gradient(180deg, var(--mf-gold-wash), var(--mf-card) 60%);
}
.mf-race--has-selection {
  border-color: var(--mf-emerald);
  box-shadow: 0 0 0 1px var(--mf-emerald-soft) inset, 0 1px 2px rgba(0, 0, 0, 0.03);
}
.mf-race--resulted { background: var(--mf-card-warm); }

/* Compact one-line race header — time + name (with tags) + meta + CTA.
   Two rows on narrow viewports via flex-wrap; one row on desktop. */
.mf-race__head {
  display: flex;
  align-items: baseline;
  gap: 10px 14px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--mf-rule);
}
.mf-race__time {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--mf-gold-ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.mf-race--featured .mf-race__time { color: var(--mf-red); }
.mf-race--next     .mf-race__time { color: var(--mf-emerald); }

.mf-race__name {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  color: var(--mf-ink);
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  letter-spacing: -0.01em;
  flex: 1 1 auto;
  min-width: 0;
}
.mf-race__tag {
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  position: relative;
  top: -1px;
}
.mf-race__tag--gold {
  color: var(--mf-card);
  background: var(--mf-red);
}
.mf-race__tag--green {
  color: var(--mf-emerald);
  background: var(--mf-emerald-soft);
  border: 1px solid rgba(26, 125, 74, 0.40);
}
.mf-race__tag--next {
  color: var(--mf-card);
  background: var(--mf-emerald);
}

.mf-race__meta {
  font-size: 12px;
  color: var(--mf-ink-70);
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.mf-race__class {
  font-size: 9.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--mf-ink-40);
  font-weight: 800;
  padding: 2px 6px;
  border: 1px solid var(--mf-rule);
  border-radius: 3px;
  margin-right: 2px;
}
.mf-gold  { color: var(--mf-gold-ink); font-weight: 600; }
.mf-green { color: var(--mf-emerald); font-weight: 700; font-style: italic; }

.mf-race__cta {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--mf-ink-70);
  text-decoration: none;
  white-space: nowrap;
  padding: 5px 10px;
  border: 1px solid var(--mf-rule-strong);
  border-radius: 5px;
  flex-shrink: 0;
  margin-left: auto;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.mf-race__cta:hover {
  background: var(--mf-gold-wash);
  border-color: var(--mf-gold-bright);
  color: var(--mf-gold-ink);
}

/* ── Reveal pill — hides the winner behind a click. Two faces
   driven by aria-pressed (same pattern as meetings_browse).
   Hidden: small dashed emerald pill "👁 Reveal winner".
   Revealed: full emerald band with trophy + name + SP + jockey,
             collapsible again by clicking the pill. */
.mf-result-pill {
  display: inline-flex;
  align-items: center;
  margin: 0 -4px 10px;
  padding: 0;
  background: transparent;
  border: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  width: 100%;
  border-radius: 6px;
  transition: background 0.15s, box-shadow 0.15s;
}
.mf-result-pill:focus-visible {
  outline: 2px solid var(--mf-emerald);
  outline-offset: 2px;
}

/* Each "face" wraps the children for a state. CSS shows whichever
   matches the current aria-pressed value. */
.mf-result-pill__face {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Hidden state — small dashed pill, gentle hover lift. */
.mf-result-pill[aria-pressed="false"] {
  width: auto;
  padding: 6px 14px;
  border: 1px dashed rgba(26, 125, 74, 0.55);
  color: var(--mf-emerald);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 999px;
  background: transparent;
  margin-left: 4px;
}
.mf-result-pill[aria-pressed="false"]:hover {
  background: var(--mf-emerald-soft);
  border-color: var(--mf-emerald);
}
.mf-result-pill[aria-pressed="false"] .mf-result-pill__face--revealed { display: none; }
.mf-result-pill__eye {
  font-size: 13px;
  line-height: 1;
}

/* Revealed state — full emerald band, click again to collapse. */
.mf-result-pill[aria-pressed="true"] {
  padding: 10px 14px;
  background: linear-gradient(90deg, var(--mf-emerald-soft), transparent 70%);
  border-left: 3px solid var(--mf-emerald);
  border-radius: 0 6px 6px 0;
}
.mf-result-pill[aria-pressed="true"]:hover {
  background: linear-gradient(90deg, rgba(26, 125, 74, 0.14), transparent 70%);
}
.mf-result-pill[aria-pressed="true"] .mf-result-pill__face--hidden { display: none; }

.mf-result-pill__trophy { font-size: 20px; line-height: 1; }
.mf-result-pill__block {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.mf-result-pill__lbl {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mf-emerald);
  font-weight: 800;
}
.mf-result-pill__name {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--mf-ink);
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.mf-result-pill__sp {
  font-weight: 800;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--mf-gold-ink);
  padding: 2px 9px;
  background: var(--mf-gold-wash);
  border: 1px solid var(--mf-gold-bright);
  border-radius: 4px;
}
.mf-result-pill__jockey {
  font-size: 11.5px;
  font-style: italic;
  color: var(--mf-ink-70);
  margin-left: auto;
}

/* The runner list inside is rendered by the racecard component
   (slip-mode, density compact) — see racecard.css. The .racecard
   element drops its own page-paper padding here so spacing is owned
   entirely by .mf-race. */
.mf-race .racecard {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.mf-empty {
  text-align: center;
  font-size: 13px;
  color: var(--mf-ink-40);
  padding: 16px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ════════════════════════════════════════════════════════════════
   BET SLIP — paper-themed sticky panel (desktop) / bottom drawer (mobile)
═══════════════════════════════════════════════════════════════════ */
.mf-slip {
  position: sticky;
  top: 80px;
  align-self: start;
  background: var(--mf-card);
  border: 1px solid var(--mf-gold-bright);
  border-radius: 10px;
  padding: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}
/* Desktop: handle only shows when slip is empty + collapsed (rotated vertical pill).
   When user adds an item, JS removes .is-empty and the body expands; the handle hides.
   Mobile: handle always visible at the top of the bottom-anchored drawer. */
.mf-slip__handle { display: none; }
.mf-slip.is-empty:not(.is-open) {
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}
.mf-slip.is-empty:not(.is-open) .mf-slip__body { display: none; }
.mf-slip.is-empty:not(.is-open) .mf-slip__handle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 48px;
  padding: 14px 8px;
  background: var(--mf-card);
  border: 1px solid var(--mf-gold-bright);
  border-radius: 8px;
  cursor: pointer;
  color: var(--mf-gold-ink);
  font: inherit;
  text-align: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);   /* vertical-rl reads top-to-bottom; this flips it bottom-to-top */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: border-color 0.15s, background 0.15s;
}
.mf-slip.is-empty:not(.is-open) .mf-slip__handle:hover {
  border-color: var(--mf-gold-ink);
  background: var(--mf-gold-wash);
}
.mf-slip.is-empty:not(.is-open) .mf-slip__handle-icon {
  font-size: 16px;
  transform: rotate(-180deg);  /* keep emoji upright in the rotated handle */
}
.mf-slip.is-empty:not(.is-open) .mf-slip__handle-text {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.mf-slip.is-empty:not(.is-open) .mf-slip__handle-count,
.mf-slip.is-empty:not(.is-open) .mf-slip__handle-chevron { display: none; }

.mf-slip__head {
  padding: 14px 14px 4px;
  background: linear-gradient(180deg, var(--mf-gold-wash), var(--mf-card) 80%);
}
.mf-slip__head-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.mf-slip__title {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 16px;
  margin: 0;
  color: var(--mf-ink);
  font-weight: 700;
}
.mf-slip__type {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--mf-gold-wash);
  color: var(--mf-gold-ink);
  border: 1px solid var(--mf-gold-bright);
}
.mf-slip.is-empty .mf-slip__type {
  background: var(--mf-rule);
  color: var(--mf-ink-40);
  border-color: var(--mf-rule-strong);
}
.mf-slip__hint {
  font-size: 12px;
  color: var(--mf-ink-70);
  margin: 8px 0 14px;
  line-height: 1.5;
}
.mf-slip__hint strong { color: var(--mf-gold-ink); }

.mf-slip__legs {
  list-style: none; margin: 0; padding: 6px 8px;
  max-height: 320px; overflow-y: auto;
}
.mf-slip__leg {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 4px;
  background: var(--mf-card-warm);
  border: 1px solid var(--mf-rule);
}
.mf-slip__leg-where {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mf-ink-40);
  display: flex; gap: 6px; align-items: baseline;
  font-weight: 700;
}
.mf-slip__leg-time {
  color: var(--mf-gold-ink);
}
.mf-slip__leg-horse {
  font-weight: 700;
  font-size: 13px;
  color: var(--mf-ink);
  margin-top: 2px;
}
.mf-slip__leg-odds {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--mf-ink);
  padding: 3px 8px;
  background: var(--mf-card);
  border: 1px solid var(--mf-gold-bright);
  border-radius: 4px;
  white-space: nowrap;
}
.mf-slip__leg-remove {
  width: 26px; height: 26px;
  background: transparent;
  border: 1px solid var(--mf-rule-strong);
  border-radius: 4px;
  color: var(--mf-ink-40);
  font-size: 16px; line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.mf-slip__leg-remove:hover {
  background: rgba(192, 57, 43, 0.10);
  border-color: rgba(192, 57, 43, 0.40);
  color: var(--mf-red);
}

/* Unpriced leg — visually softer, dashed odds chip + tiny note. */
.mf-slip__leg--unpriced {
  background: var(--mf-card);
  border-style: dashed;
}
.mf-slip__leg--unpriced .mf-slip__leg-odds {
  background: transparent;
  border: 1px dashed var(--mf-rule-strong);
  color: var(--mf-ink-40);
}
.mf-slip__leg-note {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mf-gold-ink);
  font-weight: 700;
  margin-top: 3px;
}

/* "X legs awaiting price" badge in the cumulative row. */
.mf-slip__totals-pending {
  font-size: 11.5px;
  color: var(--mf-ink-40);
  font-style: italic;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.mf-slip__totals {
  margin: 8px 14px 4px;
  padding-top: 12px;
  border-top: 1px solid var(--mf-rule);
}
.mf-slip__totals-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 10px;
  font-size: 12px;
  margin-bottom: 6px;
  color: var(--mf-ink-70);
}
.mf-slip__totals-row strong {
  color: var(--mf-ink);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.mf-slip__totals-row--big strong {
  font-size: 18px;
  color: var(--mf-gold-ink);
}

.mf-slip__currency {
  display: flex; gap: 4px;
  margin: 12px 0 6px;
  background: var(--mf-rule);
  padding: 3px;
  border-radius: 5px;
}
.mf-slip__cur {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--mf-ink-40);
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.15s, color 0.15s;
}
.mf-slip__cur.is-active {
  background: var(--mf-card);
  color: var(--mf-gold-ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.mf-slip__stake-label {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--mf-ink-40);
  font-weight: 700;
  margin: 8px 0 4px;
}
.mf-slip__stake-wrap {
  display: flex; align-items: stretch;
  background: var(--mf-card);
  border: 1px solid var(--mf-rule-strong);
  border-radius: 5px;
  overflow: hidden;
}
.mf-slip__cur-sym {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px;
  font-weight: 700;
  color: var(--mf-gold-ink);
  background: var(--mf-card-warm);
  border-right: 1px solid var(--mf-rule);
}
.mf-slip__stake {
  flex: 1; min-width: 0;
  background: transparent;
  border: 0;
  padding: 8px 10px;
  color: var(--mf-ink);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.mf-slip__stake:focus { outline: none; }

/* ── Submit picks button — the primary CTA on the slip. ────────
   Sits ABOVE the Copy / Reset row so it's the obvious action when
   the cub has finished selecting horses. Disabled until the slip
   has at least one leg; carries a count badge so the cub sees how
   many votes they're about to submit. */
.mf-slip__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(100% - 28px);
  margin: 12px 14px 6px;
  padding: 12px 16px;
  background: var(--mf-gold-bright);
  color: var(--mf-ink);
  border: 1px solid var(--mf-gold-bright);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05),
              0 8px 16px -8px rgba(212, 175, 55, 0.40);
  transition: background 0.14s, transform 0.14s, box-shadow 0.14s, opacity 0.14s;
}
.mf-slip__submit:hover  { transform: translateY(-1px); filter: brightness(1.04); }
.mf-slip__submit:active { transform: translateY(0); }
.mf-slip__submit:disabled,
.mf-slip__submit.is-loading {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.mf-slip__submit.is-loading .mf-slip__submit-text::after {
  content: '';
  display: inline-block;
  width: 12px; height: 12px;
  margin-left: 8px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: middle;
  animation: mf-slip-spin 0.8s linear infinite;
}
@keyframes mf-slip-spin { to { transform: rotate(360deg); } }

.mf-slip__submit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--mf-ink);
  color: var(--mf-card);
  font-size: 10px;
  font-weight: 900;
}
.mf-slip__submit-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 99px;
  background: var(--mf-ink);
  color: var(--mf-gold-bright);
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.mf-slip__submit--guest {
  background: var(--mf-card-warm);
  color: var(--mf-ink-70);
  border: 1px dashed var(--mf-rule-strong);
  box-shadow: none;
}
.mf-slip__submit--guest:hover { background: var(--mf-gold-wash); color: var(--mf-gold-ink); }

.mf-slip__submit-feedback {
  margin: 0 14px 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
  background: var(--mf-card-warm);
  border: 1px solid var(--mf-rule);
  color: var(--mf-ink-70);
}
.mf-slip__submit-feedback.is-success {
  background: var(--mf-emerald-soft);
  border-color: rgba(26, 125, 74, 0.40);
  color: var(--mf-emerald);
  font-weight: 700;
}
.mf-slip__submit-feedback.is-partial {
  background: var(--mf-gold-wash);
  border-color: var(--mf-gold-bright);
  color: var(--mf-gold-ink);
}
.mf-slip__submit-feedback.is-error {
  background: rgba(192, 57, 43, 0.08);
  border-color: rgba(192, 57, 43, 0.40);
  color: var(--mf-red);
}

.mf-slip__actions {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 14px;
}
.mf-slip__action {
  background: var(--mf-ink);
  color: var(--mf-card);
  border: 1px solid var(--mf-ink);
  border-radius: 5px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.18s, transform 0.08s, box-shadow 0.18s;
}
.mf-slip__action:hover:not(:disabled) {
  background: #2a2f3d;
  box-shadow: 0 3px 10px rgba(17, 21, 31, 0.20);
  transform: translateY(-1px);
}
.mf-slip__action:disabled { opacity: 0.35; cursor: not-allowed; }
.mf-slip__action--ghost {
  background: transparent;
  color: var(--mf-ink-70);
  border: 1px solid var(--mf-rule-strong);
}
.mf-slip__action--ghost:hover:not(:disabled) {
  background: rgba(192, 57, 43, 0.06);
  border-color: rgba(192, 57, 43, 0.40);
  color: var(--mf-red);
  box-shadow: none;
}

.mf-slip__copied {
  margin: 0 14px 4px;
  font-size: 12px;
  color: var(--mf-emerald);
  font-weight: 700;
  text-align: center;
}

/* ── Undo banner ───────────────────────────────────────────────── */
.mf-slip__undo {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  margin: 10px 14px 0;
  padding: 10px 14px;
  background: var(--mf-gold-wash);
  border: 1px solid var(--mf-gold-bright);
  border-radius: 6px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  transition: max-height 0.25s ease, opacity 0.25s ease,
              padding 0.25s ease, border-width 0.25s ease;
}
.mf-slip__undo.is-visible {
  max-height: 80px;
  opacity: 1;
  padding-top: 10px;
  padding-bottom: 10px;
  border-width: 1px;
}
.mf-slip__undo-text {
  flex: 1;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--mf-ink);
}
.mf-slip__undo-btn {
  background: var(--mf-ink);
  border: 1px solid var(--mf-ink);
  color: var(--mf-card);
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, transform 0.08s;
}
.mf-slip__undo-btn:hover { background: #2a2f3d; transform: translateY(-1px); }
.mf-slip__undo-btn:active { transform: translateY(0); }
.mf-slip__undo-bar {
  position: absolute;
  left: 0; bottom: 0; height: 2px;
  width: 100%;
  background: linear-gradient(90deg, var(--mf-gold-bright), rgba(212,175,55,0.30));
  transform-origin: left center;
  transform: scaleX(1);
}
.mf-slip__undo.is-visible .mf-slip__undo-bar {
  animation: mf-undo-drain 6s linear forwards;
}
@keyframes mf-undo-drain {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

.mf-slip__foot {
  margin: 0; padding: 8px 14px 14px;
  font-size: 10.5px;
  color: var(--mf-ink-40);
  text-align: center;
  line-height: 1.5;
}

/* ── Mobile drawer ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .mf-slip {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    top: auto;
    border-radius: 12px 12px 0 0;
    border: 1px solid var(--mf-gold-bright);
    border-bottom: 0;
    z-index: 100;
    background: var(--mf-card);
    max-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.10);
  }
  .mf-slip__handle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: linear-gradient(180deg, var(--mf-gold-wash), var(--mf-card) 80%);
    border: 0;
    padding: 12px 16px;
    color: var(--mf-ink);
    cursor: pointer;
    font: inherit;
    text-align: left;
  }
  .mf-slip__handle-icon { font-size: 18px; }
  .mf-slip__handle-text { flex: 1; font-weight: 700; }
  .mf-slip__handle-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 22px;
    background: var(--mf-rule);
    color: var(--mf-ink-70);
    border-radius: 11px;
    font-size: 12px;
    padding: 0 7px;
    margin-left: 6px;
    font-variant-numeric: tabular-nums;
  }
  .mf-slip__handle-count.is-positive {
    background: var(--mf-gold-bright);
    color: var(--mf-ink);
  }
  .mf-slip__handle-chevron {
    transition: transform 0.2s;
    color: var(--mf-ink-40);
  }
  .mf-slip.is-open .mf-slip__handle-chevron { transform: rotate(180deg); }

  .mf-slip__body {
    display: none;
    overflow-y: auto;
    border-top: 1px solid var(--mf-rule);
  }
  .mf-slip.is-open .mf-slip__body { display: block; }

  .mf-slip__legs { max-height: none; }
}

/* ── Toast ─────────────────────────────────────────────────────── */
.mf-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--mf-ink);
  color: var(--mf-card);
  border: 1px solid var(--mf-ink);
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.20);
}
.mf-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@media (max-width: 900px) {
  .mf-toast { bottom: 96px; }
}

/* ════════════════════════════════════════════════════════════════
   NAVIGATION REFRESH — switcher bar + enriched hero chips + paddles
═══════════════════════════════════════════════════════════════════ */

/* ── Top switcher bar ─────────────────────────────────────────── */
.mf-switcher {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  margin: -8px 0 18px;
  border-bottom: 1px solid var(--mf-rule);
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--mf-paper);
}
.mf-switcher__home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--mf-gold-ink);
  text-decoration: none;
  padding: 7px 12px;
  border: 1px solid var(--mf-rule-strong);
  border-radius: 999px;
  background: var(--mf-card);
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}
.mf-switcher__home:hover {
  background: var(--mf-gold-wash);
  border-color: var(--mf-gold-bright);
}
.mf-switcher__list {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  min-width: 0;
  flex: 1;
  /* Hide scrollbar — chips are obviously scrollable horizontally. */
  scrollbar-width: thin;
  scrollbar-color: var(--mf-rule-strong) transparent;
  padding-bottom: 2px;
}
.mf-switcher__list::-webkit-scrollbar { height: 6px; }
.mf-switcher__list::-webkit-scrollbar-thumb {
  background: var(--mf-rule-strong);
  border-radius: 3px;
}
.mf-switcher__chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  background: var(--mf-card);
  border: 1px solid var(--mf-rule);
  border-radius: 999px;
  text-decoration: none;
  color: var(--mf-ink-70);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.14s, border-color 0.14s, color 0.14s, transform 0.14s;
}
.mf-switcher__chip:hover {
  background: var(--mf-gold-wash);
  border-color: var(--mf-gold-bright);
  color: var(--mf-gold-ink);
  transform: translateY(-1px);
}
.mf-switcher__chip--current {
  background: var(--mf-ink);
  border-color: var(--mf-ink);
  color: var(--mf-card);
  cursor: default;
}
.mf-switcher__chip--current:hover {
  background: var(--mf-ink);
  transform: none;
  color: var(--mf-card);
}
.mf-switcher__course { font-weight: 700; }
.mf-switcher__count {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--mf-ink-40);
  font-variant-numeric: tabular-nums;
}
.mf-switcher__chip--current .mf-switcher__count {
  background: rgba(255, 255, 255, 0.20);
  color: var(--mf-card);
}
.mf-switcher__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--mf-gold-bright);
  box-shadow: 0 0 6px rgba(212, 175, 55, 0.55);
}

/* ── Enriched hero — chip row ──────────────────────────────── */
.mf-hero__mins {
  color: var(--mf-emerald);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.mf-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.mf-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--mf-card);
  border: 1px solid var(--mf-rule);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--mf-ink-70);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.mf-chip__lbl {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mf-ink-40);
}
.mf-chip__val {
  color: var(--mf-ink);
  font-weight: 700;
}
.mf-chip--going .mf-chip__val { color: var(--mf-emerald); }
.mf-chip--type {
  padding: 4px 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 10.5px;
  font-weight: 800;
}
.mf-chip--type-flat  { background: var(--mf-gold-wash); border-color: var(--mf-gold-bright); color: var(--mf-gold-ink); }
.mf-chip--type-aw    { background: #ece9f8;             border-color: #b7b0e1;             color: #4a3da3; }
.mf-chip--type-jumps { background: var(--mf-emerald-soft); border-color: rgba(26, 125, 74, 0.40); color: var(--mf-emerald); }
.mf-chip--type-dual  { background: linear-gradient(90deg, var(--mf-gold-wash), var(--mf-emerald-soft));
                       border-color: var(--mf-gold-bright); color: var(--mf-ink); }
.mf-chip--hand,
.mf-chip--shape {
  font-size: 11px;
  color: var(--mf-ink-70);
}
.mf-chip--headline {
  background: var(--mf-gold-wash);
  border-color: var(--mf-gold-bright);
  color: var(--mf-gold-ink);
}
.mf-chip--headline:hover {
  background: var(--mf-card);
  border-color: var(--mf-gold-ink);
}
.mf-chip__star { color: var(--mf-gold-bright); font-size: 13px; }

/* ── Bottom prev/next paddles ─────────────────────────────── */
.mf-paddles {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  margin: 28px 0 8px;
  padding-top: 22px;
  border-top: 1px solid var(--mf-rule);
}
.mf-paddle {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--mf-card);
  border: 1px solid var(--mf-rule);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  min-width: 0;
}
.mf-paddle:hover {
  border-color: var(--mf-gold-bright);
  background: var(--mf-gold-wash);
  transform: translateY(-2px);
}
.mf-paddle--prev { text-align: left; }
.mf-paddle--next { text-align: right; }
.mf-paddle--next .mf-paddle__body { margin-left: auto; }
.mf-paddle__arrow {
  font-size: 22px;
  color: var(--mf-gold-ink);
  flex-shrink: 0;
}
.mf-paddle__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.mf-paddle__lbl {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mf-ink-40);
}
.mf-paddle__course {
  font-family: var(--font-display, 'Playfair Display', Georgia, serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--mf-ink);
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mf-paddle__sub {
  font-size: 11.5px;
  color: var(--mf-ink-70);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mf-paddle--home {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--mf-card-warm);
  border-style: dashed;
}
.mf-paddle--home:hover {
  background: var(--mf-gold-wash);
  border-style: solid;
}
.mf-paddle__home-cta {
  font-size: 13px;
  font-weight: 800;
  color: var(--mf-gold-ink);
}

@media (max-width: 720px) {
  .mf-paddles { grid-template-columns: 1fr; }
  .mf-paddle--next { text-align: left; }
  .mf-paddle--next .mf-paddle__body { margin-left: 0; }
}
