:root {
  --heu: #F3C969;
  --heu-d: #D9A83A;
  --wiese: #5FA463;
  --wiese-d: #3E7D45;
  --sattel: #8A5530;
  --sattel-d: #5E3920;
  --rot: #E2455B;
  --rot-d: #B42F43;
  --blau: #3D7DD8;
  --blau-d: #2A5BA6;
  --gold: #E7B93E;
  --creme: #FFF7E8;
  --karte: #FFFFFF;
  --tinte: #3A2618;
  --tinte-2: #7A6252;
  --linie: #EADCC3;
  --orange: #F0A92E;
  --radius: 18px;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--tinte);
  background: var(--creme);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 120' preserveAspectRatio='none'%3E%3Cpath d='M0,60 C80,30 160,70 240,50 C310,32 360,48 400,40 L400,120 L0,120Z' fill='%23CFE8C4'/%3E%3Cpath d='M0,85 C90,60 200,95 300,75 C350,66 380,72 400,70 L400,120 L0,120Z' fill='%23B6DBA8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 100% 140px;
  background-attachment: fixed;
  min-height: 100vh;
  font-size: 17px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
h1, h2, h3, .logo, .kopf-titel, .kachel-titel, .ergebnis-titel, .rm-titel { font-family: 'Baloo 2', 'Nunito', system-ui, sans-serif; line-height: 1.15; }
h2 { font-size: 1.35rem; margin: .3em 0 .5em; }
h3 { font-size: 1.1rem; margin: 1.2em 0 .5em; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

#app { max-width: 720px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
.seite { padding: 16px; }

/* ---------------------------------------------------------------- Kopf */
.kopf {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: var(--sattel);
  color: #FFF4E0;
  box-shadow: 0 3px 0 var(--sattel-d);
}
.kopf-titel { font-size: 1.35rem; font-weight: 700; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kopf-zurueck { background: rgba(255,255,255,.15); border: 0; color: inherit; width: 40px; height: 40px; border-radius: 12px; font-size: 1.6rem; line-height: 1; flex: none; }
.kopf-ton { background: none; border: 0; font-size: 1.3rem; padding: 4px; flex: none; }
.karotten-zahl { background: #FFF4E0; color: var(--sattel-d); border-radius: 999px; padding: 4px 12px; font-weight: 800; white-space: nowrap; flex: none; }

/* ---------------------------------------------------------------- Knöpfe */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 16px; padding: 14px 20px; font-weight: 800; font-size: 1.05rem;
  color: #fff; background: var(--wiese); box-shadow: 0 5px 0 var(--wiese-d);
  transition: transform .08s, box-shadow .08s, opacity .2s;
  touch-action: manipulation;
}
.knopf:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--wiese-d); }
.knopf:disabled { opacity: .45; }
.knopf-gruen { background: var(--wiese); --s: var(--wiese-d); box-shadow: 0 5px 0 var(--wiese-d); }
.knopf-blau { background: var(--blau); box-shadow: 0 5px 0 var(--blau-d); }
.knopf-rot { background: var(--rot); box-shadow: 0 5px 0 var(--rot-d); }
.knopf-braun { background: var(--sattel); box-shadow: 0 5px 0 var(--sattel-d); }
.knopf-gelb { background: var(--orange); box-shadow: 0 5px 0 #C2831B; }
.knopf-weiss { background: #fff; color: var(--tinte); box-shadow: 0 5px 0 var(--linie); }
.knopf.breit { width: 100%; margin-top: 16px; }
.knopf.klein { padding: 8px 14px; font-size: .95rem; box-shadow: 0 3px 0 rgba(0,0,0,.18); }
.knopf.gross { padding: 20px; font-size: 1.15rem; flex: 1; }
.knopf-reihe { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.knopf-reihe .knopf { flex: 1 1 140px; }
.link { background: none; border: 0; color: var(--tinte-2); text-decoration: underline; padding: 8px; }

.karte { background: var(--karte); border-radius: var(--radius); padding: 18px; box-shadow: 0 4px 0 var(--linie); margin-bottom: 16px; }
.hinweis { background: #FFF0C9; border-radius: 14px; padding: 12px 14px; }
.klein { font-size: .88rem; color: var(--tinte-2); }

/* ---------------------------------------------------------------- Sternli */
.sternli { display: flex; align-items: flex-end; gap: 10px; margin: 6px 0 18px; }
.sternli-kopf { width: 84px; height: 84px; flex: none; }
.sternli-kopf svg { width: 100%; height: 100%; }
.sprechblase {
  position: relative; background: #fff; border-radius: 18px; padding: 12px 16px; font-weight: 700;
  box-shadow: 0 3px 0 var(--linie); margin-bottom: 14px;
}
.sprechblase::before {
  content: ''; position: absolute; left: -9px; bottom: 14px; border: 10px solid transparent; border-right-color: #fff; border-left: 0;
}

/* ---------------------------------------------------------------- Anmeldung */
.anmelden { text-align: center; padding-top: calc(28px + env(safe-area-inset-top)); }
.logo { font-size: 3rem; margin: 0; color: var(--sattel); text-shadow: 0 3px 0 var(--heu); }
.untertitel { margin: 0 0 24px; color: var(--tinte-2); font-weight: 700; }
.wer-bist-du { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.wer { background: #fff; border: 0; border-radius: 22px; padding: 14px; width: 150px; box-shadow: 0 5px 0 var(--linie); }
.wer:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--linie); }
.wer-bild { width: 110px; height: 110px; margin: 0 auto; }
.wer-bild.gross { width: 130px; height: 130px; }
.wer-bild svg { width: 100%; height: 100%; }
.wer-name { font-weight: 800; font-size: 1.15rem; margin-top: 6px; }
.wer-rolle { font-size: .8rem; color: var(--tinte-2); }
.pin-punkte { display: flex; justify-content: center; gap: 14px; margin: 14px 0 20px; }
.pin-punkte i { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--sattel); }
.pin-punkte i.voll { background: var(--sattel); }
.wackeln { animation: wackeln .4s; }
@keyframes wackeln { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
.pin-tasten { display: grid; grid-template-columns: repeat(3, 76px); gap: 12px; justify-content: center; }
.pin-taste { height: 64px; border-radius: 18px; border: 0; background: #fff; font-size: 1.6rem; font-weight: 800; box-shadow: 0 4px 0 var(--linie); }
.pin-taste:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--linie); }
.pin-taste.leer { visibility: hidden; }

/* ---------------------------------------------------------------- Hof */
.countdown { background: var(--heu); border-radius: 14px; padding: 10px 14px; font-weight: 800; margin-bottom: 16px; box-shadow: 0 3px 0 var(--heu-d); text-align: center; }
.kacheln { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kachel {
  border: 0; border-radius: 22px; padding: 18px 14px; text-align: left; color: #fff; min-height: 150px;
  display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden;
}
.kachel:active { transform: translateY(4px); }
.kachel-icon { font-size: 2.4rem; line-height: 1; }
.kachel-titel { font-size: 1.3rem; font-weight: 800; margin-top: auto; }
.kachel-text { font-size: .9rem; opacity: .95; font-weight: 600; }
.kachel-gruen { background: var(--wiese); box-shadow: 0 6px 0 var(--wiese-d); }
.kachel-braun { background: var(--sattel); box-shadow: 0 6px 0 var(--sattel-d); }
.kachel-blau { background: var(--blau); box-shadow: 0 6px 0 var(--blau-d); }
.kachel-gold { background: linear-gradient(135deg, #F6CD52, #E39B2D); box-shadow: 0 6px 0 #B9781A; }
.kachel.gesperrt { filter: grayscale(.7); opacity: .75; }
.pokale { text-align: center; font-size: 1.6rem; margin-top: 18px; }
.pokale span { font-size: .95rem; font-weight: 700; color: var(--tinte-2); }
.fuss { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 28px; }
.sync-hinweis { font-size: .8rem; color: var(--tinte-2); }

/* ---------------------------------------------------------------- Kapitel */
.kapitel-liste { display: flex; flex-direction: column; gap: 12px; }
.kapitel-karte { display: flex; gap: 14px; align-items: center; background: #fff; border: 0; border-radius: 20px; padding: 12px; text-align: left; box-shadow: 0 4px 0 var(--linie); }
.kapitel-karte:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--linie); }
.kapitel-bild { width: 80px; height: 80px; flex: none; }
.kapitel-bild svg { width: 100%; height: 100%; }
.kapitel-info { flex: 1; min-width: 0; }
.kapitel-name { font-weight: 800; font-size: 1.1rem; }
.kapitel-rasse { font-size: .9rem; color: var(--tinte-2); font-weight: 700; }
.kapitel-klein { font-size: .8rem; color: var(--tinte-2); }
.balken { height: 10px; background: #F1E6D2; border-radius: 99px; overflow: hidden; margin: 6px 0 4px; }
.balken i { display: block; height: 100%; background: linear-gradient(90deg, var(--heu), var(--wiese)); border-radius: 99px; }

/* ---------------------------------------------------------------- Parcours */
.bahn-wrap { position: sticky; top: calc(60px + env(safe-area-inset-top)); z-index: 10; background: var(--creme); padding: 12px 16px 6px; }
.bahn { position: relative; display: flex; justify-content: space-between; gap: 4px; padding: 22px 0 4px; border-bottom: 4px solid #CDB58C; }
.hindernis { position: relative; flex: 1; height: 22px; display: flex; justify-content: space-between; max-width: 46px; margin: 0 auto; }
.hindernis .pfosten { width: 5px; background: #fff; border: 1px solid #C9B28A; border-radius: 2px; height: 22px; }
.hindernis .stange { position: absolute; left: 0; right: 0; top: 6px; height: 6px; border-radius: 3px; background: repeating-linear-gradient(90deg, var(--rot) 0 8px, #fff 8px 16px); transition: transform .4s, top .4s, background .3s; }
.hindernis.geschafft .stange { background: repeating-linear-gradient(90deg, var(--wiese) 0 8px, #fff 8px 16px); }
.hindernis.abgeworfen .stange { transform: rotate(18deg); top: 15px; opacity: .8; }
.hindernis.wackelt .stange { transform: rotate(6deg); background: repeating-linear-gradient(90deg, var(--orange) 0 8px, #fff 8px 16px); }
.reiter { position: absolute; top: -8px; left: -6px; font-size: 1.7rem; transition: left .7s cubic-bezier(.5,-0.3,.4,1.4); transform: scaleX(-1); }
.gangart { display: inline-block; margin-top: 8px; padding: 3px 12px; border-radius: 99px; font-weight: 800; font-size: .85rem; background: #EFE4D0; color: var(--tinte-2); transition: background .3s; }
.gangart.trab { background: #FBE3A8; color: #8A5A0F; }
.gangart.galopp { background: var(--rot); color: #fff; animation: puls 1s infinite; }
@keyframes puls { 50% { transform: scale(1.06); } }
.zaehler { font-size: .85rem; font-weight: 800; color: var(--tinte-2); text-transform: uppercase; letter-spacing: .04em; }

.frage-box { background: #fff; border-radius: 22px; padding: 18px; box-shadow: 0 4px 0 var(--linie); margin-top: 8px; }
.frage-typ { display: inline-block; background: var(--heu); border-radius: 99px; padding: 2px 10px; font-size: .78rem; font-weight: 800; }
.frage-text { font-size: 1.35rem; margin: .4em 0 .2em; }
.frage-tipp { font-size: .9rem; color: var(--tinte-2); margin: 0 0 14px; }
.beantwortet .frage-tipp { visibility: hidden; }

.optionen { display: flex; flex-direction: column; gap: 10px; }
.option {
  text-align: left; border: 3px solid var(--linie); background: #FFFCF6; border-radius: 16px; padding: 14px 16px;
  font-weight: 700; font-size: 1.02rem; transition: border-color .15s, background .15s, transform .1s;
}
.option:active:not(:disabled) { transform: scale(.98); }
.option.haken { padding-left: 46px; position: relative; }
.option.haken::before { content: ''; position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 6px; border: 3px solid #CDB58C; background: #fff; }
.option.gewaehlt { border-color: var(--blau); background: #EAF2FF; }
.option.gewaehlt::before { background: var(--blau); border-color: var(--blau); box-shadow: inset 0 0 0 3px #fff; }
.ist-richtig, .option.ist-richtig { border-color: var(--wiese) !important; background: #E5F5E2 !important; }
.ist-falsch, .option.ist-falsch { border-color: var(--orange) !important; background: #FFF0D6 !important; }
.option.ist-richtig::after { content: '✓'; float: right; color: var(--wiese-d); font-weight: 900; }
.option.ist-falsch::after { content: '✗'; float: right; color: #C2831B; font-weight: 900; }
.option.vergessen { border-style: dashed; border-color: var(--wiese); }
.option.vergessen::after { content: 'vergessen'; float: right; font-size: .75rem; color: var(--wiese-d); }

.pruefen { width: 100%; margin-top: 16px; }

.lueckensatz { font-size: 1.15rem; line-height: 2.4; font-weight: 600; }
.luecke {
  display: inline-block; min-width: 80px; border: 0; border-bottom: 3px dashed #CDB58C; background: #FFF6E2; border-radius: 10px 10px 0 0;
  padding: 0 10px; margin: 0 3px; font-weight: 800; line-height: 1.8; vertical-align: baseline;
}
.luecke.voll { border-bottom-style: solid; border-color: var(--blau); background: #EAF2FF; }
.luecke.drueber, .stallbox.drueber, .wortbank.drueber { outline: 3px solid var(--heu); }
.wortbank { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px; margin-top: 12px; min-height: 60px; background: #F8F0E1; border-radius: 16px; }
.chip {
  border: 0; background: #fff; border-radius: 12px; padding: 10px 14px; font-weight: 800; box-shadow: 0 3px 0 #D8C6A6;
  touch-action: none; user-select: none; -webkit-user-select: none; transition: opacity .15s, transform .1s;
}
.chip.benutzt { opacity: .25; pointer-events: none; }
.chip.gewaehlt { background: var(--blau); color: #fff; box-shadow: 0 3px 0 var(--blau-d); transform: translateY(-2px); }
.chip.wird-gezogen { opacity: .3; }
.chip.ist-richtig { background: #E5F5E2; box-shadow: 0 3px 0 var(--wiese); }
.chip.ist-falsch { background: #FFF0D6; box-shadow: 0 3px 0 var(--orange); }
.geist { position: fixed; z-index: 100; pointer-events: none; transform: rotate(-3deg) scale(1.08); box-shadow: 0 10px 20px rgba(0,0,0,.2); }
.luecke s { opacity: .55; font-weight: 600; }
.luecke s + b { color: var(--wiese-d); }
.gehoert { display: block; font-size: .8rem; font-weight: 700; color: #A86A10; }

.staelle { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.staelle.vier { grid-template-columns: 1fr 1fr; }
.stallbox { background: #F3E3C8; border-radius: 14px; overflow: hidden; min-height: 120px; display: flex; flex-direction: column; border: 3px solid transparent; transition: border-color .2s; }
.staelle.wartet .stallbox { border-color: var(--blau); cursor: pointer; }
.staelle.wartet .stallbox:hover { box-shadow: 0 0 0 3px var(--heu); }
.stall-dach { background: var(--sattel); color: #fff; font-weight: 800; text-align: center; padding: 6px 4px; clip-path: polygon(0 30%, 50% 0, 100% 30%, 100% 100%, 0 100%); padding-top: 14px; font-size: .95rem; }
.stall-inhalt { padding: 8px 8px 0; display: flex; flex-direction: column; gap: 6px; }
.ablage { margin: 8px; min-height: 52px; border: 2px dashed #CDB58C; border-radius: 12px; display: grid; place-items: center; color: #A88E66; font-weight: 800; font-size: .9rem; flex: 1; transition: background .15s, border-color .15s, color .15s; }
.staelle.wartet .ablage { border-color: var(--blau); color: var(--blau); background: #EAF2FF; }
.staelle.wartet .stallbox:hover .ablage, .stallbox.drueber .ablage { background: var(--blau); color: #fff; }
.beantwortet .ablage { display: none; }
.stall-inhalt .chip { text-align: left; font-size: .92rem; padding: 8px 10px; }

.reihe { counter-reset: r; list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.reihe li { counter-increment: r; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.reihe li::before { content: counter(r); width: 30px; height: 30px; border-radius: 50%; background: var(--heu); display: grid; place-items: center; font-weight: 900; flex: none; }
.reihe li.leer { color: #C9B28A; font-weight: 800; }
.reihe .chip { flex: 1; text-align: left; }

.aussage { font-size: 1.25rem; font-weight: 800; background: #FFF6E2; border-radius: 16px; padding: 18px; margin-bottom: 14px; }
.ja-nein { display: flex; gap: 12px; }
.ja-nein .ist-richtig { outline: 4px solid var(--wiese-d); }
.ja-nein .ist-falsch { opacity: .6; }

.karteikarte { position: relative; min-height: 200px; perspective: 900px; }
.kk-vorne, .kk-hinten {
  position: absolute; inset: 0; border-radius: 18px; padding: 18px; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  transition: transform .5s; display: flex; flex-direction: column; justify-content: center;
}
.kk-vorne { background: repeating-linear-gradient(0deg, #FFFCF4 0 30px, #EFE4D0 30px 31px); text-align: center; font-weight: 700; color: var(--tinte-2); }
.kk-icon { font-size: 3rem; }
.kk-hinten { background: #EAF2FF; transform: rotateY(180deg); overflow: auto; }
.kk-hinten ul { margin: 0; padding-left: 20px; font-weight: 700; }
.kk-hinten li { margin: 4px 0; }
.karteikarte.umgedreht .kk-vorne { transform: rotateY(-180deg); }
.karteikarte.umgedreht .kk-hinten { transform: rotateY(0); position: relative; }
.bewerten { text-align: center; margin-top: 14px; }
.bewerten p { font-weight: 800; margin: 6px 0 10px; }
.bewerten-knoepfe { display: flex; gap: 8px; flex-wrap: wrap; }
.bewerten-knoepfe .knopf { flex: 1 1 100px; padding: 12px 8px; font-size: .95rem; }

.rueckmeldung { margin-top: 14px; border-radius: 22px; padding: 16px 18px; animation: hoch .35s ease-out; }
.rueckmeldung.gut { background: #E5F5E2; border: 3px solid var(--wiese); }
.rueckmeldung.nochmal { background: #FFF3DC; border: 3px solid var(--orange); }
.rm-titel { font-size: 1.5rem; font-weight: 800; }
.rm-plus { font-size: 1.1rem; color: var(--wiese-d); }
.rm-label { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--tinte-2); margin-top: 8px; }
.rm-antwort ul { margin: 4px 0 0; padding-left: 20px; }
.rm-antwort li { margin: 2px 0; font-weight: 600; }
.rm-trost { font-size: .9rem; margin: 10px 0 0; color: #8A5A0F; font-weight: 700; }
@keyframes hoch { from { transform: translateY(20px); opacity: 0; } }

/* ---------------------------------------------------------------- Ergebnis */
.ergebnis { text-align: center; }
.ergebnis-titel { font-size: 2.3rem; color: var(--sattel); margin: 10px 0 4px; }
.ergebnis-zahl { font-size: 1.15rem; }
.ergebnis-zahl b { font-size: 1.4rem; }
.ergebnis-karotten { display: inline-block; background: #fff; border-radius: 99px; padding: 8px 18px; font-weight: 900; font-size: 1.2rem; margin: 14px 0; box-shadow: 0 3px 0 var(--linie); }
.ergebnis-karotten small { font-weight: 700; font-size: .8rem; color: var(--tinte-2); }
.ergebnis-text { font-weight: 800; font-size: 1.1rem; }
.fakt { background: #fff; border-radius: 14px; padding: 12px; margin: 0 auto; max-width: 420px; }
.pokal-gross { font-size: 6rem; animation: hopsen 1s ease-in-out infinite; }
.rosette-gross { margin-top: 10px; animation: hopsen 1.2s ease-in-out infinite; }
@keyframes hopsen { 50% { transform: translateY(-8px) rotate(-4deg); } }
.neue-rasse { margin: 10px 0; }
.nr-karte { position: relative; width: 200px; height: 240px; margin: 0 auto; perspective: 800px; }
.nr-rueck, .nr-vorne { position: absolute; inset: 0; border-radius: 20px; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .8s; }
.nr-rueck { background: repeating-linear-gradient(45deg, var(--sattel) 0 12px, var(--sattel-d) 12px 24px); color: #fff; font-size: 5rem; display: grid; place-items: center; font-weight: 900; }
.nr-vorne { background: #fff; transform: rotateY(180deg); padding: 14px; box-shadow: 0 6px 0 var(--heu-d); border: 4px solid var(--heu); }
.nr-vorne b { font-size: 1.2rem; }
.neue-rasse.aufgedeckt .nr-rueck { transform: rotateY(-180deg); }
.neue-rasse.aufgedeckt .nr-vorne { transform: rotateY(0); }

/* ---------------------------------------------------------------- Stall */
.stall-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.box { position: relative; background: #C99A63; border: 0; border-radius: 16px; padding: 0 10px 12px; box-shadow: 0 5px 0 #8E6236; background-image: repeating-linear-gradient(90deg, rgba(0,0,0,.06) 0 2px, transparent 2px 22px); }
.box.leer { filter: saturate(.4); }
.box.gold { box-shadow: 0 5px 0 #B9781A, 0 0 0 3px var(--gold); }
.box-schild { background: #FFF4E0; border-radius: 0 0 10px 10px; font-weight: 800; padding: 4px 6px; font-size: .9rem; margin: 0 auto 8px; width: fit-content; box-shadow: 0 2px 0 rgba(0,0,0,.15); }
.box-bild { width: 100%; aspect-ratio: 1; }
.box-bild svg { width: 100%; height: 100%; }
.box-sterne { margin-top: 6px; color: #fff; font-weight: 800; font-size: .85rem; min-height: 1.2em; }
.box-rosetten { position: absolute; top: 34px; right: 6px; display: flex; align-items: center; }
.box-rosetten b { color: #fff; font-size: .85rem; text-shadow: 0 1px 2px rgba(0,0,0,.5); }

.pferd-bild { width: min(280px, 80vw); aspect-ratio: 1; margin: 0 auto 14px; }
.pferd-bild svg { width: 100%; height: 100%; filter: drop-shadow(0 6px 0 rgba(0,0,0,.08)); }
.pferd-bild.gold { animation: glanz 2.5s ease-in-out infinite; }
@keyframes glanz { 50% { filter: drop-shadow(0 0 14px #F6D365); } }
.pferd-steckbrief h2 span { font-size: 1rem; }
.shop { display: flex; flex-direction: column; gap: 10px; }
.shop-zeile { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #fff; border-radius: 16px; padding: 12px 14px; box-shadow: 0 3px 0 var(--linie); }
.shop-info { flex: 1; min-width: 150px; display: flex; flex-direction: column; }
.shop-info small { color: var(--tinte-2); }
.fehlt { width: 100%; text-align: right; color: var(--tinte-2); }
.schalter { width: 56px; height: 32px; border-radius: 99px; border: 0; background: #DCCFB8; position: relative; transition: background .2s; }
.schalter i { position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.schalter.an { background: var(--wiese); }
.schalter.an i { left: 28px; }
.farben { display: flex; gap: 8px; width: 100%; }
.farbe { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px #DCCFB8; }
.farbe.aktiv { box-shadow: 0 0 0 3px var(--tinte); }

/* ---------------------------------------------------------------- Formulare / Admin */
.formular label, .formular .label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; margin-bottom: 12px; font-size: .95rem; }
.formular input:not([type=checkbox]), .formular select, .formular textarea, .zeile input, .zeile select {
  border: 2px solid var(--linie); border-radius: 12px; padding: 10px 12px; background: #FFFCF6; width: 100%;
}
.formular textarea.mono { font-family: ui-monospace, Menlo, monospace; font-size: .85rem; }
.formular code { display: block; margin: -6px 0 12px; word-break: break-all; }
.zeile { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.zeile input[type=checkbox] { width: 22px; height: 22px; flex: none; }
.avatar-wahl { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 14px; }
.avatar { border: 3px solid transparent; background: none; border-radius: 50%; padding: 0; aspect-ratio: 1; }
.avatar svg { width: 100%; height: 100%; display: block; }
.avatar.aktiv { border-color: var(--blau); }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 4px; }
.tab { border: 0; background: #fff; border-radius: 99px; padding: 8px 14px; font-weight: 800; white-space: nowrap; box-shadow: 0 2px 0 var(--linie); }
.tab.aktiv { background: var(--sattel); color: #fff; }
.admin-kind { display: flex; align-items: center; gap: 10px; }
.admin-kind h2 { margin: 0; }
.admin-kind small { font-weight: 600; color: var(--tinte-2); font-size: .9rem; }
.mini { width: 48px; height: 48px; flex: none; }
.mini svg { width: 100%; height: 100%; }
.zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin-top: 12px; }
.zahl { background: var(--creme); border-radius: 12px; padding: 8px; text-align: center; display: flex; flex-direction: column; }
.zahl b { font-size: 1.3rem; }
.zahl small { font-size: .78rem; color: var(--tinte-2); }
.admin-balken { display: grid; grid-template-columns: minmax(110px, 1fr) 2fr 44px; align-items: center; gap: 8px; font-size: .9rem; }
.admin-balken b { text-align: right; }
.schwierig { padding-left: 20px; font-size: .92rem; }
.schwierig small { color: var(--tinte-2); }
.fragen-liste { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.fragen-zeile { display: grid; grid-template-columns: 44px 1fr; gap: 2px 8px; text-align: left; border: 0; background: var(--creme); border-radius: 12px; padding: 10px; }
.fragen-zeile .id { font-weight: 800; color: var(--sattel); grid-row: span 2; }
.fragen-zeile small { color: var(--tinte-2); }
.fragen-zeile.inaktiv { opacity: .5; }
details { margin-top: 12px; }
summary { cursor: pointer; font-weight: 700; }
.vorschau { margin-top: 10px; }

/* ---------------------------------------------------------------- Diverses */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 200;
  background: var(--tinte); color: #fff; padding: 12px 20px; border-radius: 14px; font-weight: 700; max-width: 90vw; text-align: center;
  animation: hoch .25s ease-out; transition: opacity .4s;
}
.toast.weg { opacity: 0; }
.konfetti { position: fixed; inset: 0; pointer-events: none; z-index: 150; overflow: hidden; }
.konfetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: fallen linear forwards; }
@keyframes fallen { to { top: 110vh; transform: rotate(720deg) translateX(40px); } }

@media (max-width: 380px) {
  .kacheln { gap: 10px; }
  .kachel { min-height: 130px; padding: 14px 12px; }
  .kachel-titel { font-size: 1.1rem; }
  .frage-text { font-size: 1.2rem; }
  .pin-tasten { grid-template-columns: repeat(3, 68px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
