/* ============ Fraction Pizza Party — base ============
   Tablet-first: big touch targets, no hover-only states, chunky 3D buttons. */

:root {
  --cream: #fff6e5;
  --paper: #fffdf7;
  --tomato: #ff6b4a;
  --tomato-dark: #d94f31;
  --cheese: #ffc93c;
  --cheese-deep: #ffb02e;
  --basil: #4caf7d;
  --basil-dark: #35855c;
  --ink: #4a2f1b;
  --blue: #4aa3e0;
}

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

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Comic Sans MS', 'Chalkboard SE', 'Marker Felt', 'Segoe UI', system-ui, sans-serif;
  background-color: var(--cream);
  background-image: radial-gradient(circle, #ffedcc 16%, transparent 17%);
  background-size: 44px 44px;
  color: var(--ink);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.hidden { display: none !important; }

/* ============ Screens ============ */
.screen {
  display: none;
  position: absolute;
  inset: 0;
  flex-direction: column;
  align-items: center;
}
.screen.active { display: flex; }

.screen-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-top: 4px;
}
.screen-header h2 {
  margin: 6px 0 0;
  font-size: clamp(1.5rem, 5vw, 2.3rem);
  color: var(--tomato-dark);
}

/* ============ Buttons ============ */
.big-btn {
  font: inherit;
  font-size: clamp(1.25rem, 4.5vw, 1.7rem);
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  border: none;
  border-radius: 22px;
  padding: 14px 40px;
  min-height: 64px;
  min-width: 150px;
  cursor: pointer;
  box-shadow: 0 6px 0 rgba(74, 47, 27, 0.28);
  transition: transform 0.08s, box-shadow 0.08s;
}
.big-btn.primary {
  background: var(--tomato);
  color: #fff;
  box-shadow: 0 6px 0 var(--tomato-dark);
}
.big-btn:active {
  transform: translateY(5px);
  box-shadow: 0 1px 0 rgba(74, 47, 27, 0.28);
}

.corner-btn {
  position: absolute;
  top: 14px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: #fff;
  font-size: 1.5rem;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(74, 47, 27, 0.28);
  z-index: 20;
}
.corner-btn:active {
  transform: translateY(3px);
  box-shadow: none;
}
.sound-btn { right: 14px; }
.back-btn { left: 14px; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
