/* Finanzplaner – Sparbuch-Grün auf kühlem Papier, iPhone zuerst */
:root {
  --paper: #EBF0EE;
  --surface: #FFFFFF;
  --ink: #142C26;
  --muted: #5D706A;
  --line: #D5DEDA;
  --accent: #0E6B57;
  --accent-soft: #D6EAE3;
  --neg: #B23A2E;
  --unsafe: #B67C0E;
  --spent: #B9C7C2;
  --on-accent: #FFFFFF;
  --shadow: rgba(20,44,38,.14);
  --backdrop: rgba(8,20,17,.42);
  --glow: none;
  --glow-box: 0 0 0 transparent;
  --scanlines: none;
  --figures: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, sans-serif;
  --r-lg: 18px;
  --r-sm: 10px;
  --tab-h: 62px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0D1513;
    --surface: #17221F;
    --ink: #E5EEEA;
    --muted: #8FA39C;
    --line: #26332F;
    --accent: #45B496;
    --accent-soft: #1D3A32;
    --neg: #F0796A;
    --unsafe: #E2B04A;
    --spent: #3A4A45;
    --on-accent: #0B1F19;
    --shadow: rgba(0,0,0,.4);
    --backdrop: rgba(0,0,0,.55);
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--paper); }
body {
  margin: 0; color: var(--ink); background: var(--paper);
  font: 16px/1.45 var(--text);
  -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

#app {
  max-width: 640px; margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 10px) 16px calc(var(--tab-h) + env(safe-area-inset-bottom) + 28px);
}
.num { font-family: var(--figures); font-variant-numeric: tabular-nums; white-space: nowrap; }
.neg { color: var(--neg); }
.muted { color: var(--muted); }
h1 { font-size: 28px; line-height: 1.15; margin: 6px 0 14px; letter-spacing: -0.01em; }
h2 { font-size: 15px; font-weight: 600; color: var(--muted); margin: 26px 4px 8px; }

/* Kopfzeile Monat */
.monthbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 12px; }
.monthbar h1 { margin: 0; text-align: center; flex: 1; font-size: 24px; }
.iconbtn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface);
  display: grid; place-items: center; color: var(--accent);
}
.iconbtn-gap { width: 44px; height: 44px; flex: none; }
.iconbtn.sm { width: 30px; height: 44px; border-radius: 10px; flex: none; }
.iconbtn.sm svg { width: 18px; height: 18px; }
.iconbtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Monatsleiste: 6 Monate sichtbar, seitlich scrollbar */
.monthnav { display: flex; align-items: center; gap: 6px; margin: 0 0 14px; }
.monthstrip {
  position: relative; flex: 1; min-width: 0; display: flex; gap: 3px; padding: 3px; border-radius: 12px;
  background: var(--line); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 3px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.monthstrip::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 calc((100% - 15px) / 6); scroll-snap-align: start; border: 0; background: transparent;
  border-radius: 9px; padding: 4px 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0; color: var(--muted); font: inherit; line-height: 1.15;
}
.chip .m { font-size: 14px; font-weight: 600; }
.chip .y { font-size: 11px; display: flex; align-items: center; gap: 2px; }
.chip svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chip.chip-new .m { font-weight: 500; opacity: .7; }
.chip[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px var(--shadow); }

/* Segment-Umschalter für Konten */
.seg { display: flex; background: var(--line); border-radius: 12px; padding: 3px; gap: 3px; margin-bottom: 14px; }
.seg button {
  flex: 1; border: 0; background: transparent; padding: 8px 6px; border-radius: 9px;
  font-size: 15px; font-weight: 500; color: var(--muted);
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px var(--shadow); }

/* Spielraum – das Herzstück */
.room { background: var(--surface); border-radius: var(--r-lg); padding: 18px 18px 16px; }
.room-label { font-size: 15px; color: var(--muted); }
.room-value { font-family: var(--figures); font-variant-numeric: tabular-nums; font-size: 46px; font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; margin: 2px 0 4px; }
.room-max { font-size: 15px; color: var(--muted); }
.room-max .num { color: var(--unsafe); font-weight: 600; }
.bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin: 16px 0 10px; background: var(--line); }
.bar span { display: block; height: 100%; min-width: 0; transition: flex-grow .35s ease; }
.bar .b-spent { background: var(--spent); }
.bar .b-min { background: var(--accent); }
.bar .b-unsafe { background: repeating-linear-gradient(-45deg, var(--unsafe) 0 4px, transparent 4px 8px); box-shadow: inset 0 0 0 1.5px var(--unsafe); border-radius: 0 7px 7px 0; }
.bar.over .b-spent { background: var(--neg); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.stats div { font-size: 13px; color: var(--muted); }
.stats b { display: block; font-size: 17px; color: var(--ink); font-family: var(--figures); font-variant-numeric: tabular-nums; font-weight: 600; }

/* Listen */
.list { background: var(--surface); border-radius: var(--r-lg); overflow: hidden; }
.group-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 8px 6px 16px; font-size: 14px; font-weight: 600; color: var(--muted);
}
.group-head .add { border: 0; background: transparent; color: var(--accent); width: 36px; height: 30px; border-radius: 8px; font-size: 22px; line-height: 1; }
.group-head .sum { margin-left: auto; margin-right: 4px; font-weight: 600; }
.group + .group { border-top: 6px solid var(--paper); }
.row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px;
  padding: 8px 16px; border: 0; background: transparent; text-align: left; position: relative;
}
.row + .row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: 1px solid var(--line); }
.row.has-check + .row.has-check::before { left: 56px; }
.row .grow { flex: 1; min-width: 0; }
.row .title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .sub { display: block; font-size: 13px; color: var(--muted); white-space: normal; overflow-wrap: anywhere; }
.row .amt { font-family: var(--figures); font-variant-numeric: tabular-nums; font-weight: 500; }
.row.done .title, .row.done .amt { color: var(--muted); }
.row.inactive { opacity: .5; }
.row.readonly { cursor: default; }
.check {
  flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line);
  background: transparent; display: grid; place-items: center; padding: 0; margin-left: -4px;
}
.check svg { width: 16px; height: 16px; fill: none; stroke: var(--on-accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.check[aria-checked="true"] { background: var(--accent); border-color: var(--accent); }
.check[aria-checked="true"] svg { opacity: 1; }
.empty-row { padding: 4px 16px 12px; font-size: 14px; color: var(--muted); }
.pill { font-size: 12px; padding: 1px 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-weight: 600; margin-left: 6px; }

.note-card { background: var(--accent-soft); border-radius: var(--r-lg); padding: 14px 16px; margin-top: 14px; font-size: 15px; }
.note-card b { display: block; margin-bottom: 4px; }
.note-card ul { margin: 0; padding: 0; list-style: none; }
.note-card li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }

/* Leerer Monat */
.empty { background: var(--surface); border-radius: var(--r-lg); padding: 28px 20px; text-align: center; }
.empty p { margin: 0 0 18px; color: var(--muted); }

/* Knöpfe */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 14px; border: 0;
  background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 16px; text-decoration: none;
}
.btn.block { width: 100%; }
.btn.ghost { background: var(--accent-soft); color: var(--accent); }
.btn.danger { background: transparent; color: var(--neg); }
.btn.link { background: transparent; color: var(--accent); min-height: 40px; }
.btn-row { display: flex; gap: 10px; margin-top: 18px; }
.btn-row .btn { flex: 1; }

.fab {
  position: fixed; right: max(18px, calc(50% - 302px)); bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 16px);
  width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent), var(--glow-box); display: grid; place-items: center; z-index: 5;
}
.fab svg { width: 26px; height: 26px; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; fill: none; }

/* Tab-Leiste */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; justify-content: center; gap: 0;
  padding: 6px 8px calc(env(safe-area-inset-bottom) + 4px);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  border-top: 1px solid var(--line);
}
.tabs button {
  flex: 1; max-width: 150px; border: 0; background: transparent; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 500; padding: 4px 0;
}
.tabs svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tabs button[aria-current="page"] { color: var(--accent); }

/* Bottom-Sheet */
.sheet { position: fixed; inset: 0; z-index: 20; }
.sheet-backdrop { position: absolute; inset: 0; background: var(--backdrop); animation: fade .2s ease; }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 640px;
  max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--paper); border-radius: 22px 22px 0 0;
  padding: 10px 18px calc(env(safe-area-inset-bottom) + 18px);
  animation: rise .25s cubic-bezier(.2,.8,.2,1);
}
.sheet-panel::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sheet-head h3 { margin: 0; font-size: 18px; }
@keyframes rise { from { transform: translateY(40px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* Formulare */
.form { display: grid; gap: 12px; }
.field { background: var(--surface); border-radius: var(--r-sm); padding: 8px 14px; display: block; }
.field > span { display: block; font-size: 13px; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; border: 0; background: transparent; padding: 4px 0; font-size: 17px; outline: none;
  -webkit-appearance: none; appearance: none; border-radius: 0;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(-45deg, transparent 50%, var(--muted) 50%); background-position: right 6px center, right 0 center; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 18px; }
.field:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.field.big input { font-family: var(--figures); font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.toggle { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border-radius: var(--r-sm); padding: 12px 14px; }
.toggle input { width: 22px; height: 22px; accent-color: var(--accent); }
.hint { font-size: 13px; color: var(--muted); margin: -4px 4px 0; }
.error { color: var(--neg); font-size: 14px; min-height: 1em; margin: 0 4px; }

/* Login */
.login { min-height: 80vh; display: grid; align-content: center; gap: 16px; max-width: 360px; margin: 0 auto; }
.login .mark { width: 64px; height: 64px; border-radius: 16px; }

/* Vermögen */
.chart { background: var(--surface); border-radius: var(--r-lg); padding: 14px 10px 8px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .axis { font-size: 11px; fill: var(--muted); font-family: var(--text); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart-head { padding: 0 8px 6px; }
.chart-head .room-value { font-size: 34px; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 30;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 18px);
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 12px; font-size: 15px;
  max-width: 90vw; animation: fade .2s ease;
}

/* Formularfelder dürfen im Raster schrumpfen (lange Auswahltexte, Monatsfelder) */
.two > * { min-width: 0; }
.field input, .field select { min-width: 0; text-overflow: ellipsis; }
.sheet-panel { overflow-x: hidden; }

/* ---------------------------------------------------------------- Themes: Effekte */
.room-value, .monthbar h1, h1 { text-shadow: var(--glow); }
.btn:not(.ghost):not(.link):not(.danger) { box-shadow: var(--glow-box); }
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 50;
  background: var(--scanlines);
}

/* ---------------------------------------------------------------- Zeilen */
.row-main {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px;
  border: 0; background: transparent; padding: 0; text-align: left; align-self: stretch;
}
.stats button {
  border: 0; background: transparent; padding: 0; text-align: left; font-size: 13px; color: var(--muted);
}

/* ---------------------------------------------------------------- Kontoauswahl mit Spalten-Schalter */
.seg .seg-icon { flex: 0 0 46px; display: grid; place-items: center; padding: 6px 0; }
.seg-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.seg-icon[aria-pressed="true"] { color: var(--accent) !important; }

/* ---------------------------------------------------------------- Konten nebeneinander */
body.wide #app { max-width: 1280px; }
body.wide .room:not(.compact) { margin-bottom: 0; }
.cols {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(168px, 1fr);
  gap: 10px; margin: 14px -16px 0; padding: 0 16px 8px;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
/* Ab 3 Konten wird seitlich gewischt (dann ohne mitlaufende Kopfzeile) */
.cols.scroll { overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 16px; }
.col { scroll-snap-align: start; container-type: inline-size; min-width: 0; }
.col-head {
  position: sticky; top: 0; z-index: 2; background: var(--paper);
  padding-top: calc(env(safe-area-inset-top) + 8px) !important;
  padding: 8px 4px 6px; font-weight: 700; font-size: 17px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.room.compact { padding: 12px 12px 10px; border-radius: 14px; }
.room.compact .room-label { font-size: 13px; }
.room.compact .room-value { font-size: min(24px, 12.5cqi); margin: 0; overflow: hidden; text-overflow: ellipsis; }
.room.compact .room-max { font-size: 13px; }
.room.compact .bar { height: 8px; margin: 10px 0 8px; }
/* Kennzahlen in Spalten: immer Beschriftung oben, Zahl darunter (schmal untereinander, breit nebeneinander) */
.room.compact .stats { grid-template-columns: 1fr; gap: 7px; margin-top: 8px; padding-top: 8px; }
.room.compact .stats > * { display: block; font-size: 12px; line-height: 1.3; }
.room.compact .stats b { display: block; font-size: 14px; }
.room.compact .stats .stat-edit b { display: flex; }

.compact h2 { font-size: 13px; margin: 16px 4px 6px; }
.compact .list { border-radius: 14px; }
.compact .group-head { padding: 9px 2px 3px 10px; font-size: 12.5px; gap: 4px; }
.compact .group-head .gl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact .group-head .sum { flex: none; font-weight: 600; }
.compact .group-head .add { width: 30px; height: 26px; font-size: 19px; flex: none; }
.compact .row { min-height: 40px; padding: 6px 10px; gap: 8px; font-size: 14px; }
.compact .row-main { gap: 6px; }
.compact .row .sub { font-size: 11.5px; }
.compact .row + .row::before { left: 10px; }
.compact .row.has-check + .row.has-check::before { left: 10px; }
.compact .check { width: 20px; height: 20px; margin-left: -2px; border-width: 1.6px; }
.compact .check svg { width: 12px; height: 12px; }
.compact .row.has-check { padding-left: 8px; gap: 6px; }

/* Breitere Spalten: wieder mehr Komfort */
@container (min-width: 250px) {
  .compact .check { width: 24px; height: 24px; }
  .compact .check svg { width: 14px; height: 14px; }
  .compact .row.has-check + .row.has-check::before { left: 40px; }
  .room.compact .room-value { font-size: min(30px, 12.5cqi); }
}
@container (min-width: 340px) {
  .room.compact .stats { grid-template-columns: repeat(3, 1fr); }
  .room.compact .stats b { font-size: 15px; }
  .compact .row { font-size: 15px; padding: 8px 14px; }
}

/* ---------------------------------------------------------------- Theme-Auswahl */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.theme-card {
  border: 2px solid transparent; border-radius: 14px; padding: 0; overflow: hidden; text-align: left;
  background: var(--surface); display: flex; flex-direction: column;
}
.theme-card[aria-pressed="true"] { border-color: var(--accent); }
.theme-prev { background: var(--tp); padding: 8px; display: grid; gap: 6px; font-family: var(--tf); }
.theme-prev .tp-card { background: var(--ts); border-radius: var(--tr); padding: 8px 9px; color: var(--ti); }
.theme-prev .tp-num { font-family: var(--tfig); font-weight: 700; font-size: 15px; line-height: 1.1; text-shadow: var(--tg); }
.theme-prev .tp-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin-top: 6px; background: var(--tl); }
.theme-prev .tp-bar i:nth-child(1) { flex: 3; background: var(--tsp); }
.theme-prev .tp-bar i:nth-child(2) { flex: 4; background: var(--ta); }
.theme-prev .tp-bar i:nth-child(3) { flex: 2; background: var(--tu); }
.theme-prev .tp-dots { display: flex; gap: 5px; }
.theme-prev .tp-dots i { width: 12px; height: 12px; border-radius: 50%; }
.theme-name { padding: 7px 10px 9px; font-size: 14px; font-weight: 600; }
.theme-name small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.colors { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.color-field { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: var(--r-sm); padding: 8px 10px; }
.color-field input[type=color] { width: 40px; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0; background: none; flex: none; }
.color-field span { font-size: 14px; }

/* ---------------------------------------------------------------- Kontostand jetzt */
.stats .stat-edit { cursor: pointer; }
.stats .stat-edit b { color: var(--accent); display: flex; align-items: center; gap: 4px; }
.stats .stat-edit b.neg { color: var(--neg); }
.stats .pen { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linejoin: round; opacity: .8; }
.calc-list { list-style: none; margin: 0; padding: 6px 14px; background: var(--surface); border-radius: var(--r-sm); }
.calc-list li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 15px; }
.calc-list li + li { border-top: 1px solid var(--line); }
.calc-list li.total { font-weight: 700; }
.row.readonly.done .title, .row.readonly.done .amt { color: var(--muted); }

/* ---------------------------------------------------------------- Vermögen */
.chart.depot { margin-top: 14px; }
.depot-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.depot-value {
  border: 0; background: transparent; padding: 0; color: var(--ink); text-align: left;
  font-family: var(--figures); font-variant-numeric: tabular-nums; font-size: 28px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px; text-shadow: var(--glow);
}
.depot-value .pen { width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; }
.depot-rate { text-align: right; font-size: 15px; color: var(--accent); font-weight: 600; }
.depot-rate small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.chart .axis-cur { fill: var(--ink); font-weight: 700; }
.chart .axis-val { font-size: 11.5px; fill: var(--ink); font-family: var(--figures); font-variant-numeric: tabular-nums; }
.chart .axis-val.proj { fill: var(--muted); }
.chart .axis-val.current { font-weight: 700; }
.history { margin-top: 22px; }
.history summary { cursor: pointer; font-size: 15px; font-weight: 600; color: var(--muted); margin: 0 4px 8px; }
.btn-row .btn { padding: 0 12px; white-space: nowrap; }

/* ---------------------------------------------------------------- Abgeschlossene Monate */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.monthbar h1 { display: flex; align-items: center; justify-content: center; gap: 8px; }
.monthbar h1 .lock { width: 20px; height: 20px; flex: none; }
.lock { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.closed-banner {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
  padding: 10px 6px 10px 14px; border-radius: var(--r-lg);
  border: 1.5px dashed color-mix(in srgb, var(--muted) 70%, transparent);
  color: var(--muted);
}
.closed-banner .lock { width: 24px; height: 24px; flex: none; color: var(--ink); }
.closed-banner b { display: block; color: var(--ink); font-size: 15px; }
.closed-banner span { display: block; font-size: 13px; }
.closed-banner .btn { flex: none; padding: 0 10px; }
/* Gesperrte Flächen: flach, ohne Weiß, mit feiner Kontur – wirkt "abgelegt" */
.month.is-closed .room, .month.is-closed .list {
  background: color-mix(in srgb, var(--surface) 45%, var(--paper));
  box-shadow: inset 0 0 0 1px var(--line);
}
.month.is-closed .bar { filter: saturate(.35); }
.month.is-closed .room-value { color: color-mix(in srgb, var(--ink) 80%, var(--paper)); }
.month.is-closed .room-value.neg { color: color-mix(in srgb, var(--neg) 75%, var(--paper)); }
.month.is-closed .check { opacity: .75; }
.month.is-closed .check[aria-checked="false"] { border-style: dashed; }
.row.ro { cursor: default; }
.close-month { margin-top: 22px; }
.close-month .lock { width: 18px; height: 18px; }

/* Budgets: Rest nach Anrechnung, darunter die angerechneten Ausgaben */
.budget + .budget { border-top: 1px solid var(--line); }
.budget-items { margin-left: 16px; border-left: 2px solid var(--line); }
.budget-items:empty { display: none; }
.row .amt { text-align: right; }
.amt-cap { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.bbar { display: block; height: 4px; margin-top: 6px; border-radius: 2px; background: var(--line); overflow: hidden; }
.bbar > span { display: block; height: 100%; border-radius: 2px; background: var(--accent); }
.bbar.over > span { background: var(--neg); }
.budget-add { color: var(--accent); font-weight: 600; font-size: 15px; min-height: 44px; }
.budget-add .plus { flex: none; width: 28px; margin-left: -4px; text-align: center; font-size: 20px; line-height: 1; }
.compact .budget-items { margin-left: 8px; }
