/* ==========================================================================
   DuniaMisi — Eazy Math Sticker Book Theme
   Flat, bright, thick white outlines, rounded corners, touch-first portrait
   ========================================================================== */

:root {
  --bg-sky: #DFF6FF;
  --bg-mint: #E8FCEF;
  --ink: #243044;
  --ink-soft: #4F607A;
  --white: #FFFFFF;

  --yellow: #FFD13B;
  --yellow-dark: #E09F00;
  --blue: #3B9EFF;
  --blue-dark: #1E75CC;
  --green: #32C478;
  --green-dark: #1D9456;
  --orange: #FF7A59;
  --orange-dark: #DC5433;
  --pink: #FF5D9E;
  --pink-dark: #D43678;
  --purple: #9B5DE5;
  --purple-dark: #7439BE;

  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-pill: 999px;
  --sticker-border: 4px solid #FFFFFF;
  --sticker-shadow: 0 7px 0 rgba(36, 48, 68, 0.14), 0 10px 22px rgba(36, 48, 68, 0.08);
  --font-display: 'Baloo 2', 'Fredoka', 'Trebuchet MS', system-ui, -apple-system, sans-serif;
  --font-body: 'Baloo 2', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(180deg, #B9EAFF 0%, #E7F9FF 48%, #FFF7DB 100%);
  touch-action: manipulation;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

/* Portrait phone-first shell */
.app-shell {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(10px, env(safe-area-inset-top)) 14px max(16px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Sticker Card Base */
.sticker-card {
  background: var(--white);
  border: var(--sticker-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--sticker-shadow);
}

/* ================= TOP BAR ================= */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 54px;
  z-index: 20;
}

.top-left, .top-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-center {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--white);
  border: 3px solid #FFFFFF;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 0 rgba(36, 48, 68, 0.12);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--blue-dark);
}

.brand-dot {
  color: var(--yellow-dark);
  font-size: 1.1rem;
}

.icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 3.5px solid #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--white);
  box-shadow: 0 5px 0 rgba(36, 48, 68, 0.18);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  padding: 0;
}

.icon-btn svg {
  width: 24px;
  height: 24px;
}

.icon-btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 rgba(36, 48, 68, 0.18);
}

.btn-back {
  background: var(--orange);
}

.btn-mute {
  background: var(--purple);
}

.btn-mute.is-muted {
  background: #94A3B8;
}

.btn-home {
  background: var(--blue);
}

/* Progress Strip */
.progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.85);
  border: 3px solid #FFFFFF;
  border-radius: 16px;
  padding: 5px 10px;
  box-shadow: 0 4px 0 rgba(36, 48, 68, 0.1);
}

.progress-dots {
  display: flex;
  gap: 4px;
}

.progress-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #DCE6F2;
  border: 1.5px solid #FFFFFF;
  transition: transform 0.25s ease, background 0.25s ease;
}

.progress-dot.done {
  background: var(--green);
  transform: scale(1.1);
}

.progress-dot.current {
  background: var(--yellow);
  transform: scale(1.25);
  box-shadow: 0 0 0 2px var(--yellow-dark);
}

.progress-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink-soft);
  line-height: 1;
}

/* ================= SCREENS ================= */
.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ================= MAP / HOME SCREEN ================= */
.hero-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #FFF7CC 0%, #FFE4B5 100%);
}

.hero-mascot {
  width: 74px;
  height: 74px;
  flex-shrink: 0;
  animation: gentleFloat 3s ease-in-out infinite;
}

.hero-mascot svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 0 rgba(36, 48, 68, 0.14));
}

.hero-text {
  flex: 1;
  min-width: 0;
}

.game-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.05;
  color: #1D4ED8;
  text-shadow: 2px 2px 0 #FFFFFF;
}

.game-tagline {
  margin: 2px 0 8px;
  font-size: 0.98rem;
  font-weight: 700;
  color: #5B4223;
}

.sticker-counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 800;
  color: #B45309;
  box-shadow: 0 3px 0 rgba(180, 83, 9, 0.16);
}

.sticker-counter .star-icon {
  color: #F59E0B;
  font-size: 1.05rem;
}

.level-path {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 12px;
}

.level-card {
  position: relative;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 4px solid #FFFFFF;
  border-radius: var(--radius-lg);
  box-shadow: 0 7px 0 rgba(36, 48, 68, 0.16);
  cursor: pointer;
  font-family: var(--font-body);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.level-card:active {
  transform: translateY(4px);
  box-shadow: 0 3px 0 rgba(36, 48, 68, 0.16);
}

.level-card.is-locked {
  filter: saturate(0.65);
}

.level-icon-wrap {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 3px solid #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 0 rgba(36, 48, 68, 0.1);
}

.level-icon-wrap svg {
  width: 48px;
  height: 48px;
}

.level-meta {
  flex: 1;
  min-width: 0;
}

.level-tag-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.level-num-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink);
}

.level-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 800;
}

.level-status-pill.free {
  background: #FEF08A;
  color: #854D0E;
}

.level-status-pill.done {
  background: #DCFCE7;
  color: #166534;
}

.level-status-pill.locked {
  background: rgba(30, 41, 59, 0.78);
  color: #FFFFFF;
}

.level-name {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.15;
  color: #FFFFFF;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.16);
}

.level-sub {
  margin: 2px 0 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
}

.level-right-badge {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  font-size: 1.4rem;
  font-weight: 800;
}

.level-right-badge svg {
  width: 38px;
  height: 38px;
}

/* ================= GAMEPLAY SCREEN ================= */
.level-chip-row {
  display: flex;
  justify-content: center;
}

.level-chip {
  display: inline-block;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  background: var(--white);
  border: 3px solid #FFFFFF;
  box-shadow: 0 3px 0 rgba(36, 48, 68, 0.1);
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--ink-soft);
}

.prompt-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #FFFDF2;
}

.speak-btn {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  border: 3.5px solid #FFFFFF;
  background: var(--blue);
  color: #FFFFFF;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--blue-dark);
  transition: transform 0.12s ease;
}

.speak-btn svg {
  width: 28px;
  height: 28px;
}

.speak-btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--blue-dark);
}

.speak-btn.is-speaking {
  background: var(--green);
  box-shadow: 0 5px 0 var(--green-dark);
  animation: pulseSpeak 0.9s ease-in-out infinite;
}

.prompt-text {
  margin: 0;
  flex: 1;
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
}

/* Visual Stage */
.visual-stage {
  min-height: 215px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F7FCFF 100%);
  position: relative;
  overflow: hidden;
}

.equation-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 18px;
  border-radius: var(--radius-pill);
  background: #FEF3C7;
  border: 3px solid #FDE68A;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  color: #92400E;
  letter-spacing: 0.02em;
}

/* Countable Object Grids */
.objects-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(46px, 58px));
  gap: 8px;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.objects-grid.few {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.obj-item {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 16px;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease, background 0.25s ease;
}

.obj-item svg {
  width: 50px;
  height: 50px;
  filter: drop-shadow(0 3px 0 rgba(36, 48, 68, 0.14));
}

.obj-item.pop-in {
  animation: popIn 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.obj-item.hint-active {
  transform: scale(1.24) translateY(-4px);
  background: #FEF08A;
  box-shadow: 0 0 0 4px #F59E0B;
  z-index: 4;
}

.obj-item.hint-counted {
  background: #DCFCE7;
  box-shadow: 0 0 0 2.5px #22C55E;
}

/* Subtraction gone states */
.obj-item.is-gone {
  opacity: 0.3;
  filter: grayscale(0.7);
  transform: scale(0.84);
}

.obj-item.is-gone.gone-fly {
  transform: translateY(-20px) scale(0.75) rotate(-12deg);
  opacity: 0.22;
}

.obj-item.is-gone::after {
  content: '✕';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  font-weight: 800;
  color: #EF4444;
  text-shadow: 0 0 4px #FFFFFF, 0 0 4px #FFFFFF;
}

.obj-item.is-gone.gone-bite::after {
  content: '✕';
  color: #EF4444;
}

.obj-item.is-gone.gone-fly::after {
  content: '↗';
  color: #6366F1;
}

.obj-item.flash-gone {
  animation: shakeGentle 0.45s ease;
}

/* Sliding Groups for Addition (within 5) */
.combine-arena {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  transition: gap 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.combine-arena.is-combined {
  gap: 4px;
}

.combine-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 20px;
  border: 3px dashed #93C5FD;
  background: #EFF6FF;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.4s ease, background 0.4s ease;
}

.combine-group.group-b {
  border-color: #F9A8D4;
  background: #FDF2F8;
}

.combine-arena.is-combined .combine-group {
  border-color: #86EFAC;
  background: #F0FDF4;
}

.combine-plus {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--orange);
  transition: opacity 0.35s ease, width 0.4s ease, transform 0.4s ease;
}

.combine-arena.is-combined .combine-plus {
  opacity: 0;
  width: 0;
  overflow: hidden;
  transform: scale(0.2);
}

/* Kotak 10 (Ten-Frame) */
.ten-frames-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  align-items: center;
}

.ten-frame-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--blue-dark);
  background: #E0F2FE;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
}

.ten-frame {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  padding: 7px;
  background: #E2F1FF;
  border: 3.5px solid #60A5FA;
  border-radius: 18px;
  width: 100%;
  max-width: 318px;
}

.tf-cell {
  aspect-ratio: 1 / 1;
  background: #FFFFFF;
  border: 2px solid #BFDBFE;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
}

.tf-cell.group-a-cell {
  background: #EFF6FF;
  border-color: #93C5FD;
}

.tf-cell.group-b-cell {
  background: #FDF2F8;
  border-color: #F9A8D4;
}

.tf-cell .obj-item {
  width: 44px;
  height: 44px;
}

.tf-cell .obj-item svg {
  width: 40px;
  height: 40px;
}

.tf-cell .obj-item.slide-from-left {
  animation: slideFromLeft 0.55s cubic-bezier(0.34, 1.4, 0.64, 1) backwards;
}

.tf-cell .obj-item.slide-from-right {
  animation: slideFromRight 0.55s cubic-bezier(0.34, 1.4, 0.64, 1) backwards;
}

/* Tahap 1 Recognise Word Stage */
.word-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.word-hero {
  display: flex;
  align-items: center;
  gap: 12px;
}

.word-mascot {
  width: 68px;
  height: 68px;
}

.word-bubble {
  padding: 10px 24px;
  background: #FEF08A;
  border: 4px solid #F59E0B;
  border-radius: 22px;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: #92400E;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(245, 158, 11, 0.35);
}

.word-hint-stars {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 4px 8px;
}

.word-hint-stars .obj-item {
  width: 40px;
  height: 40px;
}

.word-hint-stars .obj-item svg {
  width: 36px;
  height: 36px;
}

/* Tahap 2 Stepping Stones Number Line */
.stones-stage {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 2px;
}

.frog-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  max-width: 350px;
  min-height: 50px;
  align-items: end;
}

.frog-slot {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 50px;
}

.frog-mascot {
  width: 48px;
  height: 48px;
  transition: transform 0.25s ease;
}

.frog-mascot.hop {
  animation: frogHop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stones-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
  max-width: 350px;
}

.stone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 4px;
  min-height: 88px;
  border-radius: 20px;
  background: #DCFCE7;
  border: 3.5px solid #32C478;
  box-shadow: 0 5px 0 #1D9456;
  transition: transform 0.25s ease, background 0.25s ease;
}

.stone-num {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  color: #14532D;
}

.stone.is-missing {
  background: #FEF08A;
  border-color: #F59E0B;
  border-style: dashed;
  box-shadow: 0 5px 0 #D97706;
  animation: pulseSoft 1.5s ease-in-out infinite;
}

.stone.is-missing .stone-num {
  color: #B45309;
}

.stone.hint-active {
  transform: scale(1.12) translateY(-5px);
  background: #FDE047;
  border-color: #EAB308;
}

.stone-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5px;
  max-width: 56px;
}

.stone-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16A34A;
}

/* Tahap 5 Compare Trays */
.compare-arena {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.compare-tray {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 8px;
  border-radius: 20px;
  border: 3.5px solid #60A5FA;
  background: #EFF6FF;
  cursor: pointer;
  min-height: 175px;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.compare-tray.tray-right {
  border-color: #FB923C;
  background: #FFF7ED;
}

.compare-tray:active {
  transform: scale(0.97);
}

.compare-tray.hint-active {
  box-shadow: 0 0 0 4px #F59E0B;
  transform: scale(1.03);
}

.compare-objs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px;
  align-content: center;
  flex: 1;
}

.compare-objs .obj-item {
  width: 34px;
  height: 34px;
}

.compare-objs .obj-item svg {
  width: 32px;
  height: 32px;
}

.compare-num-badge {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  padding: 2px 16px;
  border-radius: var(--radius-pill);
  background: #FFFFFF;
  color: var(--ink);
  box-shadow: 0 3px 0 rgba(36, 48, 68, 0.12);
}

/* ================= FEEDBACK & HINT ================= */
.feedback-banner {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  border-radius: var(--radius-pill);
  padding: 4px 14px;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.feedback-banner.show {
  opacity: 1;
  transform: scale(1);
}

.feedback-banner.good {
  background: #DCFCE7;
  color: #15803D;
  border: 2.5px solid #4ADE80;
}

.feedback-banner.retry {
  background: #FEF3C7;
  color: #B45309;
  border: 2.5px solid #FBBF24;
}

.hint-row {
  display: flex;
  justify-content: center;
}

.hint-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  min-height: 48px;
  border-radius: var(--radius-pill);
  border: 3.5px solid #FFFFFF;
  background: var(--yellow);
  color: #6B3F00;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--yellow-dark);
  transition: transform 0.12s ease;
}

.hint-btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--yellow-dark);
}

.hint-btn.is-running {
  background: #FDE047;
  opacity: 0.9;
}

/* ================= ANSWER OPTIONS ================= */
.options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: auto;
  padding-bottom: 4px;
}

.option-btn {
  min-height: 76px;
  padding: 10px 12px;
  border-radius: 22px;
  border: 4px solid #FFFFFF;
  background: var(--blue);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 2.15rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 7px 0 var(--blue-dark);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s ease;
}

.option-btn:nth-child(2) {
  background: var(--orange);
  box-shadow: 0 7px 0 var(--orange-dark);
}

.option-btn:nth-child(3) {
  background: var(--purple);
  box-shadow: 0 7px 0 var(--purple-dark);
}

.option-btn:nth-child(4) {
  background: var(--pink);
  box-shadow: 0 7px 0 var(--pink-dark);
}

.option-btn:active {
  transform: translateY(4px);
  box-shadow: 0 3px 0 rgba(36, 48, 68, 0.25);
}

.option-btn.is-correct {
  background: var(--green) !important;
  box-shadow: 0 7px 0 var(--green-dark) !important;
  animation: popCelebrate 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.option-btn.is-wrong {
  animation: shakeGentle 0.42s ease;
  opacity: 0.85;
}

.mini-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3.5px;
  max-width: 90px;
}

.mini-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

/* ================= CELEBRATION SCREEN ================= */
.screen-celebrate {
  position: relative;
  justify-content: center;
  align-items: center;
}

.celebrate-card {
  width: 100%;
  padding: 24px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, #FFFDF2 0%, #FFF3C4 100%);
  position: relative;
  z-index: 2;
}

.celebrate-stars {
  font-size: 2.4rem;
  color: #F59E0B;
  letter-spacing: 8px;
  text-shadow: 0 3px 0 #FFFFFF;
}

.celebrate-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: #15803D;
}

.celebrate-subtitle {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.celebrate-sticker {
  width: 120px;
  height: 120px;
  margin: 6px 0;
  animation: popCelebrate 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.celebrate-sticker svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 6px 0 rgba(36, 48, 68, 0.16));
}

.celebrate-sticker-name {
  margin: 0 0 8px;
  padding: 4px 16px;
  border-radius: var(--radius-pill);
  background: #FFFFFF;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 800;
  color: #B45309;
}

.celebrate-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 280px;
}

.primary-btn, .secondary-btn, .ghost-btn {
  width: 100%;
  min-height: 56px;
  padding: 12px 20px;
  border-radius: 20px;
  border: 4px solid #FFFFFF;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease;
}

.primary-btn {
  background: var(--green);
  color: #FFFFFF;
  box-shadow: 0 6px 0 var(--green-dark);
}

.secondary-btn {
  background: var(--blue);
  color: #FFFFFF;
  box-shadow: 0 6px 0 var(--blue-dark);
}

.ghost-btn {
  background: #FFFFFF;
  color: var(--ink);
  box-shadow: 0 5px 0 rgba(36, 48, 68, 0.14);
}

.primary-btn:active, .secondary-btn:active, .ghost-btn:active {
  transform: translateY(3px);
}

/* ================= LOCKED MODAL ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(25, 39, 64, 0.52);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
  backdrop-filter: blur(3px);
}

.modal-card {
  width: 100%;
  max-width: 340px;
  padding: 24px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: popIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.locked-icon {
  width: 84px;
  height: 84px;
}

.locked-icon svg {
  width: 100%;
  height: 100%;
}

.locked-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ink);
}

.locked-msg {
  margin: 0 0 6px;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink-soft);
}

/* ================= CONFETTI ================= */
.confetti-layer, .mini-confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 60;
}

.confetti-piece {
  position: absolute;
  top: -16px;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  animation: confettiFall linear forwards;
}

/* ================= ANIMATIONS ================= */
@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes popIn {
  0% { opacity: 0; transform: scale(0.5); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes popCelebrate {
  0% { transform: scale(0.8); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes shakeGentle {
  0%, 100% { transform: translateX(0); }
  22% { transform: translateX(-8px); }
  45% { transform: translateX(8px); }
  68% { transform: translateX(-5px); }
  88% { transform: translateX(4px); }
}

@keyframes pulseSpeak {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}

@keyframes pulseSoft {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

@keyframes frogHop {
  0% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-18px) scale(1.12); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes slideFromLeft {
  0% { opacity: 0; transform: translateX(-34px) scale(0.75); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes slideFromRight {
  0% { opacity: 0; transform: translateX(34px) scale(0.75); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(540deg); opacity: 0.1; }
}

/* Compact phones (height <= 700px) */
@media (max-height: 700px) {
  .app-shell {
    gap: 8px;
  }
  .visual-stage {
    min-height: 175px;
    padding: 10px 8px;
  }
  .option-btn {
    min-height: 66px;
    font-size: 1.9rem;
  }
  .obj-item {
    width: 46px;
    height: 46px;
  }
  .obj-item svg {
    width: 42px;
    height: 42px;
  }
}
