:root {
  --cheese: #f2c94c;
  --cheese-dark: #d9a832;
  --rind: #e0b13e;
  --board: #a9744f;
  --board-dark: #8a5a3b;
  --bg: #fdf6e3;
  --ink: #3d2f1e;
  --accent: #c0392b;
  font-size: clamp(15px, 1.6vw, 18px);
}

* { box-sizing: border-box; margin: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, 'Times New Roman', serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

header { padding: 2rem 1rem 0.5rem; position: relative; width: 100%; max-width: 900px; }

h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  letter-spacing: 0.04em;
}

.tagline { font-style: italic; opacity: 0.8; margin-top: 0.4rem; }

#lang-toggle {
  position: absolute;
  top: 1rem; right: 1rem;
  background: var(--ink); color: var(--bg);
  border: none; border-radius: 999px;
  padding: 0.4rem 1rem;
  font: inherit; cursor: pointer;
}

main { width: 100%; max-width: 900px; padding: 0 1rem; }

.stage { margin-top: 1rem; }

#scene { width: 100%; height: auto; touch-action: none; user-select: none; }

.controls { display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; align-items: center; margin-top: 0.5rem; }

#slice-btn, #reset-btn {
  background: var(--accent); color: white;
  border: none; border-radius: 8px;
  padding: 0.6rem 1.4rem;
  font: inherit; font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.1s;
}
#slice-btn:active, #reset-btn:active { transform: scale(0.95); }
#reset-btn { background: #2e7d32; }

#counter { font-weight: bold; }
#pun { min-height: 1.5em; font-style: italic; color: var(--accent); width: 100%; }

.hint { opacity: 0.6; font-size: 0.9rem; margin-top: 0.3rem; }

.facts { margin: 3rem auto; max-width: 600px; text-align: left; }
.facts h2 { text-align: center; margin-bottom: 1rem; }
.facts li { margin: 0.7rem 0; line-height: 1.5; }

footer { margin-top: auto; padding: 2rem; opacity: 0.6; }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
