:root {
  --ink: #1c1426;
  --cream: #fffaf0;
  --yellow: #ffd23f;
  --pink: #ff4d8d;
  --cyan: #2ec4b6;
  --blue: #3a6cff;
  --green: #2f9e62;
  --hall: #140816;
  --round: #ffd23f;
  --line: rgba(28, 20, 38, 0.14);
  --display: "Fredoka", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --body: "Nunito", "Trebuchet MS", "Segoe UI", sans-serif;
  font-family: var(--body);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--hall); color: var(--cream); }
body { overscroll-behavior: none; }
body.desk { box-shadow: inset 0 0 0 8px #ff4d6d; }
button, input, select { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:focus-visible, input:focus-visible, summary:focus-visible, select:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}
img { max-width: 100%; display: block; }
h1, h2, .ask, .clip-disc span, .answer-banner, .round-giant, .place, .btn, .minutes, .pens div, .q-count b, .pts, .chip b {
  font-family: var(--display);
  font-weight: 700;
}

.cin-bg {
  min-height: 100dvh;
  background-color: var(--hall);
  background-image:
    radial-gradient(circle at 4% 8%, #ffd23f 0 10px, transparent 11px),
    radial-gradient(circle at 9% 18%, #ff4d8d 0 6px, transparent 7px),
    radial-gradient(circle at 96% 6%, #ff4d8d 0 16px, transparent 17px),
    radial-gradient(circle at 90% 16%, #ffd23f 0 7px, transparent 8px),
    radial-gradient(circle at 7% 88%, #2ec4b6 0 14px, transparent 15px),
    radial-gradient(circle at 14% 78%, #3a6cff 0 6px, transparent 7px),
    radial-gradient(circle at 93% 84%, #3a6cff 0 12px, transparent 13px),
    radial-gradient(circle at 84% 92%, #ffd23f 0 8px, transparent 9px),
    radial-gradient(circle at 50% -8%, rgba(255, 210, 63, 0.28), transparent 42%),
    radial-gradient(circle at 100% 100%, rgba(255, 77, 141, 0.16), transparent 36%),
    linear-gradient(180deg, #3b1844 0%, #140816 46%);
}

.wrap { width: 90vw; margin: 0 auto; padding: 1rem 0 2.5rem; }

.hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.2rem;
  align-items: center;
  padding: 0.4rem 0 1.1rem;
}
.hero-bear { padding: 0; }
.pudsey {
  display: block;
  width: auto;
  height: auto;
  max-height: min(36vh, 280px);
  max-width: min(42vw, 320px);
  object-fit: contain;
  filter: drop-shadow(7px 8px 0 rgba(28, 20, 38, 0.16));
}
.hero-bear .pudsey { max-height: min(42vh, 320px); max-width: min(46vw, 360px); }
.intro-mark { display: grid; justify-items: center; gap: 0.45rem; }
.intro-pudsey { max-height: min(22vh, 168px); max-width: 190px; }
.mid-pudsey { max-height: min(22vh, 170px); max-width: 180px; }
.hero .kicker {
  display: inline-block;
  background: var(--pink);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 0.2rem 0.75rem;
}
.hero-copy { min-width: 0; container-type: inline-size; }
.hero h1 {
  margin: 0.25rem 0 0.15rem;
  font-size: clamp(1.7rem, 8.2cqi, 7rem);
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
  color: var(--yellow);
  text-shadow: 4px 4px 0 #ff4d8d;
}
.lede { margin: 0.35rem 0 0; font-size: 1.35rem; font-weight: 800; }
.show-line { margin: 0.2rem 0 0; font-size: 1.05rem; color: #f3d7e4; }

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--yellow);
}

.panel {
  background: var(--cream);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 24px;
  padding: 1rem 1.1rem 1.15rem;
  margin: 0.85rem 0;
  box-shadow: 8px 8px 0 rgba(255, 210, 63, 0.9);
}
.panel h2 { margin: 0 0 0.35rem; font-size: 1.7rem; letter-spacing: -0.02em; }
.muted { color: #5c5168; margin: 0.2rem 0 0.7rem; }
.minutes { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0.15rem 0 0.2rem; color: var(--ink); }

.row { display: flex; flex-wrap: wrap; gap: 0.55rem; align-items: center; }
.teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.6rem; }
.team-edit {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  background: #fff;
  border-radius: 16px;
  padding: 0.4rem 0.45rem;
  border: 3px solid var(--ink);
}
.team-edit input { border: 0; background: transparent; width: 100%; font-weight: 800; color: var(--ink); }
.swatch { width: 1.45rem; height: 1.45rem; border-radius: 50%; flex: none; border: 2px solid var(--ink); }

.btn {
  border: 3px solid var(--ink);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  min-height: 3.1rem;
  padding: 0.45rem 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: 3px 3px 0 rgba(28, 20, 38, 0.18);
}
.btn:active { transform: translateY(2px); box-shadow: 1px 1px 0 rgba(28, 20, 38, 0.18); }
.btn.primary { background: var(--yellow); }
.btn.go {
  background: var(--yellow);
  font-size: 1.25rem;
  min-height: 3.8rem;
  padding-inline: 1.35rem;
  box-shadow: 4px 4px 0 var(--pink);
}
.btn.dark { background: var(--ink); color: var(--cream); }
.btn.ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(255, 250, 240, 0.45);
  box-shadow: none;
}
.btn.small { min-height: 2.45rem; font-size: 0.95rem; padding-inline: 0.8rem; }
.btn.warn { background: #ffe1ea; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.round-list { display: flex; flex-direction: column; gap: 0.45rem; }
.round-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
  background: #fff;
  border-radius: 16px;
  padding: 0.55rem 0.75rem;
  border: 3px solid var(--ink);
  border-left: 12px solid var(--round, var(--yellow));
}
.round-row strong { display: block; font-family: var(--display); font-size: 1.15rem; }
.round-row span { color: #5c5168; font-size: 0.92rem; }
.round-row input { width: 1.25rem; height: 1.25rem; accent-color: var(--ink); }

details {
  background: #fff;
  border-radius: 16px;
  padding: 0.7rem 0.9rem;
  margin: 0.55rem 0;
  border: 3px solid var(--ink);
}
summary { cursor: pointer; font-weight: 800; font-family: var(--display); font-size: 1.15rem; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+  "; color: var(--pink); }
details[open] summary::before { content: "–  "; }
.help ul { margin: 0.4rem 0 0.2rem; padding-left: 1.1rem; }
.help li { margin: 0.25rem 0; }

.slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.7rem; }
.slot { background: #fffaf0; border: 3px dashed #8d7b9e; border-radius: 16px; padding: 0.6rem; }
.slot img { width: 100%; height: 140px; object-fit: cover; border-radius: 12px; background: #fff; border: 3px solid var(--ink); }
.slot label.file {
  display: inline-block;
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-weight: 800;
  font-size: 0.9rem;
}
.slot input[type="file"] { display: none; }
.slot input[type="text"], .school-row input, .music-row input {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 0.4rem 0.5rem;
  margin: 0.25rem 0;
  background: #fff;
  color: var(--ink);
}
.idea { font-size: 0.85rem; color: #5c5168; margin: 0 0 0.3rem; }
.school-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0.4rem; margin: 0.35rem 0; }
.music-row { display: grid; grid-template-columns: 1.1fr 0.9fr 1.4fr; gap: 0.4rem; margin: 0.35rem 0; }

.desk-banner, .warn-banner {
  background: #ff4d6d;
  color: #fff;
  font-weight: 800;
  border-radius: 16px;
  padding: 0.65rem 0.9rem;
  margin-top: 0.35rem;
  border: 3px solid var(--ink);
  letter-spacing: 0.01em;
}

.board {
  width: 90vw;
  margin: 0 auto;
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 18px 0.75rem;
  overflow: hidden;
}
.topbar, .footer { display: flex; gap: 0.45rem; align-items: center; flex-wrap: wrap; }
.footer {
  background: rgba(255, 250, 240, 0.08);
  border: 2px solid rgba(255, 250, 240, 0.16);
  border-radius: 18px;
  padding: 0.4rem;
}
.topbar { justify-content: space-between; }
.progress {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
}
.stage {
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--round) 55%, white) 0, transparent 34%),
    linear-gradient(180deg, #fffdf8 0%, #fff4df 100%);
  color: var(--ink);
  border-radius: 32px;
  border: 4px solid var(--ink);
  box-shadow: 0 0 0 7px var(--round), 0 18px 0 rgba(0, 0, 0, 0.18);
  margin: 10px 0;
  padding: clamp(0.9rem, 2vw, 1.6rem) clamp(1rem, 2.4vw, 2rem);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  min-height: 0;
  overflow: auto;
  position: relative;
}
.stage::before, .stage::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--round);
  border: 3px solid var(--ink);
  pointer-events: none;
  z-index: 2;
}
.stage.has-staff-wash { overflow: hidden; }
.staff-wash {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  object-fit: cover;
  object-position: center center;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  -webkit-user-drag: none;
  user-select: none;
}
.stage.has-staff-wash > :not(.staff-wash) { position: relative; z-index: 1; }
.stage:has(.photo-q) > .photo-q {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  align-items: center;
  justify-content: center;
}
.stage:has(.photo-q) > .kicker,
.stage:has(.photo-q) > .pips,
.stage:has(.photo-q) > .ask,
.stage:has(.photo-q) > .hint,
.stage:has(.photo-q) > .answer-banner,
.stage:has(.photo-q) > .because,
.stage:has(.photo-q) > .also {
  position: relative;
  z-index: 4;
}
.stage:has(.photo-q) > .ask {
  margin-top: auto;
  align-self: flex-start;
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  border-radius: 16px;
  padding: 0.1rem 0.55rem;
}
.stage::before { width: 18px; height: 18px; top: 22px; left: 22px; }
.stage::after { width: 12px; height: 12px; right: 22px; bottom: 22px; }
.stage .kicker {
  display: inline-block;
  align-self: flex-start;
  background: var(--round);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 0.18rem 0.7rem;
  margin: 0;
}
.kind-music .kicker, .kind-video .kicker, .kind-emoji .kicker, .kind-letters .kicker,
.kind-art .kicker, .kind-logo .kicker, .kind-zoom .kicker,
.kind-final .kicker, .kind-tie .kicker, .kind-mid .kicker {
  align-self: center;
}
.kind-music .pips, .kind-video .pips, .kind-emoji .pips, .kind-letters .pips, .kind-art .pips, .kind-logo .pips, .kind-zoom .pips { justify-content: center; }

.intro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem 1.2rem;
  align-items: center;
}
.rules {
  margin: 0.35rem 0 0;
  font-size: clamp(1.25rem, 2.5vw, 1.85rem);
  font-weight: 800;
  line-height: 1.25;
  max-width: 18em;
}
.q-count { margin: 0.7rem 0 0; font-size: 1.15rem; font-weight: 800; }
.q-count b { font-size: 2rem; }
.round-giant {
  margin: 0;
  width: min(32vh, 230px);
  height: min(32vh, 230px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--round);
  color: var(--ink);
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 rgba(28, 20, 38, 0.18);
  font-size: clamp(4.4rem, 10vw, 6.4rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
}

.pips { display: flex; gap: 0.35rem; margin: 0.45rem 0 0.15rem; flex-wrap: wrap; }
.pips i {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: rgba(28, 20, 38, 0.16);
  border: 2px solid var(--ink);
  display: block;
}
.pips i.done { background: var(--round); }
.pips i.now { background: var(--ink); transform: scale(1.15); }

.award-bar { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; width: 100%; }
.award-bar .mark { margin: 0; font-size: 0.98rem; font-weight: 800; color: var(--cream); }
.ask {
  font-size: clamp(2.15rem, 4.8vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0.25rem 0;
  text-wrap: balance;
}
.subask { font-size: clamp(1.35rem, 2.8vw, 2.1rem); font-weight: 800; margin: 0.35rem 0 0; }
.kind-hilo .known, .kind-hilo .subask { text-align: left; }
.known {
  display: inline-block;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  font-weight: 800;
  margin: 0 0 0.4rem;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 0.4rem 0.8rem;
  box-shadow: 5px 5px 0 var(--round);
}
.known b { font-size: 1.25em; }
.kind-hilo .subask {
  display: inline-block;
  background: var(--round);
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 0.3rem 0.75rem;
}
.clip-disc {
  position: relative;
  width: min(36vh, 280px);
  aspect-ratio: 1;
  margin: 0.2rem auto 0.45rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #1a1024;
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 rgba(28, 20, 38, 0.22);
}
.clip-disc::before {
  content: "";
  position: absolute;
  inset: -8%;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, #2c1840 0 2px, #4a2a62 2px 3px, #1c1028 3px 6px),
    radial-gradient(circle at 35% 32%, rgba(255, 255, 255, 0.18), transparent 42%);
  animation: vinyl-spin 2.4s linear infinite;
}
.clip-disc span {
  position: relative;
  z-index: 1;
  width: 42%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #1c1426 0 9%, var(--round) 10% 100%);
  border: 3px solid var(--ink);
  font-size: clamp(2.2rem, 6vh, 4rem);
  line-height: 1;
  color: var(--ink);
}
@keyframes vinyl-spin {
  to { transform: rotate(360deg); }
}
.emoji-line {
  display: inline-block;
  font-size: clamp(5.5rem, min(30vh, 22vw), 22rem);
  line-height: 1.05;
  margin: 0.2rem auto;
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 28px;
  padding: 0.15rem 0.9rem 0.35rem;
  box-shadow: 8px 8px 0 var(--round);
}
.kind-music, .kind-video, .kind-emoji, .kind-letters, .kind-art, .kind-logo, .kind-zoom, .kind-final, .kind-tie, .kind-mid { text-align: center; }
.stage.kind-logo {
  overflow: hidden;
  align-items: center;
  justify-content: safe center;
}
.stage.kind-logo .kicker,
.stage.kind-logo .pips,
.stage.kind-logo .ask,
.stage.kind-logo .answer-banner,
.stage.kind-logo .because,
.stage.kind-logo .also { flex: 0 0 auto; max-width: 100%; }
.logo-fit {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  width: 100%;
  display: grid;
  place-items: center;
  padding: 0.35rem 0.7rem 0.7rem;
  container-type: size;
}
.logo-card {
  position: relative;
  width: min(100cqw, calc(100cqh * 16 / 10));
  height: min(100cqh, calc(100cqw * 10 / 16));
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  background: #fff;
  border-radius: clamp(16px, 2vw, 28px);
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--round);
  padding: 0;
  overflow: hidden;
}
.logo-card img {
  position: absolute;
  left: 8%;
  top: 8%;
  width: 84%;
  height: 84%;
  max-width: none;
  max-height: none;
  margin: 0;
  object-fit: contain;
  object-position: center center;
}
.zoom-q {
  position: relative;
  width: min(52vh, 68vw, 540px);
  aspect-ratio: 1;
  margin: 0.6rem auto 0.3rem;
  overflow: hidden;
  border-radius: 22px;
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--round);
  background: #111;
}
.zoom-q img {
  position: absolute;
  width: calc(var(--zoom, 3.5) * 100%);
  height: calc(var(--zoom, 3.5) * 100%);
  max-width: none;
  left: calc(50% - var(--fx, 50%) * var(--zoom, 3.5));
  top: calc(50% - var(--fy, 50%) * var(--zoom, 3.5));
  object-fit: cover;
}
.clip-player { margin-top: 0.35rem; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.clip-fit { flex: 1; min-height: 0; container-type: size; display: grid; place-items: center; }
.clip-frame {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 16 / 9;
  background: #1c1426;
  border-radius: 14px;
  overflow: hidden;
  border: 3px solid var(--ink);
}
body.desk .desk-card:has(.clip-player) {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.desk .clip-fit .clip-frame {
  width: min(100cqw, calc(100cqh * 16 / 9));
  height: min(100cqh, calc(100cqw * 9 / 16));
  max-width: 100%;
}
body.desk .stage.kind-music { flex: 0 0 auto; padding: 0.35rem 0.7rem; }
body.desk .stage.kind-music .ask,
body.desk .stage.kind-music .hint,
body.desk .stage.kind-music .pips,
body.desk .stage.kind-music .kicker { display: none; }
body.desk .stage.kind-music .clip-disc { width: 58px; margin: 0 auto; }
body.desk .stage.kind-music .clip-disc span { width: 46%; font-size: 1rem; border-width: 2px; }
.sound-box {
  position: relative;
  width: min(36vh, 280px);
  aspect-ratio: 1;
  margin: 0.2rem auto 0.45rem;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 rgba(28, 20, 38, 0.22);
}
.sound-box .sound-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 640px;
  height: 360px;
  margin: 0;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 0;
}
.sound-box .sound-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background: #1c1426;
}
.sound-box .clip-disc { width: 100%; height: 100%; margin: 0; border: 0; box-shadow: none; }
.clip-frame iframe,
.clip-hold,
.clip-hold iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-frame { width: min(92vw, 960px); margin: 0.4rem auto 0.5rem; }
.stage.kind-video {
  justify-content: flex-start;
  align-items: center;
  overflow: auto;
}
.video-fit {
  position: absolute;
  inset: 0.75rem 1rem 0.75rem;
  z-index: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  container-type: size;
}
.stage.kind-video .video-frame {
  width: min(100cqw, calc(100cqh * 16 / 9));
  height: min(100cqh, calc(100cqw * 9 / 16));
  max-width: none;
  margin: 0;
}
.stage.kind-video .kicker,
.stage.kind-video .play-row,
.stage.kind-video .ask,
.stage.kind-video .answer-banner,
.stage.kind-video .because,
.stage.kind-video .name-grid {
  position: relative;
  z-index: 3;
}
.stage.kind-video .kicker { margin-bottom: auto; }
.stage.kind-video .play-row { margin-top: 0.35rem; }
.stage.kind-video .ask {
  margin-top: 0.35rem;
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  border-radius: 16px;
  padding: 0.1rem 0.7rem;
}
.stage.kind-video.is-playing .play-row,
.stage.kind-video.is-playing .ask {
  display: none;
}
.stage.kind-video.is-playing:hover .play-row {
  display: flex;
}
.stage.kind-video.is-playing:hover .ask {
  display: block;
}
.clip-cover { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; background: #140816; color: #fff; border-radius: 12px; font-family: Fredoka, Trebuchet MS, sans-serif; font-size: clamp(1.3rem, 3vw, 2rem); }
.play-row { display: flex; justify-content: center; }
.music-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin: 0.35rem 0 0.15rem;
  flex: none;
}
.icon-btn {
  width: 3.15rem;
  height: 3.15rem;
  min-height: 0;
  padding: 0;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
}
.icon-btn svg { width: 1.35rem; height: 1.35rem; display: block; }
.stage .music-controls .icon-btn,
.footer .icon-btn {
  width: 3.35rem;
  height: 3.35rem;
  min-height: 0;
  padding: 0;
}
.stage .music-controls .icon-btn.primary { box-shadow: 3px 3px 0 var(--ink); }
.stage .music-controls .icon-btn svg,
.footer .icon-btn svg { width: 1.45rem; height: 1.45rem; }
.clip-status {
  margin: 0.15rem 0 0.2rem;
  font-weight: 800;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}
.name-grid { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; margin-top: 0.7rem; }
.name-grid b {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
}
.clip-player .hint { color: #5c5168; font-size: 0.95rem; }
.answer-banner {
  background: var(--yellow);
  color: var(--ink);
  border: 4px solid var(--ink);
  border-radius: 22px;
  padding: 0.55rem 1rem;
  margin-top: 0.7rem;
  font-size: clamp(2.3rem, 6vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  box-shadow: 6px 6px 0 var(--ink);
}
.answer-photo { display: flex; justify-content: center; margin-top: 0.7rem; }
.answer-photo img {
  width: auto;
  height: auto;
  max-width: min(100%, 520px);
  max-height: 42vh;
  object-fit: contain;
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 18px;
  box-shadow: 6px 6px 0 var(--ink);
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}
.answer-banner.false { background: #ff8aa8; }
.answer-banner.true, .answer-banner.higher { background: #b6f0c8; }
.answer-banner.lower { background: #c9d7ff; }
.because, .also { font-size: clamp(1.05rem, 2vw, 1.35rem); font-weight: 800; margin: 0.45rem 0 0; }
.fact-list { display: grid; gap: 0.7rem; margin-top: 0.8rem; text-align: left; }
.fact-list p {
  margin: 0;
  background: #fff;
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 0.7rem 1rem;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 800;
  line-height: 1.25;
}
.host-note { background: #fff; border: 3px dashed var(--pink); border-radius: 16px; padding: 0.7rem 0.9rem; margin-top: 0.7rem; }
.host-note strong { display: block; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pink); }
.art-wrap { display: flex; justify-content: center; align-items: center; margin: 0.3rem 0; }
.art { width: min(100%, 620px); height: auto; max-height: 46vh; border-radius: 18px; box-shadow: 8px 8px 0 var(--round); background: #fff; }
img.art { object-fit: contain; display: block; }
.with-bear {
  display: grid;
  grid-template-columns: minmax(180px, 38%) minmax(0, 1fr);
  gap: clamp(0.8rem, 2vw, 1.6rem);
  align-items: center;
  text-align: left;
  width: 100%;
}
.with-bear .pudsey { max-width: 100%; max-height: min(42vh, 340px); margin: 0 auto; }
.finale .pudsey { max-height: min(32vh, 240px); }
.mid-bear { margin-bottom: 0.4rem; }
.mid-bear .pudsey { max-height: min(18vh, 140px); max-width: 150px; }
.bear-lg svg { width: min(38vh, 300px); height: auto; }
.hero .bear-lg svg, .hero-bear svg { width: min(34vh, 250px); }
.bear-sm svg { width: 120px; height: auto; }
.bear-corner { position: absolute; top: 0.8rem; right: 0.8rem; }
.letters { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.7rem 0; justify-content: center; }
.letters b {
  min-width: 3rem;
  height: 3.6rem;
  display: grid;
  place-items: center;
  background: var(--yellow);
  border: 3px solid var(--ink);
  border-radius: 14px;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-family: var(--display);
  box-shadow: 4px 4px 0 var(--ink);
}
.hint { font-size: 1.35rem; font-weight: 800; }
.diff-list { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 0.7rem; justify-content: center; }
.stage.kind-odd .ask,
.stage.kind-odd .kicker,
.stage.kind-odd .pips,
.stage.kind-odd .answer-banner,
.stage.kind-odd .because,
.stage.kind-odd .also { flex: 0 0 auto; }
.odd-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem;
  width: min(100%, 980px);
  flex: 1 1 auto;
  min-height: 0;
  margin: 0.35rem auto 0;
  align-self: center;
}
.odd-row b, .pill {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 0.55rem 0.85rem;
  font-size: clamp(1.35rem, 3vw, 2.05rem);
  font-family: var(--display);
  box-shadow: 4px 4px 0 var(--ink);
}
.odd-row b.odd-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: stretch;
  min-height: 0;
  height: 100%;
  margin: 0;
  padding: 0.4rem 0.5rem 0.45rem;
  overflow: hidden;
  text-align: center;
}
.odd-visual {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.odd-visual img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}
.odd-label {
  flex: 0 0 auto;
  margin-top: 0.15rem;
  font-size: clamp(1.45rem, 3vw, 2.5rem);
  line-height: 1;
}
.odd-swatch {
  width: min(62%, 9rem);
  aspect-ratio: 1;
  border-radius: 22px;
  border: 4px solid var(--ink);
  display: block;
}
.odd-shape { width: min(68%, 10rem); height: auto; }
.odd-num {
  font-family: var(--display);
  font-size: clamp(4.2rem, 12vh, 8rem);
  line-height: 0.85;
}
.odd-cal {
  width: min(70%, 8.5rem);
  aspect-ratio: 1;
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.odd-cal span {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  letter-spacing: 0.04em;
}
.odd-row b:nth-child(4n+1) { background: #ffd23f; }
.odd-row b:nth-child(4n+2) { background: #ffb3cc; }
.odd-row b:nth-child(4n+3) { background: #b9cbff; }
.odd-row b:nth-child(4n) { background: #9be7a8; }
.odd-row:has(b.hit) b:not(.hit) { opacity: 0.38; }
.odd-row b.hit { opacity: 1; box-shadow: 0 0 0 4px var(--ink), 6px 6px 0 var(--round); }
.diff-list { flex-direction: column; align-items: stretch; text-align: left; }
.diff-list li { font-size: clamp(1.2rem, 2.4vw, 1.7rem); font-weight: 800; }
.grid16 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.45rem; }
.grid16 div {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 14px;
  min-height: 3.6rem;
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 800;
  font-family: var(--display);
  font-size: clamp(1rem, 2vw, 1.4rem);
  padding: 0.3rem;
  box-shadow: 3px 3px 0 rgba(28, 20, 38, 0.18);
}
.spot-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.spot-card {
  position: relative;
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 22px;
  padding: 0.7rem 0.6rem 1.6rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0;
  box-shadow: 6px 6px 0 var(--round);
}
.spot-card svg { width: auto; max-width: 100%; height: min(32vh, 320px); }
.spot-card img { width: 100%; height: auto; max-height: min(54vh, 560px); object-fit: contain; border-radius: 14px; display: block; }
.spot-card:has(img) { padding: 0.35rem 0.35rem 1.7rem; }
.spot-card em {
  position: absolute;
  left: 0.55rem;
  bottom: 0.4rem;
  font-style: normal;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  background: var(--round);
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 0.05rem 0.7rem;
}
.corner { position: absolute; top: 0.55rem; right: 0.55rem; }
.corner.circle { width: 42px; height: 42px; border-radius: 50%; background: var(--pink); border: 3px solid var(--ink); }
.corner.square { width: 42px; height: 42px; border-radius: 6px; background: var(--blue); border: 3px solid var(--ink); }
.photo-q { display: flex; justify-content: center; position: relative; }
.photo-q img,
.zoom-q img,
.logo-card img,
.spot-card img,
.slot img {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}
.photo-q::after,
.zoom-q::after,
.logo-card::after,
.spot-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
}
.stage:has(.photo-q) .photo-q img {
  height: 90%;
  width: auto;
  max-width: calc(100% - 2.5rem);
  max-height: 90%;
  object-fit: contain;
}
.photo-q img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  margin: 0 auto;
  background: #fff;
  border-radius: 18px;
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--round);
}
.stage:has(.answer-banner) .art,
.stage:has(.diff-list) .spot-card svg,
.stage:has(.diff-list) .spot-card img {
  max-height: 22vh;
}
.placeholder {
  min-height: 220px;
  border: 3px dashed #8d7b9e;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 800;
  text-align: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.55);
}

.scores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 0.35rem;
  margin: 0.15rem 0 0.1rem;
}
.chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  border-radius: 14px;
  border: 3px solid var(--ink);
  padding: 0.18rem 0.6rem 0.18rem 0.75rem;
  min-width: 0;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.28);
}
.chip-name {
  font-weight: 800;
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chip b { font-size: 1.65rem; line-height: 1; }
.awards { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.award {
  min-width: 7.4rem;
  min-height: 4.2rem;
  border-radius: 16px;
  border: 3px solid var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  opacity: 0.72;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.28);
}
.award.on { opacity: 1; box-shadow: 0 0 0 3px #fff, 4px 4px 0 rgba(0, 0, 0, 0.35); }
.timer {
  display: inline-block;
  min-width: 4.4rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  background: var(--yellow);
  color: var(--ink);
  border-radius: 999px;
  border: 3px solid var(--ink);
  padding: 0.05rem 0.65rem;
  margin-left: 0.35rem;
}
.timer.hot { background: #ff4d6d; color: #fff; }
.pens {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 12% 20%, #ff4d8d 0 18px, transparent 19px),
    radial-gradient(circle at 80% 16%, #3a6cff 0 14px, transparent 15px),
    radial-gradient(circle at 22% 78%, #2ec4b6 0 16px, transparent 17px),
    radial-gradient(circle at 86% 74%, #fff 0 10px, transparent 11px),
    var(--yellow);
  color: var(--ink);
  display: grid;
  place-items: center;
  z-index: 8;
}
.pens div {
  background: transparent;
  font-size: clamp(4.5rem, 14vw, 9rem);
  line-height: 0.86;
  letter-spacing: -0.04em;
  text-align: center;
  padding: 0;
}
.pens div span { display: block; }
.cue-layer {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 92% 8%, #ff9ec4 0 48px, transparent 50px),
    var(--cream);
  color: var(--ink);
  z-index: 6;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8vh 8vw;
  border: 18px solid #ff4d6d;
}
.cue-layer h2 {
  margin: 0.2rem 0;
  font-family: var(--display);
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.cue-layer .kicker { color: #ff4d6d; }
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 4, 18, 0.72);
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.overlay .panel { width: min(720px, 100%); max-height: 86dvh; overflow: auto; }
.overlay .round-list .btn { justify-content: flex-start; text-align: left; }
.podium { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.4rem; }
.place {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  border-radius: 18px;
  border: 3px solid var(--ink);
  padding: 0.55rem 0.9rem;
  font-size: clamp(1.35rem, 3vw, 2.05rem);
  text-align: left;
  box-shadow: 4px 4px 0 rgba(28, 20, 38, 0.2);
}
.place-1 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); padding: 0.7rem 1rem; }
.who { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.medal {
  display: grid;
  place-items: center;
  min-width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--yellow);
  font-size: 0.95rem;
  font-family: var(--display);
}
.pts { font-size: 1.15em; }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti i {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 3px solid var(--ink);
}
.confetti i:nth-child(1) { left: 4%; top: 10%; background: #ffd23f; }
.confetti i:nth-child(2) { left: 12%; top: 72%; background: #ff4d8d; width: 12px; height: 12px; }
.confetti i:nth-child(3) { left: 18%; top: 18%; background: #3a6cff; }
.confetti i:nth-child(4) { left: 78%; top: 12%; background: #2ec4b6; }
.confetti i:nth-child(5) { left: 88%; top: 22%; background: #ffd23f; width: 22px; height: 22px; }
.confetti i:nth-child(6) { left: 92%; top: 68%; background: #ff4d8d; }
.confetti i:nth-child(7) { left: 70%; top: 78%; background: #8b6cff; }
.confetti i:nth-child(8) { left: 8%; top: 46%; background: #ff8a3d; width: 11px; height: 11px; }
.confetti i:nth-child(9) { left: 30%; top: 8%; background: #9be7a8; }
.confetti i:nth-child(10) { left: 60%; top: 8%; background: #ffb3cc; width: 13px; height: 13px; }
.confetti i:nth-child(11) { left: 84%; top: 48%; background: #ffd23f; }
.confetti i:nth-child(12) { left: 40%; top: 86%; background: #3a6cff; width: 12px; height: 12px; }
.confetti i:nth-child(13) { left: 54%; top: 80%; background: #ff4d8d; }
.confetti i:nth-child(14) { left: 24%; top: 84%; background: #2ec4b6; }
.finale, .with-bear { position: relative; z-index: 1; }
.toast {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--cream);
  border: 3px solid var(--yellow);
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  font-weight: 800;
  z-index: 7;
}

.desk-card {
  background: var(--cream);
  color: var(--ink);
  border: 4px solid #ff4d6d;
  border-radius: 18px;
  padding: 0.45rem 0.9rem 0.6rem;
  margin: 0.2rem 0;
}
.desk-card .kicker { background: #ff4d6d; color: #fff; border-color: var(--ink); }
.desk-card .ask { font-size: clamp(1.7rem, 3.2vw, 2.7rem); margin: 0.15rem 0; }

.print-sheet { background: #fff; color: #000; padding: 1.2rem; }
.print-sheet h1 { font-size: 1.6rem; margin: 0 0 0.2rem; }
.print-sheet h2 { font-size: 1.15rem; margin: 1rem 0 0.3rem; break-after: avoid; }
.print-sheet li { margin: 0.15rem 0; }
.key-host { color: #444; }

@page sheet {
  size: A4 portrait;
  margin: 9mm 8mm 11mm;
}
.print-sheet.team-sheet {
  page: sheet;
  padding: 0;
  color: #111;
  font-size: 11pt;
  font-weight: 800;
}
.print-sheet.team-sheet h1 {
  font-size: 16pt;
  line-height: 1;
  margin: 0;
}
.print-sheet.team-sheet h2 {
  font-size: 12pt;
  line-height: 1.1;
  margin: 0 0 0.8mm;
}
.print-sheet.team-sheet li { margin: 0; }
.sheet-side { break-after: page; }
.sheet-side:last-child { break-after: auto; }
.sheet-head {
  display: flex;
  align-items: flex-end;
  gap: 5mm;
  margin: 0 0 3mm;
}
.sheet-head.slim { margin-bottom: 2.5mm; }
.team-name {
  display: flex;
  align-items: flex-end;
  gap: 2mm;
  flex: 1;
  margin: 0;
  font-size: 12pt;
  font-weight: 800;
}
.team-name b {
  flex: 1;
  min-width: 40mm;
  min-height: 7mm;
  border-bottom: 1.5px solid #111;
}
.sheet-over, .sheet-side-no {
  margin: 0 0 0.6mm;
  font-size: 10pt;
  font-weight: 800;
}
.sheet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 6mm;
  align-items: start;
}
.sheet-round { break-inside: avoid; margin: 0 0 2.5mm; }
.sheet-round.span-2 { grid-column: 1 / -1; }
.sheet-hint { margin: 0 0 1mm; font-size: 8.5pt; line-height: 1.15; font-weight: 800; }
.sheet-lines, .tune-lines, .sheet-boxes { list-style: none; margin: 0; padding: 0; }
.sheet-lines li {
  display: flex;
  align-items: flex-end;
  gap: 1.5mm;
  height: 8.2mm;
}
.sheet-lines span, .tune-lines span, .tune-head span:first-child {
  width: 6mm;
  flex: none;
  font-size: 9pt;
  line-height: 1;
  padding-bottom: 0.5mm;
}
.sheet-lines b, .tune-lines b { flex: 1; border-bottom: 1.25px solid #222; }
.wide-lines li { height: 11mm; }
.tune-head, .tune-lines li {
  display: grid;
  grid-template-columns: 6mm minmax(0, 1.4fr) minmax(0, 0.9fr);
  column-gap: 3mm;
  align-items: end;
}
.tune-head { height: 4.5mm; font-size: 8.5pt; font-weight: 800; }
.tune-lines li { height: 8.6mm; }
.sheet-boxes { display: flex; flex-wrap: wrap; gap: 1.2mm; }
.sheet-boxes li {
  width: 9.5mm;
  height: 12mm;
  border: 1.4px solid #111;
  border-radius: 1.2mm;
  padding: 0.4mm 0 0 0.8mm;
  font-size: 8pt;
  line-height: 1;
}
@media screen {
  body[data-view="print"] .cin-bg { background: #d9d3c7; padding: 8mm 0; }
  .sheet-side {
    box-sizing: border-box;
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto 8mm;
    padding: 9mm 8mm 11mm;
    background: #fff;
    box-shadow: 0 2px 12px rgba(28, 20, 38, 0.18);
  }
}

.stage.is-enter .ask,
.stage.is-enter .emoji-line,
.stage.is-enter .clip-disc,
.stage.is-enter .letters,
.stage.is-enter .art-wrap,
.stage.is-enter .round-giant {
  animation: rise 0.42s ease both;
}
.stage.is-pop .answer-banner,
.stage.is-pop .diff-list {
  animation: slam 0.38s cubic-bezier(0.2, 1.25, 0.4, 1) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes slam {
  0% { opacity: 0; transform: scale(0.92); }
  70% { transform: scale(1.03); }
  100% { opacity: 1; transform: none; }
}

@media (max-width: 800px) {
  .hero, .with-bear, .spot-pair, .school-row, .music-row, .intro-layout { grid-template-columns: 1fr; }
  .grid16 { grid-template-columns: repeat(2, 1fr); }
  .spot-pair { grid-template-columns: 1fr 1fr; gap: 0.4rem; }
  .bear-corner { display: none; }
  .round-giant { width: 8rem; height: 8rem; font-size: 4rem; justify-self: start; }
  .hero h1 { font-size: clamp(1.55rem, 7.6cqi, 3.4rem); }
}

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

@media print {
  html, body, .cin-bg {
    background: #fff !important;
    box-shadow: none !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 !important;
  }
  body.desk { box-shadow: none !important; }
  .no-print { display: none !important; }
  .print-sheet { box-shadow: none; }
  .sheet-side {
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }
  .key-round { break-inside: avoid; }
}
