:root {
  /* Storybook Cartography palette */
  --ink: #1f1410;          /* deep walnut, the line color */
  --ink-soft: #3a2718;
  --night: #0d3242;        /* abyssal map ocean */
  --night-2: #06222b;
  --parchment: #f7e9c2;    /* aged-paper page */
  --parchment-2: #eed7a3;
  --parchment-shadow: #c79f5b;
  --leather: #6e3b1f;      /* book-cover binding */
  --leather-deep: #3e1d0a;
  --gold: #d8a13a;         /* gilt edge, embossed seal */
  --gold-bright: #f5c25b;
  --teal: #1d8a8a;
  --moss: #2f5e34;
  --moss-deep: #1c3d1f;
  --tomato: #d24227;       /* wax-seal red */
  --mango: #f4a934;
  --lime: #b8e547;
  --cream: #fff5d8;        /* lit candle warmth */
  --mist: #dff4ff;
  --panel: #f7e9c2;
  --shadow: rgba(20, 12, 8, 0.32);
  --paper-grain:
    radial-gradient(circle at 12% 18%, rgba(110, 59, 31, 0.08) 0 1px, transparent 1px),
    radial-gradient(circle at 78% 42%, rgba(110, 59, 31, 0.06) 0 1px, transparent 1px),
    radial-gradient(circle at 32% 78%, rgba(110, 59, 31, 0.05) 0 1px, transparent 1px),
    radial-gradient(circle at 88% 88%, rgba(110, 59, 31, 0.07) 0 1px, transparent 1px);
  --font-display: "Outfit", "Avenir Next", system-ui, sans-serif;
  --font-body: "Outfit", "Avenir Next", system-ui, sans-serif;
  --font-hand: "Outfit", "Avenir Next", system-ui, sans-serif;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--night-2);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    linear-gradient(180deg, #21554a 0%, #1a4e61 34%, #102a43 72%, #0f1b2f 100%);
  color: var(--cream);
}

body {
  overflow-x: hidden;
}

button,
input,
textarea,
a,
select {
  font: inherit;
}

button,
a {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
}

.play-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.play-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(15, 27, 47, 0.9);
  border-bottom: 2px solid rgba(223, 244, 255, 0.12);
  backdrop-filter: blur(12px);
}

.play-app:has(#home-screen.active) .play-topbar {
  position: fixed;
  top: 12px;
  left: 14px;
  right: 14px;
  z-index: 40;
  padding: 0;
  background: transparent;
  border: 0;
  backdrop-filter: none;
  pointer-events: none;
  gap: 10px;
}

/* Brand lockup is hidden on the home scene — the map is the brand. */
.play-app:has(#home-screen.active) .brand-lockup {
  display: none;
}

/* Topbar actions — slim glass bar, hairline buttons */
.play-app:has(#home-screen.active) .topbar-actions {
  pointer-events: auto;
  padding: 4px;
  gap: 4px;
  background: rgba(8, 14, 20, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32);
}

.play-app:has(#home-screen.active) .topbar-button {
  min-height: 0;
  padding: 5px 11px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--cream);
  line-height: 1.1;
  box-shadow: none;
  text-shadow: none;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.play-app:has(#home-screen.active) .topbar-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.play-app:has(#home-screen.active) .topbar-link {
  display: none;
}

.play-app:has(#home-screen.active) .topbar-link:hover {
  background: var(--gold-bright);
}

.play-app:has(#home-screen.active) .topbar-locked {
  display: none;
}

.brand-lockup {
  display: grid;
  gap: 4px;
}

.brand-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 2px solid rgba(255, 247, 222, 0.28);
  border-radius: 8px;
  background: rgba(255, 183, 3, 0.12);
  color: var(--cream);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
}

.brand-note,
.eyebrow {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-note {
  color: rgba(223, 244, 255, 0.8);
}

.eyebrow {
  color: #c3f358;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topbar-button,
.ghost-control,
.action-control,
.launch-pill,
.mode-card,
.choice-card,
.nav-control {
  border: 2px solid rgba(22, 33, 28, 0.92);
  border-radius: 8px;
  transition:
    transform 140ms ease,
    background-color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.topbar-button,
.ghost-control {
  min-height: 44px;
  padding: 0 14px;
  background: rgba(255, 247, 222, 0.94);
  color: var(--ink);
  font-weight: 500;
}

.topbar-button:hover,
.ghost-control:hover,
.action-control:hover,
.launch-pill:hover,
.mode-card:hover,
.choice-card:hover,
.nav-control:hover {
  transform: translateY(-1px);
}

.topbar-link {
  display: inline-flex;
  align-items: center;
}

.play-main {
  flex: 1;
  display: block;
}

.play-screen {
  display: none;
}

.play-screen.active {
  display: block;
}

.hidden {
  display: none !important;
}

.night-stage {
  position: relative;
  min-height: calc(100vh - 78px);
  padding: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(184, 242, 74, 0.1), transparent 30%),
    radial-gradient(circle at top right, rgba(255, 183, 3, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(255, 247, 222, 0.06), rgba(255, 247, 222, 0)),
    repeating-linear-gradient(
      90deg,
      rgba(223, 244, 255, 0.03) 0 1px,
      transparent 1px 110px
    ),
    linear-gradient(180deg, rgba(28, 96, 86, 0.86), rgba(20, 63, 86, 0.96), rgba(15, 27, 47, 0.98));
}

.play-app:has(#home-screen.active) .night-stage {
  min-height: 100vh;
  padding: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 242, 93, 0.18), transparent 22%),
    radial-gradient(circle at 88% 16%, rgba(84, 201, 218, 0.16), transparent 26%),
    linear-gradient(180deg, #102235 0%, #183c43 46%, #102a2c 100%);
}

.home-world {
  position: relative;
  z-index: 2;
  min-height: calc(100vh - 114px);
  overflow: hidden;
  border: 4px solid rgba(22, 33, 28, 0.88);
  border-radius: 22px;
  background:
    radial-gradient(circle at 22% 16%, rgba(255, 247, 222, 0.26), transparent 20%),
    linear-gradient(180deg, #8edb86 0%, #5eba70 42%, #368460 100%);
  box-shadow:
    0 28px 80px rgba(2, 8, 18, 0.42),
    inset 0 0 0 3px rgba(255, 247, 222, 0.18);
  isolation: isolate;
}

.play-app:has(#home-screen.active) .home-world {
  min-height: 100vh;
  height: 100vh;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(13, 42, 59, 0.2), rgba(6, 20, 30, 0.35)),
    #0d5a76;
  box-shadow: none;
}

.play-app:has(#home-screen.active) .home-world::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(10, 18, 28, 0.26) 0%, rgba(10, 18, 28, 0) 24%),
    linear-gradient(90deg, rgba(10, 18, 28, 0.16) 0%, transparent 20%, transparent 78%, rgba(10, 18, 28, 0.18) 100%),
    radial-gradient(circle at 50% 44%, transparent 0 55%, rgba(5, 12, 18, 0.2) 100%);
}

.home-world canvas {
  position: relative;
  z-index: 0;
  width: 100%;
  height: calc(100vh - 114px);
  min-height: 560px;
  display: block;
  /* Crisp the WEBP without losing the painted feel.
   * -webkit-optimize-contrast keeps edge detail without over-sharpening. */
  image-rendering: -webkit-optimize-contrast;
  filter: contrast(1.06) saturate(1.08);
  touch-action: none;
}

.play-app:has(#home-screen.active) .home-world canvas {
  height: 100vh;
  min-height: 100vh;
  cursor: grab;
  image-rendering: -webkit-optimize-contrast;
  filter: contrast(1.06) saturate(1.08);
}

.play-app:has(#home-screen.active) .home-world canvas:active {
  cursor: grabbing;
}

/* Storybook vignette — the play surface looks like a page in a
 * leather-bound atlas. Subtle dark corners + cream inner glow. */
.play-app:has(#home-screen.active) .home-world::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 110% 92% at 50% 50%,
      transparent 0%,
      transparent 58%,
      rgba(20, 8, 0, 0.18) 84%,
      rgba(20, 8, 0, 0.42) 100%
    );
  mix-blend-mode: multiply;
}

/* Map zoom controls — clean dark glass pill, hairline buttons */
.home-world-map-controls {
  position: absolute;
  right: 16px;
  bottom: 18px;
  z-index: 4;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(8, 14, 20, 0.62);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.36);
}

.home-world-settings-panel {
  position: absolute;
  right: 16px;
  bottom: 18px;
  z-index: 7;
}

.home-world-settings-panel[hidden] {
  display: none;
}

.home-world-settings-panel .home-world-map-controls {
  position: static;
  right: auto;
  bottom: auto;
}

.home-world-parent-tools {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.home-world-parent-reset {
  min-height: 32px;
  border: 1px solid rgba(255, 247, 222, 0.36);
  border-radius: 8px;
  background: rgba(32, 45, 56, 0.92);
  color: rgba(255, 247, 222, 0.94);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
}

.home-world-map-controls button {
  min-width: 28px;
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--cream);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-shadow: none;
  box-shadow: none;
  transition: background 140ms ease, transform 140ms ease;
}

.home-world-map-controls button:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.home-world-map-controls button:disabled {
  cursor: default;
  opacity: 0.4;
  transform: none;
}

/* Place/NPC detail HUD only appears when the runtime has a real target. */
.home-world-hud {
  position: absolute;
  left: 16px;
  bottom: 18px;
  z-index: 4;
  width: min(360px, calc(100% - 108px));
  min-height: 38px;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(8, 14, 20, 0.68);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.36);
  display: none;
}

.home-world[data-active-target] .home-world-hud,
.home-world[data-active-place] .home-world-hud,
.home-world[data-active-npc] .home-world-hud {
  display: flex;
}

.home-world[data-first-hub="true"] .home-world-hud {
  width: min(430px, calc(100% - 108px));
  min-height: 70px;
  padding: 8px 9px 8px 8px;
}

.home-world[data-delivery-return="true"] .home-world-hud {
  width: min(620px, calc(100% - 108px));
}

.home-world-hud-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
}

.home-world[data-first-hub="true"] .home-world-hud-copy {
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.home-world-prompt-portrait {
  display: none;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  padding: 3px;
  object-fit: contain;
  object-position: 50% 100%;
  border: 2px solid rgba(255, 247, 222, 0.82);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 247, 222, 0.48), rgba(255, 207, 90, 0.08) 70%),
    rgba(255, 247, 222, 0.12);
  box-shadow:
    0 9px 24px rgba(0, 0, 0, 0.34),
    inset 0 0 0 1px rgba(60, 32, 18, 0.18);
}

.home-world[data-first-hub="true"][data-first-reward-earned="false"] .home-world-prompt-portrait {
  display: block;
}

.home-world-hud h1 {
  max-width: none;
  margin: 0;
  color: var(--cream);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-world-hud .eyebrow,
.home-world-hud p:last-child {
  display: none;
}

.home-world[data-first-hub="true"] .home-world-hud p:last-child {
  display: block;
  margin: 0;
  color: rgba(255, 247, 222, 0.9);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.08;
}

.home-world[data-first-hub="true"][data-first-reward-earned="false"] .home-world-reward-shelf {
  display: none;
}

.home-world-hud .action-control {
  flex: 0 0 auto;
  min-width: 0;
  min-height: 0;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--gold);
  color: #1f1410;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: none;
  box-shadow: none;
  transition: background 140ms ease, transform 140ms ease;
}

.home-world-hud .action-control:hover {
  background: var(--gold-bright);
  transform: translateY(-1px);
}

.home-world-hud .action-control:disabled {
  cursor: default;
  opacity: 0.45;
  transform: none;
}

.home-world-reward-shelf {
  display: inline-flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-height: 24px;
  padding: 0;
  background: transparent;
  color: rgba(255, 247, 222, 0.68);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: normal;
}

.home-world-reward-shelf span {
  display: inline-flex;
  flex: 0 1 auto;
  min-height: 24px;
  align-items: center;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.home-world-reward-shelf span[data-earned="true"] {
  background: rgba(255, 224, 102, 0.9);
  color: #281808;
}

.home-world-reward-shelf span[data-latest-reward="true"] {
  border-color: rgba(255, 247, 222, 0.96);
  box-shadow: 0 0 0 2px rgba(255, 247, 222, 0.28), 0 0 20px rgba(255, 224, 102, 0.36);
}

.home-world-celebration {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 26px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 230, 143, 0.76);
  background: rgba(46, 87, 68, 0.86);
  color: #fff8d8;
  font-size: 0.78rem;
  line-height: 1.2;
}

.home-world-celebration[hidden] {
  display: none;
}

.home-world-celebration strong {
  color: #ffeaa0;
  white-space: nowrap;
}

.home-world-celebration span {
  min-width: 0;
}

.home-world-celebration[data-celebration-kind="two-stickers"] {
  max-width: 520px;
  border-color: rgba(132, 231, 184, 0.8);
  background: rgba(24, 76, 82, 0.9);
}

.home-world-celebration[data-celebration-kind="two-stickers"] strong {
  color: #9af0c2;
}

.home-world[data-first-reward-earned="true"] .home-world-hud {
  width: min(520px, calc(100% - 108px));
  border-radius: 22px;
  flex-wrap: wrap;
}

.home-world-avatar-picker {
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 2px;
}

.home-world-avatar-picker[hidden] {
  display: none;
}

.home-world-avatar-picker button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 32px;
  padding: 3px 8px 3px 4px;
  border: 1px solid rgba(255, 247, 222, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 247, 222, 0.86);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  cursor: pointer;
}

.home-world-avatar-picker button[data-selected="true"] {
  border-color: rgba(142, 247, 255, 0.92);
  background: rgba(142, 247, 255, 0.2);
  color: #fffbe8;
  box-shadow: 0 0 0 2px rgba(142, 247, 255, 0.18);
}

.home-world-avatar-picker img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255, 247, 222, 0.16);
}

.home-world[data-panel-open="true"] .home-world-hud {
  display: none;
}

.sticker-book-page {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(24, 69, 69, 0.94), rgba(56, 58, 94, 0.96)),
    #24445a;
  color: var(--cream);
}

.sticker-book-app {
  min-height: 100vh;
  padding: 18px clamp(16px, 4vw, 42px) 36px;
}

.sticker-book-topbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: clamp(24px, 5vw, 48px);
}

.sticker-book-hero {
  max-width: 720px;
  margin: 0 auto 20px;
  text-align: center;
}

.sticker-book-hero h1 {
  margin: 4px 0 8px;
  color: #fff8d8;
  font-size: clamp(2.4rem, 8vw, 5.6rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.sticker-book-hero p:last-child,
.sticker-book-empty {
  margin: 0;
  color: rgba(255, 248, 216, 0.84);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
}

.sticker-book-empty {
  max-width: 520px;
  margin: 0 auto 16px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 247, 222, 0.24);
  background: rgba(10, 18, 26, 0.36);
  text-align: center;
}

.sticker-book-empty[hidden] {
  display: none;
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  max-width: 780px;
  margin: 0 auto;
}

.sticker-card {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-height: 168px;
  padding: 14px 10px 12px;
  border: 1px solid rgba(255, 247, 222, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 247, 222, 0.06), 0 12px 26px rgba(0, 0, 0, 0.22);
}

.sticker-card[data-earned="false"] {
  filter: saturate(0.35);
  opacity: 0.62;
}

.sticker-card img {
  width: 84px;
  height: 84px;
  object-fit: contain;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 248, 216, 0.14);
}

.sticker-card strong {
  color: #fff8d8;
  font-size: 1rem;
  line-height: 1.05;
  text-align: center;
}

.sticker-card span {
  color: rgba(255, 248, 216, 0.76);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.pond-hopper-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 8%, rgba(255, 226, 112, 0.22), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(119, 233, 255, 0.2), transparent 32%),
    linear-gradient(180deg, #214d8e 0%, #2874a8 48%, #173253 100%);
  overscroll-behavior-y: contain;
}

.pond-hopper-shell {
  display: grid;
  gap: 22px;
  width: min(1180px, calc(100% - 28px));
  margin: 108px auto 40px;
}

.pond-hopper-hero,
.pond-hopper-panel {
  display: grid;
  gap: 14px;
  border: 3px solid rgba(22, 33, 28, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 247, 222, 0.2), rgba(173, 234, 255, 0.11)),
    rgba(10, 22, 46, 0.38);
  box-shadow: 0 18px 0 rgba(12, 24, 52, 0.24);
  backdrop-filter: blur(10px);
}

.pond-hopper-hero {
  padding: 22px 24px;
}

.pond-hopper-panel {
  padding: 18px;
}

.pond-hopper-hero h1,
.pond-hopper-brief h2,
.pond-hopper-scorebar,
.pond-hopper-tip-list {
  color: var(--cream);
}

.pond-hopper-chip-row,
.pond-hopper-scorebar,
.pond-hopper-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pond-hopper-home-link {
  min-width: 176px;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(255, 214, 92, 0.24);
}

.pond-hopper-home-link[hidden] {
  display: none;
}

.pond-hopper-leaderboard-form {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 2px solid rgba(255, 247, 222, 0.28);
  border-radius: 8px;
  background: rgba(8, 21, 45, 0.42);
  color: var(--cream);
}

.pond-hopper-leaderboard-form[hidden] {
  display: none;
}

.pond-hopper-leaderboard-form label {
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pond-hopper-leaderboard-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pond-hopper-leaderboard-row input {
  flex: 1 1 150px;
  min-width: 0;
  min-height: 48px;
  padding: 0 12px;
  border: 2px solid rgba(18, 28, 56, 0.78);
  border-radius: 8px;
  background: rgba(255, 247, 222, 0.94);
  color: var(--ink);
  font: 850 1rem "Outfit", system-ui, sans-serif;
}

.pond-hopper-leaderboard-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pond-hopper-leaderboard-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(255, 247, 222, 0.14);
  color: rgba(255, 247, 222, 0.92);
  font-weight: 850;
}

.pond-hopper-leaderboard-list span {
  color: #9ff4ff;
}

.pond-hopper-chip {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 247, 222, 0.92);
  color: var(--ink);
  font-weight: 600;
}

.pond-hopper-chip strong {
  color: #0d3242;
}

.pond-hopper-scorebar strong {
  color: #9ff4ff;
}

.sky-run-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px;
  border: 2px solid rgba(255, 247, 222, 0.28);
  border-radius: 8px;
  background: rgba(8, 21, 45, 0.42);
}

.kid-run-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  padding: 6px;
  border: 2px solid rgba(255, 247, 222, 0.22);
  border-radius: 8px;
  background: rgba(8, 21, 45, 0.34);
}

.sky-run-picker-label {
  flex: 1 1 auto;
  min-width: 120px;
  padding-inline: 8px;
  color: rgba(255, 247, 222, 0.84);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sky-run-choice {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 46px;
  padding: 4px 12px 4px 6px;
  border: 2px solid rgba(255, 247, 222, 0.26);
  border-radius: 8px;
  color: var(--cream);
  font-weight: 900;
  text-decoration: none;
  background: rgba(255, 247, 222, 0.1);
}

.kid-run-picker button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 4px 12px;
  border: 2px solid rgba(255, 247, 222, 0.26);
  border-radius: 8px;
  color: var(--cream);
  font-weight: 900;
  background: rgba(255, 247, 222, 0.1);
}

.kid-run-picker button[aria-pressed="true"] {
  border-color: #ffe066;
  color: #182343;
  background: #fff7de;
  box-shadow: 0 0 0 3px rgba(255, 224, 102, 0.18);
}

.kid-run-picker button:focus-visible {
  outline: 3px solid #9ff4ff;
  outline-offset: 2px;
}

.sky-run-choice:hover,
.sky-run-choice:focus-visible {
  border-color: rgba(159, 244, 255, 0.8);
  background: rgba(159, 244, 255, 0.16);
}

.sky-run-choice.is-active {
  border-color: #ffe066;
  color: #182343;
  background: #fff7de;
  box-shadow: 0 0 0 3px rgba(255, 224, 102, 0.18);
}

.sky-run-choice img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(7, 14, 32, 0.26));
}

#pond-hopper-progress[data-final-gate="true"] {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 2px solid rgba(34, 24, 8, 0.82);
  border-radius: 8px;
  background: #ffe066;
  color: #182343;
  box-shadow: 0 0 0 3px rgba(255, 224, 102, 0.18), 0 8px 20px rgba(255, 176, 31, 0.22);
  font-weight: 950;
  animation: pondFinalGatePulse 720ms ease-in-out infinite alternate;
}

#pond-hopper-progress[data-leaderboard="next"],
#pond-hopper-progress[data-leaderboard="open"] {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-weight: 950;
}

#pond-hopper-progress[data-leaderboard="next"] {
  border: 2px solid rgba(34, 24, 8, 0.78);
  background: #fff7de;
  color: #182343;
}

#pond-hopper-progress[data-leaderboard="open"] {
  border: 2px solid rgba(12, 39, 58, 0.88);
  background: #9ff4ff;
  color: #10243c;
  box-shadow: 0 0 0 3px rgba(159, 244, 255, 0.18), 0 8px 20px rgba(25, 171, 210, 0.22);
}

#pond-hopper-jump[data-first-play-cue="true"] {
  box-shadow:
    0 0 0 4px rgba(255, 224, 102, 0.24),
    0 12px 30px rgba(255, 183, 3, 0.28);
  animation: dragonFlapButtonCue 780ms ease-in-out infinite alternate;
}

@keyframes pondFinalGatePulse {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-1px);
  }
}

@keyframes dragonFlapButtonCue {
  from {
    box-shadow:
      0 0 0 3px rgba(255, 224, 102, 0.20),
      0 10px 24px rgba(255, 183, 3, 0.22);
  }

  to {
    box-shadow:
      0 0 0 8px rgba(255, 224, 102, 0.32),
      0 14px 34px rgba(255, 183, 3, 0.34);
  }
}

.pond-hopper-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.72fr);
  gap: 22px;
  align-items: start;
}

.pond-hopper-scorebar {
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
}

.pond-hopper-stage {
  position: relative;
  display: grid;
  overflow: hidden;
  border-radius: 8px;
}

.pond-hopper-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 3px solid rgba(22, 33, 28, 0.95);
  border-radius: 8px;
  background: #1d5f9b;
  touch-action: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
}

.dragon-glide-page .play-topbar {
  padding-block: 10px;
}

.dragon-glide-page .pond-hopper-shell {
  margin-top: 28px;
  gap: 16px;
}

.dragon-glide-page .pond-hopper-hero {
  padding-block: 16px;
}

.dragon-glide-page .pond-hopper-hero h1 {
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1;
}

.dragon-glide-page .pond-hopper-panel {
  gap: 12px;
}

.pond-hopper-reward-pop {
  position: absolute;
  inset: clamp(14px, 4.5vw, 32px);
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  overflow: hidden;
  border: 3px solid rgba(28, 26, 16, 0.92);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 224, 102, 0.34), transparent 38%),
    radial-gradient(circle at 45% 60%, rgba(105, 229, 255, 0.18), transparent 46%),
    rgba(12, 26, 54, 0.8);
  box-shadow: inset 0 0 0 2px rgba(255, 247, 222, 0.24), 0 16px 36px rgba(5, 15, 25, 0.3);
  color: var(--cream);
  pointer-events: none;
  text-align: center;
}

.pond-hopper-reward-pop[hidden] {
  display: none;
}

.pond-hopper-reward-pop[data-endless="true"] {
  inset: auto clamp(12px, 3vw, 24px) clamp(12px, 3vw, 24px) auto;
  width: min(330px, calc(100% - 24px));
  min-height: 116px;
  padding: 14px 16px;
  grid-template-columns: 70px minmax(0, 1fr);
  justify-items: start;
  text-align: left;
}

.pond-hopper-reward-pop[data-endless="true"] .pond-hopper-reward-sparks {
  grid-column: 1 / -1;
}

.pond-hopper-reward-pop[data-endless="true"] .pond-hopper-reward-star {
  grid-row: 1 / span 2;
  width: 58px;
  align-self: center;
}

.pond-hopper-reward-pop[data-endless="true"] strong {
  align-self: end;
  font-size: clamp(22px, 2.7vw, 34px);
  line-height: 0.98;
}

.pond-hopper-reward-pop[data-endless="true"] .pond-hopper-reward-copy {
  max-width: none;
  align-self: start;
  font-size: 14px;
}

.pond-hopper-reward-sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pond-hopper-reward-spark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--spark-size);
  height: calc(var(--spark-size) * 0.48);
  border-radius: 999px;
  background: var(--spark-color);
  box-shadow: 0 0 18px var(--spark-color);
  transform: translate(var(--spark-x), var(--spark-y)) rotate(var(--spark-rotate));
  animation: pondRewardSpark 900ms ease-in-out infinite alternate;
}

.pond-hopper-reward-spark-img {
  height: var(--spark-size);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  object-fit: contain;
  image-rendering: auto;
}

.pond-hopper-reward-star {
  width: clamp(64px, 12vw, 98px);
  aspect-ratio: 1;
  background: #ffe066;
  clip-path: polygon(50% 0%, 61% 33%, 96% 35%, 68% 56%, 78% 91%, 50% 70%, 22% 91%, 32% 56%, 4% 35%, 39% 33%);
  filter: drop-shadow(0 8px 0 rgba(35, 28, 17, 0.3));
  animation: pondRewardStar 760ms ease-in-out infinite alternate;
}

.pond-hopper-reward-star-img {
  background: transparent;
  clip-path: none;
  object-fit: contain;
  image-rendering: auto;
}

.pond-hopper-reward-pop strong {
  position: relative;
  z-index: 1;
  color: #fff7de;
  font-size: clamp(32px, 6vw, 62px);
  font-weight: 950;
  line-height: 0.92;
  text-shadow: 0 5px 0 rgba(17, 33, 40, 0.4);
}

.pond-hopper-reward-copy {
  position: relative;
  z-index: 1;
  max-width: min(360px, 82%);
  color: rgba(255, 247, 222, 0.92);
  font-size: clamp(15px, 2.2vw, 22px);
  font-weight: 850;
  line-height: 1.2;
}

@keyframes pondRewardSpark {
  from {
    opacity: 0.7;
    scale: 0.88;
  }

  to {
    opacity: 1;
    scale: 1.1;
  }
}

@keyframes pondRewardStar {
  from {
    transform: translateY(4px) rotate(-4deg);
  }

  to {
    transform: translateY(-2px) rotate(4deg);
  }
}

.pond-hopper-brief {
  align-content: start;
}

.pond-hopper-tip-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

.pond-hopper-tip-list li {
  line-height: 1.45;
}

@media (max-width: 760px) {
  .dragon-glide-page .play-topbar {
    position: static;
    display: block;
    padding: 6px 8px;
  }

  .dragon-glide-page .brand-lockup {
    display: none;
  }

  .dragon-glide-page .topbar-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
  }

  .dragon-glide-page .topbar-button {
    justify-content: center;
    width: 100%;
    min-height: 38px;
    padding: 0 8px;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
  }

  .dragon-glide-page .dragon-glide-secondary-link {
    display: none;
  }

  .pond-hopper-shell {
    width: min(100% - 20px, 680px);
    margin-top: 88px;
    gap: 14px;
  }

  .dragon-glide-page .pond-hopper-shell {
    width: min(100% - 16px, 680px);
    margin-top: 8px;
    margin-bottom: 18px;
    gap: 8px;
  }

  .dragon-glide-page .pond-hopper-hero {
    order: 2;
  }

  .dragon-glide-page .pond-hopper-grid {
    order: 1;
  }

  .pond-hopper-hero,
  .pond-hopper-panel {
    padding: 14px;
  }

  .dragon-glide-page .pond-hopper-hero,
  .dragon-glide-page .pond-hopper-panel {
    gap: 7px;
    padding: 7px;
    box-shadow: 0 8px 0 rgba(12, 24, 52, 0.18);
  }

  .pond-hopper-hero h1 {
    font-size: clamp(30px, 9vw, 42px);
    line-height: 1.02;
  }

  .dragon-glide-page .pond-hopper-hero h1 {
    display: none;
  }

  .dragon-glide-page .pond-hopper-hero .eyebrow,
  .dragon-glide-page .pond-hopper-hero .stage-summary {
    display: none;
  }

  .dragon-glide-page .pond-hopper-chip-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .dragon-glide-page .pond-hopper-chip {
    justify-content: center;
    min-height: 30px;
    padding: 0 6px;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
  }

  .pond-hopper-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .dragon-glide-page .pond-hopper-grid {
    gap: 8px;
  }

  .pond-hopper-scorebar {
    align-items: flex-start;
  }

  .dragon-glide-page .pond-hopper-scorebar {
    gap: 4px;
    font-size: 12px;
  }

  .dragon-glide-page .sky-run-picker,
  .dragon-glide-page .kid-run-picker {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    padding: 4px;
  }

  .dragon-glide-page .sky-run-picker-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .dragon-glide-page .sky-run-choice {
    justify-content: center;
    min-height: 38px;
    padding: 3px 5px;
    gap: 4px;
    font-size: 12px;
    line-height: 1;
  }

  .dragon-glide-page .kid-run-picker button {
    min-height: 38px;
    padding: 3px 5px;
    font-size: 12px;
    line-height: 1;
  }

  .dragon-glide-page .sky-run-choice img {
    width: 28px;
    height: 28px;
  }

  .dragon-glide-page .pond-hopper-canvas {
    aspect-ratio: auto;
    height: clamp(300px, 54vh, 420px);
    min-height: 0;
  }

  .dragon-glide-page #pond-hopper-progress {
    width: 100%;
  }

  .dragon-glide-page #pond-hopper-progress[data-final-gate="true"],
  .dragon-glide-page #pond-hopper-progress[data-leaderboard="next"],
  .dragon-glide-page #pond-hopper-progress[data-leaderboard="open"] {
    min-height: 32px;
    padding: 0 8px;
    font-size: 13px;
  }

  .pond-hopper-actions {
    gap: 8px;
  }

  .pond-hopper-actions > * {
    flex: 1 1 138px;
    min-height: 56px;
    touch-action: manipulation;
  }

  .dragon-glide-page .pond-hopper-actions > * {
    min-height: 64px;
    padding-inline: 12px;
    font-size: 0.96rem;
    line-height: 1.1;
  }

  .dragon-glide-page #pond-hopper-jump {
    min-height: 68px;
  }

  .dragon-glide-page .pond-hopper-brief {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #pond-hopper-progress[data-final-gate="true"],
  #pond-hopper-jump[data-first-play-cue="true"],
  .pond-hopper-reward-spark,
  .pond-hopper-reward-star {
    animation: none;
  }
}

/* Roster strip is hidden on the home scene — surfaced only inside
 * the adventure runtime where party-switching matters. */
.home-world-roster {
  display: none;
}

/* Home-world art tray — a leather-bound storybook spread.
 * Each icon sits in its own embossed parchment slot; the title is
 * carved into a brass plaque. This panel must read at the same
 * quality bar as the bouncy castle icons it frames. */
/* Home-world art tray hidden — non-interactive teaser that
 * duplicated info already on the map. Will return as a real
 * navigation panel when the rooms become live. */
.home-world-art-tray {
  display: none;
}

.home-world-art-tray p {
  margin: 0 0 4px;
  padding: 0 2px;
  display: block;
  color: rgba(255, 245, 216, 0.6);
  font-size: 9px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-world-art-icons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-top: 0;
}

.home-world-art-icons span {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 0;
  padding: 2px 0 3px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.home-world-art-icons img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
  animation: castle-bob 4.4s ease-in-out infinite;
}

.home-world-art-icons span:nth-child(2) img { animation-delay: -0.6s; }
.home-world-art-icons span:nth-child(3) img { animation-delay: -1.2s; }
.home-world-art-icons span:nth-child(4) img { animation-delay: -1.8s; }

@keyframes castle-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px); }
}

.home-world-art-icons strong {
  max-width: 100%;
  color: rgba(255, 245, 216, 0.85);
  font-size: 8px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-world + .stage-copy,
.home-world ~ .kid-selector-band,
.home-world ~ .launch-spotlight,
#home-screen > .ready-play-band,
#home-screen > .world-band {
  display: none;
}

.play-app:has(#home-screen.active) .night-stage::before,
.play-app:has(#home-screen.active) .sky-lights {
  display: none;
}

.home-world-place-panel {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 5;
  width: min(270px, calc(100% - 20px));
  padding: 10px;
  border: 2px solid rgba(22, 33, 28, 0.92);
  background:
    linear-gradient(180deg, rgba(255, 247, 222, 0.96), rgba(244, 229, 190, 0.96));
  color: var(--ink);
  box-shadow:
    0 14px 0 rgba(22, 33, 28, 0.28),
    0 0 0 3px rgba(255, 247, 222, 0.2);
}

.home-world-place-panel h2 {
  margin-top: 4px;
  color: var(--ink);
  font-size: clamp(18px, 2.8vw, 26px);
  line-height: 0.95;
}

.home-world-panel-close {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: 26px;
  padding: 0 8px;
  border: 2px solid rgba(22, 33, 28, 0.82);
  background: rgba(255, 247, 222, 0.9);
  color: var(--ink);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
}

.home-world-panel-body {
  margin-top: 7px;
  max-width: 30ch;
  color: rgba(22, 33, 28, 0.74);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.16;
}

.home-world-panel-actions {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.home-world-panel-action {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 8px;
  border: 2px solid rgba(22, 33, 28, 0.9);
  background: rgba(255, 247, 222, 0.9);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 5px 0 rgba(22, 33, 28, 0.2);
}

.home-world-panel-action.primary {
  background: #ffdf6b;
}

.home-world-panel-action:disabled {
  cursor: default;
  opacity: 0.72;
  transform: none;
}

.home-world-panel-action strong {
  font-size: 12px;
  line-height: 1;
}

.home-world-panel-action small {
  color: rgba(22, 33, 28, 0.68);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
}

.night-stage::before,
.loading-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--stage-art);
  background-size: cover;
  background-position: center center;
  opacity: 0.18;
  filter: blur(4px) saturate(1.18);
  transform: scale(1.06);
  pointer-events: none;
}

.sky-lights {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sky-lights span {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 247, 222, 0.8);
  box-shadow:
    0 0 0 10px rgba(255, 247, 222, 0.04),
    0 0 18px rgba(255, 247, 222, 0.28);
  animation: bob 6s ease-in-out infinite;
}

.sky-lights span:nth-child(1) { top: 8%; left: 7%; animation-delay: 0s; }
.sky-lights span:nth-child(2) { top: 18%; left: 84%; animation-delay: 1.2s; }
.sky-lights span:nth-child(3) { top: 30%; left: 20%; animation-delay: 2.6s; }
.sky-lights span:nth-child(4) { top: 12%; left: 56%; animation-delay: 0.8s; }
.sky-lights span:nth-child(5) { top: 42%; left: 72%; animation-delay: 1.9s; }
.sky-lights span:nth-child(6) { top: 50%; left: 10%; animation-delay: 3.1s; }

.stage-copy {
  position: relative;
  z-index: 1;
  max-width: 880px;
  display: grid;
  gap: 14px;
}

.stage-copy h1 {
  max-width: 12ch;
  font-size: 64px;
  line-height: 0.96;
  color: var(--cream);
  text-wrap: balance;
}

.stage-summary,
.screen-helper,
.panel-copy p,
.band-copy p,
.loading-line {
  max-width: 64ch;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(255, 247, 222, 0.9);
}

.kid-selector-band,
.ready-play-band,
.world-band {
  position: relative;
  z-index: 1;
  margin-top: 26px;
  display: grid;
  gap: 16px;
}

.band-copy {
  display: grid;
  gap: 6px;
}

.band-copy h2,
.screen-head h2,
.panel-copy h3,
.step-copy h3,
.viewer-topline h2,
.loading-copy h2 {
  font-size: 40px;
  line-height: 1;
  color: var(--cream);
}

.kid-portals,
.world-row,
.theme-grid,
.mode-grid,
.choice-grid {
  display: grid;
  gap: 14px;
}

.kid-portals {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.portal-card {
  position: relative;
  display: grid;
  min-height: 286px;
  overflow: hidden;
  padding: 0;
  text-align: left;
  border: 2px solid rgba(255, 247, 222, 0.16);
  background: #153956;
  box-shadow: 0 16px 32px rgba(7, 15, 27, 0.2);
}

.portal-card img {
  width: 100%;
  min-height: 286px;
  object-fit: cover;
  object-position: var(--art-position, center center);
  transform: scale(var(--art-scale, 1));
}

.portal-copy {
  position: absolute;
  inset: auto 0 0 0;
  display: grid;
  gap: 8px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(10, 18, 34, 0) 0%, rgba(10, 18, 34, 0.92) 70%);
}

.portal-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portal-badge,
.spotlight-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 2px solid rgba(22, 33, 28, 0.92);
  border-radius: 999px;
  background: rgba(255, 247, 222, 0.9);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}

.portal-copy strong {
  font-size: 22px;
  line-height: 1;
  color: var(--cream);
}

.portal-copy span {
  font-size: 13px;
  line-height: 1.4;
  color: rgba(223, 244, 255, 0.92);
}

.portal-card.active {
  border-color: var(--mango);
  box-shadow: 0 10px 30px rgba(255, 183, 3, 0.24);
}

.launch-spotlight {
  position: relative;
  z-index: 1;
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: stretch;
}

.spotlight-art-shell,
.spotlight-copy {
  border: 2px solid rgba(255, 247, 222, 0.14);
  border-radius: 8px;
  overflow: hidden;
}

.spotlight-art-shell {
  min-height: 100%;
  background: rgba(223, 244, 255, 0.08);
}

.spotlight-art-shell img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  object-position: var(--art-position, center center);
  transform: scale(var(--art-scale, 1));
}

.spotlight-copy {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 20px;
  background:
    linear-gradient(160deg, rgba(255, 183, 3, 0.16), rgba(20, 184, 166, 0.08)),
    rgba(255, 247, 222, 0.08);
}

.spotlight-copy h2 {
  font-size: 42px;
  line-height: 0.98;
  color: var(--cream);
}

.spotlight-summary {
  max-width: none;
}

.spotlight-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.launch-dock {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.spotlight-actions {
  margin-top: 4px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.launch-pill,
.launch-link {
  display: grid;
  gap: 4px;
  align-content: center;
  justify-items: start;
  min-height: 88px;
  padding: 0 18px;
  background: rgba(244, 238, 220, 0.96);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
}

.launch-pill strong,
.launch-link strong {
  font-size: 17px;
  line-height: 1;
}

.launch-pill small,
.launch-link small {
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
  color: rgba(22, 33, 28, 0.78);
}

.launch-pill.primary,
.action-control {
  background: var(--mango);
}

.ready-play-band,
.world-band {
  padding: 18px;
  background: rgba(255, 247, 222, 0.08);
  border-top: 2px solid rgba(255, 247, 222, 0.12);
}

.ready-play-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 14px;
}

.ready-companion-deck {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin: 14px 0;
}

.ready-companion-card {
  min-height: 100%;
}

.ready-companion-deck .ready-companion-card img {
  aspect-ratio: 1;
}

.ready-play-card {
  overflow: hidden;
  border: 2px solid rgba(255, 247, 222, 0.16);
  background: #102c2f;
  box-shadow: 0 16px 34px rgba(8, 14, 21, 0.24);
}

.ready-play-art {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: #173d5c;
}

.ready-play-art img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.ready-play-art span {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--mango);
  color: #142238;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
}

.ready-play-copy {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.ready-play-copy h3 {
  color: var(--cream);
  font-size: 24px;
  line-height: 1;
}

.ready-play-copy p {
  color: rgba(255, 247, 222, 0.86);
  line-height: 1.45;
}

.ready-play-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ready-play-status {
  min-height: 20px;
  font-size: 14px;
}

.world-row,
.theme-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.world-card,
.theme-card {
  overflow: hidden;
  padding: 0;
  text-align: left;
  background: #173d5c;
}

.world-card img,
.theme-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: var(--art-position, center center);
  transform: scale(var(--art-scale, 1));
}

.world-copy,
.theme-copy {
  display: grid;
  gap: 6px;
  padding: 14px;
  background: rgba(15, 27, 47, 0.88);
}

.world-copy strong,
.theme-copy strong {
  font-size: 17px;
  color: var(--cream);
}

.world-copy span,
.theme-copy span {
  font-size: 13px;
  line-height: 1.4;
  color: rgba(223, 244, 255, 0.9);
}

.screen-shell,
.viewer-shell,
.loading-shell {
  min-height: calc(100vh - 78px);
  padding: 28px 18px 24px;
}

.screen-head {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.mode-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 18px;
}

.mode-card {
  display: grid;
  gap: 8px;
  min-height: 136px;
  padding: 18px;
  background: rgba(223, 244, 255, 0.16);
  color: var(--cream);
  text-align: left;
}

.mode-card strong {
  font-size: 24px;
  line-height: 1;
}

.mode-card span {
  font-size: 14px;
  line-height: 1.45;
  color: rgba(223, 244, 255, 0.88);
}

.mode-card.active,
.theme-card.active,
.choice-card.active {
  border-color: var(--mango);
  background: rgba(255, 183, 3, 0.18);
  box-shadow: 0 12px 26px rgba(255, 183, 3, 0.14);
}

.launch-panel {
  display: grid;
  gap: 18px;
}

.launch-panel-block {
  display: none;
}

.launch-panel-block.active {
  display: grid;
  gap: 14px;
}

.continue-card {
  display: grid;
  gap: 10px;
}

.continue-entry {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 2px solid rgba(255, 247, 222, 0.14);
  border-radius: 8px;
  background: rgba(223, 244, 255, 0.08);
}

.continue-entry strong {
  font-size: 20px;
  color: var(--cream);
}

.continue-entry span {
  font-size: 14px;
  color: rgba(223, 244, 255, 0.88);
}

.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.action-bar.dual {
  justify-content: space-between;
}

.action-control {
  min-height: 54px;
  padding: 0 18px;
  color: var(--ink);
  font-weight: 600;
}

.builder-shell {
  display: grid;
  gap: 18px;
}

.smol-builder-shell {
  min-height: calc(100vh - 78px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 16px;
  overflow: hidden;
  padding: 18px;
  background:
    radial-gradient(circle at 18% 18%, rgba(184, 242, 74, 0.24), transparent 26%),
    radial-gradient(circle at 82% 24%, rgba(255, 183, 3, 0.28), transparent 22%),
    linear-gradient(135deg, #0f7a69 0%, #173d5c 44%, #8b2448 100%);
}

.smol-builder-topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.smol-builder-topbar h2 {
  max-width: 12ch;
  font-size: clamp(38px, 8vw, 78px);
  line-height: 0.9;
  color: var(--cream);
}

.smol-builder-stage {
  display: grid;
  grid-template-columns: minmax(54px, 90px) minmax(0, 1fr) minmax(54px, 90px);
  align-items: center;
  gap: 10px;
  min-height: 0;
}

.smol-builder-arrow {
  width: 100%;
  min-height: min(34vh, 260px);
  border: 3px solid rgba(22, 33, 28, 0.95);
  border-radius: 8px;
  background: var(--mango);
  color: var(--ink);
  font-size: clamp(52px, 12vw, 120px);
  font-weight: 500;
  box-shadow: 0 12px 0 rgba(22, 33, 28, 0.32);
}

.smol-builder-arrow:disabled {
  opacity: 0.45;
  transform: none;
}

.smol-builder-character {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(58vh, 560px);
  border: 3px solid rgba(22, 33, 28, 0.95);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 247, 222, 0.92), rgba(223, 244, 255, 0.88)),
    repeating-linear-gradient(90deg, rgba(22, 33, 28, 0.08) 0 1px, transparent 1px 48px);
  box-shadow: 0 18px 0 rgba(22, 33, 28, 0.24);
}

.smol-builder-character img {
  position: relative;
  z-index: 1;
  width: min(72vw, 540px);
  max-height: min(56vh, 540px);
  object-fit: contain;
  animation: smol-idle 1.8s ease-in-out infinite;
}

.smol-builder-shadow {
  position: absolute;
  bottom: 8%;
  width: min(42vw, 320px);
  height: 34px;
  border-radius: 999px;
  background: rgba(22, 33, 28, 0.22);
  filter: blur(2px);
}

.smol-builder-console,
.smol-builder-save-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 3px solid rgba(22, 33, 28, 0.95);
  border-radius: 8px;
  background: rgba(255, 247, 222, 0.94);
  color: var(--ink);
}

.smol-builder-option-label {
  font-size: clamp(26px, 5vw, 46px);
  line-height: 1;
  font-weight: 500;
}

.smol-builder-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.smol-builder-progress span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border: 2px solid rgba(22, 33, 28, 0.9);
  border-radius: 8px;
  background: rgba(15, 122, 105, 0.12);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
}

.smol-builder-progress span.active {
  background: var(--mango);
}

.smol-builder-progress span.done {
  background: rgba(184, 242, 74, 0.55);
}

.smol-builder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.smol-builder-save-panel {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.smol-builder-save-panel label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.smol-builder-save-panel input {
  min-height: 48px;
  border: 2px solid rgba(22, 33, 28, 0.9);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
}

.smol-builder-save-panel .screen-helper {
  color: rgba(22, 33, 28, 0.74);
}

@keyframes smol-idle {
  0%,
  100% {
    transform: translateY(0) rotate(-0.4deg) scale(1);
  }
  50% {
    transform: translateY(-10px) rotate(0.6deg) scale(1.018);
  }
}

.builder-remix-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.remix-chip {
  min-height: 40px;
  padding: 0 12px;
  border: 2px solid rgba(22, 33, 28, 0.92);
  border-radius: 8px;
  background: rgba(223, 244, 255, 0.14);
  color: var(--cream);
  font-size: 13px;
  font-weight: 500;
}

.builder-library {
  display: grid;
  gap: 12px;
}

.builder-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.blueprint-deck {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.picker-deck {
  display: grid;
  gap: 12px;
}

.blueprint-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 2px solid rgba(22, 33, 28, 0.92);
  border-radius: 8px;
  background: rgba(223, 244, 255, 0.1);
}

.blueprint-card strong {
  font-size: 18px;
  line-height: 1.05;
  color: var(--cream);
}

.blueprint-card p {
  font-size: 14px;
  line-height: 1.45;
  color: rgba(223, 244, 255, 0.88);
}

.picker-card {
  display: grid;
  gap: 10px;
  overflow: hidden;
  padding: 14px;
  border: 2px solid rgba(22, 33, 28, 0.92);
  border-radius: 8px;
  background: rgba(223, 244, 255, 0.1);
  color: var(--cream);
  text-align: left;
}

.picker-card.active {
  border-color: var(--mango);
  background: rgba(255, 183, 3, 0.18);
  box-shadow: 0 12px 26px rgba(255, 183, 3, 0.14);
}

.picker-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
}

.picker-card strong {
  font-size: 18px;
  line-height: 1.05;
}

.picker-card p {
  font-size: 14px;
  line-height: 1.45;
  color: rgba(223, 244, 255, 0.88);
}

.picker-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.picker-card-meta span,
.library-empty span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border: 2px solid rgba(22, 33, 28, 0.92);
  border-radius: 8px;
  background: rgba(255, 247, 222, 0.12);
  color: rgba(255, 247, 222, 0.92);
  font-size: 12px;
  font-weight: 500;
}

.library-empty {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 2px dashed rgba(255, 247, 222, 0.18);
  border-radius: 8px;
  background: rgba(223, 244, 255, 0.06);
}

.library-empty p {
  font-size: 14px;
  line-height: 1.45;
  color: rgba(223, 244, 255, 0.88);
}

.library-empty a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 12px;
  border: 2px solid rgba(22, 33, 28, 0.92);
  border-radius: 8px;
  background: rgba(255, 247, 222, 0.96);
  color: var(--ink);
  font-weight: 600;
}

.blueprint-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.blueprint-card-actions .ghost-control,
.blueprint-card-actions .action-control {
  min-height: 40px;
  padding: 0 12px;
}

.builder-progress {
  display: grid;
  gap: 8px;
}

.builder-progress-copy {
  font-size: 14px;
  font-weight: 500;
  color: rgba(223, 244, 255, 0.9);
}

.builder-progress-bar,
.loading-progress {
  height: 14px;
  border: 2px solid rgba(255, 247, 222, 0.18);
  border-radius: 999px;
  background: rgba(255, 247, 222, 0.08);
  overflow: hidden;
}

.builder-progress-bar span,
.loading-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--teal), var(--mango), var(--tomato));
  transition: width 220ms ease;
}

.builder-stage {
  display: grid;
}

.builder-step {
  display: none;
  gap: 14px;
}

.builder-step.active {
  display: grid;
}

.step-copy {
  display: grid;
  gap: 8px;
}

.choice-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.choice-card {
  min-height: 116px;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 16px;
  background: rgba(223, 244, 255, 0.12);
  color: var(--cream);
  text-align: left;
}

.choice-card strong {
  font-size: 18px;
  line-height: 1.05;
}

.choice-card span {
  font-size: 14px;
  line-height: 1.45;
  color: rgba(223, 244, 255, 0.88);
}

.builder-freeform {
  display: grid;
  gap: 10px;
}

.builder-simple-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.field-stack {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--cream);
}

textarea,
input {
  width: 100%;
  border: 2px solid rgba(22, 33, 28, 0.92);
  border-radius: 8px;
  background: rgba(255, 247, 222, 0.96);
  color: var(--ink);
}

textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  padding: 14px;
}

input {
  min-height: 48px;
  padding: 0 14px;
}

.loading-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 24px;
  align-items: center;
  overflow: hidden;
}

.loading-game-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 3px solid rgba(22, 33, 28, 0.95);
  border-radius: 8px;
  background: rgba(255, 247, 222, 0.14);
  box-shadow: 0 20px 0 rgba(22, 33, 28, 0.18);
}

.loading-game-topline,
.loading-game-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.loading-game-topline p:last-child {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 247, 222, 0.94);
  color: var(--ink);
  font-weight: 500;
}

.loading-game-canvas {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 3px solid rgba(22, 33, 28, 0.95);
  border-radius: 8px;
  background: #173d5c;
  touch-action: manipulation;
}

.story-ready-button {
  min-height: 54px;
  padding: 0 18px;
  border: 3px solid rgba(22, 33, 28, 0.95);
  border-radius: 8px;
  background: #b8f24a;
  color: var(--ink);
  font-size: 18px;
  font-weight: 500;
  box-shadow: 0 7px 0 rgba(22, 33, 28, 0.3);
}

.loading-machine {
  position: relative;
  z-index: 1;
  max-width: 740px;
  width: 100%;
  justify-self: center;
}

.machine-window {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px;
  border: 2px solid rgba(22, 33, 28, 0.92);
  border-radius: 8px 8px 0 0;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 247, 222, 0.14) 0 4px,
      rgba(255, 247, 222, 0.02) 4px 18px
    ),
    #153956;
}

.machine-floor {
  height: 18px;
  border: 2px solid rgba(22, 33, 28, 0.92);
  border-top: none;
  border-radius: 0 0 8px 8px;
  background: #ffb703;
}

.machine-reel {
  aspect-ratio: 1;
  border: 2px solid rgba(22, 33, 28, 0.92);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 247, 222, 0.92), rgba(255, 247, 222, 0.2)),
    #14b8a6;
  animation: reelSpin 2.8s linear infinite;
}

.reel-two {
  animation-duration: 2.2s;
}

.reel-three {
  animation-duration: 1.8s;
}

.loading-copy {
  position: relative;
  z-index: 1;
  max-width: 640px;
  justify-self: center;
  display: grid;
  gap: 14px;
  text-align: center;
}

.loading-gags {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.viewer-shell {
  display: grid;
  gap: 18px;
}

.viewer-topline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.viewer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.viewer-stage {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 58px;
  gap: 12px;
  align-items: center;
}

.viewer-art {
  overflow: hidden;
  padding: 0;
  background: #0c1524;
  position: relative;
}

.viewer-art img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transform-origin: center center;
  transition: transform 380ms ease, opacity 220ms ease;
}

.viewer-art.motion-a img {
  animation: sceneDriftA 10s ease-in-out infinite;
}

.viewer-art.motion-b img {
  animation: sceneDriftB 11s ease-in-out infinite;
}

.viewer-art.motion-c img {
  animation: sceneDriftC 12s ease-in-out infinite;
}

.viewer-art.is-refreshing img {
  opacity: 0.88;
}

.nav-control {
  min-height: 88px;
  padding: 0;
  background: rgba(255, 247, 222, 0.94);
  color: var(--ink);
  font-size: 34px;
  font-weight: 600;
}

.narration-band {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border: 2px solid rgba(22, 33, 28, 0.92);
  border-radius: 8px;
  background: rgba(255, 247, 222, 0.96);
  color: var(--ink);
}

.viewer-quality-band {
  display: grid;
  gap: 10px;
  padding: 14px 16px 16px;
  border: 2px solid rgba(255, 247, 222, 0.24);
  border-radius: 8px;
  background: rgba(12, 21, 36, 0.72);
  color: var(--cream);
}

.viewer-quality-band.hidden {
  display: none;
}

.viewer-quality-band.is-repaired {
  border-color: rgba(165, 243, 113, 0.72);
  background: rgba(34, 82, 48, 0.45);
}

.viewer-quality-band.is-warning {
  border-color: rgba(255, 200, 87, 0.86);
  background: rgba(91, 54, 21, 0.48);
}

.viewer-quality-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.viewer-quality-head h3 {
  font-size: 26px;
  line-height: 1;
  color: var(--cream);
}

.viewer-quality-score {
  display: inline-flex;
  min-width: 88px;
  justify-content: center;
  padding: 8px 10px;
  border: 2px solid rgba(255, 247, 222, 0.72);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.viewer-quality-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.viewer-quality-chip {
  display: inline-flex;
  padding: 7px 9px;
  border: 2px solid rgba(255, 247, 222, 0.18);
  border-radius: 8px;
  background: rgba(255, 247, 222, 0.12);
  color: var(--cream);
  font-size: 13px;
  font-weight: 500;
}

.viewer-quality-toggle {
  justify-self: start;
  min-height: 38px;
  padding: 8px 11px;
  border: 2px solid rgba(255, 247, 222, 0.42);
  border-radius: 8px;
  background: rgba(255, 247, 222, 0.12);
  color: var(--cream);
  font-size: 13px;
  font-weight: 600;
}

.viewer-quality-details {
  display: grid;
  gap: 12px;
  padding-top: 4px;
}

.viewer-quality-details.hidden {
  display: none;
}

.viewer-quality-detail-section {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 247, 222, 0.22);
}

.viewer-quality-detail-section h4 {
  color: var(--cream);
  font-size: 16px;
  line-height: 1.1;
}

.viewer-quality-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  max-width: 360px;
  color: rgba(255, 247, 222, 0.84);
  font-size: 14px;
}

.viewer-quality-note {
  margin: 0;
  max-width: 780px;
  color: rgba(255, 247, 222, 0.84);
  font-size: 14px;
  line-height: 1.35;
}

.viewer-video-band {
  display: grid;
  gap: 12px;
  padding: 16px 18px 18px;
  border: 2px solid rgba(255, 247, 222, 0.18);
  border-radius: 8px;
  background: rgba(223, 244, 255, 0.08);
}

.viewer-video-band.movie-mode {
  gap: 16px;
  padding: 18px;
  border-color: rgba(255, 213, 74, 0.7);
  background:
    linear-gradient(135deg, rgba(255, 213, 74, 0.18), rgba(20, 184, 166, 0.1)),
    rgba(8, 16, 28, 0.88);
  box-shadow:
    0 22px 46px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(255, 247, 222, 0.12);
}

.viewer-video-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.viewer-video-head h3 {
  font-size: 28px;
  line-height: 1;
  color: var(--cream);
}

.viewer-reel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.viewer-reel-actions .hidden {
  display: none;
}

.viewer-reel-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.viewer-video-current.hidden {
  display: none;
}

.viewer-video-band.movie-mode .viewer-video-current {
  position: relative;
}

.viewer-video-band.movie-mode .viewer-video-current::before,
.viewer-video-band.movie-mode .viewer-video-current::after {
  content: "";
  display: block;
  height: 18px;
  border-radius: 6px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 247, 222, 0.9) 0 18px,
      rgba(8, 16, 28, 0.9) 18px 36px
    );
  opacity: 0.84;
}

.viewer-video-current video {
  width: 100%;
  border: 2px solid rgba(22, 33, 28, 0.92);
  border-radius: 8px;
  background: #08101c;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.viewer-video-band.movie-mode .viewer-video-current video {
  border-color: rgba(255, 247, 222, 0.92);
  border-radius: 4px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.42);
}

.viewer-video-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 12px;
}

.viewer-video-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  text-align: left;
  background: rgba(255, 247, 222, 0.96);
  color: var(--ink);
}

.viewer-video-card.active {
  border-color: var(--mango);
  box-shadow: 0 10px 20px rgba(8, 16, 28, 0.18);
}

.viewer-video-band.movie-mode .viewer-video-card {
  transform: scale(0.98);
  opacity: 0.72;
}

.viewer-video-band.movie-mode .viewer-video-card.active {
  opacity: 1;
}

.viewer-video-card img,
.viewer-video-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  object-fit: cover;
}

.viewer-video-placeholder {
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(20, 184, 166, 0.26), rgba(16, 42, 67, 0.94)),
    #153956;
  color: var(--cream);
  font-weight: 600;
}

.viewer-video-copy {
  display: grid;
  gap: 4px;
}

.viewer-video-copy strong {
  font-size: 16px;
  line-height: 1.05;
}

.viewer-video-copy span {
  font-size: 13px;
  line-height: 1.4;
  color: rgba(22, 33, 28, 0.8);
}

.viewer-cast-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.viewer-cast-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 2px solid rgba(22, 33, 28, 0.92);
  border-radius: 8px;
  background: rgba(223, 244, 255, 0.14);
  color: var(--cream);
  font-size: 13px;
  font-weight: 500;
}

.narration-topline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
}

.viewer-narration {
  font-size: 28px;
  line-height: 1.46;
  color: var(--ink);
}

.viewer-dialogue {
  display: grid;
  gap: 8px;
}

.viewer-dialogue.hidden {
  display: none;
}

.dialogue-chip {
  padding: 10px 12px;
  border-left: 4px solid var(--tomato);
  background: rgba(20, 184, 166, 0.08);
  font-size: 15px;
  line-height: 1.45;
}

.dialogue-chip strong {
  margin-right: 6px;
}

.is-muted .machine-reel,
.is-muted .sky-lights span {
  animation-play-state: paused;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes reelSpin {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px) rotate(180deg);
  }

  100% {
    transform: translateY(0) rotate(360deg);
  }
}

@keyframes sceneDriftA {
  0%,
  100% {
    transform: scale(1.04) translate3d(0, 0, 0);
  }

  50% {
    transform: scale(1.09) translate3d(-1.8%, -1.2%, 0);
  }
}

@keyframes sceneDriftB {
  0%,
  100% {
    transform: scale(1.05) translate3d(0, 0, 0);
  }

  50% {
    transform: scale(1.1) translate3d(1.6%, -1%, 0);
  }
}

@keyframes sceneDriftC {
  0%,
  100% {
    transform: scale(1.04) translate3d(0, 0, 0);
  }

  50% {
    transform: scale(1.08) translate3d(0.8%, -1.6%, 0);
  }
}

@media (max-width: 900px) {
  .stage-copy h1 {
    max-width: 12ch;
    font-size: 42px;
  }

  .band-copy h2,
  .screen-head h2,
  .panel-copy h3,
  .step-copy h3,
  .viewer-topline h2,
  .loading-copy h2 {
    font-size: 34px;
  }

  .viewer-narration {
    font-size: 24px;
  }

  .viewer-video-head h3 {
    font-size: 24px;
  }

  .builder-simple-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .builder-library-grid {
    grid-template-columns: 1fr;
  }

  .smol-builder-save-panel {
    grid-template-columns: 1fr;
  }

  .launch-spotlight {
    grid-template-columns: 1fr;
  }

  .loading-shell {
    grid-template-columns: 1fr;
  }

  .viewer-stage {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
  }
}

@media (max-width: 720px) {
  .play-topbar,
  .night-stage,
  .ready-play-band,
  .world-band,
  .screen-shell,
  .viewer-shell,
  .loading-shell,
  .smol-builder-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .stage-copy h1,
  .band-copy h2,
  .screen-head h2,
  .panel-copy h3,
  .step-copy h3,
  .viewer-topline h2,
  .loading-copy h2 {
    font-size: 34px;
  }

  .viewer-narration {
    font-size: 21px;
  }

  .viewer-video-head h3 {
    font-size: 22px;
  }

  .spotlight-copy h2 {
    font-size: 34px;
  }

  .builder-simple-grid {
    grid-template-columns: 1fr;
  }

  .action-bar.dual {
    justify-content: flex-start;
  }

  .action-control,
  .ghost-control,
  .launch-pill,
  .topbar-button {
    width: 100%;
    justify-content: center;
  }

  .launch-pill,
  .launch-link {
    justify-items: center;
    text-align: center;
  }

  .play-app:has(#home-screen.active) .play-topbar {
    padding-left: 8px;
    padding-right: 8px;
  }

  .play-app:has(#home-screen.active) .topbar-actions {
    width: auto;
    max-width: calc(100vw - 18px);
    gap: 4px;
  }

  .play-app:has(#home-screen.active) .topbar-button {
    width: auto;
    min-height: 28px;
    padding: 5px 7px;
    font-size: 10px;
  }

  .play-app:has(#home-screen.active) .topbar-locked {
    display: none;
  }

  .play-app:has(#home-screen.active) .brand-note {
    display: none;
  }

  .play-app:has(#home-screen.active) .brand-badge {
    min-height: 28px;
    padding: 0 8px;
    font-size: 11px;
  }

  .play-app:has(#home-screen.active) .home-world-roster {
    top: 72px;
    left: 8px;
    right: 8px;
    gap: 4px;
  }

  .play-app:has(#home-screen.active) .home-world-roster span {
    min-height: 28px;
    padding: 2px 6px 2px 3px;
    font-size: 8px;
  }

  .play-app:has(#home-screen.active) .home-world-roster img {
    width: 22px;
    height: 22px;
  }

  .play-app:has(#home-screen.active) .home-world-art-tray {
    display: none;
  }

  .play-app:has(#home-screen.active) .home-world-map-controls {
    right: 8px;
    bottom: 118px;
    gap: 4px;
    padding: 4px;
  }

  .play-app:has(#home-screen.active) .home-world-map-controls button {
    min-width: 34px;
    min-height: 32px;
    font-size: 11px;
  }

  .play-app:has(#home-screen.active) .home-world-hud {
    left: 8px;
    bottom: 8px;
    width: min(342px, calc(100% - 16px));
    padding: 7px 8px;
    gap: 6px;
  }

  .play-app:has(#home-screen.active) .home-world-prompt-portrait {
    width: 50px;
    height: 50px;
    border-radius: 15px;
  }

  .play-app:has(#home-screen.active) .home-world-hud .action-control {
    width: auto;
    min-width: 64px;
    min-height: 32px;
    padding: 6px 8px;
    font-size: 9px;
  }

  .play-app:has(#home-screen.active) .home-world-hud h1 {
    font-size: 12px;
  }

  .play-app:has(#home-screen.active) .home-world-hud p:last-child {
    display: block;
    font-size: 13px;
    line-height: 1.05;
  }

  .play-app:has(#home-screen.active) .home-world-reward-shelf {
    gap: 3px;
    min-height: 21px;
    font-size: 9px;
  }

  .play-app:has(#home-screen.active) .home-world-reward-shelf span {
    min-height: 21px;
    padding: 0 5px;
  }

  .play-app:has(#home-screen.active) .home-world-celebration {
    min-height: 23px;
    padding: 3px 6px;
    font-size: 0.72rem;
  }

  .play-app:has(#home-screen.active) .home-world-avatar-picker {
    gap: 4px;
    padding-top: 0;
  }

  .play-app:has(#home-screen.active) .home-world-avatar-picker button {
    min-height: 28px;
    padding: 2px 6px 2px 3px;
    font-size: 10px;
  }

  .play-app:has(#home-screen.active) .home-world-avatar-picker img {
    width: 22px;
    height: 22px;
    border-radius: 8px;
  }

  .play-app:has(#home-screen.active) .home-world-place-panel {
    right: 8px;
    bottom: 8px;
    width: min(230px, calc(100% - 16px));
    max-height: 42vh;
    overflow: auto;
  }

  .play-app:has(#home-screen.active) .home-world-place-panel h2 {
    font-size: 17px;
  }

  .viewer-topline,
  .viewer-actions {
    display: grid;
  }

  .viewer-stage {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 8px;
  }

  .smol-builder-topbar {
    grid-template-columns: 1fr;
  }

  .smol-builder-stage {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    gap: 8px;
  }

  .smol-builder-arrow {
    min-height: 220px;
    font-size: 58px;
  }

  .smol-builder-character {
    min-height: 360px;
  }

  .smol-builder-character img {
    width: min(76vw, 360px);
  }

  .smol-builder-console {
    grid-template-columns: 1fr;
  }

  .smol-builder-actions {
    justify-content: stretch;
  }

  .viewer-art img {
    aspect-ratio: 4 / 5;
  }
}

.talk-cutaway-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #255f5c 0%, #2b6b7b 44%, #183956 100%);
}

.talk-cutaway-app {
  min-height: 100vh;
}

.talk-cutaway-topbar {
  position: sticky;
}

.talk-cutaway-shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.talk-cutaway-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 22px;
  align-items: stretch;
}

.talk-cutaway-scene {
  position: relative;
  min-height: min(68vh, 620px);
  overflow: hidden;
  border: 3px solid rgba(255, 245, 216, 0.68);
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 16%, rgba(245, 194, 91, 0.36), transparent 22%),
    linear-gradient(180deg, #9fe2e6 0%, #b7e7b3 58%, #5ca66f 58%, #357452 100%);
  box-shadow: 0 26px 58px rgba(6, 18, 24, 0.38);
}

.talk-cutaway-scene::before,
.talk-cutaway-scene::after {
  content: "";
  position: absolute;
  left: -6%;
  right: -6%;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 245, 216, 0.55);
}

.talk-cutaway-scene::before {
  top: 68px;
  transform: rotate(-2deg);
}

.talk-cutaway-scene::after {
  top: 112px;
  transform: rotate(3deg);
  opacity: 0.56;
}

.talk-cutaway-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -32px;
  height: 150px;
  background:
    radial-gradient(ellipse at 50% 16%, rgba(13, 50, 66, 0.28) 0 16%, transparent 42%),
    linear-gradient(180deg, #4b9b5e 0%, #246a50 100%);
}

.talk-cutaway-character {
  position: absolute;
  left: 50%;
  bottom: 52px;
  z-index: 2;
  width: clamp(132px, 20vw, 190px);
  aspect-ratio: 673 / 932;
  transform: translateX(-50%);
  animation: talk-cutaway-breathe 1380ms ease-in-out infinite;
}

.talk-cutaway-character img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 18px 18px rgba(15, 27, 47, 0.28));
}

.talk-cutaway-mouth {
  position: absolute;
  left: 50.5%;
  top: 23.2%;
  width: 13px;
  height: 4px;
  border: 2px solid #3d1915;
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: #8d3430;
  transform: translate(-50%, -50%);
  transform-origin: center;
  transition:
    width 90ms ease,
    height 90ms ease,
    border-radius 90ms ease,
    background 90ms ease;
}

.talk-cutaway-character[data-mouth-shape="closed"] .talk-cutaway-mouth {
  width: 13px;
  height: 2px;
  border-width: 0;
  border-radius: 999px;
  background: #3d1915;
}

.talk-cutaway-character[data-mouth-shape="small"] .talk-cutaway-mouth {
  width: 10px;
  height: 5px;
}

.talk-cutaway-character[data-mouth-shape="wide"] .talk-cutaway-mouth {
  width: 18px;
  height: 6px;
}

.talk-cutaway-character[data-mouth-shape="o"] .talk-cutaway-mouth {
  width: 10px;
  height: 10px;
  border: 2px solid #3d1915;
  border-radius: 50%;
  background: #7a2b2d;
}

.talk-cutaway-line {
  position: absolute;
  top: 13%;
  left: 50%;
  z-index: 3;
  max-width: min(360px, calc(100% - 42px));
  padding: 13px 18px;
  transform: translateX(-50%);
  border: 2px solid rgba(31, 20, 16, 0.3);
  border-radius: 20px;
  background: rgba(255, 245, 216, 0.94);
  color: var(--ink);
  font-size: clamp(22px, 4vw, 40px);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  box-shadow: 0 12px 24px rgba(13, 50, 66, 0.18);
}

.talk-cutaway-panel {
  display: grid;
  align-content: center;
  gap: 14px;
  min-height: min(68vh, 620px);
  padding: 28px;
  border: 2px solid rgba(255, 245, 216, 0.4);
  border-radius: 20px;
  background: rgba(13, 50, 66, 0.72);
  box-shadow: 0 24px 52px rgba(6, 18, 24, 0.3);
}

.talk-cutaway-panel h1 {
  color: var(--cream);
  font-size: clamp(38px, 5vw, 66px);
  line-height: 0.95;
}

.talk-cutaway-panel .stage-summary {
  color: rgba(255, 245, 216, 0.78);
}

@keyframes talk-cutaway-breathe {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-5px);
  }
}

@media (max-width: 760px) {
  .talk-cutaway-shell {
    width: min(100vw - 20px, 620px);
    padding-top: 18px;
  }

  .talk-cutaway-stage {
    grid-template-columns: 1fr;
  }

  .talk-cutaway-scene,
  .talk-cutaway-panel {
    min-height: 430px;
  }

  .talk-cutaway-panel {
    min-height: 0;
    padding: 18px;
  }
}

.sprite-preview-page {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #314f7a 0%, #2c6a67 46%, #183956 100%);
}

.sprite-preview-topbar {
  position: sticky;
}

.sprite-preview-shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.sprite-preview-stage-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: 22px;
  align-items: stretch;
}

.sprite-preview-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(68vh, 620px);
  overflow: hidden;
  border: 3px solid rgba(255, 245, 216, 0.68);
  border-radius: 24px;
  background:
    radial-gradient(circle at 20% 18%, rgba(245, 194, 91, 0.42), transparent 22%),
    linear-gradient(180deg, #8ed4df 0%, #bedc8c 58%, #3e8d5f 58%, #246a50 100%);
  box-shadow: 0 26px 58px rgba(6, 18, 24, 0.38);
}

.sprite-preview-frame {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: end center;
  width: min(52vw, 310px);
  aspect-ratio: 1 / 1;
}

.sprite-preview-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 50% 88%;
  filter: drop-shadow(0 18px 18px rgba(15, 27, 47, 0.26));
}

.sprite-preview-shadow {
  position: absolute;
  left: 50%;
  bottom: 78px;
  width: min(28vw, 190px);
  height: 30px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: rgba(13, 50, 66, 0.26);
}

.sprite-preview-stage.is-idle img {
  animation: sprite-preview-idle 1280ms ease-in-out infinite;
}

.sprite-preview-stage.is-walk img {
  animation: sprite-preview-walk 360ms ease-in-out infinite;
}

.sprite-preview-stage.is-talk img {
  animation: sprite-preview-talk 220ms ease-in-out infinite;
}

.sprite-preview-stage.is-wave img {
  animation: sprite-preview-wave 720ms ease-in-out infinite;
}

.sprite-preview-stage.is-run img {
  animation: sprite-preview-run 240ms ease-in-out infinite;
}

.motion-rig-page {
  background:
    linear-gradient(180deg, #26455f 0%, #366c62 48%, #142d45 100%);
}

.motion-rig-stage {
  background:
    linear-gradient(180deg, #9adce1 0%, #d8e7a5 57%, #5da86d 57%, #2f7b5d 100%);
}

.motion-rig-ground {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 118px;
  height: 4px;
  border-radius: 999px;
  background: rgba(31, 20, 16, 0.22);
}

.motion-rig-frame img {
  image-rendering: auto;
}

.sprite-preview-panel {
  display: grid;
  align-content: center;
  gap: 14px;
  min-height: min(68vh, 620px);
  padding: 28px;
  border: 2px solid rgba(255, 245, 216, 0.4);
  border-radius: 20px;
  background: rgba(13, 50, 66, 0.72);
  box-shadow: 0 24px 52px rgba(6, 18, 24, 0.3);
}

.sprite-preview-panel h1 {
  color: var(--cream);
  font-size: clamp(38px, 5vw, 66px);
  line-height: 0.95;
}

.sprite-preview-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sprite-preview-button {
  min-height: 52px;
  border: 2px solid rgba(255, 245, 216, 0.28);
  border-radius: 16px;
  background: rgba(255, 245, 216, 0.1);
  color: var(--cream);
  font-weight: 900;
}

.sprite-preview-button[data-active="true"] {
  background: var(--gold-bright);
  color: var(--ink);
}

@keyframes sprite-preview-idle {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@keyframes sprite-preview-walk {
  0%,
  100% {
    transform: translateX(-4px);
  }
  50% {
    transform: translateX(4px);
  }
}

@keyframes sprite-preview-talk {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.015);
  }
}

@keyframes sprite-preview-wave {
  0%,
  100% {
    transform: rotate(-2deg) translateY(0);
  }
  50% {
    transform: rotate(5deg) translateY(-4px);
  }
}

@keyframes sprite-preview-run {
  0%,
  100% {
    transform: translateX(-6px);
  }
  50% {
    transform: translateX(6px);
  }
}

@media (max-width: 760px) {
  .sprite-preview-shell {
    width: min(100vw - 20px, 620px);
    padding-top: 18px;
  }

  .sprite-preview-stage-band {
    grid-template-columns: 1fr;
  }

  .sprite-preview-stage,
  .sprite-preview-panel {
    min-height: 430px;
  }

  .sprite-preview-panel {
    min-height: 0;
    padding: 18px;
  }
}
