:root {
  --bg: #F7F2EA;
  --card: #FFFFFF;
  --ink: #2A2420;
  --muted: #857B73;
  --line: #ECE4D9;
  --chip: #F1EBE3;
  --accent: #C1714A;
  --accent-ink: #FFFFFF;
  --accent-soft: #F6E6DC;
  --teal: #3AA597;
  --teal-soft: #E1F1EE;
  --danger: #D9534F;
  --danger-soft: #FCEBEA;
  --stage: #E9E2D8;
  --panel: #FFFFFF;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  --r: 14px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--stage); color: var(--ink); font: 15px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }

/* ---------- Bühne: Telefon + Demo-Panel ---------- */
.stage { min-height: 100%; display: flex; gap: 32px; align-items: center; justify-content: center; padding: 24px 16px; flex-wrap: wrap; }
.phone {
  position: relative; width: 390px; height: 844px; background: var(--bg);
  border-radius: 48px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 0 0 10px #1d1a17, 0 30px 80px rgba(0,0,0,.25);
}
.statusbar { height: 50px; flex: none; display: flex; justify-content: space-between; align-items: center; padding: 0 30px; font-size: 14px; font-weight: 600; }
.statusbar > span:last-child { font-size: 9px; letter-spacing: 1px; }
.island { width: 110px; height: 30px; background: #111; border-radius: 20px; }
.screen { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 20px 24px; scrollbar-width: none; }
.screen::-webkit-scrollbar { display: none; }
.screen.full { padding: 0; }

@media (max-width: 500px) {
  .stage { padding: 0; display: block; }
  .phone { width: 100%; height: 100dvh; border-radius: 0; box-shadow: none; }
  .statusbar { display: none; }
  .screen { padding-top: max(16px, env(safe-area-inset-top)); }
  .demo { margin: 16px; }
}

/* ---------- Typo ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 30px; line-height: 1.15; }
h2 { font-size: 22px; }
h3 { font-size: 17px; margin: 22px 0 10px; }
.sub { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.small { font-size: 12.5px; color: var(--muted); }
.hl-accent { color: var(--accent); font-weight: 600; }
.hl-teal { color: var(--teal); font-weight: 600; }
.center { text-align: center; }

/* ---------- Bausteine ---------- */
.topbar { display: flex; align-items: center; gap: 14px; margin: 6px 0 18px; }
.topbar h1, .topbar h2 { flex: 1; }
.back { width: 38px; height: 38px; border: 1px solid var(--ink); border-radius: 8px; background: transparent; display: grid; place-items: center; cursor: pointer; flex: none; text-decoration: none; font-size: 18px; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 4px 0; font-weight: 500; text-decoration: none; }
.card { background: var(--card); border-radius: var(--r); padding: 14px; margin-bottom: 12px; }
.card.flat { padding: 0; overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); text-decoration: none; cursor: pointer; background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; }
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 500; }
.row .chev { color: var(--accent); }
.icon { width: 36px; height: 36px; border-radius: 9px; background: var(--teal-soft); display: grid; place-items: center; flex: none; font-size: 18px; }
.icon.neutral { background: var(--chip); }
.avatar { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 600; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 20px; border-radius: 14px; }

.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 13px 16px; border-radius: 8px; border: 1px solid transparent; background: var(--accent); color: var(--accent-ink); font-weight: 600; cursor: pointer; text-decoration: none; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.white { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn.teal { background: var(--teal); }
.btn.danger { background: var(--danger); }
.btn.sm { width: auto; padding: 8px 12px; font-size: 13px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.stack > * + * { margin-top: 10px; }
.bottom { position: sticky; bottom: 0; padding-top: 16px; background: linear-gradient(transparent, var(--bg) 30%); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; border-radius: 999px; background: var(--chip); border: 1px solid transparent; font-size: 13px; cursor: pointer; }
.chip.on { background: var(--teal); color: #fff; }
.chip.static { cursor: default; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--chip); font-size: 12px; }
.pill.plus { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.pill.teal { background: var(--teal-soft); color: var(--teal); font-weight: 600; }

label.field { display: block; margin-bottom: 10px; }
label.field > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.input, select.input, textarea.input { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); outline: none; }
.input:focus { border-color: var(--teal); }
textarea.input { min-height: 80px; resize: vertical; }

.progress { height: 6px; background: var(--line); border-radius: 6px; margin-bottom: 20px; overflow: hidden; }
.progress > div { height: 100%; background: var(--teal); border-radius: 6px; transition: width .3s; }

.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #C9C2B9; border-radius: 26px; cursor: pointer; transition: .2s; }
.switch span::before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--teal); }
.switch input:checked + span::before { transform: translateX(18px); }

.empty { text-align: center; padding: 50px 10px 20px; }
.empty .art { font-size: 64px; margin-bottom: 14px; }

.notice { border-radius: var(--r); padding: 12px 14px; margin-bottom: 14px; font-size: 13.5px; }
.notice.warn { background: var(--accent-soft); color: #7a3f22; }
.notice.danger { background: var(--danger-soft); color: #8a2421; border: 1px solid #f2b8b5; }
.notice.info { background: var(--teal-soft); color: #1f5f56; }

/* ---------- Splash & Onboarding ---------- */
.splash { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: radial-gradient(circle at 50% 70%, #fffaf2, var(--bg)); }
.splash.teal { background: radial-gradient(circle at 50% 70%, #55bcae, var(--teal)); color: #fff; }
.logo { font-family: var(--serif); font-size: 64px; font-weight: 400; letter-spacing: -0.03em; }
.splash .gift { font-size: 120px; margin-top: 60px; filter: drop-shadow(0 20px 30px rgba(0,0,0,.15)); }
.onb { height: 100%; display: flex; flex-direction: column; padding: 8px 20px 24px; }
.onb .hero { height: 330px; border-radius: 14px; display: grid; place-items: center; font-size: 110px; flex: none; }
.onb h1 { margin-top: 22px; }
.onb p { color: var(--muted); }
.dots { display: flex; gap: 6px; justify-content: center; margin: auto 0 18px; }
.dots i { width: 8px; height: 6px; border-radius: 6px; background: var(--line); }
.dots i.on { width: 22px; background: var(--teal); }

/* ---------- Home ---------- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.occ-card { background: var(--card); border-radius: var(--r); padding: 12px; text-decoration: none; display: flex; flex-direction: column; gap: 6px; }
.occ-card .name { font-weight: 600; }
.occ-card .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.occ-card .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-weight: 600; }
.occ-card .go { width: 28px; height: 28px; border: 1px solid var(--ink); border-radius: 6px; display: grid; place-items: center; }
.spontan { display: flex; align-items: center; gap: 12px; background: var(--teal); color: #fff; border-radius: var(--r); padding: 14px; text-decoration: none; margin: 16px 0 6px; cursor: pointer; border: 0; width: 100%; text-align: left; }
.spontan .icon { background: rgba(255,255,255,.2); }

/* ---------- Ideen ---------- */
.idea { background: var(--card); border-radius: var(--r); padding: 12px; margin-bottom: 12px; display: grid; grid-template-columns: 92px 1fr; gap: 12px; }
.idea .img { width: 92px; height: 104px; border-radius: 10px; display: grid; place-items: center; font-size: 46px; }
.idea .t { font-weight: 600; line-height: 1.25; }
.idea .why { font-size: 13px; color: var(--muted); margin: 4px 0 8px; }
.idea .actions { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.idea .gifted { display: flex; align-items: center; gap: 6px; margin-left: auto; font-size: 13px; cursor: pointer; user-select: none; }
.idea .gifted input { width: 18px; height: 18px; accent-color: var(--teal); }
.idea.old { opacity: .62; }
.round-sep { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; margin: 20px 0 12px; }
.round-sep::before, .round-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---------- Loading / Fehler ---------- */
.loading { height: 100%; display: flex; flex-direction: column; text-align: center; padding: 20px; }
.loading .art { font-size: 110px; margin-top: 130px; animation: bob 2s ease-in-out infinite; }
.loading h2 { margin-top: 30px; min-height: 60px; }
.loading .btn { margin-top: auto; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-3deg); } }

/* ---------- Tabbar ---------- */
.tabbar { flex: none; display: flex; justify-content: space-around; background: var(--card); padding: 10px 0 22px; border-radius: 18px 18px 0 0; box-shadow: 0 -4px 20px rgba(0,0,0,.04); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; color: var(--muted); text-decoration: none; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a.on { color: var(--teal); }

/* ---------- Push, Sheet, Toast ---------- */
.push { position: absolute; top: 54px; left: 10px; right: 10px; z-index: 30; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-radius: 18px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.18); display: flex; gap: 10px; cursor: pointer; animation: drop .35s ease-out; }
.push .app { width: 36px; height: 36px; border-radius: 9px; background: var(--teal); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-size: 15px; flex: none; }
.push b { display: block; font-size: 13px; }
.push span { font-size: 13px; }
@keyframes drop { from { transform: translateY(-120%); } }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(30,25,20,.45); z-index: 20; display: flex; align-items: flex-end; }
.sheet { background: var(--bg); width: 100%; border-radius: 22px 22px 0 0; padding: 20px 20px 30px; max-height: 88%; overflow-y: auto; animation: up .25s ease-out; }
.sheet .grab { width: 40px; height: 5px; border-radius: 5px; background: var(--line); margin: -8px auto 14px; }
@keyframes up { from { transform: translateY(100%); } }
.toast { position: absolute; bottom: 100px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13px; z-index: 40; white-space: nowrap; }

table.compare { width: 100%; border-collapse: collapse; font-size: 13px; }
table.compare th, table.compare td { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: left; }
table.compare th:not(:first-child), table.compare td:not(:first-child) { text-align: center; width: 70px; }
table.compare .yes { color: var(--teal); font-weight: 700; }

input[type=range] { width: 100%; accent-color: var(--teal); }

/* ---------- Demo-Panel ---------- */
.demo { width: 300px; background: var(--panel); border-radius: 16px; padding: 18px; font-size: 13.5px; box-shadow: 0 10px 30px rgba(0,0,0,.06); }
.demo h2 { font-family: var(--sans); font-size: 15px; font-weight: 600; }
.demo-note { color: var(--muted); font-size: 12.5px; }
.demo-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 12px 0; }
.demo-row input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
.demo-group { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.demo-group > span { font-weight: 600; font-size: 12.5px; }
.demo button { padding: 8px 10px; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; cursor: pointer; text-align: left; }
.demo button:hover { border-color: var(--teal); }
.demo button.danger { color: var(--danger); }
.seg { display: inline-flex; background: var(--chip); border-radius: 8px; padding: 3px; }
.demo .seg button { border: 0; background: transparent; padding: 5px 14px; text-align: center; }
.demo .seg button.on { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.1); font-weight: 600; }
