/* Haushaltsbuch Claude · Farben je Gerät: Eis (Standard), Tinte mit Eis, Hell */
:root, :root[data-theme="eis"] {
  --bg: #0b1016; --surface: #121a23; --raised: #192530; --line: #293540; --ink: #edf4f7; --muted: #a2b3c1;
  --accent: #a6d9fc; --accent-ink: #0b1016; --accent-soft: #1a2c3a;
  --good: #6ee7a0; --warn: #e8c27a; --bad: #ff7b7b;
  --expense: #ff7b7b; --expense-ink: #2a0c0c; --income: #6ee7a0; --income-ink: #08240f;
  --hero: linear-gradient(160deg, #173247, #0f1d2a); --hero-line: #22384a;
  --shadow: none; --lift: 0 10px 30px rgb(0 0 0 / .35);
  --radius: 16px; --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: dark;
}
:root[data-theme="tinte"] {
  --bg: #0a0c14; --surface: #121524; --raised: #1a1e31; --line: #262b42; --ink: #eef0fa; --muted: #9ea4c0;
  --accent: #a6d9fc; --accent-ink: #0a0c14; --accent-soft: #1b2440;
  --warn: #f5c96b;
  --hero: linear-gradient(160deg, #1c2246, #10132a); --hero-line: #2a3160;
}
:root[data-theme="hell"] {
  --bg: #f4f6f8; --surface: #ffffff; --raised: #eef2f5; --line: #d8e0e6; --ink: #142029; --muted: #5a6a77;
  --accent: #1c6aa3; --accent-ink: #ffffff; --accent-soft: #e2eef8;
  --good: #17704a; --warn: #9a6a12; --bad: #c2433a;
  --expense: #c4473e; --expense-ink: #ffffff; --income: #1f7a50; --income-ink: #ffffff;
  --hero: linear-gradient(160deg, #e4f0f9, #f7fafc); --hero-line: #d3e2ee;
  --shadow: 0 1px 2px rgb(20 32 41 / .06), 0 4px 16px rgb(20 32 41 / .05); --lift: 0 10px 30px rgb(20 32 41 / .15);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; overscroll-behavior-x: none; }
body { overscroll-behavior-x: none; margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--font); min-height: 100vh; }
button, input, select { font: inherit; color: inherit; }
h1, h2, p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i.sm { width: 16px; height: 16px; }
.muted { color: var(--muted); font-weight: 400; }
.fine { color: var(--muted); font-size: .85rem; margin-top: .5rem; }
.center { text-align: center; }
.boot { padding: 2rem; color: var(--muted); }
html { -webkit-tap-highlight-color: transparent; }
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Knöpfe */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .55rem 1rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; text-decoration: none; }
.btn:hover { background: var(--raised); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-style: dashed; }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.danger:not(.ghost) { background: var(--bad); color: #fff; }
.btn.large { min-height: 52px; width: 100%; font-size: 1rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.filebtn { position: relative; }
.iconbtn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; color: var(--muted); flex: none; }
.iconbtn:hover { background: var(--raised); color: var(--ink); }
.link { border: 0; background: none; padding: .35rem 0; color: var(--accent); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: .3rem; min-height: 36px; }
.buttons { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; margin-top: 1rem; }
.buttons.left { justify-content: flex-start; }
.stack { display: grid; gap: .6rem; }
.stack-lg { display: grid; gap: 1rem; max-width: 760px; }

/* Felder */
.field { display: grid; gap: .3rem; font-size: .85rem; font-weight: 600; color: var(--muted); margin-top: .75rem; }
.field input, .field select { min-height: 44px; padding: .5rem .7rem; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 1rem; font-weight: 400; width: 100%; }
.field input[readonly] { opacity: .7; }
.field.grow { flex: 1 1 180px; }
.field.amount { flex: 0 1 140px; }
.check { display: flex; align-items: center; gap: .5rem; margin-top: .75rem; min-height: 44px; cursor: pointer; }
.check input, .radio input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.radio { display: flex; gap: .7rem; align-items: flex-start; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; margin-top: .5rem; cursor: pointer; }
.radio:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio span { display: grid; }
.radio small { color: var(--muted); }
.rowfields { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; }
.rowfields .check { margin-top: 0; }
.errors:empty { display: none; }
.errors { margin-top: .8rem; padding: .6rem .8rem; border-radius: 10px; background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); font-weight: 600; }
.sectionlabel { margin: 1.25rem 0 .3rem; font-size: .85rem; color: var(--muted); font-weight: 700; }

/* Willkommen und Assistent */
.welcome { min-height: 100vh; display: grid; place-items: center; padding: 1.25rem; }
.welcome-card { width: min(560px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.5rem; box-shadow: var(--shadow); }
.welcome-card h1 { font-size: 1.6rem; margin-top: 1rem; }
.lead { color: var(--muted); margin: .4rem 0 1.2rem; }
.brand { display: flex; align-items: center; gap: .65rem; }
.brand span { display: grid; line-height: 1.15; }
.brand small { color: var(--muted); font-size: .8rem; }
.mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.brand.big .mark { width: 44px; height: 44px; }
.steps { color: var(--accent); font-weight: 700; font-size: .85rem; }
.progress { display: flex; gap: .35rem; margin-top: .4rem; }
.progress i { height: 4px; flex: 1; border-radius: 4px; background: var(--line); }
.progress i.on { background: var(--accent); }
.wizard h1 { margin-top: .8rem; }
.preview { margin-top: 1rem; padding: .8rem 1rem; border-radius: 12px; background: var(--raised); }

/* Zeilen */
.row { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row.total { font-weight: 700; }
.row strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-btn { display: flex; align-items: center; gap: .75rem; width: 100%; min-height: 52px; padding: .55rem .2rem; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; }
.row-btn:last-of-type { border-bottom: 0; }
.row-btn:hover { background: var(--raised); }
.row-btn:active { background: color-mix(in srgb, var(--ink) 6%, transparent); }
@media (hover: none) { .row-btn:hover { background: none; } }
.row-btn .grow { flex: 1; display: grid; }
.row-btn small { color: var(--muted); }
.row-btn strong { font-variant-numeric: tabular-nums; }
.row-btn.danger b { color: var(--bad); }
.hint { color: var(--muted); margin-bottom: .6rem; }
.empty { color: var(--muted); padding: .6rem 0; }

/* App-Rahmen: Seitenleiste am PC, Schublade am Handy */
.num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 650; }
.pos { color: var(--good); }
.neg { color: var(--bad); }
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: .15rem; padding: 1rem .75rem; border-right: 1px solid var(--line); background: var(--surface); z-index: 30; }
.hh { display: flex; align-items: center; gap: .65rem; width: 100%; padding: .55rem .6rem; border: 1px solid var(--line); border-radius: 14px; background: none; cursor: pointer; text-align: left; margin-bottom: .4rem; }
.hh > span:nth-child(2) { flex: 1; display: grid; line-height: 1.25; min-width: 0; }
.hh b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hh small { color: var(--muted); font-size: .8rem; }
.hh > .i { color: var(--muted); }
.navlabel { margin: .9rem .7rem .25rem; font-size: .8rem; font-weight: 700; color: var(--muted); }
.navlist { display: grid; grid-template-columns: minmax(0, 1fr); gap: .1rem; }
.sidefoot { margin-top: auto; padding-top: .8rem; }
.nav { display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 44px; padding: .5rem .7rem; border: 0; border-radius: 12px; background: none; cursor: pointer; text-align: left; color: var(--muted); font-weight: 600; }
.nav .nav-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.nav small.num { flex: none; font-size: .78rem; }
.nav:hover { background: var(--raised); }
.nav.active { background: var(--accent-soft); }
.nav.active .i { color: var(--accent); }
.nav.add, .nav.add .nav-name { color: var(--accent); }
.shade { display: none; }
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: .75rem; padding: .8rem 1.75rem; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.titlebtn { display: flex; align-items: center; gap: .3rem; min-width: 0; border: 0; background: none; padding: 0; cursor: default; color: inherit; }
.titlebtn > .i { display: none; color: var(--muted); }
.pagetitle { font-size: 1.35rem; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topspace { flex: 1; }
.monthchip { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; font-weight: 600; }
.monthchip em { font-style: normal; font-size: .75rem; padding: .1rem .45rem; border-radius: 999px; background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.quick { display: inline-flex; gap: .4rem; }
.content { padding: 1.4rem 1.75rem 3rem; outline: none; max-width: 1400px; }
.subtitle { color: var(--muted); margin-bottom: 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; box-shadow: var(--shadow); }
.cardhead { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .4rem; }
.cardhead h2 { display: flex; align-items: center; gap: .55rem; font-size: 1.02rem; }
.cardhead h2 .i { color: var(--accent); }
.bignum { font-size: 2rem; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.pill { font-size: .75rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.bottombar { display: none; }
.opt.opt-main { grid-column: 1 / -1; min-height: 0; border-color: color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 10%, var(--bg)); }

/* Knöpfe für Ausgabe und Plus */
.btn.expense { background: var(--expense); border-color: var(--expense); color: var(--expense-ink); font-weight: 750; }
.btn.expense:hover { filter: brightness(1.06); background: var(--expense); }
.btn.plusbtn { width: 48px; padding: 0; background: var(--raised); color: var(--accent); }
.btn.small { min-height: 38px; padding: .3rem .8rem; font-size: .9rem; }
.btn.plusbtn.small { width: 40px; padding: 0; }
.quick .btn.expense { padding: .3rem .8rem .3rem .6rem; }

/* Kopf mit Guthaben */
.hero { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: .9rem 1.5rem; padding: 1.4rem 1.6rem; border-radius: 24px; background: var(--hero); border: 1px solid var(--hero-line); margin-bottom: 1rem; }
.hero-main { display: grid; justify-items: start; gap: .1rem; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; color: inherit; }
.hero-label { color: var(--muted); font-weight: 600; }
.hero-num { font-size: clamp(2.4rem, 4vw, 3.1rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hero-sub { color: var(--muted); font-size: .9rem; }
.hero-bar { grid-column: 1; height: 6px; margin: 0; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.hero .hero-bar i { background: var(--good); }
.hero-actions { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: .5rem; align-self: end; }
.hero-actions .btn { min-height: 48px; border-radius: 14px; }
.hero-actions .btn.expense { min-width: 112px; }
.hero-actions .plusbtn { width: 56px; background: color-mix(in srgb, var(--ink) 8%, transparent); border-color: color-mix(in srgb, var(--ink) 12%, transparent); }

/* Bausteine mit Größe am PC */
.blocks { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.blocks > * { grid-column: span 6; min-width: 0; }
.blocks > .size-s { grid-column: span 2; }
.blocks > .size-m { grid-column: span 3; }
.blocks.single > * { grid-column: 1 / -1; }
@media (max-width: 1180px) { .blocks > .size-s { grid-column: span 3; } }
.pagefoot { margin-top: 1.5rem; display: flex; justify-content: center; }

/* Hinweise */
.notes { border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 7%, var(--surface)); border-radius: var(--radius); padding: .15rem 1rem; }
.note-row { display: flex; align-items: center; gap: .75rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.note-row.first { border-top: 0; }
.note-row .grow { flex: 1; display: grid; min-width: 0; }
.note-row small { color: var(--muted); font-size: .85rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.more-pill { display: inline-flex; align-items: center; gap: .15rem; min-height: 34px; padding: .2rem .55rem .2rem .7rem; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); font-weight: 750; cursor: pointer; }
.notes-close { display: flex; justify-content: center; align-items: center; gap: .3rem; width: 100%; min-height: 42px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--muted); font-weight: 600; cursor: pointer; }

/* Budgets als Kästchen */
.bpills { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; margin: .3rem 0 .4rem; }
.bpill { display: grid; gap: .1rem; text-align: left; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); cursor: pointer; min-width: 0; }
.bpill:hover { border-color: var(--accent); }
.bpill > small:first-child { color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bpill b { font-size: 1.15rem; }
.bpill small.muted { font-size: .78rem; }
.bpill .bar i { background: var(--c); }
.bpill .bar.over i { background: var(--bad); }

/* Kategorie-Farbrand, auf Wunsch */
:root[data-cat="on"] .catb { box-shadow: inset 4px 0 0 var(--c, transparent); padding-left: .75rem; }
:root[data-cat="on"] .bpill.catb { box-shadow: inset 4px 0 0 var(--c, transparent); }
:root[data-cat="on"] .chip.catb { box-shadow: inset 4px 0 0 var(--c, transparent); }

/* Chips, Suche, Tagesliste */
.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chip { display: inline-flex; align-items: center; gap: .35rem; flex: none; min-height: 38px; padding: .35rem .85rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-weight: 600; cursor: pointer; white-space: nowrap; }
.chip small { font-weight: 650; font-size: .8rem; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.chip.on .i { color: var(--accent); }
.filterbar { display: grid; gap: .55rem; margin-bottom: .9rem; max-width: 900px; }
.search { display: flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); }
.search input { flex: 1; border: 0; background: none; outline: none; min-height: 42px; color: var(--ink); font-size: 1rem; }
.sums { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: .8rem; max-width: 900px; }
.sums > span { display: grid; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.sums small { color: var(--muted); font-size: .82rem; }
.sums strong { font-size: 1.15rem; }
.daylist { max-width: 900px; }
.dayhead { margin: .9rem 0 .1rem; font-size: .85rem; color: var(--muted); }
.dayhead:first-child { margin-top: .2rem; }

/* Planung */
.status { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .9rem 1rem; margin-bottom: 1rem; max-width: 900px; border: 1px solid var(--line); border-left: 4px solid var(--good); border-radius: 14px; background: var(--surface); }
.status.planning { border-left-color: var(--accent); }
.status .grow { flex: 1 1 220px; display: grid; }
.status small { color: var(--muted); }

/* Plus-Auswahl */
.optgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.opt { display: grid; justify-items: start; align-content: start; gap: .15rem; padding: .85rem; min-height: 118px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); text-align: left; cursor: pointer; }
.opt:hover:not([disabled]) { border-color: var(--c); }
.opt[disabled] { opacity: .5; cursor: not-allowed; }
.opt small { color: var(--muted); font-size: .8rem; line-height: 1.3; }
.oi { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); margin-bottom: .35rem; }

/* Buchen */
.dlg.sheet .dlg-body { padding-bottom: 0; }
.bookform { display: flex; flex-direction: column; }
.seg3 { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.seg3 button { min-height: 38px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-weight: 650; cursor: pointer; }
.tone-ex .seg3 [aria-checked="true"] { background: var(--expense); color: var(--expense-ink); }
.tone-in .seg3 [aria-checked="true"] { background: var(--income); color: var(--income-ink); }
.tone-tr .seg3 [aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }
.bk-amount { display: flex; justify-content: center; align-items: baseline; gap: .1rem; margin: 1.1rem auto .1rem; padding: 0 .4rem .2rem; border-bottom: 2px solid transparent; font-size: clamp(2.6rem, 11vw, 3.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; cursor: text; }
.bk-amount:focus-within { border-bottom-color: currentColor; }
.bk-amount input { field-sizing: content; border: 0; background: none; outline: none; padding: 0; font: inherit; color: inherit; text-align: right; min-width: 1ch; max-width: 9ch; font-variant-numeric: tabular-nums; }
.bk-amount input::placeholder { color: inherit; opacity: .45; }
.amount-cur { margin-left: .15em; }
@supports (field-sizing: content) { .bk-amount input { width: auto !important; } }
.amount-sign { margin-right: .05em; }
.tone-ex .bk-amount { color: var(--expense); }
.tone-in .bk-amount { color: var(--income); }
.tone-tr .bk-amount { color: var(--accent); }
.note-input { align-self: center; width: min(100%, 320px); margin-bottom: .3rem; padding: .35rem .5rem; border: 0; border-bottom: 1px dashed var(--line); background: none; text-align: center; font-size: 1.05rem; font-weight: 600; color: var(--ink); outline: none; }
.note-input:focus { border-bottom-color: var(--accent); }
.numpad { display: none; }
.fl { margin: .9rem 0 .4rem; font-size: .85rem; font-weight: 650; color: var(--muted); }
.avatars { display: flex; gap: .9rem; flex-wrap: wrap; }
.av { display: grid; justify-items: center; gap: .2rem; border: 0; background: none; padding: 0; cursor: pointer; color: var(--muted); font-weight: 600; }
.av i { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; font-style: normal; font-weight: 800; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
/* Hell: Kürzel dunkler, damit sie auf dem hellen Grund lesbar bleiben */
:root[data-theme="hell"] .av i { color: color-mix(in srgb, var(--c) 40%, #142029); }
.av small { font-size: .78rem; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av[aria-checked="true"] { color: var(--ink); }
.av[aria-checked="true"] i { background: var(--c); color: #0b1016; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); }
.avatars.sm { gap: .7rem; }
.avatars.sm i { width: 36px; height: 36px; font-size: .85rem; }
.effect { display: grid; gap: .5rem; margin-top: 1rem; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.effect:empty { display: none; }
.ba { display: flex; justify-content: space-between; align-items: center; gap: .6rem; font-size: .92rem; }
.ba > span:first-child { color: var(--muted); }
.ba .num { display: inline-flex; align-items: center; gap: .25rem; }
.ba .i { color: var(--muted); }
.bar2 { display: flex; height: 8px; border-radius: 6px; background: var(--raised); overflow: hidden; }
.bar2 i { display: block; height: 100%; background: color-mix(in srgb, var(--accent) 55%, transparent); }
.bar2 i.use { background: repeating-linear-gradient(135deg, var(--expense) 0 4px, transparent 4px 8px); }
.okline { display: flex; align-items: center; gap: .4rem; color: var(--good); font-size: .85rem; font-weight: 600; }
.split { display: grid; gap: .55rem; padding: .7rem; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent); background: color-mix(in srgb, var(--bad) 8%, var(--surface)); }
.split p { font-size: .9rem; }
.moreopts { margin-top: .8rem; border: 1px solid var(--line); border-radius: 14px; padding: 0 .9rem; background: var(--bg); }
.moreopts summary { display: flex; align-items: center; gap: .6rem; min-height: 52px; cursor: pointer; list-style: none; }
.moreopts summary::-webkit-details-marker { display: none; }
.moreopts summary .grow { flex: 1; display: grid; }
.moreopts summary small { color: var(--muted); font-size: .82rem; }
.moreopts[open] summary .i { transform: rotate(180deg); }
.moreopts[open] { padding-bottom: .8rem; }
.moreopts .fl { margin-top: .2rem; }
.book-actions { position: sticky; bottom: 0; margin: .6rem -1.2rem 0; padding: .7rem 1.2rem 1rem; background: var(--surface); border-top: 1px solid var(--line); }
.btn.big { flex: 1; min-height: 54px; font-size: 1.05rem; font-weight: 780; border-radius: 16px; }
.tone-ex .btn.go { background: var(--expense); border-color: var(--expense); color: var(--expense-ink); }
.tone-in .btn.go { background: var(--income); border-color: var(--income); color: var(--income-ink); }
.tone-tr .btn.go { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.dlg.sheet:has(.tone-ex) { background: linear-gradient(180deg, color-mix(in srgb, var(--expense) 12%, var(--surface)), var(--surface) 260px); }
.dlg.sheet:has(.tone-in) { background: linear-gradient(180deg, color-mix(in srgb, var(--income) 11%, var(--surface)), var(--surface) 260px); }
.dlg.sheet .dlg-head { background: transparent; }

/* Seite anpassen */
.editor { max-width: 820px; display: grid; gap: .8rem; }
.blocklist { padding: .2rem 1rem; }
.blk { display: flex; align-items: center; gap: .7rem; padding: .7rem 0; border-bottom: 1px solid var(--line); background: var(--surface); }
.blk:last-child { border-bottom: 0; }
.blk .grow { flex: 1; display: grid; min-width: 0; }
.blk small { color: var(--muted); font-size: .84rem; }
.blk.off b { color: var(--muted); font-weight: 550; }
.blk.dragging { opacity: .85; box-shadow: var(--lift); border-radius: 12px; position: relative; z-index: 2; }
.grip, .grip-sp { width: 32px; height: 40px; flex: none; }
.grip { display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: grab; touch-action: none; }
.grip .i { stroke-width: 3; }
.bi { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 11px; color: var(--accent); background: var(--accent-soft); }
.blk.off .bi { color: var(--muted); background: var(--raised); }
.srcpick { display: inline-flex; align-items: center; gap: .35rem; margin-top: .2rem; font-size: .8rem; color: var(--muted); }
.srcpick select { border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); font-size: .8rem; padding: .15rem .3rem; }
.sizes { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); }
.sizes button { width: 30px; min-height: 28px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-weight: 700; font-size: .8rem; cursor: pointer; }
.sizes [aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }
.switch { position: relative; display: inline-block; width: 46px; height: 28px; flex: none; cursor: pointer; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--raised); border: 1px solid var(--line); transition: background .15s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform .15s; }
.switch input:checked + i { background: var(--accent); border-color: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); background: var(--accent-ink); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.pageopts summary { display: flex; justify-content: space-between; align-items: center; min-height: 44px; cursor: pointer; list-style: none; }
.pageopts summary::-webkit-details-marker { display: none; }
@media (prefers-reduced-motion: reduce) { .switch i, .switch i::after, .sidebar { transition: none !important; } }

/* Checkliste */
.checklist { margin-bottom: 1rem; max-width: 760px; }
.checklist ol { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: .75rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.tick { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.done .tick { background: var(--good); border-color: var(--good); color: var(--surface); }
.done .tick .i { width: 16px; height: 16px; stroke-width: 2.6; }
.cl-text { flex: 1; display: grid; }
.cl-text small { color: var(--muted); }
.done .cl-text b { color: var(--muted); font-weight: 500; }
.skipped .cl-text { opacity: .55; }

/* Dialog */
.dlg { width: min(520px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgb(0 0 0 / .3); }
.dlg.wide { width: min(640px, calc(100vw - 2rem)); }
.dlg::backdrop { background: rgb(5 10 15 / .55); }
.dlg-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: .7rem .7rem .3rem 1.2rem; background: var(--surface); z-index: 1; }
.dlg-head h2 { font-size: 1.15rem; }
.dlg-body { padding: 0 1.2rem 1.2rem; }
.dlg-body > p + p { margin-top: .6rem; }
.modulegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .6rem; }
.module { display: grid; justify-items: start; gap: .35rem; min-height: 84px; padding: .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); cursor: pointer; text-align: left; }
.module .i { color: var(--accent); }
.module:hover:not([disabled]) { border-color: var(--accent); }
.module[disabled] { opacity: .55; cursor: not-allowed; }
.module small { color: var(--muted); font-size: .75rem; }
.segmented { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; width: fit-content; max-width: 100%; }
.segmented button { min-height: 40px; padding: .4rem .9rem; border: 0; background: none; cursor: pointer; font-weight: 600; color: var(--muted); }
.segmented button[aria-checked="true"], .segmented button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.swatchpick { position: relative; width: 44px; height: 44px; border-radius: 10px; background: var(--c); border: 1px solid var(--line); flex: none; cursor: pointer; }
.swatchpick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.rowfields.cat { align-items: center; margin-top: .4rem; }
.rowfields.cat .field { margin-top: 0; }
.swatchrow { display: flex; align-items: center; gap: .35rem; margin-top: 1rem; }
.swatch { width: 18px; height: 18px; border-radius: 50%; background: var(--c); }
.swatchrow small { color: var(--muted); margin-left: .4rem; }

/* Abschnitt 2: Planung, Hinweise, Balken */
.bad { color: var(--bad); }
.link.strong { padding: 0; min-height: 0; justify-content: flex-start; text-align: left; }
.row .grow { flex: 1; display: grid; }
.row small, .row-btn small.note { color: var(--muted); font-size: .8rem; }
.row-btn small.note { color: var(--warn); }
.notice { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; max-width: 760px; border-left: 4px solid var(--accent); }
.notice .grow { flex: 1 1 260px; display: grid; gap: .15rem; }
.notice small { color: var(--muted); }
.notice.warn { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn) 9%, var(--surface)); padding: .8rem 1rem; border-radius: 12px; }
.notice.good { border-left-color: var(--good); }
.warnline { margin-top: .6rem; padding: .5rem .7rem; border-radius: 10px; background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); font-weight: 600; font-size: .9rem; }
.bar { display: block; height: 6px; margin-top: .35rem; border-radius: 6px; background: var(--raised); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--c, var(--accent)); border-radius: 6px; }
.catrow { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: .3rem .6rem; padding: .4rem 0; }
.catrow .bar { grid-column: 2 / -1; margin-top: 0; }
.catrow strong { font-variant-numeric: tabular-nums; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.date { flex: none; min-width: 3.6rem; font-size: .85rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.row-btn.budget .bar i { background: var(--c); }
.incomecheck { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .8rem .8rem; margin: .6rem 0 0; }
.incomecheck legend { padding: 0 .3rem; }
.incomecheck legend small { color: var(--muted); }
.incomecheck .segmented { margin-top: .2rem; }
.stack .btn { flex-direction: column; gap: .1rem; }
.stack .btn small { font-weight: 400; opacity: .8; }
.dlg-body .notice { margin: 0 0 .5rem; }
@media (max-width: 860px) {
  .segmented { width: 100%; }
  .segmented button { flex: 1; padding: .4rem .5rem; font-size: .85rem; }
}

details.more { margin-top: .8rem; border: 1px solid var(--line); border-radius: 10px; padding: .2rem .8rem .6rem; }
details.more summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; gap: .5rem; font-weight: 600; color: var(--muted); }
details.more .field { margin-top: .3rem; }
/* Abschnitte 3 bis 5: Buchen, Seiten anpassen, Rücklagen */
.good { color: var(--good); }
.row.sum { font-weight: 600; border-top: 1px solid var(--line); }
.buttons.tight { margin-top: .6rem; align-items: center; gap: .4rem 1rem; }
.field.big input { font-size: 1.6rem; font-weight: 700; min-height: 56px; font-variant-numeric: tabular-nums; }
.segmented.full { width: 100%; margin-top: .2rem; }
.segmented.full button { flex: 1; }
.okmark { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--good); color: var(--surface); flex: none; }
.okmark .i { stroke-width: 2.6; }
.row-btn.due.paid .grow b, .row-btn.due.auto .grow b { color: var(--muted); font-weight: 500; }
.row-btn.due.open small { color: var(--warn); }
.pagefoot { margin-top: 1.5rem; display: flex; justify-content: center; }
.editbar { margin-bottom: 1rem; max-width: 760px; border: 2px dashed var(--accent); }
.block.editing { border-style: dashed; }
.block.hiddenblock { opacity: .6; }
.blocktools { display: flex; align-items: center; gap: .3rem; margin-top: .6rem; flex-wrap: wrap; }
.blocktools .btn { min-height: 40px; padding: .35rem .8rem; }
.iconbtn[disabled] { opacity: .35; cursor: not-allowed; }
.rowfields.cat .grow { flex: 1; min-width: 0; }

.toast { pointer-events: none; position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 50; max-width: min(520px, calc(100vw - 2rem)); padding: .75rem 1rem; border-radius: 12px; background: var(--ink); color: var(--bg); font-weight: 600; box-shadow: 0 8px 30px rgb(0 0 0 / .25); }
.toast.error { background: var(--bad); color: #fff; }

/* Handy */
@media (max-width: 860px) {
  :root[data-size="gross"] { font-size: 17.5px; }
  :root[data-size="sehrgross"] { font-size: 19px; }
  :root[data-size="gross"] body { font-size: 16.5px; }
  :root[data-size="sehrgross"] body { font-size: 18px; }
  .pc-only { display: none !important; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(84vw, 320px); height: auto; padding-top: max(1rem, env(safe-area-inset-top)); transform: translateX(-105%); transition: transform .22s ease; box-shadow: 12px 0 40px rgb(0 0 0 / .45); z-index: 40; }
  .drawer-open .sidebar { transform: none; }
  .drawer-open .shade { display: block; position: fixed; inset: 0; z-index: 35; background: rgb(0 0 0 / .55); }
  .topbar { padding: .55rem 1rem; padding-top: max(.55rem, env(safe-area-inset-top)); gap: .5rem; border-bottom: 0; }
  .titlebtn { cursor: pointer; }
  .titlebtn > .i { display: block; }
  .pagetitle { font-size: 1.4rem; }
  .customize { display: none; }
  .monthchip { min-height: 36px; padding: .25rem .65rem; font-size: .85rem; }
  .monthchip .i { width: 16px; height: 16px; }
  .quick .btn.expense span { display: none; }
  .quick .btn.expense { padding: 0; width: 40px; }
  .content { padding: .4rem .9rem calc(6rem + env(safe-area-inset-bottom)); }
  .grid, .blocks { grid-template-columns: 1fr; gap: .75rem; }
  .blocks > *, .blocks > .size-s, .blocks > .size-m { grid-column: 1 / -1; }
  .hero { grid-template-columns: 1fr; padding: 1.1rem 1.15rem 1rem; border-radius: 22px; margin-bottom: .75rem; }
  .hero-num { font-size: 2.6rem; }
  .hero-bar { grid-column: 1; }
  .hero-actions { grid-column: 1; grid-row: auto; justify-content: flex-end; }
  .bpills { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; }
  .hero-actions, .topbar .quick { display: none; }
  .bottombar { display: grid; grid-template-columns: repeat(var(--tabs, 5), 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tab { display: grid; justify-items: center; gap: .15rem; min-height: 60px; padding: .5rem .2rem; border: 0; background: none; color: var(--muted); font-size: .75rem; font-weight: 600; cursor: pointer; min-width: 0; }
  .tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tab.active { color: var(--accent); }
  .tab.fab { color: var(--ink); }
  .fabc { display: grid; place-items: center; width: 56px; height: 56px; margin-top: -26px; border-radius: 50%; background: var(--expense); color: var(--expense-ink); border: 4px solid var(--surface); box-shadow: 0 6px 18px rgb(0 0 0 / .28); }
  .fabc .i { width: 26px; height: 26px; }
  .tab.fab:active .fabc { transform: scale(.94); }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .dlg { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 22px 22px 0 0; border-bottom: 0; }
  .dlg.wide { width: 100vw; }
  .numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin-top: .6rem; }
  .numpad button { min-height: 44px; border: 0; border-radius: 12px; background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); font: 650 1.3rem/1 var(--font); cursor: pointer; display: grid; place-items: center; }
  .numpad button:active { background: color-mix(in srgb, var(--ink) 14%, transparent); }
  .welcome { place-items: start center; padding: 1rem; }
  .welcome-card { padding: 1.25rem; }
  .rowfields { padding: .5rem 0; border-bottom: 1px solid var(--line); }
  .moreopts .rowfields, .pageopts .rowfields { border-bottom: 0; }
  .field.amount { flex: 1 1 120px; }
  .sums strong { font-size: 1.05rem; }
  .monthchip span { white-space: nowrap; }
  .opt { min-height: 0; padding: .75rem; }
  .modulegrid { grid-template-columns: 1fr 1fr; }
  .module { min-height: 0; grid-auto-flow: column; justify-content: start; align-items: center; gap: .6rem; padding: .7rem .8rem; }
}

/* Seite oder Bereich entfernen */
.retire-facts { margin: .8rem 0; padding: .6rem .8rem; border-radius: 12px; background: var(--raised); }
.tielist { margin: .2rem 0 0; padding-left: 1.1rem; }
.tielist li { padding: .15rem 0; }
fieldset.choice { border: 0; padding: 0; margin: .6rem 0 0; }
.choice .drop-confirm { display: none; }
.choice:has(input[value="drop"]:checked) .drop-confirm { display: flex; }
.choice:has(input[value="drop"]:checked) .radio:has(input[value="drop"]) { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); }

.chips.wrap { flex-wrap: wrap; margin-top: .4rem; }
.chip .i { margin-right: .3rem; vertical-align: -3px; }

/* Budgets als Liste */
.bsum { display: flex; align-items: baseline; gap: .5rem; margin: .1rem 0 .5rem; }
.bsum span { color: var(--muted); font-size: .9rem; }
.bsum strong { margin-left: auto; font-size: 1.05rem; }
.blist { display: grid; }
.brow { display: flex; align-items: center; gap: .8rem; width: 100%; padding: .65rem .2rem; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; color: inherit; }
.brow:last-child { border-bottom: 0; }
.brow:active { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.brow .grow { flex: 1; display: grid; gap: .15rem; min-width: 0; }
.brow .grow b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brow .grow small { color: var(--muted); font-size: .8rem; }
.brow .bar { margin-top: .15rem; }
.brow .bar i { background: var(--c); }
.brow .bar.over i { background: var(--bad); }
.brow.low .bar i { background: var(--warn); }
.bleft { display: grid; justify-items: end; flex: none; }
.bleft b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.bleft small { color: var(--muted); font-size: .75rem; }
:root[data-cat="on"] .brow.catb { box-shadow: inset 4px 0 0 var(--c, transparent); padding-left: .75rem; }

/* Buchen aus einem Budget */
.budget-head { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; border-radius: 12px; background: var(--raised); margin-bottom: .4rem; }
.budget-head .grow { flex: 1; display: grid; }
.budget-head small { color: var(--muted); }
.budget-head .num { font-weight: 700; }
:root[data-cat="on"] .budget-head.catb { box-shadow: inset 4px 0 0 var(--c, transparent); }

/* Gesamtausgaben */
.spend-total { display: grid; margin-bottom: .5rem; }
.spend-total strong { font-size: 1.6rem; font-weight: 750; }
.spendbar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: var(--raised); margin-bottom: .4rem; }
.spendbar i { display: block; height: 100%; }
.spendbar .basic, .key.basic { background: var(--accent); }
.spendbar .budgets, .key.budgets { background: var(--warn); }
.spendbar .allocations, .key.allocations { background: color-mix(in srgb, var(--accent) 45%, var(--good)); }
.spendbar .variable, .key.variable { background: color-mix(in srgb, var(--expense) 80%, transparent); }
.spend-row[disabled] { cursor: default; opacity: .75; }
.key { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.spend-row { display: flex; align-items: center; gap: .7rem; }
.spend-row .grow { flex: 1; display: grid; }
.spend-row small { color: var(--muted); font-size: .8rem; font-weight: 400; }
.spend-row .num { font-weight: 700; }
.spend-detail { padding: .1rem 0 .4rem 1.4rem; }
.row.sub { font-size: .9rem; padding: .3rem 0; }

/* Kopf: Frei verfügbar mit Aufklapper */
.hero-main { cursor: default; }
.hero-label .tag { font-style: normal; font-size: .72rem; font-weight: 700; padding: .1rem .45rem; border-radius: 999px; background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); vertical-align: 2px; margin-left: .3rem; }
.hero-more { display: inline-flex; align-items: center; gap: .35rem; margin-top: .55rem; min-height: 32px; padding: .2rem .7rem .2rem .75rem; border: 1px solid var(--hero-line); border-radius: 8px; background: none; color: var(--muted); font-size: .8rem; font-weight: 600; letter-spacing: .01em; cursor: pointer; }
.hero-more:hover { color: var(--ink); border-color: var(--muted); }
.hero-detail { grid-column: 1 / -1; display: grid; gap: .8rem; padding-top: .8rem; border-top: 1px solid var(--hero-line); }
.hd-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: .25rem; }
.hd-row { display: flex; align-items: baseline; gap: .8rem; padding: .3rem 0; font-size: .92rem; border-bottom: 1px solid color-mix(in srgb, var(--hero-line) 70%, transparent); }
.hd-row:last-child { border-bottom: 0; }
.hd-row .grow { flex: 1; display: grid; }
.hd-row small { color: var(--muted); font-size: .78rem; }
.hd-total { display: flex; justify-content: space-between; font-weight: 750; padding-top: .3rem; border-top: 2px solid var(--hero-line); }

/* Buchungen zusammengefasst */
.grouprow .i { color: var(--muted); }
.groupitems { padding: 0 0 .3rem .9rem; border-left: 2px solid var(--line); margin: 0 0 .3rem .3rem; }

/* Einklappbare Kacheln */
.blocktoggle { flex: none; display: grid; place-items: center; width: 34px; height: 34px; margin: -.3rem -.45rem -.3rem 0; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; }
.blocktoggle:hover { background: var(--raised); color: var(--ink); }
.cardhead > .muted { margin-left: auto; }
.card.collapsed { padding: 0; }
.blockhead { width: 100%; margin: 0; padding: .85rem 1.15rem; border: 0; background: none; color: inherit; cursor: pointer; text-align: left; font: inherit; }
.blockhead > .grow { flex: 1; display: grid; gap: .1rem; min-width: 0; }
.blockhead small { color: var(--muted); font-size: .85rem; padding-left: 1.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blockhead > .num { flex: none; }
.blockhead > .i { flex: none; color: var(--muted); }
.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: var(--shadow); } }
@media (prefers-reduced-motion: reduce) { .flash { animation: none; outline: 3px solid var(--accent); } }

/* Hinweise eingeklappt */
.notes { padding: 0 1rem; }
.notes.none { border-color: var(--line); background: var(--surface); }
.notes-head { display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 50px; padding: .55rem 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
div.notes-head { cursor: default; color: var(--muted); }
.notes-head .grow { flex: 1; display: grid; min-width: 0; }
.notes-head small { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notes-head > .i:first-child { color: var(--warn); }
.notes.none .notes-head > .i:first-child { color: var(--muted); }
.notes-head .count { min-width: 1.6rem; padding: .1rem .45rem; border-radius: 999px; background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); font-weight: 750; font-size: .8rem; text-align: center; }
.note-go { flex: 1; display: grid; gap: .05rem; min-width: 0; padding: .2rem 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.note-go small { color: var(--muted); font-size: .85rem; }
.golink { display: inline-flex; align-items: center; gap: .15rem; color: var(--accent); font-size: .8rem; font-weight: 650; }

/* Geldquellen: Bezug zu anderen Seiten */
.row-btn.ref b { font-weight: 600; color: var(--muted); }

/* Einnahme buchen: was schon im Monat steckt */
.infobox { display: grid; gap: .2rem; margin-top: .6rem; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); font-size: .9rem; }
.infobox > small { color: var(--muted); font-size: .8rem; margin-top: .2rem; }

/* Seitenleiste am Handy */
.drawer-x { display: none; }
@media (max-width: 860px) {
  .drawer-x { display: flex; justify-content: center; width: 100%; min-height: 52px; margin-top: .6rem; }
  .sidebar { padding-bottom: max(1rem, env(safe-area-inset-bottom)); overscroll-behavior: contain; }
  /* Offene Seitenleiste: Seite steht still, die Leiste unten ist weg, Schatten und Leiste reichen auch bei
     einblendender Browserleiste bis ganz nach unten. So scheint beim schnellen Wischen nichts durch. */
  html:has(.drawer-open), html:has(.drawer-open) body { overflow: hidden; }
  .drawer-open .bottombar { visibility: hidden; }
  .drawer-open .shade { bottom: -120px; }
}

/* ---------- Wächter ---------- */
.guardchip { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--good); cursor: pointer; }
.guardchip .i { width: 20px; height: 20px; }
.guardchip.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.guardchip.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 55%, var(--line)); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); }
.guardchip.active { box-shadow: 0 0 0 2px var(--accent); }
.guardchip b { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: currentColor; font-size: .72rem; line-height: 19px; text-align: center; }
.guardchip b { color: var(--bg); background: var(--warn); }
.guardchip.bad b { background: var(--bad); }
.gbadge { margin-left: auto; min-width: 1.4rem; padding: .05rem .4rem; border-radius: 999px; font-weight: 750; font-size: .75rem; text-align: center; }
.gbadge.warn { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); }
.gbadge.bad { background: color-mix(in srgb, var(--bad) 20%, transparent); color: var(--bad); }
.gbadge.good { color: var(--good); background: none; }

.guard { --lv: var(--good); display: grid; gap: 1.1rem; max-width: 1100px; }
.guard.warn { --lv: var(--warn); }
.guard.bad { --lv: var(--bad); }
.gradar { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1.6rem; padding: 1.4rem 1.6rem; border: 1px solid var(--hero-line); border-radius: calc(var(--radius) + 6px); background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--lv) 14%, transparent), transparent 55%), var(--hero); }
.gring { position: relative; width: 168px; aspect-ratio: 1; }
.gring svg { width: 100%; height: 100%; overflow: visible; }
.gticks line { stroke: color-mix(in srgb, var(--ink) 22%, transparent); stroke-width: 1.2; stroke-linecap: round; }
.gtrack { fill: none; stroke: color-mix(in srgb, var(--ink) 9%, transparent); stroke-width: 10; }
.garc { fill: none; stroke: var(--lv); stroke-width: 10; stroke-linecap: round; stroke-dashoffset: var(--off); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--lv) 55%, transparent)); }
.gsweep { position: absolute; inset: 15%; border-radius: 50%; opacity: 0; background: conic-gradient(from 0deg, transparent 0 290deg, color-mix(in srgb, var(--accent) 45%, transparent) 360deg); -webkit-mask: radial-gradient(circle, #000 0 69%, transparent 70%); mask: radial-gradient(circle, #000 0 69%, transparent 70%); }
.gscore { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.gscore strong { font-size: 2.6rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.gscore small { color: var(--muted); font-size: .78rem; margin-top: .2rem; }
.gintro h2 { margin: 0 0 .3rem; font-size: 1.45rem; line-height: 1.2; letter-spacing: -.01em; }
.gintro p { margin: 0 0 .9rem; color: var(--muted); max-width: 60ch; }
.gstages { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 .9rem; padding: 0; list-style: none; }
.gstage-pill { --c: var(--good); display: flex; align-items: center; gap: .55rem; padding: .45rem .8rem .45rem .6rem; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--surface) 75%, transparent); }
.gstage-pill.warn { --c: var(--warn); } .gstage-pill.bad { --c: var(--bad); } .gstage-pill.info { --c: var(--accent); }
.gstage-pill i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent); }
.gstage-pill span { display: grid; line-height: 1.2; }
.gstage-pill small { color: var(--muted); font-size: .78rem; }

/* Der eine Moment: beim Öffnen läuft der Radar einmal herum, die drei Stufen schalten nacheinander durch. */
.guard.scan .gsweep { animation: gsweep 1.5s cubic-bezier(.4, 0, .2, 1) both; }
.guard.scan .garc { animation: garc 1.5s cubic-bezier(.3, .7, .2, 1) both; }
.guard.scan .gstage-pill { animation: glight .5s ease both; animation-delay: calc(.35s + var(--d) * .35s); }
.guard.scan .gfinds, .guard.scan .gscore { animation: gin .5s ease 1.4s both; }
@keyframes gsweep { 0% { opacity: 0; transform: rotate(0); } 12% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: rotate(360deg); } }
@keyframes garc { from { stroke-dashoffset: var(--full); } to { stroke-dashoffset: var(--off); } }
@keyframes glight { from { opacity: .25; filter: grayscale(1); } to { opacity: 1; filter: none; } }
@keyframes gin { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .guard .gsweep, .guard .garc, .guard .gstage-pill, .guard .gfinds, .guard .gscore { animation: none !important; } }

.gfinds { display: grid; gap: .6rem; }
.gfind { --c: var(--accent); position: relative; display: grid; gap: .2rem; padding: .9rem 1.1rem .9rem 1.3rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.gfind::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--c); }
.gfind.warn { --c: var(--warn); } .gfind.bad { --c: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); background: color-mix(in srgb, var(--bad) 6%, var(--surface)); }
.glevel { display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; color: var(--c); font-weight: 750; font-size: .82rem; }
.glevel em { font-style: normal; font-weight: 500; color: var(--muted); }
.gtitle { font-size: 1.02rem; }
.gsub { margin: 0; color: var(--muted); }
.gacts { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .45rem; }
.gquiet { display: flex; gap: .9rem; align-items: center; padding: 1rem 1.2rem; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.gquiet .i { width: 28px; height: 28px; color: var(--good); }
.gquiet span { display: grid; } .gquiet b { color: var(--ink); }

.gcols { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.1rem; align-items: start; }
.gok { padding: .2rem .65rem; border-radius: 999px; font-weight: 700; font-size: .8rem; }
.gok.good { color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); }
.gok.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.geq { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .6rem; margin: .7rem 0; padding: .8rem; border-radius: 12px; background: var(--raised); text-align: center; }
.geq small { display: block; color: var(--muted); font-size: .78rem; }
.geq strong { font-size: 1.15rem; }
.geq-sign { font-size: 1.6rem; font-weight: 300; color: var(--good); }
.guard.bad .geq-sign { color: var(--bad); }
.gway summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: .35rem 0; }
.gway .row, .gsum .row { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-top: 1px solid var(--line); }
.gsum { margin-top: .5rem; }
.gway .row.total, .gsum .row.total { font-weight: 750; }
.gchecks ul { list-style: none; margin: 0; padding: 0; }
.gcheck { --c: var(--good); display: flex; align-items: center; gap: .7rem; padding: .5rem 0; border-top: 1px solid var(--line); }
.gcheck:first-child { border-top: 0; }
.gcheck.warn { --c: var(--warn); } .gcheck.bad { --c: var(--bad); } .gcheck.info { --c: var(--accent); } .gcheck.off { --c: var(--line); opacity: .6; }
.gcheck > i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.gcheck .grow { display: grid; min-width: 0; }
.gcheck small { color: var(--muted); font-size: .82rem; }
.gcount { min-width: 1.6rem; text-align: center; font-weight: 750; color: var(--c); }
.gignored .row { display: flex; align-items: center; gap: .8rem; padding: .45rem 0; border-top: 1px solid var(--line); }
.gignored .row .grow { display: grid; } .gignored small { color: var(--muted); }

.greview { margin-bottom: .6rem; }
.gline { --c: var(--accent); display: flex; gap: .6rem; align-items: baseline; margin: .3rem 0; }
.gline.good { --c: var(--good); } .gline.warn { --c: var(--warn); } .gline.bad { --c: var(--bad); }
.gline i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; transform: translateY(-1px); }

@media (max-width: 860px) {
  .gradar { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 1.2rem 1rem; gap: 1rem; }
  .gring { width: 150px; }
  .gintro p { margin-inline: auto; }
  .gstages { justify-content: center; }
  .gcols { grid-template-columns: 1fr; }
  .guardchip { width: 38px; height: 38px; }
}
.gtab-ico { position: relative; display: inline-grid; place-items: center; }
.gtab.good .gtab-ico { color: var(--good); }
.gtab.warn .gtab-ico { color: var(--warn); }
.gtab.bad .gtab-ico { color: var(--bad); }
.gtab-ico b { position: absolute; top: -5px; right: -9px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--warn); color: var(--bg); font-size: .66rem; line-height: 16px; text-align: center; }
.gtab.bad .gtab-ico b { background: var(--bad); }
@media (max-width: 860px) { .topbar .guardchip { display: none; } }
.gcheck b, .gstage-pill b { color: var(--ink); }
.gcheck .grow { flex: 1; }
.gcheck.off b { color: var(--muted); }
@media (max-width: 860px) {
  .gstages { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; gap: .4rem; }
  .gstage-pill { flex-direction: column; gap: .3rem; padding: .5rem .3rem; text-align: center; }
  .gstage-pill span { justify-items: center; }
}
.guard.good, .gcheck.good, .gstage-pill.good { color: var(--ink); }
@media (max-width: 860px) { .tab.gtab.good:not(.active) { color: var(--muted); } }
.gscan { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; }
.gscan small { color: var(--muted); font-size: .8rem; }
@media (max-width: 860px) { .gscan { justify-content: center; } }
.rowfields.costrow { display: grid; grid-template-columns: 1fr 8.5rem 11rem; align-items: end; gap: .5rem .75rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.rowfields.costrow .check { align-self: center; margin: 0; }
.rowfields.costrow .field { margin: 0; }
@media (max-width: 860px) {
  .rowfields.costrow { grid-template-columns: 1fr 1fr; }
  .rowfields.costrow .check { grid-column: 1 / -1; }
  .rowfields.costrow select, .rowfields.costrow input:not([type=checkbox]) { width: 100%; }
}

/* ---------- Schrift: Michroma für Titel und große Beträge, Exo 2 für alles andere (beide lokal, SIL OFL) ---------- */
@font-face { font-family: 'Michroma'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/michroma-latin.woff2) format('woff2'); unicode-range: U+0000-20AB, U+20AD-FFFF; } /* € kommt aus Exo 2, das von Michroma sieht wie ein O aus */
@font-face { font-family: 'Exo 2'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/exo2-latin.woff2) format('woff2'); }
:root, :root[data-theme] { --font: "Exo 2", "Segoe UI", system-ui, sans-serif; --display: "Michroma", "Exo 2", system-ui, sans-serif; --glow: 0 0 1px rgb(240 248 255 / .55), 0 0 10px rgb(214 236 255 / .38), 0 0 22px rgb(190 225 255 / .18); --cold: #eef7ff; }
.num, .hero-num, .gscore strong, .geq strong { font-variant-numeric: tabular-nums lining-nums; }
.pagetitle, .welcome h1, .wizard h1, .gintro h2, .brand strong { font-family: var(--display); font-weight: 400; letter-spacing: .01em; }
.pagetitle { font-size: 1.15rem; }
.hero-num, .gscore strong { font-family: var(--display); font-weight: 400; letter-spacing: -.01em; }
.hero-num { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.gscore strong { font-size: 2.2rem; }
.gintro h2 { font-size: 1.15rem; line-height: 1.35; }
/* Leichtes kaltweißes Leuchten um die wichtigsten Werte, nur in den dunklen Farben */
:root:not([data-theme="hell"]) .hero-num.pos, :root:not([data-theme="hell"]) .gscore strong { color: var(--cold); text-shadow: var(--glow); }
:root:not([data-theme="hell"]) .bleft .num.pos, :root:not([data-theme="hell"]) .bsum strong:not(.neg) { color: var(--cold); text-shadow: 0 0 1px rgb(240 248 255 / .5), 0 0 8px rgb(214 236 255 / .32); }
@media (max-width: 860px) { .hero-num { font-size: 2rem; } .pagetitle { font-size: 1.05rem; } }

.tab .gtab-ico { overflow: visible; max-width: none; }

/* ---------- Sperrbildschirm ---------- */
.lockscreen .lock { text-align: center; }
.lockscreen .lock .brand { justify-content: center; }
.lockicon { display: inline-grid; place-items: center; width: 64px; height: 64px; margin: 1.2rem auto .4rem; border-radius: 50%; color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 10%, transparent), 0 0 28px rgb(190 225 255 / .18); }
.lockicon .i { width: 28px; height: 28px; }
.lockscreen .field { text-align: left; }
.lockscreen .field input { font-size: 1.3rem; letter-spacing: .3em; text-align: center; }
.lockscreen .btn.large { width: 100%; margin-top: .4rem; }
.lockscreen .link { margin-top: .8rem; }
/* Ziffern innen grün, feine schwarze Kontur, darum das kaltweiße Leuchten */
:root:not([data-theme="hell"]) { --outline: .9px 0 0 #000, -.9px 0 0 #000, 0 .9px 0 #000, 0 -.9px 0 #000, .7px .7px 0 #000, -.7px -.7px 0 #000, .7px -.7px 0 #000, -.7px .7px 0 #000; }
:root:not([data-theme="hell"]) .hero-num.pos, :root:not([data-theme="hell"]) .gscore strong { color: var(--good); text-shadow: var(--outline), 0 0 10px rgb(214 236 255 / .5), 0 0 22px rgb(190 225 255 / .25); }
:root:not([data-theme="hell"]) .bleft .num.pos, :root:not([data-theme="hell"]) .bsum strong:not(.neg) { color: var(--good); text-shadow: .6px 0 0 #000, -.6px 0 0 #000, 0 .6px 0 #000, 0 -.6px 0 #000, 0 0 8px rgb(214 236 255 / .4); }

/* ---------- Buchen als Yin und Yang ---------- */
@media (max-width: 860px) {
  .tab.fab.yy { position: relative; display: grid; justify-items: center; gap: .1rem; padding-top: .5rem; }
  .yyc { position: relative; display: block; width: 60px; height: 60px; margin-top: -28px; border-radius: 50%; padding: 3px; background: var(--surface); box-shadow: 0 6px 18px rgb(0 0 0 / .32), 0 0 16px rgb(190 225 255 / .12); }
  .yyc svg { display: block; width: 100%; height: 100%; overflow: visible; }
  .yy-in { fill: var(--income); }
  .yy-out { fill: var(--expense); }
  .yy-mark { fill: none; stroke: #0b1016; stroke-width: 6; stroke-linecap: round; }
  .yy-half { position: absolute; top: 0; bottom: 0; width: 50%; border: 0; padding: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; border-radius: 30px 0 0 30px; }
  .yy-r { inset: 0; width: auto; border-radius: 50%; }
  .yy-half:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
  .yy-half:active { background: rgb(255 255 255 / .12); }
  .yy-more { border: 0; background: none; color: var(--ink); font: inherit; font-size: .75rem; font-weight: 600; cursor: pointer; padding: .1rem .4rem; }
  .yyc svg { transition: transform .5s cubic-bezier(.3, .7, .2, 1); }
  .yy:has(.yy-half:active) svg { transform: rotate(-30deg) scale(.96); }
  @media (prefers-reduced-motion: reduce) { .yyc svg { transition: none; } .yy:has(.yy-half:active) svg { transform: scale(.96); } }
}

/* Offenes Fenster (Dialog) oder Seitenleiste: Runterziehen lädt die Seite nicht neu */
html:has(#dlg[open]), html:has(#dlg[open]) body, html:has(.drawer-open), html:has(.drawer-open) body { overscroll-behavior-y: none; }
html:has(#dlg[open]) { overflow: hidden; }
#dlg { overscroll-behavior: contain; }
#dlg .dlg-body { overscroll-behavior: contain; }

/* ---------- Eigene Kachel ---------- */
form[data-form="custom"] .ck { display: none; margin-top: .4rem; }
form[data-form="custom"][data-kind="sum"] .ck-sum, form[data-form="custom"][data-kind="list"] .ck-list,
form[data-form="custom"][data-kind="goal"] .ck-goal, form[data-form="custom"][data-kind="note"] .ck-note { display: block; }
.csum { display: grid; gap: .15rem; margin: .2rem 0 .5rem; }
.csum strong { font-family: var(--display); font-weight: 400; font-size: 1.5rem; }
.cnote { white-space: pre-wrap; margin: .2rem 0 .4rem; }
.block[data-block="eigene"] .bar { display: block; height: 8px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 10%, transparent); overflow: hidden; }
.block[data-block="eigene"] .bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.block[data-block="eigene"] .bar.done i { background: var(--good); }
.iconbtn.sm { width: 32px; height: 32px; min-height: 32px; }

/* Bildschirmtastatur offen: Fenster oben anheften, Höhe = sichtbarer Bereich */
@media (max-width: 860px) {
  html.kb-open .dlg { position: fixed; top: var(--vvt, 0px); bottom: auto; margin: 0; max-height: var(--vvh, 100vh); border-radius: 0 0 22px 22px; border-bottom: 1px solid var(--line); border-top: 0; }
}

/* ---------- Datenschutz-Übersicht ---------- */
.privacy { display: grid; gap: .1rem; margin: 1rem 0; }
.privacy.pv-welcome { padding: 1rem; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.privacy h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; }
.privacy > p:not(.fine) { color: var(--muted); margin: .2rem 0 .4rem; }
.pv-item { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.privacy .pv-item:first-of-type { border-top: 0; }
.pv-item > .i { flex: none; color: var(--muted); }
.pv-item .grow { flex: 1; display: grid; min-width: 0; }
.pv-item small { color: var(--muted); font-size: .82rem; line-height: 1.3; }
.pv-tag { flex: none; font-size: .75rem; font-weight: 700; padding: .2rem .55rem; border-radius: 999px; color: var(--muted); background: color-mix(in srgb, var(--ink) 8%, transparent); white-space: nowrap; }
.pv-tag.on { color: var(--good); background: color-mix(in srgb, var(--good) 15%, transparent); }
.pv-more { margin-top: .6rem; }
.pv-warn { color: color-mix(in srgb, var(--warn, #e0a84f) 80%, var(--ink)) !important; margin-top: .15rem; }
.pv-item { align-items: flex-start; }
.pv-item > .i { margin-top: .15rem; }
.pv-item > .pv-tag, .pv-item > .btn, .pv-item > .switch { margin-top: .1rem; }

.pv-details { margin-top: .35rem; font-size: .82rem; }
.pv-details summary { cursor: pointer; color: var(--accent); font-weight: 650; list-style: none; }
.pv-details summary::-webkit-details-marker { display: none; }
.pv-details summary::before { content: "+ "; }
.pv-details[open] summary::before { content: "− "; }
.pv-details dl { margin: .4rem 0 .2rem; display: grid; gap: .1rem; }
.pv-details dt { font-weight: 700; margin-top: .35rem; }
.pv-details dd { margin: 0; color: var(--muted); line-height: 1.35; }
.pv-item { flex-wrap: wrap; }
.pv-item > .pv-details { flex: 1 0 100%; padding-left: calc(20px + .7rem); margin-top: -.1rem; }

/* Leere Seite: einmalig großes Plus */
.bigplus { grid-column: 1 / -1; display: grid; justify-items: center; gap: .8rem; width: 100%; padding: 2.5rem 1rem; border: 2px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 22px; background: color-mix(in srgb, var(--accent) 6%, transparent); color: var(--ink); cursor: pointer; text-align: center; }
.bigplus > .i { width: 72px; height: 72px; padding: 14px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); stroke-width: 2.2; }
.bigplus span { display: grid; gap: .2rem; }
.bigplus b { font-size: 1.1rem; }
.bigplus small { color: var(--muted); }
.bigplus:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.bigplus:active > .i { transform: scale(.95); }

/* Einstellungen: Bereich „Erweitert“ */
.settings-adv > summary { display: flex; align-items: center; gap: .6rem; cursor: pointer; list-style: none; }
.settings-adv > summary::-webkit-details-marker { display: none; }
.settings-adv > summary .grow { display: grid; flex: 1; }
.settings-adv > summary small { color: var(--muted); }
.settings-adv[open] > summary .i { transform: rotate(180deg); }
.settings-adv .sectionlabel:first-of-type { margin-top: .9rem; }
.kasse-opt { margin-top: 1rem; padding: .8rem; border: 1px solid var(--line); border-radius: 14px; }

.pv-wide { flex: 1 0 100%; }

:root[data-theme="hell"] .opt-main small { color: #44525e; }
/* Tastatur: sichtbarer Fokus auch bei Feldern ohne eigenen Rahmen */
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.note-input:focus { border-bottom: 2px solid var(--accent); }

/* Konto-Symbol oben rechts und Konto-Fenster */
.acctbtn { position: relative; display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.acctbtn:hover { color: var(--ink); background: var(--raised); }
.acctbtn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }
.acctbtn .ini { font-weight: 700; font-size: .85rem; letter-spacing: .02em; }
.acctbtn .dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 999px; border: 2px solid var(--bg); background: var(--good); }
.acctbtn.pending .dot { background: var(--accent); }
.acctbtn.offline .dot { background: var(--warn, #e0a84f); }
@media (max-width: 860px) { .acctbtn { width: 36px; height: 36px; } }
.acct-head { display: flex; align-items: center; gap: .8rem; padding: .2rem 0 .4rem; }
.acct-head .grow { display: grid; flex: 1; min-width: 0; }
.acct-head .grow b { overflow-wrap: anywhere; }
.acct-head small { color: var(--muted); }
.ini.big { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--accent); font-weight: 700; flex: none; }
.codebox { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: .8rem 0; padding: .8rem; border: 1px dashed var(--accent); border-radius: 10px; background: var(--accent-soft); }
.codebox code { flex: 1; min-width: 12ch; font: 700 1.05rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .06em; overflow-wrap: anywhere; user-select: all; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .04em; }
.row-btn.static { cursor: default; gap: .5rem; flex-wrap: wrap; }
.row-btn.static:hover { background: none; }
.row-btn.static .btn { flex: none; }
.inline-form { display: flex; align-items: flex-end; gap: .6rem; flex-wrap: wrap; }
.inline-form .grow { flex: 1; min-width: 14rem; }
.inline-form .errors { flex-basis: 100%; }
.dlg .segmented { margin-bottom: .6rem; }

/* Beta: Schritte, Feedback */
.steptag { margin: 0 0 .2rem; font-size: .82rem; color: var(--muted); letter-spacing: .02em; }
.steptag b { color: var(--accent, var(--ink)); }
.betasteps { margin: .4rem 0 1rem; padding-left: 1.4rem; display: grid; gap: .55rem; text-align: left; }
.betasteps li b { display: block; }
.betasteps li small { color: var(--muted); }
.betasteps.small { margin: .5rem 0 0; gap: .4rem; font-size: .92rem; }
.field textarea { min-height: 110px; padding: .6rem .7rem; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-size: 1rem; width: 100%; resize: vertical; }
.row-btn .clip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-btn.fb { flex-wrap: wrap; align-items: flex-start; }
.row-btn.fb .fbtext { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); margin: .2rem 0; }
.row-btn.fb.done { opacity: .55; }
