/* Wörterspiel – große Schrift, klare Flächen, keine Zeitnot.
   ES2018/Safari 12: kein flex-gap, kein :has(), kein dvh. */

@font-face { font-family: "Atkinson"; src: url(fonts/atkinson-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson"; src: url(fonts/atkinson-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
/* Atkinson zeichnet die Null durchgestrichen (wie „Ø“) – Ziffern daher aus einer Systemschrift */
@font-face { font-family: "Ziffern"; src: local("Verdana"), local("Arial"), local("ArialMT"), local("Roboto"), local("Roboto-Regular"); font-weight: 400; unicode-range: U+0030-0039; }
@font-face { font-family: "Ziffern"; src: local("Verdana Bold"), local("Verdana-Bold"), local("Arial Bold"), local("Arial-BoldMT"), local("Roboto Bold"), local("Roboto-Bold"); font-weight: 700; unicode-range: U+0030-0039; }

:root {
  --papier: #FBF6EC;
  --karte: #FFFFFF;
  --tinte: #1E2740;
  --tinte-leise: #545C73;
  --linie: #E4DCCB;
  --rot: #C4161C;
  --gold: #F2B705;
  --gold-dunkel: #8A6400;
  --gruen: #1F7A3A;
  --gruen-hell: #E3F3E7;
  --rot-hell: #FBE6E6;
  --schatten: 0 2px 0 #E4DCCB, 0 6px 18px rgba(30, 39, 64, .08);
}

html { font-size: 22px; -webkit-text-size-adjust: 100%; }
html.groesse-2 { font-size: 25px; }
html.groesse-3 { font-size: 29px; }
@media (max-width: 420px) {
  html { font-size: 20px; }
  html.groesse-2 { font-size: 23px; }
  html.groesse-3 { font-size: 26px; }
}

* { box-sizing: border-box; }
body {
  margin: 0; min-height: 100vh;
  background: var(--papier); color: var(--tinte);
  font-family: "Ziffern", "Atkinson", "Verdana", "Segoe UI", sans-serif;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
img { max-width: 100%; }

/* Fahne als dünnes Band oben – wie ein Lesezeichen im Heft */
.flagge { display: flex; height: 8px; }
.flagge span { flex: 1; }
.flagge span:nth-child(1) { background: #111; }
.flagge span:nth-child(2) { background: #DD0000; }
.flagge span:nth-child(3) { background: #FFCE00; }

/* Kopfzeile */
.kopf {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 820px; margin: 0 auto; padding: .5rem 16px;
}
.kopf-titel {
  background: none; border: 0; padding: .3rem 0; cursor: pointer;
  font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em;
}
.kopf-rechts { display: flex; align-items: center; }
.kopf-punkte {
  font-weight: 700; font-size: 1rem; margin-right: 12px;
  background: #FFF4CC; color: var(--gold-dunkel);
  border-radius: 999px; padding: .2rem .7rem; white-space: nowrap;
}
.kopf-punkte:empty { display: none; }
.rund-knopf {
  width: 56px; height: 56px; border-radius: 50%;
  border: 2px solid var(--linie); background: var(--karte); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.inhalt { max-width: 820px; margin: 0 auto; padding: 0 16px 48px; outline: none; }

/* ---------- Startseite ---------- */
.gruss { font-size: 1.9rem; font-weight: 700; margin: .6rem 0 .1rem; line-height: 1.15; }
.gruss-unter { color: var(--tinte-leise); margin: 0 0 1rem; font-size: 1.05rem; }

.stand {
  background: var(--karte); border-radius: 22px; box-shadow: var(--schatten);
  padding: 1rem 1.1rem; margin-bottom: 1rem;
}
.stand-zeile { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stufe-name { font-size: 1.25rem; font-weight: 700; }
.stufe-nr { color: var(--tinte-leise); font-size: .9rem; }
.punkte-gross { font-size: 1.25rem; font-weight: 700; color: var(--gold-dunkel); }
.balken { height: 22px; background: #EFE8D8; border-radius: 999px; overflow: hidden; margin: .6rem 0 .3rem; }
.balken > div { height: 100%; background: linear-gradient(90deg, #F2B705, #F59E0B); border-radius: 999px; transition: width .8s ease; }
.balken-text { color: var(--tinte-leise); font-size: .85rem; }

.kacheln { display: grid; grid-template-columns: 1fr 1fr; grid-gap: 12px; margin-bottom: 1.1rem; }
.kachel {
  background: var(--karte); border-radius: 20px; box-shadow: var(--schatten);
  padding: .8rem 1rem; border: 0; text-align: left; cursor: default;
}
button.kachel { cursor: pointer; }
.kachel-zahl { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.kachel-text { color: var(--tinte-leise); font-size: .9rem; }
.kachel-pfeil { color: var(--rot); font-weight: 700; font-size: .9rem; }

.gross-knopf {
  display: block; width: 100%; min-height: 84px;
  border: 0; border-radius: 22px; cursor: pointer;
  background: var(--rot); color: #fff;
  font-size: 1.45rem; font-weight: 700;
  box-shadow: 0 5px 0 #8E0E13;
  margin: 0 0 1.4rem; padding: .7rem 1rem;
  transition: transform .08s;
}
.gross-knopf:active { transform: translateY(4px); box-shadow: 0 1px 0 #8E0E13; }
.gross-knopf.zweit { background: var(--karte); color: var(--tinte); box-shadow: 0 5px 0 var(--linie); border: 2px solid var(--linie); }
.gross-knopf.zweit:active { box-shadow: 0 1px 0 var(--linie); }

.abschnitt-titel { font-size: 1.15rem; font-weight: 700; margin: 0 0 .6rem; }
.themen { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 12px; margin-bottom: 1.4rem; }
@media (max-width: 560px) { .themen { grid-template-columns: 1fr 1fr; } }
.thema {
  background: var(--karte); border: 3px solid transparent; border-radius: 20px;
  box-shadow: var(--schatten); cursor: pointer; padding: .5rem .5rem .7rem;
  text-align: center;
}
.thema img { display: block; width: 76%; margin: 0 auto .2rem; border-radius: 12px; }
.thema-name { font-weight: 700; font-size: 1rem; display: block; }
.thema.aktiv { border-color: var(--tinte); }
.thema.aktiv .thema-name::before { content: "✓ "; color: var(--gruen); }

/* ---------- Frage ---------- */
.fortschritt { display: flex; align-items: center; margin: .3rem 0 .8rem; }
.punkte-reihe { display: flex; flex: 1; }
.punkt { flex: 1; height: 14px; border-radius: 7px; background: #EAE2D0; margin-right: 6px; }
.punkt:last-child { margin-right: 0; }
.punkt.ok { background: var(--gruen); }
.punkt.falsch { background: #E8A0A0; }
.punkt.jetzt { background: var(--tinte); }
.frage-nr { margin-left: 12px; color: var(--tinte-leise); font-size: .9rem; white-space: nowrap; }

.frage-karte {
  background: var(--karte); border-radius: 26px; box-shadow: var(--schatten);
  padding: 1rem 1rem 1.2rem; margin-bottom: 1rem; text-align: center;
}
.frage-text { font-size: 1.6rem; font-weight: 700; margin: .1rem 0 .6rem; line-height: 1.2; }
.luecke { display: inline-block; min-width: 3.2em; border-bottom: 4px solid var(--rot); line-height: 1; }
.frage-bild { display: block; width: auto; height: 32vh; max-height: 300px; min-height: 150px; max-width: 78%; margin: 0 auto; border-radius: 16px; }
.frage-bild.klein { height: 22vh; max-height: 200px; min-height: 120px; }
/* weißer Fotohintergrund verschmilzt mit der Karte */
.frage-bild, .antworten.bilder img, .thema img, .sammel-karte img, .neu-wort img { mix-blend-mode: multiply; }
.frage-wort { font-size: 2rem; font-weight: 700; margin: .4rem 0 0; }
.vorlesen {
  display: inline-flex; align-items: center; margin-top: .6rem;
  background: #EEF1F8; border: 0; border-radius: 999px; padding: .45rem 1rem;
  font-weight: 700; font-size: .95rem; cursor: pointer; min-height: 52px;
}
.vorlesen svg { margin-right: .4rem; }

.antworten { display: grid; grid-template-columns: 1fr; grid-gap: 14px; }
.antwort {
  display: flex; align-items: center; width: 100%; min-height: 80px;
  background: var(--karte); border: 3px solid var(--linie); border-radius: 22px;
  padding: .55rem 1rem .55rem .6rem; cursor: pointer; text-align: left;
  font-size: 1.45rem; font-weight: 700;
  box-shadow: 0 4px 0 var(--linie);
  transition: transform .08s, background .2s, border-color .2s;
}
.antwort:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--linie); }
.antwort .buchstabe {
  flex: none; width: 52px; height: 52px; border-radius: 50%;
  background: var(--tinte); color: #fff; font-size: 1.15rem;
  display: flex; align-items: center; justify-content: center; margin-right: 16px;
}
.antwort .zeichen { margin-left: auto; font-size: 1.6rem; padding-left: 10px; }
.antwort.richtig { background: var(--gruen-hell); border-color: var(--gruen); box-shadow: 0 4px 0 var(--gruen); }
.antwort.richtig .buchstabe { background: var(--gruen); }
.antwort.falsch { background: var(--rot-hell); border-color: var(--rot); box-shadow: 0 4px 0 var(--rot); }
.antwort.falsch .buchstabe { background: var(--rot); }
.antwort.blass { opacity: .45; }
.antworten.fertig .antwort { cursor: default; }

/* Artikel: drei große Knöpfe nebeneinander */
.antworten.artikel { grid-template-columns: repeat(3, 1fr); }
.antworten.artikel .antwort { justify-content: center; text-align: center; font-size: 1.7rem; padding: .5rem; flex-direction: column; }
.antworten.artikel .antwort .buchstabe { display: none; }
.antworten.artikel .antwort .zeichen { margin: 0; padding: 0; font-size: 1.3rem; }

/* Bildwahl: drei Bilder */
.antworten.bilder { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) { .antworten.bilder { grid-template-columns: 1fr 1fr; } .antworten.bilder .antwort:last-child { grid-column: 1 / span 2; justify-self: center; width: 50%; width: calc(50% - 7px); } }
.antworten.bilder .antwort { flex-direction: column; padding: .5rem; position: relative; }
.antworten.bilder .antwort img { width: auto; max-width: 100%; height: 26vh; max-height: 240px; min-height: 110px; border-radius: 14px; display: block; margin: 0 auto; }
.antworten.bilder .antwort .buchstabe { position: absolute; left: 8px; top: 8px; width: 42px; height: 42px; margin: 0; }
.antworten.bilder .antwort .zeichen { position: absolute; right: 10px; top: 6px; margin: 0; padding: 0; font-size: 1.8rem; }

/* Rückmeldung nach der Antwort */
.rueckmeldung {
  border-radius: 22px; padding: 1rem 1.1rem; margin: 1rem 0 .9rem;
  font-size: 1.25rem; animation: hoch .35s ease;
}
.rueckmeldung.gut { background: var(--gruen-hell); color: #11461F; }
.rueckmeldung.schade { background: #FFF4CC; color: #5A4300; }
.rueckmeldung strong { font-size: 1.45rem; display: block; margin-bottom: .2rem; }
.rueckmeldung .bonus { display: inline-block; margin-top: .4rem; background: var(--gold); color: #3B2A00; border-radius: 999px; padding: .1rem .7rem; font-weight: 700; font-size: 1rem; }
@keyframes hoch { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.plus-punkte {
  position: fixed; left: 50%; top: 38%; z-index: 20; pointer-events: none;
  font-size: 2.6rem; font-weight: 700; color: var(--gold-dunkel);
  transform: translateX(-50%); animation: steigen 1.1s ease forwards;
  text-shadow: 0 2px 0 #fff, 0 0 12px #fff;
}
@keyframes steigen { 0% { opacity: 0; transform: translate(-50%, 20px) scale(.8); } 25% { opacity: 1; transform: translate(-50%, 0) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -70px) scale(1); } }

/* ---------- Ende der Runde ---------- */
.ende { text-align: center; }
.sterne { font-size: 4rem; line-height: 1; margin: .6rem 0 .2rem; letter-spacing: .1em; }
.stern { display: inline-block; color: #E2D9C4; }
.stern.an { color: var(--gold); animation: plopp .5s ease both; }
.stern.an:nth-child(2) { animation-delay: .25s; }
.stern.an:nth-child(3) { animation-delay: .5s; }
@keyframes plopp { 0% { transform: scale(0); } 70% { transform: scale(1.3); } 100% { transform: scale(1); } }
.ende-titel { font-size: 1.9rem; font-weight: 700; margin: .3rem 0; }
.ende-satz { font-size: 1.15rem; color: var(--tinte-leise); margin: 0 0 1rem; }
.ende .stand { text-align: left; }
.neu-woerter { display: flex; flex-wrap: wrap; justify-content: center; margin: .2rem 0 1rem; }
.neu-wort { width: 96px; margin: 0 6px 10px; text-align: center; font-size: .8rem; font-weight: 700; }
.neu-wort img { width: 96px; height: 96px; border-radius: 14px; background: #fff; box-shadow: var(--schatten); display: block; margin-bottom: 4px; }
.freischaltung { background: var(--tinte); color: #fff; border-radius: 22px; padding: 1rem 1.1rem; margin-bottom: 1rem; text-align: left; font-size: 1.1rem; animation: hoch .5s ease .6s both; }
.freischaltung strong { display: block; font-size: 1.3rem; color: var(--gold); }

/* ---------- Sammlung ---------- */
.sammlung { display: grid; grid-template-columns: repeat(4, 1fr); grid-gap: 12px; }
@media (max-width: 560px) { .sammlung { grid-template-columns: repeat(3, 1fr); } }
.sammel-karte { background: var(--karte); border: 0; border-radius: 16px; box-shadow: var(--schatten); padding: .4rem .3rem .6rem; text-align: center; cursor: pointer; }
.sammel-karte img { width: 100%; border-radius: 10px; display: block; }
.sammel-karte .art { display: block; font-size: .75rem; color: var(--tinte-leise); margin-top: .2rem; }
.sammel-karte .w { display: block; font-weight: 700; font-size: .9rem; word-break: break-word; hyphens: auto; }
.sammel-karte.zu { cursor: default; background: #F1EBDD; box-shadow: none; }
.sammel-karte.zu .platz { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; min-height: 70px; font-size: 2rem; color: #C9BFA8; font-weight: 700; }

/* ---------- Einstellungen ---------- */
.einstellung { background: var(--karte); border-radius: 22px; box-shadow: var(--schatten); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.einstellung h3 { margin: 0 0 .7rem; font-size: 1.15rem; }
.wahl { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 10px; }
.wahl.zwei { grid-template-columns: 1fr 1fr; }
.wahl button { min-height: 68px; border-radius: 16px; border: 3px solid var(--linie); background: #fff; cursor: pointer; font-weight: 700; }
.wahl button.an { border-color: var(--tinte); background: #EEF1F8; }
.wahl .aa1 { font-size: 1rem; } .wahl .aa2 { font-size: 1.25rem; } .wahl .aa3 { font-size: 1.55rem; }
.klein-text { color: var(--tinte-leise); font-size: .9rem; margin: .6rem 0 0; }
.leise-knopf { background: none; border: 0; color: var(--rot); text-decoration: underline; cursor: pointer; padding: .6rem 0; font-size: .95rem; }

.zurueck { display: inline-flex; align-items: center; background: none; border: 0; cursor: pointer; font-weight: 700; font-size: 1.05rem; padding: .6rem 0; min-height: 52px; }

/* Hinweisband unten */
.hinweis-band {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 30;
  max-width: 600px; margin: 0 auto;
  background: var(--tinte); color: #fff; border-radius: 18px; padding: .9rem 1.1rem;
  font-weight: 700; font-size: 1.05rem; text-align: center;
  transform: translateY(150%); transition: transform .35s ease;
}
.hinweis-band.zeigen { transform: none; }

/* Konfetti */
.konfetti { position: fixed; top: -20px; z-index: 25; width: 12px; height: 16px; pointer-events: none; animation: fallen linear forwards; }
@keyframes fallen { to { transform: translateY(110vh) rotate(720deg); } }

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