/* ===================================================================
   Trainingstracker — Design aus Claude Design, lokal gehostet
   Schriften (Manrope, Space Mono) selbst gehostet -> offline-tauglich
   =================================================================== */
@font-face { font-family:'Manrope'; font-style:normal; font-weight:400; font-display:swap; src:url('/fonts/manrope-400.woff2') format('woff2'); }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:500; font-display:swap; src:url('/fonts/manrope-500.woff2') format('woff2'); }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:600; font-display:swap; src:url('/fonts/manrope-600.woff2') format('woff2'); }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:700; font-display:swap; src:url('/fonts/manrope-700.woff2') format('woff2'); }
@font-face { font-family:'Manrope'; font-style:normal; font-weight:800; font-display:swap; src:url('/fonts/manrope-800.woff2') format('woff2'); }
@font-face { font-family:'Space Mono'; font-style:normal; font-weight:400; font-display:swap; src:url('/fonts/spacemono-400.woff2') format('woff2'); }
@font-face { font-family:'Space Mono'; font-style:normal; font-weight:700; font-display:swap; src:url('/fonts/spacemono-700.woff2') format('woff2'); }

:root {
  --accent: #3b82f6;
  --accent-soft: #eaf1ff;
  --accent-press: #2f6ce0;
  --bg: #f6f6f7;
  --card: #ffffff;
  --border: #ececee;
  --border-strong: #e0e0e3;
  --ink: #18181b;
  --ink-2: #52525b;
  --muted: #9a9aa3;
  --good: #16a34a;
  --good-soft: #e7f6ec;
  --rest: #d97706;
  --rest-soft: #fbf1e1;
  --danger: #dc2626;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(24,24,27,.04), 0 6px 20px -10px rgba(24,24,27,.14);
  --font: 'Manrope', system-ui, -apple-system, sans-serif;
  --mono: 'Space Mono', ui-monospace, monospace;
  --maxw: 460px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
input { font-family: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
h1, h2 { margin: 0; font-weight: 800; letter-spacing: -.02em; }
.num { font-variant-numeric: tabular-nums; }

/* ---- App-Rahmen ---- */
#root { min-height: 100dvh; }
.app { max-width: var(--maxw); margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; position: relative; }
.app__main { flex: 1; padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
.screen { padding: max(20px, env(safe-area-inset-top)) 18px 28px; animation: fade .35s ease; }
.screen--session { padding: 0 0 40px; max-width: var(--maxw); margin: 0 auto; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- Kopf ---- */
.top { padding: 14px 2px 18px; }
.top__greet { color: var(--muted); font-weight: 600; font-size: 14px; }
.top__title { font-size: 34px; line-height: 1.05; margin-top: 2px; }
.top__date { color: var(--ink-2); font-size: 14px; margin-top: 6px; font-weight: 500; }

/* ---- Banner ---- */
.banner { display: flex; align-items: center; gap: 10px; padding: 13px 15px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.banner__dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.banner--go { background: var(--accent-soft); color: var(--accent-press); }
.banner--go .banner__dot { background: var(--accent); }
.banner--good { background: var(--good-soft); color: var(--good); }
.banner--good .banner__dot { background: var(--good); }
.banner--rest { background: var(--rest-soft); color: var(--rest); }
.banner--rest .banner__dot { background: var(--rest); }

/* ---- Statistik-Reihe ---- */
.cardrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 12px; box-shadow: var(--shadow); }
.stat--accent { background: var(--ink); border-color: var(--ink); }
.stat__value { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat--accent .stat__value { color: #fff; }
.stat__label { font-size: 12px; color: var(--ink-2); font-weight: 600; margin-top: 3px; }
.stat--accent .stat__label { color: rgba(255,255,255,.7); }
.stat__sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
.stat--accent .stat__sub { color: rgba(255,255,255,.5); }

/* ---- CTA ---- */
.cta { width: 100%; background: var(--accent); color: #fff; border-radius: var(--radius); padding: 18px; font-size: 18px; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 8px 24px -8px rgba(59,130,246,.55); transition: transform .12s, background .15s; margin-bottom: 24px; }
.cta:active { transform: scale(.985); background: var(--accent-press); }
.cta:disabled { background: var(--card); color: var(--muted); border: 1px solid var(--border); box-shadow: none; cursor: default; }
.cta__sub { font-size: 13px; font-weight: 600; opacity: .82; }
.cta--resume { background: var(--ink); box-shadow: 0 8px 24px -10px rgba(24,24,27,.5); }
.cta--resume:active { background: #000; }
.cta--finish { margin: 22px 0 8px; }

.textbtn { display: block; width: 100%; text-align: center; color: var(--muted); font-weight: 600; font-size: 14px; padding: 12px; }
.textbtn--danger { color: var(--danger); }
.textbtn--accent { color: var(--accent-press); }

/* ---- Plan-Liste ---- */
.section-h { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 4px 2px 12px; }
.plan-list { display: flex; flex-direction: column; gap: 8px; }
.plan-item { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 13px 14px; box-shadow: var(--shadow); }
.plan-item__group { width: 38px; height: 38px; flex: none; display: grid; place-items: center; background: var(--bg); border-radius: 10px; font-size: 10px; font-weight: 700; color: var(--ink-2); text-align: center; line-height: 1.1; }
.plan-item--cardio { background: var(--accent-soft); border-color: transparent; }
.plan-item__icon { width: 38px; height: 38px; flex: none; display: grid; place-items: center; background: #fff; border-radius: 10px; color: var(--accent); }
.plan-item__body { flex: 1; min-width: 0; }
.plan-item__name { font-weight: 700; font-size: 15px; }
.plan-item__meta { font-size: 12.5px; color: var(--ink-2); margin-top: 1px; }
.plan-item__last { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--accent-press); background: var(--accent-soft); padding: 4px 8px; border-radius: 8px; flex: none; }

/* ---- Session-Kopf ---- */
.shead { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: max(14px, env(safe-area-inset-top)) 14px 12px; background: rgba(246,246,247,.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.iconbtn { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--card); border: 1px solid var(--border); color: var(--ink); }
.iconbtn:active { background: var(--bg); }
.shead__center { flex: 1; text-align: center; }
.shead__title { font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.shead__date { font-size: 12px; color: var(--ink-2); }
.shead__pct { width: 50px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent); font-size: 16px; padding-right: 4px; }
.sprogress { height: 3px; background: var(--border); margin: 0 14px; border-radius: 3px; overflow: hidden; }
.sprogress span { display: block; height: 100%; background: var(--accent); transition: width .3s ease; }

.session-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; }

/* ---- Cardio-Zeile ---- */
.cardio-row { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 13px 14px; box-shadow: var(--shadow); text-align: left; transition: background .15s; width: 100%; }
.cardio-row.is-done { background: var(--good-soft); border-color: transparent; }
.cardio-row__icon { color: var(--accent); display: grid; place-items: center; }
.cardio-row.is-done .cardio-row__icon { color: var(--good); }
.cardio-row__text { display: flex; flex-direction: column; }
.cardio-row__text strong { font-size: 15px; }
.cardio-row__text span { font-size: 12.5px; color: var(--ink-2); }
.checkbox { width: 24px; height: 24px; flex: none; border-radius: 7px; border: 2px solid var(--border-strong); display: grid; place-items: center; color: #fff; transition: all .15s; }
.cardio-row.is-done .checkbox { background: var(--good); border-color: var(--good); }

/* ---- Übungs-Accordion ---- */
.exacc { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: border-color .2s; }
.exacc.is-open { border-color: var(--border-strong); }
.exacc.is-done .exacc__num { background: var(--good); color: #fff; }
.exacc__head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 15px 15px; text-align: left; }
.exacc__num { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--bg); color: var(--ink-2); font-weight: 800; font-size: 14px; }
.exacc__name { flex: 1; font-weight: 700; font-size: 16px; }
.exacc__count { font-family: var(--mono); font-size: 12.5px; color: var(--muted); font-weight: 700; }
.exacc__chev { color: var(--muted); display: grid; place-items: center; transition: transform .2s; }
.exacc.is-open .exacc__chev { transform: rotate(90deg); }
.exacc__body { padding: 2px 15px 16px; }

.lasttime { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--ink-2); padding: 8px 0 12px; }
.lasttime strong { color: var(--ink); }

/* ---- Satz-Liste ---- */
.setlist { display: flex; flex-direction: column; gap: 8px; }
.setlist__head { display: grid; grid-template-columns: 56px minmax(0,1fr) minmax(0,1fr) 42px 24px; gap: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 0 2px 2px; }
.setlist__head span:nth-child(2), .setlist__head span:nth-child(3) { text-align: center; }
.setrow { display: grid; grid-template-columns: 56px minmax(0,1fr) minmax(0,1fr) 42px 24px; gap: 6px; align-items: center; }
.setrow__tag { display: flex; flex-direction: column; gap: 2px; }
.tag { font-weight: 800; font-size: 13px; display: inline-block; padding: 3px 0; text-align: center; border-radius: 7px; }
.tag--work { background: var(--accent-soft); color: var(--accent-press); width: 30px; }
.tag--warm { background: #f3f3f4; color: var(--ink-2); font-family: var(--mono); font-size: 11px; width: 42px; }
.setrow__reps-target { font-size: 10.5px; color: var(--muted); font-weight: 600; padding-left: 2px; }

/* ---- Number-Field ---- */
.numfield { display: flex; align-items: center; background: var(--bg); border: 1.5px solid var(--border); border-radius: 11px; overflow: hidden; height: 46px; }
.numfield:focus-within { border-color: var(--accent); background: #fff; }
.numfield__btn { width: 30px; height: 100%; flex: none; font-size: 20px; font-weight: 600; color: var(--ink-2); display: grid; place-items: center; }
.numfield__btn:active { background: rgba(0,0,0,.05); }
.numfield__val { flex: 1; display: flex; align-items: baseline; justify-content: center; min-width: 0; }
.numfield__val input { width: 100%; min-width: 0; border: none; background: none; text-align: center; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; padding: 0; outline: none; color: var(--ink); -moz-appearance: textfield; }
.numfield__val input::-webkit-outer-spin-button, .numfield__val input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.numfield__val input::placeholder { color: var(--muted); font-weight: 600; }
.numfield__suffix { font-size: 11px; color: var(--muted); font-weight: 700; margin-left: 1px; flex: none; }

.donebtn { width: 100%; height: 46px; border-radius: 11px; background: var(--bg); border: 1.5px solid var(--border); color: var(--muted); display: grid; place-items: center; transition: all .14s; }
.donebtn.is-done { background: var(--good); border-color: var(--good); color: #fff; }
.donebtn:active { transform: scale(.92); }
.setrow.is-done .numfield { opacity: .62; border-color: var(--good-soft); }

/* ---- Notiz ---- */
.notewrap { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 0 2px; color: var(--muted); }
.noteinput { flex: 1; border: none; border-bottom: 1.5px solid var(--border); background: none; padding: 8px 2px; font-size: 14px; outline: none; color: var(--ink); }
.noteinput:focus { border-color: var(--accent); }
.noteinput::placeholder { color: var(--muted); }

/* ---- Verlauf ---- */
.hist-list { display: flex; flex-direction: column; gap: 10px; }
.histcard { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.histcard__head { display: flex; align-items: center; width: 100%; padding: 16px; text-align: left; }
.histcard__date { flex: 1; }
.histcard__date strong { font-size: 16px; font-weight: 700; }
.histcard__date span { display: block; font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.histcard__chev { color: var(--muted); transition: transform .2s; }
.histcard.is-open .histcard__chev { transform: rotate(90deg); }
.histcard__body { padding: 0 16px 14px; }
.histex { padding: 11px 0; border-top: 1px solid var(--border); }
.histex__name { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.histex__sets { display: flex; flex-wrap: wrap; gap: 6px; }
.setchip { font-family: var(--mono); font-size: 12px; font-weight: 700; background: var(--bg); padding: 4px 9px; border-radius: 8px; color: var(--ink-2); }
.histex__note { font-size: 13px; color: var(--ink-2); font-style: italic; margin-top: 7px; }
.histcard__actions { display: flex; gap: 8px; border-top: 1px solid var(--border); margin-top: 4px; }
.histcard__actions .textbtn { flex: 1; }

/* ---- Fortschritt ---- */
.exscroll { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 14px; margin: 0 -18px; padding-left: 18px; padding-right: 18px; scrollbar-width: none; }
.exscroll::-webkit-scrollbar { display: none; }
.exchip { flex: none; padding: 9px 15px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); font-weight: 600; font-size: 14px; color: var(--ink-2); white-space: nowrap; transition: all .15s; }
.exchip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.chartcard { padding: 18px 16px 8px; margin-bottom: 14px; }
.chartcard__head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 6px; }
.chartcard__title { font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.chartcard__sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.delta { font-weight: 800; font-size: 15px; font-variant-numeric: tabular-nums; padding: 4px 10px; border-radius: 9px; background: var(--bg); color: var(--ink-2); }
.delta--up { background: var(--good-soft); color: var(--good); }
.delta--down { background: #fdeaea; color: var(--danger); }
.chart { display: block; margin-top: 4px; }
.chart__lbl { font-family: var(--mono); font-weight: 700; font-size: 12px; fill: var(--accent-press); }
.chart__axis { font-family: var(--mono); font-size: 10px; fill: var(--muted); }
.chart-empty { height: 150px; display: grid; place-items: center; color: var(--muted); font-size: 14px; }

.prcard { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, #1c1c20, #2a2a30); color: #fff; border-radius: var(--radius); padding: 16px 18px; margin-top: 14px; }
.prcard__icon { width: 44px; height: 44px; flex: none; display: grid; place-items: center; background: rgba(255,255,255,.1); border-radius: 12px; color: #ffd24a; }
.prcard__title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.6); font-weight: 700; }
.prcard__detail { font-size: 16px; font-weight: 700; margin-top: 2px; }

.pill { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 7px; background: var(--bg); color: var(--ink-2); }
.pill--good { background: var(--good-soft); color: var(--good); }

/* ---- Empty ---- */
.empty { text-align: center; color: var(--muted); padding: 50px 24px; font-size: 14px; line-height: 1.6; }
.empty--small { padding: 26px; font-size: 13px; }
.empty__icon { width: 60px; height: 60px; margin: 0 auto 16px; border-radius: 50%; background: var(--card); border: 1px solid var(--border); display: grid; place-items: center; color: var(--muted); }

/* ---- Tab-Bar ---- */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); background: rgba(255,255,255,.88); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); z-index: 20; }
.tabbar__btn { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 11px 0 9px; color: var(--muted); font-size: 11px; font-weight: 600; transition: color .15s; }
.tabbar__btn.is-active { color: var(--accent); }
.tabbar__btn:active { opacity: .6; }

/* ---- Login ---- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login__card { width: 100%; max-width: 380px; }
.login__logo { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 24px; }
.login__mark { width: 60px; height: 60px; border-radius: 18px; background: var(--accent); display: grid; place-items: center; box-shadow: 0 14px 32px -10px rgba(59,130,246,.6); }
.login__mark svg { width: 32px; height: 32px; color: #fff; }
.login__title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.login__sub { color: var(--ink-2); font-size: 14px; text-align: center; }
.login__box { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.login__fields { display: flex; flex-direction: column; gap: 12px; margin-bottom: 4px; }
.input { width: 100%; padding: 14px 15px; border-radius: var(--radius-sm); background: var(--bg); border: 1.5px solid var(--border); color: var(--ink); font-size: 16px; font-family: inherit; transition: .15s; }
.input::placeholder { color: var(--muted); }
.input:focus { outline: none; border-color: var(--accent); background: #fff; }
.login__err { color: var(--danger); font-size: 13.5px; text-align: center; min-height: 18px; margin: 12px 0 4px; font-weight: 600; }
.login__btn { width: 100%; background: var(--accent); color: #fff; border-radius: var(--radius-sm); padding: 15px; font-size: 16px; font-weight: 700; transition: .15s; }
.login__btn:active { background: var(--accent-press); transform: scale(.99); }
.login__btn:disabled { opacity: .6; }

/* ---- Toast ---- */
.toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(16px); z-index: 60; opacity: 0; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: 0 12px 30px -8px rgba(0,0,0,.4); pointer-events: none; transition: .25s; max-width: 88vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.good { background: var(--good); }

@media (min-width: 540px) {
  .app, .tabbar { box-shadow: 0 0 0 1px var(--border); }
  body { padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Geschlossene Akkordeon-/Verlaufskörper ausblenden (Inhalt bleibt im DOM) */
.exacc:not(.is-open) .exacc__body { display: none; }
.histcard:not(.is-open) .histcard__body { display: none; }

/* ===== Plan-Editor, Nachtragen, 4-Tab-Bar ===== */
.tabbar--4 { grid-template-columns: repeat(4, 1fr); }
.tabbar--4 .tabbar__btn { font-size: 10.5px; }

.addentry { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  margin-bottom: 16px; padding: 14px; border-radius: var(--radius-sm); border: 1.5px dashed var(--border-strong);
  background: var(--card); color: var(--accent-press); font-weight: 700; font-size: 15px; transition: background .15s; }
.addentry:active { background: var(--bg); }
.addentry svg { stroke-width: 2.4; }

.datecard { display: flex; align-items: center; gap: 12px; background: var(--accent-soft); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 4px; }
.datecard__icon { color: var(--accent); display: grid; place-items: center; }
.datecard__text { flex: 1; display: flex; flex-direction: column; }
.datecard__text strong { font-size: 14px; }
.datecard__text span { font-size: 12px; color: var(--accent-press); opacity: .8; }
.datecard__input { border: 1.5px solid #fff; background: #fff; border-radius: 10px; padding: 9px 11px;
  font-family: var(--font); font-size: 14px; font-weight: 700; color: var(--ink); }
.datecard__input:focus { outline: none; border-color: var(--accent); }

.shead__save { width: 56px; text-align: right; color: var(--accent); font-weight: 800; font-size: 16px; padding-right: 4px; }

.toggle { width: 48px; height: 28px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background .2s; flex: none; }
.toggle.on { background: var(--accent); }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.toggle.on::after { left: 23px; }

.pe-meta { display: flex; flex-direction: column; gap: 14px; padding: 16px; margin-bottom: 4px; }
.pe-field { display: flex; flex-direction: column; gap: 6px; }
.pe-field > label { font-size: 11.5px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .03em; }
.pe-row { display: flex; gap: 12px; }
.pe-row > * { flex: 1; min-width: 0; }

.pe-list { display: flex; flex-direction: column; gap: 8px; }
.pe-item { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 11px 12px; box-shadow: var(--shadow); }
.pe-reorder { display: flex; flex-direction: column; gap: 3px; flex: none; }
.pe-reorder button { width: 30px; height: 21px; border-radius: 7px; background: var(--bg); color: var(--ink-2); display: grid; place-items: center; }
.pe-reorder button:active { background: var(--border); }
.pe-reorder button:disabled { opacity: .3; }
.pe-item__main { flex: 1; min-width: 0; cursor: pointer; }
.pe-item__name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pe-grp { font-size: 11px; font-weight: 700; color: var(--ink-2); background: var(--bg); padding: 2px 7px; border-radius: 6px; }
.pe-item__meta { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.pe-item__chev { color: var(--muted); flex: none; cursor: pointer; }

.pe-add { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 12px; padding: 14px; border-radius: var(--radius-sm); border: 1.5px dashed var(--border-strong); background: var(--card); color: var(--accent-press); font-weight: 700; font-size: 15px; transition: background .15s; }
.pe-add:active { background: var(--bg); }

.pe-form { padding: 16px 16px 30px; display: flex; flex-direction: column; gap: 18px; max-width: var(--maxw); margin: 0 auto; }
.pe-switchrow { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; }
.pe-switchrow__label strong { font-size: 15px; display: block; }
.pe-switchrow__label span { font-size: 12.5px; color: var(--ink-2); }
.pe-warms { display: flex; flex-direction: column; gap: 10px; }
.pe-warm { display: flex; align-items: flex-end; gap: 8px; }
.pe-warm > .pe-field { flex: 1; }
.pe-warm__del { width: 46px; height: 46px; flex: none; border-radius: 11px; background: var(--bg); border: 1.5px solid var(--border); color: var(--danger); display: grid; place-items: center; }
.pe-warm__del:active { background: #fdeaea; }
.pe-warmadd { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; color: var(--accent-press); font-weight: 700; font-size: 14px; padding: 10px 2px 2px; }

/* ---------- v3: flexible Sätze, mehrere Pläne, Progression ---------- */
.setrow__del { width: 100%; height: 46px; border: none; background: transparent; color: var(--muted); display: grid; place-items: center; border-radius: 9px; opacity: .55; transition: all .14s; }
.setrow__del:active { opacity: 1; background: var(--danger-soft, #fdecec); color: var(--danger, #d23f3f); transform: scale(.9); }
.setrow--warm .setrow__del { opacity: .4; }

.setadd-row { display: flex; gap: 8px; margin-top: 10px; }
.setadd { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 8px; border-radius: 10px; border: 1.5px dashed var(--border-strong); background: var(--card); color: var(--accent-press); font-weight: 700; font-size: 13px; transition: background .15s; }
.setadd:active { background: var(--bg); }
.setadd svg { stroke-width: 2.6; }

.pill--hold { background: var(--bg); color: var(--ink-2); border: 1px solid var(--border); }
.pill--down { background: #fdecec; color: #c43d3d; }

.plan-item__last.is-up { background: var(--good-soft); color: var(--good); }
.plan-item__last.is-down { background: #fdecec; color: #c43d3d; }

/* Plan-Übersicht */
.plan-cards { display: flex; flex-direction: column; gap: 10px; }
.plan-card { display: flex; align-items: center; gap: 4px; background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 4px; transition: border-color .15s, box-shadow .15s; }
.plan-card.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.plan-card__main { flex: 1; padding: 12px 12px; min-width: 0; cursor: pointer; }
.plan-card__top { display: flex; align-items: center; gap: 8px; }
.plan-card__name { font-weight: 800; font-size: 16px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-card__badge { flex: none; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--accent-press); background: var(--accent-soft); padding: 2px 7px; border-radius: 6px; }
.plan-card__meta { font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.plan-card__chev { color: var(--muted); padding-right: 8px; display: grid; place-items: center; }

/* Plan-Editor-Leiste */
.pe-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.pe-back { display: inline-flex; align-items: center; gap: 4px; background: none; border: none; color: var(--accent-press); font-weight: 700; font-size: 15px; padding: 4px 2px; }
.pe-back svg { stroke-width: 2.2; }
.pe-setactive { background: var(--accent); color: #fff; border: none; font-weight: 700; font-size: 13px; padding: 8px 14px; border-radius: 10px; }
.pe-setactive:active { background: var(--accent-press); }
.pe-activebadge { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--good); background: var(--good-soft); padding: 5px 10px; border-radius: 8px; }
.pe-planactions { display: flex; flex-direction: column; gap: 2px; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--border); }

/* Progression-Hinweis im Übungsformular */
.pe-hint { display: flex; gap: 9px; align-items: flex-start; background: var(--accent-soft); border-radius: 12px; padding: 12px 13px; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); margin-top: 2px; }
.pe-hint strong { color: var(--ink); font-weight: 700; }
.pe-hint__icon { flex: none; color: var(--accent-press); margin-top: 1px; }

/* editierbares Aufwärm-% in der Satz-Zeile */
.setrow__pctchip { display: inline-flex; align-items: center; justify-content: center; gap: 0; width: auto; min-width: 44px; padding: 3px 5px; border: 1px solid var(--border-strong); background: #f3f3f4; }
.setrow__pct { width: 26px; border: none; background: transparent; font-family: var(--mono); font-size: 11.5px; font-weight: 800; color: var(--ink-2); text-align: right; padding: 0; -moz-appearance: textfield; }
.setrow__pct:focus { outline: none; }
.setrow__pct::-webkit-outer-spin-button, .setrow__pct::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.setrow__pctsign { font-size: 10.5px; font-weight: 800; color: var(--ink-2); margin-left: 1px; }
.setrow__pctchip:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.setrow.is-done .setrow__pctchip { opacity: .62; }
