/* ==========================================================================
   Sweet Scoops Ice Cream Parlor - Gentle, Calming Design System
   Designed specifically for young kids & toddlers:
   - Soft, eye-friendly pastel macaron color palette (zero harsh glare, zero strobes)
   - Rounded, tactile buttons for small fingers and iPad touch screens
   - Smooth, gentle spring physics for wobbly scoops
   ========================================================================== */

:root {
  /* Eye-friendly calming palette */
  --bg-parlor: #FAF5ED;
  --bg-card: #FFFFFF;
  --bg-tray: #F4ECE1;
  --border-soft: #EADFCF;
  --border-focus: #CBB89D;

  --text-primary: #382E28;
  --text-secondary: #74665C;
  --text-muted: #9E9187;

  /* Pastels for flavors */
  --flavor-strawberry: #FFB3BA;
  --flavor-vanilla: #FFF0BD;
  --flavor-chocolate: #B38867;
  --flavor-mint: #BAE1C3;
  --flavor-blueberry: #BFCEFF;
  --flavor-mango: #FFDFBA;
  --flavor-pistachio: #C7E9B0;
  --flavor-ube: #D6BCFA;

  /* Toppings & Drizzles */
  --drizzle-choco: #5D3A1A;
  --drizzle-berry: #D94676;
  --drizzle-caramel: #C67D3B;
  --cone-waffle: #DC9D62;
  --cone-dark: #B97B42;

  --accent-gold: #F6AD55;
  --accent-green: #68D391;
  --accent-rose: #F687B3;

  --shadow-subtle: 0 4px 16px rgba(130, 105, 85, 0.08);
  --shadow-lifted: 0 8px 24px rgba(130, 105, 85, 0.14);
  --shadow-button: 0 6px 16px rgba(130, 105, 85, 0.12);

  --font-main: "Nunito", -apple-system, BlinkMacSystemFont, "Outfit", sans-serif;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-parlor);
  font-family: var(--font-main);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Ambient Calming Backdrop (Floating Clouds & Treats)
   ========================================================================== */
.pastel-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  filter: blur(8px);
  animation: floatCloud 24s ease-in-out infinite alternate;
}

.cloud-1 {
  width: 320px;
  height: 140px;
  top: 8%;
  left: -40px;
}

.cloud-2 {
  width: 380px;
  height: 160px;
  bottom: 12%;
  right: -50px;
  animation-duration: 32s;
  animation-delay: -8s;
}

.floating-scoop {
  position: absolute;
  font-size: 2.2rem;
  opacity: 0.28;
  animation: gentleDrift 16s ease-in-out infinite alternate;
}

.s-1 { top: 18%; right: 12%; animation-delay: 0s; }
.s-2 { bottom: 25%; left: 8%; animation-delay: -5s; }
.s-3 { top: 65%; right: 28%; animation-delay: -10s; }

@keyframes floatCloud {
  0% { transform: translate(0, 0); }
  100% { transform: translate(40px, 15px); }
}

@keyframes gentleDrift {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-20px) rotate(8deg); }
}

/* ==========================================================================
   Main App Container
   ========================================================================== */
.parlor-app {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 12px 18px env(safe-area-inset-bottom, 12px) 18px;
  overflow: hidden;
}

/* ==========================================================================
   Top Navigation Bar (Gentle Frosted Island)
   ========================================================================== */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 8px 16px;
  box-shadow: var(--shadow-subtle);
  flex-shrink: 0;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hub-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  background: var(--bg-tray);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  transition: all 0.2s ease;
}

.hub-back-btn:hover, .hub-back-btn:active {
  background: #E8DCCB;
  transform: translateX(-2px);
}

.chevron {
  font-size: 1.3rem;
  line-height: 1;
}

.shop-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-icon {
  font-size: 1.4rem;
}

.badge-title {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* Mode Switcher */
.mode-switcher {
  display: flex;
  background: var(--bg-tray);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 3px;
  gap: 4px;
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 6px 16px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-btn.active {
  background: #FFFFFF;
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(130, 105, 85, 0.12);
}

.mode-btn:hover:not(.active) {
  color: var(--text-primary);
}

/* Right Controls */
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-control-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-tray);
  border: 1px solid var(--border-soft);
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-control-btn:hover {
  background: #E8DCCB;
}

.icon-control-btn.active {
  background: #FFF;
  border-color: #D3C3AD;
}

/* ==========================================================================
   Main Workspace Layout - Balanced & Symmetrically Centered!
   ========================================================================== */
.parlor-workspace {
  flex: 1;
  display: grid;
  grid-template-columns: 320px 1fr 320px;
  gap: 16px;
  margin-top: 12px;
  min-height: 0;
  width: 100%;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   LEFT: Customer & Cheering Station
   ========================================================================== */
.customer-station {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.customer-card {
  flex: 1;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border-soft);
  border-radius: 28px;
  padding: 16px;
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  gap: 12px;
}

/* Cute SVG Animated Customer */
.animal-avatar-wrap {
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.animal-svg {
  width: 100%;
  height: 100%;
  animation: gentleBreathe 4s ease-in-out infinite;
}

@keyframes gentleBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03) translateY(-3px); }
}

/* Animal eating animation */
.animal-avatar-wrap.eating .animal-svg {
  animation: happyMunch 0.45s ease-in-out infinite alternate;
}

@keyframes happyMunch {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-7px) scale(1.06) rotate(2.5deg); }
}

/* Yummy mouth overlay when eating */
.eating-mouth-overlay {
  position: absolute;
  bottom: 12px;
  font-size: 2.2rem;
  opacity: 0;
  transform: scale(0.4);
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
  z-index: 5;
}

.animal-avatar-wrap.eating .eating-mouth-overlay {
  opacity: 1;
  transform: scale(1.15);
  animation: mouthNom 0.4s ease-in-out infinite alternate;
}

@keyframes mouthNom {
  0% { transform: scale(1) translateY(0); }
  100% { transform: scale(1.22) translateY(-4px) rotate(6deg); }
}

.customer-info-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.customer-name {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.repeat-speech-btn {
  background: var(--bg-tray);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
}

.repeat-speech-btn:hover {
  background: #E8DCCB;
  color: var(--text-primary);
}

/* Recipe Order Bubble */
.order-bubble {
  width: 100%;
  background: #FAF7F2;
  border: 2px dashed #E2D6C6;
  border-radius: 20px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bubble-header {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.order-checklist {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.recipe-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  border: 1px solid #ECE3D7;
  border-radius: 12px;
  padding: 6px 12px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: all 0.25s ease;
}

.recipe-item.checked {
  background: #F0FFF4;
  border-color: #9AE6B4;
  color: #276749;
}

.recipe-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.recipe-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.recipe-emoji-badge {
  font-size: 1.25rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.recipe-name-text {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-primary);
}

.recipe-status {
  font-size: 1.15rem;
}

/* Freeplay Cheering Box */
.freeplay-stats-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #FFFFFF;
  border: 1px solid #ECE3D7;
  border-radius: 14px;
  padding: 10px 14px;
  width: 100%;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.cheer-me-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: linear-gradient(135deg, #FEF08A, #FDE047);
  border: 1.5px solid #EAB308;
  border-radius: 999px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  color: #854D0E;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(234, 179, 8, 0.25);
  transition: all 0.2s ease;
  margin-top: 6px;
}

.cheer-me-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #FEF9C3, #FACC15);
  box-shadow: 0 5px 12px rgba(234, 179, 8, 0.35);
}

.cheer-me-btn:active {
  transform: translateY(1px);
}

.freeplay-hint {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.35;
  margin-top: 6px;
}

/* Star Progression Pill */
.star-counter-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #FFF9E6;
  border: 1px solid #F6E05E;
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.95rem;
  color: #975A16;
}

/* ==========================================================================
   CENTER: Assembly & Counter Stage
   ========================================================================== */
.assembly-station {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--border-soft);
  border-radius: 28px;
  padding: 16px;
  box-shadow: var(--shadow-subtle);
  position: relative;
  min-height: 0;
}

/* Gentle Banner */
.gentle-banner {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 6px 20px;
  box-shadow: 0 2px 10px rgba(130, 105, 85, 0.08);
  margin-bottom: 8px;
}

.banner-text {
  font-weight: 700;
  font-size: 0.96rem;
  color: var(--text-secondary);
}

/* Counter & Table Area */
.counter-stage {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
  overflow: visible;
  padding-bottom: 24px;
}

/* Eating Stage (Animal Eater Character, Spoon, Bites & Speech Bubbles) */
.eating-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 25;
  display: none;
  overflow: visible;
}

.eating-stage.active {
  display: block;
}

/* ==========================================================================
   Animated Animal Eater Character (Actually leans in and chomps the scoops!)
   ========================================================================== */
.eater-character {
  position: absolute;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%) translateY(40px) scale(0.65);
  opacity: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  z-index: 26;
  transition: all 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.eater-character.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

.eater-paws {
  position: absolute;
  bottom: -32px;
  width: 250px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 27;
}

.eater-paw {
  width: 52px;
  height: 42px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.16));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.eater-paw.left-paw {
  transform: rotate(18deg);
}

.eater-paw.right-paw {
  transform: rotate(-18deg);
}

.eater-character.paws-pat .left-paw {
  animation: pawPatLeft 0.35s ease-in-out infinite alternate;
}

.eater-character.paws-pat .right-paw {
  animation: pawPatRight 0.35s ease-in-out infinite alternate 0.15s;
}

@keyframes pawPatLeft {
  0% { transform: translateY(0) rotate(18deg); }
  100% { transform: translateY(-8px) rotate(8deg); }
}

@keyframes pawPatRight {
  0% { transform: translateY(0) rotate(-18deg); }
  100% { transform: translateY(-8px) rotate(-8deg); }
}

/* Head Wrap & Dynamic Eating Movements */
.eater-head-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  transform-origin: bottom center;
  transition: transform 0.26s cubic-bezier(0.34, 1.4, 0.64, 1);
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.2));
}

/* 1. Preparing to chomp: Leans back slightly with open mouth */
.eater-head-wrap.preparing {
  transform: translateY(-24px) scale(1.08) rotate(4deg) !important;
}

/* 2. CHOMPING: Lunges down with mouth wide open over the scoop! */
.eater-head-wrap.chomping {
  transform: translateY(var(--chomp-y, 65px)) scale(1.22) rotate(-5deg) !important;
  animation: headBiteSquish 0.26s ease-out;
}

@keyframes headBiteSquish {
  0% { transform: translateY(-20px) scale(1.05); }
  60% { transform: translateY(var(--chomp-y, 75px)) scale(1.28, 1.05); }
  100% { transform: translateY(var(--chomp-y, 65px)) scale(1.22); }
}

/* 3. CHEWING: Pulls up with puffed cheeks, bliss eyes, chewing mouth */
.eater-head-wrap.chewing {
  transform: translateY(-12px) scale(1.05) !important;
  animation: headChewNom 0.38s ease-in-out infinite alternate;
}

@keyframes headChewNom {
  0% { transform: translateY(-10px) rotate(-3deg) scale(1.04, 1.02); }
  100% { transform: translateY(-16px) rotate(3deg) scale(1.02, 1.06); }
}

/* 4. TONGUE LICK: Licking lips/snout */
.eater-head-wrap.licking {
  transform: translateY(-6px) scale(1.06) rotate(1deg) !important;
}

/* 5. HAPPY TUMMY: Bouncing with joy, eyes bliss */
.eater-head-wrap.happy-tummy {
  animation: headTummyJoy 0.6s ease-in-out infinite alternate;
}

@keyframes headTummyJoy {
  0% { transform: translateY(0) scale(1) rotate(-4deg); }
  100% { transform: translateY(-18px) scale(1.1) rotate(4deg); }
}

/* The Animated Kid's Eating Spoon */
.eating-spoon {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translate(25px, -30px) rotate(18deg);
  width: 70px;
  height: 120px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.22));
  transition: transform 0.3s cubic-bezier(0.34, 1.35, 0.64, 1), opacity 0.2s ease;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
}

.eating-spoon.visible {
  opacity: 1;
}

/* Spoon Actions */
.eating-spoon.dipping {
  transform: translate(-10px, 45px) rotate(-24deg) scale(1.1) !important;
}

.eating-spoon.lifting {
  transform: translate(-75px, -35px) rotate(28deg) scale(1.18) !important;
}

.eating-spoon.scraping {
  transform: translate(-15px, 60px) rotate(-12deg) scale(1.05) !important;
  animation: scrapeBowl 0.55s ease-in-out infinite alternate;
}

@keyframes scrapeBowl {
  0% { transform: translate(-35px, 62px) rotate(-18deg); }
  100% { transform: translate(15px, 58px) rotate(14deg); }
}

.spoon-dollop, #spoonSeed {
  transition: opacity 0.2s ease, fill 0.2s ease;
}

/* Munch Comic Speech Bubble */
.munch-bubble {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%) scale(0.6);
  background: #FFFFFF;
  border: 2px solid #F59E0B;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.95rem;
  font-weight: 800;
  color: #92400E;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
  opacity: 0;
  pointer-events: none;
  z-index: 35;
  white-space: nowrap;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.munch-bubble.pop {
  opacity: 1;
  transform: translateX(-50%) scale(1.08);
}

/* Clean Bowl Sparkle */
.clean-bowl-sparkle {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%) scale(0.6);
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border: 1.5px solid #F59E0B;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.92rem;
  font-weight: 800;
  color: #92400E;
  opacity: 0;
  pointer-events: none;
  z-index: 15;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}

.clean-bowl-sparkle.show {
  opacity: 1;
  transform: translateX(-50%) scale(1);
  animation: sparkleFloat 1.2s ease-in-out infinite alternate;
}

@keyframes sparkleFloat {
  0% { transform: translateX(-50%) translateY(0) scale(1); }
  100% { transform: translateX(-50%) translateY(-5px) scale(1.05); }
}

/* Burst Munch Particles */
.munch-particles-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 28;
}

.munch-particle {
  position: absolute;
  pointer-events: none;
  animation: burstFly 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  font-size: 1.35rem;
}

@keyframes burstFly {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(0.6);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(1.25) rotate(var(--rot));
  }
}

.wooden-plate {
  position: relative;
  width: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.wooden-plate::after {
  content: "";
  position: absolute;
  bottom: -14px;
  width: 240px;
  height: 20px;
  background: #E4D5C1;
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(130, 105, 85, 0.16);
  z-index: 1;
}

/* The Yogurt & Smoothie Stack Tower */
.yogurt-tower, .ice-cream-tower {
  position: relative;
  display: flex;
  flex-direction: column; /* Scoops on top, base at the bottom! */
  align-items: center;
  justify-content: flex-end;
  transform-origin: bottom center;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
  margin-bottom: 4px;
}

/* Tower wobble effect when adding scoops */
.yogurt-tower.wobble-left, .ice-cream-tower.wobble-left {
  animation: wobbleLeft 0.5s ease-out;
}
.yogurt-tower.wobble-right, .ice-cream-tower.wobble-right {
  animation: wobbleRight 0.5s ease-out;
}

@keyframes wobbleLeft {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  60% { transform: rotate(2.5deg); }
  85% { transform: rotate(-1deg); }
  100% { transform: rotate(0deg); }
}

@keyframes wobbleRight {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(5deg); }
  60% { transform: rotate(-2.5deg); }
  85% { transform: rotate(1deg); }
  100% { transform: rotate(0deg); }
}

/* Scoops Stack Container (Sits on top and dips into the cone/bowl mouth) */
.scoops-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 6;
  margin-bottom: -44px; /* Tucks the first scoop right into the cone/bowl opening! */
}

/* Scoops Container */
.scoops-container {
  display: flex;
  flex-direction: column-reverse; /* First scoop at bottom, newer scoops stack upwards! */
  align-items: center;
  position: relative;
}

/* Individual Yogurt Scoop */
.ice-cream-scoop, .yogurt-scoop {
  position: relative;
  width: 130px;
  height: 82px;
  margin-bottom: -28px; /* Snug vertical stacking upwards */
  animation: scoopPlop 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
  filter: drop-shadow(0 4px 8px rgba(100, 75, 60, 0.12));
}

@keyframes scoopPlop {
  0% {
    opacity: 0;
    transform: translateY(-40px) scale(0.7);
  }
  60% {
    opacity: 1;
    transform: translateY(4px) scale(1.08, 0.92);
  }
  80% {
    transform: translateY(-2px) scale(0.97, 1.03);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

/* Scoop Being Eaten Animation */
.yogurt-scoop.being-eaten {
  animation: scoopMunchBite 0.42s ease-out forwards;
}

@keyframes scoopMunchBite {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 4px 8px rgba(100, 75, 60, 0.12));
  }
  30% {
    transform: scale(1.08, 0.82) rotate(-3deg);
  }
  70% {
    transform: scale(0.68, 0.55) rotate(6deg);
    opacity: 0.7;
  }
  100% {
    transform: scale(0.18) translateY(-22px);
    opacity: 0;
  }
}

/* Drizzle & Swirl Layer (Positioned right on topmost scoop) */
.drizzle-layer {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 136px;
  height: 70px;
  z-index: 8;
  pointer-events: none;
}

/* Toppings Layer */
.toppings-layer {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 80px;
  z-index: 9;
  pointer-events: none;
}

/* Base Holder (Cone or Bowl) */
.base-holder {
  width: 140px;
  height: 115px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  z-index: 5;
}

.base-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 6px 12px rgba(130, 105, 85, 0.15));
}

.placed-topping {
  position: absolute;
  animation: toppingLand 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

@keyframes toppingLand {
  0% { transform: scale(0.2) translateY(-20px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* Stage Bottom Controls */
.stage-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

.stage-action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  border: none;
  font-family: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-button);
}

.stage-action-btn:hover {
  transform: translateY(-2px);
}
.stage-action-btn:active {
  transform: translateY(1px);
}

.secondary-action {
  background: var(--bg-tray);
  color: var(--text-secondary);
  border: 1px solid var(--border-soft);
}

.serve-action {
  background: linear-gradient(135deg, #F6AD55, #ED8936);
  color: #FFFFFF;
  font-size: 1.15rem;
  padding: 14px 30px;
  box-shadow: 0 8px 22px rgba(237, 137, 54, 0.35);
}

.serve-action.ready-pulse {
  animation: gentlePulse 1.8s infinite ease-in-out;
}

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

.taste-action {
  background: linear-gradient(135deg, #FFB3BA, #F687B3);
  color: #FFFFFF;
}

.taste-subhint {
  font-size: 0.75rem;
  font-weight: 700;
  opacity: 0.92;
  margin-left: 2px;
}

/* Microphone Listening Button Active Pulse */
#btnMicListen.active {
  background: #FEF3C7 !important;
  border-color: #F59E0B !important;
  color: #92400E !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35) !important;
  animation: micPulse 1.4s infinite ease-in-out;
}

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

.hidden {
  display: none !important;
}

.tower-stats {
  margin-top: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   RIGHT: Ingredients Station (All-in-One Single View - Zero Tabs!)
   ========================================================================== */
.ingredients-station {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border-soft);
  border-radius: 28px;
  padding: 14px;
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  min-height: 0;
}

.ingredients-station::-webkit-scrollbar {
  width: 6px;
}
.ingredients-station::-webkit-scrollbar-thumb {
  background: #E2D7C7;
  border-radius: 999px;
}

.deck-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.deck-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.deck-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #F6AD55;
  color: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 800;
}

.deck-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* 1. Bases Grid (Cup & Cone) */
.bases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.bases-grid .ing-card {
  padding: 8px 12px;
  flex-direction: row;
  gap: 10px;
}

.bases-grid .ing-card.selected-base {
  border-color: #ED8936;
  background: #FFFDF9;
  box-shadow: 0 0 0 2px rgba(237, 137, 54, 0.4);
}

/* 2. Flavors Grid (6 Flavors) */
.flavors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.flavors-grid .ing-card {
  padding: 8px 4px;
  gap: 4px;
}

.flavors-grid .ing-preview {
  width: 52px;
  height: 40px;
}

.flavors-grid .ing-title {
  font-size: 0.82rem;
}

/* Distinct Color Themes for Every Flavor Card */
.flavors-grid .ing-card[data-id="strawberry"] {
  background: #FFF0F3;
  border-color: #FFA5B4;
}
.flavors-grid .ing-card[data-id="banana"] {
  background: #FEF9C3;
  border-color: #FACC15;
}
.flavors-grid .ing-card[data-id="blueberry"] {
  background: #EEF2FF;
  border-color: #A5B4FC;
}
.flavors-grid .ing-card[data-id="mango"] {
  background: #FFF7ED;
  border-color: #FB923C;
}
.flavors-grid .ing-card[data-id="kiwi"] {
  background: #F0FDF4;
  border-color: #86EFAC;
}
.flavors-grid .ing-card[data-id="vanilla"] {
  background: #FFFFFF;
  border-color: #CBD5E1;
}

/* 3. Toppings Grid (Sprinkles, Strawberries, Blueberries, Honey) */
.toppings-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.toppings-grid .ing-card {
  padding: 8px 4px;
  gap: 4px;
}

.toppings-grid .ing-preview {
  width: 38px;
  height: 38px;
}

.toppings-grid .ing-title {
  font-size: 0.76rem;
}

/* Shared Item Card */
.ing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #FAF7F2;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 10px 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
  user-select: none;
}

.ing-card:hover {
  transform: translateY(-2px);
  background: #FFFFFF;
  box-shadow: var(--shadow-button);
  border-color: #D6C8B5;
}

.ing-card:active {
  transform: scale(0.96);
}

/* Key Activated Pulse on Keyboard Press */
.ing-card.key-activated {
  transform: scale(1.1) translateY(-4px) !important;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.65), 0 8px 18px rgba(0, 0, 0, 0.12) !important;
  border-color: #F59E0B !important;
}

/* Keyboard Hint Badges on Cards */
.key-hint {
  position: absolute;
  top: 4px;
  right: 5px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 6px;
  padding: 1px 5px;
  font-size: 0.68rem;
  font-weight: 800;
  color: #475569;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  pointer-events: none;
  line-height: 1.2;
}

/* Deck Helper Pill for Toddler / Keyboard Play */
.deck-helper-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #FEF3C7, #FDE68A);
  border: 1.5px solid #F59E0B;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #92400E;
  margin-bottom: 4px;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.15);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.deck-helper-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.25);
}

.helper-key-chip {
  background: #FFFFFF;
  border: 1px solid #D97706;
  border-radius: 6px;
  padding: 1px 6px;
  font-weight: 800;
  font-size: 0.78rem;
  color: #92400E;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.ing-preview {
  width: 56px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ing-title {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* ==========================================================================
   Calm Celebration Overlay (Zero Strobe, Pure Gentle Warmth)
   ========================================================================== */
.calm-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  overflow: hidden;
}

.floating-heart {
  position: absolute;
  font-size: 2.2rem;
  animation: heartDriftUp 2.4s ease-out forwards;
}

@keyframes heartDriftUp {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.4) rotate(0deg);
  }
  20% {
    opacity: 1;
    transform: translateY(0) scale(1.1) rotate(6deg);
  }
  80% {
    opacity: 0.9;
    transform: translateY(-80px) scale(1) rotate(-6deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-140px) scale(0.8) rotate(10deg);
  }
}

/* ==========================================================================
   Responsive Adaptations (iPad / Mobile / Laptop)
   ========================================================================== */
@media (max-width: 980px) {
  .parlor-workspace {
    grid-template-columns: 260px 1fr 260px;
    gap: 10px;
  }
  .animal-avatar-wrap {
    width: 110px;
    height: 110px;
  }
}

@media (max-width: 768px) {
  .parlor-app {
    padding: 8px;
  }
  .top-nav {
    padding: 6px 12px;
  }
  .badge-title {
    display: none;
  }
  .parlor-workspace {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }
  .customer-station {
    max-height: 220px;
  }
  .assembly-station {
    min-height: 380px;
  }
  .ingredients-station {
    min-height: 240px;
  }
}
