/* Ruhige, warme Farbwelt: Salbeigrün, warmes Papier, Terrakotta als Akzent.
   Bedeutung nie nur über Farbe (Marken „✓ richtig“, „● deine Wahl“). Hell und Dunkel; Beamer mit großer Schrift. */
:root {
  --bg: #F3EFE6; --flaeche: #FBF8F1; --tinte: #1F2B2A; --leise: #54615F; --linie: #CFC8B8;
  --prim: #2B6A63; --auf-prim: #FFFFFF; --akzent: #A34A2C; --fuell: #7FA9A2; --leer: #E7E1D3; --warn: #F3E3D6;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121B1A; --flaeche: #1B2726; --tinte: #E9F0EC; --leise: #A9B8B4; --linie: #33423F;
    --prim: #7CCBBE; --auf-prim: #0E1C1A; --akzent: #F0A98A; --fuell: #4C7F78; --leer: #243230; --warn: #34261F; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121B1A; --flaeche: #1B2726; --tinte: #E9F0EC; --leise: #A9B8B4; --linie: #33423F;
  --prim: #7CCBBE; --auf-prim: #0E1C1A; --akzent: #F0A98A; --fuell: #4C7F78; --leer: #243230; --warn: #34261F; color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; background: var(--bg); color: var(--tinte); line-height: 1.5; }
main { max-width: 720px; margin: 0 auto; padding: 56px 16px 56px; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 8px 0 6px; }
h2 { font-size: 1.1rem; color: var(--prim); margin: 18px 0 8px; }
h2.frage { font-size: 1.3rem; color: var(--tinte); line-height: 1.3; }
h3 { font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: var(--leise); margin: 22px 0 6px; }
a { color: var(--prim); }
.klein { font-size: .85rem; color: var(--leise); }
.intro { margin: 4px 0; }
.fortschritt { font-size: .85rem; color: var(--leise); }
.fall { background: var(--flaeche); border-left: 5px solid var(--akzent); padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.robin { margin: 10px 0; padding: 8px 14px; background: var(--flaeche); border: 1px dashed var(--linie); font-style: italic; border-radius: 12px; }
.robin::before { content: "Leitfigur · fiktiv"; display: block; font-style: normal; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--akzent); font-weight: 700; }
.badge { display: inline-block; margin: 4px 0; padding: 4px 12px; border-radius: 999px; border: 2px solid var(--prim); color: var(--prim); font-weight: 700; font-size: .85rem; }
.karte, .ergebnis, .aufloesung, .hilfe { background: var(--flaeche); border-radius: 14px; padding: 14px 16px; margin: 14px 0; border: 1px solid var(--linie); }
.aufloesung { border-left: 5px solid var(--prim); }
.zuschau-hinweis { background: var(--flaeche); border: 2px dashed var(--prim); border-radius: 12px; padding: 10px 14px; margin: 10px 0; }
.optionen { display: grid; gap: 10px; margin: 10px 0; }
.optionen.skala { grid-template-columns: repeat(5, 1fr); }
.optionen.wort-auswahl { display: flex; flex-wrap: wrap; }
button, .als-knopf { font: inherit; }
button.option { text-align: left; min-height: 52px; padding: 12px 16px; border: 2px solid var(--linie); background: var(--flaeche); border-radius: 14px; color: var(--tinte); cursor: pointer; transition: transform .1s, border-color .15s; }
.skala button.option { text-align: center; font-size: 1.2rem; font-weight: 700; padding: 12px 0; }
button.option:hover { border-color: var(--prim); }
button.option:active { transform: scale(.98); }
button.option[aria-pressed="true"] { border-color: var(--prim); background: var(--bg); font-weight: 700; box-shadow: inset 5px 0 0 var(--prim); }
button.option[aria-pressed="true"]::before { content: "✓ "; color: var(--prim); }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }
.aktionen { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; align-items: center; }
.primaer { min-height: 50px; padding: 10px 24px; background: var(--prim); color: var(--auf-prim); border: 0; border-radius: 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; font-weight: 700; }
.primaer:disabled { opacity: .45; cursor: not-allowed; }
.aktionen button:not(.primaer), select, input { min-height: 44px; padding: 8px 12px; border: 2px solid var(--linie); border-radius: 10px; background: var(--flaeche); color: var(--tinte); font: inherit; }
.cluster { margin-bottom: 4px; }
.menuepunkt { display: flex; align-items: center; gap: 14px; background: var(--flaeche); border: 2px solid var(--linie); border-radius: 14px; padding: 12px 14px; margin: 8px 0; text-decoration: none; color: var(--tinte); }
.menuepunkt:hover { border-color: var(--prim); }
.menuepunkt .nr { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--prim); color: var(--auf-prim); display: grid; place-items: center; font-weight: 700; }
.menuepunkt .titel { flex: 1; font-weight: 700; }
.menuepunkt .dauer { font-size: .8rem; color: var(--leise); white-space: nowrap; }
.fehler { background: var(--warn); border-left: 5px solid var(--akzent); padding: 8px 14px; border-radius: 8px; }

/* Balken */
.balkenzeile { margin: 10px 0; }
.balkenkopf { display: flex; justify-content: space-between; gap: 12px; font-size: .95rem; }
.balken { height: 14px; background: var(--leer); border-radius: 7px; overflow: hidden; }
.fuellung { display: block; height: 100%; background: var(--fuell); transition: width .5s ease; }
.fuellung.richtig { background-color: var(--prim); background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.35) 0 4px, transparent 4px 8px); }
.marke { font-size: .85rem; font-weight: 700; color: var(--prim); }
.mittel { font-weight: 700; margin: 8px 0; }

/* Tauziehen (zwei Optionen) */
.duell { margin: 12px 0; }
.duell-kopf { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; margin-bottom: 6px; }
.duell-balken { display: flex; height: 40px; border-radius: 20px; overflow: hidden; background: var(--leer); }
.duell-a, .duell-b { display: flex; align-items: center; padding: 0 14px; font-weight: 700; color: var(--auf-prim); transition: width .6s ease; min-width: 0; white-space: nowrap; overflow: hidden; }
.duell-a { background: var(--akzent); justify-content: flex-start; }
.duell-b { background: var(--prim); justify-content: flex-end; }
.duell-a.richtig, .duell-b.richtig { box-shadow: inset 0 -6px 0 rgba(255,255,255,.55); }
.duell.leer .duell-balken { opacity: .5; }
.duell.gross .duell-kopf { font-size: 1.6rem; }
.duell.gross .duell-balken { height: 64px; border-radius: 32px; font-size: 1.6rem; }

/* Wortwolke */
.wolke { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; align-items: baseline; padding: 14px 6px; line-height: 1.15; }
.wort { font-weight: 700; color: var(--prim); transition: font-size .5s ease; }
.wort:nth-child(3n) { color: var(--akzent); }
.wort.still { font-weight: 400; color: var(--leise); }
.wort.meine { text-decoration: underline; text-underline-offset: 4px; }
.wolke.gross { font-size: 1.5rem; gap: 10px 30px; padding: 24px 12px; }

/* Spektrum */
.spek { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; align-items: end; height: 190px; }
.spek.gross { height: clamp(170px, 36vh, 340px); gap: 18px; }
.spalte { display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.spek-n { font-weight: 700; font-size: .95rem; }
.spek-bahn { position: relative; width: 100%; flex: 1; display: block; margin: 4px 0; }
.saeule, .geist { position: absolute; left: 12%; right: 12%; bottom: 0; border-radius: 8px 8px 0 0; transition: height .6s ease; display: block; }
.saeule { background: var(--prim); }
.geist { border: 3px dashed var(--akzent); border-bottom: 0; background: transparent; }
.spek-wert { font-weight: 700; }
.spalte.meine .spek-wert { color: var(--akzent); }
.spek-enden { display: flex; justify-content: space-between; font-size: .85rem; color: var(--leise); margin-top: 6px; }
.spek.gross + .spek-enden { font-size: 1.25rem; }
.verschiebung { background: var(--warn); border-radius: 10px; padding: 8px 12px; margin: 8px 0; font-weight: 600; }
.legende { margin: 4px 0; }

/* Raum-Meter */
.raummeter { margin: 22px 0 6px; padding: 14px 16px; border-radius: 14px; background: var(--flaeche); border: 2px solid var(--prim); }
.raummeter.gross { font-size: 1.4rem; }
.raummeter.gross .balkenkopf { font-size: 1.5rem; }

/* Reihenfolge */
.reihe { padding-left: 24px; }
.sortierbar { list-style: decimal; padding-left: 28px; }
.sortierbar li { display: flex; gap: 8px; align-items: center; justify-content: space-between; background: var(--flaeche); border: 2px solid var(--linie); border-radius: 14px; padding: 8px 10px; margin: 8px 0; }
.sortierbar .text { flex: 1; }
.pfeile { display: flex; gap: 6px; }
.pfeile button { min-width: 44px; min-height: 44px; border: 2px solid var(--prim); background: var(--flaeche); border-radius: 10px; cursor: pointer; color: var(--prim); }
.pfeile button:disabled { opacity: .35; cursor: not-allowed; }
details.hilfe summary { cursor: pointer; font-weight: 700; color: var(--prim); }
details.hilfe ul { padding-left: 18px; }

/* Schutz: Leiste und Pause */
.schutzleiste { position: fixed; top: 8px; right: 8px; display: flex; gap: 8px; z-index: 20; }
.schutz-knopf { min-height: 40px; padding: 6px 14px; border: 2px solid var(--linie); background: var(--flaeche); color: var(--tinte); border-radius: 999px; cursor: pointer; font-size: .9rem; }
.schutz-knopf[aria-pressed="true"] { border-color: var(--prim); background: var(--prim); color: var(--auf-prim); font-weight: 700; }
.schutz-knopf[aria-pressed="true"]::before { content: "✓ "; }
.pause { position: fixed; inset: 0; z-index: 30; background: var(--bg); overflow-y: auto; display: grid; place-items: start center; }
.pause[hidden] { display: none; }
.pause-innen { max-width: 520px; padding: 56px 20px 40px; text-align: center; }
.pause-innen .hilfe { text-align: left; }
.pause-innen h2 { font-size: 1.8rem; margin-top: 0; }
.atem { width: 140px; height: 140px; margin: 28px auto; border-radius: 50%; background: var(--fuell); animation: atmen 8s ease-in-out infinite; }
@keyframes atmen { 0%, 100% { transform: scale(.6); } 50% { transform: scale(1.1); } }
body.pausiert { overflow: hidden; }

/* Beamer */
body.beamer main { max-width: none; padding: 12px 48px 40px; }
body.beamer h1 { font-size: 2.4rem; }
body.beamer h2 { font-size: 2rem; color: var(--tinte); line-height: 1.25; }
body.beamer .klein { font-size: 1.1rem; }
body.beamer .balkenkopf { font-size: 1.6rem; }
body.beamer .balken { height: 30px; border-radius: 15px; }
body.beamer .erkl, body.beamer .mittel { font-size: 1.5rem; }
body.beamer .fall { font-size: 1.5rem; }
body.beamer .robin { font-size: 1.3rem; }
body.beamer .verschiebung { font-size: 1.4rem; }
body.beamer .reihe { font-size: 1.5rem; }
.beamer-kopf { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.4rem; font-weight: 700; color: var(--prim); margin: 6px 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 48px 0; }
body.nav-aus .tabs { display: none; }
.tab { padding: 4px 11px; border: 2px solid var(--prim); border-radius: 999px; background: var(--flaeche); color: var(--prim); cursor: pointer; font-size: .8rem; }
.tab.optional { border-style: dashed; }
.tab.steuer { border-color: var(--akzent); color: var(--akzent); }
.tab[aria-pressed="true"] { background: var(--prim); color: var(--auf-prim); }
.tab.steuer[aria-pressed="true"] { background: var(--akzent); color: var(--bg); }

@media (max-width: 480px) { .optionen.skala { gap: 6px; } .schutz-knopf { font-size: .8rem; padding: 6px 10px; } }
@media (prefers-reduced-motion: reduce) {
  .fuellung, .duell-a, .duell-b, .saeule, .geist, .wort { transition: none; }
  .atem { animation: none; transform: scale(.9); }
  button.option { transition: none; }
}
