/* ============================================================
   Kibbo — „Ich weiß, wo alles ist."
   Helles, freundliches Design (Blau + Orange), mobil-first.
   ============================================================ */
:root {
  /* App-Hintergrund = Weiß, passend zum weißen Hintergrund der Maskottchen-Bilder,
     damit diese nahtlos einblenden (kein weißer Kasten). Karten heben sich per Rand/Schatten ab. */
  --bg: #ffffff;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-input: #f1f3f7;
  --bg-tint: #f0f3f8;
  --line: #e7eaf0;
  --text: #14171c;
  --text-dim: #626b78;
  --text-faint: #9aa2ae;

  --blue: #1b6ef3;
  --blue-2: #2f8bff;
  --orange: #ff7a1a;
  --orange-2: #ff9a3d;
  --accent: var(--blue);
  --accent-soft: rgba(27, 110, 243, 0.10);
  --orange-soft: rgba(255, 122, 26, 0.12);

  --green: #16b364;
  --amber: #f5a300;
  --red: #ef4444;

  --radius: 22px;
  --radius-sm: 16px;
  --shadow-sm: 0 2px 10px rgba(20, 30, 60, 0.08);
  --shadow: 0 10px 30px rgba(20, 30, 60, 0.10);
  --shadow-lg: 0 18px 50px rgba(20, 30, 60, 0.16);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --header-h: 56px;
  --navbar-h: 72px;
  --font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Immer helles Design (wie im Kibbo-Mockup) – kein automatischer Dunkelmodus. */
:root { color-scheme: light; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
input, textarea, select { outline: none; }
a { color: var(--blue); text-decoration: none; }
::placeholder { color: var(--text-faint); }

#app { min-height: 100%; display: flex; flex-direction: column; }
.screen { flex: 1; display: flex; flex-direction: column; }
.hidden { display: none !important; }
.svg-i { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Header (Glocke · Logo zentriert · Avatar · Trennlinie) ---------- */
.header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center;
  padding: calc(var(--safe-top) + 6px) 16px 6px;
  background: var(--bg); /* deckend, damit multiply das Logo-Weiß sauber entfernt */
  border-bottom: 1px solid var(--line);
}
/* Logo per Flexbox zentriert – KEIN transform (das würde den multiply-Effekt isolieren) */
.head-logo { flex: 1; display: flex; justify-content: center; align-items: center; min-width: 0; }
.head-logo-img { height: 66px; width: auto; max-width: 210px; object-fit: contain; mix-blend-mode: multiply; display: block; margin: -8px 0; }
.bell-btn { flex: 0 0 auto; }
.head-right { flex: 0 0 auto; }
/* Glocke schlicht (kein Kasten) + oranger Melde-Punkt */
.bell-btn {
  width: 42px; height: 42px; display: grid; place-items: center; color: var(--text);
  position: relative; background: none;
}
.bell-btn .svg-i { width: 27px; height: 27px; }
.bell-btn .badge-dot { position: absolute; top: 5px; right: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); border: 2px solid var(--bg); }
.head-right { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #6aa8ff); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 16px;
  box-shadow: var(--shadow-sm);
}
.sync-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-faint); flex-shrink: 0; }
.sync-dot.green { background: var(--green); }
.sync-dot.amber { background: var(--amber); animation: pulse-dot 1.4s infinite; }
.sync-dot.gray { background: var(--text-faint); }
@keyframes pulse-dot { 0%,100% { box-shadow: 0 0 0 0 rgba(245,163,0,.5);} 50% { box-shadow: 0 0 0 5px rgba(245,163,0,0);} }

.offline-banner {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  background: var(--orange-soft); color: #b45309;
  font-size: 13px; font-weight: 600; padding: 8px 12px;
  margin: 0 16px 4px; border-radius: 12px;
}
.offline-banner .svg-i { width: 16px; height: 16px; }

.content { flex: 1; padding: 4px 16px calc(var(--navbar-h) + var(--safe-bottom) + 20px); }

/* ---------- Hero (Wortmarke, Maskottchen, Begrüßung) ---------- */
/* Kompakt gehalten, damit der Startbildschirm ohne Scrollen aufs Handy passt. */
.hero { text-align: center; padding: 2px 0 0; }
/* Kopf-Logo „kibbo" (kompakt, zentriert – wie im Mockup) */
.wordmark { font-weight: 900; font-size: 30px; letter-spacing: -1px; line-height: 1; display: inline-flex; align-items: center; }
.wordmark .wm-k { color: #ffffff; -webkit-text-stroke: 2px #b4bcc8; text-shadow: 0 2px 3px rgba(30,40,70,.16); }
.wordmark .wm-i { width: .16em; height: .16em; border-radius: 50%; background: var(--orange); align-self: flex-start; margin: .1em .03em 0 .04em; }
.wordmark .wm-b { color: var(--blue); }
.wordmark .wm-o { width: .82em; height: .82em; border-radius: 50%; background: var(--orange); position: relative; display: inline-block; margin-left: .05em; }
.wordmark .wm-o .face { position: absolute; inset: 16%; width: 68%; height: 68%; }
.slogan-lg { font-size: 21px; font-weight: 800; letter-spacing: -0.3px; margin: 2px 0 0; }
.slogan-lg .hl { color: var(--orange); }
.mascot { max-width: min(66vw, 260px); max-height: 32vh; width: auto; height: auto; margin: 2px auto 4px; display: block; filter: drop-shadow(0 14px 22px rgba(20,30,60,.18)); }
.greet { font-size: 19px; font-weight: 800; letter-spacing: -0.3px; margin: 4px 0 1px; }
.greet-sub { color: var(--text-dim); font-size: 15px; margin: 2px 0 10px; }

/* „Hey… Kibbo" Schriftzug: bevorzugt Bild /hey-kibbo.png, sonst CSS-Nachbau */
.hey-lockup { display: block; text-align: center; margin: 2px auto 0; }
/* Logo hat weißen PNG-Hintergrund → per multiply auf den hellen App-Hintergrund einblenden.
   Größer + negative Ränder, da die PNG viel Eigen-Weißraum hat. */
.hey-img { max-width: min(66vw, 260px); max-height: 18vh; height: auto; display: block; margin: -4px auto -10px; mix-blend-mode: multiply; }
.hey-css { position: relative; display: inline-block; padding-top: 12px; }
.hey-css .hey { position: absolute; top: -4px; left: 2px; font-family: "Segoe Script", "Bradley Hand", "Brush Script MT", cursive; font-size: 23px; font-weight: 700; color: var(--blue); transform: rotate(-10deg); text-shadow: 0 1px 0 rgba(27,110,243,.15); }
.kibbo-big { display: inline-flex; align-items: flex-end; font-weight: 900; font-size: clamp(38px, 12vw, 50px); letter-spacing: -1px; line-height: 1; }
.kibbo-big .kb-k { color: #fff; -webkit-text-stroke: 3px var(--blue); paint-order: stroke fill; text-shadow: 0 3px 0 rgba(27,110,243,.22); }
.kibbo-big .kb-i { width: .16em; height: .16em; border-radius: 50%; background: var(--orange); align-self: flex-start; margin: .14em .03em 0 .04em; }
.kibbo-big .kb-b { color: var(--blue); text-shadow: 0 3px 0 rgba(27,110,243,.18); }
.kibbo-big .kb-o { width: .84em; height: .84em; border-radius: 50%; background: var(--orange); position: relative; margin-left: .05em; box-shadow: 0 3px 0 rgba(200,90,0,.25), inset 0 -3px 6px rgba(0,0,0,.08); }
.kibbo-big .kb-o .face { position: absolute; inset: 14%; width: 72%; height: 72%; }

/* ---------- Suchleiste ---------- */
.searchwrap { margin: 2px 0 10px; }
.searchbar {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-elev); border: 1.5px solid var(--line);
  border-radius: 999px; padding: 4px 10px 4px 20px; box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.searchbar:focus-within { border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }
.searchbar input { flex: 1; background: none; border: none; padding: 13px 0; font-size: 16px; }
/* Schlichter grauer Senden-Pfeil (wie im Mockup, kein Kreis) */
.send-btn { flex-shrink: 0; display: grid; place-items: center; background: none; color: var(--text-dim); padding: 8px; transition: transform .1s, color .15s; }
.send-btn:hover { color: var(--orange); }
.send-btn:active { transform: scale(0.88); }
.send-btn .svg-i { width: 24px; height: 24px; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,.5);} 50%{ box-shadow: 0 0 0 10px rgba(239,68,68,0);} }

/* ---------- Aktions-Kacheln ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 4px; }
.tile {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 17px 8px 14px; text-align: center; box-shadow: var(--shadow-sm); transition: transform .1s;
}
.tile:active { transform: scale(0.96); }
/* Dunkles Icon direkt auf der Karte (wie im Mockup) */
.tile .ic { margin: 0 auto 9px; display: grid; place-items: center; color: #2b3038; }
.tile .ic .svg-i { width: 34px; height: 34px; stroke-width: 1.8; }
.tile .lbl { font-size: 14px; font-weight: 600; color: #3a4049; }
.tile.recording .ic { color: var(--red); animation: pulse 1.2s infinite; }

/* ---------- Abschnittstitel + Karten ---------- */
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 22px 4px 10px; }
.section-title h2 { font-size: 13px; font-weight: 800; color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; margin: 0; }

.card-list { display: flex; flex-direction: column; gap: 10px; }
.entry-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 13px; box-shadow: var(--shadow-sm); transition: transform .1s;
}
.entry-card:active { transform: scale(0.985); }
.entry-thumb { width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0; display: grid; place-items: center; font-size: 20px; overflow: hidden; background: var(--accent-soft); color: var(--blue); }
.entry-thumb img { width: 100%; height: 100%; object-fit: cover; }
.entry-main { flex: 1; min-width: 0; }
.entry-main .t { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-main .s { font-size: 13px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; display:flex; align-items:center; gap:5px; }
.entry-main .s .svg-i { width: 14px; height: 14px; }
.badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--blue); white-space: nowrap; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--text-dim); flex-shrink: 0; transition: background .15s, color .15s, transform .1s; }
.icon-btn:active { transform: scale(0.92); }
.icon-btn.ghost:hover { background: var(--accent-soft); color: var(--blue); }
.icon-btn .svg-i { width: 20px; height: 20px; }
.matched-tag { font-size: 10px; color: var(--text-faint); }
.empty { text-align: center; color: var(--text-dim); padding: 40px 20px; }
.empty .big { font-size: 40px; margin-bottom: 10px; }

/* ---------- Antwort-Karte (§23) ---------- */
.answer { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); animation: rise .25s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: none; } }
.answer.accent { border-color: color-mix(in srgb, var(--orange) 40%, var(--line)); }
.answer .label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--orange); font-weight: 800; margin-bottom: 6px; display:flex; align-items:center; gap:6px; }
.answer .label .svg-i { width: 16px; height: 16px; }
.answer .a-text { font-size: 18px; font-weight: 650; letter-spacing: -0.2px; }
.answer .stale { margin-top: 10px; font-size: 13px; color: var(--amber); display: flex; gap: 6px; align-items: center; }
.answer .stale .svg-i { width: 16px; height: 16px; }
.answer .none-hint { color: var(--text-dim); font-weight: 500; font-size: 16px; }
.answer .disamb { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip-btn { background: var(--orange-soft); color: var(--orange); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px; }
.scope-switch { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-dim); margin: 0 4px 8px; }
.scope-switch .svg-i { width: 15px; height: 15px; }
.scope-switch a { color: var(--orange); font-weight: 700; margin-left: auto; }

/* ---------- Untere Navigation (Bereiche als Tabs) ---------- */
/* Freischwebende, abgerundete Karte (wie im Mockup) */
.navbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(6px + var(--safe-bottom)); z-index: 30;
  padding: 5px 6px;
  background: var(--bg-elev);
  border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  display: flex;
}
.navtab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 6px; border-radius: 14px; transition: background .15s, color .15s;
  color: var(--text-faint); /* inaktiv = grau; aktiv setzt die Bereichsfarbe inline */
}
.navtab + .navtab { border-left: 1px solid var(--line); }
.navtab .svg-i { width: 25px; height: 25px; }
.navtab .nt-label { font-size: 12px; font-weight: 700; }

/* ---------- Floating Action Button ---------- */
.fab {
  position: fixed; right: 18px; bottom: calc(var(--navbar-h) + var(--safe-bottom) + 10px); z-index: 35;
  width: 58px; height: 58px; border-radius: 20px;
  background: linear-gradient(135deg, var(--blue), var(--blue-2)); color: #fff;
  display: grid; place-items: center; box-shadow: 0 12px 28px rgba(27,110,243,.45); transition: transform .12s;
}
.fab:active { transform: scale(0.9) rotate(90deg); }
.fab .svg-i { width: 28px; height: 28px; stroke-width: 2.4; }

/* ---------- Bottom-Sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(15,20,35,.42); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet { width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto; background: var(--bg-elev); border-radius: 26px 26px 0 0; padding: 10px 18px calc(24px + var(--safe-bottom)); box-shadow: var(--shadow-lg); animation: slideup .28s cubic-bezier(.2,.8,.2,1); }
@keyframes slideup { from { transform: translateY(100%); } to { transform: none; } }
.sheet-grip { width: 42px; height: 5px; border-radius: 999px; background: var(--line); margin: 8px auto 14px; }
.sheet h3 { margin: 0 0 4px; font-size: 20px; letter-spacing: -0.3px; }
.sheet .sub { color: var(--text-dim); font-size: 13px; margin-bottom: 16px; }
.backup-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); background: var(--bg-input); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; }

/* ---------- Formulare ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--text-dim); margin-bottom: 6px; }
.field input, .field textarea, .field select { width: 100%; background: var(--bg-input); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--bg-elev); }
.field textarea { resize: vertical; min-height: 72px; }
.field .hint { font-size: 12px; color: var(--text-faint); margin-top: 5px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inline-add { display: flex; gap: 8px; }
.inline-add select { flex: 1; }
.inline-add button { flex-shrink: 0; padding: 0 14px; border-radius: 12px; background: var(--accent-soft); color: var(--blue); font-weight: 700; }

.btn { width: 100%; padding: 15px; border-radius: 14px; font-weight: 800; font-size: 16px; background: linear-gradient(135deg, var(--blue), var(--blue-2)); color: #fff; transition: transform .1s, opacity .15s; display:flex; align-items:center; justify-content:center; gap:8px; box-shadow: 0 8px 20px rgba(27,110,243,.28); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: .55; }
.btn.orange { background: linear-gradient(135deg, var(--orange), var(--orange-2)); box-shadow: 0 8px 20px rgba(255,122,26,.28); }
.btn.secondary { background: var(--bg-input); color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn.danger { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); box-shadow: none; }
.btn .svg-i { width: 20px; height: 20px; }
.btn-row { display: flex; gap: 10px; margin-top: 8px; }

/* ---------- Detail ---------- */
.detail-hero { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 6px; }
.detail-hero .big-thumb { width: 64px; height: 64px; border-radius: 18px; background: var(--accent-soft); color: var(--blue); display:grid; place-items:center; font-size: 28px; overflow: hidden; flex-shrink:0; }
.detail-hero .big-thumb img { width:100%; height:100%; object-fit: cover; }
.detail-hero h3 { font-size: 22px; margin: 0; }
.detail-loc { display: inline-flex; align-items: center; gap: 6px; color: var(--orange); font-weight: 700; margin-top: 4px; }
.detail-loc .svg-i { width: 16px; height: 16px; }
.kv { display: flex; flex-direction: column; gap: 3px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.kv .k { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.kv .v { font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--bg-input); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; font-size: 13px; display:inline-flex; align-items:center; gap:5px; }
.tag .svg-i { width: 13px; height: 13px; }
.gallery { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; }
.gallery img { height: 92px; border-radius: 12px; }
.meta-line { font-size: 12px; color: var(--text-faint); margin-top: 14px; }
.meta-line .svg-i { width: 13px; height: 13px; }

/* ---------- Analyse ---------- */
.analyze-box { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 12px; }
.analyze-box .preview { width: 100%; max-height: 220px; object-fit: contain; border-radius: 12px; margin-bottom: 12px; background: var(--bg-input); }
.analyze-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); margin: 6px 0; }
.analyze-row .svg-i { width: 16px; height: 16px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Auth (Login / Registrierung, Look wie Mockup) ---------- */
.auth { min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.auth-top { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--safe-top) + 12px) 18px 4px; }
.auth-toptitle { font-weight: 800; font-size: 17px; }
.icon-square { width: 44px; height: 44px; border-radius: 14px; background: var(--bg-elev); box-shadow: var(--shadow-sm); border: 1px solid var(--line); display: grid; place-items: center; color: var(--text); }
.icon-square.ghosted { visibility: hidden; }
.auth-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--bg-input); color: var(--text-faint); display: grid; place-items: center; border: 1px solid var(--line); }
.auth-avatar .svg-i { width: 24px; height: 24px; }
.auth-scroll { flex: 1; overflow-y: auto; text-align: center; padding: 4px 22px calc(24px + var(--safe-bottom)); max-width: 470px; width: 100%; margin: 0 auto; }
.auth-h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.4px; margin: 8px 0 2px; }
.auth-desc { color: var(--text-dim); font-size: 15px; margin: 0 0 6px; }
/* JPEG-Maskottchen sind undurchsichtig-weiße Rechtecke → KEIN drop-shadow (sonst weißer Kasten). */
.auth-mascot { width: min(52vw, 190px); height: auto; margin: 0 auto 12px; display: block; mix-blend-mode: multiply; }
.auth-scroll form { text-align: left; }
.auth-right { text-align: right; margin: -4px 2px 12px; }
.auth-right a { color: var(--orange); font-weight: 700; font-size: 14px; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--text-faint); font-size: 13px; font-weight: 700; margin: 16px 0; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.switch { text-align: center; margin-top: 18px; color: var(--text-dim); font-size: 14px; }
.switch a, .checkrow a, .auth-info a { color: var(--orange); font-weight: 700; }
.checkrow { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-dim); margin: 6px 2px 16px; line-height: 1.4; }
.checkrow input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--orange); flex-shrink: 0; }
.auth-info { font-size: 14px; color: var(--text-dim); text-align: center; margin: 6px 0 12px; line-height: 1.5; }
.dev-hint { font-size: 13px; color: var(--blue); background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; text-align: center; }
.dev-hint:empty { display: none; }
.resend { text-align: center; font-size: 13px; color: var(--text-dim); margin: 10px 0 4px; }
.resend a { color: var(--orange); font-weight: 700; }
.resend a.disabled { color: var(--text-faint); pointer-events: none; }
.auth .err { background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); padding: 11px 14px; border-radius: 12px; font-size: 14px; margin: 0 0 12px; text-align: left; }

/* Icon-Eingabefelder */
.ifield { display: flex; align-items: center; gap: 10px; background: var(--bg-elev); border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; margin-bottom: 12px; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.ifield:focus-within { border-color: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); }
.ifield-ic { color: var(--text-faint); display: grid; place-items: center; }
.ifield-ic .svg-i { width: 20px; height: 20px; }
.ifield input { flex: 1; border: none; background: none; padding: 15px 0; font-size: 16px; }
.field-eye { color: var(--text-faint); padding: 6px; display: grid; place-items: center; }
.field-eye .svg-i { width: 20px; height: 20px; }
.field-link { color: var(--orange); font-weight: 700; font-size: 14px; white-space: nowrap; padding: 6px 2px; }

/* Google-Button */
.btn.google { background: var(--bg-elev); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }

/* Schrittanzeige */
.stepper { display: flex; align-items: flex-start; justify-content: center; margin: 6px 0 18px; }
.step { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 76px; }
.step .dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 15px; background: var(--bg-input); color: var(--text-faint); border: 2px solid var(--line); }
.step .slabel { font-size: 12px; color: var(--text-faint); font-weight: 600; }
.step.active .dot { background: var(--orange); color: #fff; border-color: var(--orange); box-shadow: 0 6px 14px rgba(255,122,26,.35); }
.step.active .slabel { color: var(--text); }
.step.done .dot { background: var(--orange); color: #fff; border-color: var(--orange); }
.step.done .dot .svg-i { width: 18px; height: 18px; }
.step.done .slabel { color: var(--text-dim); }
.sline { flex: 1; height: 2px; background: var(--line); margin-top: 16px; min-width: 10px; }
.sline.on { background: var(--orange); }

/* ---------- Menü / Toast ---------- */
.list-menu { display: flex; flex-direction: column; }
.list-menu button { display: flex; align-items: center; gap: 14px; padding: 15px 6px; border-bottom: 1px solid var(--line); font-size: 16px; text-align: left; font-weight: 600; }
.list-menu button .svg-i { color: var(--text-dim); }
.list-menu button.danger-text { color: var(--red); }
.list-menu button.danger-text .svg-i { color: var(--red); }

#toast-root { position: fixed; left: 0; right: 0; bottom: calc(var(--navbar-h) + var(--safe-bottom) + 18px); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: #14171c; color: #fff; padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); animation: rise .2s ease; max-width: 90%; }
.toast.err { background: var(--red); }
.toast.ok { background: var(--green); }

.small-note { font-size: 12px; color: var(--text-faint); text-align: center; margin-top: 16px; line-height: 1.5; }

/* ============================================================
   Phase 1 – Neue Informationsarchitektur (Screens 1–12)
   ============================================================ */
.app .content { padding: 12px 16px calc(var(--navbar-h) + var(--safe-bottom) + 16px); }

/* Untere Tab-Leiste: Start · Suche · Bereiche · Einstellungen */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex;
  background: color-mix(in srgb, var(--bg-elev) 94%, transparent); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + var(--safe-bottom)); }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; color: var(--text-faint); font-weight: 600; }
.tab span { font-size: 11px; }
.tab .svg-i { width: 24px; height: 24px; }
.tab.active { color: var(--blue); }

/* Startscreen */
.ask { font-size: 24px; font-weight: 800; text-align: center; margin: 8px 0 14px; letter-spacing: -.4px; }
.searchbar.as-button { width: 100%; justify-content: space-between; cursor: pointer; }
.searchbar.as-button .sb-ph { color: var(--text-faint); font-size: 16px; }
.searchbar .sb-ic, .searchbar .sb-clear { color: var(--text-faint); display: grid; place-items: center; padding: 6px; }
.save-hint { text-align: center; color: var(--text-dim); font-size: 13px; margin: 16px 0 10px; font-weight: 600; }
.tiles3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile .ic.blue { color: var(--blue); }
.tile .ic.green { color: var(--green); }
.section-row { display: flex; align-items: center; justify-content: space-between; margin: 24px 2px 10px; }
.section-row h2 { font-size: 14px; font-weight: 800; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; margin: 0; }
.section-row a { color: var(--blue); font-weight: 700; font-size: 14px; }

/* Bereichs-Liste + Zeilen */
.room-list { display: flex; flex-direction: column; gap: 10px; }
.room-row { display: flex; align-items: center; gap: 14px; background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px; box-shadow: var(--shadow-sm); text-align: left; }
.room-row.static { cursor: default; }
.room-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.room-ic .svg-i { width: 24px; height: 24px; }
.room-ic.lg { width: 40px; height: 40px; }
.room-name { flex: 1; font-weight: 700; font-size: 16px; }
.room-right { color: var(--text-faint); display: grid; place-items: center; }
.room-right .svg-i { width: 20px; height: 20px; }

/* Eintrags-Liste */
.entry-list { display: flex; flex-direction: column; gap: 10px; }
.entry-row { display: flex; align-items: center; gap: 12px; background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: 16px; padding: 14px; box-shadow: var(--shadow-sm); text-align: left; }
.entry-row.static { cursor: default; }
.ev-main { flex: 1; min-width: 0; }
.room-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.room-badge .svg-i { width: 14px; height: 14px; }
.room-badge.lg { font-size: 14px; margin-bottom: 8px; }
.ev-title { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 5px; }
.ev-title .svg-i { width: 15px; height: 15px; color: var(--amber); }
.ev-info { color: var(--text-dim); font-size: 14px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-meta { color: var(--text-faint); font-size: 12px; margin-top: 6px; }
.ev-chevron { color: var(--text-faint); }
.ev-thumb { width: 48px; height: 48px; border-radius: 12px; overflow: hidden; flex-shrink: 0; }
.ev-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Seiten-Kopf + Raum-Kopf */
.page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.5px; margin: 6px 0 16px; }
.room-header { display: flex; align-items: center; gap: 12px; margin: 2px 0 14px; }
.rh-title { flex: 1; font-size: 22px; font-weight: 800; letter-spacing: -.4px; }
.searchbar.sm { margin-bottom: 14px; }
.searchbar.sm input, .searchbar.sm .svg-i { }

/* Suche */
.search-top { margin: 4px 0 12px; }
.chips { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; padding: 8px 16px; border-radius: 999px; background: var(--bg-input); color: var(--text-dim); font-weight: 700; font-size: 14px; }
.chip.active { background: var(--blue); color: #fff; }

/* Aufnehmen / Speichern */
.capture { text-align: center; }
.rec-visual { width: 96px; height: 96px; border-radius: 50%; background: var(--accent-soft); color: var(--blue); display: grid; place-items: center; margin: 14px auto; animation: pulse 1.4s infinite; }
.rec-visual .svg-i { width: 44px; height: 44px; }
.rec-partial { color: var(--text-dim); min-height: 22px; margin-bottom: 14px; }
.room-select { display: flex; flex-wrap: wrap; gap: 8px; }
.rs-chip { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; background: var(--bg-input); border: 1.5px solid transparent; font-weight: 700; font-size: 14px; color: var(--text-dim); }
.rs-chip .svg-i { width: 16px; height: 16px; }
.rs-chip.active { color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); border-color: var(--c); }
.save-photo { width: 100%; max-height: 180px; object-fit: cover; border-radius: 12px; margin-bottom: 12px; }
.success { text-align: center; }
.success-mascot, .empty-mascot { width: 150px; height: auto; margin: 0 auto 8px; display: block; mix-blend-mode: multiply; }
.empty-mascot { width: 130px; }

/* Kleines Maskottchen oben in Sheets/Dialogen */
.sheet-mascot { width: 84px; height: auto; margin: 2px auto 10px; display: block; mix-blend-mode: multiply; }
/* Begrüßung auf der Startseite */
.start-greet { display: flex; align-items: center; gap: 10px; margin: 2px 0 6px; }
.greet-mascot { width: 52px; height: auto; mix-blend-mode: multiply; flex: none; }
.start-greet span { font-weight: 600; color: var(--muted, #6b7280); font-size: 15px; }
/* Dekoratives Maskottchen am Seitenende (Bereiche) */
.page-mascot { width: 120px; height: auto; margin: 22px auto 4px; display: block; opacity: .95; mix-blend-mode: multiply; }

/* Detail */
.detail h3 { font-size: 24px; margin: 8px 0 6px; }
.detail-info { font-size: 17px; color: var(--text); line-height: 1.5; }
.detail-meta { color: var(--text-faint); font-size: 13px; margin: 16px 0; display: flex; align-items: center; gap: 6px; }
.detail-meta .svg-i { width: 15px; height: 15px; }
.detail-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.da { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 4px; border-radius: 14px; background: var(--bg-input); font-size: 12px; font-weight: 700; color: var(--text-dim); }
.da .svg-i { width: 22px; height: 22px; }
.da.edit { color: var(--blue); } .da.confirm { color: var(--green); } .da.del { color: var(--red); } .da.fav { color: var(--amber); }

/* Einstellungen */
.settings-list { display: flex; flex-direction: column; background: var(--bg-elev); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); }
.set-row { display: flex; align-items: center; gap: 14px; padding: 16px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 16px; text-align: left; }
.set-row:last-child { border-bottom: 0; }
.set-row.static { cursor: default; }
.set-row > .svg-i:first-child { color: var(--text-dim); }
.set-row > span { flex: 1; }
.set-row .svg-i { width: 22px; height: 22px; }
.set-row b { font-weight: 700; }
.set-row b.ok { color: var(--green); }

.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--text-dim); flex-shrink: 0; }
.icon-btn .svg-i { width: 20px; height: 20px; }

/* ============================================================
   Responsive: Desktop = zentrierte App-Spalte auf grauem Grund
   ============================================================ */
/* --- Login/Willkommen: zentrierte Karte auf großen Screens (statt Schmalspalte) --- */
@media (min-width: 620px) {
  body:has(.auth), body:has(.welcome) { background: linear-gradient(160deg, #eef2f9, #e2e8f2); }
  #app:has(.auth), #app:has(.welcome) { justify-content: center; align-items: center; min-height: 100dvh; padding: 32px 16px; }
  .auth.screen, .welcome.screen {
    flex: none; width: 100%; max-width: 470px; min-height: 0; background: #fff;
    border-radius: 28px; box-shadow: 0 30px 80px rgba(20,30,60,.18); overflow: hidden;
  }
  .auth-scroll, .welcome-scroll { min-height: 0; }
}

/* --- Echte Desktop-Ansicht: linke Seitenleiste + breiter Inhalt --- */
@media (min-width: 900px) {
  .app .header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: 72px;
    padding: 6px 28px; justify-content: flex-start; gap: 8px;
  }
  .app .head-logo { flex: 0 0 auto; justify-content: flex-start; }
  .app .head-logo-img { height: 56px; margin: -6px 0; }
  .app .head-right { margin-left: auto; }
  .app .bell-btn { order: 3; }
  /* Untere Tab-Leiste → linke Sidebar */
  .app .tabbar {
    flex-direction: column; top: 72px; left: 0; bottom: 0; width: 240px; height: auto;
    border-top: 0; border-right: 1px solid var(--line); padding: 20px 14px; gap: 6px;
    background: var(--bg); backdrop-filter: none; transform: none;
  }
  .app .tab { flex: 0 0 auto; flex-direction: row; justify-content: flex-start; gap: 14px; padding: 13px 16px; border-radius: 14px; }
  .app .tab span { font-size: 15px; }
  .app .tab .svg-i { width: 23px; height: 23px; }
  .app .tab.active { background: var(--accent-soft); }
  /* Inhalt: rechts neben Sidebar, unter Header, zentriert mit lesbarer Breite */
  .app .content {
    margin-left: 240px; padding: 96px 40px 60px;
    display: flex; flex-direction: column; align-items: center;
  }
  .app .content > * { width: 100%; max-width: 820px; }
  .app .offline-banner { max-width: 820px; margin-inline: auto; }
  .app .fab { right: 48px; bottom: 40px; }
}

/* ---------- Willkommensseite ---------- */
.welcome { min-height: 100dvh; }
.welcome-scroll { flex: 1; overflow-y: auto; text-align: center; width: 100%; max-width: 470px; margin: 0 auto;
  padding: calc(var(--safe-top) + 20px) 24px calc(24px + var(--safe-bottom)); display: flex; flex-direction: column; justify-content: center; }
.welcome-mascot { width: min(52vw, 190px); margin: 6px auto 6px; display: block; mix-blend-mode: multiply; }
.w-title { font-size: 30px; font-weight: 800; margin: 2px 0 4px; letter-spacing: -.5px; }
.w-sub { color: var(--text-dim); font-size: 16px; margin: 0 0 22px; }
.w-sub .hl { color: var(--orange); font-weight: 700; }
.welcome-steps { display: flex; flex-direction: column; gap: 12px; text-align: left; margin-bottom: 22px; }
.wstep { display: flex; align-items: center; gap: 14px; background: var(--bg-elev); border: 1px solid var(--line); border-radius: 16px; padding: 14px; box-shadow: var(--shadow-sm); }
.wico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0; }
.wico .svg-i { width: 24px; height: 24px; }
.wico.blue { background: var(--accent-soft); color: var(--blue); }
.wico.green { background: rgba(22,179,100,.12); color: var(--green); }
.wico.orange { background: var(--orange-soft); color: var(--orange); }
.wstep b { display: block; font-size: 16px; font-weight: 700; }
.wstep span { color: var(--text-dim); font-size: 14px; }
.welcome .btn { margin-bottom: 10px; }

/* Sprachumschalter auf der Willkommensseite */
.lang-switch { margin: 14px auto 0; padding: 8px 16px; border-radius: 999px; background: var(--bg-input); color: var(--text-dim); font-weight: 600; font-size: 14px; }

/* Gruppen: Mitgliederzahl in der Bereichszeile */
.room-count { display: inline-flex; align-items: center; gap: 4px; color: var(--text-faint); font-weight: 700; font-size: 14px; }
.room-count .svg-i { width: 18px; height: 18px; }

/* Auto-Sperre-Bildschirm (§19) */
.lock-overlay { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; animation: fade .2s ease; }
.lock-mascot { width: min(40vw, 150px); mix-blend-mode: multiply; margin-bottom: 6px; }
.lock-overlay h2 { font-size: 26px; font-weight: 800; margin: 0 0 4px; }
.lock-overlay .sub { color: var(--text-dim); margin: 0 0 20px; }
.lock-form { width: 100%; max-width: 340px; }

/* Aktivitäts-Erinnerung (Phase 4) */
.activity-reminder { display: flex; align-items: center; gap: 8px; background: var(--orange-soft); color: #b45309; border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; font-size: 14px; font-weight: 600; }
.activity-reminder span { flex: 1; }
.activity-reminder .btn { width: auto; padding: 7px 14px; }
