:root {
  /* Sporthalle: Hallenblau, Ahornboden, Spielfeldlinien */
  --bg: #eef2fb; --karte: #ffffff; --text: #14204a; --grau: #5d6a8f; --linie: #dde4f4;
  --primaer: #2457d6; --primaer-h: #1a43b0; --primaer-zart: #e3ebff;
  --holz: #e9a43b; --holz-zart: #fdf1dc; --linienrot: #e2412f; --liniengelb: #f5c518; --liniengruen: #1f9d6b;
  --rot: #d23a28; --gruen: #16855a; --gelb: #b07806;
  --radius: 18px; --schatten: 0 1px 2px rgba(20,32,74,.06), 0 6px 18px rgba(36,87,214,.08);
  --nav-h: 66px;
  --schrift: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --anzeige: "Barlow Condensed", "Barlow", -apple-system, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1330; --karte: #162048; --text: #eef2ff; --grau: #a3b0d6; --linie: #26326a;
    --primaer: #6e95ff; --primaer-h: #9bb6ff; --primaer-zart: #1d2c66;
    --holz: #f2b84b; --holz-zart: #3a2e14; --linienrot: #ff6b57; --liniengelb: #ffd84d; --liniengruen: #3fd096;
    --rot: #ff7a66; --gruen: #4fd69c; --gelb: #ffd166;
    --schatten: 0 6px 18px rgba(0,0,0,.25); color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  padding: max(12px, env(safe-area-inset-top)) 16px calc(var(--nav-h) + env(safe-area-inset-bottom) + 20px); }
#app { max-width: 680px; margin: 0 auto; }
h1 { font-size: 1.6rem; margin: .4rem 0 .6rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 0 0 .5rem; }
h3 { font-size: 1rem; margin: 0 0 .5rem; }
a { color: var(--primaer); text-decoration: none; }
p { margin: .4rem 0; }
.unter-h1 { margin-top: -.5rem; margin-bottom: .9rem; }
.grau { color: var(--grau); } .rot { color: var(--rot); } .gruen { color: var(--gruen); } .gelb { color: var(--gelb); }
.klein { font-size: .85rem; } .mitte { text-align: center; }
.laden { padding: 40vh 0; text-align: center; color: var(--grau); }

.karte { background: var(--karte); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 12px; box-shadow: var(--schatten); border: 1px solid var(--linie); }
.karte.hervor { border: 2px solid var(--primaer); }
.karte.hinweis, .hinweis { background: var(--primaer-zart); border-color: transparent; border-radius: 10px; padding: 10px 12px; }
.kopf-zeile { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kopf-zeile h1, .kopf-zeile h2, .kopf-zeile h3 { margin-bottom: .4rem; }
.kopfzeile { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.zurueck { font-weight: 600; }
.hilfe { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--grau); color: var(--grau); font-weight: 700; font-size: .85rem; flex: none; }

button, .knopf { font: inherit; font-weight: 600; border: 0; border-radius: 11px; padding: 11px 16px; background: var(--primaer); color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; text-align: center; -webkit-tap-highlight-color: transparent; }
@media (prefers-color-scheme: dark) { button, .knopf { color: #04201c; } }
button:active, .knopf:active { transform: scale(.98); }
button:disabled { opacity: .45; }
button.zweit, .knopf.zweit { background: var(--primaer-zart); color: var(--primaer); }
button.rot.zweit { color: var(--rot); background: color-mix(in srgb, var(--rot) 12%, transparent); }
button.link { background: none; color: var(--primaer); padding: 4px; min-height: auto; font-weight: 600; }
button.link.rot { color: var(--rot); }
button.gross { font-size: 1.1rem; padding: 14px 20px; }
button.voll { width: 100%; margin-top: 8px; }
button.mini { min-height: 34px; min-width: 34px; padding: 4px 9px; font-size: .9rem; background: var(--primaer-zart); color: var(--primaer); }
button.mini.rot { color: var(--rot); background: color-mix(in srgb, var(--rot) 12%, transparent); }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.knopfreihe.rechts { justify-content: flex-end; }
.knopfreihe.klein button { min-height: 32px; }
.liste-knoepfe { display: grid; gap: 8px; margin-top: 8px; }
.liste-knoepfe button, .liste-knoepfe .knopf { justify-content: flex-start; }

label { display: block; font-size: .85rem; color: var(--grau); margin: 0 0 10px; font-weight: 500; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 16px; color: var(--text); background: var(--bg);
  border: 1px solid var(--linie); border-radius: 10px; padding: 10px 11px; min-height: 44px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primaer); outline-offset: -1px; }
input[type=checkbox] { width: 22px; height: 22px; min-height: 0; margin: 0; flex: none; accent-color: var(--primaer); display: inline-block; }
input[type=color] { padding: 2px; width: 46px; flex: none; }
input[type=range] { padding: 0; accent-color: var(--primaer); }
label.schalter { display: flex; gap: 10px; align-items: center; color: var(--text); font-size: .95rem; }
fieldset { border: 1px solid var(--linie); border-radius: 10px; padding: 8px 12px 2px; margin: 0 0 10px; }
legend { font-size: .85rem; color: var(--grau); padding: 0 4px; }
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.drei { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 10px; }
.such { margin: 6px 0 8px; }

.umschalter { display: flex; background: var(--bg); border-radius: 11px; padding: 3px; margin: 4px 0 12px; border: 1px solid var(--linie); }
.umschalter button { flex: 1; background: none; color: var(--grau); min-height: 38px; padding: 6px 8px; font-size: .92rem; }
.umschalter button.an { background: var(--karte); color: var(--text); box-shadow: var(--schatten); }

.chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
.chip { background: var(--karte); color: var(--text); border: 1.5px solid var(--linie); min-height: 34px; padding: 4px 12px; border-radius: 99px; font-weight: 500; white-space: nowrap; font-size: .9rem; }
.chip.an { border-color: var(--f, var(--primaer)); background: color-mix(in srgb, var(--f, var(--primaer)) 15%, transparent); }
.etikett { display: inline-block; font-size: .75rem; padding: 1px 8px; border-radius: 99px; background: color-mix(in srgb, var(--f, var(--primaer)) 16%, transparent); color: var(--text); font-weight: 600; }
.etikett.rot { --f: var(--rot); }
.punkt { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }

.planliste { list-style: none; padding: 0; margin: 8px 0; counter-reset: n; }
.planliste li { display: flex; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--linie); }
.planliste li:last-child { border: 0; }
.planliste li div { display: flex; flex-direction: column; }
.planliste small, .uebliste small, .vorlagen small { color: var(--grau); font-size: .82rem; }

.zeilen { list-style: none; padding: 0; margin: 0; }
.zeilen li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--linie); align-items: center; }
.zeilen li:last-child { border: 0; }
.uebliste, .vorlagen { list-style: none; padding: 0; margin: 0 0 8px; }
.uebliste li, .vorlagen li { border-bottom: 1px solid var(--linie); display: flex; align-items: center; gap: 8px; }
.uebliste li:last-child, .vorlagen li:last-child { border: 0; }
.uebliste a, .vorlagen a { display: flex; flex-direction: column; padding: 10px 0; color: var(--text); flex: 1; }
.uebliste li.benutzer { justify-content: space-between; flex-wrap: wrap; padding: 8px 0; }
.uebliste li.benutzer small { display: block; }
.gruppe { margin: 16px 0 4px; padding-left: 10px; border-left: 4px solid var(--f); }
.gruppe small { color: var(--grau); font-weight: 400; }
#liste .uebliste { background: var(--karte); border-radius: var(--radius); padding: 0 14px; border: 1px solid var(--linie); }

.kennzahlen { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: center; }
.kennzahlen.drei { grid-template-columns: repeat(3, 1fr); }
.kennzahlen b { display: block; font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.kennzahlen small { color: var(--grau); font-size: .78rem; }
.balken { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; margin-top: 10px; border: 1px solid var(--linie); }
.balken div { height: 100%; background: var(--primaer); border-radius: 99px; transition: width .3s; }
.balken.voll div { background: var(--rot); }

.slot { display: grid; grid-template-columns: 1.45fr 1.15fr 1.05fr auto; gap: 6px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--linie); }
.slot input, .slot select { margin: 0; padding: 8px 6px; font-size: 15px; }
.slot .breit { grid-column: 1 / 3; }
.slot .schalter { margin: 0; font-size: .85rem; }
.slot.aus { opacity: .5; }

.planpos-liste { list-style: none; padding: 0; margin: 0 0 8px; }
.planpos { background: var(--karte); border: 1px solid var(--linie); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.pos-kopf { display: flex; align-items: center; gap: 8px; }
.pos-kopf b { flex: 1; }
.pos-knoepfe { display: flex; gap: 4px; }
.pos-werte { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 0 8px; margin-top: 6px; }
.pos-werte label { margin-bottom: 4px; font-size: .75rem; }
.pos-werte input { padding: 7px 8px; min-height: 38px; }
.teil { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.teil select { margin: 0; flex: 1; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper b { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.unten-fest { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px); background: var(--bg); padding: 8px 0; }

.katrow { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.katrow input { margin: 0; }
.preis { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 6px; align-items: center; margin-bottom: 6px; font-size: .85rem; }
.preis input { margin: 0; }
.zweck { padding: 7px 0; border-bottom: 1px solid var(--linie); }
.zweck small { display: block; }
.scroll { overflow-x: auto; }
.tabelle { width: 100%; border-collapse: collapse; font-size: .88rem; margin-bottom: 8px; }
.tabelle th { text-align: left; color: var(--grau); font-weight: 500; padding: 5px 6px; border-bottom: 1px solid var(--linie); }
.tabelle td { padding: 5px 6px; border-bottom: 1px solid var(--linie); font-variant-numeric: tabular-nums; }
.tabelle.erg input { min-height: 34px; padding: 5px 6px; margin: 0; max-width: 80px; }
.log { white-space: pre-wrap; font-size: .75rem; background: var(--bg); padding: 8px; border-radius: 8px; max-height: 300px; overflow: auto; }

.zeile-link { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--linie); color: var(--text); }
.zeile-link:last-child { border: 0; }
.zeile-link > span { font-size: 1.3rem; width: 30px; text-align: center; }
.zeile-link small { display: block; color: var(--grau); font-size: .82rem; }

.vorschlag { display: flex; gap: 10px; align-items: flex-start; color: var(--text); font-size: .95rem; padding: 8px 0; border-bottom: 1px solid var(--linie); }
.vorschlag small { display: block; margin-top: 2px; }
.waehlzeile { display: flex; gap: 10px; align-items: center; color: var(--text); font-size: .95rem; padding: 8px 2px; border-bottom: 1px solid var(--linie); margin: 0; }
.waehlzeile small { display: block; color: var(--grau); }

.chart { width: 100%; height: auto; display: block; }
.chart rect.ok { fill: var(--primaer); } .chart rect.nein { fill: color-mix(in srgb, var(--grau) 45%, transparent); }
.chart .ziel { stroke: var(--gelb); stroke-dasharray: 4 3; stroke-width: 1.2; }
.chart text { font-size: 8px; fill: var(--grau); text-anchor: middle; }
.chart text.wert { fill: var(--text); font-weight: 600; }
.chart text.links { text-anchor: start; } .chart text.rechts { text-anchor: end; }
.chart.linie polyline { fill: none; stroke: var(--primaer); stroke-width: 2.2; stroke-linejoin: round; }
.chart.linie circle { fill: var(--karte); stroke: var(--primaer); stroke-width: 2; }
.katzeile { display: grid; grid-template-columns: 84px 1fr 64px; gap: 8px; align-items: center; margin: 6px 0; font-size: .9rem; }
.katzeile b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.kbalken { height: 10px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.kbalken div { height: 100%; border-radius: 99px; }

.gefuehl { display: flex; gap: 6px; margin-bottom: 10px; }
.gefuehl button { flex: 1; flex-direction: column; background: var(--bg); color: var(--text); font-size: 1.5rem; padding: 6px 2px; border: 2px solid transparent; gap: 0; }
.gefuehl button small { font-size: .62rem; color: var(--grau); font-weight: 500; }
.gefuehl button.an { border-color: var(--primaer); background: var(--primaer-zart); }
.bestwerte { margin-top: 10px; padding: 10px 12px; background: color-mix(in srgb, #f59e0b 16%, transparent); border-radius: 10px; }
.schritte { padding-left: 1.3rem; } .schritte li { margin-bottom: 6px; }
.anleitung .tipps p { background: var(--bg); padding: 8px 10px; border-radius: 8px; font-size: .92rem; }
.inhalt { columns: 2; padding-left: 1.1rem; margin: 0; font-size: .92rem; }

/* Navigation */
#nav { position: fixed; left: 0; right: 0; bottom: 0; display: flex; background: color-mix(in srgb, var(--karte) 92%, transparent); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--linie); padding-bottom: env(safe-area-inset-bottom); z-index: 20; }
#nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; height: var(--nav-h); color: var(--grau); font-size: .72rem; font-weight: 600; gap: 2px; }
#nav a span { font-size: 1.3rem; line-height: 1; filter: grayscale(1); opacity: .7; }
#nav a.aktiv { color: var(--primaer); }
#nav a.aktiv span { filter: none; opacity: 1; }
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 14px); background: var(--text); color: var(--bg);
  padding: 10px 16px; border-radius: 12px; z-index: 50; max-width: 90vw; font-size: .92rem; font-weight: 500; box-shadow: 0 6px 20px rgba(0,0,0,.2); }

.dialog-hg { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: center; z-index: 40; padding: 16px; }
.dialog { background: var(--karte); border-radius: 16px; padding: 18px; max-width: 420px; width: 100%; }
.gross-dialog { max-width: 560px; max-height: 88vh; display: flex; flex-direction: column; }
.w-liste { overflow-y: auto; flex: 1; min-height: 200px; margin-bottom: 8px; }

.anmelde { max-width: 380px; margin: 8vh auto 0; text-align: center; }
.anmelde .karte { text-align: left; }
.logo { font-size: 3.2rem; }

/* ---------- Training (Vollbild) ---------- */
body.training-modus { padding-bottom: calc(env(safe-area-inset-bottom) + 16px); }
.t-kopf { display: flex; justify-content: space-between; align-items: center; font-size: .85rem; color: var(--grau); }
.t-gesamt { height: 4px; background: var(--linie); border-radius: 99px; overflow: hidden; margin: 6px 0 12px; }
.t-gesamt div { height: 100%; background: var(--primaer); }
.t-haupt { text-align: center; background: var(--karte); border-radius: 22px; padding: 18px 16px 16px; border: 1px solid var(--linie); }
.t-kat { display: inline-block; font-size: .8rem; font-weight: 700; padding: 3px 12px; border-radius: 99px; background: color-mix(in srgb, var(--f) 18%, transparent); }
.t-name { font-size: 1.85rem; margin: 10px 0 2px; line-height: 1.15; }
.t-satz { font-size: 1.05rem; margin: 2px 0; min-height: 1.4em; }
.t-ziel { font-size: 1.2rem; font-weight: 700; color: var(--primaer); margin: 2px 0 6px; }
.t-label { font-size: .95rem; font-weight: 600; color: var(--grau); text-transform: uppercase; letter-spacing: .06em; margin-top: 10px; }
.t-zeit { font-size: 5.2rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.05; letter-spacing: -.03em; min-height: 1.05em; }
.t-balken { height: 10px; background: var(--bg); border-radius: 99px; overflow: hidden; margin: 8px 6px 16px; }
.t-balken div { height: 100%; background: var(--primaer); width: 0; transition: width .25s linear; }
.t-knopf { width: 100%; font-size: 1.35rem; padding: 18px; border-radius: 16px; min-height: 64px; }
.t-neben { display: flex; gap: 8px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.t-pause { background: color-mix(in srgb, #3b82f6 9%, var(--karte)); }
.t-pause .t-zeit, .t-pause .t-label { color: #3b82f6; }
.t-arbeit .t-label, .t-offen .t-label { color: var(--gruen); }
.t-vorlauf .t-zeit { color: var(--gelb); }
.t-angehalten { opacity: .85; }
.t-erfassung { background: var(--karte); border: 1px solid var(--linie); border-radius: 16px; padding: 12px 14px; margin-top: 12px; }
.t-erfassung h3 { font-size: .9rem; color: var(--grau); font-weight: 600; }
.erf-feld { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0; }
.erf-feld > span { font-weight: 600; min-width: 50px; }
.stepper.gross button { min-width: 48px; min-height: 46px; font-size: 1.3rem; background: var(--primaer-zart); color: var(--primaer); }
.stepper.gross input { width: 84px; text-align: center; font-size: 1.25rem; font-weight: 700; margin: 0; }
.t-info { margin-top: 12px; background: var(--karte); border-radius: 14px; padding: 10px 14px; border: 1px solid var(--linie); }
.t-info summary { font-weight: 600; cursor: pointer; }
.t-next { text-align: center; color: var(--grau); margin-top: 12px; }
.t-tipp { margin-top: 14px; }
.t-ende { text-align: center; padding-top: 20vh; }
.gross-emoji { font-size: 4rem; }

@media (max-width: 380px) {
  .t-zeit { font-size: 4.3rem; }
  .slot { grid-template-columns: 1fr 1fr; }
  .slot .breit { grid-column: 1 / -1; }
  .drei { grid-template-columns: 1fr 1fr; }
}

/* Fotos (1.1.0) */
.ueb-bild { display: block; max-width: 100%; max-height: 180px; border-radius: 10px; margin: 6px 0; object-fit: contain; background: var(--bg); }
.ueb-bild.gross { max-height: 60vh; width: 100%; }
.foto-feld { margin-bottom: 10px; }
.datei-knopf { cursor: pointer; margin: 0; color: var(--primaer); }
label.knopf.gross { width: 100%; font-size: 1.05rem; padding: 14px; color: #fff; }
@media (prefers-color-scheme: dark) { label.knopf.gross { color: #04201c; } }
.foto-reihe { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; }
.foto-mini { position: relative; flex: none; }
.foto-mini img { width: 84px; height: 112px; object-fit: cover; border-radius: 8px; border: 1px solid var(--linie); }
.foto-mini button { position: absolute; top: 4px; right: 4px; min-height: 26px; min-width: 26px; padding: 0; }
.foto-mini small { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.6); color: #fff; border-radius: 6px; padding: 0 5px; font-size: .75rem; }
.foto-reihe.klein img.wahl { width: 60px; height: 80px; object-fit: cover; border-radius: 6px; border: 3px solid transparent; cursor: pointer; flex: none; }
.foto-reihe.klein img.wahl.an { border-color: var(--primaer); }
.karte-vorschlag .kv-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.karte-vorschlag .kv-text small { display: block; }
.t-info .ueb-bild.gross { max-height: 55vh; }

/* Übungen holen (1.2.0) */
.zeile-link.aus { opacity: .5; }
.such-zeile { display: flex; gap: 8px; }
.such-zeile input { margin: 0; flex: 1; }
.db-liste li { padding: 8px 0; gap: 10px; cursor: pointer; }
.db-liste li img, .db-liste .db-ohne { width: 56px; height: 56px; object-fit: contain; border-radius: 8px; background: #fff; flex: none; display: grid; place-items: center; font-size: 1.4rem; border: 1px solid var(--linie); }
.db-liste li div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.db-liste li.laedt { opacity: .5; }
input.inline { display: inline-block; width: auto; min-width: 160px; margin: 0 0 0 6px; padding: 6px 8px; min-height: 36px; }
.hinweis label.schalter { flex-wrap: wrap; }


/* ================= Design 1.3: Sporthalle ================= */
body { font-family: var(--schrift); font-size: 16.5px; }
h1, h2, h3, .t-name, .t-zeit, .kennzahlen b, .buehne-zahl b { font-family: var(--anzeige); }
h1 { font-size: 2.1rem; font-weight: 700; letter-spacing: -.005em; line-height: 1.05; }
h2 { font-size: 1.4rem; font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
a { color: var(--primaer); }

.karte { border: 0; box-shadow: var(--schatten); border-radius: var(--radius); padding: 16px 18px; }
.karte.hervor { border: 0; }
.karte.hinweis, .hinweis { background: var(--holz-zart); border-radius: 14px; }
.karte.hinweis a, .hinweis a { color: var(--text); font-weight: 700; text-decoration: underline; text-decoration-color: var(--holz); text-underline-offset: 3px; }

button, .knopf { border-radius: 14px; font-weight: 700; }
button.zweit, .knopf.zweit { background: var(--primaer-zart); color: var(--primaer); }
button.gross { font-size: 1.15rem; padding: 15px 22px; }
.hilfe { border-color: var(--primaer); color: var(--primaer); background: var(--karte); }
input, select, textarea { background: var(--karte); border-color: var(--linie); border-width: 1.5px; }
.umschalter { background: var(--primaer-zart); border: 0; }
.umschalter button { color: var(--primaer); }
.umschalter button.an { background: var(--primaer); color: #fff; box-shadow: none; }

/* Kopf auf „Heute“: Hallenblau mit Spielfeldlinien */
.buehne { position: relative; margin: calc(-1 * max(12px, env(safe-area-inset-top))) -16px 14px; padding: calc(max(12px, env(safe-area-inset-top)) + 14px) 20px 20px;
  background: var(--primaer); color: #fff; border-radius: 0 0 28px 28px; overflow: hidden; }
@media (prefers-color-scheme: dark) { .buehne { background: #1c3592; } }
.buehne::before, .buehne::after { content: ""; position: absolute; pointer-events: none; border: 3px solid rgba(255,255,255,.18); border-radius: 50%; }
.buehne::before { width: 260px; height: 260px; right: -90px; top: -60px; }
.buehne::after { width: 90px; height: 90px; right: 0; top: 25px; border-color: rgba(245,197,24,.45); }
.buehne small { display: block; opacity: .85; font-weight: 600; }
.buehne h1 { color: #fff; font-size: 2.5rem; margin: 2px 0 14px; }
.buehne-zahlen { display: flex; gap: 10px; position: relative; z-index: 1; }
.buehne-zahl { flex: 1; background: rgba(255,255,255,.14); border-radius: 14px; padding: 8px 12px; }
.buehne-zahl b { display: block; font-size: 1.9rem; line-height: 1.1; }
.buehne-zahl small { font-size: .8rem; }
.buehne-zahl .balken { background: rgba(255,255,255,.2); border: 0; height: 6px; margin-top: 6px; }
.buehne-zahl .balken div { background: var(--liniengelb); }

/* Plan-Karte für heute: Ahornboden */
.karte.spielfeld { background: var(--karte); border-top: 6px solid var(--holz); }
.karte.spielfeld h2 { font-size: 1.55rem; }
.karte.spielfeld .grau:first-of-type { font-weight: 600; }

.planliste li { border-bottom-color: var(--linie); }
.planliste .punkt, .uebliste .punkt { width: 12px; height: 12px; }
.punkt { box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 0%, transparent); }

.kennzahlen b { font-size: 2rem; color: var(--primaer); }
.balken { background: var(--primaer-zart); border: 0; }
.balken div { background: var(--primaer); }

/* Listen: Kategorie-Farbe als Spielfeldlinie links */
#liste .uebliste { border: 0; box-shadow: var(--schatten); border-left: 5px solid var(--f, var(--primaer)); border-radius: 14px; }
.gruppe { border-left: 0; padding-left: 0; font-size: 1.3rem; display: flex; align-items: center; gap: 8px; }
.gruppe::before { content: ""; width: 14px; height: 14px; border-radius: 4px; background: var(--f); }
.chip { border-width: 2px; font-weight: 600; }
.chip.an { background: var(--f, var(--primaer)); border-color: var(--f, var(--primaer)); color: #fff; }
.etikett { font-weight: 700; }

/* Mehr / Übungen holen: farbige Symbole */
.zeile-link > span { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; flex: none; background: var(--primaer-zart); }
.karte > .zeile-link:nth-child(4n+2) > span { background: var(--holz-zart); }
.karte > .zeile-link:nth-child(4n+3) > span { background: color-mix(in srgb, var(--liniengruen) 16%, transparent); }
.karte > .zeile-link:nth-child(4n+4) > span { background: color-mix(in srgb, var(--linienrot) 14%, transparent); }
.zeile-link b { font-size: 1.05rem; }

/* Navigation */
#nav { background: var(--karte); border-top: 0; box-shadow: 0 -4px 20px rgba(20,32,74,.08); }
#nav a { color: var(--grau); font-size: .74rem; }
#nav a span { width: 46px; height: 30px; border-radius: 15px; display: grid; place-items: center; transition: background .2s; }
#nav a.aktiv { color: var(--primaer); }
#nav a.aktiv span { background: var(--primaer-zart); }
#toast { background: var(--primaer); color: #fff; }

/* Auswertung */
.chart rect.ok { fill: var(--primaer); }
.chart rect.nein { fill: color-mix(in srgb, var(--primaer) 22%, transparent); }
.chart .ziel { stroke: var(--holz); stroke-width: 2; }
.chart.linie polyline { stroke: var(--primaer); stroke-width: 3; }
.chart.linie circle { stroke: var(--primaer); fill: var(--holz); }
.bestwerte { background: var(--holz-zart); border-left: 5px solid var(--holz); }

/* Anmeldung */
.anmelde .logo { width: 84px; height: 84px; margin: 0 auto 8px; border-radius: 24px; background: var(--primaer); display: grid; place-items: center; font-size: 2.6rem; box-shadow: 0 10px 30px rgba(36,87,214,.35); }
.anmelde h1 { font-size: 2.4rem; }

/* ---------- Training: ganzer Bildschirm in der Farbe der Phase ---------- */
body.training-modus { transition: background-color .35s; }
body[data-phase="vorlauf"] { background: var(--liniengelb); }
body[data-phase="arbeit"], body[data-phase="offen"] { background: var(--primaer); }
body[data-phase="pause"] { background: var(--liniengruen); }
body[data-phase="angehalten"] { background: #6b7394; }
@media (prefers-color-scheme: dark) {
  body[data-phase="vorlauf"] { background: #8a6d00; }
  body[data-phase="arbeit"], body[data-phase="offen"] { background: #1c3592; }
  body[data-phase="pause"] { background: #11694a; }
}
body[data-phase] .t-haupt { background: transparent; border: 0; box-shadow: none; color: #fff; padding-top: 6px; }
body[data-phase="vorlauf"] .t-haupt { color: #2b2300; }
body[data-phase] .t-kopf, body[data-phase] .t-kopf .link, body[data-phase] .t-next, body[data-phase] .t-tipp { color: rgba(255,255,255,.9); }
body[data-phase="vorlauf"] .t-kopf, body[data-phase="vorlauf"] .t-kopf .link, body[data-phase="vorlauf"] .t-next, body[data-phase="vorlauf"] .t-tipp { color: #2b2300; }
body[data-phase] .t-gesamt { background: rgba(255,255,255,.25); }
body[data-phase] .t-gesamt div { background: #fff; }
body[data-phase] .t-kat { background: rgba(255,255,255,.2); color: inherit; }
body[data-phase] .t-ziel, body[data-phase] .t-label, body[data-phase] .t-zeit, body[data-phase] .t-pause .t-zeit, body[data-phase] .t-pause .t-label,
body[data-phase] .t-vorlauf .t-zeit, body[data-phase] .t-arbeit .t-label, body[data-phase] .t-offen .t-label { color: inherit; }
body[data-phase] .t-balken { background: rgba(255,255,255,.25); }
body[data-phase] .t-balken div { background: #fff; }
body[data-phase="vorlauf"] .t-balken div { background: #2b2300; }
body[data-phase] .t-knopf { background: #fff; color: var(--primaer); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
body[data-phase="pause"] .t-knopf { color: var(--liniengruen); }
body[data-phase="vorlauf"] .t-knopf { background: #2b2300; color: var(--liniengelb); }
body[data-phase] .t-neben button.zweit { background: rgba(255,255,255,.2); color: inherit; }
body[data-phase] .t-erfassung, body[data-phase] .t-info { border: 0; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.t-label { text-transform: none; letter-spacing: 0; font-size: 1.15rem; font-weight: 700; font-family: var(--anzeige); }
.t-name { font-size: 2.3rem; font-weight: 700; }
.t-zeit { font-size: 7rem; font-weight: 700; letter-spacing: -.01em; line-height: .95; }
.t-ziel { font-size: 1.35rem; font-family: var(--anzeige); }
.t-knopf { font-family: var(--anzeige); font-size: 1.6rem; border-radius: 20px; }
.t-haupt { border-radius: 26px; }
@media (max-width: 380px) { .t-zeit { font-size: 5.6rem; } .buehne h1 { font-size: 2.1rem; } }
@media (prefers-reduced-motion: reduce) { body.training-modus, #nav a span { transition: none; } }
