:root {
  --ink: #24231f;
  --paper: #f4f1e8;
  --paper-2: #ebe6da;
  --coral: #ef6a4b;
  --coral-dark: #c94a32;
  --green: #3f785f;
  --green-bright: #b8e562;
  --yellow: #f0cd5b;
  --white: #fffdf7;
  --line: rgba(36, 35, 31, .18);
  --shadow: 0 18px 55px rgba(51, 41, 25, .13);
  --mono: "SFMono-Regular", "Roboto Mono", Consolas, monospace;
  --sans: "Avenir Next", Avenir, "Segoe UI", Inter, system-ui, sans-serif;
  --serif: Iowan Old Style, "Palatino Linotype", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  min-width: 320px;
}
button { font: inherit; }
button:focus-visible, a:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: -60px;
  left: 20px;
  padding: 12px 18px;
  color: white;
  background: var(--ink);
}
.skip-link:focus { top: 16px; }

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(244, 241, 232, .9);
  backdrop-filter: blur(14px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: .88rem;
  font-weight: 800;
  letter-spacing: .14em;
  cursor: pointer;
}
.brand-mark {
  position: relative;
  display: inline-flex;
  width: 31px;
  height: 31px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  overflow: hidden;
}
.brand-mark span {
  position: absolute;
  top: 5px;
  width: 7px;
  height: 18px;
  border-radius: 6px 6px 0 0;
  background: var(--coral);
}
.brand-mark span:first-child { left: 6px; transform: rotate(-18deg); }
.brand-mark span:last-child { right: 6px; transform: rotate(18deg); }
.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.portfolio-link {
  margin-right: 10px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
}
.portfolio-link:hover { color: var(--coral-dark); }
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(63, 120, 95, .14);
}
.score-chip {
  margin-left: 12px;
  padding: 7px 10px;
  border: 1px solid var(--ink);
  border-radius: 100px;
}

.screen { display: none; }
.screen.is-active { display: block; animation: reveal .42s ease both; }
@keyframes reveal {
  from { transform: translateY(8px); }
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, .85fr);
  align-items: stretch;
  min-height: calc(100svh - 72px);
  border-bottom: 1px solid var(--line);
}
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(70px, 9vw, 130px) clamp(28px, 7vw, 110px);
}
.eyebrow {
  margin: 0 0 20px;
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
.hero h1 {
  margin-bottom: 30px;
  font-size: clamp(4rem, 8.7vw, 8rem);
  font-weight: 700;
  line-height: .82;
  letter-spacing: -.075em;
}
.hero h1 em, .mission-panel h2 em {
  color: var(--coral);
  font-family: var(--serif);
  font-weight: 700;
}
.hero-lede {
  max-width: 610px;
  margin-bottom: 35px;
  color: #625e54;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.75;
}
.hero-actions { display: flex; align-items: center; gap: 24px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 4px 5px 0 rgba(36, 35, 31, .22); }
.button:active { transform: translateY(0); box-shadow: none; }
.button-dark { color: var(--white); background: var(--ink); }
.button-light { color: var(--ink); background: transparent; }
.text-button {
  border: 0;
  border-bottom: 1px solid;
  color: var(--ink);
  background: transparent;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
}

.hero-art {
  position: relative;
  min-height: 580px;
  overflow: hidden;
  background: var(--coral);
}
.hero-ring {
  position: absolute;
  border: 2px solid rgba(36, 35, 31, .82);
  border-radius: 50%;
}
.ring-one { width: 78%; aspect-ratio: 1; top: 12%; left: 11%; }
.ring-two { width: 58%; aspect-ratio: 1; top: 23%; left: 21%; }
.ring-three { width: 38%; aspect-ratio: 1; top: 34%; left: 31%; }
.hero-exit {
  position: absolute;
  top: 41%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 100px;
  transform: translate(-50%, -50%) rotate(-3deg);
  color: white;
  background: var(--green);
  border: 3px solid var(--ink);
  box-shadow: 7px 8px 0 var(--ink);
  letter-spacing: .1em;
}
.running-person { font-size: 2rem; }
.hero-people i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 26px;
  height: 72px;
  background: var(--c);
  border: 2px solid var(--ink);
  border-radius: 13px 13px 4px 4px;
  animation: bob 2.6s ease-in-out infinite alternate;
  animation-delay: calc(var(--x) * -0.03);
}
.hero-people i::before {
  content: "";
  position: absolute;
  top: -24px;
  left: 1px;
  width: 20px;
  height: 20px;
  background: var(--c);
  border: 2px solid var(--ink);
  border-radius: 50%;
}
@keyframes bob { to { transform: translateY(-9px); } }
.art-label {
  position: absolute;
  padding: 5px 8px;
  color: var(--paper);
  background: var(--ink);
  font-family: var(--mono);
  font-size: .65rem;
  letter-spacing: .1em;
}
.label-a { left: 8%; top: 12%; transform: rotate(-5deg); }
.label-b { right: 8%; top: 20%; transform: rotate(6deg); }
.label-c { right: 14%; bottom: 9%; transform: rotate(-4deg); }

.game-select { padding: clamp(75px, 9vw, 130px) clamp(22px, 7vw, 110px); }
.section-heading {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 12px 60px;
  max-width: 1180px;
  margin: 0 auto 50px;
}
.section-heading .eyebrow { grid-column: 1 / -1; }
.section-heading h2 {
  font-size: clamp(2.4rem, 4.5vw, 4.8rem);
  line-height: .98;
  letter-spacing: -.055em;
}
.section-heading > p:last-child { color: #6a655b; line-height: 1.7; }
.game-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 1180px;
  margin: auto;
}
.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 670px;
  padding: clamp(25px, 4vw, 44px);
  border: 1px solid var(--ink);
  overflow: hidden;
}
.card-coral { background: var(--coral); }
.card-green { color: var(--white); background: var(--green); }
.card-topline {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.best-score { opacity: .75; }
.card-visual {
  position: relative;
  height: 250px;
  margin: 34px 0 30px;
  border: 1px solid currentColor;
  overflow: hidden;
}
.venue-mini {
  background: repeating-linear-gradient(0deg, transparent 0 34px, rgba(36,35,31,.1) 35px),
              repeating-linear-gradient(90deg, transparent 0 34px, rgba(36,35,31,.1) 35px);
}
.mini-stage {
  position: absolute;
  top: 0;
  left: 27%;
  right: 27%;
  padding: 9px;
  color: var(--paper);
  background: var(--ink);
  text-align: center;
  font: .7rem var(--mono);
}
.mini-exit {
  position: absolute;
  bottom: 14px;
  padding: 7px 10px;
  color: white;
  background: var(--green);
  border: 2px solid var(--ink);
  font: .6rem var(--mono);
}
.exit-left { left: 10px; }
.exit-right { right: 10px; }
.mini-crowd {
  position: absolute;
  inset: 70px 70px 40px;
  background-image: radial-gradient(circle, var(--ink) 0 5px, transparent 6px);
  background-size: 30px 30px;
}
.route-line {
  position: absolute;
  bottom: 32px;
  left: 50%;
  width: 44%;
  height: 2px;
  background: var(--paper);
  transform-origin: left;
}
.route-a { transform: rotate(160deg); }
.route-b { transform: rotate(20deg); }
.crowd-mini {
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.12), transparent 50%);
}
.mini-dots {
  position: absolute;
  inset: 16px;
  opacity: .76;
  background-image: radial-gradient(circle, var(--paper) 0 5px, transparent 6px);
  background-size: 38px 38px;
  transform: skewX(-12deg);
}
.flow-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 12%;
  width: 70%;
  height: 38px;
  border-top: 4px solid var(--green-bright);
  transform: rotate(-12deg);
}
.flow-arrow::after {
  content: "";
  position: absolute;
  right: -5px;
  top: -13px;
  width: 20px;
  height: 20px;
  border-top: 4px solid var(--green-bright);
  border-right: 4px solid var(--green-bright);
  transform: rotate(45deg);
}
.you-dot {
  position: absolute;
  z-index: 3;
  left: 44%;
  top: 42%;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  color: var(--ink);
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 50%;
  font: 600 .55rem var(--mono);
}
.game-card h3 {
  margin-bottom: 0;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1;
  letter-spacing: -.055em;
}
.card-subtitle {
  margin: 5px 0 19px;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-style: italic;
}
.game-card > p:not(.card-subtitle) {
  max-width: 460px;
  margin-bottom: 28px;
  line-height: 1.65;
  opacity: .8;
}
.button-card { margin-top: auto; color: inherit; background: transparent; }
.card-green .button-card { border-color: var(--white); }
.card-green .button-card:hover { box-shadow: 4px 5px 0 rgba(255,255,255,.35); }

.safety-strip {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.safety-strip > * { margin: 0; padding: 30px clamp(18px, 3.5vw, 50px); border-right: 1px solid var(--ink); }
.safety-strip > *:last-child { border-right: 0; }
.safety-strip > p { display: flex; align-items: center; font-family: var(--serif); font-size: 1.35rem; font-style: italic; }
.safety-strip div { display: flex; flex-direction: column; gap: 5px; }
.safety-strip strong { font: 500 .8rem var(--mono); letter-spacing: .14em; }
.safety-strip span { color: #6b665d; font-size: .8rem; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 28px clamp(20px, 5vw, 72px);
  font: .65rem var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}
footer p { margin: 0; color: #777168; text-align: center; }

/* Shared game shell */
.game-screen {
  min-height: calc(100vh - 72px);
  padding: clamp(18px, 3vw, 40px);
}
.ways-screen { background: var(--coral); }
.crowd-screen { background: var(--green); }
.game-shell {
  width: min(1180px, 100%);
  min-height: calc(100vh - 152px);
  margin: 0 auto;
  padding: clamp(16px, 3vw, 34px);
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 9px 10px 0 var(--ink);
}
.game-nav {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.icon-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  font-size: 1.35rem;
  cursor: pointer;
}
.game-identity { display: flex; align-items: center; gap: 13px; }
.game-identity > span {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  color: var(--paper);
  background: var(--ink);
  border-radius: 50%;
  font: .7rem var(--mono);
}
.game-identity div { display: flex; flex-direction: column; }
.game-identity strong { font-size: .95rem; }
.game-identity small { color: #716c62; font-family: var(--serif); font-size: .85rem; font-style: italic; }
.sound-button {
  display: flex;
  gap: 7px;
  padding: 7px 10px;
  border: 0;
  background: transparent;
  font: .65rem var(--mono);
  text-transform: uppercase;
  cursor: pointer;
}
.hud {
  display: grid;
  grid-template-columns: 100px 1fr 100px;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
}
.hud > div:first-child, .hud > div:last-child { display: flex; flex-direction: column; }
.hud > div:last-child { align-items: flex-end; }
.hud span { color: #777168; font: .6rem var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.hud strong { font: 500 1rem var(--mono); }
.hud-progress, .crowd-meter {
  height: 5px;
  overflow: hidden;
  background: #dcd7cc;
  border-radius: 10px;
}
.hud-progress i, .crowd-meter i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--coral);
  transition: width .35s ease;
}
.mission-panel, .results-panel {
  position: relative;
  max-width: 820px;
  margin: clamp(30px, 7vh, 75px) auto;
  padding: clamp(32px, 6vw, 70px);
  border: 1px solid var(--ink);
  background: var(--white);
  box-shadow: var(--shadow);
  text-align: center;
  overflow: hidden;
}
.mission-number {
  position: absolute;
  top: -24px;
  right: 20px;
  color: rgba(36,35,31,.07);
  font-size: 10rem;
  font-weight: 800;
  line-height: 1;
}
.mission-panel h2, .results-panel h2 {
  position: relative;
  margin-bottom: 22px;
  font-size: clamp(2.5rem, 6vw, 5.2rem);
  line-height: .93;
  letter-spacing: -.06em;
}
.mission-panel > p:not(.eyebrow), .results-panel > p:not(.eyebrow) {
  max-width: 600px;
  margin: 0 auto 28px;
  color: #676259;
  line-height: 1.65;
}
.rule-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 34px 0;
  border: 1px solid var(--line);
}
.rule-grid div {
  display: flex;
  flex-direction: column;
  padding: 18px;
  border-right: 1px solid var(--line);
}
.rule-grid div:last-child { border: 0; }
.rule-grid span { margin-bottom: 5px; color: var(--coral); font-size: 1.4rem; }
.rule-grid small { margin-top: 4px; color: #756f64; }
.mission-panel .button { margin: auto; }
.is-hidden { display: none !important; }

/* Venue game */
.venue-game { animation: reveal .35s ease both; }
.venue-instruction {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 12px 0;
  padding: 14px 18px;
  color: white;
  background: var(--ink);
}
.venue-instruction .eyebrow { margin-bottom: 4px; color: var(--coral); }
.venue-instruction h2 { margin: 0; font-size: clamp(1.2rem, 3vw, 2rem); }
.scan-timer { position: relative; flex: 0 0 48px; width: 48px; height: 48px; }
.scan-timer svg { width: 100%; transform: rotate(-90deg); }
.scan-timer circle { fill: none; stroke: rgba(255,255,255,.18); stroke-width: 3; }
.scan-timer .timer-ring {
  stroke: var(--yellow);
  stroke-dasharray: 107;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}
.scan-timer strong { position: absolute; inset: 0; display: grid; place-items: center; font: 500 .8rem var(--mono); }
.venue-board-wrap { padding: 12px; border: 1px solid var(--ink); background: var(--paper-2); }
.venue-board {
  position: relative;
  width: 100%;
  min-height: 490px;
  border: 3px solid var(--ink);
  background-color: #ded8cc;
  background-image: linear-gradient(rgba(36,35,31,.055) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(36,35,31,.055) 1px, transparent 1px);
  background-size: 32px 32px;
  overflow: hidden;
}
.venue-stage {
  position: absolute;
  top: 0;
  left: 29%;
  width: 42%;
  height: 95px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 93% 100%, 7% 100%);
}
.venue-stage span { color: var(--coral); font: .55rem var(--mono); letter-spacing: .2em; }
.venue-stage strong { font-size: 1.35rem; letter-spacing: .12em; }
.venue-bar, .venue-booth {
  position: absolute;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  background: var(--yellow);
  font: .6rem var(--mono);
  letter-spacing: .1em;
}
.venue-bar { right: 25px; top: 150px; width: 70px; height: 130px; writing-mode: vertical-rl; }
.venue-booth { left: 42%; bottom: 22px; }
.venue-crowd {
  position: absolute;
  inset: 115px 16% 70px;
  opacity: .56;
  background-image: radial-gradient(circle, var(--ink) 0 5px, transparent 6px);
  background-size: 34px 34px;
  pointer-events: none;
}
.exit-door {
  position: absolute;
  z-index: 6;
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  column-gap: 6px;
  min-width: 102px;
  padding: 7px;
  color: white;
  background: var(--green);
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  text-align: left;
  cursor: pointer;
  transition: opacity .25s ease, transform .2s ease, filter .2s ease;
}
.exit-door:hover { transform: scale(1.05); filter: brightness(1.08); }
.exit-door span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  color: var(--ink);
  background: white;
  border-radius: 50%;
  font: 600 .65rem var(--mono);
}
.exit-door strong { font-size: .65rem; letter-spacing: .12em; }
.exit-door small { opacity: .75; font-size: .5rem; }
.exit-door.selected { background: var(--yellow); color: var(--ink); }
.exit-door.unsafe { background: #8f332d; filter: grayscale(.25); }
.exit-door.unsafe::after {
  content: "×";
  position: absolute;
  inset: -8px;
  display: grid;
  place-items: center;
  color: #a92f27;
  font-size: 5rem;
  line-height: 1;
  text-shadow: 1px 1px var(--paper);
}
.door-a { left: -3px; bottom: 70px; }
.door-b { right: -3px; top: 40px; }
.door-c { right: -3px; bottom: 58px; }
.door-d { left: 16%; bottom: -3px; }
.you-marker {
  position: absolute;
  z-index: 5;
  left: 48%;
  top: 63%;
  display: flex;
  flex-direction: column;
  align-items: center;
  font: 600 .55rem var(--mono);
  transition: left .4s ease, top .4s ease;
}
.you-marker i {
  width: 25px;
  height: 25px;
  margin-bottom: 3px;
  background: var(--coral);
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(239,106,75,.28);
}
.hazard-layer { position: absolute; z-index: 4; inset: 0; pointer-events: none; }
.hazard {
  position: absolute;
  display: grid;
  place-items: center;
  width: 115px;
  height: 90px;
  color: white;
  background: repeating-linear-gradient(45deg, rgba(143,51,45,.95) 0 10px, rgba(103,34,31,.95) 10px 20px);
  border: 3px solid var(--ink);
  font: 600 .62rem var(--mono);
  letter-spacing: .08em;
  text-align: center;
  animation: hazardIn .35s ease both;
}
@keyframes hazardIn { from { opacity: 0; transform: scale(.6) rotate(-8deg); } }
.route-canvas { position: absolute; z-index: 3; inset: 0; pointer-events: none; }
.route-dash {
  position: absolute;
  height: 4px;
  border-top: 4px dashed var(--coral);
  transform-origin: 0 50%;
  animation: routeDraw .4s ease both;
}
@keyframes routeDraw { from { transform: var(--rotation) scaleX(0); } to { transform: var(--rotation) scaleX(1); } }
.venue-feedback {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 16px 2px 0;
}
.venue-feedback p { margin: 0; color: #625e55; font-size: .85rem; }
.selected-routes { display: flex; gap: 8px; }
.selected-routes span { padding: 8px 10px; border: 1px solid var(--line); font: .62rem var(--mono); }

/* Results */
.result-score { display: flex; align-items: flex-start; justify-content: center; }
.result-score strong { font-size: clamp(5rem, 12vw, 9rem); line-height: .85; letter-spacing: -.08em; }
.result-score span { margin: 8px 0 0 8px; color: var(--coral); font: .7rem var(--mono); }
.results-panel h2 { margin-top: 28px; font-size: clamp(2rem, 5vw, 3.8rem); }
.takeaway {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: center;
  gap: 18px;
  margin: 30px 0;
  padding: 18px;
  border: 1px solid var(--line);
  text-align: left;
}
.takeaway span { font: 500 .65rem var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.takeaway p { margin: 0; line-height: 1.55; }
.result-actions { display: flex; justify-content: center; gap: 12px; }

/* Crowd game */
.crowd-meter-wrap { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; }
.crowd-meter i { width: 100%; background: var(--green); }
.crowd-intro h2 em { color: var(--green); }
.control-demo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 28px 0 34px;
}
.control-demo > div:last-child { display: flex; flex-direction: column; text-align: left; }
.control-demo small { color: #746e64; }
.key-cluster {
  display: grid;
  grid-template-columns: repeat(3, 26px);
  grid-template-rows: repeat(2, 26px);
  gap: 3px;
}
.key-cluster i { display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 3px; font-style: normal; font-size: .65rem; }
.key-cluster i:first-child { grid-column: 2; }
.crowd-game { animation: reveal .35s ease both; }
.crowd-callout {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 15px;
  color: white;
  background: var(--ink);
  font-size: .8rem;
}
.crowd-callout span { padding: 5px 7px; color: var(--ink); background: var(--green-bright); font: 600 .55rem var(--mono); text-transform: uppercase; }
.canvas-wrap {
  position: relative;
  border: 3px solid var(--ink);
  background: #d9d5ca;
  overflow: hidden;
  touch-action: none;
}
#crowd-canvas { display: block; width: 100%; height: auto; aspect-ratio: 960 / 520; }
.canvas-label {
  position: absolute;
  padding: 5px 8px;
  color: white;
  background: var(--ink);
  font: .6rem var(--mono);
  letter-spacing: .1em;
}
.start-label { left: 10px; bottom: 10px; }
.exit-label { right: 0; top: 24px; color: var(--ink); background: var(--green-bright); }
.live-lessons {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: 13px;
}
.live-lessons span {
  padding: 7px 10px;
  color: #817b71;
  border: 1px solid var(--line);
  font: .62rem var(--mono);
  transition: color .25s, background .25s;
}
.live-lessons span.lesson-active { color: white; background: var(--green); border-color: var(--green); }
.live-lessons i { font-style: normal; }
.mobile-controls { display: none; }

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 28px;
  padding: 12px 18px;
  color: white;
  background: var(--ink);
  border: 1px solid white;
  box-shadow: 4px 5px 0 rgba(36,35,31,.25);
  font-size: .75rem;
  transform: translate(-50%, 130px);
  transition: transform .3s ease;
}
.toast.show { transform: translate(-50%, 0); }

@media (max-width: 850px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { min-height: 650px; }
  .hero-art { min-height: 520px; }
  .game-cards { grid-template-columns: 1fr; }
  .section-heading { grid-template-columns: 1fr; }
  .section-heading .eyebrow { grid-column: auto; }
  .safety-strip { grid-template-columns: 1fr 1fr; }
  .safety-strip > * { border-bottom: 1px solid var(--ink); }
  .safety-strip > *:nth-child(2) { border-right: 0; }
  .safety-strip > *:nth-child(3), .safety-strip > *:nth-child(4) { border-bottom: 0; }
  .venue-board { min-height: 430px; }
  .venue-crowd { inset-inline: 10%; }
}

@media (max-width: 600px) {
  .site-header { height: 62px; }
  .header-status > span:not(.status-dot):not(.score-chip) { display: none; }
  .score-chip { margin-left: 3px; }
  .hero { min-height: 0; }
  .hero-copy { min-height: 610px; padding: 60px 22px; }
  .hero h1 { font-size: clamp(3.5rem, 19vw, 5.2rem); }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .hero-art { min-height: 430px; }
  .game-select { padding-inline: 14px; }
  .game-card { min-height: 600px; padding: 24px; }
  .card-visual { height: 220px; }
  .safety-strip { grid-template-columns: 1fr; }
  .safety-strip > * { border-right: 0; border-bottom: 1px solid var(--ink) !important; }
  .safety-strip > *:last-child { border-bottom: 0 !important; }
  footer { flex-direction: column; text-align: center; }
  .game-screen { padding: 8px; }
  .game-shell { min-height: calc(100vh - 80px); padding: 12px; box-shadow: 4px 5px 0 var(--ink); }
  .game-nav { grid-template-columns: 42px 1fr auto; gap: 8px; }
  .game-identity > span, .sound-label { display: none; }
  .hud { grid-template-columns: 62px 1fr 62px; gap: 8px; }
  .mission-panel, .results-panel { padding: 34px 18px; margin-block: 25px; }
  .rule-grid { grid-template-columns: 1fr; }
  .rule-grid div { border-right: 0; border-bottom: 1px solid var(--line); }
  .venue-instruction { padding: 11px; }
  .venue-board-wrap { padding: 5px; }
  .venue-board { min-height: 460px; }
  .venue-stage { left: 22%; width: 56%; }
  .venue-bar { right: 5px; }
  .venue-crowd { inset: 115px 5% 80px; }
  .exit-door { min-width: 80px; grid-template-columns: 20px 1fr; padding: 5px; }
  .exit-door span { width: 19px; height: 19px; }
  .exit-door small { display: none; }
  .door-d { left: 30%; }
  .venue-feedback { grid-template-columns: 1fr; }
  .selected-routes { justify-content: space-between; }
  .selected-routes span { flex: 1; }
  .takeaway { grid-template-columns: 1fr; }
  .result-actions { flex-direction: column; }
  .control-demo { align-items: flex-start; }
  .crowd-callout { align-items: flex-start; flex-direction: column; }
  .canvas-wrap { padding-bottom: 92px; background: var(--ink); }
  .mobile-controls {
    position: absolute;
    left: 50%;
    bottom: 7px;
    display: grid;
    grid-template-columns: repeat(3, 38px);
    grid-template-rows: repeat(2, 38px);
    gap: 4px;
    transform: translateX(-50%);
  }
  .mobile-controls button {
    color: white;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 4px;
  }
  .mobile-controls button:first-child { grid-column: 2; }
  .live-lessons { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
