/* ============ Pizza SVG ============ */
.pizza { display: block; }
.pizza-crust { fill: #e8a14c; }
.wedge .slice {
  fill: #ffe9a8;
  stroke: var(--cream);
  stroke-width: 3;
  stroke-linejoin: round;
}
.wedge.topped .slice { fill: #ffd34e; }
/* Eaten slices (L2): an empty slot where a slice used to be. */
.wedge.eaten .slice { fill: none; stroke: #c9a06a; stroke-width: 2; stroke-dasharray: 7 5; }
.cheese-whole { fill: #ffe9a8; }
.pep { fill: #d94f31; pointer-events: none; } /* decoration never blocks slice taps */

/* Slices pop in one by one (per-wedge delay set inline). */
.wedges.anim .wedge {
  animation: wedge-in 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) backwards;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes wedge-in {
  from { opacity: 0; transform: scale(0.55) rotate(-10deg); }
  to { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* Gentle shake for "try again" feedback (pizza, option cards, ...). */
.wobble { animation: wobble 0.45s ease; }
@keyframes wobble {
  20% { transform: rotate(-3deg); }
  40% { transform: rotate(3deg); }
  60% { transform: rotate(-2deg); }
  80% { transform: rotate(2deg); }
}

/* L3 "Make it!": wedges become tap targets. */
.pizza.tappable .wedge { cursor: pointer; transition: transform 0.1s ease; }
.pizza.tappable .wedge:active { transform: scale(0.94); }

/* ============ Mascot (Chef Slice) ============ */
.mascot { display: block; }
.m-hat { fill: #fff; stroke: #d8d8e8; stroke-width: 3; }
.m-face { fill: #ffd966; stroke: #e8a14c; stroke-width: 7; }
.m-eye-white { fill: #fff; }
.m-pupil { fill: #33241b; transition: transform 0.1s linear; }
.m-blush { fill: #ff9d8a; opacity: 0.8; }

/* Exactly one mouth per mood. */
.m-mouth { display: none; }
.m-smile { stroke: #7a3b2e; stroke-width: 5; fill: none; stroke-linecap: round; }
.m-cheer { fill: #7a3b2e; stroke: #7a3b2e; stroke-width: 3; stroke-linejoin: round; }
.m-ooh { fill: none; stroke: #7a3b2e; stroke-width: 4; }
.m-think { stroke: #7a3b2e; stroke-width: 5; fill: none; stroke-linecap: round; }
.mascot.state-happy .m-smile,
.mascot.state-cheer .m-cheer,
.mascot.state-ooh .m-ooh,
.mascot.state-think .m-think { display: block; }

.mascot.state-cheer { animation: mascot-bounce 0.5s ease-in-out infinite alternate; }
@keyframes mascot-bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-10px); }
}
.mascot.state-ooh { transform: rotate(-4deg); }

/* Idle blink on both eyes. */
.m-eye {
  animation: blink 4.2s infinite;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes blink {
  0%, 94% { transform: scaleY(1); }
  96% { transform: scaleY(0.08); }
  98%, 100% { transform: scaleY(1); }
}

/* Speech bubble */
#bubble {
  max-width: 250px;
  background: #fff;
  border-radius: 18px;
  padding: 10px 16px;
  font-size: clamp(0.95rem, 3vw, 1.15rem);
  font-weight: 700;
  text-align: center;
  box-shadow: 0 4px 0 rgba(74, 47, 27, 0.18);
  min-height: 1.4em;
}
#bubble:empty { display: none; }
