/* Aeon — Tagesbuch.
   Eine Schrift: Archivo mit variabler Breite. Sätze normal breit, Zahlen breit gezogen (wdth 125), Überschriften
   leicht breit. Keine Großbuchstaben-Etiketten, keine Monospace. Kalk und Schiefer als Grund, Kobalt nur für das,
   was als Nächstes dran ist und für Aktionen. Ampelfarben nur als kleine Punkte und dünne Balken.
   Das eine Auffällige: die Tagesachse auf „Heute“. Alles andere bleibt ruhig. */

/* Tokens (Farben, Schrift, Radien, Bewegung) stehen ausschließlich in aeon-tokens.css. */

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 420 15px/1.5 var(--f);
  -webkit-font-smoothing: antialiased; font-optical-sizing: auto;
  padding: env(safe-area-inset-top, 0px) 18px calc(104px + env(safe-area-inset-bottom, 0px));
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.app { max-width: 560px; margin: 0 auto; }
.num, .display { font-family: var(--f); font-stretch: 125%; font-weight: 640; font-variant-numeric: tabular-nums lining-nums; letter-spacing: -.01em; }
.label { font: 560 13px/1.3 var(--f); color: var(--text-2); letter-spacing: 0; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.z-green { color: var(--green); } .z-yellow { color: var(--yellow-t); } .z-red { color: var(--red); }
.up { color: var(--green); } .down { color: var(--red); }
a { color: var(--accent); }
b, strong { font-weight: 620; }

/* ---------- Kopf ---------- */
.top { padding: 14px 0 6px; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.meta { font: 520 13.5px/1.2 var(--f); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top h1 { margin: 10px 0 14px; font: 680 34px/1.05 var(--f); font-stretch: 112%; letter-spacing: -.02em; }
.iconbtn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--panel); box-shadow: var(--shadow); display: grid; place-items: center; cursor: pointer; flex: none; }
.iconbtn-sp { width: 36px; height: 36px; }
.iconbtn svg { width: 17px; height: 17px; stroke: var(--text-2); }
.iconbtn.spin svg { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Heute: Satz und Messwerte ---------- */
.hero { padding: 6px 0 4px; }
.hero-line { margin: 6px 0 18px; font: 660 30px/1.12 var(--f); font-stretch: 110%; letter-spacing: -.022em; text-wrap: balance; max-width: 18ch; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--panel); border-radius: var(--r); box-shadow: var(--shadow); }
.metric { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; padding: 14px 14px 15px; border: 0; background: none; text-align: left; cursor: pointer; color: inherit; border-radius: var(--r); }
.metric + .metric { box-shadow: inset 1px 0 0 var(--line); border-radius: 0; }
.metric:last-child { border-radius: 0 var(--r) var(--r) 0; }
.m-l { display: flex; align-items: center; gap: 6px; font: 560 12.5px/1.2 var(--f); color: var(--text-2); }
.m-l .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--z1); flex: none; }
.m-v { display: flex; align-items: baseline; gap: 2px; margin-top: 6px; font-size: 30px; line-height: 1; }
.m-v small { font: 560 13px/1 var(--f); font-stretch: 100%; color: var(--text-3); letter-spacing: 0; margin-left: 2px; }
.m-bar { position: relative; width: 100%; height: 3px; border-radius: 2px; background: var(--track); margin: 10px 0 7px; overflow: visible; }
.m-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; }
.m-bar .tz { position: absolute; top: -3px; bottom: -3px; border-radius: 2px; background: color-mix(in srgb, var(--strain) 22%, transparent); }
.m-s { font: 440 12px/1.3 var(--f); color: var(--text-3); max-width: 100%; text-wrap: pretty; }

/* ---------- Abschnitte ---------- */
.stack { display: flex; flex-direction: column; gap: 12px; }
.sec { margin-top: 18px; }
.sec-t { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 2px 10px; }
.sec-t h2 { margin: 0; font: 660 20px/1.2 var(--f); font-stretch: 108%; letter-spacing: -.015em; }
.sec-t span { font-size: 13px; color: var(--text-3); text-align: right; }
.card { background: var(--panel); border-radius: var(--r); padding: 16px 16px 17px; min-width: 0; box-shadow: var(--shadow); }
.card > h3 { margin: 0 0 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
.card > h3 > .label { font: 640 15.5px/1.25 var(--f); color: var(--text); letter-spacing: -.005em; }
.card > h3 > :not(.label) { font: 440 12.5px/1.3 var(--f) !important; color: var(--text-3) !important; text-align: right; }
.card .card { background: var(--surface-2); box-shadow: none; }
.note { font: 420 12.5px/1.5 var(--f); color: var(--text-3); margin: 4px 2px 0; }
.stack > .note { margin: 2px 4px; }

/* Aufklappbare Bereiche: als gruppierte Liste, wenn mehrere untereinander stehen */
.fold { padding: 0; }
.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; min-height: 52px; }
.fold > summary .label { font: 600 15px/1.25 var(--f); color: var(--text); }
.fold-side { display: flex; align-items: center; gap: 10px; font: 440 13px/1.2 var(--f); color: var(--text-3); text-align: right; }
.fold-side .muted { color: var(--text-3); }
.fold > summary::-webkit-details-marker, .item > summary::-webkit-details-marker, .sub-fold > summary::-webkit-details-marker, details.split-day > summary::-webkit-details-marker, .own-ctl > summary::-webkit-details-marker { display: none; }
.fold-body { padding: 0 16px 16px; }
.group { background: var(--panel); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.group > .fold, .group > .card { background: none; box-shadow: none; border-radius: 0; }
.group > * + * { box-shadow: inset 0 1px 0 var(--line) !important; }
/* Pfeil, dreht beim Öffnen */
.chev { width: 8px; height: 8px; flex: none; display: inline-block; border-right: 1.6px solid var(--text-3); border-bottom: 1.6px solid var(--text-3); transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s ease; }
details[open] > summary .chev { transform: rotate(225deg) translate(-1px, -1px); }

/* ---------- Hinweise ---------- */
.flags { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.flag { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.flag i { width: 7px; height: 7px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--z1); }
.flag.high i { background: var(--red); } .flag.mid i { background: var(--yellow); } .flag.ok i { background: var(--green); } .flag.low i { background: var(--text-3); }
.hints { padding: 14px 16px; }
.hints .flags { margin: 0; }

/* ---------- Etiketten ---------- */
.tag { display: inline-flex; align-items: center; gap: 5px; font: 560 12px/1 var(--f); padding: 5px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--z1); }
.tag.hard::before { background: var(--red); } .tag.easy::before, .tag.ok::before { background: var(--green); } .tag.moderate::before { background: var(--yellow); }
.tag.hard { color: var(--red); } .tag.easy, .tag.ok { color: var(--green); } .tag.moderate { color: var(--yellow-t); }

/* ---------- Bedienelemente ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; border: 0; border-radius: 999px; padding: 10px 18px; background: var(--surface-2); color: var(--text); font: 600 14.5px/1.1 var(--f); cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn.sm { min-height: 34px; padding: 7px 14px; font-size: 13.5px; }
.btn.block { width: 100%; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: default; }
a.btn.primary { color: var(--accent-ink); }
.btnrow { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.linkbtn { border: 0; background: none; padding: 10px 0 0; color: var(--accent); font: 560 14px/1.2 var(--f); cursor: pointer; text-align: left; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.ask { width: 100%; justify-content: space-between; padding: 12px 18px; }
.ask .arrow { font-style: normal; opacity: .7; }

.seg { display: flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--surface-2); }
.card .seg, .sheet .seg { background: var(--surface-2); }
.seg button { flex: 1; min-height: 34px; border: 0; border-radius: 999px; background: transparent; padding: 7px 4px; font: 560 13.5px/1 var(--f); cursor: pointer; color: var(--text-2); }
.seg button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.stack > .seg { background: var(--panel); box-shadow: var(--shadow); }
.stack > .seg button.on { background: var(--text); color: var(--panel); box-shadow: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.chip { border: 0; background: var(--surface-2); border-radius: 999px; padding: 8px 13px; min-height: 36px; font: 520 13.5px/1.2 var(--f); cursor: pointer; color: var(--text); }
.chip.on { background: var(--text); color: var(--panel); }
.chip.sm { padding: 6px 11px; min-height: 32px; font-size: 13px; }
.chip.pain { background: var(--red); color: #fff; }

input[type="time"], input[type="number"], input[type="text"], input[type="password"], input[type="date"], select {
  background: var(--surface-2); border: 0; border-radius: var(--r-s); padding: 9px 12px; width: 132px; text-align: right;
  font: 520 15px var(--f); font-variant-numeric: tabular-nums; color: var(--text); -webkit-appearance: none; appearance: none; min-height: 40px;
}
select { padding-right: 28px; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: right 14px center, right 10px center; background-size: 4px 4px; background-repeat: no-repeat; }
input:focus { outline: 2px solid var(--accent); outline-offset: 0; }
input.wide { width: 100%; text-align: left; margin-top: 12px; }
.list .li input.wide { margin-top: 0; max-width: 62%; }
input[type="range"] { width: 100%; accent-color: var(--accent); background: none; padding: 0; min-height: 28px; }
code { font: 520 12.5px var(--f); background: var(--surface-2); padding: 1px 6px; border-radius: 6px; word-break: break-all; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Listen ---------- */
.list { display: flex; flex-direction: column; }
.li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; box-shadow: inset 0 1px 0 var(--line); }
.li:first-child { box-shadow: none; padding-top: 0; }
.li .k { font-weight: 560; }
.li .s { font-size: 13px; color: var(--text-2); }
.li.past { opacity: .5; }
ol.howto { margin: 0; padding-left: 0; list-style: none; counter-reset: st; display: flex; flex-direction: column; gap: 10px; color: var(--text-2); font-size: 14px; }
ol.howto > li { counter-increment: st; position: relative; padding-left: 30px; }
ol.howto > li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font: 640 11.5px/20px var(--f); text-align: center; color: var(--text); }
ol.howto b { color: var(--text); font-weight: 600; }

/* ---------- Tagesachse ---------- */
.spine { list-style: none; margin: 0; padding: 0; position: relative; }
.stop { position: relative; display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 0 14px; padding-bottom: 12px; }
.stop::before { content: ""; position: absolute; left: 69.75px; top: 24px; bottom: -4px; width: 1.5px; background: var(--line-2); }
.stop:last-child::before { display: none; }
.stop-w { padding-top: 15px; text-align: right; font-size: 15px; line-height: 1.2; color: var(--text-2); white-space: nowrap; }
.stop-w.word { font: 560 12.5px/1.2 var(--f); color: var(--text-3); padding-top: 17px; }
.stop-c { position: relative; min-width: 0; padding-left: 18px; }
.stop-c::before { content: ""; position: absolute; left: -3px; top: 17px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px var(--line-2); }
.stop.done .stop-c::before { background: var(--text-3); box-shadow: none; }
.stop.next .stop-c::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.stop.next .stop-w { color: var(--accent); }
.stop .card { padding: 14px 15px 15px; }
.stop .card > h3 { display: none; }
.stop-t { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.stop-t b { font: 640 16px/1.3 var(--f); letter-spacing: -.008em; }
.stop-t span { font-size: 12.5px; color: var(--text-3); text-align: right; }
.stop .item:first-of-type { padding-top: 0; }
.stop .stack { gap: 8px; }

/* ---------- Als Nächstes ---------- */
.nx-sec { margin-top: 4px; }
.nx { padding: 2px 0 6px; }
.nx-main { display: flex; align-items: baseline; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.nx-t { font-size: 34px; line-height: 1; color: var(--accent); letter-spacing: -.02em; }
.nx-w { font: 640 19px/1.25 var(--f); letter-spacing: -.01em; min-width: 0; }
.nx-s { margin-top: 6px; font-size: 13px; line-height: 1.45; color: var(--text-3); }
.nx-rest { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; font-size: 14px; color: var(--text-2); }
.nx-rest b { color: var(--text); font-weight: 560; }
.nx-gap { margin-top: 14px; padding-top: 12px; box-shadow: inset 0 1px 0 var(--line); }
.nx-gt { font-size: 14.5px; }
.nx-gt b { font-weight: 640; }
.nx-gt span { color: var(--text-2); }
.nx-opt { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-2); }
.nx-opt b { color: var(--text); font-weight: 560; }

/* ---------- Check-in ---------- */
.checkin .ci-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 18px 0 8px; font-weight: 560; }
.checkin .ci-row .faint { text-align: right; }
.checkin .ci-row:first-of-type { margin-top: 0; }
.checkin .ci-row .faint { font: 440 12.5px var(--f); }
.checkin.done { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.chips.rg { margin-top: 0; }
.regions .ci-row { margin-top: 12px; }

/* ---------- Tagesplan ---------- */
.today .item, .ag-items .item { box-shadow: inset 0 1px 0 var(--line); padding: 12px 0; }
.today .item:first-of-type { box-shadow: none; padding-top: 0; }
.ag-items .item { box-shadow: none; padding: 0; }
.item > summary { list-style: none; cursor: pointer; }
.item-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.item-h .label { font-size: 12.5px; color: var(--text-3); font-weight: 500; }
.item-t { font: 640 17px/1.3 var(--f); letter-spacing: -.01em; margin-top: 2px; }
.ag-items .item-t { font-size: 15.5px; }
.item-r { display: flex; align-items: center; gap: 12px; flex: none; padding-top: 2px; }
.item-b { padding-top: 12px; }
.item.note .muted { font-size: 14px; margin-top: 3px; }
.sum { color: var(--text-2); margin-top: 6px; font-size: 14px; }
.targets { display: flex; gap: 24px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 8px; }
.target { font-size: 28px; line-height: 1; }
.target small { font: 520 13px var(--f); color: var(--text-3); margin-left: 5px; letter-spacing: 0; }
.targets .pace { color: var(--green); }
.compl { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.compl-v { font-size: 26px; line-height: 1; }
.steps { display: flex; gap: 2px; height: 8px; margin-top: 14px; border-radius: 4px; overflow: hidden; }
.steps span { background: var(--track); min-width: 3px; }
.steps .easy { background: var(--z0); } .steps .steady { background: color-mix(in srgb, var(--strain) 50%, var(--panel)); } .steps .work { background: var(--strain); }
.done-acts { box-shadow: inset 0 1px 0 var(--line); margin-top: 8px; padding-top: 12px; }
.own-ctl > summary { list-style: none; cursor: pointer; display: inline-block; }
.stop-own { padding: 0 0 4px 18px; }
.stop-own .own-ctl { margin-top: 0 !important; }
.stop-own .own-ctl > summary { padding-top: 2px; }

/* Gym-Einheit */
.workout { margin-top: 8px; }
.w-hint { margin: 0 0 8px; font-size: 13.5px; color: var(--text-2); }
.w-hint b { color: var(--text); font-weight: 620; }
.w-basis { margin: -2px 0 8px; font-size: 12px; color: var(--text-3); }
.ex-list { display: flex; flex-direction: column; }
.ex { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; box-shadow: inset 0 1px 0 var(--line); }
.ex-n { font-weight: 600; font-size: 15px; }
.ex-s { font-size: 12.5px; line-height: 1.4; color: var(--text-2); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.ex-goal { color: var(--accent); font-weight: 620; }
.ex-l { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.ex-sw { font-size: 12.5px; color: var(--yellow-t); margin-top: 3px; }
.ex-in { display: flex; align-items: center; gap: 6px; flex: none; }
.ex-in input { width: 58px; padding: 7px 4px; text-align: center; }
.w-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; font-size: 12.5px; }

/* Kraftsession im Heute-Überblick */
.strength-dose-card { position: relative; isolation: isolate; overflow: hidden; padding: 17px; border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line)); background: linear-gradient(138deg, color-mix(in srgb, var(--accent-soft) 72%, var(--panel)), var(--panel) 68%); }
.strength-dose-card::before { content: ""; position: absolute; z-index: -1; top: -112px; right: -82px; width: 238px; height: 238px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 19%, transparent), transparent 70%); pointer-events: none; }
.sf-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sf-kicker { color: var(--text-2); font-size: 12.5px; font-weight: 560; }
.sf-title { margin-top: 2px; font: 660 20px/1.2 var(--f); letter-spacing: -.02em; }
.sf-badge { flex: none; padding: 5px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 620; }
.sf-stats { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 13px; }
.sf-stat { display: inline-flex; align-items: baseline; gap: 3px; padding: 5px 8px; border: 1px solid color-mix(in srgb, var(--line) 78%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--panel) 72%, transparent); color: var(--text-2); font-size: 11.5px; }
.sf-stat b { color: var(--text); font-size: 12px; }
.sf-list { margin-top: 10px; border-top: 1px solid color-mix(in srgb, var(--line) 78%, transparent); }
.sf-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent); }
.sf-row:last-child { border-bottom: 0; }
.sf-name { overflow: hidden; color: var(--text); font-size: 13.5px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.sf-prescription { margin-top: 2px; color: var(--text-3); font-size: 11.5px; font-weight: 500; }
.sf-target { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-size: 12px; }
.sf-target .faint { font-size: 10px; font-weight: 500; }
.sf-target b { color: var(--accent); white-space: nowrap; }
.sf-more { margin-top: 5px; color: var(--text-3); font-size: 11.5px; }
.sf-hint { margin: 12px 0 0; padding-left: 10px; border-left: 2px solid var(--accent); color: var(--text-2); font-size: 12.5px; line-height: 1.4; }
.sf-hint b { color: var(--text); }
.sf-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 13px; }
.sf-sync { min-width: 0; color: var(--text-3); font-size: 10.5px; line-height: 1.3; }
.sf-open { flex: none; }
@media (max-width: 380px) {
  .strength-dose-card { padding: 14px; }
  .sf-title { font-size: 18px; }
  .sf-row { gap: 6px; }
  .sf-name { font-size: 12.5px; }
  .sf-target { font-size: 11.5px; }
  .sf-sync { max-width: 140px; }
}
@media (prefers-reduced-motion: no-preference) {
  .strength-dose-card { animation: sf-enter .72s cubic-bezier(.2,.7,.2,1) both .12s; }
  .strength-dose-card::after { content: ""; position: absolute; top: -35%; bottom: -35%; left: -45%; width: 34%; transform: skewX(-18deg); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--panel) 48%, transparent), transparent); pointer-events: none; animation: sf-sweep .95s cubic-bezier(.2,.7,.2,1) both .24s; }
  .sf-row { animation: sf-row-in .42s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(260ms + var(--sf-i, 0) * 70ms); }
}
@keyframes sf-enter { from { opacity: 0; transform: translateY(12px) scale(.992); filter: blur(3px); } to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); } }
@keyframes sf-sweep { 0% { transform: translateX(0) skewX(-18deg); opacity: 0; } 25% { opacity: .7; } 100% { transform: translateX(470%) skewX(-18deg); opacity: 0; } }
@keyframes sf-row-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Wettkampf ---------- */
.race .name { font: 640 19px/1.25 var(--f); letter-spacing: -.01em; }
.race-pred { margin-top: 10px; }
.race-pred .target { font-size: 44px; }
.race-pred .muted { font-size: 12.5px !important; margin-top: 6px; color: var(--text-3); }
.race-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 16px; }
.race-seg .rs { background: var(--surface-2); border-radius: var(--r-s); padding: 10px; display: flex; flex-direction: column; gap: 4px; }
.fuel { margin: 14px 0 0; padding-left: 18px; color: var(--text-2); font-size: 14px; display: grid; gap: 5px; }
.sub-fold { margin-top: 14px; box-shadow: inset 0 1px 0 var(--line); padding-top: 12px; }
.sub-fold > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font: 560 14px var(--f); color: var(--text-2); min-height: 28px; }
@media (max-width: 380px) { .race-seg { grid-template-columns: 1fr; } }

/* ---------- Wettkampf-Coach ---------- */
.rc-strip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 2px 16px 4px; scroll-snap-type: x proximity; }
.rc-strip::-webkit-scrollbar { display: none; }
.rc-day { flex: none; scroll-snap-align: center; width: 58px; min-height: 72px; border: 0; background: var(--surface-2); border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; color: var(--text-2); transition: background-color .18s, color .18s; position: relative; }
.rc-dn { font: 520 12px var(--f); }
.rc-dd { font: 640 21px/1 var(--f); font-stretch: 125%; color: var(--text); }
.rc-dr { font: 520 10.5px var(--f); color: var(--text-3); }
.rc-day.r-race .rc-dr { color: var(--red); }
.rc-day.r-recover1 .rc-dr, .rc-day.r-recover2 .rc-dr { color: var(--green); }
.rc-day.r-eve .rc-dr, .rc-day.r-t2 .rc-dr { color: var(--yellow-t); }
.rc-day.r-build .rc-dr, .rc-day.r-sharpen .rc-dr { color: var(--text-3, var(--text-2)); }
.rc-steps { margin: 8px 0 0; padding-left: 20px; color: var(--text-2); font-size: 14px; display: grid; gap: 6px; }
.rc-pack { margin-top: 12px; }
.rc-day.now::after { content: ""; position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.rc-day.on { background: var(--text); color: var(--panel); }
.rc-day.on .rc-dd, .rc-day.on .rc-dr { color: var(--panel); }
.rc-body.swap { animation: reveal .3s both cubic-bezier(.2, .8, .2, 1); }
.rc-t { font: 640 18px/1.25 var(--f); letter-spacing: -.01em; }
.rc-f { color: var(--text-2); font-size: 14px; margin-top: 4px; }
.rc-nums { display: flex; gap: 28px; flex-wrap: wrap; margin: 14px 0 4px; padding: 12px 0; box-shadow: inset 0 1px 0 var(--line), inset 0 -1px 0 var(--line); }
.rc-big { display: flex; align-items: baseline; gap: 4px; margin-top: 6px; }
.rc-big .display { font-size: 32px; line-height: 1; }
.rc-big small { font: 520 13px var(--f); color: var(--text-3); }
.rc-s { font-size: 12.5px; line-height: 1.45; color: var(--text-3); margin-top: 4px; white-space: pre-line; }
.rc-plan { display: flex; flex-direction: column; margin-top: 12px; }
.rc-pi { padding: 9px 0; box-shadow: inset 0 1px 0 var(--line); }
.rc-pi:first-child { box-shadow: none; }
.rc-pi-h { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.rc-pi-t { font-weight: 600; font-size: 15px; }
.rc-sec { margin-top: 16px; }
.rc-tl { display: flex; flex-direction: column; margin-top: 8px; border-left: 1.5px solid var(--line-2); margin-left: 4px; }
.rc-tr { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 6px 0 6px 12px; font-size: 14px; position: relative; }
.rc-tr::before { content: ""; position: absolute; left: -5px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--panel); box-shadow: inset 0 0 0 1.5px var(--text-3); }
.rc-tr:last-child::before { background: var(--accent); box-shadow: none; }
.rc-at { font: 640 12.5px/1.7 var(--f); font-stretch: 115%; font-variant-numeric: tabular-nums; color: var(--text); }
.rc-avoid { margin-top: 14px; }
.rc-sleep { margin: 14px 0 0; font-size: 14px; color: var(--text-2); }
.rc-intro { padding: 4px 2px 6px; }
.rc-title { font-size: 32px; line-height: 1.05; font-stretch: 112%; }
.rc-full.now { box-shadow: inset 0 0 0 2px var(--accent), var(--shadow); }

/* ---------- Heute Abend ---------- */
.night { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.evening .time { font-size: 40px; line-height: 1; color: var(--sleep); }
.night .faint { font-size: 12.5px !important; }
.night .num:not(.time) { font-size: 20px !important; }
.fc-line { display: flex; gap: 9px; align-items: baseline; margin: 14px 0 0; font-size: 14px; }
.fc-line .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; transform: translateY(-1px); }
.stagebar { display: flex; gap: 2px; height: 10px; overflow: hidden; border-radius: 5px; }
.stagebar span { min-width: 2px; }

/* ---------- Legenden und Diagramme ---------- */
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font: 500 9.5px var(--f); font-variant-numeric: tabular-nums; fill: var(--text-3); }
.chart .grid { stroke: var(--line); }
.legend { display: flex; gap: 14px; font-size: 12.5px; line-height: 1.4; color: var(--text-2); margin-top: 10px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }

/* ---------- Erholung im Detail ---------- */
.bd-list { display: flex; flex-direction: column; }
.bd { display: grid; grid-template-columns: minmax(0, 1fr) 84px 40px; gap: 12px; align-items: center; padding: 10px 0; box-shadow: inset 0 1px 0 var(--line); }
.bd:first-child { box-shadow: none; padding-top: 0; }
.bd .k { font-weight: 560; }
.bd .s { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.bd-bar { position: relative; height: 4px; background: var(--track); border-radius: 2px; }
.bd-bar::after { content: ""; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1px; background: var(--text-3); }
.bd-bar span { position: absolute; top: 0; bottom: 0; border-radius: 2px; }
.bd-bar .pos { left: 50%; background: var(--green); }
.bd-bar .neg { right: 50%; background: var(--red); }
.bd-v { text-align: right; font: 640 13.5px var(--f); font-variant-numeric: tabular-nums; }
.bd-base .k { color: var(--text-2); }
.bd-sum { display: flex; justify-content: space-between; align-items: baseline; box-shadow: inset 0 1.5px 0 var(--text); margin-top: 4px; padding-top: 12px; }
.bd-sum .num { font-size: 26px; }
.bd-sum .muted { font-weight: 600; color: var(--text); }
@media (max-width: 380px) { .bd { grid-template-columns: minmax(0, 1fr) 60px 36px; } }

/* ---------- Gesundheitsmonitor und Vitalwerte ---------- */
.hm-list { display: flex; flex-direction: column; }
.hm { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; box-shadow: inset 0 1px 0 var(--line); }
.hm:first-child { box-shadow: none; padding-top: 0; }
.hm .k { font-weight: 560; }
.hm .s { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.hm-i { width: 8px; height: 8px; border-radius: 50%; background: var(--z1); }
.hm-i.ok { background: var(--green); } .hm-i.bad { background: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 22%, transparent); }
.hm-v { font: 620 16px var(--f); font-variant-numeric: tabular-nums; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid2 > .vital:last-child:nth-child(odd) { grid-column: 1 / -1; }
.vital { padding: 13px 14px; }
.vital .v { font-size: 26px; line-height: 1; margin-top: 8px; }
.vital .v small { font: 520 12px var(--f); color: var(--text-3); margin-left: 4px; letter-spacing: 0; }
.vital .d { font-size: 12px; margin-top: 6px; color: var(--text-3); }
.vital svg { display: block; width: 100%; height: 28px; margin-top: 10px; }
.load { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.load .v { font-size: 22px; line-height: 1; margin-top: 8px; }
.load .label { font-size: 12.5px; }

/* ---------- Aktivitäten ---------- */
.act { padding: 11px 0; box-shadow: inset 0 1px 0 var(--line); }
.act:first-of-type { box-shadow: none; padding-top: 0; }
.act-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.act .label { font-size: 12.5px; color: var(--text-3); }
.act .t { font-weight: 600; margin-top: 2px; }
.act .s { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.act-strain { font-size: 22px; line-height: 1; color: var(--strain); text-align: right; }
.act-strain small { display: block; font: 500 11px var(--f); color: var(--text-3); margin-top: 4px; letter-spacing: 0; }
.zbar { display: flex; gap: 1px; height: 5px; margin-top: 10px; border-radius: 3px; overflow: hidden; }
.zbar span { min-width: 2px; }

/* ---------- Einflüsse, Gelerntes ---------- */
.ins { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; box-shadow: inset 0 1px 0 var(--line); }
.ins:first-of-type { box-shadow: none; padding-top: 0; }
.ins .k { font-weight: 560; }
.ins .s { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.ins-v { font: 640 17px/1 var(--f); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.ins-v small { font: 500 11px var(--f); color: var(--text-3); }
.ins-pend { margin-top: 14px; padding-top: 12px; box-shadow: inset 0 1px 0 var(--line); }
.pend { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); padding: 4px 0; }
.learn { display: flex; flex-direction: column; }
.lr { padding: 11px 0; box-shadow: inset 0 1px 0 var(--line); }
.lr:first-child { box-shadow: none; padding-top: 0; }
.lv { font-weight: 600; margin: 4px 0 2px; }
.lr .faint { font-size: 12.5px !important; }
.wl p { margin: 10px 0 0; font-size: 14px; color: var(--text-2); }

/* ---------- Training ---------- */
.agenda { display: flex; flex-direction: column; }
.ag-day { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 14px 0; box-shadow: inset 0 1px 0 var(--line); }
.ag-day:first-child { box-shadow: none; padding-top: 0; }
.ag-day .day { font: 520 12.5px/1.3 var(--f); color: var(--text-3); }
.ag-day .day b { display: block; font: 660 24px/1 var(--f); font-stretch: 125%; font-variant-numeric: tabular-nums; color: var(--text); margin-top: 3px; }
.ag-day.today .day, .ag-day.today .day b { color: var(--accent); }
.ag-items { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ag-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ag-day .free { font-size: 14px; padding-top: 3px; }
.ag-note { font-size: 13px; color: var(--yellow-t); margin-top: 6px; }
.move { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.pc { display: flex; flex-direction: column; }
.pc-row { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px; padding: 11px 0; box-shadow: inset 0 1px 0 var(--line); }
.pc-row:first-child { box-shadow: none; padding-top: 0; }
.pc-d { font-size: 13px; color: var(--text-2); padding-top: 1px; font-variant-numeric: tabular-nums; }
.pc-row .t { font-weight: 600; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pc-row .s { font-size: 13px; color: var(--text-2); margin-top: 3px; }
.vol { display: flex; flex-direction: column; gap: 7px; }
.vrow { display: grid; grid-template-columns: 96px minmax(0, 1fr) 34px; gap: 8px 10px; align-items: center; font-size: 14px; }
.vbar { position: relative; height: 6px; background: var(--track); overflow: hidden; border-radius: 3px; }
.vzone { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--green) 22%, transparent); }
.vfill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--green); border-radius: 3px; }
.vfill.low { background: var(--yellow); } .vfill.high { background: var(--red); }
.vv { text-align: right; font: 640 13.5px var(--f); font-variant-numeric: tabular-nums; white-space: nowrap; }

.blk-explain { margin-top: 14px; border: 1px solid color-mix(in srgb, var(--line) 78%, transparent); border-radius: 14px; background: linear-gradient(135deg, rgba(255,255,255,.045), rgba(255,255,255,.018)); overflow: hidden; }
.blk-explain > summary { min-height: 46px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink); font-size: 13px; font-weight: 650; cursor: pointer; list-style: none; }
.blk-explain > summary::-webkit-details-marker { display: none; }
.blk-explain > summary::after { content: "+"; display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; color: var(--a2); background: color-mix(in srgb, var(--a2) 13%, transparent); font-size: 17px; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.blk-explain[open] > summary::after { transform: rotate(45deg); }
.blk-explain__body { padding: 0 12px 12px; animation: blk-explain-in .35s cubic-bezier(.2,.8,.2,1) both; }
.blk-explain__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.blk-explain__item { min-width: 0; display: grid; gap: 5px; padding: 11px 12px; border: 1px solid rgba(255,255,255,.07); border-radius: 11px; background: rgba(255,255,255,.025); }
.blk-explain__item strong { color: var(--a2); font-size: 10px; letter-spacing: .11em; text-transform: uppercase; }
.blk-explain__item span { color: var(--muted); font-size: 12px; line-height: 1.55; }
.blk-dots > span.now { position: relative; }
.blk-dots > span.now::after { content: ""; position: absolute; inset: -5px; border: 1px solid color-mix(in srgb, var(--a2) 60%, transparent); border-radius: 50%; pointer-events: none; animation: blk-current-week 2.4s ease-out infinite; }
.blk-row .vfill { transform-origin: left center; animation: blk-volume-enter .82s cubic-bezier(.2,.8,.2,1) both; }
.blk-row:nth-child(2) .vfill { animation-delay: .06s; }
.blk-row:nth-child(3) .vfill { animation-delay: .12s; }
.blk-row:nth-child(4) .vfill { animation-delay: .18s; }
@keyframes blk-explain-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes blk-volume-enter { from { transform: scaleX(.08); filter: brightness(1.35); } to { transform: scaleX(1); filter: brightness(1); } }
@keyframes blk-current-week { 0% { opacity: .75; transform: scale(.68); } 100% { opacity: 0; transform: scale(1.6); } }
@media (max-width: 560px) { .blk-explain__grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .blk-explain > summary::after, .blk-explain__body, .blk-dots > span.now::after, .blk-row .vfill { animation: none !important; transition: none !important; transform: none !important; filter: none !important; }
}
.lifts { display: flex; flex-direction: column; }
.lift { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; box-shadow: inset 0 1px 0 var(--line); }
.lift:first-child { box-shadow: none; padding-top: 0; }
.lift .k { font-weight: 600; }
.lift .s { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.lift-r { text-align: right; min-width: 92px; white-space: nowrap; }
.lift-r svg { display: block; width: 92px; height: 22px; margin-top: 4px; }
.lift-v { font: 640 16px/1 var(--f); font-stretch: 115%; font-variant-numeric: tabular-nums; }
.split { display: flex; flex-direction: column; }
details.split-day { box-shadow: inset 0 1px 0 var(--line); padding: 10px 0; display: block; }
details.split-day:first-child { box-shadow: none; padding-top: 0; }
details.split-day > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; align-items: center; min-height: 30px; }
.split-n { font: 620 14px var(--f); color: var(--text); }
.split-sum { font-size: 14px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zones { display: flex; flex-direction: column; }
.zrow { display: grid; grid-template-columns: 10px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; box-shadow: inset 0 1px 0 var(--line); font-size: 14px; }
.zrow:first-child { box-shadow: none; padding-top: 0; }
.zrow i { width: 8px; height: 8px; border-radius: 50%; }
.zrow .faint { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.zrow .zp { font: 620 13.5px var(--f); font-variant-numeric: tabular-nums; min-width: 96px; text-align: right; }

/* Wochenplan */
.wp-sum { display: flex; flex-wrap: wrap; gap: 6px; }
.wp-chip { font: 520 13px/1 var(--f); padding: 8px 11px; border-radius: 999px; background: var(--surface-2); color: var(--text); }
.ag-role { display: block; margin-top: 6px; font: 560 11px var(--f); color: var(--text-3); }
.ag-role.r-race { color: var(--red); } .ag-role.r-eve, .ag-role.r-t2 { color: var(--yellow-t); } .ag-role.r-recover1, .ag-role.r-recover2 { color: var(--green); }
.ag-bed { display: flex; align-items: center; gap: 4px; margin-top: 8px; font: 520 11.5px var(--f); font-variant-numeric: tabular-nums; color: var(--sleep); }
.ag-bed i { width: 6px; height: 6px; border-radius: 50%; background: var(--sleep); flex: none; }

/* ---------- Einrichtung ---------- */
.setup { display: flex; flex-direction: column; }
.su { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; box-shadow: inset 0 1px 0 var(--line); }
.su:first-child { box-shadow: none; padding-top: 0; }
.su .k { font-weight: 560; } .su .s { font-size: 13px; color: var(--text-2); }
.su-i { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); display: grid; place-items: center; font: 700 12px var(--f); }
.su-i.ok { background: var(--green); box-shadow: none; color: #fff; }

/* ---------- Tab-Leiste ---------- */
.tabs {
  position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 20;
  max-width: 520px; margin: 0 auto;
  display: flex; justify-content: space-between; padding: 6px;
  background: color-mix(in srgb, var(--panel) 86%, transparent); -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
  border-radius: 26px; box-shadow: 0 0 0 1px var(--line), 0 12px 30px -12px rgba(0, 0, 0, .28);
}
.tabs button { position: relative; flex: 1; min-height: 52px; border: 0; background: none; border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-3); font: 560 11px/1 var(--f); cursor: pointer; }
.tabs svg { width: 22px; height: 22px; stroke: currentColor; }
.tabs button[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

/* ---------- Meldung ---------- */
.toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--text); color: var(--panel); padding: 11px 16px; border-radius: 999px; font: 540 14px/1.35 var(--f); z-index: 30; max-width: calc(100% - 32px); width: max-content; text-align: center; }

/* ---------- Anmeldung ---------- */
.login { min-height: 86vh; display: grid; place-items: center; padding: 24px 0; }
.login-card { width: min(400px, 100%); padding: 28px 22px 24px; background: var(--panel); border-radius: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.login h1 { margin: 0 0 10px; font: 720 54px/1 var(--f); font-stretch: 125%; letter-spacing: -.03em; }
.login p { margin: 0 0 24px; color: var(--text-2); max-width: 34ch; }
.login input { width: 100%; text-align: left; font: 620 19px var(--f); letter-spacing: .06em; margin: 8px 0 8px; }
.login input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.login input[aria-invalid="true"] { box-shadow: inset 0 0 0 1px var(--red), 0 0 0 3px color-mix(in srgb, var(--red) 18%, transparent); }
.login-hint { color: var(--text-3); font-size: 12.5px; margin: 0 0 18px; }
.login-status { color: var(--red); font-size: 13.5px; min-height: 1.4em; margin: 10px 0 0; }
.login-status[hidden] { display: none; }
.skeleton { font: 520 14px var(--f); color: var(--text-3); text-align: center; padding: 140px 0; }

/* ---------- Bewegung ---------- */
/* Ein Moment beim Öffnen: Messwerte zählen hoch, Balken füllen sich, die Tagesachse zeichnet sich nach unten */
.boot .m-bar i { animation: fill .9s both cubic-bezier(.33, 1, .68, 1); transform-origin: left; animation-delay: calc(var(--d, 0ms) - var(--el, 0ms)); }
@keyframes fill { from { transform: scaleX(0); } }
.boot .hero-line { animation: rise .6s both cubic-bezier(.2, .8, .2, 1); animation-delay: calc(0ms - var(--el, 0ms)); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.enter .spine .stop::before { animation: down .7s both cubic-bezier(.65, 0, .35, 1); transform-origin: top; animation-delay: calc(var(--i, 0) * 90ms + 200ms); }
@keyframes down { from { transform: scaleY(0); } }
.enter .spine .stop-c::before { animation: pop .35s both ease-out; animation-delay: calc(var(--i, 0) * 90ms + 160ms); }
.enter .top h1 { animation: rise .5s both cubic-bezier(.2, .8, .2, 1); }
.enter .stack { animation: viewIn .4s both cubic-bezier(.2, .8, .2, 1); animation-delay: .06s; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } }

/* Diagramme zeichnen sich, sobald sie sichtbar werden */
.bar { transform-box: fill-box; transform-origin: 50% 100%; }
.bar.neg { transform-origin: 50% 0; }
svg.pre .ln { stroke-dasharray: 1; stroke-dashoffset: 1; }
svg.pre .bar { transform: scaleY(0); }
svg.pre .pt, svg.pre .band { opacity: 0; }
svg.drawn .ln { stroke-dasharray: 1; animation: draw 1.1s both cubic-bezier(.65, 0, .35, 1); }
svg.drawn .bar { animation: grow .6s both cubic-bezier(.2, .8, .2, 1); animation-delay: calc(var(--i, 0) * 14ms); }
svg.drawn .pt { animation: pop .35s both ease-out; animation-delay: .8s; }
svg.drawn .band { animation: pop .8s both ease-out; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes pop { from { opacity: 0; } }

/* Aufklappen, Meldungen, Bedienung */
details.opening[open] > :not(summary) { animation: reveal .3s both cubic-bezier(.2, .8, .2, 1); }
@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } }
.toast { animation: toastIn .35s both cubic-bezier(.16, 1, .3, 1); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } }
.seg button, .chip, .btn, .tabs button { transition: background-color .18s ease, color .18s ease, transform .1s ease, box-shadow .18s ease; }
.fold > summary, .item > summary, .metric { transition: background-color .15s ease; }
.fold > summary:active, .metric:active { background: var(--surface-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 720px) { body { padding-top: 28px; } }
@media (max-width: 370px) {
  .m-v { font-size: 25px; }
  .metric { padding: 12px 10px 13px; }
  .hero-line { font-size: 26px; }
  .ex { flex-wrap: wrap; }
}

/* Mitteilungen: Schalter, Arten, Protokoll */
.sw { position: relative; flex: none; width: 48px; height: 28px; border: 0; border-radius: 14px; background: var(--line-2); cursor: pointer; padding: 0; transition: background-color .2s ease; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .22s cubic-bezier(.3,.7,.2,1); }
.sw.on { background: var(--green); }
.sw.on::after { transform: translateX(20px); }
.nt-act { display: flex; align-items: center; gap: 10px; flex: none; }
.li.nt .s { max-width: 36ch; }
.li.col { flex-direction: column; align-items: stretch; gap: 10px; }
.nlog { display: flex; flex-direction: column; border-left: 1.5px solid var(--line-2); margin-left: 3px; }
.nl { padding: 8px 0 10px 14px; position: relative; }
.nl::before { content: ""; position: absolute; left: -5px; top: 13px; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.nl + .nl { box-shadow: inset 0 1px 0 var(--line); }
.nl-h { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.nl-t { font-weight: 600; font-size: 14px; }
.nl-at { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.nl-b { white-space: pre-line; font-size: 13px; color: var(--text-2); margin-top: 4px; line-height: 1.45; }

/* Bericht */
.rep .seg { margin-bottom: 14px; }
.rep-v { padding: 12px 14px; border-radius: var(--r-s); background: var(--surface-2); margin-bottom: 14px; font-weight: 520; }
.rep-v i { margin-top: 7px; }
.rep-z { display: flex; height: 20px; margin-top: 14px; gap: 2px; border-radius: 6px; overflow: hidden; }
.rep-z span { display: grid; place-items: center; font: 640 11px/1 var(--f); color: rgba(0,0,0,.72); min-width: 16px; transform-origin: left; }
.rep-t { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; }
.rep-t li { position: relative; padding-left: 16px; font-size: 14px; line-height: 1.45; }
.rep-t li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); }
.sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.sec-h .label { font: 660 18px/1.2 var(--f); color: var(--text); }
.sec-h .seg { flex: 0 1 220px; background: var(--panel); }

/* Trends */
.trc { padding-bottom: 6px; }
.tr { box-shadow: inset 0 1px 0 var(--line); }
.trc > h3 + .tr { box-shadow: none; }
.tr > summary { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) 64px auto; align-items: center; gap: 12px; padding: 12px 0; cursor: pointer; }
.tr > summary::-webkit-details-marker { display: none; }
.tr-l .k { font-weight: 560; font-size: 15px; }
.tr-c { font-size: 12.5px; line-height: 1.3; margin-top: 2px; }
.tr-c.faint { color: var(--text-3); }
.tr-sp svg { width: 64px; height: 24px; display: block; }
.tr-v { font: 640 20px/1 var(--f); font-stretch: 120%; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.tr-v small { font: 500 11px/1 var(--f); color: var(--text-3); }
.tr-b { padding: 2px 0 14px; }
.tr-b svg { width: 100%; height: auto; display: block; }
.tr-ch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.tr-ch .num { font-size: 15px; margin-top: 4px; }

/* VO₂max */
.vo2-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.vo2-v { font-size: 44px; line-height: 1; }
.vo2-v small { font: 520 12px/1 var(--f); color: var(--text-3); letter-spacing: 0; }
.vo2-top .s { margin-top: 6px; font-size: 13px; }
.vo2-cat { text-align: right; }
.vo2-l { font: 660 16px/1.2 var(--f); margin-top: 4px; color: var(--strain); }
.vo2-scale { position: relative; margin-top: 20px; padding-bottom: 18px; }
.vo2-track { position: relative; height: 8px; }
.vo2-track span { position: absolute; top: 0; bottom: 0; background: var(--track); border-right: 2px solid var(--panel); }
.vo2-track span:first-child { border-radius: 4px 0 0 4px; } .vo2-track span:last-child { border-radius: 0 4px 4px 0; border-right: 0; }
.vo2-track span.on { background: var(--strain); }
.vo2-mk { position: absolute; top: -5px; width: 3px; height: 18px; border-radius: 2px; background: var(--text); transform: translateX(-1px); }
.vo2-ticks span { position: absolute; top: 16px; transform: translateX(-50%); font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.vo2-set input { margin-top: 0; }
@media (prefers-reduced-motion: no-preference) {
  .enter .vo2-mk { animation: mkIn .9s cubic-bezier(.2,.7,.2,1) both .2s; }
  .enter .rep-z span { animation: growX .7s cubic-bezier(.2,.7,.2,1) both; }
}
@keyframes mkIn { from { left: 0; opacity: 0; } }
@keyframes growX { from { transform: scaleX(0); } }
.diag { margin-top: 16px; padding-top: 14px; box-shadow: inset 0 1px 0 var(--line); }
.diag-gap { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.diag-gap .num { font-size: 15px; }
.diag-l { margin: 6px 0 0; font-size: 14px; line-height: 1.45; }
.sc-tab { display: flex; flex-direction: column; margin: 8px 0 2px; }
.sc-row { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 2px 10px; padding: 7px 0; box-shadow: inset 0 -1px 0 var(--line); font-size: 13px; }
.sc-row .faint { grid-column: 2; font-size: 12px; }
.sc-code { display: block; margin: 6px 0; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.howto code:not(.sc-code):not(.sc-url) { white-space: nowrap; }
.sc-url { overflow-wrap: anywhere; }

/* ---------- Körper ---------- */
.ph-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ph-tile { position: relative; width: 100%; aspect-ratio: 3 / 4; border: 1.5px dashed var(--line-2); border-radius: 14px; background: var(--surface-2); color: var(--text-3); display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; padding: 0; }
.ph-tile.done { border-style: solid; border-color: var(--green); }
.ph-tile.busy { opacity: .6; pointer-events: none; }
.ph-tile .ph-img, .ph-ghost .ph-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph-ghost { position: absolute; inset: 0; opacity: .28; filter: grayscale(1); }
.ph-sil { width: 46%; height: 78%; stroke: var(--text-3); }
.ph-l { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 4px 7px; font: 600 12px/1 var(--f); color: var(--text); background: linear-gradient(transparent, color-mix(in srgb, var(--panel) 88%, transparent)); }
.ph-img { display: block; background: var(--surface-2); }
.ph-missing { visibility: hidden; }
.ph-cmp-ctl { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ph-sel { flex: 1; min-width: 0; text-align: left; }
.ph-cmp { position: relative; width: 100%; aspect-ratio: 3 / 4; margin-top: 10px; overflow: hidden; border-radius: 14px; background: var(--surface-2); user-select: none; touch-action: pan-y; }
.ph-cmp-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph-cmp-top { position: absolute; inset: 0; }
.ph-cmp-h { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.3); pointer-events: none; }
.ph-cmp-h::after { content: "‹ ›"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 7px 10px; background: #fff; color: #111; font: 700 13px/1 var(--f); border-radius: 999px; white-space: nowrap; }
.ph-cmp-r { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.ph-cmp-w { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; font-size: 14px; }
.ph-days { display: flex; flex-direction: column; gap: 16px; }
.ph-day-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ph-day-h .btn { margin-left: auto; }
.ph-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ph-row .ph-img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; }
.an-b { margin-top: 12px; }
.an-l { margin: 6px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.45; }
.an-l li + li { margin-top: 3px; }
.an-kf { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px; background: var(--surface-2); border-radius: var(--r-s); }
.an-kf .num { font-size: 18px; }
.ph-due { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; color: var(--text); font: inherit; cursor: pointer; border: 0; }

/* Trainingsblock */
.blk-dots { display: grid; grid-template-columns: repeat(5, 1fr) .7fr; gap: 4px; }
.blk-dots span { height: 8px; border-radius: 4px; background: var(--track); }
.blk-dots span.past { background: color-mix(in srgb, var(--strain) 40%, var(--track)); }
.blk-dots span.now { background: var(--strain); }
.blk-dots span.dl { background: repeating-linear-gradient(135deg, var(--track) 0 3px, transparent 3px 6px); }
.blk-dots span.dl.now { background: repeating-linear-gradient(135deg, var(--green) 0 3px, transparent 3px 6px); }
.blk-labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.blk-row { align-items: start; }
.blk-row > .k { padding-top: 0; line-height: 1.1; }
.blk-row .vbar { margin-top: 5px; }
.blk-why { margin-top: 5px; font-size: 12px; line-height: 1.35; color: var(--text-3); }
.vrow.blk-row { grid-template-columns: 96px minmax(0, 1fr) 44px; }

/* Rückmeldebogen */
body.noscroll { overflow: hidden; }
.sheet-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(10, 14, 12, .5); display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .2s ease; }
.sheet-wrap.in { opacity: 1; }
.sheet { width: min(560px, 100%); max-height: 88vh; overflow: auto; background: var(--panel); border-radius: 24px 24px 0 0; padding: 20px 18px calc(16px + env(safe-area-inset-bottom)); transform: translateY(24px); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.sheet-wrap.in .sheet { transform: none; }
.sheet-h { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 8px; }
.sheet-t { font: 640 18px/1.25 var(--f); margin-top: 2px; }
.sheet-x { border: 0; background: var(--surface-2); border-radius: 50%; width: 32px; height: 32px; font-size: 20px; line-height: 1; color: var(--text-2); cursor: pointer; padding: 0; }
.fb-m { box-shadow: inset 0 1px 0 var(--line); padding: 14px 0; }
.fb-n { font-weight: 640; margin-bottom: 8px; }
.fb-q { display: grid; grid-template-columns: 1fr; gap: 6px; margin-bottom: 8px; }
.fb-l { font-size: 12.5px; color: var(--text-3); }
.fb-q .seg button { font-size: 13px; }
.sheet-b { position: sticky; bottom: 0; background: var(--panel); padding-top: 10px; }
.sheet-b .btn { flex: 1; }

/* Ernährung */
.fd-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.fd-k { font-size: 32px; line-height: 1; }
.fd-ms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.fd-ml { font: 520 12.5px/1.2 var(--f); color: var(--text-3); }
.fd-mv { font-size: 14px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.fd-wk { margin-top: 14px; box-shadow: inset 0 1px 0 var(--line); }
.fd-wk > summary { display: flex; justify-content: space-between; align-items: center; padding: 12px 0 4px; cursor: pointer; list-style: none; font: 560 14px/1.2 var(--f); color: var(--text-2); }
.fd-wk > summary::-webkit-details-marker { display: none; }
.ms-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ms { display: flex; flex-direction: column; gap: 4px; }
.ms input { width: 100%; }
.ms input.wide { margin-top: 0; }
.wk-t { display: flex; flex-direction: column; font-size: 13px; font-variant-numeric: tabular-nums; }
.wk-r { display: grid; grid-template-columns: 0.8fr 1fr 1.3fr 1fr 0.8fr; gap: 6px; padding: 7px 0; box-shadow: inset 0 1px 0 var(--line); align-items: baseline; }
.wk-r.wk-h { box-shadow: none; font-size: 11.5px; color: var(--text-3); padding-top: 0; }
.wk-r .num { font-stretch: 100%; font-weight: 520; }
.wk-r.partial { color: var(--text-3); }
.wk-r .up { color: var(--green); } .wk-r .down { color: var(--yellow-t); }
.fd-link { margin-top: 2px; }

/* Muskeln */
.mus { display: flex; flex-direction: column; gap: 7px; }
.mus-r { display: grid; grid-template-columns: 84px minmax(0, 1fr) 28px 82px; column-gap: 8px; align-items: center; }
.mus-n { font-size: 14px; font-weight: 560; }
.mus-b { position: relative; height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.mus-f { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; background: var(--green); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.mus-f.mid { background: var(--yellow); } .mus-f.low { background: var(--red); }
.mus-t { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--panel); }
.mus-v { text-align: right; font-size: 14px; }
.mus-v.mid { color: var(--yellow-t); } .mus-v.low { color: var(--red); }
.mus-s { font-size: 11.5px; line-height: 1.2; color: var(--text-3); text-align: right; white-space: nowrap; }
.mus-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; }
.mus-o { background: var(--surface-2); border-radius: var(--r-s); padding: 8px 10px; }
.mus-o.plan { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.mus-ot { font-size: 13.5px; font-weight: 620; line-height: 1.25; }
.mus-os { margin-top: 2px; font-size: 12px; line-height: 1.25; color: var(--text-3); }
.mus-o.ok .mus-os { color: var(--green); }
.mus-o.plan .mus-os { color: var(--accent); }
.mus-fresh { font-size: 14px; color: var(--text-2); margin: 0; }
.mus-fresh b { color: var(--text); }
.note.warn { color: var(--yellow-t); }

/* Ernährung: Rechnung und Woche */
.fd-k.over { color: var(--orange); }
.fd-eq { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 12px; }
.fd-p { display: inline-flex; align-items: baseline; gap: 4px; }
.fd-p b { font: 600 13px/1 var(--f); color: var(--text-3); margin-right: 2px; }
.fd-p .num { font-size: 14px; font-stretch: 110%; }
.fd-p small { font: 500 12px/1 var(--f); color: var(--text-3); }
.fd-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: 16px; padding-top: 12px; box-shadow: inset 0 1px 0 var(--line); }
.fd-day { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.fd-bar { position: relative; width: 100%; height: 44px; display: flex; align-items: flex-end; }
.fd-bar span { display: block; width: 100%; border-radius: 4px; background: var(--z1); }
.fd-bar .t-r { background: var(--z0); } .fd-bar .t-h { background: var(--orange); } .fd-bar .t-x { background: var(--red); }
.fd-day.now .fd-bar span { background: var(--accent); }
.fd-dk { font-size: 12px; }
.fd-dl { font-size: 11.5px; color: var(--text-3); }
.fd-day.now .fd-dl { color: var(--accent); font-weight: 600; }

/* Abend und Essen in der Tagesachse */
.eve-t { display: none; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.eve-t b { font: 640 16px/1.3 var(--f); }
.eve-t span { font-size: 12.5px; color: var(--text-3); text-align: right; }
.stop .eve-t { display: flex; }
.stop .night { display: none; }
.stop .evening .stagebar { margin-top: 0 !important; }
.fd-u { font: 520 13px/1 var(--f); font-stretch: 100%; color: var(--text-3); letter-spacing: 0; }
.food .fd-ms { margin-top: 12px; }

/* Statusleiste in der Home-Bildschirm-App: Uhrzeit und Akku sind dort weiß, also ein dunkler Streifen */
body::before { content: ""; position: fixed; inset: 0 0 auto 0; height: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 40; }
.food .fd-mv { font-size: 13.5px; white-space: nowrap; }
.stop .legend { gap: 4px 12px; font-size: 12px; }
.linkbtn.quiet { color: var(--text-3); font-size: 13px; font-weight: 500; padding-top: 6px; }

/* Gewicht: Wochenschnitt und Veränderung groß */
.wt-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.wt-k { font-size: 34px; line-height: 1; }
.wt-d { font-size: 26px; line-height: 1; }
.wt-d.warn { color: var(--yellow-t); }
.wt-r { text-align: right; }
.wt-l { font-size: 12.5px; margin-top: 6px; }

/* Protokoll-Check, Notizen, Essensplan */
.rv { margin-bottom: 10px; }
.rv-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; }
.rv-next { margin-top: 8px; padding: 8px 10px; border-radius: var(--r-s); background: var(--accent-soft); color: var(--text); font-size: 13.5px; line-height: 1.35; }
.rv-ex { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.rv-r { display: grid; grid-template-columns: minmax(0, 1.3fr) auto minmax(0, 1fr); gap: 8px; font-size: 12.5px; align-items: baseline; }
.rv-r .rv-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.rv-r.off .rv-n::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); margin-right: 6px; vertical-align: 1px; }
.rv-r .faint { text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brief { margin-bottom: 10px; padding: 10px 12px; border-radius: var(--r-s); background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.brief .sum b, .brief-n .sum b { color: var(--text); font-weight: 600; }
.brief-n + .brief-n { border-top: 1px solid var(--line); padding-top: 8px; }
.sheet .brief-n { padding: 8px 0; border-top: 1px solid var(--line); }
.sheet textarea { width: 100%; margin-top: 6px; resize: vertical; font: 400 15px/1.35 var(--f); padding: 10px 12px; border-radius: var(--r-s); border: 1px solid var(--line-2); background: var(--panel); color: var(--text); }
.meal { padding: 2px 0 4px; }
.meal-t { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 14px; }
.meal-t span { color: var(--text-3); font-size: 12.5px; }
.meal-m { margin-top: 2px; font-size: 13.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.meal-s { margin-top: 2px; font-size: 12px; color: var(--text-3); }
.meal.snack .meal-t b { font-weight: 560; }
.stop.done .meal { opacity: .55; }

/* Gewichts-Dashboard */
.wdash .seg { margin: 4px 0 14px; }
.wd-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
@media (min-width: 560px) { .wd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.wd-kv .wd-v { font-size: 22px; font-weight: 700; margin-top: 2px; letter-spacing: -0.01em; }
.wd-kv .wd-v.up { color: var(--green); } .wd-kv .wd-v.warn { color: var(--yellow-t); }
.wd-s { font-size: 12px; margin-top: 2px; }
.wd-table { display: grid; gap: 0; font-size: 13px; margin-top: 4px; }
.wd-row { display: grid; grid-template-columns: 1fr .9fr .8fr .6fr .9fr 1.2fr; gap: 6px; white-space: nowrap; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.wd-row.wd-m { grid-template-columns: 1.3fr .7fr .8fr .8fr 1.6fr 24px; }
.wd-row.wd-head { border-bottom-color: var(--line-2); padding-top: 0; }
.wd-row.part .wd-w { color: var(--text-2); }
.wd-row.weak { opacity: .55; }
.wd-row.out { opacity: .45; text-decoration: line-through; }
.wd-c.up { color: var(--green); } .wd-c.warn { color: var(--yellow-t); }
.wd-src { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-x { border: 0; background: none; color: var(--text-3); font-size: 16px; cursor: pointer; padding: 0; line-height: 1; }
@media (hover:hover) and (pointer:fine){.wd-x:hover { color: var(--red); }}
.card.shift .rc-sec { margin-top: 12px; }

.wd-grid.wd-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; }
.wt-top .label { margin-bottom: 8px; }
.wt-d.up { color: var(--green); }

/* Grundlage (Evidenz) */
.ev-r{border-top:1px solid var(--line);padding:12px 0}
.ev-r summary{display:flex;justify-content:space-between;gap:12px;align-items:baseline;cursor:pointer;list-style:none}
.ev-r summary::-webkit-details-marker{display:none}
.ev-t{font-weight:500;text-wrap:balance}
.ev-s{font-size:12px;color:var(--text-2);white-space:nowrap}
.ev-s.ev-belegt{color:var(--accent)}
.ev-x,.ev-n{margin:8px 0 0;font-size:14px;color:var(--text-2);text-wrap:pretty}
.ev-l{margin:10px 0 0;padding:0 0 0 16px;font-size:13px;color:var(--text-2)}
.ev-l li{margin:6px 0;text-wrap:pretty}
.ev-l a{color:var(--text);text-decoration-color:var(--line)}

/* Tagesband und Schwimmen */
.band { padding: 14px 16px; margin-bottom: 14px; }
.band-track { position: relative; height: 22px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.band-free { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--green) 14%, transparent); }
.band-b { position: absolute; top: 3px; bottom: 3px; border-radius: 5px; opacity: .92; min-width: 4px; }
.band-b.done { opacity: .4; }
.band-b.slot { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.28) 0 4px, transparent 4px 8px); background-blend-mode: soft-light; }
.band-now { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--text); }
.band-ticks { position: relative; height: 14px; margin-top: 4px; font-size: 11px; color: var(--text-3); }
.band-ticks span { position: absolute; transform: translateX(-50%); }
.band-ticks span:first-child { transform: none; }
.band-ticks span:last-child { transform: translateX(-100%); }
.band-free-t { margin: 6px 0 0; font-size: 13.5px; color: var(--text-2); }
.band .flag { margin-top: 8px; }
.swim-btn { width: 100%; }
.swim-head { font: 600 16px/1.35 var(--f); margin: 12px 0 6px; }
.pools { display: grid; gap: 8px; margin-top: 10px; }
.pool { padding: 10px 12px; border-radius: var(--r-s); background: var(--surface-2); }
.pool.closed { opacity: .6; }
.pool-t { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pool-s { margin-top: 3px; font-size: 13px; color: var(--text-2); }
.pool .tag.ok { color: var(--green); }
.pool .tag.mid { color: var(--yellow); }

/* Wochen-Coach */
.card.wk .wk-h{font-weight:600;font-size:16px;line-height:1.35;margin:4px 0 2px}
.card.wk .wk-list{margin:10px 0 0;padding:0;list-style:none;counter-reset:wk}
.card.wk .wk-list li{counter-increment:wk;position:relative;padding:10px 0 10px 26px;border-top:1px solid var(--line,rgba(255,255,255,.08));font-size:14px;line-height:1.4}
.card.wk .wk-list li::before{content:counter(wk);position:absolute;left:0;top:10px;width:18px;height:18px;border-radius:50%;display:grid;place-items:center;font-size:11px;font-weight:700;color:var(--bg,#000);background:var(--text,#f5f5f7)}
.card.wk .wk-a{font-size:13px;margin-top:3px}
.card.wk .wk-n{margin:10px 0 0;font-size:12.5px}

/* Schlaf-Ansicht */
.sl-back { margin: -4px 0 6px; }
.sl-hero { padding: 6px 2px 18px; }
.sl-big { font: 300 64px/1 var(--f); letter-spacing: -.03em; margin-top: 10px; }
.sl-big small { font-size: 22px; font-weight: 500; color: var(--text-2); letter-spacing: 0; }
.sl-sub { margin: 10px 0 0; font-size: 15px; color: var(--text-2); }
.sl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; padding: 4px 2px 6px; }
.ar-sec { padding: 4px 2px 8px; }
.ar-h { margin: 6px 0 0; font: 600 17px/1.35 var(--f); }

/* Muskelkarte */
.mm-tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface-2); margin: 2px 0 14px; }
.mm-tab { border: 0; background: transparent; color: var(--text-2); font: 600 13px/1 var(--f); padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.mm-tab.on { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--line-2); }
.mm-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; max-width: 300px; margin: 0 auto; }
.mm-fig { width: 100%; height: auto; max-height: 210px; }
.mm-n { fill: color-mix(in srgb, var(--text) 7%, var(--bg)); }
.mm-m { stroke: var(--bg); stroke-width: .8; transition: fill .3s; }
.mm-list { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 13px; color: var(--text-2); }
.mm-list span { display: inline-flex; align-items: center; gap: 6px; }
.mm-list i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.mm-list b { color: var(--text); font-weight: 600; }
.mm-list .off { opacity: .55; }

/* ---------- Ruhe (Design-Durchgang: Flächen statt Kästen, eine Bewegungskurve) ----------
   Grundsätze: Was du zuerst sehen sollst, ist groß; alles andere liegt ruhig auf Haarlinien.
   Bewegung nur als Antwort auf deine Eingabe (Druck, Auf- und Zuklappen) oder als ein Moment beim Öffnen. */
:root { --ease-io: cubic-bezier(.77, 0, .175, 1); }
.stack > .card:not(.fold):not(.checkin):not(.today):not(.ph-due):not(.evening):not(.hints):not(.agenda):not(.vital) {
  background: transparent; box-shadow: none; border-radius: 0; padding: 26px 2px 6px; border-top: 1px solid var(--line);
}
.stack > .card:not(.fold):not(.checkin):not(.today):not(.ph-due):not(.evening):not(.hints):not(.agenda):not(.vital) > h3 { margin-bottom: 14px; }
.stack > .card:not(.fold):not(.checkin):not(.today):not(.ph-due):not(.evening):not(.hints):not(.agenda):not(.vital) > h3 > .label { font: 650 21px/1.2 var(--f); letter-spacing: -.018em; }
.stack > .card:first-child { border-top: 0; padding-top: 6px; }
/* Gruppen aus Aufklappzeilen bleiben als eine ruhige Liste */
.group { border-radius: var(--r); overflow: hidden; }

/* Eingabe bekommt sofort Antwort: Druck skaliert leicht, Rückkehr weich */
.btn, .chip, .seg button, .tabs button, .metric, .mm-tab, .linkbtn { transition: background-color .15s var(--ease-out), color .15s var(--ease-out), transform .16s var(--ease-out), box-shadow .18s var(--ease-out); }
.btn:active, .chip:active, .seg button:active, .tabs button:active, .metric:active, .mm-tab:active { transform: scale(.97); }

/* Tabwechsel passiert oft am Tag: kurzes Einblenden ohne Verschieben */
.enter .stack { animation: tabIn .18s both var(--ease-out); animation-delay: 0s; }
.enter .top h1 { animation: none; }
@keyframes tabIn { from { opacity: 0; } }

/* Kraftkarte: täglich gesehen, daher ohne Glanzlauf und Unschärfe */
.strength-dose-card::after { display: none; }
@keyframes sf-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Schlaf-Ansicht: ein Moment beim Öffnen, danach ruhig */
@media (prefers-reduced-motion: no-preference) {
  .sl-big { animation: slIn .5s var(--ease-out) both; }
  .sl-hero .m-bar i { transform-origin: left; animation: fill .8s var(--ease-out) both .1s; }
}
@keyframes slIn { from { opacity: 0; transform: translateY(6px); } }

/* Einklappbare Erklärtexte */
details.more { margin: 6px 2px 0; }
details.more > summary { display: inline-flex; align-items: center; gap: 6px; list-style: none; cursor: pointer; font: 560 12px/1.4 var(--f); color: var(--text-3); padding: 4px 0; -webkit-tap-highlight-color: transparent; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "i"; display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; font: italic 650 10px/1 Georgia, serif; border: 1px solid currentColor; }
details.more[open] > summary { color: var(--text-2); }
details.more > p.note { margin: 2px 0 6px; }
.stack > details.more { margin: 2px 4px; }
/* Wochenliste: "Anders planen" nimmt keine eigene Zeile mehr ein */
.own-ctl { margin-top: 2px !important; }
.linkbtn.quiet { padding-top: 2px; font-size: 12.5px; }
.sheet, .sheet-wrap { overscroll-behavior: contain; }
button, a, summary, [role=button], input, select, textarea, label { touch-action: manipulation; }
.hero-line, .top h1, .sec-h h2, h3 .label { text-wrap: balance; }

/* Form & Belastung */
.fz-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 6px; }
.fz-big { font: 650 34px/1 var(--f); letter-spacing: -.02em; }
.fz-zone { font: 560 13px/1.3 var(--f); color: var(--text-2); margin-top: 4px; }
.fz-nums { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 12.5px; color: var(--text-3); }
.fz-nums b { color: var(--text); font-weight: 600; margin-right: 2px; }
.fz-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.fz-grid .label { font-size: 11px; }
.fz-v { font: 600 14px/1.25 var(--f); margin-top: 2px; }
.fz-sub { font-size: 11px; line-height: 1.3; margin-top: 1px; }
.fz-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin: 10px 0 0; }
.fz-more { margin-top: 8px; }
.fz-more > summary { cursor: pointer; font: 520 12.5px/1.4 var(--f); color: var(--text-3); list-style: none; }
.fz-more > summary::-webkit-details-marker { display: none; }
.fz-more > summary::after { content: " ›"; }
.fz-more[open] > summary::after { content: " ⌄"; }
@media (max-width: 380px) { .fz-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Funktionen, Form-Karte, Ultra ---------- */
.mod-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; margin: 0 -2px; scrollbar-width: none; }
.mod-row::-webkit-scrollbar { display: none; }
.mod-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--panel); box-shadow: var(--shadow); color: var(--text); font: 600 14px/1 var(--f); cursor: pointer; }
.mod-chip i { color: var(--text-3); font-style: normal; font-size: 16px; }
.mods { display: flex; flex-direction: column; }
.mod { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.mod:first-child { border-top: 0; padding-top: 2px; }
.mod-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; background: none; border: 0; padding: 4px 0; cursor: pointer; color: var(--text); font: inherit; }
.mod-main b { font: 620 15.5px/1.25 var(--f); }
.mod-main span { font: 440 13px/1.35 var(--f); color: var(--text-3); }
.mod.off .mod-main b { color: var(--text-2); }

.form-link { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; border: 0; cursor: pointer; color: var(--text); font: inherit; }
.form-link:active { transform: scale(.985); }
.fl-main { flex: none; min-width: 86px; }
.fl-big { font: 650 32px/1 var(--f); letter-spacing: -.02em; margin-top: 6px; }
.fl-zone { font: 560 12.5px/1.3 var(--f); color: var(--text-2); margin-top: 4px; }
.fl-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; line-height: 1.35; }
.fl-mid b { font: 620 14.5px/1.3 var(--f); }
.fl-spark { height: 28px; margin-top: 4px; max-width: 150px; }
.fl-spark svg { width: 100%; height: 100%; display: block; }
.fl-go { flex: none; color: var(--text-3); font-style: normal; font-size: 22px; }

.u-intro { margin: 0 2px; font-size: 14px; }
.u-cfg { display: flex; flex-direction: column; gap: 12px; }
.u-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.u-row label { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.u-row input { width: 100%; min-width: 0; }
.u-in { position: relative; display: block; }
.u-in input { padding-right: 36px; }
.u-in em { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--text-3); font-size: 13px; pointer-events: none; }
.u-in input { padding-right: 46px !important; text-align: left !important; }
.u-issues { display: grid; gap: 10px; margin-top: 4px; }
.u-issues > span { display: flex; flex-direction: column; gap: 2px; }
.u-issues > span .muted { font-size: 12px; }
.u-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.u-chip { font: 600 12px/1 var(--f, Inter, sans-serif); padding: 9px 12px; border-radius: 999px; border: 0; background: rgba(255,255,255,.06); color: var(--text-2); cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.u-chip.on { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 60%, transparent); }
.u-row.sw-row { grid-template-columns: 1fr auto; align-items: center; }
.u-row.sw-row > span { display: flex; flex-direction: column; gap: 2px; }
.u-row.sw-row b { font: 600 14.5px/1.3 var(--f); }
.u-row.sw-row .muted { font-size: 12.5px; }
.u-cfg .linkbtn { align-self: flex-start; }
.u-res { gap: 14px; }
.u-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: 8px; }
.u-date { font: 650 22px/1.15 var(--f); letter-spacing: -.01em; }
.u-amp { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: var(--surface-2); font: 640 13px/1 var(--f); }
.u-amp b { font-size: 15px; line-height: 1; }
.u-amp span { color: var(--text); }
.u-kv { margin-top: 14px; }
.u-gates { display: flex; flex-direction: column; }
.u-gate { display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.u-gate:first-child { border-top: 0; padding-top: 2px; }
.u-gd b { font: 640 14px/1.4 var(--f); }
.u-gate p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--text-2); }
.u-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.u-chips .label { width: 100%; }
.u-dates { display: flex; flex-direction: column; }
.u-date-r { display: grid; grid-template-columns: 82px 1fr auto; gap: 10px; align-items: center; text-align: left; padding: 11px 0; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); font: inherit; cursor: pointer; }
.u-date-r:first-child { border-top: 0; padding-top: 2px; }
.u-date-r b { font: 640 14px/1.3 var(--f); }
.u-date-r .muted { font-size: 13px; line-height: 1.35; }
.u-date-r i { font-style: normal; color: var(--text-3); font-size: 18px; }
.u-tbl { display: flex; flex-direction: column; font-size: 13.5px; }
.u-r { display: grid; grid-template-columns: 1.2fr .7fr 1.4fr; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line); }
.u-r.y { grid-template-columns: .8fr 1fr 1fr 1fr 1fr; }
.u-r.hd { border-top: 0; color: var(--text-3); font: 560 11.5px/1.2 var(--f); text-transform: none; }
.u-r span:not(:first-child) { text-align: right; }
.fz-card > .label { color: var(--text-2); }
.i-prog { display: flex; flex-direction: column; gap: 5px; padding: 10px 0; border-top: 1px solid var(--line); }
.i-prog:first-of-type { border-top: 0; padding-top: 0; }
.i-pl { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14px; }
.i-pl b { font: 620 14.5px/1.3 var(--f); }
.i-pl .muted { font-size: 13px; text-align: right; }
.i-bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.i-bar i { display: block; height: 100%; border-radius: 3px; background: var(--text-2); }
.i-bar i.ok { background: var(--green); } .i-bar i.mid { background: var(--yellow); } .i-bar i.high { background: var(--red); }
.u-r.i { grid-template-columns: 1.5fr .6fr .8fr .8fr .8fr; }
.seg:has(button:nth-child(6)) { overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
.seg:has(button:nth-child(6))::-webkit-scrollbar { display: none; }
.seg:has(button:nth-child(6)) button { flex: none; padding-left: 14px; padding-right: 14px; }

/* Personal training constraints, fencing drills and swim gap */
.training-preferences{padding:14px;margin-top:12px}
.training-preferences>summary{cursor:pointer;font-size:13px;font-weight:650}
.training-preferences[open]>summary{margin-bottom:14px}
.tp-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.tp-grid>div{display:grid;align-content:start;gap:10px;min-width:0}
.tp-grid h3{font-size:14px;line-height:1.35;margin:0}
.tp-grid label{display:grid;gap:4px;min-width:0;font-size:12px}
.tp-grid label>span{color:var(--text-2)}
.tp-grid select{min-width:0;width:100%;max-width:100%;padding:9px;border:1px solid var(--line);border-radius:10px;background:var(--panel);color:var(--text)}
.tp-grid label.tp-check{display:flex;align-items:center;gap:9px;flex-direction:row}
.tp-grid .btn{justify-self:start}
.fencing-workout{margin:10px 0;border:1px solid var(--line);border-radius:12px;padding:13px}
.fencing-workout h4{font-size:14px;margin:0 0 6px}
.fencing-workout ol{margin:12px 0 0;padding-left:19px;display:grid;gap:9px}
.fencing-workout li{font-size:12px;line-height:1.6}
.missing-swim{display:grid;gap:9px}
.missing-swim h3{font-size:17px;margin:0}
.missing-swim .muted{font-size:13px;line-height:1.6;margin:0}
.missing-swim select{max-width:220px;min-width:110px}
.pulse-source-note{border-left:2px solid var(--yellow);padding-left:12px;margin:14px 0}
@media(max-width:640px){.tp-grid{grid-template-columns:minmax(0,1fr)}.missing-swim .btnrow{flex-wrap:wrap}}

/* Wozu? je Einheit und „Mehr Zeit heute?“ */
.purpose-fold { margin-top: 8px; padding-top: 8px; }
.purpose-fold p, .extras-card p { margin: 6px 0 0; font: 400 14px/1.45 var(--f); color: var(--text-2); }
.purpose-fold .purpose-was { color: var(--text); font-weight: 560; }
.purpose-fold .purpose-wozu, .extras-card .purpose-wozu { color: var(--text); }
.purpose-goals { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.purpose-goals .chip { font: 500 12px var(--f); padding: 3px 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); }
.extras-card .extras-list .sub-fold { margin-top: 10px; }
