:root {
  --bg: #0b0f1e;
  --bg2: #10162a;
  --card: #151c33;
  --card2: #1b2340;
  --line: rgba(255, 255, 255, 0.07);
  --text: #eef1fb;
  --muted: #8d97b8;
  --gold: #ffd040;
  --green: #3ee07a;
  --red: #ff5a6a;
  --purple: #a77bff;
  --cyan: #3cc8ff;
  --pink: #ff7ad9;
  --orange: #ff8a3d;
  --r: 18px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }   /* kein Zoom per Doppeltipp */
html, body { margin: 0; background: var(--bg); color: var(--text); }
input, textarea { touch-action: manipulation; }
body { -webkit-user-select: none; user-select: none; }
input, textarea, .scriptbox { -webkit-user-select: text; user-select: text; }
body {
  font: 15px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  font-variant-numeric: tabular-nums;
}
.hidden { display: none !important; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, select { font: inherit; }
h1, h2, .num, .stat-v, .hero-n, .top-name, .board-v, .tabs span, .wk-timer, .rest-n, .set-n, .stp b, .sum-v { font-family: "Fredoka", -apple-system, sans-serif; }
h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: 0.2px; }
.muted { color: var(--muted); }
.small { font-size: 12px; margin-top: 8px; }
.up { color: var(--green); }
.down { color: var(--red); }

/* Login */
.login { position: fixed; inset: 0; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(120% 80% at 50% 0%, #2a1f5c 0%, var(--bg) 60%); }
.login-card { width: 100%; max-width: 340px; text-align: center; }
.login-icon { width: 96px; height: 96px; border-radius: 24px; box-shadow: 0 12px 40px rgba(167, 123, 255, 0.35); }
.login h1 { margin: 18px 0 4px; font-size: 30px; font-weight: 700; }
.login h1 span, .top-name span { color: var(--gold); }
.login p { margin: 0 0 22px; color: var(--muted); }
.login input { width: 100%; padding: 15px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card);
  color: var(--text); font-size: 17px; outline: none; }
.login input:focus { border-color: var(--purple); }
.login button { width: 100%; margin-top: 12px; padding: 15px; border-radius: 14px; font-weight: 700; font-size: 17px;
  background: linear-gradient(180deg, #ffe066, #ffbf1f); color: #2a1c00; }
.login-err { color: var(--red); min-height: 20px; margin-top: 10px; font-size: 14px; }

/* App-Rahmen */
.app { min-height: 100vh; padding: calc(var(--safe-t) + 64px) 14px calc(var(--safe-b) + 86px); }
.app.resting { padding-top: calc(var(--safe-t) + 64px + 86px); }
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: calc(var(--safe-t) + 8px) 14px 10px; background: rgba(11, 15, 30, 0.82);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); border-bottom: 1px solid var(--line); }
.top-icon { width: 36px; height: 36px; border-radius: 10px; }
.top-title { flex: 1; min-width: 0; }
.top-name { font-size: 18px; font-weight: 700; line-height: 1.1; }
.top-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-sub.live { color: var(--green); }
.streak-pill { display: flex; align-items: center; gap: 5px; padding: 6px 11px 6px 8px; border-radius: 99px; background: rgba(255, 138, 61, 0.14);
  color: var(--orange); font-weight: 700; font-family: "Fredoka", sans-serif; font-size: 16px; }
.streak-pill svg { width: 18px; height: 18px; fill: currentColor; }
.streak-pill.off { background: rgba(141, 151, 184, 0.12); color: var(--muted); }
.refresh { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: var(--muted); flex: none; }
.refresh svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.refresh.busy { color: var(--gold); }
.refresh.busy svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ptr { position: fixed; top: calc(var(--safe-t) + 66px); left: calc(50% - 18px); z-index: 19; width: 36px; height: 36px; border-radius: 50%;
  background: var(--card2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); transform: translateY(-70px); }
.ptr svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.ptr.ready { color: var(--gold); border-color: var(--gold); }
.ptr.ready svg { transform: rotate(180deg); }

.view { display: none; animation: fade .25s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head .muted { font-size: 13px; }

/* Pausen-Timer */
.rest { position: fixed; top: calc(var(--safe-t) + 58px); left: 0; right: 0; z-index: 18; padding: 8px 14px 10px;
  background: rgba(16, 22, 42, 0.94); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--line);
  animation: fade .2s ease; }
.rest-bar { height: 6px; border-radius: 9px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.rest-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--orange), var(--gold)); border-radius: 9px; transition: width .25s linear; }
.rest-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.rest-k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; font-weight: 600; }
.rest-n { font-size: 28px; font-weight: 700; line-height: 1; color: var(--gold); }
.rest-next { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rest-btn { padding: 9px 13px; border-radius: 11px; background: var(--card2); font-weight: 700; font-size: 14px; }
.rest-btn.gold { background: linear-gradient(180deg, #ffe066, #ffbf1f); color: #2a1c00; }
.rest.over .rest-n { color: var(--green); animation: blink .6s 4; }
@media (min-width: 720px) { .rest { max-width: 760px; left: 50%; transform: translateX(-50%); border: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); } }

/* Held (Heute) */
.hero { text-align: center; padding: 22px 16px 18px;
  background: radial-gradient(120% 120% at 50% 0%, rgba(255, 138, 61, 0.22), transparent 60%), var(--card); }
.hero-ring { width: 156px; height: 156px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; position: relative; padding: 7px;
  background: conic-gradient(var(--gold) var(--p, 0%), rgba(255, 255, 255, 0.08) 0); }
.hero-ring.full { background: conic-gradient(from 180deg, var(--orange), var(--gold), var(--green), var(--gold), var(--orange)); }
.hero-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--card); }
.hero-ring.full::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid rgba(62, 224, 122, 0.4); animation: halo 2.4s infinite; }
@keyframes halo { 0% { transform: scale(0.94); opacity: 0.9; } 100% { transform: scale(1.12); opacity: 0; } }
.hero-n { position: relative; font-size: 58px; font-weight: 700; line-height: 1; }
.hero-n small { font-size: 22px; color: var(--muted); font-weight: 600; }
.hero-label { margin-top: 12px; font-weight: 600; }
.hero-meta { margin-top: 4px; font-size: 13px; color: var(--muted); }
.week { display: flex; justify-content: space-between; gap: 6px; margin: 16px 4px 4px; }
.wd { flex: 1; text-align: center; }
.wd i { display: block; width: 34px; height: 34px; margin: 0 auto 4px; border-radius: 50%; background: rgba(255, 255, 255, 0.06); border: 2px solid transparent;
  display: grid; place-items: center; }
.wd i svg { width: 18px; height: 18px; fill: none; stroke: #2a1c00; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.wd.done i { background: linear-gradient(180deg, #ffe066, #ffbf1f); }
.wd.today i { border-color: var(--gold); }
.wd.future i { opacity: .45; }
.wd span { font-size: 11px; color: var(--muted); font-weight: 600; }
.wd.today span { color: var(--gold); }

/* Coach-Zeile (Duolingo-Modus) */
.coach { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); margin-bottom: 14px; background: var(--card); border: 1px solid var(--line); }
.coach-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--card2); }
.coach-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.coach-t { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 16px; }
.coach-b { font-size: 13px; color: var(--muted); margin-top: 1px; }
.coach.good .coach-ic { background: rgba(62, 224, 122, 0.16); color: var(--green); }
.coach.go .coach-ic { background: rgba(255, 208, 64, 0.16); color: var(--gold); }
.coach.warn { border-color: rgba(255, 138, 61, 0.5); }
.coach.warn .coach-ic { background: rgba(255, 138, 61, 0.18); color: var(--orange); }
.coach.bad { border-color: rgba(255, 90, 106, 0.5); }
.coach.bad .coach-ic { background: rgba(255, 90, 106, 0.18); color: var(--red); }
.coach.bad .coach-t { color: var(--red); }
/* Koerperfigur (Muskelkarte) */
.body { width: 100%; max-width: 300px; height: auto; display: block; margin: 0 auto; }
.body text { fill: var(--muted); font-size: 15px; font-family: -apple-system, sans-serif; font-weight: 600; }
.body.mini { width: 58px; max-width: none; margin: 0; flex: none; }
.body-card { text-align: center; }
.body-legend { display: flex; justify-content: center; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.body-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.ex-name[data-act] { cursor: pointer; }
.ex-muscles { font-size: 12px; color: var(--muted); margin-top: 2px; }
.day-body { width: 46px; flex: none; }
.day-body .body.mini { width: 46px; }
/* Wochenvolumen je Muskelgruppe */
.mg { display: grid; gap: 7px; }
.mg-row { display: grid; grid-template-columns: 82px 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.mg-track { height: 9px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); position: relative; overflow: hidden; }
.mg-track i { display: block; height: 100%; border-radius: 99px; background: var(--muted); }
.mg-track i.low { background: var(--orange); }
.mg-track i.ok { background: var(--green); }
.mg-track i.high { background: var(--gold); }
.mg-track b { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: rgba(255, 255, 255, 0.25); }
.mg-v { font-family: "Fredoka", sans-serif; font-weight: 600; white-space: nowrap; }
.cta { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 16px; border-radius: var(--r); margin-bottom: 14px;
  background: linear-gradient(135deg, #ffe066, #ffb21f); color: #2a1c00; box-shadow: 0 10px 30px rgba(255, 191, 31, 0.25); }
.cta.green { background: linear-gradient(135deg, #5df59a, #22c55e); color: #052e13; box-shadow: 0 10px 30px rgba(62, 224, 122, 0.25); }
.cta-ic { width: 46px; height: 46px; border-radius: 14px; background: rgba(0, 0, 0, 0.14); display: grid; place-items: center; flex: none; }
.cta-ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.cta-t { flex: 1; min-width: 0; }
.cta-k { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; opacity: .75; }
.cta-v { font-family: "Fredoka", sans-serif; font-size: 20px; font-weight: 700; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cta-s { font-size: 13px; opacity: .8; margin-top: 1px; }
.cta-arrow { font-size: 26px; font-weight: 700; opacity: .7; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.grid.three { grid-template-columns: 1fr 1fr 1fr; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; min-width: 0; }
.stat-k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; }
.stat-v { font-size: 26px; font-weight: 700; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-v small { font-size: 14px; color: var(--muted); font-weight: 500; }
.stat-s { font-size: 12px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.gold .stat-v { color: var(--gold); }
.stat.green .stat-v { color: var(--green); }
.stat.orange .stat-v { color: var(--orange); }

.seg { display: inline-flex; background: var(--bg2); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { padding: 6px 11px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--card2); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }
.seg.wide { display: flex; width: 100%; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.seg.wide button { flex: 1; white-space: nowrap; }
.seg.wide::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.chips button { padding: 8px 14px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); white-space: nowrap;
  font-size: 14px; font-weight: 600; color: var(--muted); }
.chips button.on { background: var(--text); color: var(--bg); }
.chips.wrap { flex-wrap: wrap; overflow: visible; }

.badge { padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--card2); white-space: nowrap; }
.badge.live { background: rgba(62, 224, 122, 0.14); color: var(--green); }
.badge.gold { background: rgba(255, 208, 64, 0.16); color: var(--gold); }
.tag { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 10px; font-weight: 800; letter-spacing: 0.5px; vertical-align: 2px; }
.tag.new { background: var(--gold); color: #2a1c00; }
.tag.pr { background: var(--green); color: #052e13; }
.tag.off { background: var(--card2); color: var(--muted); font-weight: 700; }
.scriptbox { width: 100%; height: 90px; margin-top: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); color: var(--text);
  font: 11px/1.4 ui-monospace, Menlo, monospace; padding: 8px; resize: none; }
.steps a { color: var(--cyan); }
.wk-stats .badge { font-size: 11px; }
.badge.geo-wait { color: var(--muted); animation: blink 1.2s infinite; }
button.badge { cursor: pointer; }
.empty { padding: 22px 8px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); font-family: "Fredoka", sans-serif; font-size: 18px; margin-bottom: 4px; }
@keyframes blink { 50% { opacity: 0.55; } }

/* Muskelgruppen */
.gtag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .3px; background: var(--card2); color: var(--muted); white-space: nowrap; }
.g-Brust { background: rgba(255, 122, 217, 0.16); color: var(--pink); }
.g-Rücken { background: rgba(60, 200, 255, 0.16); color: var(--cyan); }
.g-Beine { background: rgba(62, 224, 122, 0.16); color: var(--green); }
.g-Schultern { background: rgba(255, 208, 64, 0.16); color: var(--gold); }
.g-Arme { background: rgba(167, 123, 255, 0.18); color: var(--purple); }
.g-Bauch { background: rgba(255, 138, 61, 0.16); color: var(--orange); }
.g-Cardio { background: rgba(255, 90, 106, 0.16); color: var(--red); }

/* Listen */
.rows { display: grid; grid-template-columns: minmax(0, 1fr); }
.row { display: flex; align-items: center; gap: 11px; padding: 10px 2px; border-bottom: 1px solid var(--line); min-width: 0; }
.row:last-child { border-bottom: 0; }
.row[data-act] { cursor: pointer; }
.row-ic { width: 42px; height: 42px; border-radius: 13px; background: var(--card2); display: grid; place-items: center; flex: none;
  font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 13px; color: var(--muted); text-align: center; line-height: 1.05; }
.row-ic.gold { background: rgba(255, 208, 64, 0.16); color: var(--gold); }
.row-b { flex: 1; min-width: 0; }
.row-t { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-s { font-size: 12px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-v { flex: none; text-align: right; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 16px; color: var(--gold); white-space: nowrap; }
.row-v small { display: block; font-family: -apple-system, sans-serif; font-weight: 400; font-size: 11px; color: var(--muted); }
.row-v.green { color: var(--green); }
.chev { color: var(--muted); font-size: 20px; flex: none; }

/* Knoepfe */
.btn { display: block; width: 100%; text-align: center; padding: 13px; border-radius: 13px; font-weight: 700; margin-top: 8px;
  background: linear-gradient(180deg, #b88cff, #8a5cf0); color: #fff; text-decoration: none; }
.btn.gold { background: linear-gradient(180deg, #ffe066, #ffbf1f); color: #2a1c00; }
.btn.green { background: linear-gradient(180deg, #5df59a, #22c55e); color: #052e13; }
.btn.ghost { background: var(--card2); color: var(--text); }
.btn.danger { background: rgba(255, 90, 106, 0.14); color: var(--red); }
.btn.sm { padding: 10px; font-size: 14px; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { margin-top: 8px; }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); background: var(--card2); flex: none; font-size: 18px; font-weight: 700; }
.icon-btn.danger { color: var(--red); }
.back { color: var(--cyan); font-weight: 600; padding: 4px 0; font-size: 15px; }
.field { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font-size: 16px; outline: none; }
.field:focus { border-color: var(--purple); }
.field-row { display: flex; gap: 8px; align-items: center; }
.field-row .field { flex: 1; min-width: 0; }
.field-row .btn { width: auto; margin: 0; padding: 12px 16px; }
.hint { padding: 12px; border-radius: 12px; background: rgba(255, 208, 64, 0.1); color: #ffe6a0; font-size: 14px; margin-bottom: 10px; }
.hint.blue { background: rgba(60, 200, 255, 0.1); color: #bfe9ff; }
.note { font-size: 13px; color: var(--muted); margin: 0 0 10px; }

/* Training */
.wk-head { padding: 14px 16px; background: radial-gradient(120% 120% at 100% 0%, rgba(62, 224, 122, 0.16), transparent 60%), var(--card); }
.wk-top { display: flex; align-items: center; gap: 10px; }
.wk-name { font-family: "Fredoka", sans-serif; font-size: 22px; font-weight: 700; line-height: 1.1; }
.wk-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.wk-timer { margin-left: auto; font-size: 30px; font-weight: 700; color: var(--green); flex: none; }
.wk-stats { display: flex; gap: 14px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.wk-stats b { color: var(--text); font-family: "Fredoka", sans-serif; font-size: 15px; }
.ex { padding: 14px 14px 10px; }
.ex-head { display: flex; align-items: flex-start; gap: 10px; }
.ex-title { flex: 1; min-width: 0; }
.ex-name { font-family: "Fredoka", sans-serif; font-size: 18px; font-weight: 600; line-height: 1.15; }
.ex-last { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ex-hint { margin: 8px 0 0; padding: 7px 10px; border-radius: 10px; background: rgba(62, 224, 122, 0.1); color: #b8f5cf; font-size: 13px; }
.set-cols { display: flex; align-items: center; gap: 6px; margin: 10px 0 2px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.set-cols span:first-child { width: 24px; }
.set-cols span:nth-child(2), .set-cols span:nth-child(3) { flex: 1; text-align: center; }
.set-cols span:last-child { width: 44px; }
.set { display: flex; align-items: center; gap: 6px; padding: 5px 0; }
.set-n { width: 24px; text-align: center; font-weight: 700; color: var(--muted); font-size: 15px; flex: none; }
.set.done .set-n { color: var(--green); }
.stp { flex: 1; display: flex; align-items: center; background: var(--bg2); border-radius: 12px; overflow: hidden; min-width: 0; }
.stp button { width: 34px; height: 42px; font-size: 20px; color: var(--muted); flex: none; font-weight: 600; }
.stp button:active { background: var(--card2); color: var(--text); }
.stp input { flex: 1; min-width: 0; width: 100%; height: 42px; text-align: center; background: none; border: 0; color: var(--text); font-size: 17px; font-weight: 600;
  font-family: "Fredoka", sans-serif; outline: none; -moz-appearance: textfield; }
.stp input::-webkit-outer-spin-button, .stp input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stp b { flex: 1; text-align: center; font-size: 17px; font-weight: 600; }
.stp.sm button { width: 30px; height: 34px; font-size: 17px; }
.stp.sm b { font-size: 15px; }
.set.done .stp { background: rgba(62, 224, 122, 0.1); }
.set-ok { width: 44px; height: 42px; border-radius: 12px; background: var(--card2); display: grid; place-items: center; color: var(--muted); flex: none; position: relative; }
.set-ok svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.set.done .set-ok { background: linear-gradient(180deg, #5df59a, #22c55e); color: #052e13; }
.set-ok .pr { position: absolute; top: -7px; right: -6px; padding: 1px 5px; border-radius: 6px; background: var(--gold); color: #2a1c00; font-size: 9px; font-weight: 800; letter-spacing: .4px; }
.ex-foot { display: flex; gap: 8px; margin-top: 8px; }
.ex-foot button { flex: 1; padding: 9px; border-radius: 10px; background: var(--bg2); font-weight: 600; font-size: 14px; color: var(--muted); }
.ex-foot button.main { color: var(--text); }
.add-ex { width: 100%; padding: 14px; border-radius: var(--r); border: 1.5px dashed rgba(255, 255, 255, 0.16); color: var(--muted); font-weight: 700; margin-bottom: 14px; }
.wk-note { margin-top: 10px; }
.wk-note .field { font-size: 15px; }

/* Plan-Tag-Auswahl */
.dayc { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); margin-bottom: 10px; }
.dayc.next { border-color: rgba(255, 208, 64, 0.5); background: radial-gradient(120% 120% at 0% 0%, rgba(255, 208, 64, 0.12), transparent 60%), var(--card); }
.dayc .row-ic { width: 46px; height: 46px; font-size: 18px; }
.dayc .row-t { font-family: "Fredoka", sans-serif; font-size: 17px; }

/* Plan-Editor */
.pe { padding: 9px 0; border-bottom: 1px solid var(--line); }
.pe:last-child { border-bottom: 0; }
.pe-top { display: flex; align-items: center; gap: 8px; }
.pe-name { flex: 1; min-width: 0; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pe-name small { color: var(--muted); font-weight: 400; margin-left: 5px; }
.pe-ctl { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.pe-ctl .stp { flex: 0 0 auto; width: 104px; }
.pe-ctl span { width: 40px; text-align: right; }
.pe-ctl .sp { flex: 1; }
.xs { width: 30px; height: 30px; border-radius: 9px; background: var(--card2); color: var(--muted); font-size: 15px; font-weight: 700; flex: none; display: grid; place-items: center; }
.xs.danger { color: var(--red); }
.day-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.day-head .field { flex: 1; padding: 9px 12px; font-weight: 600; }

/* Verlauf */
.vb { position: relative; margin-top: 4px; }
.vb-plot { display: flex; align-items: flex-end; gap: 4px; height: 118px; padding-top: 18px; position: relative; }
.vb-col { flex: 1; height: 100%; display: flex; align-items: flex-end; position: relative; }
.vb-bar { width: 100%; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, var(--purple), rgba(167, 123, 255, 0.4)); }
.vb-bar.gold { background: linear-gradient(180deg, var(--gold), rgba(255, 208, 64, 0.38)); }
.vb-bar.green { background: linear-gradient(180deg, var(--green), rgba(62, 224, 122, 0.38)); }
.vb-bar.zero { background: rgba(255, 255, 255, 0.06); }
.vb-max { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--text); white-space: nowrap; }
.vb-goal { position: absolute; left: 0; right: 0; border-top: 1px dashed rgba(255, 208, 64, 0.5); pointer-events: none; }
.vb-goal span { position: absolute; left: 0; top: -14px; font-size: 10px; color: var(--gold); }
.vb-x { display: flex; gap: 4px; margin-top: 4px; }
.vb-x span { flex: 1; text-align: center; font-size: 10px; color: var(--muted); white-space: nowrap; }
.line { width: 100%; height: 150px; display: block; overflow: visible; }
.line path.l { fill: none; stroke: var(--cyan); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.line path.a { fill: url(#lg); stroke: none; }
.line circle { fill: var(--cyan); stroke: var(--card); stroke-width: 1.5; }
.line text { fill: var(--muted); font-size: 10px; font-family: -apple-system, sans-serif; }
.line text.v { fill: var(--text); font-weight: 600; }
.month { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; font-weight: 700; margin: 14px 2px 4px; }
.month:first-child { margin-top: 0; }

/* Zusammenfassung */
.sum { text-align: center; padding: 8px 0 4px; }
.sum h2 { font-size: 26px; font-weight: 700; }
.sum p { margin: 4px 0 14px; color: var(--muted); }
.sum-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.sum-grid div { background: var(--bg2); border-radius: 14px; padding: 10px 6px; }
.sum-v { font-size: 22px; font-weight: 700; color: var(--gold); }
.sum-k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; margin-top: 2px; }

/* Einstellungen */
.prefs { display: grid; }
.pref { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.pref:last-child { border-bottom: 0; }
.pref small { display: block; color: var(--muted); font-size: 12px; }
.pref .seg { flex: none; }
.switch { position: relative; width: 51px; height: 31px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #39405c; border-radius: 99px; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 27px; height: 27px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::before { transform: translateX(20px); }
.days { display: flex; gap: 6px; margin: 8px 0 4px; }
.days button { flex: 1; padding: 9px 0; border-radius: 10px; background: var(--bg2); font-weight: 700; font-size: 13px; color: var(--muted); }
.days button.on { background: linear-gradient(180deg, #ffe066, #ffbf1f); color: #2a1c00; }
.time-in { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); font-size: 16px; }
.steps { margin: 0 0 10px; padding-left: 20px; font-size: 14px; display: grid; gap: 6px; }

/* Bottom-Sheet */
.sheet { position: fixed; inset: 0; z-index: 30; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); }
.sheet-card { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; overflow-y: auto; background: var(--card); border-radius: 22px 22px 0 0;
  padding: 10px 16px calc(var(--safe-b) + 20px); border-top: 1px solid var(--line); animation: sheetin .25s ease; }
@keyframes sheetin { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--muted); opacity: .5; margin: 0 auto 10px; }
.sheet-card .card-head { margin-top: 4px; }
.sheet-card .stat { padding: 10px 10px; }
.sheet-card .stat-v { white-space: normal; line-height: 1.1; }
.sheet-card .field { margin-bottom: 10px; }
.pick { display: flex; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.pick:last-child { border-bottom: 0; }
.pick .row-t { flex: 1; font-weight: 600; }
.pick .row-s { color: var(--muted); font-size: 12px; }
.pick .plus { width: 30px; height: 30px; border-radius: 9px; background: rgba(62, 224, 122, 0.14); color: var(--green); display: grid; place-items: center; font-weight: 800; font-size: 18px; flex: none; }
body.noscroll { overflow: hidden; }
@media (min-width: 720px) { .sheet-card { max-width: 760px; margin: 0 auto; } }

/* Tab-Leiste */
.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; padding: 6px 6px calc(var(--safe-b) + 6px);
  background: rgba(11, 15, 30, 0.86); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-top: 1px solid var(--line); }
.tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; color: var(--muted); position: relative; }
.tabs svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabs span { font-size: 11px; font-weight: 600; }
.tabs button.on { color: var(--gold); }
.tabs .dot { position: absolute; top: 4px; right: calc(50% - 16px); width: 9px; height: 9px; border-radius: 50%; background: var(--green);
  border: 2px solid var(--bg); animation: blink 1.2s infinite; }

@media (min-width: 720px) {
  .app { max-width: 760px; margin: 0 auto; }
  .grid { grid-template-columns: repeat(4, 1fr); }
  .grid.three { grid-template-columns: repeat(3, 1fr); }
}
