/* ==========================================================================
   Familie Hörnlimann – Familienportal
   Farben aus dem Familienwappen: Azurblau, Gold, Rot, Silber
   ========================================================================== */
:root {
  --navy-950: #081630;
  --navy-900: #0c1f3f;
  --navy-800: #10284d;
  --navy-700: #183a6b;
  --blue: #1f5fae;
  --blue-600: #1a5297;
  --blue-50: #eaf1fb;
  --blue-100: #d6e4f7;
  --gold: #b8871f;
  --gold-400: #d9a93a;
  --gold-300: #e7b93c;
  --gold-50: #fbf5e6;
  --red: #b23a2e;
  --red-50: #fcefed;
  --bg: #f5f2eb;
  --surface: #ffffff;
  --surface-2: #faf8f3;
  --line: #e6e0d4;
  --line-2: #d4ccbb;
  --text: #182031;
  --text-2: #3f4a5c;
  --muted: #677084;
  --ok: #2c7a4b;
  --ok-50: #e8f5ed;
  --warn: #a8660f;
  --warn-50: #fdf3e2;
  --err: #b42318;
  --err-50: #fdecea;
  --dead: #8c8577;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow-1: 0 1px 2px rgba(16, 40, 77, .06), 0 1px 1px rgba(16, 40, 77, .04);
  --shadow-2: 0 4px 16px rgba(16, 40, 77, .08), 0 1px 3px rgba(16, 40, 77, .06);
  --shadow-3: 0 18px 50px rgba(8, 22, 48, .22);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --side-w: 276px;
  --top-h: 72px;
  --tab-h: 74px;
  --focus: 0 0 0 3px #fff, 0 0 0 6px var(--gold-300);
  color-scheme: light;
}
html { font-size: 106.25%; -webkit-text-size-adjust: 100%; }
html[data-size="gross"] { font-size: 118.75%; }
html[data-size="sehrgross"] { font-size: 131.25%; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.55 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; display: block; }
a { color: var(--blue-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; color: var(--navy-800); }
h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.7rem, 2.6vw, 2.25rem); letter-spacing: -.01em; }
h2 { font-size: 1.18rem; font-weight: 650; }
h3 { font-size: 1.02rem; font-weight: 650; }
p { margin: 0; }
small { font-size: .84rem; }
code { font: .92em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--blue-50); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.lead { font-size: 1.08rem; color: var(--text-2); }
.pre { white-space: pre-wrap; }
.pad { padding: 12px 14px; }
.mt { margin-top: 14px; }
.row { display: flex; align-items: center; }
.row.gap { gap: 12px; } .row.gap-s { gap: 8px; } .row.wrap { flex-wrap: wrap; } .row.center { justify-content: center; }
.grow { flex: 1 1 auto; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.center-text { text-align: center; align-items: center; }
.ico { width: 1.25em; height: 1.25em; flex: none; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--navy-800); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip:focus { left: 8px; }
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); }
.boot img { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.94); opacity: .75; } }
.noscript { padding: 24px; text-align: center; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 0 20px; border-radius: 12px; border: 1.5px solid transparent;
  font-weight: 600; font-size: .98rem; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s; white-space: nowrap; user-select: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--navy-800); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, var(--shadow-1); }
.btn.primary:hover { background: var(--navy-700); }
.btn.ghost { background: var(--surface); color: var(--navy-800); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--navy-700); background: var(--blue-50); }
.btn.ghost-light { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.35); }
.btn.ghost-light:hover { background: rgba(255,255,255,.18); }
.btn.danger { background: var(--err); color: #fff; }
.btn.danger-ghost { background: transparent; color: var(--err); border-color: #efc2bd; }
.btn.danger-ghost:hover { background: var(--err-50); }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: .9rem; border-radius: 10px; }
.btn.lg { min-height: 56px; font-size: 1.05rem; padding: 0 26px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.busy span::after { content: " …"; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid transparent; background: transparent; color: var(--navy-800); cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--blue-50); }
.icon-btn.lg { width: 48px; height: 48px; border-color: var(--line-2); background: var(--surface); }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--blue-600); cursor: pointer; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; gap: 6px; }
.link-btn.small { font-size: .88rem; }

/* ---------- Badges, Chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 650; line-height: 1.5; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.badge .ico { width: 1em; height: 1em; }
.badge.rel { background: var(--gold-50); color: #7a5410; border-color: #eedcae; }
.badge.me { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.badge.soft { background: var(--blue-50); color: var(--blue-600); border-color: var(--blue-100); }
.badge.ok { background: var(--ok-50); color: var(--ok); border-color: #c5e4d0; }
.badge.warn { background: var(--warn-50); color: var(--warn); border-color: #f1d9ad; }
.badge.err { background: var(--err-50); color: var(--err); border-color: #f3c9c4; }
.badge.acct { padding: 3px 6px; }
.badge.lg { font-size: .9rem; padding: 5px 12px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: .92rem; cursor: pointer; color: var(--text-2); }
.chip[aria-pressed="true"] { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }

/* ---------- Avatare ---------- */
.avatar { flex: none !important; display: inline-grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; background: var(--blue-50); color: var(--blue-600); font-weight: 700; letter-spacing: .02em; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.f { background: var(--red-50); color: var(--red); }
.avatar.x { background: var(--gold-50); color: var(--gold); }
.avatar.dead img { filter: grayscale(.85); }
.avatar.dead { background: #efece6; color: var(--dead); }
.avatar.xs { width: 32px; height: 32px; font-size: .72rem; }
.avatar.sm { width: 44px; height: 44px; font-size: .86rem; }
.avatar.md { width: 56px; height: 56px; }
.avatar.portrait { width: 84px; height: 112px; border-radius: 12px; font-size: 1.4rem; }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.wide, .check.wide, .form-grid > .wide { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .94rem; color: var(--text-2); }
.req { color: var(--red); }
input[type=text], input[type=search], input[type=password], input[type=email], input[type=tel], input:not([type]), select, textarea {
  width: 100%; min-height: 52px; padding: 12px 14px; border: 1.5px solid var(--line-2); border-radius: 12px; background: #fff; font-size: 1.02rem; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 44px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310284d' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(31, 95, 174, .15); }
input.invalid { border-color: var(--err); background: var(--err-50); }
.hint { color: var(--muted); font-size: .85rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 20px; margin: 0; background: var(--surface-2); display: flex; flex-direction: column; gap: 14px; }
legend { display: inline-flex; align-items: center; gap: 8px; padding: 0 8px; font-weight: 700; color: var(--navy-800); }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-weight: 600; min-height: 32px; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box { width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--line-2); display: grid; place-items: center; background: #fff; flex: none; color: transparent; transition: .15s; }
.check input:checked + .box { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.check input:focus-visible + .box { box-shadow: var(--focus); }
.check small { display: block; font-weight: 400; color: var(--muted); }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: #ece7dc; border-radius: 14px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 16px; border-radius: 10px; font-weight: 600; font-size: .94rem; cursor: pointer; color: var(--text-2); }
.segmented input:checked + span { background: #fff; color: var(--navy-800); box-shadow: var(--shadow-1); }
.segmented input:focus-visible + span { box-shadow: var(--focus); }
.segmented.small span { min-height: 40px; padding: 0 12px; }
.segmented em { font-style: normal; }
.form-error { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--err-50); color: var(--err); font-weight: 600; border: 1px solid #f3c9c4; margin-bottom: 4px; }
.search-input { position: relative; display: flex; align-items: center; }
.search-input > .ico { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.search-input input { padding-left: 46px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 56px; }
.pw-toggle { position: absolute; right: 4px; top: 4px; width: 44px; height: 44px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 10px; display: grid; place-items: center; }
.pw-meter { height: 6px; background: var(--line); border-radius: 6px; overflow: hidden; margin-top: -8px; }
.pw-meter span { display: block; height: 100%; width: 0; background: var(--err); transition: width .2s, background .2s; }
.pw-meter[data-s="2"] span { background: var(--warn); } .pw-meter[data-s="3"] span, .pw-meter[data-s="4"] span { background: var(--ok); }

/* ---------- Karten ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow-1); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { display: flex; align-items: center; gap: 10px; }
.card-head h2 .ico { color: var(--gold); }
.more { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; text-decoration: none; font-size: .92rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.view > * + * { margin-top: 20px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head p { margin-top: 6px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); display: grid; justify-items: center; gap: 10px; }
.empty .ico { width: 44px; height: 44px; color: var(--line-2); }
.empty h3 { color: var(--text-2); }
.notice { display: flex; gap: 10px; align-items: center; padding: 14px 16px; background: var(--warn-50); border: 1px solid #f1d9ad; border-radius: 12px; color: #6d4309; }
.progress { height: 10px; border-radius: 10px; background: var(--line); overflow: hidden; margin: 12px 0 16px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-400), var(--gold-300)); border-radius: 10px; }

/* ==========================================================================
   Anmeldung
   ========================================================================== */
body.auth-mode { background: var(--navy-900); }
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-hero { position: relative; color: #fff; padding: 56px 56px 40px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
  background: radial-gradient(1200px 600px at 20% 0%, #1d4a8a 0%, transparent 60%), radial-gradient(900px 500px at 100% 100%, #3a1a1a 0%, transparent 55%), linear-gradient(160deg, var(--navy-800), var(--navy-950)); }
.auth-hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(231,185,60,.13) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, #000, transparent 85%); }
.auth-hero-inner { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; margin: auto 0; gap: 10px; }
.auth-wappen { width: min(330px, 70%); filter: drop-shadow(0 18px 30px rgba(0,0,0,.45)); margin-bottom: 14px; }
.auth-hero h1 { color: #fff; font-size: clamp(2rem, 3.6vw, 3rem); }
.auth-sub { color: var(--gold-300); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .86rem; }
.auth-points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; text-align: left; }
.auth-points li { display: flex; gap: 12px; align-items: center; color: #dfe6f2; }
.auth-points .ico { color: var(--gold-300); }
.auth-secure { position: relative; display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: #b9c5d8; max-width: 520px; margin: 30px auto 0; }
.auth-secure .ico { color: var(--gold-300); margin-top: 2px; }
.auth-main { background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 480px; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-2); border: 1px solid var(--line); padding: 10px 32px 32px; }
.auth-foot { color: var(--muted); font-size: .82rem; margin-top: 18px; }
.tabs { display: flex; gap: 6px; border-bottom: 1.5px solid var(--line); margin: 0 -8px 24px; }
.tabs [role=tab] { flex: 1; background: none; border: 0; padding: 16px 8px; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1.5px; font-size: 1.02rem; display: inline-flex; gap: 8px; align-items: center; justify-content: center; text-decoration: none; }
.tabs [role=tab][aria-selected=true] { color: var(--navy-800); border-bottom-color: var(--gold-300); }
.auth-card h2 { font-family: var(--serif); font-size: 1.55rem; font-weight: 600; }
.auth-card .muted { margin-top: 4px; }
.steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 22px; }
.steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); font-weight: 600; text-align: center; position: relative; }
.steps li span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-2); background: #fff; font-weight: 700; }
.steps li.current span { border-color: var(--navy-800); color: var(--navy-800); box-shadow: 0 0 0 4px var(--blue-50); }
.steps li.current { color: var(--navy-800); }
.steps li.done span { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li + li::before { content: ""; position: absolute; top: 17px; right: 50%; width: calc(100% - 34px); height: 2px; background: var(--line); transform: translateX(-17px); }
.username-preview { background: var(--gold-50); border: 1.5px dashed #e4c77f; border-radius: 12px; padding: 12px 16px; display: flex; flex-direction: column; }
.username-preview small { color: #7a5410; font-weight: 600; }
.username-preview b { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.02rem; word-break: break-all; color: var(--navy-800); }
.username-preview.big b { font-size: 1.15rem; }
.question-card { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: 14px; background: linear-gradient(135deg, var(--navy-800), var(--navy-700)); color: #fff; }
.question-card .ico { width: 36px; height: 36px; color: var(--gold-300); }
.question-card small { color: #c7d3e6; display: block; }
.question-card b { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.success-badge { width: 76px; height: 76px; border-radius: 50%; background: var(--ok-50); color: var(--ok); display: grid; place-items: center; }
.success-badge .ico { width: 40px; height: 40px; }

/* ==========================================================================
   App-Rahmen
   ========================================================================== */
.app { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: linear-gradient(180deg, var(--navy-800), var(--navy-950)); color: #fff; display: flex; flex-direction: column; padding: 22px 16px; z-index: 30; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand img { width: 42px; height: auto; filter: drop-shadow(0 3px 6px rgba(0,0,0,.35)); }
.brand b { display: block; font-family: var(--serif); font-size: 1.14rem; font-weight: 600; line-height: 1.1; }
.brand small { color: var(--gold-300); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.sidebar .brand { padding: 4px 8px 22px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 16px; }
.side-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
.side-nav a { display: flex; align-items: center; gap: 14px; min-height: 50px; padding: 0 14px; border-radius: 12px; color: #d3dcea; text-decoration: none; font-weight: 600; }
.side-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-nav a.active { background: rgba(231,185,60,.14); color: #fff; box-shadow: inset 3px 0 0 var(--gold-300); }
.side-nav a.active .ico { color: var(--gold-300); }
.nav-sep { height: 1px; background: rgba(255,255,255,.1); margin: 12px 8px; }
.side-user { display: flex; align-items: center; gap: 6px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); }
.side-user .icon-btn { color: #c7d3e6; }
.side-user .icon-btn:hover { background: rgba(255,255,255,.08); }
.su-link { flex: 1; display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; padding: 6px; border-radius: 12px; min-width: 0; }
.su-link:hover { background: rgba(255,255,255,.07); }
.su-link b { display: block; font-size: .94rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.su-link small { color: #a9b7cc; }
.su-link span { min-width: 0; }
.main-col { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--top-h); display: flex; align-items: center; gap: 14px; padding: 0 32px; background: rgba(245, 242, 235, .88); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.global-search { flex: 1; max-width: 560px; }
.gs-box input { background: #fff; }
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-3); padding: 6px; z-index: 50; max-height: 60vh; overflow-y: auto; }
.suggest a, .suggest button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; width: 100%; border: 0; background: none; text-align: left; cursor: pointer; font-weight: 600; min-height: 52px; }
.suggest a:hover, .suggest button:hover, .suggest a:focus { background: var(--blue-50); }
.suggest small { display: block; color: var(--muted); font-weight: 400; }
.top-user { margin-left: auto; text-decoration: none; }
.mobile-only { display: none !important; }
#view { padding: 32px 32px 64px; max-width: 1320px; width: 100%; margin: 0 auto; outline: none; }
#view.full { max-width: none; padding: 0; }
.tabbar { display: none; }

/* ---------- Startseite ---------- */
.hero-card { position: relative; overflow: hidden; display: flex; gap: 32px; align-items: center; padding: 34px 38px; border-radius: 22px; color: #fff;
  background: radial-gradient(700px 300px at 0% 0%, #245ba6 0%, transparent 60%), linear-gradient(135deg, var(--navy-800), var(--navy-950)); box-shadow: var(--shadow-2); }
.hero-card::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(231,185,60,.12) 1px, transparent 1px); background-size: 20px 20px; mask-image: linear-gradient(90deg, transparent 40%, #000); pointer-events: none; }
.hero-wappen { width: 124px; flex: none; filter: drop-shadow(0 12px 20px rgba(0,0,0,.4)); position: relative; z-index: 1; }
.hero-text { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; }
.hero-card h1 { color: #fff; }
.hero-card p { color: #d6dff0; max-width: 60ch; }
.eyebrow { color: var(--gold-300) !important; font-weight: 700; font-size: .8rem !important; letter-spacing: .1em; text-transform: uppercase; }
.hero-text .row { margin-top: 8px; }
.hero-card .btn.primary { background: var(--gold-300); color: var(--navy-950); }
.hero-card .btn.primary:hover { background: #f0c95a; }
.card.attention { border-color: #e9cf8b; background: linear-gradient(180deg, var(--gold-50), #fff); }
.card.attention p { margin-bottom: 14px; }
.announcement { display: flex; gap: 20px; border-color: #e9cf8b; background: linear-gradient(135deg, #fff 60%, var(--gold-50)); }
.ann-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--gold-300); color: var(--navy-900); display: grid; place-items: center; flex: none; }
.ann-icon .ico { width: 28px; height: 28px; }
.announcement h2 { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; margin: 4px 0 8px; }
.ann-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.ann-meta span { display: inline-flex; gap: 7px; align-items: center; }
.ann-meta .ico { color: var(--gold); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; text-decoration: none; color: var(--text-2); box-shadow: var(--shadow-1); display: flex; flex-direction: column; }
a.stat:hover { border-color: var(--line-2); box-shadow: var(--shadow-2); }
.stat b { font-family: var(--serif); font-size: 2.1rem; color: var(--navy-800); font-weight: 600; line-height: 1.1; }
.stat span { font-size: .9rem; font-weight: 600; }
.event-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.event-list li + li { border-top: 1px solid var(--line); }
.event-list a { display: flex; align-items: center; gap: 14px; padding: 12px 6px; text-decoration: none; color: var(--text); border-radius: 12px; min-height: 64px; }
.event-list a:hover { background: var(--surface-2); }
.ev-main { flex: 1; min-width: 0; }
.ev-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-main small, .ev-when small { color: var(--muted); display: block; }
.ev-when { text-align: right; flex: none; }
.ev-when b { color: var(--navy-800); }
.today { color: var(--red); }
.day-box { width: 52px; height: 56px; border-radius: 12px; background: var(--navy-800); color: #fff; display: grid; place-content: center; text-align: center; flex: none; line-height: 1.1; }
.day-box b { font-size: 1.3rem; } .day-box small { color: var(--gold-300); font-weight: 700; }
.nudge { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--blue-50); margin-top: 16px; }
.nudge div { flex: 1; min-width: 0; } .nudge small { display: block; color: var(--muted); }
.activity { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.activity li { display: flex; gap: 14px; align-items: center; padding: 12px 0; }
.activity li + li { border-top: 1px solid var(--line); }
.activity li > div { flex: 1; min-width: 0; }
.activity small { color: var(--muted); }
.activity .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold-300); flex: none; box-shadow: 0 0 0 4px var(--gold-50); }

/* ---------- Kartei ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.toolbar.sticky { position: sticky; top: var(--top-h); z-index: 10; background: rgba(245, 242, 235, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); padding: 12px 0; margin-top: 12px; border-bottom: 1px solid var(--line); }
.toolbar .search-input { min-width: 260px; }
.toolbar select { width: auto; min-width: 200px; }
.result-count { font-weight: 600; font-size: .92rem; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.pcard { display: flex; gap: 16px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); box-shadow: var(--shadow-1); transition: box-shadow .15s, border-color .15s, transform .15s; position: relative; }
.pcard:hover { box-shadow: var(--shadow-2); border-color: var(--line-2); transform: translateY(-1px); }
.pcard.dead { background: #fbfaf7; }
.pcard.dead h3 { color: #5b5a55; }
.pcard-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.pcard-top { display: flex; gap: 6px; flex-wrap: wrap; min-height: 4px; }
.pcard h3 { font-size: 1.08rem; line-height: 1.25; }
.pcard h3 span { font-weight: 800; }
.pcard .life { color: var(--text-2); font-size: .92rem; }
.pcard .life small { color: var(--muted); }
.pcard p { display: flex; align-items: center; gap: 7px; font-size: .9rem; }
.pcard .spouse { color: var(--text-2); }
.pcard .spouse .ico { color: var(--gold); }
.pcard .spouse span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-icons { color: var(--blue); margin-top: auto; padding-top: 4px; }
.contact-icons .city { color: var(--muted); margin-left: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.missing { color: var(--warn); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; font-size: .88rem; }
.note-snippet { color: var(--muted); align-items: flex-start !important; }
.note-snippet .ico { color: var(--gold); margin-top: 2px; }
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; box-shadow: var(--shadow-1); }
.tbl { width: 100%; border-collapse: collapse; font-size: .94rem; }
.tbl th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 14px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); position: sticky; top: 0; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.dead td { color: var(--muted); }
.tbl-person { display: flex; gap: 10px; align-items: center; color: var(--text); text-decoration: none; }
.tbl select { min-height: 44px; font-size: .9rem; min-width: 220px; }
.actions-cell { white-space: nowrap; text-align: right; }
.actions-cell .btn + .btn { margin-left: 6px; }
.print-title { display: none; }

/* ---------- Personenseite ---------- */
.crumbs a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; text-decoration: none; }
.profile { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 14px !important; }
.profile-side { position: sticky; top: calc(var(--top-h) + 20px); }
.profile-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 26px 22px; }
.profile-card h1 { font-size: 1.6rem; margin-top: 8px; }
.profile-card h1 span { font-weight: 700; display: block; }
.life-big { font-weight: 600; font-size: 1.04rem; color: var(--text-2); }
.passfoto { position: relative; width: 190px; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: var(--blue-50); box-shadow: 0 0 0 5px #fff, 0 0 0 6px var(--line), var(--shadow-2); }
.passfoto.f { background: var(--red-50); } .passfoto.x { background: var(--gold-50); }
.passfoto img { width: 100%; height: 100%; object-fit: cover; }
.passfoto .initials { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: 3.6rem; color: var(--blue); opacity: .7; }
.passfoto.f .initials { color: var(--red); }
.dead .passfoto img { filter: grayscale(.8); }
.photo-btn { position: absolute; left: 8px; right: 8px; bottom: 8px; min-height: 42px; border: 0; border-radius: 10px; background: rgba(12, 31, 63, .82); color: #fff; font-weight: 600; font-size: .86rem; display: flex; gap: 8px; align-items: center; justify-content: center; cursor: pointer; backdrop-filter: blur(4px); opacity: .92; }
.photo-btn:hover { opacity: 1; background: var(--navy-800); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 6px 0; }
.action-list { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.action-list .btn { justify-content: flex-start; }
.action-list .row .btn { justify-content: center; }
.profile-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.info-card { background: linear-gradient(180deg, var(--gold-50), #fff 70%); border-color: #eedcae; }
.kvs { margin: 0; display: grid; gap: 2px; }
.kvs.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 24px; }
.kv { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start; }
.kv > .ico { grid-row: span 2; color: var(--gold); margin-top: 3px; }
.kv dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; grid-column: 1 / -1; }
.kv > .ico + dt, .kv > .ico ~ dd { grid-column: 2; }
.kv dd { margin: 0; font-size: 1.02rem; grid-column: 1 / -1; overflow-wrap: anywhere; }
.quick-contact { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.missing-box { display: flex; gap: 14px; padding: 16px; background: var(--warn-50); border: 1px solid #f1d9ad; border-radius: 14px; }
.missing-box > .ico { color: var(--warn); width: 28px; height: 28px; }
.missing-box p { margin: 4px 0 12px; color: var(--text-2); }
.fam-block + .fam-block { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.fam-block h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.fam-block > p, .fam-block > .row { margin-top: 10px; }
.mini-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.mini-person { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); text-decoration: none; color: var(--text); min-height: 64px; min-width: 0; }
a.mini-person:hover { border-color: var(--line-2); background: #fff; box-shadow: var(--shadow-1); }
.mini-person > span:not(.avatar) { flex: 1; min-width: 0; }
.mini-person b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-person small { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-person .chev { color: var(--line-2); }
.union-box { border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin-bottom: 12px; }
.union-box.geschieden, .union-box.getrennt { background: repeating-linear-gradient(135deg, #fff, #fff 12px, #faf8f3 12px, #faf8f3 24px); }
.union-head { display: flex; gap: 8px; align-items: center; }
.union-head .mini-person { flex: 1; }
.union-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 2px; color: var(--text-2); font-weight: 600; font-size: .94rem; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
.status-dot.geschieden, .status-dot.getrennt { background: var(--warn); }
.status-dot.verwitwet { background: var(--dead); }
.kids h4 { font-size: .86rem; color: var(--muted); margin: 8px 0; font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 6px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 25px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.timeline li { display: flex; gap: 16px; padding: 8px 0; position: relative; }
.tl-ico { width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 2px solid var(--line); display: grid; place-items: center; color: var(--gold); flex: none; z-index: 1; }
.timeline small { color: var(--muted); }
.history summary { list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer; min-height: 44px; }
.history summary::-webkit-details-marker { display: none; }
.history summary h2 { display: flex; gap: 10px; align-items: center; }
.history summary h2 .ico { color: var(--gold); }
.history[open] summary .chev { transform: rotate(180deg); }
.history + p { margin-top: 12px; }
.danger-zone { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line-2); }

/* ---------- Familienansicht ---------- */
.family-view { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.fam-row { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px; border-radius: 20px; }
.fam-row h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.fam-row.focus-row { background: linear-gradient(180deg, #fff, var(--surface-2)); border: 1px solid var(--line); box-shadow: var(--shadow-1); padding: 26px 18px; }
.fam-cards { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; align-items: center; }
.fam-cards.scroll { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; justify-content: flex-start; padding: 4px; scroll-snap-type: x mandatory; }
.fam-cards.scroll .fcard { scroll-snap-align: start; }
.pair { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; }
.amp { color: var(--gold); }
.gp-pair { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; border: 1px dashed var(--line-2); border-radius: 16px; }
.gp-pair small { color: var(--muted); font-weight: 600; }
.fcard { display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line); text-decoration: none; color: var(--text); min-width: 220px; max-width: 300px; box-shadow: var(--shadow-1); border-top: 4px solid var(--blue); }
.fcard.f { border-top-color: var(--red); } .fcard.x { border-top-color: var(--gold-300); }
.fcard.dead { background: #f7f5f0; }
.fcard.dead b { color: #5d5b56; }
.fcard:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.fcard.sm { min-width: 190px; }
.fcard.focus { padding: 16px 22px 16px 16px; min-width: 300px; border-width: 2px; border-top-width: 5px; box-shadow: 0 0 0 5px var(--gold-50), var(--shadow-2); }
.fcard.focus b { font-size: 1.2rem; font-family: var(--serif); white-space: normal; }
.fc-text { display: flex; flex-direction: column; min-width: 0; }
.fc-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-text small { color: var(--muted); }
.fc-text em { font-style: normal; font-size: .8rem; font-weight: 700; color: #7a5410; }
.fam-union { color: var(--muted); font-size: .9rem; font-weight: 600; }
.fam-connector { width: 2px; height: 26px; background: var(--line-2); }
.partner-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.union-tag { display: inline-flex; gap: 6px; align-items: center; color: var(--gold); }
.union-tag small { color: var(--text-2); font-weight: 600; }
.union-tag.geschieden, .union-tag.getrennt { color: var(--warn); }
.kid-group { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.kid-group + .kid-group { margin-top: 10px; }
.kid-group > small { color: var(--muted); font-weight: 600; }

/* ---------- Stammbaum ---------- */
body.tree-mode { overflow: hidden; }
.tree-page { display: flex; flex-direction: column; height: calc(100vh - var(--top-h)); height: calc(100dvh - var(--top-h)); }
.tree-toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tree-search { flex: 1; max-width: 460px; min-width: 220px; }
.zoom-val { min-width: 58px; text-align: center; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.tree-stage { position: relative; flex: 1; overflow: hidden; background-color: #f3efe6; background-image: radial-gradient(rgba(16,40,77,.07) 1px, transparent 1px); background-size: 24px 24px; }
.tree-svg { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.tree-svg.grabbing { cursor: grabbing; }
.tree-svg .viewport { transform-origin: 0 0; will-change: transform; }
.tree-svg .link { fill: none; stroke: #8993a3; stroke-width: 2; }
.tree-svg .link-adopt { stroke-dasharray: 6 5; }
.tree-svg .link-step { stroke: #a39e93; }
.tree-svg .couple.bracket { stroke-width: 2.4; }
.tree-svg .couple { fill: none; stroke: var(--gold); stroke-width: 3; }
.tree-svg .couple.ex { stroke: #b9a98a; stroke-dasharray: 7 6; }
.tree-svg .couple.partner { stroke-dasharray: 2 5; stroke-linecap: round; }
.tree-svg .rings circle { fill: #fff; stroke: var(--gold); stroke-width: 2.2; }
.tree-svg .rings.geschieden circle { stroke: #b9a98a; }
.tree-svg .rings line { stroke: var(--red); stroke-width: 2.2; stroke-linecap: round; }
.tree-svg .rings.partner circle { stroke-dasharray: 2 2.5; }
.tree-svg .date-pill { fill: #fff; stroke: #e2cf9c; }
.tree-svg .date-pill.ex { stroke: #d8cdb8; fill: #faf8f3; }
.tree-svg .date-pill-text { font: 600 11.5px var(--sans); fill: #6b4b0d; text-anchor: middle; }
.tree-svg .tree-label { font: 700 20px var(--serif); fill: var(--navy-800); }
.tree-svg .card { cursor: pointer; }
.tree-svg .card-bg { fill: #fff; filter: drop-shadow(0 2px 3px rgba(16,40,77,.10)); }
.tree-svg .card-frame { fill: none; stroke: #d7d0c1; stroke-width: 1.2; transition: stroke .15s, stroke-width .15s; }
.tree-svg .card-accent { fill: var(--blue); }
.tree-svg .card.f .card-accent { fill: var(--red); }
.tree-svg .card.x .card-accent { fill: var(--gold-300); }
.tree-svg .card:hover .card-frame, .tree-svg .card:focus .card-frame { stroke: var(--navy-700); stroke-width: 2; }
.tree-svg .card:focus { outline: none; }
.tree-svg .card.dead .card-bg { fill: #f4f1ea; }
.tree-svg .card.dead .card-accent { opacity: .45; }
.tree-svg .card.dead image { filter: grayscale(.85); }
.tree-svg .card.ref .card-bg { fill: #fbfaf6; }
.tree-svg .card.ref .card-frame { stroke-dasharray: 5 4; }
.tree-svg .card.me .card-frame { stroke: var(--gold-400); stroke-width: 3; }
.tree-svg .card.sel .card-frame, .tree-svg .card.hl .card-frame { stroke: var(--navy-800); stroke-width: 3.5; }
.tree-svg .card.hl .card-frame { animation: hl 1.4s ease-in-out 3; }
@keyframes hl { 50% { stroke: var(--gold-300); stroke-width: 6; } }
.tree-svg .avatar { fill: var(--blue-50); }
.tree-svg .card.f .avatar { fill: var(--red-50); }
.tree-svg .card.dead .avatar { fill: #e9e5dc; }
.tree-svg .avatar-text { font: 700 18px var(--sans); fill: var(--blue); text-anchor: middle; }
.tree-svg .card.f .avatar-text { fill: var(--red); }
.tree-svg .card.dead .avatar-text { fill: var(--dead); }
.tree-svg .photo-frame { fill: none; stroke: rgba(0,0,0,.08); }
.tree-svg .name { font: 700 14px var(--sans); fill: var(--navy-800); }
.tree-svg .name2 { font: 800 14px var(--sans); fill: var(--navy-800); }
.tree-svg .card.dead .name, .tree-svg .card.dead .name2 { fill: #56544f; }
.tree-svg .dates { font: 500 12.5px var(--sans); fill: #5d6577; }
.tree-svg .ref-hint { font: 600 10.5px var(--sans); fill: var(--muted); text-anchor: end; }
.tree-svg .acct-dot { fill: var(--ok); stroke: #fff; stroke-width: 2; }
.tree-legend { position: absolute; left: 16px; bottom: 16px; display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 14px; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 12px; font-size: .8rem; font-weight: 600; color: var(--text-2); box-shadow: var(--shadow-1); max-width: calc(100% - 32px); }
.tree-legend span { display: inline-flex; gap: 6px; align-items: center; }
.tree-legend i { width: 18px; height: 12px; border-radius: 3px; display: inline-block; }
.lg-m { background: #fff; border-top: 4px solid var(--blue); box-shadow: inset 0 0 0 1px #d7d0c1; }
.lg-f { background: #fff; border-top: 4px solid var(--red); box-shadow: inset 0 0 0 1px #d7d0c1; }
.lg-dead { background: #f4f1ea; box-shadow: inset 0 0 0 1px #d7d0c1; }
.lg-ring { height: 3px !important; background: var(--gold); }
.lg-ex { height: 0 !important; border-top: 3px dashed #b9a98a; }
.tree-hint { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; background: rgba(16,40,77,.88); color: #fff; padding: 8px 16px; border-radius: 999px; font-size: .82rem; pointer-events: none; white-space: nowrap; animation: fadeout 1s ease 7s forwards; }
@keyframes fadeout { to { opacity: 0; visibility: hidden; } }
.tree-panel { position: absolute; top: 16px; right: 16px; width: 340px; max-height: calc(100% - 32px); overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-3); padding: 20px; display: flex; flex-direction: column; gap: 14px; animation: slidein .2s ease; }
@keyframes slidein { from { transform: translateX(12px); opacity: 0; } }
.tree-panel .close { position: absolute; top: 10px; right: 10px; }
.tp-head { display: flex; gap: 14px; align-items: flex-start; padding-right: 30px; }
.tp-head h2 { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; }
.tp-head p { color: var(--text-2); margin: 4px 0 8px; font-size: .92rem; }
.tp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tp-list li { display: flex; gap: 10px; }
.tp-list .ico { color: var(--gold); margin-top: 2px; }
.tp-list small { display: block; color: var(--muted); }
.tp-actions { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Geburtstage ---------- */
.bd-out { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 18px; align-items: start; }
.card.month h2 { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; margin-bottom: 8px; }

/* ---------- Wappen ---------- */
.wappen-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 36px; align-items: center; padding: 32px; background: radial-gradient(600px 400px at 25% 40%, #fff 0%, var(--surface-2) 70%); }
.wappen-art img { width: 100%; max-width: 420px; margin: 0 auto; filter: drop-shadow(0 14px 24px rgba(16,40,77,.18)); }
.wappen-text { display: flex; flex-direction: column; gap: 14px; }
.wappen-text h2 { font-family: var(--serif); font-size: 1.55rem; font-weight: 600; line-height: 1.3; }
.figure { margin: 0; padding: 12px; }
.figure img { border-radius: 10px; width: 100%; height: 380px; object-fit: contain; background: #f4efe4; }
.figure figcaption { padding: 10px 6px 2px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.lineage { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; position: relative; }
.lineage::before { content: ""; position: absolute; left: 21px; top: 20px; bottom: 20px; width: 2px; background: linear-gradient(var(--gold-300), var(--navy-800)); }
.lineage li { display: flex; align-items: center; gap: 16px; padding: 8px 0; flex-wrap: wrap; }
.gen-no { width: 44px; height: 44px; border-radius: 50%; background: var(--navy-800); color: var(--gold-300); font-weight: 800; display: grid; place-items: center; z-index: 1; flex: none; box-shadow: 0 0 0 4px var(--bg); }
.lineage a { text-decoration: none; color: var(--text); min-width: 220px; }
.lineage a b { display: block; }
.lineage a small { color: var(--muted); }
.lin-sp { color: var(--text-2); font-size: .92rem; display: inline-flex; gap: 6px; align-items: center; }
.lin-sp .ico { color: var(--gold); }

/* ---------- Konto & Admin ---------- */
.plain-list { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 10px; }
.plain-list li { display: flex; gap: 10px; align-items: flex-start; }
.plain-list .ico { color: var(--ok); margin-top: 2px; }
.page-tabs { margin: 18px 0 0 !important; overflow-x: auto; }
.page-tabs [role=tab] { flex: 0 0 auto; padding: 14px 18px; }
.admin-out { margin-top: 20px; display: flex; flex-direction: column; gap: 18px; }
.menu-list { display: flex; flex-direction: column; gap: 6px; }
.menu-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: #fff; text-align: left; cursor: pointer; text-decoration: none; color: var(--text); min-height: 60px; }
.menu-item:hover { background: var(--blue-50); border-color: var(--blue-100); }
.menu-item > .ico { color: var(--navy-700); }
.menu-item small { display: block; color: var(--muted); }
.menu-item.danger, .menu-item.danger > .ico { color: var(--err); }

/* ---------- Dialoge ---------- */
body.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; inset: 0; z-index: 200; background: rgba(8, 22, 48, .5); display: grid; place-items: center; padding: 24px; opacity: 0; transition: opacity .2s; backdrop-filter: blur(2px); }
.modal-backdrop.in { opacity: 1; }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); display: flex; flex-direction: column; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-3); transform: translateY(12px) scale(.98); transition: transform .2s; }
.modal-backdrop.in .modal { transform: none; }
.modal.sm { max-width: 460px; } .modal.lg { max-width: 780px; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 24px 14px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; }
.modal-head p { margin-top: 4px; }
.modal-body { padding: 20px 24px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 22px 22px; flex-wrap: wrap; }
.picker { display: flex; flex-direction: column; gap: 14px; }
.picker-results { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; max-height: 300px; overflow-y: auto; }
.pick-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; text-align: left; min-height: 60px; }
.pick-row > span:not(.avatar) { flex: 1; } .pick-row small { display: block; color: var(--muted); }
.pick-row.sel { border-color: var(--navy-800); background: var(--blue-50); }
.pick-row.sel > .ico { color: var(--navy-800); }
.cropper { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.crop-stage { position: relative; width: 240px; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-2); background: #eee; touch-action: none; }
.crop-stage canvas { width: 100%; height: 100%; cursor: move; touch-action: none; }
.crop-guide { position: absolute; inset: 12% 18% 28%; border: 2px dashed rgba(255,255,255,.85); border-radius: 50% / 45%; pointer-events: none; box-shadow: 0 0 0 999px rgba(0,0,0,.08); }
.zoom-row { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 320px; color: var(--muted); }
.zoom-row input { flex: 1; accent-color: var(--navy-800); height: 32px; }
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 520px); }
.toast { display: flex; gap: 10px; align-items: center; padding: 14px 18px; border-radius: 14px; background: var(--navy-900); color: #fff; font-weight: 600; box-shadow: var(--shadow-3); opacity: 0; transform: translateY(10px); transition: .25s; }
.toast.in { opacity: 1; transform: none; }
.toast .ico { color: #7ed3a0; }
.toast.error { background: var(--err); }
.toast.error .ico { color: #fff; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(8,22,48,.45); opacity: 0; transition: opacity .2s; display: flex; align-items: flex-end; }
.sheet-backdrop.in { opacity: 1; }
.sheet { width: 100%; background: var(--bg); border-radius: 22px 22px 0 0; padding: 10px 16px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; transform: translateY(40px); transition: transform .22s; max-height: 85vh; overflow-y: auto; }
.sheet-backdrop.in .sheet { transform: none; }
.sheet-grip { width: 48px; height: 5px; border-radius: 5px; background: var(--line-2); margin: 4px auto 8px; }

/* ==========================================================================
   Tablet (Hochformat) und Smartphone
   ========================================================================== */
@media (max-width: 1180px) {
  :root { --side-w: 0px; }
  .sidebar { display: none; }
  .main-col { margin-left: 0; padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); }
  .mobile-only { display: flex !important; }
  .desktop-only { display: none !important; }
  .topbar { padding: 0 20px; }
  .topbar .brand img { width: 34px; }
  .topbar .brand b { font-size: 1.05rem; }
  .global-search { display: flex; justify-content: flex-end; max-width: none; }
  .gs-box { width: 100%; max-width: 420px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255,255,255,.96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); box-shadow: 0 -4px 20px rgba(16,40,77,.06); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: .78rem; font-weight: 700; background: none; border: 0; cursor: pointer; position: relative; }
  .tabbar .ico { width: 26px; height: 26px; }
  .tabbar a.active { color: var(--navy-800); }
  .tabbar a.active::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--gold-300); }
  .tree-page { height: calc(100vh - var(--top-h) - var(--tab-h)); height: calc(100dvh - var(--top-h) - var(--tab-h) - env(safe-area-inset-bottom)); }
  #view { padding: 24px 20px 48px; }
}
@media (max-width: 1180px) and (min-width: 721px) {
  .global-search [data-opensearch] { display: none !important; }
}
@media (max-width: 980px) {
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 32px 24px 26px; }
  .auth-hero-inner { display: grid; grid-template-columns: 92px 1fr; column-gap: 18px; row-gap: 4px; text-align: left; align-items: center; margin: 0; }
  .auth-wappen { width: 92px; margin: 0; grid-row: span 2; }
  .auth-hero-inner h1 { align-self: end; }
  .auth-sub { align-self: start; font-size: .74rem; }
  .auth-hero h1 { font-size: 1.8rem; }
  .auth-points, .auth-secure { display: none; }
  .auth-main { justify-content: flex-start; padding: 24px 16px 40px; }
  .profile { grid-template-columns: 1fr; }
  .profile-side { position: static; }
  .grid-2 { grid-template-columns: 1fr; }
  .wappen-hero { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  :root { --top-h: 64px; --tab-h: 70px; }
  html { font-size: 106.25%; }
  #view { padding: 18px 16px 40px; }
  .view > * + * { margin-top: 16px; }
  .topbar { gap: 8px; padding: 0 12px 0 16px; }
  .topbar .brand span { display: none; }
  .gs-box { display: none; }
  body.search-open .gs-box { display: flex; position: fixed; top: 8px; left: 12px; right: 12px; max-width: none; z-index: 60; }
  body.search-open .gs-box input { box-shadow: var(--shadow-3); }
  .top-user { margin-left: 0; }
  .card { padding: 18px 16px; border-radius: 14px; }
  .hero-card { flex-direction: column; align-items: flex-start; padding: 24px 20px; gap: 16px; border-radius: 18px; }
  .hero-wappen { width: 72px; position: absolute; right: 18px; top: 18px; opacity: .95; }
  .hero-text h1, .hero-text .eyebrow { padding-right: 84px; }
  .hero-text .btn { flex: 1 1 100%; }
  .stats { gap: 10px; }
  .stat { padding: 14px; }
  .stat b { font-size: 1.7rem; }
  .form-grid { grid-template-columns: 1fr; }
  .kvs.two { grid-template-columns: 1fr; }
  .page-head { align-items: stretch; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .toolbar .search-input { min-width: 0; width: 100%; flex-basis: 100%; }
  .toolbar.sticky { top: var(--top-h); margin-left: -16px; margin-right: -16px; padding: 10px 16px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 2px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .toolbar .row { width: 100%; }
  .toolbar select { flex: 1; min-width: 0; }
  .segmented.small em { display: none; }
  .pgrid { grid-template-columns: 1fr; gap: 12px; }
  .avatar.portrait { width: 72px; height: 96px; }
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr { padding: 12px 14px; border-bottom: 1px solid var(--line); position: relative; }
  .tbl td { border: 0; padding: 4px 0; }
  .tbl td[data-label]::before { content: attr(data-label); display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
  .tbl td.no-print { position: absolute; top: 8px; right: 8px; width: auto; }
  .tbl select { min-width: 0; }
  .actions-cell { text-align: left; }
  .passfoto { width: 160px; }
  .mini-list { grid-template-columns: 1fr; }
  .fcard, .fcard.focus, .fcard.sm { min-width: 0; width: 100%; max-width: none; }
  .fam-cards:not(.scroll) { flex-direction: column; width: 100%; align-items: stretch; }
  .fam-cards.scroll .fcard { min-width: 240px; width: auto; }
  .pair { flex-direction: column; width: 100%; align-items: stretch; }
  .amp { align-self: center; }
  .gp-pair { width: 100%; }
  .fam-row { padding: 12px 0; }
  .fam-row.focus-row { padding: 18px 14px; }
  .partner-wrap { width: 100%; }
  .tree-toolbar { padding: 10px 12px; gap: 8px; }
  .tree-search { max-width: none; flex-basis: 100%; }
  .tree-btns { width: 100%; justify-content: space-between; }
  .tree-btns .btn span { display: none; }
  .tree-btns .btn { padding: 0 12px; }
  .zoom-val { min-width: 48px; font-size: .9rem; }
  .tree-legend { font-size: .72rem; left: 10px; bottom: 10px; right: 10px; padding: 8px 10px; }
  .tree-hint, .tree-legend { display: none; }
  .tree-panel { top: auto; bottom: 0; left: 0; right: 0; width: auto; border-radius: 20px 20px 0 0; max-height: 70%; animation: slideup .22s ease; }
  @keyframes slideup { from { transform: translateY(24px); opacity: 0; } }
  .bd-out { grid-template-columns: 1fr; }
  .figure img { height: 260px; }
  .wappen-hero { padding: 20px; gap: 20px; }
  .modal-backdrop { padding: 0; place-items: end stretch; }
  .modal, .modal.sm, .modal.lg { max-width: none; border-radius: 22px 22px 0 0; max-height: 94vh; max-height: 94dvh; }
  .modal-head { padding: 18px 18px 12px; }
  .modal-body { padding: 16px 18px; }
  .modal-foot { padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); border-radius: 0; }
  .modal-foot .btn { flex: 1; }
  .segmented { display: flex; }
  .segmented label { flex: 1 1 auto; }
  .segmented span { justify-content: center; width: 100%; }
  .auth-card { padding: 6px 18px 24px; border-radius: 18px; }
  .steps li { font-size: .72rem; }
  .announcement { flex-direction: column; gap: 12px; }
  #toasts { bottom: calc(var(--tab-h) + 16px + env(safe-area-inset-bottom)); }
  .event-list a { gap: 10px; }
  .ev-when { max-width: 42%; }
}
@media (hover: none) { .pcard:hover, .fcard:hover { transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ==========================================================================
   Druck
   ========================================================================== */
.print-only { display: none; }
@media print {
  @page { margin: 14mm; }
  body { background: #fff; }
  .sidebar, .topbar, .tabbar, .toolbar, .page-head .page-actions, .no-print, .crumbs, #toasts, .tree-toolbar, .tree-legend, .tree-hint, .tree-panel, .profile-side .action-list, .photo-btn, .danger-zone, .result-count { display: none !important; }
  .main-col { margin: 0; padding: 0; }
  #view { padding: 0; max-width: none; }
  .card, .table-wrap, .pcard, .stat { box-shadow: none; break-inside: avoid; }
  .print-title { display: flex; gap: 14px; align-items: center; padding: 0 0 12px; }
  .print-title img { width: 40px; }
  .tbl { font-size: 10pt; }
  .tbl th { position: static; }
  .tbl td, .tbl th { padding: 6px 8px; }
  a { color: inherit; text-decoration: none; }
  body.printing-tree > :not(.print-tree) { display: none !important; }
  body.printing-tree .print-tree { display: block; }
  .print-svg { width: 100%; height: auto; }
}

/* Patchwork / Wohnsitz */
.lives-with { display: flex; align-items: center; gap: 7px; font-size: .88rem; color: var(--blue-600); font-weight: 600; }
.lives-with .ico { color: var(--blue); }
.lives-with.big { font-size: .98rem; padding: 10px 14px; background: var(--blue-50); border-radius: 12px; margin-bottom: 8px; }
.kids.step { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.step-kids { border: 1px dashed var(--line-2); }

/* ==========================================================================
   Anlässe
   ========================================================================== */
.date-box { display: grid; place-content: center; text-align: center; width: 76px; height: 84px; flex: none; border-radius: 14px; background: var(--navy-800); color: #fff; line-height: 1.05; box-shadow: var(--shadow-1); }
.date-box b { font-family: var(--serif); font-size: 2rem; font-weight: 600; }
.date-box small { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-300); }
.date-box small:last-child { color: #b9c5d8; letter-spacing: .02em; }
.date-box.past { background: #8b93a1; }
.date-box.past small { color: #eef1f4; }
.date-box.lg { width: 96px; height: 106px; }
.date-box.lg b { font-size: 2.6rem; }
.ev-list { display: flex; flex-direction: column; gap: 14px; }
.ev-card { display: flex; gap: 20px; align-items: center; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); box-shadow: var(--shadow-1); transition: box-shadow .15s, border-color .15s; }
.ev-card:hover { box-shadow: var(--shadow-2); border-color: var(--line-2); }
.ev-card.past { opacity: .82; }
.ev-card > .chev { color: var(--line-2); }
.ev-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ev-top { display: flex; gap: 6px; flex-wrap: wrap; }
.ev-card h2 { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.ev-meta { display: flex; gap: 8px; align-items: flex-start; color: var(--text-2); font-size: .95rem; }
.ev-meta .ico { color: var(--gold); margin-top: 2px; }
.ev-stats { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: .88rem; color: var(--muted); font-weight: 600; }
.ev-stats b { color: var(--ok); }
.next-ev { display: flex; gap: 16px; align-items: center; text-decoration: none; color: var(--text); padding: 6px; border-radius: 14px; }
.next-ev:hover { background: var(--surface-2); }
.next-ev > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.next-ev b { font-size: 1.15rem; font-family: var(--serif); }
.next-ev small { color: var(--muted); }
.next-ev .chev { color: var(--line-2); }
.ok-text { color: var(--ok) !important; font-weight: 700; }
.warn-text { color: var(--warn) !important; font-weight: 700; }
.ev-hero-main { display: flex; gap: 24px; align-items: flex-start; }
.ev-hero-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ev-hero h1 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); }
.ev-desc { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--text-2); }
.ev-actions { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.my-rsvp { border-width: 2px; }
.my-rsvp.offen { border-color: #e9cf8b; background: linear-gradient(180deg, var(--gold-50), #fff); }
.my-rsvp.ja { border-color: #bfe0cb; background: linear-gradient(180deg, var(--ok-50), #fff); }
.stat.big-ok b { color: var(--ok); }
.table-wrap.flat { box-shadow: none; }
.rsvp-tbl td.num, .rsvp-tbl th.num { text-align: center; width: 70px; }
.rsvp-tbl tr.grp th { background: var(--surface-2); color: var(--navy-800); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; padding: 12px 16px; position: static; border-top: 1px solid var(--line); }
.rsvp-tbl tr.grp.ja th { color: var(--ok); background: var(--ok-50); }
.rsvp-tbl tr.grp.nein th { color: var(--err); background: var(--err-50); }
.rsvp-tbl tr.grp.offen th { color: var(--warn); background: var(--warn-50); }
.rsvp-tbl tfoot td { background: var(--surface-2); border-top: 2px solid var(--line-2); padding: 14px 16px; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper input { width: 90px; text-align: center; font-size: 1.3rem; font-weight: 700; }
.stepper .icon-btn { font-size: 1.6rem; font-weight: 700; }
.stepper.big .icon-btn { width: 56px; height: 56px; }
.recip { display: flex; flex-direction: column; gap: 14px; }
.recip-sel { display: flex; flex-direction: column; gap: 10px; }
.recip-tools .search-input { min-width: 200px; }
.recip-list { max-height: 360px; overflow-y: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.recip-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; min-height: 58px; }
.recip-row:last-child { border-bottom: 0; }
.recip-row:hover { background: var(--surface-2); }
.recip-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.recip-row .box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line-2); display: grid; place-items: center; color: transparent; flex: none; }
.recip-row input:checked + .box { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.recip-row input:focus-visible + .box { box-shadow: var(--focus); }
.rr-name { flex: 1; min-width: 0; }
.rr-name small { display: block; color: var(--muted); }
.rr-mail { color: var(--blue); }
.rr-mail.none { color: var(--line-2); font-weight: 700; }
.recip-count { padding: 12px 14px; background: var(--blue-50); border-radius: 12px; }
.sub-h { font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 8px; }
.guests { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.guest-list { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.form-actions { padding-bottom: 12px; }
.ev-form .card > .check { margin: 4px 0 14px; }
.ev-form .notice { margin-bottom: 14px; }

/* Öffentliche Rückmeldeseite */
body.rsvp-mode { background: radial-gradient(900px 400px at 50% -80px, #1d4a8a 0%, var(--navy-900) 55%) no-repeat, var(--bg); background-size: 100% 380px, auto; min-height: 100vh; }
.rsvp { max-width: 620px; margin: 0 auto; padding: 28px 16px 40px; }
.rsvp-head { display: flex; gap: 12px; align-items: center; color: #fff; margin-bottom: 20px; }
.rsvp-head img { filter: drop-shadow(0 4px 8px rgba(0,0,0,.35)); }
.rsvp-head b { display: block; font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.rsvp-head small { color: var(--gold-300); text-transform: uppercase; letter-spacing: .12em; font-weight: 700; font-size: .74rem; }
.rsvp-card { background: #fff; border-radius: 22px; padding: 28px; box-shadow: var(--shadow-3); display: flex; flex-direction: column; gap: 16px; }
.rsvp-card h1 { font-size: clamp(1.7rem, 5vw, 2.2rem); }
.rsvp-greet { font-size: 1.1rem; }
.rsvp-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.rsvp-facts li { display: flex; gap: 10px; align-items: flex-start; font-size: 1.02rem; }
.rsvp-facts .ico { color: var(--gold); margin-top: 3px; }
.rsvp-desc { color: var(--text-2); padding: 14px 16px; background: var(--surface-2); border-radius: 14px; }
.rsvp-q { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; margin-top: 6px; }
.rsvp-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rsvp-choice label { position: relative; }
.rsvp-choice input { position: absolute; opacity: 0; }
.rsvp-choice span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 104px; padding: 14px; border: 2px solid var(--line-2); border-radius: 16px; font-weight: 700; font-size: 1.05rem; text-align: center; cursor: pointer; background: #fff; }
.rsvp-choice .ico { width: 30px; height: 30px; }
.rsvp-choice .yes input:checked + span { border-color: var(--ok); background: var(--ok-50); color: var(--ok); box-shadow: 0 0 0 4px rgba(44,122,75,.15); }
.rsvp-choice .no input:checked + span { border-color: var(--err); background: var(--err-50); color: var(--err); box-shadow: 0 0 0 4px rgba(180,35,24,.12); }
.rsvp-choice input:focus-visible + span { box-shadow: var(--focus); }
.rsvp-done { display: flex; gap: 16px; align-items: center; padding: 18px; border-radius: 16px; }
.rsvp-done.yes { background: var(--ok-50); color: var(--ok); }
.rsvp-done.no { background: var(--surface-2); color: var(--text-2); }
.rsvp-done h2 { color: inherit; font-size: 1.25rem; }
.rsvp-done p { color: var(--text-2); margin-top: 4px; }
.rsvp-badge { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #fff; flex: none; }
.rsvp-badge .ico { width: 30px; height: 30px; }
.rsvp-foot { text-align: center; color: var(--muted); font-size: .82rem; margin-top: 18px; }
.rsvp-form .form-error[hidden] { display: none !important; }

@media (max-width: 720px) {
  .ev-card { gap: 14px; padding: 14px; align-items: flex-start; }
  .date-box { width: 62px; height: 70px; }
  .date-box b { font-size: 1.6rem; }
  .ev-card > .chev { display: none; }
  .ev-hero-main { gap: 16px; }
  .date-box.lg { width: 70px; height: 80px; }
  .date-box.lg b { font-size: 1.9rem; }
  .rsvp-card { padding: 20px 18px; }
  .rsvp-choice span { min-height: 92px; font-size: .98rem; }
  .ev-actions .btn { flex: 1 1 auto; }
  .rsvp-tbl tr.grp { padding: 0; }
  .rsvp-tbl tr.grp th { display: block; }
  .rsvp-tbl tfoot td { display: block; }
}
@media print {
  .ev-hero { border: 0; padding: 0; }
  .ev-hero .date-box { background: #fff; color: #000; border: 2px solid #000; box-shadow: none; }
  .ev-hero .date-box small { color: #000; }
  .ev-sum .stat { border: 1px solid #999; }
  .rsvp-tbl tr.grp th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .my-rsvp { display: none !important; }
  body.print-yes-only .g-offen, body.print-yes-only .g-nein, body.print-yes-only .ev-sum, body.print-yes-only .ev-desc { display: none !important; }
}

/* ==========================================================================
   Fotoalbum
   ========================================================================== */
.album.drag { outline: 3px dashed var(--gold-400); outline-offset: -6px; background: var(--gold-50); }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.album-tile { position: relative; aspect-ratio: 1; border: 0; padding: 0; border-radius: 10px; overflow: hidden; background: #ece7dc; cursor: zoom-in; }
.album-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.album-tile:hover img { transform: scale(1.04); }
.album-tile .heic { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; color: var(--muted); font-weight: 700; }
.album-empty { display: flex; gap: 16px; align-items: center; padding: 22px; border: 2px dashed var(--line-2); border-radius: 16px; color: var(--text-2); cursor: pointer; background: var(--surface-2); }
.album-empty > .ico { width: 40px; height: 40px; color: var(--gold); }
.album-empty:hover { border-color: var(--gold-400); }
.up-progress { padding: 12px 14px; background: var(--blue-50); border-radius: 12px; margin-bottom: 14px; }
.up-progress .up-text { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.up-progress .progress { margin: 10px 0 0; }
.ev-photos { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.ev-photos img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.ev-photos small { display: inline-flex; gap: 5px; align-items: center; margin-left: 6px; color: var(--muted); font-weight: 600; }
.lightbox { position: fixed; inset: 0; z-index: 150; background: #070d1a; display: flex; flex-direction: column; color: #fff; animation: fadein .15s ease; }
@keyframes fadein { from { opacity: 0; } }
.lb-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); }
.lb-count { font-weight: 700; color: #c7d3e6; }
.lb-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; font-weight: 600; cursor: pointer; text-decoration: none; }
.lb-btn:hover { background: rgba(255,255,255,.16); }
.lb-stage { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; touch-action: pan-y; user-select: none; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; -webkit-user-drag: none; }
.lb-heic { text-align: center; color: #c7d3e6; display: grid; justify-items: center; gap: 10px; }
.lb-heic .ico { width: 48px; height: 48px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 56px; height: 56px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lb-nav:hover { background: rgba(255,255,255,.26); }
.lb-nav .ico { width: 28px; height: 28px; }
.lb-nav.prev { left: 16px; } .lb-nav.next { right: 16px; }
.lb-info { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); text-align: center; display: flex; flex-direction: column; gap: 4px; }
.lb-info small { color: #9fb0c8; }
@media (max-width: 720px) {
  .album-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .album-tile { border-radius: 6px; }
  .lb-btn span { display: none; }
  .lb-btn { padding: 0 12px; }
  .lb-nav { width: 44px; height: 44px; background: rgba(0,0,0,.35); }
  .lb-nav.prev { left: 6px; } .lb-nav.next { right: 6px; }
  .album .card-head { flex-wrap: wrap; }
}

/* Stammbaum: Auf-/Zuklappen, Generationen, Druck */
.tree-svg .toggle { cursor: pointer; }
.tree-svg .toggle-bg { fill: #fff; stroke: var(--gold); stroke-width: 1.6; }
.tree-svg .toggle.open .toggle-bg { fill: var(--gold-50); stroke: #d9b660; }
.tree-svg .toggle:hover .toggle-bg, .tree-svg .toggle:focus .toggle-bg { fill: var(--gold-300); stroke: var(--gold); }
.tree-svg .toggle:focus { outline: none; }
.tree-svg .toggle-text { font: 700 12.5px var(--sans); fill: #6b4b0d; text-anchor: middle; }
.tree-svg .toggle-minus { stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; }
.tree-svg .toggle-stem { stroke-dasharray: 3 4; }
.tree-svg .gen-pill { fill: var(--navy-800); opacity: .9; }
.tree-svg .gen-text { font: 700 12px var(--sans); fill: var(--gold-300); text-anchor: middle; letter-spacing: .04em; }
.tree-modes em { font-style: normal; }
.lg-plus { width: 18px !important; height: 18px !important; border-radius: 50% !important; border: 1.6px solid #d9b660; background: var(--gold-50); color: #6b4b0d; font-style: normal; font-size: 12px; line-height: 15px; text-align: center; font-weight: 800; }
@media (max-width: 1180px) { .tree-modes em { display: none; } }
@media print {
  .print-tree { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-tree .print-title { display: flex; }
  .print-svg { display: block; width: 100%; height: auto; }
  .print-svg .toggle.close { display: none; }
}
@media (max-width: 720px) { .tree-modes { width: 100%; } }
.link-btn svg { width: 16px; height: 16px; flex: none; }
.kids.step .link-btn { margin-top: 6px; }

/* ================================================================== Hinweisbox */
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--blue-50); border: 1px solid #d5e1f2; border-radius: var(--radius-sm); color: var(--navy-800); line-height: 1.5; }
.note svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--blue-600); }
.note a { font-weight: 700; }

/* ================================================================== Fotoalbum */
.alb-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.alb-sum, .alb-meta { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text-2); }
.alb-sum svg, .alb-meta svg { width: 20px; height: 20px; color: var(--gold); flex: none; }
.alb-order .segmented { width: auto; }
.alb-year + .alb-year { margin-top: 30px; }
.alb-year h2 { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; font: 700 1.6rem/1.2 var(--serif); color: var(--navy-800); margin: 0 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--gold-300); }
.alb-year h2 small { font: 600 .9rem var(--sans); color: var(--muted); }
.alb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.alb-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text); box-shadow: var(--shadow-1); transition: box-shadow .15s, transform .15s, border-color .15s; }
.alb-card:hover, .alb-card:focus-visible { box-shadow: var(--shadow-2); transform: translateY(-2px); border-color: var(--line-2); }
.alb-cover { position: relative; aspect-ratio: 4 / 3; background: #ece7dc; display: grid; gap: 2px; overflow: hidden; }
.alb-cover img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 0; }
.alb-cover.c1 { grid-template-columns: 1fr; }
.alb-cover.c2 { grid-template-columns: 1fr 1fr; }
.alb-cover.c3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.alb-cover.c3 img:first-child { grid-row: span 2; }
.alb-cover.c4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.alb-noimg { display: grid; place-content: center; color: var(--muted); }
.alb-noimg svg { width: 42px; height: 42px; }
.alb-count { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; background: rgba(16, 40, 77, .86); color: #fff; font-weight: 700; font-size: .9rem; }
.alb-count svg { width: 16px; height: 16px; }
.alb-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 5px; }
.alb-body h3 { margin: 0 0 3px; font: 700 1.15rem/1.3 var(--serif); color: var(--navy-800); }
.alb-body p { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--text-2); font-size: .95rem; }
.alb-body p svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.alb-meta { margin-bottom: 16px; }
.alb-day { display: flex; align-items: baseline; gap: 10px; font: 700 1.1rem var(--serif); color: var(--navy-800); margin: 22px 0 10px; }
.alb-day:first-of-type { margin-top: 0; }
.alb-day small { font: 600 .85rem var(--sans); color: var(--muted); }
.album-tile .tile-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; background: linear-gradient(transparent, rgba(0,0,0,.6)); color: #fff; font-size: .78rem; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 720px) {
  .alb-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .alb-body { padding: 10px 12px 12px; }
  .alb-body h3 { font-size: 1rem; }
  .alb-body p { font-size: .85rem; }
  .alb-year h2 { font-size: 1.3rem; }
  .alb-order, .alb-order .segmented { width: 100%; }
}
@media (max-width: 380px) { .alb-grid { grid-template-columns: 1fr; } }
.alb-list > * + * { margin-top: 22px; }
.alb-toolbar + .alb-year { margin-top: 18px; }
@media (max-width: 720px) {
  .alb-order .segmented { flex-wrap: nowrap; }
  .alb-order .segmented label { flex: 1 1 0; min-width: 0; }
  .alb-order .segmented span { padding: 0 8px; font-size: .88rem; white-space: nowrap; }
}

/* ================================================================== Todesfälle (ruhig, gedämpft) */
.avatar.lg { width: 72px; height: 72px; font-size: 1.15rem; }
.dn-list { display: flex; flex-direction: column; gap: 14px; }
.dn-card { display: flex; gap: 18px; align-items: center; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid #4a4f5a; border-radius: var(--radius); text-decoration: none; color: var(--text); box-shadow: var(--shadow-1); transition: box-shadow .15s, border-color .15s; }
.dn-card:hover, .dn-card:focus-visible { box-shadow: var(--shadow-2); }
.dn-card .chev { margin-left: auto; color: var(--muted); flex: none; }
.dn-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dn-body h2 { margin: 0; font: 700 1.3rem/1.25 var(--serif); color: #2b2f38; }
.dn-life { margin: 0; color: var(--text-2); font-size: 1rem; }
.dn-meta { display: flex; gap: 7px; align-items: center; margin: 0; color: var(--text-2); font-size: .95rem; }
.dn-meta svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.dn-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.dn-badges .badge svg { width: 14px; height: 14px; margin-right: 4px; }
.dn-hero { display: flex; gap: 26px; align-items: center; border-top: 4px solid #4a4f5a; background: linear-gradient(180deg, #f7f6f3, var(--surface) 60%); }
.dn-hero-photo .avatar.portrait { width: 120px; height: 160px; font-size: 2rem; }
.dn-hero-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dn-hero-text h1 { margin: 0; font: 700 2rem/1.15 var(--serif); color: #2b2f38; }
.dn-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: .8rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #6b6f78; }
.dn-kicker svg { width: 18px; height: 18px; }
.dn-life-big { margin: 2px 0 0; font-size: 1.2rem; color: var(--text); }
.dn-links { margin-top: 8px; }
.dn-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.dn-dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0; }
.dn-dl dt { font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.dn-dl dd { margin: 0; font-size: 1.02rem; }
.dn-info { margin: 0; font-size: 1.02rem; line-height: 1.6; }
.dn-ann { display: flex; flex-direction: column; gap: 14px; }
.dn-img { display: block; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.dn-img img { display: block; width: 100%; height: auto; max-height: 560px; object-fit: contain; }
.dn-pdf { display: flex; gap: 14px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.dn-pdf svg { width: 40px; height: 40px; color: #8a2b22; flex: none; }
.dn-pdf span { display: flex; flex-direction: column; min-width: 0; word-break: break-word; }
.dn-pdf small { color: var(--muted); }
.dn-drop { display: flex; gap: 14px; align-items: center; width: 100%; padding: 26px 18px; border: 2px dashed var(--line-2); border-radius: 14px; background: var(--surface-2); color: var(--text-2); cursor: pointer; text-align: left; font: inherit; }
.dn-drop:hover { border-color: var(--navy-700); color: var(--navy-800); }
.dn-drop svg { width: 30px; height: 30px; flex: none; }
.dn-drop span { display: flex; flex-direction: column; gap: 2px; }
.dn-drop small { color: var(--muted); }
.dn-sum { display: flex; gap: 8px; align-items: center; margin: 0 0 10px; }
.dn-sum > svg { width: 18px; height: 18px; color: var(--ok, #2c7a4b); flex: none; }
.dn-rec summary { cursor: pointer; font-weight: 700; color: var(--blue-600); padding: 6px 0; }
.dn-rec .tbl { margin-top: 8px; }
.dn-fixed { display: flex; gap: 14px; align-items: center; }
.dn-fixed > span:not(.avatar) { display: flex; flex-direction: column; }
.dn-fixed small { color: var(--muted); }
.dn-mini { display: flex; flex-direction: column; gap: 6px; }
.dn-mini-row { display: flex; gap: 14px; align-items: center; padding: 10px; border-radius: 12px; text-decoration: none; color: var(--text); }
.dn-mini-row:hover { background: var(--surface-2); }
.dn-mini-row > span:not(.avatar) { display: flex; flex-direction: column; min-width: 0; }
.dn-mini-row small { color: var(--muted); }
.dn-mini-row .chev { margin-left: auto; color: var(--muted); flex: none; }
.ok-notice { background: #edf6f0; border-color: #bfe0cb; color: #1f5c38; }
.danger-text { color: var(--red) !important; }
.file-pick { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; cursor: pointer; }
.file-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-pick input:focus-visible + .btn { box-shadow: var(--focus); }
.profile-card .dn-memorial { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 4px; padding: 10px 12px; border-radius: 12px; background: #f1f0ed; color: #3b3f48; text-decoration: none; font-weight: 700; }
.profile-card .dn-memorial svg { width: 18px; height: 18px; }
@media (max-width: 900px) { .dn-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .dn-card { gap: 14px; padding: 14px; }
  .dn-card .avatar.lg { width: 56px; height: 56px; }
  .dn-body h2 { font-size: 1.12rem; }
  .dn-hero { flex-direction: column; text-align: center; gap: 14px; }
  .dn-hero-text { align-items: center; }
  .dn-hero-text h1 { font-size: 1.6rem; }
  .dn-links { justify-content: center; }
  .dn-dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dn-dl dd { margin-bottom: 10px; }
}
@media print { .dn-notify, .danger-zone, .dn-links, .dn-ann .row { display: none !important; } }
.dn-notify .card-head { flex-wrap: wrap; gap: 12px; }
@media (max-width: 720px) {
  .dn-notify .card-head > .row { width: 100%; }
  .dn-notify .card-head > .row .btn { flex: 1 1 100%; justify-content: center; white-space: normal; }
}

/* ================================================================== Geburten (warm, freundlich) */
.dn-card.bn-card { border-left-color: var(--gold-300); }
.bn-card .dn-body h2 { color: var(--navy-800); }
.bn-hero { border-top-color: var(--gold-300); background: linear-gradient(180deg, #fbf5e6, var(--surface) 60%); }
.bn-hero .dn-hero-text h1 { color: var(--navy-800); }
.bn-hero .dn-kicker { color: var(--gold); }
.bn-parents { display: flex; gap: 8px; align-items: center; margin: 2px 0 0; color: var(--text-2); }
.bn-parents svg { width: 18px; height: 18px; color: var(--gold); flex: none; }
.profile-card .dn-memorial.bn-memorial { background: #fbf5e6; color: #6d4f0d; }
.bn-form fieldset legend svg { width: 16px; height: 16px; }
.bn-form fieldset + fieldset { margin-top: 4px; }
@media (max-width: 720px) { .bn-parents { justify-content: center; text-align: left; } }
