:root {
  --bg: #f3efe3;
  --karte: #fffdf7;
  --text: #24301f;
  --leise: #4f5a4a;
  --linie: #e1dac6;
  --gruen: #2e7d32;
  --gruen-dunkel: #1d5a21;
  --gelb: #e6a700;
  --gelb-dunkel: #7a5800;
  --gruen-text: #1d5a21;
  --rot: #a12d1d;
  --rot-hell: #fbe4e0;
  --gruen-hell: #e4f2e1;
  --gelb-hell: #fdf1d2;
  --blau: #2563a6;
  --ts: #2e7d32;
  --temp: #c2410c;
  --sonne: #e6a817;
  --nacht: rgba(40, 50, 80, 0.07);
  --ziel: rgba(46, 125, 50, 0.14);
  --schatten: 0 2px 0 rgba(0, 0, 0, .08), 0 6px 18px rgba(60, 50, 20, .08);
  --radius: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141a14; --karte: #1d241c; --text: #e8ede3; --leise: #a5b0a0; --linie: #313d2f;
    --gruen: #4caf50; --gruen-dunkel: #2e7d32; --gelb: #f0b429; --gelb-dunkel: #d9a21b; --gruen-text: #8fd194; --rot: #ef6f61;
    --rot-hell: #3c2321; --gruen-hell: #1f3320; --gelb-hell: #3a3018; --blau: #6ea8e8;
    --ts: #6cc070; --temp: #f08a4b; --nacht: rgba(160, 180, 255, 0.07); --ziel: rgba(108, 192, 112, 0.16);
    --schatten: 0 2px 0 rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141a14; --karte: #1d241c; --text: #e8ede3; --leise: #a5b0a0; --linie: #313d2f;
  --gruen: #4caf50; --gruen-dunkel: #2e7d32; --gelb: #f0b429; --gelb-dunkel: #d9a21b; --gruen-text: #8fd194; --rot: #ef6f61;
  --rot-hell: #3c2321; --gruen-hell: #1f3320; --gelb-hell: #3a3018; --blau: #6ea8e8;
  --ts: #6cc070; --temp: #f08a4b; --nacht: rgba(160, 180, 255, 0.07); --ziel: rgba(108, 192, 112, 0.16);
  --schatten: 0 2px 0 rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h1 { font-size: clamp(1.5rem, 4vw, 2.3rem); margin: .2rem 0 .8rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 0 0 .7rem; }
button, input, select { font: inherit; color: inherit; }
.hinweis { color: var(--leise); font-size: 1rem; }

/* Kopf */
.kopf { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px; background: var(--gruen-dunkel); color: #fff; }
.logo { display: flex; gap: .6rem; align-items: center; background: none; border: 0; color: inherit; cursor: pointer; text-align: left; padding: 0; }
.logo svg { width: 36px; height: 36px; background: #f3efe3; border-radius: 10px; padding: 3px; }
.logo b { display: block; font-size: 1.1rem; }
.logo small { opacity: .8; font-size: .95rem; }
.kopf .leise-knopf { color: #fff; border-color: rgba(255,255,255,.4); }

.bildschirm { max-width: 1180px; margin: 0 auto; padding: 16px; }
.karte { background: var(--karte); border-radius: var(--radius); padding: 18px; box-shadow: var(--schatten); margin-bottom: 16px; min-width: 0; }

/* Knöpfe */
.gross-knopf {
  display: grid; gap: 2px; text-align: left; border: 0; border-radius: 14px; padding: 14px 20px; cursor: pointer;
  background: var(--karte); color: var(--text); box-shadow: 0 4px 0 var(--linie); transition: transform .08s, box-shadow .08s;
}
.gross-knopf b { font-size: 1.15rem; }
.gross-knopf small { opacity: .85; }
.gross-knopf:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--linie); }
.gross-knopf.gruen { background: var(--gruen); color: #fff; box-shadow: 0 4px 0 var(--gruen-dunkel); }
.gross-knopf.gelb { background: var(--gelb); color: #2a2000; box-shadow: 0 4px 0 var(--gelb-dunkel); }
.gross-knopf.gruen:active { box-shadow: 0 1px 0 var(--gruen-dunkel); }
.gross-knopf.gelb:active { box-shadow: 0 1px 0 var(--gelb-dunkel); }
.leise-knopf { background: none; border: 1px solid var(--linie); border-radius: 999px; padding: .3rem .9rem; cursor: pointer; font-size: .95rem; }
.los { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 8px 0 24px; }

/* Start */
.held { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--schatten); background: #87b8e0; }
.held .szene-box { line-height: 0; }
.held-text {
  position: absolute; inset: auto 0 0 0; padding: 24px; color: #fff;
  background: linear-gradient(transparent, rgba(10, 25, 10, .75) 45%);
}
.held-text h1 { margin: 0 0 .3rem; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.held-text p { margin: 0 0 1rem; max-width: 40rem; }
.start-knoepfe { display: flex; gap: 12px; flex-wrap: wrap; }
.start-knoepfe .gross-knopf { flex: 1 1 240px; }
.unter-held { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 760px) {
  .unter-held { grid-template-columns: 1fr; }
  .held-text { position: static; background: var(--gruen-dunkel); }
}
.anleitung { padding-left: 1.2rem; margin: 0 0 .6rem; }
.anleitung li { margin-bottom: .4rem; }
.rangliste { margin: 0 0 .8rem; padding: 0; list-style: none; counter-reset: platz; }
.rangliste li { counter-increment: platz; display: grid; grid-template-columns: 2rem 1fr auto; gap: .5rem; align-items: center; padding: .4rem 0; border-bottom: 1px dashed var(--linie); }
.rangliste li::before { content: counter(platz); font-weight: 800; color: var(--leise); text-align: center; }
.rangliste li:nth-child(1)::before { content: "🥇"; } .rangliste li:nth-child(2)::before { content: "🥈"; } .rangliste li:nth-child(3)::before { content: "🥉"; }
.rangliste small { color: var(--leise); display: block; }
.rangliste strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.rangliste .leer { display: block; color: var(--leise); }
.rangliste li.leer::before { content: none; }

/* Einsatz planen */
.wahl { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 12px; }
.wahl.klein { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.wahlkarte {
  display: grid; gap: 4px; text-align: left; padding: 12px 14px; border-radius: 12px; cursor: pointer;
  background: var(--bg); border: 2px solid transparent; box-shadow: 0 3px 0 var(--linie);
}
.wahlkarte[aria-pressed="true"] { border-color: var(--gruen); background: var(--gruen-hell); }
.wahlkarte b { font-size: 1rem; }
.wahlkarte small { color: var(--leise); font-size: .95rem; }
.wahlkarte .wetterreihe { display: flex; gap: 2px; }
.wahlkarte .wetterreihe .symbol { width: 30px; height: 30px; }
.zeile { display: grid; grid-template-columns: 8rem 1fr; gap: 10px; align-items: center; margin: 10px 0; }
@media (max-width: 560px) { .zeile { grid-template-columns: 1fr; gap: 4px; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 2px solid var(--linie); background: var(--bg); border-radius: 999px; padding: .3rem .8rem; cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--gruen); background: var(--gruen); color: #fff; }
.regler { display: flex; align-items: center; gap: 10px; }
.regler input { flex: 1; accent-color: var(--gruen); min-width: 0; }
.regler output { min-width: 7.5rem; font-variant-numeric: tabular-nums; font-weight: 700; }
.code, .name { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.code input, .name input { padding: .45rem .7rem; border: 2px solid var(--linie); border-radius: 10px; background: var(--bg); flex: 1 1 12rem; }

/* Maschinen */
.maschinen { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.maschine { background: var(--bg); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.maschine h3 { margin: 0 0 6px; font-size: 1rem; }
.maschine .bild { background: var(--karte); border-radius: 10px; margin-bottom: 8px; }
.maschinenbild { width: 100%; height: auto; display: block; }
.wahl.bilder { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); margin: 0; }
.wahl.bilder .wahlkarte { background: var(--karte); justify-items: center; text-align: center; }
.symbol.gross { width: 100%; max-width: 120px; height: auto; }
.regler.pflicht output { min-width: 8rem; }
.maschine .regler { flex-wrap: wrap; }
.maschine .regler input { min-width: 8rem; }
.maschine .regler output { flex-basis: 100%; text-align: center; }
.regler.leer output { color: var(--rot); }
.regler.leer input { accent-color: var(--linie); }
.regler.leer input::-webkit-slider-thumb { opacity: 0; }
.regler.leer input::-moz-range-thumb { opacity: 0; }
.regler .plusminus { flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 2px solid var(--linie); background: var(--karte); font-size: 1.2rem; font-weight: 800; line-height: 1; cursor: pointer; color: var(--gruen-dunkel); }
.regler .plusminus:active { transform: scale(.92); }
/* Wiese */
h3.unter { font-size: .95rem; margin: 12px 0 6px; color: var(--leise); }
.wahl.wiese, .wahl.stadien { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .wahl.wiese { grid-template-columns: 1fr; } .wahl.stadien { grid-template-columns: repeat(3, 1fr); gap: 6px; } }
.wahl.stadien .wahlkarte b { hyphens: manual; overflow-wrap: anywhere; }
.wiesenbild { width: 100%; height: auto; display: block; border-radius: 8px; }
.pflanzenbild { width: 90px; height: auto; }
.wiese-unten { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
@media (max-width: 700px) { .wiese-unten { grid-template-columns: 1fr; } }
.wiese-unten .bild { margin-bottom: 6px; max-width: 460px; }
.wiese-unten .wahl.bilder { grid-template-columns: repeat(2, minmax(120px, 180px)); }
.merkmale { display: grid; grid-template-columns: auto auto; gap: 1px 8px; justify-content: center; font-size: .95rem; color: var(--leise); margin-top: 4px; }
.merkmale i { font-style: normal; letter-spacing: 1px; color: var(--gruen); }
.merkmale i b { color: var(--linie); font-weight: 400; }
.fehler { color: var(--rot); font-weight: 700; text-align: center; min-height: 1.2em; margin: 0; }

/* Spiel */
.spielfeld { display: grid; gap: 12px; }
.hud-oben { display: flex; gap: 12px 20px; align-items: center; flex-wrap: wrap; background: var(--karte); border-radius: var(--radius); padding: 10px 16px; box-shadow: var(--schatten); }
.uhrzeit { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.uhrzeit b { color: var(--gruen); margin-right: .3rem; }
.jetzt { display: flex; align-items: center; gap: 6px; color: var(--leise); flex: 1; }
.jetzt .symbol { width: 34px; height: 34px; }
.tempo { display: flex; gap: 4px; background: var(--bg); padding: 4px; border-radius: 12px; }
.tempo button { border: 0; background: none; border-radius: 8px; padding: .35rem .7rem; cursor: pointer; font-size: .95rem; letter-spacing: -.12em; min-width: 2.6rem; }
.tempo button[aria-pressed="true"] { background: var(--gruen); color: #fff; }
.zeitraffer-label { display: none; font-weight: 800; color: var(--gelb-dunkel); text-transform: uppercase; letter-spacing: .08em; }
.zeitraffer .tempo, .zeitraffer .aktionen { display: none; }
.zeitraffer .zeitraffer-label { display: inline; }

.spielfeld .szene-box { border-radius: var(--radius); overflow: hidden; box-shadow: var(--schatten); line-height: 0; background: #87b8e0; }
.szene { width: 100%; height: auto; display: block; }
.spielfeld .szene { height: clamp(220px, 46vh, 520px); }
.szene stop { transition: stop-color var(--dauer, .6s) linear; }
.szene .gestirn { transition: transform var(--dauer, .6s) linear, opacity .8s; }
.szene .sterne, .szene .nacht { transition: opacity var(--dauer, .6s) linear; }
.szene .regen { transition: opacity .4s; }
.szene .regen line { animation: regnen .5s linear infinite; }
@keyframes regnen { from { transform: translate(0, -40px); } to { transform: translate(-16px, 40px); } }
.szene .wolke { animation: ziehen linear infinite alternate; }
@keyframes ziehen { from { transform: translateX(-60px); } to { transform: translateX(60px); } }
.szene .wogen { animation: wogen 3.5s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: bottom; }
@keyframes wogen { from { transform: skewX(-2deg); } to { transform: skewX(3deg); } }
.szene .tau circle { animation: glitzern 2s ease-in-out infinite alternate; }
@keyframes glitzern { from { opacity: .2; } to { opacity: .95; } }
.szene .kreisel { animation: drehen .6s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes drehen { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .szene * { animation: none !important; } }

.messer-reihe { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 10px; }
@media (max-width: 860px) { .messer-reihe { grid-template-columns: 1fr 1fr; } }
.messer { background: var(--karte); border-radius: 14px; padding: 10px 14px; box-shadow: var(--schatten); display: grid; gap: 4px; align-content: start; }
.messer span { font-size: .95rem; color: var(--leise); text-transform: uppercase; letter-spacing: .04em; }
.messer strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.messer.ts strong { font-size: 2rem; }
.messer small { color: var(--leise); font-size: .95rem; }
.skala { position: relative; height: 14px; border-radius: 7px; background: linear-gradient(90deg, #3b8a2e, #a3a843 50%, #dccb8c); margin: 4px 0; }
.skala .ziel { position: absolute; top: -3px; bottom: -3px; border: 2px solid var(--text); border-radius: 6px; }
.skala .nadel { position: absolute; top: -6px; width: 4px; height: 26px; margin-left: -2px; background: var(--text); border-radius: 2px; transition: left .4s; }
.messer.ts.im-ziel { box-shadow: inset 0 0 0 3px var(--gruen), var(--schatten); }
.balken { height: 10px; border-radius: 5px; background: var(--bg); overflow: hidden; }
.balken i { display: block; height: 100%; background: var(--gruen); border-radius: 5px; transition: width .4s; }
.messer.zucker i { background: #d4a017; }
.messer.erde i { background: #8b5e34; }
.messer.verlust i { background: var(--rot); }
.messer.warnung { box-shadow: inset 0 0 0 2px var(--rot), var(--schatten); }
.messer.warnung strong { color: var(--rot); }

.aktionen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 760px) { .aktionen { grid-template-columns: 1fr 1fr; } }
.aktion {
  display: flex; align-items: center; gap: 10px; text-align: left; border: 0; border-radius: 14px; padding: 10px 14px; cursor: pointer;
  background: var(--gruen); color: #fff; box-shadow: 0 5px 0 var(--gruen-dunkel); transition: transform .08s, box-shadow .08s, opacity .2s;
}
.aktion .symbol { width: 44px; height: 44px; flex: none; background: rgba(255,255,255,.92); color: var(--gruen-dunkel); border-radius: 10px; padding: 4px; }
.aktion b { display: block; font-size: 1.1rem; }
.aktion small { opacity: .85; font-size: .95rem; }
.aktion:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--gruen-dunkel); }
.aktion:disabled { background: var(--linie); color: var(--leise); box-shadow: 0 5px 0 rgba(0,0,0,.08); cursor: default; opacity: .7; }
.aktion:disabled .symbol { color: var(--leise); filter: grayscale(1); }

.unten { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: stretch; }
@media (max-width: 860px) { .unten { grid-template-columns: 1fr; } }
.bericht { display: flex; gap: 8px; flex-wrap: wrap; align-content: start; }
.tageskarte { display: grid; justify-items: center; gap: 0; background: var(--karte); border-radius: 12px; padding: 8px 10px; box-shadow: var(--schatten); min-width: 84px; font-size: .95rem; border: 2px solid transparent; }
.tageskarte .symbol { width: 40px; height: 40px; }
.tageskarte small { color: var(--leise); }
.tageskarte.heute { border-color: var(--gruen); }
.ticker { list-style: none; margin: 0; padding: 10px 14px; background: var(--karte); border-radius: 12px; box-shadow: var(--schatten); font-size: .95rem; }
.ticker li { padding: .2rem 0; border-bottom: 1px dashed var(--linie); animation: rein .4s ease-out; }
.ticker li:first-child { font-weight: 700; }
.ticker li.wichtig { color: var(--rot); }
.ticker li:last-child { border: 0; }
@keyframes rein { from { opacity: 0; transform: translateY(-6px); } }

/* Ergebnis */
.silo-kopf { text-align: center; }
.ueber { color: var(--leise); margin: 0; }
.sterne { display: flex; justify-content: center; gap: 8px; margin: 10px 0; }
.sterne .symbol { width: 64px; height: 64px; animation: plopp .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.sterne .symbol:nth-child(2) { animation-delay: .25s; } .sterne .symbol:nth-child(3) { animation-delay: .5s; }
@keyframes plopp { from { transform: scale(0) rotate(-40deg); opacity: 0; } }
.punkte strong { font-size: 3.6rem; font-weight: 800; color: var(--gruen); font-variant-numeric: tabular-nums; line-height: 1; }
.punkte span { display: block; color: var(--leise); }
.urteil { font-size: 1.2rem; font-weight: 700; margin: .6rem 0 1rem; }
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; text-align: left; }
.kennzahl { background: var(--bg); border-radius: 12px; padding: .6rem .8rem; }
.kennzahl span { display: block; font-size: .95rem; color: var(--leise); }
.kennzahl strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.abzeichen { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.abzeichen span { background: var(--gelb-hell); border: 2px solid var(--gelb); border-radius: 999px; padding: .3rem .8rem; font-weight: 700; font-size: .95rem; animation: plopp .5s .8s both; }
.abzeichen span.minus { background: var(--rot-hell); border-color: var(--rot); }
.faktoren { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.faktor {
  display: grid; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 12px; cursor: pointer;
  border: 0; border-top: 6px solid var(--linie); background: var(--bg); box-shadow: 0 3px 0 var(--linie);
}
.faktor small { color: var(--leise); }
.faktor.gut { border-top-color: var(--gruen); }
.faktor.mittel { border-top-color: var(--gelb); }
.faktor.schlecht { border-top-color: var(--rot); background: var(--rot-hell); }
.faktor b::after { content: " ›"; color: var(--leise); }
.diagramm svg { width: 100%; height: auto; display: block; }
.diagramm text { fill: var(--leise); font-size: 11px; }
.vergleich { width: 100%; max-width: 560px; margin: 0 auto 1rem; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.vergleich th, .vergleich td { padding: .4rem .5rem; border-bottom: 1px solid var(--linie); text-align: left; }
.treffer { color: var(--gruen); font-weight: 800; }
.daneben { color: var(--rot); }

/* Wette */
.szenarien { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 16px; }
.geschichte { font-size: 1.05rem; background: var(--gelb-hell); border-left: 6px solid var(--gelb); padding: 12px 14px; border-radius: 8px; }
#tippform .bericht { margin: 10px 0 16px; }
.tipps { display: grid; gap: 14px; margin-bottom: 12px; }
.tipps .regler span { min-width: 9rem; font-weight: 600; }
.tipps > div > span { font-weight: 600; display: block; margin-bottom: 6px; }

dialog { border: 0; border-radius: var(--radius); background: var(--karte); color: var(--text); max-width: min(560px, calc(100vw - 32px)); padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(10, 20, 10, .5); }
dialog h3 { margin: 0 0 .2rem; font-size: 1.3rem; }
dialog .wert { font-weight: 700; color: var(--leise); margin: 0 0 .8rem; }
dialog .gross-knopf { margin-top: 8px; }

.fuss { max-width: 1180px; margin: 0 auto; padding: 8px 16px 24px; color: var(--leise); font-size: .95rem; }

/* ===== Zugänglichkeit, Touch und Bedienung (Gutachten) ===== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--text); color: var(--bg); padding: .6rem 1rem; border-radius: 8px; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--blau); outline-offset: 2px; }
h1:focus { outline: none; }
kbd { font: inherit; font-size: .8rem; border: 1px solid currentColor; border-radius: 4px; padding: 0 .3em; opacity: .85; }
.aktion kbd, .tempo kbd { margin-left: .2rem; }
@media (pointer: coarse) { kbd { display: none; } }

/* Touch-Ziele: mindestens 48 px, wichtige Knöpfe 56 px und mehr */
.chip, .tempo button, .leise-knopf, .faktor, .wahlkarte { min-height: 48px; }
.chip { padding: .45rem 1rem; }
.tempo { gap: 6px; flex-wrap: wrap; }
.tempo button { min-width: 48px; padding: .4rem .7rem; }
.tempo button[data-schritt] { letter-spacing: 0; font-weight: 700; }
.leise-knopf { padding: .5rem 1.1rem; }
.gross-knopf { min-height: 56px; }
.regler .plusminus { width: 48px; height: 48px; font-size: 1.5rem; }
.aktion { min-height: 64px; }
input[type=range] { -webkit-appearance: none; appearance: none; background: transparent; height: 48px; min-width: 0; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 10px; border-radius: 5px; background: var(--linie); }
input[type=range]::-moz-range-track { height: 10px; border-radius: 5px; background: var(--linie); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; margin-top: -11px; border-radius: 50%; background: var(--gruen); border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .45); }
input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--gruen); border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .45); }
.code input, .name input { min-height: 48px; font-size: 1rem; }

/* Kopf, Pfad, Schritte */
.kopf { flex-wrap: wrap; gap: 8px 16px; }
.kopf-knoepfe { display: flex; gap: 8px; flex-wrap: wrap; }
.pfad { max-width: 1180px; margin: 0 auto; padding: 8px 16px 0; }
.pfad ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 0; }
.pfad li + li::before { content: "›"; margin-right: 8px; color: var(--leise); }
.pfad button { background: none; border: 0; padding: .6rem .2rem; color: var(--blau); text-decoration: underline; cursor: pointer; font-size: 1rem; min-height: 48px; }
.pfad li[aria-current] { font-weight: 700; padding: .6rem 0; }
.schritte { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.schritte button { display: flex; align-items: center; gap: 8px; background: var(--karte); border: 2px solid var(--linie); border-radius: 999px; padding: .4rem 1rem .4rem .5rem; cursor: pointer; font-weight: 700; min-height: 48px; }
.schritte button span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--gruen); color: #fff; }
.schritte button.fertig span::after { content: "✓"; }
.schritte button.fertig span { font-size: 0; }
.schritte button.fertig span::after { font-size: 1rem; }

/* Fortsetzen, Lerntext, Links */
.fortsetzen { display: flex; gap: 12px 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-left: 8px solid var(--gelb); margin-top: 16px; }
.fortsetzen h2, .fortsetzen p { margin: 0 0 .3rem; }
.knopfreihe { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.lerntext { margin: 0 0 .8rem; padding-left: 1.2rem; }
.lerntext li { margin-bottom: .5rem; }
.knopflink { display: inline-block; padding: .7rem 1.2rem; border-radius: 12px; background: var(--gruen); color: #fff; font-weight: 700; text-decoration: none; min-height: 48px; }
abbr[title] { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }

/* Start-Leiste (Einsatz planen), Zähler der offenen Einstellungen */
.startleiste { position: sticky; bottom: 0; z-index: 6; display: grid; gap: 4px; justify-items: center; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); margin: 8px -16px 0; background: var(--bg); border-top: 2px solid var(--linie); }
.startleiste .fehler { margin: 0; min-height: 0; }
.startleiste .fehler:empty { display: none; }
.offen { margin: 0; font-weight: 700; color: var(--rot); text-align: center; }
.offen.fertig { color: var(--gruen-text); }

/* Spielfeld: gedrückt halten, Warnsymbole, ruhiger Modus */
.aktion { position: relative; overflow: hidden; touch-action: manipulation; -webkit-touch-callout: none; user-select: none; }
.aktion::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: #fff; transform: scaleX(0); transform-origin: left; }
.aktion.haelt::after { transform: scaleX(1); transition: transform .7s linear; }
.aktion.wackelt { animation: wackeln .4s; }
@keyframes wackeln { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.messer.warnung strong::after { content: " ⚠"; }
.ruhig .tempo [data-tempo="1"], .ruhig .tempo [data-tempo="2"], .ruhig .tempo [data-tempo="3"] { display: none; }
.zeitraffer .tempo [data-schritt] { display: none; }

/* Erklär-Dialog: Aussage, Gründe, Tipp */
dialog h2 { margin: 0 0 .2rem; font-size: 1.3rem; }
dialog .kurz { font-size: 1.1rem; font-weight: 700; margin: 0 0 .5rem; }
dialog ul { margin: 0 0 .8rem; padding-left: 1.2rem; }
dialog li { margin-bottom: .4rem; }
dialog .tipp { background: var(--gelb-hell); border-left: 6px solid var(--gelb); padding: .6rem .8rem; border-radius: 8px; margin: 0 0 .5rem; }
dialog dl { margin: 0 0 1rem; }
dialog dt { font-weight: 800; margin-top: .8rem; }
dialog dt small { font-weight: 400; color: var(--leise); margin-left: .3rem; }
dialog dd { margin: .1rem 0 0; }
dialog { max-height: calc(100vh - 32px); overflow: auto; }

/* Erklär-Karten: Symbol statt nur Farbe */
.faktor b::before { content: ""; }
.faktor.gut b::before { content: "✓ "; color: var(--gruen-text); }
.faktor.mittel b::before { content: "! "; color: var(--gelb-dunkel); }
.faktor.schlecht b::before { content: "✗ "; color: var(--rot); }

/* Fuss */
.fuss p { margin: 0 0 .6rem; }
.fuss nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.fuss a { color: var(--blau); display: inline-block; padding: .6rem 0; min-height: 48px; }

/* Lern- und Szenarioseiten */
.seite { max-width: 52rem; margin: 0 auto; padding: 16px; }
.seite h1 { margin: .4rem 0 .6rem; }
.seite h2 { font-size: 1.35rem; margin: 1.6rem 0 .5rem; }
.seite h3 { font-size: 1.1rem; margin: 1rem 0 .3rem; }
.seite p, .seite li { font-size: 1.05rem; line-height: 1.6; }
.seite dl dt { font-weight: 800; margin-top: .9rem; }
.seite dl dd { margin: .1rem 0 0; }
.infobox { background: var(--gelb-hell); border-left: 8px solid var(--gelb); padding: .8rem 1rem; border-radius: 10px; margin: 1rem 0; }
.infobox p { margin: 0; }
.seite .tageskarten { display: flex; gap: 8px; flex-wrap: wrap; margin: .6rem 0 1rem; }

/* Mobil: feste Daumenleiste mit den Arbeitsgängen, dichtere Anzeigen */
@media (max-width: 760px) {
  .aktionen { position: sticky; bottom: 0; z-index: 6; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); margin: 0 -16px; background: var(--karte); box-shadow: 0 -4px 16px rgba(0, 0, 0, .2); }
  .aktion { flex-direction: column; justify-content: center; text-align: center; min-height: 72px; padding: 6px 4px; gap: 2px; border-radius: 12px; }
  .aktion .symbol { width: 32px; height: 32px; padding: 2px; }
  .aktion small, .aktion kbd { display: none; }
  .aktion b { font-size: 1rem; }
  .spielfeld .szene { height: clamp(170px, 30vh, 300px); }
  .messer-reihe { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .messer.ts { grid-column: 1 / -1; }
  .messer:not(.ts) small { display: none; }
  .messer { padding: 8px 10px; }
  .messer strong { font-size: 1.25rem; }
  .hud-oben { padding: 8px 12px; }
  .uhrzeit { font-size: 1.4rem; }
}

/* Darstellung "Draussen": starker Kontrast für Sonnenlicht */
:root[data-outdoor="1"] {
  --bg: #ffffff; --karte: #ffffff; --text: #000000; --leise: #1a1a1a; --linie: #4d4d4d;
  --gruen: #0b4d12; --gruen-dunkel: #063a0b; --gruen-text: #063a0b; --gelb: #ffd400; --gelb-dunkel: #5c4300;
  --rot: #8a0f00; --rot-hell: #ffe3df; --gruen-hell: #dff5dc; --gelb-hell: #fff0b3; --blau: #003a8c;
  --schatten: 0 0 0 2px #000;
}
:root[data-outdoor="1"] .gross-knopf.gelb { color: #000; }
:root[data-outdoor="1"] .kopf { background: #063a0b; }
:root[data-outdoor="1"] .chip[aria-pressed="true"], :root[data-outdoor="1"] .wahlkarte[aria-pressed="true"] { outline: 4px solid #000; outline-offset: -2px; }
:root[data-outdoor="1"] .faktor { border: 2px solid #000; border-top-width: 8px; }

@media (prefers-reduced-motion: reduce) { .aktion.wackelt { animation: none; } .aktion.haelt::after { transition: none; } }
a.logo { text-decoration: none; color: inherit; display: flex; gap: .6rem; align-items: center; min-height: 48px; }
a.logo svg { width: 36px; height: 36px; background: #f3efe3; border-radius: 10px; padding: 3px; }
a.logo b { display: block; font-size: 1.1rem; }
a.logo small { opacity: .85; font-size: .95rem; }
.pfad a { color: var(--blau); display: inline-block; padding: .6rem .2rem; min-height: 48px; }
.seite a:not(.knopflink) { color: var(--blau); }
.seite nav ul { padding-left: 1.2rem; }
.seite nav li { margin-bottom: .2rem; }

/* Feinschliff nach dem Test im Handy-Format */
.pfad button, .pfad a { min-width: 48px; text-align: center; }
.fuss a { min-width: 48px; text-align: center; }
.seite nav li a, .seite li > a:only-child { display: inline-block; padding: .5rem 0; min-height: 44px; }
@media (max-width: 760px) {
  .tempo { width: 100%; flex-wrap: nowrap; gap: 4px; justify-content: space-between; }
  .tempo button { min-width: 0; flex: 1; padding: .4rem .1rem; }
  .bericht { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .tageskarte { min-width: 0; padding: 6px 2px; }
  .tageskarte .symbol { width: 34px; height: 34px; }
  .kopf .logo small { display: none; }
}
.logo { min-height: 48px; }

/* Darstellungsumschalter (Normal / Draussen / Nacht) wie in Futter v2 */
.icon-btn { width: 48px; height: 48px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .45); background: transparent; color: #fff; cursor: pointer; flex: none; }
.icon-btn:hover { background: rgba(255, 255, 255, .15); }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn:active { transform: scale(.95); }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 32px); background: var(--text); color: var(--bg); padding: .7rem 1.1rem; border-radius: 12px; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); text-align: center; }
.toast[hidden] { display: none; }
:root[data-outdoor="1"] body { font-size: 18px; }
:root[data-outdoor="1"] .chip, :root[data-outdoor="1"] .tempo button, :root[data-outdoor="1"] .leise-knopf, :root[data-outdoor="1"] .faktor, :root[data-outdoor="1"] .wahlkarte { min-height: 56px; }
:root[data-outdoor="1"] .regler .plusminus, :root[data-outdoor="1"] .icon-btn { width: 56px; height: 56px; }
:root[data-outdoor="1"] .gross-knopf { min-height: 64px; }
:root[data-outdoor="1"] .aktion { min-height: 72px; }
