/* Kopfsprung – Erscheinungsbild „Wettkampf“: Anzeigetafel und Schwimmbad-Beschilderung.
   Wenige ruhige Farben, eine Schriftfamilie (Barlow, SIL OFL 1.1, liegt in schrift/), klare Flaechen,
   einheitliche Ecken (12 px, Karten 16 px). Keine Verlaeufe auf Knoepfen, keine Glas-Effekte. */
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url(schrift/barlow-condensed-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-display: swap; src: url(schrift/barlow-condensed-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 800; font-display: swap; src: url(schrift/barlow-condensed-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 800; font-style: italic; font-display: swap; src: url(schrift/barlow-condensed-latin-800-italic.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-display: swap; src: url(schrift/barlow-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-display: swap; src: url(schrift/barlow-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 700; font-display: swap; src: url(schrift/barlow-latin-700-normal.woff2) format('woff2'); }

:root {
  --tinte: #0E2A3B; --tinte2: #163A50; --tinte3: #1E4A63;
  --kreide: #F4EFE6; --papier: #FBF8F2; --linie: rgba(14, 42, 59, .12);
  --becken: #1FA3B5; --koralle: #E8553D; --koralle-d: #C9432D; --sonne: #F2B33D; --schiefer: #5E6E78;
  --anzeige: 'Barlow Condensed', 'Arial Narrow', sans-serif; --text: 'Barlow', system-ui, sans-serif;
  --r: 12px; --rk: 16px;
  --flaeche: #EDE8DF; --flaeche2: #F2EDE3; --markiert: #EFF7F8; --erfolgGrund: #E1F2EE; --erfolg: #126E5C;
  --kante: 4px solid var(--tinte); --logo: 'Barlow Condensed', sans-serif; --logoStil: italic;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: var(--tinte); overflow: hidden; overscroll-behavior: none; }
body {
  display: flex; flex-direction: column; height: 100dvh;
  font-family: var(--text); font-weight: 500; color: var(--tinte);
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
[hidden] { display: none !important; }
svg { fill: currentColor; }

#stage { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; }
#c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

/* Platzhalter: in der Android-Fassung sitzt hier der AdMob-Banner (50–60 dp hoch). */
#ad {
  flex: 0 0 auto; height: calc(56px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: #E9ECEE; border-top: 1px solid #CDD3D7; color: #6B7680; font-size: 13px;
  display: flex; align-items: center; justify-content: center; gap: 8px; position: relative;
}
body.werbefrei #ad { display: none; }
#adWeg { position: absolute; right: 6px; top: 6px; width: 44px; height: 44px; display: grid; place-items: center; color: #6B7680; }
#adWeg svg { width: 18px; height: 18px; }
.adMarke { font-size: 10px; font-weight: 700; border: 1px solid #9AA4AC; border-radius: 3px; padding: 1px 4px; letter-spacing: .04em; }

/* ---------- Bausteine ---------- */
.rund {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: var(--r); color: var(--tinte);
  background: var(--papier); display: grid; place-items: center; box-shadow: 0 1px 2px rgba(14, 42, 59, .18);
}
.rund svg { width: 22px; height: 22px; }
.rund.flach { background: var(--flaeche); box-shadow: none; }
.rund.gross2 { width: 56px; height: 56px; flex-basis: 56px; background: var(--tinte2); color: var(--kreide); box-shadow: none; }
.rund.gross2 svg { width: 26px; height: 26px; }
.rund:active, .ik:active, .spielen:active, .gross:active, .knopf:active { transform: translateY(1px); filter: brightness(.95); }
.si { width: 18px; height: 18px; color: var(--sonne); vertical-align: -3px; }
.pille {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 10px; border-radius: var(--r);
  background: var(--tinte2); color: var(--kreide); font-family: var(--anzeige); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums;
}
.pille .si { width: 20px; height: 20px; }
.sterne { display: inline-flex; gap: 2px; flex: 0 0 auto; }
.sterne svg { width: 20px; height: 20px; color: rgba(14, 42, 59, .16); }
.sterne svg.voll { color: var(--sonne); }
.sterne svg.voll.bonus { color: #E58A2E; }
.sterne.klein svg { width: 16px; height: 16px; }

/* Symbole im Text und Symbol-Marken (z. B. Salto 1½, kopfvoran, 2× einrollen) */
.ic { width: 1.15em; height: 1.15em; vertical-align: -.22em; flex: 0 0 auto; }
.syms { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.sym {
  display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 7px 0 5px; border-radius: 6px;
  background: var(--flaeche); color: var(--tinte); font-family: var(--anzeige); font-weight: 700; font-size: 16px; line-height: 1;
}
.sym svg { width: 17px; height: 17px; color: var(--tinte); }
.sym.text { font-family: var(--text); font-weight: 600; font-size: 13px; background: none; padding: 0 2px; color: var(--schiefer); }
.zeileSym { display: inline-flex; align-items: center; gap: 4px; }
.zeileSym + .zeileSym::before { content: "·"; margin: 0 6px 0 2px; opacity: .6; }

/* ---------- Kopfleiste im Spiel ---------- */
.hud {
  position: absolute; left: 0; right: 0; top: 0; pointer-events: none;
  padding: calc(10px + env(safe-area-inset-top)) 12px 0;
  display: flex; align-items: flex-start; justify-content: space-between;
}
.hud .rund { pointer-events: auto; }
.tafel {
  flex: 1; min-width: 0; max-width: 330px; margin: 0 auto; pointer-events: auto; cursor: pointer; overflow: hidden;
  background: var(--papier); border-radius: var(--r); box-shadow: 0 2px 8px rgba(14, 42, 59, .22);
}
.hud .tafel { margin: 0 10px; }
.t1 { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px 0; font-size: 13px; font-weight: 600; color: var(--schiefer); }
.t2 { padding: 0 12px 7px; font-family: var(--anzeige); font-weight: 700; font-size: 21px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t3 { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 4px 6px 4px 12px; border-top: 1px solid var(--linie); background: var(--flaeche2); animation: herab .2s ease-out; }
#kNote { font-family: var(--anzeige); font-size: 19px; font-weight: 800; white-space: nowrap; }
#kPunkte { font-family: var(--anzeige); font-size: 19px; font-weight: 700; color: var(--schiefer); font-variant-numeric: tabular-nums; }
#kPunkte:empty { display: none; }
#kZeile { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 13px; font-weight: 600; color: var(--schiefer); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
#kBonus:empty { display: none; }
#kBonus .bonusMini { height: 30px; font-size: 16px; }
#saltos {
  position: absolute; left: 0; right: 0; top: calc(78px + env(safe-area-inset-top)); text-align: center; pointer-events: none;
  font-family: var(--anzeige); font-size: 76px; font-weight: 800; color: #fff; line-height: 1;
  text-shadow: 0 2px 0 rgba(14, 42, 59, .3); transition: transform .12s ease-out; font-variant-numeric: tabular-nums;
}
#saltos.pop { transform: scale(1.15); }
body:not([data-modus="spiel"]) .hud, body:not([data-modus="spiel"]) #saltos { display: none; }

@keyframes herab { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Anleitung ---------- */
#anleitung { position: absolute; left: 0; right: 0; bottom: 70px; display: flex; flex-direction: column; align-items: center; gap: 18px; pointer-events: none; }
#aText {
  background: var(--tinte); color: var(--kreide); font-family: var(--anzeige); font-weight: 700; font-size: 23px; line-height: 1.2;
  padding: 14px 20px; border-radius: var(--rk); text-align: center; max-width: calc(100% - 32px); letter-spacing: .01em;
}
.finger { width: 64px; height: 64px; border-radius: 50%; background: var(--kreide); position: relative; box-shadow: 0 2px 6px rgba(14, 42, 59, .3); }
.finger::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid var(--kreide); }
.finger.tipp { animation: tippen 1.1s ease-in-out infinite; }
.finger.tipp::after { animation: ring 1.1s ease-out infinite; }
.finger.halt { animation: halten 1.6s ease-in-out infinite; }
.finger.halt::after { animation: ringHalt 1.6s linear infinite; }
.finger.los { animation: los .8s ease-out infinite; background: var(--sonne); }
.finger.los::after { animation: ring .8s ease-out infinite; border-color: var(--sonne); }
@keyframes tippen { 0%, 100% { transform: scale(1); } 25% { transform: scale(.78); } 45% { transform: scale(1); } }
@keyframes ring { 0%, 30% { transform: scale(.8); opacity: 0; } 40% { opacity: 1; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes halten { 0% { transform: scale(1); } 20%, 80% { transform: scale(.78); } 100% { transform: scale(1); } }
@keyframes ringHalt { 0% { transform: scale(.9); opacity: .2; } 50% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(.9); opacity: .2; } }
@keyframes los { 0% { transform: scale(.78); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }

/* ---------- Ueberlagerungen ---------- */
.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; }
.overlay.dunkel { background: rgba(8, 24, 34, .6); }
@keyframes hoch { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Ergebnis: unten, damit der Spritzer sichtbar bleibt; Tippen daneben = nochmal. */
#ergebnis { align-items: flex-end; pointer-events: none; padding-bottom: 16px; }
.karte {
  pointer-events: auto; width: 100%; max-width: 380px; background: var(--papier); border-radius: var(--rk);
  padding: 16px 16px 14px; text-align: center; box-shadow: 0 8px 30px rgba(8, 24, 34, .35); animation: hoch .22s ease-out;
  border-top: var(--kante);
}
.eKopf { font-size: 14px; font-weight: 600; color: var(--schiefer); }
.eKopf:empty { display: none; }
#eNote { font-family: var(--anzeige); font-size: 42px; font-weight: 800; line-height: 1.05; margin-top: 2px; }
#eZeile { font-size: 16px; font-weight: 600; color: var(--schiefer); margin-top: 4px; display: flex; justify-content: center; flex-wrap: wrap; font-family: var(--anzeige); }
#eZeile .ic { width: 19px; height: 19px; color: var(--tinte); }
#eTipp { font-size: 15px; color: var(--tinte); margin-top: 4px; font-weight: 600; }
#eTipp:empty { display: none; }
#ePunkte { font-family: var(--anzeige); font-size: 56px; font-weight: 800; margin-top: 2px; line-height: 1; font-variant-numeric: tabular-nums; }
#eRekord { font-size: 14px; font-weight: 600; color: var(--schiefer); margin-top: 2px; }
#eRekord.neu { color: #9A6A00; font-weight: 700; }
#eRekord:empty { display: none; }
#eSterne { display: grid; gap: 0; margin-top: 12px; border-top: 1px solid var(--linie); }
#eSterne:empty { display: none; }
.neuStern {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 0 2px;
  border-bottom: 1px solid var(--linie); font-weight: 700; font-size: 15px; text-align: left; animation: hoch .25s ease-out both;
}
.neuAufgabe { color: #126E7C; }
.neuAufgabe .auf { width: 22px; height: 22px; color: var(--becken); flex: 0 0 22px; }
#eFrei { margin-top: 10px; background: var(--erfolgGrund); color: var(--erfolg); font-family: var(--anzeige); font-weight: 700; font-size: 20px; border-radius: var(--r); padding: 8px 10px; }
.knoepfe { display: flex; gap: 8px; margin-top: 14px; justify-content: center; }
.ik { width: 60px; height: 52px; border-radius: var(--r); background: var(--flaeche); color: var(--tinte); display: grid; place-items: center; }
.ik svg { width: 26px; height: 26px; }
.ik.haupt { flex: 1; max-width: 160px; background: var(--koralle); color: #fff; }
.ik.haupt svg { width: 30px; height: 30px; }
.ik.gold { background: var(--sonne); color: var(--tinte); }

/* Bonus-Stern per Video */
.bonusKnopf {
  display: flex; align-items: center; gap: 6px; width: 100%; min-height: 48px; margin-top: 10px; padding: 0 14px;
  border-radius: var(--r); background: var(--tinte); color: var(--kreide); font-family: var(--anzeige); font-weight: 700; text-align: left;
}
.bonusKnopf .bv { width: 24px; height: 24px; flex: 0 0 24px; color: var(--sonne); }
.bonusKnopf .bp { font-size: 20px; }
.bonusKnopf .bs { width: 20px; height: 20px; color: var(--sonne); }
.bonusKnopf .bt { flex: 1; min-width: 0; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: 4px; color: rgba(244, 239, 230, .8); }
.bonusMini {
  display: inline-flex; align-items: center; gap: 2px; height: 34px; padding: 0 10px 0 8px; border-radius: 10px; flex: 0 0 auto;
  background: var(--tinte); color: var(--kreide); font-family: var(--anzeige); font-weight: 700; font-size: 17px;
}
.bonusMini svg { width: 18px; height: 18px; color: var(--sonne); }

#toast {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 45; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: var(--r); background: var(--tinte); color: var(--kreide); font-weight: 700; font-size: 15px;
  text-align: center; box-shadow: 0 6px 20px rgba(8, 24, 34, .35); transition: opacity .3s; pointer-events: none;
}
#toast.weg { opacity: 0; }

/* Levelauswahl */
.blatt {
  width: 100%; max-width: 420px; max-height: 100%; overflow-y: auto; background: var(--papier); border-radius: var(--rk);
  padding: 16px 16px 14px; box-shadow: 0 10px 40px rgba(8, 24, 34, .4); animation: hoch .22s ease-out; touch-action: pan-y;
  border-top: var(--kante);
}
.blattKopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
#blattTitel { font-family: var(--anzeige); font-size: 30px; font-weight: 800; line-height: 1.05; }
.blattUnter { font-family: var(--anzeige); font-size: 18px; font-weight: 700; color: var(--schiefer); margin-top: 2px; font-variant-numeric: tabular-nums; }
#aufgabenListe { list-style: none; border-top: 1px solid var(--linie); }
#aufgabenListe li { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 6px 4px; border-bottom: 1px solid var(--linie); cursor: pointer; position: relative; }
#aufgabenListe li.ziel { background: var(--markiert); box-shadow: inset 3px 0 0 var(--becken); }
#aufgabenListe li.zu { cursor: default; }
#aufgabenListe li.zu .at, #aufgabenListe li.zu .lnr { opacity: .45; }
#aufgabenListe .lnr {
  flex: 0 0 34px; height: 34px; border-radius: 8px; display: grid; place-items: center;
  background: var(--tinte); color: var(--kreide); font-family: var(--anzeige); font-weight: 800; font-size: 19px; margin-left: 4px;
}
#aufgabenListe li.fertig .lnr { background: var(--sonne); color: var(--tinte); }
#aufgabenListe li.zu .lnr { background: #9AA6AE; }
#aufgabenListe .at { flex: 1; min-width: 0; font-family: var(--anzeige); font-weight: 700; font-size: 19px; line-height: 1.15; }
#aufgabenListe .ah { display: block; font-family: var(--text); font-weight: 500; font-size: 13px; color: var(--schiefer); margin-top: 1px; }
#aufgabenListe .schl { width: 20px; height: 20px; color: #8B979F; margin-right: 6px; }
.blattFuss { font-size: 13px; color: var(--schiefer); text-align: center; margin: 12px 6px 0; line-height: 1.4; }
.blattFuss:empty { display: none; }
.blattFuss { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; font-family: var(--anzeige); font-weight: 700; font-size: 17px; color: var(--tinte); }
.legende { display: inline-flex; align-items: center; gap: 5px; }
.legende .ic { width: 18px; height: 18px; }
.gross { display: grid; place-items: center; width: 100%; height: 54px; margin-top: 12px; border-radius: var(--r); background: var(--koralle); color: #fff; }
.gross svg { width: 30px; height: 30px; }
.gross.gold { background: var(--sonne); color: var(--tinte); font-family: var(--anzeige); font-size: 24px; font-weight: 800; }

.dialog { width: 100%; max-width: 340px; background: var(--papier); border-radius: var(--rk); padding: 20px 18px 16px; animation: hoch .2s ease-out; border-top: var(--kante); }
.dialogText { font-size: 17px; font-weight: 600; text-align: center; line-height: 1.4; }
.knopf { flex: 1; height: 50px; border-radius: var(--r); background: var(--flaeche); font-weight: 700; font-size: 16px; }
.knopf.rot { background: var(--koralle); color: #fff; }

/* ---------- Seiten ---------- */
.seite { position: absolute; inset: 0; display: flex; flex-direction: column; }
.seite.voll {
  background: var(--tinte); color: var(--kreide); overflow-y: auto; touch-action: pan-y;
  padding: calc(12px + env(safe-area-inset-top)) 16px 20px; animation: seiteRein .2s ease-out;
}
@keyframes seiteRein { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; } }
.seitenKopf { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 480px; margin: 0 auto 16px; }
.seitenKopf h2 { flex: 1; font-family: var(--anzeige); font-size: 32px; font-weight: 800; letter-spacing: .01em; }
.seite.voll .rund { background: var(--tinte2); color: var(--kreide); box-shadow: none; }

/* Startseite: das Spiel laeuft dahinter als Vorfuehrung */
#start {
  justify-content: space-between; align-items: center; text-align: center; color: var(--kreide);
  padding: calc(34px + env(safe-area-inset-top)) 20px 24px;
  background: linear-gradient(180deg, rgba(14, 42, 59, .62) 0%, rgba(14, 42, 59, 0) 32%, rgba(14, 42, 59, 0) 56%, rgba(14, 42, 59, .78) 100%);
}
.startOben { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.logo { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.logo .marke { width: 64px; height: 64px; }
.logo .wort {
  font-family: var(--logo); font-style: var(--logoStil); font-weight: 800; font-size: clamp(56px, 17vw, 80px); line-height: .95;
  letter-spacing: -.01em; color: var(--kreide); text-shadow: 0 2px 0 rgba(14, 42, 59, .35);
}
.startSterne { font-family: var(--anzeige); font-weight: 700; font-size: 20px; color: var(--kreide); letter-spacing: .02em; display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.startSterne .si { width: 20px; height: 20px; }
.startUnten { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.spielen {
  width: 108px; height: 108px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sonne); color: var(--tinte); box-shadow: 0 6px 18px rgba(8, 24, 34, .4), inset 0 -4px 0 rgba(14, 42, 59, .12);
  animation: puls 2.4s ease-in-out infinite;
}
.spielen svg { width: 52px; height: 52px; margin-left: 7px; }
@keyframes puls { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.startOrt { font-weight: 600; font-size: 16px; display: flex; align-items: center; gap: 6px; color: rgba(244, 239, 230, .9); min-height: 20px; }
.startLeiste { display: flex; gap: 12px; margin-top: 6px; }

/* Orte */
#ortListe { display: grid; gap: 12px; width: 100%; max-width: 480px; margin: 0 auto; }
.ortKarte { position: relative; display: block; width: 100%; height: 132px; border-radius: var(--rk); overflow: hidden; text-align: left; color: #fff; background: var(--tinte2); }
.ortKarte img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ortKarte::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(14, 42, 59, .78) 0%, rgba(14, 42, 59, 0) 62%); }
.ortKarte .oi { position: absolute; z-index: 1; left: 16px; bottom: 12px; right: 14px; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.ortKarte .on { font-family: var(--anzeige); font-size: 30px; font-weight: 800; line-height: 1; }
.ortKarte .oh { font-family: var(--anzeige); font-size: 17px; font-weight: 700; opacity: .85; margin-top: 2px; }
.ortKarte .os { display: flex; align-items: center; gap: 5px; font-family: var(--anzeige); font-weight: 800; font-size: 22px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ortKarte .os .si { width: 20px; height: 20px; }
.ortKarte .orek { position: absolute; z-index: 1; top: 10px; right: 10px; display: flex; align-items: center; gap: 4px; font-family: var(--anzeige); font-size: 16px; font-weight: 700; background: rgba(14, 42, 59, .7); padding: 3px 9px; border-radius: 8px; }
.ortKarte.zu img { filter: grayscale(.9) brightness(.5); }
.ortKarte.zu .schloss { position: absolute; z-index: 1; top: 10px; right: 10px; display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; background: rgba(14, 42, 59, .85); padding: 5px 10px 5px 8px; border-radius: 8px; }
.ortKarte.zu .schloss svg { width: 16px; height: 16px; }
.ortKarte .balken { position: absolute; z-index: 1; left: 0; bottom: 0; height: 4px; background: var(--sonne); }

/* Einstellungen */
.einst { width: 100%; max-width: 480px; margin: 0 auto; background: var(--tinte2); border-radius: var(--rk); overflow: hidden; }
.zeile {
  display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 8px 16px; color: var(--kreide);
  font-weight: 600; font-size: 17px; text-align: left; width: 100%; border-bottom: 1px solid rgba(244, 239, 230, .08);
}
.zeile > span { flex: 1; }
.zi { width: 24px; height: 24px; flex: 0 0 24px; color: var(--becken); }
.chev { width: 22px; height: 22px; opacity: .5; }
.zeile.rot .zi, .zeile.rot span { color: #F08A78; }
.zeile input[type=range] { width: 42%; max-width: 200px; accent-color: var(--sonne); height: 32px; }
.schalter { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 15px; background: rgba(244, 239, 230, .22); position: relative; cursor: pointer; transition: background .15s; flex: 0 0 auto; }
.schalter::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--kreide); transition: transform .15s; }
.schalter:checked { background: var(--becken); }
.schalter:checked::after { transform: translateX(20px); }
.version { text-align: center; font-size: 12px; opacity: .5; padding: 12px 0 14px; }
.lizenzen { width: 100%; max-width: 480px; margin: 0 auto; font-size: 15px; line-height: 1.5; user-select: text; -webkit-user-select: text; }
.lizenzen h3 { font-family: var(--anzeige); font-size: 22px; font-weight: 800; margin: 16px 0 4px; }
.lizenzen p, .lizenzen li { opacity: .9; }
.lizenzen ul { padding-left: 18px; }

/* Platzhalter-Werbevideo */
.videoSeite { background: #000; color: #fff; z-index: 40; flex-direction: column; }
.videoZu { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; background: rgba(255, 255, 255, .15); color: #fff; }
.videoSeite.fertig .videoZu { background: var(--sonne); color: var(--tinte); }
.videoInhalt { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; max-width: 320px; }
.videoMarke { font-size: 12px; font-weight: 700; border: 1px solid rgba(255, 255, 255, .5); border-radius: 4px; padding: 2px 6px; opacity: .8; }
.videoRing { position: relative; width: 120px; height: 120px; }
.videoRing > svg { width: 120px; height: 120px; transform: rotate(-90deg); }
.videoRing circle { fill: none; stroke-width: 6; }
.videoRing .rg { stroke: rgba(255, 255, 255, .15); }
.videoRing .rf { stroke: var(--sonne); stroke-linecap: round; }
#videoZahl { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--anzeige); font-size: 46px; font-weight: 800; }
#videoZahl svg { width: 52px; height: 52px; color: var(--sonne); }
.videoText { font-family: var(--anzeige); font-size: 26px; font-weight: 800; }
.videoUnter { font-size: 14px; opacity: .7; line-height: 1.4; }

/* Kauf */
.kaufDialog { text-align: center; position: relative; z-index: 1; }
.kaufSymbol { width: 48px; height: 48px; color: var(--koralle); }
.kaufTitel { font-family: var(--anzeige); font-size: 30px; font-weight: 800; margin: 4px 0 6px; }
.dialogText.klein { font-size: 15px; font-weight: 500; color: var(--schiefer); }
.kaufHinweis { font-size: 12px; color: #7A8790; margin-top: 10px; }
#kauf, #frage { z-index: 35; }

/* Duell (seit 0.11) */
.rund.gross2.duellKnopf { background: var(--koralle); color: #fff; }
.duellForm { width: 100%; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.dAbschnitt { display: flex; align-items: center; gap: 10px; font-family: var(--anzeige); font-size: 22px; font-weight: 800; margin-top: 10px; }
#dSpieler { display: grid; gap: 8px; }
.dZeile { display: flex; align-items: center; gap: 10px; background: var(--tinte2); border-radius: var(--r); padding: 6px 6px 6px 10px; }
.dFarbe { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; display: grid; place-items: center; }
.dFarbe i { width: 26px; height: 26px; border-radius: 50%; border: 5px solid; display: block; }
.dZeile input { flex: 1; min-width: 0; height: 44px; border: 0; border-radius: 10px; background: rgba(244, 239, 230, .1); color: var(--kreide);
  font: 600 18px var(--text); padding: 0 12px; -webkit-user-select: text; user-select: text; }
.dZeile input:focus { outline: 2px solid var(--becken); }
.dWeg { width: 44px; height: 44px; display: grid; place-items: center; color: rgba(244, 239, 230, .6); }
.dWeg svg { width: 20px; height: 20px; }
.dPlus { display: flex; align-items: center; justify-content: center; gap: 2px; height: 46px; border-radius: var(--r); border: 2px dashed rgba(244, 239, 230, .25); color: var(--kreide); }
.dPlus svg { width: 22px; height: 22px; }
.dWahl { display: flex; flex-wrap: wrap; gap: 8px; }
.dWahl button { min-height: 46px; padding: 6px 14px; border-radius: var(--r); background: var(--tinte2); color: var(--kreide); font-family: var(--anzeige); font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 6px; }
.dWahl button small { font-weight: 600; opacity: .7; font-size: 15px; }
.dWahl button.an { background: var(--sonne); color: var(--tinte); }
.dWahl button.zu { opacity: .4; }
.dWahl button svg { width: 16px; height: 16px; }
.dHinweis { font-size: 14px; color: rgba(244, 239, 230, .75); text-align: center; margin-top: 6px; line-height: 1.4; min-height: 20px; }
.duellDialog { max-width: 360px; text-align: center; }
.dkKopf { font-size: 14px; font-weight: 600; color: var(--schiefer); display: flex; align-items: center; justify-content: center; gap: 6px; }
.dkTitel { font-family: var(--anzeige); font-size: 30px; font-weight: 800; line-height: 1.05; margin-top: 2px; }
.dkAufgabe { font-family: var(--anzeige); font-size: 22px; font-weight: 700; margin-top: 6px; }
.dkAufgabe .syms { justify-content: center; margin-top: 4px; }
.dkLetzter { margin-top: 8px; font-family: var(--anzeige); font-size: 20px; font-weight: 700; }
.dkLetzter .ver { color: #C23A24; }
.dkTabelle { margin: 12px 0 2px; border-top: 1px solid var(--linie); text-align: left; }
.dkTabelle div { display: flex; align-items: center; gap: 10px; min-height: 44px; border-bottom: 1px solid var(--linie); font-weight: 600; font-size: 17px; }
.dkTabelle div.dran { background: var(--markiert); box-shadow: inset 3px 0 0 var(--becken); }
.dkTabelle .pl { width: 26px; text-align: center; font-family: var(--anzeige); font-weight: 800; font-size: 20px; color: var(--schiefer); }
.dkTabelle .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.dkTabelle .pk { font-family: var(--anzeige); font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; padding-right: 6px; }
.dkTabelle .sieger .pl { color: #A87400; }
.dkTabelle .sieger .pl svg { width: 22px; height: 22px; color: var(--sonne); vertical-align: -4px; }
.dPunkt { width: 14px; height: 14px; flex: 0 0 14px; border-radius: 50%; display: inline-block; border: 3px solid; }
.dkName { margin-top: 12px; }
.dkName input { width: 100%; height: 48px; border: 2px solid var(--linie); border-radius: var(--r); padding: 0 12px; font: 600 18px var(--text); text-align: center; -webkit-user-select: text; user-select: text; }
.dkLink { margin-top: 10px; font-size: 13px; word-break: break-all; color: var(--schiefer); -webkit-user-select: text; user-select: text; }
#duellKarte { z-index: 30; }
.tPunkte { font-family: var(--anzeige); font-weight: 800; font-size: 17px; color: var(--tinte); display: inline-flex; align-items: center; gap: 4px; }
.tPunkte .ic { color: var(--sonne); }

/* Online-Duell (seit 0.12) */
.dModus { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--tinte2); padding: 4px; border-radius: var(--r); }
.dModus button { height: 46px; border-radius: 9px; display: flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--anzeige); font-weight: 800; font-size: 19px; color: rgba(244, 239, 230, .75); }
.dModus button svg { width: 22px; height: 22px; }
.dModus button.an { background: var(--kreide); color: var(--tinte); }
#dHier, #dOnline { display: flex; flex-direction: column; gap: 8px; }
#dHier[hidden], #dOnline[hidden] { display: none; }
.oGross { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 10px 16px; border-radius: var(--r); background: var(--becken); color: #fff; text-align: left; font-family: var(--anzeige); font-weight: 800; font-size: 22px; line-height: 1.1; }
.oGross svg { width: 30px; height: 30px; flex: 0 0 30px; }
.oGross small { display: block; font-family: var(--text); font-weight: 600; font-size: 13px; opacity: .85; margin-top: 2px; }
#oRaum { background: var(--tinte3); }
.oCode { display: flex; gap: 8px; }
.oCode input { flex: 1; min-width: 0; height: 56px; border: 0; border-radius: var(--r); background: rgba(244, 239, 230, .1); color: var(--kreide); text-align: center;
  font: 800 28px var(--anzeige); letter-spacing: .3em; text-transform: uppercase; -webkit-user-select: text; user-select: text; }
.oCode input::placeholder { color: rgba(244, 239, 230, .35); letter-spacing: .2em; }
.oCode button { width: 56px; height: 56px; border-radius: var(--r); background: var(--sonne); color: var(--tinte); display: grid; place-items: center; }
.oCode button svg { width: 30px; height: 30px; }
.dkCode { font-family: var(--anzeige); font-weight: 800; font-size: 54px; letter-spacing: .18em; margin: 4px 0 0 .18em; color: var(--tinte); -webkit-user-select: text; user-select: text; }
.dkWarte { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 10px; font-weight: 600; color: var(--schiefer); }
.dkWarte::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--becken); border-right-color: transparent; animation: dreh .8s linear infinite; }
@keyframes dreh { to { transform: rotate(360deg); } }
.dkTabelle .hak { width: 20px; height: 20px; color: var(--becken); }
.dkTabelle .krone { width: 18px; height: 18px; color: var(--sonne); }
.ik[disabled] { opacity: .4; }
.dkHinweis { margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--schiefer); }
#kZeile span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Stil-Shop ---------- */
.zeile > span.wert { flex: 0 0 auto; opacity: .7; margin-right: 4px; }
.alleStile { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 480px; margin: 0 auto 12px; padding: 12px 14px; border-radius: var(--rk); background: var(--sonne); color: var(--tinte); text-align: left; }
.alleStile > svg { width: 30px; height: 30px; flex: 0 0 30px; }
.alleStile > span:not(.ap) { flex: 1; display: flex; flex-direction: column; }
.alleStile b { font-family: var(--anzeige); font-size: 22px; font-weight: 800; line-height: 1.1; }
.alleStile small { font-size: 13px; opacity: .8; }
.alleStile .ap { font-family: var(--anzeige); font-size: 20px; font-weight: 800; background: var(--tinte); color: var(--kreide); padding: 6px 12px; border-radius: var(--r); white-space: nowrap; }
#stilListe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 480px; margin: 0 auto; }
.stilKarte { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 0 0 10px; border-radius: var(--rk); overflow: hidden; background: var(--tinte2); color: var(--kreide); text-align: left; border: 3px solid transparent; }
.stilKarte.an { border-color: var(--sonne); }
.stilKarte .sb { display: block; width: 100%; aspect-ratio: 1 / 1.15; background: var(--tinte3); margin-bottom: 6px; }
.stilKarte .sb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.stilKarte .sb img:not([src]) { visibility: hidden; }
.stilKarte .sn { padding: 0 10px; font-size: 20px; font-weight: 700; line-height: 1.15; }
.stilKarte .st { padding: 0 10px; font-size: 12px; opacity: .75; font-family: var(--text); line-height: 1.25; }
.stilKarte .sm { display: flex; gap: 0; margin: 6px 10px 0; width: 56px; height: 12px; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 1px rgba(127, 127, 127, .35); }
.stilKarte .sm i { flex: 1; }
.stilKarte .sk { position: absolute; top: 8px; right: 8px; display: flex; align-items: center; gap: 4px; font-family: var(--text); font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: rgba(14, 42, 59, .78); color: #fff; }
.stilKarte .sk svg { width: 14px; height: 14px; }
.stilKarte .sk.an { background: var(--sonne); color: #0E2A3B; }
.stilKarte .sk.preis { background: rgba(255, 255, 255, .92); color: #0E2A3B; }
.stilKauf { position: sticky; bottom: 0; width: 100%; max-width: 480px; margin: 12px auto 0; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-radius: var(--rk); background: var(--papier); color: var(--tinte); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); z-index: 2; }
.stilKauf .skt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.stilKauf .skt small { font-size: 12px; color: var(--schiefer); }
.stilKauf .skt b { font-family: var(--anzeige); font-size: 20px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stilKauf .gross.gold { width: auto; min-width: 104px; height: 52px; padding: 0 16px; margin: 0; }
.stilKauf .knopf { flex: 0 0 auto; height: 52px; padding: 0 14px; }

/* In der App: der echte AdMob-Banner liegt ueber dem unteren Rand; #ad haelt nur den Platz frei */
body.app #ad { height: calc(var(--banner, 50px) + env(safe-area-inset-bottom)); background: #000; border-top: 0; font-size: 0; }
body.app #ad > * { display: none; }
