/* WG Zentrale — Garagen-/Fahrtenbuch-Palette: Werkstattpapier, Asphalt, Blinker-Amber */
:root {
  --bg: #F1F2ED;
  --surface: #FFFFFF;
  --surface-2: #E8E9E1;
  --ink: #1E2321;
  --ink-muted: #58625D;
  --ink-faint: #89938D;
  --line: #D9DBD0;
  --accent: #B8691A;
  --accent-strong: #9A5512;
  --accent-ink: #FFFFFF;
  --accent-soft: #F5E3CB;
  --good: #2F7A5E;
  --good-soft: #DCEEE6;
  --debt: #B03A2A;
  --debt-soft: #F6DFDA;
  --info: #35698A;
  --info-soft: #DDE9F1;
  --p0: #B8691A;
  --p1: #2563B8;
  --p2: #4F8F2A;
  --p3: #9048A8;
  --radius: 10px;
  --radius-s: 6px;
  --shadow: 0 1px 2px rgba(30,35,33,.07), 0 1px 1px rgba(30,35,33,.04);
  --shadow-2: 0 10px 30px rgba(30,35,33,.18);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  --tabbar-h: 66px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171915;
    --surface: #20231E;
    --surface-2: #2A2E27;
    --ink: #ECEAE0;
    --ink-muted: #A9AD9F;
    --ink-faint: #777F73;
    --line: #353930;
    --accent: #E8A33D;
    --accent-strong: #F2B65C;
    --accent-ink: #171915;
    --accent-soft: #3A3120;
    --good: #62B290;
    --good-soft: #1E332B;
    --debt: #E57C6B;
    --debt-soft: #3B2522;
    --info: #86B6D8;
    --info-soft: #1F2E38;
    --p0: #D07B22;
    --p1: #3F8FE6;
    --p2: #62A02A;
    --p3: #B86BD6;
    --shadow: 0 1px 2px rgba(0,0,0,.35);
    --shadow-2: 0 10px 30px rgba(0,0,0,.55);
  }
}
:root[data-theme="dark"] {
    --bg: #171915;
    --surface: #20231E;
    --surface-2: #2A2E27;
    --ink: #ECEAE0;
    --ink-muted: #A9AD9F;
    --ink-faint: #777F73;
    --line: #353930;
    --accent: #E8A33D;
    --accent-strong: #F2B65C;
    --accent-ink: #171915;
    --accent-soft: #3A3120;
    --good: #62B290;
    --good-soft: #1E332B;
    --debt: #E57C6B;
    --debt-soft: #3B2522;
    --info: #86B6D8;
    --info-soft: #1F2E38;
    --p0: #D07B22;
    --p1: #3F8FE6;
    --p2: #62A02A;
    --p3: #B86BD6;
    --shadow: 0 1px 2px rgba(0,0,0,.35);
    --shadow-2: 0 10px 30px rgba(0,0,0,.55);
  }


:root { color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 750; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 650; }
p { margin: 0; }
a { color: var(--info); }
.muted { color: var(--ink-muted); }
.faint { color: var(--ink-faint); }
.small { font-size: 13px; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- Login / Einladung ---------- */
body.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.gate-card {
  width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 26px 22px; box-shadow: var(--shadow); display: grid; gap: 18px;
}
.gate-brand { display: flex; gap: 14px; align-items: center; }
.gate-brand p { font-size: 13.5px; }

/* ---------- Grundgerüst ---------- */
.shell { max-width: 1040px; margin: 0 auto; padding: 0 16px calc(var(--tabbar-h) + 28px + env(safe-area-inset-bottom)); }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px;
  padding: calc(10px + env(safe-area-inset-top)) 0 10px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.brand img { border-radius: 8px; box-shadow: 0 2px 6px rgba(10,30,56,.25); }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.sos-btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 56px; height: 36px; padding: 0 14px;
  border-radius: 99px; background: var(--debt); color: #fff; font-weight: 800; font-size: 14px; letter-spacing: .08em; text-decoration: none;
  box-shadow: 0 3px 10px color-mix(in srgb, var(--debt) 35%, transparent);
}
.avatar {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #2F6DB0, #17406F); color: #fff; font-weight: 800; font-size: 15px; text-decoration: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px color-mix(in srgb, #2F6DB0 45%, transparent);
}
.av-blau    { background: linear-gradient(135deg, #2F6DB0, #17406F); }
.av-tulpe   { background: linear-gradient(135deg, #F273A1, #C2306A); }
.av-orange  { background: linear-gradient(135deg, #F5A142, #C2650F); }
.av-gruen   { background: linear-gradient(135deg, #4CC48C, #1C8758); }
.av-violett { background: linear-gradient(135deg, #A97CF0, #5A6474); }
.av-tuerkis { background: linear-gradient(135deg, #3CC2C8, #12808A); }
.av-rot     { background: linear-gradient(135deg, #EF6B5A, #B03A2A); }
.av-graphit { background: linear-gradient(135deg, #6E777D, #2A2F33); }
.avatar:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sos-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.who {
  font-size: 13px; font-weight: 650; padding: 4px 10px; border-radius: 99px;
  background: var(--surface-2); color: var(--ink-muted);
}
.view { outline: none; display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); }
.view > *, .section > * { min-width: 0; }
.section { grid-template-columns: minmax(0, 1fr); }
.loading { padding: 40px 0; text-align: center; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px rgba(30,35,33,.06);
  padding: 0 4px env(safe-area-inset-bottom);
}
/* Jede Rubrik hat ihre Farbe: --tc = kräftige Fläche, --tc-ink = Icon/Schrift, --tc-soft = Hauch */
.tab-home  { --tc: #E07A1F; --tc-2: #F5A142; --tc-ink: #C2650F; --tc-soft: #FCE9D4; }
.tab-money { --tc: #23A06A; --tc-2: #4CC48C; --tc-ink: #1C8758; --tc-soft: #D8F2E5; }
.tab-car   { --tc: #2D6BD6; --tc-2: #5B93F0; --tc-ink: #2459B8; --tc-soft: #DCE7FB; }
.tab-clean { --tc: #6F7A8A; --tc-2: #8C96A4; --tc-ink: #5A6474; --tc-soft: #E7EAEE; }
.tab-more  { --tc: #DB3F78; --tc-2: #F273A1; --tc-ink: #C2306A; --tc-soft: #FBDDE8; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tabbar { box-shadow: 0 -6px 24px rgba(0,0,0,.35); }
  :root:not([data-theme="light"]) .tab-home { --tc-ink: #F4A65A; --tc-soft: #3A2A18; }
  :root:not([data-theme="light"]) .tab-money { --tc-ink: #5FD19C; --tc-soft: #173326; }
  :root:not([data-theme="light"]) .tab-car { --tc-ink: #7FAAF5; --tc-soft: #1A2742; }
  :root:not([data-theme="light"]) .tab-clean { --tc-ink: #A7B0BD; --tc-soft: #262A30; }
  :root:not([data-theme="light"]) .tab-more { --tc-ink: #F58AB2; --tc-soft: #3D1D2A; }
}
:root[data-theme="dark"] .tabbar { box-shadow: 0 -6px 24px rgba(0,0,0,.35); }
:root[data-theme="dark"] .tab-home { --tc-ink: #F4A65A; --tc-soft: #3A2A18; }
:root[data-theme="dark"] .tab-money { --tc-ink: #5FD19C; --tc-soft: #173326; }
:root[data-theme="dark"] .tab-car { --tc-ink: #7FAAF5; --tc-soft: #1A2742; }
:root[data-theme="dark"] .tab-clean { --tc-ink: #A7B0BD; --tc-soft: #262A30; }
:root[data-theme="dark"] .tab-more { --tc-ink: #F58AB2; --tc-soft: #3D1D2A; }

.tabbar a {
  display: grid; justify-items: center; align-content: center; gap: 3px; padding: 8px 2px 7px; min-height: var(--tabbar-h);
  color: var(--ink-muted); text-decoration: none; font-size: 11.5px; font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}
.tabbar a .dot {
  position: relative; display: grid; place-items: center; width: 56px; height: 32px; border-radius: 16px;
  color: var(--tc-ink); transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.tabbar a svg { width: 23px; height: 23px; }
.tabbar a svg .fi { fill: currentColor; stroke: none; opacity: .22; }
.tabbar a svg .spark { stroke-width: 1.6; opacity: 0; }
.tabbar a:hover .dot { background: var(--tc-soft); }
.tabbar a:active .dot { transform: scale(.92); }
.tabbar a[aria-current="page"] { color: var(--tc-ink); font-weight: 750; }
.tabbar a[aria-current="page"] .dot {
  color: #fff; background: linear-gradient(135deg, var(--tc-2), var(--tc));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--tc) 40%, transparent), inset 0 1px 0 rgba(255,255,255,.25);
}
.tabbar a.pop .dot { animation: tab-pop .32s cubic-bezier(.3,1.5,.6,1); }
.tabbar a[aria-current="page"] svg .fi { opacity: .35; }
.tabbar a[aria-current="page"] svg .spark { opacity: 1; }
.tabbar a:focus-visible { outline: none; }
.tabbar a:focus-visible .dot { outline: 2px solid var(--tc-ink); outline-offset: 2px; }
@keyframes tab-pop { 0% { transform: scale(.7); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .tabbar a .dot { transition: none; }
  .tabbar a.pop .dot { animation: none; }
}
.tabbar a .badge {
  position: absolute; top: -5px; right: 4px; min-width: 18px; height: 18px; border-radius: 9px;
  background: var(--debt); color: #fff; font-size: 10.5px; font-weight: 800; line-height: 15px; text-align: center; padding: 0 4px;
  border: 2px solid var(--surface);
}

.subnav { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 14px; scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav:empty { display: none; }
.subnav a {
  flex: 0 0 auto; padding: 7px 13px; border-radius: 99px; font-size: 13.5px; font-weight: 600;
  color: var(--ink-muted); text-decoration: none; background: var(--surface); border: 1px solid var(--line);
}
.subnav a[aria-current="page"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

@media (min-width: 900px) {
  .shell { padding-bottom: 48px; }
  .tabbar {
    position: static; margin: 0 0 12px; padding: 0 0 12px;
    display: flex; gap: 4px; background: none; backdrop-filter: none; -webkit-backdrop-filter: none;
    border-top: none; border-bottom: 1px solid var(--line);
  }
  .tabbar { box-shadow: none; }
  .tabbar a { grid-auto-flow: column; align-items: center; gap: 8px; min-height: 0; padding: 6px 14px 6px 6px; font-size: 14px; border-radius: 99px; }
  .tabbar a .dot { width: 34px; height: 34px; border-radius: 12px; background: var(--tc-soft); }
  .tabbar a svg { width: 20px; height: 20px; }
  .tabbar a:hover { background: var(--tc-soft); }
  .tabbar a[aria-current="page"] { background: var(--tc-soft); }
  .topbar { padding-top: 18px; }
}

/* ---------- Bausteine ---------- */
.section { display: grid; gap: 10px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.section-head .hint { color: var(--ink-faint); font-size: 13px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card.accent { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }

.grid { display: grid; gap: 10px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 720px) {
  .grid.three, .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.three > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 380px) { .grid.two { grid-template-columns: 1fr; } }

.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 2px; align-content: start; }
.stat .label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); font-weight: 650; }
.stat .value { font-variant-numeric: tabular-nums; font-size: 21px; font-weight: 750; letter-spacing: -.02em; }
.stat .value.good { color: var(--good); }
.stat .value.debt { color: var(--debt); }
.stat .sub { font-size: 12.5px; color: var(--ink-muted); }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.debt { background: var(--debt-soft); color: var(--debt); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.warn { background: var(--accent-soft); color: var(--accent-strong); }
.pill.neutral { background: var(--surface-2); color: var(--ink-muted); }

.list { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); }
.row:first-child { border-top: none; }
.row .title { font-weight: 600; overflow-wrap: anywhere; }
.row .meta { font-size: 12.5px; color: var(--ink-muted); grid-column: 1; }
.row .amount { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; white-space: nowrap; }
.row .actions { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.row.clickable { cursor: pointer; }
.row.clickable:hover { background: var(--surface-2); }

.debtrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.debtrow .arrow { color: var(--ink-faint); font-size: 13px; }
.debtrow .amount { margin-left: auto; }

.empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: 22px 16px; text-align: center; color: var(--ink-muted); font-size: 14px; }

.note { background: var(--info-soft); color: var(--info); border-radius: var(--radius-s); padding: 10px 12px; font-size: 13.5px; }
.note.warn { background: var(--accent-soft); color: var(--accent-strong); }
.note.bad { background: var(--debt-soft); color: var(--debt); }
.alert { background: var(--debt-soft); color: var(--debt); border-radius: var(--radius-s); padding: 10px 12px; font-size: 14px; }

.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); font-weight: 650; background: var(--surface-2); }
tbody tr:last-child td { border-bottom: none; }
td.r, th.r { text-align: right; }
td.wrap { white-space: normal; }
tr.current td { background: var(--accent-soft); }

/* ---------- Formulare ---------- */
form.stack, .stack { display: grid; gap: 12px; }
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 520px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: grid; gap: 5px; }
.field > span { font-size: 12.5px; font-weight: 650; color: var(--ink-muted); }
.field small { color: var(--ink-faint); font-size: 12px; }
input, select, textarea {
  font: inherit; font-size: 16px; /* verhindert Zoom auf iOS */
  width: 100%; padding: 10px 12px; border-radius: var(--radius-s);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
input[readonly] { background: var(--surface-2); color: var(--ink-muted); }
input.num { font-variant-numeric: tabular-nums; }
textarea { min-height: 70px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.check { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; }
.check input { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; }
.chip span { display: inline-block; padding: 7px 13px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 600; cursor: pointer; }
.chip input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 99px; padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg span { white-space: nowrap; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: 6px 14px; border-radius: 99px; font-size: 13.5px; font-weight: 650; color: var(--ink-muted); cursor: pointer; }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: var(--radius-s); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 650;
  cursor: pointer; text-decoration: none; min-height: 42px;
}
.btn:hover { border-color: var(--ink-faint); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.danger { color: var(--debt); }
.btn.small { padding: 5px 10px; font-size: 13px; min-height: 32px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

details.fold { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
details.fold > summary { cursor: pointer; padding: 13px 16px; font-weight: 650; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "＋"; color: var(--ink-faint); font-weight: 400; }
details.fold[open] > summary::after { content: "−"; }
details.fold > .fold-body { padding: 0 16px 16px; display: grid; gap: 12px; }

/* ---------- Putzplan ---------- */
.chore { display: grid; gap: 8px; }
.chore-head { display: flex; align-items: center; gap: 10px; }
.chore-head .icon { font-size: 22px; width: 32px; text-align: center; }
.chore-head .who-big { margin-left: auto; font-weight: 700; }
.chore.mine { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.chore .subs { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 42px; }
.tick {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 13.5px; cursor: pointer; color: var(--ink);
}
.tick::before { content: ""; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--ink-faint); }
.tick.done { background: var(--good-soft); border-color: transparent; color: var(--good); }
.tick.done::before { background: var(--good); border-color: var(--good); box-shadow: inset 0 0 0 2px var(--good-soft); }
.weekstrip { display: grid; gap: 8px; }
.weekstrip .wk { display: grid; grid-template-columns: 74px repeat(4, minmax(0, 1fr)); gap: 6px; align-items: center; font-size: 13px; }
.weekstrip .wk .d { color: var(--ink-faint); font-variant-numeric: tabular-nums; font-size: 12px; }
.weekstrip .wk span.p { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weekstrip .wk span.p.me { background: var(--accent-soft); border-color: transparent; color: var(--accent-strong); font-weight: 650; }

/* ---------- Reglement ---------- */
.prose { display: grid; gap: 10px; max-width: 68ch; }
.prose h3 { margin-top: 10px; display: flex; gap: 8px; }
.prose h3 .z { color: var(--accent); font-variant-numeric: tabular-nums; }
.prose p { font-size: 14.5px; }

/* ---------- Notfall ---------- */
.callgrid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.call {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; color: var(--ink);
}
.call .n { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent-strong); white-space: nowrap; }
.call.sos .n { color: var(--debt); }
.call.big-call { padding: 16px; font-size: 17px; font-weight: 750; margin-bottom: 12px; border-color: var(--debt); }
.call.big-call .n { font-size: 18px; }
ol.steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

/* ---------- Toast & Dialog ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 18px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 99px; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--debt); color: #fff; }
@media (min-width: 900px) { .toast { bottom: 28px; } }

.modal-bg { position: fixed; inset: 0; background: rgba(15,16,14,.5); display: grid; place-items: end center; z-index: 50; padding: 0; }
.modal {
  background: var(--surface); width: 100%; max-width: 520px; max-height: 92vh; overflow: auto;
  border-radius: 16px 16px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-2); display: grid; gap: 14px;
}
@media (min-width: 640px) { .modal-bg { place-items: center; padding: 20px; } .modal { border-radius: 16px; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* Hilfsklassen (statt Inline-Stilen, wegen Content-Security-Policy) */
.right { text-align: right; }
.center { text-align: center; }
.amount.pos { color: var(--good); }
.amount.neg { color: var(--debt); }

/* sehr schmale Bildschirme */
.brand { min-width: 0; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 360px) { .brand { font-size: 16px; } }

/* ---------- Startseite ---------- */
.hello { display: grid; gap: 8px; padding: 22px 2px 2px; }
.hello h1 { font-size: 27px; font-weight: 800; line-height: 1.18; letter-spacing: -.025em; }
.hello p { font-size: 13px; letter-spacing: .01em; }
@media (min-width: 900px) { .hello { padding-top: 12px; } }
.car-status {
  display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; align-items: center;
  padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
}
.car-status.free { background: color-mix(in srgb, var(--good-soft) 70%, var(--surface)); border-color: color-mix(in srgb, var(--good) 35%, var(--line)); }
.car-status.busy { background: color-mix(in srgb, var(--accent-soft) 80%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.car-icon { width: 124px; height: auto; display: block; }
.car-big { font-size: 19px; font-weight: 750; letter-spacing: -.01em; }
.car-status.free .car-big { color: var(--good); }
.car-status.busy .car-big { color: var(--accent-strong); }
.car-sub { font-size: 14px; color: var(--ink-muted); }
.car-status .btn { grid-column: 1 / -1; min-height: 44px; }
.car-big { line-height: 1.2; }
@media (min-width: 720px) { .car-status { grid-template-columns: auto 1fr auto; } .car-status .btn { grid-column: auto; } }

.cal { display: grid; gap: 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-head .btn { font-size: 20px; min-width: 40px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { text-align: center; font-size: 11.5px; font-weight: 650; color: var(--ink-faint); padding-bottom: 2px; }
.cal-cell {
  aspect-ratio: 1 / 1; min-height: 38px; display: grid; grid-template-rows: 1fr auto; justify-items: center; align-items: center;
  border-radius: 8px; border: 1px solid transparent; background: var(--surface-2); color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; padding: 4px 0;
}
.cal-cell.other { background: transparent; color: var(--ink-faint); font-weight: 500; }
.cal-cell.past { color: var(--ink-faint); background: transparent; }
.cal-cell.today { border-color: var(--accent); }
.cal-cell.sel { background: var(--ink); color: var(--bg); }
.cal-cell .dots { display: flex; gap: 3px; height: 7px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.dot.car { background: var(--accent); }
.dot.ev { background: var(--info); }
.dot-more { font-style: normal; font-size: 10px; line-height: 7px; font-weight: 750; color: var(--accent); }
.cal-cell.sel .dot-more { color: var(--bg); }
.cal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn.big { min-height: 52px; padding: 10px 8px; font-size: 15.5px; border-radius: var(--radius); white-space: nowrap; }

/* Zeitwahl im Stil der Google-Kalender-App */
.gcal { display: grid; gap: 2px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px 0; }
.gc-allday { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; font-size: 16px; cursor: pointer; }
.gc-line { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "label label" "date time"; align-items: center; column-gap: 12px; }
.gc-label { grid-area: label; font-size: 12px; font-weight: 650; color: var(--ink-faint); padding-top: 6px; }
.gc-date, .gc-time { font: inherit; font-size: 17px; color: var(--ink); background: none; border: 0; border-radius: var(--radius-s); padding: 10px 6px; min-height: 46px; cursor: pointer; text-align: left; font-variant-numeric: tabular-nums; }
.gc-date { grid-area: date; margin-left: -6px; }
.gc-time { grid-area: time; text-align: right; font-weight: 600; }
.gc-date:hover, .gc-time:hover { background: var(--surface-2); }
.gc-date:focus-visible, .gc-time:focus-visible { outline: 2px solid var(--accent); }
.gc-native { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0; pointer-events: none; }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 52px; height: 32px; border-radius: 99px; border: 2px solid var(--ink-faint); background: transparent; position: relative; cursor: pointer; transition: background .15s, border-color .15s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 5px; left: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink-faint); transition: transform .15s, background .15s, width .15s, height .15s, top .15s; }
.switch:checked { background: var(--accent); border-color: var(--accent); }
.switch:checked::after { background: var(--accent-ink); transform: translateX(18px); top: 3px; width: 22px; height: 22px; }
.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.when-summary { margin: 4px 0 0; font-size: 13px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.when-summary.bad { color: var(--debt); font-weight: 650; }

/* Uhr */
.clk-bg { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.5); display: grid; place-items: center; padding: 16px; }
.clk { background: var(--surface); color: var(--ink); border-radius: 28px; padding: 22px 22px 12px; width: min(340px, 100%); box-sizing: border-box; display: grid; gap: 18px; box-shadow: var(--shadow); }
.clk-title { font-size: 13px; font-weight: 650; color: var(--ink-muted); }
.clk-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; }
.clk-num, .clk-in { font: inherit; font-size: 52px; font-weight: 500; line-height: 1; text-align: center; padding: 12px 0; border-radius: 12px; border: 0; background: var(--surface-2); color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums; width: 100%; box-sizing: border-box; }
.clk-num.on { background: var(--accent-soft); color: var(--accent-strong); }
.clk-in { border: 2px solid var(--accent); cursor: text; -moz-appearance: textfield; }
.clk-in::-webkit-inner-spin-button, .clk-in::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.clk-colon { font-size: 44px; font-weight: 600; }
.clk-face { width: 100%; max-width: 280px; justify-self: center; touch-action: none; user-select: none; cursor: pointer; }
.clk-dial { fill: var(--surface-2); }
.clk-face text { text-anchor: middle; dominant-baseline: central; fill: var(--ink); font-size: 15px; font-weight: 500; pointer-events: none; }
.clk-face text.i { font-size: 13px; fill: var(--ink-muted); }
.clk-face text.on { fill: var(--accent-ink); font-weight: 700; }
.clk-hand { stroke: var(--accent); stroke-width: 2; }
.clk-sel { fill: var(--accent); }
.clk-pin { fill: var(--accent-ink); }
.clk-foot { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 4px; }
.clk-foot .btn { font-size: 15px; }
.cal-legend { display: flex; gap: 16px; }
.cal-legend span { display: inline-flex; gap: 6px; align-items: center; }
.cal-day { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }

.fun { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.fun-icon { font-size: 34px; line-height: 1; }
.fun-body { display: grid; gap: 4px; }
.fun-role { font-weight: 750; font-size: 16px; color: var(--accent-strong); }
.section > .fun + .fun { margin-top: 0; }

/* ---------- Auto-Übersicht ---------- */
.hero-km { display: grid; gap: 6px; background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.hero-num { font-size: 40px; font-weight: 750; letter-spacing: -.03em; line-height: 1; color: var(--accent-strong); }
.hero-num span { font-size: 18px; font-weight: 650; color: var(--ink-muted); }
.hero-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
@media (min-width: 720px) { .hero-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hf { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--line)); min-width: 0; }
.hf .e { grid-row: 1 / span 2; font-size: 24px; line-height: 1; }
.hf strong { font-size: 17px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.2; }
.hf span:last-child { font-size: 12px; color: var(--ink-muted); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.between { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.progress { height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: 6px 0 2px; }
.progress-fill { display: block; height: 100%; width: 0; background: var(--good); border-radius: 99px; }
.flat-list { box-shadow: none; }
.mine-row { background: color-mix(in srgb, var(--accent-soft) 40%, var(--surface)); }

/* ---------- Auto: Visualisierungen ---------- */
.pc-0 { background: var(--p0); } .pc-1 { background: var(--p1); } .pc-2 { background: var(--p2); } .pc-3 { background: var(--p3); }
.pot-c-fix, .dot-fix { background: var(--p1); }
.pot-c-reparatur, .dot-reparatur { background: var(--p2); }
.pot-c-halter, .dot-halter { background: var(--p0); }
.dot-treibstoff { background: var(--p3); }

.pie-chart { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 8px; }
.pie { width: 132px; height: 132px; flex: none; }
.pie path, .pie circle { stroke: var(--surface); stroke-width: 1.5; stroke-linejoin: round; }
.pie .pc-0, .pie .pot-c-halter { fill: var(--p0); }
.pie .pc-1, .pie .pot-c-fix { fill: var(--p1); }
.pie .pc-2, .pie .pot-c-reparatur { fill: var(--p2); }
.pie .pc-3 { fill: var(--p3); }
.pie-legend { flex: 1 1 170px; flex-direction: column; gap: 7px; font-size: 13.5px; }
.pie-legend strong { margin-left: auto; color: var(--ink); }
.pie-pct { min-width: 38px; text-align: right; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-muted); }
.leg { display: inline-flex; align-items: center; gap: 6px; }
.leg.zero { opacity: .55; }
.leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.tank-viz, .split-card { margin-bottom: 10px; padding: 12px 14px; }
.split-card { margin-top: 10px; }

.pot-flow { display: block; margin-top: 4px; font-weight: 650; color: var(--ink-muted); }
.pot-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 7px; vertical-align: 1px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin-top: 8px; }
.photo-grid a { display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Sponsoren (WG-Gag) ---------- */
.sponsor { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 32px 0 4px; color: var(--ink-faint); font-size: 11px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; }
.sponsor-logos { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 18px; }
.sp-hh { width: auto; height: 80px; max-width: 100%; display: block; }
/* Schriftzug als Maske, damit er im hellen und dunklen Modus die Textfarbe annimmt */
.sp-hb { display: block; height: 30px; aspect-ratio: 704 / 96; background: var(--ink-muted);
  -webkit-mask: url(homeboyz.png) center / contain no-repeat; mask: url(homeboyz.png) center / contain no-repeat; }
.sponsor-logos > [hidden] { display: none; }
.btn-car { width: 44px; height: auto; flex: none; margin-right: 6px; vertical-align: middle; }
.hello-emoji { white-space: nowrap; }

/* ---------- Offline-Hinweis ---------- */
.offline-bar {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 25;
  bottom: calc(var(--tabbar-h) + 10px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 8px; white-space: nowrap; max-width: calc(100% - 32px);
  padding: 8px 14px; border-radius: 99px; background: var(--ink); color: var(--bg); font-size: 13px; box-shadow: var(--shadow-2);
}
.offline-bar .off-dot { width: 8px; height: 8px; border-radius: 50%; background: #F5A142; }
.offline-bar .off-hint { opacity: .7; }
@media (min-width: 900px) { .offline-bar { bottom: 20px; } }

/* ---------- Symbol-Kacheln (Farbe aus .tab-*) ---------- */
.ico-tile { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--tc-soft); color: var(--tc-ink); }
.ico-tile svg { width: 22px; height: 22px; }
.ico-tile.big { width: 52px; height: 52px; border-radius: 16px; }
.ico-tile.big svg { width: 28px; height: 28px; }
svg .fi { fill: currentColor; stroke: none; opacity: .22; }
svg .solid { fill: currentColor; stroke: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-muted); cursor: pointer; text-decoration: none; flex: none;
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:hover { color: var(--ink); border-color: var(--ink-faint); }
.icon-btn.danger:hover { color: var(--debt); }

/* ---------- Putzplan ---------- */
.chore-head .ico-tile { width: 36px; height: 36px; border-radius: 11px; }
.chore-head h3 { font-size: 15.5px; }
.chore .subs { padding-left: 46px; }
.chore.mine { border-color: color-mix(in srgb, #6F7A8A 50%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, #6F7A8A 12%, transparent); }
.chore.mine .who-big { color: #fff; background: #6F7A8A; padding: 2px 10px; border-radius: 99px; font-size: 13.5px; }
.weekstrip .wk-head { align-items: end; }
.weekstrip .wk-head .h { display: grid; justify-items: center; gap: 2px; color: var(--tc-ink); min-width: 0; }
.weekstrip .wk-head .h svg { width: 22px; height: 22px; }
.weekstrip .wk-head .h .lbl { font-size: 11px; font-weight: 650; color: var(--ink-faint); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weekstrip .wk span.p.me { background: #6F7A8A; color: #fff; }
.fun .ico-tile.big { margin-top: 2px; }
.fun:has(.tab-clean) .fun-role { color: #5A6474; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .fun:has(.tab-clean) .fun-role { color: #A7B0BD; }
}
:root[data-theme="dark"] .fun:has(.tab-clean) .fun-role { color: #A7B0BD; }


/* ---------- Dokumente ---------- */
.docrow { display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 10px; border-top: 1px solid var(--line); }
.docrow:first-child { border-top: none; }
.doc-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: var(--ink); text-decoration: none; }
.doc-kind {
  display: grid; place-items: center; flex: none; width: 42px; height: 48px; border-radius: 8px 14px 8px 8px;
  background: var(--tc-soft); color: var(--tc-ink); font-size: 10.5px; font-weight: 800; letter-spacing: .04em;
}
.doc-text { display: grid; min-width: 0; }
.doc-text .title { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-text .meta { font-size: 12.5px; color: var(--ink-muted); }
.doc-main:hover .title { text-decoration: underline; }
.docrow .icon-btn { border-color: transparent; background: transparent; }
details.infofold { font-size: 13.5px; color: var(--ink-muted); }
details.infofold summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--info); font-weight: 650; list-style: none; }
details.infofold summary::-webkit-details-marker { display: none; }
details.infofold summary svg { width: 18px; height: 18px; }
details.infofold p { margin-top: 6px; }
.logout-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- Finanzen ---------- */
.lastbuy {
  display: grid; gap: 10px; padding: 14px; border-radius: 18px;
  background: linear-gradient(140deg, color-mix(in srgb, var(--tc-soft) 85%, var(--surface)), var(--surface) 75%);
  border: 1px solid color-mix(in srgb, var(--tc) 22%, var(--line));
  box-shadow: 0 6px 20px color-mix(in srgb, var(--tc) 12%, transparent);
}
.lb-main { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.lb-ico { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, var(--tc-2), var(--tc)); box-shadow: 0 6px 14px color-mix(in srgb, var(--tc) 35%, transparent); }
.lb-ico svg { width: 32px; height: 32px; }
.lb-ico svg .fi { opacity: .3; }
.lb-body { display: grid; justify-items: start; gap: 1px; min-width: 0; }
.lb-kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; font-weight: 750; color: var(--tc-ink); white-space: nowrap; }
.lb-title { font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
.lb-meta { font-size: 13px; color: var(--ink-muted); }
.lb-body .pill { font-size: 11px; margin-top: 4px; }
.lb-amount { align-self: start; padding-top: 16px; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb-prev { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-top: 10px; border-top: 1px dashed color-mix(in srgb, var(--tc) 25%, var(--line)); }
.lb-prev::-webkit-scrollbar { display: none; }
.lb-prev-l { font-size: 12px; color: var(--ink-faint); font-weight: 650; margin-right: 2px; }
.lb-chip { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 4px 10px 4px 6px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.lb-chip svg { width: 16px; height: 16px; color: var(--tc-ink); }

.money-card { display: grid; gap: 10px; padding: 13px 14px; border-radius: 16px; }
.mc-kicker { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; font-weight: 750; color: var(--ink-faint); }
.mc-big { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.mc-big.good { color: var(--good); }
.mc-big.debt { color: var(--debt); }
.mc-sub { font-size: 13px; color: var(--ink-muted); }
.balbars { display: grid; gap: 7px; }
.balbar { display: grid; grid-template-columns: 44px 1fr 92px; align-items: center; gap: 10px; font-size: 13.5px; }
.balbar .n { font-weight: 650; color: var(--ink-muted); }
.balbar.me .n { color: var(--ink); font-weight: 800; }
.balbar svg { width: 100%; height: 12px; display: block; }
.balbar .track { fill: var(--surface-2); }
.balbar .pos { fill: var(--good); }
.balbar .neg { fill: var(--debt); }
.balbar .mid { fill: var(--ink-faint); opacity: .5; }
.balbar .v { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.balbar .v.good { color: var(--good); }
.balbar .v.debt { color: var(--debt); }
.debts { display: grid; padding-top: 8px; border-top: 1px solid var(--line); }
.debts-h { font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; padding-bottom: 4px; }
.debts-h span { font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 12px; }
.debt-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 4px 0; }
.debt-row + .debt-row { border-top: 1px dashed var(--line); }
.debt-who { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14.5px; }
.debt-who b { font-weight: 650; }
.debt-who .arrow { color: var(--ink-faint); }
.debt-amt { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.debt-row.me-gets .debt-amt { color: var(--good); }
.debt-row.me-pays .debt-amt { color: var(--debt); }
.paid-btn { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px 0 8px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-muted); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.paid-btn svg { width: 15px; height: 15px; color: var(--good); stroke-width: 2.6; }
.paid-btn:hover { border-color: var(--good); color: var(--ink); }
@media (max-width: 360px) { .paid-btn span { display: none; } .paid-btn { padding: 0 8px; } }

.month-h { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-faint); font-weight: 750; margin: 6px 0 -2px 2px; }
.exprow { grid-template-columns: auto 1fr auto; gap: 2px 12px; }
.exprow .ico-tile { grid-row: 1 / span 2; width: 38px; height: 38px; }
.exprow .meta { grid-column: 2; }
.exprow .right { grid-column: 3; grid-row: 1 / span 2; display: grid; justify-items: end; gap: 3px; }
.more-btn { justify-self: center; }

/* ---------- Konto ---------- */
.profile { display: flex; align-items: center; gap: 14px; }
.avatar.lg { width: 60px; height: 60px; font-size: 24px; box-shadow: none; flex: none; }
.profile .p-name { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.profile .p-meta { font-size: 13px; color: var(--ink-muted); }
.set-h { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-faint); font-weight: 750; margin: 4px 0 -4px 4px; }
.setlist { padding: 0; display: grid; }
.setrow { display: grid; gap: 10px; padding: 14px 16px; }
.setrow + .setrow { border-top: 1px solid var(--line); }
.setrow .lbl { font-weight: 650; }
.setrow .hint { font-size: 12.5px; color: var(--ink-muted); margin-top: -4px; }
.seg3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); }
.seg3 button { display: grid; justify-items: center; gap: 3px; padding: 8px 4px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-muted); font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; }
.seg3 button svg { width: 20px; height: 20px; }
.seg3 button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer; color: #fff; display: grid; place-items: center; padding: 0; }
.swatch svg { width: 18px; height: 18px; opacity: 0; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ink); }
.swatch[aria-pressed="true"] svg { opacity: 1; }
.nick-row { display: flex; gap: 8px; }
.nick-row input { flex: 1; min-width: 0; }
details.fold.compact > summary { padding: 13px 16px; font-weight: 650; }
.logout-btn { width: 100%; color: var(--debt); }
.appver { display: grid; justify-items: center; gap: 6px; padding: 8px 0 4px; font-size: 12.5px; color: var(--ink-faint); text-align: center; }
.appver img { width: 34px; height: 34px; border-radius: 9px; }
.appver details summary { cursor: pointer; color: var(--info); font-weight: 650; list-style: none; }
.appver details summary::-webkit-details-marker { display: none; }
.appver ul { text-align: left; margin: 8px 0 0; padding-left: 18px; color: var(--ink-muted); }
.add-expense { width: 100%; min-height: 52px; font-size: 16px; border-radius: 14px; gap: 8px; box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent); }
.add-expense .plus { font-size: 22px; line-height: 1; font-weight: 500; }

/* ---------- Auto: Töpfe ---------- */
.pot-grid { display: grid; gap: 12px; }
@media (min-width: 720px) { .pot-grid { grid-template-columns: 1fr 1fr; } }
.pot-card { display: grid; gap: 8px; border-radius: 16px; min-width: 0; }
.pot-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pot-title { font-weight: 800; font-size: 15.5px; }
.pot-sub { font-size: 12.5px; color: var(--ink-muted); }
.pot-pct { display: grid; justify-items: end; font-size: 18px; font-weight: 800; color: var(--good); line-height: 1.1; white-space: nowrap; }
.pot-pct span { font-size: 11px; font-weight: 650; color: var(--ink-faint); }
.pot-pct.neg { color: var(--debt); }
.pot-big { font-size: 24px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.pot-big span { font-size: 13px; font-weight: 600; color: var(--ink-muted); letter-spacing: 0; }
.pot-big.neg { color: var(--debt); }
.pot-gauge { width: 100%; height: 12px; display: block; }
.pot-gauge .pg-spent { fill: color-mix(in srgb, var(--debt) 28%, var(--surface-2)); }
.pot-gauge .pg-left { fill: var(--good); }
.pot-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.pot-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.pot-legend i.pg-left { background: var(--good); }
.pot-legend i.pg-spent { background: color-mix(in srgb, var(--debt) 45%, var(--surface-2)); }

/* ---------- Auto: Dieselpreis ---------- */
.diesel-card { display: grid; gap: 10px; border-radius: 16px; }
.dc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.dc-kicker { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; font-weight: 750; color: var(--ink-faint); }
.dc-price { font-size: 28px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.dc-price span { font-size: 14px; font-weight: 600; color: var(--ink-muted); letter-spacing: 0; }
.dc-sub { font-size: 12.5px; color: var(--ink-muted); }
.dc-badge { display: grid; justify-items: center; padding: 6px 10px; border-radius: 12px; background: var(--debt-soft); color: var(--debt); font-weight: 800; font-size: 17px; line-height: 1.1; white-space: nowrap; }
.dc-badge span { font-size: 11px; font-weight: 650; }
.diesel-chart { width: 100%; height: auto; display: block; overflow: visible; }
.diesel-chart .dg { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 3; }
.diesel-chart .dl { fill: var(--ink-faint); font-size: 9.5px; font-weight: 600; }
.diesel-chart .dg-a { stop-color: var(--debt); stop-opacity: .28; }
.diesel-chart .dg-b { stop-color: var(--debt); stop-opacity: 0; }
.diesel-chart .da { fill: url(#dgrad); }
.diesel-chart .dline { fill: none; stroke: var(--debt); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.diesel-chart .dmax { fill: var(--debt); stroke: var(--surface); stroke-width: 2; }
.diesel-chart .dlab { fill: var(--debt); font-size: 10.5px; font-weight: 800; }
.diesel-chart .dlab.low { fill: var(--good); }
.diesel-chart .dt { fill: #2D6BD6; stroke: var(--surface); stroke-width: 2; }
.dc-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dc-facts > div { display: grid; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.dc-facts .k { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); font-weight: 700; }
.dc-facts strong { font-size: 17px; font-variant-numeric: tabular-nums; }
.dc-facts .s { font-size: 11.5px; color: var(--ink-muted); }
.dc-note { font-size: 12.5px; color: var(--ink-muted); }
.dc-note .dot-t { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #2D6BD6; vertical-align: -1px; }
.dc-facts .ours { background: var(--info-soft); }
.dc-facts .ours strong { color: var(--info); }
