:root {
  color-scheme: light;
  --bg-top: #fffaf3;
  --bg-mid: #ffe6d5;
  --bg-bottom: #d8f2ef;
  --ink: #2d2540;
  --muted: rgba(45, 37, 64, 0.72);
  --panel: rgba(255, 255, 255, 0.72);
  --panel-strong: rgba(255, 255, 255, 0.9);
  --line: rgba(83, 62, 120, 0.12);
  --accent: #ff8468;
  --accent-soft: #ffe2d7;
  --success: #3db88f;
  --shadow: 0 24px 60px rgba(88, 65, 128, 0.15);
  --rounded-xl: 36px;
  --rounded-lg: 26px;
  --rounded-md: 18px;
  --nav-height: 96px;
  --safe-bottom: max(20px, env(safe-area-inset-bottom));
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100svh;
  font-family: 'Avenir Next Rounded', 'Avenir Next', 'Trebuchet MS', 'Segoe UI', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 212, 168, 0.7), transparent 22%),
    radial-gradient(circle at 82% 12%, rgba(255, 244, 196, 0.8), transparent 20%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 46%, var(--bg-bottom) 100%);
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.sky-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.sky-cloud,
.sky-ribbon,
.sky-sparkle {
  position: absolute;
}

.sky-cloud {
  width: 210px;
  height: 90px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  filter: blur(3px);
  animation: drift 16s linear infinite;
}

.sky-cloud::before,
.sky-cloud::after {
  content: '';
  position: absolute;
  background: inherit;
  border-radius: inherit;
}

.sky-cloud::before {
  width: 88px;
  height: 88px;
  left: 26px;
  top: -32px;
}

.sky-cloud::after {
  width: 110px;
  height: 110px;
  right: 24px;
  top: -36px;
}

.sky-cloud-a {
  top: 5%;
  left: -8%;
}

.sky-cloud-b {
  top: 18%;
  right: -10%;
  animation-duration: 20s;
  animation-direction: reverse;
}

.sky-ribbon {
  inset: auto auto 16% -8%;
  width: 116%;
  height: 220px;
  background: radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.55), transparent 52%);
  transform: rotate(-5deg);
}

.sky-sparkle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
  animation: sparkle 3.8s ease-in-out infinite;
}

.sky-sparkle-a {
  top: 10%;
  left: 52%;
}

.sky-sparkle-b {
  top: 22%;
  left: 80%;
  animation-delay: 1.2s;
}

.app-shell {
  position: relative;
  z-index: 1;
  height: 100svh;
  padding: 18px 18px calc(var(--nav-height) + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.topbar,
.activity-panel,
.parent-panel {
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-radius: var(--rounded-xl);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand-mark {
  width: 62px;
  height: 62px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-family: 'Marker Felt', 'Avenir Next Rounded', cursive;
  font-size: 2rem;
  color: white;
  background: linear-gradient(135deg, #ff8468, #ffb347);
  box-shadow: 0 18px 30px rgba(255, 132, 104, 0.28);
}

.brand-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(45, 37, 64, 0.52);
}

.brand-copy h2,
.panel-header h3 {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  line-height: 1.06;
}

.theme-subtitle,
.panel-copy {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.compact {
  margin-top: 10px;
  font-size: 0.95rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-pill {
  min-width: 132px;
  padding: 9px 13px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.55);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.status-label {
  font-size: 0.76rem;
  color: rgba(45, 37, 64, 0.52);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ghost-button,
.mini-button,
.icon-button,
.theme-button,
.choice-card,
.count-bubble,
.music-pad,
.start-button,
.hide-spot {
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease;
}

.ghost-button:hover,
.ghost-button:focus-visible,
.mini-button:hover,
.mini-button:focus-visible,
.icon-button:hover,
.icon-button:focus-visible,
.theme-button:hover,
.theme-button:focus-visible,
.choice-card:hover,
.choice-card:focus-visible,
.count-bubble:hover,
.count-bubble:focus-visible,
.music-pad:hover,
.music-pad:focus-visible,
.start-button:hover,
.start-button:focus-visible,
.hide-spot:hover,
.hide-spot:focus-visible {
  transform: translateY(-2px);
}

.ghost-button,
.mini-button,
.upload-button {
  border-radius: 16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  border: 1px solid rgba(88, 65, 128, 0.14);
}

.ghost-button {
  min-height: 46px;
}

.mini-button.strong,
.start-button {
  background: linear-gradient(135deg, #ff8468, #ffb347);
  color: white;
  box-shadow: 0 18px 30px rgba(255, 132, 104, 0.24);
}

.workspace {
  flex: 1;
  min-height: 0;
  display: flex;
}

.activity-panel {
  height: 100%;
  padding: 18px;
  border-radius: var(--rounded-xl);
  background: var(--panel-strong);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.theme-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: fit-content;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: rgba(84, 42, 52, 0.84);
  font-weight: 700;
}

.prompt-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prompt-text {
  margin: 0;
  font-family: 'Marker Felt', 'Avenir Next Rounded', cursive;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1.05;
}

.helper-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.scene-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 34px;
  overflow: hidden;
  padding: clamp(16px, 2.2vw, 22px);
  display: grid;
  align-items: stretch;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.6), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.42));
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.scene-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: 16px;
  min-height: 100%;
}

.scene-main,
.scene-side {
  min-height: 0;
}

.scene-main {
  display: grid;
  align-content: stretch;
  gap: 16px;
}

.scene-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.scene-card {
  border-radius: 28px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.65);
}

.guide-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.guide-emoji {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  background: rgba(255, 255, 255, 0.75);
}

.guide-card h3,
.stage-title {
  margin: 0;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
}

.guide-card p,
.stage-copy,
.choice-label,
.choice-note,
.slot-state,
.count-caption,
.music-caption {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.35;
}

.activity-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

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

.activity-grid--colors {
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  max-width: min(100%, 720px);
  height: 100%;
  align-content: stretch;
  margin-inline: auto;
}

.choice-card,
.music-pad {
  width: 100%;
  border-radius: 28px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(88, 65, 128, 0.12);
  box-shadow: 0 16px 32px rgba(88, 65, 128, 0.08);
  text-align: left;
}

.choice-emoji,
.music-icon,
.peek-character,
.count-total {
  display: block;
  font-size: clamp(2.3rem, 5vw, 3.4rem);
  line-height: 1;
}

.choice-title,
.music-title,
.slot-title,
.count-total {
  margin-top: 12px;
  font-size: 1.2rem;
  font-weight: 800;
}

.choice-card.is-correct {
  background: rgba(205, 255, 239, 0.95);
  border-color: rgba(61, 184, 143, 0.4);
}

.choice-card.is-wrong {
  background: rgba(255, 240, 240, 0.94);
  border-color: rgba(255, 125, 109, 0.35);
}

.choice-card.is-target {
  outline: 3px solid rgba(255, 180, 71, 0.45);
}

.peek-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: 16px;
  min-height: 100%;
}

.peek-stage {
  position: relative;
  min-height: clamp(240px, 42vh, 340px);
  border-radius: 32px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(174, 225, 255, 0.84) 0%, rgba(255, 239, 214, 0.88) 52%, rgba(177, 236, 198, 0.9) 100%);
  display: grid;
  place-items: center;
}

.peek-hill {
  position: absolute;
  inset: auto -10% -10% -10%;
  height: 44%;
  border-radius: 100% 100% 0 0;
  background: linear-gradient(180deg, #8dd3a5, #58b06f);
}

.peek-shadow {
  position: absolute;
  left: 50%;
  top: 51%;
  transform: translate(-50%, -48%);
  font-size: clamp(3rem, 8vw, 4.8rem);
  opacity: 0.28;
  filter: blur(10px);
  z-index: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

.peek-shadow.is-hidden {
  opacity: 0;
  transform: translate(-50%, -58%);
}

.hide-spot {
  position: relative;
  z-index: 1;
  width: min(68%, 340px);
  min-height: 164px;
  border-radius: 32px;
  padding: 18px 20px;
  display: grid;
  gap: 10px;
  place-items: center;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 24px 50px rgba(88, 65, 128, 0.12);
}

.hide-spot.is-open {
  transform: translateY(-42px) scale(0.92);
  opacity: 0.18;
}

.hide-spot-emoji {
  font-size: clamp(3.6rem, 8vw, 5.2rem);
}

.hide-spot-label {
  font-size: 1.05rem;
  color: var(--muted);
}

.peek-character-card {
  position: absolute;
  bottom: 14%;
  left: 50%;
  transform: translate(-50%, 18%) scale(0.9);
  opacity: 0;
  padding: 18px 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 24px 40px rgba(88, 65, 128, 0.12);
}

.peek-character-card.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
  transition: transform 220ms ease, opacity 220ms ease;
}

.peek-character {
  text-align: center;
}

.peek-name {
  margin-top: 10px;
  font-size: 1.2rem;
  font-weight: 800;
}

.peek-cheer {
  margin-top: 8px;
  color: var(--muted);
}

.color-card {
  position: relative;
  overflow: hidden;
  padding: 14px;
}

.activity-grid--colors .color-card {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.color-swatch {
  width: 100%;
  height: 92px;
  border-radius: 22px;
  border: 4px solid rgba(255, 255, 255, 0.66);
}

.activity-grid--colors .color-swatch {
  flex: 1 1 auto;
  min-height: 64px;
}

.balloon-string {
  width: 2px;
  height: 34px;
  background: rgba(74, 53, 98, 0.26);
  margin: 0 auto;
}

.count-stage {
  display: grid;
  gap: 20px;
  align-content: center;
}

.count-board {
  border-radius: 32px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 247, 223, 0.96), rgba(255, 233, 212, 0.9));
  box-shadow: 0 18px 38px rgba(88, 65, 128, 0.08);
}

.count-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 18px;
}

.count-bubble {
  width: clamp(74px, 10vw, 92px);
  height: clamp(74px, 10vw, 92px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(88, 65, 128, 0.12);
  display: grid;
  place-items: center;
  box-shadow: 0 14px 28px rgba(88, 65, 128, 0.08);
}

.count-bubble.is-hit {
  background: rgba(205, 255, 239, 0.96);
  border-color: rgba(61, 184, 143, 0.4);
  transform: translateY(-4px) scale(1.04);
}

.count-caption {
  text-align: center;
}

.music-layout {
  display: grid;
  gap: 20px;
  align-content: center;
}

.music-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.music-pad.is-active {
  background: rgba(255, 245, 214, 0.96);
  border-color: rgba(255, 180, 71, 0.4);
}

.music-pad.is-playing {
  box-shadow: 0 22px 42px rgba(240, 166, 64, 0.2);
}

.music-stage {
  border-radius: 30px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(215, 247, 244, 0.9), rgba(255, 246, 226, 0.96));
  min-height: 170px;
  display: grid;
  align-content: center;
  gap: 14px;
}

.music-mascot {
  display: flex;
  align-items: center;
  gap: 14px;
}

.music-mascot-bird {
  width: 88px;
  height: 88px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.8);
  font-size: 2.8rem;
  animation: bob 2.6s ease-in-out infinite;
}

.music-notes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: rgba(61, 122, 124, 0.82);
}

.music-note {
  font-size: 1.5rem;
  animation: float-up 2s ease-in-out infinite;
}

.music-note:nth-child(2) {
  animation-delay: 0.3s;
}

.music-note:nth-child(3) {
  animation-delay: 0.6s;
}

.theme-nav {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: var(--safe-bottom);
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
}

.theme-button {
  min-height: 72px;
  border-radius: 22px;
  background: transparent;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 8px;
}

.theme-button.is-active {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 30px rgba(88, 65, 128, 0.08);
}

.theme-icon {
  font-size: 1.45rem;
}

.theme-label {
  font-size: 0.88rem;
  font-weight: 700;
}

.start-overlay,
.parent-backdrop {
  position: fixed;
  inset: 0;
}

.start-overlay {
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 22px;
  background: linear-gradient(180deg, rgba(255, 250, 243, 0.94), rgba(255, 230, 213, 0.94), rgba(216, 242, 239, 0.94));
}

.start-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.start-card {
  max-width: 720px;
  width: 100%;
  padding: clamp(24px, 5vw, 38px);
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 30px 70px rgba(88, 65, 128, 0.18);
  text-align: center;
}

.start-card h1 {
  margin: 0;
  font-family: 'Marker Felt', 'Avenir Next Rounded', cursive;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 0.98;
}

.start-copy {
  margin: 18px auto 24px;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.start-button {
  min-width: 220px;
  min-height: 62px;
  border-radius: 999px;
  font-size: 1.1rem;
  font-weight: 800;
}

.parent-backdrop {
  z-index: 34;
  background: rgba(35, 26, 54, 0.32);
  opacity: 0;
  transition: opacity 180ms ease;
}

.parent-backdrop.is-visible {
  opacity: 1;
}

.parent-panel {
  position: fixed;
  top: 18px;
  right: 18px;
  bottom: calc(var(--safe-bottom) + var(--nav-height) + 14px);
  width: min(440px, calc(100vw - 36px));
  z-index: 35;
  padding: 22px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 34px 80px rgba(35, 26, 54, 0.22);
  overflow: auto;
  transform: translateX(calc(100% + 24px));
  transition: transform 220ms ease;
}

.parent-panel.is-open {
  transform: translateX(0);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(88, 65, 128, 0.14);
}

.panel-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(88, 65, 128, 0.1);
}

.panel-section h4 {
  margin: 0 0 14px;
}

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

.chip-button,
.slot-button {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(88, 65, 128, 0.14);
  color: var(--ink);
}

.chip-button.is-active,
.slot-button.is-active {
  background: var(--accent-soft);
  border-color: rgba(255, 132, 104, 0.35);
}

.slot-button.has-recording::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 10px;
  border-radius: 50%;
  background: var(--success);
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.field select,
.field input[type='range'],
.field input[type='text'],
.field textarea {
  width: 100%;
}

.field input[type='text'],
.field textarea,
.field select {
  border: 1px solid rgba(88, 65, 128, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  padding: 12px 14px;
}

.field textarea {
  resize: vertical;
  min-height: 92px;
}

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

.field-wide {
  grid-column: 1 / -1;
}

.slider-grid {
  display: grid;
  gap: 12px;
}

.record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.upload-button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.upload-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

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

.favorite-manage-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.favorite-manage-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(88, 65, 128, 0.14);
  color: var(--ink);
  text-align: left;
}

.favorite-manage-card.is-active {
  background: var(--accent-soft);
  border-color: rgba(255, 132, 104, 0.35);
}

.favorite-empty {
  grid-column: 1 / -1;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  border: 1px dashed rgba(88, 65, 128, 0.18);
}

.favorite-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 16px 34px rgba(88, 65, 128, 0.14);
}

.favorite-thumb.is-small {
  width: 52px;
  min-width: 52px;
  border-radius: 16px;
  box-shadow: none;
}

.favorite-thumb.is-large {
  max-width: 220px;
  margin: 0 auto 14px;
}

.favorite-thumb-fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(255, 132, 104, 0.18), rgba(255, 190, 126, 0.28));
  color: #ff8468;
  font-size: 2.4rem;
}

.favorites-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.favorite-card {
  align-items: stretch;
}

.favorite-card.is-active {
  border-color: rgba(255, 132, 104, 0.3);
  box-shadow: 0 22px 42px rgba(88, 65, 128, 0.14);
}

.favorite-spotlight {
  text-align: center;
}

.favorite-empty-card {
  min-height: 360px;
  display: grid;
  place-items: center;
  text-align: center;
}

.favorite-empty-emoji {
  font-size: 3.4rem;
  margin-bottom: 12px;
}

.audit-list {
  padding-left: 18px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-bottom) + var(--nav-height) + 22px);
  transform: translateX(-50%) translateY(12px);
  z-index: 25;
  max-width: min(92vw, 480px);
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(45, 37, 64, 0.9);
  color: white;
  box-shadow: 0 20px 46px rgba(35, 26, 54, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 24;
  pointer-events: none;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  font-size: 1.4rem;
  animation: confetti-fall 1000ms ease-out forwards;
}

.scene-stage.theme-peekaboo {
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 255, 255, 0.74), transparent 24%),
    linear-gradient(180deg, rgba(255, 242, 230, 0.92), rgba(255, 250, 244, 0.72));
}

.scene-stage.theme-animals {
  background:
    radial-gradient(circle at 85% 12%, rgba(255, 255, 255, 0.7), transparent 20%),
    linear-gradient(180deg, rgba(255, 244, 226, 0.94), rgba(231, 248, 236, 0.84));
}

.scene-stage.theme-colors {
  background:
    radial-gradient(circle at 14% 16%, rgba(255, 255, 255, 0.68), transparent 18%),
    linear-gradient(180deg, rgba(255, 245, 235, 0.96), rgba(255, 232, 242, 0.84));
}

.scene-stage.theme-numbers {
  background:
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.72), transparent 18%),
    linear-gradient(180deg, rgba(255, 245, 219, 0.96), rgba(228, 247, 255, 0.84));
}

.scene-stage.theme-music {
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 255, 255, 0.74), transparent 22%),
    linear-gradient(180deg, rgba(227, 247, 243, 0.96), rgba(255, 244, 226, 0.84));
}

.scene-stage.theme-favorites {
  background:
    radial-gradient(circle at 84% 16%, rgba(255, 255, 255, 0.72), transparent 20%),
    linear-gradient(180deg, rgba(255, 244, 236, 0.96), rgba(255, 237, 227, 0.84));
}

.app-shell[data-theme='peekaboo'] {
  --accent: #ff8468;
  --accent-soft: #ffe2d7;
}

.app-shell[data-theme='animals'] {
  --accent: #69b26d;
  --accent-soft: #dff3d6;
}

.app-shell[data-theme='colors'] {
  --accent: #ef7198;
  --accent-soft: #ffdce7;
}

.app-shell[data-theme='numbers'] {
  --accent: #5ba6f5;
  --accent-soft: #dceeff;
}

.app-shell[data-theme='music'] {
  --accent: #f0a640;
  --accent-soft: #ffe9c7;
}

.app-shell[data-theme='favorites'] {
  --accent: #ff8468;
  --accent-soft: #ffe4dc;
}

@keyframes drift {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(110vw);
  }
}

@keyframes sparkle {
  0%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.3);
    opacity: 1;
  }
}

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

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

@keyframes float-up {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.8;
  }

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

@keyframes confetti-fall {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.6) rotate(0deg);
  }

  18% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(120px) scale(1) rotate(180deg);
  }
}

@media (max-width: 1180px), (max-height: 920px) {
  :root {
    --nav-height: 88px;
  }

  .status-pill--voice,
  .status-pill--narrator {
    display: none;
  }

  .scene-layout,
  .peek-layout {
    grid-template-columns: 1fr;
  }

  .scene-side {
    display: none;
  }

  .prompt-text {
    font-size: clamp(1.45rem, 3.8vw, 2rem);
  }

  .helper-text {
    font-size: 0.94rem;
  }

  .scene-stage {
    padding: 14px;
    border-radius: 28px;
  }

  .activity-panel {
    padding: 16px;
  }

  .peek-stage {
    min-height: clamp(220px, 36vh, 300px);
  }

  .hide-spot {
    width: min(62%, 290px);
    min-height: 144px;
    padding: 14px 16px;
  }

  .hide-spot-emoji {
    font-size: clamp(3rem, 7vw, 4rem);
  }

  .music-stage {
    min-height: 144px;
  }

  .activity-grid--colors {
    gap: 12px;
  }

  .activity-grid--colors .color-card {
    padding: 12px;
  }

  .activity-grid--colors .color-swatch {
    height: 72px;
    min-height: 72px;
    flex: 0 0 72px;
  }

  .activity-grid--colors .balloon-string {
    height: 20px;
  }

  .activity-grid--colors .choice-title {
    margin-top: 6px;
    font-size: 1rem;
  }

  .activity-grid--colors .choice-note {
    display: none;
  }

  .theme-nav {
    left: 12px;
    right: 12px;
  }
}

@media (max-width: 1080px) {
  .scene-layout,
  .peek-layout {
    grid-template-columns: 1fr;
  }

  .theme-nav {
    grid-template-columns: repeat(6, minmax(72px, 1fr));
    overflow-x: auto;
  }
}

@media (max-width: 700px) {
  body {
    overflow: auto;
  }

  .app-shell {
    height: auto;
    padding: 14px 14px calc(var(--nav-height) + var(--safe-bottom));
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions {
    justify-content: stretch;
  }

  .status-pill,
  .ghost-button {
    flex: 1 1 180px;
  }

  .activity-panel {
    padding: 18px;
  }

  .activity-grid,
  .music-grid,
  .slot-grid,
  .favorite-manage-list,
  .favorites-grid {
    grid-template-columns: 1fr;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .theme-nav {
    left: 10px;
    right: 10px;
    gap: 8px;
    padding: 10px;
  }

  .theme-button {
    min-height: 76px;
  }

  .parent-panel {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: calc(var(--safe-bottom) + 10px);
    width: auto;
    max-height: calc(100svh - 20px - var(--safe-bottom));
  }

  .toast {
    bottom: calc(var(--safe-bottom) + var(--nav-height) + 14px);
  }
}
