/* ------------------------------------------------------------------
   Hantel – Design Tokens (Dark ist Standard, Light per data-theme)
   ------------------------------------------------------------------ */
:root {
  --bg: #0f1115;
  --surface: #181b22;
  --surface-2: #21252f;
  --surface-3: #2a2f3b;
  --border: #2b3040;
  --text: #f2f4f8;
  --text-2: #aab1c3;
  --text-3: #6f778a;
  --accent: #ff5c35;
  --accent-2: #ff8a5c;
  --accent-soft: rgba(var(--accent-rgb), 0.16);
  --accent-rgb: 255, 92, 53;
  --accent-text: #ffffff;
  --good: #3ddc84;
  --good-2: #6ff0a6;
  --good-soft: rgba(61, 220, 132, 0.16);
  --warn: #ffc857;
  --danger: #ff4d6d;
  --danger-soft: rgba(255, 77, 109, 0.16);
  --chart-grid: rgba(255, 255, 255, 0.07);
  --hi: rgba(255, 255, 255, 0.045);   /* innere Highlight-Linie */
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 8px 24px rgba(0, 0, 0, 0.18);
  --glow: 0 6px 20px rgba(var(--accent-rgb), 0.28);

  --radius: 16px;
  --radius-sm: 10px;
  --tabbar-h: 56px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #f2f3f7;
  --surface-3: #e6e8ef;
  --border: #e0e3ea;
  --text: #14171f;
  --text-2: #4b5263;
  --text-3: #8a91a3;
  --accent: #e84a22;
  --accent-2: #f26a45;
  --accent-soft: rgba(232, 74, 34, 0.12);
  --accent-rgb: 232, 74, 34;
  --good: #1f9d5a;
  --good-2: #35b872;
  --good-soft: rgba(31, 157, 90, 0.12);
  --danger: #d9304f;
  --danger-soft: rgba(217, 48, 79, 0.12);
  --chart-grid: rgba(0, 0, 0, 0.07);
  --hi: rgba(255, 255, 255, 0.7);
  --shadow: 0 1px 2px rgba(20, 23, 31, 0.06), 0 8px 24px rgba(20, 23, 31, 0.06);
  --glow: 0 6px 18px rgba(232, 74, 34, 0.22);
  color-scheme: light;
}

/* ------------------------------------------------------------------
   Base
   ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

body { position: fixed; inset: 0; overflow: hidden; }

#app { height: 100%; display: flex; flex-direction: column; }

.view {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: calc(var(--safe-top) + 12px) 16px calc(var(--tabbar-h) + var(--safe-bottom) + 24px);
}
.view.no-tabbar { padding-bottom: calc(var(--safe-bottom) + 24px); }

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 30px; line-height: 1.15; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
p { margin: 0; }
a { color: var(--accent); text-decoration: none; }
button { font-family: inherit; }
svg { display: block; }

.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.mt { margin-top: 16px; }
.mt-lg { margin-top: 28px; }
.mb { margin-bottom: 12px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------------
   Page header
   ------------------------------------------------------------------ */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 18px;
}
.page-head .eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 4px;
}
.subhead {
  display: flex; align-items: center; justify-content: space-between;
  margin: 22px 0 10px;
}
.subhead h2 { font-size: 17px; color: var(--text-2); font-weight: 600; }

.back {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--accent); font-weight: 600; font-size: 16px;
  padding: 6px 0; margin-bottom: 4px;
  background: none; border: 0; cursor: pointer;
}
.back svg { width: 18px; height: 18px; fill: currentColor; }

/* ------------------------------------------------------------------
   Cards & lists
   ------------------------------------------------------------------ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.card + .card { margin-top: 10px; }
.card.tappable { cursor: pointer; transition: transform 0.08s ease, background 0.15s ease; }
.card.tappable:active { transform: scale(0.985); background: var(--surface-2); }

.list { display: flex; flex-direction: column; gap: 10px; }

.chev { width: 20px; height: 20px; fill: var(--text-3); flex: none; }

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  background: var(--surface-2); color: var(--text-2);
}
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.pill.good { background: var(--good-soft); color: var(--good); }

.empty {
  text-align: center; padding: 48px 20px; color: var(--text-2);
  border: 1px dashed var(--border); border-radius: var(--radius);
}
.empty .icon { font-size: 40px; margin-bottom: 10px; }
.empty h3 { color: var(--text); margin-bottom: 6px; }

/* ------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px;
  border-radius: 14px; border: 1px solid transparent;
  font-size: 16px; font-weight: 600;
  background: var(--surface-2); color: var(--text);
  cursor: pointer; user-select: none;
  transition: transform 0.08s ease, filter 0.15s ease;
}
.btn:active { transform: scale(0.97); filter: brightness(1.1); }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn.primary { background: var(--accent); color: var(--accent-text); }
.btn.good { background: var(--good); color: #062b16; }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.ghost { background: transparent; border-color: var(--border); }
.btn.block { width: 100%; }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.btn.icon { width: 44px; min-height: 44px; padding: 0; border-radius: 12px; }
.btn svg { width: 20px; height: 20px; fill: currentColor; }

.fab {
  position: fixed; right: 18px;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 18px);
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--accent); color: #fff; border: 0;
  box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.35);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 5;
}
.fab svg { width: 28px; height: 28px; fill: currentColor; }
.fab:active { transform: scale(0.94); }

/* ------------------------------------------------------------------
   Forms
   ------------------------------------------------------------------ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input, select.input, textarea.input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 16px; /* >=16px verhindert iOS-Zoom */
  font-family: inherit;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.input:focus { border-color: var(--accent); }
textarea.input { min-height: 80px; resize: vertical; }
.input.num { text-align: center; font-family: var(--mono); font-weight: 600; padding: 10px 6px; }
.input::placeholder { color: var(--text-3); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }

.switch {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 0;
}
.switch + .switch { border-top: 1px solid var(--border); }
.switch .lbl { font-weight: 600; }
.switch .desc { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.toggle { position: relative; width: 52px; height: 32px; flex: none; }
.toggle input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.toggle span {
  position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3);
  transition: background 0.2s ease;
}
.toggle span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}
.toggle input:checked + span { background: var(--good); }
.toggle input:checked + span::after { transform: translateX(20px); }

.seg { display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button {
  flex: 1; min-height: 38px; border: 0; border-radius: 10px; background: transparent;
  color: var(--text-2); font-weight: 600; font-size: 14px; cursor: pointer;
}
.seg button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.25); }

/* ------------------------------------------------------------------
   Tab bar
   ------------------------------------------------------------------ */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: flex;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
  z-index: 10;
}
.tabbar.hidden { display: none; }
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-3); font-size: 11px; font-weight: 600;
}
.tab svg { width: 24px; height: 24px; fill: currentColor; }
.tab.active { color: var(--accent); }

/* ------------------------------------------------------------------
   Toast & modal
   ------------------------------------------------------------------ */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 16px);
  max-width: calc(100% - 32px);
  background: var(--text); color: var(--bg);
  padding: 12px 18px; border-radius: 14px;
  font-weight: 600; font-size: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  z-index: 50;
  animation: toast-in 0.2s ease;
}
.toast.action { display: flex; gap: 14px; align-items: center; }
.toast button { border: 0; background: var(--accent); color: #fff; border-radius: 8px; padding: 6px 10px; font-weight: 700; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 40; animation: fade-in 0.15s ease;
}
.modal {
  width: 100%; max-width: 560px;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  padding: 18px 18px calc(var(--safe-bottom) + 18px);
  max-height: 88vh; overflow-y: auto;
  animation: sheet-up 0.22s cubic-bezier(.2,.8,.2,1);
}
.modal h2 { margin-bottom: 14px; }
.modal .actions { display: flex; gap: 10px; margin-top: 18px; }
.modal .actions .btn { flex: 1; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0.6; } to { transform: none; opacity: 1; } }

/* ------------------------------------------------------------------
   Plans
   ------------------------------------------------------------------ */
.plan-card { display: flex; align-items: center; gap: 14px; }
.plan-card .swatch {
  width: 12px; height: 44px; border-radius: 6px; flex: none;
  background: var(--accent);
}
.plan-card .meta { font-size: 13px; color: var(--text-3); margin-top: 3px; }

.ex-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
}
.ex-row + .ex-row { border-top: 1px solid var(--border); }
.ex-row .idx {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--text-2);
  font-size: 13px; font-weight: 700; font-family: var(--mono);
}
.ex-row .target { font-size: 13px; color: var(--text-3); margin-top: 2px; font-family: var(--mono); }
.ex-row .handle { color: var(--text-3); cursor: grab; padding: 6px; touch-action: none; }
.ex-row .handle svg { width: 20px; height: 20px; fill: currentColor; }
.ex-row.dragging { opacity: 0.4; }

/* ------------------------------------------------------------------
   Workout
   ------------------------------------------------------------------ */
.workout-head {
  position: sticky; top: 0; z-index: 6;
  margin: calc(-1 * (var(--safe-top) + 12px)) -16px 12px;
  padding: calc(var(--safe-top) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--bg) 97%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.workout-head .title { font-weight: 700; font-size: 17px; }
.workout-head .elapsed { font-family: var(--mono); color: var(--text-2); font-size: 15px; }

.rest-bar {
  margin-top: 10px;
  display: flex; align-items: center; gap: 12px;
  background: var(--accent); color: #fff;
  border-radius: 14px; padding: 10px 14px;
  animation: fade-in 0.15s ease;
}
.rest-bar .time { font-family: var(--mono); font-size: 30px; font-weight: 700; letter-spacing: -0.02em; min-width: 90px; }
.rest-bar .lbl { font-size: 12px; opacity: 0.85; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.rest-bar .btn { background: rgba(255,255,255,0.18); color: #fff; min-height: 38px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.rest-bar .bar { position: absolute; left: 0; bottom: 0; height: 3px; background: rgba(255,255,255,0.6); border-radius: 0 0 14px 14px; }
.rest-bar { position: relative; overflow: hidden; }

.ex-card { padding: 14px 14px 10px; }
.ex-card .ex-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ex-card .ex-name { font-size: 18px; font-weight: 700; }
.ex-card .ex-target { color: var(--text-3); font-size: 13px; font-family: var(--mono); margin-top: 2px; }
.ex-card .ex-last { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.ex-card.done { border-color: color-mix(in srgb, var(--good) 40%, var(--border)); }
.ex-card.done .ex-name { color: var(--text-2); }

.set-grid { display: grid; grid-template-columns: 40px 1fr 1fr 52px; gap: 8px; align-items: center; }
.set-grid .hdr { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); text-align: center; padding-bottom: 2px; }
.set-grid .setno { text-align: center; font-family: var(--mono); font-weight: 700; color: var(--text-2); }
.set-grid .input.num { min-height: 44px; }
.set-grid .prev { font-size: 11px; color: var(--text-3); text-align: center; font-family: var(--mono); grid-column: 2 / 4; margin-top: -4px; }
.set-row.done .input.num { background: var(--good-soft); border-color: transparent; color: var(--good); }
.check {
  width: 52px; height: 44px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-3);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.check svg { width: 24px; height: 24px; fill: currentColor; }
.check.on { background: var(--good); color: #062b16; border-color: transparent; }
.check:active { transform: scale(0.94); }

.add-set { margin-top: 10px; display: flex; gap: 8px; }
.add-set .btn { flex: 1; }

/* ------------------------------------------------------------------
   Timer page
   ------------------------------------------------------------------ */
.timer-display {
  text-align: center; padding: 30px 0 16px;
}
.timer-display .big {
  font-family: var(--mono); font-size: 84px; font-weight: 700;
  letter-spacing: -0.04em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.timer-display .big.running { color: var(--accent); }
.timer-display .state { margin-top: 8px; color: var(--text-3); font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.ring { width: 260px; height: 260px; margin: 0 auto; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.ring .track { stroke: var(--surface-3); }
.ring .prog { stroke: var(--accent); transition: stroke-dashoffset 0.25s linear; }
.ring .inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .inner .big { font-size: 64px; }

.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; }
.presets .btn { min-height: 52px; font-family: var(--mono); font-size: 17px; }
.presets .btn.active { background: var(--accent-soft); color: var(--accent); }

/* ------------------------------------------------------------------
   Progress
   ------------------------------------------------------------------ */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat .val { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .val small { font-size: 15px; color: var(--text-2); font-weight: 600; margin-left: 3px; }
.stat .lbl { font-size: 12px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 6px; }

.chart { width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.chart .grid line { stroke: var(--chart-grid); stroke-width: 1; }
.chart .bar { fill: var(--accent); }
.chart .bar.dim { fill: var(--surface-3); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--accent); opacity: 0.10; }
.chart .dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart .dot.hi { r: 6; }
.chart .hit { fill: transparent; }
.chart .tip { pointer-events: none; }
.chart .tip rect { fill: var(--text); rx: 6; }
.chart .tip text { fill: var(--bg); font-weight: 700; font-size: 12px; }
.chart .cross { stroke: var(--text-3); stroke-dasharray: 3 3; }

.session-row { display: flex; align-items: center; gap: 14px; }
.session-row .date {
  width: 48px; flex: none; text-align: center;
  background: var(--surface-2); border-radius: 10px; padding: 6px 0;
}
.session-row .date .d { font-size: 18px; font-weight: 700; line-height: 1; }
.session-row .date .m { font-size: 11px; color: var(--text-3); text-transform: uppercase; font-weight: 600; margin-top: 2px; }
.session-row .meta { font-size: 13px; color: var(--text-3); margin-top: 3px; }

.pr-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; }
.pr-row + .pr-row { border-top: 1px solid var(--border); }
.pr-row .val { font-family: var(--mono); font-weight: 700; }
.pr-row .sub { font-size: 12px; color: var(--text-3); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); padding: 8px 6px; border-bottom: 1px solid var(--border); }
.tbl td { padding: 9px 6px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.tbl td.num, .tbl th.num { text-align: right; font-family: var(--mono); }
.tbl-wrap { overflow-x: auto; }

/* ------------------------------------------------------------------
   Import
   ------------------------------------------------------------------ */
.drop {
  border: 2px dashed var(--border); border-radius: var(--radius);
  padding: 34px 18px; text-align: center; color: var(--text-2);
  background: var(--surface); cursor: pointer;
}
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop .icon { font-size: 40px; margin-bottom: 8px; }
.drop input { display: none; }

.imp-ex { display: grid; grid-template-columns: 1fr 36px; gap: 6px; align-items: center; padding: 10px 0; }
.imp-ex + .imp-ex { border-top: 1px solid var(--border); }
.imp-ex .input { min-height: 42px; padding: 6px 8px; font-size: 15px; }
.imp-ex .nums { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.imp-ex .nums .input { padding: 6px 4px; }
.imp-ex .note { grid-column: 1 / -1; font-size: 12px; color: var(--text-3); }
.imp-ex .del { width: 36px; height: 42px; border: 0; background: transparent; color: var(--text-3); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.imp-ex .del svg { width: 20px; height: 20px; fill: currentColor; }
.imp-hdr { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); font-weight: 700; padding: 0 0 2px; text-align: center; }

.progress-line { height: 4px; background: var(--surface-3); border-radius: 2px; overflow: hidden; margin-top: 12px; }
.progress-line i { display: block; height: 100%; background: var(--accent); width: 0; transition: width 0.3s ease; }

details.raw { margin-top: 14px; }
details.raw summary { cursor: pointer; color: var(--text-2); font-weight: 600; font-size: 14px; }
details.raw pre { white-space: pre-wrap; font-size: 12px; color: var(--text-3); background: var(--surface-2); padding: 10px; border-radius: 10px; max-height: 260px; overflow: auto; }

/* ------------------------------------------------------------------
   Misc
   ------------------------------------------------------------------ */
.spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid var(--surface-3); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.kbd { font-family: var(--mono); background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: 13px; }

@media (min-width: 700px) {
  .view { max-width: 680px; margin: 0 auto; width: 100%; }
  .tabbar { left: 50%; transform: translateX(-50%); width: 100%; max-width: 680px; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
  .fab { right: calc(50% - 340px + 18px); }
  .toast { bottom: calc(var(--tabbar-h) + 16px); }
}

/* ------------------------------------------------------------------
   Übungsfiguren (SVG-Strichfiguren)
   ------------------------------------------------------------------ */
.figure { width: 100%; height: auto; display: block; }
.figure .limb { fill: var(--text); stroke: var(--surface-2); stroke-width: 1.2; paint-order: stroke; stroke-linejoin: round; }
.figure .limb.back { fill: color-mix(in srgb, var(--text) 55%, var(--surface-3)); }
.figure .head { fill: var(--text); stroke: var(--surface-2); stroke-width: 1.2; paint-order: stroke; }
.figure .frame { fill: var(--surface-3); }
.figure .frame-line { fill: none; stroke: var(--surface-3); stroke-width: 3; stroke-linecap: round; }
.figure .ground { stroke: var(--border); stroke-width: 2; stroke-linecap: round; }
.figure .equip-line { fill: none; stroke: var(--text-3); stroke-width: 2.5; stroke-linecap: round; }
.figure .equip-move { fill: var(--accent); stroke: var(--accent); stroke-width: 4; stroke-linecap: round; }
.figure .equip-pad { fill: none; stroke: var(--accent); stroke-width: 6; stroke-linecap: round; }

.fig-thumb {
  width: 64px; height: 52px; flex: none; border-radius: 10px;
  background: var(--surface-2); padding: 3px; display: flex; align-items: center; justify-content: center;
}
.fig-thumb .figure { height: 100%; width: auto; max-width: 100%; }
.fig-hero {
  background: var(--surface-2); border-radius: var(--radius); padding: 10px 14px;
  max-width: 320px; margin: 0 auto 14px;
}
.tips { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.tips li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.4; }
.tips li::before {
  content: counter(tip); counter-increment: tip;
  flex: none; width: 24px; height: 24px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent);
  font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center;
}
.tips { counter-reset: tip; }
.info-btn {
  width: 32px; height: 32px; border-radius: 50%; border: 0; flex: none;
  background: var(--surface-2); color: var(--text-2); font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.lib-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; cursor: pointer; }
.lib-row + .lib-row { border-top: 1px solid var(--border); }

/* ------------------------------------------------------------------
   Trainingsmodus (eine Übung pro Seite)
   ------------------------------------------------------------------ */
.wk-progress { display: flex; gap: 4px; margin-top: 8px; }
.wk-progress i { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-3); }
.wk-progress i.done { background: var(--good); }
.wk-progress i.cur { background: var(--accent); }
.wk-step { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); }

.wk-ex { display: flex; gap: 14px; align-items: flex-start; }
.wk-ex .fig-thumb { width: 96px; height: 78px; cursor: pointer; }
.wk-ex .wk-name { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; }
.wk-ex .wk-muscles { color: var(--text-2); font-size: 13px; margin-top: 3px; }
.wk-ex .wk-target { font-family: var(--mono); font-size: 13px; color: var(--text-3); margin-top: 4px; }

.wk-last { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wk-last .lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); margin-bottom: 4px; }
.wk-last .val { font-family: var(--mono); font-weight: 700; font-size: 15px; line-height: 1.5; }
.wk-last .rec { color: var(--accent); font-size: 18px; }
.wk-last .msg { font-size: 12px; color: var(--text-2); margin-top: 4px; line-height: 1.35; }
.wk-last .warn { color: var(--warn); }

.set-card { padding: 12px 14px; }
.set-card + .set-card { margin-top: 8px; }
.set-card.done { border-color: color-mix(in srgb, var(--good) 55%, var(--border)); background: color-mix(in srgb, var(--good) 6%, var(--surface)); }
.set-card .set-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.set-card .set-title { font-weight: 700; font-size: 15px; }
.set-card .set-sum { font-family: var(--mono); color: var(--text-2); font-size: 14px; }
.set-card.done .set-sum { color: var(--good); font-weight: 700; }
.check-badge {
  width: 26px; height: 26px; border-radius: 50%; background: var(--good); color: #062b16;
  display: inline-flex; align-items: center; justify-content: center;
}
.check-badge svg { width: 18px; height: 18px; fill: currentColor; }

.steppers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stepper { display: flex; align-items: stretch; background: var(--surface-2); border-radius: 14px; overflow: hidden; }
.stepper button {
  width: 52px; border: 0; background: transparent; color: var(--text); font-size: 26px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; user-select: none; -webkit-user-select: none;
}
.stepper button:active { background: var(--surface-3); }
.stepper .val {
  flex: 1; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; font-size: 19px; cursor: text; line-height: 1;
}
.stepper .val small { font-size: 11px; font-weight: 600; color: var(--text-3); font-family: var(--font); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.05em; }
.stepper input { width: 100%; text-align: center; font-family: var(--mono); font-weight: 700; font-size: 19px; border: 0; background: transparent; color: var(--text); outline: none; }
.set-card.done .stepper { opacity: 0.6; }

.set-done-btn { margin-top: 10px; }
.wk-nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  padding: 10px 16px calc(var(--safe-bottom) + 10px);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; z-index: 10;
}
.wk-nav .btn { flex: 1; min-height: 54px; }
.view.wk-view { padding-bottom: calc(var(--safe-bottom) + 96px); }
@media (min-width: 700px) { .wk-nav { left: 50%; transform: translateX(-50%); width: 100%; max-width: 680px; } }

/* PR-Animation */
.pr-toast {
  position: fixed; top: calc(var(--safe-top) + 14px); left: 50%; transform: translateX(-50%);
  width: calc(100% - 32px); max-width: 440px; z-index: 60;
  background: linear-gradient(135deg, #2a1d0e, #3b2a10 60%, #2a1d0e);
  border: 1px solid rgba(255, 200, 87, 0.55);
  color: #fff; border-radius: 18px; padding: 14px 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,200,87,0.15) inset;
  animation: pr-in 0.45s cubic-bezier(.2,.9,.2,1.1);
  overflow: hidden;
}
.pr-toast::before {
  content: ""; position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 40%, rgba(255,220,120,0.22) 50%, transparent 60%);
  animation: pr-shine 1.6s ease 0.2s 1;
}
.pr-toast.out { animation: pr-out 0.35s ease forwards; }
.pr-toast .pr-head { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: 0.08em; font-size: 12px; color: #ffc857; text-transform: uppercase; }
.pr-toast .pr-name { font-size: 18px; font-weight: 800; margin-top: 4px; }
.pr-toast .pr-val { font-family: var(--mono); font-size: 22px; font-weight: 700; margin-top: 2px; }
.pr-toast .pr-sub { font-size: 13px; color: rgba(255,255,255,0.8); margin-top: 4px; }
.pr-toast .pr-delta { color: #7dffb0; font-weight: 700; }
@keyframes pr-in { from { opacity: 0; transform: translate(-50%, -24px) scale(0.96); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes pr-out { to { opacity: 0; transform: translate(-50%, -16px); } }
@keyframes pr-shine { from { transform: translateX(-60%); } to { transform: translateX(60%); } }

/* ------------------------------------------------------------------
   Muskelgruppen & Körperkarte
   ------------------------------------------------------------------ */
.bodymap { width: 100%; height: auto; max-height: 420px; display: block; margin: 0 auto; }
.bodymap .body-sil { fill: var(--surface-3); stroke: none; }
.bodymap .muscle { fill: color-mix(in srgb, var(--text-3) 32%, var(--surface-3)); stroke: var(--surface); stroke-width: 1.2; stroke-linejoin: round; cursor: pointer; transition: filter 0.15s ease; }
.bodymap .muscle.detail { fill: color-mix(in srgb, var(--text-3) 18%, var(--surface-3)); cursor: default; pointer-events: none; }
.bodymap .muscle.active { filter: drop-shadow(0 0 6px rgba(var(--accent-rgb), 0.25)); }
.bodymap .muscle.selected { stroke: var(--text); stroke-width: 2.5; }
.bodymap .muscle-lines { fill: none; stroke: var(--surface); stroke-width: 1.2; opacity: 0.8; pointer-events: none; }
.bodymap-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; }
.bodymap-wrap.compact .bodymap { max-height: 260px; }

.mbar { display: grid; grid-template-columns: 130px 1fr 52px; gap: 10px; align-items: center; padding: 8px 0; cursor: pointer; }
.mbar + .mbar { border-top: 1px solid var(--border); }
.mbar .name { font-weight: 600; font-size: 14px; }
.mbar .track { height: 12px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.mbar .track i { display: block; height: 100%; border-radius: 6px; background: var(--accent); min-width: 0; transition: width 0.3s ease; }
.mbar .n { font-family: var(--mono); font-weight: 700; text-align: right; font-size: 14px; }
.mbar.selected .name { color: var(--accent); }
.legend { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); margin-top: 8px; justify-content: center; }
.legend i { width: 64px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, hsl(120,85%,52%), hsl(60,85%,50%), hsl(0,85%,46%)); }

.period-seg button { font-size: 13px; }
.delta-box { display: flex; gap: 10px; align-items: baseline; }
.delta-box .big { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.delta-box .big.up { color: var(--good); }
.delta-box .big.down { color: var(--danger); }
.stats.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.stats.cols-3 .stat { padding: 10px 12px; }
.stats.cols-3 .stat .val { font-size: 20px; }
.stats.cols-3 .stat .lbl { font-size: 10px; }

/* ------------------------------------------------------------------
   Studio-Tools: RIR, Aufwärmen, Scheiben, Heute dran, Heatmap
   ------------------------------------------------------------------ */
.rir-row { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.rir-row .lbl { font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; margin-right: 4px; }
.chip {
  min-width: 40px; height: 32px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-2); font-weight: 700; font-size: 14px; cursor: pointer;
}
.chip.on { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.set-card.done .rir-row { opacity: 0.7; }

details.warmup { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 0 14px; margin-bottom: 8px; }
details.warmup summary { list-style: none; cursor: pointer; padding: 12px 0; display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 14px; }
details.warmup summary::-webkit-details-marker { display: none; }
details.warmup summary .faint { font-weight: 500; font-size: 12px; }
.warm-row { display: flex; align-items: center; gap: 10px; padding: 8px 0 10px; border-top: 1px solid var(--border); }
.warm-row.done .mono { color: var(--good); }
.warm-row .btn { min-width: 76px; }

.plates { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.plate {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding: 0 8px; border-radius: 50%;
  background: var(--surface-3); color: var(--text); font-family: var(--mono); font-weight: 700; font-size: 14px;
  border: 3px solid var(--border);
}
.plate.p25 { border-color: #e74c3c; } .plate.p20 { border-color: #3b82f6; } .plate.p15 { border-color: #f1c40f; }
.plate.p10 { border-color: #2ecc71; } .plate.p5 { border-color: #ecf0f1; } .plate.p2_5 { border-color: #111; }
.plate.p1_25 { min-width: 38px; height: 38px; font-size: 12px; } .plate.p0_5 { min-width: 34px; height: 34px; font-size: 11px; }

.hero {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--surface)), var(--surface) 70%);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
}
.hero .eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.hero h2 { font-size: 24px; margin-top: 2px; }
.hero .meta { color: var(--text-2); font-size: 14px; margin-top: 4px; }
.hero .btn { margin-top: 12px; }

.heatmap { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 3px; }
.heatmap i {
  display: block; aspect-ratio: 1; border-radius: 3px; background: var(--surface-2); cursor: pointer;
}
.heatmap i.l1 { background: color-mix(in srgb, var(--accent) 35%, var(--surface-2)); }
.heatmap i.l2 { background: color-mix(in srgb, var(--accent) 60%, var(--surface-2)); }
.heatmap i.l3 { background: var(--accent); }
.heatmap i.today { outline: 2px solid var(--text-3); outline-offset: -2px; }
.heatmap-wrap { overflow-x: auto; }
.heatmap-months { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-3); margin-top: 4px; }

.edit-set { display: grid; grid-template-columns: 34px 1fr 1fr 40px; gap: 6px; align-items: center; padding: 4px 0; }
.edit-set .input { min-height: 40px; padding: 6px; }
.pct-table td:first-child { color: var(--text-3); }

/* ==================================================================
   Premium-Pass: Typografie, Tiefe, Motion, Dashboard, fokussiertes Workout
   ================================================================== */

/* ---------- Typografie ---------- */
h1, h2, h3, .hero h2, .wk-name, .timer-display .big, .rest-bar .time, .stat .val,
.stepper .val, .stepper input, .set-sum, .delta-box .big, .pr-toast .pr-val, .pr-toast .pr-name,
.session-row .date .d, .ring .inner .big, .mbar .n, .wk-last .val, .rest-ring .time {
  font-family: var(--display);
  font-variant-numeric: tabular-nums;
}
h1 { letter-spacing: -0.03em; font-weight: 700; }
h2 { letter-spacing: -0.02em; }
.stat .val { letter-spacing: -0.03em; font-weight: 700; }
.stat .val small { font-family: var(--font); font-weight: 600; color: var(--text-3); font-size: 13px; letter-spacing: 0; }
.timer-display .big { letter-spacing: -0.05em; font-weight: 700; }
.stepper .val, .stepper input { letter-spacing: -0.02em; font-size: 21px; }
.set-sum { font-family: var(--display); letter-spacing: -0.01em; }
.wk-last .val { font-size: 16px; letter-spacing: -0.01em; }
.wk-last .rec { font-size: 20px; }
.delta-box .big { letter-spacing: -0.03em; }

/* ---------- Tiefe & Oberflächen ---------- */
.card {
  background: linear-gradient(160deg, var(--surface-2) 0%, var(--surface) 55%);
  box-shadow: inset 0 1px 0 var(--hi), var(--shadow);
}
.stat { background: linear-gradient(160deg, var(--surface-2) 0%, var(--surface) 60%); box-shadow: inset 0 1px 0 var(--hi), var(--shadow); }
.btn.primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), var(--glow);
}
.btn.good {
  background: linear-gradient(180deg, var(--good-2), var(--good));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 6px 18px rgba(61, 220, 132, 0.2);
}
.btn.ghost { box-shadow: inset 0 1px 0 var(--hi); }
.fab { background: linear-gradient(180deg, var(--accent-2), var(--accent)); box-shadow: inset 0 1px 0 rgba(255,255,255,0.22), var(--glow); }
.hero {
  background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 26%, var(--surface-2)) 0%, var(--surface) 62%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), var(--shadow);
}
.tabbar { box-shadow: 0 -1px 0 var(--hi) inset; }
.modal { box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35); }

/* ---------- Icons ---------- */
.ico { width: 22px; height: 22px; fill: currentColor; flex: none; }
.ico.sm { width: 18px; height: 18px; }
.ico.lg { width: 28px; height: 28px; }
.ico-box {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
}
.ico-box.good { background: var(--good-soft); color: var(--good); }
.ico-box.neutral { background: var(--surface-3); color: var(--text-2); }
.ico-box svg { width: 22px; height: 22px; fill: currentColor; }
.title-ico { display: inline-flex; align-items: center; gap: 8px; }
.title-ico svg { width: 18px; height: 18px; fill: var(--accent); }

/* ---------- Motion ---------- */
@keyframes view-slide { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes view-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes snap { 0% { transform: scale(1); } 40% { transform: scale(0.97); } 100% { transform: scale(1); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes light-up { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }
.view.enter-slide > * { animation: view-slide 240ms var(--ease) both; }
.view.enter-fade > * { animation: view-fade 180ms ease both; }
.view.enter-slide > .wk-nav, .view.enter-fade > .wk-nav, .view.enter-slide > .fab, .view.enter-fade > .fab { animation: none; }
::view-transition-old(root) { animation: 120ms ease both fade-out-vt; }
::view-transition-new(root) { animation: 220ms var(--ease) both view-fade; }
@keyframes fade-out-vt { to { opacity: 0; } }
.set-card.snap { animation: snap 300ms var(--ease); }
.check-draw { width: 22px; height: 22px; }
.check-draw path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 420ms var(--ease) 60ms forwards; }
.bodymap .muscle.active { animation: light-up 480ms var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); transform-origin: center; transform-box: fill-box; }
.pop { animation: pop-in 320ms var(--ease) both; }
.mbar .track i { transition: width 600ms var(--ease); }
.wk-progress i { transition: background 300ms ease; }
.ring .prog { transition: stroke-dashoffset 600ms var(--ease); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- Dashboard ---------- */
.dash-tiles { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.tile {
  background: linear-gradient(160deg, var(--surface-2), var(--surface) 60%);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 10px;
  box-shadow: inset 0 1px 0 var(--hi), var(--shadow);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; min-height: 118px; justify-content: center;
}
.tile .val { font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.tile .val small { font-size: 12px; color: var(--text-3); font-family: var(--font); font-weight: 600; letter-spacing: 0; }
.tile .lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); }
.tile .sub { font-size: 11px; color: var(--text-2); line-height: 1.2; }
.tile svg.ico { width: 22px; height: 22px; fill: var(--accent); }
.tile .ico-box { width: 34px; height: 34px; border-radius: 10px; }
.week-ring { position: relative; width: 58px; height: 58px; }
.week-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.week-ring circle { fill: none; stroke-width: 6; stroke-linecap: round; }
.week-ring .track { stroke: var(--surface-3); }
.week-ring .prog { stroke: var(--accent); transition: stroke-dashoffset 800ms var(--ease); }
.week-ring .inner { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: -0.02em; }
.hero h2 { font-size: 26px; letter-spacing: -0.03em; }
.hero .eyebrow { display: flex; align-items: center; gap: 6px; }
.hero .eyebrow svg { width: 14px; height: 14px; fill: var(--accent); }
.plan-card .plan-thumb {
  width: 34px; height: 64px; flex: none; border-radius: 8px; background: var(--surface-2); padding: 3px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.plan-card .plan-thumb .bodymap { height: 100%; width: auto; }
.plan-card .plan-thumb .bodymap .muscle { stroke-width: 3; }

.chip-delta {
  display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: var(--good-soft); color: var(--good); font-family: var(--display);
}
.chip-delta.down { background: var(--danger-soft); color: var(--danger); }
.chip-delta.flat { background: var(--surface-3); color: var(--text-2); }

/* ---------- Leere Zustände ---------- */
.empty .illu {
  width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 14px;
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent) 35%, var(--surface-2)), var(--surface-2) 70%);
  display: flex; align-items: center; justify-content: center; box-shadow: inset 0 1px 0 var(--hi);
}
.empty .illu svg { width: 44px; height: 44px; fill: var(--accent); }

/* ---------- Fokussierter Workout-Screen ---------- */
.set-row {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface); cursor: pointer;
  box-shadow: inset 0 1px 0 var(--hi);
}
.set-row + .set-row, .set-row + .set-card, .set-card + .set-row { margin-top: 8px; }
.set-row .no { width: 26px; font-family: var(--display); font-weight: 700; color: var(--text-3); font-size: 13px; }
.set-row .sum { font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.set-row .tag { margin-left: auto; font-size: 12px; color: var(--text-3); }
.set-row.done { border-color: color-mix(in srgb, var(--good) 45%, var(--border)); }
.set-row.done .sum { color: var(--good); }
.set-row.done .no { color: var(--good); }
.set-row.upcoming { opacity: 0.55; }
.set-row .mini-check { width: 22px; height: 22px; border-radius: 50%; background: var(--good); color: #062b16; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.set-row .mini-check svg { width: 14px; height: 14px; fill: currentColor; }
.set-card.current { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: inset 0 1px 0 var(--hi), 0 0 0 3px var(--accent-soft), var(--shadow); }
.set-card .set-title { font-family: var(--display); font-size: 16px; }

.rest-ring {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin-bottom: 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border)); border-radius: 16px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 16%, var(--surface-2)), var(--surface) 70%);
  box-shadow: inset 0 1px 0 var(--hi), var(--shadow);
}
.rest-ring .ringbox { position: relative; width: 66px; height: 66px; flex: none; }
.rest-ring .ringbox svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rest-ring .ringbox circle { fill: none; stroke-width: 6; stroke-linecap: round; }
.rest-ring .ringbox .track { stroke: var(--surface-3); }
.rest-ring .ringbox .prog { stroke: var(--accent); transition: stroke-dashoffset 250ms linear; }
.rest-ring .ringbox .inner { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.rest-ring .ringbox .inner svg { width: 20px; height: 20px; fill: var(--accent); transform: none; }
.rest-ring .time { font-size: 30px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.rest-ring .lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); margin-bottom: 2px; }
.rest-ring .next { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.rest-ring .btns { display: flex; flex-direction: column; gap: 6px; margin-left: auto; }
.rest-ring .btns .btn { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.workout-head .rest-mini { font-family: var(--display); color: var(--accent); font-weight: 700; font-size: 14px; }
.wk-ex .wk-name { font-size: 24px; letter-spacing: -0.03em; }

/* Segmented Control scrollbar bei vielen Optionen */
.seg.scroll { overflow-x: auto; scrollbar-width: none; }
.seg.scroll::-webkit-scrollbar { display: none; }
.seg.scroll button { flex: none; padding: 0 12px; white-space: nowrap; }

/* Chart-Text in fester Pixelgröße (Charts werden in Container-Breite gezeichnet) */
.chart text { font-size: 11px; }
.chart .tip text { font-size: 12px; }
@keyframes view-back { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.view.enter-back > * { animation: view-back 240ms var(--ease) both; }
.view.enter-back > .wk-nav, .view.enter-back > .fab { animation: none; }
.bodymap.still .muscle.active { animation: none; }

/* ==================================================================
   1.5: kompakter Workout-Kopf, Politur
   ================================================================== */
.wk-ex { align-items: center; }
.wk-ex .fig-thumb { width: 84px; height: 68px; }
.wk-actions { display: flex; flex-direction: column; gap: 6px; flex: none; }
.wk-actions .btn.icon { width: 40px; min-height: 40px; border-radius: 11px; color: var(--text-2); }
.wk-actions .btn.icon svg { width: 20px; height: 20px; }

/* Maschineneinstellungen: eine Zeile, Tipp → Eingabe */
.wk-setup { margin-top: 10px; }
.wk-setup-line {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 0 10px;
  border: 1px dashed var(--border); border-radius: 11px; background: transparent; color: var(--text-2);
  font-family: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer;
}
.wk-setup-line.empty { color: var(--text-3); font-weight: 500; }
.wk-setup-line:not(.empty) { border-style: solid; background: var(--surface); }
.wk-setup-ico { display: inline-flex; color: var(--text-3); flex: none; }
.wk-setup-ico svg { width: 16px; height: 16px; fill: currentColor; }

/* Zuletzt / Heute auf einer Zeile */
.wk-brief { padding: 12px 14px; }
.wk-brief .wk-last .val { font-size: 15px; line-height: 1.3; word-break: break-word; }
.wk-brief .wk-last .rec { font-size: 18px; }
.wk-brief .msg { font-size: 12px; color: var(--text-2); margin-top: 8px; line-height: 1.35; padding-top: 8px; border-top: 1px solid var(--border); }
.wk-brief .msg.warn { color: var(--warn); }

/* Pausenring: Folgetext bleibt einzeilig */
.rest-ring .grow { min-width: 0; }
.rest-ring .next { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* PR-Toast unter dem klebenden Workout-Kopf */
body:has(.view.wk-view) .pr-toast { top: calc(var(--safe-top) + 88px); }

/* Kleiner Icon-Button in Kopfzeilen */
.btn.sm.icon { width: 38px; min-height: 38px; padding: 0; }
.btn.sm.icon svg { width: 18px; height: 18px; }

/* ==================================================================
   1.6: Cloud, Erholung, Share, Plateau/Deload, Volumen-Ziele, Satztypen,
        Kraftstandards, Wochenrückblick, Meilensteine, eigene Übungen
   ================================================================== */
.hero .meta.reason { color: var(--text); font-size: 13px; margin-top: 6px; }
.recovery-maps { display: flex; gap: 4px; flex: none; }
.recovery-maps .bodymap { width: 32px; height: 66px; }
.card.recovery, .card.review { margin-bottom: 12px; }

.alert-card { border-color: color-mix(in srgb, var(--warn) 55%, var(--border)); }
.alert-card .title-ico svg { fill: var(--warn); }
.wk-brief.deload { border-color: color-mix(in srgb, var(--warn) 50%, var(--border)); }
.milestone-card { border-color: color-mix(in srgb, var(--good) 50%, var(--border)); display: flex; flex-direction: column; gap: 10px; }

/* Satztyp-Tag in der Satz-Karte */
.set-type {
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text-3);
  border-radius: 8px; padding: 3px 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; cursor: pointer; font-family: inherit;
}
.set-type.drop { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.set-type.amrap { color: var(--good); border-color: color-mix(in srgb, var(--good) 40%, var(--border)); }
.set-type.fail { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }

/* Volumen-Ziel: Band im Balken + Status-Tag */
.mbar .track { position: relative; }
.mbar .track .band { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--good) 22%, transparent); border-left: 1px solid color-mix(in srgb, var(--good) 60%, transparent); border-right: 1px solid color-mix(in srgb, var(--good) 60%, transparent); }
.mbar .track i { position: relative; }
.mtag { display: inline-block; margin-left: 4px; font-size: 11px; font-weight: 700; }
.mtag.in { color: var(--good); } .mtag.under { color: var(--text-3); } .mtag.over { color: var(--warn); }

/* Kraftstandard */
.std-level { font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-top: 2px; }
.std-track { height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; margin-top: 12px; }
.std-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--good)); border-radius: 5px; transition: width 600ms var(--ease); }
.std-scale { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: var(--text-3); font-family: var(--mono); }
.std-scale span.on { color: var(--good); font-weight: 700; }

/* Pausenring mit Vorschau */
.rest-ring .next-ex .next { white-space: normal; }

/* Notiz-Button markieren, wenn eine Notiz existiert */
.wk-actions .btn.icon.has-note { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }

/* Trainingstage & Muskel-Chips */
.day-row, .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.day-row .chip { min-width: 42px; }
.chips .chip { height: 34px; font-size: 13px; padding: 0 10px; }

/* Kopf mit Aktionsbutton rechts (Bibliothek) */
.page-head .btn.icon { flex: none; }

/* ==================================================================
   1.7: Essen – Tagebuch, Makros, Lebensmittel, Rezepte
   ================================================================== */
.macro-card { padding: 14px; }
.kcal-ring { position: relative; width: 108px; height: 108px; flex: none; }
.kcal-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.kcal-ring circle { fill: none; stroke-width: 8; stroke-linecap: round; }
.kcal-ring .track { stroke: var(--surface-3); }
.kcal-ring .prog { stroke: var(--accent); transition: stroke-dashoffset 800ms var(--ease); }
.kcal-ring .prog.over { stroke: var(--danger); }
.kcal-ring .inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.kcal-ring .big { font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.kcal-ring .sub { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.macro-bar { margin-bottom: 8px; }
.macro-bar .lbl { font-size: 12px; color: var(--text-2); font-weight: 600; }
.macro-bar .mono { font-size: 12px; color: var(--text-3); }
.macro-bar .track { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; margin-top: 3px; }
.macro-bar .track i { display: block; height: 100%; border-radius: 3px; transition: width 600ms var(--ease); }
.macro-bar .track i.p { background: var(--good); }
.macro-bar .track i.c { background: #4f8cff; }
.macro-bar .track i.f { background: var(--warn); }
.macro-live { font-size: 14px; color: var(--text-2); }
.macro-live b { color: var(--text); font-family: var(--display); font-size: 16px; }

.meal-card { margin-top: 10px; padding: 12px 14px; }
.meal-card .meal-title { font-family: var(--display); font-weight: 700; font-size: 16px; }
.food-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); cursor: pointer; }
.food-row:first-child, .row.between + .food-row { border-top: 0; }
.meal-card .food-row:first-of-type { border-top: 0; margin-top: 4px; }
.food-row .kcal { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.food-row .pill { flex: none; }
.food-empty { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--text-3); font: inherit; font-size: 14px; padding: 8px 0 2px; cursor: pointer; }
.results .subhead { margin: 14px 0 6px; }
.results .card { padding: 4px 14px; }
.results .card .food-row:first-child { border-top: 0; }
.star { width: 32px; height: 32px; border: 0; background: none; color: var(--text-3); display: inline-flex; align-items: center; justify-content: center; flex: none; cursor: pointer; }
.star svg { width: 20px; height: 20px; fill: currentColor; }
.star.on { color: var(--warn); }
.food-tile .mini-bars { display: flex; gap: 6px; margin-top: 8px; }
.food-tile .mini-bars .track { flex: 1; height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.food-tile .mini-bars i { display: block; height: 100%; border-radius: 3px; }
.food-tile .mini-bars i.k { background: var(--accent); }
.food-tile .mini-bars i.p { background: var(--good); }
.stepper input.input { border: 0; background: transparent; text-align: center; padding: 0; }
.tab { font-size: 10.5px; }

/* Barcode-Scanner */
.scanner { position: relative; width: 100%; aspect-ratio: 4 / 3; max-height: 52vh; background: #000; border-radius: 14px; overflow: hidden; margin-top: 12px; }
.scanner video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner .frame {
  position: absolute; left: 12%; right: 12%; top: 30%; bottom: 30%;
  border: 2px solid rgba(255, 255, 255, 0.85); border-radius: 12px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.35);
}
.scanner .frame::after { content: ""; position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: var(--accent); opacity: 0.9; box-shadow: 0 0 8px var(--accent); }

/* ==================================================================
   1.9: KI-Foto, Rezeptgenerator, Web-Rezepte, Server-Modus
   ================================================================== */
.btn.ai-btn {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 28%, var(--surface-2)), var(--surface) 70%);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border)); color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), var(--shadow);
}
.btn.ai-btn svg { fill: var(--accent); }
.btn.primary.ai-btn { color: var(--accent-text); background: linear-gradient(180deg, var(--accent-2), var(--accent)); }
.btn.primary.ai-btn svg { fill: currentColor; }
.pill.sm { font-size: 10px; padding: 2px 7px; vertical-align: middle; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.pill svg { width: 14px; height: 14px; fill: currentColor; }

.privacy { padding: 10px 12px; }
.photo-preview { width: 100%; aspect-ratio: 4 / 3; max-height: 46vh; border-radius: 14px; overflow: hidden; background: #000; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-preview.dim img { opacity: 0.55; }
.photo-preview.small { aspect-ratio: 3 / 1; max-height: 120px; }
.ai-item { padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.ai-item .field { gap: 2px; }
.ai-item .field label { font-size: 10px; }
.ai-item .field .input.num { width: 100%; min-width: 0; }
.ai-item .row .field { flex: 1; min-width: 0; }

.chip .x { margin-left: 4px; opacity: 0.6; }
details.options { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 14px 12px; }
details.options summary { cursor: pointer; padding: 12px 0; font-weight: 600; font-size: 14px; color: var(--text-2); list-style: none; }
details.options summary::-webkit-details-marker { display: none; }
details.options summary::after { content: '›'; float: right; transform: rotate(90deg); color: var(--text-3); }
details.options[open] summary::after { transform: rotate(-90deg); }

.recipe-card h2 { font-size: 22px; }
.ing-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ing-list li { display: flex; gap: 10px; align-items: baseline; }
.ing-list .mark { width: 16px; flex: none; color: var(--good); font-weight: 700; }
.needed { border-color: color-mix(in srgb, var(--warn) 50%, var(--border)); padding: 10px 12px; }
.needed .mark { color: var(--warn); }
.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; line-height: 1.45; }
.steps li::marker { color: var(--accent); font-weight: 700; }
.web-recipe { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); color: inherit; text-decoration: none; }
.web-recipe:active { background: var(--surface-3); }

/* ------------------------------------------------------------------
   Plan-Ansicht (1.10): Muskelfokus im Kopf, Chips statt Textzeilen, klebender Start-Button
   ------------------------------------------------------------------ */
.plan-head { align-items: flex-start; gap: 10px; }
.plan-maps { display: flex; gap: 2px; flex: none; cursor: pointer; padding: 2px 4px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.plan-maps .bodymap { width: 30px; height: 62px; }
.plan-maps .bodymap .muscle { stroke-width: 2.5; }
details.plan-note { margin: -4px 0 14px; color: var(--text-2); }
details.plan-note summary { list-style: none; cursor: pointer; display: flex; gap: 6px; align-items: baseline; font-size: 14px; }
details.plan-note summary .more { color: var(--accent); font-weight: 600; flex: none; }
details.plan-note summary::-webkit-details-marker { display: none; }
details.plan-note[open] summary { display: none; }
details.plan-note p { margin: 0; font-size: 14px; }
.plan-list { padding-top: 2px; padding-bottom: 2px; }
.plan-ex { cursor: pointer; }
.plan-ex .fig-thumb { width: 64px; height: 56px; }
.cta-bar { position: sticky; bottom: calc(var(--safe-bottom) + 6px); margin-top: 18px; padding-top: 8px; background: linear-gradient(to top, var(--bg) 70%, transparent); z-index: 5; }
.cta-bar .btn { min-height: 56px; font-size: 17px; box-shadow: 0 10px 30px rgba(var(--accent-rgb), 0.25); }

/* ------------------------------------------------------------------
   Training (1.10): Übungsleiste + Satztabelle
   ------------------------------------------------------------------ */
.wk-progress { display: flex; gap: 6px; margin: 8px -16px 0; padding: 0 16px 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.wk-progress::-webkit-scrollbar { display: none; }
.wk-progress i { display: none; }
.wk-strip-item {
  position: relative; flex: none; width: 52px; height: 44px; border-radius: 12px; padding: 0;
  background: var(--surface-2); border: 2px solid transparent; color: var(--text); cursor: pointer; opacity: 0.55;
  display: flex; align-items: center; justify-content: center; transition: opacity 0.2s ease, border-color 0.2s ease;
}
.wk-strip-item .fig-thumb { width: 100%; height: 100%; background: transparent; border: 0; padding: 4px; }
.wk-strip-item .idx { font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--text-2); }
.wk-strip-item.cur { opacity: 1; border-color: var(--accent); background: var(--accent-soft); }
.wk-strip-item.done { opacity: 0.9; }
.wk-strip-item .badge {
  position: absolute; right: -4px; top: -4px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px;
  background: var(--good); color: #062b16; font-size: 9px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.wk-strip-item .badge svg { width: 10px; height: 10px; fill: currentColor; }
.wk-strip-item .badge.part { background: var(--surface-3); color: var(--text-2); }
.wk-more.has-note { color: var(--accent); }

.set-table { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.st-row { display: grid; grid-template-columns: 40px 1fr 1fr 44px 44px; align-items: center; gap: 4px; min-height: 52px; padding: 4px 8px 4px 6px; border-top: 1px solid var(--border); }
.st-row.head { min-height: 30px; padding: 6px 8px 4px 6px; border-top: 0; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; color: var(--text-3); text-align: center; }
.st-row.head span:first-child { text-align: left; padding-left: 6px; }
.st-row.cur { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); box-shadow: inset 3px 0 0 var(--accent); }
.st-row.done { opacity: 0.82; }
.st-row.open { cursor: pointer; }
.st-no { background: transparent; border: 0; color: var(--text-3); font-family: var(--display); font-weight: 700; font-size: 14px; padding: 4px 0 4px 6px; text-align: left; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; }
.st-no small { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.st-no.drop { color: var(--accent); } .st-no.amrap { color: var(--good); } .st-no.fail { color: var(--danger); }
.st-row.cur .st-no { color: var(--accent); }
.st-row.done .st-no { color: var(--good); }
.st-val { text-align: center; font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; color: var(--good); }
.st-num { display: flex; align-items: center; justify-content: center; }
.st-in {
  width: 100%; min-width: 0; height: 40px; border: 0; border-radius: 10px; background: var(--surface-2); color: var(--text);
  font-family: var(--display); font-weight: 700; font-size: 17px; text-align: center; outline: none; padding: 0 4px;
}
.st-in:focus { box-shadow: 0 0 0 2px var(--accent); }
.st-in::placeholder { color: var(--text-3); font-weight: 600; }
.st-num.cur { gap: 2px; }
.st-num.cur .st-in { background: var(--surface); }
.st-pm { flex: none; width: 28px; height: 40px; border: 0; border-radius: 10px; background: var(--surface-2); color: var(--text-2); font-size: 18px; font-weight: 700; cursor: pointer; }
.st-pm:active { background: var(--surface-3); }
.st-rir { height: 32px; min-width: 36px; margin: 0 auto; border-radius: 9px; border: 1px solid var(--border); background: transparent; color: var(--text-3); font-weight: 700; font-size: 13px; cursor: pointer; }
.st-rir.on { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.st-check { width: 38px; height: 38px; margin: 0 auto; border-radius: 50%; border: 2px solid var(--border); background: transparent; color: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s ease, border-color 0.15s ease; }
.st-check svg { width: 20px; height: 20px; fill: currentColor; }
.st-row.cur .st-check { border-color: var(--good); background: var(--good-soft); color: var(--good); }
.st-check.on { background: var(--good); border-color: var(--good); color: #062b16; }
.st-row.snap { animation: snap 300ms var(--ease); }
.set-table + .add-set { margin-top: 8px; }
@media (max-width: 360px) { .st-row { grid-template-columns: 34px 1fr 1fr 38px 40px; } .st-pm { width: 24px; } }

/* ==================================================================
   Modern-Pass (1.11): flache Flächen statt Verläufe/Rahmen, ruhigere Kacheln, Startseite
   ================================================================== */
:root { --surface: #171a21; --surface-2: #21252e; --surface-3: #2c313d; --border: #262b36; --radius: 18px; }
:root[data-theme="light"] { --surface: #ffffff; --surface-2: #f1f2f6; --surface-3: #e4e7ee; --border: #e6e8ee; }

.card, .stat, .tile, .hero, .set-table, .bodymap-wrap, .plan-maps, .empty { border-color: transparent; }
.card, .stat, .tile { background: var(--surface); box-shadow: none; }
:root[data-theme="light"] .card, :root[data-theme="light"] .stat, :root[data-theme="light"] .tile, :root[data-theme="light"] .hero { box-shadow: 0 1px 2px rgba(20, 23, 31, 0.05), 0 6px 20px rgba(20, 23, 31, 0.05); }
.btn { border-radius: 16px; }
.btn.primary { background: var(--accent); box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.22); }
.btn.good { background: var(--good); box-shadow: none; }
.btn.ghost { box-shadow: none; border-color: var(--surface-3); }
.btn.sm { border-radius: 12px; }
.tabbar { border-top: 0; box-shadow: none; background: color-mix(in srgb, var(--bg) 82%, transparent); }
.tab { font-size: 10px; letter-spacing: 0.02em; }
.tab.active svg { filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.45)); }
.page-head { margin: 10px 0 16px; }
h1 { font-size: 32px; letter-spacing: -0.035em; }
.subhead { margin: 26px 0 10px; }
.subhead h2 { font-size: 19px; color: var(--text); font-weight: 700; letter-spacing: -0.02em; }
.pill { border-radius: 10px; }

/* Startseite */
.home-head { align-items: center; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none; border: 0; cursor: pointer;
  background: var(--surface-2); color: var(--text); font-family: var(--display); font-weight: 700; font-size: 17px;
  display: inline-flex; align-items: center; justify-content: center;
}
.avatar svg { width: 22px; height: 22px; fill: var(--text-2); }
.hero { background: var(--surface); box-shadow: none; padding: 18px; margin-bottom: 12px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; right: -60px; top: -80px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 28%, transparent), transparent); pointer-events: none; }
.hero > * { position: relative; }
.hero .eyebrow { color: var(--accent); }
.hero h2 { font-size: 28px; margin-top: 4px; }
.hero .meta.reason { color: var(--text-2); font-size: 13px; margin: 10px 0 0; }
.hero .btn { margin-top: 14px; min-height: 54px; font-size: 17px; }
.hero.live::before { background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 40%, transparent), transparent); }
.meta-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.meta-pills .mp { font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--surface-2); border-radius: 9px; padding: 4px 9px; }
.hero-bar { height: 6px; border-radius: 3px; background: var(--surface-2); margin-top: 12px; overflow: hidden; }
.hero-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width 600ms var(--ease); }
.link-btn { display: block; width: 100%; margin-top: 10px; background: none; border: 0; color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 0 0; }
.plan-thumb.hero { width: 74px; height: 70px; flex: none; display: flex; gap: 2px; background: var(--surface-2); border-radius: 14px; padding: 5px; }
.plan-thumb.hero .bodymap { height: 100%; width: auto; }
.plan-thumb.hero .bodymap .muscle { stroke-width: 2.5; }

.row-card { padding: 12px 14px; margin-bottom: 10px; }
.row-card .row { gap: 12px; align-items: center; }
.row-card b { font-size: 15px; }
.row-card .small { margin-top: 2px; }
.row-card .chev, .row-card > .row > div:last-child svg.chev { flex: none; }
.recovery-maps { padding: 2px 4px; border-radius: 12px; background: var(--surface-2); }
.recovery-maps .bodymap { width: 30px; height: 62px; }

.dash-tiles { gap: 8px; margin-bottom: 8px; }
.tile { background: var(--surface); border: 0; box-shadow: none; border-radius: 18px; min-height: 112px; }
.tile .lbl { color: var(--text-3); }

.plan-card { padding: 12px 12px 12px 12px; gap: 12px; }
.plan-card .plan-thumb { width: 54px; height: 62px; border-radius: 14px; background: var(--surface-2); padding: 4px 0; }
.plan-card .plan-more { width: 36px; min-height: 36px; border-color: transparent; color: var(--text-3); }
.plan-card .plan-play { width: 44px; min-height: 44px; border-radius: 14px; box-shadow: none; }
.plan-card .plan-play svg { width: 18px; height: 18px; }
.list { gap: 8px; }
.card + .card { margin-top: 8px; }
.subhead .btn.sm.ghost { border-color: transparent; background: var(--surface); color: var(--text-2); }
.plan-card .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-head .btn.icon.ghost { border-color: transparent; background: var(--surface); }

/* ---------- Startseite (1.12): Wochenleiste + Pläne, sonst nichts ---------- */
.week-strip { margin: 6px 0 4px; }
.ws-head { padding: 0 2px 8px; }
.ws-month { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.ws-kw { font-size: 12px; font-weight: 700; color: var(--text-3); letter-spacing: 0.06em; text-transform: uppercase; }
.week-strip .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; background: var(--surface); border-radius: 16px; padding: 8px 6px; }
.week-strip .day {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 4px; border: 0; border-radius: 12px;
  background: transparent; color: var(--text-2); cursor: default; font-family: var(--font);
}
.week-strip .day .wd { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); }
.week-strip .day .num { font-family: var(--display); font-weight: 700; font-size: 16px; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.week-strip .day .dot { width: 5px; height: 5px; border-radius: 50%; background: transparent; }
.week-strip .day.future { opacity: 0.5; }
.week-strip .day.today .num { background: var(--accent); color: var(--accent-text); }
.week-strip .day.today .wd { color: var(--accent); }
.week-strip .day.trained { cursor: pointer; color: var(--text); }
.week-strip .day.trained .dot { background: var(--good); }
.week-strip .day.trained:not(.today) .num { background: var(--good-soft); color: var(--good); }
.week-strip .day:disabled { opacity: 1; }
.week-strip .day.future:disabled { opacity: 0.5; }

.live-card { margin-top: 14px; padding: 12px 14px; }
.live-card .row { gap: 10px; align-items: center; }
.live-card .hero-bar { margin-top: 10px; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 0 4px var(--accent-soft); animation: live-pulse 1.6s ease-in-out infinite; }
@keyframes live-pulse { 0%, 100% { box-shadow: 0 0 0 3px var(--accent-soft); } 50% { box-shadow: 0 0 0 7px transparent; } }
.plan-flag { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin-bottom: 2px; }
.plan-card.next { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent); }
.plan-card .plan-play { background: var(--surface-2); color: var(--text); }
.plan-card .plan-play.primary { background: var(--accent); color: var(--accent-text); }
.plan-reason { margin: 10px 4px 0; }
.subhead .btn.sm.ghost.icon { width: 36px; min-height: 36px; }

/* ---------- Plan-Karten mit Bild (1.13) ---------- */
.plan-card.art {
  position: relative; overflow: hidden; min-height: 132px; padding: 16px 16px 14px; align-items: flex-end;
  background: var(--surface); isolation: isolate;
}
.plan-card.art::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--pc) 38%, transparent), transparent 55%),
    linear-gradient(110deg, var(--surface) 45%, color-mix(in srgb, var(--pc) 16%, var(--surface)) 100%);
}
.plan-card.art .art { position: absolute; right: 8px; top: -6%; bottom: -6%; width: 48%; z-index: 0; pointer-events: none; display: flex; justify-content: flex-end; }
.plan-card.art .art .bodymap { height: 100%; width: auto; max-height: none; filter: drop-shadow(0 0 14px color-mix(in srgb, var(--pc) 35%, transparent)); }
.plan-card.art .art .bodymap .body-sil { fill: color-mix(in srgb, var(--surface-3) 70%, var(--pc) 8%); }
.plan-card.art .art .bodymap .muscle { stroke: var(--surface); stroke-width: 1.6; fill: color-mix(in srgb, var(--text-3) 24%, var(--surface-3)); }
.plan-card.art .art .bodymap .muscle.detail { fill: color-mix(in srgb, var(--text-3) 14%, var(--surface-3)); }
.plan-card.art .art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, var(--surface) 0%, transparent 45%); }
.plan-card.art .plan-body { position: relative; z-index: 1; flex: 1; min-width: 0; }
.plan-card.art .plan-name { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; line-height: 1.15; }
.plan-card.art .meta { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.plan-card.art .plan-play { position: relative; z-index: 1; width: 46px; min-height: 46px; border-radius: 15px; background: var(--pc); color: #fff; box-shadow: 0 6px 18px color-mix(in srgb, var(--pc) 40%, transparent); }
.plan-card.art .plan-play svg { width: 18px; height: 18px; }

/* eigenes Foto: Bild füllt die Karte, links dunkler Verlauf für den Text */
.plan-card.art .art.photo { inset: 0; width: 100%; height: 100%; top: 0; bottom: 0; right: 0; background-size: cover; background-position: center; }
.plan-card.art .art.photo::after { background: linear-gradient(90deg, rgba(10, 12, 16, 0.86) 0%, rgba(10, 12, 16, 0.45) 60%, rgba(10, 12, 16, 0.2) 100%); }
.plan-card.art.has-photo::before { display: none; }
.plan-card.art.has-photo, .plan-card.art.has-photo .plan-name, .plan-card.art.has-photo h2 { color: #fff; }
.plan-card.art.has-photo .meta, .plan-card.art.has-photo .plan-reason { color: rgba(255, 255, 255, 0.78); }
.plan-card.art.has-photo .meta-pills .mp { background: rgba(255, 255, 255, 0.14); color: #fff; }

/* „Als Nächstes“: größer, mit Chips und Start-Button */
.hero-card { min-height: 200px; margin: 14px 0 4px; padding: 18px; }
.hero-card .plan-flag { color: var(--pc); }
.hero-card h2 { font-size: 28px; letter-spacing: -0.03em; margin-top: 2px; }
.hero-card .meta-pills { margin-top: 10px; }
.hero-card .plan-reason { color: var(--text-2); margin-top: 10px; }
.hero-card .btn.primary { margin-top: 14px; min-height: 54px; font-size: 17px; background: var(--pc); box-shadow: 0 8px 24px color-mix(in srgb, var(--pc) 35%, transparent); }
.hero-card .art { width: 50%; top: -4%; bottom: -4%; }
.hero-card .plan-body > .small.plan-reason, .hero-card .meta-pills { padding-right: 26%; }
.hero-card .art::after { background: linear-gradient(90deg, var(--surface) 0%, transparent 50%); }
.hero-card.has-photo .art::after { background: linear-gradient(90deg, rgba(10, 12, 16, 0.88) 0%, rgba(10, 12, 16, 0.5) 60%, rgba(10, 12, 16, 0.25) 100%); }
.hero-card.has-photo .btn.primary { background: var(--pc); }
:root[data-theme="light"] .plan-card.art.has-photo .btn.primary { color: #fff; }

/* Bildwahl im Plan-Editor */
.plan-image-row { display: flex; align-items: center; gap: 12px; }
.plan-image-row .preview { width: 72px; height: 48px; border-radius: 10px; background: var(--surface-2) center/cover no-repeat; flex: none; }

/* ---------- Fortschritt: Karte mit Blätterfunktion (1.14) ---------- */
.carousel { padding: 12px 14px 10px; }
.carousel-head { margin-bottom: 8px; }
.carousel-head b { font-size: 15px; }
.carousel-head .btn.icon.sm { width: 32px; min-height: 32px; font-size: 20px; border-radius: 10px; border-color: transparent; background: var(--surface-2); }
.carousel-body { min-height: 120px; }
.carousel-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.carousel-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--surface-3); }
.carousel-dots i.on { background: var(--accent); }
.pr-row .ico-box { width: 34px; height: 34px; border-radius: 10px; }

/* ---------- Plan-Karten (1.14): Illustration füllt die Karte ---------- */
.plan-card.art::before { display: none; }
.plan-card.art .art { inset: 0; width: 100%; height: 100%; top: 0; bottom: 0; right: 0; display: block; }
.plan-card.art .art .plan-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.plan-card.art .art::after { background: linear-gradient(90deg, rgba(12, 14, 19, 0.82) 0%, rgba(12, 14, 19, 0.35) 55%, rgba(12, 14, 19, 0.05) 100%); }
.hero-card .art { width: 100%; top: 0; bottom: 0; }
.hero-card .art::after { background: linear-gradient(90deg, rgba(12, 14, 19, 0.85) 0%, rgba(12, 14, 19, 0.4) 55%, rgba(12, 14, 19, 0.08) 100%), linear-gradient(0deg, rgba(12, 14, 19, 0.5) 0%, transparent 45%); }
.plan-card.art, .plan-card.art .plan-name, .plan-card.art h2 { color: #fff; }
.plan-card.art .meta, .plan-card.art .plan-reason, .hero-card .plan-reason { color: rgba(255, 255, 255, 0.78); }
.plan-card.art .meta-pills .mp { background: rgba(255, 255, 255, 0.14); color: #fff; }
.hero-card .plan-flag { color: #fff; opacity: 0.9; }
.hero-card .plan-body > .small.plan-reason, .hero-card .meta-pills { padding-right: 0; }
.plan-card.art .plan-play { background: rgba(255, 255, 255, 0.16); color: #fff; box-shadow: none; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hero-card .btn.primary { background: #fff; color: #14171e; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }
.hero-card .btn.primary svg { fill: #14171e; }
:root[data-theme="light"] .plan-card.art .btn.primary { color: #14171e; }

/* ---------- Gerätebilder (1.15) ---------- */
.equip-hero { background: var(--surface-2); border-radius: 14px; padding: 8px; }
.equip-art { width: 100%; height: auto; max-height: 220px; display: block; }
.equip-art .eq-frame { stroke: var(--text-3); stroke-linecap: round; }
.equip-art .eq-floor { stroke: var(--border); stroke-width: 2; stroke-linecap: round; }
.equip-art .eq-pad { fill: var(--accent); opacity: 0.9; }
.equip-art .eq-metal { fill: color-mix(in srgb, var(--text-2) 70%, var(--surface-3)); }
.equip-art .eq-cable { stroke: var(--text-2); stroke-width: 1.6; stroke-linecap: round; }
.equip-art .eq-pulley { fill: var(--surface-3); stroke: var(--text-2); stroke-width: 1.5; }
.equip-art .eq-stackbox { fill: var(--surface-3); }
.equip-art .eq-plate { fill: color-mix(in srgb, var(--text-3) 60%, var(--surface-3)); }
.equip-art .eq-label { fill: var(--text-3); font-size: 9px; font-family: var(--font); font-weight: 600; }
.equip-name { font-weight: 700; font-size: 16px; margin-top: 10px; }
.equip-line { display: grid; grid-template-columns: 96px 1fr; gap: 8px; margin-top: 8px; font-size: 14px; }
.equip-line .lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); padding-top: 2px; }
.fig-hero { cursor: pointer; }
.wk-progress { display: flex; gap: 4px; margin: 8px 0 0; padding: 0; overflow: visible; }
.wk-progress i { display: block; flex: 1; height: 4px; border-radius: 2px; background: var(--surface-3); }
.wk-progress i.done { background: var(--good); }
.wk-progress i.cur { background: var(--accent); }
.equip-art .eq-label { font-size: 8.5px; fill: var(--text-2); }
.equip-photo { width: 100%; height: auto; max-height: 260px; object-fit: cover; border-radius: 10px; display: block; }
.equip-photo-btns { display: flex; gap: 8px; margin-top: 8px; }
.equip-photo-btns .btn { flex: 1; }

/* ---------- Trainingsmodus-Politur (1.16): Bühne mit Animation, weicherer Hintergrund ---------- */
.view.wk-view { background: radial-gradient(120% 34% at 50% 0%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%), var(--bg); }
.workout-head { background: transparent; }
.wk-stage {
  position: relative; border-radius: 20px; overflow: hidden; cursor: pointer; margin-bottom: 12px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 16%, var(--surface)) 0%, var(--surface) 55%, color-mix(in srgb, var(--surface-2) 70%, var(--surface)) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.wk-stage::before { content: ''; position: absolute; left: -20%; top: -40%; width: 70%; height: 120%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent); pointer-events: none; }
.wk-stage-fig { position: relative; height: 176px; padding: 10px 16px; display: flex; align-items: center; justify-content: center; }
.wk-stage-fig .figure { height: 100%; width: auto; max-width: 100%; }
.wk-stage-fig .figure .frame, .wk-stage-fig .figure .frame-line { fill: color-mix(in srgb, var(--text-3) 55%, var(--surface-3)); stroke: color-mix(in srgb, var(--text-3) 55%, var(--surface-3)); }
.wk-stage-fig .figure .frame-line { fill: none; }
.wk-stage-fig .figure .limb, .wk-stage-fig .figure .head { stroke: color-mix(in srgb, var(--surface) 80%, var(--accent)); }
.wk-stage-hint { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--text-2); background: color-mix(in srgb, var(--surface) 70%, transparent); border-radius: 999px; padding: 5px 9px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.wk-stage-hint svg { width: 13px; height: 13px; fill: var(--accent); }
.wk-ex { align-items: flex-start; }
.wk-ex .wk-name { font-size: 26px; }
.wk-brief { background: linear-gradient(160deg, var(--surface-2) 0%, var(--surface) 70%); }
.set-table { background: color-mix(in srgb, var(--surface) 85%, var(--surface-2)); }
.st-row { border-top-color: color-mix(in srgb, var(--border) 60%, transparent); }
.wk-nav { background: color-mix(in srgb, var(--bg) 84%, transparent); border-top: 0; }
.equip-cap { font-size: 11px; color: var(--text-3); margin-top: 6px; text-align: center; }
.equip-cap a { color: var(--text-3); text-decoration: underline; }
.equip-photo { max-height: 300px; }
details.credits summary { font-size: 13px; color: var(--text-3); cursor: pointer; }
details.credits ul { padding-left: 16px; margin: 6px 0 0; }
details.credits li { margin-bottom: 4px; line-height: 1.35; }
details.credits a { color: var(--text-2); }

/* ---------- Essen (1.19): Fast Food, eingeklappte Listen ---------- */
.ai-center { display: flex; justify-content: center; margin-top: 8px; }
.ai-center .btn.ai-btn { min-width: 56%; }
.btn.ai-btn.fastfood svg { fill: var(--accent); }
.seg.tabs button { font-size: 13px; }
.tab-toggle { justify-content: space-between; padding: 0 14px 0 16px; margin-top: 4px; }
.tab-toggle svg.chev { transition: transform 0.2s ease; }
.tab-toggle.open svg.chev { transform: rotate(90deg); }
.tab-toggle + .card { margin-top: 8px; }

/* ---------- Hintergrund (1.20): tiefes Blaugrau mit weichem Lichtverlauf statt Schwarz ---------- */
:root { --bg: #151a26; --surface: #1d2432; --surface-2: #28303f; --surface-3: #333c4d; --border: #2b3344; --text-3: #7b849a; }
:root[data-theme="light"] { --bg: #f4f5f8; --surface: #ffffff; --surface-2: #f1f2f6; --surface-3: #e4e7ee; --border: #e6e8ee; --text-3: #8a91a3; }
:root:not([data-theme="light"]) body { background: radial-gradient(130% 55% at 50% -12%, #253048 0%, rgba(37, 48, 72, 0) 60%), linear-gradient(180deg, #182030 0%, #141926 45%, #12161f 100%); background-attachment: fixed; }
:root:not([data-theme="light"]) .view { background: transparent; }
:root:not([data-theme="light"]) .tabbar { background: color-mix(in srgb, #161c2a 84%, transparent); }
:root:not([data-theme="light"]) .view.wk-view { background: radial-gradient(120% 34% at 50% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%); }
.week-strip .days { background: var(--surface); }

/* ---------- Essen (1.21): Mahlzeiten einklappbar ---------- */
.meal-card { padding: 10px 12px 10px 10px; }
.meal-head { display: flex; align-items: center; gap: 8px; cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; }
.meal-chev { flex: none; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-3); }
.meal-chev svg { width: 18px; height: 18px; fill: currentColor; transition: transform 0.2s ease; }
.meal-card.open .meal-chev svg { transform: rotate(90deg); }
.meal-head .kcal { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; flex: none; }
.meal-head .min0 { min-width: 0; }
.meal-body { margin: 6px 0 0 32px; }
.meal-body .food-row:first-child { border-top: 0; }
.meal-body .food-row:last-child { padding-bottom: 4px; }

/* ---------- Fortschritt (1.21): Kennzahlen-Fenster, Verlauf einklappbar ---------- */
.stat-page { display: flex; flex-direction: column; justify-content: center; min-height: 120px; padding: 4px 2px 0; }
.stat-val { font-family: var(--display); font-size: 44px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-val small { font-family: var(--font); font-size: 15px; font-weight: 600; color: var(--text-3); letter-spacing: 0; margin-left: 8px; }
.stat-page .small { margin-top: 8px; }
.stat-days { display: flex; gap: 6px; margin-top: 12px; }
.stat-days span { flex: 1; text-align: center; font-size: 11px; font-weight: 700; padding: 6px 0; border-radius: 8px; background: var(--surface-2); color: var(--text-3); }
.stat-days span.on { background: var(--accent); color: #fff; }
.stat-days span.today:not(.on) { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--text); }
.tab-toggle.mt { margin-top: 14px; }
.history { margin-top: 8px; }
.stat-days.weeks span { font-size: 10px; padding: 5px 0; }

/* ---------- Mehr (1.22): Bereiche einklappbar ---------- */
.more-head { display: block; width: 100%; text-align: left; font: inherit; color: inherit; margin-top: 10px; padding: 12px 14px 12px 16px; -webkit-tap-highlight-color: transparent; }
.more-head b { font-family: var(--display); font-size: 16px; }
.more-head .min0 { min-width: 0; }
.more-chev { flex: none; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-3); margin-left: 8px; }
.more-chev svg { width: 18px; height: 18px; fill: currentColor; transition: transform 0.2s ease; }
.more-head.open .more-chev svg { transform: rotate(90deg); }
.more-head.open { border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; }
.more-body { margin: 6px 0 4px; }
.more-body > .card { border-top-left-radius: 6px; border-top-right-radius: 6px; }
.more-body > .card + .card { margin-top: 10px; }

/* ---------- Essen (1.23): lange Namen lesbar ---------- */
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; line-height: 1.3; }
.food-row .grow, .food-row .min0 { min-width: 0; }
.ing-row { padding: 10px 0; border-top: 1px solid var(--border); }
.ing-row:first-child { border-top: 0; }
.ing-top { display: flex; align-items: flex-start; gap: 8px; }
.ing-name { flex: 1; min-width: 0; font-weight: 600; padding-top: 6px; }
.ing-bottom { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.ing-bottom .grow { min-width: 0; }
.ing-bottom .kcal { font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }

/* ---------- Akzentfarbe (1.24) ---------- */
.swatches { display: flex; gap: 8px; flex: none; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 0; padding: 0; background: var(--sw); cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12); transition: transform 0.15s ease; }
.swatch.on { transform: scale(1.12); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--sw); }
.switch .swatches { max-width: 60%; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Fortschrittsfotos (1.24) ---------- */
.photo-strip { display: flex; gap: 4px; flex: none; margin-right: 4px; }
.photo-strip img { width: 30px; height: 40px; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photo-grid .ph { position: relative; aspect-ratio: 3 / 4; border: 0; padding: 0; border-radius: 12px; overflow: hidden; background: var(--surface-2); cursor: pointer; }
.photo-grid .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-grid .ph-tag { position: absolute; left: 6px; right: 6px; bottom: 6px; font-size: 11px; font-weight: 700; color: #fff; text-align: left; padding: 3px 7px; border-radius: 7px; background: rgba(0, 0, 0, 0.55); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-preview { width: 100%; max-height: 40vh; object-fit: contain; border-radius: 12px; background: #000; margin-top: 10px; }
.ph-full { width: 100%; max-height: 62vh; object-fit: contain; border-radius: 12px; background: #000; margin-top: 10px; }
.cmp { position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; background: #000; touch-action: none; user-select: none; -webkit-user-select: none; margin-top: 10px; }
.cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.cmp .bar { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 8px rgba(0, 0, 0, 0.6); pointer-events: none; }
.cmp .knob { position: absolute; top: 50%; left: 50%; width: 38px; height: 38px; border-radius: 50%; background: #fff; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); pointer-events: none; }
.cmp .knob svg { width: 14px; height: 14px; fill: #111; }
.cmp .knob svg:first-child { transform: rotate(180deg); margin-right: -4px; }
.cmp .tag { position: absolute; top: 10px; padding: 4px 8px; border-radius: 8px; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 12px; font-weight: 700; pointer-events: none; }
.cmp .tag.l { left: 10px; }
.cmp .tag.r { right: 10px; }
.switch.col { flex-direction: column; align-items: stretch; gap: 10px; }
.switch.col .swatches { max-width: none; justify-content: flex-start; gap: 12px; }
.switch.col .swatch { width: 32px; height: 32px; }

/* ---------- Dein Coach (1.25) ---------- */
.ico-box.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.pill.neutral { background: var(--surface-3); color: var(--text-2); }
.coach-headline { font-family: var(--display); font-size: 19px; font-weight: 700; line-height: 1.3; margin: 12px 0 0; letter-spacing: -0.01em; }
.coach-focus { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.coach-focus b { color: var(--accent); }
.coach-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--border); line-height: 1.4; }
.coach-item:first-child { border-top: 0; padding-top: 2px; }
.coach-item:last-child { padding-bottom: 2px; }
.coach-dot { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.coach-dot svg { width: 14px; height: 14px; fill: currentColor; }
.coach-dot.good { background: var(--good-soft); color: var(--good); }
.coach-dot.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.coach-num { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-family: var(--display); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; margin-top: 1px; }
.coach-card .coach-teaser { margin-top: 4px; }
.busy { opacity: 0.6; pointer-events: none; }

/* ---------- Cookidoo-Import & Abwandlungen (1.26) ---------- */
.src-card .title-ico svg { fill: var(--accent); }
.src-card .switch { padding: 12px 0 8px; margin-top: 8px; border-top: 1px solid var(--border); }
.src-card p.small { margin: 0; }
.var-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--border); line-height: 1.35; }
.var-row:first-child { border-top: 0; padding-top: 2px; }
.var-row .min0 { min-width: 0; overflow-wrap: anywhere; }
.pill.sm { font-size: 10px; padding: 1px 6px; vertical-align: 2px; }

/* ---------- Rezept-Import: Auswahlliste (1.28) ---------- */
.pick-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.pick-row:first-child { border-top: 0; }
.pick-row .min0 { min-width: 0; }

/* ---------- Übungsauswahl (1.29) ---------- */
.pick-filter { margin-top: 10px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
.pick-filter .chip { flex: none; }
.pick-list { max-height: 60vh; overflow-y: auto; margin-top: 4px; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.pick-row:first-child { border-top: 0; }
.pick-row .min0 { min-width: 0; }
.pick-row .fig-thumb { flex: none; width: 56px; height: 46px; }
.lib-row .min0 { min-width: 0; }
.ex-match .truncate { min-width: 0; }
.ex-match .small, .ex-match .small.faint { margin-left: auto; white-space: nowrap; font-size: 12px; }

/* ---------- Import: Zuordnung zur Übungsdatenbank (1.30) ---------- */
.match-summary { margin-top: 10px; padding: 12px 14px; }
.ex-match { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 6px 8px; border-radius: 9px; font-size: 13px; cursor: pointer; line-height: 1.3; }
.ex-match .dot { width: 18px; height: 18px; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.ex-match .dot svg { width: 14px; height: 14px; fill: currentColor; }
.ex-match.ok { background: var(--good-soft); color: var(--good); }
.ex-match.open { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.ex-match .grow { min-width: 0; }
