/* Pico-Teekesselchen — Aquarell-Look der Schatzfinder Akademie */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  --creme: #fdf6e3;
  --creme-tief: #f6ead0;
  --wald: #2e5339;
  --wald-hell: #4a7a58;
  --gold: #d9a441;
  --gold-hell: #ffe9b0;
  --rot: #c0392b;
  --tinte: #3b2f23;
  --schatten: 0 6px 18px rgba(59, 47, 35, 0.18);
}

html, body { height: 100%; }
body {
  font-family: 'Nunito', system-ui, sans-serif;
  color: var(--tinte);
  background:
    radial-gradient(1200px 600px at 20% -10%, #fff8e6 0%, transparent 60%),
    radial-gradient(900px 500px at 90% 110%, #f0e2c4 0%, transparent 55%),
    var(--creme);
  min-height: 100dvh;
  overscroll-behavior: none;
}

#app { max-width: 760px; margin: 0 auto; padding: 12px 14px calc(20px + env(safe-area-inset-bottom)); min-height: 100dvh; display: flex; flex-direction: column; }

/* ---------- Kopf ---------- */
.kopf { display: flex; align-items: center; gap: 12px; padding: 6px 0 12px; }
.kopf__titel { font-family: 'Alegreya', serif; font-size: clamp(20px, 5vw, 30px); font-weight: 800; color: var(--wald); flex: 1; text-align: center; }
.kopf__zurueck, .kopf__mute {
  width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--wald);
  background: #fff; color: var(--wald); font-size: 20px; display: grid; place-items: center;
  text-decoration: none; cursor: pointer; box-shadow: var(--schatten); flex-shrink: 0;
}
.kopf__zurueck:active, .kopf__mute:active { transform: scale(0.92); }

/* ---------- Screens ---------- */
#screen { flex: 1; display: flex; flex-direction: column; }
.mitte { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 18px; padding: 10px 0 30px; }
.mitte > * { max-width: 100%; }
.mitte h2 { font-family: 'Alegreya', serif; font-size: clamp(26px, 6vw, 38px); color: var(--wald); }
.mitte p { font-size: 16px; max-width: 46ch; line-height: 1.5; }
.start__bild { width: min(46vw, 220px); border-radius: 24px; box-shadow: var(--schatten); border: 4px solid #fff; transform: rotate(-2deg); }

.stufen { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; width: 100%; }
.btn {
  font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 17px;
  border: none; border-radius: 999px; padding: 14px 26px; cursor: pointer;
  background: var(--wald); color: var(--gold-hell); box-shadow: var(--schatten);
  transition: transform 0.12s ease;
}
.btn:active { transform: scale(0.94); }
.btn--gold { background: linear-gradient(145deg, #e7b653, var(--gold)); color: #4a3a12; }
.btn--zart { background: #fff; color: var(--wald); border: 2px solid var(--wald); }
.stufe-best { font-size: 13px; color: #7a6a52; margin-top: 4px; }

/* ---------- Spielleiste ---------- */
.leiste { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; padding-bottom: 14px; }
.leiste__chip {
  background: #fff; border: 2px solid var(--creme-tief); border-radius: 999px;
  padding: 6px 14px; font-weight: 800; font-size: 14px; color: var(--wald);
  box-shadow: 0 3px 8px rgba(59,47,35,0.08);
}
.leiste__chip b { color: var(--gold); }

/* ---------- Rätsel ---------- */
.raetsel { display: flex; flex-direction: column; align-items: center; gap: 18px; flex: 1; }
.hinweise { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; }
.hinweis {
  background: #fff; border: 2px solid var(--gold); border-radius: 20px;
  padding: 18px 16px; text-align: center; box-shadow: var(--schatten);
  display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.hinweis__emoji { font-size: 34px; }
.hinweis__text { font-weight: 800; font-size: 15px; line-height: 1.4; color: var(--tinte); }
.hinweis__nr {
  font-size: 11px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase;
  color: #a08048;
}

/* Wort-Slots */
.slots { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.slot {
  width: 44px; height: 52px; border-radius: 12px;
  background: #fff;
  border: 2px dashed #c9b888;
  display: grid; place-items: center;
  font-family: 'Alegreya', serif; font-size: 26px; font-weight: 800; color: var(--wald);
}
.slot--voll { border-style: solid; border-color: var(--wald); background: var(--gold-hell); }
.slots.wackeln { animation: wackeln 0.4s ease; }
@keyframes wackeln {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

/* Buchstaben */
.buchstaben { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: 480px; }
.buchstabe {
  width: 48px; height: 54px; border-radius: 14px; border: none; cursor: pointer;
  background: var(--wald); color: var(--gold-hell);
  font-family: 'Alegreya', serif; font-size: 26px; font-weight: 800;
  box-shadow: 0 4px 10px rgba(59,47,35,0.2);
  transition: transform 0.1s ease, opacity 0.2s ease;
}
.buchstabe:active { transform: scale(0.9); }
.buchstabe--weg { opacity: 0; pointer-events: none; transform: scale(0.5); }

.aktionen { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.aktionen .btn { padding: 10px 20px; font-size: 14px; }

/* ---------- Sprechblase / Sieg / Konfetti ---------- */
.blase {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: #fff; border: 2px solid var(--gold); border-radius: 16px;
  padding: 10px 18px; font-weight: 800; color: var(--wald); font-size: 15px;
  box-shadow: var(--schatten); max-width: 90vw; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 50;
}
.blase.zeigen { opacity: 1; transform: translateX(-50%) translateY(-6px); }

.sterne { font-size: clamp(38px, 10vw, 60px); letter-spacing: 6px; }
.sieg__werte { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.rekord { color: var(--rot); font-weight: 900; }

.konfetti {
  position: fixed; width: 10px; height: 14px; top: -20px; z-index: 60;
  pointer-events: none; border-radius: 3px;
  animation: fallen linear forwards;
}
@keyframes fallen {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0.6; }
}

@media (max-width: 480px) {
  #app { padding: 8px 8px calc(14px + env(safe-area-inset-bottom)); }
  .hinweise { grid-template-columns: 1fr; }
  .slot { width: 38px; height: 46px; font-size: 22px; }
  .buchstabe { width: 42px; height: 48px; font-size: 22px; }
}
