/* Kern · light only. Same family as Cocotte: pastel grounds, coloured pills, a dark floating tab bar, a friendly grotesque
   for headlines, the iPhone system font for everything you operate. Kern's own ground is lavender to sky. Rules: docs/design-regeln.md */
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/fonts/bricolage.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
}
:root {
  --ink: #1d1d1f;
  --ink-2: #4f4f55;
  --ink-3: #626268;
  --line: rgba(29, 29, 31, 0.1);
  --card: rgba(255, 255, 252, 0.78);
  --card-solid: #fffffc;
  --dark: #1c1c1e;
  --on-dark: #ffffff;
  --on-dark-2: #a1a1a6;
  /* grounds */
  --lime-top: #e4dcfb;
  --lime-mid: #eeeafc;
  --lime-bottom: #d8eaf7;
  --lime: #d4ef7c;
  /* pastel panels per recipe, and their light page versions */
  --lilac: #e4d7f5; --lilac-bg: #f2eafb;
  --peach: #ffdcc7; --peach-bg: #fff0e6;
  --pink: #f8d5e6; --pink-bg: #fcebf3;
  --mint: #d3eedd; --mint-bg: #e9f7ee;
  --butter: #fbedb5; --butter-bg: #fdf7dc;
  --sky: #d3e6f8; --sky-bg: #e9f2fc;
  /* pills: one colour means one thing everywhere */
  --p-time: #dccbf6; --p-time-ink: #432a78;
  --p-level: #ffc9a6; --p-level-ink: #6f2e0b;
  --p-kcal: #d4ef7c; --p-kcal-ink: #2f4200;
  --p-protein: #cfe3fa; --p-protein-ink: #163c69;
  --p-warn: #fbe29a; --p-warn-ink: #5e4100;
  --p-bad: #f8c9c2; --p-bad-ink: #7a1f12;
  --heart: #e0453a;
  --good: #2c7a45;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --display: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar: calc(64px + var(--safe-bottom));
  --press: cubic-bezier(0.34, 1.56, 0.64, 1);
  --sheet-ease: cubic-bezier(0.32, 0.72, 0, 1);
  color-scheme: light only;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
/* Dynamic Type: in Safari and the iPhone app the root size follows the system text size (17 px by default);
   every font size below is in rem, so the whole app scales with it. Other browsers stay at 17 px. */
html { font-size: 17px; font: -apple-system-body; }
body {
  font: 1rem/1.35 var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, var(--lime-top) 0%, var(--lime-mid) 45%, var(--lime-bottom) 100%) fixed;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
}
#root { height: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { opacity: 0.4; cursor: default; }
button, .tab, .rcard, .pick, .ib, img, .navbar, .tabbar, .chips, .pills { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2.5px solid var(--dark); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.small { font-size: 0.7647rem; }
.ic { display: block; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic.f { fill: currentColor; }

/* press feedback instead of haptics */
.tap { transition: transform 0.3s var(--press), opacity 0.2s; }
.tap:active { transform: scale(0.96); opacity: 0.85; transition-duration: 0.08s; }

/* ---------- screens ---------- */
.screen { position: absolute; inset: 0 0 var(--tabbar) 0; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; }
.screen-pad { padding: calc(var(--safe-top) + 12px) 0 32px; }
.wrap { max-width: 640px; margin: 0 auto; }
.gutter { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

.topline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; }
.topline > h1 { min-width: 0; }
.h-display { font: 650 min(1.7647rem, 38px)/1.1 var(--display); letter-spacing: -0.01em; text-wrap: balance; }
/* Display headings grow with Dynamic Type, but less than body text (like large titles on iOS). */
.h-big { font: 650 min(2rem, 44px)/1.08 var(--display); letter-spacing: -0.015em; text-wrap: balance; }
.h-section { font: 650 1.2941rem/1.2 var(--display); }
.sub { font-size: 0.8824rem; color: var(--ink-2); }

.round-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 252, 0.7); color: var(--ink); position: relative; flex: none; }
.round-btn.dark { background: var(--dark); color: var(--on-dark); }
.round-btn .dot { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; background: var(--dark); color: #fff; font-size: 0.6471rem; font-weight: 700; line-height: 18px; text-align: center; }

/* ---------- category row ---------- */
.cats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 6px max(10px, env(safe-area-inset-left, 0px)) 4px; scroll-snap-type: x proximity; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; min-width: 82px; display: flex; flex-direction: column; align-items: center; gap: 4px; scroll-snap-align: start; padding: 2px 5px; }
.cat .bubble { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; border: 2.5px solid transparent; transition: border-color 0.2s, transform 0.3s var(--press); }
.cat img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(40, 50, 20, 0.12)); }
.cat .label { font-size: 0.7647rem; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.cat[aria-pressed='true'] .bubble { border-color: var(--dark); }
.cat[aria-pressed='true'] .label { color: var(--ink); font-weight: 650; }
.cat .count { font-size: 0.6471rem; color: var(--ink-3); margin-top: -3px; }

/* ---------- pills ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { min-height: 30px; padding: 0 11px 0 9px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; font-size: 0.8235rem; font-weight: 600; white-space: nowrap; }
.pill .ic { width: 16px; height: 16px; }
.pill.time { background: var(--p-time); color: var(--p-time-ink); }
.pill.level { background: var(--p-level); color: var(--p-level-ink); }
.pill.kcal { background: var(--p-kcal); color: var(--p-kcal-ink); }
.pill.protein { background: var(--p-protein); color: var(--p-protein-ink); }
.pill.warn { background: var(--p-warn); color: var(--p-warn-ink); }
.pill.bad { background: var(--p-bad); color: var(--p-bad-ink); }
.pill.dark { background: var(--dark); color: var(--on-dark); }
.pill.glass { background: rgba(255, 255, 252, 0.88); color: var(--ink); }
.pill.sm { min-height: 26px; font-size: 0.7353rem; padding: 0 9px 0 8px; }

/* ---------- recipe cards ---------- */
.list { display: flex; flex-direction: column; gap: 14px; }
.rcard { display: block; width: 100%; text-align: left; background: var(--card); border-radius: 30px; padding: 10px; box-shadow: 0 1px 2px rgba(40, 50, 20, 0.04); }
.rcard .panel { position: relative; height: 196px; border-radius: 22px; overflow: hidden; background: var(--lilac); }
.panel.painted img { position: absolute; left: -4%; top: 50%; transform: translateY(-50%); height: 118%; aspect-ratio: 1; object-fit: cover; }
.panel.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.panel .corner { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; }
.panel .heart-tag { position: absolute; top: 12px; left: 12px; width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 252, 0.9); display: grid; place-items: center; color: var(--heart); }
.panel .heart-tag .ic { width: 17px; height: 17px; }
.panel .initial { position: absolute; inset: 0; display: grid; place-items: center; font: 650 4.7059rem/1 var(--display); color: rgba(29, 29, 31, 0.16); }
.rcard .body { padding: 14px 10px 6px; display: flex; flex-direction: column; gap: 8px; }
.rcard .title { font: 650 1.2941rem/1.2 var(--display); letter-spacing: -0.005em; }
.rcard .desc { font-size: 0.8824rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.t-lilac { background: var(--lilac) !important; } .bg-lilac { background: var(--lilac-bg); }
.t-peach { background: var(--peach) !important; } .bg-peach { background: var(--peach-bg); }
.t-pink { background: var(--pink) !important; } .bg-pink { background: var(--pink-bg); }
.t-mint { background: var(--mint) !important; } .bg-mint { background: var(--mint-bg); }
.t-butter { background: var(--butter) !important; } .bg-butter { background: var(--butter-bg); }
.t-sky { background: var(--sky) !important; } .bg-sky { background: var(--sky-bg); }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 40px 24px; }
.empty img { width: 96px; height: 96px; object-fit: contain; }
.empty h2 { font: 650 1.2941rem/1.2 var(--display); }
.empty p { color: var(--ink-2); font-size: 0.8824rem; max-width: 30ch; }

/* ---------- buttons ---------- */
.btn { min-height: 50px; padding: 0 22px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 650; font-size: 1rem; }
.btn.primary { background: var(--dark); color: var(--on-dark); }
.btn.soft { background: rgba(255, 255, 252, 0.85); color: var(--ink); }
.btn.line { border: 1.5px solid var(--ink); }
.btn.block { width: 100%; }
.btn.small { min-height: 44px; padding: 0 16px; font-size: 0.8824rem; }
.btn .ic { width: 20px; height: 20px; }
.link-btn { min-height: 44px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.8824rem; color: var(--ink); }

/* ---------- tab bar ---------- */
.tabbar { position: absolute; left: 0; right: 0; bottom: 0; height: var(--tabbar); padding-bottom: var(--safe-bottom); background: var(--dark); border-radius: 26px 26px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); z-index: 30; padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--on-dark-2); font-size: 0.6471rem; font-weight: 600; position: relative; min-height: 44px; }
.tab .ic { width: 25px; height: 25px; }
.tab[aria-current='page'] { color: var(--on-dark); }
.tab .badge { position: absolute; top: 6px; left: calc(50% + 7px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--p-kcal); color: var(--p-kcal-ink); font-size: 0.6471rem; font-weight: 700; line-height: 18px; text-align: center; }

/* ---------- pushed pages ---------- */
.page { position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; animation: push-in 0.38s var(--sheet-ease); }
@keyframes push-in { from { transform: translateX(100%); } to { transform: none; } }
.page .scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; }
.navbar { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: calc(var(--safe-top) + 6px) max(10px, env(safe-area-inset-left, 0px)) 6px; pointer-events: none; }
.navbar > * { pointer-events: auto; }
.back { min-height: 44px; padding: 0 14px 0 8px; border-radius: 999px; display: inline-flex; align-items: center; gap: 2px; background: rgba(255, 255, 252, 0.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-weight: 600; font-size: 0.9412rem; }
.back .ic { width: 22px; height: 22px; }
.navbar .round-btn { background: rgba(255, 255, 252, 0.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.actionbar { flex: none; padding: 12px max(16px, env(safe-area-inset-left, 0px)) calc(12px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 6px; position: relative; }
.actionbar::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 28px; background: linear-gradient(to top, var(--page-bg, #f2eafb), transparent); pointer-events: none; }
.actionbar .hint { text-align: center; font-size: 0.7647rem; color: var(--ink-2); }

/* recipe detail */
.d-hero { position: relative; padding-top: calc(var(--safe-top) + 58px); display: flex; justify-content: center; }
.d-plate { width: min(88vw, 400px); aspect-ratio: 1; margin-top: -10px; margin-bottom: -18px; }
.d-plate img, .d-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.d-photo { width: calc(100% - 32px); max-width: 600px; aspect-ratio: 4 / 3; border-radius: 26px; overflow: hidden; }
.d-photo.none { display: grid; place-items: center; font: 650 5.6471rem/1 var(--display); color: rgba(29, 29, 31, 0.18); }
.d-head { padding: 22px 0 0; display: flex; flex-direction: column; gap: 10px; }
.d-title { font: 650 1.8824rem/1.1 var(--display); letter-spacing: -0.015em; text-wrap: balance; }
.d-title .kcal { font-weight: 500; }
.d-desc { font-size: 1rem; color: var(--ink-2); }
.d-source { font-size: 0.8235rem; color: var(--ink-2); }
.d-source a { font-weight: 650; color: var(--ink); text-decoration: none; }
.section { padding-top: 26px; display: flex; flex-direction: column; gap: 12px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.box { background: var(--card-solid); border-radius: 22px; padding: 14px 16px; }
.box.flat { background: rgba(255, 255, 252, 0.6); }

.nutri { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1.5px solid var(--ink); border-radius: 4px; }
.nutri div { padding: 8px 10px 10px; border-left: 1.5px solid var(--ink); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nutri div:first-child { border-left: 0; }
.nutri .l { font-size: 0.7647rem; color: var(--ink-2); }
.nutri .v { font: 600 1.2941rem/1.15 var(--display); }
.nutri-note { font-size: 0.7647rem; color: var(--ink-2); }

.stepper { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stepper .ctl { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 44px; height: 44px; border-radius: 50%; background: rgba(29, 29, 31, 0.07); font-size: 1.4118rem; font-weight: 500; display: grid; place-items: center; }
.stepper .val { min-width: 44px; text-align: center; font: 650 1.4118rem/1 var(--display); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(29, 29, 31, 0.07); }
.seg button { min-height: 44px; border-radius: 999px; font-size: 0.8824rem; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px; }
.seg button[aria-pressed='true'] { background: var(--dark); color: var(--on-dark); }

.ings { list-style: none; margin: 0; padding: 0; }
.ings li { display: flex; gap: 14px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); }
.ings li:last-child { border-bottom: 0; }
.ings .a { width: 5em; flex: none; font-weight: 650; font-variant-numeric: tabular-nums; }
.ings .n { flex: 1; min-width: 0; }
.ings .tag { font-size: 0.7059rem; font-weight: 650; padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
.ings .tag.est { background: var(--p-warn); color: var(--p-warn-ink); }
.ings .tag.out { background: rgba(29, 29, 31, 0.07); color: var(--ink-2); }
.group-name { font-size: 0.7353rem; font-weight: 700; letter-spacing: 0.04em; color: var(--ink-2); padding-top: 12px; }

.fill { display: flex; flex-direction: column; gap: 8px; font-size: 0.8235rem; color: var(--ink-2); }
.fill .bar { height: 8px; border-radius: 4px; background: rgba(29, 29, 31, 0.08); overflow: hidden; }
.fill .bar i { display: block; height: 100%; background: var(--dark); border-radius: 4px; }
.fill.over { color: var(--p-bad-ink); }
.fill.over .bar i { background: var(--heart); }

.checks { background: var(--p-warn); color: var(--p-warn-ink); border-radius: 22px; padding: 14px 16px; font-size: 0.8824rem; display: flex; flex-direction: column; gap: 6px; }
.checks b { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.checks ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.st { display: flex; gap: 12px; align-items: flex-start; }
.st .no { width: 30px; height: 30px; border-radius: 50%; background: var(--dark); color: #fff; font-size: 0.8235rem; font-weight: 700; display: grid; place-items: center; flex: none; font-variant-numeric: tabular-nums; margin-top: -2px; }
.st.text .no { background: rgba(29, 29, 31, 0.12); color: var(--ink); }
.st.outside .no { background: var(--p-warn); color: var(--p-warn-ink); }
.st .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.st .tt { font-size: 1rem; font-weight: 500; }
.st .ds { font-size: 0.8824rem; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { min-height: 28px; padding: 0 9px; border-radius: 8px; background: rgba(255, 255, 252, 0.9); border: 1px solid var(--line); font-size: 0.7941rem; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; color: var(--ink); }
.chip .ic { width: 15px; height: 15px; }
.chip.prog { background: var(--dark); color: var(--on-dark); border-color: var(--dark); }
.chip.rev { background: var(--p-time); color: var(--p-time-ink); border-color: transparent; }
.chip.est { background: var(--p-warn); color: var(--p-warn-ink); border-color: transparent; }
.chip.out { background: var(--p-warn); color: var(--p-warn-ink); border-color: transparent; }
.orig { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; color: var(--ink-2); }

.notes { display: flex; flex-direction: column; gap: 12px; }
.note { display: flex; gap: 10px; align-items: flex-start; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--dark); color: #fff; font-size: 0.7647rem; font-weight: 700; display: grid; place-items: center; flex: none; }
.note p { font-size: 0.8824rem; padding-top: 5px; }
.note-form { display: flex; gap: 8px; }
.note-form input { flex: 1; min-width: 0; min-height: 44px; border: 0; border-radius: 999px; padding: 0 16px; background: var(--card-solid); outline: none; }

.working { display: flex; gap: 12px; align-items: center; }
.spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(29, 29, 31, 0.15); border-top-color: var(--ink); animation: spin 0.9s linear infinite; flex: none; }
.btn.primary .spin, .pill.dark .spin { border-color: rgba(255, 255, 255, 0.3); border-top-color: #fff; }
.spin.sm { width: 14px; height: 14px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- inbox ---------- */
.ib { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border-radius: 26px; padding: 12px; width: 100%; text-align: left; }
.ib .th { width: 72px; height: 96px; border-radius: 16px; overflow: hidden; flex: none; display: grid; place-items: center; background: var(--lilac); }
.ib .th img { width: 100%; height: 100%; object-fit: cover; }
.ib .th .ic { width: 28px; height: 28px; }
.ib .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ib .tt { font-weight: 650; font-size: 0.9412rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ib .meta { display: flex; gap: 6px; align-items: center; font-size: 0.7647rem; color: var(--ink-2); }
.ib .state { font-size: 0.8235rem; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.ib .state.ok { color: var(--ink); font-weight: 650; }
.ib .msg { font-size: 0.8235rem; color: var(--ink-2); }
.ib .row { display: flex; flex-wrap: wrap; gap: 8px; }
.kind { min-height: 22px; padding: 0 8px; border-radius: 6px; background: rgba(29, 29, 31, 0.07); font-size: 0.7059rem; font-weight: 650; color: var(--ink-2); display: inline-flex; align-items: center; }

/* selection */
.pick { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 26px; padding: 10px 14px 10px 10px; width: 100%; text-align: left; }
.pick .ph { width: 84px; height: 84px; border-radius: 18px; overflow: hidden; flex: none; background: var(--lilac); display: grid; place-items: center; font: 650 2.1176rem/1 var(--display); color: rgba(29, 29, 31, 0.2); }
.pick .ph img { width: 100%; height: 100%; object-fit: cover; }
.pick .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.pick .tt { font: 650 1.0588rem/1.2 var(--display); }
.pick .where { font-size: 0.7647rem; color: var(--ink-2); }
.pick .check { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(29, 29, 31, 0.3); display: grid; place-items: center; color: transparent; flex: none; }
.pick[aria-checked='true'] .check { background: var(--dark); border-color: var(--dark); color: #fff; }
.pick .check .ic { width: 18px; height: 18px; stroke-width: 2.6; }
.srcbox { display: flex; gap: 12px; align-items: flex-start; }
.srcbox img { width: 64px; height: 86px; border-radius: 14px; object-fit: cover; flex: none; }
.srcbox .cap { font-size: 0.8235rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- sheets ---------- */
.scrim { position: absolute; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.35); animation: fade-in 0.25s; }
@keyframes fade-in { from { opacity: 0; } }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 61; max-height: 92dvh; background: #fbfbf7; border-radius: 26px 26px 0 0; display: flex; flex-direction: column; animation: sheet-in 0.38s var(--sheet-ease); touch-action: pan-y; }
@keyframes sheet-in { from { transform: translateY(100%); } }
.sheet .grab { width: 36px; height: 5px; border-radius: 3px; background: rgba(29, 29, 31, 0.22); margin: 8px auto 0; flex: none; }
.sheet .sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 8px 0 16px; flex: none; }
.sheet .sheet-head h2 { font: 650 1.4118rem/1.2 var(--display); }
.sheet .sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 12px max(16px, env(safe-area-inset-left, 0px)) calc(20px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 14px; }
.cancel { min-height: 44px; padding: 0 10px; font-size: 1rem; color: var(--ink-2); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.7647rem; font-weight: 600; color: var(--ink-2); }
.input { min-height: 50px; border: 1.5px solid var(--line); border-radius: 16px; padding: 0 14px; background: #fff; width: 100%; min-width: 0; outline: none; }
.input:focus { border-color: var(--ink); }
textarea.input { padding: 12px 14px; min-height: 120px; resize: vertical; }
.input-row { display: flex; gap: 8px; }
.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.opt { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; padding: 14px; border-radius: 20px; background: #fff; min-width: 0; position: relative; }
.opt .oic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; }
.opt b { font-size: 0.9412rem; font-weight: 650; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
.opt span { font-size: 0.7647rem; color: var(--ink-2); line-height: 1.3; }
.opt input[type='file'] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.tip { display: flex; gap: 10px; align-items: flex-start; font-size: 0.8235rem; color: var(--ink-2); }
.sumrows { background: #fff; border-radius: 20px; padding: 2px 16px; }
.sumrow { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 0.9412rem; }
.sumrow:last-child { border-bottom: 0; }
.sumrow span { color: var(--ink-2); }
.sumrow b { font-weight: 650; text-align: right; }
.checklist { display: flex; flex-direction: column; gap: 8px; font-size: 0.8824rem; }
.checklist div { display: flex; gap: 8px; align-items: flex-start; }
.checklist .ok .ic { color: var(--good); }
.checklist .w { color: var(--p-warn-ink); }
.done-big { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 8px 0; }
.done-big .circle { width: 76px; height: 76px; border-radius: 50%; background: var(--p-kcal); display: grid; place-items: center; color: var(--p-kcal-ink); }
.done-big .circle .ic { width: 36px; height: 36px; stroke-width: 2.4; }
.done-big h3 { font: 650 1.4118rem/1.2 var(--display); }
.mic { width: 96px; height: 96px; border-radius: 50%; background: var(--dark); color: #fff; display: grid; place-items: center; margin: 8px auto 0; }
.mic .ic { width: 38px; height: 38px; }
.mic.rec { background: var(--heart); }
.timer { text-align: center; font-size: 0.8824rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.wave { display: flex; gap: 4px; justify-content: center; align-items: center; height: 40px; }
.wave i { width: 5px; border-radius: 3px; background: var(--ink); height: 8px; opacity: 0.25; transition: height 0.1s; }
.menu { display: flex; flex-direction: column; background: #fff; border-radius: 20px; overflow: hidden; }
.menu button, .menu label { min-height: 52px; padding: 0 16px; display: flex; align-items: center; gap: 12px; font-size: 1rem; text-align: left; border-bottom: 1px solid var(--line); position: relative; cursor: pointer; }
.menu > :last-child { border-bottom: 0; }
.menu .danger { color: #c0392b; }
.menu input[type='file'] { position: absolute; inset: 0; opacity: 0; }

/* ---------- wir ---------- */
.wcard { background: var(--card); border-radius: 26px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.wcard h3 { font: 650 1.1765rem/1.2 var(--display); display: flex; align-items: center; gap: 8px; }
.wcard p { font-size: 0.8824rem; color: var(--ink-2); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 0.8824rem; }
.kv span { color: var(--ink-2); }
.kv b { font-weight: 650; text-align: right; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--good); flex: none; }
.status-dot.off { background: var(--heart); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.switch { width: 51px; height: 31px; border-radius: 16px; background: rgba(29, 29, 31, 0.18); position: relative; flex: none; transition: background 0.2s; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); transition: transform 0.25s var(--press); }
.switch[aria-checked='true'] { background: var(--good); }
.switch[aria-checked='true']::after { transform: translateX(20px); }
.code { font: 0.7647rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: #fff; border-radius: 12px; padding: 10px 12px; word-break: break-all; user-select: all; }
.people { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.person { background: rgba(255, 255, 252, 0.8); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }

/* ---------- login ---------- */
.login { height: 100%; overflow-y: auto; background: linear-gradient(180deg, var(--lime-top), var(--lime-mid) 60%, var(--lime-bottom)); }
.login .form { max-width: 440px; margin: 0 auto; padding: 8px 20px calc(28px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 14px; }
/* one line on every phone: the type grows with the screen (about 22 px at 375 px, 30 px from 500 px) */
.slogan { display: flex; flex-wrap: nowrap; gap: 6px; transform: rotate(-3deg); margin: 0 0 6px; }
.slogan span { font: 650 clamp(17px, 6vw, 30px)/1 var(--display); padding: 5px 12px 7px; border-radius: 999px; white-space: nowrap; }
.slogan .a { background: var(--sky); }
.slogan .b { background: var(--lilac); }
.slogan .c { background: var(--peach); }
.slogan .d { background: var(--p-kcal); }
.err { color: #b3261e; font-size: 0.8824rem; }

/* ---------- toasts ---------- */
.toasts { position: absolute; left: 0; right: 0; top: calc(var(--safe-top) + 12px); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { background: var(--dark); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 0.8824rem; font-weight: 500; max-width: 100%; text-align: center; animation: toast-in 0.3s var(--press); }
.toast.error { background: #b3261e; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

@media (prefers-reduced-motion: reduce) {
  .page { animation: fade-in 0.2s; }
  .sheet { animation: fade-in 0.2s; }
  .tap:active { transform: none; }
  .spin { animation-duration: 2s; }
}

#root { position: relative; }
code { font: 0.7647rem ui-monospace, SFMono-Regular, Menlo, monospace; background: rgba(29, 29, 31, 0.07); padding: 1px 5px; border-radius: 5px; }
.ic.inline { display: inline-block; vertical-align: -2px; color: var(--heart); }
/* scroll edge: content fades out under the floating back button instead of showing through */
.page::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: calc(var(--safe-top) + 64px); background: linear-gradient(to bottom, var(--page-bg, #f2eafb) 55%, transparent); z-index: 4; pointer-events: none; }

/* ---------- inside the iPhone app (LeonAppKit) ----------
   Native tab bar: no own bar; content runs under Apple's glass bar, the safe area covers its height. */
html.native-tabs { --tabbar: 0px; }
html.native-tabs .tabbar { display: none; }
html.native-tabs .screen-pad { padding-bottom: calc(var(--safe-bottom) + 24px); }
.ask { background: var(--dark); color: var(--on-dark); border-radius: 26px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.ask h3 { font: 650 1.1765rem/1.2 var(--display); }
.ask p { color: var(--on-dark-2); font-size: 0.8824rem; }
.ask .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ask .btn.light { background: var(--p-kcal); color: var(--p-kcal-ink); }
.ask .link-btn { color: var(--on-dark); }

/* ---------- Fragen & anpassen ---------- */
.sheet.tall { height: 92dvh; }
.sheet.has-foot .sheet-body { padding-bottom: 12px; flex: 1; min-height: 0; }
.sheet .sheet-head-actions { display: flex; align-items: center; gap: 2px; }
.sheet .sheet-foot { flex: none; padding: 10px max(16px, env(safe-area-inset-left, 0px)) calc(10px + var(--safe-bottom)); border-top: 1px solid var(--line); background: #fbfbf7; border-radius: 0; }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; min-width: 0; min-height: 44px; max-height: 132px; resize: none; border: 1.5px solid var(--line); border-radius: 22px; padding: 10px 16px; background: #fff; font: inherit; font-size: 1rem; line-height: 1.35; outline: none; }
.composer textarea:focus { border-color: var(--ink); }
.composer .round-btn:disabled { opacity: 0.35; }
.chat-intro { display: flex; flex-direction: column; gap: 12px; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.suggest button { min-height: 44px; padding: 0 16px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); font-size: 0.8824rem; font-weight: 600; text-align: left; }
.chat { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 20px; font-size: 1rem; line-height: 1.4; display: flex; flex-direction: column; gap: 8px; }
.msg p { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.me { align-self: flex-end; background: var(--dark); color: var(--on-dark); border-bottom-right-radius: 6px; }
.msg.ai { align-self: flex-start; background: var(--card-solid); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg .who { font-size: 0.7059rem; font-weight: 600; color: var(--on-dark-2); }
.proposal { background: var(--lime-mid); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.proposal b { font: 650 1rem/1.25 var(--display); }
.proposal ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 0.9412rem; }
.proposal .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.proposal .state { font-size: 0.8824rem; font-weight: 600; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.proposal .state.ok { color: var(--good); }
.msg.typing { flex-direction: row; gap: 5px; padding: 14px 16px; }
.msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: typing 1.2s infinite ease-in-out; }
.msg.typing i:nth-child(2) { animation-delay: 0.15s; }
.msg.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 60%, 100% { opacity: 0.3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.link-btn.undo { align-self: flex-start; color: var(--ink-2); }
.ask-card { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; background: var(--card-solid); border-radius: 22px; padding: 14px 16px; min-height: 64px; }
.ask-card .ask-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--lime-mid); flex: none; }
.ask-card .ask-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ask-card .ask-tx b { font: 650 1.0588rem/1.25 var(--display); }
.ask-card .ask-tx .sub { font-size: 0.8235rem; }
.ask-card > .ic:last-child { color: var(--ink-3); flex: none; }
.scale-note { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.scale-note p { font-size: 0.8824rem; color: var(--ink-2); }
.scale-note.over { background: var(--p-warn); }
.scale-note.over p { color: var(--p-warn-ink); }
@media (prefers-reduced-motion: reduce) {
  .msg.typing i { animation: none; opacity: 0.6; }
}

/* ======================= Kern ======================= */
.stack-gap { display: flex; flex-direction: column; gap: 16px; padding-top: 16px; }
.h-label { font-size: 0.7647rem; font-weight: 700; letter-spacing: 0.04em; text-transform: none; color: var(--ink-2); padding: 4px 4px 8px; }
.group { display: flex; flex-direction: column; gap: 8px; }
.note-line { display: flex; gap: 8px; align-items: center; font-size: 0.8235rem; color: var(--ink-2); padding: 4px; }
.empty-ic { width: 76px; height: 76px; border-radius: 50%; background: var(--card-solid); display: grid; place-items: center; }

/* pills */
.pill.topic { color: var(--ink); }
.tp-lilac { background: var(--lilac); } .tp-peach { background: var(--peach); } .tp-pink { background: var(--pink); }
.tp-mint { background: var(--mint); } .tp-butter { background: var(--butter); } .tp-sky { background: var(--sky); }
.pill.type { background: rgba(29, 29, 31, 0.07); color: var(--ink); }
.pill.project { background: var(--dark); color: var(--on-dark); }
.pill.important { background: var(--lime); color: var(--p-kcal-ink); }
.pill.big { min-height: 44px; padding: 0 16px; font-size: 0.9412rem; }
.pill[aria-pressed='true'] { outline: 2.5px solid var(--dark); outline-offset: 1px; }
.topic-grid { display: flex; flex-wrap: wrap; gap: 10px; }

/* entry card */
.icard { background: var(--card); border-radius: 26px; overflow: hidden; }
.icard-main { display: flex; gap: 14px; align-items: flex-start; padding: 12px; width: 100%; text-align: left; }
.th { width: 76px; height: 100px; border-radius: 16px; overflow: hidden; flex: none; display: grid; place-items: center; color: rgba(29, 29, 31, 0.45); }
.th img { width: 100%; height: 100%; object-fit: cover; }
.th.sm { width: 52px; height: 68px; border-radius: 12px; }
.icard .tx, .irow .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.meta { display: flex; gap: 6px; align-items: center; font-size: 0.7647rem; color: var(--ink-2); min-width: 0; }
.meta .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.meta .when { white-space: nowrap; }
.icard .tt, .irow .tt { font: 650 1.0588rem/1.25 var(--display); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.icard .gist { font-size: 0.8824rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.quick { display: flex; gap: 6px; padding: 0 12px 12px; align-items: center; }
.qbtn { flex: 1; min-height: 44px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 650; font-size: 0.8824rem; background: rgba(29, 29, 31, 0.06); }
.qbtn.keep { background: var(--dark); color: var(--on-dark); }
.todo-tag { flex: 1; display: inline-flex; gap: 6px; align-items: center; font-size: 0.8235rem; font-weight: 650; color: var(--ink-2); padding-left: 6px; }
.irow { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border-radius: 22px; padding: 10px; }
.irow .state { font-size: 0.8235rem; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.irow .msg { font-size: 0.8235rem; color: var(--ink-2); max-width: none; padding: 0; }
.irow .row, .wcard .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.file { position: relative; overflow: hidden; }
.file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* "Durchgehen" button */
.deck-cta { display: flex; align-items: center; gap: 14px; background: var(--dark); color: var(--on-dark); border-radius: 26px; padding: 14px 16px; text-align: left; width: 100%; min-height: 84px; }
.deck-cta .tx { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.deck-cta b { font: 650 1.2941rem/1.2 var(--display); }
.deck-cta span { font-size: 0.8235rem; color: var(--on-dark-2); }
.deck-fan { position: relative; width: 70px; height: 62px; flex: none; }
.deck-fan .fan { position: absolute; width: 42px; height: 56px; border-radius: 10px; border: 2px solid var(--dark); top: 3px; overflow: hidden; display: grid; place-items: center; color: rgba(29, 29, 31, 0.45); }
.deck-fan .fan img { width: 100%; height: 100%; object-fit: cover; }
.deck-fan .fan.f0 { left: 24px; transform: rotate(9deg); z-index: 3; }
.deck-fan .fan.f1 { left: 12px; transform: rotate(-2deg); z-index: 2; }
.deck-fan .fan.f2 { left: 0; transform: rotate(-12deg); z-index: 1; }
.deck-fan .fan .ic { width: 18px; height: 18px; }

/* deck */
.deck-page { background: linear-gradient(180deg, var(--lime-top), var(--lime-mid) 55%, var(--lime-bottom)); --page-bg: var(--lime-top); }
.deck-count { font-size: 0.8824rem; font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.deck { position: relative; flex: 1; min-height: 0; margin: calc(var(--safe-top) + 64px) max(12px, env(safe-area-inset-left, 0px)) calc(12px + var(--safe-bottom)); }
.dcard { position: absolute; inset: 0; max-width: 560px; margin: 0 auto; background: var(--card-solid); border-radius: 30px; box-shadow: 0 10px 30px rgba(40, 30, 90, 0.12); display: flex; flex-direction: column; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.dcard.under { transform: scale(0.95) translateY(10px); opacity: 0.7; }
.dcard-hero { position: relative; height: 34%; min-height: 150px; flex: none; display: grid; place-items: center; color: rgba(29, 29, 31, 0.4); }
.dcard-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.stamp { position: absolute; top: 18px; padding: 6px 14px; border-radius: 12px; font: 700 1.2941rem/1 var(--display); border: 3px solid; background: rgba(255, 255, 252, 0.9); opacity: 0; transition: opacity 0.15s; }
.stamp.keep { left: 18px; color: var(--good); transform: rotate(-10deg); }
.stamp.drop { right: 18px; color: var(--heart); transform: rotate(10deg); }
.dcard.keep .stamp.keep, .dcard.drop .stamp.drop { opacity: 1; }
.dcard-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px 8px; display: flex; flex-direction: column; gap: 10px; }
.dcard-title { font: 650 1.4118rem/1.15 var(--display); letter-spacing: -0.01em; text-wrap: balance; }
.dcard-gist { font-size: 1rem; line-height: 1.4; }
.points { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 0.9412rem; line-height: 1.4; color: var(--ink); }
.points li::marker { color: var(--ink-3); }
.points.big { font-size: 1rem; gap: 10px; background: var(--card-solid); border-radius: 22px; padding: 14px 16px 14px 34px; }
.action-box { display: flex; gap: 10px; align-items: flex-start; background: var(--lime); color: var(--p-kcal-ink); border-radius: 18px; padding: 12px 14px; }
.action-box b { font-size: 0.8235rem; font-weight: 700; }
.action-box p { font-size: 0.9412rem; line-height: 1.35; color: var(--ink); }
.dcard-actions { flex: none; display: flex; gap: 12px; justify-content: center; align-items: center; padding: 10px 16px 16px; }
.dbtn { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(29, 29, 31, 0.06); }
.dbtn.keep { background: var(--dark); color: var(--on-dark); }
.dbtn.drop { color: var(--heart); }
.dbtn.todo { width: auto; height: 52px; border-radius: 999px; padding: 0 18px; display: inline-flex; gap: 6px; font-weight: 650; font-size: 0.9412rem; }
.deck-done { position: absolute; inset: 0; justify-content: center; }
.deck-done .row { display: flex; gap: 10px; justify-content: center; }

/* detail */
.e-hero { padding-top: calc(var(--safe-top) + 60px); display: flex; justify-content: center; }
.e-photo { width: calc(100% - 32px); max-width: 600px; aspect-ratio: 16 / 10; border-radius: 26px; overflow: hidden; display: grid; place-items: center; color: rgba(29, 29, 31, 0.4); }
.e-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.e-head { padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.e-title { font: 650 1.7647rem/1.12 var(--display); letter-spacing: -0.015em; text-wrap: balance; }
.e-gist { font-size: 1.0588rem; line-height: 1.45; }
.hint-box { font-size: 0.8235rem; color: var(--p-warn-ink); background: var(--p-warn); border-radius: 14px; padding: 10px 12px; }
.fits { display: flex; flex-direction: column; gap: 12px; }
.fit { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.fit p { font-size: 0.9412rem; color: var(--ink-2); }
.mentions { padding: 4px 16px; }
.mention { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mention:last-child { border-bottom: 0; }
.mention .mtx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mention .mtx span { font-size: 0.8235rem; color: var(--ink-2); }
.round-btn.sm { width: 40px; height: 40px; background: rgba(29, 29, 31, 0.06); }
.checks p { font-size: 0.8824rem; }
.menu-right { margin-left: auto; }
.src-line { padding: 10px 4px 0; }
.decide-row { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 8px; max-width: 600px; margin: 0 auto; width: 100%; }
.decide-row .btn { padding: 0 10px; }
.state { display: flex; gap: 8px; align-items: center; font-size: 0.8824rem; color: var(--ink-2); }

/* collection */
.search { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 8px 0 14px; margin-top: 14px; background: var(--card-solid); border-radius: 999px; color: var(--ink-2); }
.search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; min-height: 46px; font-size: 1rem; color: var(--ink); }
.search input::-webkit-search-cancel-button { display: none; }
.search button { width: 36px; height: 36px; display: grid; place-items: center; }
.fchips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 12px max(16px, env(safe-area-inset-left, 0px)) 14px; }
.fchips::-webkit-scrollbar { display: none; }
.fchip { flex: none; min-height: 38px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 252, 0.7); font-size: 0.8235rem; font-weight: 650; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.fchip span { font-size: 0.7059rem; color: var(--ink-3); }
.fchip[aria-pressed='true'] { background: var(--dark); color: var(--on-dark); }
.fchip[aria-pressed='true'] span { color: var(--on-dark-2); }

/* Fragen */
.fragen { position: absolute; inset: 0; display: flex; flex-direction: column; }
.fragen-scroll { flex: 1; min-height: 0; overflow-y: auto; width: 100%; }
.fragen .chat { padding-top: 16px; }
.composer-bar { flex: none; padding: 10px max(16px, env(safe-area-inset-left, 0px)) calc(10px + var(--safe-bottom)); background: rgba(238, 234, 252, 0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.composer-bar .composer { max-width: 640px; margin: 0 auto; }
.refs { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.refs .icard { background: var(--lime-mid); }
.refs .th { width: 54px; height: 70px; border-radius: 12px; }
.msg.ai { max-width: 100%; }
.msg.ai.err { color: var(--p-bad-ink); background: var(--p-bad); }
html:not(.native-tabs) .fragen { bottom: 0; }

/* Ich */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats div { background: var(--card); border-radius: 22px; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.stats b { font: 650 1.6471rem/1.1 var(--display); }
.stats span { font-size: 0.7647rem; color: var(--ink-2); }
.kv.stepper { align-items: center; }
.kv .ctl button { width: 40px; height: 40px; }
.howto { display: flex; flex-direction: column; gap: 6px; font-size: 0.8235rem; color: var(--ink-2); background: rgba(255, 255, 252, 0.7); border-radius: 16px; padding: 12px 14px; }
.howto b { color: var(--ink); }
.howto ol { margin: 0 0 6px; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.proj-list { display: flex; flex-direction: column; gap: 12px; }
.proj { display: flex; flex-direction: column; gap: 6px; background: #fff; border-radius: 18px; padding: 10px; }
.proj .input { min-height: 44px; }
.danger { color: #c0392b; }

/* login */
.login-art { height: min(44dvh, 400px); display: grid; place-items: center; padding-top: var(--safe-top); }
.login-art .stack { position: relative; width: 250px; height: 230px; }
.login-art .card { position: absolute; width: 220px; background: var(--card-solid); border-radius: 24px; padding: 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 10px 28px rgba(40, 30, 90, 0.12); }
.login-art .card b { font: 650 1.0588rem/1.2 var(--display); }
.login-art .card i { display: block; height: 8px; border-radius: 4px; background: rgba(29, 29, 31, 0.08); }
.login-art .card i:last-child { width: 60%; }
.login-art .c1 { top: 0; left: 0; transform: rotate(-8deg); }
.login-art .c2 { top: 26px; left: 22px; transform: rotate(4deg); }
.login-art .c3 { top: 66px; left: 14px; transform: rotate(-2deg); }
.login .pill.sm .ic { width: 14px; height: 14px; }

@media (prefers-reduced-motion: reduce) {
  .dcard { transition: none !important; }
}
/* three longer words than Cocotte's: smaller and allowed to wrap on narrow phones */
.slogan { flex-wrap: wrap; row-gap: 6px; }
.slogan span { font-size: clamp(16px, 5.2vw, 26px); }
.ans-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.msg.ai p + p { margin-top: 2px; }
