/* Drama Club: "House Lights Up". A lit red-velvet theatre, blue-and-gold
   chrome, a light board well and green actions (genre comps: Royal Match,
   Homescapes, Lily's Garden; see tmp/dc-comps). Purple is a tile, not a surface. */
@font-face {
  font-family: "Nunito Sans";
  src: url("/site/brand/NunitoSans-Black.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}
:root {
  --room1: #c8323f;
  --room2: #8f1d2c;
  --spot: #ffd98a;
  --floor1: #e8b77a;
  --floor2: #c98b4e;
  --curtain1: #b3202f;
  --curtain2: #7a1220;
  --chrome: #1f5fb5;
  --chrome2: #174a91;
  --chrome-dark: #123d7a;
  --gold: #f5c542;
  --gold2: #b9831c;
  --well: #d9e3f7;
  --well2: #c4d2f0;
  --panel: #fff6e8;
  --panel2: #f3e3cc;
  --ink: #3b2330;
  --green1: #6fd645;
  --green2: #3a9a22;
  --green-lip: #2b7a18;
  --badge: #e8304a;
  --display: "Nunito Sans", system-ui, sans-serif;
  --shell-ink: #3b2330;
  --shell-paper: #fff6e8;
  --shell-accent: #5cc43b;
  --shell-on-accent: #fff;
  --shell-font: system-ui, sans-serif;
  --bs: min(calc(100vw - 16px), calc(100dvh - 318px - env(safe-area-inset-top) - env(safe-area-inset-bottom)), 580px);
}
body[data-theme="marquee"] {
  --room1: #253a66;
  --room2: #16233f;
  --spot: #fff0c2;
}
body[data-theme="seaside"] {
  --room1: #3aa6b9;
  --room2: #1f6f8b;
  --spot: #fff3c4;
  --curtain1: #1f7a8c;
  --curtain2: #135462;
}
body[data-theme="noir"] {
  --room1: #4a4a52;
  --room2: #1d1d22;
  --spot: #fff8e0;
  --curtain1: #3a3a42;
  --curtain2: #1a1a1f;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
body {
  background:
    radial-gradient(ellipse 70% 45% at 50% 42%, color-mix(in srgb, var(--spot) 55%, transparent), transparent 70%),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.07) 0 18px, transparent 18px 36px),
    linear-gradient(180deg, var(--room1), var(--room2));
  color: #fff;
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button:focus-visible,
.board:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}
.screen {
  position: fixed;
  inset: 0;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
[hidden] {
  display: none !important;
}
.ico {
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.28em;
  flex: none;
}
.amt {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 900;
  white-space: nowrap;
}
.ribbon span,
.btn,
.rm-panel b,
.cc-ribbon span,
.marquee h1 {
  font-family: var(--display);
  font-weight: 900;
}

/* ---------- buttons ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 10px;
  min-height: 50px;
  padding: 8px 14px;
  border-radius: 16px;
  border: 0;
  font-size: 20px;
  color: #fff;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 5px 0 var(--lip), 0 8px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.08s;
}
.btn:active {
  transform: translateY(3px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 2px 0 var(--lip);
}
.btn small {
  font: 700 12px system-ui, sans-serif;
  opacity: 0.9;
}
.btn.green {
  --lip: var(--green-lip);
  background: linear-gradient(180deg, var(--green1), var(--green2));
}
.btn.blue {
  --lip: var(--chrome-dark);
  background: linear-gradient(180deg, #3b86e0, var(--chrome));
  font-size: 18px;
}
.btn.gold {
  --lip: #8a5a14;
  background: linear-gradient(180deg, #ffd978, #e0a21b);
  color: #5a3405;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn.big {
  min-height: 60px;
  font-size: 26px;
}
.btn.sm {
  width: auto;
  min-width: 86px;
  min-height: 40px;
  margin: 0;
  font-size: 16px;
  border-radius: 12px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 3px 0 var(--lip);
}
.btn:disabled {
  filter: grayscale(0.8);
  opacity: 0.6;
  cursor: default;
}
.round-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: linear-gradient(180deg, #3b86e0, var(--chrome));
  color: #fff;
  font-size: 20px;
  box-shadow: 0 3px 0 var(--chrome-dark);
  flex: none;
}

/* ---------- home ---------- */
.home {
  display: grid;
  grid-template-rows: 58px 1fr auto 78px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px;
}
.top {
  display: flex;
  gap: 6px;
  min-width: 0;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 8px 0 5px;
  border-radius: 999px;
  border: 2px solid var(--gold);
  background: linear-gradient(180deg, var(--chrome), var(--chrome-dark));
  font: 900 15px var(--display);
  color: #fff;
  white-space: nowrap;
}
.pill .ico {
  width: 24px;
  height: 24px;
}
.pill i {
  font-style: normal;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green1);
  display: grid;
  place-items: center;
  font-size: 14px;
  line-height: 1;
  margin-left: 2px;
}
.pill small {
  font: 700 11px system-ui, sans-serif;
  opacity: 0.85;
}
.hero {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  justify-items: center;
  min-height: 0;
  overflow: hidden;
}
.marquee {
  position: relative;
  z-index: 2;
  margin: 4px 16px 0;
  padding: 10px 26px 12px;
  text-align: center;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--chrome), var(--chrome-dark));
  border: 4px solid var(--gold);
  box-shadow: 0 6px 0 var(--gold2), 0 14px 30px rgba(0, 0, 0, 0.35);
}
.marquee h1 {
  margin: 0;
  font-size: clamp(34px, 10vw, 50px);
  line-height: 1;
  color: #fff;
  -webkit-text-stroke: 2px #0d2c5c;
  paint-order: stroke fill;
  text-shadow: 0 4px 0 #0d2c5c;
}
.marquee p {
  margin: 4px 0 0;
  color: var(--gold);
  font: 900 12px var(--display);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.bulbs {
  position: absolute;
  inset: 4px;
  border-radius: 14px;
  pointer-events: none;
  background: radial-gradient(circle, #fff6c8 0 2px, transparent 3px) 0 0 / 14px 14px;
  -webkit-mask: linear-gradient(#000 0 0) top / 100% 6px no-repeat, linear-gradient(#000 0 0) bottom / 100% 6px no-repeat;
  mask: linear-gradient(#000 0 0) top / 100% 6px no-repeat, linear-gradient(#000 0 0) bottom / 100% 6px no-repeat;
  animation: bulbs 1.6s steps(2) infinite;
}
@keyframes bulbs {
  50% {
    background-position: 7px 0;
  }
}
.hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 12%;
  width: 90%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(255, 244, 200, 0.05), rgba(255, 236, 170, 0.45));
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
  pointer-events: none;
}
.lineup {
  position: relative;
  z-index: 1;
  align-self: end;
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding-bottom: 16px;
}
.plaque {
  text-align: center;
  background: var(--panel);
  color: var(--ink);
  border: 3px solid var(--gold);
  border-radius: 14px;
  padding: 4px 16px 6px;
  box-shadow: 0 4px 0 var(--gold2);
}
.plaque small {
  display: block;
  font: 900 11px var(--display);
  color: var(--curtain1);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.plaque b {
  font: 900 20px var(--display);
}
.actors {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  margin-bottom: 4%;
}
.actor {
  display: grid;
  justify-items: center;
  animation: bob 3.2s ease-in-out infinite;
}
.actor:nth-child(2n) {
  animation-delay: -1.3s;
}
@keyframes bob {
  50% {
    transform: translateY(-4px);
  }
}
.actor-p {
  width: clamp(80px, 25vw, 124px);
  height: clamp(80px, 25vw, 124px);
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--gold);
  background: radial-gradient(circle at 50% 30%, #fff3d0, #f0c88a);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}
.actor.lead .actor-p {
  width: clamp(120px, 40vw, 190px);
  height: clamp(120px, 40vw, 190px);
}
.actor-p svg {
  width: 100%;
  height: 100%;
  display: block;
}
.actor span,
.rm-face span {
  margin-top: -12px;
  position: relative;
  background: var(--tag);
  color: #fff;
  font: 900 13px var(--display);
  padding: 1px 10px 2px;
  border-radius: 10px;
  border: 2px solid #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}
.stage-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34%;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.08) 0 2px, transparent 2px 46px),
    linear-gradient(180deg, var(--floor1), var(--floor2));
  border-top: 4px solid var(--gold2);
  box-shadow: inset 0 14px 20px rgba(0, 0, 0, 0.18);
}
.cta {
  display: grid;
  gap: 2px;
  padding: 10px 22px 12px;
  background: linear-gradient(180deg, var(--floor2), #a8703c);
}
.cta .btn {
  margin-top: 6px;
}
.btn.huge {
  flex-direction: column;
  gap: 0;
  min-height: 74px;
  font-size: 32px;
  line-height: 1;
}
.btn.huge small {
  font: 800 14px system-ui, sans-serif;
  margin-top: 4px;
}
.soon {
  text-align: center;
  background: var(--panel);
  color: var(--ink);
  border-radius: 14px;
  padding: 10px;
  display: grid;
}
.tabbar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: linear-gradient(180deg, var(--chrome), var(--chrome-dark));
  border-top: 3px solid var(--gold);
  padding: 4px 4px 6px;
}
.tabbar button {
  position: relative;
  border: 0;
  background: none;
  color: #fff;
  font: 900 12px var(--display);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1px;
  border-radius: 12px;
}
.tabbar button.on {
  background: rgba(255, 255, 255, 0.16);
}
.tab-i {
  font-size: 26px;
  height: 32px;
  line-height: 32px;
}
.tab-i .ki {
  width: 30px;
  height: 30px;
}
.dot {
  position: absolute;
  top: 2px;
  right: 22%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--badge);
  border: 2px solid #fff;
}

/* ---------- game ---------- */
.game {
  display: grid;
  grid-template-rows: 104px 38px 1fr 84px;
  justify-items: center;
}
.rm-top {
  width: min(100%, 600px);
  display: grid;
  grid-template-columns: 1fr 96px 1fr;
  align-items: start;
  gap: 8px;
  padding: 8px 10px 0;
}
.rm-panel {
  position: relative;
  height: 84px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--chrome), var(--chrome2));
  border: 3px solid var(--gold);
  box-shadow: 0 4px 0 var(--chrome-dark), 0 8px 14px rgba(0, 0, 0, 0.25);
  display: grid;
  place-items: center;
  padding: 18px 6px 6px;
}
.rm-label {
  position: absolute;
  top: 2px;
  left: 0;
  right: 0;
  text-align: center;
  font: 900 12px var(--display);
  color: #cfe2ff;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.moves-panel b {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  font-size: 38px;
  line-height: 1;
}
.moves-panel.low b {
  color: var(--badge);
  animation: throb 0.9s ease-in-out infinite;
}
@keyframes throb {
  50% {
    transform: scale(1.08);
  }
}
.goals {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 4px;
}
.goal {
  display: flex;
  align-items: center;
  gap: 3px;
  font: 900 22px var(--display);
}
.goal.done b {
  color: var(--green2);
}
.gi {
  position: relative;
  display: flex;
  align-items: center;
}
.gi i {
  position: absolute;
  right: -5px;
  bottom: -4px;
  font-style: normal;
  font-size: 13px;
}
.gi.pair .mini + .mini {
  margin-left: -10px;
}
.goals .goal .ki,
.goals .goal .mini {
  width: 30px;
  height: 30px;
}
.rm-face {
  display: grid;
  justify-items: center;
}
.face-p {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--gold);
  background: radial-gradient(circle at 50% 30%, #fff3d0, #f0c88a);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
}
.face-p svg {
  width: 100%;
  height: 100%;
  display: block;
}
.status {
  width: min(100%, 600px);
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
  padding: 2px 10px;
}
.chip {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px 0 3px;
  border-radius: 999px;
  background: rgba(20, 8, 16, 0.55);
  border: 2px solid rgba(255, 255, 255, 0.35);
  font: 900 13px var(--display);
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
}
.chip .mini {
  width: 26px;
  height: 26px;
}
.chip.watch.now {
  background: var(--badge);
  border-color: #fff;
  animation: throb 0.8s ease-in-out infinite;
}
.chip.watch.seen,
.chip.secret.out {
  background: #6d0f22;
}
.pips {
  display: flex;
  gap: 3px;
}
.pips i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid #fff;
}
.pips i.on {
  background: #fff;
}
.mini {
  display: inline-block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #fff3d0, #f0c88a);
  border: 2px solid var(--gold);
  flex: none;
}
.mini svg,
.ki svg {
  display: block;
  width: 100%;
  height: 100%;
}
.ki {
  display: inline-block;
  width: 28px;
  height: 28px;
  vertical-align: middle;
}
.boardwrap {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 0;
}
.stage {
  width: min(100vw, calc(var(--bs) + 20px));
  overflow: hidden;
  display: grid;
  justify-items: center;
}
.boosters {
  width: min(100%, 520px);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 4px 12px 12px;
}

/* ---------- round booster buttons ---------- */
.bcirc {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: radial-gradient(circle at 50% 35%, #ffe28a, #f0a21b);
  box-shadow: 0 4px 0 #8a5a14, 0 8px 12px rgba(0, 0, 0, 0.25);
  display: grid;
  place-items: center;
  padding: 0;
}
.bcirc > span {
  font-size: 28px;
  line-height: 1;
}
.bcirc.on {
  background: radial-gradient(circle at 50% 35%, #b8f59a, var(--green2));
  box-shadow: 0 0 0 4px #fff, 0 4px 0 var(--green-lip);
}
.bcirc.gear {
  background: radial-gradient(circle at 50% 35%, #5aa0f0, var(--chrome));
  box-shadow: 0 4px 0 var(--chrome-dark);
}
.badge {
  position: absolute;
  right: -6px;
  bottom: -4px;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  border-radius: 12px;
  background: var(--badge);
  border: 2px solid #fff;
  color: #fff;
  font: 900 13px var(--display);
  font-style: normal;
  display: grid;
  place-items: center;
}
.bcirc small {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font: 800 11px system-ui, sans-serif;
  color: var(--ink);
}

/* ---------- board ---------- */
.board {
  position: relative;
  z-index: 1;
  width: var(--bs);
  height: var(--bs);
  border-radius: 16px;
  background: var(--well);
  border: 5px solid var(--gold);
  box-shadow: 0 0 0 3px var(--gold2), 0 12px 30px rgba(0, 0, 0, 0.35), inset 0 3px 10px rgba(30, 50, 100, 0.25);
  overflow: hidden;
  touch-action: none;
  outline: none;
}
.board > div {
  position: absolute;
  inset: 0;
}
.grid,
.rings,
.marks,
.fx {
  pointer-events: none;
}
.fx {
  z-index: 5;
}
.cellbg {
  position: absolute;
  width: 12.5%;
  height: 12.5%;
}
.cellbg.odd {
  background: var(--well2);
}
.board.watched::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 36px rgba(232, 48, 74, 0.75);
  animation: watchPulse 1s ease-in-out infinite;
}
@keyframes watchPulse {
  50% {
    box-shadow: inset 0 0 16px rgba(232, 48, 74, 0.45);
  }
}
.ring {
  position: absolute;
  border-radius: 12px;
  border: 2.5px dashed var(--rc);
  background: color-mix(in srgb, var(--rc) 16%, transparent);
  transition: all 0.3s;
}
.ring-rosa {
  --rc: #e8304a;
}
.ring-jonah {
  --rc: #e0892a;
}
.ring-dex {
  --rc: #7a4fd0;
}
.ring-priya {
  --rc: #1aa39a;
}
.ring-vivian {
  --rc: #c79a2e;
}
.ring.preview {
  border-style: solid;
  border-width: 3px;
  background: color-mix(in srgb, var(--rc) 32%, transparent);
  box-shadow: 0 0 16px var(--rc);
}
.tile,
.cast,
.crate {
  position: absolute;
  left: 0;
  top: 0;
  width: 12.5%;
  height: 12.5%;
  transition: transform 0.17s cubic-bezier(0.4, 0, 0.6, 1.2);
  will-change: transform;
}
.tile svg,
.crate svg {
  display: block;
  width: 88%;
  height: 88%;
  margin: 6%;
  filter: drop-shadow(0 2px 1px rgba(20, 30, 70, 0.35));
  transition: transform 0.12s;
}
.tile.still {
  transition: none;
}
.tile.selected svg {
  transform: scale(1.14);
  filter: drop-shadow(0 0 5px #fff) drop-shadow(0 0 3px var(--gold));
}
.tile.nope svg {
  opacity: 0.55;
}
.tile.special svg {
  animation: shimmer 1.8s ease-in-out infinite;
}
@keyframes shimmer {
  50% {
    filter: drop-shadow(0 0 6px rgba(255, 220, 90, 1));
  }
}
.tile.rumor svg {
  animation: wobble 1.2s ease-in-out infinite;
}
@keyframes wobble {
  25% {
    transform: rotate(-8deg);
  }
  75% {
    transform: rotate(8deg);
  }
}
.tile.pop svg {
  animation: pop 0.22s ease-in forwards;
}
@keyframes pop {
  40% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}
.tile.gone {
  opacity: 0;
  transition: opacity 0.15s, transform 0.17s;
}
.tile.born svg {
  animation: born 0.28s ease-out;
}
@keyframes born {
  from {
    transform: scale(0.2);
  }
}
.tile.fizzle svg {
  animation: fizzle 0.5s ease-in forwards;
}
@keyframes fizzle {
  to {
    transform: translateY(80%) scale(0.3);
    opacity: 0;
  }
}
.tile.heard svg {
  animation: heard 0.55s ease-out forwards;
}
@keyframes heard {
  50% {
    transform: scale(1.6);
    filter: drop-shadow(0 0 10px var(--badge));
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}
.crate.hit svg {
  animation: hit 0.25s;
}
@keyframes hit {
  50% {
    transform: scale(0.85) rotate(-4deg);
  }
}
.crate.gone {
  opacity: 0;
  transition: opacity 0.25s;
}
.cast {
  z-index: 3;
  transition: transform 0.35s cubic-bezier(0.3, 1.4, 0.5, 1);
}
.medal {
  position: absolute;
  inset: 3%;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #fff3d0, #f0c88a);
  border: 3px solid var(--gold);
  box-shadow: 0 3px 6px rgba(20, 30, 70, 0.4);
  transition: box-shadow 0.2s, transform 0.2s;
}
.medal svg {
  width: 100%;
  height: 100%;
  display: block;
}
.cast .name {
  position: absolute;
  left: 50%;
  bottom: -5%;
  transform: translateX(-50%);
  font: 900 clamp(8px, calc(var(--bs) / 46), 11px) var(--display);
  color: #fff;
  background: var(--tag, #3b2330);
  border: 1.5px solid #fff;
  padding: 0 5px;
  border-radius: 7px;
  white-space: nowrap;
  pointer-events: none;
}
.cast[data-who="rosa"] {
  --tag: #d6334f;
}
.cast[data-who="jonah"] {
  --tag: #e0892a;
}
.cast[data-who="dex"] {
  --tag: #7a4fd0;
}
.cast[data-who="priya"] {
  --tag: #1aa39a;
}
.cast[data-who="vivian"] {
  --tag: #c79a2e;
}
.cast .lock {
  position: absolute;
  right: -6%;
  top: -6%;
  width: 36%;
  height: 36%;
  display: none;
}
.cast.locked .lock {
  display: block;
}
.lock svg {
  width: 100%;
  height: 100%;
}
.cast .intent {
  position: absolute;
  left: 50%;
  top: -22%;
  transform: translateX(-50%);
  font: 900 clamp(9px, calc(var(--bs) / 38), 13px) var(--display);
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--chrome);
  border-radius: 9px;
  padding: 0 5px;
  white-space: nowrap;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.3);
  z-index: 4;
}
.cast .intent.soon {
  background: #ffe28a;
}
.cast .intent.now {
  background: var(--badge);
  border-color: #fff;
  color: #fff;
  animation: throb 0.8s ease-in-out infinite;
}
.cast.preview .medal,
.cast.touched .medal {
  box-shadow: 0 0 0 3px #fff, 0 0 16px 4px var(--gold);
  transform: scale(1.08);
}
.cast.acting .medal {
  animation: act 0.5s ease-in-out;
}
@keyframes act {
  30% {
    transform: scale(1.18) rotate(-6deg);
  }
  60% {
    transform: scale(1.1) rotate(5deg);
  }
}
.cast.watching .medal {
  box-shadow: 0 0 0 3px var(--badge), 0 0 18px var(--badge);
}
.mark {
  position: absolute;
  width: 12.5%;
  height: 12.5%;
  border: 2.5px dashed var(--chrome);
  border-radius: 10px;
  display: grid;
  place-items: start end;
  font-size: clamp(9px, calc(var(--bs) / 40), 13px);
  padding: 1px 3px;
  z-index: 4;
}
.mark.soon {
  border-color: var(--badge);
  animation: throb 0.9s ease-in-out infinite;
}
.board.picking {
  border-color: #7be0ff;
}
.cursor {
  position: absolute;
  width: 12.5%;
  height: 12.5%;
  border: 3px solid var(--chrome);
  border-radius: 10px;
}
.float {
  position: absolute;
  transform: translate(-50%, 0);
  font: 900 clamp(13px, calc(var(--bs) / 24), 22px) var(--display);
  color: #fff;
  -webkit-text-stroke: 3px var(--fc, #3b2330);
  paint-order: stroke fill;
  white-space: nowrap;
  animation: floatUp 1.25s ease-out forwards;
}
.float.heart {
  --fc: #c01e3c;
}
.float.star {
  --fc: #c7830a;
}
.float.fire {
  --fc: #c24400;
}
.float.eye {
  --fc: #5a1fb8;
}
.float.big {
  font-size: clamp(15px, calc(var(--bs) / 18), 26px);
  --fc: var(--chrome-dark);
}
.float.soft {
  font-size: 14px;
}
@keyframes floatUp {
  0% {
    transform: translate(-50%, 10px) scale(0.6);
    opacity: 0;
  }
  15% {
    transform: translate(-50%, 0) scale(1.1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -34px) scale(1);
    opacity: 0;
  }
}
.banner {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  padding: 8px 22px 10px;
  border-radius: 16px;
  font: 900 clamp(20px, calc(var(--bs) / 13), 36px) var(--display);
  color: #fff;
  -webkit-text-stroke: 2px var(--chrome-dark);
  paint-order: stroke fill;
  background: linear-gradient(180deg, var(--chrome), var(--chrome-dark));
  border: 3px solid var(--gold);
  box-shadow: 0 5px 0 var(--gold2);
  white-space: nowrap;
  animation: banner 1.6s ease-out forwards;
}
.banner.soft {
  font-size: clamp(15px, calc(var(--bs) / 24), 19px);
  -webkit-text-stroke: 0;
}
.banner.seen,
.banner.rumor {
  background: linear-gradient(180deg, #e8304a, #9c1530);
  -webkit-text-stroke-color: #6d0f22;
}
.banner.combo {
  background: none;
  border: 0;
  box-shadow: none;
  color: #ffe28a;
  -webkit-text-stroke: 3px #9a5a00;
}
@keyframes banner {
  0% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
  }
  12% {
    transform: translate(-50%, -50%) scale(1.08);
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -60%) scale(1);
    opacity: 0;
  }
}
.beam {
  position: absolute;
  animation: beam 0.45s ease-out forwards;
  background: linear-gradient(90deg, transparent, rgba(255, 250, 220, 0.98), transparent);
}
.beam-spot-h {
  left: 0;
  right: 0;
  top: calc(var(--y) * 12.5%);
  height: 12.5%;
}
.beam-spot-v {
  top: 0;
  bottom: 0;
  left: calc(var(--x) * 12.5%);
  width: 12.5%;
  background: linear-gradient(180deg, transparent, rgba(255, 250, 220, 0.98), transparent);
}
.beam-scene {
  left: calc((var(--x) - 1) * 12.5%);
  top: calc((var(--y) - 1) * 12.5%);
  width: 37.5%;
  height: 37.5%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 245, 200, 1), transparent 70%);
}
.beam-show {
  inset: 0;
  background: radial-gradient(circle at calc(var(--x) * 12.5% + 6%) calc(var(--y) * 12.5% + 6%), #fff, rgba(255, 210, 120, 0.4) 40%, transparent 70%);
}
@keyframes beam {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
.board.shuffling .tile {
  transition-duration: 0.45s;
}

/* ---------- stage dressing ---------- */
.valance {
  width: 100%;
  height: 24px;
  margin-bottom: -8px;
  position: relative;
  z-index: 2;
  border-radius: 10px 10px 4px 4px;
  background: linear-gradient(180deg, var(--curtain1), var(--curtain2));
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 5px 8px rgba(0, 0, 0, 0.3);
}
.valance::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 10px;
  background: radial-gradient(circle at 50% 0, var(--gold) 0 5px, transparent 5.5px) 0 0 / 22px 10px repeat-x;
}
.footlights {
  width: calc(var(--bs) - 20px);
  height: 14px;
  margin-top: 6px;
  background: radial-gradient(circle, #fffbe0 0 3px, rgba(255, 220, 120, 0.6) 4px, transparent 8px) 0 50% / 30px 14px repeat-x;
  filter: drop-shadow(0 -6px 10px rgba(255, 230, 150, 0.8));
}

/* ---------- barks ---------- */
.bark {
  width: 100%;
  overflow: hidden;
  justify-content: center;
  height: 40px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: var(--bs);
  opacity: 0;
}
.bark.on {
  animation: bark 2.4s ease-out forwards;
}
.bark.big {
  animation-duration: 3.2s;
}
@keyframes bark {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  8%,
  80% {
    opacity: 1;
    transform: none;
  }
  100% {
    opacity: 0;
  }
}
.bark-p {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--gold);
  background: radial-gradient(circle at 50% 30%, #fff3d0, #f0c88a);
  flex: none;
}
.bark-p svg {
  width: 100%;
  height: 100%;
  display: block;
}
.bark-t {
  background: #fff;
  color: var(--ink);
  border-radius: 14px;
  padding: 5px 12px;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2);
}
.bark-t b {
  margin-right: 4px;
  font-family: var(--display);
}
.bark.big .bark-t {
  background: #ffe28a;
}

/* ---------- popups ---------- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: max(28px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  background: rgba(20, 10, 30, 0.6);
  overflow-y: auto;
  animation: fadeIn 0.18s;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
}
.pop {
  --frame: var(--chrome);
  --frame2: var(--chrome-dark);
  position: relative;
  width: min(440px, 100%);
  margin: 26px auto 12px;
  padding: 34px 12px 14px;
  border-radius: 26px;
  background: linear-gradient(180deg, var(--frame), var(--frame2));
  border: 4px solid var(--gold);
  box-shadow: 0 8px 0 var(--gold2), 0 20px 50px rgba(0, 0, 0, 0.45);
  animation: popIn 0.25s cubic-bezier(0.3, 1.5, 0.5, 1);
}
@keyframes popIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
}
.pop.tone-red {
  --frame: #d6334f;
  --frame2: #9c1530;
}
.pop.tone-gold {
  --frame: #f0a21b;
  --frame2: #c27a0a;
}
.ribbon {
  position: absolute;
  left: 50%;
  top: -26px;
  transform: translateX(-50%);
  min-width: 64%;
  max-width: 90%;
  text-align: center;
  padding: 8px 26px 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--frame), var(--frame2));
  border: 4px solid var(--gold);
  box-shadow: 0 5px 0 var(--gold2);
}
.ribbon span {
  font-size: 30px;
  line-height: 1;
  color: #fff;
  -webkit-text-stroke: 2px rgba(0, 0, 0, 0.35);
  paint-order: stroke fill;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}
.pop-x {
  position: absolute;
  top: -14px;
  right: -10px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: radial-gradient(circle at 50% 35%, #ff6b7f, var(--badge));
  color: #fff;
  font: 900 20px var(--display);
  box-shadow: 0 3px 0 #9c1530;
  z-index: 2;
}
.pop-in {
  color: var(--ink);
}
.pop-sub {
  margin: 0 0 8px;
  text-align: center;
  color: #fff;
  font: 900 17px var(--display);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}
.panel {
  background: var(--panel);
  border-radius: 16px;
  padding: 8px 10px 10px;
  margin-top: 8px;
  box-shadow: inset 0 -3px 0 var(--panel2);
}
.panel h4,
.sub {
  margin: 0 0 6px;
  text-align: center;
  font: 900 15px var(--display);
  color: var(--chrome);
}
.pop-in > .sub {
  color: #fff;
  margin-top: 12px;
}
.goals-big {
  display: flex;
  justify-content: center;
  gap: 14px;
}
.goal-big {
  display: grid;
  justify-items: center;
  gap: 2px;
  background: #fff;
  border-radius: 14px;
  padding: 8px 12px 6px;
  min-width: 96px;
}
.goal-big .ki,
.goal-big .mini {
  width: 44px;
  height: 44px;
}
.goal-big b {
  font: 900 24px var(--display);
}
.goal-big small {
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  color: #7a6070;
  max-width: 110px;
}
.moves-line {
  margin: 6px 0 0;
  text-align: center;
  font-weight: 700;
}
.moves-line b {
  font-family: var(--display);
  font-size: 18px;
}
.castrow {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}
.castchip {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font: 900 13px var(--display);
  padding: 2px 10px 2px 2px;
}
.castchip .mini {
  width: 28px;
  height: 28px;
}
.bcircs {
  display: flex;
  justify-content: center;
  gap: 26px;
  padding-bottom: 18px;
}
.encore {
  text-align: center;
  font-weight: 800;
  color: #c24400;
  margin: 4px 0 0;
}
.warn {
  text-align: center;
  color: #fff;
  font-weight: 800;
}
.center {
  text-align: center;
}
.small {
  font-size: 13px;
  opacity: 0.85;
}
.pop-in > .small {
  color: #fff;
}
/* lose */
.stake {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stake-p {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--gold);
  background: radial-gradient(circle at 50% 30%, #fff3d0, #f0c88a);
  flex: none;
}
.stake-p svg {
  width: 100%;
  height: 100%;
  display: block;
}
.bubble-s {
  position: relative;
  margin: 0;
  background: #fff;
  border-radius: 16px;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 15px;
}
.bubble-s::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 50%;
  border: 8px solid transparent;
  border-right-color: #fff;
  border-left: 0;
  transform: translateY(-50%);
}
.plus5 {
  margin: 10px auto 0;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #ffe28a, #f0a21b);
  border: 4px solid #fff;
  font: 900 40px var(--display);
  color: #fff;
  -webkit-text-stroke: 3px #9a5a00;
  paint-order: stroke fill;
  box-shadow: 0 0 0 6px rgba(255, 226, 138, 0.4), 0 6px 0 #8a5a14;
  animation: throb 1.1s ease-in-out infinite;
}
/* win */
.win-top {
  text-align: center;
}
.win-stars {
  font-size: 48px;
  line-height: 1;
  letter-spacing: 4px;
}
.win-stars span {
  color: rgba(0, 0, 0, 0.25);
}
.win-stars span.on {
  color: #fff3b0;
  text-shadow: 0 3px 0 #b9831c, 0 0 12px #fff;
}
.win-rewards {
  display: flex;
  justify-content: center;
  gap: 12px;
  font-size: 20px;
  color: #fff;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}
.receipt {
  margin: 0;
  padding: 0;
  list-style: none;
}
.receipt li {
  padding: 8px 2px;
  border-bottom: 2px dashed var(--panel2);
  font-size: 15px;
}
.receipt li:last-child {
  border-bottom: 0;
}
.receipt.story li p {
  margin: 0 0 3px;
  font-size: 16px;
  font-weight: 700;
}
.receipt.story .why,
.receipt.story .next {
  display: block;
  font-size: 13px;
  color: #7a6070;
}
.receipt.story .next {
  color: var(--chrome);
  font-weight: 800;
}
.diary li small {
  display: block;
  color: var(--curtain1);
  font-weight: 800;
}
.pop-in > .receipt {
  background: var(--panel);
  border-radius: 16px;
  padding: 4px 12px;
}
.beat {
  margin-top: 10px;
  background: #fff;
  color: var(--ink);
  border-radius: 16px;
  padding: 10px 12px;
  border: 3px solid var(--gold);
}
.beat h3 {
  margin: 0 0 6px;
  font: 900 16px var(--display);
  color: var(--curtain1);
}
.bar {
  display: grid;
  grid-template-columns: 1fr 70px 40px;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  padding: 3px 0;
  opacity: 0.75;
}
.bar.mine {
  opacity: 1;
  font-weight: 800;
}
.bar:not(:has(.track)) {
  grid-template-columns: 1fr;
}
.track {
  height: 10px;
  border-radius: 5px;
  background: #e7dccd;
  overflow: hidden;
}
.fill {
  display: block;
  height: 100%;
  background: #9aa9c9;
  border-radius: 5px;
  animation: grow 0.8s ease-out;
}
.bar.mine .fill {
  background: var(--green2);
}
@keyframes grow {
  from {
    width: 0 !important;
  }
}
.pct {
  text-align: right;
  font: 900 15px var(--display);
}
.you {
  background: var(--green2);
  color: #fff;
  border-radius: 6px;
  padding: 0 5px;
  font-size: 10px;
}
.beat-note {
  margin: 6px 0 0 !important;
  font-size: 13px;
  color: #7a6070;
}
/* episodes */
.eps {
  display: grid;
  gap: 8px;
}
.ep {
  background: var(--panel);
  border-radius: 16px;
  padding: 8px 10px 10px;
}
.ep.locked {
  filter: grayscale(1);
  opacity: 0.7;
}
.ep-head {
  display: grid;
  margin-bottom: 6px;
}
.ep-head small {
  font: 900 11px var(--display);
  color: var(--curtain1);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.ep-head b {
  font: 900 19px var(--display);
}
.ep-head span {
  font-size: 13px;
  color: #7a6070;
}
.nodes {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.node {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: linear-gradient(180deg, #3b86e0, var(--chrome));
  color: #fff;
  display: grid;
  place-content: center;
  padding: 0;
  line-height: 1;
  box-shadow: 0 3px 0 var(--chrome-dark);
}
.node b {
  font: 900 18px var(--display);
}
.node span {
  font-size: 9px;
  color: var(--gold);
  letter-spacing: -1px;
}
.node.current {
  background: linear-gradient(180deg, var(--green1), var(--green2));
  box-shadow: 0 3px 0 var(--green-lip), 0 0 0 3px #fff;
}
.node.current span {
  color: #fff;
  letter-spacing: 0;
  font-weight: 900;
}
.node.locked {
  background: #b9b0a6;
  box-shadow: 0 3px 0 #857d73;
  border-color: #d8d0c6;
}
/* pass */
.pass-head {
  text-align: center;
  color: #fff;
}
.pass-prog {
  position: relative;
  height: 26px;
  border-radius: 13px;
  background: var(--chrome-dark);
  border: 3px solid var(--gold);
  overflow: hidden;
}
.pass-prog span {
  display: block;
  height: 100%;
  background: linear-gradient(180deg, #ffe28a, #f0a21b);
}
.pass-prog b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 900 14px var(--display);
  -webkit-text-stroke: 2px var(--chrome-dark);
  paint-order: stroke fill;
}
.tiers {
  max-height: 48dvh;
  overflow-y: auto;
  margin: 10px 0 0;
  border-radius: 16px;
  background: var(--panel);
  padding: 6px;
}
.tier {
  display: grid;
  grid-template-columns: 1fr 30px 1fr;
  gap: 6px;
  align-items: center;
  padding: 3px 0;
}
.tier.head b {
  text-align: center;
  font: 900 14px var(--display);
  color: var(--chrome);
}
.tier.head b.gold {
  color: #c27a0a;
}
.t-n {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #cfc5b8;
  color: #fff;
  font: 900 14px var(--display);
}
.tier.open .t-n {
  background: var(--green2);
}
.tier.next .t-n {
  background: var(--chrome);
  box-shadow: 0 0 0 3px var(--gold);
}
.reward {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 46px;
  border: 2px solid #e7dccd;
  background: #fff;
  border-radius: 12px;
  padding: 6px;
  font-size: 13px;
  color: var(--ink);
}
.reward.prem {
  background: #fff4d6;
  border-color: #f0d28a;
}
.reward:disabled {
  opacity: 0.6;
}
.reward:not(:disabled) {
  border-color: var(--green2);
  box-shadow: 0 0 0 2px var(--green1);
}
.reward i {
  font: 900 11px var(--display);
  font-style: normal;
}
.reward .claim {
  background: var(--green2);
  color: #fff;
  border-radius: 8px;
  padding: 1px 6px;
}
.reward .got {
  color: var(--green2);
}
/* event */
.ev-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
}
.ev-hero .ki {
  width: 56px;
  height: 56px;
}
.ev-hero b {
  display: block;
  font: 900 34px var(--display);
  line-height: 1;
  -webkit-text-stroke: 2px #9a5a00;
  paint-order: stroke fill;
}
.ev-hero small {
  font-weight: 800;
}
.miles {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  background: var(--panel);
  border-radius: 16px;
  padding: 8px;
}
.mile {
  display: grid;
  grid-template-columns: 36px 1fr 1.4fr;
  gap: 6px;
  align-items: center;
}
.m-at {
  font: 900 14px var(--display);
  text-align: center;
}
.m-bar {
  height: 10px;
  background: #e7dccd;
  border-radius: 5px;
  overflow: hidden;
}
.m-bar span {
  display: block;
  height: 100%;
  background: #f0a21b;
}
/* shop */
.shop-bal {
  display: flex;
  justify-content: center;
  gap: 14px;
  color: #fff;
  font-size: 18px;
  margin-bottom: 8px;
}
.featured {
  position: relative;
  border-radius: 18px;
  padding: 26px 10px 10px;
  background: linear-gradient(180deg, #ffe28a, #f0a21b);
  border: 3px solid #fff;
  box-shadow: 0 5px 0 #b9831c;
}
.f-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 14px;
  border-radius: 10px;
  background: var(--badge);
  color: #fff;
  font: 900 15px var(--display);
  border: 2px solid #fff;
  white-space: nowrap;
}
.f-body {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}
.f-main {
  display: grid;
  justify-items: center;
  color: #fff;
  font: 900 28px var(--display);
  -webkit-text-stroke: 2px #9a5a00;
  paint-order: stroke fill;
}
.f-main .ico {
  width: 54px;
  height: 54px;
}
.f-items {
  display: grid;
  grid-template-columns: repeat(2, 54px);
  gap: 6px;
}
.f-items span {
  position: relative;
  display: grid;
  place-items: center;
  height: 46px;
  border-radius: 12px;
  background: #fff6e0;
  font-size: 24px;
}
.f-items i {
  position: absolute;
  right: 2px;
  bottom: 0;
  font: 900 11px var(--display);
  font-style: normal;
  color: var(--ink);
}
.featured .btn {
  margin-top: 8px;
}
.rows {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}
.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 10px;
  border-radius: 14px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: inset 0 -3px 0 var(--panel2);
}
.row > b {
  flex: 1;
  font: 900 20px var(--display);
}
.r-i .ico {
  width: 34px;
  height: 34px;
}
.r-i.emoji {
  font-size: 26px;
  width: 34px;
  text-align: center;
}
.r-name {
  flex: 1;
  display: grid;
  line-height: 1.2;
  min-width: 0;
}
.r-name b {
  font: 900 15px var(--display);
}
.r-name small {
  font-size: 12px;
  color: #7a6070;
}
.r-tag {
  position: absolute;
  top: -8px;
  left: 10px;
  font: 900 10px var(--display);
  font-style: normal;
  background: var(--badge);
  color: #fff;
  border-radius: 8px;
  padding: 1px 6px;
}
.looks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.look {
  display: grid;
  justify-items: center;
  gap: 2px;
  border: 3px solid transparent;
  border-radius: 14px;
  background: var(--panel);
  color: var(--ink);
  padding: 6px;
}
.look.on {
  border-color: var(--green2);
}
.look .sw {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 3px solid var(--gold);
}
.look-velvet .sw {
  background: linear-gradient(180deg, #c8323f, #8f1d2c);
}
.look-marquee .sw {
  background: linear-gradient(180deg, #253a66, #16233f);
}
.look-seaside .sw {
  background: linear-gradient(180deg, #3aa6b9, #1f6f8b);
}
.look-noir .sw {
  background: linear-gradient(180deg, #4a4a52, #1d1d22);
}
.look b {
  font: 900 14px var(--display);
}
.look small {
  font-size: 12px;
  font-weight: 700;
}
.chem {
  display: grid;
  gap: 6px;
  background: var(--panel);
  color: var(--ink);
  border-radius: 14px;
  padding: 8px 12px;
}
.chem .mini {
  width: 32px;
  height: 32px;
}

/* ---------- curtain call ---------- */
.celebrate {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  background: radial-gradient(circle at 50% 45%, rgba(255, 220, 120, 0.55), rgba(40, 10, 20, 0.85) 70%);
  overflow: hidden;
  animation: fadeIn 0.2s;
}
.cc-ribbon {
  padding: 10px 34px 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, var(--chrome), var(--chrome-dark));
  border: 5px solid var(--gold);
  box-shadow: 0 7px 0 var(--gold2);
  animation: popIn 0.4s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.cc-ribbon span {
  font-size: clamp(34px, 10vw, 54px);
  color: #fff;
  -webkit-text-stroke: 3px #0d2c5c;
  paint-order: stroke fill;
  text-shadow: 0 4px 0 #0d2c5c;
  white-space: nowrap;
}
.cc-stars {
  font-size: 64px;
  line-height: 1;
}
.cc-stars span {
  display: inline-block;
  color: rgba(255, 255, 255, 0.25);
}
.cc-stars span.on {
  color: #ffe28a;
  text-shadow: 0 4px 0 #b9831c, 0 0 20px #fff;
  animation: starIn 0.45s var(--d) both cubic-bezier(0.3, 1.6, 0.5, 1);
}
@keyframes starIn {
  from {
    transform: scale(0) rotate(-90deg);
  }
}
.cc-bust {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid var(--gold);
  background: radial-gradient(circle at 50% 30%, #fff3d0, #f0c88a);
  animation: popIn 0.5s 0.3s both cubic-bezier(0.3, 1.6, 0.5, 1);
}
.cc-bust svg {
  width: 100%;
  height: 100%;
  display: block;
}
.confetti i {
  position: absolute;
  top: -20px;
  left: calc(var(--x) * 1%);
  width: 9px;
  height: 14px;
  background: var(--c);
  border-radius: 2px;
  animation: fall 1.8s var(--d) linear forwards;
}
@keyframes fall {
  to {
    transform: translateY(110vh) rotate(540deg);
  }
}

/* ---------- scenes ---------- */
.scene {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-rows: 1fr auto auto;
  justify-items: center;
  padding: 16px 12px max(14px, env(safe-area-inset-bottom));
  background:
    radial-gradient(ellipse 80% 50% at 50% 55%, color-mix(in srgb, var(--spot) 50%, transparent), transparent 70%),
    repeating-linear-gradient(90deg, var(--curtain2) 0 14px, var(--curtain1) 14px 30px, var(--curtain2) 30px 38px);
  animation: fadeIn 0.2s;
}
.scene.narrate {
  grid-template-rows: 1fr auto auto 1fr;
  background:
    radial-gradient(ellipse 80% 50% at 50% 50%, rgba(255, 220, 140, 0.25), transparent 70%),
    linear-gradient(180deg, #2a1015, #120508);
}
.scene-stage {
  grid-row: 2;
  position: relative;
  width: min(560px, 100%);
  cursor: pointer;
}
.bust {
  position: relative;
  z-index: 1;
  width: 180px;
  height: 180px;
  margin: 0 0 -34px 6px;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid var(--gold);
  background: radial-gradient(circle at 50% 30%, #fff3d0, #f0c88a);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  animation: popIn 0.25s ease-out;
}
.bust svg {
  width: 100%;
  height: 100%;
  display: block;
}
.speech {
  position: relative;
  background: var(--panel);
  color: var(--ink);
  border-radius: 20px;
  border: 4px solid var(--gold);
  padding: 30px 16px 12px;
  box-shadow: 0 8px 0 var(--gold2), 0 16px 30px rgba(0, 0, 0, 0.4);
  min-height: 130px;
}
.nametag {
  position: absolute;
  top: -18px;
  left: 150px;
  background: var(--tag);
  color: #fff;
  border: 3px solid #fff;
  border-radius: 12px;
  padding: 2px 14px 4px;
  font: 900 18px var(--display);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2);
  z-index: 2;
}
.nametag small {
  font: 700 11px system-ui, sans-serif;
  margin-left: 6px;
  opacity: 0.9;
}
.speech p {
  margin: 0;
  font-size: 19px;
  line-height: 1.4;
  font-weight: 600;
}
.tap {
  display: block;
  text-align: right;
  font: 900 12px var(--display);
  color: var(--chrome);
  margin-top: 6px;
  animation: throb 1.2s ease-in-out infinite;
}
.narration {
  margin: 0;
  padding: 18px 18px 8px;
  font-size: 20px;
  line-height: 1.45;
  color: #fff4e0;
  text-align: center;
  font-style: italic;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.narrate .tap {
  text-align: center;
  color: var(--gold);
}
.scene-foot {
  grid-row: 3;
  width: min(560px, 100%);
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}
.skip {
  border: 2px solid rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  border-radius: 12px;
  padding: 8px 16px;
  font: 900 14px var(--display);
  min-height: 40px;
}
.scene-cast {
  grid-row: 1;
  align-self: end;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.sc {
  display: grid;
  justify-items: center;
  gap: 4px;
}
.sc svg {
  width: clamp(72px, 24vw, 110px);
  height: clamp(72px, 24vw, 110px);
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: radial-gradient(circle at 50% 30%, #fff3d0, #f0c88a);
}
.sc small {
  font: 900 12px var(--display);
  color: #fff;
}
@media (max-height: 700px) {
  .bust {
    width: 130px;
    height: 130px;
  }
  .nametag {
    left: 110px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.05s !important;
  }
}

/* idle hint: the suggested pair leans toward each other */
.tile.hint svg {
  animation: hintNudge 1.2s ease-in-out infinite;
}
@keyframes hintNudge {
  0%,
  60%,
  100% {
    transform: none;
  }
  20%,
  40% {
    transform: translate(calc(var(--hx) * 14%), calc(var(--hy) * 14%)) scale(1.08);
  }
}

/* ---------- narrow phones (320 px) ---------- */
.tabbar {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
@media (max-width: 360px) {
  :root {
    --bs: min(calc(100vw - 16px), calc(100dvh - 290px - env(safe-area-inset-top) - env(safe-area-inset-bottom)), 580px);
  }
  .topbar {
    padding: 6px 8px;
  }
  .top {
    gap: 4px;
  }
  .pill {
    height: 30px;
    padding: 0 7px 0 4px;
    font-size: 13px;
    gap: 3px;
  }
  .pill .ico {
    width: 20px;
    height: 20px;
  }
  .pill i,
  .pill small {
    display: none;
  }
  .round-btn {
    width: 40px;
    height: 40px;
  }
  .tabbar button {
    font-size: 11px;
  }
  .tab-i {
    font-size: 22px;
  }
  .marquee {
    padding: 8px 18px 10px;
  }
  .rm-top {
    grid-template-columns: 1fr 76px 1fr;
    gap: 6px;
  }
  .face-p {
    width: 72px;
    height: 72px;
  }
  .rm-panel {
    height: 74px;
  }
  .game {
    grid-template-rows: 92px 36px 1fr 78px;
  }
  .bcirc {
    width: 54px;
    height: 54px;
  }
}
@media (max-height: 620px) and (orientation: portrait) {
  .home {
    grid-template-rows: 50px 1fr auto 66px;
  }
  .marquee h1 {
    font-size: 30px;
  }
  .marquee p {
    display: none;
  }
  .plaque {
    display: none;
  }
  .btn.huge {
    min-height: 60px;
    font-size: 26px;
  }
  .cta .btn.blue {
    min-height: 44px;
  }
  .tab-i {
    height: 26px;
    line-height: 26px;
  }
}

/* ---------- phones held sideways ---------- */
@media (orientation: landscape) and (max-height: 520px) {
  :root {
    --bs: min(calc(100dvh - 58px - env(safe-area-inset-top) - env(safe-area-inset-bottom)), calc(100vw - 330px));
  }
  .home {
    grid-template-columns: 1.1fr 1fr;
    grid-template-rows: 48px 1fr 60px;
  }
  .topbar {
    grid-column: 1 / -1;
    padding: 4px 12px;
  }
  .hero {
    grid-row: 2;
    grid-column: 1;
    grid-template-rows: auto 1fr;
  }
  .marquee {
    padding: 4px 16px 6px;
    margin-top: 0;
  }
  .marquee h1 {
    font-size: 26px;
  }
  .marquee p,
  .plaque {
    display: none;
  }
  .actor-p {
    width: 64px;
    height: 64px;
  }
  .actor.lead .actor-p {
    width: 92px;
    height: 92px;
  }
  .lineup {
    padding-bottom: 6px;
  }
  .cta {
    grid-row: 2;
    grid-column: 2;
    align-content: center;
    background: none;
    padding: 6px 18px;
  }
  .btn.huge {
    min-height: 60px;
    font-size: 26px;
  }
  .tabbar {
    grid-column: 1 / -1;
    padding: 2px 4px 4px;
  }
  .tab-i {
    height: 26px;
    line-height: 26px;
    font-size: 22px;
  }
  /* play: top bar becomes a left column, boosters a right column */
  .game {
    grid-template-columns: 150px 1fr 84px;
    grid-template-rows: 1fr;
    align-items: center;
  }
  .rm-top {
    grid-column: 1;
    grid-row: 1;
    width: 150px;
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 6px;
    padding: 6px 0 6px 10px;
    align-self: center;
  }
  .rm-face {
    order: -1;
  }
  .face-p {
    width: 64px;
    height: 64px;
  }
  .rm-face span {
    font-size: 11px;
  }
  .rm-panel {
    height: 70px;
  }
  .status {
    position: fixed;
    left: 8px;
    bottom: 6px;
    width: 150px;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
  }
  .chip {
    height: 26px;
    font-size: 11px;
  }
  .boardwrap {
    grid-column: 2;
    grid-row: 1;
  }
  .bark {
    display: none;
  }
  .valance {
    height: 14px;
    margin-bottom: -6px;
  }
  .footlights {
    display: none;
  }
  .boosters {
    grid-column: 3;
    grid-row: 1;
    width: auto;
    flex-direction: column;
    gap: 10px;
    padding: 6px 10px 6px 0;
  }
  .bcirc {
    width: 52px;
    height: 52px;
  }
  .bcirc > span {
    font-size: 24px;
  }
  .sheet {
    padding-top: 30px;
  }
  .bust {
    width: 110px;
    height: 110px;
  }
  .nametag {
    left: 96px;
  }
  .speech {
    min-height: 90px;
  }
}
