/* Eigenes Layout für Rauchfrei. Nur Variablen aus tokens.css, keine eigenen Farben.
   Wird nach tokens.css, basis.css und kacheln.css geladen. */

/* ---------- Seitenrahmen ---------- */
.app .container { max-width: 1040px; }
.app .container.schmal { max-width: 560px; }

.kopfzeile { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s-3) var(--s-5); padding-block: var(--s-4); border-bottom: 1px solid var(--border); }
.logo { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-h4); color: var(--text); text-decoration: none; }
.logo:hover { color: var(--text); }
.logo span { color: var(--gelb); }
.konto { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); font-size: var(--fs-sm); }
.konto__mail { color: var(--text-muted); overflow-wrap: anywhere; }
.konto form { margin: 0; }
.btn--klein { padding: var(--s-2) var(--s-4); }

.hero { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-4); padding-block: var(--s-7) var(--s-5); }
.hero p { color: var(--text-muted); }

.abschnitt { padding-block: var(--s-7); }
.abschnitt h2 { margin: var(--s-3) 0 var(--s-5); }
.abschnitt__intro { color: var(--text-muted); margin-bottom: var(--s-5); }
.stapel > * + * { margin-top: var(--s-4); }

.fuss { padding-block: var(--s-6); border-top: 1px solid var(--border); color: var(--text-dim); font-size: var(--fs-sm); }
.fuss p { max-width: none; }

/* ---------- Formulare ---------- */
.form { display: grid; gap: var(--s-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s-6); }
.form .btn { justify-self: start; }
@media (max-width: 480px) { .form { padding: var(--s-5); } }

/* ---------- Zähler und Kennzahlen ---------- */
.zaehler { text-align: center; padding-block: var(--s-7); margin-bottom: var(--s-4); }
.zaehler .kachel__label { margin-bottom: var(--s-4); }
.zaehler__tage { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-display); line-height: var(--lh-head); font-variant-numeric: tabular-nums; }
.zaehler__uhr { font-family: var(--font-mono); color: var(--text-muted); font-variant-numeric: tabular-nums; margin-top: var(--s-3); white-space: pre; }

.zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: var(--s-4); }
.kachel.kompakt { padding: var(--s-5); }
.zahl-gross { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-h3); line-height: var(--lh-head); font-variant-numeric: tabular-nums; }

/* ---------- Einstellungen (aufklappbar) ---------- */
.einstellungen > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); }
.einstellungen > summary::-webkit-details-marker { display: none; }
.einstellungen > summary::after { content: "+"; flex: none; font-family: var(--font-mono); font-size: var(--fs-h4); line-height: 1; color: var(--text-muted); }
.einstellungen[open] > summary::after { content: "–"; }
.einstellungen > summary .kachel__titel { margin: 0; }
.einstellungen form { margin-top: var(--s-5); display: grid; gap: var(--s-4); }
.einstellungen .btn { justify-self: start; }
.felder { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: var(--s-4); }
#formok { margin-top: var(--s-4); }

/* ---------- Fortschrittsbalken ---------- */
.balken { height: var(--s-2); border-radius: var(--radius-pill); background: var(--surface-2); overflow: hidden; margin-top: var(--s-4); }
.balken__fuellung { height: 100%; width: 0; border-radius: inherit; background: var(--lila); }
.prozent { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Erfolge ---------- */
.zaehlung { font-family: var(--font-mono); font-size: var(--fs-sm); font-weight: 400; color: var(--text-muted); letter-spacing: 0; }
.ziele { margin-bottom: var(--s-6); }
.abzeichen { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr)); gap: var(--s-3); }
.abzeichen__eintrag { display: flex; flex-direction: column; align-items: center; gap: var(--s-1); text-align: center; padding: var(--s-4) var(--s-3); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.abzeichen__eintrag strong { font-family: var(--font-head); font-size: var(--fs-sm); color: var(--text-muted); }
.abzeichen__zeichen { width: 2em; height: 2em; margin-bottom: var(--s-1); border-radius: 50%; display: grid; place-content: center; border: 1px solid var(--border); font-family: var(--font-mono); font-weight: 700; color: var(--gelb-ink); }
.abzeichen__eintrag.ist-erreicht { border-color: var(--lila); background: color-mix(in srgb, var(--lila) 14%, transparent); }
.abzeichen__eintrag.ist-erreicht strong { color: var(--text); }
.abzeichen__eintrag.ist-erreicht small { color: var(--lila-text); }
.abzeichen__eintrag.ist-erreicht .abzeichen__zeichen { background: var(--gelb); border-color: var(--gelb); }

/* ---------- Gesundheitliche Meilensteine ---------- */
.meilenstein { display: flex; flex-direction: column; }
.meilenstein .kachel__text { flex: 1; }
.meilenstein__fuss { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-4); }
.meilenstein__fuss .balken { flex: 1; margin: 0; }

/* ---------- Ausrutscher-Simulation ---------- */
.sim { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: var(--s-4); align-items: start; margin-bottom: var(--s-4); }
.sim .feld + .feld { margin-top: var(--s-4); }
.sim .klein { margin-top: var(--s-4); }
.sim label strong { color: var(--text); font-family: var(--font-mono); }
input[type="range"] { width: 100%; accent-color: var(--gelb); }
input[type="range"]:disabled { opacity: .45; }
.kurve { width: 100%; height: auto; }
.kurve text { fill: var(--text-dim); font-family: var(--font-mono); font-size: var(--fs-xs); }
.kurve .achse { stroke: var(--border); stroke-width: 1; }
.kurve .linie { stroke: var(--lila); stroke-width: 2.5; fill: none; }

/* ---------- Sicherung ---------- */
.sicherung { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: var(--s-4); }
.sicherung .kachel__text { margin-bottom: var(--s-4); }

/* ---------- Verwaltung ---------- */
.aktionen { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.aktionen form { margin: 0; }
.tabelle td { vertical-align: middle; }
