/* ============================================================
   Paul Littig Fitness – Design-System (angelehnt an iOS)
   ============================================================ */
:root {
  --accent: #30D158;
  --accent-ink: #30D158;
  --on-accent: #000;
  --accent-tint: color-mix(in srgb, var(--accent) 17%, transparent);
  --accent-tint-2: color-mix(in srgb, var(--accent) 30%, transparent);
  --r-card: 22px;
  --r-list: 20px;
  --r-sm: 12px;
  --pad: 16px;
  --tab-h: 62px;
  --tab-gap: max(10px, calc(var(--sab) - 6px));
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Inter", "Segoe UI", Roboto, sans-serif;
  --rounded: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  /* feste Farben für Icon-Kacheln (wie in den iOS-Einstellungen) */
  --ic-red: #FF3B30; --ic-orange: #FF9500; --ic-yellow: #FFCC00; --ic-green: #34C759; --ic-mint: #00C7BE; --ic-teal: #30B0C7;
  --ic-cyan: #32ADE6; --ic-blue: #007AFF; --ic-indigo: #5856D6; --ic-purple: #AF52DE; --ic-pink: #FF2D55; --ic-brown: #A2845E; --ic-gray: #8E8E93;
  --c-protein: #5E8BFF;
  --c-carbs: #FFB340;
  --c-fat: #FF6482;
  --c-kcal: var(--accent);
}
[data-theme="dark"] {
  --bg: #000000;
  --surface: #1C1C1E;
  --surface-2: rgba(118,118,128,.24);
  --surface-3: rgba(120,120,128,.36);
  --surface-solid: #2C2C2E;
  --sheet-bg: #1C1C1E;
  --sheet-surface: #2C2C2E;
  --fill-1: rgba(120,120,128,.36);
  --fill-2: rgba(120,120,128,.24);
  --fill-3: rgba(118,118,128,.18);
  --text: #FFFFFF;
  --muted: rgba(235,235,245,.6);
  --faint: rgba(235,235,245,.3);
  --line: rgba(84,84,88,.6);
  --sep: rgba(84,84,88,.6);
  --seg-thumb: #636366;
  --bar-bg: rgba(22,22,24,.78);
  --glass: rgba(37,37,40,.72);
  --glass-stroke: rgba(255,255,255,.09);
  --hud: rgba(44,44,46,.86);
  --shadow: 0 10px 40px rgba(0,0,0,.55);
  --red: #FF453A; --orange: #FF9F0A; --yellow: #FFD60A; --green: #30D158; --mint: #63E6E2; --teal: #40CBE0;
  --cyan: #64D2FF; --blue: #0A84FF; --indigo: #5E5CE6; --purple: #BF5AF2; --pink: #FF375F; --brown: #AC8E68; --gray: #8E8E93;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #F2F2F7;
  --surface: #FFFFFF;
  --surface-2: rgba(118,118,128,.12);
  --surface-3: rgba(120,120,128,.2);
  --surface-solid: #FFFFFF;
  --sheet-bg: #F2F2F7;
  --sheet-surface: #FFFFFF;
  --fill-1: rgba(120,120,128,.2);
  --fill-2: rgba(120,120,128,.14);
  --fill-3: rgba(118,118,128,.1);
  --text: #000000;
  --muted: rgba(60,60,67,.6);
  --faint: rgba(60,60,67,.3);
  --line: rgba(60,60,67,.18);
  --sep: rgba(60,60,67,.24);
  --seg-thumb: #FFFFFF;
  --bar-bg: rgba(249,249,251,.82);
  --glass: rgba(255,255,255,.76);
  --glass-stroke: rgba(0,0,0,.06);
  --hud: rgba(255,255,255,.9);
  --shadow: 0 10px 40px rgba(0,0,0,.14);
  --red: #FF3B30; --orange: #FF9500; --yellow: #FFCC00; --green: #34C759; --mint: #00C7BE; --teal: #30B0C7;
  --cyan: #32ADE6; --blue: #007AFF; --indigo: #5856D6; --purple: #AF52DE; --pink: #FF2D55; --brown: #A2845E; --gray: #8E8E93;
  color-scheme: light;
}
:root { --good: var(--green); --warn: var(--orange); --bad: var(--red); }

/* ---------- Basis ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 17px; line-height: 1.35; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; }
body { min-height: 100vh; min-height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p { margin: 0; }
a { color: var(--accent-ink); text-decoration: none; }
[hidden] { display: none !important; }
::selection { background: var(--accent-tint-2); }

#view { padding: 0 var(--pad) calc(var(--tab-h) + var(--tab-gap) + 30px); max-width: 640px; margin: 0 auto; }
#view.no-tabbar { padding-bottom: calc(var(--sab) + 28px); }
.screen { padding-top: calc(var(--sat) + 16px); }

/* ---------- Navigationsleiste + großer Titel ---------- */
.nav { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; gap: 8px;
  min-height: calc(var(--sat) + 52px); padding: var(--sat) var(--pad) 0; margin: 0 calc(-1 * var(--pad)); transition: background-color .2s, box-shadow .2s; }
.nav-l { flex: 1 1 auto; display: flex; align-items: center; min-width: 0; }
.nav-r { flex: 0 0 auto; margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-t { position: absolute; left: 50%; top: var(--sat); height: 52px; line-height: 52px; display: block; transform: translateX(-50%); font-size: 17px; font-weight: 600; opacity: 0; transition: opacity .15s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52%; pointer-events: none; }
.nav.solid, .nav.always { background: var(--bar-bg); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); box-shadow: 0 .5px 0 var(--sep); }
.nav.solid .nav-t, .nav.always .nav-t { opacity: 1; }
.nav-back { display: inline-flex; align-items: center; gap: 2px; background: none; border: 0; padding: 8px 8px 8px 0; margin-left: -6px; color: var(--accent-ink); font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.nav-back svg { width: 24px; height: 24px; stroke-width: 2.4; flex-shrink: 0; }
.large-title { padding: 0 0 14px; }
.large-title .eyebrow { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; margin-bottom: 1px; }
.large-title h1 { font-size: 34px; font-weight: 700; letter-spacing: .005em; line-height: 1.15; }
.large-title .sub { color: var(--muted); font-size: 15px; margin-top: 3px; }
.section-title { font-size: 13px; font-weight: 400; text-transform: uppercase; letter-spacing: .01em; color: var(--muted); margin: 26px 16px 7px; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 18px; }
.section-title.big { font-size: 22px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--text); margin: 26px 2px 10px; }
.section-title button { text-transform: none; letter-spacing: 0; }
.section-foot { font-size: 13px; color: var(--muted); margin: -4px 16px 14px; line-height: 1.4; }

/* ---------- Typo ---------- */
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 15px; }
.tiny { font-size: 12px; }
.bold { font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }
.rounded, .metric { font-family: var(--rounded); }
.metric { font-size: 30px; font-weight: 700; letter-spacing: -.01em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.metric small { font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 3px; letter-spacing: 0; font-family: var(--font); }
.ink { color: var(--accent-ink); }
.center { text-align: center; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mt { margin-top: 12px; } .mt2 { margin-top: 22px; } .mb { margin-bottom: 12px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.divider { height: .5px; background: var(--sep); margin: 12px 0; }

/* ---------- Karten & Kacheln ---------- */
.card { background: var(--surface); border-radius: var(--r-card); padding: 16px; margin-bottom: 12px; position: relative; }
button.card { display: block; width: 100%; text-align: left; border: 0; color: var(--text); }
button.card:active, button.tile:active, button.hero:active { transform: scale(.985); }
.card.tight { padding: 12px 14px; }
.card.flat { background: var(--fill-3); }
.card.accent, .card.tinted { background: color-mix(in srgb, var(--accent) 15%, var(--surface)); color: var(--text); }
.card.accent .muted, .card.tinted .muted { color: var(--muted); }
.card h3 { font-size: 17px; font-weight: 600; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.card-head h3 { font-size: 20px; font-weight: 700; }
.card-label { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--tile-c, var(--accent-ink)); }
.card-label svg { width: 18px; height: 18px; stroke-width: 2.3; }
.card-label .when { margin-left: auto; color: var(--muted); font-weight: 400; font-size: 13px; display: inline-flex; align-items: center; gap: 2px; }
.card-label .when svg { width: 13px; height: 13px; color: var(--faint); }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.tile { background: var(--surface); border-radius: var(--r-card); padding: 14px 14px 15px; min-height: 124px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; text-align: left; border: 0; color: var(--text); position: relative; overflow: hidden; transition: transform .12s; }
.tile .cap { font-size: 13px; color: var(--muted); margin-top: 3px; }
.tile .add { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-ink); font-weight: 600; font-size: 15px; }
.tile .add svg { width: 17px; height: 17px; stroke-width: 2.6; }
.tile.wide { grid-column: span 2; min-height: 0; }

.hero { position: relative; overflow: hidden; border-radius: 26px; padding: 18px 18px 16px; margin-bottom: 12px; color: var(--text); border: 0; width: 100%; text-align: left; display: block;
  background: linear-gradient(155deg, color-mix(in srgb, var(--accent) 30%, var(--surface)) 0%, color-mix(in srgb, var(--accent) 9%, var(--surface)) 46%, var(--surface) 80%); }
.hero .eyebrow { font-size: 13px; font-weight: 600; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .03em; display: flex; align-items: center; gap: 6px; }
.hero h2 { font-size: 28px; font-weight: 700; letter-spacing: .005em; margin: 6px 0 3px; position: relative; }
.hero .meta { color: var(--muted); font-size: 15px; position: relative; }
.hero .glyph { position: absolute; right: -18px; top: -14px; width: 150px; height: 150px; color: var(--accent); opacity: .13; stroke-width: 1.6; pointer-events: none; }
.hero .actions { display: flex; gap: 10px; margin-top: 16px; position: relative; }
.hero .stats { display: flex; gap: 22px; margin-top: 14px; position: relative; }
.hero .stats .metric { font-size: 24px; }
.hero .stats .l { font-size: 13px; color: var(--muted); margin-top: 2px; }
.hero.rest { background: linear-gradient(155deg, color-mix(in srgb, var(--indigo) 26%, var(--surface)) 0%, color-mix(in srgb, var(--indigo) 8%, var(--surface)) 46%, var(--surface) 80%); }
.hero.rest .eyebrow { color: var(--indigo); }
.hero.rest .glyph { color: var(--indigo); }
.hero.done { background: linear-gradient(155deg, color-mix(in srgb, var(--green) 26%, var(--surface)) 0%, color-mix(in srgb, var(--green) 8%, var(--surface)) 46%, var(--surface) 80%); }
.hero.done .eyebrow { color: var(--green); }
[data-theme="light"] .hero.done .eyebrow { color: #248A3D; }
.hero.done .glyph { color: var(--green); }

.live { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; text-align: left; color: var(--text); background: var(--surface); border-radius: 20px; padding: 12px 14px; margin-bottom: 12px; }
.live .pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 60%, transparent); animation: live 1.6s infinite; flex-shrink: 0; }
@keyframes live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 55%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- Icon-Kacheln (wie iOS-Einstellungen) ---------- */
.ic { width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--ic, var(--ic-gray)) 82%, #fff) 0%, var(--ic, var(--ic-gray)) 100%); }
.ic svg { width: 19px; height: 19px; stroke-width: 2.1; }
.ic.md { width: 40px; height: 40px; border-radius: 11px; } .ic.md svg { width: 23px; height: 23px; }
.ic.lg { width: 56px; height: 56px; border-radius: 15px; } .ic.lg svg { width: 30px; height: 30px; }
.ic.xl { width: 96px; height: 96px; border-radius: 26px; } .ic.xl svg { width: 52px; height: 52px; stroke-width: 1.9; }
.ic.soft { background: var(--fill-2); color: var(--accent-ink); }

/* ---------- Listen (inset grouped) ---------- */
.list { background: var(--surface); border-radius: var(--r-list); overflow: hidden; margin-bottom: 12px; }
.item { --sep-inset: 16px; display: flex; align-items: center; gap: 12px; padding: 11px 16px; min-height: 52px; width: 100%; background: none; border: 0; text-align: left; color: var(--text); position: relative; font-size: 17px; }
.item:has(> .ic, > .avatar) { --sep-inset: 58px; }
.item:has(> .ic.md, > .avatar.lg) { --sep-inset: 68px; }
.item:not(:last-child)::after { content: ""; position: absolute; left: var(--sep-inset); right: 0; bottom: 0; height: .5px; background: var(--sep); pointer-events: none; }
button.item:active, label.item:active { background: var(--fill-3); }
.item .t { font-weight: 400; }
.item .t:has(+ .s) { font-weight: 600; }
.item .s { font-size: 14px; color: var(--muted); margin-top: 1px; }
.item .detail { color: var(--muted); font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 58%; min-width: 0; flex-shrink: 1; }
.item > .grow { min-width: 25%; }
.item .chev { color: var(--faint); width: 15px; height: 15px; stroke-width: 2.6; margin-right: -4px; }
.item.danger, .item.danger .t { color: var(--red); }
.item.accent-text .t { color: var(--accent-ink); }
.avatar { width: 32px; height: 32px; border-radius: 9px; background: var(--fill-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 17px; overflow: hidden; color: var(--accent-ink); }
.avatar.lg { width: 44px; height: 44px; border-radius: 12px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar svg { width: 19px; height: 19px; }

/* Profil-/Initialen-Kreis */
.me { width: 36px; height: 36px; border-radius: 50%; border: 0; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; color: #fff; flex-shrink: 0;
  background: linear-gradient(180deg, #A5A9B3 0%, #82868F 100%); letter-spacing: .02em; }
.me.lg { width: 64px; height: 64px; font-size: 26px; }
.me.xl { width: 84px; height: 84px; font-size: 34px; }
.profile-head { display: flex; align-items: center; gap: 14px; padding: 14px 16px; width: 100%; border: 0; background: var(--surface); border-radius: var(--r-list); color: var(--text); text-align: left; margin-bottom: 12px; }
.profile-head .n { font-size: 22px; font-weight: 600; }
.profile-head .s { font-size: 14px; color: var(--muted); margin-top: 1px; }

/* ---------- Buttons ---------- */
.btn { appearance: none; border: 0; border-radius: 999px; padding: 0 20px; min-height: 50px; font-size: 17px; font-weight: 600; background: var(--fill-2); color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; transition: transform .1s ease, opacity .15s, filter .15s; white-space: nowrap; }
.btn:active { transform: scale(.97); filter: brightness(.9); }
.btn:disabled { opacity: .4; }
.btn svg { width: 19px; height: 19px; stroke-width: 2.4; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.tinted { background: var(--accent-tint); color: var(--accent-ink); }
.btn.neutral { color: var(--text); }
.btn.danger { background: color-mix(in srgb, var(--red) 15%, transparent); color: var(--red); }
.btn.ghost { background: transparent; color: var(--accent-ink); min-height: 40px; padding: 0 10px; }
.btn.block { width: 100%; }
.btn.sm { min-height: 34px; padding: 0 14px; font-size: 15px; }
.btn.sm svg { width: 16px; height: 16px; }
.btn.xl { min-height: 56px; font-size: 18px; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--fill-2); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform .1s; }
.icon-btn svg { width: 20px; height: 20px; stroke-width: 2.3; }
.icon-btn svg.sm { width: 17px; height: 17px; }
.icon-btn.plain { background: transparent; color: var(--muted); }
.icon-btn.accent { background: var(--accent); color: var(--on-accent); }
.icon-btn:active { transform: scale(.92); }
.icon-btn:disabled { opacity: .4; }
.play { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.play svg { width: 18px; height: 18px; fill: currentColor; stroke-width: 2; margin-left: 2px; }
.play.soft { background: var(--accent-tint); color: var(--accent-ink); }
.play:disabled { opacity: .35; }
svg.i { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
svg.i.sm { width: 18px; height: 18px; }
svg.i.lg { width: 28px; height: 28px; }
svg.i.fill { fill: currentColor; }

/* ---------- Chips / Segmente ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; background: var(--fill-2); font-size: 14px; font-weight: 600; border: 0; color: var(--text); white-space: nowrap; }
.chip svg { width: 15px; height: 15px; stroke-width: 2.4; }
.chip.on { background: var(--accent); color: var(--on-accent); }
.chip.accent { background: var(--accent-tint); color: var(--accent-ink); }
.chip.good { background: color-mix(in srgb, var(--green) 17%, transparent); color: var(--green); }
.chip.warn { background: color-mix(in srgb, var(--orange) 17%, transparent); color: var(--orange); }
.chip.bad { background: color-mix(in srgb, var(--red) 17%, transparent); color: var(--red); }
[data-theme="light"] .chip.good { color: #248A3D; }
[data-theme="light"] .chip.warn { color: #C93400; }
.chip.xs { padding: 2px 8px; font-size: 12px; }
.badge { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .02em; background: var(--accent-tint); color: var(--accent-ink); vertical-align: middle; }
.badge.gray { background: var(--fill-2); color: var(--muted); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.seg { display: flex; background: var(--fill-3); border-radius: 999px; padding: 3px; gap: 2px; }
[data-theme="dark"] .seg { background: rgba(118,118,128,.24); }
.seg button { flex: 1; border: 0; background: transparent; padding: 6px 8px; border-radius: 999px; font-weight: 500; font-size: 14px; color: var(--text); min-height: 32px; transition: background .15s; white-space: nowrap; }
.seg button.on { background: var(--seg-thumb); font-weight: 600; box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 1px 1px rgba(0,0,0,.04); }
.pick { display: grid; gap: 10px; }
.pick button { text-align: left; border: 0; background: var(--surface); padding: 14px 16px; border-radius: 16px; font-weight: 600; font-size: 17px; color: var(--text); box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .15s, background .15s; display: flex; align-items: center; gap: 12px; }
.pick button .muted { font-weight: 400; display: block; font-size: 14px; margin-top: 2px; }
.pick button.on { box-shadow: inset 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.pick button .tick { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--faint); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pick button.on .tick { background: var(--accent); box-shadow: none; color: var(--on-accent); }
.pick button .tick svg { width: 15px; height: 15px; stroke-width: 3; opacity: 0; }
.pick button.on .tick svg { opacity: 1; }
.scale { display: flex; gap: 8px; }
.scale button { flex: 1; height: 56px; border-radius: 16px; border: 0; background: var(--fill-2); font-size: 26px; transition: transform .1s, background .15s; }
.scale button.on { background: var(--accent-tint-2); box-shadow: inset 0 0 0 2px var(--accent); transform: scale(1.04); }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field > span { font-size: 13px; color: var(--muted); font-weight: 500; padding-left: 4px; }
.field > small { padding-left: 4px; }
.input, select.input, textarea.input { width: 100%; background: var(--fill-3); border: 0; border-radius: var(--r-sm); padding: 13px 14px; font-size: 17px; outline: none; min-height: 48px; color: var(--text); box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow .15s; -webkit-appearance: none; appearance: none; }
[data-theme="dark"] .input { background: rgba(118,118,128,.24); }
.input:focus { box-shadow: inset 0 0 0 1.5px var(--accent); }
.input::placeholder { color: var(--faint); }
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238E8E93' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 38px; }
textarea.input { min-height: 90px; resize: vertical; line-height: 1.4; }
input[type="date"].input, input[type="time"].input { min-height: 48px; }
.input-unit { position: relative; }
.input-unit .input { padding-right: 46px; }
.input-unit em { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); font-size: 15px; pointer-events: none; }
.big-input { font-family: var(--rounded); font-size: 40px !important; font-weight: 700; text-align: center; height: 84px; letter-spacing: -.01em; }
.fgroup { background: var(--surface); border-radius: 16px; overflow: hidden; }
.fgroup > input, .fgroup > .frow { display: block; width: 100%; border: 0; background: transparent; padding: 14px 16px; font-size: 17px; color: var(--text); outline: none; min-height: 52px; }
.fgroup > * + * { background-image: linear-gradient(var(--sep), var(--sep)); background-size: calc(100% - 16px) .5px; background-position: 16px 0; background-repeat: no-repeat; }
.fgroup > input::placeholder { color: var(--faint); }
.fgroup > input.invalid { animation: shake .3s; background-color: color-mix(in srgb, var(--red) 9%, transparent); }
.toggle { position: relative; width: 51px; height: 31px; flex-shrink: 0; display: inline-block; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle span { position: absolute; inset: 0; background: var(--fill-1); border-radius: 99px; transition: background .25s; }
[data-theme="light"] .toggle span { background: #E9E9EA; }
.toggle span::after { content: ""; position: absolute; width: 27px; height: 27px; left: 2px; top: 2px; border-radius: 50%; background: #fff; transition: transform .25s cubic-bezier(.3,.7,.4,1); box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 3px 1px rgba(0,0,0,.06); }
.toggle input:checked + span { background: var(--green); }
.toggle input:checked + span::after { transform: translateX(20px); }
.check-row { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); line-height: 1.45; text-align: left; cursor: pointer; }
.check-row input { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--faint); flex-shrink: 0; margin: 0; transition: background .15s; }
.check-row input:checked { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 16px no-repeat; box-shadow: none; }
.check-row input.invalid { box-shadow: inset 0 0 0 2px var(--red); animation: shake .3s; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--fill-2); color: var(--accent-ink); font-size: 24px; font-weight: 500; line-height: 1; }
.stepper button:active { transform: scale(.92); }
.stepper .val { min-width: 92px; text-align: center; font-family: var(--rounded); font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Tab-Leiste (schwebend) ---------- */
#tabbar { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: var(--tab-gap); width: min(600px, calc(100% - 24px)); height: var(--tab-h); display: flex; align-items: stretch; padding: 4px; border-radius: 999px;
  background: var(--glass); -webkit-backdrop-filter: blur(24px) saturate(190%); backdrop-filter: blur(24px) saturate(190%); box-shadow: 0 8px 30px rgba(0,0,0,.2), inset 0 0 0 .5px var(--glass-stroke); }
#tabbar button { flex: 1; min-width: 0; border: 0; background: none; border-radius: 999px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 10px; font-weight: 600; color: var(--text); position: relative; transition: background .2s, color .2s; letter-spacing: .01em; padding: 0; }
#tabbar button svg { width: 24px; height: 24px; stroke-width: 1.9; }
#tabbar button.on { color: var(--accent-ink); background: var(--fill-2); }
#tabbar button.on svg { stroke-width: 2.3; }
#tabbar .dot { position: absolute; top: 7px; left: calc(50% + 9px); width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--glass); }
#tabbar .soon { position: absolute; top: 5px; left: calc(50% + 6px); font-size: 8.5px; font-weight: 800; letter-spacing: .03em; padding: 1px 4px; border-radius: 6px; background: var(--fill-1); color: var(--muted); text-transform: uppercase; }

/* ---------- Ringe, Balken, Werte ---------- */
.ring-wrap { position: relative; width: 132px; height: 132px; flex-shrink: 0; }
.ring-wrap svg { transform: rotate(-90deg); }
.ring-wrap .ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring-label .big { font-family: var(--rounded); font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.macro { margin-bottom: 10px; }
.macro:last-child { margin-bottom: 0; }
.macro .row { font-size: 14px; margin-bottom: 5px; }
.bar { height: 8px; border-radius: 99px; background: var(--fill-2); overflow: hidden; position: relative; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--accent); transition: width .4s ease; }
.bar.over > i { background: var(--red) !important; }
.stat { background: var(--fill-3); border-radius: 16px; padding: 12px; min-width: 0; }
[data-theme="dark"] .stat { background: rgba(118,118,128,.16); }
.sheet .stat { background: var(--surface); }
.stat .v { font-family: var(--rounded); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .l { font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 1px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 15px; position: relative; }
.kv + .kv { box-shadow: 0 -.5px 0 var(--sep); }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.daytype { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; font-weight: 700; font-size: 13px; border: 0; }
.daytype.gym { background: var(--accent-tint); color: var(--accent-ink); }
.daytype.rest { background: var(--fill-2); color: var(--text); }

/* ---------- Woche ---------- */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.week .wd { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 7px; }
.week .d { width: 36px; height: 36px; margin: 0 auto; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--rounded); font-size: 15px; font-weight: 600; background: var(--fill-3); color: var(--muted); border: 0; padding: 0; }
.week .d svg { width: 17px; height: 17px; stroke-width: 3; }
.week .d.done { background: var(--accent); color: var(--on-accent); }
.week .d.plan { background: transparent; box-shadow: inset 0 0 0 2px var(--accent-tint-2); color: var(--text); }
.week .today .wd { color: var(--accent-ink); }
.week .today .d:not(.done) { box-shadow: inset 0 0 0 2px var(--accent); color: var(--text); background: transparent; }
.week .past .d:not(.done) { opacity: .55; }

/* ---------- Training ---------- */
.ex-card { background: var(--surface); border-radius: var(--r-card); margin-bottom: 12px; overflow: hidden; }
.ex-head { display: flex; align-items: flex-start; gap: 8px; padding: 14px 14px 10px 16px; }
.ex-head h3 { font-size: 19px; font-weight: 700; line-height: 1.25; }
.ex-head .meta { font-size: 14px; color: var(--muted); margin-top: 3px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.reco { margin: 0 14px 10px; padding: 10px 12px; border-radius: 14px; background: var(--accent-tint); font-size: 14px; display: flex; gap: 10px; align-items: center; }
.reco > svg { color: var(--accent-ink); width: 20px; height: 20px; stroke-width: 2.5; }
.reco b { font-weight: 700; }
.reco .big { font-family: var(--rounded); font-size: 17px; font-weight: 700; }
.reco .chip { background: var(--surface); }
.note-line { margin: 0 14px 8px; font-size: 14px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.sets { width: 100%; border-collapse: separate; border-spacing: 0 4px; }
.sets th { font-size: 11px; text-transform: uppercase; color: var(--muted); font-weight: 600; letter-spacing: .04em; padding: 0 3px 2px; text-align: center; }
.sets td { padding: 2px 3px; text-align: center; }
.sets tr.done td { background: color-mix(in srgb, var(--green) 13%, transparent); }
.sets tr.done td:first-child { border-radius: 12px 0 0 12px; }
.sets tr.done td:last-child { border-radius: 0 12px 12px 0; }
.sets .idx { width: 30px; font-family: var(--rounded); font-weight: 700; color: var(--muted); font-size: 15px; }
.sets .prev { font-size: 12.5px; color: var(--muted); width: 72px; font-variant-numeric: tabular-nums; cursor: pointer; line-height: 1.2; }
.sets input { width: 100%; max-width: 78px; text-align: center; background: var(--fill-3); border: 0; border-radius: 11px; padding: 9px 2px; font-family: var(--rounded); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; outline: none; color: var(--text); box-shadow: inset 0 0 0 1.5px transparent; min-height: 42px; }
[data-theme="dark"] .sets input { background: rgba(118,118,128,.24); }
.sets input:focus { box-shadow: inset 0 0 0 1.5px var(--accent); }
.sets tr.done input { background: transparent; }
.sets input.rir { max-width: 50px; }
.sets input::placeholder { color: var(--faint); font-weight: 600; }
.sets .lr { display: flex; gap: 3px; justify-content: center; }
.sets .lr input { max-width: 44px; padding: 9px 0; }
.check { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--fill-2); color: var(--faint); display: inline-flex; align-items: center; justify-content: center; transition: background .15s, transform .1s; }
.check svg { width: 20px; height: 20px; stroke-width: 3; }
.check.on { background: var(--green); color: #fff; }
.check:active { transform: scale(.9); }
.ex-foot { display: flex; gap: 8px; padding: 8px 14px 14px; flex-wrap: wrap; }
.pr-badge { display: inline-block; background: linear-gradient(135deg, #FFD60A, #FF9F0A); color: #2A1A00; font-size: 9.5px; font-weight: 800; padding: 2px 5px; border-radius: 6px; margin-left: 3px; vertical-align: middle; font-family: var(--font); }
.timer-bar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--sab) + 12px); z-index: 40; background: var(--hud); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); border-radius: 28px; padding: 9px 9px 9px 16px; display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow), inset 0 0 0 .5px var(--glass-stroke); max-width: 616px; margin: 0 auto; overflow: hidden; }
.timer-bar .t { font-family: var(--rounded); font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 72px; color: var(--accent-ink); line-height: 1; }
.timer-bar .small { font-size: 13px; color: var(--muted); }
.timer-bar .prog { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); transition: width .25s linear; }
.timer-bar .btn.sm { min-width: 52px; padding: 0 10px; color: var(--text); }
.timer-bar.done { background: var(--accent); color: var(--on-accent); animation: pulse 1s ease 3; }
.timer-bar.done .t, .timer-bar.done .small { color: inherit; }
.timer-bar.done .btn, .timer-bar.done .icon-btn { background: rgba(0,0,0,.14); color: inherit; }
.timer-bar.above-tabbar { bottom: calc(var(--tab-gap) + var(--tab-h) + 10px); }
.timer-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; }
.timer-main > svg { color: var(--accent-ink); }
.timer-bar.done .timer-main > svg { color: inherit; }
body.has-timer #view { padding-bottom: calc(var(--tab-h) + var(--tab-gap) + 110px); }
body.has-timer #view.no-tabbar { padding-bottom: calc(var(--sab) + 110px); }
@keyframes pulse { 0%,100% { transform: none; } 50% { transform: scale(1.025); } }
.session-top { position: sticky; top: 0; z-index: 20; margin: 0 calc(-1 * var(--pad)) 12px; padding: calc(var(--sat) + 8px) var(--pad) 10px; background: var(--bar-bg); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); box-shadow: 0 .5px 0 var(--sep); }
.session-top .title { font-size: 17px; font-weight: 700; }
.session-top .sub { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; margin-top: 1px; }
.session-top .sub .chip { padding: 2px 8px; font-size: 12px; max-width: 170px; min-width: 0; }
.session-top .sub .chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-top .clock { font-family: var(--rounded); font-weight: 700; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.drag-list .item { cursor: default; }
.day-tile .n { font-size: 20px; font-weight: 700; line-height: 1.2; }
.day-tile .ex { font-size: 13px; color: var(--muted); line-height: 1.35; }
.day-tile .foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.day-tile.next { background: linear-gradient(155deg, color-mix(in srgb, var(--accent) 24%, var(--surface)) 0%, var(--surface) 75%); }
.plate-row { display: flex; gap: 4px; align-items: center; justify-content: center; min-height: 96px; }
.plate-row .bar-end { width: 46px; height: 12px; border-radius: 3px; background: var(--fill-1); }
.plate-row .plate { border-radius: 4px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 10px; font-weight: 800; writing-mode: vertical-rl; transform: rotate(180deg); }

/* ---------- Ernährung ---------- */
.meal { background: var(--surface); border-radius: var(--r-card); margin-bottom: 12px; overflow: hidden; }
.meal-head { display: flex; align-items: center; padding: 12px 14px; gap: 10px; }
.meal-head h3 { font-size: 17px; font-weight: 600; }
.food-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; box-shadow: inset 0 .5px 0 var(--sep); width: 100%; background: none; border: 0; text-align: left; color: var(--text); }
.food-item .n { font-weight: 500; font-size: 16px; }
.food-item .m { font-size: 13px; color: var(--muted); }
.macro-pills { display: flex; gap: 6px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.macro-pills .p { color: var(--c-protein); } .macro-pills .c { color: var(--c-carbs); } .macro-pills .f { color: var(--c-fat); }
.add-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.add-grid button { border: 0; background: var(--surface); border-radius: 18px; padding: 16px 6px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; color: var(--text); }
.add-grid button svg { color: var(--accent-ink); }
.scanner { position: relative; border-radius: 22px; overflow: hidden; background: #000; aspect-ratio: 3/4; }
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner .frame { position: absolute; left: 12%; right: 12%; top: 38%; height: 24%; border: 3px solid var(--accent); border-radius: 16px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.water { display: flex; gap: 4px; flex-wrap: wrap; }
.water i { width: 22px; height: 30px; border-radius: 5px 5px 8px 8px; background: var(--fill-2); }
.water i.on { background: var(--cyan); }

/* ---------- Bald verfügbar ---------- */
.soon-hero { text-align: center; padding: 18px 8px 8px; }
.soon-hero .ic.xl { margin: 0 auto 18px; box-shadow: 0 14px 40px color-mix(in srgb, var(--ic) 35%, transparent); }
.soon-hero h2 { font-size: 30px; font-weight: 700; }
.soon-hero p { color: var(--muted); font-size: 17px; margin: 8px auto 0; max-width: 320px; line-height: 1.4; }
.soon-pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 6px 14px; border-radius: 999px; background: var(--fill-2); color: var(--text); font-size: 13px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.soon-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }

/* ---------- Charts ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid line { stroke: var(--sep); stroke-dasharray: 2 3; }
.chart text { fill: var(--muted); font-size: 10px; font-family: var(--font); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: 104px 1fr 40px; gap: 10px; align-items: center; font-size: 14px; margin-bottom: 8px; }
.hbar .bar { height: 8px; }
.heat-svg { width: 100%; max-width: 320px; margin: 0 auto 6px; display: block; }
.heat-svg .m { stroke: var(--surface); stroke-width: 1.5; }
.heat-svg .body { fill: var(--fill-2); }

/* ---------- Fotos ---------- */
.photo-slot { aspect-ratio: 3/4; border-radius: 16px; background: var(--fill-3); border: 2px dashed var(--fill-1); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; overflow: hidden; position: relative; }
.photo-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-slot.filled { border-style: solid; border-color: var(--accent); }

/* ---------- Sheets, Dialoge, Hinweise ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.42); z-index: 60; animation: fade .2s ease; }
.sheet { --surface: var(--sheet-surface); position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; background: var(--sheet-bg); border-radius: 28px 28px 0 0; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: 6px var(--pad) calc(var(--sab) + 22px); animation: up .34s cubic-bezier(.2,.9,.25,1); max-width: 640px; margin: 0 auto; -webkit-overflow-scrolling: touch; box-shadow: 0 -8px 40px rgba(0,0,0,.25); }
[data-theme="dark"] .sheet .input, [data-theme="dark"] .sheet .sets input { background: rgba(118,118,128,.24); }
.sheet .card .input { background: var(--fill-3); }
.sheet.full { top: calc(var(--sat) + 12px); max-height: none; }
.sheet .grab { width: 36px; height: 5px; border-radius: 9px; background: var(--fill-1); margin: 2px auto 8px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin: 0 calc(-1 * var(--pad)) 12px; gap: 10px; position: sticky; top: -6px; background: var(--sheet-bg); z-index: 3; padding: 10px var(--pad) 8px; }
.sheet-head h2 { font-size: 22px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sheet-head .icon-btn { width: 30px; height: 30px; background: var(--fill-2); color: var(--muted); }
.sheet-head .icon-btn svg { width: 16px; height: 16px; stroke-width: 2.8; }
.dialog-title { font-size: 22px; font-weight: 700; margin: 4px 0 6px; text-align: center; }
.dialog-text { text-align: center; color: var(--muted); font-size: 15px; margin-bottom: 6px; }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
#toast-root { position: fixed; left: 0; right: 0; top: calc(var(--sat) + 8px); z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { background: var(--hud); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); color: var(--text); padding: 11px 18px 11px 14px; border-radius: 999px; font-weight: 600; font-size: 15px; box-shadow: var(--shadow), inset 0 0 0 .5px var(--glass-stroke); animation: drop .35s cubic-bezier(.2,.9,.25,1.2); max-width: 520px; pointer-events: auto; display: flex; align-items: center; gap: 9px; line-height: 1.3; }
.toast svg { width: 20px; height: 20px; stroke-width: 2.6; flex-shrink: 0; }
.toast.good svg { color: var(--green); }
.toast.bad svg { color: var(--red); }
.toast.pr svg { color: var(--yellow); }
.toast.pr { font-size: 16px; }
@keyframes drop { from { transform: translateY(-24px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Marke & App-Icon ---------- */
.app-icon { width: 92px; height: 92px; border-radius: 22.5%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 18%, #2A2F37 0%, #0B0C0F 70%); box-shadow: 0 12px 34px rgba(0,0,0,.28), inset 0 0 0 .5px rgba(255,255,255,.12); }
.app-icon svg { width: 62%; height: auto; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { color: var(--accent); flex-shrink: 0; }
.brand-name { display: flex; flex-direction: column; line-height: 1; }
.brand-name b { font-size: 20px; font-weight: 800; letter-spacing: .1em; }
.brand-name span { font-size: 12px; font-weight: 700; letter-spacing: .45em; color: var(--muted); margin-top: 6px; }
.brand-mini { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--muted); }
.app-foot { text-align: center; color: var(--muted); font-size: 12px; margin: 28px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.app-foot .app-icon { width: 44px; height: 44px; box-shadow: none; }

/* ---------- Anmeldung ---------- */
.auth { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: calc(var(--sat) + 28px) 4px calc(var(--sab) + 28px); max-width: 420px; margin: 0 auto; }
.auth .head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; margin-bottom: 14px; }
.auth .head .app-icon { margin-bottom: 12px; }
.auth h1 { font-size: 30px; font-weight: 700; letter-spacing: .005em; }
.auth .lead { color: var(--muted); font-size: 16px; line-height: 1.4; max-width: 330px; }
.auth .links { display: flex; justify-content: center; gap: 18px; font-size: 13px; margin-top: 4px; }
.auth .links a { color: var(--muted); }
.auth .alt { text-align: center; font-size: 15px; color: var(--muted); }
.auth .alt button { background: none; border: 0; color: var(--accent-ink); font-weight: 600; padding: 4px; }

/* ---------- Hilfe & Validierung ---------- */
.help-btn { width: 30px; height: 30px; border-radius: 50%; font-weight: 700; font-size: 15px; background: var(--fill-2); color: var(--accent-ink); }
.tips { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 16px; }
.input.invalid, .input-unit .input.invalid { box-shadow: inset 0 0 0 1.5px var(--red); animation: shake .3s; }
.photo-slot.invalid { border-color: var(--red); animation: shake .3s; }
@keyframes shake { 0%,100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.step-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.target-chip { display: inline-flex; gap: 6px; align-items: center; margin: 0 14px 10px; padding: 5px 10px; border-radius: 99px; background: var(--fill-2); font-size: 12px; font-weight: 700; }
.setup-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 14px 10px 16px; cursor: pointer; }
.setup-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 10px; background: var(--fill-3); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
[data-theme="dark"] .setup-chip { background: rgba(118,118,128,.2); }
.setup-chip em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 12px; }
.setup-chip.note { font-weight: 500; max-width: 100%; }
.setup-chip.add { color: var(--accent-ink); font-weight: 600; background: transparent; box-shadow: inset 0 0 0 1.5px var(--fill-1); }
.setup-chip.edit { color: var(--muted); padding: 5px 7px; }
.setup-chip svg { width: 15px; height: 15px; }

/* ---------- Sonstiges ---------- */
.empty { text-align: center; padding: 36px 16px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 15px; }
.empty > svg { width: 44px; height: 44px; opacity: .5; stroke-width: 1.6; }
.empty .ic { margin-bottom: 4px; }
.empty b { color: var(--text); font-size: 20px; font-weight: 700; }
.spinner { width: 22px; height: 22px; border: 2.5px solid var(--fill-1); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 0; color: var(--muted); text-align: center; font-size: 15px; }
.loading-block.full { min-height: 70dvh; justify-content: center; }
.banner { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 18px; background: color-mix(in srgb, var(--orange) 14%, var(--surface)); font-size: 15px; margin-bottom: 12px; color: var(--text); border: 0; width: 100%; text-align: left; }
.banner > svg { color: var(--orange); }
.banner.bad { background: color-mix(in srgb, var(--red) 14%, var(--surface)); }
.banner.bad > svg { color: var(--red); }
.banner.good { background: color-mix(in srgb, var(--green) 14%, var(--surface)); }
.banner.info { background: color-mix(in srgb, var(--accent) 13%, var(--surface)); }
.banner.info > svg { color: var(--accent-ink); }
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px 6px; padding: 16px 10px; }
.swatch { border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; font-weight: 500; color: var(--muted); }
.swatch i { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; position: relative; transition: transform .12s; }
.swatch i svg { width: 20px; height: 20px; stroke-width: 3.2; opacity: 0; }
.swatch.on i { box-shadow: 0 0 0 2.5px var(--surface), 0 0 0 5px currentColor; }
.swatch.on i svg { opacity: 1; }
.swatch.on { color: var(--text); font-weight: 600; }
.swatch .rec { position: absolute; top: -3px; right: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); display: flex; align-items: center; justify-content: center; }
.swatch .rec::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 16px 12px 14px; }
.mode { border: 0; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--text); }
.mode .phone { width: 64px; height: 112px; border-radius: 14px; padding: 9px 7px; display: flex; flex-direction: column; gap: 5px; box-shadow: inset 0 0 0 .5px rgba(128,128,128,.4); overflow: hidden; }
.mode .phone i { display: block; height: 9px; border-radius: 3px; }
.mode .phone i.a { height: 22px; border-radius: 6px; }
.mode .phone.dark { background: #000; } .mode .phone.dark i { background: #2C2C2E; }
.mode .phone.light { background: #F2F2F7; } .mode .phone.light i { background: #fff; }
.mode .phone.sys { background: linear-gradient(105deg, #F2F2F7 50%, #000 50%); }
.mode .phone.sys i { background: linear-gradient(105deg, #fff 50%, #2C2C2E 50%); }
.mode .phone i.a { background: var(--accent) !important; }
.mode .radio { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--faint); display: flex; align-items: center; justify-content: center; }
.mode.on .radio { background: var(--accent); box-shadow: none; color: var(--on-accent); }
.mode .radio svg { width: 14px; height: 14px; stroke-width: 3.2; opacity: 0; }
.mode.on .radio svg { opacity: 1; }
.chat { display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: 82%; padding: 9px 14px; border-radius: 20px; font-size: 16px; line-height: 1.38; white-space: pre-wrap; word-wrap: break-word; }
.msg.user { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; }
.msg.assistant { align-self: flex-start; background: var(--surface); border-bottom-left-radius: 6px; }
.chat-input { position: fixed; left: 50%; transform: translateX(-50%); width: min(600px, calc(100% - 24px)); bottom: calc(var(--tab-gap) + var(--tab-h) + 10px); display: flex; gap: 8px; align-items: flex-end; z-index: 25; padding: 5px 5px 5px 16px; border-radius: 26px;
  background: var(--glass); -webkit-backdrop-filter: blur(24px) saturate(190%); backdrop-filter: blur(24px) saturate(190%); box-shadow: 0 8px 30px rgba(0,0,0,.18), inset 0 0 0 .5px var(--glass-stroke); }
.chat-input textarea { flex: 1; min-height: 40px; max-height: 120px; padding: 9px 0; background: transparent !important; border: 0; box-shadow: none !important; resize: none; font-size: 17px; outline: none; color: var(--text); }
.chat-input .icon-btn { width: 40px; height: 40px; }
.suggest { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.suggest button { border: 0; background: var(--surface); color: var(--text); border-radius: 18px; padding: 10px 14px; font-size: 15px; text-align: left; }
.steps-dots { display: flex; gap: 6px; justify-content: center; margin: 4px 0 18px; }
.steps-dots i { width: 7px; height: 7px; border-radius: 9px; background: var(--fill-1); transition: .25s; }
.steps-dots i.on { width: 22px; background: var(--accent); }
.progress-line { height: 4px; border-radius: 4px; background: var(--fill-2); overflow: hidden; }
.progress-line i { display: block; height: 100%; background: var(--accent); border-radius: 4px; transition: width .35s ease; }
.big-q { font-size: 30px; font-weight: 700; letter-spacing: .005em; margin-bottom: 6px; line-height: 1.15; }
.lead { color: var(--muted); font-size: 16px; line-height: 1.4; }
.lock-screen { min-height: 80dvh; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.logo { width: 72px; height: 72px; border-radius: 20px; background: var(--fill-2); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.logo svg { width: 38px; height: 38px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.compare img { border-radius: 14px; aspect-ratio: 3/4; object-fit: cover; width: 100%; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details.card > summary { font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
details.card > summary::after { content: ""; width: 9px; height: 9px; border-right: 2.2px solid var(--faint); border-bottom: 2.2px solid var(--faint); transform: rotate(45deg); margin: -4px 4px 0 10px; transition: transform .2s; }
details.card[open] > summary::after { transform: rotate(225deg); margin-top: 4px; }
.code { font-family: var(--mono); font-size: 15px; letter-spacing: .06em; background: var(--fill-3); padding: 3px 8px; border-radius: 8px; }
.copy-box { display: flex; align-items: center; gap: 10px; background: var(--fill-3); border-radius: 14px; padding: 10px 10px 10px 14px; font-family: var(--mono); font-size: 13px; word-break: break-all; }
.legal { padding: calc(var(--sat) + 8px) 0 40px; }

@media (min-width: 700px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
