/* Split – Gestaltung: ruhige Flächen, klare Typografie (Inter), Akzentfarbe Petrol. Hell und dunkel. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/vendor/inter.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/vendor/inter-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #f5f7f8;
  --card: #ffffff;
  --card-2: #f1f4f6;
  --text: #0f1a1f;
  --muted: #5b6b73;
  --faint: #8a979e;
  --line: #e6ebee;
  --line-strong: #d3dbe0;
  --accent: #0f766e;
  --accent-2: #115e59;
  --accent-soft: #e0f2ef;
  --accent-text: #ffffff;
  --plus: #15803d;
  --plus-soft: #dcfce7;
  --minus: #c2410c;
  --minus-soft: #ffedd5;
  --danger: #dc2626;
  --warn-soft: #fff4d6;
  --av-l: 92%;
  --av-t: 30%;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 1px 2px rgb(15 26 31 / 0.04), 0 1px 3px rgb(15 26 31 / 0.04);
  --shadow-lg: 0 12px 32px rgb(15 26 31 / 0.14), 0 2px 6px rgb(15 26 31 / 0.06);
  --nav-h: 64px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: light;
}
/* Dunkel: automatisch (System) oder fest gewählt im Profil */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0b1114; --card: #121b1f; --card-2: #18232a; --text: #e8eef0; --muted: #93a3aa; --faint: #6d7d84;
    --line: #1f2c33; --line-strong: #2d3e47; --accent: #2dd4bf; --accent-2: #5eead4; --accent-soft: #0f2f2b;
    --accent-text: #04201c; --plus: #4ade80; --plus-soft: #12301f; --minus: #fb923c; --minus-soft: #3a2212;
    --danger: #f87171; --warn-soft: #3a2f12; --av-l: 24%; --av-t: 78%;
    --shadow: 0 0 0 1px var(--line); --shadow-lg: 0 12px 32px rgb(0 0 0 / 0.55);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #0b1114; --card: #121b1f; --card-2: #18232a; --text: #e8eef0; --muted: #93a3aa; --faint: #6d7d84;
  --line: #1f2c33; --line-strong: #2d3e47; --accent: #2dd4bf; --accent-2: #5eead4; --accent-soft: #0f2f2b;
  --accent-text: #04201c; --plus: #4ade80; --plus-soft: #12301f; --minus: #fb923c; --minus-soft: #3a2212;
  --danger: #f87171; --warn-soft: #3a2f12; --av-l: 24%; --av-t: 78%;
  --shadow: 0 0 0 1px var(--line); --shadow-lg: 0 12px 32px rgb(0 0 0 / 0.55);
  color-scheme: dark;
}

* { box-sizing: border-box; }
/* Browser-eigenes Neuladen beim Herunterziehen aus – die App hat ihr eigenes (js/gestures.js) */
html, body { overscroll-behavior-y: contain; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
#app { max-width: 680px; margin: 0 auto; min-height: 100dvh; padding-bottom: calc(var(--nav-h) + 96px + env(safe-area-inset-bottom)); }
#app.wide { max-width: 1080px; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.015em; }
h1 { font-size: 1.22rem; font-weight: 700; }
h2 {
  font-size: 0.75rem; margin: 26px 18px 8px; color: var(--muted); font-weight: 650;
  text-transform: uppercase; letter-spacing: 0.07em;
}
code { font: 0.85em ui-monospace, 'SF Mono', Menlo, monospace; background: var(--card-2); padding: 1px 5px; border-radius: 5px; }
kbd { font: 600 0.7rem/1 inherit; color: var(--faint); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 3px 5px; }
.loading, .empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.num, .end, .big, .amt, .tile .v, .kv b { font-variant-numeric: tabular-nums; }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
svg.i.sm { width: 16px; height: 16px; vertical-align: -3px; }
svg.i.lg { width: 24px; height: 24px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Kleine Helfer */
.center { text-align: center; }
.nowrap { white-space: nowrap; flex: none; }
.break { word-break: break-all; }
.spread { justify-content: space-between; }
.mt-0 { margin-top: 0 !important; } .mt-4 { margin-top: 4px; } .mt-6 { margin-top: 6px; } .mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; } .mt-18 { margin-top: 18px; } .pt-6 { padding-top: 6px; } .mb-10 { margin-bottom: 10px; }
.pad-x { padding: 0 16px; }
.plus { color: var(--plus); }
.minus { color: var(--minus); }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }

/* Seitenwechsel */
.view.enter { animation: enter 0.22s var(--ease); }
/* Nur Deckkraft: ein transform würde .fab (position: fixed) während der Animation an die Ansicht binden, der Knopf wanderte dann durchs Bild. */
@keyframes enter { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .view.enter { animation: none; } }

/* Ladeskelett */
.skeleton { padding: 10px 14px; display: grid; gap: 10px; }
.sk { background: linear-gradient(90deg, var(--card-2) 25%, var(--line) 37%, var(--card-2) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 12px; }
.sk-top { height: 36px; width: 45%; margin: 8px 0 4px; }
.sk-hero { height: 128px; border-radius: 20px; }
.sk-line { height: 14px; width: 100%; margin-top: 6px; } .sk-line.w40 { width: 40%; } .sk-line.w60 { width: 60%; }
.sk-row { display: flex; gap: 12px; align-items: center; background: none; animation: none; padding: 6px 0; }
.sk-row i, .sk-row b { display: block; background: inherit; }
.sk-row i { width: 42px; height: 42px; border-radius: 13px; flex: none; }
.sk-row span { flex: 1; display: grid; gap: 6px; }
.sk-row i, .sk-row b { background: linear-gradient(90deg, var(--card-2) 25%, var(--line) 37%, var(--card-2) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; }
.sk-row b { height: 12px; border-radius: 6px; } .sk-row b.w60 { width: 60%; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* Kopfzeile */
.top {
  position: sticky; top: 0; z-index: 6;
  /* Feste Höhe, damit die Reiter darunter (top: 60px) immer bündig anschließen */
  box-sizing: border-box; min-height: calc(60px + env(safe-area-inset-top));
  display: flex; align-items: center; gap: 4px;
  padding: calc(10px + env(safe-area-inset-top)) 10px 10px 14px;
  background: var(--bg);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
}
.top h1 { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.top .brand { display: flex; align-items: center; gap: 10px; }
.top .brand img { width: 30px; height: 30px; border-radius: 9px; }
.icon-btn {
  border: 0; background: transparent; color: var(--text);
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center; font-size: 1.15rem; cursor: pointer; text-decoration: none;
  transition: background 0.15s;
}
.icon-btn:hover { background: var(--card-2); }
.icon-btn:active { background: var(--line); }

/* Karten und Listen */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); margin: 0 14px 10px; }
.card.pad { padding: 16px; }
.card.pad.stack { padding: 16px; }
.stack > .card, .card.flush { margin: 0; }
.card.tip { display: flex; gap: 12px; align-items: flex-start; }
.card.mt-12 { margin-top: 12px; }
.card.mt-18 { margin-top: 18px; }
.card.mt-28 { margin-top: 28px; }
.card.tip > svg { color: var(--accent); margin-top: 2px; }
.card.settled { align-items: center; background: linear-gradient(135deg, var(--accent-soft), var(--card)); }
.card.settled > svg { width: 28px; height: 28px; margin: 0; }
.list { list-style: none; margin: 0 14px; padding: 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; }
.list.flush { margin: 0; }
.list > li + li { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; color: inherit; text-decoration: none; background: var(--card); }
a.row:hover, button.row:hover { background: var(--card-2); }
a.row:active, button.row:active { background: var(--line); }
button.row { width: 100%; border: 0; font: inherit; text-align: left; cursor: pointer; color: inherit; }
button.row:disabled { cursor: default; background: var(--card); }
.row .main { flex: 1; min-width: 0; }
.row .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.row .title > span { overflow: hidden; text-overflow: ellipsis; }
.row .sub { color: var(--muted); font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.row .end { text-align: right; white-space: nowrap; }
.row .chev { color: var(--faint); }
.avatar {
  flex: none; width: 42px; height: 42px; border-radius: 13px;
  display: grid; place-items: center; font-size: 1.3rem; background: var(--accent-soft); color: var(--accent);
}
.avatar.round { border-radius: 50%; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.02em; }
.avatar.round[style] { background: hsl(var(--h) 55% var(--av-l)); color: hsl(var(--h) 45% var(--av-t)); }
.avatar.sm { width: 30px; height: 30px; font-size: 0.72rem; border-radius: 10px; }
.avatar.round.sm { border-radius: 50%; }
.avatar.xs { width: 24px; height: 24px; font-size: 0.6rem; border: 2px solid var(--card); border-radius: 50%; }
.avatar.muted-av { background: var(--card-2); color: var(--muted); }
.avatar.ring { width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 12px; }
.avatars { display: inline-flex; vertical-align: middle; }
.avatars .avatar + .avatar { margin-left: -7px; }
/* Kategorien: eigene Farbe je Kategorie */
.cat { color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.cat-essen { --c: #ea580c; } .cat-einkauf { --c: #16a34a; } .cat-unterkunft { --c: #7c3aed; }
.cat-transport { --c: #2563eb; } .cat-tanken { --c: #0891b2; } .cat-freizeit { --c: #db2777; }
.cat-haushalt { --c: #ca8a04; } .cat-geschenk { --c: #e11d48; } .cat-sonstiges { --c: #64748b; }
.cat-zahlung { --c: var(--accent); } .cat-warten { --c: #a16207; }
.date-head { display: flex; justify-content: space-between; gap: 8px; margin: 18px 18px 8px; font-size: 0.74rem; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; }
.date-head span + span { font-variant-numeric: tabular-nums; text-transform: none; letter-spacing: 0; font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 0.72rem; font-weight: 600; color: var(--muted); background: var(--card-2); border-radius: 999px; padding: 1px 8px; flex: none; }
.pill.warn { background: var(--warn-soft); color: var(--minus); }
details.fold summary { list-style: none; cursor: pointer; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary h2::after { content: ' ▾'; }
details.fold[open] summary h2::after { content: ' ▴'; }

/* Gesamtsaldo */
.hero {
  position: relative; overflow: hidden;
  padding: 20px 20px 18px; margin: 6px 14px 16px; border-radius: 22px;
  background: radial-gradient(120% 140% at 100% 0%, #14b8a6 0%, transparent 55%), linear-gradient(135deg, #0f766e, #134e4a);
  color: #fff; box-shadow: 0 12px 28px rgb(15 118 110 / 0.25);
}
.hero::after {
  content: ''; position: absolute; right: -40px; bottom: -60px; width: 200px; height: 200px; border-radius: 50%;
  background: rgb(255 255 255 / 0.06); pointer-events: none;
}
.hero .label { opacity: 0.85; font-size: 0.88rem; font-weight: 500; }
.hero .big { font-size: 2.3rem; font-weight: 750; letter-spacing: -0.03em; margin-top: 2px; }
.hero .big.word { font-size: 1.7rem; }
.hero .sub { opacity: 0.88; font-size: 0.88rem; margin-top: 2px; }
.hero .sub a { color: #fff; }
.hero .hero-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.hero .hero-meta .avatar.xs { border-color: #0f766e; }
.hero .stats { display: flex; gap: 22px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgb(255 255 255 / 0.18); }
.hero .stats > div { min-width: 0; }
.hero .stats .k { font-size: 0.75rem; opacity: 0.8; }
.hero .stats .v { font-weight: 650; font-variant-numeric: tabular-nums; }
.hero .hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hero .hero-top > div { min-width: 0; }
.hero .hero-btn { flex: none; position: relative; z-index: 1; background: #fff; color: #0f766e; box-shadow: 0 4px 14px rgb(0 0 0 / 0.18); margin-top: 4px; }
.hero .hero-btn:hover { background: #f0fdfa; }
.hero .hero-note { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 12px; border-radius: 12px; background: rgb(255 255 255 / 0.16); color: #fff; font-size: 0.88rem; text-decoration: none; }
.confirm-card .head { display: flex; gap: 12px; align-items: center; }
.confirm-card .main { flex: 1; min-width: 0; }
.hero.neutral { background: linear-gradient(135deg, #334155, #1e293b); box-shadow: 0 12px 28px rgb(30 41 59 / 0.25); }
.hero.neutral .hero-meta .avatar.xs { border-color: #334155; }

/* Reiter */
.tabs {
  position: sticky; top: calc(60px + env(safe-area-inset-top)); z-index: 5;
  display: flex; gap: 2px; margin: 0 0 12px; padding: 0 14px; overflow-x: auto; scrollbar-width: none;
  background: var(--bg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 12px 12px 11px; color: var(--muted); text-decoration: none;
  font-weight: 600; font-size: 0.92rem; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }
.tabs .count { background: var(--minus); color: #fff; border-radius: 9px; font-size: 0.7rem; padding: 0 6px; line-height: 17px; }

/* Knöpfe */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 0; border-radius: var(--radius-sm); padding: 11px 16px; min-height: 44px;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  background: var(--accent); color: var(--accent-text);
  transition: background 0.15s, transform 0.08s, box-shadow 0.15s;
}
.btn:hover { background: var(--accent-2); }
.btn:active { transform: scale(0.97); }
.btn.secondary { background: var(--accent-soft); color: var(--accent); }
.btn.secondary:hover { background: color-mix(in srgb, var(--accent-soft) 80%, var(--accent)); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--card-2); }
.btn.outline { background: var(--card); color: var(--text); border: 1px solid var(--line-strong); }
.btn.outline:hover { background: var(--card-2); }
.btn.danger { background: transparent; color: var(--danger); }
.btn.danger:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); }
.btn.danger-solid { background: var(--danger); color: #fff; }
.btn.danger-solid:hover { background: color-mix(in srgb, var(--danger) 85%, #000); }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 0.86rem; border-radius: 9px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn.paypal { background: #ffc439; color: #111; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.actions.end { justify-content: flex-end; }
.actions.center { justify-content: center; }
.actions.spread { justify-content: space-between; }
.fab {
  position: fixed; right: max(16px, calc(50vw - 324px)); bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom));
  border-radius: 18px; padding: 0 20px 0 16px; height: 54px; font-size: 1rem;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 35%, transparent), var(--shadow-lg); z-index: 10;
}

/* Navigation unten (Handy) bzw. links (breite Bildschirme) */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  display: flex; justify-content: center; gap: 4px;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding: 6px 8px env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-top: 1px solid var(--line);
}
.nav[hidden] { display: none; }
.nav a {
  position: relative; flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--faint); text-decoration: none; font-size: 0.72rem; font-weight: 600; border-radius: 12px;
}
.nav a svg.i { width: 23px; height: 23px; }
.nav a.on { color: var(--accent); }
.nav a .dot {
  position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--minus); color: #fff; font-size: 0.68rem; line-height: 18px; text-align: center;
}
.nav .logo, .nav .nav-search { display: none; }
@media (min-width: 960px) {
  :root { --nav-h: 0px; }
  .nav {
    top: 0; right: auto; width: 92px; height: auto; flex-direction: column; justify-content: flex-start; gap: 6px;
    padding: 18px 8px; border-top: 0; border-right: 1px solid var(--line);
  }
  .nav a { flex: none; height: 62px; max-width: none; }
  .nav a:hover { background: var(--card-2); color: var(--text); }
  .nav a.on { background: var(--accent-soft); }
  .nav .logo { display: flex; height: auto; margin: 0 auto 14px; background: none !important; }
  .nav .logo img { width: 40px; height: 40px; border-radius: 12px; }
  .nav .nav-search {
    display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: auto;
    border: 0; background: none; color: var(--faint); font: 600 0.72rem inherit; cursor: pointer; padding: 10px 0; border-radius: 12px;
  }
  .nav .nav-search:hover { background: var(--card-2); color: var(--text); }
  body { padding-left: 92px; }
  .fab { right: max(24px, calc(50vw - 340px - 46px + 24px)); }
  #app.wide ~ .fab { display: none; }
  #toast { margin-left: 46px; }
  .swipe-hint { display: none; }
}

/* Formulare */
form.stack, .stack { display: grid; gap: 14px; padding: 4px 16px 16px; }
.stack.tight { gap: 12px; }
label.field, .field { display: grid; gap: 6px; font-size: 0.86rem; color: var(--muted); font-weight: 600; }
.field .hint { font-weight: 400; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--card);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 11px 12px; width: 100%; min-height: 46px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
input.amount { font-size: 2.1rem; font-weight: 750; text-align: center; padding: 10px; letter-spacing: -0.02em; }
.inline { display: flex; gap: 8px; align-items: center; }
.inline > * { flex: 1; }
.inline > .nowrap { flex: none; }
.emoji-field { flex: 0 0 76px !important; }
.emoji-field input, .emoji-input { text-align: center; }
.emoji-input { flex: 0 0 64px !important; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--line-strong); background: var(--card); color: var(--text);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 0.88rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; transition: background 0.15s, border-color 0.15s;
}
.chip:hover { background: var(--card-2); }
.chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.chip.emoji { font-size: 1.2rem; padding: 4px 10px; }
.seg { display: flex; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted); padding: 8px; border-radius: 9px; cursor: pointer; }
.seg button.on { background: var(--card); color: var(--text); box-shadow: var(--shadow), 0 1px 3px rgb(0 0 0 / 0.08); }

/* Personenauswahl (Einladen) und Suchfelder */
.picker { display: grid; gap: 10px; }
.search { position: relative; }
.search svg { position: absolute; left: 12px; top: 13px; color: var(--faint); }
.search input { padding-left: 38px; }
.picker .people { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
.picker .person { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; color: var(--text); font-weight: 500; }
.picker .person + .person { border-top: 1px solid var(--line); }
.picker .person:hover { background: var(--card-2); }
.picker .person input { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); flex: none; margin: 0; }
.picker .person .main { flex: 1; min-width: 0; }
.picker .person .hint { font-weight: 400; }
.picker .person.off { opacity: 0.55; cursor: default; }
.picker .picked { display: flex; flex-wrap: wrap; gap: 6px; }
.picker .picked:empty { display: none; }
.picker .picked .chip { padding: 3px 10px 3px 3px; }

/* Einladungen */
.invite { display: grid; gap: 10px; border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.invite .head { display: flex; gap: 12px; align-items: center; }
.invite .head .main { flex: 1; min-width: 0; }
.invite .actions { margin-top: 0; }
.banner { display: flex; gap: 10px; align-items: center; margin: 0 14px 12px; padding: 10px 14px; border-radius: 12px; background: var(--warn-soft); font-size: 0.88rem; }
.split-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.split-row + .split-row { border-top: 1px solid var(--line); }
.split-row label { flex: 1; display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }
.split-row input[type='checkbox'] { width: 22px; height: 22px; min-height: 0; accent-color: var(--accent); }
.split-row input.num { width: 96px; flex: none; text-align: right; min-height: 40px; padding: 8px 10px; }
.split-row .share { width: 84px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.hint { font-size: 0.86rem; color: var(--muted); }
.hint.err { color: var(--minus); }

/* Ausgleich */
.bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; border-radius: 4px; }
.transfer { display: flex; align-items: center; gap: 8px; font-weight: 600; flex-wrap: wrap; }
.transfer .who { display: inline-flex; align-items: center; gap: 6px; }
.transfer .arrow { font-weight: 500; font-size: 0.9rem; }
.transfer .amt { margin-left: auto; font-size: 1.15rem; font-weight: 700; }
.suggestion.me-pay { border-left: 3px solid var(--minus); }
.suggestion.me-get { border-left: 3px solid var(--plus); }
.badge { display: inline-block; font-size: 0.74rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--muted); }
.badge.offen { background: var(--warn-soft); color: var(--minus); }
.badge.bezahlt { background: var(--accent-soft); color: var(--accent); }
.badge.bestaetigt { background: var(--plus-soft); color: var(--plus); }

/* Hinweis unten, optional mit „Rückgängig“ */
#toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 84px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px);
  display: flex; align-items: center; gap: 14px;
  background: #0f1a1f; color: #fff; padding: 11px 16px; border-radius: 14px; box-shadow: var(--shadow-lg); font-size: 0.92rem;
  opacity: 0; pointer-events: none; transition: 0.22s var(--ease); max-width: calc(100vw - 32px); z-index: 30;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
#toast button { border: 0; background: none; color: #5eead4; font: inherit; font-weight: 700; cursor: pointer; padding: 4px 2px; flex: none; }
:root[data-theme='dark'] #toast { background: #e8eef0; color: #0f1a1f; }
:root[data-theme='dark'] #toast button { color: #0f766e; }

dialog { border: 1px solid var(--line); box-shadow: var(--shadow-lg); border-radius: 22px; padding: 0; background: var(--card); color: var(--text); width: min(440px, calc(100vw - 32px)); }
dialog[open] { animation: pop 0.18s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
dialog::backdrop { background: rgb(8 15 18 / 0.5); backdrop-filter: blur(3px); }
dialog .dtitle { font-size: 1.1rem; }
dialog .stack { padding: 20px; }

/* Schnellsuche */
dialog.palette { width: min(620px, calc(100vw - 24px)); margin-top: max(12px, 10vh); }
.palette-box .search { border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.palette-box .search svg { top: 18px; left: 16px; }
.palette-box .search input { border: 0; box-shadow: none; min-height: 56px; font-size: 1.05rem; padding-left: 46px; background: transparent; }
.palette-box .search kbd { margin-right: 14px; }
.palette-box .results { list-style: none; margin: 0; padding: 6px; max-height: min(60vh, 460px); overflow-y: auto; }
.palette-box .results li { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; cursor: pointer; }
.palette-box .results li.sel { background: var(--accent-soft); }
.palette-box .results li.none { color: var(--muted); justify-content: center; cursor: default; padding: 22px; }
.palette-box .results .main { flex: 1; min-width: 0; display: grid; }
.palette-box .results .title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-box .results .sub { font-size: 0.82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-box .results .avatar { width: 34px; height: 34px; font-size: 1rem; border-radius: 10px; }

/* Kassenzettel */
.scan { position: relative; min-height: 52px; }
.scan-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pdf-thumb { width: 56px; height: 72px; border-radius: 8px; display: grid; place-items: center; align-content: center; gap: 2px; background: var(--accent-soft); color: var(--accent); font-size: 0.7rem; }
.receipt { display: flex; align-items: center; gap: 12px; padding: 10px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.receipt img { width: 56px; height: 72px; object-fit: cover; border-radius: 8px; display: block; }
.receipt .main { flex: 1; }
.spinner.sm { width: 14px; height: 14px; border-width: 2px; margin: 0 4px 0 0; display: inline-block; vertical-align: -2px; }
.badge.fehler { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.scan-error { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--warn-soft); }
.scan-error.stuck { background: color-mix(in srgb, var(--danger) 10%, transparent); }
.scan-error .small { overflow-wrap: anywhere; }
.scan-error .actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.scan-item { display: block; padding: 10px 12px; }
.scan-item .top-row { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.scan-item img, .scan-item .pdf-thumb { width: 44px; height: 56px; object-fit: cover; border-radius: 8px; flex: none; }
.scan-item .main { flex: 1; min-width: 0; }
.usage-line { display: block; text-decoration: none; margin-top: 6px; }
.usage.warn { color: var(--minus); font-weight: 600; }
.usage.over { color: var(--danger); font-weight: 700; }
.usage-bars { display: grid; gap: 10px; }
.usage-bars .progress.warn > span { background: var(--minus); }
.usage-bars .progress.over > span { background: var(--danger); }
.days { display: flex; align-items: flex-end; gap: 3px; height: 56px; margin-top: 4px; }
.days > span { flex: 1; display: flex; flex-direction: column-reverse; min-width: 0; height: 100%; }
.days i { display: block; background: var(--accent); border-radius: 2px 2px 0 0; }
.days i.f { background: var(--danger); opacity: 0.7; border-radius: 0; }
.calls { font-size: 0.8rem; list-style: none; padding: 0; margin: 6px 0 0; }
.calls li { padding: 6px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 0.8s linear infinite; flex: none; margin: 0 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.item-row { padding: 8px 0; display: grid; gap: 6px; }
.item-row + .item-row { border-top: 1px solid var(--line); }
.item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.item-row .inline:has(input) { display: grid; grid-template-columns: 1fr 88px auto; gap: 8px; }
.chip.mini { padding: 3px 10px; font-size: 0.82rem; }
.item-sum { margin-top: 8px; padding-top: 8px; border-top: 2px solid var(--line); display: grid; gap: 4px; }
.items-list { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.items-list summary { cursor: pointer; color: var(--muted); font-size: .9em; }
.items-list .inline { padding: 4px 0; }

/* Statistik und Diagramme */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 0 14px 4px; }
.tile { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 12px 14px; min-width: 0; }
.tile .k { font-size: 0.8rem; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.tile .v { font-size: 1.35rem; font-weight: 700; margin-top: 2px; letter-spacing: -0.02em; }
.tile .h { font-size: 0.8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-box { height: 240px; position: relative; }
.chart-box canvas { width: 100% !important; }
.donut-row { display: grid; grid-template-columns: 180px 1fr; gap: 18px; align-items: center; }
.donut { height: 180px; position: relative; }
@media (max-width: 520px) { .donut-row { grid-template-columns: 1fr; } .donut { height: 200px; } }
.legend-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 0.9rem; }
.legend-list li { display: grid; grid-template-columns: 10px 1fr auto 44px; gap: 8px; align-items: center; }
.legend-list i { width: 10px; height: 10px; border-radius: 3px; }
.legend-list b { font-weight: 600; font-variant-numeric: tabular-nums; }
.legend-list .muted { text-align: right; font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.cols { display: flex; align-items: flex-end; gap: 4px; height: 170px; padding-top: 18px; }
.col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.col i { display: block; width: 100%; max-width: 38px; background: var(--accent); border-radius: 5px 5px 2px 2px; }
.col .val { font-size: 0.68rem; color: var(--muted); white-space: nowrap; margin-bottom: 3px; }
.col .lab { font-size: 0.7rem; color: var(--muted); height: 16px; margin-top: 4px; white-space: nowrap; }
.bar.thin { height: 6px; margin-top: 4px; }
.legend { display: flex; gap: 14px; font-size: 0.8rem; color: var(--muted); margin-bottom: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }
details.person { padding: 8px 0; }
details.person + details.person { border-top: 1px solid var(--line); }
details.person summary { list-style: none; cursor: pointer; }
details.person summary::-webkit-details-marker { display: none; }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 50; }

/* Verlauf als Zeitleiste */
.timeline { list-style: none; margin: 0 14px; padding: 6px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.timeline li { position: relative; display: flex; gap: 14px; padding: 10px 0; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.timeline li:first-child::before { top: 16px; }
.timeline li:last-child::before { bottom: calc(100% - 16px); }
.timeline .dot { position: relative; flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--card); }
.timeline .sub { color: var(--muted); font-size: 0.84rem; margin-top: 1px; }
.timeline .sub a { color: var(--muted); }

/* Betrag mit Währung */
.amount-row { display: flex; gap: 8px; }
.amount-row .amount { flex: 1; min-width: 0; }
.amount-row .cur { flex: none; width: 92px; font-weight: 700; text-align: center; }
.fx { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 11px; background: var(--accent-soft); margin-top: -6px; }
.fx .num { width: 110px; min-height: 38px; padding: 6px 10px; text-align: right; }
.fx[hidden] { display: none; }
.toggle { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.toggle input { width: 22px; height: 22px; min-height: 0; margin-top: 2px; accent-color: var(--accent); flex: none; }

/* Offline-Hinweis */
.offline { position: sticky; top: 0; z-index: 20; display: flex; gap: 10px; align-items: center; justify-content: space-between;
  padding: 8px 14px; background: var(--warn-soft); color: var(--text); font-size: 0.86rem; }
.offline[hidden] { display: none; }
.offline .btn { flex: none; }

/* Fortschrittsbalken (Budget, Sparziel) */
.progress { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 8px; }
.progress > span { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.hero .budget { margin-top: 10px; }
.hero .progress { background: rgb(255 255 255 / 0.3); }
.hero .progress > span { background: currentColor; }
.hero .budget.warn .progress > span { background: #fde68a; }
.hero .budget.over .progress > span { background: #fdba74; }

/* Kasse */
.pot-head { display: flex; gap: 12px; align-items: center; }
.pot-head .main { flex: 1; min-width: 0; }
.pot-sum { font-size: 1.15rem; flex: none; }
.pot.closed { opacity: 0.65; }
.pot-members { margin-top: 10px; display: grid; gap: 4px; }
.pot-members > div { display: flex; justify-content: space-between; gap: 8px; }
.pot details { margin-top: 10px; }
.pot summary { cursor: pointer; color: var(--accent); }
.entries { list-style: none; padding: 0; margin: 6px 0 0; }
.entries li { display: flex; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.entries li > span { flex: 1; }
.entries .icon-btn { width: 32px; height: 32px; font-size: 0.85rem; color: var(--muted); }

/* Kommentare */
.comments { margin: 0 12px 90px; display: grid; gap: 8px; }
.comment { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 10px 12px; max-width: 88%; }
.comment.mine { justify-self: end; background: var(--accent-soft); }
.comment .ctext { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.comment img { display: block; max-width: 100%; max-height: 260px; border-radius: 10px; margin-top: 6px; }
.comment-form { display: flex; gap: 6px; align-items: center; margin: 4px 0 10px; }
.comment-form input[name='text'] { flex: 1; min-width: 0; }
.comment-form .btn { flex: none; }
.link-btn { border: 0; background: none; color: var(--minus); font: inherit; font-size: 0.8rem; padding: 0 0 0 6px; cursor: pointer; }

/* GiroCode */
.giro img { width: 220px; height: 220px; margin: 0 auto; display: block; background: #fff; border-radius: 12px; padding: 6px; }
.copy-row { display: flex; gap: 8px; align-items: center; justify-content: space-between; overflow-wrap: anywhere; }
.copy-row .btn { flex: none; }

/* Profil */
.avatar.pic { padding: 0; overflow: hidden; }
.avatar.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.me-pic { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; display: block; }
.profile-head { display: flex; gap: 12px; align-items: center; }
.pot-members b { font-weight: 600; text-align: right; }

/* Einkaufsliste */
.shop .row { cursor: pointer; }
.shop input[type='checkbox'] { width: 24px; height: 24px; min-height: 0; accent-color: var(--accent); flex: none; }
.shop.done .title { text-decoration: line-through; color: var(--muted); }
.shop .icon-btn { width: 34px; height: 34px; font-size: 0.85rem; color: var(--muted); }

/* Leere Zustände, Hervorhebung */
.empty-state { text-align: center; padding: 30px 20px; }
.empty-state > b { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.empty-state > .small { max-width: 420px; margin: 0 auto; }
.empty-state .actions { margin-top: 16px; }
.flash { animation: flash 1.6s ease-out 1; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: var(--shadow); } }

/* Wischen zum Löschen */
li[data-swipe] { position: relative; overflow: hidden; }
li[data-swipe] > .row { position: relative; z-index: 1; transform: translateX(var(--dx, 0)); transition: transform 0.25s var(--ease); }
li[data-swipe].swiping > .row { transition: none; }
li[data-swipe] .swipe-bg {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-right: 22px;
  background: var(--danger); color: #fff; font-weight: 600; opacity: 0; transition: opacity 0.15s;
}
li[data-swipe].swiping .swipe-bg { opacity: 0.7; }
li[data-swipe].armed .swipe-bg { opacity: 1; }
li[data-swipe].gone { animation: gone 0.18s ease-in forwards; }
@keyframes gone { to { opacity: 0; height: 0; } }
@media (hover: hover) { .swipe-hint { display: none; } }

/* Herunterziehen zum Aktualisieren */
.ptr {
  position: fixed; top: calc(8px + env(safe-area-inset-top)); left: 50%; z-index: 40; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; background: var(--card); color: var(--accent); box-shadow: var(--shadow-lg);
  transform: translate(-50%, -60px); opacity: 0; pointer-events: none;
}
.ptr.ready { background: var(--accent); color: var(--accent-text); }
.ptr.spin svg { animation: spin 0.7s linear infinite; }

/* Verwaltung */
.tiles.four { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid-2 { display: grid; grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-2 > section:first-child .card { margin-right: 5px; }
  .grid-2 > section:last-child .card { margin-left: 5px; }
}
.admin-row { flex-wrap: wrap; padding: 0; gap: 0; }
.admin-row .row-link { flex: 1 1 320px; display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; color: inherit; text-decoration: none; min-width: 0; }
a.row-link:hover { background: var(--card-2); }
.admin-row .row-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px 68px; align-items: center; }
@media (min-width: 900px) { .admin-row .row-actions { padding: 13px 14px; flex: none; } }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 0.76rem; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); text-decoration: none; font-weight: 600; }
.tag.soft { background: var(--card-2); color: var(--muted); }
.kv { display: grid; gap: 10px; }
.kv > div:not(.actions):not(.hint) { display: flex; align-items: center; gap: 8px; }
.kv > div > span:first-child { flex: 1; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.kv b { font-weight: 600; }
.status { font-size: 0.8rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.status.ok { background: var(--plus-soft); color: var(--plus); }
.status.off { background: var(--card-2); color: var(--muted); }

/* Gruppenbild */
.cover { position: relative; margin: 6px 14px -34px; height: 150px; border-radius: 22px 22px 0 0; overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / 0) 35%, rgb(0 0 0 / 0.55)); }
.cover .cover-title { position: absolute; left: 18px; bottom: 44px; z-index: 1; color: #fff; font-weight: 750; font-size: 1.3rem; letter-spacing: -0.02em; text-shadow: 0 1px 8px rgb(0 0 0 / 0.4); }
.hero.under-cover { margin-top: 0; border-radius: 0 0 22px 22px; }
@media (min-width: 600px) { .cover { height: 200px; } }
.cover-edit { display: flex; align-items: center; gap: 14px; margin: 6px 16px 10px; }
.cover-edit img, .cover-edit .cover-emoji { width: 96px; height: 72px; border-radius: 14px; object-fit: cover; flex: none; }
.cover-edit .cover-emoji { display: grid; place-items: center; font-size: 2rem; background: var(--accent-soft); }
.cover-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.avatar.pic-sq { overflow: hidden; padding: 0; }
.avatar.pic-sq img { width: 100%; height: 100%; object-fit: cover; }

/* Rechnungen */
a.link-card { color: inherit; text-decoration: none; align-items: center; }
a.link-card > span { flex: 1; }
a.link-card .chev { color: var(--faint); }
.stepper { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.stepper > span { flex: 1; }
.stepper .count { font-size: 1.4rem; min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; }
.stepper .icon-btn { border: 1px solid var(--line-strong); font-size: 1.3rem; font-weight: 600; }
#items { padding: 4px 12px; }
.item-row .inline:has(.chip) { grid-template-columns: auto 1fr 88px auto; }
.item-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; }
.qr-card { display: flex; gap: 16px; align-items: center; }
.qr-card .qr { border: 0; padding: 6px; background: #fff; border-radius: 14px; cursor: zoom-in; flex: none; box-shadow: var(--shadow); }
.qr-card .qr img { width: 124px; height: 124px; display: block; }
.qr-card .main { flex: 1; min-width: 0; }
.qr-full img { width: min(78vw, 420px); height: auto; aspect-ratio: 1; margin: 0 auto; display: block; background: #fff; border-radius: 16px; padding: 10px; }
dialog.wide { width: min(520px, calc(100vw - 24px)); }
.hero .big .of { font-size: 1rem; font-weight: 500; opacity: 0.8; letter-spacing: 0; }
.hero.done { background: radial-gradient(120% 140% at 100% 0%, #4ade80 0%, transparent 55%), linear-gradient(135deg, #15803d, #14532d); }
.bill-person .person-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px 68px; }
.bill-person .person-actions:empty { display: none; }
.row.paid { opacity: 0.55; }
.row.paid .title::after { content: 'bezahlt'; font-size: 0.7rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.row.unclaimed .title::after { content: 'offen'; font-size: 0.7rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--warn-soft); color: var(--minus); }
.banner.warn { background: var(--warn-soft); }

/* Öffentliche Bezahlseite */
body.public #app { padding-bottom: 40px; }
.pay-page { padding-top: max(10px, env(safe-area-inset-top)); }
.pay-head { padding: 14px 18px 4px; }
.pay-head .brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent); font-size: 0.9rem; margin-bottom: 8px; }
.pay-head .brand img { width: 24px; height: 24px; border-radius: 7px; }
.pay-head h1 { font-size: 1.5rem; }
.list.pick .row { width: 100%; border: 0; font: inherit; text-align: left; cursor: pointer; }
.list.pick .row:disabled { opacity: 0.55; cursor: default; }
.list.pick .check { width: 26px; height: 26px; flex: none; border-radius: 8px; border: 2px solid var(--line-strong); display: grid; place-items: center; color: var(--accent-text); }
.list.pick .row.on { background: var(--accent-soft); }
.list.pick .row.on .check { background: var(--accent); border-color: var(--accent); }
.pad-seg { margin: 0 14px 10px; }
.pay-box .giro-img { width: 230px; height: 230px; margin: 0 auto; display: block; background: #fff; border-radius: 14px; padding: 6px; }
.settled-card { display: flex; gap: 14px; align-items: flex-start; background: linear-gradient(135deg, var(--plus-soft), var(--card)); }
.settled-card > svg { color: var(--plus); margin-top: 2px; }
.settled-card .link-btn { padding: 6px 0 0; color: var(--muted); }
.row.me { background: var(--accent-soft); }
.pay-foot { margin: 22px 16px; }

/* Statistik: Auffälliges, Kalender, Rangliste */
.highlights { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 46%); gap: 10px; overflow-x: auto; padding: 2px 14px 10px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.highlights::-webkit-scrollbar { display: none; }
@media (min-width: 600px) { .highlights { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); overflow: visible; } }
.hl { scroll-snap-align: start; position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; min-width: 0; }
.hl::before { content: ''; position: absolute; right: -24px; top: -24px; width: 80px; height: 80px; border-radius: 50%; background: var(--accent-soft); }
.hl .hl-ic { position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--accent); color: var(--accent-text); margin-bottom: 6px; }
.hl .hl-ic svg.i { width: 18px; height: 18px; }
.hl .k { font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.hl .v { font-size: 1.15rem; font-weight: 750; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hl .h { font-size: 0.78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heatmap { font-size: 0.68rem; color: var(--faint); }
.hm-months { display: grid; margin-left: 22px; height: 14px; }
.hm-months span { white-space: nowrap; }
.hm-grid { display: flex; gap: 3px; }
.hm-days { display: grid; grid-template-rows: repeat(7, 1fr); width: 19px; flex: none; }
.hm-days span { line-height: 1; align-self: center; }
.hm-col { flex: 1; display: grid; grid-template-rows: repeat(7, 1fr); gap: 3px; }
.heatmap i { display: block; aspect-ratio: 1; border-radius: 3px; background: var(--card-2); min-width: 0; }
.heatmap i.l1 { background: color-mix(in srgb, var(--accent) 25%, var(--card-2)); }
.heatmap i.l2 { background: color-mix(in srgb, var(--accent) 50%, var(--card-2)); }
.heatmap i.l3 { background: color-mix(in srgb, var(--accent) 75%, var(--card-2)); }
.heatmap i.l4 { background: var(--accent); }
.heatmap i.lx { background: transparent; }
.hm-legend { display: flex; align-items: center; justify-content: flex-end; gap: 3px; margin-top: 8px; }
.hm-legend i { width: 11px; }
.hm-legend span { margin: 0 4px; }
.avatar.rank { font-size: 0.95rem; font-weight: 800; background: var(--card-2); color: var(--muted); }
.avatar.rank.r1 { background: #fef3c7; color: #b45309; }
.avatar.rank.r2 { background: #e5e7eb; color: #4b5563; }
.avatar.rank.r3 { background: #ffedd5; color: #c2410c; }
#scans > .hint { padding: 0 4px; margin-top: 8px; }

/* „Was ist neu“ (views/changelog.js) */
.release { padding: 12px 14px; }
.release-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.release-head .hint { margin-left: auto; }
.release-title { margin-top: 6px; font-weight: 600; }
.release-details { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 0.9rem; }
.release-details li + li { margin-top: 4px; }
.badge.feat { background: var(--accent-soft); color: var(--accent); }
.badge.fix, .badge.perf { background: var(--plus-soft); color: var(--plus); }
.badge.warn { background: var(--warn-soft); color: var(--minus); }

/* Testumgebung (split-test): immer sichtbar, nicht anklickbar, verdeckt nichts Wichtiges */
.test-banner { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 1000; pointer-events: none;
  background: #f59e0b; color: #1f1300; font: 700 0.72rem/1.2 system-ui, sans-serif; padding: 3px 10px; border-radius: 0 0 8px 8px;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.2); white-space: nowrap; max-width: 90vw; overflow: hidden; text-overflow: ellipsis; }
