/* ────────────────────────────────────────────────────────────
   Vorrat – ruhiges, warmes Design. Mobile first.
   ──────────────────────────────────────────────────────────── */
:root {
  --bg: #f5f2ec;
  --surface: #fffdf9;
  --surface-2: #efebe3;
  --ink: #1f211d;
  --ink-2: #5d6159;
  --ink-3: #969a91;
  --line: #e6e1d7;
  --accent: #3e5c45;
  --accent-ink: #ffffff;
  --accent-soft: #e3ebe2;

  --expired: #b5482f;  --expired-soft: #f6e3dc;
  --soon: #b86e13;     --soon-soft: #f7e9d3;
  --mid: #8f7a19;      --mid-soft: #efeacc;
  --ok: #4c7a55;       --ok-soft: #e1ecdf;
  --none: #8b8d86;     --none-soft: #ebe8e1;

  --r-lg: 22px;
  --r: 14px;
  --shadow: 0 1px 2px rgba(40, 35, 25, .04), 0 4px 16px rgba(40, 35, 25, .05);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  --font-display: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151613; --surface: #1e201c; --surface-2: #272a25; --ink: #eceee8; --ink-2: #a8ada3; --ink-3: #737870;
    --line: #2d302a; --accent: #8fb895; --accent-ink: #10170f; --accent-soft: #233025;
    --expired: #ec8b72; --expired-soft: #3a211b; --soon: #e5a75a; --soon-soft: #36291a;
    --mid: #d2bf62; --mid-soft: #302d19; --ok: #8fc198; --ok-soft: #1f3022; --none: #9a9d95; --none-soft: #2a2c28;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.45 var(--font); letter-spacing: -.005em;
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
main { max-width: 640px; margin: 0 auto; padding: calc(8px + env(safe-area-inset-top)) 18px 0; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.02em; margin: 0; }
p { margin: 0 0 8px; }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .9em; letter-spacing: 0; }
small, .muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }

/* Icons */
.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round;
  stroke-linejoin: round; flex: none; vertical-align: middle; }
.i.sm { width: 18px; height: 18px; }
.i.lg { width: 28px; height: 28px; }

/* Kopfbereich */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 18px 2px 14px; }
.page-head h1 { font-size: 32px; font-weight: 700; line-height: 1.1; }
.page-head .sub { color: var(--ink-2); font-size: 15px; margin-top: 4px; }
.page-head .back { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-size: 15px;
  margin: 0 0 6px -6px; font-weight: 500; }
.head-actions { display: flex; gap: 8px; flex: none; }

/* Tab-Leiste mit zentralem Scan-Knopf */
.tabs { position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; display: flex; align-items: flex-end;
  justify-content: space-around; padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: saturate(1.6) blur(18px);
  -webkit-backdrop-filter: saturate(1.6) blur(18px); border-top: 1px solid var(--line); }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--ink-3);
  font-size: 11px; font-weight: 500; padding: 2px 0; }
.tabs a.on { color: var(--accent); }
.tabs .scan-tab b { display: grid; place-items: center; width: 58px; height: 58px; margin-top: -26px;
  border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 40%, transparent), 0 0 0 5px var(--bg); }
.tabs .scan-tab .i { width: 27px; height: 27px; stroke-width: 1.9; }

/* Flächen */
.card { background: var(--surface); border-radius: var(--r-lg); padding: 18px; margin: 0 0 14px; box-shadow: var(--shadow); }
.card.flush { padding: 4px 0; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 4px 10px;
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.section-title a { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--accent); font-weight: 500; }
.section-title:first-child { margin-top: 4px; }

/* Listen */
.list { list-style: none; margin: 0; padding: 0; }
.row-item { display: flex; align-items: center; gap: 12px; padding: 13px 18px; min-height: 60px; position: relative; }
.list > li + li .row-item::before, .list > li + li > .row-item::before { content: ""; position: absolute; top: 0; left: 18px; right: 0; height: 1px; background: var(--line); }
.row-item .body { flex: 1; min-width: 0; }
.row-item .title { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-item .meta { color: var(--ink-2); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-item .end { text-align: right; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.row-item .chev { color: var(--ink-3); width: 18px; height: 18px; margin-right: -6px; }
a.row-item:active { background: var(--surface-2); }
.empty { padding: 36px 18px; text-align: center; color: var(--ink-2); }
.empty .i { width: 40px; height: 40px; color: var(--ink-3); margin-bottom: 8px; stroke-width: 1.4; }

/* Status-Pillen */
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums;
  background: var(--none-soft); color: var(--none); }
.pill.expired { background: var(--expired-soft); color: var(--expired); }
.pill.soon { background: var(--soon-soft); color: var(--soon); }
.pill.mid { background: var(--mid-soft); color: var(--mid); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.txt-expired { color: var(--expired); } .txt-soon { color: var(--soon); } .txt-mid { color: var(--mid); } .txt-ok { color: var(--ok); }

/* Bestand x / min */
.stock { font-weight: 650; font-variant-numeric: tabular-nums; font-size: 17px; }
.stock .of { color: var(--ink-3); font-weight: 500; font-size: 14px; }
.stock.low { color: var(--expired); }
.meter { width: 56px; height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ok); border-radius: 4px; }
.meter.low i { background: var(--expired); }

/* Übersicht */
.hero { padding: 22px 20px 18px; }
.hero .big { font-family: var(--font-display); font-size: 52px; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.hero .big-label { color: var(--ink-2); margin: 6px 0 18px; }
.spectrum { display: flex; height: 10px; border-radius: 10px; overflow: hidden; gap: 3px; background: var(--surface-2); }
.spectrum span { display: block; min-width: 6px; }
.spectrum .expired { background: var(--expired); } .spectrum .soon { background: var(--soon); }
.spectrum .mid { background: var(--mid); } .spectrum .ok { background: var(--ok); }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin-top: 16px; }
.legend a { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14.5px; }
.legend a b { margin-left: auto; font-variant-numeric: tabular-nums; }
.legend .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot.expired { background: var(--expired); } .dot.soon { background: var(--soon); }
.dot.mid { background: var(--mid); } .dot.ok { background: var(--ok); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.tile { background: var(--surface); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); display: flex;
  flex-direction: column; gap: 10px; }
.tile .i { color: var(--accent); }
.tile b { font-family: var(--font-display); font-size: 26px; line-height: 1; letter-spacing: -.02em; }
.tile span { color: var(--ink-2); font-size: 14px; }
.tile.attn .i { color: var(--soon); }

/* Formulare */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13.5px; font-weight: 550; color: var(--ink-2); margin: 0 0 6px 2px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface-2); border: 1.5px solid transparent;
  border-radius: var(--r); padding: 13px 14px; width: 100%; outline: none; transition: border-color .15s, background .15s;
  -webkit-appearance: none; appearance: none; min-height: 50px; }
textarea { resize: vertical; min-height: 80px; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); background: var(--surface); }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input[type=checkbox] { width: 22px; height: 22px; min-height: 0; padding: 0; border-radius: 7px; border: 1.5px solid var(--ink-3);
  background: transparent; display: grid; place-items: center; flex: none; cursor: pointer; }
input[type=checkbox]:checked { background: var(--accent); border-color: var(--accent); }
input[type=checkbox]:checked::after { content: ""; width: 6px; height: 11px; border: solid var(--accent-ink); border-width: 0 2.2px 2.2px 0;
  transform: translateY(-1px) rotate(45deg); }
.check { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stepper { display: flex; align-items: center; background: var(--surface-2); border-radius: var(--r); min-height: 50px; }
.stepper button { width: 48px; height: 50px; border: 0; background: none; color: var(--accent); font-size: 22px; cursor: pointer; }
.stepper input { text-align: center; background: transparent; border: 0; padding: 0; font-weight: 650; min-width: 0; }
.search { position: relative; margin-bottom: 6px; }
.search .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search input { padding-left: 44px; background: var(--surface); box-shadow: var(--shadow); }

/* Knöpfe */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 20px;
  border: 0; border-radius: var(--r); background: var(--surface-2); color: var(--ink); font: inherit; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: transform .08s, opacity .15s; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.block { display: flex; width: 100%; }
.btn.huge { min-height: 62px; font-size: 18px; border-radius: 18px; }
.btn.ghost { background: transparent; color: var(--accent); padding: 0 8px; }
.btn.danger { background: transparent; color: var(--expired); }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 14.5px; border-radius: 11px; }
.btn.icon { width: 44px; min-height: 44px; padding: 0; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); color: var(--accent); }
.btn.icon.primary { background: var(--accent); color: var(--accent-ink); }
.btn:disabled { opacity: .45; }
.stack { display: grid; gap: 10px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }

/* Hinweise */
.note { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--r); padding: 12px 14px; margin: 0 0 12px;
  background: var(--surface-2); font-size: 14.5px; }
.note .i { margin-top: 1px; }
.note a { text-decoration: underline; text-underline-offset: 2px; }
.note.good { background: var(--ok-soft); color: var(--ok); }
.note.warn { background: var(--soon-soft); color: var(--soon); }
.note.bad { background: var(--expired-soft); color: var(--expired); }
.note.good *, .note.warn *, .note.bad * { color: inherit; }

/* Chips & Segment */
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px 14px; padding: 2px 18px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 9px 15px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow);
  font-size: 14.5px; font-weight: 550; color: var(--ink-2); }
.chip.on { background: var(--ink); color: var(--bg); }
.seg { display: flex; background: var(--surface-2); border-radius: 13px; padding: 3px; margin-bottom: 14px; }
.seg label { flex: 1; text-align: center; padding: 9px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 15px; color: var(--ink-2); }
.seg input { display: none; }
.seg label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
details.more { margin-top: 4px; }
details.more summary { list-style: none; cursor: pointer; color: var(--accent); font-weight: 550; padding: 8px 2px; font-size: 15px; }
details.more summary::-webkit-details-marker { display: none; }
details.more[open] summary { margin-bottom: 8px; }

/* Packung (Ziel des QR-Codes) */
.item-hero { text-align: center; padding: 28px 22px 22px; }
.item-hero .cat { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.item-hero h2 { font-size: 28px; line-height: 1.15; margin: 6px 0 2px; }
.item-hero .unit { color: var(--ink-2); }
.mhd-block { margin: 22px 0 8px; }
.mhd-block .lbl { font-size: 12px; font-weight: 600; letter-spacing: .1em; color: var(--ink-3); }
.mhd-block .date { font-family: var(--font-display); font-size: 40px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.mhd-block .pill { margin-top: 6px; height: 28px; padding: 0 12px; font-size: 13.5px; }
.facts { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; color: var(--ink-2); font-size: 14.5px; margin-top: 14px; }
.facts span { display: inline-flex; align-items: center; gap: 5px; }
.done-mark { display: grid; place-items: center; width: 72px; height: 72px; margin: 4px auto 14px; border-radius: 50%;
  background: var(--ok-soft); color: var(--ok); animation: pop .35s cubic-bezier(.2, 1.4, .4, 1); }
.done-mark .i { width: 38px; height: 38px; stroke-width: 2.2; }
@keyframes pop { from { transform: scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
.status-consumed .mhd-block, .status-discarded .mhd-block { opacity: .55; }

/* Produktdetail */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding: 16px 6px; }
.kpis div + div { border-left: 1px solid var(--line); }
.kpis b { display: block; font-family: var(--font-display); font-size: 24px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpis span { font-size: 12.5px; color: var(--ink-2); }

/* Scanner */
.scanner { position: relative; border-radius: var(--r-lg); overflow: hidden; background: #0d0e0c; aspect-ratio: 1 / 1;
  display: grid; place-items: center; margin-bottom: 12px; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner .frame { position: absolute; width: 58%; aspect-ratio: 1; pointer-events: none;
  --c: rgba(255,255,255,.92); --l: 34px; --t: 4px;
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) var(--t), linear-gradient(var(--c), var(--c)) top left / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) top right / var(--l) var(--t), linear-gradient(var(--c), var(--c)) top right / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--t), linear-gradient(var(--c), var(--c)) bottom left / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--t), linear-gradient(var(--c), var(--c)) bottom right / var(--t) var(--l);
  background-repeat: no-repeat; border-radius: 6px; }
.scanner .btn { position: relative; z-index: 1; }
.scanner .cam-hint { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.75); font-size: 13.5px; padding: 0 16px; }
.result { display: flex; gap: 12px; align-items: center; animation: pop .3s ease-out; }
.result .badge { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--ok-soft); color: var(--ok); }
.result.already .badge { background: var(--surface-2); color: var(--ink-3); }
.result .body { flex: 1; min-width: 0; }
.result .title { font-weight: 600; }

/* Einkauf */
.shop li.done .title { text-decoration: line-through; color: var(--ink-3); }
.qty { font-family: var(--font-display); font-weight: 700; font-size: 17px; min-width: 34px; color: var(--accent); font-variant-numeric: tabular-nums; }

/* Etiketten */
.labels { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.labels.wide { grid-template-columns: 1fr; }
.labels figure { margin: 0; background: var(--surface); border-radius: var(--r); padding: 10px; box-shadow: var(--shadow); }
.labels img { display: block; width: 100%; height: auto; background: #fff; border-radius: 6px; outline: 1px solid var(--line); image-rendering: pixelated; }
.labels figcaption { font-size: 12.5px; color: var(--ink-2); margin-top: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media print {
  .tabs, .page-head, .noprint { display: none !important; }
  body { padding: 0; background: #fff; }
  main { padding: 0; max-width: none; }
  .labels { display: block; }
  .labels figure { padding: 0; box-shadow: none; background: none; page-break-after: always; break-after: page; }
  .labels img { width: var(--lw); height: var(--lh); outline: 0; border-radius: 0; }
}

/* Foto-Erfassung */
.photo-card { display: grid; gap: 14px; }
.photo-intro { display: flex; gap: 14px; align-items: center; }
.photo-intro .title { font-weight: 650; font-size: 17px; }
.photo-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; flex: none;
  background: var(--accent-soft); color: var(--accent); }
.thumbs { display: flex; gap: 8px; }
.thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; }
.photo-card .note { margin: 0; }
input.filled, textarea.filled { background: var(--accent-soft); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent);
  animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Ausrüstung */
.seg-links a { flex: 1; text-align: center; padding: 9px; border-radius: 10px; font-weight: 600; font-size: 15px; color: var(--ink-2); }
.seg-links a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
button.chip { border: 0; font: inherit; font-size: 14.5px; font-weight: 550; cursor: pointer; }
.progress { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; margin-top: 14px; }
.progress i { display: block; height: 100%; background: var(--ok); border-radius: 8px; transition: width .3s ease; }
.gear-summary b { font-family: var(--font-display); font-size: 30px; line-height: 1; }
.gear-card { display: block; }
.gear-card .i { color: var(--accent); }
.gear-card .title { font-weight: 650; }
.gear-check { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex: none;
  border: 1.5px solid var(--line); color: transparent; transition: background .2s, color .2s, border-color .2s; }
.gear-row.complete .gear-check { background: var(--ok); border-color: var(--ok); color: var(--accent-ink); }
.gear-row.complete .title { color: var(--ink-2); }
.gear-row .body { min-width: 0; }
.counter { display: flex; align-items: center; gap: 2px; background: var(--surface-2); border-radius: 12px; flex: none; }
.counter button { width: 38px; height: 38px; border: 0; background: none; color: var(--accent); cursor: pointer; display: grid; place-items: center; border-radius: 12px; }
.counter button:active { background: var(--line); }
.counter .num { min-width: 42px; text-align: center; font-size: 15px; }
.counter .of { color: var(--ink-3); font-size: 13px; }
.sticky-action { position: sticky; bottom: calc(88px + env(safe-area-inset-bottom)); padding-top: 12px; }

/* Home: Bereichskarten */
:root {
  --sec-prepper: #3e5c45;  --sec-prepper-soft: #e3ebe2;
  --sec-shopping: #b1602f; --sec-shopping-soft: #f5e6da;
  --sec-scan: #2f3a33;     --sec-scan-soft: #e6e6e0;
  --sec-tasks: #3d6489;    --sec-tasks-soft: #e0e9f2;
  --sec-calendar: #a04a5c; --sec-calendar-soft: #f4e2e5;
  --sec-meals: #9a7a1c;    --sec-meals-soft: #f3ecd2;
  --sec-budget: #2f7a72;   --sec-budget-soft: #ddefec;
}
@media (prefers-color-scheme: dark) {
  :root {
    --sec-prepper: #8fb895;  --sec-prepper-soft: #233025;
    --sec-shopping: #e39a6a; --sec-shopping-soft: #3a271b;
    --sec-scan: #d6dad3;     --sec-scan-soft: #2a2d29;
    --sec-tasks: #8fb3d9;    --sec-tasks-soft: #1d2a37;
    --sec-calendar: #e098a6; --sec-calendar-soft: #3a2228;
    --sec-meals: #d9bd62;    --sec-meals-soft: #342c15;
    --sec-budget: #7cc7bd;   --sec-budget-soft: #17302d;
  }
}
.sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.section-card { --c: var(--accent); --cs: var(--accent-soft); background: var(--surface); border-radius: var(--r-lg);
  padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; min-height: 128px; }
.section-card.wide { grid-column: 1 / -1; }
.section-card:active { transform: scale(.99); }
.section-card.soon { box-shadow: none; background: transparent; border: 1.5px dashed var(--line); min-height: 104px; }
.section-card.soon .sec-icon { background: var(--surface-2); color: var(--ink-3); }
.section-card.soon .sec-title { color: var(--ink-2); }
.sec-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.sec-head .sec-title { flex: 1; }
.sec-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; flex: none;
  background: var(--cs); color: var(--c); }
.sec-icon.sm { width: 34px; height: 34px; border-radius: 10px; }
.sec-title { font-family: var(--font-display); font-weight: 650; font-size: 18px; letter-spacing: -.01em; }
.sec-line { color: var(--ink-2); font-size: 14.5px; margin-top: auto; }
.sec-line b { color: var(--ink); font-size: 17px; }
.sec-figures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sec-figures b { display: block; font-family: var(--font-display); font-size: 24px; line-height: 1.1; }
.sec-figures .of { color: var(--ink-3); font-size: 15px; font-weight: 500; }
.sec-figures span { font-size: 12px; color: var(--ink-2); }
.sec-list { list-style: none; margin: 2px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.sec-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14.5px; }
.sec-list li > span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-list li .pill { flex: none; }
.soon-tag { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3);
  background: var(--surface-2); padding: 3px 8px; border-radius: 999px; }
.sec-prepper { --c: var(--sec-prepper); --cs: var(--sec-prepper-soft); }
.sec-shopping { --c: var(--sec-shopping); --cs: var(--sec-shopping-soft); }
.sec-scan { --c: var(--sec-scan); --cs: var(--sec-scan-soft); }
.sec-tasks { --c: var(--sec-tasks); --cs: var(--sec-tasks-soft); }
.sec-calendar { --c: var(--sec-calendar); --cs: var(--sec-calendar-soft); }
.sec-meals { --c: var(--sec-meals); --cs: var(--sec-meals-soft); }
.sec-budget { --c: var(--sec-budget); --cs: var(--sec-budget-soft); }
.sec-icon.sec-prepper, .sec-icon.sec-shopping, .sec-icon.sec-tasks, .sec-icon.sec-calendar,
.sec-icon.sec-meals, .sec-icon.sec-budget, .sec-icon.sec-scan { background: var(--cs); color: var(--c); }
.subnav { margin-top: -6px; }

/* Aufgaben & Familie */
.i.xs { width: 14px; height: 14px; vertical-align: -2px; }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none;
  font-weight: 700; font-size: 14px; color: #fff; background: var(--av, var(--ink-3)); }
.avatar.sm { width: 26px; height: 26px; font-size: 12px; }
.avatar.xs { width: 20px; height: 20px; font-size: 10.5px; }
.avatar .i { width: 17px; height: 17px; }
.avatar.av-all { background: var(--surface-2); color: var(--ink-2); }
.av-sage { --av: #5b8a64; } .av-clay { --av: #c0703f; } .av-sky { --av: #4a7fb0; } .av-rose { --av: #b9566c; }
.av-ochre { --av: #b08a1e; } .av-teal { --av: #2f8a80; } .av-plum { --av: #80588f; } .av-slate { --av: #5d6671; }
.chips.people .chip.person { display: inline-flex; align-items: center; gap: 6px; padding-left: 6px; }
.quick-add { display: flex; gap: 8px; margin: 4px 0 6px; }
.quick-add input { background: var(--surface); box-shadow: var(--shadow); }
.quick-add .btn.icon { width: 50px; min-height: 50px; border-radius: var(--r); }
.task-check { width: 30px; height: 30px; border-radius: 50%; border: 1.8px solid var(--ink-3); background: transparent;
  color: transparent; display: grid; place-items: center; cursor: pointer; flex: none; padding: 0;
  transition: background .15s, color .15s, border-color .15s; }
.task-check:hover, .task-check:focus-visible { border-color: var(--ok); color: var(--ok); }
.task-check:active { background: var(--ok); border-color: var(--ok); color: var(--accent-ink); }
.task-row.overdue .task-check { border-color: var(--expired); }
.task-row .meta { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.undo-bar { align-items: center; }
.undo-bar span { flex: 1; }
.undo-bar .btn { min-height: 32px; color: inherit; }
.pick-people { display: flex; gap: 14px; flex-wrap: wrap; }
.pick-people label, .pick-add { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.pick-people input { display: none; }
.pick-people .avatar { width: 44px; height: 44px; font-size: 17px; outline: 2.5px solid transparent; outline-offset: 2px; transition: outline-color .15s; }
.pick-people label:has(input:checked) .avatar { outline-color: var(--accent); }
.pick-people label:has(input:checked) small { color: var(--ink); font-weight: 600; }
.pick-add > .i { width: 44px; height: 44px; padding: 12px; border-radius: 50%; border: 1.5px dashed var(--line); color: var(--ink-3); }
.wrap-seg { flex-wrap: wrap; }
.wrap-seg label { flex: 1 0 30%; font-size: 14px; padding: 8px 4px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches input { display: none; }
.swatches label { cursor: pointer; }
.swatches .avatar { outline: 2.5px solid transparent; outline-offset: 2px; }
.swatches label:has(input:checked) .avatar { outline-color: var(--ink); }
details.member > summary { list-style: none; cursor: pointer; }
details.member > summary::-webkit-details-marker { display: none; }
.member-edit { display: grid; gap: 12px; padding: 0 18px 16px; }
.sec-tasks-list li .avatar { width: 22px; height: 22px; font-size: 11px; }

/* Login */
.pick-people.big { justify-content: center; gap: 18px; margin: 6px 0 18px; }
.pick-people.big .avatar { width: 60px; height: 60px; font-size: 23px; }
.login .field { margin-bottom: 16px; }
.member-edit .stack { gap: 10px; }
.member-edit { gap: 16px; }

/* ── Feinschliff ─────────────────────────────────────────── */
/* Kopfzeile: Aktionen auf Höhe des Titels, nicht der Unterzeile */
.page-head { align-items: flex-start; }
.head-actions { margin-top: 2px; }
.page-head:has(.back) .head-actions { margin-top: 30px; }
.page-head h1 { overflow-wrap: anywhere; }
.avatar-btn { display: block; border-radius: 50%; }
.avatar-btn .avatar { width: 44px; height: 44px; font-size: 18px; box-shadow: var(--shadow); }

/* Startseite */
.sections { gap: 14px; }
.section-card { gap: 14px; min-height: 0; padding: 18px; }
.sec-head { align-items: center; }
.sec-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sec-head-text .sec-title { font-size: 18px; }
.sec-kicker { font-size: 14px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sec-kicker b { font-weight: 600; }
.sec-figures { display: flex; gap: 22px; grid-template-columns: none; }
.sec-figures b { font-size: 26px; }
.sec-list { margin: 0; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 13.5px; padding: 5px 10px; border-radius: 999px; background: var(--cs); color: var(--ink);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag.more { background: var(--surface-2); color: var(--ink-2); }
.planned { text-align: center; color: var(--ink-3); font-size: 13.5px; margin: 22px 0 6px; }

/* Prepper-Unternavigation: vier Einträge passen nebeneinander */
.subnav { gap: 6px; }
.subnav .chip { padding: 8px 12px; font-size: 14px; }
.task-row .meta { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
.dot-sep { color: var(--ink-3); margin: 0 2px; }
.task-row .meta .rot { margin-left: 4px; color: var(--ink-3); }
.chev { color: var(--ink-3); width: 18px; height: 18px; }

/* Preise */
.money-input { display: flex; align-items: center; background: var(--surface-2); border-radius: var(--r); border: 1.5px solid transparent; }
.money-input:focus-within { border-color: var(--accent); background: var(--surface); }
.money-input > span { padding-left: 14px; color: var(--ink-3); font-size: 14px; font-weight: 600; }
.money-input input { border: 0; background: transparent; padding-left: 8px; }
.money-input input:focus { background: transparent; }
.price-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.price-kpis span { display: block; font-size: 12.5px; color: var(--ink-2); }
.price-kpis b { font-family: var(--font-display); font-size: 18px; font-variant-numeric: tabular-nums; }
.price-kpis small { display: block; }
.price-list { list-style: none; margin: 0; padding: 10px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; font-size: 14.5px; }
.price-list li { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: baseline; }
.price-list .shop { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.total-card { display: flex; justify-content: space-between; align-items: flex-end; padding: 16px 18px; }
.total-card b, .money-card b { display: block; font-family: var(--font-display); font-size: 26px; line-height: 1.15; }
.money-card { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.money-card small { display: block; margin-top: 2px; }
.end-figure { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; text-align: right; }
.end-figure b { font-size: 15px; }
.field > .money-input { display: flex; margin: 0; font-size: inherit; font-weight: inherit; color: inherit; }

/* Umzug */
:root { --sec-moving: #8a5a2b; --sec-moving-soft: #f1e5d6; }
@media (prefers-color-scheme: dark) { :root { --sec-moving: #d9a56e; --sec-moving-soft: #35281b; } }
.sec-moving { --c: var(--sec-moving); --cs: var(--sec-moving-soft); }
.sec-icon.sec-moving { background: var(--cs); color: var(--c); }
.moving-progress b { font-family: var(--font-display); font-size: 30px; line-height: 1; }
.box-num { font-family: var(--font-display); font-weight: 700; font-size: 17px; min-width: 42px; color: var(--sec-moving); }
.box-row.unpacked .title, .box-row.unpacked .box-num { color: var(--ink-3); }
.box-row .hit { color: var(--sec-moving); font-weight: 550; }
.box-hero { text-align: center; padding: 26px 20px 22px; }
.box-room { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--sec-moving); letter-spacing: -.01em; }
.box-hero h2 { font-size: 21px; margin-top: 4px; }
.contents-list .row-item { min-height: 48px; padding-top: 10px; padding-bottom: 10px; }
.dot-bullet { width: 7px; height: 7px; border-radius: 50%; background: var(--sec-moving); flex: none; }
.room-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.room-chips input { display: none; }
.room-chips span { display: inline-block; padding: 8px 13px; border-radius: 999px; background: var(--surface-2); font-size: 14.5px; font-weight: 550; color: var(--ink-2); cursor: pointer; }
.room-chips label:has(input:checked) span { background: var(--sec-moving); color: #fff; }
.roll-card { padding: 14px 16px; }
