/* ============================================================
   Vowel Squad — site shell + game HUD
   Cards: white, 3px ink border, hard offset shadow.
   Display type Fredoka, body type Nunito.
   ============================================================ */
:root {
  --sky: #bfe6ff;
  --sky-deep: #8fd0ff;
  --grass: #7fcf62;
  --ink: #231f20;
  --u-blue: #4373b9;
  --u-light: #7eacdc;
  --yellow: #ffd23f;
  --red: #d62839;
  --display: "Fredoka", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Nunito", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; overflow: hidden; }
body { background: var(--sky); color: var(--ink); font-family: var(--body); line-height: 1.5; -webkit-font-smoothing: antialiased; touch-action: none; -webkit-user-select: none; user-select: none; }
h1, h2, h3, .btn, .badge, .stars, .hint, .toast, .chip, .tile, .card, .speaker, .bubble { font-family: var(--display); }
img { max-width: 100%; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: 18px; cursor: pointer;
  border: 3px solid var(--ink); background: #fff; color: var(--ink);
  font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: .01em;
  box-shadow: 4px 4px 0 var(--ink); transition: transform .12s, box-shadow .12s, background .2s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn:disabled { opacity: .6; pointer-events: none; }
.btn-blue { background: var(--u-blue); color: #fff; }
.btn-yellow { background: var(--yellow); }
.btn-big { min-height: 64px; padding: 0 38px; font-size: 26px; border-radius: 22px; }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 16px; border-radius: 14px; box-shadow: 3px 3px 0 var(--ink); }
.btn.done { background: #7fcf62; }

/* ---------- start screen (hero) over the stage ---------- */
.shell {
  position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 20px; overflow: auto;
  background: linear-gradient(180deg, var(--sky) 0%, var(--sky-deep) 68%, var(--grass) 68.5%, #6bbd53 100%);
}
.hero-card {
  width: min(720px, 100%); text-align: center; background: #fff; border: 3px solid var(--ink); border-radius: 30px;
  padding: 22px 30px 26px; box-shadow: 8px 8px 0 var(--ink);
}
.logo-wrap { display: grid; place-items: center; }
.logo-video {
  display: block; width: min(100%, 44vh, 400px); aspect-ratio: 1 / 1; object-fit: cover;
  background: #fff; border-radius: 16px;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.eyebrow { font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: .12em; text-transform: uppercase; color: var(--u-blue); }
.hero-card h1 { font-size: clamp(52px, 10vw, 92px); line-height: 1; margin: 8px 0 12px; letter-spacing: -.01em; }
.tagline { font-size: clamp(17px, 2.2vw, 21px); font-weight: 700; margin: 6px 0 20px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.hero-squad { justify-content: center; margin-top: 22px; }
.hero-links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
/* TESTING helpers (main.js TESTING flag): the level picker on the start screen and the Skip level button in the HUD */
.level-picker { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 14px; font-weight: 700; font-size: 14px; color: #6b6b6b; }
.level-picker .btn { min-height: 32px; min-width: 32px; padding: 0 10px; font-size: 14px; border-radius: 10px; box-shadow: 2px 2px 0 var(--ink); }
.skip { position: absolute; top: 16px; left: 50%; transform: translateX(-50%); pointer-events: auto; opacity: 0.9; }
/* ---------- bonus round (2026-09-13): the guide's caption, the tap-along glow, badges ---------- */
.caption { position: absolute; left: 50%; bottom: 158px; transform: translateX(-50%); max-width: min(720px, 86vw); background: #fff; border: 3px solid var(--ink); border-radius: 18px; padding: 10px 18px; font-size: 20px; font-weight: 700; line-height: 1.3; color: var(--ink); box-shadow: 4px 4px 0 var(--ink); opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 3; text-align: center; }
.caption.show { opacity: 1; }
.caption .who { color: #3b7dd8; margin-right: 8px; }
.caption .who::after { content: ':'; }
.badges { display: flex; gap: 8px; }
.badge-token { background: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: 4px 10px; font-size: 22px; line-height: 1.2; box-shadow: 4px 4px 0 var(--ink); }
.badge-big { font-size: 72px; line-height: 1; margin: 6px 0 4px; }
.word-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0 18px; }
.word-pill { background: #fff3b0; border: 2px solid var(--ink); border-radius: 12px; padding: 4px 12px; font-weight: 700; font-size: 18px; }
body.ending .squad { display: none; }
.badge-row { display: flex; justify-content: center; gap: 14px; margin-top: 10px; }
.badge-row .badge-big { font-size: 44px; line-height: 1; }
body.bonus #joy, body.bonus #jump, body.bonus #celebrateBtn, body.bonus #coolRing, body.bonus .hint, body.bonus .stars, body.bonus #skipLevel { display: none; }
.squad.ask .chip:not(.locked) { animation: chipAsk .7s ease-in-out infinite alternate; }
@keyframes chipAsk { from { transform: translateY(0); } to { transform: translateY(-7px); box-shadow: 4px 10px 0 var(--ink), 0 0 0 4px #fff3b0; } }
.bubble.spell { pointer-events: none; }

/* ---------- stage: fills the viewport ---------- */
.stage {
  position: absolute; inset: 0; overflow: hidden; background: var(--sky);
  touch-action: none; -webkit-user-select: none; user-select: none;
}
.stage > canvas { position: absolute; inset: 0; display: block; width: 100% !important; height: 100% !important; }

/* ---------- HUD ---------- */
#hud { position: absolute; inset: 0; pointer-events: none; }
.badge {
  position: absolute; top: 16px; left: 16px;
  display: flex; align-items: center; gap: 10px;
  background: #fff; color: var(--ink);
  border: 3px solid var(--ink); border-radius: 18px;
  padding: 8px 14px 8px 10px; font-weight: 700; font-size: 18px;
  box-shadow: 4px 4px 0 var(--ink);
}
.badge .badge-letter {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--u-blue); color: #fff; display: grid; place-items: center;
  font-size: 22px; border: 2px solid var(--ink);
}
.top-right { position: absolute; top: 16px; right: 16px; display: flex; align-items: center; gap: 10px; }
.stars { background: #fff; border: 3px solid var(--ink); border-radius: 18px; padding: 8px 14px; font-weight: 700; font-size: 18px; box-shadow: 4px 4px 0 var(--ink); color: var(--ink); }
.stars span { color: #f3b700; }
.hint {
  position: absolute; bottom: 96px; left: 50%; transform: translateX(-50%);
  background: rgba(255,255,255,.85); color: var(--ink); border: 2px solid var(--ink);
  border-radius: 14px; padding: 8px 14px; font-size: 14px; font-weight: 600; white-space: nowrap; max-width: calc(100% - 32px); overflow: hidden; text-overflow: ellipsis;
}
.toast {
  position: absolute; top: 22%; left: 50%; transform: translate(-50%,-50%) scale(.6);
  background: #fff; border: 3px solid var(--ink); border-radius: 22px; padding: 14px 26px;
  font-weight: 700; font-size: 28px; color: var(--ink); box-shadow: 6px 6px 0 var(--ink);
  opacity: 0; transition: opacity .18s, transform .18s cubic-bezier(.2,1.6,.4,1); white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.toast.big { font-size: 44px; letter-spacing: .04em; padding: 16px 34px; text-transform: lowercase; }

/* Speaker: shows "Turn on sound" until the AudioContext is unlocked, then a mute toggle. */
.speaker {
  display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; pointer-events: auto; cursor: pointer;
  background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 18px;
  font-family: var(--display); font-weight: 700; font-size: 16px; box-shadow: 4px 4px 0 var(--ink);
  transition: transform .12s, box-shadow .12s; -webkit-tap-highlight-color: transparent;
}
.speaker:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.speaker .icon { width: 24px; height: 24px; display: none; }
.speaker .icon-off { display: block; }
.speaker.on .icon-off { display: none; }
.speaker.on .icon-on { display: block; }
.speaker.unlocked { padding: 0 10px; }
.speaker.unlocked .label { display: none; }
.speaker:not(.unlocked) { background: var(--yellow); }

/* Word bubbles: DOM tiles projected onto each item. Consonants filled, vowels blank until caught. */
.bubbles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.bubble {
  position: absolute; left: 0; top: 0; display: flex; gap: 5px; padding: 7px 9px;
  background: #fff; border: 3px solid var(--ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--ink);
  opacity: 0; transition: opacity .18s; will-change: transform;
}
.bubble.show { opacity: 1; }
.bubble::after {
  content: ''; position: absolute; left: 50%; bottom: -11px; width: 16px; height: 16px; background: #fff;
  border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: translateX(-50%) rotate(45deg);
}
.bubble.done { background: #fff3b0; box-shadow: 4px 4px 0 var(--ink), 0 0 0 4px var(--yellow); transition: background .2s, box-shadow .2s, opacity .18s; }
.bubble.done::after { background: #fff3b0; }
.tile {
  width: 36px; height: 42px; display: grid; place-items: center; border-radius: 8px;
  font-weight: 700; font-size: 26px; line-height: 1; text-transform: uppercase;
  color: var(--ink); background: #fff; border: 2px solid var(--ink);
}
.tile.blank { color: transparent; background: #f1f1f1; border-style: dashed; border-color: #9a9a9a; }
.tile.blank.need {
  border-style: solid; border-color: var(--need, var(--ink)); background: #fff;
  animation: needGlow .9s ease-in-out infinite alternate;
}
.tile.filled { color: #fff; background: var(--vowel, var(--ink)); border-color: var(--ink); }
.tile.flash { animation: tileFlash .5s ease; }
.tile.ghost { position: absolute; pointer-events: none; z-index: 3; }
.bubble.shake { animation: bubbleShake .45s ease; }
@keyframes bubbleShake {
  0%, 100% { translate: 0 0; } 20% { translate: -8px 0; } 40% { translate: 8px 0; } 60% { translate: -5px 0; } 80% { translate: 5px 0; }
}
#devOverlay {
  position: absolute; top: 76px; left: 16px; z-index: 4; pointer-events: none; white-space: pre;
  background: rgba(255,255,255,.92); border: 2px solid var(--ink); border-radius: 10px; padding: 6px 10px;
  font: 12px/1.45 "SF Mono", Menlo, monospace; color: var(--ink);
}
.tile.said { background: #fff3b0; }
.tile.filled.said { filter: brightness(1.15); }
@keyframes needGlow {
  from { box-shadow: 0 0 0 2px var(--need), 0 0 6px var(--need); }
  to   { box-shadow: 0 0 0 4px var(--need), 0 0 18px var(--need); }
}
@keyframes tileFlash {
  0%, 100% { background: #fff; }
  25%, 75% { background: #ffb3b3; border-color: var(--red); box-shadow: 0 0 0 4px var(--red); }
}

/* Squad bar: five portrait chips, bottom centre. Locked = gray + padlock, active = raised. */
.squad { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; pointer-events: auto; }
.chip-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.chip {
  position: relative; width: 54px; height: 54px; border-radius: 14px; padding: 0;
  border: 3px solid var(--ink); background: #fff; color: #fff;
  font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1;
  display: grid; place-items: center; box-shadow: 4px 4px 0 var(--ink); cursor: pointer;
  transition: transform .18s cubic-bezier(.2,1.6,.4,1), box-shadow .18s, background .2s;
  -webkit-tap-highlight-color: transparent; touch-action: none;
}
.chip.big { width: 84px; height: 84px; font-size: 46px; border-radius: 20px; cursor: default; }
.chip .glyph, .chip .lock { grid-area: 1 / 1; }
.chip .lock { display: none; width: 24px; height: 24px; color: #6f6f6f; }
.chip .lock svg { width: 100%; height: 100%; display: block; }
.chip .key {
  position: absolute; top: -11px; left: -8px; font-size: 11px; font-weight: 700; line-height: 1;
  background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 8px; padding: 2px 5px;
}
.chip.locked { background: #d4d4d4; cursor: not-allowed; }
.chip.locked .glyph { display: none; }
.chip.locked .lock { display: block; }
.chip.active { transform: translateY(-10px) scale(1.15); border-width: 4px; box-shadow: 6px 6px 0 var(--ink); }
.chip.shake { animation: chipShake .35s ease; }
@keyframes chipShake {
  0%, 100% { translate: 0 0; }
  20% { translate: -6px 0; }
  40% { translate: 6px 0; }
  60% { translate: -4px 0; }
  80% { translate: 4px 0; }
}

/* Touch controls (shown only on touch devices) */
#joy, #jump { touch-action: none; -webkit-touch-callout: none; }
.btn, .speaker, .redbox { touch-action: manipulation; }
#joy { position: absolute; left: 28px; bottom: 28px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.35); border: 3px solid rgba(35,31,32,.5); display: none; pointer-events: auto; }
#joy .knob { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: var(--u-blue); border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
#jump { position: absolute; right: 28px; bottom: 44px; width: 84px; height: 84px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); display: none; place-items: center; font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--ink); pointer-events: auto; }
#celebrateBtn {
  position: absolute; right: 28px; bottom: 28px; width: 72px; height: 72px; border-radius: 50%;
  background: var(--yellow); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--ink);
  pointer-events: auto; cursor: pointer; touch-action: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
  transition: transform .1s, box-shadow .1s;
}
#celebrateBtn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
#celebrateBtn.cooling { background: #efe6b8; color: #9a9a9a; box-shadow: 2px 2px 0 var(--ink); }
/* cooldown ring: the dark arc is the time still to wait, shrinking back to nothing */
#coolRing {
  position: absolute; right: 19px; bottom: 19px; width: 90px; height: 90px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(rgba(35, 31, 32, .5) calc(var(--cool, 0) * 100%), transparent 0);
  -webkit-mask: radial-gradient(circle, transparent 58%, #000 60%); mask: radial-gradient(circle, transparent 58%, #000 60%);
}
body.touch #celebrateBtn { bottom: 150px; }
body.touch #coolRing { bottom: 141px; }
body.touch #joy, body.touch #jump { display: grid; }
body.touch.bonus .squad { bottom: 24px; }   /* and with no joystick to clear, the squad bar drops back to the bottom, under the caption */
body.touch.bonus #joy, body.touch.bonus #jump { display: none; }   /* scenes have nothing to steer: this touch rule used to win over the bonus one above and leave them showing (fixed 2026-09-18) */
body.touch .hint { display: none; }
body.touch .squad { bottom: 176px; }
body.touch .chip .key { display: none; }

/* ---------- overlays (intro / complete / unlock / finished) ---------- */
.overlay {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 20px;
  background: rgba(191, 230, 255, .72); pointer-events: auto; z-index: 5;
}
.card {
  width: min(640px, 100%); max-height: calc(100% - 40px); overflow: auto; text-align: center;
  background: #fff; border: 3px solid var(--ink); border-radius: 28px; padding: 30px 28px 28px;
  box-shadow: 8px 8px 0 var(--ink);
}
.card .eyebrow { margin-bottom: 4px; }
.card-title { font-size: clamp(36px, 6vw, 54px); line-height: 1.05; margin-bottom: 8px; }
.card-sub { font-family: var(--body); font-weight: 700; font-size: 18px; margin-bottom: 18px; }
.card .btn { margin-top: 22px; }
.watch-out { margin: 12px 0 0; font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--red); }
.card .chip-row { margin: 14px 0 6px; }
.thumb-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin: 6px 0; }
.thumb { position: relative; width: 132px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.thumb img { width: 112px; height: 112px; background: #f1f7ff; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 4px 4px 0 var(--ink); }
.thumb figcaption { font-family: var(--display); font-weight: 700; font-size: 22px; text-transform: lowercase; }
.thumb-check { position: absolute; top: -8px; right: 2px; width: 34px; height: 34px; border-radius: 50%; background: #7fcf62; border: 3px solid var(--ink); color: var(--ink); display: grid; place-items: center; }
.thumb-check svg { width: 20px; height: 20px; }
.big-check { width: 96px; height: 96px; margin: 0 auto 14px; border-radius: 50%; background: #7fcf62; border: 3px solid var(--ink); color: var(--ink); display: grid; place-items: center; box-shadow: 5px 5px 0 var(--ink); }
.big-check svg { width: 60px; height: 60px; }

/* ---------- how-to-play pop-up ---------- */
.howto-card { text-align: left; width: min(760px, 100%); }
.howto-card .card-title, .howto-card .card-sub { text-align: center; }
.howto-steps { padding-left: 24px; font-family: var(--body); font-size: 17px; line-height: 1.5; }
.howto-steps li { margin-bottom: 9px; padding-left: 4px; }
.howto-steps li::marker { font-family: var(--display); font-weight: 700; color: var(--u-blue); }
.howto-steps strong { font-family: var(--display); font-weight: 700; }
.howto-example { display: flex; gap: 10px; align-items: center; margin: 6px 0 0; }
.bubble.static { position: static; opacity: 1; display: inline-flex; padding: 6px 8px; box-shadow: 3px 3px 0 var(--ink); }
.bubble.static::after { display: none; }
.bubble.static .tile { width: 30px; height: 36px; font-size: 22px; }
.howto-card .chip-row { justify-content: flex-start; gap: 8px; }
.howto-card .chip { width: 40px; height: 40px; font-size: 20px; border-radius: 10px; box-shadow: 3px 3px 0 var(--ink); cursor: default; }
.howto-card .chip .lock { width: 18px; height: 18px; }
kbd {
  display: inline-block; font-family: var(--display); font-weight: 700; font-size: .85em; line-height: 1.3;
  background: #f4f4f4; color: var(--ink); border: 2px solid var(--ink); border-radius: 6px; padding: 1px 7px; margin: 0 2px; box-shadow: 2px 2px 0 var(--ink);
}
body.touch .kb, body:not(.touch) .tch { display: none; }   /* show the controls this device actually has */
/* the close button stays visible while a long card scrolls */
.card-footer {
  position: sticky; bottom: 0; display: flex; justify-content: center;
  margin: 12px -28px 0; padding: 12px 28px 16px; background: #fff;
  box-shadow: 0 -12px 12px -10px rgba(35, 31, 32, .18);
}
.howto-card, .site-card { padding-bottom: 0; }

/* ---------- the site panel (Menu, 2026-09-25): the website as sections over the paused game ---------- */
.overlay.modal { z-index: 7; }
.overlay.modal .card { touch-action: pan-y; }   /* the body blocks touch gestures for the joystick; a card must still scroll on a finger */
.overlay.site { background: rgba(18, 14, 22, .74); }   /* Vance: a black screen at lower opacity, so the level shows through */
.menu-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 16px; cursor: pointer;
  background: #fff; color: var(--ink); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--display); font-weight: 700; font-size: 17px; pointer-events: auto; touch-action: manipulation;
}
.menu-btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.menu-btn .icon { width: 22px; height: 22px; }
.shell-menu { position: absolute; top: 16px; right: 16px; z-index: 2; }
.site-card { text-align: left; width: min(920px, 100%); padding-top: 18px; -webkit-user-select: text; user-select: text; }
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.site-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 22px; }
.site-brand .badge-letter { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: var(--red); color: #fff; border: 3px solid var(--ink); }
.site-x { width: 44px; height: 44px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; color: var(--ink); font-family: var(--display); font-size: 28px; line-height: 1; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); }
.site-x:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.site-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 20px; }
.site-tab {
  min-height: 40px; padding: 0 14px; border-radius: 14px; cursor: pointer; border: 3px solid var(--ink); background: #fff; color: var(--ink);
  font-family: var(--display); font-weight: 700; font-size: 16px; box-shadow: 3px 3px 0 var(--ink); touch-action: manipulation;
}
.site-tab.active { background: var(--yellow); transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }
.site-tab:focus-visible, .menu-btn:focus-visible, .site-x:focus-visible { outline: 3px solid var(--u-blue); outline-offset: 2px; }
.site-page { font-family: var(--body); font-size: 17px; line-height: 1.55; }
.site-page p { margin-bottom: 12px; max-width: 70ch; }
.site-h1 { font-size: clamp(32px, 5.5vw, 48px); line-height: 1.05; margin-bottom: 14px; text-wrap: balance; }
.site-page h3 { font-size: 22px; line-height: 1.15; margin: 4px 0 6px; }
.site-page h4 { font-size: 19px; line-height: 1.2; font-family: var(--display); }
.site-sub { font-weight: 800; font-size: 19px; }
.site-tagline { font-family: var(--display); font-weight: 700; font-size: 26px; text-align: center; margin: 18px auto 6px; color: var(--u-blue); }
.site-muted { color: #6b6469; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.site-hero { text-align: center; }
.site-hero .site-h1 { font-size: clamp(36px, 6.5vw, 58px); }
.site-hero p { margin-left: auto; margin-right: auto; }
.redbox-wide { width: 100%; min-height: 120px; margin-bottom: 14px; }
.site-hero .redbox-wide { aspect-ratio: 16 / 7; min-height: 0; }
.aeiou-line { margin: 6px 0 12px; }
.aeiou-line .chip-row { justify-content: center; gap: 8px; margin: 0 0 6px; }
.aeiou-line .chip { width: 46px; height: 46px; font-size: 24px; border-radius: 12px; box-shadow: 3px 3px 0 var(--ink); cursor: default; }
.chip-y { display: grid; place-items: center; background: #fff; color: var(--ink); border: 3px dashed var(--ink) !important; box-shadow: none !important; }
.aeiou-text { font-family: var(--display); font-weight: 700; font-size: 22px; margin-bottom: 8px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 6px 0 4px; }
.site-block { border: 3px solid var(--ink); border-radius: 18px; padding: 14px 16px 6px; box-shadow: 4px 4px 0 var(--ink); background: #fff; }
.site-block.kids { background: #fff7d6; }
.site-block.grown { background: #eaf3ff; }
.qa { border-left: 6px solid var(--yellow); padding: 2px 0 2px 16px; margin: 0 0 16px; }
.qa.y { border-left-color: var(--u-blue); }
.squad-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-top: 8px; }
.squad-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 14px 12px 12px; background: #fff; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 4px 4px 0 var(--ink); }
.squad-card img { width: 120px; height: 120px; background: #f1f7ff; border: 3px solid var(--ink); border-radius: 18px; }
.squad-card figcaption { display: flex; flex-direction: column; gap: 4px; }
.squad-name { font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1; }
.squad-bio { font-size: 15px; line-height: 1.4; }
.masthead { border-top: 4px double var(--ink); border-bottom: 4px double var(--ink); padding: 12px 6px; text-align: center; margin-bottom: 6px; }
.masthead h2 { font-family: "Alfa Slab One", "Rockwell", "Roboto Slab", Georgia, serif; font-weight: 400; font-size: clamp(26px, 5vw, 44px); line-height: 1.05; letter-spacing: .01em; text-transform: uppercase; }
.masthead-note { font-size: 13px; color: #a11b25; text-align: center; font-weight: 700; margin-bottom: 8px; }
.episode-status { font-family: var(--display); font-weight: 700; font-size: 22px; text-align: center; color: var(--red); }
.episode-list { list-style: none; display: grid; gap: 12px; margin: 8px 0 16px; }
.episode { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; background: #fff; border: 3px solid var(--ink); border-radius: 16px; box-shadow: 4px 4px 0 var(--ink); }
.episode-num { flex: none; width: 46px; height: 46px; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 20px; background: var(--yellow); border: 3px solid var(--ink); border-radius: 12px; font-variant-numeric: tabular-nums; }
.episode-body { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.pill { align-self: flex-start; font-family: var(--display); font-weight: 700; font-size: 14px; padding: 3px 10px; border: 2px solid var(--ink); border-radius: 999px; background: #f4f4f4; }
.episode-play { position: relative; width: 100%; aspect-ratio: 16 / 9; border: 3px solid var(--ink); border-radius: 14px; background: #111 center / cover no-repeat; cursor: pointer; display: grid; place-items: center; }
.episode-play-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--red); color: #fff; border: 3px solid var(--ink); display: grid; place-items: center; font-size: 26px; padding-left: 4px; }
.episode-frame { width: 100%; aspect-ratio: 16 / 9; border: 3px solid var(--ink); border-radius: 14px; background: #000; }
.mystery { width: 120px; height: 120px; margin: 8px auto 16px; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 72px; color: var(--ink); background: var(--yellow); border: 3px dashed var(--ink); border-radius: 28px; }
.redbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 20px; }
.redbox {
  display: flex; flex-direction: column; gap: 8px; min-height: 150px; padding: 14px; text-align: left; cursor: pointer;
  background: #e5322d; color: #fff; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--body); transition: transform .12s, box-shadow .12s;
}
.redbox:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.redbox:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.redbox-tag { font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; opacity: .9; }
.redbox-text { font-weight: 700; font-size: 16px; line-height: 1.35; flex: 1; }
.redbox-hint { font-size: 13px; opacity: .85; }
.redbox.copied { background: #7fcf62; color: var(--ink); }
.redbox.copied .redbox-hint::after { content: ' — copied!'; font-weight: 800; }

@media (max-width: 600px) {
  .hero-card { padding: 18px 16px 22px; }
  .logo-video { width: min(100%, 38vh, 300px); }
  .card { padding: 24px 18px 22px; }
  .howto-card, .site-card { padding-bottom: 0; }   /* the sticky footer must sit flush on the card's bottom edge */
  .shell { padding-top: 72px; }   /* the start card begins under the Menu button instead of behind it */
  .card-footer { margin-left: -18px; margin-right: -18px; padding-left: 18px; padding-right: 18px; }
  .thumb { width: 100px; }
  .thumb img { width: 84px; height: 84px; }
  .chip.big { width: 66px; height: 66px; font-size: 36px; }
}

/* ---------- phones in portrait (2026-09-18, found on an iPhone): the HUD was laid out for an iPad's width ----------
   Top: the name badge shrinks to its letter and the speaker to its icon, so the Skip button has the middle to itself.
   Bottom: the squad bar sat level with the YAY! button and its last chip (U) slid under it; it now sits above YAY!. */
@media (max-width: 600px) {
  .badge { font-size: 0; gap: 0; padding: 6px; }
  .menu-btn .label { display: none; }
  .menu-btn { padding: 0 10px; }
  .two-col { grid-template-columns: 1fr; }
  .site-tabs { gap: 6px; }
  .site-tab { font-size: 14px; padding: 0 10px; min-height: 36px; }
  .squad-grid { grid-template-columns: 1fr 1fr; }
  .badge .badge-letter { font-size: 22px; }
  .speaker .label { display: none; }
  .speaker { padding: 8px 10px; }
  .top-right { gap: 6px; right: 10px; }
  .badge { left: 10px; }
  .stars { padding: 8px 10px; font-size: 16px; }
  .skip { top: 72px; font-size: 14px; padding: 6px 10px; }   /* its own row under the top bar */
  body.touch .squad { bottom: 240px; gap: 10px; }
  /* scenes (bonus round, ending) hide the joystick and the buttons, so the squad bar drops to the bottom and the caption sits above it */
  body.touch.bonus .squad { bottom: 24px; }
  body.touch .caption { bottom: 104px; font-size: 17px; left: 4vw; right: 4vw; max-width: none; width: fit-content; margin: 0 auto; translate: none; }
  .caption { left: 4vw; right: 4vw; width: fit-content; max-width: 92vw; margin: 0 auto; transform: none; }   /* centred by margins, not by left:50%, which capped its width at half the screen */
  body.touch.ending .caption { bottom: 28px; }
}
