/* Radcoach – dunkler Apple-Fitness-Look: schwarzer Grund, dunkle Karten, Ringe und kräftige Farben. */
:root {
  /* Apple-Fitness-Look: immer dunkel, kräftige Ringfarben, Neongrün als Aktionsfarbe (schwarze Schrift darauf) */
  --bg: #000000; --flaeche: #1c1c1e; --flaeche-2: #2c2c2e; --flaeche-3: #3a3a3c; --text: #ffffff; --leise: #8e8e93; --linie: #38383a;
  --akzent: #a6ff00; --akzent-hover: #b8ff33; --akzent-text: #000000; --blau: #0a84ff;
  --energie: #fa114f; --kh: #a6ff00; --protein: #00f0ff; --fett: #ff9f0a;
  --gruen: #30d158; --gelb: #ffd60a; --rot: #ff453a; --grau: #8e8e93;
  --gruen-weich: rgba(48, 209, 88, .16); --gelb-weich: rgba(255, 214, 10, .14); --rot-weich: rgba(255, 69, 58, .16); --grau-weich: rgba(142, 142, 147, .14);
  --s1: #00f0ff; --s2: #ffd60a; --s3: #a6ff00; --ref: #fa114f;
  --z1: #0a84ff; --z2: #636366; --z3: #ff453a;
  --schatten: none;
  --schatten-hoch: 0 16px 40px rgba(0, 0, 0, .6);
  --glas: rgba(22, 22, 24, .78);
  --segment-aktiv: #636366;
  --radius: 22px; --radius-klein: 14px;
  --weich: cubic-bezier(.22, .61, .36, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.47 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  letter-spacing: -.011em; -webkit-font-smoothing: antialiased; padding-bottom: 96px;
}
a { color: var(--akzent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Kopf und Navigation */
.kopf { position: sticky; top: 0; z-index: 20; background: var(--glas); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--linie); }
.kopf-innen { max-width: 1040px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 24px; }
.marke { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.05rem; color: var(--text); letter-spacing: -.02em; }
.marke:hover { text-decoration: none; }
.marke img { width: 28px; height: 28px; border-radius: 8px; }
.navi { display: flex; gap: 4px; }
.navi a { color: var(--leise); font-size: .92rem; font-weight: 500; padding: 7px 14px; border-radius: 999px; transition: background .25s var(--weich), color .25s var(--weich); }
.navi a:hover { color: var(--text); text-decoration: none; background: var(--linie); }
.navi a[aria-current] { color: var(--akzent-text); background: var(--akzent); }

main { max-width: 1040px; margin: 0 auto; padding: 32px 24px 48px; display: grid; gap: 24px; }
.seitenkopf { padding: 8px 4px 0; }
.seitenkopf h1 { font-size: clamp(2.125rem, 4vw, 2.75rem); line-height: 1.08; font-weight: 800; letter-spacing: -.03em; margin: 0; }
.seitenkopf p { margin: 6px 0 0; color: var(--leise); font-size: 1.05rem; }

/* Karten */
.karte { background: var(--flaeche); border-radius: var(--radius); padding: 28px; box-shadow: var(--schatten); min-width: 0; transition: transform .35s var(--weich), box-shadow .35s var(--weich); }
.raster > .karte:hover { transform: translateY(-2px); box-shadow: var(--schatten-hoch); }
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -.03em; margin: 0 0 12px; }
h2 { font-size: 1.15rem; font-weight: 600; letter-spacing: -.02em; margin: 0 0 16px; }
.leise { color: var(--leise); font-size: .9rem; }
.raster { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.kennzahl h2 { font-size: .85rem; font-weight: 500; color: var(--leise); margin-bottom: 6px; letter-spacing: 0; }
.kennzahl .gross { font-size: 2.75rem; line-height: 1.1; font-weight: 600; letter-spacing: -.04em; margin: 0 0 6px; font-variant-numeric: tabular-nums; }

/* Ampel */
.ampel { padding: 36px; background: var(--flaeche); position: relative; overflow: hidden; }
.ampel::before { content: ""; position: absolute; inset: 0; background: var(--grau-weich); pointer-events: none; }
.ampel-gruen::before { background: var(--gruen-weich); }
.ampel-gelb::before { background: var(--gelb-weich); }
.ampel-rot::before { background: var(--rot-weich); }
.ampel > * { position: relative; }
.ampel-kopf { display: flex; align-items: center; gap: 14px; }
.ampel-kopf h1 { margin: 0; font-size: clamp(1.9rem, 4vw, 2.5rem); letter-spacing: -.035em; }
.ampel-punkt { width: 18px; height: 18px; border-radius: 50%; background: var(--grau); flex: none; }
.ampel-gruen .ampel-punkt { background: var(--gruen); animation: puls 2.8s var(--weich) infinite; --puls: var(--gruen); }
.ampel-gelb .ampel-punkt { background: var(--gelb); animation: puls 2.8s var(--weich) infinite; --puls: var(--gelb); }
.ampel-rot .ampel-punkt { background: var(--rot); animation: puls 2.8s var(--weich) infinite; --puls: var(--rot); }
@keyframes puls { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--puls) 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 14px transparent; } }
.empfehlung { font-size: 1.3rem; line-height: 1.35; font-weight: 600; letter-spacing: -.02em; margin: 18px 0 14px; max-width: 46ch; }
.gruende { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 6px; }
.gruende li { color: var(--text); padding-left: 18px; position: relative; }
.gruende li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--leise); }
.hinweis { color: var(--gelb); font-weight: 600; margin: 6px 0; }
.warnung, .fehler { color: var(--rot); font-weight: 500; margin: 6px 0; }
.karte.fehler { color: var(--text); }

/* Knöpfe und Formulare */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--akzent); color: var(--akzent-text); border: 0; border-radius: 999px; padding: 0 22px; min-height: 44px; font: inherit; font-size: .98rem; font-weight: 500; cursor: pointer; transition: transform .2s var(--weich), background .2s var(--weich), opacity .2s; }
.knopf:hover { background: var(--akzent-hover); text-decoration: none; }
.knopf:active { transform: scale(.97); }
.knopf:disabled { opacity: .5; cursor: progress; }
.knopf.zweit { background: var(--flaeche-2); color: var(--text); }
.knopf.zweit:hover { background: var(--flaeche-3); }
a:focus-visible, button:focus-visible, .knopf:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid rgba(166, 255, 0, .55); outline-offset: 2px; }
.knopfzeile { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.formular label { display: block; margin: 0 0 18px; font-size: .9rem; font-weight: 500; color: var(--leise); }
.formular input:not([type=radio]):not([type=checkbox]), .formular textarea, .formular select {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px; min-height: 48px; font: inherit; font-size: 1.02rem; color: var(--text);
  background: var(--flaeche-2); border: 1px solid transparent; border-radius: var(--radius-klein); transition: border-color .2s, background .2s, box-shadow .2s;
}
.formular input:not([type=radio]):not([type=checkbox]):focus, .formular textarea:focus, .formular select:focus { outline: none; background: var(--flaeche-2); border-color: var(--akzent); box-shadow: 0 0 0 4px rgba(166, 255, 0, .15); }
fieldset { border: 0; margin: 0 0 20px; padding: 0; min-width: 0; }
legend { font-size: .9rem; font-weight: 500; color: var(--leise); margin-bottom: 10px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.formular .chip { display: inline-block; margin: 0; position: relative; color: var(--text); }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.chip span { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; min-height: 46px; padding: 0 16px; border-radius: 999px; background: var(--flaeche-2); font-weight: 500; cursor: pointer; transition: background .25s var(--weich), color .25s var(--weich), transform .15s var(--weich); }
.chip span:hover { background: var(--flaeche-3); }
.chip input:checked + span { background: var(--akzent); color: var(--akzent-text); }
.chip span:active { transform: scale(.94); }
.chip input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--akzent) 45%, transparent); outline-offset: 2px; }
.schalter { display: flex !important; align-items: center; gap: 12px; color: var(--text) !important; font-size: 1rem !important; cursor: pointer; }
.schalter input { appearance: none; width: 51px; height: 31px; border-radius: 999px; background: var(--flaeche-3); position: relative; cursor: pointer; transition: background .25s var(--weich); flex: none; margin: 0; }
.schalter input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .25s var(--weich); }
.schalter input:checked { background: var(--gruen); }
.schalter input:checked::after { transform: translateX(20px); }

/* Tabellen, Werte, Umschalter */
.tabelle-wrap { overflow-x: auto; margin: 0 -4px; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--linie); vertical-align: top; }
tbody tr { transition: background .2s; }
tbody tr:hover { background: var(--flaeche-2); }
tbody tr:last-child td { border-bottom: 0; }
th { color: var(--leise); font-weight: 500; font-size: .82rem; }
td select { min-height: 34px; font: inherit; border: 0; border-radius: 8px; background: var(--flaeche-2); color: var(--text); padding: 0 8px; }
.werte { display: grid; grid-template-columns: max-content 1fr; gap: 12px 28px; margin: 0; }
.werte dt { color: var(--leise); }
.werte dd { margin: 0; font-weight: 500; }
.zeile { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.zeile h1, .zeile h2 { margin: 0; }
.umschalter { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--flaeche-2); }
.umschalter a { padding: 6px 14px; border-radius: 999px; color: var(--leise); font-size: .88rem; font-weight: 500; transition: background .25s var(--weich), color .25s; }
.umschalter a:hover { text-decoration: none; color: var(--text); }
.umschalter a[aria-current] { background: var(--segment-aktiv); color: var(--text); }
.kopfzeile-karte { margin-bottom: 18px; }

/* Intensitätsverteilung */
.stapel { display: flex; height: 34px; border-radius: 10px; overflow: hidden; margin: 8px 0 22px; background: var(--flaeche-2); gap: 2px; }
.stapel span { display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 600; color: #fff; white-space: nowrap; transform-origin: left; animation: wachsen .9s var(--weich) both; }
.stapel .z1 { background: var(--z1); }
.stapel .z2 { background: var(--z2); animation-delay: .08s; }
.stapel .z3 { background: var(--z3); animation-delay: .16s; }
@keyframes wachsen { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }

/* Diagramme */
.diagramm { width: 100%; height: auto; display: block; overflow: visible; }
.diagramm .gitter { stroke: var(--linie); stroke-width: 1; }
.diagramm .nulllinie { stroke: var(--leise); stroke-opacity: .5; stroke-dasharray: 3 5; }
.diagramm .achse { fill: var(--leise); font-size: 11px; font-family: inherit; }
.diagramm .linie { fill: none; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: zeichnen 1.4s var(--weich) forwards; }
.diagramm .linie.s1 { stroke: var(--s1); }
.diagramm .linie.s2 { stroke: var(--s2); animation-delay: .1s; }
.diagramm .linie.s3 { stroke: var(--s3); animation-delay: .2s; }
.diagramm .linie.referenz { stroke: var(--ref); stroke-width: 1.5; stroke-dasharray: 5 5; stroke-dashoffset: 0; animation: einblenden .8s .4s var(--weich) both; }
@keyframes zeichnen { to { stroke-dashoffset: 0; } }
.diagramm .balken { fill: var(--s1); transform-box: fill-box; transform-origin: bottom; animation: hochwachsen .7s var(--weich) both; }
.diagramm .balken:hover { opacity: .8; }
@keyframes hochwachsen { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.diagramm .treffer { fill: transparent; }
.legende { display: flex; gap: 20px; flex-wrap: wrap; font-size: .85rem; color: var(--leise); margin-top: 14px; }
.leg { display: inline-flex; align-items: center; gap: 8px; }
.leg::before { content: ""; width: 10px; height: 10px; border-radius: 50%; }
.leg.s1::before { background: var(--s1); }
.leg.s2::before { background: var(--s2); }
.leg.s3::before { background: var(--s3); }

/* Seitenwechsel und Einblendungen */
.erscheinen > * { animation: hochgleiten .6s var(--weich) both; }
.erscheinen > *:nth-child(2) { animation-delay: .05s; }
.erscheinen > *:nth-child(3) { animation-delay: .1s; }
.erscheinen > *:nth-child(4) { animation-delay: .15s; }
.erscheinen > *:nth-child(5) { animation-delay: .2s; }
.erscheinen > *:nth-child(n+6) { animation-delay: .25s; }
@keyframes hochgleiten { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes einblenden { from { opacity: 0; } to { opacity: 1; } }
.laedt { color: var(--leise); padding: 40px 4px; animation: einblenden .4s .2s both; }

.toast { position: fixed; left: 50%; bottom: 104px; z-index: 40; max-width: min(90vw, 480px); padding: 14px 22px; border-radius: 999px; background: var(--glas); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); color: var(--text); box-shadow: var(--schatten-hoch); font-weight: 500; transform: translateX(-50%); animation: toastrein .45s var(--weich) both; }
.toast.fehler-toast { color: var(--rot); }
.toast.weg { animation: toastraus .35s var(--weich) forwards; }
@keyframes toastrein { from { opacity: 0; transform: translate(-50%, 16px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastraus { to { opacity: 0; transform: translate(-50%, 12px) scale(.96); } }

code { font-size: .88em; background: var(--flaeche-2); padding: 2px 6px; border-radius: 6px; }
details summary { cursor: pointer; font-weight: 500; margin: 12px 0; color: var(--akzent); list-style: none; }
details.aufklapp > summary { color: var(--text); margin: 0; }
details.aufklapp > summary::before { content: none; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "›"; display: inline-block; margin-right: 8px; transition: transform .25s var(--weich); }
details[open] summary::before { transform: rotate(90deg); }
.anleitung { padding-left: 20px; }
.anleitung li { margin-bottom: 8px; }
.adresse.thema { font-size: 1.05rem; margin: 8px 0; padding: 10px 14px; border-radius: var(--radius-klein); background: var(--flaeche-2); overflow-wrap: anywhere; font-family: ui-monospace, Consolas, monospace; }
.adresse { font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; user-select: all; }
.anmeldung { max-width: 420px; margin: 8vh auto 0; text-align: center; }
.anmeldung input { text-align: center; font-size: 1.6rem !important; letter-spacing: .4em; }
[hidden] { display: none !important; }
body.ohne-navi .navi { display: none; }
.anmeldung.breit { max-width: 520px; text-align: left; }
.anmeldung.breit input { text-align: left; font-size: 1.02rem !important; letter-spacing: normal; }
.anmeldung-logo { width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 12px; display: block; }
#login-form input, #reset-form input { text-align: left; font-size: 1.02rem !important; letter-spacing: normal; }
#login-form, #reset-form { text-align: left; }
.einwilligung { display: flex !important; gap: 12px; align-items: flex-start; color: var(--text) !important; font-size: .88rem !important; line-height: 1.45; }
.einwilligung input { flex: none; width: 22px; height: 22px; margin-top: 2px; }
.einrichtung { display: grid; gap: 24px; }
.einrichtung .knopf[type=submit] { justify-self: start; }
.gefahr { border: 1px solid color-mix(in srgb, var(--rot) 30%, transparent); }
.knopf.gefahr-knopf { background: var(--rot); }
.gefahr-text { color: var(--rot) !important; }
.link-feld { display: flex; gap: 8px; margin-top: 12px; }
.link-feld input { flex: 1; min-width: 0; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--linie); background: var(--flaeche-2); color: var(--text); font: inherit; font-size: .85rem; }
td.aktionen { white-space: nowrap; }

/* Navigationssymbole – nur in der Tab-Leiste am Handy sichtbar */
.navi svg { display: none; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Seitenkopf mit Aktion (Wochenwechsel) */
.seitenkopf.mit-aktion { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.wochenwahl { display: flex; gap: 8px; align-items: center; }
.wochenwahl .knopf { background: var(--flaeche); color: var(--text); }
.knopf.rund { width: 44px; padding: 0; font-size: 1.4rem; line-height: 1; }
.knopf.klein { min-height: 36px; padding: 0 16px; font-size: .9rem; }
.knopf.datei { position: relative; overflow: hidden; }
.knopf.datei input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.knopf-x { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--flaeche-2); color: var(--leise); font-size: 1.2rem; line-height: 1; cursor: pointer; transition: background .2s, color .2s, transform .15s; }
.knopf-x:hover { background: var(--rot-weich); color: var(--rot); }
.knopf-x:active { transform: scale(.9); }
.zwei-spalten { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; }
.feldreihe { display: grid; gap: 0 16px; grid-template-columns: 1fr 1fr; }
.feldreihe.drei { grid-template-columns: 2fr 1fr auto; align-items: end; }
.feldreihe.drei .knopf { margin-bottom: 18px; }
.feldreihe.vier { grid-template-columns: repeat(4, 1fr); }
button.umschalter, .umschalter button { border: 0; font: inherit; cursor: pointer; }
.umschalter button { padding: 6px 14px; border-radius: 999px; background: transparent; color: var(--leise); font-size: .88rem; font-weight: 500; transition: background .25s var(--weich), color .25s; }
.umschalter button[aria-selected="true"] { background: var(--segment-aktiv); color: var(--text); }
.umschalter + .reiter, .reiter { margin-top: 18px; }

/* Pillen und Tageskategorien */
.pille { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--flaeche-2); color: var(--leise); margin-right: 6px; }
.pille.intensiv { background: var(--rot-weich); color: var(--rot); }
.pille.ok { background: var(--gruen-weich); color: color-mix(in srgb, var(--gruen) 75%, var(--text)); }
.pille.eigen { background: color-mix(in srgb, #af52de 14%, transparent); color: color-mix(in srgb, #af52de 80%, var(--text)); }
.abgleich { margin: 10px 0 0; padding: 10px 14px; border-radius: var(--radius-klein); font-size: .9rem; font-weight: 500; }
.abgleich.ok { background: var(--gruen-weich); }
.abgleich.abweichung { background: var(--gelb-weich); }
.pille.heute-pille { background: rgba(166, 255, 0, .16); color: var(--akzent); }
:root { --kat-ruhe: var(--grau); --kat-grundlage: var(--blau); --kat-kraft: #af52de; --kat-reiz: var(--rot); --kat-lang: var(--gruen); --kat-test: #ff9f0a; --kat-rennen: #ff2d55; --kat-vortag_rennen: #5ac8fa; }
.kat-ruhe { --kat: var(--kat-ruhe); } .kat-grundlage { --kat: var(--kat-grundlage); } .kat-kraft { --kat: var(--kat-kraft); }
.kat-reiz { --kat: var(--kat-reiz); } .kat-lang { --kat: var(--kat-lang); } .kat-test { --kat: var(--kat-test); }
.kat-rennen { --kat: var(--kat-rennen); } .kat-vortag_rennen { --kat: var(--kat-vortag_rennen); }
.pille[class*="kat-"] { background: color-mix(in srgb, var(--kat) 14%, transparent); color: color-mix(in srgb, var(--kat) 80%, var(--text)); }

/* Einheiten */
.einheiten { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.einheit { display: flex; align-items: center; gap: 14px; }
.einheit > div { display: grid; gap: 2px; flex: 1; min-width: 0; }
.einheit-punkt { flex: none; width: 10px; height: 36px; border-radius: 6px; background: var(--blau); }
.typ-ruhetag { background: var(--grau); } .typ-regeneration { background: #5ac8fa; } .typ-kraft { background: #af52de; }
.typ-lang, .typ-fatmax { background: var(--gruen); } .typ-sweetspot, .typ-schwelle { background: #ff9f0a; }
.typ-vo2max, .typ-test, .typ-rennen { background: var(--rot); } .typ-skitour { background: #64d2ff; }
.ist-block { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--linie); display: grid; gap: 8px; }
.ist-zeile { display: grid; gap: 2px; }
.plan-hinweis { margin-top: 16px; font-weight: 500; }
.fueling-soll { margin: 16px 0 0; }

/* Fueling-Plan */
.fueling-plan { margin-top: 16px; padding: 2px 16px; border-radius: var(--radius-klein); background: var(--flaeche-2); border-top: 0; }
.fueling-plan > summary { font-size: .95rem; gap: 12px; }
.fueling-plan + .chips, .fueling-plan + p { margin-top: 14px; }
.fueling-schritte { display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px; margin: 4px 0 12px; font-size: .93rem; }
.fueling-schritte dt { color: var(--leise); font-weight: 600; }
.fueling-schritte dd { margin: 0; display: grid; gap: 6px; }
.fueling-produkte { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.fueling-produkte li { padding: 4px 10px; border-radius: 999px; background: var(--flaeche-3); font-size: .85rem; }
.fueling-hinweis { margin: 0 0 8px; }

/* Aktivitätsringe und Makros */
.ernaehrung-raster { display: grid; grid-template-columns: 150px 1fr; gap: 28px; align-items: center; }
.ringe { width: 150px; aspect-ratio: 1; }
.ringe svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ringe circle { fill: none; stroke-width: 13; stroke-linecap: round; }
.ring-spur.energie { stroke: rgba(250, 17, 79, .22); } .ring-spur.kh { stroke: rgba(166, 255, 0, .2); } .ring-spur.protein { stroke: rgba(0, 240, 255, .2); }
.ring-wert { stroke-dasharray: var(--umfang); stroke-dashoffset: var(--umfang); animation: ringfuellen 1s .15s var(--weich) forwards; }
.ring-wert.energie { stroke: var(--energie); } .ring-wert.kh { stroke: var(--kh); } .ring-wert.protein { stroke: var(--protein); }
.ring-wert.runde2 { animation-delay: 1.05s; filter: drop-shadow(0 0 2px rgba(0, 0, 0, .9)); }
@keyframes ringfuellen { to { stroke-dashoffset: var(--rest); } }
.ring-zeile { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; align-items: baseline; }
.ring-zeile .ring-name { font-size: .82rem; font-weight: 600; }
.ring-zeile .leise { font-size: .78rem; text-align: right; white-space: nowrap; }
.ring-zeile strong { grid-column: 1 / -1; grid-row: 2; font-size: 1.45rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; white-space: nowrap; }
.ring-zeile strong small { font-size: .85rem; font-weight: 600; color: var(--leise); margin-left: 2px; }
.ring-zeile.energie .ring-name { color: var(--energie); } .ring-zeile.kh .ring-name { color: var(--kh); } .ring-zeile.protein .ring-name { color: var(--protein); }
.makros { display: grid; gap: 14px; min-width: 0; }
.makros p { margin: 0; }
.makro .zeile { font-size: .9rem; font-weight: 500; margin-bottom: 6px; }
.leiste { height: 8px; border-radius: 999px; background: var(--flaeche-2); overflow: hidden; }
.leiste span { display: block; height: 100%; border-radius: inherit; background: var(--kh); transform-origin: left; animation: wachsen 1s .2s var(--weich) both; }
.makro.protein .leiste span { background: var(--protein); }
.makro.fett .leiste span { background: var(--fett); }
.makro.fett .zeile span:first-child { color: var(--fett); font-weight: 600; font-size: .82rem; }
.naechste { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; padding: 16px 18px; border-radius: var(--radius-klein); background: var(--flaeche-2); }
.naechste > div { display: grid; gap: 2px; min-width: 0; }

/* Offene Punkte */
.offen-liste { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.offen-liste a { display: inline-flex; padding: 8px 16px; border-radius: 999px; background: var(--gelb-weich); color: var(--text); font-weight: 500; font-size: .92rem; }
.offen-liste a:hover { text-decoration: none; filter: brightness(.97); }

/* Wochenleiste (Heute) */
.wochenleiste { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.wtag { display: grid; justify-items: center; gap: 6px; padding: 14px 6px; border-radius: var(--radius-klein); background: var(--flaeche-2); color: var(--text); text-align: center; transition: transform .25s var(--weich), background .25s; min-width: 0; }
.wtag:hover { text-decoration: none; transform: translateY(-2px); }
.wtag.heute { background: var(--flaeche-2); box-shadow: inset 0 0 0 2px var(--akzent); }
.wtag-name { font-size: .8rem; font-weight: 600; color: var(--leise); }
.wtag-punkt { width: 10px; height: 10px; border-radius: 50%; background: var(--kat, var(--grau)); }
.wtag-text { font-size: .8rem; font-weight: 500; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.wtag .leise { font-size: .75rem; }

/* Woche: Tageskarten */
.tage { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.tag { display: grid; gap: 16px; align-content: start; }
.tag.ist-heute { box-shadow: var(--schatten-hoch), inset 0 0 0 2px var(--akzent); }
.tag-kopf { align-items: flex-start; flex-wrap: nowrap; }
.knopf-icon { flex: none; width: 36px; height: 36px; display: grid; place-content: center; border: 0; border-radius: 50%; background: var(--flaeche-2); color: var(--akzent); cursor: pointer; transition: background .2s, transform .15s var(--weich); }
.knopf-icon:hover { background: var(--flaeche-3); }
.knopf-icon:active { transform: scale(.92); }
.knopf-icon[aria-expanded="true"] { background: var(--akzent); color: var(--akzent-text); }
.knopf-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tag-kopf h2 { margin-bottom: 8px; }
.tag-essen { display: block; padding-top: 12px; border-top: 1px solid var(--linie); }
.tag-essen:hover { color: var(--akzent); text-decoration: none; }
.editor { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--linie); animation: hochgleiten .35s var(--weich) both; }
.editor-zeilen { display: grid; gap: 10px; }
.editor-zeile { display: grid; grid-template-columns: 1fr 76px 32px; gap: 8px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--linie); }
.editor-zeile:last-child { border-bottom: 0; padding-bottom: 0; }
.editor-zeile [data-feld="watt"], .editor-zeile [data-feld="intervalle"], .editor-zeile [data-feld="notiz"] { grid-column: 1 / 3; }
.editor-zeile [data-entfernen] { grid-column: 3; grid-row: 1; }
.einheit-intervalle { display: block; font-size: .85rem; color: var(--text); margin-top: 2px; }

/* Segment-Steuerung (iOS) */
.segment { display: flex; gap: 2px; padding: 2px; border-radius: 10px; background: var(--flaeche-2); margin: 12px 0 4px; max-width: 460px; }
.segment button { flex: 1; min-height: 32px; padding: 0 6px; white-space: nowrap; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; transition: background .2s var(--weich); }
.segment button[aria-checked="true"] { background: var(--segment-aktiv, #636366); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.editor select, .editor input, .foto-ergebnis input { min-height: 40px; font: inherit; font-size: .92rem; color: var(--text); background: var(--flaeche-2); border: 1px solid transparent; border-radius: 10px; padding: 0 10px; min-width: 0; }
.editor select:focus, .editor input:focus, .foto-ergebnis input:focus { outline: none; border-color: var(--akzent); background: var(--flaeche); }
.editor .knopfzeile { margin-top: 4px; }
.editor p { margin: 0; }

/* Essen: Tageswahl */
.tagwahl { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.tagwahl a { display: grid; justify-items: center; gap: 2px; padding: 10px 4px; border-radius: 16px; background: var(--flaeche); color: var(--text); transition: transform .25s var(--weich), background .25s, color .25s; }
.tagwahl a:hover { text-decoration: none; transform: translateY(-2px); }
.tagwahl a span:first-child { font-size: .78rem; color: var(--leise); font-weight: 500; }
.tagwahl a strong { font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; }
.tagwahl a.heute strong { color: var(--akzent); }
.tagwahl a[aria-current] { background: var(--akzent); color: var(--akzent-text); }
.tagwahl a[aria-current] span, .tagwahl a[aria-current] strong { color: inherit; }
.fortschritt { font-size: .5rem; letter-spacing: 2px; color: var(--leise); }

/* Mahlzeiten */
.mahlzeiten { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.mahlzeit { display: grid; gap: 8px; align-content: start; transition: opacity .3s, transform .35s var(--weich), box-shadow .35s var(--weich); }
.mahlzeit h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -.02em; margin: 0; line-height: 1.3; }
.mahlzeit p { margin: 0; }
.mahlzeit.status-gegessen, .mahlzeit.status-geaendert { background: color-mix(in srgb, var(--gruen) 10%, var(--flaeche)); }
.mahlzeit .knopfzeile { margin-top: 8px; }
.mahlzeit details summary { margin: 4px 0; }
.zutaten { list-style: none; margin: 4px 0 12px; padding: 0; display: grid; gap: 6px; font-size: .93rem; }
.zutaten li { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--linie); }
.zutaten li span:last-child { color: var(--leise); font-variant-numeric: tabular-nums; }
.schritte { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: .93rem; }
.portion { display: grid; gap: 10px; animation: hochgleiten .3s var(--weich) both; }
.chip-knopf { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--flaeche-2); color: var(--text); font: inherit; font-size: .9rem; font-weight: 500; cursor: pointer; transition: background .2s, transform .15s var(--weich); }
.chip-knopf:hover { background: var(--flaeche-3); }
.chip-knopf:active { transform: scale(.94); }
.chip-knopf:disabled { opacity: .5; }

/* Mahlzeit anpassen / tauschen */
.mahlzeit .editor { margin-top: 4px; }
.zutaten.bearbeiten li { align-items: center; }
.zutaten.bearbeiten .menge { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: var(--leise); }
.zutaten.bearbeiten .menge input { width: 64px; min-height: 34px; text-align: right; }
.zutaten.bearbeiten .knopf-x { width: 28px; height: 28px; font-size: 1rem; }
.zutat-neu { display: grid; grid-template-columns: 1fr 64px auto; gap: 8px; align-items: center; }
.vorschau { margin: 0; padding: 10px 14px; border-radius: var(--radius-klein); background: var(--flaeche-2); font-weight: 600; font-size: .92rem; font-variant-numeric: tabular-nums; }
.chips .leise { align-self: center; margin-right: 2px; }
.tausch-tag { display: grid; gap: 6px; }
.tausch-datum { font-size: .78rem; font-weight: 600; color: var(--leise); text-transform: uppercase; letter-spacing: .05em; margin-top: 6px; }
.tausch-ziel { display: grid; gap: 1px; text-align: left; padding: 10px 14px; border: 0; border-radius: var(--radius-klein); background: var(--flaeche-2); color: var(--text); font: inherit; cursor: pointer; transition: background .2s, transform .15s var(--weich); }
.tausch-ziel:hover { background: var(--flaeche-3); }
.tausch-ziel:active { transform: scale(.98); }
.tausch-ziel strong { font-size: .95rem; font-weight: 600; }

/* Foto-Schätzung */
#foto-ergebnis { margin-top: 18px; }
.foto-ergebnis { display: grid; gap: 12px; padding: 16px; border-radius: var(--radius-klein); background: var(--flaeche-2); animation: hochgleiten .35s var(--weich) both; }
.foto-ergebnis h3 { margin: 0; font-size: 1.1rem; }
.foto-gross { width: 100%; max-height: 260px; object-fit: cover; border-radius: var(--radius-klein); }
.foto-ergebnis .zutaten.bearbeiten li { border-bottom-color: color-mix(in srgb, var(--text) 10%, transparent); }
.foto-ergebnis .vorschau { background: var(--flaeche); }
.foto-ergebnis > * { min-width: 0; }
.foto-ergebnis input { background: var(--flaeche); width: 100%; }
.foto-ergebnis .chip-knopf { background: var(--flaeche); }
.zutat-neu > * { min-width: 0; }
.zutaten.bearbeiten li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.foto-fragen { display: grid; gap: 10px; }
.foto-frage { display: grid; gap: 6px; }
.chip-knopf[aria-pressed="true"] { background: var(--akzent); color: var(--akzent-text); }
.foto-laedt { margin: 0; padding: 18px; border-radius: var(--radius-klein); background: var(--flaeche-2); color: var(--leise); animation: pulsieren 1.6s ease-in-out infinite; }
@keyframes pulsieren { 50% { opacity: .55; } }
.pille.sicher-hoch { background: var(--gruen-weich); }
.pille.sicher-mittel { background: var(--gelb-weich); }
.pille.sicher-niedrig { background: var(--rot-weich); }
.liste li .knopf.klein { flex: none; }

/* Listen (Extras, Fueling) */
.liste { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.liste li { display: flex; align-items: center; gap: 14px; }
.liste li > div { display: grid; gap: 2px; flex: 1; min-width: 0; }
.liste.kompakt { margin-top: 16px; }
.foto-mini { flex: none; width: 52px; height: 52px; border-radius: 12px; object-fit: cover; display: block; background: var(--flaeche-2); }
.foto-mini.leer { display: grid; place-content: center; color: var(--leise); font-size: 1.2rem; }
#fueling .chips { margin-bottom: 16px; }
#fueling .formular label { margin-bottom: 0; }
#fueling .feldreihe.drei .knopf { margin-bottom: 0; }

/* Einkaufsliste */
.einkauf-spalten { columns: 3 240px; column-gap: 32px; }
.einkauf-gruppe { break-inside: avoid; margin-bottom: 20px; }
.einkauf-gruppe h3 { font-size: .8rem; font-weight: 600; color: var(--leise); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 8px; }
.einkauf { list-style: none; margin: 0; padding: 0; }
.haken { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--linie); cursor: pointer; }
.haken input { appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border-radius: 50%; border: 2px solid var(--flaeche-3); background: transparent; cursor: pointer; transition: background .2s, border-color .2s; position: relative; }
.haken input:checked { background: var(--akzent); border-color: var(--akzent); }
.haken input:checked::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #000; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.haken-text { flex: 1; transition: color .2s, opacity .2s; }
.haken input:checked ~ .haken-text { color: var(--leise); text-decoration: line-through; }
.einkauf-posten { display: grid; grid-template-columns: 1fr auto auto; align-items: center; column-gap: 8px; border-bottom: 1px solid var(--linie); }
.einkauf-posten .haken { border-bottom: 0; min-width: 0; }
.einkauf-posten > span:not(.einkauf-plan) { padding: 10px 0; }
.einkauf-menge { border: 0; background: none; color: var(--leise); font: inherit; font-size: .88rem; text-align: right; padding: 8px 4px; cursor: pointer; border-radius: 8px; }
.einkauf-menge:hover { color: var(--text); background: var(--linie); }
.einkauf-menge small { display: block; font-size: .75rem; }
.einkauf-posten .haken-text { overflow-wrap: anywhere; }
.einkauf-posten.erledigt .einkauf-menge { text-decoration: line-through; }
.einkauf-plan, .einkauf-menge-form { grid-column: 1 / -1; padding: 0 0 8px 34px; font-size: .85rem; }
.einkauf-menge-form { display: flex; gap: 8px; align-items: end; }
.einkauf-menge-form input, .einkauf-neu input, .einkauf-eigen-zeitraum input { min-height: 40px; font: inherit; font-size: .92rem; color: var(--text); background: var(--flaeche-2); border: 1px solid transparent; border-radius: 10px; padding: 0 10px; min-width: 0; }
.einkauf-menge-form label { display: grid; gap: 4px; color: var(--leise); }
.einkauf-einheit-form select { min-height: 40px; font: inherit; font-size: .92rem; color: var(--text); background: var(--flaeche-2); border: 0; border-radius: 10px; padding: 0 8px; }
.einkauf-menge-form { flex-wrap: wrap; }
.einkauf-neu { display: grid; grid-template-columns: 1fr 96px auto; gap: 8px; margin-top: 10px; }
.einkauf-eigen-zeitraum { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; margin: 8px 0 12px; }
.einkauf-eigen-zeitraum label { display: grid; gap: 4px; font-size: .85rem; color: var(--leise); }
.knopf-icon.klein { width: 32px; height: 32px; }
.knopf-icon.klein svg { width: 16px; height: 16px; }
.knopf-link { border: 0; background: none; color: var(--akzent); font: inherit; padding: 0; cursor: pointer; }
.knopf-link:hover { text-decoration: underline; }
details.aufklapp { border-top: 1px solid var(--linie); padding-top: 4px; margin-top: 12px; }
details.aufklapp > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 44px; cursor: pointer; font-weight: 600; }
details.aufklapp > summary::-webkit-details-marker { display: none; }
details.aufklapp > summary::after { content: ""; width: 8px; height: 8px; border: solid var(--leise); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .25s var(--weich); margin-right: 6px; }
details.aufklapp[open] > summary::after { transform: rotate(-135deg); }

/* Mehr */
.linkliste { padding: 8px 0; display: grid; }
.linkliste a { display: flex; align-items: center; gap: 16px; padding: 18px 28px; color: var(--text); border-bottom: 1px solid var(--linie); transition: background .2s; }
.linkliste a:last-child { border-bottom: 0; }
.linkliste a:hover { background: var(--flaeche-2); text-decoration: none; }
.linkliste a strong { font-weight: 600; }
.linkliste a > div { display: grid; gap: 2px; flex: 1; }
.pfeil { color: var(--leise); font-size: 1.4rem; }

/* Handy */
@media (max-width: 799px) {
  .navi svg { display: block; margin: 0 auto 2px; }
  .ernaehrung-raster { grid-template-columns: 118px 1fr; gap: 18px; }
  .ringe { width: 118px; }
  .ring-zeile strong { font-size: 1.2rem; }
  .zwei-spalten { gap: 16px; }
  .wochenleiste { gap: 4px; }
  .wtag { padding: 10px 2px; }
  .wtag-text { display: none; }
  .tagwahl { gap: 4px; }
  .feldreihe.vier { grid-template-columns: 1fr 1fr; }
  .feldreihe.drei { grid-template-columns: 1fr 90px; }
  .feldreihe.drei .knopf { grid-column: 1 / -1; }
  .naechste { flex-wrap: wrap; }
  .linkliste a { padding: 16px 22px; }
  .seitenkopf.mit-aktion { align-items: center; }
  .fueling-schritte { grid-template-columns: 1fr; gap: 2px; }
  .fueling-schritte dd { margin-bottom: 8px; }
  body { font-size: 16px; }
  /* backdrop-filter am Kopf würde die feste Navigation an den Kopf binden */
  .kopf { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); border-bottom: 0; position: static; }
  .kopf-innen { padding: 12px 20px; }
  main { padding: 20px 16px 32px; gap: 16px; }
  .karte { padding: 22px; }
  .ampel { padding: 26px 22px; }
  .raster { gap: 16px; grid-template-columns: 1fr 1fr; }
  .raster > .karte:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .kennzahl .gross { font-size: 2.1rem; }
  .navi { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; justify-content: space-around; gap: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--glas); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--linie); }
  .navi a { flex: 1; text-align: center; padding: 10px 2px; font-size: .72rem; border-radius: 12px; }
  .navi a[aria-current] { background: transparent; box-shadow: none; color: var(--akzent); }
  .navi { border-top-color: rgba(255, 255, 255, .08); }
  .werte { grid-template-columns: 1fr; gap: 2px; }
  .werte dd { margin-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .diagramm .linie { stroke-dashoffset: 0; }
}
.knopf.text { background: transparent; color: var(--akzent); padding: 0 12px; }
.knopf.text:hover { background: var(--linie); }
