:root {
  --bg: #101418; --bg2: #181e25; --bg3: #222a33; --fg: #ecf0f4; --fg2: #9aa6b2;
  --akz: #F2C230; --rot: #E03A2E; --blau: #3C7DC4; --gruen: #47b06a; --linie: #2c3540;
  --r: 14px; --nav: 64px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.4 -apple-system, "Segoe UI", Roboto, sans-serif; }
body { padding-bottom: calc(var(--nav) + env(safe-area-inset-bottom)); }
#kopf { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgba(16,20,24,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--linie); }
#titel { font-weight: 700; font-size: 18px; }
#kopf-rechts { display: flex; gap: 8px; }
main { padding: 14px 14px 24px; max-width: 760px; margin: 0 auto; }
#nav { position: fixed; bottom: 0; left: 0; right: 0; height: calc(var(--nav) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: flex; background: var(--bg2); border-top: 1px solid var(--linie); z-index: 5; }
#nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--fg2); text-decoration: none; font-size: 11px; }
#nav a span { font-size: 20px; line-height: 1; }
#nav a.aktiv { color: var(--akz); }
h1 { font-size: 22px; margin: 6px 0 12px; }
h2 { font-size: 16px; margin: 18px 0 8px; color: var(--fg2); text-transform: uppercase; letter-spacing: .04em; }
h3 { font-size: 16px; margin: 0 0 6px; }
p { margin: 0 0 10px; }
.karte { background: var(--bg2); border-radius: var(--r); padding: 14px; margin-bottom: 12px; border: 1px solid var(--linie); }
.karte.klick { cursor: pointer; }
.karte.klick:active { background: var(--bg3); }
.zeile { display: flex; align-items: center; gap: 10px; }
.zeile.zw { justify-content: space-between; }
.klein { font-size: 13px; color: var(--fg2); }
.gross { font-size: 30px; font-weight: 700; line-height: 1.1; }
.akz { color: var(--akz); }
.gruen { color: var(--gruen); }
.rot { color: var(--rot); }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
button, .btn { font: inherit; border: 0; border-radius: 12px; padding: 12px 16px; background: var(--bg3); color: var(--fg); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
button.primaer, .btn.primaer { background: var(--akz); color: #1a1500; font-weight: 700; }
button.gefahr { background: transparent; color: var(--rot); border: 1px solid var(--rot); }
button.leise { background: transparent; color: var(--fg2); }
button.klein { padding: 7px 10px; font-size: 13px; border-radius: 9px; }
button:disabled { opacity: .45; }
.btn-reihe { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.btn-reihe.voll button, .btn-reihe.voll .btn { flex: 1; }
label { display: block; font-size: 13px; color: var(--fg2); margin: 10px 0 4px; }
input, select, textarea { font: inherit; width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--linie); background: var(--bg); color: var(--fg); }
textarea { min-height: 80px; resize: vertical; }
input[type=checkbox] { width: auto; transform: scale(1.3); margin-right: 8px; }
.check { display: flex; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--linie); }
.check:last-child { border-bottom: 0; }
.check.aus { opacity: .5; }
.tabs { display: flex; background: var(--bg); border-radius: 12px; padding: 3px; margin: 8px 0; }
.tabs button { flex: 1; background: transparent; padding: 9px 4px; font-size: 14px; }
.tabs button.aktiv { background: var(--bg3); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.chip { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: var(--bg3); color: var(--fg2); border: 0; }
.chip.aktiv { background: var(--akz); color: #1a1500; }
/* Scheibe */
.scheibe-wrap { position: relative; width: 100%; overflow: auto; border-radius: var(--r); background: #0b0e11; touch-action: pan-x pan-y; }
.scheibe { display: block; width: 100%; height: auto; }
.scheibe-wrap.zoom .scheibe { width: 250%; }
.marker { fill: #fff; stroke: #000; stroke-width: .6; }
.marker.neu { fill: #7CFC00; }
.marker.vorschlag { fill: #ff7ac6; }
/* Keypad */
.keypad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.keypad button { font-size: 20px; font-weight: 700; padding: 16px 0; }
.keypad button.x { background: var(--akz); color: #1a1500; }
.keypad button.m { background: var(--bg); border: 1px solid var(--linie); }
.passe-werte { display: flex; gap: 6px; flex-wrap: wrap; min-height: 40px; align-items: center; }
.wert { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #111; }
.wert.leer { background: transparent; border: 1px dashed var(--linie); color: var(--fg2); }
.w10, .wX, .w9 { background: #F2C230; } .w8, .w7 { background: #E03A2E; color: #fff; } .w6, .w5 { background: #3C7DC4; color: #fff; }
.w4, .w3 { background: #333; color: #fff; } .w2, .w1 { background: #f0f0f0; } .w0 { background: #555; color: #ddd; }
.w20, .w16, .w12 { background: #F2C230; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { padding: 6px 4px; border-bottom: 1px solid var(--linie); text-align: left; }
th { color: var(--fg2); font-weight: 500; font-size: 12px; }
td.r, th.r { text-align: right; }
.lade { color: var(--fg2); text-align: center; padding: 40px; }
#toast { position: fixed; left: 50%; bottom: calc(var(--nav) + 16px); transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 999px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 9; font-size: 14px; }
#toast.an { opacity: 1; }
.sterne { display: flex; gap: 6px; }
.sterne button { font-size: 24px; padding: 4px 6px; background: transparent; color: var(--fg2); }
.sterne button.an { color: var(--akz); }
.chart { width: 100%; height: auto; display: block; }
.woche { border-left: 4px solid var(--blau); padding-left: 10px; margin-bottom: 10px; }
.woche.Grundlage { border-color: var(--blau); } .woche.Aufbau { border-color: var(--gruen); } .woche.Spitze { border-color: var(--akz); } .woche.Tapering { border-color: var(--rot); }
.woche.aktuell { background: var(--bg3); border-radius: 0 10px 10px 0; padding: 8px 10px; }
/* Video */
.video-wrap { position: relative; width: 100%; background: #000; border-radius: var(--r); overflow: hidden; aspect-ratio: 3/4; }
.video-wrap video, .video-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-wrap .status { position: absolute; left: 10px; top: 10px; background: rgba(0,0,0,.6); padding: 6px 10px; border-radius: 8px; font-weight: 700; }
.video-wrap .status.hold { background: rgba(242,194,48,.85); color: #1a1500; }
.video-wrap .status.schuss { background: rgba(71,176,106,.9); }
.messwerte { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.messwerte .karte { margin: 0; padding: 10px; }
details summary { cursor: pointer; color: var(--fg2); }
.markdown p { margin-bottom: 8px; }
.foto-hinweis { font-size: 13px; color: var(--fg2); margin: 6px 0; }
.leer-hinweis { text-align: center; color: var(--fg2); padding: 30px 10px; }
.trefferbild { width: 100%; max-width: 360px; margin: 0 auto; display: block; }
