/* Space Grotesk, selbst gehostet (keine Anfragen an Google). latin-ext deckt Türkisch ab. */
@font-face { font-family: "Space Grotesk"; font-weight: 300 700; font-display: swap;
  src: url(/fonts/space-grotesk-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Space Grotesk"; font-weight: 300 700; font-display: swap;
  src: url(/fonts/space-grotesk-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- Tokens: Hell (Markenfarben aus dem Logo: Gold, Sonnenuntergang, Holz) ---------- */
:root {
  --base: #F5EEE2;
  --blob-1: rgb(227 178 60 / 0.32); --blob-2: rgb(224 112 36 / 0.22); --blob-3: rgb(30 110 120 / 0.16);
  --glass: rgb(255 255 255 / 0.60); --glass-strong: rgb(255 255 255 / 0.82); --glass-hover: rgb(255 255 255 / 0.86);
  --glass-border: rgb(255 255 255 / 0.85); --edge: rgb(60 35 15 / 0.06);
  --shadow: 0 10px 40px -12px rgb(60 35 15 / 0.20), 0 2px 6px -2px rgb(60 35 15 / 0.06);
  --highlight: inset 0 1px 0 rgb(255 255 255 / 0.9);
  --text: #23170D; --muted: #6A5644; --line: rgb(60 35 15 / 0.09);
  --field: rgb(255 255 255 / 0.7); --field-border: rgb(60 35 15 / 0.16);
  --accent: #C0761A; --accent-text: #8F530C;
  --grad: linear-gradient(135deg, #E9B949 0%, #D27A1E 100%); --on-grad: #2A1A0A;
  --glow-accent: 0 8px 24px -6px rgb(210 122 30 / 0.5); --ring: rgb(210 122 30 / 0.2);
  --yes: #047857; --yes-bg: rgb(16 185 129 / 0.14); --yes-dot: #10B981;
  --no: #B4381F; --no-bg: rgb(220 80 50 / 0.13); --no-dot: #E0603C;
  --open: #6A5644; --open-bg: rgb(100 80 60 / 0.10); --open-dot: #A39382;
  --sup: #155E75; --sup-bg: rgb(30 140 160 / 0.14);
  --hero: linear-gradient(135deg, #4A2E17 0%, #6B3F1C 45%, #C26A1E 100%);
  --hero-text: #FFF6E5;
  color-scheme: light;
}
/* ---------- Tokens: Dunkel ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --base: #0C0805;
    --blob-1: rgb(227 178 60 / 0.22); --blob-2: rgb(194 90 25 / 0.26); --blob-3: rgb(30 110 120 / 0.14);
    --glass: rgb(255 255 255 / 0.05); --glass-strong: rgb(24 17 11 / 0.75); --glass-hover: rgb(255 255 255 / 0.09);
    --glass-border: rgb(255 255 255 / 0.10); --edge: rgb(255 255 255 / 0.05);
    --shadow: 0 20px 50px -20px rgb(0 0 0 / 0.8);
    --highlight: inset 0 1px 0 rgb(255 255 255 / 0.07);
    --text: #F6EEDF; --muted: #B3A592; --line: rgb(255 255 255 / 0.07);
    --field: rgb(255 255 255 / 0.04); --field-border: rgb(255 255 255 / 0.14);
    --accent: #F2C14E; --accent-text: #F5CF72;
    --grad: linear-gradient(135deg, #F2C14E 0%, #D9821F 100%); --on-grad: #24160A;
    --glow-accent: 0 8px 30px -6px rgb(242 193 78 / 0.45); --ring: rgb(242 193 78 / 0.25);
    --yes: #6EE7B7; --yes-bg: rgb(52 211 153 / 0.12); --yes-dot: #34D399;
    --no: #FB9A7A; --no-bg: rgb(251 120 90 / 0.13); --no-dot: #FB7A5A;
    --open: #B3A592; --open-bg: rgb(180 165 146 / 0.10); --open-dot: #7A6C5E;
    --sup: #7DD3E0; --sup-bg: rgb(60 170 190 / 0.18);
    --hero: linear-gradient(135deg, rgb(90 55 25 / 0.85), rgb(120 65 20 / 0.75) 55%, rgb(200 110 30 / 0.65));
    --hero-text: #FFF6E5;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --base: #0C0805;
  --blob-1: rgb(227 178 60 / 0.22); --blob-2: rgb(194 90 25 / 0.26); --blob-3: rgb(30 110 120 / 0.14);
  --glass: rgb(255 255 255 / 0.05); --glass-strong: rgb(24 17 11 / 0.75); --glass-hover: rgb(255 255 255 / 0.09);
  --glass-border: rgb(255 255 255 / 0.10); --edge: rgb(255 255 255 / 0.05);
  --shadow: 0 20px 50px -20px rgb(0 0 0 / 0.8);
  --highlight: inset 0 1px 0 rgb(255 255 255 / 0.07);
  --text: #F6EEDF; --muted: #B3A592; --line: rgb(255 255 255 / 0.07);
  --field: rgb(255 255 255 / 0.04); --field-border: rgb(255 255 255 / 0.14);
  --accent: #F2C14E; --accent-text: #F5CF72;
  --grad: linear-gradient(135deg, #F2C14E 0%, #D9821F 100%); --on-grad: #24160A;
  --glow-accent: 0 8px 30px -6px rgb(242 193 78 / 0.45); --ring: rgb(242 193 78 / 0.25);
  --yes: #6EE7B7; --yes-bg: rgb(52 211 153 / 0.12); --yes-dot: #34D399;
  --no: #FB9A7A; --no-bg: rgb(251 120 90 / 0.13); --no-dot: #FB7A5A;
  --open: #B3A592; --open-bg: rgb(180 165 146 / 0.10); --open-dot: #7A6C5E;
  --sup: #7DD3E0; --sup-bg: rgb(60 170 190 / 0.18);
  --hero: linear-gradient(135deg, rgb(90 55 25 / 0.85), rgb(120 65 20 / 0.75) 55%, rgb(200 110 30 / 0.65));
  --hero-text: #FFF6E5;
  color-scheme: dark;
}

/* ---------- Grundlage ---------- */
* { box-sizing: border-box; }
html { background: var(--base); }
body { margin: 0; min-height: 100vh; color: var(--text);
  font: 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
/* Leuchtende Farbflächen hinter dem Glas */
.glow { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40vmax 40vmax at 8% 10%, var(--blob-1), transparent 70%),
    radial-gradient(38vmax 38vmax at 92% 20%, var(--blob-2), transparent 70%),
    radial-gradient(45vmax 45vmax at 70% 95%, var(--blob-3), transparent 70%); }
.glow::after { content: ""; position: absolute; inset: 0; opacity: 0.5;
  background-image: linear-gradient(var(--edge) 1px, transparent 1px), linear-gradient(90deg, var(--edge) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse at 50% 0%, #000 10%, transparent 70%); }

main { max-width: 560px; margin: 0 auto; padding: 20px 16px 56px; display: flex; flex-direction: column; gap: 18px; }
h1, h2, .brand, .big, .hero > strong { font-family: "Space Grotesk", Inter, system-ui, sans-serif; }
h1 { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; }
h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--accent-text); }

/* ---------- Glas ---------- */
.card, .top, .seg, .pref-group, .chips > a, .chips > label, .btn.secondary, input, select, textarea {
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); }
.card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: 20px; padding: 18px;
  box-shadow: var(--shadow), var(--highlight); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .top { background: var(--glass-strong); }
}

/* ---------- Kopfzeile & Hamburger ---------- */
.top { position: sticky; top: 0; z-index: 10; background: var(--glass); border-bottom: 1px solid var(--glass-border); box-shadow: var(--highlight); }
.bar-inner { max-width: 560px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; color: var(--text); text-decoration: none; min-height: 44px; }
.brand img { border-radius: 50%; filter: drop-shadow(0 4px 10px rgb(210 122 30 / 0.45)); }
.burger { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--glass-border); border-radius: 12px; background: var(--glass); color: var(--text); cursor: pointer; }
.menu { display: none; width: 100%; flex-direction: column; gap: 2px; padding: 4px 0 12px; }
.menu-open .menu { display: flex; }
.nav-link { min-height: 48px; display: flex; align-items: center; padding: 0 14px; border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 500; transition: background 0.15s; }
.nav-link:hover { background: var(--glass-hover); }
.logout-link { width: 100%; gap: 8px; border: 0; background: none; font: inherit; font-weight: 500; cursor: pointer; color: var(--muted); }
.nav-link[aria-current] { background: var(--grad); color: var(--on-grad); font-weight: 700; box-shadow: var(--glow-accent); }
.prefs { display: flex; gap: 12px; padding: 12px 4px 0; margin-top: 8px; border-top: 1px solid var(--line); }
.pref-group { display: inline-flex; padding: 3px; gap: 2px; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 12px; }
.pref-group a { min-width: 40px; height: 36px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; }
.pref-group a[aria-current] { background: var(--glass-strong); color: var(--text); box-shadow: 0 1px 3px rgb(0 0 0 / 0.15); }

/* ---------- Layout ---------- */
.stack { display: flex; flex-direction: column; gap: 14px; }
.cols { display: grid; gap: 18px; align-items: start; }
.narrow { width: 100%; max-width: 480px; margin: 0 auto; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.row.gap { justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.row.top-align { align-items: flex-start; }
.row.end-align { align-items: flex-end; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid2 > * { min-width: 0; }
.pad { padding: 8px 0 12px; }
.big { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.ok-text { color: var(--yes); font-weight: 600; }
.warn-text { color: var(--no); font-weight: 600; }
.strike { text-decoration: line-through; }
.nowrap { white-space: nowrap; }
.label { font-family: Inter, system-ui, sans-serif; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
.backlink { text-decoration: none; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; align-self: flex-start; }
a.link { text-decoration: none; color: var(--text); transition: transform 0.15s; }
a.link:hover { transform: translateY(-1px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.login { padding-top: 32px; display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.login > img { width: min(300px, 72vw); border-radius: 50%; height: auto; filter: drop-shadow(0 18px 40px rgb(210 122 30 / 0.4)); }
.login h1 { font-size: 40px; }
.login form { width: 100%; text-align: left; }

/* ---------- Listen ---------- */
.list { list-style: none; margin: 0; padding: 0 18px; }
.list.flush { padding: 0; }
.list > li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
details > summary { list-style: none; cursor: pointer; min-height: 28px; }
details > summary::-webkit-details-marker { display: none; }
.person { display: inline-flex; align-items: center; gap: 12px; font-weight: 500; min-width: 0; }
.avatar { flex: none; width: 36px; height: 36px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  font: 700 13px/1 "Space Grotesk", Inter, sans-serif; color: #fff; text-shadow: 0 1px 2px rgb(0 0 0 / 0.35);
  background: linear-gradient(135deg, hsl(var(--h) 75% 58%), hsl(calc(var(--h) + 50) 80% 48%));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35), 0 4px 12px -4px hsl(var(--h) 70% 45% / 0.6); }

/* ---------- Status ---------- */
.status, .pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.yes { color: var(--yes); background: var(--yes-bg); }
.status.yes::before { background: var(--yes-dot); box-shadow: 0 0 8px var(--yes-dot); }
.status.no { color: var(--no); background: var(--no-bg); }
.status.no::before { background: var(--no-dot); box-shadow: 0 0 8px var(--no-dot); }
.status.open { color: var(--open); background: var(--open-bg); }
.status.open::before { background: transparent; border: 1.5px solid var(--open-dot); width: 5px; height: 5px; }
.pill { background: var(--open-bg); color: var(--open); }
.pill.ok { background: var(--yes-bg); color: var(--yes); }
.pill.warn { background: var(--no-bg); color: var(--no); }
.pill.admin { background: var(--grad); color: var(--on-grad); }
.pill.supervisor { background: var(--sup-bg); color: var(--sup); }
.votebar { display: flex; gap: 3px; height: 8px; margin: 12px 0 4px; }
.votebar > span { border-radius: 999px; min-width: 0; }
.votebar > span[style*="flex-grow: 0"] { display: none; }
.votebar .yes { background: var(--yes-dot); box-shadow: 0 0 10px var(--yes-dot); }
.votebar .no { background: var(--no-dot); }
.votebar .open { background: var(--line); }

/* ---------- Formulare ---------- */
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 12px; font-size: 16px; font-weight: 500; color: var(--text); }
input, select, textarea { height: 46px; padding: 0 14px; border: 1px solid var(--field-border); border-radius: 12px; font: inherit; font-size: 16px; font-weight: 400;
  background: var(--field); color: var(--text); min-width: 0; width: 100%; transition: border-color 0.15s, box-shadow 0.15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
input.amount { height: 56px; font: 700 26px/1 "Space Grotesk", Inter, sans-serif; letter-spacing: -0.02em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
fieldset { border: 0; margin: 0; padding: 0; }
legend { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }

/* ---------- Buttons ---------- */
.btn { height: 48px; padding: 0 18px; border: 0; border-radius: 14px; background: var(--grad); color: var(--on-grad); font: inherit; font-weight: 700;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  box-shadow: var(--glow-accent), inset 0 1px 0 rgb(255 255 255 / 0.4); transition: transform 0.15s, box-shadow 0.15s, filter 0.15s; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }
.btn.secondary { background: var(--glass); color: var(--text); border: 1px solid var(--glass-border); box-shadow: var(--highlight); }
.btn.secondary:hover { background: var(--glass-hover); }
.btn.small { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.icon { width: 44px; height: 44px; padding: 0; font-size: 18px; }
.btn.wide { width: 100%; }

/* ---------- Segmente & Chips ---------- */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 16px; }
.seg > a, .seg > label { height: 42px; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 6px; border-radius: 12px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.seg > a[aria-current], .seg > label:has(input:checked) { background: var(--glass-strong); color: var(--text); box-shadow: 0 2px 8px -2px rgb(0 0 0 / 0.2), var(--highlight); }
.seg input { width: 16px; height: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips > a, .chips > label { height: 40px; padding: 0 16px; display: inline-flex; flex-direction: row; align-items: center; gap: 6px; border: 1px solid var(--glass-border); border-radius: 999px;
  background: var(--glass); color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; }
.chips > a[aria-current], .chips > label:has(input:checked) { background: var(--grad); border-color: transparent; color: var(--on-grad); box-shadow: var(--glow-accent); }
.chips input { width: 16px; height: 16px; }

/* ---------- Kassenstand & Fortschritt ---------- */
.hero { background: var(--hero); color: var(--hero-text); border-color: rgb(255 255 255 / 0.25); display: flex; flex-direction: column; gap: 8px; overflow: hidden; position: relative; }
.hero::after { content: ""; position: absolute; width: 220px; height: 220px; right: -60px; top: -80px; border-radius: 50%; background: rgb(255 255 255 / 0.18); filter: blur(30px); }
.hero > span { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; opacity: 0.85; }
.hero > strong { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.hero .grid2 { font-size: 13px; opacity: 0.9; }
.hero b { font-size: 16px; }
.hero-note { margin: -4px 0 4px; font-size: 13px; opacity: 0.85; }
.bar { height: 10px; background: var(--open-bg); border-radius: 999px; overflow: hidden; }
.bar > div { height: 100%; background: var(--grad); border-radius: 999px; box-shadow: var(--glow-accent); }

/* ---------- Meldungen ---------- */
.flash { padding: 12px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; border: 1px solid var(--glass-border); }
.flash.err { background: var(--no-bg); color: var(--no); }
.flash.ok { background: var(--yes-bg); color: var(--yes); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Tablet & größer ---------- */
@media (min-width: 768px) {
  main, .bar-inner { max-width: 1120px; padding-left: 32px; padding-right: 32px; }
  main { padding-top: 36px; gap: 22px; }
  h1 { font-size: 38px; }
  .burger { display: none; }
  .bar-inner { flex-wrap: nowrap; padding-top: 10px; padding-bottom: 10px; }
  .menu, .menu-open .menu { display: flex; width: auto; flex-direction: row; align-items: center; gap: 4px; padding: 0; }
  .nav-link { min-height: 40px; }
  .prefs { padding: 0 0 0 12px; margin: 0 0 0 8px; border-top: 0; border-left: 1px solid var(--line); }
  .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .card { padding: 22px; border-radius: 24px; }
  .list { padding: 0 22px; }
}
@media (min-width: 1024px) {
  .cols { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}

/* ---------- Mitglieder: Foto & Kontakt ---------- */
img.avatar { object-fit: cover; padding: 0; background: var(--glass); }
.who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.who a { color: var(--accent-text); text-decoration: none; }
.photo-field { display: flex; align-items: center; gap: 14px; }
.photo-preview:empty { display: none; }
.photo-preview .avatar { width: 64px; height: 64px; border-radius: 18px; }
.big-person .avatar { width: 64px; height: 64px; border-radius: 20px; font-size: 22px; }
/* iOS Safari gibt Datum/Zeit eine Eigenbreite und ragt sonst rechts aus der Karte */
input[type=date], input[type=time] { -webkit-appearance: none; appearance: none; display: block; text-align: left; }
input::-webkit-date-and-time-value { text-align: left; }
input[type=file] { height: auto; padding: 10px; font-size: 14px; }

/* ---------- Fußzeile & Rechtstexte ---------- */
.foot { max-width: 1120px; margin: 0 auto; padding: 8px 16px 32px; display: flex; justify-content: center; gap: 20px; font-size: 13px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); text-decoration: underline; }
.legal h2 { margin-top: 8px; }
.legal ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.legal-wrap { position: relative; }
.legal-close { position: absolute; top: 12px; right: 12px; z-index: 1; border-radius: 12px; }
.legal-wrap .legal h1 { padding-right: 56px; }

/* ---------- Statistik ---------- */
.row.wrap { flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 16px; }
.tile > span { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.tile > strong { font: 700 30px/1.1 "Space Grotesk", Inter, sans-serif; letter-spacing: -0.03em; }
.hbar { height: 8px; margin-top: 8px; border-radius: 999px; background: var(--open-bg); overflow: hidden; }
.hbar > span { display: block; height: 100%; border-radius: 999px; background: var(--grad); min-width: 4px; }
.ranking > li { padding: 10px 0; }
.ranking p { margin-top: 4px; }
.vbars { display: flex; align-items: flex-end; gap: 6px; height: 200px; padding-top: 8px; }
.vbar { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.vbar .fill { width: 100%; max-width: 32px; border-radius: 4px 4px 0 0; background: var(--grad); min-height: 2px; transition: filter 0.15s; }
.vbar:hover .fill { filter: brightness(1.2); box-shadow: var(--glow-accent); }
.vbar .val { font-size: 12px; font-weight: 700; }
.vbar .lbl { font-size: 10px; color: var(--muted); white-space: nowrap; }
@media (min-width: 768px) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 480px) { .vbar .lbl { writing-mode: vertical-rl; transform: rotate(180deg); } }
.center { align-self: center; }
.log-details { color: var(--muted); overflow-wrap: anywhere; }
.log .person { align-items: flex-start; }

/* ---------- Eigenes Foto: Begrüßung & Menü ---------- */
.greeting { display: flex; align-items: center; gap: 16px; }
.greeting > .avatar { width: 60px; height: 60px; border-radius: 18px; font-size: 20px; box-shadow: 0 0 0 3px var(--glass-border), var(--glow-accent); }
.nav-link .avatar { width: 26px; height: 26px; border-radius: 8px; font-size: 10px; margin-right: 8px; }
@media (min-width: 768px) { .greeting > .avatar { width: 72px; height: 72px; border-radius: 22px; font-size: 24px; } }

/* ---------- Als App (Home-Bildschirm): Notch, Statusleiste und Home-Leiste freihalten ---------- */
.top { padding-top: env(safe-area-inset-top); }
.bar-inner { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
main { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.foot { padding-bottom: max(32px, calc(env(safe-area-inset-bottom) + 16px)); }
@media (display-mode: standalone) {
  /* Keine Text-Markierung beim langen Tippen auf Bedienelemente, kein Nachfedern oben. */
  .btn, .nav-link, .chips > a, .seg > a, .burger { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  html, body { overscroll-behavior-y: none; }
  /* Hinter der (weißen) Uhrzeit-Leiste ein holzbrauner Streifen, in Hell und Dunkel lesbar. */
  .top { background-image: linear-gradient(to bottom, #4A2E17 0, #4A2E17 env(safe-area-inset-top), transparent env(safe-area-inset-top)); }
}
@media (min-width: 768px) {
  .bar-inner, main { padding-left: max(32px, env(safe-area-inset-left)); padding-right: max(32px, env(safe-area-inset-right)); }
}
.foot { flex-wrap: wrap; align-items: center; }
.version { color: var(--muted); opacity: 0.8; font-variant-numeric: tabular-nums; font-size: 12px; }
.welcome-row { display: flex; gap: 8px; }
.welcome-row select { width: auto; flex: none; }

/* ---------- Teilnehmer: gruppierte Liste ---------- */
.count-big { font: 500 14px/1 "Space Grotesk", Inter, sans-serif; color: var(--muted); white-space: nowrap; }
.count-big b { font-size: 26px; color: var(--yes); letter-spacing: -0.02em; }
.pgroup { margin-top: 14px; }
.pgroup-title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.pgroup-n { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 11px; letter-spacing: 0; background: var(--open-bg); }
.pgroup.yes .pgroup-n { background: var(--yes-bg); color: var(--yes); }
.pgroup.no .pgroup-n { background: var(--no-bg); color: var(--no); }
.plist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.plist > li { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; transition: background 0.15s; }
.plist > li:hover { background: var(--glass-hover); }
.plist .avatar { width: 38px; height: 38px; border-radius: 12px; font-size: 13px; }
.plist .pn { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picon { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; }
.pgroup.yes .plist > li { background: linear-gradient(90deg, var(--yes-bg), transparent 75%); }
.pgroup.yes .picon { background: var(--yes-dot); color: #fff; box-shadow: 0 0 12px -2px var(--yes-dot); }
.pgroup.no .picon { background: var(--no-bg); color: var(--no); }
.pgroup.open .plist > li { padding: 5px 10px; }
.pgroup.open .avatar { width: 30px; height: 30px; border-radius: 10px; font-size: 11px; filter: grayscale(0.5); opacity: 0.8; }
.pgroup.open .pn { font-weight: 500; color: var(--muted); }
.pgroup.open .picon { color: var(--open-dot); }
.btn.danger { background: transparent; color: var(--no); border: 1px solid color-mix(in srgb, var(--no) 45%, transparent); box-shadow: none; }
.btn.danger:hover { background: var(--no-bg); filter: none; }

/* ---------- Splash bei jedem Aufruf der Startseite: Sonnenaufgang über dem Horizont, die Karawane fährt los ---------- */
.splash-screen { display: none; }
.splash .splash-screen { display: grid; place-items: center; align-content: center; gap: 22px; position: fixed; inset: 0; z-index: 100;
  background: linear-gradient(to bottom, #120A05 0%, #2A170A 45%, #5A2E10 62%, #120A05 62.2%, #0C0805 100%); color: #FFF6E5; overflow: hidden;
  animation: splash-out 0.55s cubic-bezier(.7,0,.3,1) 3.6s forwards; cursor: pointer; }
.splash body { overflow: hidden; }
/* Himmel wird von unten heller, die Sonne steigt hinter dem Logo auf */
.splash-glow { position: absolute; inset: 0; background: radial-gradient(70vmax 45vmax at 50% 62%, rgb(242 140 40 / 0.55), rgb(242 193 78 / 0.15) 45%, transparent 70%);
  animation: splash-dawn 1.8s ease-out both; }
.splash-sun { position: absolute; left: 50%; top: 62%; width: 46vmin; height: 46vmin; margin-left: -23vmin; border-radius: 50%;
  background: radial-gradient(circle, #FFE3A0 0%, #F2C14E 35%, rgb(226 120 30 / 0.6) 60%, transparent 72%); filter: blur(2px);
  animation: splash-sunrise 1.6s cubic-bezier(.2,.8,.2,1) 0.1s both; }
.splash-horizon { position: absolute; left: 0; right: 0; top: 62%; height: 2px; background: linear-gradient(90deg, transparent, #F2C14E 30%, #FFE3A0 50%, #F2C14E 70%, transparent);
  box-shadow: 0 0 18px #F2C14E; transform-origin: center; animation: splash-draw 0.9s ease-out both; }
.splash-mark { position: relative; }
.splash-logo { position: relative; width: min(140px, 36vw); height: auto; border-radius: 50%;
  filter: drop-shadow(0 18px 40px rgb(242 193 78 / 0.5)); animation: splash-rise 1.1s cubic-bezier(.2,.9,.25,1.15) 0.35s both; }
.splash-me { position: absolute; right: -18%; bottom: -14%; animation: splash-pop 0.5s cubic-bezier(.2,.9,.25,1.4) 1.2s both; }
.splash-me .avatar { width: min(64px, 17vw); height: min(64px, 17vw); border-radius: 50%; font-size: min(22px, 6vw); object-fit: cover; display: grid; place-items: center;
  border: 3px solid #F2C14E; box-shadow: 0 0 0 4px rgb(12 8 5 / 0.9), 0 10px 30px rgb(242 193 78 / 0.55); }
.splash-word { position: relative; display: flex; gap: 0.12em; font: 800 clamp(24px, 7vw, 38px)/1 "Space Grotesk", Inter, sans-serif; letter-spacing: 0.22em;
  color: #F5CF72; }
.splash-word span { display: inline-block; animation: splash-letter 0.5s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(0.9s + var(--i) * 0.07s);
  text-shadow: 0 2px 0 #6B3F1C, 0 0 24px rgb(242 193 78 / 0.55); }
/* Liegt vor der hellen Sonne: dunkle Glasfläche dahinter, damit der Gruß lesbar bleibt */
.splash-hello { position: relative; margin-top: -8px; padding: 6px 16px; border-radius: 999px; font-size: 16px; font-weight: 700; color: #FFF6E5;
  background: rgb(12 8 5 / 0.62); border: 1px solid rgb(242 193 78 / 0.35); text-shadow: 0 1px 2px rgb(0 0 0 / 0.6);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: splash-letter 0.5s ease-out 1.4s both; }
/* Weg mit Spur, das Kamel der Karawane schaukelt von links nach rechts */
.splash-road { position: relative; width: min(300px, 78vw); height: 52px; animation: splash-letter 0.4s ease-out 0.6s both; }
.splash-road::before { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 3px; border-radius: 3px;
  background: repeating-linear-gradient(90deg, #F2C14E 0 14px, transparent 14px 24px); opacity: 0.7; animation: splash-dash 0.6s linear infinite; }
.splash-van { position: absolute; left: 0; bottom: 5px; font-size: 42px; line-height: 1; transform: scaleX(-1); filter: drop-shadow(0 4px 8px rgb(0 0 0 / 0.5));
  animation: splash-drive 2.4s cubic-bezier(.45,0,.35,1) 0.7s both, splash-sway 0.4s ease-in-out 0.7s 6 alternate; }

@keyframes splash-dawn { from { opacity: 0; } to { opacity: 1; } }
@keyframes splash-sunrise { from { opacity: 0; transform: translateY(30%) scale(0.7); } to { opacity: 1; transform: translateY(-50%); } }
@keyframes splash-draw { from { opacity: 0; transform: scaleX(0); } to { opacity: 0.9; transform: scaleX(1); } }
@keyframes splash-rise { 0% { opacity: 0; transform: translateY(40px) rotate(-25deg) scale(0.6); } 70% { opacity: 1; transform: translateY(-6px) rotate(4deg) scale(1.04); } 100% { opacity: 1; transform: none; } }
@keyframes splash-pop { from { opacity: 0; transform: scale(0.2) rotate(-25deg); } to { opacity: 1; transform: none; } }
@keyframes splash-letter { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes splash-dash { to { background-position: -24px 0; } }
@keyframes splash-sway { from { transform: scaleX(-1) translateY(0) rotate(0); } to { transform: scaleX(-1) translateY(-4px) rotate(-4deg); } }
@keyframes splash-drive { from { left: 0; } to { left: calc(100% - 46px); } }
@keyframes splash-out { to { opacity: 0; transform: translateY(-4%) scale(1.04); visibility: hidden; } }

@media (prefers-reduced-motion: reduce) {
  .splash .splash-screen { animation: splash-out 0.4s ease 0.9s forwards; }
  .splash-logo, .splash-word span, .splash-glow, .splash-sun, .splash-horizon, .splash-road, .splash-road::before, .splash-van, .splash-me, .splash-hello { animation: none; }
  .splash-sun { transform: translateY(-50%); }
}

/* ---------- Kassenbuch: Details & Beleg ---------- */
.ledger-list > li { padding: 0; }
.ledger-row { padding: 12px 0; color: var(--text); text-decoration: none; }
.ledger-row:hover .chev { transform: translateX(3px); color: var(--accent-text); }
.ledger-row .picon { width: 38px; height: 38px; border-radius: 12px; font-size: 17px; background: var(--glass); border: 1px solid var(--glass-border); }
.chev { color: var(--muted); font-size: 20px; transition: transform 0.15s; }
.clip { font-size: 13px; }
.entry-title { font-size: 24px; margin-top: 2px; }
.entry-amount { font: 700 26px/1.1 "Space Grotesk", Inter, sans-serif; white-space: nowrap; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }
.receipt-full { display: block; border-radius: 16px; overflow: hidden; border: 1px solid var(--glass-border); }
.receipt-full img { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain; background: #000; }
.receipt-pick { cursor: pointer; }
.receipt-preview:empty { display: none; }
.receipt-preview img { display: block; max-width: 100%; max-height: 260px; border-radius: 14px; border: 1px solid var(--glass-border); }

/* ---------- Dialog ---------- */
.dialog { width: min(380px, calc(100vw - 32px)); padding: 28px 24px 24px; border: 1px solid var(--glass-border); border-radius: 24px;
  background: var(--glass-strong); color: var(--text); box-shadow: var(--shadow), var(--highlight); text-align: center;
  -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); }
.dialog[open] { animation: dialog-in 0.18s ease-out; }
.dialog::backdrop { background: rgb(0 0 0 / 0.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dialog h2 { margin: 0; }
.dialog p { margin: 0; }
.dialog-icon { width: 56px; height: 56px; margin: 0 auto; display: grid; place-items: center; border-radius: 18px; background: var(--grad); color: var(--on-grad); box-shadow: var(--glow-accent); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(0.97); } }
textarea { height: auto; min-height: 72px; padding: 12px 14px; line-height: 1.4; resize: vertical; }
.facts dd.note { white-space: pre-line; font-weight: 400; }

/* ---------- Fotoalbum ---------- */
.album-pick { gap: 12px; }
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.album { padding: 0; overflow: hidden; text-decoration: none; color: var(--text); display: flex; flex-direction: column; transition: transform 0.15s; }
.album:hover { transform: translateY(-2px); }
.album img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.album-meta { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
.album-meta .small { color: var(--muted); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.photo-grid a { display: block; border-radius: 12px; overflow: hidden; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; transition: transform 0.2s; }
.photo-grid a:hover img { transform: scale(1.04); }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgb(5 3 5 / 0.96); display: grid; place-items: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.lightbox[hidden] { display: none; }
.lb-open { overflow: hidden; }
.lb-img { max-width: 100vw; max-height: 100dvh; object-fit: contain; opacity: 0; transition: opacity 0.4s; }
.lb-img.in { opacity: 1; }
.lb-btn { width: 44px; height: 44px; border-radius: 14px; border: 1px solid rgb(255 255 255 / 0.18); background: rgb(255 255 255 / 0.1);
  color: #fff; font-size: 20px; cursor: pointer; display: grid; place-items: center; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.lb-close { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); font-size: 28px; }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-info { position: absolute; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 16px; color: #fff; background: rgb(0 0 0 / 0.45); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.lb-info .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lb-meta { opacity: 0.75; }
.lb-delete[hidden] { display: none; }
@media (max-width: 767px) { .lb-prev, .lb-next { display: none; } }

/* ---------- Neuigkeiten ---------- */
.news h2 { margin-bottom: 4px; }
.news-row { padding: 10px 0; color: var(--text); text-decoration: none; }
.news-row:hover .news-icon { transform: scale(1.08); }
.news-icon { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; font-size: 18px;
  background: var(--glass); border: 1px solid var(--glass-border); transition: transform 0.15s; }
.news-row .avatar { width: 28px; height: 28px; border-radius: 9px; font-size: 10px; flex: none; }
.photo-grid a { position: relative; }
.pick { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; margin: 0; pointer-events: none; display: none; accent-color: var(--accent); }
.selecting .pick { display: block; }
.selecting a { outline: 3px solid transparent; outline-offset: -3px; transition: outline-color 0.15s, opacity 0.15s; }
.selecting a:not(.picked) img { opacity: 0.75; }
.selecting a.picked { outline-color: var(--accent); }
.bulk-bar { position: sticky; top: 72px; z-index: 5; }
.bulk-bar[hidden] { display: none; }

/* ---------- Countdown ---------- */
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cd-unit { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px;
  background: var(--glass); border: 1px solid var(--glass-border); }
.cd-unit b { font: 700 clamp(22px, 7vw, 30px)/1 "Space Grotesk", Inter, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cd-unit small { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.countdown.live { display: block; text-align: center; padding: 12px; border-radius: 14px; font-weight: 700; background: var(--grad); color: var(--on-grad); box-shadow: var(--glow-accent); }

/* ---------- Ausflüge ---------- */
.trips { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.trip { display: flex; flex-direction: column; gap: 4px; }
.trip h2 { font-size: 19px; }
.trip-desc { white-space: pre-line; color: var(--muted); }
