/* Universal Bitcoin Standard · Private-Banking-Look */
:root {
  --bg: #000;
  --bg-2: #0a0a0b;
  --card: #111113;
  --card-2: #18181b;
  --card-3: #222226;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --text: #f4f1ea;
  --text-2: rgba(244, 241, 234, .62);
  --text-3: rgba(244, 241, 234, .38);
  --gold: #d4b47a;
  --gold-hi: #f1ddb0;
  --gold-lo: #9a7845;
  --gold-ink: #17120a;
  --gold-soft: rgba(212, 180, 122, .14);
  --pos: #52d49c;
  --pos-soft: rgba(82, 212, 156, .13);
  --neg: #ff7466;
  --neg-soft: rgba(255, 116, 102, .13);
  --track: rgba(255, 255, 255, .07);
  --material: rgba(16, 16, 18, .72);
  --material-strong: rgba(22, 22, 25, .9);
  --scrim: rgba(0, 0, 0, .5);
  --shadow: 0 16px 50px rgba(0, 0, 0, .6);
  --radius: 22px;
  --tab-h: 50px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f1ea;
  --bg-2: #ece7dd;
  --card: #ffffff;
  --card-2: #f7f4ee;
  --card-3: #efebe3;
  --line: rgba(30, 22, 10, .08);
  --line-2: rgba(30, 22, 10, .14);
  --text: #16120c;
  --text-2: rgba(22, 18, 12, .6);
  --text-3: rgba(22, 18, 12, .38);
  --gold: #94723a;
  --gold-hi: #c7a466;
  --gold-lo: #6f5428;
  --gold-ink: #fffdf8;
  --gold-soft: rgba(148, 114, 58, .12);
  --pos: #16895a;
  --pos-soft: rgba(22, 137, 90, .1);
  --neg: #c6412f;
  --neg-soft: rgba(198, 65, 47, .1);
  --track: rgba(30, 22, 10, .07);
  --material: rgba(250, 248, 243, .78);
  --material-strong: rgba(252, 250, 246, .94);
  --scrim: rgba(20, 14, 6, .28);
  --shadow: 0 14px 40px rgba(60, 40, 10, .14);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); }
body {
  color: var(--text);
  font: 17px/1.35 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
  overflow: hidden;
  touch-action: manipulation;
  font-variant-numeric: tabular-nums;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.sm { width: 17px; height: 17px; }
.ic.lg { width: 26px; height: 26px; }

#app { position: fixed; inset: 0; overflow: hidden; background: var(--bg); }
#views {
  position: absolute; inset: 0;
  transform-origin: 50% 0;
  transition: transform .45s cubic-bezier(.22, 1, .36, 1), border-radius .45s, filter .45s;
  overflow: hidden;
  background: var(--bg);
}
.sheet-open #views { transform: scale(.94) translateY(calc(var(--safe-t) + 6px)); border-radius: 16px; filter: brightness(.72); }
:root[data-theme="light"] .sheet-open #views { filter: brightness(.9); }
:root[data-theme="light"].sheet-open #app { background: #1a1610; }
.view { position: absolute; inset: 0; display: none; }
.view.active { display: block; }
.scroller {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding: 0 16px calc(var(--tab-h) + var(--safe-b) + 34px);
}

/* ---------- Navigationsleiste mit grossem Titel ---------- */
.navbar {
  position: sticky; top: 0; z-index: 20;
  margin: 0 -16px;
  padding: calc(var(--safe-t) + 6px) 16px 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: calc(var(--safe-t) + 50px);
  background: transparent;
  transition: background .25s, box-shadow .25s;
}
.navbar.scrolled {
  background: var(--material);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  box-shadow: 0 .5px 0 var(--line-2);
}
.navbar .nav-title { position: absolute; left: 50%; transform: translateX(-50%); bottom: 14px; font-weight: 600; font-size: 17px; opacity: 0; transition: opacity .2s; pointer-events: none; white-space: nowrap; }
.navbar.scrolled .nav-title { opacity: 1; }
.navbar .brand-name { transition: opacity .2s; }
.navbar.scrolled .brand-name { opacity: 0; }
.navbar .nav-side { display: flex; align-items: center; gap: 8px; min-width: 40px; }
.navbar .nav-side.right { justify-content: flex-end; }
.large-title { font: 700 34px/1.12 var(--font-display); letter-spacing: -.02em; margin: 2px 0 14px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--card-2); color: var(--text);
  transition: transform .12s ease-out, background .2s;
}
.icon-btn:active { transform: scale(.92); }
.icon-btn.gold { color: var(--gold); }

.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand .emblem { width: 30px; height: 30px; flex: none; }
.brand-name { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 600; line-height: 1.25; }
.avatar-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 600; letter-spacing: .04em;
  color: var(--gold-ink);
  background: linear-gradient(140deg, var(--gold-hi), var(--gold) 45%, var(--gold-lo));
}

/* ---------- Hero ---------- */
.greet { color: var(--text-2); font-size: 15px; margin: 6px 0 18px; }
.hero { margin: 0 0 20px; }
.hero-label { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin-bottom: 6px; }
.hero-amount { display: flex; align-items: baseline; gap: 8px; font-family: var(--font-display); white-space: nowrap; }
.hero-amount .cur { font-size: 17px; font-weight: 600; color: var(--gold); letter-spacing: .04em; }
.hero-amount .big { font-size: 46px; font-weight: 300; letter-spacing: -.035em; line-height: 1.04; }
.hero-amount .cents { font-size: 24px; font-weight: 300; color: var(--text-2); letter-spacing: -.01em; }
.hero-amount.fit .big { font-size: 38px; }
.hero-amount.fit2 .big { font-size: 31px; }
.hero-change { margin-top: 8px; display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--text-2); flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600;
}
.chip.pos { color: var(--pos); background: var(--pos-soft); }
.chip.neg { color: var(--neg); background: var(--neg-soft); }
.chip.flat { color: var(--text-2); background: var(--track); }
.chip.gold { color: var(--gold); background: var(--gold-soft); }
.since-pill {
  margin-top: 14px; width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 16px;
  background: linear-gradient(120deg, rgba(212, 180, 122, .18), rgba(212, 180, 122, .06));
  box-shadow: inset 0 0 0 1px rgba(212, 180, 122, .22);
  color: var(--text); font-size: 14.5px;
  animation: pillIn .7s cubic-bezier(.22, 1, .36, 1) both;
}
.since-pill .ic { color: var(--gold); }
.since-pill b { color: var(--gold-hi); font-weight: 600; }
:root[data-theme="light"] .since-pill b { color: var(--gold-lo); }
.since-pill .grow { flex: 1; }
@keyframes pillIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Odometer ---------- */
.odo { display: inline-flex; overflow: hidden; height: 1.12em; line-height: 1.12em; vertical-align: bottom; }
.odo .col { display: inline-block; height: 1.12em; overflow: hidden; }
.odo .strip { display: flex; flex-direction: column; will-change: transform; }
.odo .strip > span { height: 1.12em; display: block; }
.odo .sep { display: inline-block; }

/* ---------- Karten ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 .5px var(--line);
}
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 28px 2px 10px; }
.section-head h2 { font: 700 21px/1.2 var(--font-display); letter-spacing: -.01em; margin: 0; }
.link { color: var(--gold); font-size: 15px; font-weight: 500; padding: 4px 0; }
.link:active { opacity: .6; }

.chart-card { padding: 16px 0 12px; overflow: hidden; }
.chart-head { padding: 0 16px; min-height: 40px; }
.chart-head .ch-value { font-size: 15px; font-weight: 600; }
.chart-head .ch-sub { font-size: 13px; color: var(--text-2); margin-top: 1px; }
.chart { position: relative; margin-top: 6px; }
.chart-svg { display: block; width: 100%; touch-action: pan-y; user-select: none; -webkit-user-select: none; overflow: visible; }
.chart-base { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 2 4; }
.chart-vline { stroke: var(--text-3); stroke-width: 1; }
.chart-cdot { stroke: var(--card); stroke-width: 2.5; }
.chart-live .pulse { opacity: .35; transform-box: fill-box; transform-origin: center; animation: pulse 2s ease-out infinite; }
.chart-empty { fill: var(--text-3); font-size: 13px; }
@keyframes pulse { 0% { transform: scale(.4); opacity: .55; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
.seg {
  display: flex; gap: 2px; padding: 2px; margin: 10px 12px 0;
  background: var(--track); border-radius: 10px;
}
.seg button {
  flex: 1; padding: 6px 0; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--text-2); text-align: center;
  transition: background .2s, color .2s;
}
.seg button.on { background: var(--card-3); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
:root[data-theme="light"] .seg button.on { background: #fff; box-shadow: 0 1px 4px rgba(60, 40, 10, .12); }
.seg.wide { margin: 0 0 14px; }
.seg.wide button { padding: 7px 0; font-size: 14px; }

/* ---------- Kontokarten ---------- */
.acc-carousel {
  display: flex; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -16px -14px; padding: 4px 16px 30px;
  scrollbar-width: none;
}
.acc-carousel::-webkit-scrollbar { display: none; }
.acc-card {
  position: relative; flex: 0 0 84%;
  aspect-ratio: 1.586; border-radius: 18px;
  padding: 18px 18px 16px;
  scroll-snap-align: center;
  overflow: hidden; color: #f6efe0;
  display: flex; flex-direction: column; text-align: left;
  background:
    radial-gradient(130% 120% at 0% 0%, rgba(255, 255, 255, .10), transparent 45%),
    linear-gradient(145deg, #2b2b2f 0%, #141416 55%, #0b0b0c 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), inset 0 0 0 .5px rgba(255, 255, 255, .08), 0 18px 40px rgba(0, 0, 0, .45);
  transition: transform .14s ease-out;
}
.acc-card:active { transform: scale(.98); }
.acc-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-radial-gradient(circle at 110% 120%, transparent 0 10px, rgba(212, 180, 122, .08) 10px 11px);
}
.acc-card.tone-gold { background: radial-gradient(120% 120% at 0% 0%, rgba(255, 236, 190, .18), transparent 50%), linear-gradient(145deg, #4a3a20 0%, #241b0e 55%, #110d07 100%); }
.acc-card.tone-champagne { color: #1c150a; background: radial-gradient(120% 120% at 0% 0%, rgba(255, 255, 255, .55), transparent 50%), linear-gradient(145deg, #efe2c6 0%, #cdb78b 55%, #a98d5c 100%); }
.acc-card.tone-champagne::before { background: repeating-radial-gradient(circle at 110% 120%, transparent 0 10px, rgba(60, 40, 10, .08) 10px 11px); }
.acc-card.tone-black { background: radial-gradient(120% 120% at 0% 0%, rgba(255, 255, 255, .06), transparent 50%), linear-gradient(145deg, #121212 0%, #060606 100%); }
.acc-card .card-emblem { width: 26px; height: 26px; opacity: .9; flex: none; }
:root[data-theme="light"] .acc-card { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), inset 0 0 0 .5px rgba(255, 255, 255, .08), 0 12px 26px rgba(60, 40, 10, .22); }
.acc-card .ac-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; }
.acc-card .ac-bank { font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; font-weight: 600; opacity: .85; max-width: 70%; line-height: 1.35; }
.acc-card .chip-gfx { width: 38px; height: 28px; border-radius: 6px; margin-top: 12px; position: relative;
  background: linear-gradient(135deg, #f3dfa9, #c9a35f 50%, #8f6c33);
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .35); }
.acc-card .chip-gfx::after { content: ""; position: absolute; inset: 6px 4px; border-top: 1px solid rgba(0, 0, 0, .28); border-bottom: 1px solid rgba(0, 0, 0, .28); }
.acc-card .ac-name { position: relative; margin-top: auto; font-size: 14px; opacity: .8; }
.acc-card .ac-bal { position: relative; font: 300 27px/1.15 var(--font-display); letter-spacing: -.02em; margin-top: 2px; white-space: nowrap; }
.acc-card .ac-bal small { font-size: 14px; font-weight: 500; letter-spacing: .02em; margin-right: 4px; opacity: .8; }
.acc-card .ac-foot { position: relative; display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; opacity: .75; margin-top: 8px; letter-spacing: .06em; }
.acc-card .ac-foot .chip { font-size: 12px; padding: 2px 8px; }
.acc-card.tone-champagne .chip.pos { color: #0d5f3d; background: rgba(13, 95, 61, .12); }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: -4px; }
.dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); opacity: .5; transition: all .3s; }
.dots span.on { background: var(--gold); opacity: 1; width: 16px; border-radius: 3px; }

/* ---------- Listen ---------- */
.list { overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 16px; min-height: 60px;
  position: relative; text-align: left;
  transition: background .15s;
}
.row:active { background: var(--card-2); }
.row + .row::before { content: ""; position: absolute; top: 0; left: 68px; right: 0; height: .5px; background: var(--line-2); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 13px; color: var(--text-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-end { text-align: right; flex: none; max-width: 52%; }
.amt { font-size: 16px; font-weight: 600; white-space: nowrap; }
.amt.pos { color: var(--pos); }
.amt.neg { color: var(--text); }
.amt.plan { color: var(--gold); }
.av {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 600; letter-spacing: .02em;
  color: var(--gold-hi);
  background: var(--av-bg, #24221d);
  box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .08);
}
:root[data-theme="light"] .av { color: #f6e7c5; }
.av.emoji { font-size: 21px; background: var(--card-3); }
.av.lg { width: 64px; height: 64px; font-size: 22px; }
.av.lg.emoji { font-size: 32px; }
.av.ic-av { color: var(--gold); background: var(--gold-soft); }
.empty { padding: 26px 16px; text-align: center; color: var(--text-3); font-size: 14px; }
.count-chip { font-size: 12px; font-weight: 600; color: var(--gold); background: var(--gold-soft); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.day-head {
  position: sticky; top: calc(var(--safe-t) + 50px); z-index: 5;
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 16px 4px 8px; margin: 0 -4px;
  background: linear-gradient(var(--bg) 70%, transparent);
  font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: .01em;
}
.day-head .dh-sum { color: var(--pos); font-weight: 600; }
.more-sentinel { height: 40px; }

/* ---------- Einnahmen ---------- */
.income-card { padding: 18px 16px 16px; }
.inc-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.inc-label { font-size: 13px; color: var(--text-2); }
.inc-value { font: 600 24px/1.2 var(--font-display); letter-spacing: -.02em; margin-top: 2px; }
.inc-cmp { font-size: 13px; color: var(--text-2); text-align: right; }
.bars-wrap { margin-top: 16px; }
.bars-svg { display: block; width: 100%; }
.bars-svg .bar { fill: var(--gold); opacity: .28; }
.bars-svg .bar.hl { opacity: 1; }
.bars-svg .bar.hl { fill: var(--gold); }
.bars-svg .blabel { fill: var(--text-3); font-size: 11px; text-anchor: middle; }
.bars-svg .bval { fill: var(--text-2); font-size: 10.5px; text-anchor: middle; font-weight: 600; }
.split { display: flex; gap: 16px; align-items: center; margin-top: 18px; padding-top: 16px; border-top: .5px solid var(--line-2); }
.donut-box { position: relative; flex: none; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut-center .dc-top { font-size: 11px; color: var(--text-3); letter-spacing: .08em; text-transform: uppercase; }
.donut-center .dc-val { font-size: 15px; font-weight: 600; margin-top: 2px; }
.legend { flex: 1; min-width: 0; display: grid; gap: 9px; }
.legend .lg-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.legend .lg-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.legend .lg-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend .lg-val { color: var(--text-2); font-weight: 500; }
.donut { display: block; }

/* ---------- Portfolio ---------- */
.pf-status { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); padding: 10px 16px 0; }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 0 0 var(--pos); animation: livePulse 2s infinite; }
.dot-live.off { background: var(--text-3); animation: none; }
.dot-live.warn { background: #f0b84a; animation: none; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(82, 212, 156, .5); } 70% { box-shadow: 0 0 0 7px rgba(82, 212, 156, 0); } 100% { box-shadow: 0 0 0 0 rgba(82, 212, 156, 0); } }
.alloc-card { padding: 16px; }
.pos-spark { display: block; }
.spark-box { flex: none; display: flex; }
.tag { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; padding: 1px 6px; border-radius: 5px; vertical-align: 1px; margin-left: 6px; text-transform: uppercase; }
.tag.live { color: var(--pos); background: var(--pos-soft); }
.tag.sim { color: var(--text-3); background: var(--track); }
.pl-line { font-size: 14px; color: var(--text-2); margin-top: 6px; }
.pl-line b.pos { color: var(--pos); font-weight: 600; }
.pl-line b.neg { color: var(--neg); font-weight: 600; }

/* ---------- Suche und Filter ---------- */
.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--card-2); border-radius: 11px;
  padding: 0 10px; height: 38px; color: var(--text-3);
}
.search input { -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 17px; color: var(--text); }
.search input::placeholder { color: var(--text-3); }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 12px -16px 4px; padding: 0 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button {
  flex: none; padding: 7px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--text-2);
  background: var(--card-2);
  transition: background .2s, color .2s;
}
.chips button.on { color: var(--gold-ink); background: var(--gold); }
.sum-card { display: flex; gap: 10px; margin: 14px 0 0; }
.sum-card > div { flex: 1; padding: 12px 14px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 .5px var(--line); }
.sum-card .s-label { font-size: 12.5px; color: var(--text-2); }
.sum-card .s-val { font-size: 17px; font-weight: 600; margin-top: 2px; white-space: nowrap; }
.sum-card .s-val.pos { color: var(--pos); }

/* ---------- Tableiste ---------- */
#tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; justify-content: space-around;
  padding: 6px 6px calc(var(--safe-b) + 4px);
  background: var(--material);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  backdrop-filter: blur(26px) saturate(180%);
  box-shadow: 0 -.5px 0 var(--line-2);
  transition: transform .45s cubic-bezier(.22, 1, .36, 1), opacity .3s;
}
.sheet-open #tabbar { opacity: 0; pointer-events: none; }
#tabbar button {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 3px 0; color: var(--text-3); font-size: 10.5px; font-weight: 500; letter-spacing: .01em;
  transition: color .2s, transform .12s ease-out;
}
#tabbar button:active { transform: scale(.92); }
#tabbar button.on { color: var(--gold); }
#tabbar .ic { width: 25px; height: 25px; }

/* ---------- Sheets ---------- */
#sheet-layer { position: absolute; inset: 0; z-index: 60; pointer-events: none; }
.sheet-wrap { position: absolute; inset: 0; pointer-events: auto; }
.sheet-backdrop { position: absolute; inset: 0; background: var(--scrim); opacity: 0; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: calc(100% - var(--safe-t) - 12px);
  background: var(--bg-2);
  border-radius: 14px 14px 0 0;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
  will-change: transform;
  transform-origin: 50% 0;
}
:root[data-theme="light"] .sheet { background: var(--bg); }
.sheet.short { height: auto; max-height: calc(100% - var(--safe-t) - 12px); }
.sheet.behind { filter: brightness(.75); }
.sheet-grab { flex: none; height: 18px; display: grid; place-items: center; touch-action: none; }
.sheet-grab span { width: 36px; height: 5px; border-radius: 3px; background: var(--text-3); opacity: .6; }
.sheet-nav {
  flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 16px 10px; min-height: 40px; touch-action: none;
}
.sheet-nav .sn-title { font-weight: 600; font-size: 17px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56vw; }
.sheet-nav .sn-left { justify-self: start; }
.sheet-nav .sn-right { justify-self: end; }
.sheet-nav button { color: var(--gold); font-size: 17px; padding: 6px 0; }
.sheet-nav button.bold { font-weight: 600; }
.sheet-nav button:disabled { opacity: .35; }
.sheet-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: none;
  padding: 4px 16px calc(var(--safe-b) + 28px);
}
.sheet.short .sheet-body { flex: initial; }

/* ---------- Formulare ---------- */
.group-title { font-size: 13px; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; margin: 22px 16px 7px; }
.group-title:first-child { margin-top: 8px; }
.group { background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: inset 0 0 0 .5px var(--line); }
.group-foot { font-size: 13px; color: var(--text-3); margin: 7px 16px 0; line-height: 1.4; }
.group-foot code { font-family: ui-monospace, Menlo, monospace; font-size: 12px; color: var(--gold); background: var(--gold-soft); padding: 1px 5px; border-radius: 5px; }
.field {
  display: flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 6px 16px;
  position: relative;
}
.field + .field::before, .field + .cell::before, .cell + .field::before, .cell + .cell::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: .5px; background: var(--line-2); }
.f-label { flex: none; font-size: 16px; color: var(--text); max-width: 55%; }
.f-input {
  flex: 1; min-width: 0; text-align: right;
  background: none; border: 0; outline: 0;
  font-size: 17px; color: var(--text-2);
  padding: 8px 0;
}
.f-input:focus { color: var(--text); }
.f-input::placeholder { color: var(--text-3); }
select.f-input { -webkit-appearance: none; appearance: none; direction: rtl; padding-right: 2px; }
select.f-input option { direction: ltr; }
input[type="date"].f-input, input[type="time"].f-input, input[type="datetime-local"].f-input { -webkit-appearance: none; appearance: none; min-height: 34px; display: flex; justify-content: flex-end; }
input[type="date"].f-input::-webkit-date-and-time-value,
input[type="time"].f-input::-webkit-date-and-time-value,
input[type="datetime-local"].f-input::-webkit-date-and-time-value { text-align: right; }
textarea.f-input { text-align: left; resize: none; min-height: 52px; line-height: 1.35; padding: 10px 0; }
.field.stack { flex-direction: column; align-items: stretch; gap: 0; padding-top: 10px; }
.field.stack .f-label { font-size: 13px; color: var(--text-2); max-width: none; }
.field.stack .f-input { text-align: left; }
.field .seg { margin: 0; flex: 1; max-width: 260px; margin-left: auto; }
.field .seg button { padding: 6px 4px; font-size: 13px; }
.switch {
  -webkit-appearance: none; appearance: none; margin: 0 0 0 auto;
  width: 51px; height: 31px; border-radius: 16px; flex: none;
  background: var(--track); position: relative; outline: 0;
  transition: background .25s;
  box-shadow: inset 0 0 0 .5px var(--line-2);
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .22), 0 1px 1px rgba(0, 0, 0, .12);
  transition: transform .3s cubic-bezier(.3, 1.3, .5, 1);
}
.switch:checked { background: var(--gold); }
.switch:checked::after { transform: translateX(20px); }
.wd { display: flex; gap: 6px; margin-left: auto; }
.wd button {
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 12.5px; font-weight: 600; color: var(--text-2); background: var(--track);
  text-align: center;
}
.wd button.on { background: var(--gold); color: var(--gold-ink); }
.cell {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 50px; padding: 8px 16px; position: relative; text-align: left;
  transition: background .15s;
}
.cell:active { background: var(--card-2); }
.cell .c-main { flex: 1; min-width: 0; }
.cell .c-title { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell .c-sub { font-size: 13px; color: var(--text-2); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell .c-val { color: var(--text-2); font-size: 15px; white-space: nowrap; }
.cell .chev { color: var(--text-3); width: 16px; height: 16px; }
.cell.add { color: var(--gold); font-weight: 500; }
.cell.danger { color: var(--neg); justify-content: center; font-weight: 500; }
.cell.center { justify-content: center; color: var(--gold); font-weight: 500; }
.cell .tone-dot { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.cell.off .c-title, .cell.off .c-sub { opacity: .45; }
.cell .switch { margin-left: 4px; }
.ph-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 16px 0; }
.ph-chips button { font-size: 12.5px; padding: 4px 9px; border-radius: 8px; color: var(--gold); background: var(--gold-soft); font-family: ui-monospace, Menlo, monospace; }
.preview-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 16px; font-size: 14px; position: relative; }
.preview-row + .preview-row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: .5px; background: var(--line-2); }
.preview-row .pv-when { color: var(--text-2); }
.preview-row .pv-amt { font-weight: 600; color: var(--pos); white-space: nowrap; }
.preview-row .pv-amt.neg { color: var(--text); }
.profile-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; width: 100%; text-align: left; }
.profile-card .avatar-btn { width: 58px; height: 58px; font-size: 21px; }
.profile-card .p-name { font-size: 20px; font-weight: 600; }
.profile-card .p-sub { font-size: 14px; color: var(--text-2); margin-top: 2px; }
.foot-note { font-size: 12.5px; color: var(--text-3); text-align: center; line-height: 1.5; margin: 28px 12px 0; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 52px; border-radius: 15px;
  font-size: 17px; font-weight: 600;
  transition: transform .12s ease-out, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn.primary { color: var(--gold-ink); background: linear-gradient(140deg, var(--gold-hi), var(--gold) 50%, var(--gold-lo)); }
.btn.secondary { color: var(--gold); background: var(--gold-soft); }
.btn.plain { color: var(--text-2); }
.btn-row { display: grid; gap: 10px; margin-top: 18px; }

/* ---------- Detailansichten ---------- */
.detail-hero { text-align: center; padding: 10px 0 18px; }
.detail-hero .av { margin: 0 auto 12px; }
.detail-hero .d-name { font-size: 17px; font-weight: 600; }
.detail-hero .d-amt { font: 300 40px/1.1 var(--font-display); letter-spacing: -.03em; margin-top: 8px; }
.detail-hero .d-amt.pos { color: var(--pos); }
.detail-hero .d-status { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 14px; color: var(--text-2); }
.detail-hero .d-status .ic { color: var(--pos); width: 18px; height: 18px; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 13px 16px; position: relative; font-size: 15.5px; }
.kv + .kv::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: .5px; background: var(--line-2); }
.kv .k { color: var(--text-2); flex: none; }
.kv .v { text-align: right; min-width: 0; overflow-wrap: anywhere; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.stat { background: var(--card); border-radius: 16px; padding: 12px 14px; box-shadow: inset 0 0 0 .5px var(--line); }
.stat .st-k { font-size: 12.5px; color: var(--text-2); }
.stat .st-v { font-size: 16px; font-weight: 600; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .st-v.pos { color: var(--pos); }
.stat .st-v.neg { color: var(--neg); }
.mini-card { max-width: 360px; margin: 4px auto 18px; }
.mini-card .acc-card { flex: none; width: 100%; }

/* ---------- Banner ---------- */
#banner-layer { position: absolute; left: 0; right: 0; top: 0; z-index: 80; pointer-events: none; padding: calc(var(--safe-t) + 6px) 8px 0; }
.banner {
  pointer-events: auto;
  display: flex; gap: 11px; align-items: center;
  padding: 11px 13px; border-radius: 22px;
  background: var(--material-strong);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .35), inset 0 0 0 .5px var(--line-2);
  will-change: transform;
  touch-action: none;
}
.banner-icon { width: 38px; height: 38px; border-radius: 9px; flex: none; overflow: hidden; background: #0b0b0c; display: grid; place-items: center; }
.banner-icon svg, .banner-emblem { width: 30px; height: 30px; }
.banner-main { flex: 1; min-width: 0; }
.banner-top { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); }
.banner-top span:first-child { letter-spacing: .08em; text-transform: uppercase; font-weight: 600; font-size: 11px; }
.banner-title { font-size: 15px; font-weight: 600; margin-top: 1px; }
.banner-body { font-size: 14.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Toast & Aktionsblatt ---------- */
.toast {
  position: absolute; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 24px); z-index: 90;
  transform: translate(-50%, 20px); opacity: 0;
  padding: 10px 16px; border-radius: 14px; font-size: 14.5px; font-weight: 500;
  background: var(--material-strong); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: 0 8px 26px rgba(0, 0, 0, .3), inset 0 0 0 .5px var(--line-2);
  transition: transform .4s cubic-bezier(.22, 1, .36, 1), opacity .3s;
  pointer-events: none; white-space: nowrap;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.action-wrap { position: absolute; inset: 0; z-index: 95; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 8px calc(var(--safe-b) + 8px); }
.action-wrap .scrim { position: absolute; inset: 0; background: var(--scrim); animation: fadeIn .25s both; }
.action-sheet { position: relative; display: grid; gap: 8px; animation: slideUp .4s cubic-bezier(.22, 1, .36, 1) both; }
.action-sheet .as-box { background: var(--material-strong); -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); border-radius: 14px; overflow: hidden; }
.action-sheet .as-msg { padding: 14px 18px; text-align: center; font-size: 13px; color: var(--text-2); line-height: 1.4; }
.action-sheet .as-msg b { display: block; font-size: 13.5px; color: var(--text); margin-bottom: 3px; }
.action-sheet button { display: block; width: 100%; padding: 17px; text-align: center; font-size: 19px; color: var(--gold); border-top: .5px solid var(--line-2); }
.action-sheet button.danger { color: var(--neg); }
.action-sheet .as-cancel { border-top: 0; font-weight: 600; background: var(--material-strong); border-radius: 14px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes slideUp { from { transform: translateY(110%); } }

/* ---------- Sperre ---------- */
#lock-layer { position: absolute; inset: 0; z-index: 100; display: none; }
#lock-layer.on { display: flex; }
.lock {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--safe-t) + 64px) 24px calc(var(--safe-b) + 24px);
  background: radial-gradient(120% 70% at 50% 0%, #1b1710 0%, #000 60%);
  color: #f4f1ea;
}
:root[data-theme="light"] .lock { background: radial-gradient(120% 70% at 50% 0%, #fffaf0 0%, #ece6da 70%); color: #16120c; }
.lock .emblem { width: 64px; height: 64px; }
.lock .l-bank { margin-top: 14px; font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); font-weight: 600; text-align: center; }
.lock .l-title { margin-top: 30px; font-size: 18px; }
.lock .l-dots { display: flex; gap: 16px; margin: 18px 0 40px; }
.lock .l-dots span { width: 13px; height: 13px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px currentColor; transition: background .15s; }
.lock .l-dots span.on { background: currentColor; }
.lock .l-dots.shake { animation: shake .45s; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-14px); } 40% { transform: translateX(12px); } 60% { transform: translateX(-8px); } 80% { transform: translateX(5px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 78px); gap: 16px 26px; }
.keypad button {
  width: 78px; height: 78px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 300; line-height: 1;
  background: rgba(255, 255, 255, .1);
  transition: background .1s;
}
:root[data-theme="light"] .keypad button { background: rgba(0, 0, 0, .06); }
.keypad button:active { background: rgba(255, 255, 255, .3); }
.keypad button small { font-size: 9.5px; letter-spacing: .2em; font-weight: 600; margin-top: 2px; opacity: .8; }
.keypad button.ghost { background: none; font-size: 16px; }
.keypad button.ghost:active { opacity: .5; }

/* ---------- Willkommen ---------- */
.welcome { padding: 18px 8px 0; text-align: center; }
.welcome .emblem { width: 76px; height: 76px; margin: 8px auto 0; display: block; }
.welcome h1 { font: 700 28px/1.15 var(--font-display); letter-spacing: -.02em; margin: 18px 0 8px; }
.welcome p { color: var(--text-2); font-size: 15.5px; line-height: 1.45; margin: 0 auto; max-width: 330px; }
.welcome .w-bank { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-top: 14px; }
.install-hint { display: flex; gap: 10px; align-items: flex-start; text-align: left; margin-top: 18px; padding: 12px 14px; border-radius: 14px; background: var(--card); font-size: 14px; color: var(--text-2); line-height: 1.4; box-shadow: inset 0 0 0 .5px var(--line); }
.install-hint .ic { color: var(--gold); margin-top: 1px; }

/* ---------- Barrierefreiheit ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .12s !important; }
  .sheet-open #views { transform: none; filter: brightness(.72); }
}
@media (prefers-reduced-transparency: reduce) {
  .navbar.scrolled, #tabbar, .banner, .toast, .action-sheet .as-box { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--card-2); }
}
@media (prefers-contrast: more) {
  .card, .group, .stat { box-shadow: inset 0 0 0 1px var(--line-2); }
}
@media (min-width: 700px) {
  .scroller { padding-left: max(16px, calc(50% - 300px)); padding-right: max(16px, calc(50% - 300px)); }
  .navbar { margin: 0 calc(-1 * max(16px, calc(50% - 300px))); padding-left: max(16px, calc(50% - 300px)); padding-right: max(16px, calc(50% - 300px)); }
  .acc-card { flex-basis: 360px; }
  .sheet { left: 50%; width: 640px; margin-left: -320px; }
}
