/* Push-Ups – Designsystem
   Gestalterische Interpretation von Apples Liquid-Glass-Richtung in Webtechnik:
   Glas (backdrop-filter) nur für die schwebende Navigations- und Steuerungsebene,
   Zahlen und Anleitung liegen auf ruhigen, deckenden Flächen. Keine Nachbildung echter
   Systemelemente, keine Übernahme der alten orangen Trainingsansicht. */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", system-ui, sans-serif;
  --font-rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* Safe Areas – über Variablen, damit sie sich für Tests simulieren lassen */
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);

  --gutter: 16px;
  --radius-xl: 34px;
  --radius-l: 24px;
  --radius-m: 18px;
  --radius-s: 12px;
  --tabbar-h: 62px;
  --tabbar-gap: max(10px, calc(var(--sab) - 12px));
  --maxw: 600px;

  /* Hell */
  --bg: #F2F2F7;
  --bg-tint-1: rgba(94, 92, 230, 0.20);
  --bg-tint-2: rgba(48, 176, 199, 0.16);
  --surface: #FFFFFF;
  --surface-2: #F6F6FA;
  --surface-3: #ECECF2;
  --fill: rgba(120, 120, 128, 0.12);
  --fill-strong: rgba(120, 120, 128, 0.2);
  --label: #0B0B10;
  --label-2: rgba(60, 60, 67, 0.78);
  --label-3: rgba(60, 60, 67, 0.55);
  --sep: rgba(60, 60, 67, 0.16);

  --accent: #5250D8;
  --accent-text: #4845CC;
  --on-accent: #FFFFFF;
  --accent-soft: rgba(82, 80, 216, 0.12);
  --rest: #08727E; /* Text: 5,6:1 auf Weiß */
  --rest-fill: #0B7F8C; /* Tasten mit weißer Schrift: 4,7:1 */
  --on-rest: #FFFFFF;
  --rest-soft: rgba(11, 127, 140, 0.12);
  /* Diagrammserien – mit dem Palettenprüfer (dataviz) gegen die Kartenfläche validiert */
  --series-plan: #5250D8;
  --series-free: #1B9AAA;
  --gold: #946200;
  --gold-fill: #FFC21A;
  --gold-soft: rgba(255, 194, 26, 0.2);
  --success: #1F7F36;
  --success-soft: rgba(36, 138, 61, 0.12);
  --danger: #D70015;
  --warn-soft: rgba(255, 159, 10, 0.16);

  --glass-bg: rgba(250, 250, 253, 0.62);
  --glass-bg-strong: rgba(250, 250, 253, 0.82);
  --glass-stroke: rgba(255, 255, 255, 0.8);
  --glass-edge: rgba(0, 0, 0, 0.06);
  --glass-hi: rgba(255, 255, 255, 0.95);
  --glass-shadow: 0 10px 30px -8px rgba(20, 20, 60, 0.2), 0 2px 6px rgba(0, 0, 0, 0.06);
  --glass-blur: blur(22px) saturate(180%);
  --tint-glass: rgba(82, 80, 216, 0.88);

  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 20px -12px rgba(20, 20, 60, 0.18);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-tint-1: rgba(94, 92, 230, 0.26);
    --bg-tint-2: rgba(64, 200, 224, 0.14);
    --surface: #1C1C1E;
    --surface-2: #232326;
    --surface-3: #2C2C2E;
    --fill: rgba(120, 120, 128, 0.24);
    --fill-strong: rgba(120, 120, 128, 0.36);
    --label: #FFFFFF;
    --label-2: rgba(235, 235, 245, 0.76);
    --label-3: rgba(235, 235, 245, 0.5);
    --sep: rgba(84, 84, 88, 0.62);
    --accent: #5E5CE6;
    --accent-text: #9A98FF;
    --on-accent: #FFFFFF;
    --accent-soft: rgba(110, 108, 240, 0.22);
    --rest: #5FD4E6;
    --rest-fill: #1FA2B4;
    --on-rest: #00262B;
    --rest-soft: rgba(64, 200, 224, 0.18);
    --series-plan: #5E5CE6;
    --series-free: #1FA2B4;
    --gold: #FFD60A;
    --gold-fill: #FFD60A;
    --gold-soft: rgba(255, 214, 10, 0.16);
    --success: #30D158;
    --success-soft: rgba(48, 209, 88, 0.18);
    --danger: #FF453A;
    --glass-bg: rgba(44, 44, 50, 0.56);
    --glass-bg-strong: rgba(44, 44, 50, 0.8);
    --glass-stroke: rgba(255, 255, 255, 0.16);
    --glass-edge: rgba(0, 0, 0, 0.4);
    --glass-hi: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 10px 30px -6px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.3);
    --tint-glass: rgba(94, 92, 230, 0.92);
    --card-shadow: 0 0 0 0 transparent;
  }
}
:root[data-theme="dark"] {
  --bg: #000000;
  --bg-tint-1: rgba(94, 92, 230, 0.26);
  --bg-tint-2: rgba(64, 200, 224, 0.14);
  --surface: #1C1C1E;
  --surface-2: #232326;
  --surface-3: #2C2C2E;
  --fill: rgba(120, 120, 128, 0.24);
  --fill-strong: rgba(120, 120, 128, 0.36);
  --label: #FFFFFF;
  --label-2: rgba(235, 235, 245, 0.76);
  --label-3: rgba(235, 235, 245, 0.5);
  --sep: rgba(84, 84, 88, 0.62);
  --accent: #5E5CE6;
  --accent-text: #9A98FF;
  --on-accent: #FFFFFF;
  --accent-soft: rgba(110, 108, 240, 0.22);
  --rest: #5FD4E6;
  --rest-fill: #1FA2B4;
  --on-rest: #00262B;
  --rest-soft: rgba(64, 200, 224, 0.18);
  --series-plan: #5E5CE6;
  --series-free: #1FA2B4;
  --gold: #FFD60A;
  --gold-fill: #FFD60A;
  --gold-soft: rgba(255, 214, 10, 0.16);
  --success: #30D158;
  --success-soft: rgba(48, 209, 88, 0.18);
  --danger: #FF453A;
  --glass-bg: rgba(44, 44, 50, 0.56);
  --glass-bg-strong: rgba(44, 44, 50, 0.8);
  --glass-stroke: rgba(255, 255, 255, 0.16);
  --glass-edge: rgba(0, 0, 0, 0.4);
  --glass-hi: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 10px 30px -6px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.3);
  --tint-glass: rgba(94, 92, 230, 0.92);
  --card-shadow: 0 0 0 0 transparent;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; background: var(--bg); }
body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.35;
  color: var(--label);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
a { color: var(--accent-text); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-family: var(--font-rounded); font-variant-numeric: tabular-nums; }
h1, h2, h3 { text-wrap: balance; }

/* Farbige, ruhige Hintergrundflächen, damit das Glas Kontext hat */
.backdrop {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 40% at 92% -6%, var(--bg-tint-1), transparent 70%),
    radial-gradient(55% 35% at -10% 10%, var(--bg-tint-2), transparent 70%),
    var(--bg);
}

/* ---------- Glas (nur Navigations-/Steuerungsebene) ---------- */
.glass {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 0.5px solid var(--glass-stroke);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-hi), inset 0 -0.5px 0 var(--glass-edge);
}
/* Lichtkante (spekulares Highlight) */
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0) 28%, rgba(255,255,255,0) 70%, rgba(255,255,255,0.18) 100%);
  mix-blend-mode: soft-light;
}
.glass-tint { background: var(--tint-glass); color: var(--on-accent); border-color: color-mix(in srgb, white 35%, transparent); }
.glass-tint.rest { background: color-mix(in srgb, var(--rest-fill) 92%, transparent); color: var(--on-rest); }

/* Reduzierte Transparenz: deckende Flächen, keine Unschärfe */
:root[data-transparency="reduced"] .glass { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--sep); }
:root[data-transparency="reduced"] .glass::before { display: none; }
:root[data-transparency="reduced"] .glass-tint { background: var(--accent); }
:root[data-transparency="reduced"] .glass-tint.rest { background: var(--rest-fill); }
:root[data-transparency="reduced"] .backdrop { background: var(--bg); }
:root[data-transparency="reduced"] .topbar::after { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; -webkit-mask-image: none; mask-image: none; inset: 0; }
@media (prefers-reduced-transparency: reduce) {
  :root:not([data-transparency="full"]) .glass { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--sep); }
  :root:not([data-transparency="full"]) .glass::before { display: none; }
  :root:not([data-transparency="full"]) .glass-tint { background: var(--accent); }
  :root:not([data-transparency="full"]) .glass-tint.rest { background: var(--rest-fill); }
  :root:not([data-transparency="full"]) .topbar::after { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; -webkit-mask-image: none; mask-image: none; inset: 0; }
}
@media (prefers-contrast: more) {
  .glass { background: var(--glass-bg-strong); border: 1px solid var(--label-3); }
  .card, .stat, .list { border: 1px solid var(--sep); }
}

/* ---------- App-Gerüst ---------- */
#app { min-height: 100vh; min-height: 100dvh; }
.screen {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: calc(var(--sat) + 12px) calc(var(--gutter) + var(--sar)) calc(var(--tabbar-h) + var(--tabbar-gap) + var(--sab) + 28px) calc(var(--gutter) + var(--sal));
}
.screen.no-tabbar { padding-bottom: calc(var(--sab) + 110px); }
.screen.has-cta { padding-bottom: calc(var(--tabbar-h) + var(--tabbar-gap) + var(--sab) + 104px); }
.screen.no-tabbar.has-cta { padding-bottom: calc(var(--sab) + 120px); }
.screen.onb.has-cta { padding-bottom: calc(var(--sab) + 180px); }

.view-enter { animation: viewIn 0.32s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Kompakte Kopfzeile, erscheint beim Scrollen (Scroll-Edge-Effekt) */
.topbar {
  position: fixed; left: 0; right: 0; top: 0; z-index: 30;
  padding: calc(var(--sat) + 6px) calc(12px + var(--sar)) 8px calc(12px + var(--sal));
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  pointer-events: none;
}
.topbar::after {
  content: ""; position: absolute; inset: 0 0 -22px 0; z-index: -1;
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--bg) 92%, transparent) 0,
    color-mix(in srgb, var(--bg) 92%, transparent) calc(var(--sat) + 4px),
    color-mix(in srgb, var(--bg) 55%, transparent) 70%,
    transparent 100%);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 72%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0, #000 72%, transparent 100%);
  opacity: 0; transition: opacity 0.2s;
}
.topbar.scrolled::after { opacity: 1; }
.topbar > * { pointer-events: auto; }
.topbar .t-left { justify-self: start; display: flex; gap: 8px; }
.topbar .t-right { justify-self: end; display: flex; gap: 8px; }
.topbar .t-title {
  font-weight: 600; font-size: 17px; opacity: 0; transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56vw;
}
.topbar.scrolled .t-title, .topbar.always .t-title { opacity: 1; transform: none; }

.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-grid; place-items: center; color: var(--label);
  transition: transform 0.15s var(--ease);
}
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 22px; height: 22px; }
.pill-btn {
  height: 44px; padding: 0 16px 0 10px; border-radius: 22px; font-weight: 600; font-size: 16px;
  display: inline-flex; align-items: center; gap: 4px; color: var(--label);
}
.pill-btn svg { width: 20px; height: 20px; }

.large-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 44px 0 14px; }
.large-title h1 { font-family: var(--font-display); font-size: 34px; line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.large-title .sub { color: var(--label-2); font-size: 15px; margin-top: 2px; }

/* ---------- Tab-Leiste (schwebendes Glas) ---------- */
.tabbar {
  position: fixed; z-index: 40;
  left: calc(16px + var(--sal)); right: calc(16px + var(--sar));
  bottom: var(--tabbar-gap);
  max-width: 460px; margin: 0 auto;
  height: var(--tabbar-h); border-radius: 31px;
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 5px;
}
.tabbar a {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: 26px; text-decoration: none; color: var(--label-2);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.01em;
  transition: color 0.2s, background 0.25s var(--ease);
}
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--accent-text); background: var(--fill); }

/* Scroll-Edge unten: Inhalt wird hinter Tab-Leiste und Hauptaktion weich ausgeblendet (wie oben) */
.bottom-edge {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; pointer-events: none;
  height: calc(var(--tabbar-gap) + var(--tabbar-h) + 26px);
  background: linear-gradient(to top, color-mix(in srgb, var(--bg) 94%, transparent) 0, color-mix(in srgb, var(--bg) 80%, transparent) 55%, transparent 100%);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  -webkit-mask-image: linear-gradient(to top, #000 0, #000 60%, transparent 100%); mask-image: linear-gradient(to top, #000 0, #000 60%, transparent 100%);
}
.bottom-edge.with-cta { height: calc(var(--tabbar-gap) + var(--tabbar-h) + 104px); }
.bottom-edge.no-tabbar { height: calc(var(--sab) + 96px); }
.bottom-edge.no-tabbar.with-cta { height: calc(var(--sab) + 110px); }
.bottom-edge.tall { height: calc(var(--sab) + 170px); }
:root[data-transparency="reduced"] .bottom-edge { -webkit-backdrop-filter: none; backdrop-filter: none; background: linear-gradient(to top, var(--bg) 0, var(--bg) 70%, transparent 100%); }

/* Schwebende Hauptaktion über der Tab-Leiste */
.cta-dock {
  position: fixed; z-index: 39;
  left: calc(16px + var(--sal)); right: calc(16px + var(--sar));
  bottom: calc(var(--tabbar-gap) + var(--tabbar-h) + 12px);
  max-width: 460px; margin: 0 auto;
  display: grid; gap: 8px;
}
.cta-dock.no-tabbar { bottom: calc(var(--sab) + 14px); }
.cta {
  width: 100%; height: 58px; border-radius: 29px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 18px; font-weight: 700; letter-spacing: -0.01em;
  transition: transform 0.15s var(--ease), filter 0.2s;
}
.cta:active { transform: scale(0.98); }
.cta svg { width: 22px; height: 22px; }
.cta.quiet { color: var(--label); }

/* ---------- Inhaltsflächen (deckend) ---------- */
.card { background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--card-shadow); padding: 16px; }
.card + .card, .section + .card, .card + .section { margin-top: 12px; }
.section { margin-top: 26px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 4px 8px; gap: 8px; }
.section-head h2 { font-size: 20px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.section-head .aside { color: var(--label-2); font-size: 15px; }
.muted { color: var(--label-2); }
.small { font-size: 13px; }
.footnote { font-size: 13px; color: var(--label-2); line-height: 1.4; }
.center { text-align: center; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-text); }
.kicker.rest { color: var(--rest); }
.kicker.gold { color: var(--gold); }

.list { background: var(--surface); border-radius: var(--radius-m); box-shadow: var(--card-shadow); overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 16px;
  position: relative; width: 100%; text-align: left; color: var(--label);
}
.row + .row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: 0.5px solid var(--sep); }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-size: 17px; }
.row .subtitle { font-size: 14px; color: var(--label-2); margin-top: 1px; }
.row .value { color: var(--label-2); font-size: 16px; white-space: nowrap; }
.row .chev { color: var(--label-3); width: 18px; height: 18px; flex: none; display: grid; place-items: center; }
.row .chev svg, .row > svg { width: 18px; height: 18px; flex: none; }
a.row, a.btn { text-decoration: none; color: inherit; }
a.btn.primary { color: var(--on-accent); }
.row .lead-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; flex: none; }
.row .lead-icon svg { width: 18px; height: 18px; }
button.row:active, a.row:active { background: var(--fill); }
.row.danger-row .title { color: var(--danger); }
.row[aria-disabled="true"] { opacity: 0.55; }
.row select.text { width: auto; max-width: 52%; padding: 8px 10px; font-size: 15px; }
.row.stack { flex-direction: column; align-items: stretch; gap: 8px; }
.row.stack .segmented { width: 100%; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 11px;
  font-size: 12px; font-weight: 600; white-space: nowrap; vertical-align: middle;
  background: var(--fill); color: var(--label-2);
}
.badge svg { width: 13px; height: 13px; }
.badge.belegt { background: var(--success-soft); color: var(--success); }
.badge.rekonstruiert { background: var(--warn-soft); color: color-mix(in srgb, var(--gold) 70%, var(--label)); }
.badge.accent { background: var(--accent-soft); color: var(--accent-text); }
.badge.rest { background: var(--rest-soft); color: var(--rest); }
.badge.gold { background: var(--gold-soft); color: var(--gold); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 20px; border-radius: 25px; font-weight: 600; font-size: 17px;
  transition: transform 0.15s var(--ease), background 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 20px; height: 20px; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.secondary { background: var(--fill); color: var(--label); }
.btn.tinted { background: var(--accent-soft); color: var(--accent-text); }
.btn.rest { background: var(--rest-soft); color: var(--rest); }
.btn.danger { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.btn.block { width: 100%; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 15px; border-radius: 18px; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.link-btn { color: var(--accent-text); font-weight: 600; font-size: 15px; padding: 8px 0; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* Segmentierte Auswahl */
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; gap: 2px; background: var(--fill); border-radius: 12px; }
.segmented button { min-height: 34px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--label-2); padding: 0 6px; }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--label); box-shadow: 0 2px 8px rgba(0,0,0,0.12); }

/* Schalter */
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 16px; background: var(--fill-strong); transition: background 0.2s; pointer-events: none; }
.switch span::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,0.15), 0 1px 1px rgba(0,0,0,0.16); transition: transform 0.25s var(--ease);
}
.switch input:checked + span { background: var(--success); }
.switch input:checked + span::after { transform: translateX(20px); }

/* Zähler (Stepper) */
.stepper { display: inline-flex; align-items: center; background: var(--fill); border-radius: 10px; height: 36px; }
.stepper button { width: 42px; height: 36px; display: grid; place-items: center; color: var(--label); }
.stepper button svg { width: 16px; height: 16px; }
.stepper button[disabled] { opacity: 0.3; }
.stepper output { min-width: 58px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 15px; }
.stepper.big { height: 72px; border-radius: 22px; width: 100%; justify-content: space-between; }
.stepper.big button { width: 84px; height: 72px; border-radius: 22px; }
.stepper.big button svg { width: 28px; height: 28px; }
.stepper.big output { font-family: var(--font-rounded); font-size: 44px; font-weight: 700; }
.stepper.big .num-input {
  width: 130px; min-width: 0; text-align: center; border: 0; background: transparent; color: var(--label);
  font: 700 44px var(--font-rounded); font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield;
}
.stepper.big .num-input::-webkit-outer-spin-button, .stepper.big .num-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper.big .num-input:focus { outline: none; background: var(--surface); border-radius: 14px; }

input.text, select.text, textarea.text {
  width: 100%; border: 0; border-radius: 12px; background: var(--fill); padding: 13px 14px; font-size: 17px; color: var(--label);
}
input[type="time"].text { width: auto; padding: 8px 10px; font-size: 16px; }

/* ---------- Satzfolge als Chips ---------- */
.set-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.set-chip {
  min-width: 40px; height: 34px; padding: 0 10px; border-radius: 17px;
  display: inline-grid; place-items: center;
  font-family: var(--font-rounded); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 17px;
  background: var(--fill); color: var(--label);
}
.set-chip.done { background: var(--accent-soft); color: var(--accent-text); }
.set-chip.now { background: var(--accent); color: var(--on-accent); }
.set-chips.small .set-chip { min-width: 30px; height: 26px; font-size: 14px; padding: 0 7px; border-radius: 13px; }

/* ---------- Programmübersicht ---------- */
.hero { display: grid; grid-template-columns: auto 1fr; gap: 14px 18px; align-items: center; padding: 18px; }
.hero .track-row { grid-column: 1 / -1; }
.ring { position: relative; width: 104px; height: 104px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--fill-strong); }
.ring .bar { stroke: var(--accent); transition: stroke-dashoffset 0.8s var(--ease); }
.ring .ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .ring-label b { font-family: var(--font-rounded); font-size: 30px; line-height: 1; font-weight: 700; }
.ring .ring-label span { font-size: 12px; color: var(--label-2); margin-top: 2px; }
.hero .day { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin: 2px 0 4px; }
.hero .meta { color: var(--label-2); font-size: 15px; }
.level-track { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.level-track i { height: 6px; border-radius: 3px; background: var(--fill-strong); position: relative; overflow: hidden; }
.level-track i b { position: absolute; inset: 0; width: 0; background: var(--accent); border-radius: inherit; }
.level-track-labels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 4px; font-size: 11px; color: var(--label-3); font-weight: 600; }

.today { padding: 18px; }
.today-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.today-head .t-icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.today-head .t-icon.rest { background: var(--rest-soft); color: var(--rest); }
.today-head .t-icon.gold { background: var(--gold-soft); color: var(--gold); }
.today-head .t-icon svg { width: 20px; height: 20px; }
.today-head b { display: block; font-size: 17px; }
.today-head span { font-size: 14px; color: var(--label-2); }
.today .facts { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; color: var(--label-2); font-size: 14px; }
.today .facts b { color: var(--label); font-variant-numeric: tabular-nums; }
.today .explain { margin: 12px 0 0; font-size: 14px; color: var(--label-2); }

.record-card { display: flex; align-items: center; gap: 14px; }
.record-card .medal-sm { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); flex: none; }
.record-card .medal-sm svg { width: 24px; height: 24px; }
.record-card b.big { font-family: var(--font-rounded); font-size: 28px; line-height: 1; }

.banner {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-m);
  background: var(--surface); box-shadow: var(--card-shadow); margin-bottom: 12px;
  border-left: 4px solid var(--accent);
}
.banner > svg { width: 22px; height: 22px; flex: none; color: var(--accent-text); margin-top: 1px; }
.banner .grow { flex: 1; min-width: 0; }
.banner b { display: block; }
.banner .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.banner.info { border-left-color: var(--rest-fill); }
.banner.info > svg { color: var(--rest); }
.banner.warn { border-left-color: var(--gold-fill); }
.banner.warn > svg { color: var(--gold); }

/* ---------- Plan ---------- */
.day-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; min-height: 64px; padding: 10px 14px; position: relative; width: 100%; text-align: left; color: var(--label); }
.day-row + .day-row::before { content: ""; position: absolute; top: 0; left: 60px; right: 0; border-top: 0.5px solid var(--sep); }
.day-row:active { background: var(--fill); }
.day-no { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-rounded); font-weight: 700; font-size: 15px; background: var(--fill); color: var(--label-2); }
.day-row.done .day-no { background: var(--accent-soft); color: var(--accent-text); }
.day-row.done .day-no svg { width: 18px; height: 18px; }
.day-row.current .day-no { background: var(--accent); color: var(--on-accent); }
.day-row.test .day-no { background: var(--gold-soft); color: var(--gold); }
.day-row .d-title { font-weight: 600; font-size: 16px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.day-row .d-sub { font-size: 14px; color: var(--label-2); margin-top: 2px; font-variant-numeric: tabular-nums; }
.day-row .d-date { font-size: 13px; color: var(--label-2); text-align: right; white-space: nowrap; }
.day-row .d-date b { display: block; color: var(--label); font-size: 15px; font-variant-numeric: tabular-nums; }
.plan-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-m); background: var(--surface); box-shadow: var(--card-shadow); font-size: 14px; color: var(--label-2); }
.plan-note svg { width: 20px; height: 20px; flex: none; color: var(--rest); margin-top: 1px; }
.plan-note b { color: var(--label); }
.set-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.set-table th, .set-table td { text-align: left; padding: 8px 4px; border-bottom: 0.5px solid var(--sep); font-size: 15px; }
.set-table th { font-size: 12px; color: var(--label-2); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; }
.set-table td.r, .set-table th.r { text-align: right; }
.set-table tr:last-child td { border-bottom: 0; }

/* ---------- Training (aktiver Satz, Pause) ---------- */
.workout {
  position: fixed; inset: 0; z-index: 50; background: var(--bg);
  display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto;
  padding: calc(var(--sat) + 8px) calc(12px + var(--sar)) calc(var(--sab) + 12px) calc(12px + var(--sal));
  overflow: hidden; overscroll-behavior: none; touch-action: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.w-top { display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; gap: 8px; }
.w-top .icon-btn { width: 50px; height: 50px; }
.w-where { text-align: center; line-height: 1.2; min-width: 0; }
.w-where b { display: block; font-size: 17px; }
.w-where span { font-size: 14px; color: var(--label-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.w-strip { display: flex; justify-content: center; margin: 12px 0 10px; min-height: 34px; }

/* Die Zählfläche: groß, deckend, eindeutig abgegrenzt */
.tapzone {
  position: relative; min-height: 0; border-radius: var(--radius-xl);
  background: var(--surface); box-shadow: var(--card-shadow);
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; align-items: center; justify-items: center;
  padding: 14px 16px; overflow: hidden; outline: none;
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  border: 2px solid transparent; transition: border-color 0.2s;
}
.tapzone.counting { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.tapzone.is-rest { border-color: color-mix(in srgb, var(--rest-fill) 40%, transparent); }
.tapzone:focus-visible { border-color: var(--accent); }
.tz-head { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 8px; }
.tz-mode { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--label-2); padding: 6px 10px; border-radius: 14px; background: var(--fill); }
.tz-mode svg { width: 16px; height: 16px; }
.tz-record { font-size: 13px; font-weight: 700; color: var(--gold); display: inline-flex; gap: 5px; align-items: center; }
.tz-record svg { width: 15px; height: 15px; }
.tz-center { position: relative; display: grid; place-items: center; width: 100%; height: 100%; min-height: 0; }
.tz-ring { position: absolute; width: min(78vw, 46vh, 360px); aspect-ratio: 1; }
.tz-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.tz-ring .track { stroke: var(--fill); }
.tz-ring .bar { stroke: var(--accent); transition: stroke-dashoffset 0.35s var(--ease), stroke 0.3s; }
.workout.is-rest .tz-ring .bar { stroke: var(--rest-fill); }
.workout.is-prep .tz-ring .bar { stroke: color-mix(in srgb, var(--accent) 55%, transparent); }
.tz-number { position: relative; text-align: center; line-height: 1; max-width: min(64vw, 250px); }
.tz-number .n {
  display: block; font-family: var(--font-rounded); font-weight: 700; font-variant-numeric: tabular-nums;
  font-size: clamp(88px, min(34vw, 20vh), 190px); letter-spacing: -0.04em; color: var(--label);
}
.workout.is-rest .tz-number .n { color: var(--rest); font-size: clamp(72px, min(26vw, 16vh), 150px); }
.workout.is-prep .tz-number .n { color: var(--accent-text); }
.tz-number .l { display: block; margin-top: 6px; font-size: 17px; font-weight: 600; color: var(--label-2); }
.tz-number .l2 { display: block; margin-top: 4px; font-size: 15px; color: var(--label-3); font-variant-numeric: tabular-nums; }
.tz-foot { width: 100%; display: grid; gap: 8px; justify-items: center; text-align: center; min-height: 34px; }
.tz-hint { font-size: 14px; color: var(--label-2); display: inline-flex; gap: 6px; align-items: center; }
.tz-hint svg { width: 16px; height: 16px; }
.chip-note {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 14px;
  font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; background: var(--rest-soft); color: var(--rest);
}
.chip-note.accent { background: var(--accent-soft); color: var(--accent-text); }
.chip-note.gold { background: var(--gold-soft); color: var(--gold); }
.chip-note[hidden] { display: none; }
.fix-row { display: inline-flex; align-items: center; gap: 10px; padding: 4px 4px 4px 14px; border-radius: 22px; background: var(--fill); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fix-row[hidden] { display: none; }
.fix-row button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--label); }
.fix-row button svg { width: 18px; height: 18px; }

/* Rückmeldung pro gezählter Wiederholung */
.tz-pulse { animation: repPulse 0.32s var(--ease); }
@keyframes repPulse { 0% { transform: scale(1); } 35% { transform: scale(1.07); } 100% { transform: scale(1); } }
.ripple { position: absolute; width: 140px; height: 140px; margin: -70px 0 0 -70px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 38%, transparent) 0, transparent 70%); animation: ripple 0.55s ease-out forwards; }
@keyframes ripple { from { transform: scale(0.3); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
.tapzone.flash-ignored { animation: ignoredFlash 0.3s ease; }
@keyframes ignoredFlash { 0%, 100% { background: var(--surface); } 40% { background: var(--surface-3); } }

/* Steuerleiste unten (Glas) – Korrektur links/rechts außen, fern der Nasen-/Kinnlinie */
.w-controls {
  margin: 12px auto 0; width: 100%; max-width: 480px;
  display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; gap: 10px;
  padding: 8px; border-radius: 40px;
}
.w-controls.two { grid-template-columns: 1fr 1.4fr; }
.w-controls .ctl {
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: var(--label);
  background: var(--fill);
}
.w-controls .ctl svg { width: 28px; height: 28px; }
.w-controls .ctl:active { transform: scale(0.95); }
.w-controls .ctl[disabled] { opacity: 0.35; }
.w-controls .ctl.hidden { visibility: hidden; }
.w-controls .wide {
  height: 64px; border-radius: 32px; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 17px; position: relative; overflow: hidden;
}
.w-controls .wide svg { width: 22px; height: 22px; }
.wide.primary { background: var(--accent); color: var(--on-accent); }
.wide.rest { background: var(--rest-fill); color: var(--on-rest); }
.wide.neutral { background: var(--fill); color: var(--label); }
.w-note { text-align: center; font-size: 12px; color: var(--label-3); margin-top: 6px; min-height: 15px; }

/* Gedrückt-halten-Taste */
.hold-btn { position: relative; overflow: hidden; }
.hold-btn .hold-fill { position: absolute; inset: 0; transform-origin: left center; transform: scaleX(0); background: color-mix(in srgb, currentColor 22%, transparent); pointer-events: none; }
.hold-btn.holding .hold-fill { transform: scaleX(1); transition: transform var(--hold-ms, 700ms) linear; }
.hold-btn .hold-label, .hold-btn svg { position: relative; }

/* Querformat: Zahl links, Steuerung rechts */
@media (orientation: landscape) and (max-height: 560px) {
  .workout { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); column-gap: 14px; }
  .w-top { grid-column: 1 / -1; }
  .w-strip { grid-column: 2; grid-row: 2; margin: 8px 0; }
  .tapzone { grid-column: 1; grid-row: 2 / 4; margin-top: 8px; }
  .w-controls { grid-column: 2; grid-row: 3; align-self: end; margin-top: 0; }
  /* flache Zählfläche: Ring, Ziffern und Fußzeile so bemessen, dass nichts überlappt oder abgeschnitten wird */
  .tapzone { padding: 10px 14px; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); column-gap: 10px; }
  .tz-head { grid-column: 1 / -1; }
  .tz-center { grid-column: 1; grid-row: 2; }
  .tz-foot { grid-column: 2; grid-row: 2; align-self: center; justify-items: end; width: auto; min-height: 0; gap: 8px; }
  .tz-foot .tz-hint { display: none; }
  .tz-ring { width: min(46vh, 30vw); }
  .tz-number { max-width: 150px; }
  .tz-number .n { font-size: clamp(44px, 15vh, 76px); }
  .workout.is-rest .tz-number .n { font-size: clamp(36px, 11vh, 58px); }
  .tz-number .l { font-size: 14px; margin-top: 2px; }
  .tz-number .l2 { font-size: 12px; margin-top: 2px; }
}

/* ---------- Overlays ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: end center;
  background: rgba(0, 0, 0, 0.38);
  padding: calc(var(--sat) + 20px) calc(12px + var(--sar)) calc(var(--sab) + 12px) calc(12px + var(--sal));
  animation: fadeIn 0.2s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%; max-width: 520px; background: var(--surface); border-radius: 32px; padding: 22px 20px 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35); animation: sheetIn 0.36s var(--ease) both;
  max-height: calc(100dvh - var(--sat) - var(--sab) - 40px); overflow: auto;
}
@keyframes sheetIn { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: -0.01em; text-align: center; }
.sheet p { margin: 0 0 12px; color: var(--label-2); text-align: center; }
.sheet .sheet-actions { display: grid; gap: 10px; margin-top: 16px; }
.sheet .sheet-actions.two { grid-template-columns: 1fr 1fr; }
.sheet-grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--fill-strong); margin: -10px auto 12px; }
.sheet.left h2, .sheet.left p { text-align: left; }
.medal { width: 84px; height: 84px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.medal svg { width: 44px; height: 44px; }
.medal.success { background: var(--success-soft); color: var(--success); }
.medal.gold { background: var(--gold-soft); color: var(--gold); }
.medal.rest { background: var(--rest-soft); color: var(--rest); }

/* ---------- Ergebnis ---------- */
.result-hero { text-align: center; margin: 48px 0 18px; }
.result-hero h1 { font-family: var(--font-display); font-size: 34px; margin: 6px 0 4px; letter-spacing: -0.02em; line-height: 1.1; }
.result-hero .sub { color: var(--label-2); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat { background: var(--surface); border-radius: var(--radius-m); padding: 14px 16px; box-shadow: var(--card-shadow); }
.stat b { display: block; font-family: var(--font-rounded); font-size: 34px; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
.stat span { color: var(--label-2); font-size: 14px; }
.stat.accent b { color: var(--accent-text); }
.stat.gold b { color: var(--gold); }
.setbars { display: grid; gap: 10px; }
.setbar { display: grid; grid-template-columns: 58px 1fr 64px; gap: 10px; align-items: center; font-variant-numeric: tabular-nums; }
.setbar .sb-label { font-size: 14px; color: var(--label-2); }
.setbar .sb-track { height: 12px; border-radius: 6px; background: var(--fill); position: relative; overflow: hidden; }
.setbar .sb-fill { position: absolute; inset: 0 auto 0 0; border-radius: 6px; background: var(--accent); }
.setbar .sb-target { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--label-2); border-radius: 1px; }
.setbar .sb-val { text-align: right; font-weight: 700; font-size: 15px; }
.setbar .sb-val small { color: var(--label-2); font-weight: 500; }
.setbar.miss .sb-fill { background: color-mix(in srgb, var(--accent) 55%, transparent); }

/* ---------- Verlauf & Statistik ---------- */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kpi { background: var(--surface); border-radius: var(--radius-m); padding: 12px; box-shadow: var(--card-shadow); min-width: 0; }
.kpi b { display: block; font-family: var(--font-rounded); font-size: 26px; font-weight: 700; line-height: 1.15; }
.kpi span { font-size: 13px; color: var(--label-2); }
.month-head { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--label-2); margin: 22px 4px 8px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
.status-dot.frei { background: var(--series-free); }
.status-dot.programm { background: var(--series-plan); }
.status-dot.abgebrochen { background: var(--label-3); }
.period-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 14px 0 10px; }
.period-nav b { font-size: 17px; }
.period-nav .icon-btn { background: var(--fill); width: 40px; height: 40px; }
.period-nav .icon-btn[disabled] { opacity: 0.3; }

/* Balkendiagramm (HTML/CSS, kein Canvas): dünne Balken ≤ 24 px, 4 px gerundetes Datenende und eckig an der
   Basislinie, 2 px Flächenabstand zwischen gestapelten Segmenten, Haarlinien-Raster, Legende + Tabellenansicht */
.chart { position: relative; padding: 6px 0 0 34px; }
.chart .plot { position: relative; height: 170px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; align-items: end; border-bottom: 1px solid var(--sep); }
.chart .gridline { position: absolute; left: 0; right: 0; border-top: 1px solid var(--fill); pointer-events: none; }
.chart .gridline span { position: absolute; left: -34px; top: -8px; width: 28px; text-align: right; font-size: 11px; color: var(--label-2); font-variant-numeric: tabular-nums; }
.chart .col { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; min-width: 0; border-radius: 6px 6px 0 0; outline: none; }
.chart .col .seg { width: 100%; max-width: 24px; flex: none; }
.chart .col .seg.programm { background: var(--series-plan); }
.chart .col .seg.frei { background: var(--series-free); }
.chart .col .seg.top { border-radius: 4px 4px 0 0; }
.chart .col .target { position: absolute; left: 50%; transform: translateX(-50%); width: min(100%, 30px); height: 2px; margin-bottom: -1px; background: var(--label-2); border-radius: 1px; pointer-events: none; }
.chart .col.sel, .chart .col:focus-visible { background: var(--fill); }
.chart .xlabels { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; margin-top: 6px; }
.chart .xlabels span { font-size: 11px; color: var(--label-2); text-align: center; white-space: nowrap; overflow: visible; font-variant-numeric: tabular-nums; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--label-2); margin-top: 12px; align-items: center; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.chart-legend i.programm { background: var(--series-plan); }
.chart-legend i.frei { background: var(--series-free); }
.chart-legend i.target { width: 14px; height: 2px; border-radius: 1px; background: var(--label-2); vertical-align: 3px; }
.chart-readout { min-height: 20px; font-size: 14px; color: var(--label-2); margin-top: 10px; font-variant-numeric: tabular-nums; }
.chart-readout b { color: var(--label); }
.chart-table { margin-top: 12px; }
.chart-table[hidden] { display: none; }

/* ---------- Onboarding ---------- */
.onb { text-align: center; }
.onb h1 { font-family: var(--font-display); font-size: 34px; letter-spacing: -0.02em; margin: 26px 0 8px; line-height: 1.1; }
.onb .lead { color: var(--label-2); font-size: 17px; margin: 0 auto 20px; max-width: 34ch; }
.onb-steps { display: flex; justify-content: center; gap: 6px; margin-top: 18px; }
.onb-steps i { width: 8px; height: 8px; border-radius: 4px; background: var(--fill-strong); transition: width 0.3s var(--ease), background 0.3s; }
.onb-steps i.on { width: 22px; background: var(--accent); }
.feature-list { display: grid; gap: 12px; text-align: left; margin: 8px 0 0; }
.feature { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.feature .f-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.feature .f-icon svg { width: 22px; height: 22px; }
.feature b { display: block; font-size: 16px; }
.feature span { font-size: 14px; color: var(--label-2); }
.choice-grid { display: grid; gap: 10px; text-align: left; }
.choice {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 14px 16px;
  border-radius: var(--radius-m); background: var(--surface); box-shadow: var(--card-shadow); text-align: left; color: var(--label);
  transition: box-shadow 0.2s, transform 0.15s var(--ease);
}
.choice:active { transform: scale(0.99); }
.choice .c-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--fill); color: var(--label-2); font-family: var(--font-rounded); font-weight: 700; font-size: 20px; }
.choice .c-icon svg { width: 24px; height: 24px; }
.choice b { display: block; font-size: 17px; }
.choice span { font-size: 14px; color: var(--label-2); }
.choice .check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--fill-strong); display: grid; place-items: center; color: transparent; }
.choice .check svg { width: 16px; height: 16px; }
.choice[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--accent), var(--card-shadow); }
.choice[aria-pressed="true"] .c-icon { background: var(--accent-soft); color: var(--accent-text); }
.choice[aria-pressed="true"] .check { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.choice[aria-disabled="true"] { opacity: 0.6; }
.privacy { display: flex; gap: 12px; text-align: left; align-items: flex-start; }
.privacy svg { width: 26px; height: 26px; color: var(--success); flex: none; }

/* Illustration: iPhone unter dem Gesicht */
.illus { width: 100%; max-width: 360px; margin: 0 auto; display: block; }
.illus .floor { stroke: var(--label-3); }
.illus .body { stroke: var(--label); }
.illus .head { fill: var(--label); }
.illus .phone { fill: var(--accent); }
.illus .phone-glow { fill: var(--accent-soft); }
.illus .touch { fill: none; stroke: var(--accent); }
.illus .dim { stroke: var(--label-3); }
.illus text { fill: var(--label-2); font: 600 12px var(--font); }

.guide-section h3 { margin: 0 0 6px; font-size: 17px; }
.guide-section p, .guide-section li { color: var(--label-2); font-size: 15px; }
.guide-section ul { margin: 6px 0 0; padding-left: 20px; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 7px 0; }
.steps li::before {
  content: counter(step); width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text);
  font-weight: 700; font-size: 14px; display: grid; place-items: center; font-family: var(--font-rounded);
}
.callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius-s); background: var(--warn-soft); font-size: 15px; }
.callout svg { width: 20px; height: 20px; flex: none; color: var(--gold); }

/* Zähltest */
.testpad { height: 46vh; min-height: 260px; }
.diag { font-size: 14px; }
.diag td { padding: 6px 0; border-bottom: 0.5px solid var(--sep); vertical-align: top; }
.diag td:first-child { color: var(--label-2); padding-right: 12px; }
.diag tr:last-child td { border-bottom: 0; }
.log { max-height: 140px; overflow: auto; font: 13px/1.5 ui-monospace, monospace; color: var(--label-2); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; z-index: 80; transform: translateX(-50%);
  bottom: calc(var(--tabbar-gap) + var(--tabbar-h) + 92px);
  /* Hinweis-Kapsel invertiert und fast deckend – über beliebigem Inhalt lesbar */
  background: color-mix(in srgb, var(--label) 90%, transparent) !important; color: var(--bg);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 0 !important;
  padding: 12px 18px; border-radius: 22px; font-size: 15px; font-weight: 600; max-width: calc(100vw - 32px);
  animation: toastIn 0.3s var(--ease) both; text-align: center;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

.empty { text-align: center; padding: 28px 16px; color: var(--label-2); }
.empty svg { width: 40px; height: 40px; color: var(--label-3); margin-bottom: 8px; }
.error-box { white-space: pre-wrap; font-family: ui-monospace, monospace; font-size: 13px; }

/* ---------- Reduzierte Bewegung ---------- */
:root[data-motion="reduced"] *, :root[data-motion="reduced"] *::before, :root[data-motion="reduced"] *::after {
  animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important;
}
:root[data-motion="reduced"] .ripple { display: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .ripple { display: none; }
}
/* Gedrückt-halten bleibt auch bei reduzierter Bewegung sichtbar (Füllstand statt Animation) */
:root[data-motion="reduced"] .hold-btn.holding .hold-fill { transition-duration: var(--hold-ms, 700ms) !important; }
@media (prefers-reduced-motion: reduce) { .hold-btn.holding .hold-fill { transition-duration: var(--hold-ms, 700ms) !important; } }

/* ---------- Test-Simulation einer iPhone-Hardware (nur mit ?sim=iphone) ---------- */
:root.sim-iphone { --sat: 59px; --sab: 34px; }
.sim-island { position: fixed; top: 11px; left: 50%; transform: translateX(-50%); width: 124px; height: 36px; border-radius: 20px; background: #000; z-index: 1000; pointer-events: none; }
.sim-home { position: fixed; bottom: 8px; left: 50%; transform: translateX(-50%); width: 140px; height: 5px; border-radius: 3px; background: var(--label); opacity: 0.85; z-index: 1000; pointer-events: none; }
.sim-status { position: fixed; top: 0; left: 0; right: 0; height: 54px; z-index: 999; pointer-events: none; display: flex; justify-content: space-between; align-items: center; padding: 6px 34px 0; font-weight: 600; font-size: 16px; }
