/* =====================================================================
   Superfans - design system (T7, 31/10/2026)
   "Claymation con floor": a bright daytime convention built from the
   clay art. Warm carpet neutrals, cream clay panels with soft shadows,
   lanyard player badges, clay hall signs, velvet-rope queues.

   Living reference: design/components.html and design/mockups.html.

   Conventions
   - Prefix every class with `sf-`. Block `sf-hall`, element `sf-hall__art`,
     modifier `sf-hall--entrance`. State classes are `is-*` (is-legal,
     is-illegal, is-dimmed, is-selected, is-active, is-armed, is-passed).
   - Change token values in media queries; do not restyle components there.
   - Everything inside the board is sized in `cqw` of the board container,
     so the board scales as one picture at every screen size.
   - T14 adds game-specific CSS in clearly marked sections at the END of
     this file ("T14 additions"), never by editing the tokens in place.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Lilita+One&family=Nunito:ital,wght@0,500;0,700;0,800;0,900;1,600&display=swap');

/* ---------------------------------------------------------------------
   1. Tokens
   --------------------------------------------------------------------- */
:root {
  /* Ink and clay paper (warm, never pure black or white) */
  --ink:          #2a1f17;
  --ink-soft:     #5b4a3c;
  --ink-muted:    #8c7a68;
  --paper:        #fffaf1;
  --paper-2:      #fbf0de;
  --paper-3:      #f2e1c4;
  --line:         #e3cfae;
  --line-strong:  #c9ae84;

  /* Convention carpet (page background) and the hall floor (board plate) */
  --carpet:       #ecdcc0;
  --carpet-dot:   #dfc8a0;
  --carpet-fleck: #f6ead6;
  --floor:        #d8cfc1;
  --floor-dark:   #b8ab97;
  --floor-edge:   #9c8d77;
  --queue-bed:    #33466f;   /* navy carpet strip each queue stands on */
  --queue-bed-2:  #2a3b5f;
  --slot-empty:   rgba(255, 255, 255, 0.10);

  /* Velvet rope and brass stanchions */
  --rope:         #c22a43;
  --rope-dark:    #7f1528;
  --brass:        #e2ad41;
  --brass-dark:   #9d6c18;

  /* Zone accents: one hue per UI zone. The players zone stays neutral -
     the five player colours live there and must not fight a sixth hue. */
  --zone-players: #8c7a68;   /* neutral clay   - who is who            */
  --zone-act:     #2f6be3;   /* lanyard blue   - where you act         */
  --zone-act-2:   #1f4fb4;
  --zone-act-ink: #ffffff;
  --zone-star:    #7b4fd6;   /* stage purple   - celebrities, the Hour */
  --zone-swag:    #e0457f;   /* merch pink     - swag market           */
  --zone-goal:    #e3a21a;   /* trophy gold    - achievements, VP      */
  --zone-pass:    #1f9d8b;   /* rest teal      - passing, the ladder   */

  /* Celebrity colours (figure disc, destination chair, selfies). Always
     paired with a symbol so colour is never the only cue:
     green = thumbs-up, red = heart, orange = star. */
  --celeb-green:      #2fa84f;
  --celeb-green-soft: #d8f2dc;
  --celeb-red:        #e0435e;
  --celeb-red-soft:   #fadbe1;
  --celeb-orange:     #f28a1b;
  --celeb-orange-soft:#fde5c8;

  /* Player colours. Meeple art: assets/tokens/crew-<id>.webp (manifest
     playerColours). These are the UI chrome values (straps, discs, rings),
     tuned to read on cream and on the navy queue bed. Defaults by seat:
     blue, yellow, pink, green, red. */
  --p-blue:       #4c7cf3;
  --p-blue-ink:   #ffffff;
  --p-blue-tint:  #dfe8ff;
  --p-yellow:     #f4c51a;
  --p-yellow-ink: #3a2c00;
  --p-yellow-tint:#fff3c2;
  --p-pink:       #df4fc6;
  --p-pink-ink:   #ffffff;
  --p-pink-tint:  #fbdcf5;
  --p-green:      #2c9e4a;
  --p-green-ink:  #ffffff;
  --p-green-tint: #d9f1df;
  --p-red:        #e1382f;
  --p-red-ink:    #ffffff;
  --p-red-tint:   #fddad7;

  /* Highlight: hi-vis lime - the clay art never uses it (its greens are
     deep and its yellows warm), so a lit target can't be mistaken for art. */
  --hi:           #c8ff24;
  --hi-ink:       #1d2b00;
  --hi-edge:      #6b9a00;
  --hi-glow:      rgba(200, 255, 36, 0.65);
  --hi-soft:      rgba(200, 255, 36, 0.22);
  --bad:          #d63b32;
  --bad-soft:     #fde1de;
  --good:         #2c9e4a;

  /* Coffee */
  --coffee:       #7a4a2b;
  --coffee-2:     #a8673a;
  --crema:        #e9c99c;
  --dial-empty:   #efe2cd;

  /* Typography */
  --font-display: 'Lilita One', 'Arial Rounded MT Bold', 'Trebuchet MS', sans-serif;
  --font-ui:      'Nunito', 'Segoe UI', system-ui, sans-serif;
  --fs-xs:   12px;
  --fs-sm:   14px;
  --fs-md:   16px;
  --fs-lg:   20px;
  --fs-xl:   28px;
  --fs-xxl:  40px;
  --fs-hero: clamp(36px, 5vw, 72px);

  /* Radii: clay is soft - nothing has a sharp corner */
  --r-xs:   6px;
  --r-sm:   10px;
  --r-md:   16px;
  --r-lg:   24px;
  --r-pill: 999px;

  /* Clay shadows: a short hard drop (thickness) + a long soft one (lift),
     plus an inner highlight on top and a shade at the bottom edge. */
  --clay-drop:   0 3px 0 rgba(110, 70, 30, 0.18), 0 12px 26px -10px rgba(110, 70, 30, 0.45);
  --clay-lift:   0 5px 0 rgba(110, 70, 30, 0.16), 0 22px 40px -14px rgba(110, 70, 30, 0.55);
  --clay-inset:  inset 0 2px 0 rgba(255, 255, 255, 0.7), inset 0 -3px 0 rgba(110, 70, 30, 0.12);
  --clay-press:  inset 0 3px 6px rgba(110, 70, 30, 0.25);
  --piece-shadow: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.35)) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.25));

  /* Spacing */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;

  /* Layout (desktop >1400px). --board-size is the square board edge. */
  --topbar-h:   64px;
  --gutter:     16px;
  --side-l:     350px;   /* players (lanyards) */
  --side-r-min: 470px;   /* this Hour, actions, market */
  --players-h:  0px;     /* horizontal players strip; desktop has none */
  --board-size: min(
                  calc(100vh - var(--topbar-h) - var(--players-h) - 2 * var(--gutter)),
                  calc(100vw - var(--side-l) - var(--side-r-min) - 4 * var(--gutter)));

  /* Component sizes (stepped down by breakpoint) */
  --dial:        92px;
  --selfie:      36px;
  --card-sm:     74px;   /* market, hand, schedule */
  --card-md:     128px;  /* this Hour celebrity, hand on hover */
  --card-lg:     220px;  /* modal / zoom */
  --action-h:    64px;
  --medallion:   44px;

  /* Motion */
  --t-fast:   140ms;
  --t-med:    280ms;
  --t-slow:   600ms;
  --t-step:   700ms;     /* celebrity walk: one hall */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Tablet: board-first. Players become a strip above the board; the side
   column narrows and scrolls. */
@media (max-width: 1400px) {
  :root {
    --topbar-h:   56px;
    --gutter:     12px;
    --side-l:     0px;
    --side-r-min: 340px;
    --players-h:  84px;
    --dial:       64px;
    --selfie:     28px;
    --card-sm:    64px;
    --card-md:    104px;
    --action-h:   56px;
    --medallion:  34px;
    --fs-xl:      24px;
    --fs-xxl:     34px;
  }
}

/* Phone: one column, the page scrolls, the board is full width. */
@media (max-width: 700px) {
  :root {
    --topbar-h:   52px;
    --gutter:     10px;
    --players-h:  auto;
    --board-size: calc(100vw - 2 * var(--gutter));
    --dial:       56px;
    --selfie:     26px;
    --card-sm:    58px;
    --card-md:    96px;
    --action-h:   52px;
    --fs-xl:      22px;
    --fs-xxl:     30px;
  }
}

/* ---------------------------------------------------------------------
   2. Base
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-ui);
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  background-color: var(--carpet);
  /* convention carpet: two offset dot grids + a faint diagonal weave */
  background-image:
    radial-gradient(circle at 25% 25%, var(--carpet-dot) 0 2px, transparent 2.6px),
    radial-gradient(circle at 75% 75%, var(--carpet-fleck) 0 1.6px, transparent 2.2px),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.13) 0 2px, transparent 2px 14px),
    linear-gradient(180deg, #f6ead4 0%, var(--carpet) 40%);
  background-size: 28px 28px, 28px 28px, auto, auto;
  -webkit-font-smoothing: antialiased;
}

body.sf-page--game { height: 100vh; overflow: hidden; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.1;
  margin: 0;
}

img { max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--zone-act); outline-offset: 2px; }

.sf-sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------------------------------------------------------------------
   3. Primitives: panel, title, buttons, chips, icons
   --------------------------------------------------------------------- */
.sf-panel {
  background: var(--paper);
  border-radius: var(--r-md);
  box-shadow: var(--clay-drop), var(--clay-inset);
  padding: var(--s3);
  position: relative;
}

.sf-panel__title {
  display: flex; align-items: center; gap: var(--s2);
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  color: var(--zone, var(--ink));
  margin: 0 0 var(--s2);
}
.sf-panel__title small {
  font-family: var(--font-ui); font-size: var(--fs-xs); font-weight: 800;
  color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.06em;
  margin-left: auto;
}
.sf-panel__title img { width: 26px; height: 26px; object-fit: contain; }

/* zone-tinted panels: set --zone on the panel */
.sf-panel--act   { --zone: var(--zone-act); }
.sf-panel--star  { --zone: var(--zone-star); }
.sf-panel--swag  { --zone: var(--zone-swag); }
.sf-panel--goal  { --zone: var(--zone-goal); }
.sf-panel--pass  { --zone: var(--zone-pass); }
.sf-panel--act, .sf-panel--star, .sf-panel--swag, .sf-panel--goal, .sf-panel--pass {
  border-top: 5px solid var(--zone);
}

.sf-btn {
  --btn-bg: var(--paper);
  --btn-ink: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 40px;
  padding: 0 var(--s4);
  border: 0;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(110, 70, 30, 0.28), var(--clay-inset);
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast);
}
.sf-btn:hover { transform: translateY(-1px); }
.sf-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(110, 70, 30, 0.28), var(--clay-press); }
.sf-btn:disabled, .sf-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.sf-btn--primary { --btn-bg: var(--zone-act); --btn-ink: #fff; box-shadow: 0 4px 0 var(--zone-act-2), inset 0 2px 0 rgba(255,255,255,.35); }
.sf-btn--go      { --btn-bg: var(--hi); --btn-ink: var(--hi-ink); box-shadow: 0 4px 0 var(--hi-edge), inset 0 2px 0 rgba(255,255,255,.5); }
.sf-btn--ghost   { --btn-bg: transparent; box-shadow: inset 0 0 0 2px var(--line-strong); }
.sf-btn--big     { min-height: 56px; padding: 0 var(--s6); font-size: var(--fs-lg); font-family: var(--font-display); font-weight: 400; letter-spacing: 0.02em; }
.sf-btn--icon    { width: 40px; padding: 0; }
.sf-btn img      { width: 22px; height: 22px; object-fit: contain; }

/* Cost chip: coffee cup + number. --free and --selfie variants. */
.sf-cost {
  display: inline-flex; align-items: center; gap: 3px;
  min-width: 38px; height: 26px;
  padding: 0 8px 0 4px;
  border-radius: var(--r-pill);
  background: var(--crema);
  color: var(--coffee);
  font-weight: 900; font-size: var(--fs-sm);
  box-shadow: inset 0 -2px 0 rgba(122, 74, 43, 0.25);
  white-space: nowrap;
}
.sf-cost img { width: 16px; height: 20px; object-fit: contain; }
.sf-cost--free   { background: var(--p-green-tint); color: var(--good); padding: 0 10px; }
.sf-cost--selfie { background: var(--celeb-red-soft); color: #9b2238; }
.sf-cost--short  { background: var(--bad-soft); color: var(--bad); }   /* can't afford */

/* Small status chip / pill */
.sf-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  background: var(--paper-3);
  color: var(--ink-soft);
  font-size: var(--fs-xs); font-weight: 900;
  text-transform: uppercase; letter-spacing: 0.05em;
  white-space: nowrap;
}
.sf-chip--human { background: #e7eefc; color: var(--zone-act-2); }
.sf-chip--bot   { background: #efe7fb; color: var(--zone-star); }
.sf-chip--hi    { background: var(--hi); color: var(--hi-ink); }
.sf-chip--bad   { background: var(--bad); color: #fff; }

.sf-icon { width: 24px; height: 24px; object-fit: contain; vertical-align: middle; }

/* Player colour hook: put class sf-pc--<id> on any element to set --pc. */
.sf-pc--blue   { --pc: var(--p-blue);   --pc-ink: var(--p-blue-ink);   --pc-tint: var(--p-blue-tint); }
.sf-pc--yellow { --pc: var(--p-yellow); --pc-ink: var(--p-yellow-ink); --pc-tint: var(--p-yellow-tint); }
.sf-pc--pink   { --pc: var(--p-pink);   --pc-ink: var(--p-pink-ink);   --pc-tint: var(--p-pink-tint); }
.sf-pc--green  { --pc: var(--p-green);  --pc-ink: var(--p-green-ink);  --pc-tint: var(--p-green-tint); }
.sf-pc--red    { --pc: var(--p-red);    --pc-ink: var(--p-red-ink);    --pc-tint: var(--p-red-tint); }

/* Celebrity colour hook: sf-cc--green / --red / --orange sets --cc. */
.sf-cc--green  { --cc: var(--celeb-green);  --cc-soft: var(--celeb-green-soft); }
.sf-cc--red    { --cc: var(--celeb-red);    --cc-soft: var(--celeb-red-soft); }
.sf-cc--orange { --cc: var(--celeb-orange); --cc-soft: var(--celeb-orange-soft); }

/* ---------------------------------------------------------------------
   4. Game shell layout
   --------------------------------------------------------------------- */
.sf-game {
  display: grid;
  height: 100vh;
  grid-template-columns: var(--side-l) var(--board-size) minmax(0, 1fr);
  grid-template-rows: var(--topbar-h) minmax(0, 1fr);
  grid-template-areas:
    "top     top   top"
    "players board side";
  gap: var(--gutter);
  padding: 0 var(--gutter) var(--gutter);
}
.sf-game > .sf-topbar  { grid-area: top; }
.sf-game > .sf-players { grid-area: players; }
.sf-game > .sf-stage   { grid-area: board; }
.sf-game > .sf-side    { grid-area: side; }

.sf-players, .sf-side {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  display: flex; flex-direction: column; gap: var(--s3);
  padding: 6px 4px 12px;
}

/* the board's square stage; overlays (banner, toast, popups) anchor here */
.sf-stage {
  position: relative;
  width: var(--board-size);
  height: var(--board-size);
  align-self: start;
}

@media (max-width: 1400px) {
  .sf-game {
    grid-template-columns: var(--board-size) minmax(0, 1fr);
    grid-template-rows: var(--topbar-h) var(--players-h) minmax(0, 1fr);
    grid-template-areas:
      "top     top"
      "players players"
      "board   side";
  }
  .sf-players {
    flex-direction: row; overflow: visible; padding: 0;
  }
}

@media (max-width: 700px) {
  body.sf-page--game { height: auto; overflow: auto; }
  .sf-game {
    height: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: var(--topbar-h) auto auto auto;
    grid-template-areas: "top" "players" "board" "side";
  }
  .sf-players { flex-wrap: wrap; }
  .sf-side { overflow: visible; }
}

/* ---------------------------------------------------------------------
   5. Top bar: logo, Hour tracker, phase, menu
   --------------------------------------------------------------------- */
.sf-topbar {
  display: flex; align-items: center; gap: var(--s4);
  padding: 0 var(--s2);
}
.sf-topbar__logo { height: calc(var(--topbar-h) - 14px); width: auto; border-radius: var(--r-sm); box-shadow: var(--clay-drop); }
.sf-topbar__spacer { flex: 1; }
.sf-topbar__menu { display: flex; gap: var(--s2); }

/* Hour tracker: five clay plates, the current one carries the Hour marker */
.sf-hours { display: flex; align-items: center; gap: 6px; }
.sf-hour {
  position: relative;
  display: flex; align-items: center; gap: 3px;
  height: 42px; padding: 0 8px 0 6px;
  border-radius: var(--r-pill);
  background: var(--paper);
  box-shadow: var(--clay-drop), var(--clay-inset);
  font-family: var(--font-display); font-size: var(--fs-md); color: var(--ink-muted);
}
.sf-hour__num { min-width: 16px; text-align: center; }
.sf-hour__face {
  width: 30px; height: 30px; border-radius: 50%;
  object-fit: cover; object-position: 50% 12%;
  border: 3px solid var(--cc, var(--line));
  background: var(--paper-3);
}
.sf-hour__face + .sf-hour__face { margin-left: -10px; }
.sf-hour.is-done { opacity: 0.55; }
.sf-hour.is-done::after {
  content: ""; position: absolute; right: -4px; top: -4px; width: 18px; height: 18px;
  background: url("assets/icons/tick.webp") center / contain no-repeat;
}
.sf-hour.is-current {
  color: #fff; background: var(--zone-star);
  box-shadow: 0 3px 0 #5a33ad, inset 0 2px 0 rgba(255,255,255,.3);
}

/* Hour marker: drawn in code - a clay disc with live text */
.sf-hour-marker {
  display: inline-grid; place-items: center;
  width: 54px; height: 54px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe08a, var(--zone-goal) 60%, #b57a08);
  color: #4a2f00;
  font-family: var(--font-display); line-height: 0.9; text-align: center;
  box-shadow: 0 3px 0 #9a6400, 0 8px 14px -6px rgba(0,0,0,.4), inset 0 2px 0 rgba(255,255,255,.5);
}
.sf-hour-marker small { display: block; font-family: var(--font-ui); font-size: 9px; font-weight: 900; letter-spacing: 0.08em; }
.sf-hour-marker span { font-size: 24px; }

/* Phase pills */
.sf-phases { display: flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: rgba(255,255,255,.55); box-shadow: inset 0 1px 3px rgba(110,70,30,.2); }
.sf-phase {
  padding: 6px 12px; border-radius: var(--r-pill);
  font-size: var(--fs-sm); font-weight: 800; color: var(--ink-muted); white-space: nowrap;
}
.sf-phase.is-current { background: var(--paper); color: var(--ink); box-shadow: var(--clay-drop); }
.sf-phase.is-current::before { content: "\25CF  "; color: var(--hi-edge); }

@media (max-width: 1400px) {
  .sf-topbar { gap: var(--s3); }
  .sf-phase { padding: 5px 9px; font-size: var(--fs-xs); }
  .sf-hour { height: 36px; }
  .sf-hour__face { width: 24px; height: 24px; border-width: 2px; }
}
@media (max-width: 1100px) {
  .sf-phase:not(.is-current) { display: none; }
  .sf-topbar__menu .sf-btn__label { display: none; }
}

/* ---------------------------------------------------------------------
   6. Lanyard player panel
   A ribbon strap in the player's colour, a metal clip, then the badge.
   The active player's badge is expanded (stats + hand); others compact.
   --------------------------------------------------------------------- */
.sf-lanyard { position: relative; padding-top: 22px; flex: none; }
.sf-lanyard__strap {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  width: 46%; height: 22px;
  border-radius: 6px 6px 0 0;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.0) 0 46px, rgba(255,255,255,.28) 46px 48px),
    var(--pc);
  color: var(--pc-ink);
  font-size: 10px; font-weight: 900; letter-spacing: 0.22em; text-align: center; line-height: 22px;
  overflow: hidden; white-space: nowrap;
  box-shadow: inset 0 -4px 6px rgba(0,0,0,.18);
}
.sf-lanyard__clip {
  position: absolute; left: 50%; top: 13px; transform: translateX(-50%);
  width: 34px; height: 16px; border-radius: 5px;
  background: linear-gradient(180deg, #f2f2f2, #9da3aa);
  box-shadow: 0 2px 2px rgba(0,0,0,.3);
  z-index: 2;
}
.sf-lanyard__badge {
  position: relative;
  background: var(--paper);
  border-radius: var(--r-md);
  box-shadow: var(--clay-drop), var(--clay-inset);
  overflow: hidden;
}
/* the punched slot near the top of a real badge */
.sf-lanyard__badge::before {
  content: ""; position: absolute; left: 50%; top: 7px; transform: translateX(-50%);
  width: 40px; height: 7px; border-radius: 4px;
  background: var(--carpet); box-shadow: inset 0 1px 2px rgba(0,0,0,.3);
  z-index: 1;
}
.sf-lanyard__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: var(--s2);
  padding: 20px var(--s3) 10px;
  background: linear-gradient(180deg, var(--pc) 0 100%);
  color: var(--pc-ink);
}
.sf-lanyard__avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--paper) center / 76% no-repeat;
  box-shadow: 0 0 0 3px rgba(255,255,255,.75), 0 3px 6px rgba(0,0,0,.25);
}
.sf-lanyard__name { font-family: var(--font-display); font-size: var(--fs-lg); line-height: 1.05; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-lanyard__club { font-size: var(--fs-xs); font-weight: 800; opacity: 0.92; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-lanyard__meta { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.sf-lanyard__head .sf-chip { background: rgba(255,255,255,.88); }

/* VP: laurel + score cube in the seat colour */
.sf-vp {
  position: relative;
  display: grid; place-items: center;
  width: 58px; height: 54px;
  background: url("assets/icons/vp.webp") center / contain no-repeat;
  font-family: var(--font-display); font-size: 22px; color: var(--ink);
  text-shadow: 0 0 4px #fff, 0 0 2px #fff;
}
.sf-vp__label { position: absolute; bottom: -6px; font-family: var(--font-ui); font-size: 9px; font-weight: 900; letter-spacing: .1em; color: var(--pc-ink); text-shadow: none; }

.sf-lanyard__body { padding: var(--s3); display: grid; gap: var(--s3); }
.sf-lanyard__stats {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s3); align-items: center;
}
.sf-lanyard__row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.sf-lanyard__label {
  font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-muted);
  width: 100%;
}

/* supply counters: Crew left, hats, box, T-shirts */
.sf-supply { display: inline-flex; align-items: center; gap: 2px; font-weight: 900; font-size: var(--fs-sm); }
.sf-supply img { width: 24px; height: 24px; object-fit: contain; filter: var(--piece-shadow); }
.sf-supply--out { opacity: .35; }

.sf-lanyard__hand { display: flex; gap: var(--s2); align-items: flex-end; }
.sf-lanyard__hand .sf-card { --w: 82px; }
.sf-lanyard__hand .sf-card--club { --w: 82px; }

/* states */
.sf-lanyard.is-active .sf-lanyard__badge { box-shadow: 0 0 0 4px var(--pc), var(--clay-lift); }
.sf-lanyard.is-active::after {
  content: "YOUR TURN"; position: absolute; right: 10px; top: 0;
  padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--hi); color: var(--hi-ink); font-size: 10px; font-weight: 900; letter-spacing: .08em;
  box-shadow: 0 2px 0 var(--hi-edge);
}
.sf-lanyard.is-passed .sf-lanyard__head { filter: saturate(.5); }
.sf-lanyard.is-thinking .sf-lanyard__name::after { content: " \2026"; animation: sf-blink 1s steps(2) infinite; }

/* compact: head only, plus a one-line stat strip */
.sf-lanyard--compact .sf-lanyard__body { padding: 8px var(--s3); }
.sf-lanyard--compact .sf-lanyard__head { padding: 18px var(--s3) 8px; }
.sf-lanyard--compact .sf-lanyard__avatar { width: 34px; height: 34px; }
.sf-lanyard__mini { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: var(--fs-sm); }
.sf-lanyard__mini img { width: 22px; height: 22px; object-fit: contain; }
.sf-lanyard__mini span { display: inline-flex; align-items: center; gap: 2px; }

@media (max-width: 1400px) {
  .sf-players .sf-lanyard { flex: 1 1 0; min-width: 0; padding-top: 16px; }
  .sf-lanyard__strap { height: 16px; line-height: 16px; font-size: 8px; }
  .sf-lanyard__clip { top: 8px; height: 12px; width: 28px; }
  .sf-players .sf-lanyard__head { padding: 14px 8px 5px; gap: 6px; }
  .sf-players .sf-lanyard__avatar { width: 28px; height: 28px; }
  .sf-players .sf-lanyard__name { font-size: var(--fs-md); }
  .sf-players .sf-vp { width: 40px; height: 36px; font-size: 16px; }
  .sf-players .sf-vp__label { display: none; }
  .sf-players .sf-lanyard__body { display: none; }  /* full stats move to the side panel */
  .sf-players .sf-lanyard__mini { display: none; }
  .sf-players .sf-lanyard.is-active::after { top: -2px; left: 4px; right: auto; font-size: 8px; }
  .sf-players .sf-lanyard__badge::before { top: 4px; height: 5px; }
}

/* Player stats block that appears in the SIDE panel on tablet/phone only
   (desktop shows it inside the active lanyard). */
.sf-side .sf-mystats { display: none; }
@media (max-width: 1400px) { .sf-side .sf-mystats { display: block; } }

/* ---------------------------------------------------------------------
   7. Coffee-cup dial (0-12). Set --v (0..12) inline.
   --------------------------------------------------------------------- */
.sf-dial {
  --v: 0;
  position: relative;
  width: var(--dial); height: var(--dial);
  border-radius: 50%;
  background:
    repeating-conic-gradient(from -1deg, var(--paper) 0 2deg, transparent 2deg 30deg),
    conic-gradient(var(--coffee-2) 0, var(--coffee) calc(var(--v) * 30deg), var(--dial-empty) 0);
  box-shadow: var(--clay-drop), inset 0 0 0 3px rgba(122, 74, 43, .18);
  transition: --v var(--t-slow) var(--ease-out);
  flex: none;
}
.sf-dial__face {
  position: absolute; inset: 15%;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: inset 0 2px 4px rgba(122, 74, 43, .3);
  display: grid; place-items: center;
}
.sf-dial__cup { position: absolute; width: 44%; top: 10%; left: 50%; transform: translateX(-50%); opacity: .95; }
.sf-dial__num {
  position: absolute; bottom: 8%; left: 0; right: 0; text-align: center;
  font-family: var(--font-display); font-size: calc(var(--dial) * 0.27); line-height: 1; color: var(--coffee);
  text-shadow: 0 0 3px #fff, 0 0 3px #fff;
}
.sf-dial__max { position: absolute; top: -4px; right: -4px; }
.sf-dial.is-full .sf-dial__face { box-shadow: inset 0 0 0 3px var(--zone-goal); }   /* at the 12 cap: gains are lost */
.sf-dial.is-pour { animation: sf-pour var(--t-slow) var(--ease-pop); }
@property --v { syntax: '<number>'; inherits: true; initial-value: 0; }

/* ---------------------------------------------------------------------
   8. Selfie tokens (green thumbs-up, red heart, orange star)
   --------------------------------------------------------------------- */
.sf-selfies { display: flex; gap: 8px; }
.sf-selfie {
  position: relative; display: inline-block;
  width: var(--selfie); height: calc(var(--selfie) * 1.17);
  background: center / contain no-repeat;
  filter: var(--piece-shadow);
}
.sf-selfie--green  { background-image: url("assets/icons/selfie-green.webp"); }
.sf-selfie--red    { background-image: url("assets/icons/selfie-red.webp"); }
.sf-selfie--orange { background-image: url("assets/icons/selfie-orange.webp"); }
.sf-selfie__n {
  position: absolute; right: -9px; bottom: -6px;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--ink); color: #fff;
  font-size: 12px; font-weight: 900; line-height: 20px; text-align: center;
  box-shadow: 0 0 0 2px var(--paper);
}
.sf-selfie--zero { opacity: .35; filter: grayscale(.8); }
.sf-selfie.is-gain { animation: sf-pop var(--t-med) var(--ease-pop); }

/* ---------------------------------------------------------------------
   9. Board: floor plate, 5x5 grid (halls on odd cells, ropes between)
   --------------------------------------------------------------------- */
.sf-board {
  container: board / inline-size;
  position: relative;
  width: 100%; height: 100%;
  padding: 2.4%;
  border-radius: var(--r-lg);
  background:
    linear-gradient(0deg, rgba(0,0,0,.04) 1px, transparent 1px) 0 0 / 5% 5%,
    linear-gradient(90deg, rgba(0,0,0,.04) 1px, transparent 1px) 0 0 / 5% 5%,
    radial-gradient(ellipse at 50% 0%, #e9e2d6, var(--floor) 70%);
  box-shadow: 0 6px 0 var(--floor-edge), 0 26px 50px -18px rgba(80, 50, 20, .6), inset 0 2px 0 rgba(255,255,255,.6);
}
.sf-board__grid {
  position: relative;
  width: 100%; height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.14fr) minmax(0, 1fr) minmax(0, 0.14fr) minmax(0, 1fr);
  grid-template-rows:    minmax(0, 1fr) minmax(0, 0.14fr) minmax(0, 1fr) minmax(0, 0.14fr) minmax(0, 1fr);
}
/* SVG overlays (route, walk path) span the whole grid. viewBox "0 0 328 328":
   hall centres at 50 / 164 / 278 on each axis. */
.sf-board__overlay {
  grid-area: 1 / 1 / -1 / -1;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 6;
  overflow: visible;
}

/* ---------------------------------------------------------------------
   10. Hall: art, clay sign, volunteer spaces, pieces, queue
   --------------------------------------------------------------------- */
.sf-hall {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 58fr) minmax(0, 42fr);
  min-width: 0; min-height: 0;
  border-radius: 2.2cqw;
  background: var(--queue-bed);
  box-shadow: 0 0.5cqw 0 rgba(40, 30, 20, .45), 0 1.4cqw 2.4cqw -1cqw rgba(40, 30, 20, .55);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast), filter var(--t-med);
  isolation: isolate;
}
.sf-hall__art {
  position: relative;
  min-height: 0;
  border-radius: 2.2cqw 2.2cqw 0 0;
  overflow: hidden;
}
.sf-hall__art img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; display: block;
  /* muted so the pieces (which are clay figures too) stand out from the clay crowds in the art */
  filter: var(--hall-art-filter, saturate(.5) contrast(.78) brightness(1.08) blur(0.1cqw));
  transform: scale(1.02);   /* hides the blur's soft edge */
}
.sf-hall__art::after {   /* soft vignette so pieces read on busy art */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.18) 0%, transparent 30%, transparent 70%, rgba(20,25,45,.45) 100%);
}

/* Clay sign plate: hall name from data, never baked into art */
.sf-hall__sign {
  position: absolute; left: 50%; top: 0.4cqw; transform: translateX(-50%);   /* inside the hall, clear of the Usher space above */
  z-index: 4;
  min-width: 58%; max-width: 92%;
  padding: 0.5cqw 1.6cqw 0.6cqw;
  background: url("assets/ui/hall-label-plate.webp") center / 100% 100% no-repeat;
  font-family: var(--font-display);
  font-size: max(11px, 1.75cqw);
  line-height: 1.05;
  color: #3c3300;
  text-align: center; white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255,255,255,.55);
  filter: drop-shadow(0 0.35cqw 0.25cqw rgba(0,0,0,.35));
}
/* The Entrance keeps its clay ENTRANCE lettering (the rules term, fixed);
   the text stays in the DOM for screen readers but is drawn by the art. */
.sf-hall--entrance .sf-hall__sign {
  min-width: 70%; height: 4.6cqw; top: 0.4cqw;   /* inside the hall, clear of the Usher space above */
  background-image: url("assets/ui/entrance-plate.webp");
  background-size: contain;
  color: transparent; text-shadow: none;
}

/* Volunteer spaces: Security (clipboard) and Photographer (camera).
   Empty = sky-blue clay square like the printed board; taken = owner's colour. */
.sf-hall__vols {
  position: absolute; right: 0.9cqw; bottom: 0.9cqw; z-index: 3;
  display: flex; gap: 0.7cqw;
}
.sf-vol {
  position: relative;
  width: 4.2cqw; height: 4.2cqw;
  border-radius: 1cqw;
  background: #8fc3ff center / 72% no-repeat;
  box-shadow: 0 0.3cqw 0 rgba(0,0,0,.35), inset 0 0.25cqw 0 rgba(255,255,255,.5);
}
.sf-vol--security     { background-image: url("assets/icons/security.webp"); }
.sf-vol--photographer { background-image: url("assets/icons/photographer.webp"); }
.sf-vol--usher        { background-image: url("assets/icons/usher.webp"); }
/* taken: owner colour + STAFF T-shirt; the job icon shrinks to a corner tag */
.sf-vol.is-taken {
  background: var(--pc) url("assets/icons/volunteer.webp") center / 78% no-repeat;
  box-shadow: 0 0 0 0.3cqw #fff, 0 0.3cqw 0 0.3cqw rgba(0,0,0,.3);
}
.sf-vol.is-taken::after {
  content: ""; position: absolute; right: -0.9cqw; top: -0.9cqw;
  width: 2.3cqw; height: 2.3cqw; border-radius: 50%;
  background: #8fc3ff var(--job) center / 74% no-repeat;
  box-shadow: 0 0 0 0.2cqw #fff;
}
.sf-vol--security.is-taken     { --job: url("assets/icons/security.webp"); }
.sf-vol--photographer.is-taken { --job: url("assets/icons/photographer.webp"); }
.sf-vol--usher.is-taken        { --job: url("assets/icons/usher.webp"); }

/* Pieces standing on the hall art: celebrity figure, destination chair */
.sf-hall__pieces { position: absolute; left: 0; right: 0; top: 0; height: 58%; z-index: 3; pointer-events: none; }

/* Celebrity figure: each celebrity's own clay figure (cut out of its standee
   portrait), standing on a disc in the celebrity colour. A white-then-colour
   sticker outline lifts it off the hall art; the name plate on the base
   carries the selfie symbol, so colour is never the only cue. Never
   hue-filter the figure (it would tint the skin). */
.sf-celeb {
  position: absolute; left: 6%; bottom: 9%;
  width: 7.5cqw; height: 11cqw;
  display: flex; justify-content: center; align-items: flex-end;
}
.sf-celeb::before {   /* coloured disc + glow under the base */
  content: ""; position: absolute; left: -0.4cqw; right: -0.4cqw; bottom: -0.8cqw; height: 2.8cqw;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--cc) 70%, #fff), var(--cc) 70%);
  box-shadow: 0 0 0 0.25cqw #fff, 0 0 2cqw 0.8cqw color-mix(in srgb, var(--cc) 75%, transparent), 0 0.35cqw 0 0.25cqw rgba(0,0,0,.35);
}
.sf-celeb__figure {
  position: relative;
  height: 100%; width: auto; max-width: 150%;
  object-fit: contain; object-position: 50% 100%;
  filter:
    drop-shadow(0 0 0.12cqw #fff) drop-shadow(0 0 0.12cqw #fff) drop-shadow(0 0 0.1cqw #fff)
    drop-shadow(0 0 0.3cqw var(--cc)) drop-shadow(0 0 0.3cqw var(--cc))
    drop-shadow(0 0.5cqw 0.5cqw rgba(0, 0, 0, .55));
}
.sf-celeb__name {   /* name plate on the front of the base */
  position: absolute; left: 50%; bottom: -1.9cqw; transform: translateX(-50%);
  display: flex; align-items: center; gap: 0.3cqw;
  padding: 0.15cqw 0.7cqw 0.15cqw 0.35cqw;
  border-radius: var(--r-pill);
  background: #fff;
  border: 0.22cqw solid var(--cc);
  box-shadow: 0 0.25cqw 0.4cqw rgba(0, 0, 0, .4);
  color: var(--ink);
  font-size: max(8px, 1.05cqw); font-weight: 900; line-height: 1.25;
  white-space: nowrap;
}
.sf-celeb__symbol {   /* colour is never the only cue: thumb / heart / star */
  flex: none;
  width: 1.5cqw; height: 1.6cqw;
  background: center / contain no-repeat;
}
.sf-celeb__hour {   /* the celebrity's Hour, in the celebrity colour */
  flex: none;
  display: inline-grid; place-items: center;
  min-width: 1.7cqw; height: 1.7cqw; padding: 0 0.3cqw;
  border-radius: var(--r-pill);
  background: var(--cc); color: #fff;
  font-size: max(8px, 1.05cqw); line-height: 1;
}
/* On a small board the name no longer fits inside the hall: keep the Hour and
   the symbol only (the name is in the tooltip and the celebrity panel). */
@container board (max-width: 640px) {
  .sf-celeb__name { font-size: 0; gap: 0.4cqw; padding: 0.4cqw; bottom: -1.6cqw; }
  .sf-celeb__symbol { width: 2.6cqw; height: 2.8cqw; }
  .sf-celeb__hour { font-size: max(8px, 2.2cqw); min-width: 3.2cqw; height: 3.2cqw; }
  /* the hall names keep an 11px minimum and grow relative to the board: drop the destination markers below them */
  .sf-hall__pieces .sf-dest { top: 30%; }
}
.sf-cc--green  .sf-celeb__symbol { background-image: url("assets/icons/selfie-green.webp"); }
.sf-cc--red    .sf-celeb__symbol { background-image: url("assets/icons/selfie-red.webp"); }
.sf-cc--orange .sf-celeb__symbol { background-image: url("assets/icons/selfie-orange.webp"); }
.sf-celeb.is-walking { animation: sf-hop var(--t-step) var(--ease-out) infinite; }
.sf-celeb.is-now::before { animation: sf-glow 1.2s ease-in-out infinite alternate; }

/* Destination marker: where a celebrity's Walk ends - a white disc with a ring
   in the celebrity colour and its Hour number (board-render.js DEST_BOX mirrors this) */
.sf-dest {
  position: absolute; right: 3%; top: 12%;
  width: 4.2cqw; height: 4.2cqw;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 0.5cqw solid var(--cc);
  box-shadow: 0 0 0 0.2cqw rgba(30, 22, 16, .45), 0 0.35cqw 0.5cqw rgba(0, 0, 0, .4);
  box-sizing: border-box;
}
.sf-dest__hour {
  color: var(--cc);
  font: 900 max(9px, 2cqw)/1 var(--font-ui);
}

/* First Player marker (gold crowned meeple) - sits on the active lanyard */
.sf-first-player {
  width: 30px; height: 40px;
  background: url("assets/markers/first-player.webp") center / contain no-repeat;
  filter: var(--piece-shadow);
}

/* Queue: a serpentine rope line. Slots 1-4 run left to right on the top
   row, 5-8 right to left on the bottom row (set --cap = 5 / 7 / 8; slots
   beyond the cap are not rendered). Slot 1 = Prime Position (gold star). */
.sf-queue {
  position: relative;
  list-style: none; margin: 0;
  padding: 0.9cqw 1.4cqw 1cqw;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 0.5cqw 0.6cqw;
  min-height: 0;
  background:
    radial-gradient(circle, rgba(255,255,255,.06) 1px, transparent 1.5px) 0 0 / 1.2cqw 1.2cqw,
    linear-gradient(180deg, var(--queue-bed), var(--queue-bed-2));
  border-radius: 0 0 2.2cqw 2.2cqw;
}
/* velvet rope between the two rows, with brass posts; gap on the right = the U-turn */
.sf-queue::before {
  content: ""; position: absolute; left: 1.2cqw; right: 22%; top: 50%;
  height: 0.55cqw; transform: translateY(-50%);
  border-radius: 1cqw;
  background: linear-gradient(180deg, #e04a62, var(--rope) 50%, var(--rope-dark));
  box-shadow: 0 0.2cqw 0.3cqw rgba(0,0,0,.4);
  z-index: 0;
}
.sf-queue::after {   /* brass post at the turn */
  content: ""; position: absolute; right: calc(22% - 0.9cqw); top: 50%;
  width: 1.5cqw; height: 1.5cqw; transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe08a, var(--brass) 55%, var(--brass-dark));
  box-shadow: 0 0.2cqw 0.3cqw rgba(0,0,0,.5);
  z-index: 0;
}
.sf-slot {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  border-radius: 1.2cqw;
  background: var(--slot-empty);
  box-shadow: inset 0 0 0 0.18cqw rgba(255,255,255,.12);
}
.sf-slot:nth-child(1) { grid-area: 1 / 1; }
.sf-slot:nth-child(2) { grid-area: 1 / 2; }
.sf-slot:nth-child(3) { grid-area: 1 / 3; }
.sf-slot:nth-child(4) { grid-area: 1 / 4; }
.sf-slot:nth-child(5) { grid-area: 2 / 4; }
.sf-slot:nth-child(6) { grid-area: 2 / 3; }
.sf-slot:nth-child(7) { grid-area: 2 / 2; }
.sf-slot:nth-child(8) { grid-area: 2 / 1; }
.sf-slot--prime {
  background: radial-gradient(circle, rgba(255, 210, 80, .55), rgba(255, 210, 80, .15) 70%);
  box-shadow: inset 0 0 0 0.25cqw rgba(255, 210, 80, .9);
}
.sf-slot--prime::before {
  content: ""; position: absolute; left: -0.6cqw; top: -0.7cqw; width: 2.4cqw; height: 2.3cqw;
  background: url("assets/icons/star.webp") center / contain no-repeat;
  z-index: 3;
}
.sf-slot__n {   /* position number, faint, for empty slots */
  position: absolute; font-size: max(8px, 1cqw); font-weight: 900; color: rgba(255,255,255,.28);
}
.sf-slot.is-new { animation: sf-slot-in var(--t-med) var(--ease-pop); }

/* Crew meeple with badge overlays.
   N00b: plain meeple. VIP: gold top hat. AAA: hat + standing on the red star box. */
.sf-crew {
  position: relative;
  width: 4.4cqw; height: 4.5cqw;
  display: block;
}
.sf-crew__body { width: 100%; height: 100%; object-fit: contain; filter: var(--piece-shadow); position: relative; z-index: 1; }
.sf-crew__hat {
  position: absolute; left: 50%; top: -1.9cqw; transform: translateX(-50%) rotate(-6deg);
  width: 2.7cqw; z-index: 2; filter: drop-shadow(0 1px 1px rgba(0,0,0,.4));
}
.sf-crew__box {
  position: absolute; left: 50%; bottom: -0.5cqw; transform: translateX(-50%);
  width: 3.1cqw; z-index: 0; filter: drop-shadow(0 1px 1px rgba(0,0,0,.4));
}
.sf-crew--aaa .sf-crew__body { transform: translateY(-1.3cqw) scale(.9); }
.sf-crew--aaa .sf-crew__hat  { top: -3cqw; }
.sf-crew.is-selected { animation: sf-bob 0.9s ease-in-out infinite; }
.sf-crew.is-selected::after {
  content: ""; position: absolute; inset: -0.6cqw; border-radius: 50%;
  box-shadow: 0 0 0 0.35cqw var(--hi), 0 0 1.4cqw 0.4cqw var(--hi-glow);
  z-index: -1;
}
/* off-board Crew (lanyard supply, popups): fixed px size */
.sf-crew--px { width: 30px; height: 31px; }
.sf-crew--px .sf-crew__hat { width: 18px; top: -12px; }
.sf-crew--px .sf-crew__box { width: 20px; bottom: -3px; }
.sf-crew--px.sf-crew--aaa .sf-crew__body { transform: translateY(-8px) scale(.9); }
.sf-crew--px.sf-crew--aaa .sf-crew__hat { top: -19px; }

/* Inline target badge on a hall ("1 coffee", "FULL 8/8", "2 halls") */
.sf-hall__tag {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  z-index: 5;
  padding: 0.4cqw 1.2cqw; border-radius: var(--r-pill);
  font-size: max(10px, 1.25cqw); font-weight: 900; white-space: nowrap;
  box-shadow: 0 0.3cqw 0 rgba(0,0,0,.3);
  pointer-events: none;
}
.is-legal   > .sf-hall__tag { background: var(--hi); color: var(--hi-ink); }
.is-illegal > .sf-hall__tag { background: var(--bad); color: #fff; }

/* ---------------------------------------------------------------------
   11. Highlight states (used on halls, ropes, slots, cards, Crew)
   legal              - lime ring + slow pulse; click does it
   illegal (clickable)- red dashed ring, no pulse; click explains why
   dimmed             - out of scope for this step; desaturated
   selected           - the piece/target already chosen in this action
   --------------------------------------------------------------------- */
/* Board targets only (halls, ropes, queue slots) - scoped so the state
   classes can be reused elsewhere (setup pickers, segmented controls). */
:is(.sf-hall, .sf-rope, .sf-slot).is-legal {
  box-shadow: 0 0 0 0.5cqw var(--hi), 0 0 2.4cqw 0.6cqw var(--hi-glow), 0 0.5cqw 0 rgba(40,30,20,.45) !important;
  animation: sf-pulse 1.6s ease-in-out infinite;
  z-index: 2;
}
.sf-hall.is-legal:hover { transform: translateY(-0.4cqw) scale(1.01); }
:is(.sf-hall, .sf-rope, .sf-slot).is-illegal {
  outline: 0.4cqw dashed var(--bad);
  outline-offset: 0.2cqw;
  cursor: help;
}
:is(.sf-hall, .sf-rope, .sf-slot, .sf-board).is-dimmed { filter: saturate(.25) brightness(.82); opacity: .78; }
:is(.sf-hall, .sf-rope, .sf-slot).is-dimmed:hover { filter: saturate(.5) brightness(.9); }
:is(.sf-hall, .sf-slot).is-selected { box-shadow: 0 0 0 0.5cqw #fff, 0 0 0 1cqw var(--hi) !important; z-index: 3; }
/* source: where the half-made action started (e.g. the hall a Crew leaves) */
.sf-hall.is-source { box-shadow: 0 0 0 0.45cqw #fff, 0 0.5cqw 0 rgba(40,30,20,.45) !important; }
.sf-hall.is-source .sf-hall__art img { filter: saturate(.6) brightness(.9); }

/* Off-board highlight variants (px-based, for cards and buttons) */
.sf-card.is-legal, .sf-action.is-legal, .sf-rung.is-legal {
  box-shadow: 0 0 0 4px var(--hi), 0 0 18px 4px var(--hi-glow) !important;
}
.sf-card.is-illegal { outline: 3px dashed var(--bad); outline-offset: 2px; }

/* ---------------------------------------------------------------------
   12. Ropes between halls (Usher spaces)
   --------------------------------------------------------------------- */
.sf-rope {
  position: relative;
  display: grid; place-items: center;
  cursor: pointer;
}
.sf-rope::before {   /* the sagging velvet rope */
  content: ""; position: absolute;
  background: linear-gradient(180deg, #e04a62, var(--rope) 50%, var(--rope-dark));
  border-radius: 1cqw;
  box-shadow: 0 0.25cqw 0.35cqw rgba(0,0,0,.35);
}
.sf-rope--h::before { left: -6%; right: -6%; top: 50%; height: 0.75cqw; transform: translateY(-50%); }
.sf-rope--v::before { top: -6%; bottom: -6%; left: 50%; width: 0.75cqw; transform: translateX(-50%); }
.sf-rope .sf-vol { width: 3.6cqw; height: 3.6cqw; border-radius: 50%; box-shadow: 0 0 0 0.35cqw var(--brass), 0 0.4cqw 0.4cqw rgba(0,0,0,.4); }
.sf-rope .sf-vol.is-taken { box-shadow: 0 0 0 0.35cqw #fff, 0 0.4cqw 0.4cqw rgba(0,0,0,.4); }
.sf-rope.is-legal { border-radius: 50%; }

/* ---------------------------------------------------------------------
   13. Route overlay (SVG): casing + coloured dashed path + arrow + ends
   --------------------------------------------------------------------- */
/* Route: dark edge, white casing, solid colour line; the Hour number travels along it. */
/* Thin enough that routes in neighbouring lanes (8 units apart) keep a clear gap. */
.sf-route__edge   { fill: none; stroke: rgba(30, 22, 16, .5); stroke-width: 6.4; stroke-linecap: round; stroke-linejoin: round; }
.sf-route__casing { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.sf-route__line   { fill: none; stroke: var(--cc); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sf-route__tokendisc { fill: var(--cc); stroke: #fff; stroke-width: 1.2; }
.sf-route__tokentext { font: 900 6.2px/1 var(--font-ui); fill: #fff; pointer-events: none; }
.sf-route__line--solid { stroke-dasharray: none; }
.sf-route__done   { fill: none; stroke: var(--cc); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: .45; }
.sf-route__march  { animation: sf-march 0.9s linear infinite; }
.sf-route__end    { fill: var(--cc); stroke: #fff; stroke-width: 1.6; }

/* ---------------------------------------------------------------------
   14. Cards (achievement, swag, club, celebrity, pass, aid)
   One component, width from --w; 2:3 aspect. Sizes: --sm, --md, --lg.
   --------------------------------------------------------------------- */
.sf-card {
  --w: var(--card-sm);
  position: relative;
  flex: none;
  width: var(--w);
  aspect-ratio: 2 / 3;
  border-radius: calc(var(--w) * 0.07);
  background: var(--paper-3) center / cover no-repeat;
  box-shadow: 0 2px 0 rgba(110,70,30,.25), 0 8px 16px -8px rgba(110,70,30,.6);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast);
}
.sf-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sf-card--sm { --w: var(--card-sm); }
.sf-card--md { --w: var(--card-md); }
.sf-card--lg { --w: var(--card-lg); }
.sf-card:hover { transform: translateY(-3px); }
/* zoom: market and hand cards grow in place on hover / long-press */
.sf-card--zoom:hover { transform: translateY(-8px) scale(1.9); z-index: 20; box-shadow: var(--clay-lift); }
.sf-card--zoom-up:hover { transform-origin: 50% 100%; }
/* A zoomed card must rise above the next panel down. Its own panel can trap it in a
   layer (the celebrity panel's sliding track does), so lift the whole panel. */
:is(.sf-panel, .sf-lanyard):has(.sf-card--zoom:hover) { z-index: 25; }
/* The side columns cut off anything past their edges: cards at the ends of a row grow inwards. */
.sf-lanyard__hand > .sf-card--zoom-up:first-child:hover,
.sf-market__slot:first-child .sf-card--zoom-up:hover { transform-origin: 0 100%; }
.sf-lanyard__hand > .sf-card--zoom-up:last-child:not(:first-child):hover { transform-origin: 100% 100%; }
.sf-card__cost {   /* selfie price chip under a swag card */
  position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%);
}
.sf-card--back { cursor: default; }
.sf-card.is-gone { visibility: hidden; }   /* empty market slot keeps its place */
.sf-card__label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2px 4px; background: rgba(42,31,23,.78); color: #fff;
  font-size: 10px; font-weight: 800; text-align: center;
}
.sf-card-slot {   /* empty slot outline (market, schedule) */
  width: var(--card-sm); aspect-ratio: 2 / 3; border-radius: calc(var(--card-sm) * .07);
  border: 2px dashed var(--line-strong); background: rgba(255,255,255,.35);
}

/* ---------------------------------------------------------------------
   15. Side panel blocks: This Hour, actions, pass ladder, exchange, market
   --------------------------------------------------------------------- */
/* This Hour: card + facts */
.sf-now { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s3); align-items: start; }
.sf-now__name { font-family: var(--font-display); font-size: var(--fs-xl); line-height: 1; }
.sf-now__facts { display: grid; gap: 6px; margin-top: 6px; font-size: var(--fs-sm); }
.sf-now__fact { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sf-now > * { min-width: 0; }
.sf-now__fact img { width: 20px; height: 20px; object-fit: contain; }
.sf-now__method { font-weight: 900; }
.sf-now__values { display: flex; flex-wrap: wrap; gap: 4px; }
.sf-now__values span {
  min-width: 26px; padding: 1px 6px; border-radius: 7px; text-align: center;
  background: var(--paper-3); font-weight: 900; font-size: var(--fs-sm);
}
.sf-now__values span:first-child { background: var(--zone-goal); color: #3b2600; }
.sf-route-text { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; font-weight: 800; font-size: var(--fs-sm); }
.sf-route-text i { font-style: normal; color: var(--cc); font-weight: 900; }
.sf-also { display: flex; gap: 8px; margin-top: 4px; }
.sf-also__item { display: flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 800; color: var(--ink-soft); }

/* Medallion: celebrity portrait in a colour ring (schedule, popups, log) */
.sf-medallion {
  width: var(--medallion); height: var(--medallion); border-radius: 50%;
  object-fit: cover; object-position: 50% 10%;
  border: 3px solid var(--cc, var(--line));
  background: var(--paper-3);
  flex: none;
}

/* Action buttons: icon, label, one-line effect, cost chip */
.sf-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.sf-action {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center; column-gap: 8px;
  min-height: var(--action-h);
  padding: 8px 10px;
  border: 0; border-radius: var(--r-sm);
  background: var(--paper);
  text-align: left; cursor: pointer;
  box-shadow: 0 3px 0 rgba(31, 79, 180, .35), inset 0 0 0 2px rgba(47, 107, 227, .18);
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-fast), background var(--t-fast);
}
.sf-action:hover { transform: translateY(-2px); background: #fff; }
.sf-action:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(31,79,180,.35), var(--clay-press); }
.sf-action__icon { grid-row: 1 / 3; width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 2px 1px rgba(0,0,0,.2)); }
.sf-action__label { font-weight: 900; font-size: var(--fs-sm); line-height: 1.1; color: var(--ink); }
.sf-action__sub { font-size: 11px; font-weight: 700; color: var(--ink-muted); line-height: 1.15; }
.sf-action .sf-cost { position: absolute; right: 6px; top: -9px; height: 22px; font-size: 13px; }
.sf-action.is-armed {
  background: var(--zone-act); box-shadow: 0 0 0 3px var(--hi), 0 3px 0 var(--zone-act-2);
}
.sf-action.is-armed .sf-action__label, .sf-action.is-armed .sf-action__sub { color: #fff; }
.sf-action:disabled, .sf-action[aria-disabled="true"] {
  cursor: not-allowed; background: var(--paper-2); box-shadow: inset 0 0 0 2px var(--line);
  transform: none;
}
.sf-action:disabled .sf-action__icon, .sf-action[aria-disabled="true"] .sf-action__icon { filter: grayscale(1); opacity: .5; }
.sf-action:disabled .sf-action__label, .sf-action[aria-disabled="true"] .sf-action__label { color: var(--ink-muted); }
.sf-action__why {   /* the block reason, visible under a disabled button on touch */
  grid-column: 1 / -1; margin-top: 3px;
  font-size: 10px; font-weight: 800; color: var(--bad); line-height: 1.15;
}
.sf-actions-panel {
  background: linear-gradient(180deg, #e9f0ff, #dbe6ff);
}
.sf-actions-panel .sf-panel__title { color: var(--zone-act-2); }

/* Pass ladder (the Pass card as a track of 4 rungs) */
.sf-ladder { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 6px; }
.sf-rung {
  position: relative;
  min-height: 62px; padding: 6px 6px 22px;
  border-radius: var(--r-sm);
  background: #dff3ef;
  box-shadow: inset 0 0 0 2px rgba(31, 157, 139, .25);
  font-size: 11px; font-weight: 800; line-height: 1.2; color: #135f55;
}
.sf-rung b { display: block; font-family: var(--font-display); font-weight: 400; font-size: var(--fs-md); color: var(--zone-pass); }
.sf-rung__markers { position: absolute; left: 6px; bottom: 5px; display: flex; gap: 3px; }

/* Pass marker: clay disc in the seat colour (drawn in code) */
.sf-pass-marker {
  width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--pc) 55%, #fff), var(--pc) 65%, color-mix(in srgb, var(--pc) 70%, #000));
  box-shadow: 0 2px 0 rgba(0,0,0,.3), 0 0 0 2px #fff;
}
/* Score marker: clay cube in the seat colour (drawn in code) */
.sf-score-marker {
  width: 16px; height: 16px; border-radius: 4px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--pc) 60%, #fff), var(--pc) 50%, color-mix(in srgb, var(--pc) 75%, #000));
  box-shadow: 0 2px 0 rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.5);
  transform: rotate(-8deg);
}

/* Selfie Exchange: three trades, free any time */
.sf-exchange { display: grid; gap: 6px; }
.sf-trade {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 8px; border: 0; border-radius: var(--r-sm);
  background: var(--paper-2); cursor: pointer; font-weight: 900; font-size: var(--fs-sm);
  box-shadow: 0 2px 0 rgba(110,70,30,.2);
}
.sf-trade:hover { background: #fff; }
.sf-trade:disabled { opacity: .45; cursor: not-allowed; }
/* "a Selfie of any colour": the three polaroids fanned */
.sf-trade__any {
  width: 30px; height: 26px;
  background:
    url("assets/icons/selfie-orange.webp") 100% 60% / 15px 18px no-repeat,
    url("assets/icons/selfie-red.webp") 50% 30% / 15px 18px no-repeat,
    url("assets/icons/selfie-green.webp") 0 70% / 15px 18px no-repeat;
}
.sf-trade__any + .sf-trade__any { margin-left: -8px; }
.sf-trade__n { font-weight: 900; }
.sf-trade__arrow { color: var(--ink-muted); }
.sf-trade img { width: 22px; height: 24px; object-fit: contain; }
.sf-trade__free { margin-left: auto; font-size: 10px; color: var(--good); text-transform: uppercase; letter-spacing: .06em; }

/* Swag market: 5 slots + deck */
.sf-market { display: flex; gap: 8px; align-items: flex-end; }
.sf-market__slot { display: grid; gap: 6px; justify-items: center; }
.sf-market__deck { position: relative; margin-left: auto; }
.sf-market__deck::after {
  content: attr(data-count); position: absolute; right: -6px; top: -6px;
  min-width: 22px; height: 22px; border-radius: 11px; padding: 0 5px;
  background: var(--ink); color: #fff; font-size: 11px; font-weight: 900; line-height: 22px; text-align: center;
}
.sf-price { display: flex; gap: 1px; }
.sf-price img { width: 16px; height: 19px; object-fit: contain; }

.sf-side-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--s3); }
@media (max-width: 1400px) {
  .sf-side-row { grid-template-columns: minmax(0, 1fr); }
  .sf-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .sf-action__sub { display: none; }
}

/* ---------------------------------------------------------------------
   16. Overlays on the stage: prompt banner, toast, tooltip, float text
   --------------------------------------------------------------------- */
/* Overlays are centred with left/right + auto margins (not translate), so
   they can use the full stage width before wrapping. */
.sf-banner {
  position: absolute; left: 12px; right: 12px; top: 14px;
  margin: 0 auto; width: max-content; max-width: calc(100% - 24px);
  z-index: 30;
  display: flex; align-items: center; gap: var(--s3);
  padding: 8px 8px 8px 16px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: #fff;
  box-shadow: 0 4px 0 rgba(0,0,0,.25), 0 14px 30px -10px rgba(0,0,0,.6);
  animation: sf-drop var(--t-med) var(--ease-pop);
}
.sf-banner__step {
  flex: none; padding: 2px 9px; border-radius: var(--r-pill);
  background: var(--hi); color: var(--hi-ink); font-size: var(--fs-xs); font-weight: 900;
}
.sf-banner__text { font-weight: 800; font-size: var(--fs-md); line-height: 1.2; }
.sf-banner__text b { color: var(--hi); font-weight: 900; }
.sf-banner .sf-btn { min-height: 34px; padding: 0 14px; }
.sf-banner .sf-btn--ghost { color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.sf-banner--walk { background: var(--zone-star); }
.sf-banner--walk .sf-banner__step { background: #fff; color: var(--zone-star); }

.sf-toast {
  position: absolute; left: 12px; right: 12px; bottom: 18px;
  margin: 0 auto; width: max-content; max-width: min(560px, calc(100% - 24px));
  z-index: 31;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px 10px 10px;
  border-radius: var(--r-md);
  background: var(--paper);
  box-shadow: var(--clay-lift);
  font-weight: 800; line-height: 1.25;
  animation: sf-rise var(--t-med) var(--ease-pop);
}
.sf-toast img { width: 34px; height: 34px; object-fit: contain; flex: none; }
.sf-toast--refuse { border-left: 6px solid var(--bad); }
.sf-toast--info   { border-left: 6px solid var(--zone-act); }
.sf-toast--good   { border-left: 6px solid var(--good); }
.sf-toast small { display: block; font-size: var(--fs-xs); color: var(--ink-muted); font-weight: 800; }

.sf-tip {
  position: absolute; z-index: 40;
  max-width: 260px; padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--ink); color: #fff;
  font-size: var(--fs-sm); font-weight: 700; line-height: 1.3;
  box-shadow: 0 10px 24px -8px rgba(0,0,0,.6);
  pointer-events: none;
}
.sf-tip b { display: block; font-family: var(--font-display); font-weight: 400; font-size: var(--fs-md); margin-bottom: 2px; }
.sf-tip__who { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.2); color: var(--hi); }

/* Floating gain text over the board ("+1 selfie", "+1 coffee", "+20 VP") */
.sf-float {
  position: absolute; z-index: 25;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px 4px 5px; border-radius: var(--r-pill);
  background: #fff; color: var(--ink);
  font-weight: 900; font-size: var(--fs-sm); white-space: nowrap;
  box-shadow: 0 3px 0 rgba(0,0,0,.25), 0 0 0 3px var(--pc, var(--hi));
  animation: sf-float-up 1.4s var(--ease-out) both;
}
.sf-float--still { animation: none; }   /* design mock-ups / reduced motion log */
.sf-float img { width: 1.4em; height: 1.6em; object-fit: contain; }
.sf-float__dot { width: 14px; height: 14px; border-radius: 50%; background: var(--pc); }

/* Selfie camera-flash: white burst over a hall */
.sf-flash {
  position: absolute; inset: -10%; z-index: 8; pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, rgba(255,255,255,.85) 22%, rgba(255,255,255,0) 62%);
  animation: sf-flash 450ms ease-out both;
}
.sf-flash--still { animation: none; opacity: .75; }
.sf-flash__rays {
  position: absolute; inset: 0; pointer-events: none; z-index: 8;
  background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.55) 0 4deg, transparent 4deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 0 25%, transparent 60%);
          mask: radial-gradient(circle, #000 0 25%, transparent 60%);
}

/* ---------------------------------------------------------------------
   17. Modal, scoring popup, handover
   --------------------------------------------------------------------- */
.sf-scrim {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  padding: var(--s4);
  background: rgba(42, 31, 23, .45);
  backdrop-filter: blur(3px);
  animation: sf-fade var(--t-med) ease-out;
}
.sf-scrim--stage { position: absolute; border-radius: var(--r-lg); }
.sf-modal {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 2 * var(--s4));
  overflow: auto;
  padding: var(--s5);
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: var(--clay-lift), var(--clay-inset);
  animation: sf-pop var(--t-med) var(--ease-pop);
}
.sf-modal__title { font-size: var(--fs-xl); margin-bottom: var(--s2); }
.sf-modal__actions { display: flex; justify-content: flex-end; gap: var(--s2); margin-top: var(--s4); }
.sf-modal__close { position: absolute; right: 12px; top: 12px; }

/* Scoring popup: celebrity + method header, one arithmetic line per
   scoring Crew, per-player totals, confetti behind. */
.sf-score { width: min(600px, 100%); padding: 0; overflow: hidden; }
.sf-score__head {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s3); align-items: center;
  padding: var(--s4) var(--s5);
  background: linear-gradient(135deg, var(--zone-star), #5a33ad);
  color: #fff;
}
.sf-score__head .sf-medallion { --medallion: 72px; border-width: 4px; }
.sf-score__kicker { font-size: var(--fs-xs); font-weight: 900; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.sf-score__title { font-family: var(--font-display); font-size: var(--fs-xl); line-height: 1.05; }
.sf-score__method { display: inline-flex; gap: 6px; align-items: center; margin-top: 4px; font-weight: 800; font-size: var(--fs-sm); }
.sf-score__body { padding: var(--s3) var(--s5) var(--s4); }
.sf-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sf-line {
  display: grid;
  grid-template-columns: 34px 40px minmax(0, 1fr) auto;
  align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: var(--r-sm);
  background: var(--paper-2);
  font-weight: 800; font-size: var(--fs-sm);
  animation: sf-line-in var(--t-med) var(--ease-out) both;
}
.sf-line:nth-child(2) { animation-delay: 80ms; }
.sf-line:nth-child(3) { animation-delay: 160ms; }
.sf-line:nth-child(4) { animation-delay: 240ms; }
.sf-line:nth-child(5) { animation-delay: 320ms; }
.sf-line:nth-child(6) { animation-delay: 400ms; }
.sf-line:nth-child(7) { animation-delay: 480ms; }
.sf-line:nth-child(8) { animation-delay: 560ms; }
.sf-line__pos { font-family: var(--font-display); font-size: var(--fs-md); color: var(--ink-muted); text-align: center; }
.sf-line__pos--prime { color: var(--zone-goal); }
.sf-line__what { color: var(--ink-soft); }
.sf-line__what b { color: var(--ink); }
.sf-line__vp { font-family: var(--font-display); font-size: var(--fs-lg); color: var(--ink); }
.sf-line--zero { opacity: .55; }
.sf-line--zero .sf-line__vp { color: var(--ink-muted); }
.sf-totals { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--s3); padding-top: var(--s3); border-top: 2px dashed var(--line); }
.sf-total {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 6px; border-radius: var(--r-pill);
  background: var(--pc-tint); box-shadow: inset 0 0 0 2px var(--pc);
  font-weight: 900;
}
.sf-total b { font-family: var(--font-display); font-weight: 400; font-size: var(--fs-lg); }
.sf-total__arith { font-size: var(--fs-xs); color: var(--ink-soft); }

/* Hotseat handover: full-screen curtain so hands stay private */
.sf-handover {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; text-align: center;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.08) 0 18px, transparent 18px 46px),
    linear-gradient(180deg, #b0233b, #7f1528);
  color: #fff;
}
.sf-handover__card { display: grid; gap: var(--s4); justify-items: center; }
.sf-handover__title { font-size: var(--fs-hero); text-shadow: 0 4px 0 rgba(0,0,0,.25); }

/* ---------------------------------------------------------------------
   18. Confetti (scoring, achievements, winner)
   Each piece: <i style="--x:..%; --d:..ms; --c:..; --r:..deg"></i>
   --------------------------------------------------------------------- */
.sf-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 49; }
.sf-confetti i {
  position: absolute; top: -20px; left: var(--x);
  width: 10px; height: 16px; border-radius: 3px;
  background: var(--c);
  transform: rotate(var(--r));
  animation: sf-confetti 2.6s cubic-bezier(.25,.6,.4,1) var(--d) both;
}
.sf-confetti i:nth-child(3n) { width: 12px; height: 12px; border-radius: 50%; }
.sf-confetti i:nth-child(4n) { width: 7px; height: 20px; }
.sf-confetti--still i { animation: none; top: var(--y); }

/* ---------------------------------------------------------------------
   19. End screen
   --------------------------------------------------------------------- */
.sf-end { max-width: 1240px; margin: 0 auto; padding: var(--s5) var(--gutter) var(--s7); display: grid; gap: var(--s5); }
.sf-end__hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s5); align-items: center; }
.sf-end__title { font-size: var(--fs-hero); color: var(--ink); text-shadow: 0 3px 0 #fff; }
.sf-end__sub { font-size: var(--fs-lg); color: var(--ink-soft); font-weight: 800; }
.sf-podium { display: flex; align-items: flex-end; gap: 10px; }
.sf-podium__step {
  display: grid; justify-items: center; gap: 4px;
  width: 112px; padding: 10px 6px 12px;
  border-radius: var(--r-md) var(--r-md) 6px 6px;
  background: var(--pc-tint); box-shadow: inset 0 0 0 3px var(--pc), var(--clay-drop);
  text-align: center; font-weight: 900;
}
.sf-podium__step--1 { min-height: 215px; }
.sf-podium__step--2 { min-height: 150px; }
.sf-podium__step--3 { min-height: 120px; }
.sf-podium__rank { font-family: var(--font-display); font-size: 34px; line-height: 1; color: var(--ink); }
.sf-podium__step--1 .sf-podium__rank::before { content: ""; display: block; width: 46px; height: 48px; margin: -6px auto 2px; background: url("assets/icons/trophy.webp") center / contain no-repeat; }

.sf-table-wrap { overflow-x: auto; border-radius: var(--r-md); box-shadow: var(--clay-drop); background: var(--paper); }
.sf-table { width: 100%; border-collapse: collapse; font-weight: 800; font-size: var(--fs-sm); }
.sf-table th {
  padding: 10px 12px; text-align: right; white-space: nowrap;
  font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted);
  background: var(--paper-2); border-bottom: 2px solid var(--line);
}
.sf-table th:first-child, .sf-table th:nth-child(2) { text-align: left; }
.sf-table td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.sf-table td:first-child { text-align: center; font-family: var(--font-display); font-size: var(--fs-xl); width: 56px; color: var(--ink-muted); }
.sf-table td:nth-child(2) { text-align: left; }
.sf-table tr:last-child td { border-bottom: 0; }
.sf-table tr.is-winner td { background: #fff4cf; }
.sf-table tr.is-winner td:first-child { color: var(--zone-goal); }
.sf-table .sf-table__total { font-family: var(--font-display); font-size: var(--fs-xl); color: var(--ink); }
.sf-table__who { display: flex; align-items: center; gap: 10px; }
.sf-table__who .sf-crew--px { flex: none; }
.sf-table__name { font-size: var(--fs-md); font-weight: 900; }
.sf-table__arith { display: block; font-size: 11px; color: var(--ink-muted); font-weight: 700; }
.sf-table__foot { padding: 10px 14px; font-size: var(--fs-xs); color: var(--ink-muted); font-weight: 700; background: var(--paper-2); }

.sf-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--s3); }
.sf-stat { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: center; }
.sf-stat img { grid-row: 1 / 3; width: 46px; height: 46px; object-fit: contain; }
.sf-stat__value { font-family: var(--font-display); font-size: var(--fs-xl); line-height: 1; }
.sf-stat__label { font-size: var(--fs-sm); color: var(--ink-soft); font-weight: 800; }

/* VP-by-source bar (stacked, one per player) */
.sf-vpbar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--paper-3); min-width: 160px; }
.sf-vpbar span { display: block; height: 100%; }
.sf-src--celeb { background: var(--zone-star); }
.sf-src--ach   { background: var(--zone-goal); }
.sf-src--pass  { background: var(--zone-pass); }
.sf-src--exch  { background: var(--celeb-orange); }   /* Selfie Exchange */
.sf-src--swag  { background: var(--zone-swag); }      /* Swag and Club cards */
.sf-src--other { background: var(--ink-muted); }
.sf-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: var(--fs-xs); font-weight: 800; color: var(--ink-soft); }
.sf-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; background: var(--sw); vertical-align: -1px; }

@media (max-width: 900px) {
  .sf-end__hero { grid-template-columns: 1fr; }
  .sf-podium__step { width: 90px; }
}

/* ---------------------------------------------------------------------
   20. Log drawer
   --------------------------------------------------------------------- */
.sf-log { display: grid; gap: 2px; max-height: 280px; overflow: auto; font-size: var(--fs-sm); }
.sf-log__hour { margin-top: 6px; font-family: var(--font-display); color: var(--zone-star); }
.sf-log__item { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 3px 0; color: var(--ink-soft); font-weight: 700; }
.sf-log__item::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--pc, var(--line-strong)); transform: translateY(1px); }
.sf-log__item b { color: var(--ink); }

/* ---------------------------------------------------------------------
   21. Landing / setup page
   --------------------------------------------------------------------- */
.sf-landing { min-height: 100vh; }
.sf-hero {
  position: relative;
  display: grid; justify-items: center; text-align: center;
  padding: var(--s5) var(--gutter) 0;
}
.sf-hero__art {
  width: min(1100px, 100%);
  border-radius: var(--r-lg);
  box-shadow: var(--clay-lift);
  display: block;
}
.sf-hero__hook {
  margin: var(--s5) auto var(--s3);
  max-width: 820px;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(24px, 3vw, 40px); line-height: 1.1; color: var(--ink);
}
.sf-hero__sub { max-width: 680px; margin: 0 auto; font-size: var(--fs-lg); color: var(--ink-soft); font-weight: 700; }
.sf-statstrip { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: var(--s4) 0 var(--s5); }
.sf-statstrip__item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px 8px 8px; border-radius: var(--r-pill);
  background: var(--paper); box-shadow: var(--clay-drop);
  font-weight: 900;
}
.sf-statstrip__item img { width: 32px; height: 32px; object-fit: contain; }
.sf-statstrip__item small { display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }

.sf-setup { width: min(920px, calc(100% - 2 * var(--gutter))); margin: 0 auto; padding: var(--s5); }
.sf-setup__grid { display: grid; gap: 10px; }
.sf-seat {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto 36px;
  align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-md);
  background: var(--pc-tint);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--pc) 45%, transparent);
}
.sf-seat__swatch { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--pc); }
.sf-seat__swatch img { width: 30px; }
.sf-input {
  height: 40px; width: 100%; padding: 0 12px;
  border: 0; border-radius: var(--r-sm);
  background: #fff; color: var(--ink);
  font: inherit; font-weight: 800;
  box-shadow: inset 0 2px 3px rgba(110,70,30,.18), inset 0 0 0 2px var(--line);
}
.sf-input:focus { outline: none; box-shadow: inset 0 0 0 3px var(--zone-act); }
.sf-colours { display: flex; gap: 5px; }
.sf-colour {
  width: 24px; height: 24px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: var(--pc); box-shadow: 0 2px 0 rgba(0,0,0,.2);
}
.sf-colour.is-selected { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ink); }
.sf-colour:disabled { opacity: .2; cursor: not-allowed; }   /* taken by another seat */
.sf-seg { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: rgba(255,255,255,.75); box-shadow: inset 0 1px 3px rgba(110,70,30,.25); }
.sf-seg button {
  border: 0; background: transparent; cursor: pointer;
  padding: 6px 12px; border-radius: var(--r-pill);
  font-weight: 900; font-size: var(--fs-sm); color: var(--ink-soft);
}
.sf-seg button.is-selected { background: var(--ink); color: #fff; box-shadow: 0 2px 0 rgba(0,0,0,.3); }
.sf-setup__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-top: var(--s4); }
.sf-setup__hint { font-size: var(--fs-sm); color: var(--ink-muted); font-weight: 700; }
.sf-setup__foot .sf-btn--go { margin-left: auto; }
.sf-details { margin-top: var(--s3); border-radius: var(--r-sm); background: var(--paper-2); padding: 8px 12px; }
.sf-details summary { cursor: pointer; font-weight: 900; }

.sf-section { width: min(1100px, calc(100% - 2 * var(--gutter))); margin: var(--s7) auto 0; }
.sf-section__title { font-size: var(--fs-xxl); margin-bottom: var(--s4); text-align: center; }
.sf-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.sf-step { text-align: center; }
.sf-step img { width: 84px; height: 84px; object-fit: contain; margin: 0 auto var(--s2); display: block; }
.sf-step h3 { font-size: var(--fs-lg); margin-bottom: 4px; }
.sf-step p { margin: 0; color: var(--ink-soft); }
.sf-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.sf-gallery figure { margin: 0; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--clay-drop); background: var(--paper); }
.sf-gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.sf-gallery figcaption { padding: 8px 12px; font-weight: 800; font-size: var(--fs-sm); }
.sf-actiongrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s3); }
.sf-footer { margin-top: var(--s7); padding: var(--s5) var(--gutter); text-align: center; color: var(--ink-muted); font-weight: 700; font-size: var(--fs-sm); }

@media (max-width: 800px) {
  .sf-seat { grid-template-columns: 40px minmax(0, 1fr) 36px; }
  .sf-seat .sf-colours, .sf-seat .sf-seg { grid-column: 1 / -1; }
  .sf-steps, .sf-gallery { grid-template-columns: 1fr; }
}

/* Ambient motes on the landing hero (per-mote custom properties) */
.sf-motes { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.sf-motes i {
  position: absolute; left: var(--x); top: var(--y);
  width: var(--s, 10px); height: var(--s, 10px); border-radius: 50%;
  background: var(--c); opacity: .7;
  animation: sf-drift var(--t, 9s) ease-in-out var(--d, 0s) infinite alternate;
}

/* ---------------------------------------------------------------------
   22. Keyframes
   --------------------------------------------------------------------- */
@keyframes sf-pulse {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.08); }
}
@keyframes sf-glow { from { opacity: .75; } to { opacity: 1; filter: brightness(1.25); } }
@keyframes sf-hop {
  0%, 100% { transform: translateY(0); }
  40%      { transform: translateY(-1.2cqw) rotate(-3deg); }
  70%      { transform: translateY(0) rotate(2deg); }
}
@keyframes sf-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-0.6cqw); } }
@keyframes sf-march { to { stroke-dashoffset: -14; } }
@keyframes sf-pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes sf-drop { from { transform: translateY(-16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sf-rise { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sf-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sf-blink { 50% { opacity: 0; } }
@keyframes sf-flash {
  0%   { opacity: 0; transform: scale(.4); }
  25%  { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.25); }
}
@keyframes sf-float-up {
  0%   { opacity: 0; transform: translateY(10px) scale(.8); }
  15%  { opacity: 1; transform: translateY(0) scale(1); }
  80%  { opacity: 1; transform: translateY(-18px); }
  100% { opacity: 0; transform: translateY(-26px); }
}
@keyframes sf-pour {
  0%   { transform: rotate(0); }
  30%  { transform: rotate(-8deg) scale(1.06); }
  60%  { transform: rotate(4deg); }
  100% { transform: rotate(0); }
}
@keyframes sf-slot-in { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes sf-line-in { from { transform: translateX(-12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sf-confetti {
  0%   { transform: translateY(0) rotate(var(--r)); opacity: 1; }
  100% { transform: translateY(110vh) rotate(calc(var(--r) + 540deg)); opacity: .9; }
}
@keyframes sf-drift { from { transform: translate(0, 0); } to { transform: translate(18px, -26px); } }

/* Every pulse, glow, drift, hop and confetti fall has an off-switch. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .sf-confetti, .sf-motes, .sf-flash, .sf-flash__rays { display: none; }
  .is-legal { animation: none; }
}

/* =====================================================================
   T14 additions go below this line, in marked sections.
   ===================================================================== */

/* ---------------------------------------------------------------------
   T14.1 Stage layout: a prompt bar above the board
   The prompt bar replaces the T7 floating banner position, which covered
   the top row's hall signs. The stage is now prompt bar + square board;
   --board-size is recomputed so the pair still fits the window.
   --------------------------------------------------------------------- */
:root {
  --banner-h: 56px;
  --board-size: min(
                  calc(100vh - var(--topbar-h) - var(--players-h) - 2 * var(--gutter) - var(--banner-h)),
                  calc(100vw - var(--side-l) - var(--side-r-min) - 4 * var(--gutter)));
}
@media (max-width: 700px) {
  :root { --board-size: calc(100vw - 2 * var(--gutter)); }
}
.sf-stage {
  height: auto;
  display: flex; flex-direction: column;
  align-self: start;
}
.sf-promptbar {
  flex: none;
  height: var(--banner-h);
  display: flex; align-items: center; justify-content: center;
  padding-bottom: 6px;
}
.sf-promptbar .sf-banner {
  position: static; margin: 0; width: auto; max-width: 100%; z-index: 2;
  padding: 6px 8px 6px 14px;
  animation: none;
}
.sf-promptbar .sf-banner__text { font-size: var(--fs-sm); line-height: 1.15; min-width: 0; }
.sf-banner--wait { background: var(--ink-soft); }
.sf-banner--wait .sf-banner__step { background: #fff; color: var(--ink); }
.sf-boardwrap { position: relative; flex: none; width: var(--board-size); height: var(--board-size); }
.sf-boardwrap .sf-board { width: 100%; height: 100%; }
/* refusals and notices appear over the prompt bar, where the player is looking */
.sf-boardwrap .sf-toast {
  top: calc(-1 * var(--banner-h) + 2px); bottom: auto;
  max-width: min(640px, calc(100% - 24px));
  z-index: 40;
}
/* Pause / play the route numbers: pinned to the right of the prompt bar, above the board */
.sf-promptbar { position: relative; }
.sf-routemotion {
  position: absolute; right: 0; top: calc(50% - 3px); transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px 5px 9px;
  border: 2px solid var(--line, rgba(0,0,0,.15)); border-radius: var(--r-pill);
  background: #fff; color: var(--ink);
  font: 800 var(--fs-xs)/1 var(--font-ui);
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(40, 30, 20, .18);
}
.sf-routemotion svg { width: 10px; height: 10px; fill: currentColor; }
.sf-routemotion:hover { background: var(--paper-2, #f4efe6); }
.sf-routemotion:focus-visible { outline: 3px solid var(--hi); outline-offset: 2px; }
/* keep the centred prompt clear of the button */
.sf-promptbar:has(.sf-routemotion) .sf-banner { max-width: calc(100% - 300px); }
@media (max-width: 1100px) {
  .sf-promptbar:has(.sf-routemotion) { height: auto; flex-wrap: wrap; gap: 6px; }
  .sf-promptbar:has(.sf-routemotion) .sf-banner { max-width: 100%; }
  .sf-routemotion { position: static; transform: none; }
}
@media (max-width: 700px) {
  .sf-promptbar { height: auto; min-height: var(--banner-h); }
  .sf-boardwrap .sf-toast { top: auto; bottom: 8px; }
}

/* ---------------------------------------------------------------------
   T14.2 Lanyard fixes: the strap prints one word, centred, never cut
   --------------------------------------------------------------------- */
.sf-lanyard__strap { width: 54%; letter-spacing: 0.3em; text-indent: 0.3em; text-overflow: clip; }
.sf-lanyard.is-active.is-bot::after { content: "BOT TURN"; }
.sf-lanyard.is-active:not(.is-bot)::after { content: "YOUR TURN"; }
.sf-lanyard--compact.is-active .sf-lanyard__badge { box-shadow: 0 0 0 3px var(--pc), var(--clay-drop); }
.is-gain-row .sf-selfie { animation: sf-pop var(--t-med) var(--ease-pop); }
.sf-artchip {
  display: inline-block; padding: 1px 6px; border-radius: var(--r-xs);
  background: var(--paper-3); color: var(--ink-soft); font-size: 10px; font-weight: 800;
}

/* ---------------------------------------------------------------------
   T14.3 Board targets: Crew, volunteer spaces, celebrities
   Same three states as halls (legal / illegal-but-clickable / dimmed).
   --------------------------------------------------------------------- */
[data-target] { cursor: pointer; }
.sf-crew.is-legal::after {
  content: ""; position: absolute; inset: -0.6cqw; border-radius: 50%;
  box-shadow: 0 0 0 0.35cqw var(--hi), 0 0 1.4cqw 0.4cqw var(--hi-glow);
  animation: sf-pulse 1.6s ease-in-out infinite; z-index: -1;
}
.sf-crew.is-dimmed { opacity: 0.5; filter: saturate(0.4); }
.sf-crew.is-new { animation: sf-slot-in var(--t-med) var(--ease-pop); }
.sf-vol[data-target].is-legal {
  box-shadow: 0 0 0 0.5cqw var(--hi), 0 0 1.6cqw 0.5cqw var(--hi-glow), 0 0.3cqw 0 rgba(0,0,0,.35) !important;
  animation: sf-pulse 1.6s ease-in-out infinite; z-index: 6;
}
.sf-vol[data-target].is-illegal { outline: 0.3cqw dashed var(--bad); outline-offset: 0.3cqw; cursor: help; }
.sf-vol[data-target].is-dimmed { opacity: 0.45; }
.sf-vol[data-target].is-selected { box-shadow: 0 0 0 0.5cqw #fff, 0 0 0 1cqw var(--hi) !important; }
.sf-celeb[data-target] { pointer-events: auto; cursor: pointer; }
.sf-celeb.is-legal { filter: drop-shadow(0 0 0.9cqw var(--hi)) drop-shadow(0 0 0.5cqw var(--hi)); animation: sf-pulse 1.6s ease-in-out infinite; }
.sf-celeb.is-illegal { outline: 0.35cqw dashed var(--bad); outline-offset: 0.3cqw; border-radius: 1cqw; cursor: help; }
.sf-celeb.is-selected { filter: drop-shadow(0 0 1cqw var(--hi)); }
.sf-hall__tag { white-space: nowrap; max-width: 96%; overflow: hidden; text-overflow: ellipsis; }
.sf-hall__pieces .sf-dest { pointer-events: none; }
.sf-card[data-target].is-dimmed { opacity: 0.55; }
.sf-price--short { box-shadow: 0 2px 0 var(--bad); }
.sf-price--short img { opacity: 0.55; filter: grayscale(0.6); }
.sf-card--zoom-none:hover { transform: none; }

/* ---------------------------------------------------------------------
   T14.4 Side panel details
   --------------------------------------------------------------------- */
.sf-action__why { display: none; }
@media (max-width: 1400px) {
  .sf-action[aria-disabled="true"] .sf-action__why { display: block; }
}
.sf-action[aria-disabled="true"] { cursor: help; }
.sf-rung__btns { display: grid; gap: 4px; margin-top: 6px; }
.sf-rung__btns .sf-btn { min-height: 30px; padding: 0 8px; font-size: 12px; }
.sf-rung.is-legal { z-index: 1; }
.sf-trade[aria-disabled="true"] { opacity: 0.5; cursor: help; }
.sf-generic__prompt { margin: 0 0 var(--s2); font-weight: 800; color: var(--ink-soft); }
.sf-generic__list { display: grid; gap: 6px; max-height: 60vh; overflow: auto; }
.sf-generic__btn { justify-content: flex-start; text-align: left; height: auto; min-height: 36px; padding: 6px 14px; font-size: var(--fs-sm); line-height: 1.2; }
.sf-log--tall { max-height: 56vh; }
.sf-log__item.is-auto { opacity: 0.65; font-style: italic; }

/* ---------------------------------------------------------------------
   T14.5 Popups: Achievement and card pickers, Selfie steppers, choices
   --------------------------------------------------------------------- */
.sf-modal--wide { width: min(760px, 100%); }
.sf-picks { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: var(--s3); }
.sf-pick { display: grid; gap: 8px; justify-items: center; width: 190px; text-align: center; align-content: start; }
.sf-pick .sf-btn { width: 100%; }
.sf-pick__name { font-family: var(--font-display); font-size: var(--fs-lg); line-height: 1.05; }
.sf-pick__text { font-size: var(--fs-xs); color: var(--ink-soft); font-weight: 700; min-height: 2.6em; }
.sf-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px; margin-top: var(--s3); }
.sf-choice { justify-content: flex-start; gap: 4px; flex-wrap: wrap; min-height: 48px; padding: 6px 12px; text-align: left; }
.sf-steppers { display: grid; gap: 10px; margin: var(--s3) 0; }
.sf-stepper { display: grid; grid-template-columns: minmax(0, 1fr) auto 36px auto; align-items: center; gap: 10px; }
.sf-stepper__lbl { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; text-transform: capitalize; }
.sf-stepper__lbl small { color: var(--ink-muted); font-weight: 700; text-transform: none; }
.sf-stepper__n { font-family: var(--font-display); font-size: var(--fs-xl); text-align: center; }
.sf-settings { display: grid; gap: var(--s4); }
.sf-settings__row { margin-top: 6px; }
.sf-rules { font-size: var(--fs-sm); }
.sf-rules ul { padding-left: 20px; }
.sf-score__selfies { list-style: none; margin: 0 0 10px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--paper-2); display: grid; gap: 2px; font-weight: 800; font-size: var(--fs-sm); }
.sf-score__selfies li { display: flex; align-items: center; gap: 6px; }
.sf-score__band { margin: 0 0 8px; font-weight: 800; color: var(--ink-soft); }
.sf-score__next { margin-right: auto; align-self: center; font-size: 13px; color: var(--ink-muted); font-weight: 800; }
.sf-handover__card p { margin: 0; }

/* ---------------------------------------------------------------------
   T14.6 End screen page and the minimal setup page
   --------------------------------------------------------------------- */
.sf-endpage { position: relative; min-height: 100vh; }
.sf-endpage > .sf-confetti { position: fixed; z-index: 0; opacity: 0.8; }
.sf-landing--min .sf-hero__art { width: min(560px, 100%); }
.sf-landing--min { padding-bottom: var(--s6); }

/* ---------------------------------------------------------------------
   T14.7 Fixes found while building
   --------------------------------------------------------------------- */
/* Volunteer spaces sit on the hall art, above the queue, so queue slot 5 (bottom right) is never hidden behind them */
.sf-hall__vols { bottom: calc(42% + 0.7cqw); right: 0.9cqw; }
/* the route of a celebrity who has not walked yet is a light preview: it must not hide hall signs or art */
.sf-lanyard__strap { line-height: 16px; }
@media (max-width: 1400px) {
  :root { --players-h: 100px; }
  .sf-lanyard__strap { line-height: 12px; }
}


/* =====================================================================
   T16 additions: end-screen Stats tab, "your last games", bug reporter
   ===================================================================== */

/* ---- Scores / Stats tabs ---- */
.sf-tabs { display: flex; gap: var(--s2); flex-wrap: wrap; }
.sf-tab {
  font-family: var(--font-ui); font-weight: 900; font-size: var(--fs-md);
  min-height: 44px; padding: 0 var(--s5); border: 0; border-radius: var(--r-pill);
  background: var(--paper-3); color: var(--ink-soft); cursor: pointer;
  box-shadow: 0 3px 0 var(--line-strong);
}
.sf-tab:hover { color: var(--ink); }
.sf-tab.is-selected { background: var(--zone-act); color: #fff; box-shadow: 0 3px 0 var(--zone-act-2); }
.sf-tab:focus-visible { outline: 3px solid var(--hi); outline-offset: 2px; }
.sf-tabpanel { display: grid; gap: var(--s5); }
.sf-tabpanel[hidden] { display: none; }

/* ---- Stats tab ---- */
.sf-statstab { display: grid; gap: var(--s5); }
.sf-stats__none { margin: 0; color: var(--ink-muted); font-weight: 700; font-size: var(--fs-sm); }
.sf-stats__fine { margin: 4px 0 0; color: var(--ink-soft); font-size: var(--fs-sm); font-weight: 700; }
.sf-pstats__grid { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; }
.sf-pstats { display: grid; gap: var(--s3); padding: var(--s4); border-top: 6px solid var(--pc, var(--line-strong)); }
.sf-pstats__head { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.sf-pstats__head h3 { margin: 0; font-size: var(--fs-lg); }
.sf-pstats__rank { color: var(--ink-muted); font-weight: 900; }
.sf-pstats__vp { margin-left: auto; font-weight: 900; font-size: var(--fs-md); }
.sf-pstats__vp b { font-size: var(--fs-xl); font-family: var(--font-display); font-weight: 400; }
.sf-pstats h4 { margin: 0 0 4px; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.sf-pstats h4 small { text-transform: none; letter-spacing: 0; font-weight: 700; color: var(--ink-muted); margin-left: 4px; }
.sf-pstats__big { margin: 0; font-weight: 800; }
.sf-pstats__warn { color: var(--bad); }
.sf-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sf-bars__row { display: grid; grid-template-columns: minmax(96px, 150px) 1fr 2.2em; align-items: center; gap: var(--s2); font-size: var(--fs-sm); font-weight: 800; }
.sf-bars__track { height: 12px; border-radius: var(--r-pill); background: var(--paper-3); overflow: hidden; }
.sf-bars__fill { display: block; height: 100%; border-radius: var(--r-pill); }
.sf-bars__value { text-align: right; }
.sf-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.sf-pill { padding: 2px 10px; border-radius: var(--r-pill); font-size: var(--fs-sm); font-weight: 800; background: var(--paper-3); }
.sf-pill--green { background: var(--celeb-green-soft); box-shadow: inset 0 0 0 2px var(--celeb-green); }
.sf-pill--red { background: var(--celeb-red-soft); box-shadow: inset 0 0 0 2px var(--celeb-red); }
.sf-pill--orange { background: var(--celeb-orange-soft); box-shadow: inset 0 0 0 2px var(--celeb-orange); }
.sf-hourchips { display: flex; gap: 6px; flex-wrap: wrap; }
.sf-hourchip { display: grid; place-items: center; min-width: 48px; padding: 4px 8px; border-radius: var(--r-sm); background: var(--paper-3); font-weight: 900; color: var(--ink-muted); }
.sf-hourchip small { font-size: 10px; letter-spacing: .08em; font-weight: 900; }
.sf-hourchip.has { background: var(--pc-tint, var(--paper-2)); color: var(--ink); box-shadow: inset 0 0 0 2px var(--pc, var(--line-strong)); }
.sf-stats__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: var(--fs-sm); }
.sf-stats__list li span { color: var(--ink-soft); font-weight: 700; }
.sf-pstats p { margin: 0; font-size: var(--fs-sm); }
.sf-celebtable { font-weight: 700; }
.sf-celebtable summary { cursor: pointer; font-weight: 900; padding: var(--s2) 0; }

/* ---- Lead chart (inline SVG) ---- */
.sf-chart { margin: 0; }
.sf-chart svg { width: 100%; height: auto; display: block; }
.sf-chart__grid { stroke: var(--line); stroke-width: 1; }
.sf-chart__tick { fill: var(--ink-muted); font: 800 12px var(--font-ui); }
.sf-chart__line { fill: none; stroke: var(--pc); stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; }
.sf-chart__dot { fill: var(--pc); stroke: var(--paper); stroke-width: 2; }
.sf-chart__dot.is-lead { stroke: var(--ink); stroke-width: 2.5; }
.sf-chart__legend { display: flex; gap: var(--s4); flex-wrap: wrap; margin: var(--s2) 0; font-weight: 900; font-size: var(--fs-sm); }
.sf-chart__key { display: inline-block; width: 22px; height: 6px; border-radius: 3px; background: var(--pc); margin-right: 6px; vertical-align: middle; }
.sf-chart__lead { display: flex; gap: 6px; flex-wrap: wrap; font-size: var(--fs-sm); font-weight: 700; color: var(--ink-soft); }
.sf-leadchip { padding: 2px 8px; border-radius: var(--r-pill); background: var(--paper-3); }
.sf-leadchip.is-tie { background: var(--paper-2); }

/* ---- Your last games (landing page) ---- */
.sf-hist { margin-top: var(--s5); }
.sf-hist__list { list-style: none; margin: var(--s3) 0; padding: 0; display: grid; gap: var(--s2); }
.sf-hist__row { display: grid; grid-template-columns: 9.5em 1fr auto; gap: 2px var(--s3); padding: var(--s2) var(--s3); border-radius: var(--r-sm); background: var(--paper-2); font-size: var(--fs-sm); font-weight: 700; }
.sf-hist__when { color: var(--ink-muted); }
.sf-hist__win { font-weight: 900; }
.sf-hist__meta { color: var(--ink-soft); text-align: right; }
.sf-hist__table { grid-column: 1 / -1; display: flex; gap: var(--s3); flex-wrap: wrap; color: var(--ink-soft); }
@media (max-width: 640px) {
  .sf-hist__row { grid-template-columns: 1fr; }
  .sf-hist__meta { text-align: left; }
  .sf-bars__row { grid-template-columns: minmax(80px, 120px) 1fr 2em; }
}

/* ---- Bug reporter: button on document.body, dialog over everything ---- */
.bug-fab {
  position: fixed; right: 12px; bottom: 12px; z-index: 900;
  min-height: 32px; padding: 0 12px; border: 0; border-radius: var(--r-pill);
  font-family: var(--font-ui); font-weight: 800; font-size: 12px; cursor: pointer;
  background: var(--paper); color: var(--ink-soft); opacity: .8;
  box-shadow: 0 2px 0 var(--line-strong), 0 0 0 1px var(--line);
}
.bug-fab:hover, .bug-fab:focus-visible { opacity: 1; color: var(--ink); }
.bug-fab:focus-visible { outline: 3px solid var(--hi); outline-offset: 2px; }
/* In a game every corner holds play (Swag deck, queues), so the button shrinks to a
   small "!" circle there and shows its label on hover or keyboard focus. The label
   stays in the DOM (clipped, not removed) so screen readers still announce it. */
body.sf-page--game .bug-fab:not(:hover):not(:focus-visible) { width: 34px; min-height: 34px; padding: 0; border-radius: 50%; }
body.sf-page--game .bug-fab:not(:hover):not(:focus-visible)::before { content: '!'; font-size: 16px; line-height: 1; }
body.sf-page--game .bug-fab:not(:hover):not(:focus-visible) span {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.bug-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: var(--gutter, 16px); background: rgba(42, 31, 23, .55); overflow: auto; }
.bug-card { width: min(640px, 100%); max-height: 100%; overflow: auto; display: grid; gap: var(--s3); padding: var(--s5); border-radius: var(--r-md); background: var(--paper); color: var(--ink); box-shadow: var(--clay-lift, 0 8px 24px rgba(0,0,0,.3)); }
.bug-card h2 { margin: 0; font-size: var(--fs-xl); }
.bug-id, .bug-note { margin: 0; font-size: var(--fs-sm); color: var(--ink-soft); font-weight: 700; }
.bug-row { display: grid; gap: 4px; font-weight: 800; font-size: var(--fs-sm); }
.bug-row input, .bug-row select, .bug-row textarea { font: inherit; font-weight: 600; padding: 8px 10px; border-radius: var(--r-sm); border: 2px solid var(--line-strong); background: #fff; color: var(--ink); }
.bug-actions { display: flex; gap: var(--s2); flex-wrap: wrap; }
.bug-btn { min-height: 40px; padding: 0 var(--s4); border: 0; border-radius: var(--r-pill); font-family: var(--font-ui); font-weight: 900; cursor: pointer; background: var(--paper-3); color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; box-shadow: 0 3px 0 var(--line-strong); }
.bug-btn--primary { background: var(--zone-act); color: #fff; box-shadow: 0 3px 0 var(--zone-act-2); }
.bug-btn--small { min-height: 28px; padding: 0 10px; font-size: 12px; }
.bug-btn:focus-visible { outline: 3px solid var(--hi); outline-offset: 2px; }
.bug-status { margin: 0; min-height: 1.2em; font-size: var(--fs-sm); font-weight: 800; color: var(--good); }
.bug-fallback { width: 100%; font: 12px/1.3 monospace; }
.bug-past { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: var(--fs-sm); }
.bug-past__id { font-family: monospace; font-weight: 700; }
.bug-pastbox summary { cursor: pointer; font-weight: 800; font-size: var(--fs-sm); }


/* =====================================================================
   T17 polish: landing page, How to play, responsive layout, ambient
   motion and accessibility. Token values change inside media queries;
   components are only re-laid-out, never restyled from scratch.
   ===================================================================== */

/* ---- T17.1 Landing hero ---- */
.sf-landing { padding-bottom: var(--s5); overflow-x: clip; }
.sf-hero__frame { position: relative; width: min(1100px, 100%); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--clay-lift); }
.sf-hero__frame .sf-hero__art { width: 100%; box-shadow: none; border-radius: 0; aspect-ratio: 1400 / 684; object-fit: cover; }
/* crowd shimmer: a slow sheen of stage light across the hero art */
.sf-hero__frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 246, 214, .28) 48%, transparent 61%);
  transform: translateX(-100%);
  animation: sf-shimmer 9s ease-in-out 1.5s infinite;
}
@keyframes sf-shimmer { 0% { transform: translateX(-100%); } 35%, 100% { transform: translateX(100%); } }
ul.sf-statstrip { list-style: none; padding: 0; }
/* the setup panel shows above the fold on a laptop: the hero art is capped by the window height */
.sf-hero__frame { width: min(1100px, 100%, calc(40vh * 1400 / 684)); }
.sf-hero > :not(.sf-motes) { position: relative; }   /* text sits above the drifting motes */
.sf-actiongrid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
@media (min-width: 561px) and (max-width: 800px) {
  /* T7 stacks these at 800 px; three across still reads well down to a large phone */
  .sf-steps, .sf-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  /* seat row: swatch, name and remove on one line; colours and seat type below */
  .sf-seat [data-remove] { grid-row: 1; grid-column: 3; }
}
.sf-hero__sub { padding: 0 4px; }

/* ---- T17.2 Setup panel ---- */
.sf-setup__title { font-size: var(--fs-xl); }
.sf-landing__hist { width: min(920px, calc(100% - 2 * var(--gutter))); margin: 0 auto; }
.sf-landing__hist:empty { display: none; }
/* colour dots carry their initial, and a taken colour is struck through (not only faded) */
.sf-colour { display: grid; place-items: center; width: 28px; height: 28px; color: var(--pc-ink); font-size: 11px; font-weight: 900; line-height: 1; }
.sf-colour:disabled {
  opacity: .45;
  background-image: linear-gradient(135deg, transparent 44%, var(--ink) 44% 56%, transparent 56%);
}
.sf-colour:focus-visible, .sf-seg button:focus-visible, .sf-select:focus-visible, .sf-details summary:focus-visible { outline: 3px solid var(--zone-act); outline-offset: 2px; }
.sf-seg button { min-height: 32px; }
.sf-seg button:hover:not(.is-selected) { color: var(--ink); }

.sf-variants summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.sf-variants__count { font-size: var(--fs-xs); font-weight: 800; color: var(--ink-muted); }
.sf-variants__intro { margin: 8px 0 var(--s3); color: var(--ink-soft); font-size: var(--fs-sm); }
.sf-variants__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--s3); margin-bottom: var(--s3); }
.sf-variant { display: grid; gap: 4px; align-content: start; padding: 8px 10px; border-radius: var(--r-sm); background: var(--paper); }
.sf-variant.is-changed { box-shadow: inset 0 0 0 2px var(--zone-act); }
.sf-variant label { font-weight: 900; font-size: var(--fs-sm); }
.sf-variant__desc { margin: 0; font-size: var(--fs-xs); color: var(--ink-muted); font-weight: 700; }
.sf-select {
  width: 100%; min-height: 36px; padding: 0 8px;
  border: 0; border-radius: var(--r-sm); background: #fff; color: var(--ink);
  font: inherit; font-size: var(--fs-sm); font-weight: 800;
  box-shadow: inset 0 0 0 2px var(--line);
}

/* ---- T17.3 Below the fold ---- */
.sf-action--static { cursor: default; }
.sf-action--static:hover { transform: none; }
.sf-about__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s5); align-items: start; }
.sf-about__grid p { margin: 0 0 var(--s3); font-size: var(--fs-md); color: var(--ink-soft); }
.sf-features { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.sf-features li { padding: 10px 14px; border-radius: var(--r-md); background: var(--paper); box-shadow: var(--clay-drop); font-size: var(--fs-sm); }
.sf-footer p { margin: 4px 0; }
.sf-footer a { color: var(--zone-act-2); font-weight: 800; }
.sf-footer a:focus-visible { outline: 3px solid var(--zone-act); outline-offset: 2px; border-radius: 4px; }

/* ---- T17.4 How to play (landing view and in-game Rules modal) ---- */
.sf-htp-view { z-index: 70; }
.sf-htp-view .sf-modal, .sf-scrim[data-modal="rules"] .sf-modal { width: min(820px, 100%); }
.sf-modal__title:focus { outline: none; }
.sf-htp { display: grid; gap: var(--s4); font-size: var(--fs-sm); }
.sf-htp h3 { font-size: var(--fs-lg); margin: 0 0 6px; color: var(--zone-act-2); }
.sf-htp p { margin: 0 0 8px; }
.sf-htp ul, .sf-htp ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.sf-htp section { scroll-margin-top: 12px; }
.sf-htp__toc { display: flex; flex-wrap: wrap; gap: 6px; }
.sf-htp__toc a { padding: 3px 10px; border-radius: var(--r-pill); background: var(--paper-3); color: var(--ink); font-weight: 800; font-size: var(--fs-xs); text-decoration: none; }
.sf-htp__toc a:hover, .sf-htp__toc a:focus-visible { background: var(--zone-act); color: #fff; }
.sf-htp__table { border-collapse: collapse; margin: 4px 0 8px; font-weight: 800; }
.sf-htp__table th, .sf-htp__table td { padding: 4px 12px; border: 2px solid var(--line); text-align: center; }
.sf-htp__table th[scope="row"] { text-align: left; background: var(--paper-2); }
.sf-htp__table .is-now { background: var(--hi-soft); }
.sf-htp__fine { font-size: var(--fs-xs); color: var(--ink-muted); font-weight: 700; }
ul.sf-htp__acts { list-style: none; padding: 0; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 8px; }
.sf-htp__act { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 10px; border-radius: var(--r-sm); background: var(--paper-2); }
.sf-htp__acticon img { width: 36px; height: 36px; object-fit: contain; }
.sf-htp__cost { display: inline-block; padding: 0 8px; border-radius: var(--r-pill); background: var(--crema); color: var(--coffee); font-size: var(--fs-xs); font-weight: 900; }

/* ---- T17.5 Ambient motion: idle lanyards sway on their straps ---- */
@keyframes sf-sway { 0%, 100% { transform: rotate(-0.6deg); } 50% { transform: rotate(0.6deg); } }
.sf-players .sf-lanyard:not(.is-active) .sf-lanyard__badge { transform-origin: 50% -20px; animation: sf-sway 7s ease-in-out infinite; }
.sf-players .sf-lanyard:nth-child(2n):not(.is-active) .sf-lanyard__badge { animation-delay: -2.5s; animation-duration: 8s; }
.sf-players .sf-lanyard:nth-child(3n):not(.is-active) .sf-lanyard__badge { animation-delay: -4s; }

/* ---- T17.6 Accessibility: visible focus on every control ---- */
.sf-btn:focus-visible, .sf-action:focus-visible, [data-target]:focus-visible { outline: 3px solid var(--zone-act); outline-offset: 2px; }
.sf-handover .sf-btn:focus-visible { outline-color: #fff; }

/* ---- T17.6b End screen: the grid track never grows wider than the window ---- */
.sf-end { grid-template-columns: minmax(0, 1fr); }
.sf-end > * { min-width: 0; }
.sf-tabpanel { grid-template-columns: minmax(0, 1fr); }
.sf-tabpanel > * { min-width: 0; }   /* the wide scores table scrolls inside its own box */
.sf-stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.sf-endpage { overflow-x: clip; }
.sf-endpage > .sf-confetti { overflow: hidden; }
@media (max-width: 700px) {
  .sf-end__hero { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .sf-end__title { font-size: clamp(30px, 9vw, 44px); }
  .sf-podium { flex-wrap: wrap; justify-content: center; }
  .sf-podium__step { width: 96px; }
}

/* ---- T17.7 Tablet portrait and phone: one column, the page scrolls ----
   At 900 px and below the side panel cannot sit beside a useful board, so
   the phone layout of T7 section 4.3 starts here. */
@media (max-width: 900px) {
  :root { --board-size: min(calc(100vw - 2 * var(--gutter)), 760px); --players-h: auto; }
  body.sf-page--game { height: auto; overflow: auto; }
  .sf-game {
    height: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    grid-template-areas: "top" "players" "board" "side";
  }
  .sf-game > .sf-stage { justify-self: center; }
  .sf-game { overflow-x: clip; }   /* walk chips and flashes at the board edge never widen the page */
  .sf-side { overflow: visible; }
  .sf-players { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
  .sf-topbar { flex-wrap: wrap; row-gap: 6px; padding: 6px var(--s2); min-height: var(--topbar-h); }
  .sf-topbar__spacer { display: none; }
  .sf-topbar__menu { margin-left: auto; }
}
@media (max-width: 700px) {
  .sf-topbar { gap: 6px; justify-content: space-between; }
  .sf-topbar__logo { height: 34px; }
  .sf-hour-marker { width: 42px; height: 42px; }
  .sf-hour-marker span { font-size: 18px; }
  .sf-hours { order: 5; width: 100%; justify-content: center; gap: 4px; }
  .sf-hour { height: 30px; padding: 0 6px 0 4px; }
  .sf-hour__face { width: 20px; height: 20px; }
  .sf-phases { order: 6; }
  .sf-topbar__menu { gap: 4px; }
  .sf-topbar__menu .sf-btn { min-width: 40px; padding: 0 10px; }
  .sf-players { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .sf-players .sf-lanyard__avatar { display: none; }
  .sf-players .sf-lanyard__head { grid-template-columns: minmax(0, 1fr) auto; }
  /* leave room at the foot of every page for the "Report a problem" button */
  body { padding-bottom: 52px; }
  .sf-hero { padding-top: var(--s3); }
  .sf-hero__sub { font-size: var(--fs-md); }
  .sf-statstrip__item { padding: 6px 12px 6px 6px; }
  .sf-setup { padding: var(--s4) var(--s3); }
  .sf-seat { gap: 8px; padding: 8px; }
  .sf-seat .sf-seg { justify-self: stretch; display: flex; }
  .sf-seat .sf-seg button { flex: 1; padding: 6px 4px; }
  .sf-setup__foot .sf-btn--go { margin-left: 0; width: 100%; }
  .sf-about__grid { grid-template-columns: 1fr; }
  .sf-section__title { font-size: var(--fs-xl); }
  .sf-modal { padding: var(--s4) var(--s3); }
  .sf-scrim { padding: 8px; }
}

@media (max-width: 700px) {
  .sf-hour-marker { display: none; }   /* the current Hour plate is purple; the marker repeats it */
  .sf-hours { order: 5; width: auto; flex: 1 1 auto; justify-content: flex-start; flex-wrap: wrap; }
  .sf-phases { order: 6; }
  .sf-market { flex-wrap: wrap; gap: 6px; }
}
@media (max-width: 480px) {
  :root { --card-sm: 48px; }
  .sf-hour .sf-hour__face { display: none; }
  .sf-hour { padding: 0 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .sf-hero__frame::after { display: none; }
  .sf-players .sf-lanyard__badge { animation: none !important; transform: none !important; }
}

/* ---- Celebrity route toggles: click a celebrity (board figure, This Hour list, top-bar Hour) to show or hide its route ---- */
.sf-celeb.is-route-shown:not(.is-legal):not(.is-selected) { filter: drop-shadow(0 0 0.4cqw #fff) drop-shadow(0 0 0.9cqw var(--cc)); }
.sf-celeb[data-route-toggle]:focus-visible { outline: 3px solid var(--hi); outline-offset: 2px; border-radius: 1cqw; }
.sf-hour[data-route-toggle] { cursor: pointer; }
.sf-hour[data-route-toggle]:hover { filter: brightness(1.06); }
.sf-hour[data-route-toggle]:focus-visible { outline: 3px solid var(--hi); outline-offset: 2px; }
.sf-hour.is-route-shown { box-shadow: var(--clay-drop), inset 0 0 0 3px var(--hi); }
.sf-hour.is-current.is-route-shown { box-shadow: 0 3px 0 #5a33ad, inset 0 0 0 3px var(--hi); }
.sf-also { flex-wrap: wrap; }
.sf-also__item--toggle {
  appearance: none; border: 2px solid transparent; border-radius: var(--r-pill);
  background: transparent; padding: 2px 10px 2px 2px; cursor: pointer;
  font-family: var(--font-ui); font-size: var(--fs-xs); font-weight: 800; color: var(--ink-soft);
}
.sf-also__item--toggle:hover { background: var(--paper-2); }
.sf-also__item--toggle.is-route-shown { border-color: var(--cc); color: var(--ink); background: var(--cc-soft, var(--paper-2)); }
.sf-also__item--toggle:focus-visible, .sf-route-btn:focus-visible { outline: 3px solid var(--hi); outline-offset: 2px; }
.sf-route-btn {
  margin-left: 6px; padding: 3px 9px; border: 2px solid var(--cc, var(--line)); border-radius: var(--r-pill);
  background: #fff; color: var(--ink); cursor: pointer;
  font-family: var(--font-ui); font-size: 11px; font-weight: 800; line-height: 1.2;
}
.sf-route-btn.is-route-shown { background: var(--cc, var(--ink)); color: #fff; }
.sf-route-hint { margin-top: 4px; font-size: var(--fs-xs); color: var(--ink-soft); }

/* ---- Celebrity panel as a sliding frame: one slide per Hour, arrows, dots and "n / 5" ---- */
.sf-now-viewport { overflow-x: clip; overflow-y: visible; touch-action: pan-y; border-radius: var(--r-sm); }
.sf-now-viewport:focus-visible { outline: 3px solid var(--hi); outline-offset: 3px; }
.sf-now-track { display: flex; transition: transform 0.32s var(--ease-out, ease); will-change: transform; }
.sf-now-slide { flex: 0 0 100%; min-width: 0; }
.sf-now-slide.is-done .sf-now { opacity: 0.6; }
.sf-now-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: var(--s2); }
.sf-now-nav__btn {
  width: 34px; height: 34px; padding: 0 0 3px; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--paper-2); color: var(--ink); box-shadow: var(--clay-drop);
  font-family: var(--font-ui); font-size: 24px; font-weight: 900; line-height: 1;
}
.sf-now-nav__btn:hover:not(:disabled) { background: var(--hi); }
.sf-now-nav__btn:disabled { opacity: 0.35; cursor: default; }
.sf-now-nav__dots { display: flex; align-items: center; gap: 6px; }
.sf-now-dot { width: 13px; height: 13px; padding: 0; border: 2px solid var(--cc); border-radius: 50%; background: transparent; cursor: pointer; transition: transform 0.2s; }
.sf-now-dot.is-viewed { background: var(--cc); transform: scale(1.3); }
.sf-now-dot.is-current { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--zone-star); }
.sf-now-dot.is-done { opacity: 0.45; }
.sf-now-nav__count { min-width: 3.2em; text-align: center; font-family: var(--font-ui); font-size: var(--fs-sm); font-weight: 900; color: var(--ink-soft); }
.sf-now-back {
  padding: 4px 10px; border: 2px solid var(--zone-star); border-radius: var(--r-pill); cursor: pointer;
  background: #fff; color: var(--zone-star); font-family: var(--font-ui); font-size: 11px; font-weight: 800;
}
.sf-now-nav__btn:focus-visible, .sf-now-dot:focus-visible, .sf-now-back:focus-visible { outline: 3px solid var(--hi); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .sf-now-track { transition: none; } }
.sf-now-viewport { transition: height 0.32s var(--ease-out, ease); }
.sf-now-track { align-items: flex-start; }
@media (prefers-reduced-motion: reduce) { .sf-now-viewport { transition: none; } }
/* the track is as tall as the tallest slide and hangs below the frame: only the slide on show takes clicks */
.sf-now-track { pointer-events: none; }
.sf-now-slide.is-viewed { pointer-events: auto; }
