/* Schriften liegen bei uns selbst (kein Google Fonts: keine IP-Adressen an Google). Lizenz: SIL OFL, siehe fonts/ */
@font-face { font-family: 'Plus Jakarta Sans'; src: url('../fonts/plus-jakarta-sans.woff2') format('woff2'), url('../fonts/plus-jakarta-sans.woff') format('woff'); font-weight: 400 800; font-style: normal; font-display: swap; }
/* Arabisch: Noto Sans Arabic (SIL OFL, fonts/OFL-NotoSansArabic.txt). Wird nur geladen, wenn arabische Buchstaben zu sehen sind. */
@font-face { font-family: 'Noto Sans Arabic'; src: url('../fonts/noto-sans-arabic-400.woff2') format('woff2'); font-weight: 400 600; font-style: normal; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Noto Sans Arabic'; src: url('../fonts/noto-sans-arabic-700.woff2') format('woff2'); font-weight: 700 800; font-style: normal; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: 'Cormorant Garamond'; src: url('../fonts/cormorant-garamond.woff2') format('woff2'), url('../fonts/cormorant-garamond.woff') format('woff'); font-weight: 600 700; font-style: normal; font-display: swap; }
:root {
  --bg: #FBF8F3;
  --card: #FFFFFF;
  --ink: #3B342E;
  --muted: #6E655C;
  --line: #E7DFD3;
  --soft: #F2ECE2;
  --sand: #A8875E;
  --sand-soft: #F3ECDF;
  --red: #B5503F;
  --red-dark: #8E3B2E;
  --green: #4E7D63;
  --green-soft: #EEF3EF;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;   /* Noto Sans Arabic nur bei Arabisch, siehe [dir=rtl] */
  font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
a { color: var(--red); }
h1, h2, h3 { margin: 0; }
.serif { font-family: 'Cormorant Garamond', Georgia, serif; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { padding: 48px 20px; text-align: center; }

header.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px 16px;
  background: rgba(251, 248, 243, 0.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
header.top .brand { display: flex; align-items: center; gap: 8px; font-size: 24px; font-weight: 700; flex: 1; }
header.top select { max-width: 55%; }

main { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 14px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card.soft { background: var(--sand-soft); border-color: #E2D3B8; }

label { font-size: 13px; font-weight: 600; }
input, select, textarea {
  width: 100%; min-height: 46px; border-radius: 12px; border: 1px solid #D9D0C4; background: var(--bg);
  padding: 10px 12px; font: inherit; font-size: 16px; color: var(--ink);
}
textarea { resize: none; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.row { display: flex; gap: 8px; align-items: center; }
.row > * { min-width: 0; }
.grow { flex: 1; }

button, .btn {
  min-height: 46px; border-radius: 12px; border: 1px solid transparent; padding: 0 16px;
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-light { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-soft { background: var(--soft); color: var(--ink); }
.btn-green { background: var(--green); color: #fff; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-small { min-height: 36px; font-size: 13px; padding: 0 12px; border-radius: 10px; }

.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--soft); border-radius: 12px; padding: 4px; }
.tabs button { min-height: 40px; white-space: normal; line-height: 1.15; hyphens: manual; overflow-wrap: break-word; background: transparent; color: var(--muted); font-weight: 600; border-radius: 9px; }
.tabs button[aria-selected="true"] { background: var(--card); color: var(--ink); font-weight: 800; }

.notice { font-size: 13px; line-height: 1.5; border-radius: 12px; padding: 10px 12px; }
.notice.ok { background: var(--green-soft); color: #33503F; border: 1px solid #CFDFD4; }
.notice.err { background: #FBEFEA; color: #7E2F22; border: 1px solid #E3B8AE; }
.notice.info { background: var(--sand-soft); color: #5B4636; }

/* Chat */
.chat { display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 82%; padding: 8px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); align-self: flex-start; }
.msg.me { align-self: flex-end; background: var(--red); color: #fff; border-color: var(--red); }
.msg .who { font-size: 12px; font-weight: 700; color: var(--sand); margin-bottom: 2px; }
.msg .time { font-size: 11px; opacity: 0.7; margin-top: 2px; text-align: right; }
.composer { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); display: flex; gap: 8px; }
.composer input { border-radius: 23px; }
.composer button { width: 46px; padding: 0; border-radius: 23px; }

/* Listen */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--soft); }
.list-item:last-child { border-bottom: none; }
.avatar { width: 40px; height: 40px; border-radius: 20px; background: var(--sand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.badge.ok { background: var(--green-soft); color: #33503F; }

.event { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--soft); }
.event:last-child { border-bottom: none; }
.date-box { width: 52px; flex-shrink: 0; border-radius: 12px; padding: 6px 0; text-align: center; background: var(--sand-soft); color: #6B4A06; }
.date-box .d { font-size: 20px; font-weight: 800; line-height: 1; }
.date-box .m { font-size: 11px; font-weight: 700; text-transform: uppercase; }
.kind-Hochzeit { background: #FBEFEA; color: var(--red); }
.kind-Beerdigung { background: #EEECE9; color: #5F5A54; }
.kind-Geburtstag { background: #E7EBF5; color: #3C4F8C; }
.kind-Veranstaltung { background: var(--green-soft); color: #2F6B4F; }

.hero { text-align: center; padding: 24px 8px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hero h1 { font-size: 34px; }
.code-input { letter-spacing: 6px; font-size: 22px; text-align: center; font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Êzîdische Symbole */
.ornament { display: flex; justify-content: center; margin-top: 6px; }
.fam-title { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.brand-sun { display: inline-flex; align-self: flex-start; margin-left: -4px; }

/* Zusagen / Absagen / Offen */
.rsvp-yes { background: var(--green-soft); color: #33503F; border-color: #CFDFD4; }
.rsvp-no { background: #FBEFEA; color: #7E2F22; border-color: #E3B8AE; }
.rsvp-open { background: var(--soft); color: var(--ink); }
button[aria-pressed="true"] { border: 2px solid currentColor; }

/* Sprachwahl */
.lang-switch { display: flex; justify-content: center; gap: 8px; }

/* Beiträge */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); font-size: 14px; font-weight: 600; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.post { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--soft); }
.post:last-child { border-bottom: none; padding-bottom: 0; }
.post-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.tabs button { padding: 0 4px; font-size: 14px; }

/* Stammbaum */
.tree-card { align-items: stretch; }
.tree-row { display: flex; justify-content: center; gap: 8px; }
.tree-row.wrap { flex-wrap: wrap; }
.tree-link { width: 2px; height: 14px; background: var(--sand); align-self: center; }
.tree-box { flex-direction: column; gap: 1px; min-height: 56px; min-width: 0; flex: 1 1 0; max-width: 160px; padding: 6px 8px; border-radius: 14px; background: var(--card); border: 1.5px solid var(--line); color: var(--ink); line-height: 1.2; }
.tree-row.wrap .tree-box { flex: 0 1 calc(50% - 4px); }
.tree-box.m { border-color: #C9D6E3; }
.tree-box.w { border-color: #EBC9C1; }
.tree-box.focus { background: var(--ink); color: #fff; border-color: var(--ink); }
.tree-box.dead { opacity: .85; }
.tree-box.add { border-style: dashed; color: var(--muted); font-weight: 600; background: transparent; }
.tree-role { font-size: 11px; font-weight: 600; opacity: .7; }
.tree-name { font-size: 15px; font-weight: 800; overflow-wrap: anywhere; }
.tree-years { font-size: 12px; font-weight: 500; opacity: .8; }
.tree-outline, .tree-outline ul { list-style: none; margin: 0; padding: 0; }
.tree-outline ul { padding-left: 18px; border-left: 2px solid var(--soft); margin-left: 8px; }
.tree-outline li { margin: 2px 0; }
.tree-line { display: block; width: 100%; text-align: left; min-height: 36px; padding: 6px 8px; border: none; background: transparent; font: inherit; font-size: 15px; color: var(--ink); justify-content: flex-start; font-weight: 600; }
.linklike { display: inline; min-height: 0; padding: 0; border: none; background: none; color: var(--red); font: inherit; font-weight: 700; text-decoration: underline; }
.tabs button { padding: 0 2px; font-size: 13px; }
.print-area { display: none; }
@media print {
  body.printing { background: #fff; }
  body.printing > *:not(.print-area) { display: none !important; }
  body.printing .print-area { display: block; padding: 16px; color: #000; }
  .print-area h1 { font-size: 26px; margin-bottom: 4px; }
  .print-area .tree-outline ul { border-left: 1px solid #999; }
  .print-area .tree-line { min-height: 0; padding: 2px 0; font-size: 12pt; }
  .print-foot { margin-top: 24px; color: #555; }
  html:has(body.printing) { background: #fff; }
  .print-area .print-pic { margin: 8px auto 0; overflow: hidden; }
  .print-area .print-pic .tpic-canvas { margin: 0; }
  .print-area .print-pic, .print-area .print-pic * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Stammbaum als Bild */
.tpic-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; background: #F4F8F0; }
.tpic-canvas { position: relative; margin: 0 auto; }
.tpic { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 4px 3px; min-height: 0; border-radius: 14px; border: 1.5px solid #C9BBA6; background: #fff; color: var(--ink); font-size: 12px; line-height: 1.15; box-shadow: 0 1px 3px rgba(59,52,46,.12); }
.tpic.tier-leaf { background: #EAF3E2; border-color: #A9C79A; border-radius: 14px 14px 14px 4px; }
.tpic.tier-trunk { background: #F3E9DC; border-color: #8A6A4A; }
.tpic.sel { outline: 3px solid var(--red); outline-offset: 1px; }
.tpic-av { width: 24px; height: 24px; border-radius: 12px; color: #fff; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.tpic-av.m { background: #50638F; }
.tpic-av.w { background: #B5503F; }
.tpic-name { font-weight: 800; font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpic-sub { font-size: 10.5px; color: var(--muted); }
.msg .who-rel { font-weight: 600; color: var(--muted); }

/* Glauben */
header.top { gap: 6px; }
.gl-kicker { margin: 4px 4px 0; font-size: 12px; font-weight: 800; letter-spacing: 3px; color: #8A6D45; }
.gl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gl-tile { position: relative; height: 128px; padding: 0; border: none; border-radius: 20px; overflow: hidden; background: #3B342E; box-shadow: 0 2px 8px rgba(59,52,46,.18); }
.gl-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.gl-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,14,10,0) 40%, rgba(20,14,10,.78) 100%); }
.gl-label { position: absolute; left: 12px; right: 10px; bottom: 10px; text-align: left; font-size: 16px; font-weight: 800; line-height: 1.15; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.gl-article { gap: 12px; }
.gl-teaser { margin: -6px 0 0; font-size: 14px; font-weight: 700; color: #8A6D45; }
.gl-para { margin: 0; font-size: 16px; line-height: 1.65; }
.gl-pfau-box { background: #FBF6EC; border-radius: 14px; padding: 14px 8px 6px; }
.gl-pfau { display: block; width: 100%; max-width: 300px; margin: 0 auto; height: auto; }
.gl-pfau-name { margin: 6px 0 4px; text-align: center; font-size: 18px; font-weight: 700; color: #5B4636; }
.gl-entry { justify-content: space-between; gap: 12px; padding: 14px 16px; min-height: 64px; border-radius: 16px; background: linear-gradient(120deg, #3B2A4A, #C9784A 70%, #F2C27A); color: #fff; text-align: left; font-size: 20px; }
.gl-entry strong { font-size: 16px; }

/* Weltkarte */
.wk-mapbox { background: #E3EAE5; border: 1px solid #D5DED8; border-radius: 18px; overflow: hidden; }
.wk-map { display: block; width: 100%; height: auto; }
.wk-year { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 32px; font-weight: 700; fill: #3B342E; }
.wk-lab1 { font-size: 9.5px; font-weight: 800; fill: #3B342E; font-family: inherit; }
.wk-lab2 { font-size: 8.5px; font-weight: 600; fill: #4A423B; font-family: inherit; }
.wk-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 12px; background: var(--bg); border-top: 1px solid #D5DED8; font-size: 12px; }
.wk-dot { width: 10px; height: 10px; border-radius: 5px; flex-shrink: 0; display: inline-block; }
.wk-step { width: 44px; min-height: 44px; padding: 0; font-size: 24px; flex-shrink: 0; }
.wk-range { width: 100%; min-height: 44px; padding: 0; border: none; background: transparent; accent-color: var(--wk-col, var(--red)); }
.wk-pos { text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #A8875E; }
.wk-cardyear { font-size: 28px; font-weight: 700; color: #A8875E; line-height: 1; }
.wk-row { min-height: 30px; border-bottom: 1px solid var(--soft); font-size: 14px; }

/* Ahnen & Netz */
.tp-extra summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--red); min-height: 32px; display: flex; align-items: center; }
.net-box { display: flex; flex-direction: column; gap: 8px; background: var(--sand-soft); border-radius: 12px; padding: 10px 12px; }

/* Sprachwahl oben: Kürzel sichtbar, Auswahlliste unsichtbar darüber */
.lang-pick { position: relative; min-width: 44px; }
.lang-pick select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; max-width: none; }
.lang-switch { flex-wrap: wrap; }

/* Arabisch: von rechts nach links */
[dir=rtl] .msg .time { text-align: left; }
[dir=rtl] .brand-sun { margin-left: 0; margin-right: -4px; }
[dir=rtl] .tree-outline ul { padding-left: 0; padding-right: 18px; border-left: 0; border-right: 2px solid var(--soft); margin-left: 0; margin-right: 8px; }
[dir=rtl] .print-area .tree-outline ul { border-right: 1px solid #999; }
[dir=rtl] .tree-line, [dir=rtl] .gl-entry, [dir=rtl] .gl-label { text-align: right; }
[dir=rtl] body { font-family: 'Plus Jakarta Sans', 'Noto Sans Arabic', system-ui, 'Segoe UI', Tahoma, 'Geeza Pro', sans-serif; }
[dir=rtl] .serif, [dir=rtl] .why-name { font-family: 'Cormorant Garamond', 'Noto Sans Arabic', serif; }

/* Was Kanî dir bringt */
.why { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.why-title { font-size: 28px; text-align: center; margin: 6px 0 0; }
.why-item { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid #E7DFD3; border-radius: 16px; padding: 12px 14px; }
.why-item strong { font-size: 15px; }
.why-ico { flex-shrink: 0; width: 42px; height: 42px; border-radius: 21px; display: inline-flex; align-items: center; justify-content: center; }
header.top button.brand { background: none; border: 0; padding: 0; min-height: 0; font: inherit; font-size: 24px; font-weight: 700; color: var(--ink); cursor: pointer; justify-content: flex-start; text-align: start; }
[dir=rtl] .send-arrow { display: inline-block; transform: scaleX(-1); }

/* Lupe: runder Suchknopf, verschiebbar */
.lupe { position: fixed; bottom: 96px; inset-inline-end: 16px; z-index: 40; width: 60px; height: 60px; min-height: 0; padding: 0; border-radius: 30px;
  background: var(--ink); color: #fff; border: 0; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(59, 52, 46, .28); touch-action: none; cursor: grab; }
.lupe:active { cursor: grabbing; }
.lupe-badge { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.lupe.lupe-bar { position: relative; inset: auto; width: 44px; height: 44px; border-radius: 22px; box-shadow: none; flex-shrink: 0; }
.lupe.lupe-bar svg { width: 22px; height: 22px; }
.lupe.lupe-drag { opacity: .85; }
.lupe.lupe-bar .lupe-badge { top: -2px; inset-inline-end: -2px; }
.lang-pick { gap: 6px; }
.flag { display: inline-flex; border-radius: 2px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }

/* Leiste unten (wie im Entwurf) */
body:has(.bottom-nav) { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column;
  background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.bottom-nav button { position: relative; min-height: 56px; padding: 4px 2px; background: none; border: 0; border-radius: 10px; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 600; line-height: 1.1; }
.bottom-nav button[aria-current="page"] { color: var(--red); font-weight: 800; }
.nav-ico { display: flex; }
.nav-label { max-width: 100%; overflow: hidden; text-align: center; white-space: normal; hyphens: manual;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.nav-badge { position: absolute; top: 2px; inset-inline-start: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.composer { bottom: calc(68px + env(safe-area-inset-bottom)); }

/* Chat-Liste */
.chat-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0; background: none; border: 0; border-bottom: 1px solid var(--line);
  text-align: start; font: inherit; color: inherit; cursor: pointer; }
.chat-row:last-child { border-bottom: 0; }
.chat-row-top { display: flex; align-items: baseline; gap: 8px; justify-content: space-between; }
.chat-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-prev { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar.grp { background: #50638F; }
.chat-head { display: flex; align-items: center; gap: 12px; }
.chat-head .btn-small { width: 40px; padding: 0; font-size: 22px; }
/* Kopfzeile: Sprache und Lupe nie zusammendrücken, die Familienauswahl gibt nach */
header.top select { min-width: 0; flex: 0 1 auto; max-width: 34%; }
header.top .lang-pick, header.top .lupe { flex-shrink: 0; }
header.top .brand { min-width: 0; }
.lupe.lupe-bar .lupe-badge { top: 0; inset-inline-end: -4px; }

/* Abstimmungen im Chat */
.poll { display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; max-width: 92%; }
.poll-opt { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: stretch; gap: 2px; min-height: 44px; padding: 8px 12px;
  background: var(--soft); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.poll-opt[aria-pressed="true"] { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.poll-opt:disabled { cursor: default; opacity: 1; }
.poll-bar { position: absolute; inset-block: 0; inset-inline-start: 0; background: rgba(181, 80, 63, .14); }
.poll-row { position: relative; display: flex; gap: 8px; align-items: center; }
.poll-who { position: relative; }

/* Beileidsbuch */
.condol { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); }
.condol-item { background: var(--card); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }

/* Unterstützen: kleines Herz oben neben der Lupe */
.heart-btn { width: 44px; height: 44px; min-height: 0; padding: 0; border-radius: 22px; flex-shrink: 0; background: var(--card); color: var(--red);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.heart-badge { color: var(--red); }
/* Dankeswand: Namen wie Steine einer Mauer */
.wall { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); }
.wall-brick { min-height: 34px; padding: 4px 12px; border-radius: 6px; background: var(--card); border: 1px solid var(--line); color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; flex-grow: 1; }
.wall-brick.has-greet::after { content: ' ❤'; color: var(--red); }
.wall-brick.on { background: var(--red); color: #fff; border-color: var(--red); }
.wall-brick.on::after { color: #fff; }
.wall-brick.wall-owner { font-size: 16px; min-height: 40px; padding: 6px 16px; border-color: #C9963A; background: #FBF3E2; }
.wall-brick.wall-owner::after { content: ' ❤'; color: #C9963A; }
.wall-brick.wall-owner.on { background: #C9963A; border-color: #C9963A; }
.wall-brick.wall-owner.on::after { color: #fff; }
/* Dankeswand: Sonnenaufgang über Laliş */
.wall-card { overflow: hidden; }
.wall-hero { position: relative; margin: -16px -16px 0; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #B5503F 0%, #D9874A 40%, #F3D9A4 75%, var(--card) 100%); }
.wall-sky { position: relative; height: 170px; pointer-events: none; }
.wall-sun { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); }
.wall-lalis { position: absolute; bottom: -6px; left: 50%; transform: translateX(-46%); }
.wall-thanks { position: relative; padding: 4px 18px 14px; text-align: center; color: var(--ink); display: flex; flex-direction: column; gap: 4px; }
.wall-card svg[aria-hidden] { display: block; }
.wall-card > svg { align-self: center; }
.wall-brick.mem { background: #FBF3E2; border-color: #E4C98F; }
.heart-badge.gold { color: #C9963A; text-shadow: 0 0 1px #8a6420; }
/* Familie wechseln: Name oben antippen */
.fam-switch { background: none; border: 0; padding: 0; min-height: 0; font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; text-align: start; }
.fam-chev { font-size: 18px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; }

/* Rundgang */
.tour-wrap { position: fixed; inset: 0; z-index: 100; }
.tour-shade { position: absolute; inset: 0; background: rgba(30, 24, 20, .45); }
.tour-box { position: absolute; left: 16px; right: 16px; bottom: calc(92px + env(safe-area-inset-bottom)); max-width: 460px; margin: 0 auto;
  background: var(--card); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.tour-box.top { bottom: auto; top: 90px; }
.tour-hl { position: relative; z-index: 101; outline: 3px solid #F2C14E; outline-offset: 3px; border-radius: 12px; box-shadow: 0 0 0 6px rgba(242,193,78,.35); }
.bottom-nav.tour-hl, header .tour-hl { z-index: 101; }
.tour-raise { z-index: 101 !important; }

/* Hinweis auf neue Version */
.update-bar { position: fixed; left: 12px; right: 12px; top: calc(10px + env(safe-area-inset-top)); z-index: 200; max-width: 520px; margin: 0 auto;
  background: var(--ink); color: #fff; border: 0; border-radius: 14px; padding: 14px 16px; font: inherit; font-weight: 700; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.25); cursor: pointer; }
.msg { cursor: pointer; }
.msg.sel { box-shadow: 0 0 0 2px var(--line); }
.new-dot { display: inline-block; width: 10px; height: 10px; border-radius: 5px; background: var(--red); margin-inline-start: 8px; vertical-align: middle; }
.new-time { color: var(--red) !important; font-weight: 700; }
/* Erste Schritte */
.steps-bar { height: 6px; border-radius: 3px; background: var(--soft); overflow: hidden; }
.steps-bar span { display: block; height: 100%; background: var(--green, #4E7D63); border-radius: 3px; }
.step-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 0; background: none; border: 0; border-bottom: 1px solid var(--line); font: inherit; color: var(--ink); text-align: start; cursor: pointer; }
.step-row:last-of-type { border-bottom: 0; }
.step-row { border-radius: 0; }
.step-row.done { color: var(--muted); cursor: default; opacity: 1; }
.step-row.done .grow { text-decoration: line-through; }
.step-check { width: 24px; height: 24px; border-radius: 12px; border: 2px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.step-row.done .step-check { background: var(--green, #4E7D63); border-color: var(--green, #4E7D63); color: #fff; }
.trust-warn { color: #A8432F; font-weight: 600; }
.trust-ok { color: var(--green, #4E7D63); font-weight: 600; }
.why-name { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 20px; font-weight: 700; color: var(--ink); line-height: 1.35; }

/* Reaktionen und Antworten (Ergänzung 41) */
.react-line { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.react-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 13px; color: var(--ink); }
.react-chip.mine { border-color: var(--red); }
.react-bar { display: flex; gap: 6px; }
.react-btn { min-width: 44px; min-height: 36px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 18px; cursor: pointer; }
.react-btn[aria-pressed="true"] { border-color: var(--red); background: var(--soft); }
.reply-quote { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; margin: 2px 0 6px; padding: 4px 10px;
  border: 0; border-inline-start: 3px solid var(--red); border-radius: 6px; background: rgba(0,0,0,.05); color: inherit; font: inherit; text-align: start; cursor: pointer; }
.reply-bar { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px; border-inline-start: 3px solid var(--red); border-radius: 8px; background: var(--soft); }

/* Wappen */
img.wappen { border-radius: 50%; flex-shrink: 0; object-fit: cover; }

/* Angeheftete Nachricht (Ergänzung 42) */
.pin-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 8px 10px; border-radius: 12px; background: var(--sand-soft); border: 1px solid #E2D3B8; }
.pin-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 0; background: none; padding: 0; min-height: 0; font: inherit; color: inherit; text-align: start; cursor: pointer; }
.pin-text span:last-child { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Familie unter dem Stammbaum */
.fam-sec-title { font-size: 26px; margin: 18px 4px 0; padding-top: 14px; border-top: 1px solid var(--line); }
#fam-sec { scroll-margin-top: 76px; }

/* Heute vor einem Jahr */
.memo-card { gap: 10px; background: #FBF3E2; border-color: #E8D3A8; }
.memo-item { padding: 8px 0; border-top: 1px solid #EADBBE; }
.memo-item:first-of-type { border-top: 0; }
.memo-card .row + .memo-item { border-top: 0; }

/* Sprachnachrichten (Ergänzung 43) */
.mic-btn { font-size: 20px; }
.voice { display: flex; align-items: center; gap: 8px; }
.voice { min-width: 190px; }
.voice-play { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%; border: 0; background: var(--red); color: #fff; font-size: 15px; flex-shrink: 0; cursor: pointer; }
.msg.me .voice-play { background: #fff; color: var(--red); }
.voice-bar { flex: 1; height: 4px; border-radius: 2px; background: rgba(0,0,0,.15); overflow: hidden; }
.msg.me .voice-bar { background: rgba(255,255,255,.35); }
.voice-bar i { display: block; height: 100%; width: 0; background: currentColor; }
.voice-time { opacity: .8; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rec-bar { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; border-radius: 23px; background: var(--sand-soft); border: 1px solid #E2D3B8; }
.rec-text { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer button.busy { opacity: .6; }
.rec-bar .grow { min-width: 0; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--red); animation: recblink 1s ease-in-out infinite; flex-shrink: 0; }
.rec-clock { font-variant-numeric: tabular-nums; font-weight: 700; }
@keyframes recblink { 50% { opacity: .3; } }
.voice-len { opacity: .75; color: inherit; }
.rec-clock { unicode-bidi: isolate; }

/* Offener Chat: ganzer Bildschirm (Owner 16.11.2026) */
body.in-chat .chat-head { position: sticky; top: 0; z-index: 25; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; background: var(--card); border-bottom: 1px solid var(--line); }
body.in-chat .chat-main { padding-top: 12px; padding-bottom: 0; }
body.in-chat .composer { bottom: 0; padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); align-items: flex-end; }
body.in-chat .lupe:not(.lupe-bar) { display: none; }
.chat-wrap { display: flex; flex-direction: column; flex: 1; justify-content: flex-end; min-height: calc(100dvh - 150px); }
.composer textarea { flex: 1; min-width: 0; resize: none; min-height: 46px; max-height: 120px; padding: 11px 16px; border-radius: 23px; line-height: 1.35; font: inherit; overflow-y: auto; }
.composer [hidden] { display: none; }
.plus-btn { font-size: 19px; }

/* Stammbaum-Eingabe einfacher (Owner 22.11.2026) */
.add-row { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.add-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.add-chip { font-weight: 600; }
.sheet-back { position: fixed; inset: 0; z-index: 60; background: rgba(43,35,29,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet-back .tree-form { width: 100%; max-width: 560px; max-height: 88dvh; overflow-y: auto; border-radius: 20px 20px 0 0; margin: 0; gap: 12px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom)); background: var(--card); animation: sheetup .18s ease-out; }
@keyframes sheetup { from { transform: translateY(30px); opacity: .6; } }
.sheet-head { display: flex; align-items: center; gap: 10px; }
.sheet-x { width: 40px; min-height: 40px; height: 40px; padding: 0; border-radius: 50%; flex-shrink: 0; }
.sheet-foot { display: flex; gap: 10px; position: sticky; bottom: 0; background: inherit; padding-top: 8px; }
.segs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg { min-height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
.seg[aria-pressed="true"] { border-color: var(--red); background: var(--soft); color: var(--red); }
body:has(.sheet-back) { overflow: hidden; }

/* Familien der Geschwister im Stammbaum */
.sib-fams { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line, #E8DED3); padding-top: 10px; }
.sib-fam { display: flex; align-items: center; gap: 8px; }

/* Auge-Knopf am Passwort */
.pw-eye { width: 48px; min-height: 48px; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Profil: Kopf mit Buchstaben-Bild */
.profile-head { display: flex; flex-direction: row; align-items: center; gap: 14px; }
.profile-ava { width: 60px; height: 60px; font-size: 26px; flex-shrink: 0; }

.avatar { overflow: hidden; }
.ava-img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Bild zuschneiden */
.crop-frame { position: relative; overflow: hidden; border-radius: 12px; background: #2b231d; flex-shrink: 0; }
.crop-frame::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 2px rgba(255,255,255,.85); }
.crop-frame.round { border-radius: 50%; }
body.cropping { overflow: hidden; }

/* Einladen-Knopf oben */
.invite-btn { width: 44px; height: 44px; min-height: 0; padding: 0; border-radius: 22px; flex-shrink: 0; background: var(--card); color: var(--ink); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; }

/* Stammbaum: Person verschieben */
.tpic { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.tpic.tpic-drag { opacity: .35; }
.tpic.tpic-drop { outline: 3px solid var(--red); outline-offset: 2px; transform: scale(1.06); }
.tpic-ghost { box-shadow: 0 10px 24px rgba(0,0,0,.25); border-radius: 14px; }
.segs .seg { min-height: 48px; }

/* Chat übersichtlicher (Owner 22.11.2026) */
.chat { gap: 0; }
.chat > :not(.msg-row) { margin-top: 10px; }
.msg-row { display: flex; align-items: flex-start; gap: 6px; margin-top: 10px; }
.msg-row.cont { margin-top: 3px; }
.msg-row.me { justify-content: flex-end; }
.msg-row .msg { max-width: 80%; align-self: auto; }
.msg-ava { width: 30px; height: 30px; font-size: 13px; flex-shrink: 0; color: #fff; }
.msg-ava-sp { width: 30px; flex-shrink: 0; }
.msg { padding: 6px 10px 5px; box-shadow: 0 1px 1px rgba(43,35,29,.06); }
.msg-row:not(.cont) .msg:not(.me) { border-start-start-radius: 4px; }
.msg-row.me:not(.cont) .msg.me { border-start-end-radius: 4px; }
.msg.me { background: #F7E4DA; color: var(--ink); border-color: #EBCBBB; }
.msg.me .voice-play { background: var(--red); color: #fff; }
.msg.me .voice-bar { background: rgba(168,67,47,.25); }
.msg .who { font-size: 12.5px; font-weight: 800; }
.msg .time { font-size: 10.5px; opacity: .6; margin-top: 1px; }
.day-sep { align-self: center; margin: 16px 0 4px; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; }

/* Menü ☰ */
.menu-sec { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 12px 4px 4px; }
.menu-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 8px 6px; background: none; border: 0; border-bottom: 1px solid var(--line); font: inherit; font-weight: 600; color: var(--ink); text-align: start; cursor: pointer; }
.menu-row:last-child { border-bottom: 0; }
.menu-ico { width: 28px; display: inline-flex; justify-content: center; font-size: 18px; color: var(--ink); }

/* Lesbarkeit und Tippflächen (Owner-Prüfung B6–B9, 22.11.2026): kleine Texte mindestens 13 px, Tippflächen mindestens 44 px */
.msg .who, .msg .time, .badge, .date-box .m, .tree-role, .tree-years, .tpic-sub, .tpic-av, .tpic-name, .gl-kicker, .wk-pos,
.day-sep, .menu-sec, .nav-label, .nav-badge, .lupe-badge { font-size: 13px; }
.msg .time { opacity: .75; }
.btn-small, .chip, .tree-line, .react-btn, .lang-switch button { min-height: 44px; }
.brand { min-height: 44px; }
input[type="checkbox"], input[type="radio"] { width: 24px !important; height: 24px !important; }
.nav-badge, .lupe-badge { min-width: 22px; height: 22px; }
.lang-switch .flag { display: inline-flex; margin-inline-end: 6px; }
/* Lade-Hinweis oben beim Wechseln der Reiter */
body.busy::before { content: ''; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200;
  background: linear-gradient(90deg, transparent, var(--red), transparent); background-size: 50% 100%; background-repeat: no-repeat;
  animation: kani-busy 1s linear infinite; }
@keyframes kani-busy { from { background-position: -50% 0; } to { background-position: 150% 0; } }
@media (prefers-reduced-motion: reduce) { body.busy::before { animation: none; background: var(--red); opacity: .5; } }
header.top .brand { min-height: 44px; }
button.linklike.small { min-height: 44px; display: inline-flex; align-items: center; }
/* Große Schrift: oben nur das Wappen, damit die Knöpfe Platz haben */
html[data-font="g"] header.top .brand > span, html[data-font="sg"] header.top .brand > span { display: none; }

/* ===== Neues Design „Laliş Morgen“ (Owner 22.11.2026: Richtung A, dazu goldene Ringe und Reiter-Feld aus C) ===== */
:root { --bg: #F6F2EA; --card: #FFFFFF; --ink: #2E2823; --muted: #665C53; --line: #ECE4D8; --soft: #F3EDE3; --red: #A23E2C; --red-dark: #7E2F21; --gold: #C9963A; --radius: 20px; }
html, body { background: var(--bg); }
header.top { background: rgba(255, 255, 255, 0.93); border-bottom: 0; box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 6px 18px rgba(80,60,30,.06); }
.card { border: 0; border-radius: 22px; box-shadow: 0 1px 2px rgba(60,40,20,.05), 0 8px 24px rgba(60,40,20,.07); }
.card.soft { background: #FBF7F0; box-shadow: none; border: 1px solid var(--line); }
.notice { border-radius: 16px; }
.btn-primary { border-radius: 16px; box-shadow: 0 6px 16px rgba(162,62,44,.22); }
.btn-primary:disabled { box-shadow: none; }
.btn-light { border-radius: 14px; }
input, select, textarea { border-radius: 14px; }
.chip { border-color: transparent; background: var(--soft); }
.chip[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.invite-btn, .heart-btn { border: 0; background: var(--soft); }
.bottom-nav { border-top: 0; box-shadow: 0 -6px 20px rgba(60,40,20,.08); }
.bottom-nav button[aria-current="page"] { color: var(--red); }
.bottom-nav button[aria-current="page"] .nav-ico { background: #F6E3DC; border-radius: 14px; padding: 3px 14px; }
/* Goldener Ring um Profilbilder und Buchstaben, wie die Sonne */
.avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--gold); }
.msg-ava { box-shadow: 0 0 0 1.5px #fff, 0 0 0 3px var(--gold); }
.msg { border: 0; box-shadow: 0 1px 2px rgba(0,0,0,.07); }
.msg.me { background: #F4DFD6; border: 0; }
.day-sep { border: 0; background: #ECE3D5; color: #5E544B; }
.fam-title h1, h1.serif { color: #2E2823; }
.tpic { box-shadow: 0 2px 8px rgba(60,40,20,.10); }
.menu-row { border-bottom-color: #F0E9DE; }
/* Neue Startseite */
.greet { padding: 2px 4px 0; }
.greet-h { font-size: 30px; font-weight: 700; line-height: 1.15; color: var(--ink); }
.fam-circles { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 2px; scrollbar-width: none; }
.fam-circles::-webkit-scrollbar { display: none; }
.fam-circle { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; padding: 4px 2px; min-width: 64px; cursor: pointer; font: inherit; color: var(--ink); }
.fc-ava { width: 54px; height: 54px; font-size: 22px; color: #fff; border-radius: 50% !important; }
.fc-add { background: var(--soft) !important; color: var(--red) !important; font-size: 28px; font-weight: 600; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--line); }
.fc-name { font-size: 13px; font-weight: 600; max-width: 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next-card { text-align: start; font: inherit; color: inherit; cursor: pointer; gap: 10px; align-items: stretch; width: 100%; }
.next-card > .small { text-align: start; }
.compose-mini { flex-direction: row; align-items: center; gap: 12px; font: inherit; text-align: start; cursor: pointer; min-height: 64px; }
/* Symbole und Stammbaum-Kärtchen (Design „Laliş Morgen“) */
.ui-ico { display: inline-flex; align-items: center; justify-content: center; }
.mic-btn, .plus-btn { color: var(--ink); }
.voice-play { display: inline-flex; align-items: center; justify-content: center; }
.tpic { border: 0; border-radius: 16px; background: #fff; box-shadow: 0 2px 8px rgba(60,40,20,.12); }
.tpic.tier-leaf { background: #F1F6EB; border: 0; border-radius: 16px; }
.tpic.tier-trunk { background: #F6EDE1; border: 0; }
.tpic-av { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px rgba(201,150,58,.7); }
.tpic.me { background: #FFF8E9; box-shadow: 0 0 0 2.5px var(--gold), 0 6px 14px rgba(201,150,58,.28); }
.tpic.me .tpic-av { box-shadow: 0 0 0 1.5px #fff, 0 0 0 3px var(--gold); }
.tpic.sel { outline: 3px solid var(--red); outline-offset: 2px; }
/* Startbildschirm: Wappen mit sanftem Leuchten (Owner-Prüfung C13) */
.splash { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 80vh; min-height: 80dvh; }
.splash img { width: 104px; height: 104px; border-radius: 50%; animation: kani-glow 2.2s ease-in-out infinite; }
.splash span { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 34px; font-weight: 700; color: var(--ink); letter-spacing: .5px; }
@keyframes kani-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(201,150,58,.0); transform: scale(1); } 50% { box-shadow: 0 0 34px 6px rgba(201,150,58,.45); transform: scale(1.03); } }
/* Weniger Bewegung, wenn das Handy es so eingestellt hat (Owner-Prüfung C15) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ===== Dunkler Modus „Nacht über Laliş“ (Owner-Prüfung C14, 23.11.2026) ===== */
html[data-theme="dark"] { color-scheme: dark;
  --bg: #111B24; --card: #1B2733; --ink: #F1ECE3; --muted: #AEB7BF; --line: #2C3A48; --soft: #223140; --sand: #E3B55A; --sand-soft: #2A2A22;
  --red: #EE8C74; --red-dark: #F4A893; --green: #6CC29A; --green-soft: #1C3229; --gold: #E3B55A; }
html[data-theme="dark"], html[data-theme="dark"] body { background: var(--bg); color: var(--ink); }
html[data-theme="dark"] header.top { background: rgba(17,27,36,.94); box-shadow: 0 1px 0 #22303D; }
html[data-theme="dark"] .card { background: var(--card); box-shadow: 0 1px 0 #26333F inset, 0 8px 24px rgba(0,0,0,.35); }
html[data-theme="dark"] .card.soft, html[data-theme="dark"] .next-card { background: #1F2D3A; border-color: var(--line); }
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { background: #142029; color: var(--ink); border-color: #34475A; }
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color: #8893A0; }
html[data-theme="dark"] .btn-primary { background: #E3B55A; color: #1A1408; box-shadow: 0 6px 16px rgba(227,181,90,.18); }
html[data-theme="dark"] .btn-light, html[data-theme="dark"] .seg { background: #1F2D3A; color: var(--ink); border-color: #3A4C5E; }
html[data-theme="dark"] .seg[aria-pressed="true"] { background: #3A3320; color: #F4D58E; border-color: #E3B55A; }
html[data-theme="dark"] .chip { background: #223140; color: var(--ink); }
html[data-theme="dark"] .chip[aria-pressed="true"] { background: #E3B55A; border-color: #E3B55A; color: #1A1408; }
html[data-theme="dark"] .invite-btn, html[data-theme="dark"] .heart-btn, html[data-theme="dark"] .lang-pick { background: #1F2D3A; color: var(--ink); border-color: #3A4C5E; }
html[data-theme="dark"] .bottom-nav { background: #0E171F; box-shadow: 0 -1px 0 #22303D; }
html[data-theme="dark"] .bottom-nav button { color: #9AA5AF; }
html[data-theme="dark"] .bottom-nav button[aria-current="page"] { color: #F4D58E; }
html[data-theme="dark"] .bottom-nav button[aria-current="page"] .nav-ico { background: #3A3320; }
html[data-theme="dark"] .notice { background: #1F2D3A; color: var(--ink); border-color: #3A4C5E; }
html[data-theme="dark"] .notice.ok { background: #1C3229; border-color: #2F5A47; }
html[data-theme="dark"] .notice.err { background: #3A1F1B; border-color: #6B3329; }
html[data-theme="dark"] .badge { background: #223140; color: var(--ink); }
html[data-theme="dark"] .badge.ok { background: #1C3229; color: #9BE0BF; }
html[data-theme="dark"] .msg { background: #1F2D3A; color: var(--ink); box-shadow: none; }
html[data-theme="dark"] .msg.me { background: #4A3A1E; color: #FFF3DA; }
html[data-theme="dark"] .day-sep, html[data-theme="dark"] .date-box { background: #223140; color: #D5DCE2; }
html[data-theme="dark"] .avatar { box-shadow: 0 0 0 2px #111B24, 0 0 0 3.5px var(--gold); }
html[data-theme="dark"] .menu-row { color: var(--ink); border-bottom-color: #26333F; }
html[data-theme="dark"] .menu-ico { color: var(--ink); }
html[data-theme="dark"] .serif, html[data-theme="dark"] h1, html[data-theme="dark"] .greet-h, html[data-theme="dark"] .fam-title h1 { color: #F6E6C2; }
html[data-theme="dark"] a, html[data-theme="dark"] .linklike { color: #F4D58E; }
html[data-theme="dark"] [style*="#A8432F"], html[data-theme="dark"] [style*="#8E3524"] { color: #F29A85 !important; }
html[data-theme="dark"] [style*="#B5503F"] { border-color: #8A4436 !important; }
html[data-theme="dark"] [style*="#FBEFEA"] { background: #3A1F1B !important; }
html[data-theme="dark"] [style*="#5B4636"] { color: #D8C6B4 !important; }
html[data-theme="dark"] [style*="#4E7D63"] { color: #8FD4B2 !important; }
html[data-theme="dark"] .tpic-scroll { background: #16222C; }
html[data-theme="dark"] .tpic { background: #22313F; color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.4); }
html[data-theme="dark"] .tpic.tier-leaf { background: #1F3328; }
html[data-theme="dark"] .tpic.tier-trunk { background: #33291E; }
html[data-theme="dark"] .tpic.me { background: #3A3320; }
html[data-theme="dark"] .tpic-sub { color: #C3CBD2; }
html[data-theme="dark"] .sheet-back .tree-form { background: var(--card); }
html[data-theme="dark"] .post, html[data-theme="dark"] .list-item, html[data-theme="dark"] .chat-row { border-color: #26333F; }
html[data-theme="dark"] .composer { background: var(--bg); }
html[data-theme="dark"] .steps-bar { background: #2C3A48; }
html[data-theme="dark"] .why-item { background: var(--card); border-color: var(--line); }
html[data-theme="dark"] .avatar { background: #8A6A3A; }
html[data-theme="dark"] .nav-badge, html[data-theme="dark"] .lupe-badge { background: #C2412D; color: #fff; }
html[data-theme="dark"] .lupe { background: #E3B55A; color: #1A1408; }
html[data-theme="dark"] .btn-green { background: #2F7A58; color: #fff; }
html[data-theme="dark"] .msg .who, html[data-theme="dark"] .chat-name { filter: brightness(1.8) saturate(.85); }
html[data-theme="dark"] .tree-box { background: #22313F; border-color: #3A4C5E; color: var(--ink); }
html[data-theme="dark"] .tree-box.focus { background: #E3B55A; color: #1A1408; border-color: #E3B55A; }
html[data-theme="dark"] .tpic-canvas svg ellipse:first-of-type { fill: #1C2B22; }
html[data-theme="dark"] .tpic-canvas svg ellipse:nth-of-type(2) { fill: #2E271D; }
.lang-pick select { font-family: system-ui, 'Segoe UI', Tahoma, sans-serif; }

/* ===== Laliş-Szene und Sterne (Owner 23.11.2026) ===== */
.greet-hero { position: relative; border-radius: 24px; overflow: hidden; min-height: 168px; box-shadow: 0 8px 24px rgba(60,40,20,.10); }
.greet-scene { position: absolute; inset: 0; }
.greet-scene svg { width: 100%; height: 100%; display: block; }
.greet-text { position: relative; padding: 16px 18px 70px; }
.greet-hero .greet-h { font-size: 30px; font-weight: 700; line-height: 1.12; color: #2E2823; }
.greet-date { font-size: 14px; font-weight: 600; color: #4E443B; margin-top: 4px; }
.greet-nacht .greet-h, .greet-morgenD .greet-h, .greet-tagD .greet-h, .greet-abendD .greet-h { color: #F6E6C2; }
.greet-nacht .greet-date, .greet-morgenD .greet-date, .greet-tagD .greet-date, .greet-abendD .greet-date { color: #D7DEE6; }
[dir=rtl] .greet-scene svg { transform: scaleX(-1); }
/* Achtzackiger Stern wie in den Steinen von Laliş, klein vor Kartenüberschriften */
.card > h2:first-child::before, .card > .row:first-child > h2::before, .next-card > .small:first-child::before {
  content: ''; display: inline-block; width: 14px; height: 14px; margin-inline-end: 8px; vertical-align: -1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23C9963A' d='M12 1.5l2.3 5.6 5.6-2.3-2.3 5.6L23.2 12l-5.6 2.3 2.3 5.6-5.6-2.3-2.3 5.6-2.3-5.6-5.6 2.3 2.3-5.6L.8 12l5.6-2.3L4.1 4.1l5.6 2.3z'/%3E%3C/svg%3E") center / contain no-repeat; }
.lalish-band { margin: -16px -16px 4px; height: 88px; overflow: hidden; border-radius: 22px 22px 0 0; }
.lalish-band svg { width: 100%; height: 100%; display: block; }
[dir=rtl] .lalish-band svg { transform: scaleX(-1); }
/* Stammbaum: In Erinnerung, Verlauf; Vorlesen (Owner-Prüfung D) */
.memorial { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(180deg, #F4EEE3, #EFE6D6); border: 1px solid #E2D4BC; }
.memorial-candle { font-size: 28px; line-height: 1; }
.memorial-title { font-size: 20px; font-weight: 700; color: #3B342E; }
html[data-theme="dark"] .memorial { background: #1C2836; border-color: #33475F; }
html[data-theme="dark"] .memorial-title { color: #F1E3B8; }
.tree-log { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.tree-log-item { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.tree-log-item.undone { opacity: .6; }
.tree-log-item > div:last-child:empty { display: none; }
.speak-btn { align-self: flex-start; }
.speak-btn[aria-pressed="true"] { background: var(--red); color: #fff; }
.ios-steps { margin: 0; padding-inline-start: 22px; font-size: 15px; line-height: 1.7; }
.ios-steps li { margin-bottom: 4px; }
/* Durchgang F29 (23.11.2026): Logo-Knopf 44 px hoch; Namensfarben im Chat im dunklen Modus heller */
header.top button.brand { min-height: 44px; }
/* ⓘ für eingeklappte Erklärungen */
.hint-btn { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; margin-inline-start: 6px;
  width: 26px; height: 26px; min-height: 26px; padding: 0; border-radius: 50%; border: 1.5px solid var(--gold, #C9963A); background: transparent;
  color: var(--gold, #C9963A); font: italic 700 14px/1 Georgia, serif; position: relative; }
.hint-btn::after { content: ''; position: absolute; inset: -9px; }
.hint-btn[aria-expanded="true"] { background: var(--gold, #C9963A); color: #fff; }
.card:not(.hints-open) .hint-text { display: none; }
.hint-solo { align-self: center; }
/* Auf- und zuklappbare Karten */
.card.foldable .fold-head h2, .card.foldable > h2 { cursor: pointer; }
.card.folded > :not(.fold-head) { display: none !important; }
.card.foldable > h2.fold-head, .card.foldable > .fold-head { min-height: 44px; display: flex; align-items: center; }
.card.foldable > .fold-head h2 { min-height: 44px; display: flex; align-items: center; }
.fold-chev { margin-inline-start: auto; padding-inline-start: 10px; }
.fold-chev::after { content: '▾'; color: var(--gold, #C9963A); font-size: 18px; }
.card:not(.folded) .fold-chev::after { content: '▴'; }
.card.folded .hint-btn { display: none; }
/* Buchstaben-Tastatur (Kurmancî, Arabisch, Lateinisch) */
.kb-btn { position: fixed; z-index: 60; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 14px; background: transparent; color: var(--red); font-size: 24px; line-height: 1; }
.kb-btn[hidden], .kb-panel[hidden] { display: none; }
.kb-btn[aria-expanded="true"] { background: var(--soft); }
.kb-panel { position: fixed; z-index: 70; inset: auto 0 0 0; margin: 0 auto; max-width: 480px; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--soft); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0,0,0,.12); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.kb-tabs { display: flex; gap: 4px; margin-bottom: 6px; }
.kb-tab { flex: 1; min-height: 44px; padding: 0 4px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font: 700 15px/1 inherit; font-family: inherit; }
.kb-tab[aria-pressed="true"] { background: var(--red); color: #fff; }
.kb-close { flex: 0 0 48px; }
.kb-row { display: flex; justify-content: center; gap: 3px; margin-bottom: 4px; }
.kb-key { flex: 1 1 0; min-width: 0; max-width: 48px; min-height: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: var(--card); color: var(--ink); font-family: inherit; font-size: 20px; font-weight: 500; line-height: 1; }
.kb-key:active { background: var(--sand-soft); }
.kb-key.kb-wide { max-width: 60px; flex-grow: 1.4; }
.kb-key.kb-wide[aria-pressed="true"] { background: var(--red); color: #fff; }
.kb-key.kb-space { max-width: none; flex-grow: 5; }
body.kb-open { padding-bottom: var(--kb-h, 0); }
body.kb-open nav { visibility: hidden; }
body.kb-open input, body.kb-open textarea { scroll-margin-bottom: calc(var(--kb-h, 0px) + 16px); }
body.kb-open .sheet-back { padding-bottom: var(--kb-h, 0); }
body.kb-open .composer, body.kb-open.in-chat .composer { bottom: var(--kb-h, 0); }
html[data-theme="dark"] .kb-panel { background: #0F1823; border-color: #33475F; }
html[data-theme="dark"] .kb-key { background: #22324A; color: #F3EEE4; }
html[data-theme="dark"] .kb-tab { color: #F3EEE4; }
html[data-theme="dark"] .kb-tab[aria-pressed="true"], html[data-theme="dark"] .kb-key.kb-wide[aria-pressed="true"] { background: #E7C77A; color: #17202B; }
html[data-theme="dark"] .kb-btn { color: #E7C77A; }
.card[hidden] { display: none; }
/* Chats übersichtlicher (Owner 23.11.2026) */
.chats-page { display: flex; flex-direction: column; gap: 12px; padding-bottom: 72px; }
.chat-q { border-radius: 999px; }
.chat-filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 6px; }
.chat-filter .chip { flex-shrink: 0; padding: 0 13px; }
.chat-row-sub { display: flex; align-items: center; gap: 6px; }
.chat-row-sub .chat-prev { min-width: 0; }
.chat-row .avatar, .sheet-back .chat-row .avatar { width: 46px; height: 46px; border-radius: 23px; }
.chat-row.unread .chat-prev { color: var(--ink); font-weight: 700; }
.chat-row-top > .small { flex-shrink: 0; }
.chat-count { flex-shrink: 0; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--red-dark); color: #fff; font-size: 13px; font-weight: 700; line-height: 22px; text-align: center; }
html[data-theme="dark"] .chat-count { background: #E3B55A; color: #1A1408; }
.chat-pin { font-size: 13px; flex-shrink: 0; }
.chat-fab { position: fixed; z-index: 29; bottom: calc(92px + env(safe-area-inset-bottom)); inset-inline-end: max(16px, calc(50vw - 224px)); width: 58px; height: 58px; padding: 0; border: 0; border-radius: 29px; background: var(--red); color: #fff; font-size: 30px; line-height: 1; box-shadow: 0 6px 18px rgba(59,52,46,.28); }
html[data-theme="dark"] .chat-fab { background: #E3B55A; color: #1A1408; }
body.kb-open .chat-fab { display: none; }
.about-text { margin: 4px 0 0; font-size: 15px; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
/* Profilbild groß */
[data-zoom] { cursor: zoom-in; position: relative; }
[data-zoom]::after { content: ''; position: absolute; inset: -4px; }
.pic-view { position: fixed; inset: 0; z-index: 120; background: rgba(15,20,26,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; cursor: zoom-out; }
.pic-view img { width: min(86vw, 420px); height: min(86vw, 420px); object-fit: cover; border-radius: 24px; background: #2B231D; }
.pic-view strong { color: #fff; font-size: 20px; text-align: center; }
.pic-x { position: absolute; top: calc(14px + env(safe-area-inset-top)); inset-inline-end: 14px; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 24px; background: rgba(255,255,255,.18); color: #fff; font-size: 20px; }
