@charset "UTF-8";
/*
  Slim's Swamp Show shell styles (working title).
  Every colour lives in a :root token below; components only reference tokens.
  Palette: bayou night, moss and sawgrass greens, cypress browns, blackwater teal,
  sunset orange, bone text and hibiscus pink as the rare pop.
*/
:root {
  color-scheme: dark;

  /* Surfaces, darkest to lightest. */
  --bg: #0f1712;              /* bayou night */
  --surface-sunk: #0a120d;    /* inputs, stage tiles, track rows */
  --surface-1: #16231b;       /* cards, venues */
  --surface-2: #1d2e22;       /* raised: console, dialog, cartridge */
  --surface-3: #273c2c;       /* secondary buttons, hover fills */
  --line: #2c4031;            /* hairlines */
  --line-strong: #4a6347;     /* frames around console, cartridge, dialog */

  /* Text. */
  --ink: #f3e9d2;             /* bone */
  --muted: #bdb69e;           /* sawgrass grey: body copy, labels */
  --faint: #a29d86;           /* quiet labels; still >= 4.5:1 on every surface */

  /* Board. */
  --board: #07100b;
  --cell: #1f3426;
  --cell-deep: #142319;
  --cell-line: #3b5a40;
  --cell-hover: #2b4733;
  --cell-ready: #4a3424;      /* cypress ground: three charges, about to burst */
  --cell-ready-deep: #31221a;
  --cell-ready-line: #b8865a;
  --cell-burst: #b5652a;
  --dot-off: #41594a;
  --gem-ink: #0f1712;
  --cork: #b8865a;            /* jug corks; jug bodies are colored from config.js */
  --steam: #fff8e1;
  --gem-glint: #ffffff45;

  /* Accents. */
  --sawgrass: #a9cc5b;        /* primary: moss / sawgrass green */
  --sawgrass-bright: #c9e58a;
  --moss: #4f7a2c;
  --sunset: #ff9a3c;          /* stars, rewards, bursts */
  --teal: #7fcfbf;            /* blackwater teal, lit for dark backgrounds */
  --teal-deep: #2f6e66;
  --hibiscus: #ff6b97;        /* rare pop: hints and errors */
  --cypress: #7a5233;
  --on-accent: #13200f;       /* text on sawgrass fills */

  /* Washes, glows and shadows. */
  --sawgrass-wash: #a9cc5b17;
  --sawgrass-edge: #a9cc5b8c;
  --sunset-glow: #ff9a3c80;
  --spark: #fff1c2;
  --glow-sunset: #ff9a3c1c;
  --glow-moss: #4f7a2c2e;
  --scanline: #ffffff05;
  --callout-bg: #0a120deb;
  --scrim: #050a07cc;
  --shadow: #000000;
  --shadow-hard: #02060399;   /* chunky offset shadows */
  --shadow-soft: #00000066;
  --bandana: #c2412d;         /* Slim's bandana: the stage-clear flag */
  --doubloon: #f2c14e;        /* gold doubloons: the shared wallet (as in The Run) */
  --doubloon-edge: #a2521a;
  --ticket-ink: #4a3424;      /* the Backstage Pass: its print, on the ticket art's bone card */

  /* Tour map: ground per venue region, trail surfaces and scenery (tour-map.js). */
  --map-ink: #0a120d;         /* outlines */
  --map-shade: #02060380;     /* trail drop shadow */
  --map-fog: #0a120d99;       /* trail not reached yet */
  --map-flats: #33461f;       /* Palmetto Flats: dry palmetto green */
  --map-flats-light: #415a27;
  --map-sand: #5e4d31;
  --map-gator: #13383a;       /* Gator Hole: blackwater */
  --map-gator-deep: #0e2c2e;
  --map-mud: #2b3a22;
  --map-cypress: #142319;     /* Big Cypress: deep swamp forest */
  --map-cypress-deep: #0d1812;
  --map-cypress-floor: #1c2f20;
  --map-juke: #1a1a30;        /* Okeechobee: night water under the sunset sky */
  --map-juke-deep: #141428;
  --map-leaf-dark: #2d4a22;
  --map-leaf: #4f7a2c;
  --map-leaf-light: #9bbf4a;
  --map-trunk: #8a5f3c;
  --map-trunk-dark: #5c3f2a;
  --map-bark: #3a2a1f;
  --map-moss: #7d8a6a;
  --map-ripple: #2f6e66;
  --map-night-ripple: #3b3560;
  --map-sparkle: #8fd3c1;
  --map-firefly: #ffd49b;
  --map-firefly-glow: #ffd49b55;
  --map-hog: #3a2a24;
  --map-hog-light: #5a4034;
  --map-snout: #d98c8c;
  --map-neon: #ff5c9a;        /* juke-joint neon and lily flowers */
  --trail-sand: #d2b783;      /* dirt path */
  --trail-plank: #9a6b43;     /* boardwalk */
  --trail-plank-gap: #4a3424;
  --trail-peat: #8e6a45;
  --trail-dock: #b8865a;
  --node-shade: #c2ad86;      /* cleared stage tile, lower edge */
  --node-shine: #ffffff55;

  /* Type. Web fonts are optional: every stack ends in faces that ship with the OS. */
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Pixelify Sans", "Trebuchet MS", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, Menlo, Consolas, "Courier New", monospace;

  font-family: var(--font-body);
  /* Pixelify Sans draws its "fi" ligature as a broken glyph, so ligatures stay off. */
  font-variant-ligatures: none;
  background: var(--bg);
  color: var(--ink);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  min-height: 100svh;
  background:
    radial-gradient(ellipse at 85% 6%, var(--glow-sunset), transparent 42%),
    radial-gradient(ellipse at 8% 100%, var(--glow-moss), transparent 50%),
    var(--bg);
}
button, input, textarea { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; touch-action: manipulation; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--sawgrass);
  outline-offset: 4px;
}
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
h1, h2 { font-family: var(--font-display); letter-spacing: 0; }
h1 { font-size: clamp(34px, 3.8vw, 52px); line-height: 1.06; font-weight: 700; }
h2 { font-size: 26px; font-weight: 600; }
a { color: inherit; text-decoration: none; }

/* Shared monospace label style. */
.edition, .eyebrow, .micro, .section-label, .cartridge-top, .cartridge-bottom, .tiny, footer,
.console-hud small, .song-card small {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
}

/* ---------- App shell ---------- */
.app { max-width: 1260px; padding: 0 48px; margin: auto; }
.topbar {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  background: none;
  border: 0;
  padding: 0;
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: .5px;
}
.brand-name { font-weight: inherit; white-space: nowrap; }
.brand span { font-size: 11px; align-self: flex-start; margin-top: 8px; letter-spacing: 0; color: var(--sunset); }
.header-tools { display: flex; align-items: center; gap: 18px; }
.edition { color: var(--muted); }
.icon-button {
  border: 1px solid var(--line);
  background: transparent;
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 17px;
}
.icon-button:hover { border-color: var(--line-strong); background: var(--surface-1); }
.icon-button span { font-size: 11px; margin-left: 6px; }
.sound-word, .sound-state { font-style: normal; }
.screen { padding: 40px 0 32px; animation: appear .25s ease; }
main:focus { outline: none; }

/* ---------- Buttons ---------- */
.primary {
  border: 0;
  background: var(--sawgrass);
  color: var(--on-accent);
  border-radius: 9px;
  padding: 15px 20px;
  min-height: 49px;
  font-weight: 750;
  display: inline-flex;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 0 var(--moss);
  transition: transform .15s, background .15s, box-shadow .15s;
}
.primary:hover { background: var(--sawgrass-bright); transform: translateY(-2px); box-shadow: 0 6px 0 var(--moss); }
.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--moss); }
.secondary {
  border: 1px solid var(--line-strong);
  background: var(--surface-3);
  border-radius: 8px;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
}
.secondary:hover { border-color: var(--sawgrass); }
.text-button {
  border: 0;
  background: none;
  padding: 9px 0;
  min-height: 44px;
  text-align: left;
  font-size: 12px;
  color: var(--muted);
}
.text-button:hover { color: var(--sawgrass); }

/* ---------- Home ---------- */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; min-height: 365px; }
.eyebrow { color: var(--sawgrass); line-height: 1.5; }
.eyebrow i {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--sawgrass);
  margin-right: 5px;
  border-radius: 50%;
}
.hero h1 { font-size: clamp(48px, 4.9vw, 68px); margin: 20px 0; line-height: 1.02; }
.hero h1 em { color: var(--sunset); font-family: inherit; font-style: normal; font-weight: inherit; }
.intro { font-size: 17px; line-height: 1.7; color: var(--muted); }
.hero-actions { display: flex; gap: 20px; align-items: center; margin: 26px 0 22px; }
.micro { color: var(--faint); letter-spacing: 1.2px; }

.cartridge {
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface-2);
  padding: 11px;
  transform: rotate(1.3deg);
  box-shadow: 10px 12px 0 var(--shadow-hard);
  overflow: hidden;
}
.cartridge-top, .cartridge-bottom {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  padding: 6px 3px 12px;
  letter-spacing: .6px;
}
.cartridge-bottom { padding: 14px 3px 3px; }
.cartridge-bottom b { color: var(--sawgrass); font-weight: 400; }
.lamp { color: var(--sawgrass); }
.scene-wrap {
  position: relative;
  border: 4px solid var(--board);
  background: var(--surface-1);
  border-radius: 5px;
  overflow: hidden;
}
.scene { display: block; width: 100%; image-rendering: pixelated; aspect-ratio: 1.65; object-fit: cover; }
.scene-caption {
  position: absolute;
  bottom: 12px;
  left: 15px;
  font: 700 10px var(--font-mono);
  letter-spacing: 1px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-shadow: 0 1px 0 var(--shadow), 0 0 6px var(--shadow);
}
.scene-caption b { font: 600 15px var(--font-display); letter-spacing: .5px; color: var(--ink); }

.section-label {
  display: flex;
  justify-content: space-between;
  color: var(--faint);
  margin: 46px 0 15px;
  letter-spacing: 1.4px;
}
.mode-card {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(140deg, var(--surface-2), var(--surface-1));
  padding: 22px 19px;
  text-align: left;
  position: relative;
  min-height: 184px;
  transition: border-color .2s, transform .2s;
}
.mode-card:hover { transform: translateY(-4px); border-color: var(--sawgrass); }
.mode-icon { font-size: 28px; color: var(--sawgrass); min-width: 26px; line-height: 1; }
.daily-card .eyebrow, .daily-card .mode-icon { color: var(--sunset); }
.daily-card:hover { border-color: var(--sunset); }
.flow-card .eyebrow, .flow-card .mode-icon { color: var(--teal); }
.flow-card:hover { border-color: var(--teal); }
/* ---------- The Gig Run, the hero (encore.js renderRunCard): the six-level journey strip ----------
   One step per level (boots, airboat, motorcycle, limo, fist, guitar: the sprite at the top of
   index.html), its state from The Run's own save via save.js: padlocked until the level before it is
   won, NEXT on the one to play, a tick once cleared. The same strip, smaller, heads the tour map. */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.gig-card {
  margin: 24px 0 16px;
  padding: 16px 18px 4px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: linear-gradient(140deg, var(--surface-2), var(--surface-1));
  box-shadow: 8px 9px 0 var(--shadow-hard);
}
.gig-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin-bottom: 16px; }
.gig-card .eyebrow, .gig-panel .eyebrow { color: var(--hibiscus); }
.gig-count { font: 700 10px/1.5 var(--font-mono); letter-spacing: 1px; color: var(--muted); }
.journey {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* The trail between the steps, behind the tiles. */
.journey::before { content: ''; position: absolute; left: 8%; right: 8%; top: 21px; border-top: 2px dashed var(--line-strong); }
.jstep { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; text-align: center; }
.jtile {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-sunk);
  color: var(--ink);
}
.jicon { display: block; width: 24px; height: 24px; shape-rendering: crispEdges; }
.jnum { font: 700 10px/1.2 var(--font-mono); letter-spacing: 1px; color: var(--hibiscus); }
.jname { font-size: 11px; line-height: 1.25; color: var(--ink); overflow-wrap: anywhere; }
.jmark { display: none; font-style: normal; }
.jlock, .jdone {
  position: absolute;
  right: -7px;
  width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 3px;
  box-shadow: 1px 1px 0 var(--shadow-hard);
}
.jlock { bottom: -7px; color: var(--ink); background: #2a2a24; border: 1px solid var(--line-strong); }
.jlock .lock-glyph { display: block; width: 7px; height: 8px; shape-rendering: crispEdges; }
.jdone { top: -7px; font: 700 11px/1 var(--font-mono); color: var(--on-accent); background: var(--sawgrass); }
.jnext {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 5px 1px;
  border-radius: 3px;
  font: 700 8px/1.2 var(--font-mono);
  letter-spacing: .6px;
  text-transform: uppercase;
  color: #1b1511;
  background: var(--sunset);
  box-shadow: 1px 1px 0 var(--shadow-hard);
}
.jstep[data-state="locked"] .jtile { color: var(--faint); border-style: dashed; background: var(--surface-1); }
.jstep[data-state="locked"] .jicon { opacity: .5; }
.jstep[data-state="locked"] .jnum, .jstep[data-state="locked"] .jname { color: var(--faint); }
.jstep[data-state="locked"] .jlock { display: grid; }
.jstep[data-state="new"] .jtile { color: var(--sunset); border-color: var(--sunset); animation: jstep-glow 1.6s steps(2) infinite; }
.jstep[data-state="new"] .jnext { display: block; }
.jstep[data-state="cleared"] .jtile { color: var(--sawgrass); border-color: var(--moss); background: var(--sawgrass-wash); }
.jstep[data-state="cleared"] .jdone { display: grid; }
@keyframes jstep-glow { 50% { box-shadow: 0 0 0 4px var(--sunset-glow); } }
.gig-card .hero-actions { flex-wrap: wrap; gap: 12px 16px; margin: 18px 0 14px; }
.gig-play { min-width: 230px; }
/* The encore (run.html?encore): once the show is won, beside Play the Gig Run. */
.encore-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 16px;
  border: 2px solid var(--doubloon);
  border-radius: 999px;
  background: #2c2038;
  color: var(--doubloon);
  font: 700 12px/1 var(--font-mono);
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 3px 3px 0 var(--shadow-hard);
  transition: transform .15s;
}
.encore-chip:hover { transform: translateY(-2px); }
/* Start over (run.html?startover): a small quiet link once there is a run to lose; the level pick asks first. */
.gig-startover {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 2px;
  color: var(--hibiscus);
  font: 700 12px/1 var(--font-mono);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.gig-startover:hover { color: var(--ink); }
/* CERTIFIED FLORIDA MAN (save.js floridaMan): the trophy for all six levels on the top tier, under the strip. */
.fm-badge {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 16px 0 0;
  padding: 6px 12px 5px;
  border: 2px solid var(--doubloon);
  border-radius: 4px;
  background: #2a1610;
  box-shadow: 3px 3px 0 var(--shadow-hard);
  color: var(--muted);
  font-size: 12px;
}
.fm-badge[hidden] { display: none; }
.fm-badge b { font: 700 12px/1.2 var(--font-mono); letter-spacing: 1px; color: var(--doubloon); }
.fm-gator { display: block; width: 28px; height: 16px; color: var(--sawgrass); shape-rendering: crispEdges; }

/* ---------- The bonus game: Moonshine Puzzles, with Daily and Endless beside it ---------- */
.bonus-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: 15px; }
.bonus-grid .mode-card { min-height: 0; }
@media (max-width: 1050px) {
  .bonus-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bonus-grid .puzzle-card { grid-column: 1 / -1; }
}
.puzzle-card:hover { transform: none; border-color: var(--line); }
.puzzle-card .mode-icon { color: var(--cork); }
.jug-ico { display: block; width: 28px; height: 28px; shape-rendering: crispEdges; }
.puzzle-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.puzzle-actions .secondary span { color: var(--sawgrass); }

/* ---------- The tour map's GIG RUN panel (the Run's trailhead, as a panel over the map) ---------- */
.gig-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px 22px;
  margin: 0 0 18px;
  padding: 14px 18px;
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--hibiscus);
  border-radius: 10px;
  background: linear-gradient(140deg, var(--surface-2), var(--surface-1));
  box-shadow: 8px 9px 0 var(--shadow-hard);
}
.gig-panel h2 { margin: 2px 0; font-size: 21px; }
.gig-panel .journey { max-width: 420px; justify-self: center; width: 100%; }
.journey-mini { gap: 4px; }
.journey-mini::before { top: 17px; }
.journey-mini .jtile { width: 36px; height: 36px; }
.journey-mini .jicon { width: 20px; height: 20px; }
.journey-mini .jname { display: none; }
.gig-panel-go { white-space: nowrap; }
.card-content { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-content .eyebrow { letter-spacing: .8px; }
.card-content strong { font-family: var(--font-display); font-size: 21px; font-weight: 600; }
.card-content > span:not(.eyebrow) { color: var(--muted); font-size: 13px; line-height: 1.6; }
.card-content small { font: 10px var(--font-mono); color: var(--muted); margin-top: 6px; }
.card-arrow { position: absolute; right: 16px; bottom: 20px; font-size: 18px; color: var(--faint); }
.home-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.tiny { font-weight: 400; color: var(--muted); letter-spacing: .15px; line-height: 1.7; }
.resume {
  border: 1px solid var(--sawgrass);
  background: var(--sawgrass-wash);
  color: var(--sawgrass);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  min-height: 44px;
}
footer {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 8px 15px;
  flex-wrap: wrap;
  padding: 22px 0 27px;
  color: var(--faint);
  font-weight: 400;
  letter-spacing: .6px;
  line-height: 1.7;
}
footer b { color: var(--sawgrass); padding: 0 7px; }
/* The padding gives the inline link a 44px tap height; the negative margin keeps the line height. */
footer a { color: var(--muted); display: inline-block; padding: 14px 0; margin: -14px 0; }
footer a:hover { color: var(--sawgrass); }

/* ---------- Tour ---------- */
.screen-heading { display: flex; justify-content: space-between; gap: 25px; align-items: center; margin: 10px 0 35px; }
.screen-heading h1 { margin: 15px 0; }
.screen-heading p:not(.eyebrow) { color: var(--muted); font-size: 14px; line-height: 1.7; }
.star-total {
  border: 1px solid var(--line);
  padding: 15px 20px;
  border-radius: 10px;
  font: 700 15px var(--font-mono);
  color: var(--sunset);
  white-space: nowrap;
}
#tour .screen-heading { margin-bottom: 24px; }

/* The overworld: one map you travel. tour-map.js paints the ground, trail and scenery as
   an SVG; encore.js places venue signposts, stage buttons and Slim on top, in pixels. */
.overworld {
  --tile: 44px;
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border: 3px solid var(--line-strong);
  border-radius: 6px;
  background: var(--map-cypress);
  box-shadow: 8px 9px 0 var(--shadow-hard);
}
.overworld-art { position: absolute; top: 0; left: 0; display: block; }

/* Venue signposts. Each holds the venue's h2, so the stages after it are grouped under it. */
.map-region { --venue: var(--sawgrass); }
.map-sign {
  position: absolute;
  z-index: 2;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 10px 9px;
  background: var(--callout-bg);
  border: 2px solid var(--venue);
  border-radius: 3px;
  box-shadow: 4px 4px 0 var(--shadow-hard);
}
.map-region.locked .map-sign { border-style: dashed; }
.map-sign-icon { flex: none; width: 48px; height: 48px; image-rendering: pixelated; font-size: 36px; color: var(--venue); }
.map-sign-text { min-width: 0; }
.map-sign-meta { font: 700 10px/1.4 var(--font-mono); letter-spacing: .8px; color: var(--muted); }
.map-sign-stars { color: var(--sunset); white-space: nowrap; }
.map-sign h2 { font-size: 19px; line-height: 1.1; margin: 3px 0 2px; }
.map-sign-tagline { font-size: 12px; line-height: 1.35; color: var(--muted); }
.map-sign-reward { font: 700 10px/1.45 var(--font-mono); letter-spacing: .4px; color: var(--venue); margin-top: 4px; }

.map-start {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  font: 700 11px var(--font-mono);
  letter-spacing: 1.5px;
  color: var(--on-accent);
  background: var(--sunset);
  border: 3px solid var(--map-ink);
}

/* Stage stops: a numbered tile on the trail, star pips once cleared, then the stage name. */
.stage {
  position: absolute;
  z-index: 3;
  width: var(--name-w, 96px);
  transform: translate(-50%, calc(var(--tile) / -2));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
}
.stage-tile {
  --face: var(--sawgrass);
  --edge: var(--moss);
  position: relative;
  display: grid;
  place-items: center;
  width: var(--tile);
  height: var(--tile);
  font: 700 21px/1 var(--font-display);
  color: var(--on-accent);
  background: var(--face);
  border: 3px solid var(--map-ink);
  box-shadow: inset 0 -5px 0 var(--edge), inset 0 3px 0 var(--node-shine), 0 4px 0 var(--map-ink);
  transition: transform .12s;
}
.stage.cleared .stage-tile { --face: var(--ink); --edge: var(--node-shade); color: var(--map-ink); }
/* Locked stops are dimmed trail stones, still numbered. */
.stage.locked .stage-tile {
  --face: var(--surface-1);
  --edge: var(--surface-sunk);
  color: var(--faint);
  transform: scale(.8);
  box-shadow: inset 0 -4px 0 var(--edge), 0 3px 0 var(--map-ink);
}
.stage:not(:disabled):hover .stage-tile { transform: translateY(-3px); }
.stage:focus-visible { outline: none; }
.stage:focus-visible .stage-tile { outline: 3px solid var(--sawgrass); outline-offset: 4px; }
/* The next stage pings; with calm motion the ring simply stays. */
.stage.current .stage-tile::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 3px solid var(--sawgrass);
  opacity: .6;
  animation: node-ping 1.2s steps(3) infinite;
}
.stage-flag { position: absolute; left: calc(100% - 6px); bottom: calc(100% - 3px); width: 18px; height: 27px; }
.stage.fresh .stage-flag { animation: flag-plant .45s steps(3) .5s both; }
.stage-pips { display: flex; gap: 4px; }
.stage-pips i {
  width: 7px;
  height: 7px;
  background: var(--dot-off);
  box-shadow: 0 0 0 2px var(--map-ink);
}
.stage-pips i.on { background: var(--sunset); }
.stage-name {
  max-width: 100%;
  padding: 2px 4px 3px;
  font: 600 11px/1.25 var(--font-body);
  overflow-wrap: break-word;
  color: var(--ink);
  text-align: center;
  background: var(--callout-bg);
  border-radius: 2px;
}
.stage.locked .stage-name { color: var(--faint); }

/* Slim on the map: idles with a two-frame bob, hops faster while walking the trail. */
.map-avatar {
  position: absolute;
  z-index: 4;
  width: 48px;
  height: 57px;
  image-rendering: pixelated;
  pointer-events: none;
  filter: drop-shadow(3px 3px 0 var(--shadow-hard));
  animation: avatar-idle 1.2s steps(1) infinite;
}
.map-avatar.walking { animation: avatar-walk .24s steps(1) infinite; }
.tm-twinkle { animation: twinkle 1.8s steps(1) infinite; }
.tm-delay-1 { animation-delay: -.6s; }
.tm-delay-2 { animation-delay: -1.2s; }

.tour-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 28px; }
.tour-footer > span { font-size: 12px; color: var(--muted); }

/* ---------- Game: session column ---------- */
.game-layout {
  /* The console shrinks on short screens so the tools row stays on screen. */
  --console-w: clamp(330px, calc(100vh - 352px), 470px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--console-w);
  gap: 56px;
  max-width: 990px;
  margin: 0 auto;
  align-items: start;
}
@supports (height: 100svh) {
  .game-layout { --console-w: clamp(330px, calc(100svh - 352px), 470px); }
}
.session-info > .eyebrow { margin-top: 18px; }
.session-info h1 { font-size: 40px; margin: 10px 0; }
.session-info > p:not(.eyebrow) { color: var(--muted); font-size: 14px; }
.objective { margin-top: 24px; border-left: 2px solid var(--sawgrass); padding: 0 0 0 18px; }
.objective strong { display: block; font-family: var(--font-display); font-size: 24px; font-weight: 600; margin: 8px 0; }
.objective p { font-size: 13px; line-height: 1.6; color: var(--muted); }
.progress-track { height: 4px; background: var(--line); margin-top: 15px; border-radius: 5px; overflow: hidden; }
.progress-track > div { height: 100%; width: 0; background: var(--sawgrass); transition: width .3s; }
.rule-card { display: flex; align-items: center; gap: 20px; margin: 24px 0 4px; }
.rule-card p { font-size: 13px; line-height: 1.7; color: var(--muted); }
.rule-card b { color: var(--ink); }
.rule-card p span { font-size: 11px; }
/* Rule-card jug: 12x16 pixel sprite at 3px per pixel, drawn by encore.js. */
.mini-gem { flex: none; width: 36px; height: 48px; }
.song-card {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 24px;
  display: flex;
  gap: 16px;
  align-items: center;
}
.song-card small { color: var(--muted); font-weight: 400; letter-spacing: .6px; }
.song-card b { display: block; font-family: var(--font-display); font-size: 15px; font-weight: 600; margin: 6px 0; }
.song-card span { font-size: 11px; color: var(--sawgrass); line-height: 1.5; display: block; }
.equalizer { display: flex; gap: 3px; align-items: center; height: 38px; }
.equalizer i { display: block; width: 4px; height: 12px; background: var(--sawgrass); }
.equalizer i:nth-child(2) { height: 26px; }
.equalizer i:nth-child(3) { height: 35px; background: var(--sunset); }
.equalizer i:nth-child(4) { height: 21px; }
body.music-on .equalizer i { animation: equalize .7s ease-in-out infinite alternate; }
body.music-on .equalizer i:nth-child(even) { animation-delay: -.3s; }

/* ---------- Game: console ---------- */
.game-console {
  border: 1px solid var(--line-strong);
  background: linear-gradient(155deg, var(--surface-2), var(--surface-1));
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 8px 9px 0 var(--shadow-hard);
}
.console-hud { display: flex; justify-content: space-between; text-align: center; margin-bottom: 12px; gap: 15px; }
.console-hud small { color: var(--muted); display: block; }
.console-hud strong { font: 700 24px/1.1 var(--font-mono); display: block; margin-top: 4px; color: var(--ink); }
.console-hud .moves strong { color: var(--sawgrass); }
.mix-strip { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 1px 12px; }
.mix-strip small { font: 700 10px var(--font-mono); letter-spacing: .8px; color: var(--muted); }
.mix-parts { display: flex; gap: 5px; margin-top: 5px; }
.mix-part {
  font: 10px var(--font-mono);
  color: var(--muted);
  background: var(--surface-sunk);
  border: 1px solid var(--line-strong);
  padding: 3px 7px;
  border-radius: 4px;
  transition: background .3s, color .3s;
}
.mix-part.lit { color: var(--sawgrass-bright); background: var(--sawgrass-wash); border-color: var(--sawgrass-edge); }
.mix-strip .text-button { color: var(--sawgrass); font-size: 12px; white-space: nowrap; min-height: 44px; }

.board-shell { position: relative; isolation: isolate; }
.board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  background: var(--board);
  border: 1px solid var(--cell-line);
  padding: 10px;
  border-radius: 10px;
  position: relative;
}
.cell {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--cell-line);
  border-radius: 7px;
  background: linear-gradient(145deg, var(--cell), var(--cell-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: background .12s;
}
.cell:hover:not(:disabled) { background: var(--cell-hover); border-color: var(--muted); }
.cell:disabled { cursor: default; }
/* Board pieces are pixel moonshine jugs: inline SVG from encore.js, colors from config.js. */
.gem {
  /* A 12x16 jug is narrower than its box, so the box runs larger than a round piece would. */
  width: 76%;
  height: 76%;
  /* The sprite keeps headroom for the cork to lift; this re-centers the jug and clears the dots. */
  margin-bottom: 12%;
  position: relative;
  filter: drop-shadow(0 4px 2px var(--shadow-soft));
}
.gem svg, .mini-gem svg { display: block; width: 100%; height: 100%; }
/* The pressure numeral sits on the jug's body, below the neck. */
.charge-num {
  position: absolute;
  z-index: 1;
  font: 700 13px var(--font-mono);
  top: 47%;
  color: var(--gem-ink);
  text-shadow: 0 1px 0 var(--gem-glint);
}
.charge-dots { position: absolute; bottom: 6px; left: 0; right: 0; display: flex; gap: 3px; justify-content: center; }
.charge-dots i { width: 4px; height: 4px; background: var(--dot-off); border-radius: 1px; }
.charge-dots i.on { background: var(--jug-light); }
.cell.ready {
  background: linear-gradient(140deg, var(--cell-ready), var(--cell-ready-deep));
  border-color: var(--cell-ready-line);
}
.cell.ready .gem { filter: brightness(1.15); }
.cell.empty .gem { opacity: .2; transform: scale(.65); }
.cell.empty .charge-num { color: var(--muted); text-shadow: none; }
.cell.hint { outline: 3px solid var(--hibiscus); outline-offset: -2px; }
.cell.bursting { animation: burst .27s ease-out; background: var(--cell-burst); }

/* Readable cascades: charge packets and the chain callout. */
#charge-effects {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
  border-radius: 10px;
}
.charge-packet {
  position: absolute;
  width: 7px;
  height: 7px;
  background: var(--spark);
  box-shadow: 0 0 9px var(--sunset), 0 0 15px var(--hibiscus);
  border-radius: 2px;
}
/* The chain callout sits over the tap legend just below the board, so it never covers a cell. */
#chain-callout {
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  transform: translate(-50%, -6px);
  z-index: 4;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  background: var(--callout-bg);
  border: 1px solid var(--sawgrass-edge);
  border-radius: 6px;
  color: var(--sawgrass);
  font: 700 11px var(--font-mono);
  letter-spacing: .8px;
  padding: 5px 11px;
  transition: opacity .12s, transform .12s;
}
#chain-callout.visible { opacity: 1; transform: translate(-50%, 0); }
.charge-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font: 700 10px var(--font-mono);
  color: var(--muted);
  letter-spacing: .6px;
  padding: 10px 2px 0;
  transition: opacity .12s;
}
.board-shell:has(#chain-callout.visible) + .charge-legend { opacity: 0; }
.charge-legend span { color: var(--ink); font-size: 11px; white-space: nowrap; }
.charge-legend i { font-style: normal; color: var(--muted); padding: 0 2px; }
.charge-legend b { color: var(--sunset); }
.game-feedback { min-height: 60px; text-align: center; padding: 10px 0; }
.game-feedback strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--sawgrass);
}
.game-feedback > span { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.console-tools { display: flex; gap: 8px; justify-content: center; }
.console-tools .secondary { flex: 1; font-size: 12px; padding: 9px 6px; }

/* ---------- Result ---------- */
.result-card { text-align: center; max-width: 520px; margin: 0 auto; padding: 0 25px 18px; }
.result-record {
  width: 95px;
  height: 95px;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, var(--board) 0 3px, var(--surface-3) 3px 4px);
  margin: 25px auto;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 1px var(--line-strong);
}
.result-record span {
  display: grid;
  place-items: center;
  background: var(--sunset);
  color: var(--on-accent);
  border-radius: 50%;
  width: 35px;
  height: 35px;
  font-size: 20px;
}
.result-card h1 { font-size: 44px; }
.result-stars { color: var(--sunset); font-size: 26px; letter-spacing: 7px; margin: 20px 0 13px; }
.result-score { font: 700 52px var(--font-mono); color: var(--sawgrass); }
#result-unit { font: 10px var(--font-mono); color: var(--muted); letter-spacing: 2px; margin: 6px 0 20px; }
#result-detail { color: var(--muted); font-size: 13px; line-height: 1.7; }
.result-stats { display: flex; justify-content: center; gap: 30px; margin: 24px 0; }
.result-stats span { font-size: 11px; color: var(--muted); }
.result-stats b { display: block; font: 700 20px var(--font-mono); color: var(--ink); margin-bottom: 6px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.result-actions .text-button { flex-basis: 100%; text-align: center; }
.unlock-message {
  border: 1px solid var(--sawgrass);
  background: var(--sawgrass-wash);
  color: var(--sawgrass);
  padding: 14px;
  border-radius: 9px;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.6;
}
.xp-earned { margin: -6px 0 20px; font: 700 13px/1.4 var(--font-mono); letter-spacing: 1px; color: var(--sawgrass); }
#share-box { text-align: left; margin: 14px 0; }
#share-box label { font-size: 11px; color: var(--muted); }
textarea {
  display: block;
  width: 100%;
  resize: vertical;
  background: var(--surface-sunk);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  margin: 8px 0;
  font: 11px/1.7 var(--font-mono);
}

/* ---------- Dialogs ---------- */
dialog {
  width: min(470px, calc(100% - 32px));
  max-height: 88dvh;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface-2);
  color: var(--ink);
  padding: 26px;
  box-shadow: 0 20px 90px var(--shadow-soft), 8px 9px 0 var(--shadow-hard);
}
dialog::backdrop { background: var(--scrim); backdrop-filter: blur(4px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
dialog p { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 14px 0; }
dialog .primary { margin: 10px 0; }
dialog .text-button { margin-left: 8px; }
.track {
  display: flex;
  gap: 15px;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-sunk);
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: 9px;
  width: 100%;
  text-align: left;
  margin: 8px 0;
}
.track:disabled { background: transparent; border-style: dashed; }
.track:disabled b, .track:disabled > span:last-child { color: var(--faint); }
.track.selected { border-color: var(--sawgrass); }
.track b { display: block; font-size: 13px; }
.track small { display: block; font-size: 11px; color: var(--muted); margin-top: 6px; }
.track > span:last-child { font-size: 12px; color: var(--sawgrass); flex: none; }
/* Slim's own recordings: first in the list, tagged in sunset orange. */
.track.recording { border-left: 3px solid var(--sunset); }
.track.recording.selected { border-color: var(--sawgrass); border-left-color: var(--sunset); }
.track-tag { display: block; font-style: normal; font-size: 10px; letter-spacing: .6px; color: var(--sunset); margin-bottom: 6px; }
/* An 8-bit sketch of one of his songs: right after the recordings, a dashed edge (not his recording). */
.track.sketch { border-left: 3px dashed var(--sunset); }
.track.sketch.selected { border-color: var(--sawgrass); border-left-color: var(--sunset); }
.volume-label { display: flex; justify-content: space-between; font-size: 12px; margin: 24px 0 8px; }
input[type=range] { width: 100%; accent-color: var(--sawgrass); min-height: 44px; }
.setting-row {
  background: none;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  text-align: left;
  font-size: 12px;
  align-items: center;
  margin-top: 15px;
}
.setting-row small { display: block; color: var(--muted); font-size: 11px; margin-top: 6px; }
.setting-row b { color: var(--sawgrass); }
.upload-track { display: block; font-size: 12px; margin: 22px 0 12px; }
.upload-track small { display: block; font-size: 11px; color: var(--muted); line-height: 1.7; margin-top: 8px; }
input[type=file] { max-width: 100%; font-size: 11px; }
input::file-selector-button {
  border: 1px solid var(--line-strong);
  background: var(--surface-3);
  color: var(--ink);
  border-radius: 6px;
  padding: 9px;
  margin-right: 9px;
}
.rules-list { padding-left: 23px; font-size: 14px; line-height: 1.8; color: var(--muted); }
.rules-list li { margin: 12px 0; }
#code-form > label { font-size: 12px; display: block; margin: 20px 0 9px; }
input[type=text], #board-code {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface-sunk);
  padding: 13px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 16px;
}
.error { color: var(--hibiscus) !important; }

/* ---------- Utilities ---------- */
#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sawgrass);
  color: var(--on-accent);
  padding: 14px 22px;
  border-radius: 9px;
  box-shadow: 0 10px 40px var(--shadow-soft);
  font-size: 13px;
  max-width: calc(100% - 32px);
  z-index: 20;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  clip: rect(0, 0, 0, 0);
  overflow: hidden;
  white-space: nowrap;
}
.noscript { padding: 30px; text-align: center; }

/* ---------- Progression: header badge, tour rank strip, level-up toast (progress.js) ---------- */
.level-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-1);
  font: 700 11px/1 var(--font-mono);
  letter-spacing: .5px;
  white-space: nowrap;
}
.badge-level { display: flex; align-items: baseline; gap: 3px; color: var(--muted); }
.badge-level b { font: 700 19px/1 var(--font-display); color: var(--sawgrass); }
.badge-meter { display: flex; flex-direction: column; gap: 5px; }
.badge-rank { font-size: 9px; letter-spacing: 1px; color: var(--muted); }
.badge-meter .xp-bar { width: 100px; }
.badge-coins { display: flex; align-items: center; gap: 5px; color: var(--doubloon); }
.xp-bar {
  position: relative;
  height: 6px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--surface-sunk);
}
.xp-bar i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  background: var(--sawgrass);
  box-shadow: inset 0 2px 0 var(--sawgrass-bright);
  transition: width .6s steps(8);
}
/* A gold doubloon: an octagon with a shaded rim, to match the pixel coins in The Run. */
.coin {
  display: inline-block;
  flex: none;
  width: 12px;
  height: 12px;
  background: var(--doubloon);
  box-shadow: inset -2px -2px 0 var(--doubloon-edge);
  clip-path: polygon(25% 0, 75% 0, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0 75%, 0 25%);
}
.rank-strip {
  margin: 0 0 16px;
  padding: 12px 16px 10px;
  border: 3px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface-2);
  box-shadow: 8px 9px 0 var(--shadow-hard);
}
.rank-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; }
.rank-title { font: 700 20px/1.15 var(--font-display); letter-spacing: .5px; }
.rank-coins { display: flex; align-items: center; gap: 6px; font: 700 14px/1 var(--font-mono); color: var(--doubloon); }
.rank-coins span { font-size: 10px; letter-spacing: 1px; color: var(--muted); }
.rank-strip .xp-bar { height: 10px; margin: 9px 0 7px; }
.rank-sub {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  font: 700 10px/1.4 var(--font-mono);
  letter-spacing: .6px;
  color: var(--muted);
}
.rank-how { color: var(--faint); }
.level-toast {
  position: fixed;
  top: 92px;
  left: 50%;
  z-index: 21;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  max-width: calc(100% - 32px);
  padding: 12px 22px 13px;
  transform: translateX(-50%);
  border: 3px solid var(--sunset);
  border-radius: 6px;
  background: var(--surface-2);
  box-shadow: 6px 7px 0 var(--shadow-hard), 0 0 40px var(--sunset-glow);
  text-align: center;
  pointer-events: none;
  animation: level-pop .45s steps(4) both;
}
.level-toast b { font: 700 26px/1 var(--font-display); letter-spacing: 2px; color: var(--sunset); }
.level-toast span { font: 700 11px/1.3 var(--font-mono); letter-spacing: 1px; color: var(--ink); }
.calm *, .calm *:before, .calm *:after { animation: none !important; transition: none !important; }

.result-card .result-record { animation: record-arrive .4s ease-out; }

/* Stage clear: Slim strums beside a flagpole while the flag runs up.
   Every resting style is the finished pose, so calm motion shows the raised flag. */
.clear-beat { position: relative; width: 168px; height: 104px; margin: 22px auto 10px; }
.beat-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 9px;
  background: var(--map-leaf-dark);
  box-shadow: inset 0 3px 0 var(--map-leaf), 0 3px 0 var(--map-ink);
}
.beat-pole {
  position: absolute;
  left: 112px;
  bottom: 9px;
  width: 6px;
  height: 90px;
  background: var(--ink);
  box-shadow: inset -3px 0 0 var(--node-shade);
}
.beat-pole::before {
  content: "";
  position: absolute;
  left: -3px;
  top: -6px;
  width: 12px;
  height: 6px;
  background: var(--sunset);
}
.beat-flag { position: absolute; left: 6px; top: 3px; animation: flag-raise .9s steps(6) .35s both; }
/* The pole is drawn by CSS, so only the cloth of the shared flag art shows. */
.beat-flag-art { display: block; width: 36px; height: 54px; margin-left: -6px; clip-path: inset(0 0 45% 6px); }
.beat-avatar {
  position: absolute;
  left: 26px;
  bottom: 6px;
  width: 64px;
  height: 76px;
  image-rendering: pixelated;
  transform-origin: 50% 100%;
  animation: strum .16s steps(1) .3s 6, beat-hop .36s steps(3) 1.35s;
}
.beat-notes i {
  position: absolute;
  top: 18px;
  opacity: 0;
  font: 700 17px/1 var(--font-display);
  font-style: normal;
  color: var(--sunset);
  animation: note-rise 1.1s steps(5) .4s;
}
.beat-notes i:nth-child(1) { left: 4px; }
.beat-notes i:nth-child(2) { left: 38px; animation-delay: .7s; color: var(--map-neon); }
.beat-notes i:nth-child(3) { left: 72px; animation-delay: 1s; }
.result-card .result-stars { animation: stars-arrive .5s ease-out; }

/* ---------- Motion ---------- */
@keyframes appear { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes burst {
  0% { transform: scale(1); }
  35% { transform: scale(1.13); box-shadow: 0 0 20px var(--sunset-glow); }
  100% { transform: scale(1); }
}
@keyframes equalize { to { transform: scaleY(.4); } }
@keyframes avatar-idle { 50% { transform: translateY(-3px); } }
@keyframes avatar-walk { 50% { transform: translateY(-6px); } }
@keyframes node-ping { from { transform: scale(.85); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
@keyframes twinkle { 50% { opacity: .25; } }
@keyframes flag-plant { from { transform: translateY(12px); opacity: 0; } }
@keyframes flag-raise { from { transform: translateY(54px); } }
@keyframes strum { 50% { transform: rotate(-4deg) translateY(-2px); } }
@keyframes beat-hop { 50% { transform: translateY(-12px); } }
@keyframes note-rise {
  from { transform: translateY(14px); opacity: 1; }
  to { transform: translateY(-26px); opacity: 0; }
}
@keyframes record-arrive {
  from { transform: rotate(-25deg) scale(.85); opacity: 0; }
  to { transform: rotate(0) scale(1); opacity: 1; }
}
@keyframes stars-arrive { from { letter-spacing: 12px; opacity: 0; } to { letter-spacing: 7px; opacity: 1; } }
@keyframes level-pop {
  from { transform: translateX(-50%) translateY(-16px) scale(.8); opacity: 0; }
  to { transform: translateX(-50%); opacity: 1; }
}

/* ---------- Game screen chrome: compact header so the board and tools fit ---------- */
body[data-screen=game] .topbar { height: 64px; }
body[data-screen=game] #game { padding-top: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 1050px) {
  .app { padding: 0 30px; }
  .hero { gap: 30px; }
  .mode-card { gap: 10px; padding: 18px 14px; }
  .card-content strong { font-size: 18px; }
  .game-layout { gap: 35px; grid-template-columns: minmax(0, 1fr) min(430px, var(--console-w)); }
  .edition { display: none; }
}

@media (max-width: 760px) {
  .app { padding: 0 20px; }
  .topbar { height: 64px; }
  .header-tools { gap: 8px; }
  .brand { font-size: 24px; }
  .brand img { width: 26px; height: 26px; }
  /* Phones: the two-word name stacks into a compact lockup, so the sound toggle keeps its label. */
  .brand-name { white-space: normal; width: min-content; line-height: .88; text-align: left; }
  .icon-button { padding: 8px 10px; }
  .screen { padding: 24px 0; }

  /* Home */
  .hero { grid-template-columns: 1fr; gap: 26px; }
  .hero h1 { font-size: 46px; margin: 16px 0; }
  .hero-copy { padding: 3px 0; }
  .hero-actions { margin: 21px 0 16px; }
  .cartridge { max-width: 550px; width: 100%; justify-self: center; transform: rotate(.6deg); }
  .intro { font-size: 15px; }
  .section-label { margin-top: 34px; }
  .section-label span:last-child { display: none; }
  .mode-card { min-height: 142px; padding: 20px; }
  .gig-card { margin: 18px 0 12px; padding: 14px 12px 2px; box-shadow: 5px 6px 0 var(--shadow-hard); }
  .journey { gap: 3px; }
  .jname { font-size: 10px; }
  .gig-card .hero-actions { margin: 16px 0 12px; }
  .gig-play { flex: 1 1 auto; min-width: 0; }
  .bonus-grid { grid-template-columns: 1fr; }
  .gig-panel { grid-template-columns: 1fr; gap: 12px; padding: 12px 14px; box-shadow: 5px 6px 0 var(--shadow-hard); }
  .gig-panel .journey { max-width: none; }
  .gig-panel-go { justify-self: stretch; justify-content: center; }
  .mode-icon { font-size: 32px; margin-right: 6px; }
  .card-content { gap: 8px; }
  .card-content strong { font-size: 22px; }
  .card-content > span:not(.eyebrow) br { display: none; }
  .card-content small { margin-top: 3px; }
  .home-bottom { align-items: flex-start; flex-direction: column; gap: 3px; }
  footer { padding: 20px 0; }

  /* Tour */
  .screen-heading { align-items: flex-start; gap: 15px; margin: 0 0 25px; }
  .screen-heading h1 { font-size: 34px; }
  .screen-heading p:not(.eyebrow) { font-size: 13px; }
  .star-total { padding: 10px; font-size: 12px; margin-top: 4px; }
  #tour .screen-heading { margin-bottom: 18px; }
  .overworld { box-shadow: 5px 6px 0 var(--shadow-hard); }
  .map-sign h2 { font-size: 18px; }
  .stage-tile { font-size: 19px; }
  .tour-footer { flex-direction: column; align-items: flex-start; gap: 12px; }
  .rank-strip { margin-bottom: 14px; padding: 10px 12px 9px; box-shadow: 5px 6px 0 var(--shadow-hard); }
  .rank-title { font-size: 17px; }

  /* Progression: the header badge stacks its level over the doubloons, drops the rank name and
     keeps the XP bar as a thin stripe along its foot, so the sound toggle keeps its label. */
  .level-badge {
    position: relative;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    min-height: 40px;
    padding: 4px 9px 8px;
    font-size: 10px;
  }
  .badge-level b { font-size: 14px; }
  .badge-coins { gap: 4px; }
  .badge-coins .coin { width: 10px; height: 10px; }
  .badge-rank { display: none; }
  .badge-meter { position: absolute; left: 6px; right: 6px; bottom: 3px; }
  .badge-meter .xp-bar { width: auto; height: 3px; border: 0; }
  .badge-meter .xp-bar i { box-shadow: none; }
  .level-toast { top: 74px; }

  /* Game: one compact header block, then the console. */
  body[data-screen=game] .topbar { height: 50px; }
  body[data-screen=game] .brand { font-size: 21px; }
  body[data-screen=game] .brand img { width: 24px; height: 24px; }
  body[data-screen=game] .icon-button { padding: 6px 10px; }
  body[data-screen=game] #game { padding: 4px 0 16px; }
  .game-layout { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
  .session-info {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "back rules"
      "kicker sub"
      "title title"
      "goal goal";
    column-gap: 10px;
    align-items: center;
  }
  /* 44px tap targets; the -7px margins keep their grid row 30px tall so the tools row stays in view. */
  .session-info > [data-action=back] { grid-area: back; padding: 0; min-height: 44px; margin: -7px 0; }
  .session-info > [data-action=rules] {
    grid-area: rules;
    justify-self: end;
    padding: 0;
    min-height: 44px;
    margin: -7px 0;
    font-size: 12px;
    text-align: right;
  }
  .session-info > #game-kicker { grid-area: kicker; margin: 0; align-self: baseline; }
  .session-info > #game-subtitle { grid-area: sub; font-size: 12px; align-self: baseline; line-height: 1.3; }
  .session-info > #game-title { grid-area: title; font-size: 24px; line-height: 1.1; margin: 2px 0 5px; }
  .session-info > .objective { grid-area: goal; margin: 0; padding-left: 10px; }
  .objective .eyebrow { display: none; }
  .objective strong { font-size: 16px; margin: 0 0 1px; }
  .objective p { font-size: 12px; line-height: 1.45; }
  .progress-track { margin-top: 6px; }
  .rule-card, .song-card { display: none; }
  .game-console {
    /* Fill the width, but leave room for the tools row on short phones (cells stay >= 44px). */
    width: min(100%, 470px, max(296px, calc(100vh - 404px)));
    align-self: center;
    padding: 12px;
    border-radius: 13px;
    box-shadow: 5px 6px 0 var(--shadow-hard);
  }
  /* Arcade-style HUD: label and value on one line. */
  .console-hud { margin-bottom: 8px; gap: 8px; }
  .console-hud > div { display: flex; align-items: baseline; gap: 6px; }
  .console-hud strong { font-size: 19px; margin-top: 0; }
  .mix-strip { padding-bottom: 8px; }
  .mix-parts { margin-top: 4px; }
  .mix-strip .text-button { margin: -4px 0; }   /* 44px target, 36px of layout */
  .board { gap: 6px; padding: 8px; }
  .cell { border-radius: 6px; }
  .charge-legend { padding-top: 8px; }
  .game-feedback { min-height: 56px; padding: 8px 0; }
  .game-feedback strong { font-size: 17px; }
  .game-feedback > span { font-size: 11px; }

  /* Result and dialogs */
  .result-card { padding: 0; }
  .result-card h1 { font-size: 36px; }
  .result-record { margin: 18px auto; }
  .result-score { font-size: 44px; }
  dialog { padding: 22px; }
  dialog h2 { font-size: 24px; }
}
@supports (height: 100svh) {
  @media (max-width: 760px) {
    .game-console { width: min(100%, 470px, max(296px, calc(100svh - 404px))); }
  }
}
/* Short phones, including iPhones while Safari's toolbars show (about 660px of a 844px screen):
   the console is already at its 296px floor, so drop two helper lines to keep the tools row on
   screen. Per-jug dots and numbers, the lit band parts and the rules dialog still carry them. */
@media (max-width: 760px) and (max-height: 800px) {
  .charge-legend, #mix-caption { display: none; }
  .mix-parts { margin-top: 0; }
}

/* Narrow phones: the level badge joins the header, so the brand drops its little ♪ and the sound
   toggle shows just its state (♫ On / ♫ Off); its aria-label still names the action. */
@media (max-width: 420px) {
  .brand > span { display: none; }
  .sound-word { display: none; }
  .sound-state { text-transform: capitalize; }
}

@media (max-width: 370px) {
  .app { padding: 0 14px; }
  .hero h1 { font-size: 40px; }
  .hero-actions { gap: 13px; }
  .hero-actions .text-button { font-size: 11px; }
  .hero-actions .primary { padding: 13px 15px; gap: 15px; font-size: 13px; }
  .brand { gap: 7px; font-size: 22px; }
  .header-tools .icon-button span { font-size: 10px; margin-left: 3px; }
  .header-tools { gap: 6px; }
  .level-badge { padding-left: 7px; padding-right: 7px; }
  .screen-heading { flex-wrap: wrap; }
  .screen-heading h1 { font-size: 30px; }
  .game-console { padding: 11px; }
  .console-hud > div { display: block; }
  .console-hud strong { margin-top: 2px; }
  .board { gap: 5px; padding: 7px; }
  .charge-num { font-size: 11px; }
  .charge-dots { bottom: 4px; }
  .cartridge-top, .cartridge-bottom { letter-spacing: 0; }
  .cartridge-bottom span:last-child { display: none; }
  .result-actions .primary, .result-actions .secondary { font-size: 12px; }
  .mix-part { padding: 3px 5px; }
  .mix-strip .text-button { font-size: 11px; }
  .charge-legend { letter-spacing: .2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; }
}

/* ---------- Airboat Augie's Bait & Trade (shop.js): the map shack, the home link, the shop ---------- */
/* Home: the Bait & Trade link rides beside the eyebrow at the top of the hero. */
.hero-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.shop-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-1);
  color: var(--doubloon);
  font: 700 11px/1 var(--font-mono);
  letter-spacing: .8px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: border-color .15s, transform .15s;
}
.shop-chip b { color: var(--ink); margin-right: 2px; }
.shop-chip:hover { border-color: var(--doubloon); transform: translateY(-2px); }

/* The map: Augie's shack on the trail, a real button (not a stage), open from the start. */
.map-shop {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  padding: 0;
  border: 0;
  background: none;
}
.map-shop-art {
  display: block;
  width: 66px;
  height: 48px;
  filter: drop-shadow(3px 3px 0 var(--shadow-hard));
  transition: transform .12s;
}
.map-shop:hover .map-shop-art { transform: translateY(-3px); }
.map-shop:focus-visible { outline: none; }
.map-shop:focus-visible .map-shop-art { outline: 3px solid var(--sawgrass); outline-offset: 3px; }
.map-shop-name {
  padding: 2px 4px 3px;
  font: 700 10px/1.25 var(--font-mono);
  letter-spacing: .4px;
  white-space: nowrap;
  color: var(--doubloon);
  background: var(--callout-bg);
  border: 2px solid var(--doubloon);
  border-radius: 2px;
}

/* The shop dialog. */
.shop-dialog { width: min(540px, calc(100% - 32px)); }
.shop-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.shop-head .eyebrow { margin: 0 0 4px; font-size: 10px; line-height: 1.4; }
.shop-head h2 { font-size: 24px; line-height: 1.1; }
.augie {
  flex: none;
  width: 56px;
  height: 56px;
  padding: 3px;
  border: 2px solid var(--line-strong);
  border-radius: 4px;
  background: var(--teal-deep);
  box-shadow: 3px 3px 0 var(--shadow-hard);
}
.augie-art { display: block; width: 100%; height: 100%; }
.augie-says {
  position: relative;
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-sunk);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}
/* The speech bubble's tail points up at Augie. */
.augie-says::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 22px;
  width: 12px;
  height: 12px;
  background: var(--surface-sunk);
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
  transform: rotate(45deg);
}
.augie-says:focus { outline: none; }
.augie-says:focus-visible { outline: 3px solid var(--sawgrass); outline-offset: 3px; }
.shop-wallet {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 14px;
  font: 700 11px/1.4 var(--font-mono);
  letter-spacing: .6px;
  color: var(--muted);
}
.shop-balance { display: flex; align-items: center; gap: 6px; color: var(--doubloon); text-transform: uppercase; }
.shop-balance b { font: 700 20px/1 var(--font-display); }
.shop-section { margin: 16px 0 8px; font: 700 10px/1.4 var(--font-mono); letter-spacing: 1.4px; color: var(--faint); text-transform: uppercase; }
.shop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.shop-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  grid-template-areas: "art info act" "ask ask ask";
  align-items: center;
  gap: 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-sunk);
}
.shop-item.worn { border-color: var(--sawgrass); background: var(--sawgrass-wash); }
.shop-item.soldout { border-style: dashed; }
.shop-art {
  grid-area: art;
  display: grid;
  place-items: center;
  width: 52px;
  height: 44px;
  border-radius: 4px;
  background: var(--map-flats);
  box-shadow: inset 0 -7px 0 var(--map-flats-light);
}
.shop-art-svg { display: block; width: auto; height: 36px; max-width: 48px; }
.shop-info { grid-area: info; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.shop-info b { font-size: 14px; }
.shop-info small { font-size: 11px; line-height: 1.45; color: var(--muted); }
.shop-info .shop-note { color: var(--sawgrass); }
.shop-act { grid-area: act; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.shop-price { display: flex; align-items: center; gap: 5px; font: 700 15px/1 var(--font-mono); color: var(--doubloon); }
.shop-item.short .shop-price { color: var(--faint); }
.shop-tag { font: 700 10px/1.3 var(--font-mono); letter-spacing: 1px; color: var(--faint); white-space: nowrap; }
.shop-tag.on { color: var(--sawgrass); }
.shop-tag.sold {
  padding: 3px 6px;
  border: 2px solid currentColor;
  border-radius: 3px;
  color: var(--sunset);
  transform: rotate(-4deg);
}
.shop-act .secondary { min-width: 64px; }
dialog .shop-act .text-button { margin: 0; padding: 0 4px; }
.shop-confirm {
  grid-area: ask;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 14px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-strong);
}
.shop-confirm p { flex: 1 1 100%; margin: 0 0 4px; font-size: 13px; line-height: 1.5; color: var(--ink); }
dialog .shop-confirm .primary { margin: 0; gap: 8px; padding: 10px 16px; min-height: 44px; }
dialog .shop-confirm .text-button { margin: 0; min-width: 44px; padding: 9px 8px; }
.shop-item.sold { animation: shop-sold .5s steps(4); }
.shop-earn { margin: 0 !important; }
/* Where doubloons come from, one tap each: The Run, and today's Daily soundcheck (it closes the shop). */
.shop-earn-actions { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 12px; }
.shop-earn-actions .secondary { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; }
@keyframes shop-sold { from { transform: scale(.96); box-shadow: 0 0 0 3px var(--doubloon); } }

@media (max-width: 480px) {
  .shop-item { grid-template-columns: 48px minmax(0, 1fr); grid-template-areas: "art info" "art act" "ask ask"; gap: 6px 12px; }
  .shop-art { width: 48px; }
  .shop-act { justify-content: flex-start; }
  .shop-head h2 { font-size: 20px; }
  .augie { width: 46px; height: 46px; }
}

/* ---------- Daily Soundcheck streak (progress.js): the Daily card and the result screen ---------- */
.card-content .daily-streak { margin-top: -4px; color: var(--doubloon); letter-spacing: .3px; }
.daily-streak .coin, .streak-earned .coin { vertical-align: -1px; margin: 0 3px 0 1px; }
.daily-streak .coin { width: 9px; height: 9px; }
.streak-earned {
  margin: -6px 0 20px;
  font: 700 13px/1.4 var(--font-mono);
  letter-spacing: 1px;
  color: var(--doubloon);
  animation: streak-pop .45s steps(4) .2s both;
}
.xp-earned:not([hidden]) + .streak-earned { margin-top: -14px; }
@keyframes streak-pop { from { transform: scale(.8); opacity: 0; } }

/* ---------- Augie's airboat at the dock by START on the tour map (scenery: the GIG RUN panel is the way in) ---------- */
.map-run {
  pointer-events: none;
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  color: var(--hibiscus);
  text-decoration: none;
}
.map-run-art {
  display: block;
  width: 60px;
  height: 36px;
  filter: drop-shadow(3px 3px 0 var(--shadow-hard));
  transition: transform .12s;
  animation: airboat-bob 1.6s steps(1) infinite;
}
/* The bob uses translate, so the hover lift (transform) still works while it rocks. */
@keyframes airboat-bob { 50% { translate: 0 -3px; } }
/* ---------- Supporter (progress.js): the badge beside the level, the settings row, the thank-you ----------
   The badge shows wherever the level does: in the header's level badge and on the rank strip over
   the tour map (and on The Run's win card, in run.html). Redeeming a code changes nothing else. */
.supporter-badge {
  display: inline-flex;
  align-items: center;
  flex: none;
  padding: 3px 6px 2px;
  border-radius: 3px;
  background: var(--sunset);
  color: var(--on-accent);
  font: 700 9px/1 var(--font-mono);
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 2px 2px 0 var(--shadow-hard);
}
.rank-title .supporter-badge { margin-left: 12px; vertical-align: 4px; }
/* Settings: a code box and a Redeem button; once redeemed, a thank-you line takes their place. */
.supporter-setting { padding: 16px 0 6px; border-bottom: 1px solid var(--line); }
.setting-heading { margin: 0 0 10px; font: 700 10px/1.4 var(--font-mono); letter-spacing: 1.4px; color: var(--faint); text-transform: uppercase; }
#supporter-form > label { display: block; font-size: 12px; margin-bottom: 9px; }
.code-entry { display: flex; gap: 8px; }
.code-entry input {
  flex: 1;
  width: auto;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-sunk);
  color: var(--ink);
  font: 16px/1.2 var(--font-mono);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.code-entry input::placeholder { color: var(--faint); opacity: 1; }
.code-entry input[aria-invalid=true] { border-color: var(--hibiscus); }
.code-entry .secondary { flex: none; min-width: 84px; }
dialog #supporter-status { margin: 8px 0 0; }
dialog #supporter-status:empty { display: none; }
dialog #supporter-note { margin: 8px 0 6px; }
dialog .supporter-done { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 2px 0 10px; color: var(--ink); }
.supporter-done:focus-visible { outline: 3px solid var(--sawgrass); outline-offset: 4px; }
/* The thank-you: the level-up toast's look in sawgrass. It is a popover where the browser has them,
   so it shows above the open settings dialog; calm and reduced motion show it standing still. */
.supporter-toast { width: max-content; border-color: var(--sawgrass); box-shadow: 6px 7px 0 var(--shadow-hard), 0 0 40px var(--sawgrass-edge); }
.supporter-toast b { color: var(--sawgrass); }
.supporter-toast[popover] { right: auto; bottom: auto; margin: 0; overflow: visible; color: var(--ink); }

/* Phones: the level badge is a narrow stack, so the badge rides its top edge like a sticker,
   reaching left into the free space beside the brand; the level drops a little to clear it.
   The game screen's header is only 50px tall, so there the badge packs tighter. */
@media (max-width: 760px) {
  .level-badge.is-supporter { padding-top: 9px; }
  .level-badge .supporter-badge {
    position: absolute;
    top: -6px;
    right: -3px;
    padding: 2px 4px 1px;
    font-size: 8px;
    letter-spacing: .5px;
  }
  body[data-screen=game] .level-badge.is-supporter { min-height: 0; padding-top: 8px; padding-bottom: 6px; }
  body[data-screen=game] .level-badge .supporter-badge { top: -3px; }
  .rank-title .supporter-badge { vertical-align: 3px; }
}

/* ---------- The Backstage Pass (progress.js): the reveal, the home chip and the map ticket ----------
   Earned once, by clearing The Big Show. The ticket is assets/art/backstage-pass.svg as an <img>,
   with its words laid over it in HTML (as the home screen's arcade scene carries its caption).
   Nothing shows before it is earned: it is a surprise. */
.hero-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pass-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-1);
  color: var(--sunset);
  font: 700 11px/1 var(--font-mono);
  letter-spacing: .8px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: border-color .15s, transform .15s;
}
.pass-chip img { display: block; width: 30px; height: 14px; }
/* Phones: the home chip says just PASS (its label still says Backstage pass), so it fits beside Bait & Trade. */
@media (max-width: 480px) {
  #pass-chip { padding-right: 12px; }
  #pass-chip .pass-chip-long, #pass-chip .pass-chip-arrow { display: none; }
}
.pass-chip:hover { border-color: var(--sunset); transform: translateY(-2px); }
.result-pass { margin: -6px auto 20px; }

/* The dialog: the ticket, then its terms, then Copy pass. */
.pass-dialog { width: min(520px, calc(100% - 32px)); text-align: center; }
.pass-dialog .dialog-heading { margin-bottom: 8px; }
.pass-kicker { margin: 0; color: var(--sunset); }
.pass-ticket { position: relative; margin: 2px 0 0; container-type: inline-size; }
.pass-art { display: block; width: 100%; height: auto; }
/* The ticket body between the band and the perforation, under the top rule and over the fine print:
   x 22-84 and y 16-39 of the art's 120 x 56. */
.pass-face {
  position: absolute;
  left: 18.4%;
  top: 28.6%;
  width: 51.6%;
  height: 41%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 4%;
  text-align: left;
}
/* Ticket print is the mono face: Pixelify's capital B reads as a G at this size. */
.pass-title {
  font: 700 13px/1 var(--font-mono);
  font-size: clamp(11px, 5cqw, 24px);
  letter-spacing: .08em;
  color: var(--bandana);
  white-space: nowrap;
}
dialog .pass-code {
  margin: 0;
  font: 700 15px/1 var(--font-mono);
  font-size: clamp(13px, 6.4cqw, 29px);
  letter-spacing: .05em;
  color: var(--ticket-ink);
  white-space: nowrap;
}
dialog .pass-terms { margin: 16px 0 4px; font-size: 16px; line-height: 1.45; color: var(--ink); }
dialog .pass-show { margin: 0 0 4px; font: 700 14px/1.5 var(--font-mono); letter-spacing: .4px; color: var(--sunset); }
dialog .pass-day { margin: 0 0 6px; font-size: 11px; }
.pass-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 14px; }
.pass-actions .primary { min-width: 150px; justify-content: center; }
dialog .pass-actions .text-button { margin: 0; padding: 9px 10px; }
.pass-share { text-align: left; }
.pass-share label { font-size: 11px; color: var(--muted); }
dialog .pass-status { margin: 2px 0 0; }
dialog .pass-status:empty { display: none; }
/* The reveal, on the first clear of The Big Show: the ticket slides up into place, in pixel steps.
   Calm motion and reduced motion show it standing still (the .calm and media rules above). */
.pass-dialog.reveal .pass-ticket { animation: pass-in .8s steps(8) both; }
.pass-dialog.reveal .pass-kicker { animation: streak-pop .45s steps(4) .6s both; }
@keyframes pass-in {
  from { transform: translateY(56px) rotate(-6deg); opacity: 0; }
  70% { transform: translateY(-5px) rotate(1deg); opacity: 1; }
}

/* The map: the ticket pinned up by the juke joint, a real button, once the pass is earned. */
.map-pass {
  position: absolute;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  padding: 0;
  border: 0;
  background: none;
}
.map-pass-art {
  display: block;
  width: 60px;
  height: 28px;
  filter: drop-shadow(3px 3px 0 var(--shadow-hard));
  transition: transform .12s;
}
.map-pass:hover .map-pass-art { transform: translateY(-3px) rotate(-3deg); }
.map-pass:focus-visible { outline: none; }
.map-pass:focus-visible .map-pass-art { outline: 3px solid var(--sawgrass); outline-offset: 3px; }
.map-pass-name {
  max-width: 72px;
  padding: 2px 4px 3px;
  font: 700 10px/1.25 var(--font-mono);
  letter-spacing: .4px;
  text-align: center;
  color: var(--sunset);
  background: var(--callout-bg);
  border: 2px solid var(--sunset);
  border-radius: 2px;
}

/* ---------- Orange points (encore.js renderOranges): the home card under the cartridge ----------
   The lifetime orange count, its ORANGE code in the game's own pixel font on a bone strip (the
   encore's ticket strip, again), Slim's pitch, Copy, and a newsletter row once config.js has its link. */
.hero-side { display: grid; gap: 22px; min-width: 0; }
.orange-card {
  padding: 14px 16px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: linear-gradient(140deg, var(--surface-2), var(--surface-1));
  box-shadow: 8px 9px 0 var(--shadow-hard);
}
.orange-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; margin-bottom: 10px; }
.orange-title { display: flex; align-items: center; gap: 8px; color: var(--sunset); }
.orange-ico { display: block; width: 20px; height: 20px; shape-rendering: crispEdges; }
.orange-count { font: 700 10px/1.4 var(--font-mono); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.orange-count b { margin-right: 3px; font: 600 20px/1 var(--font-display); letter-spacing: .5px; color: var(--ink); }
.orange-strip {
  display: grid;
  place-items: center;
  min-height: 56px;
  padding: 10px 14px;
  border: 2px solid var(--ticket-ink);
  border-radius: 8px;
  background: var(--ink);
}
.orange-code-art { display: block; image-rendering: -moz-crisp-edges; image-rendering: crisp-edges; image-rendering: pixelated; }
/* The code is real text too: read aloud, and shown as text if the pixel art cannot be drawn. */
.orange-code { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.orange-strip.no-art .orange-code { position: static; width: auto; height: auto; margin: 0; clip: auto; font: 700 24px/1.1 var(--font-mono); color: var(--ticket-ink); }
.orange-strip.no-art .orange-code-art { display: none; }
.orange-pitch { margin: 12px 0 10px; font-size: 15px; line-height: 1.45; color: var(--ink); }
.orange-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.orange-actions .secondary { min-height: 44px; }
.orange-news { display: inline-flex; align-items: center; color: var(--teal); }
.orange-share { text-align: left; }
.orange-share label { font-size: 11px; color: var(--muted); }
.orange-status { margin-top: 6px; color: var(--sawgrass); }
.orange-status:empty { display: none; }
.orange-how { margin-top: 8px; color: var(--faint); line-height: 1.5; }
@media (max-width: 760px) {
  .hero-side { gap: 18px; }
  .orange-card { padding: 12px 12px 10px; box-shadow: 5px 6px 0 var(--shadow-hard); }
}
