/* Nährwert – Glas-Oberfläche */
:root {
  --bg: #eef2ee; --text: #101512; --muted: #5f6b64; --line: rgba(0,0,0,.08);
  --glass: rgba(255,255,255,.55); --glass-strong: rgba(255,255,255,.72); --glass-edge: rgba(255,255,255,.75);
  --glass-shadow: 0 10px 30px rgba(20,40,30,.10), 0 1px 2px rgba(0,0,0,.05);
  --accent: #178a4f; --accent-soft: rgba(23,138,79,.14);
  --p: #2f7fe0; --c: #e0a52f; --f: #e0642f; --danger: #d63b3b;
  --sat: env(safe-area-inset-top); --sab: env(safe-area-inset-bottom);
  --radius: 22px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1210; --text: #eef2ee; --muted: #98a59e; --line: rgba(255,255,255,.09);
    --glass: rgba(30,38,34,.55); --glass-strong: rgba(30,38,34,.78); --glass-edge: rgba(255,255,255,.14);
    --glass-shadow: 0 10px 30px rgba(0,0,0,.45), 0 1px 2px rgba(0,0,0,.4);
    --accent: #3ccf85; --accent-soft: rgba(60,207,133,.16);
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.4 -apple-system, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif; overscroll-behavior: none; -webkit-font-smoothing: antialiased; }
body { padding-bottom: calc(120px + var(--sab)); min-height: 100vh; min-height: 100dvh; }
.hidden { display: none !important; }

/* Hintergrund mit weichen Farbflecken (gibt dem Glas etwas zum Brechen) */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.b1 { width: 60vw; height: 60vw; left: -15vw; top: -10vh; background: #9be7bd; }
.b2 { width: 55vw; height: 55vw; right: -20vw; top: 30vh; background: #ffd48a; }
.b3 { width: 50vw; height: 50vw; left: 10vw; bottom: -15vh; background: #a9c8ff; }
@media (prefers-color-scheme: dark) { .blob { opacity: .28; } }

/* Glas */
.glass, .glass-bar {
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--glass-edge), inset 0 0 0 1px rgba(255,255,255,.18), var(--glass-shadow);
}
.glass { border-radius: var(--radius); }
.card { padding: 16px; margin-bottom: 14px; }
.card h3 { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

/* Kopfzeile */
header#top { position: sticky; top: calc(8px + var(--sat)); z-index: 5; margin: calc(8px + var(--sat)) 12px 0; padding: 6px 6px; display: flex; align-items: center; justify-content: space-between; border-radius: 999px; }
#dayLabel { position: relative; font-weight: 600; font-size: 17px; }
#dayLabel input { position: absolute; inset: 0; opacity: 0; width: 100%; }
main { padding: 14px 12px 0; max-width: 640px; margin: 0 auto; }
#app > main:first-child, #view-recipes, #view-stats, #view-settings { padding-top: calc(14px + var(--sat)); }
#view-diary { padding-top: 0; }
.view { display: none; } .view.active { display: block; }

/* Symbole */
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.ico { width: 18px; height: 18px; stroke-width: 2; margin-right: 6px; vertical-align: -4px; }

/* Buttons */
button, .btn { font: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; border: 0; border-radius: 14px; padding: 12px 16px; font-weight: 600; text-decoration: none; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 4px 12px rgba(23,138,79,.25); transition: transform .08s; }
.btn:active { transform: scale(.97); }
.btn.wide { width: 100%; margin-top: 10px; }
.btn.small { padding: 8px 14px; font-size: 14px; border-radius: 12px; }
.btn.ghost { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(23,138,79,.18); }
.btn.danger { background: rgba(214,59,59,.12); color: var(--danger); box-shadow: inset 0 0 0 1px rgba(214,59,59,.2); }
.link { background: none; border: 0; color: var(--accent); font-weight: 600; padding: 10px; width: 100%; margin-top: 6px; cursor: pointer; }
.icon { background: none; border: 0; color: var(--accent); padding: 8px; cursor: pointer; display: inline-flex; border-radius: 50%; }
.icon:active { background: var(--accent-soft); }
.row { display: flex; gap: 8px; margin-top: 10px; } .row > * { flex: 1; min-width: 0; }
.row .btn { padding: 10px 6px; font-size: 14px; white-space: nowrap; }

/* Formulare */
label { display: block; font-size: 13px; color: var(--muted); margin-top: 10px; }
input, select { width: 100%; font: inherit; font-size: 16px; padding: 11px 12px; border: 0; border-radius: 12px; background: rgba(127,127,127,.12); color: var(--text); margin-top: 4px; box-shadow: inset 0 0 0 1px var(--line); outline: none; }
input:focus, select:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.search-wrap { position: relative; }
.search-wrap .ico { position: absolute; left: 12px; top: 13px; color: var(--muted); margin: 0; }
.search-wrap input { margin: 0; padding-left: 38px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.grid4 label { margin-top: 6px; }
.hint { font-size: 13px; color: var(--muted); margin: 8px 0; }
.hint.center, .center { text-align: center; }
.err { color: var(--danger); font-size: 13px; min-height: 18px; margin: 6px 0 0; }

/* Anmeldung */
#auth { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: calc(24px + var(--sat)) 16px calc(24px + var(--sab)); }
.auth-card { width: 100%; max-width: 380px; padding: 28px 22px; text-align: center; }
.auth-card h1 { font-size: 26px; margin: 10px 0 2px; letter-spacing: -.02em; }
.auth-card form, .auth-card label { text-align: left; }
.auth-logo { width: 64px; height: 64px; margin: 0 auto; border-radius: 20px; background: linear-gradient(145deg, #3ccf85, #178a4f); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 8px 20px rgba(23,138,79,.35); }
.auth-logo svg { width: 34px; height: 34px; }

/* Zusammenfassung */
.summary { display: grid; grid-template-columns: 128px 1fr; gap: 14px; align-items: center; }
.ring-wrap { position: relative; width: 120px; height: 120px; }
.ring { width: 120px; height: 120px; transform: rotate(-90deg); stroke: none; }
.ring-bg { fill: none; stroke: rgba(127,127,127,.18); stroke-width: 10; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset .6s cubic-bezier(.2,.8,.2,1); }
.ring-fg.over { stroke: var(--danger); }
.ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-text b { font-size: 26px; letter-spacing: -.02em; } .ring-text small { color: var(--muted); font-size: 12px; }
.macros { display: flex; flex-direction: column; gap: 9px; }
.macro span { font-size: 12px; color: var(--muted); }
.macro small { font-size: 12px; font-variant-numeric: tabular-nums; }
.bar { height: 7px; background: rgba(127,127,127,.18); border-radius: 4px; overflow: hidden; margin: 3px 0; }
.bar i { display: block; height: 100%; width: 0; background: var(--p); border-radius: 4px; transition: width .5s cubic-bezier(.2,.8,.2,1); }
#barC { background: var(--c); } #barF { background: var(--f); }
.kcal-line { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }

/* Mahlzeiten */
.meal { margin-bottom: 14px; overflow: hidden; }
.meal-head { display: flex; align-items: center; padding: 10px 8px 10px 16px; }
.meal-head b { flex: 1; font-size: 16px; }
.meal-head small { color: var(--muted); margin-right: 4px; font-variant-numeric: tabular-nums; }
.entry { display: flex; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line); cursor: pointer; }
.entry:active { background: var(--accent-soft); }
.entry .n { flex: 1; min-width: 0; }
.entry .n div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry .n small, .item small { color: var(--muted); font-size: 12px; }
.entry .k { font-weight: 600; margin-left: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.meal-actions { display: flex; gap: 6px; padding: 8px 12px 12px; }
.meal-actions .btn { flex: 1; font-size: 13px; padding: 8px 4px; border-radius: 12px; }
.meal-actions .ico { width: 16px; height: 16px; margin-right: 4px; }
.empty { padding: 10px 16px 14px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }

/* Listen */
.list .item { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.list .item:last-child { border-bottom: 0; }
.list .item img { width: 42px; height: 42px; object-fit: cover; border-radius: 10px; background: rgba(127,127,127,.15); }
.list .item .n { flex: 1; min-width: 0; } .list .item .n div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .item .k { font-weight: 600; white-space: nowrap; }
.list .sep { font-size: 11.5px; color: var(--muted); padding: 12px 4px 4px; text-transform: uppercase; letter-spacing: .06em; }
.list .item .icon { padding: 6px; }

/* Navigation */
nav#nav { position: fixed; bottom: calc(10px + var(--sab)); left: 12px; right: 12px; max-width: 640px; margin: 0 auto; border-radius: 999px; display: flex; gap: 2px; padding: 5px 8px; z-index: 5; }
nav#nav button { position: relative; flex: 1; min-width: 0; background: none; border: 0; padding: 7px 1px 5px;
  font-size: 10px; letter-spacing: -.012em; color: var(--muted); display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end; gap: 3px; cursor: pointer; transition: color .2s; }
/* Die Markierung ist eine eigene Fläche: volle Rundung, überall gleich */
nav#nav button::before { content: ""; position: absolute; inset: 3px 2px; border-radius: 999px;
  background: transparent; transition: background .2s; }
nav#nav button > * { position: relative; }
nav#nav button.active::before { background: var(--accent-soft); }
nav#nav button.active { color: var(--accent); }
nav#nav button.scan { color: var(--accent); }
nav#nav button.scan i { display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; border-radius: 50%; margin-top: -22px; background: linear-gradient(160deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 16px rgba(0,0,0,.18); }
nav#nav button.scan svg { width: 26px; height: 26px; }

/* Sheets */
.sheet { position: fixed; left: 8px; right: 8px; bottom: calc(8px + var(--sab)); max-height: calc(100vh - 60px - var(--sat) - var(--sab)); max-height: calc(100dvh - 60px - var(--sat) - var(--sab)); overflow: auto; border-radius: 26px; padding: 12px 16px 18px; z-index: 20; max-width: 640px; margin: 0 auto; background: var(--glass-strong); animation: up .25s cubic-bezier(.2,.8,.2,1); }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
#backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.28); z-index: 15; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sheet-head b { font-size: 18px; letter-spacing: -.01em; }
.sheet-head .icon { color: var(--muted); background: rgba(127,127,127,.15); padding: 5px; } .sheet-head .icon svg { width: 18px; height: 18px; }
.scan-box { position: relative; background: #0b0d0c; border-radius: 20px; overflow: hidden; aspect-ratio: 4/3;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 8px 24px rgba(0,0,0,.18); }
.scan-box video { width: 100%; height: 100%; object-fit: cover; }
/* Vier Ecken statt Rahmen: die Kamera bleibt frei, das Ziel ist trotzdem klar */
.scan-frame { position: absolute; inset: 20% 11%; border-radius: 16px; box-shadow: 0 0 0 999px rgba(0,0,0,.42); }
.scan-frame::before, .scan-frame::after,
.scan-box .scan-frame > i:first-child, .scan-box .scan-frame > i:last-child {
  content: ""; position: absolute; width: 30px; height: 30px; border: 3px solid rgba(255,255,255,.92); }
.scan-frame::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-radius: 14px 0 0 0; }
.scan-frame::after { top: -1px; right: -1px; border-left: 0; border-bottom: 0; border-radius: 0 14px 0 0; }
.scan-frame > i:first-child { bottom: -1px; left: -1px; border-right: 0; border-top: 0; border-radius: 0 0 0 14px; }
.scan-frame > i:last-child { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-radius: 0 0 14px 0; }
.scan-line { position: absolute; left: 12%; right: 12%; top: 22%; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-2, #7fd6a3), transparent);
  box-shadow: 0 0 14px 2px rgba(127,214,163,.55);
  animation: scanWander 2.6s cubic-bezier(.45,0,.55,1) infinite alternate; }
@keyframes scanWander { from { top: 22%; } to { top: 76%; } }
/* Statuszeile schwebt im Bild */
.scan-status { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; margin: 0;
  text-align: center; color: #fff; background: rgba(0,0,0,.55); border-radius: 16px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 9px 14px; font-size: 13px; line-height: 1.35; }
#scanner .scan-box { margin-bottom: 12px; }
#scanner .row { gap: 8px; }
@media (prefers-reduced-motion: reduce) { .scan-line { animation: none; top: 50%; } }
.amount-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.amount-row input { width: 110px; font-size: 24px; font-weight: 600; text-align: right; margin: 0; }
#portionBtns { display: flex; gap: 6px; flex-wrap: wrap; }
#portionBtns button { border: 0; background: rgba(127,127,127,.14); color: var(--text); border-radius: 999px; padding: 7px 12px; font-size: 13px; cursor: pointer; }
.preview { display: flex; justify-content: space-around; margin: 12px 0 4px; padding: 10px; background: rgba(127,127,127,.10); border-radius: 14px; }
.preview div { text-align: center; } .preview b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; } .preview small { color: var(--muted); font-size: 11px; }

/* Tabs */
.tabs { display: flex; padding: 4px; margin-bottom: 14px; border-radius: 999px; }
.tab { flex: 1; border: 0; background: none; padding: 8px; border-radius: 999px; color: var(--muted); font-weight: 600; cursor: pointer; transition: background .2s; }
.tab.active { background: var(--accent); color: #fff; box-shadow: 0 3px 10px rgba(23,138,79,.3); }

/* Statistik, Gewicht, Profil */
canvas { width: 100%; display: block; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; text-align: center; }
.stat-grid b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; } .stat-grid small { color: var(--muted); font-size: 11px; }
.weight-row { display: flex; align-items: center; gap: 10px; }
.weight-row .ico { color: var(--accent); margin: 0; width: 22px; height: 22px; }
.weight-row label { margin: 0; flex: 1; } .weight-row input { width: 90px; margin: 0; }
.profile-row { display: flex; align-items: center; gap: 12px; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(145deg, #3ccf85, #178a4f); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
.profile-row .n { flex: 1; } .profile-row .n b { display: block; font-size: 17px; } .profile-row .n small { color: var(--muted); }

#toast { position: fixed; bottom: calc(100px + var(--sab)); left: 50%; transform: translateX(-50%) translateY(10px); background: rgba(20,25,22,.85); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; opacity: 0; transition: .3s; pointer-events: none; z-index: 30; max-width: 90%; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
#toast.show { opacity: 1; transform: translateX(-50%); }

/* Login-Optionen und Punktewolke */
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 14px 0 4px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-alt .btn { font-size: 14px; }
.cloud-wrap { display: flex; justify-content: center; padding: 8px 0; }
#cloud { width: 300px; height: 300px; max-width: 80vw; max-height: 80vw; border-radius: 50%; }
#pkList .item { cursor: default; }

/* KI und Mitteilungen */
textarea { width: 100%; font: inherit; font-size: 16px; padding: 11px 12px; border: 0; border-radius: 12px; background: rgba(127,127,127,.12); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); outline: none; resize: vertical; }
textarea:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.ai-btn { background: linear-gradient(135deg, #5b7cfa, #8b5cf6); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 4px 12px rgba(91,124,250,.3); }
.coach-head { display: flex; align-items: center; gap: 8px; } .coach-head b { flex: 1; } .coach-head .ico { color: #7c6cf6; margin: 0; }
.coach-text { margin: 10px 0 0; font-size: 15px; line-height: 1.5; }
.ai-item { display: flex; align-items: center; gap: 8px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.ai-item input[type=checkbox] { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.ai-item .n { flex: 1; min-width: 0; } .ai-item .n div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-item .g { width: 70px; margin: 0; padding: 6px 8px; text-align: right; font-size: 15px; }
.ai-item small { color: var(--muted); font-size: 11.5px; }
.tag { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 999px; background: rgba(127,127,127,.15); margin-left: 4px; vertical-align: 1px; }
.tag.db { background: var(--accent-soft); color: var(--accent); }
.switch { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 14px; color: var(--text); }
.switch input[type=checkbox] { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); flex: none; }
.switch span { flex: 1; }
.switch .time { width: 92px; margin: 0; padding: 6px 8px; font-size: 14px; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--accent); border-right-color: transparent; border-radius: 50%; animation: sp .7s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes sp { to { transform: rotate(360deg); } }

/* Plus-Auswahl */
.add-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.add-opt { border: 0; border-radius: 18px; padding: 16px 12px; background: rgba(127,127,127,.10); color: var(--text); display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.add-opt:active { transform: scale(.97); }
.add-opt svg { width: 30px; height: 30px; color: var(--accent); margin-bottom: 4px; }
.add-opt.ai svg { color: #7c6cf6; }
.add-opt b { font-size: 15px; } .add-opt small { color: var(--muted); font-size: 12px; }
nav#nav button span { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 370px) { nav#nav button { font-size: 9px; letter-spacing: -.02em; } nav#nav { padding: 6px 5px; } }
/* Sehr schmale Geräte: nur Zeichen, damit kein Wort abgeschnitten wird */
@media (max-width: 340px) {
  nav#nav button span { display: none; }
  nav#nav button { padding: 11px 2px; }
  nav#nav button.scan span { display: none; }
}

.section-title { display: flex; align-items: center; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 22px 4px 10px; }
.section-title .ico { color: var(--accent); }

/* Einführung */
.sheet.onb { top: calc(16px + var(--sat)); max-height: none; overflow: auto; }
.onb p { margin: 8px 0; line-height: 1.5; }
.onb .sheet-head .hint { margin: 0; }
.onb .row .btn { white-space: normal; line-height: 1.2; }
.onb .row > .btn:last-child { flex: 2; }
.onb .row .btn { white-space: normal; line-height: 1.2; }
.onb .row > .btn:last-child { flex: 2; }

/* Garmin */
.garmin-line { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); text-align: center; margin-top: -4px; }
.garmin-line b { color: var(--accent); }

/* Animationen */
@media (prefers-reduced-motion: no-preference) {
  .view.active { animation: viewIn .28s cubic-bezier(.2,.8,.2,1); }
  @keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }
  .onb-page:not(.hidden) { animation: pageIn .3s cubic-bezier(.2,.8,.2,1); }
  @keyframes pageIn { from { opacity: 0; transform: translateX(24px); } }
  .meal, .card { animation: cardIn .35s cubic-bezier(.2,.8,.2,1) both; }
  @keyframes cardIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
  #meals .meal:nth-child(1) { animation-delay: .03s } #meals .meal:nth-child(2) { animation-delay: .08s } #meals .meal:nth-child(3) { animation-delay: .13s } #meals .meal:nth-child(4) { animation-delay: .18s }
  .entry, .list .item, .ai-item { animation: rowIn .25s ease-out both; }
  @keyframes rowIn { from { opacity: 0; transform: translateX(-6px); } }
  nav#nav button { transition: background .25s, color .25s, transform .15s; }
  nav#nav button:active { transform: scale(.92); }
  nav#nav button.scan i { transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s; }
  nav#nav button.scan:active i { transform: scale(.9) rotate(45deg); }
  .btn, .icon, .add-opt, .tab { transition: transform .12s, background .2s, box-shadow .2s; }
  #toast { transition: opacity .3s, transform .3s cubic-bezier(.2,.8,.2,1); }
  .ring-text b { transition: color .3s; }
  .preview b { animation: pop .35s cubic-bezier(.2,.8,.2,1); }
  @keyframes pop { from { transform: scale(.7); opacity: 0; } }
  .auth-logo { animation: float 4s ease-in-out infinite; }
  @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
  .glass.card:active { transform: none; }
}

/* Onboarding-Fortschritt */
.onb-bar { height: 4px; border-radius: 2px; background: rgba(127,127,127,.18); overflow: hidden; margin: 2px 0 12px; }
.onb-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 2px; transition: width .35s cubic-bezier(.2,.8,.2,1); }

/* Chat */
.chat-log { display: flex; flex-direction: column; gap: 8px; padding: 6px 2px; max-height: 46vh; overflow-y: auto; }
.chat-sheet .chat-log { max-height: 58vh; }
.bub { max-width: 86%; padding: 9px 13px; border-radius: 18px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; animation: bubIn .25s cubic-bezier(.2,.8,.2,1); }
@keyframes bubIn { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.bub.ai { align-self: flex-start; background: rgba(127,127,127,.14); border-bottom-left-radius: 6px; }
.bub.me { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.bub.typing { display: flex; gap: 4px; align-items: center; }
.bub.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dot 1.2s infinite; }
.bub.typing i:nth-child(2) { animation-delay: .15s } .bub.typing i:nth-child(3) { animation-delay: .3s }
@keyframes dot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.chat-input { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.chat-input input { margin: 0; }
.icon.send { background: var(--accent); color: #fff; padding: 10px; }
.icon.send:disabled { opacity: .5; }
.chat-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chat-chips button { border: 0; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 7px 12px; font-size: 13px; cursor: pointer; }
.chat-fab { position: fixed; right: 16px; bottom: calc(112px + var(--sab)); width: 52px; height: 52px; border-radius: 50%; border: 0; z-index: 6;
  background: linear-gradient(150deg, #7c8cff, #6d4df6); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 6px 18px rgba(90,70,240,.45); cursor: pointer; }
.chat-fab:active { transform: scale(.92); }
.chat-fab svg { width: 26px; height: 26px; }

/* Trainingsplan */
.training-card .coach-head .ico { color: var(--accent); }
.ex-list { margin: 8px 0 0; padding-left: 18px; }
.ex-list li { font-size: 14px; margin: 3px 0; color: var(--muted); }
.training-card.done { opacity: .75; }
.plan-day { display: flex; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.plan-day:last-child { border-bottom: 0; }
.plan-day b { width: 34px; flex: none; color: var(--accent); font-size: 13px; }
.plan-day .n { flex: 1; min-width: 0; } .plan-day small { color: var(--muted); font-size: 12px; }
.tabs.seg { margin-bottom: 10px; background: rgba(127,127,127,.12); }

/* Mitteilungen */
.switch.big { align-items: flex-start; margin-top: 0; }
.switch.big span { display: flex; flex-direction: column; gap: 2px; }
.switch.big b { font-size: 15px; color: var(--text); }
.switch.big small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
#pushBody { transition: opacity .2s; }
#pushBody.off { opacity: .45; pointer-events: none; }
details#pushDetails { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 6px; }
details#pushDetails summary { cursor: pointer; font-size: 13px; color: var(--accent); font-weight: 600; padding: 6px 0; list-style: none; }
details#pushDetails summary::-webkit-details-marker { display: none; }
details#pushDetails summary::after { content: " ▾"; }
details#pushDetails[open] summary::after { content: " ▴"; }
.dev-row { display: flex; align-items: center; gap: 8px; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.dev-row:last-child { border-bottom: 0; }
.dev-row .n { flex: 1; } .dev-row small { color: var(--muted); font-size: 12px; display: block; }
.dev-row .here { font-size: 11px; background: var(--accent-soft); color: var(--accent); padding: 2px 8px; border-radius: 999px; }

/* ---------- Farbthemen, Hell/Dunkel-Schalter, Graustart ---------- */
/* --accent und --accent-2 setzt die App per Skript. --accent-soft leitet sich daraus ab. */
:root { --accent-2: #3ccf85; --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent); }
@supports not (color: color-mix(in srgb, red 10%, blue)) {
  :root { --accent-soft: rgba(23,138,79,.14); }
}

/* Vor der Farbwahl: alles neutral grau */
:root[data-plain] { --accent: #6b7770; --accent-2: #94a29b; --p: #7d8a93; --c: #8c8676; --f: #8f7d76; }
:root[data-plain] .blob { filter: blur(70px) grayscale(1); opacity: .35; }

/* Vom Benutzer erzwungene Darstellung */
:root[data-mode="light"] {
  --bg: #eef2ee; --text: #101512; --muted: #5f6b64; --line: rgba(0,0,0,.08);
  --glass: rgba(255,255,255,.55); --glass-strong: rgba(255,255,255,.72); --glass-edge: rgba(255,255,255,.75);
  --glass-shadow: 0 10px 30px rgba(20,40,30,.10), 0 1px 2px rgba(0,0,0,.05);
}
:root[data-mode="light"] .blob { opacity: .55; }
:root[data-mode="dark"] {
  --bg: #0d1210; --text: #eef2ee; --muted: #98a59e; --line: rgba(255,255,255,.09);
  --glass: rgba(30,38,34,.55); --glass-strong: rgba(30,38,34,.78); --glass-edge: rgba(255,255,255,.14);
  --glass-shadow: 0 10px 30px rgba(0,0,0,.45), 0 1px 2px rgba(0,0,0,.4);
}
:root[data-mode="dark"] .blob { opacity: .28; }

/* Farbauswahl im Onboarding und in den Einstellungen */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 10px; margin: 10px 0 4px; }
.swatch { position: relative; aspect-ratio: 1; border: 0; border-radius: 16px; cursor: pointer; padding: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 3px 10px rgba(0,0,0,.14); transition: transform .12s; }
.swatch:active { transform: scale(.94); }
.swatch[aria-pressed="true"]::after { content: ''; position: absolute; inset: -4px; border-radius: 20px; border: 2.5px solid var(--text); opacity: .75; }
.seg { display: flex; gap: 6px; background: var(--glass); border-radius: 14px; padding: 4px; }
.seg button { flex: 1; border: 0; background: transparent; color: var(--muted); padding: 9px 6px; border-radius: 11px; font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--accent); color: #fff; }

/* Sprachauswahl */
.langs { display: grid; gap: 10px; margin: 12px 0; }
.lang-opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; cursor: pointer;
  background: var(--glass); border-radius: 16px; padding: 14px 16px; color: var(--text); font-weight: 600; font-size: 16px; }
.lang-opt.on { background: var(--accent); color: #fff; }
.lang-opt b { font-size: 20px; width: 34px; text-align: center; }

/* Tarif / Abo */
.plan-card { border-radius: 18px; padding: 16px; background: var(--glass); margin-bottom: 12px; }
.plan-card.plus { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
.plan-card h4 { margin: 0 0 4px; font-size: 18px; }
.plan-card ul { margin: 10px 0 0; padding-left: 18px; }
.plan-card li { margin: 4px 0; }
.quota-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 8px 0 4px; }
.quota-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

/* Startseite anpassen */
.card-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.card-row:last-child { border-bottom: 0; }
.card-row .grow { flex: 1; }
.card-row .icon { width: 34px; height: 34px; border-radius: 10px; }

/* Eigene Auswertungen */
.cs-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chip { border: 1px solid var(--line); background: var(--glass); color: var(--text); border-radius: 999px;
  padding: 7px 13px; font-size: 14px; cursor: pointer; }
.chip.on { background: var(--accent); color: #fff; border-color: transparent; }

/* ---------- Schalter und Haken im Apple-Stil ---------- */
.switch input[type=checkbox],
.card-row input[type=checkbox] {
  appearance: none; -webkit-appearance: none;
  position: relative; width: 50px; height: 30px; border-radius: 999px; flex: none;
  margin: 0; cursor: pointer; background: rgba(127,127,127,.28);
  box-shadow: inset 0 0 0 1px var(--line); transition: background .22s;
}
.switch input[type=checkbox]::after,
.card-row input[type=checkbox]::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.28);
  transition: transform .22s;
}
.switch input[type=checkbox]:checked,
.card-row input[type=checkbox]:checked { background: var(--accent); box-shadow: none; }
.switch input[type=checkbox]:checked::after,
.card-row input[type=checkbox]:checked::after { transform: translateX(20px); }
.switch input[type=checkbox]:active::after,
.card-row input[type=checkbox]:active::after { width: 28px; }
.switch input[type=checkbox]:disabled { opacity: .45; cursor: default; }

/* Echte Haken, wo ein Haken passender ist als ein Schalter */
.ai-item input[type=checkbox], .check input[type=checkbox] {
  appearance: none; -webkit-appearance: none;
  width: 24px; height: 24px; border-radius: 8px; flex: none; margin: 0; cursor: pointer;
  background: transparent; box-shadow: inset 0 0 0 2px var(--line); position: relative; transition: background .15s;
}
.ai-item input[type=checkbox]:checked, .check input[type=checkbox]:checked {
  background: var(--accent); box-shadow: none;
}
.ai-item input[type=checkbox]:checked::after, .check input[type=checkbox]:checked::after {
  content: ''; position: absolute; left: 8px; top: 3.5px; width: 6px; height: 12px;
  border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(42deg);
}

/* ---------- Tarifübersicht ---------- */
.tier-grid { display: grid; gap: 12px; margin: 10px 0; }
.tier { border-radius: 18px; padding: 14px 16px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--line); }
.tier.current { box-shadow: inset 0 0 0 2px var(--accent); }
.tier.best { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: none; }
.tier-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tier-head b { font-size: 17px; }
.tier-head .price { font-weight: 600; white-space: nowrap; }
.tier .cr { font-size: 13px; opacity: .85; margin-top: 2px; }
.tier ul { margin: 8px 0 0; padding-left: 18px; font-size: 14px; }
.tier li { margin: 3px 0; }
.tier .btn { margin-top: 10px; width: 100%; }
.tier.best .btn { background: #fff; color: var(--accent); }
.badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); vertical-align: 2px; }
.tier.best .badge { background: rgba(255,255,255,.25); color: #fff; }
.cost-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 8px; }
.cost-table td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.cost-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.cost-table tr:last-child td { border-bottom: 0; }
.fam-code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 20px; letter-spacing: .12em;
  text-align: center; padding: 12px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); margin: 10px 0; }

/* Abstände in der Kalorienzeile (die Sprachmarkierung hat die Leerzeichen geschluckt) */
.kcal-line { display: flex; justify-content: center; gap: 5px; flex-wrap: wrap; }

/* Listeneinträge, die als Knopf umgesetzt sind (Rechtliches) */
.list button.item {
  width: 100%; text-align: left; border: 0; background: transparent; color: var(--text);
  font: inherit; border-radius: 0; box-shadow: none; padding: 13px 4px;
}
.list button.item:active { background: var(--accent-soft); }
.list button.item::after {
  content: ''; width: 8px; height: 8px; flex: none; margin-right: 4px;
  border: solid var(--muted); border-width: 1.6px 1.6px 0 0; transform: rotate(45deg);
}

/* Kernsatz auf der letzten Onboarding-Seite */
.big-line { font-size: 19px; font-weight: 600; line-height: 1.35; margin: 2px 0 6px; }

/* Empfehlungsblock über den Tarifen */
.tier.pitch { padding: 16px; }
.tier.pitch .pitch-text { margin: 8px 0 0; font-size: 14px; line-height: 1.5; opacity: .95; }
.tier.pitch .btn { margin-top: 12px; }
.tier.best .tier-head b { font-size: 18px; }

/* Verwaltung: Kennzahlen und Listen */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 12px 0 6px; }
.kpi { background: var(--glass); border-radius: 14px; padding: 10px 12px; box-shadow: inset 0 0 0 1px var(--line); }
.kpi b { display: block; font-size: 20px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12px; color: var(--muted); }
.kpi.accent b { color: var(--accent); }
.kpi-h { font-size: 13px; color: var(--muted); font-weight: 600; margin: 16px 0 4px; }
.promo-code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 700; letter-spacing: .06em; }
.promo-off { opacity: .5; }
.plan-row { display: flex; gap: 8px; align-items: flex-end; margin: 8px 0 2px; }
.plan-row label { flex: 1; margin: 0; }

/* Abo-Verwaltung für zahlende Konten */
.sub-box .btn { margin-top: 10px; }
.sub-box .btn.small { margin-top: 12px; }
.sub-box .hint { margin: 8px 0 0; }

/* Anmeldung mit Google */
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; margin-bottom: 8px; }
.google-btn svg { width: 18px; height: 18px; }

/* Vollflächiges Fenster (Abo ändern) */
.sheet.sheet-full { top: calc(16px + var(--sat)); max-height: none; overflow: auto; }
.sub-opt { width: 100%; text-align: left; display: block; border: 0; font: inherit; color: var(--text);
  background: var(--glass); border-radius: 18px; padding: 14px 16px; margin: 10px 0;
  box-shadow: inset 0 0 0 1px var(--line); }
.sub-opt b { display: block; font-size: 16px; }
.sub-opt small { display: block; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.sub-opt:active { background: var(--accent-soft); }
.sub-opt.danger b { color: #c0392b; }
:root[data-mode="dark"] .sub-opt.danger b { color: #ff8a7a; }
.btn.danger-out { color: #c0392b; box-shadow: inset 0 0 0 1px rgba(192,57,43,.45); background: transparent; }
:root[data-mode="dark"] .btn.danger-out { color: #ff8a7a; box-shadow: inset 0 0 0 1px rgba(255,138,122,.45); }

/* Hinzufügen: KI über die volle Breite, darunter die Standardwege */
.add-grid .add-opt.wide2 { grid-column: 1 / -1; flex-direction: row; justify-content: center;
  align-items: center; gap: 12px; padding: 14px 12px; }
.add-grid .add-opt.wide2 svg { margin-bottom: 0; flex: none; }
.add-grid .add-opt.wide2 .txt { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.add-opt.protein svg { color: #c98a2b; }
:root[data-plain] .add-opt.protein svg { color: var(--muted); }

/* Eiweiß-Rechner */
.pr-zahl { font-size: 34px; font-weight: 700; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.pr-zeile { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pr-zeile:last-of-type { border-bottom: 0; }
.pr-zeile b { font-variant-numeric: tabular-nums; }
.pr-kopf { text-align: center; padding: 6px 0 10px; }
.pr-kopf small { display: block; color: var(--muted); margin-top: 4px; }

/* Eingabe-Dialog */
#askSheet { max-width: 440px; padding-bottom: 20px; }
#askSheet .hint { margin: 2px 0 10px; }
#askSheet label { margin-top: 0; }
#askSheet label span { display: block; margin-bottom: 2px; }
#askInput { font-size: 20px; padding: 14px 14px; text-align: center; }
#askInput.mono { font-variant-numeric: tabular-nums; letter-spacing: .06em; }
#askSheet .btn.wide { margin-top: 12px; }

/* Ausgebesserte Suchfrage */
.korr { font-size: 13px; color: var(--muted); margin: 8px 2px 2px; }
.korr b { color: var(--text); }

/* Produktbilder und Sorten-Gruppen */
.list .item img.gross, .list .item .bild-leer.gross { width: 54px; height: 54px; }
.list .item img { object-fit: contain; background: #fff; box-shadow: inset 0 0 0 1px var(--line); padding: 2px; }
.bild-leer { width: 42px; height: 42px; border-radius: 10px; flex: none; display: grid; place-items: center;
  font-weight: 700; color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--line); }
.grp { border-bottom: 1px solid var(--line); }
.grp:last-child { border-bottom: 0; }
.grp .item { border-bottom: 0; }
.grp .chev { color: var(--muted); transition: transform .2s; flex: none; }
.grp.offen .chev { transform: rotate(180deg); }
.grp .sorten { padding-left: 16px; border-left: 2px solid var(--accent-soft); margin: 0 0 8px 20px; }
.grp .sorten .item { padding: 7px 4px; }
.grp .sorten .item:not(:last-child) { border-bottom: 1px solid var(--line); }

/* Eiweiß-Rechner: Wunschmenge */
.pr-produkt { display: flex; align-items: center; gap: 10px; padding: 2px 0 10px; }
.pr-produkt .n { flex: 1; min-width: 0; }
.pr-produkt .n div { font-weight: 600; }
.pr-produkt .n small { color: var(--muted); font-size: 12px; }
.pr-produkt img, .pr-produkt .bild-leer { width: 54px; height: 54px; border-radius: 12px; object-fit: contain;
  background: #fff; box-shadow: inset 0 0 0 1px var(--line); padding: 2px; flex: none; }
.pr-produkt .bild-leer { background: var(--accent-soft); padding: 0; display: grid; place-items: center;
  font-weight: 700; color: var(--accent); }
.pr-frage { font-size: 13px; color: var(--muted); margin-top: 6px; }
#prChips { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0 10px; }
#prChips .chip { padding: 7px 12px; font-size: 14px; }
#prChips .chip.tipp { border-color: var(--accent); color: var(--accent); font-weight: 600; }
#prChips .chip.aktiv { background: var(--accent); color: #fff; border-color: transparent; }
.pr-eigen { display: flex; align-items: center; gap: 10px; }
.pr-eigen input { width: 110px; margin: 0; font-size: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.pr-eigen span { font-size: 14px; color: var(--muted); }
.pr-weg { margin-top: 6px; }
.pr-produkt .n div { line-height: 1.25; }
.pr-eigen input::-webkit-outer-spin-button, .pr-eigen input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0; }
.pr-eigen input { -moz-appearance: textfield; appearance: textfield; }
#proteinBody .pr-kopf { padding: 16px 0 12px; }

/* Mahlzeit-Auswahl */
.mahl-wrap { margin-top: 10px; }
.mahl-lab { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.mahl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px;
  border-radius: 14px; background: rgba(127,127,127,.12); box-shadow: inset 0 0 0 1px var(--line); }
.mahl button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px;
  font-weight: 500; padding: 9px 4px; border-radius: 11px; cursor: pointer; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; transition: background .18s, color .18s; }
.mahl button.an { background: var(--accent); color: #fff; font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,.14); }
.mahl button:not(.an):active { background: rgba(127,127,127,.16); }
@media (max-width: 380px) { .mahl button { font-size: 12px; padding: 9px 2px; } }

/* Auswahlfelder im Stil der App statt im Stil des Betriebssystems */
select { -webkit-appearance: none; appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8f8c' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9.5l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 17px; }

/* Tarif antippen und dann abonnieren */
.tier.waehlbar { cursor: pointer; transition: box-shadow .2s, transform .15s, background .2s; }
.tier.waehlbar:active { transform: scale(.985); }
.tier.gewaehlt { box-shadow: inset 0 0 0 2px var(--accent), 0 6px 20px rgba(0,0,0,.10); }
.tier.best.gewaehlt { box-shadow: inset 0 0 0 2px #fff, 0 6px 20px rgba(0,0,0,.14); }
.tier-tipp { margin-top: 10px; font-size: 12.5px; color: var(--muted); opacity: .85; }
.tier.best .tier-tipp { color: rgba(255,255,255,.85); }
.tier-hint { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.tier.best .tier-hint { color: rgba(255,255,255,.9); }
.tier .btn[disabled] { opacity: .55; }

/* Credit-Ring */
.cr-wrap { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.cr-ring { position: relative; width: 80px; height: 80px; flex: none; }
.cr-ring svg { width: 80px; height: 80px; transform: rotate(-90deg); }
.cr-bg { fill: none; stroke: rgba(127,127,127,.18); stroke-width: 8; }
.cr-fg { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round;
  transition: stroke-dashoffset .7s cubic-bezier(.2,.8,.2,1); }
.cr-fg.knapp { stroke: var(--danger); }
.cr-mitte { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; line-height: 1.1; }
.cr-mitte b { font-size: 20px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cr-mitte small { color: var(--muted); font-size: 10.5px; }
.cr-text { flex: 1; min-width: 0; }
.cr-text .cr { margin-top: 1px; }

/* Rückfrage-Fenster */
#confirmSheet { max-width: 420px; padding-bottom: 18px; }
#confirmSheet .hint { margin: 2px 0 14px; font-size: 14px; color: var(--text); opacity: .8; }
#confirmSheet .btn { margin-top: 8px; }
#confirmSheet .btn.danger { background: var(--danger); color: #fff; box-shadow: none; }

/* Pflichthaken vor dem Abschluss */
.tier-ok { display: flex; gap: 9px; align-items: flex-start; margin-top: 12px; font-size: 12.5px;
  line-height: 1.45; color: var(--muted); cursor: pointer; }
.tier-ok input { width: 18px; height: 18px; flex: none; margin: 1px 0 0; accent-color: var(--accent); }
.tier.best .tier-ok { color: rgba(255,255,255,.92); }
.tier.best .tier-ok input { accent-color: #fff; }

/* Anmeldeknopf: blass, solange etwas fehlt – voll eingefärbt, sobald es passt */
#authSubmit { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--line);
  transition: background .2s, color .2s, box-shadow .2s; }
#authSubmit.bereit { background: var(--accent); color: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.14); }
.auth-note { margin: 6px 0 0; min-height: 17px; font-size: 12.5px; }
#authErr:empty { display: none; }
#authErr { margin: 6px 0 0; font-weight: 500; }

/* Anmeldeschirm: kein Polster für eine Leiste, die es hier nicht gibt.
   Sonst ist die Seite höher als der Bildschirm und lässt sich wischen. */
body.nur-anmeldung { padding-bottom: 0; min-height: 100dvh; overflow: hidden; }
body.nur-anmeldung #auth { min-height: 100dvh; height: 100dvh; overflow-y: auto; }

/* In der App reicht die Seite bis an die Gerätekanten: der Hintergrund muss
   die Schutzzonen oben und unten mitfärben, sonst bleibt dort ein heller Rand. */
html { background: var(--bg); min-height: 100%; }
body { background: var(--bg); }
body.nur-anmeldung #auth { min-height: 100dvh; height: 100dvh; }

/* ---------- Zustimmungen bei Registrierung und Einführung ---------- */
.zust { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.zust .haken {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; line-height: 1.45; color: var(--muted);
  cursor: pointer; text-align: left;
}
.zust .haken input[type=checkbox] {
  flex: 0 0 auto; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--accent);
}
.zust .haken a { color: var(--accent); text-decoration: underline; }
#obZustErr, #obZust + .err { margin-top: 8px; }

/* ---------- Gefahrenbereich ---------- */
.gefahr { border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); }
.gefahr h3 { color: var(--danger); }
#wegListe { margin: 10px 0 14px; padding-left: 20px; font-size: 14px; line-height: 1.6; color: var(--muted); }
#wegListe li { margin-bottom: 2px; }
#wegSheet .haken { margin: 14px 0; }
#wegGo:disabled { opacity: .45; }
