/* Liebendo Prototyp — gemeinsames Design-System (Tokens, Grundlagen, Bausteine, Demo-Rahmen).
   Farben nur hier in :root. Abgeleitet aus liebendo-v2/packages/ui/src/tokens.css (Botanica + Nachtblau). */
@import url('fonts.css');

:root {
	--paper: #faf7f2;
	--paper-2: #f3eee5;
	--paper-3: #ebe3d3;
	--sheet: #fdfbf7;
	--ink: #2b2a28;
	--ink-muted: #5f5c57;
	--ink-soft: #77736c; /* nur ≥ 14 px auf Crème, 4,6:1 */
	--accent: #5b6b53;
	--accent-ink: #46533f;
	--accent-wash: #e4e9df;
	--accent-2: #c9a87c;
	--night: #14213d;
	--night-2: #1d2c4e;
	--night-3: #2a3a5f;
	--ivory: #f3ead6;
	--ivory-muted: #c9c3b5; /* auf Nachtblau 9,4:1 */
	--night-accent: #d4b78f;
	--line: #e3ded4;
	--line-strong: #cfc7b8;
	--success: #3f6b4a;
	--success-wash: #e3ecdf;
	--open: #8a5a12; /* „offen“, auf Crème 5,6:1 */
	--open-wash: #f5ead3;
	--error: #9b3b2e;
	--error-wash: #f4e1dc;
	--wa: #1f7a4d; /* WhatsApp-Bezug, nur als Akzentfläche mit hellem Text 5,4:1 */
	--wa-bubble: #e2f3d8;
	--wa-bg: #efe9df;
	--backdrop: rgba(20, 33, 61, 0.42);
	--stage: #e9e3d8;

	--font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
	--font-text: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

	--fs-xs: 0.75rem;
	--fs-s: 0.8125rem;
	--fs-m: 0.9375rem;
	--fs-l: 1.0625rem;
	--fs-xl: 1.375rem;
	--fs-2xl: 1.75rem;
	--fs-3xl: 2.25rem;
	--fs-4xl: 3rem;

	--r-s: 8px;
	--r-m: 14px;
	--r-l: 22px;
	--shadow-1: 0 1px 2px rgba(43, 42, 40, 0.06), 0 2px 8px -2px rgba(43, 42, 40, 0.08);
	--shadow-2: 0 1px 2px rgba(43, 42, 40, 0.06), 0 18px 40px -18px rgba(43, 42, 40, 0.35);
	--shadow-sheet: 0 -10px 40px -10px rgba(20, 33, 61, 0.35);
	--ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-text);
	font-size: var(--fs-m);
	line-height: 1.45;
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: 6px; }
.on-night :focus-visible, .night :focus-visible { outline-color: var(--night-accent); }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.01em; }
.italic { font-style: italic; }
.muted { color: var(--ink-muted); }
.small { font-size: var(--fs-s); }
.xsmall { font-size: var(--fs-xs); }
.strong { font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--ink-muted); }
.icon { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.icon-s { width: 16px; height: 16px; }
.icon-l { width: 24px; height: 24px; }

/* ---------- App-Gerüst (eine Perspektive = ein .screen) ---------- */
.screen { position: relative; overflow: hidden; background: var(--paper); height: 100%; width: 100%; display: flex; flex-direction: column; }
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.view.enter { animation: view-in 0.28s var(--ease); }
.view.enter-back { animation: view-back 0.28s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes view-back { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.view.fade { animation: view-fade 0.25s ease; }
@keyframes view-fade { from { opacity: 0; } to { opacity: 1; } }
.body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: none; }
.body::-webkit-scrollbar { display: none; }
.pad { padding: 0 16px; }
.stack > * + * { margin-top: 12px; }
.stack-s > * + * { margin-top: 6px; }
.stack-l > * + * { margin-top: 22px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-top { display: flex; align-items: flex-start; gap: 12px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.center { text-align: center; }
.gap-s { gap: 6px; }
.mt-s { margin-top: 8px; } .mt-m { margin-top: 16px; } .mt-l { margin-top: 28px; }
.mb-s { margin-bottom: 8px; } .mb-m { margin-bottom: 16px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Kopfzeile */
.top { flex: none; padding: 10px 16px 10px; display: flex; align-items: center; gap: 10px; min-height: 56px; background: var(--paper); position: relative; z-index: 3; }
.top.bordered { border-bottom: 1px solid var(--line); }
.top h1 { font-family: var(--font-display); font-size: var(--fs-xl); line-height: 1.15; }
.top .sub { font-size: var(--fs-xs); color: var(--ink-muted); }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; display: inline-grid; place-items: center; color: var(--ink); flex: none; }
.icon-btn:hover { background: var(--paper-2); }
.icon-btn.filled { background: var(--sheet); box-shadow: var(--shadow-1); }
.night .icon-btn, .on-night .icon-btn { color: var(--ivory); }
.night .icon-btn:hover, .on-night .icon-btn:hover { background: rgba(243, 234, 214, 0.1); }

/* Tab-Leiste unten */
.tabbar { flex: none; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--sheet); border-top: 1px solid var(--line); padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); position: relative; z-index: 4; }
.tab { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; font-size: 11px; color: var(--ink-muted); min-height: 50px; border-radius: 12px; position: relative; text-decoration: none; }
.tab .icon { width: 23px; height: 23px; }
.tab[aria-current='page'] { color: var(--accent-ink); font-weight: 600; }
.tab[aria-current='page']::before { content: ''; position: absolute; top: -7px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.tab .dot { position: absolute; top: 4px; right: calc(50% - 18px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--error); color: var(--sheet); font-size: 10px; line-height: 16px; font-weight: 600; }

/* Knöpfe */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent; font-weight: 600; font-size: var(--fs-m); text-decoration: none; transition: transform 0.12s ease, background 0.15s ease; white-space: nowrap; }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent-ink); color: var(--sheet); }
.btn-primary:hover { background: #3c4836; }
.btn-night { background: var(--night); color: var(--ivory); }
.btn-gold { background: var(--night-accent); color: var(--night); }
.btn-secondary { background: var(--sheet); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--paper-2); }
.btn-ghost { background: transparent; color: var(--accent-ink); padding: 0 12px; }
.btn-ghost:hover { background: var(--accent-wash); }
.btn-wa { background: var(--wa); color: var(--sheet); }
.btn-block { width: 100%; }
.btn-s { min-height: 36px; padding: 0 14px; font-size: var(--fs-s); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.on-night .btn-secondary, .night .btn-secondary { background: transparent; color: var(--ivory); border-color: rgba(243, 234, 214, 0.35); }
.link-btn { border: 0; background: none; padding: 6px 0; color: var(--accent-ink); font-weight: 600; font-size: var(--fs-s); display: inline-flex; align-items: center; gap: 4px; min-height: 36px; }

/* Karten und Listen */
.card { background: var(--sheet); border-radius: var(--r-m); box-shadow: var(--shadow-1); border: 1px solid var(--line); }
.card-pad { padding: 16px; }
.card-tap { display: block; width: 100%; text-align: left; border: 1px solid var(--line); font: inherit; color: inherit; transition: transform 0.12s ease, box-shadow 0.15s ease; }
.card-tap:hover { box-shadow: var(--shadow-2); }
.card-tap:active { transform: scale(0.99); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 26px 16px 10px; }
.section-title h2 { font-family: var(--font-display); font-size: var(--fs-l); }
.list { background: var(--sheet); border-radius: var(--r-m); border: 1px solid var(--line); overflow: hidden; }
.list > .li + .li { border-top: 1px solid var(--line); }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 60px; width: 100%; background: none; border: 0; text-align: left; color: inherit; text-decoration: none; }
button.li:hover, a.li:hover { background: var(--paper); }
.li .title { font-weight: 600; font-size: var(--fs-m); line-height: 1.3; }
.li .meta { font-size: var(--fs-s); color: var(--ink-muted); line-height: 1.35; }
.chev { color: var(--ink-soft); }

/* Avatare */
.av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-3); color: var(--ink); font-weight: 600; font-size: 14px; flex: none; }
.av-s { width: 30px; height: 30px; font-size: 12px; }
.av-xs { width: 24px; height: 24px; font-size: 10px; }
.av.t1 { background: #e4e9df; color: #3b4735; }
.av.t2 { background: #efe2cf; color: #6c4b1d; }
.av.t3 { background: #e5e2ee; color: #3e3a59; }
.av.t4 { background: #f0dfdc; color: #7a3a30; }
.avs { display: flex; }
.avs .av { border: 2px solid var(--sheet); }
.avs .av + .av { margin-left: -9px; }

/* Status */
.st { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: 600; padding: 3px 9px 3px 7px; border-radius: 999px; white-space: nowrap; line-height: 1.4; }
.st .icon { width: 13px; height: 13px; }
.st-ja { background: var(--success-wash); color: var(--success); }
.st-nein { background: var(--error-wash); color: var(--error); }
.st-offen { background: var(--open-wash); color: var(--open); }
.st-neutral { background: var(--paper-2); color: var(--ink-muted); }
.st-night { background: rgba(212, 183, 143, 0.16); color: var(--night-accent); }
.pdot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.pdot.ja { background: var(--success); }
.pdot.nein { background: var(--error); }
.pdot.offen { background: transparent; box-shadow: inset 0 0 0 2px var(--open); }
.pdot.neutral { background: var(--line-strong); }

/* Chips und Segmente */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--sheet); font-size: var(--fs-s); font-weight: 600; color: var(--ink); }
.chip .n { font-weight: 400; color: var(--ink-muted); }
.chip[aria-pressed='true'] { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
.chip[aria-pressed='true'] .n { color: var(--paper-3); }
.chip.soft { border-color: transparent; background: var(--accent-wash); color: var(--accent-ink); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--paper-2); border-radius: 999px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: transparent; border-radius: 999px; min-height: 40px; font-weight: 600; font-size: var(--fs-s); color: var(--ink-muted); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg button[aria-pressed='true'] { background: var(--sheet); color: var(--ink); box-shadow: var(--shadow-1); }
.seg.big button { min-height: 48px; font-size: var(--fs-m); }
.seg button[aria-pressed='true'].yes { background: var(--success); color: var(--sheet); }
.seg button[aria-pressed='true'].no { background: var(--ink); color: var(--sheet); }

/* Formulare */
.field { display: block; }
.field > span { display: block; font-size: var(--fs-s); font-weight: 600; margin-bottom: 6px; }
.input, .textarea, .select { width: 100%; min-height: 50px; border: 1px solid var(--line-strong); border-radius: var(--r-s); background: var(--sheet); padding: 12px 14px; font-size: 16px; }
.textarea { min-height: 120px; line-height: 1.5; resize: vertical; }
.input:focus, .textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.search { position: relative; }
.search .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); }
.search .input { padding-left: 42px; min-height: 44px; border-radius: 999px; background: var(--sheet); }
.check { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent-ink); flex: none; }
.toggle { position: relative; width: 50px; height: 30px; flex: none; }
.toggle input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.toggle span { position: absolute; inset: 0; border-radius: 999px; background: var(--line-strong); transition: background 0.2s; }
.toggle span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--sheet); box-shadow: 0 1px 3px rgba(0,0,0,0.2); transition: transform 0.2s var(--ease); }
.toggle input:checked + span { background: var(--accent-ink); }
.toggle input:checked + span::after { transform: translateX(20px); }
.toggle input:focus-visible + span { outline: 2px solid var(--accent-ink); outline-offset: 2px; }

/* Fortschritt */
.bar { height: 10px; border-radius: 999px; background: var(--paper-3); overflow: hidden; display: flex; }
.bar > i { display: block; height: 100%; transition: width 0.6s var(--ease); }
.bar .ja { background: var(--success); }
.bar .nein { background: var(--error); }
.bar .offen { background: repeating-linear-gradient(135deg, var(--open-wash) 0 4px, #ead9b6 4px 8px); }
.bar .ac { background: var(--accent); }
.bar .gold { background: var(--night-accent); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: var(--fs-s); color: var(--ink-muted); }
.legend b { color: var(--ink); font-weight: 600; }

/* KI-Hinweis */
.ai { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: 600; color: var(--accent-ink); background: var(--accent-wash); border-radius: 999px; padding: 3px 9px 3px 7px; }
.ai .icon { width: 14px; height: 14px; }
.night .ai { background: rgba(212, 183, 143, 0.16); color: var(--night-accent); }

/* Nachtflächen */
.night { background: var(--night); color: var(--ivory); }
.night .muted { color: var(--ivory-muted); }
.night .eyebrow { color: var(--night-accent); }
.night a { color: var(--night-accent); }
.stars { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.55; pointer-events: none; }

/* Blatt (Bottom-Sheet) */
.sheet-wrap { position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column; justify-content: flex-end; }
.sheet-backdrop { position: absolute; inset: 0; background: var(--backdrop); animation: fade-in 0.25s ease; border: 0; padding: 0; width: 100%; cursor: default; }
.sheet { position: relative; background: var(--paper); border-radius: 22px 22px 0 0; max-height: 92%; display: flex; flex-direction: column; box-shadow: var(--shadow-sheet); animation: sheet-up 0.34s var(--ease); }
.sheet.full { height: 94%; }
.sheet-wrap.closing .sheet { animation: sheet-down 0.24s ease forwards; }
.sheet-wrap.closing .sheet-backdrop { animation: fade-out 0.24s ease forwards; }
.sheet-handle { width: 40px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 8px auto 2px; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 8px 18px; flex: none; }
.sheet-head h2 { font-family: var(--font-display); font-size: var(--fs-xl); flex: 1; line-height: 1.2; }
.sheet-body { overflow-y: auto; padding: 4px 18px 18px; flex: 1; min-height: 0; scrollbar-width: none; }
.sheet-body::-webkit-scrollbar { display: none; }
.sheet-foot { flex: none; padding: 12px 18px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); display: flex; gap: 10px; }
.sheet-foot .btn { flex: 1; }
.sheet.night-sheet { background: var(--night); color: var(--ivory); }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-down { to { transform: translateY(100%); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

/* Toast */
.toast { position: absolute; left: 16px; right: 16px; bottom: 90px; z-index: 60; background: var(--ink); color: var(--sheet); border-radius: 14px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; font-size: var(--fs-s); box-shadow: var(--shadow-2); animation: toast-in 0.3s var(--ease); }
.toast .icon { color: #b9d3a9; }
.toast button { margin-left: auto; border: 0; background: none; color: var(--night-accent); font-weight: 600; font-size: var(--fs-s); padding: 6px; }
.toast.out { animation: fade-out 0.25s ease forwards; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }

/* WhatsApp-Attrappe */
.wa-chat { background: var(--wa-bg); flex: 1; min-height: 0; overflow-y: auto; padding: 14px 12px 20px; }
.wa-top { background: #1f3b33; color: #eef3ef; display: flex; align-items: center; gap: 10px; padding: 10px 12px; flex: none; }
.wa-top .icon-btn { color: #eef3ef; }
.wa-top .av { background: var(--paper); color: var(--night); }
.wa-top .name { font-weight: 600; font-size: var(--fs-m); line-height: 1.2; }
.wa-top .sub { font-size: var(--fs-xs); color: #b9cbc3; }
.wa-day { text-align: center; margin: 6px 0 12px; }
.wa-day span { display: inline-block; background: #fdfbf7; color: var(--ink-muted); font-size: 11px; padding: 4px 10px; border-radius: 8px; box-shadow: 0 1px 1px rgba(0,0,0,0.06); }
.wa-msg { max-width: 86%; background: var(--sheet); border-radius: 4px 14px 14px 14px; padding: 8px 10px 6px; box-shadow: 0 1px 1px rgba(0,0,0,0.08); font-size: 14.5px; line-height: 1.4; margin-bottom: 8px; animation: toast-in 0.35s var(--ease); }
.wa-msg.out { margin-left: auto; background: var(--wa-bubble); border-radius: 14px 4px 14px 14px; }
.wa-msg .time { font-size: 11px; color: var(--ink-soft); text-align: right; margin-top: 2px; display: flex; justify-content: flex-end; gap: 3px; align-items: center; }
.wa-msg .from { font-size: 12px; color: var(--wa); font-weight: 600; margin-bottom: 4px; }
.wa-preview { display: block; border-radius: 10px; overflow: hidden; background: var(--paper-2); margin: -2px -4px 8px; text-decoration: none; color: inherit; }
.wa-preview img { width: 100%; aspect-ratio: 1.9; object-fit: cover; }
.wa-preview .t { display: block; padding: 8px 10px 9px; }
.wa-preview .t b { display: block; font-size: 14px; }
.wa-preview .t span { font-size: 12px; color: var(--ink-muted); }
.wa-btns { display: grid; gap: 1px; margin: 6px -10px -6px; border-top: 1px solid var(--line); }
.wa-btns > * { border: 0; background: none; color: #1b72c0; font-weight: 600; min-height: 42px; font-size: 14.5px; display: flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.wa-btns > * + * { border-top: 1px solid var(--line); }
.ticks { display: inline-flex; color: var(--ink-soft); }
.ticks.read { color: #2f8fd8; }

/* Hilfsbausteine */
.divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }
.kpi { font-family: var(--font-display); font-size: var(--fs-3xl); line-height: 1; }
.kpi-s { font-family: var(--font-display); font-size: var(--fs-2xl); line-height: 1; }
.pill-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-m); background: var(--accent-wash); color: var(--accent-ink); font-size: var(--fs-s); line-height: 1.45; }
.pill-note.gold { background: var(--open-wash); color: #6c4b1d; }
.pill-note .icon { margin-top: 1px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.photo-grid img, .photo-grid .ph { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--paper-3); }
.photo-grid .sel { position: relative; }
.empty-pad { height: 24px; }
.skeleton { background: linear-gradient(90deg, var(--paper-2), var(--paper-3), var(--paper-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 6px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.count-up { font-variant-numeric: tabular-nums; }
.pop { animation: pop 0.4s var(--ease); }
@keyframes pop { 0% { transform: scale(0.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: none; opacity: 1; } }

/* ---------- Demo-Rahmen ---------- */
body.framed { background: var(--stage); min-height: 100vh; overflow: hidden; }
.stage { display: grid; grid-template-columns: minmax(300px, 380px) auto; gap: 48px; justify-content: center; align-items: center; height: 100vh; padding: 24px 32px; }
.device-wrap { width: calc(390px * var(--scale, 1) + 24px * var(--scale, 1)); height: calc(844px * var(--scale, 1) + 24px * var(--scale, 1)); }
.device { width: 414px; height: 868px; padding: 12px; border-radius: 56px; background: #1b1b1d; box-shadow: 0 0 0 1px #3a3a3e inset, 0 40px 80px -30px rgba(20, 33, 61, 0.55), 0 12px 24px -12px rgba(0,0,0,0.3); transform: scale(var(--scale, 1)); transform-origin: top left; position: relative; }
.device .screen { border-radius: 44px; }
.device .notch { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); width: 110px; height: 30px; border-radius: 20px; background: #1b1b1d; z-index: 100; pointer-events: none; }
.framed .screen > .statusbar { display: flex; }
.statusbar { display: none; flex: none; height: 44px; align-items: center; justify-content: space-between; padding: 6px 30px 0 34px; font-size: 14px; font-weight: 600; background: inherit; z-index: 5; }
.statusbar.on-night { background: var(--night); color: var(--ivory); }
.statusbar.on-wa { background: #1f3b33; color: #eef3ef; }
.statusbar .sb-ic { display: flex; gap: 5px; align-items: center; }
.narr { max-height: calc(100vh - 48px); overflow-y: auto; scrollbar-width: thin; padding-right: 6px; }
.narr .brand { font-family: var(--font-display); font-size: 1.5rem; }
.narr .brand em { color: var(--accent); font-style: normal; }
.narr h2 { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.15; margin-top: 4px; }
.narr .persp { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 18px; }
.narr .persp a { font-size: var(--fs-s); font-weight: 600; text-decoration: none; color: var(--ink-muted); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-strong); }
.narr .persp a[aria-current='page'] { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
.narr .phases { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 8px 0 18px; }
.narr .phases button { border: 1px solid var(--line-strong); background: var(--sheet); border-radius: 10px; padding: 7px 4px; font-size: 11px; font-weight: 600; line-height: 1.2; color: var(--ink-muted); min-height: 44px; }
.narr .phases button[aria-pressed='true'] { background: var(--night); color: var(--ivory); border-color: var(--night); }
.narr .note { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 16px; font-size: var(--fs-s); line-height: 1.5; }
.narr .note .wow { display: inline-block; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.04em; background: var(--night); color: var(--night-accent); padding: 3px 8px; border-radius: 6px; margin-bottom: 8px; }
.narr .note b { font-weight: 600; }
.narr ol { list-style: none; padding: 0; margin: 14px 0 0; counter-reset: sc; }
.narr ol li { counter-increment: sc; }
.narr ol button { width: 100%; text-align: left; border: 0; background: none; display: flex; gap: 10px; align-items: baseline; padding: 6px 8px; border-radius: 8px; font-size: var(--fs-s); color: var(--ink-muted); min-height: 32px; }
.narr ol button::before { content: counter(sc); font-variant-numeric: tabular-nums; font-size: 11px; width: 18px; text-align: right; color: var(--ink-soft); flex: none; }
.narr ol button:hover { background: var(--paper-2); color: var(--ink); }
.narr ol button[aria-current='step'] { background: var(--sheet); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-1); }
.narr .taps { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; font-size: var(--fs-s); color: var(--ink-muted); }
.narr .taps b { font-family: var(--font-display); font-size: 1.4rem; color: var(--ink); font-weight: 400; }
.narr .foot { margin-top: 18px; display: flex; gap: 14px; flex-wrap: wrap; font-size: var(--fs-s); }
.narr .foot a, .narr .foot button { color: var(--ink-muted); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; font-size: var(--fs-s); }
.demo-bar { display: none; }
body.mobile-demo .demo-bar { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; background: var(--ink); color: var(--paper-3); font-size: 12px; position: fixed; top: 0; left: 0; right: 0; z-index: 200; border: 0; width: 100%; text-align: left; }
.demo-bar b { color: var(--sheet); font-weight: 600; }
body.mobile-demo #app-root { top: 30px; }
#app-root { position: fixed; inset: 0; }
body.framed #app-root { position: static; }
@media (max-width: 959px) { .stage { display: block; padding: 0; height: auto; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

/* Trefferflächen ≥ 44 px auch für kompakte Bedienelemente (sichtbare Größe bleibt) */
.chip, .btn-s, .link-btn { position: relative; }
.chip::after, .btn-s::after, .link-btn::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
.seg button { min-height: 44px; }

.toggle::after { content: ''; position: absolute; inset: -7px -2px; }
