/* FamilyWall – Design-Tokens und Komponenten (Handoff „Familie Berger“). Kein Inline-Style: die CSP
   eines RaySpec-Frontend-Mounts erlaubt nur Dateien; dynamische Farben setzt das Script per CSSOM. */

@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/fonts/bricolage-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(/fonts/bricolage-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/outfit-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/outfit-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #F3F4F7; --card: #FFFFFF; --ink: #15181E; --muted: #6B7280; --line: #E6E8EE;
  --accent: #F2B705; --accent-ink: #1A1300; --soft: #FFF4CC; --danger: #D64545; --ok: #2E9E5B; --chip: #EEF0F4;
  --kid-bg: #E3F4E7; --kid-ink: #1F6B35;
  --head: 'Bricolage Grotesque', system-ui, sans-serif; --body: 'Outfit', system-ui, sans-serif;
  --shadow-card: 0 1px 2px rgba(0,0,0,.04);
  --safe-top: env(safe-area-inset-top, 0px); --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0F1115; --card: #1A1D23; --ink: #F3F4F6; --muted: #9AA0AA; --line: #2A2F38;
  --soft: #3A2E08; --chip: #262A33; --ok: #4FC27A; --danger: #F26D6D; --kid-bg: #16361F; --kid-ink: #8FDCA3;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
button { font-family: var(--body); color: inherit; cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; }
button:disabled { opacity: .5; cursor: default; }
input, textarea, select { font-family: var(--body); color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--muted); }
h1, h2, h3 { margin: 0; font-family: var(--head); letter-spacing: -.02em; }
a { color: inherit; }
svg { display: block; }
.hidden { display: none !important; }

/* Rahmen: zentriert, max. 480 px (keine Desktop-Komposition) */
#app { position: relative; margin: 0 auto; max-width: 480px; min-height: 100vh; min-height: 100dvh; background: var(--bg); overflow: hidden; }
@media (min-width: 520px) { #app { box-shadow: 0 0 0 1px var(--line); } }
.screen { padding: calc(16px + var(--safe-top)) 16px calc(110px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 14px; min-height: 100vh; min-height: 100dvh; }
.screen.push { padding-top: calc(60px + var(--safe-top)); }
.screen.push.hero { padding-top: calc(16px + var(--safe-top)); }
.screen.full { padding-bottom: calc(24px + var(--safe-bottom)); }

/* Typografie */
.h1 { font-size: 30px; font-weight: 800; line-height: 1.1; }
.h-sheet { font-size: 22px; font-weight: 800; font-family: var(--head); letter-spacing: -.02em; }
.sub { font-size: 13px; color: var(--muted); }
.sub.w500 { font-weight: 500; }
.meta { font-size: 12px; color: var(--muted); }
.over { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.over.danger { color: var(--danger); }
.big { font-family: var(--head); font-size: 34px; font-weight: 800; line-height: 1; margin-top: 6px; }
.num { font-family: var(--head); font-weight: 700; }
.ok { color: var(--ok); } .danger { color: var(--danger); } .muted { color: var(--muted); }
.strike { text-decoration: line-through; opacity: .5; }

/* Karten & Listen */
.card { background: var(--card); border-radius: 18px; padding: 16px; box-shadow: var(--shadow-card); }
.card.r16 { border-radius: 16px; }
.card.p14 { padding: 14px; }
.card.flush { padding: 0; overflow: hidden; border-radius: 16px; }
.card.outline { box-shadow: none; border: 1px solid var(--line); }
.card.clickable { cursor: pointer; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.row.start { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack.g8 { gap: 8px; } .stack.g10 { gap: 10px; } .stack.g6 { gap: 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid2.g10 { gap: 10px; }
.line-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); min-height: 48px; }
.line-row:last-child { border-bottom: 0; }
.line-row.clickable { cursor: pointer; }
.sep-top { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 14px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title15 { font-size: 15px; font-weight: 600; line-height: 1.25; }
.title17 { font-size: 17px; font-weight: 600; line-height: 1.2; }
.title14 { font-size: 14px; font-weight: 600; line-height: 1.2; }
.text14 { font-size: 14px; }
.text13 { font-size: 13px; }
.lh17 { line-height: 1.7; }
.mt2 { margin-top: 2px; } .mt4 { margin-top: 4px; } .mt6 { margin-top: 6px; } .mt10 { margin-top: 10px; } .mt14 { margin-top: 14px; }
.mb6 { margin-bottom: 6px; } .mb8 { margin-bottom: 8px; } .mb10 { margin-bottom: 10px; } .mb12 { margin-bottom: 12px; } .mb14 { margin-bottom: 14px; }
.pad-y8 { padding: 8px 0; }
.center { text-align: center; }
.empty { text-align: center; color: var(--muted); padding: 30px 0; font-size: 14px; }

/* Avatare & Kacheln */
.avatar { border-radius: 50%; color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 28px; height: 28px; font-size: 11px; }
.avatar.s22 { width: 22px; height: 22px; font-size: 10px; }
.avatar.s26 { width: 26px; height: 26px; font-size: 11px; }
.avatar.s30 { width: 30px; height: 30px; font-size: 12px; }
.avatar.s36 { width: 36px; height: 36px; font-size: 14px; }
.avatar.s40 { width: 40px; height: 40px; font-size: 14px; }
.avatar.s44 { width: 44px; height: 44px; font-size: 15px; }
.avatar.s48 { width: 48px; height: 48px; font-size: 18px; }
.avatar.s64 { width: 64px; height: 64px; font-size: 24px; }
.avatar.ring { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--accent); }
.avatar.ring-ink { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--ink); }
.avatar.open { background: var(--line); color: var(--muted); }
.tile { border-radius: 12px; display: flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 800; color: rgba(0,0,0,.45); flex-shrink: 0; overflow: hidden; background-size: cover; background-position: center; }
.tile.s32 { width: 32px; height: 32px; border-radius: 9px; font-size: 14px; }
.tile.s44 { width: 44px; height: 44px; font-size: 20px; }
.tile.s64 { width: 64px; height: 64px; border-radius: 14px; font-size: 26px; }
.tile.hero { height: 200px; border-radius: 20px; font-size: 72px; color: rgba(0,0,0,.35); position: relative; }
.tile.grid { height: 96px; border-radius: 0; font-size: 40px; color: rgba(0,0,0,.4); position: relative; }
.tile.has-photo { color: transparent; position: relative; }
.tile canvas.photo, .dropzone canvas.photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.dropzone { position: relative; overflow: hidden; }
.avatar-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; font: 500 12px var(--body); color: var(--ink); }
.avatar-btn.s11 { font-size: 11px; }
.avatar-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 14px var(--body); padding: 12px 14px; border-radius: 14px; min-height: 44px; }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.ink { background: var(--ink); color: var(--bg); }
.btn.outline { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn.ghost { background: none; color: var(--ink); border: 1px solid var(--line); }
.btn.chipbg { background: var(--chip); color: var(--ink); }
.btn.chipbg.danger { color: var(--danger); }
.btn.soft { background: var(--soft); color: var(--ink); justify-content: space-between; text-align: left; }
.btn.dashed { background: none; border: 1px dashed var(--muted); color: var(--ink); }
.btn.block { width: 100%; }
.btn.big { font-size: 15px; padding: 14px; }
.btn.xl { font-size: 16px; padding: 16px; min-height: 52px; }
.btn.flex1 { flex: 1; } .btn.flex2 { flex: 2; }
.btn.sm { font-size: 13px; padding: 10px; }
.pill { display: inline-flex; align-items: center; justify-content: center; font: 600 13px var(--body); padding: 8px 14px; border-radius: 999px; white-space: nowrap; }
.pill.accent { background: var(--accent); color: var(--accent-ink); }
.pill.ink { background: var(--ink); color: var(--bg); }
.pill.ok { background: var(--ok); color: #fff; font-size: 12px; padding: 6px 10px; }
.pill.ghost { background: none; border: 1px solid var(--line); color: var(--muted); font-size: 12px; padding: 6px 10px; }
.pill.sm { font-size: 12px; padding: 6px 10px; }
.pill.xs { font-size: 12px; padding: 6px 12px; }
.pill.tint { font: 500 11px var(--body); padding: 4px 8px; color: rgba(0,0,0,.6); max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.chip { font: 500 13px var(--body); padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); white-space: nowrap; }
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.dashed { background: none; border: 1px dashed var(--muted); }
.chip.dashed.sm { font-size: 12px; padding: 4px 10px; }
.chip.muted-hint { color: var(--muted); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.tag { font: 500 12px var(--body); padding: 4px 10px; border-radius: 999px; background: var(--chip); color: var(--ink); }
.badge { font: 600 11px var(--body); padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.badge.admin { background: var(--soft); color: var(--accent-ink); }
.badge.member { background: var(--chip); color: var(--ink); }
.badge.child { background: var(--kid-bg); color: var(--kid-ink); }
.badge.profile { background: var(--chip); color: var(--muted); }
.badge.pending { background: var(--chip); color: var(--muted); }
:root[data-theme="dark"] .badge.admin { color: var(--accent); }
.round { position: relative; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1; flex-shrink: 0; }
.round.s28 { width: 28px; height: 28px; font-size: 16px; background: none; }
.round.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.round.vote-up.active { background: var(--ok); color: #fff; border-color: var(--ok); }
.round.vote-down.active { background: var(--danger); color: #fff; border-color: var(--danger); }
.round.vote { color: var(--muted); }
.link { font: 500 13px var(--body); color: var(--muted); }
.link.ink { color: var(--ink); font-weight: 600; }
.btns { display: flex; gap: 8px; }

/* Segment-Control */
.segment { display: flex; background: var(--chip); border-radius: 12px; padding: 3px; gap: 3px; }
.segment button { flex: 1; font: 600 13px var(--body); padding: 8px 0; border-radius: 10px; color: var(--muted); }
.segment button.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.segment.sm button { font-size: 12px; }

/* Checkboxen & Toggles */
.check { position: relative; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); background: none; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background .2s, border-color .2s; }
.check.s28 { width: 28px; height: 28px; }
.check.done { background: var(--ok); border-color: var(--ok); }
.check.overdue { border-color: var(--danger); }
.check svg { opacity: 0; }
.check.done svg { opacity: 1; }
.box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.box.done { background: var(--ok); border-color: var(--ok); }
.box svg { opacity: 0; } .box.done svg { opacity: 1; }
.toggle { width: 46px; height: 28px; border-radius: 999px; background: var(--line); position: relative; flex-shrink: 0; transition: background .2s; }
.toggle.on { background: var(--ok); }
.toggle span { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .2s; }
.toggle.on span { left: 21px; }

/* Felder */
.field { width: 100%; border-radius: 12px; border: 1px solid var(--line); padding: 12px; font: 400 14px var(--body); background: var(--bg); color: var(--ink); outline: none; }
.field.strong { font: 600 16px var(--body); }
.field.w500 { font: 500 16px var(--body); }
.field:focus { border-color: var(--muted); }
textarea.field { height: 110px; resize: none; }
.field-row { display: flex; gap: 8px; }
.field-row .field { min-width: 0; flex: 1; }
.search { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 12px; padding: 10px 14px; border: 1px solid var(--line); }
.search input { flex: 1; border: 0; background: none; font: 400 15px var(--body); color: var(--ink); outline: none; min-width: 0; }
.search .plus { font-size: 20px; line-height: 1; color: var(--muted); }
label.lbl { display: block; font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.dropzone { height: 140px; border-radius: 14px; border: 2px dashed var(--muted); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; text-align: center; padding: 10px; }
.dropzone.has-photo { border-style: solid; border-color: var(--line); background-size: cover; background-position: center; color: transparent; }

/* Woche */
.day-row { display: flex; gap: 12px; align-items: stretch; }
.day-col { width: 40px; text-align: center; padding-top: 10px; flex-shrink: 0; }
.day-col .dow { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.day-col .dnum { font-family: var(--head); font-size: 20px; font-weight: 700; width: 34px; height: 34px; line-height: 34px; margin: 2px auto 0; border-radius: 50%; }
.day-col .dnum.today { background: var(--accent); color: var(--accent-ink); }
.slot { flex: 1; background: var(--card); border-radius: 16px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; cursor: pointer; border: 1px solid transparent; box-shadow: var(--shadow-card); min-height: 68px; }
.slot.empty { border: 1px dashed var(--line); box-shadow: none; }
.slot.empty .title15 { color: var(--muted); }
.slot.dragging { opacity: .35; }
.slot.drop-target { outline: 2px solid var(--accent); outline-offset: 2px; background: var(--soft); }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none; box-shadow: 0 10px 30px rgba(0,0,0,.25); transform: translate(-9999px, -9999px); }
.slot-stack { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.slot-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }

/* Rezept-Grid */
.recipe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.recipe-card { background: var(--card); border-radius: 16px; overflow: hidden; cursor: pointer; box-shadow: var(--shadow-card); }
.recipe-card .body { padding: 10px 12px 12px; }
.fav { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.85); display: flex; align-items: center; justify-content: center; }
.fav.s36 { top: 12px; right: 12px; width: 36px; height: 36px; background: rgba(255,255,255,.9); }
.source-badge { position: absolute; bottom: 12px; left: 12px; font-size: 11px; font-weight: 600; background: rgba(255,255,255,.85); color: #15181E; padding: 4px 8px; border-radius: 999px; }
.stats4 { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card); border-radius: 16px; padding: 12px 6px; text-align: center; box-shadow: var(--shadow-card); }
.stats4 .num { font-size: 18px; }
.stats4 .meta { font-size: 11px; }
.ing-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ing-row:last-child { border-bottom: 0; }
.step-row { display: flex; gap: 12px; padding: 8px 0; font-size: 14px; line-height: 1.45; }
.step-row .n { font-family: var(--head); font-weight: 700; color: var(--muted); width: 18px; flex-shrink: 0; }
.stars { display: flex; gap: 6px; }
.stars button { font-size: 26px; line-height: 1; color: var(--line); }
.stars button.on { color: var(--accent); }
.suggest-card { background: var(--card); border-radius: 14px; padding: 12px; border: 1px solid var(--line); }
.suggest-row { display: flex; justify-content: space-between; gap: 6px; font-size: 13px; padding: 4px 0; cursor: pointer; }

/* Kochansicht */
.progress { display: flex; gap: 4px; }
.progress span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.progress span.on { background: var(--accent); }
.cook-step { font-size: 26px; line-height: 1.35; font-weight: 500; text-wrap: pretty; }
.cook-label { font-family: var(--head); font-size: 14px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.timer { font-family: var(--head); font-size: 40px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.bottom { margin-top: auto; }

/* Abstimmung */
.poll-head { background: var(--accent); color: var(--accent-ink); border-radius: 18px; padding: 16px; }
.poll-head .h { font-family: var(--head); font-size: 20px; font-weight: 800; }
.poll-head .state { font-size: 12px; font-weight: 700; background: rgba(0,0,0,.12); padding: 3px 8px; border-radius: 999px; }
.cand { background: var(--card); border-radius: 16px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow-card); border: 1px solid transparent; }
.cand.submitted { border: 1px dashed var(--muted); }
.cand .rank { font-family: var(--head); font-size: 16px; font-weight: 700; color: var(--muted); width: 18px; text-align: center; }
.score { font-size: 13px; font-weight: 700; min-width: 20px; text-align: center; }
.voter { opacity: .35; border: 2px solid transparent; }
.voter.voted { opacity: 1; border-color: rgba(0,0,0,.25); }

/* Einkauf */
.live { font-size: 12px; color: var(--ok); display: flex; align-items: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; flex-shrink: 0; }
.dot.off { background: var(--muted); }
.wish { background: var(--card); border-radius: 14px; padding: 12px 14px; border: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.done-list { opacity: .7; }
.caret { display: inline-block; transition: transform .2s; }
.caret.open { transform: rotate(180deg); }

/* Haushalt */
.task { background: var(--card); border-radius: 16px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow-card); border: 1px solid transparent; }
.task.overdue { border-color: var(--danger); }
.bar { flex: 1; height: 10px; background: var(--chip); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 999px; }
.person-card { background: var(--card); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-card); }
.hint-soft { background: var(--soft); border-radius: 12px; padding: 10px 14px; font-size: 13px; }
.hint-soft.row-hint { border-radius: 10px; padding: 8px 12px; display: flex; gap: 8px; align-items: center; }
.swatch { width: 36px; height: 36px; border-radius: 50%; }
.swatch.active { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--ink); }
.pts { display: flex; gap: 4px; }
.range-opt { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg); color: var(--ink); font: 500 15px var(--body); text-align: left; }
.range-opt.active { border-color: var(--accent); }
.pick.muted { opacity: .55; }
.pick { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); color: var(--ink); font: 500 14px var(--body); text-align: left; width: 100%; }

/* Familie */
.qr { width: 176px; height: 176px; margin: 0 auto; border-radius: 16px; background: #fff; border: 1px solid var(--line); padding: 10px; display: block; }
.link-row { display: flex; gap: 8px; align-items: center; background: var(--bg); border-radius: 12px; padding: 10px 12px; border: 1px solid var(--line); font-size: 13px; }

/* Push-Screens: Zurück-Button, FAB, Tab-Leiste */
.back { position: fixed; top: calc(14px + var(--safe-top)); left: 14px; width: 40px; height: 40px; border-radius: 50%; background: var(--card); color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.15); display: flex; align-items: center; justify-content: center; z-index: 5; }
@media (min-width: 520px) { .back { left: calc(50% - 240px + 14px); } }
.fab { position: fixed; right: 16px; bottom: calc(104px + var(--safe-bottom)); height: 48px; padding: 0 18px 0 14px; border-radius: 999px; background: var(--ink); color: var(--bg); font: 600 14px var(--body); box-shadow: 0 6px 18px rgba(0,0,0,.2); display: flex; align-items: center; gap: 6px; z-index: 5; }
.fab .plus { font-size: 20px; line-height: 1; }
@media (min-width: 520px) { .fab { right: calc(50% - 240px + 16px); } }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 480px; padding: 8px 8px calc(22px + var(--safe-bottom)); background: var(--card); border-top: 1px solid var(--line); display: flex; z-index: 4; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font: 600 10.5px var(--body); padding: 4px 0; position: relative; }
.tab.active { color: var(--ink); }
.tab .ico { width: 52px; height: 30px; border-radius: 999px; display: flex; align-items: center; justify-content: center; }
.tab.active .ico { background: var(--soft); }
.tab .tbadge { position: absolute; top: 0; right: calc(50% - 26px); min-width: 16px; height: 16px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

/* Sheets */
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 20; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 480px; background: var(--card); border-radius: 24px 24px 0 0; padding: 12px 18px calc(28px + var(--safe-bottom)); z-index: 21; max-height: 82%; overflow-y: auto; animation: fwUp .25s ease-out; color: var(--ink); }
.sheet .grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 14px; }
@keyframes fwUp { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(120px + var(--safe-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 500; padding: 10px 16px; border-radius: 999px; z-index: 30; white-space: nowrap; max-width: 85%; overflow: hidden; text-overflow: ellipsis; animation: fwToast 2.4s ease forwards; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
@keyframes fwToast { 0% { opacity: 0; transform: translate(-50%, 8px); } 12% { opacity: 1; transform: translate(-50%, 0); } 85% { opacity: 1; } 100% { opacity: 0; } }

/* Offline-Banner */
.offline { position: fixed; bottom: calc(96px + var(--safe-bottom)); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px; z-index: 15; display: flex; gap: 6px; align-items: center; }

/* Auth / Onboarding */
.auth { padding: calc(48px + var(--safe-top)) 24px 40px; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; gap: 18px; }
.logo { font-family: var(--head); font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.logo span { color: var(--accent); }
.auth form { display: flex; flex-direction: column; gap: 10px; }
.auth .err { color: var(--danger); font-size: 13px; }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pinpad button { font: 600 22px var(--head); height: 56px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow-card); }
.pin-dots { display: flex; gap: 10px; justify-content: center; }
.pin-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); }
.pin-dots span.on { background: var(--ink); border-color: var(--ink); }
.profile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.profile-grid button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow-card); font: 600 13px var(--body); }

/* Große Touch-Ziele: kleine runde Bedienelemente bekommen eine unsichtbare 44-px-Trefferfläche. */
.round::before, .check::before { content: ''; position: absolute; inset: -5px; border-radius: 50%; }
.round.s28::before { inset: -8px; }
.check::before { inset: -9px; }
.check.s28::before { inset: -8px; }
.avatar.emoji { font-size: 1.15em; }
.avatar.emoji.s40, .avatar.emoji.s44, .avatar.emoji.s48 { font-size: 22px; }
.avatar.emoji.s64 { font-size: 32px; }
.chips.avatars .round { font-size: 17px; }
.submit-decide { gap: 6px; width: 100%; padding-top: 6px; border-top: 1px dashed var(--line); }
.cand { flex-wrap: wrap; }
canvas.photo.s44 { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }

/* ---- Kein Auto-Zoom am Handy -------------------------------------------------------------------
   iOS Safari zoomt beim Fokus in jedes Eingabefeld unter 16 px hinein (und bleibt dort), und ein
   schnelles Doppeltippen auf Chips/Kacheln zoomt ebenfalls. Auf Touch-Geräten deshalb: Eingaben
   mindestens 16 px, und `manipulation` für die ganze Seite (Doppeltipp-Zoom aus, Pinch-Zoom bleibt –
   bewusst KEIN maximum-scale/user-scalable=no im Viewport, das wäre eine Barriere). */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; }
@media (pointer: coarse), (hover: none) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  textarea, select { font-size: max(16px, 1em) !important; }
}
