:root {
  --bg: #efe8dd;
  --ink: #2f2426;
  --muted: #7c7370;
  --line: #e4dbcf;
  --card: #fffaf2;
  --white: #ffffff;
  --green: #6fa88b;
  --green-dark: #43745c;
  --orchid: #9c7bc9;
  --plum: #72559e;
  --orchid-soft: #f0e9fa;
  --yellow: #e5ad44;
  --red: #d9655b;
  --blue: #587b9d;
  --shadow: 0 24px 80px rgba(47, 36, 38, 0.2);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 12% 10%, #fff7ea 0, transparent 26%), var(--bg); }
button, input, select { font: inherit; }
button { border: 0; cursor: pointer; }

.stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(280px, 520px);
  gap: 56px;
  align-items: center;
  justify-content: center;
  padding: 34px;
}

.phone {
  width: min(100%, 390px);
  height: min(844px, calc(100vh - 34px));
  min-height: 700px;
  margin: 0 auto;
  border: 8px solid var(--ink);
  border-radius: 42px;
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.screen { height: 100%; display: flex; flex-direction: column; background: #fffaf3; }
.scroll { flex: 1; overflow: auto; padding: 18px 18px 96px; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 8px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0; }
.leaf { width: 36px; height: 36px; background: url("/icons/nutriveal-mark.png") center/contain no-repeat; }
.brand span { background: linear-gradient(90deg, var(--green) 0%, var(--green) 45%, var(--orchid) 55%, var(--orchid) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; font-size: 20px; letter-spacing: -0.5px; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: #f1e8dc; color: var(--plum); }
.icon { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.headline { font-size: 32px; line-height: 1.02; margin: 18px 0 10px; letter-spacing: 0; }
.subtle { color: var(--muted); line-height: 1.45; }
.section-title { font-size: 16px; margin: 24px 0 12px; font-weight: 800; }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-row .section-title { margin-bottom: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.hero-panel { background: #2f2426; color: white; border-radius: 8px; padding: 18px; min-height: 190px; display: grid; grid-template-columns: 1fr 112px; gap: 14px; overflow: hidden; }
.hero-panel p { color: rgba(255,255,255,.72); margin: 8px 0 16px; font-size: 14px; }
.product-art { align-self: end; justify-self: center; width: 104px; height: 142px; border-radius: 10px; background: linear-gradient(180deg, #fafafa, #ddd); box-shadow: 0 18px 34px rgba(0,0,0,.25); position: relative; overflow: hidden; }
.product-art:before { content: ""; position: absolute; inset: 22px 13px 40px; border-radius: 8px; background: var(--green); }
.product-art:after { content: "WHEY"; position: absolute; left: 0; right: 0; top: 52px; text-align: center; color: #fff; font-size: 17px; font-weight: 900; }
.primary { min-height: 52px; border-radius: 16px; background: var(--green); color: white; font-weight: 800; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.purple-cta { background: var(--plum); box-shadow: 0 12px 24px rgba(114, 85, 158, .24); }
.secondary { min-height: 48px; border-radius: 16px; background: #efe6d8; color: var(--ink); font-weight: 800; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.secondary.compact { min-height: 52px; padding-inline: 14px; }
.ghost { background: transparent; color: var(--green-dark); font-weight: 800; }
.mini-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 12px; background: #f1e8dc; color: var(--muted); font-size: 22px; line-height: 1; flex: none; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quick { border-radius: 8px; background: white; border: 1px solid var(--line); padding: 12px 8px; text-align: left; min-height: 86px; }
.quick strong { display: block; font-size: 21px; }
.quick span { color: var(--muted); font-size: 12px; }
.quick-premium { background: var(--orchid-soft); border-color: #ded0f0; }
.quick-premium strong { color: var(--plum); }
.quick-good strong { color: var(--green-dark); }
.quick-risk strong { color: #a83a32; }
.summary-card { border-radius: 8px; border: 1px solid var(--line); background: white; padding: 14px; margin-bottom: 10px; }
.summary-card strong { display: block; font-size: 28px; line-height: 1; }
.summary-card span { color: var(--muted); font-size: 13px; }
.home-hero { padding: 8px 0 6px; }
.home-hero .headline { margin-top: 10px; }
.eyebrow, .soft-pill { display: inline-flex; width: fit-content; align-items: center; border-radius: 999px; background: var(--orchid-soft); color: var(--plum); padding: 6px 10px; font-size: 12px; font-weight: 900; }
.home-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 16px; }
.today-panel { border: 1px solid #ded0f0; background: linear-gradient(135deg, #fff, var(--orchid-soft)); border-radius: 8px; padding: 14px; margin-top: 12px; }
.today-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.today-head span, .today-head small { color: var(--muted); font-size: 12px; font-weight: 800; }
.today-head strong { display: block; font-size: 31px; line-height: 1.05; margin-top: 3px; }
.macro-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.macro-mini span { border-radius: 8px; background: rgba(255,255,255,.7); padding: 9px 7px; color: var(--muted); font-size: 11px; }
.macro-mini strong { display: block; color: var(--ink); font-size: 14px; }
.insight-card { border-radius: 8px; background: var(--plum); color: white; padding: 14px; margin-top: 14px; }
.insight-card .soft-pill { background: rgba(255,255,255,.16); color: white; padding-block: 5px; }
.insight-card strong { display: block; margin-top: 10px; }
.insight-card p { margin: 5px 0 0; color: rgba(255,255,255,.74); font-size: 13px; line-height: 1.4; }

.list { display: grid; gap: 10px; }
.row { display: flex; align-items: center; gap: 12px; border-radius: 8px; background: white; border: 1px solid var(--line); padding: 11px; }
.thumb { width: 48px; height: 58px; border-radius: 8px; background: linear-gradient(180deg, #fff, #e9e0d5); flex: none; position: relative; overflow: hidden; }
.thumb:after { content: ""; position: absolute; left: 8px; right: 8px; top: 19px; height: 18px; border-radius: 5px; background: var(--p, var(--green)); }
.row-copy { min-width: 0; flex: 1; }
.row-copy strong, .row-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-copy span { color: var(--muted); font-size: 12px; }
.badge { border-radius: 999px; padding: 6px 9px; font-size: 12px; font-weight: 900; background: #e3f1e9; color: var(--green-dark); }
.badge.yellow { background: #fff0ce; color: #9b6a09; }
.badge.red { background: #ffe0dc; color: #a83a32; }

.nav { position: absolute; left: 14px; right: 14px; bottom: 14px; height: 70px; border-radius: 22px; background: rgba(255,250,242,.92); border: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 8px; backdrop-filter: blur(16px); }
.nav button { border-radius: 16px; background: transparent; color: var(--muted); display: grid; place-items: center; gap: 3px; font-size: 10px; font-weight: 800; }
.nav button.active { background: #e3f1e9; color: var(--green-dark); }
.nav button:nth-child(3).active, .nav button:nth-child(4).active { background: var(--orchid-soft); color: var(--plum); }

.scanner { flex: 1; background: #111; color: white; position: relative; overflow: hidden; }
.scanner-reader { position: absolute; inset: 0; width: 100%; height: 100%; background: #111; z-index: 0; }
.scanner-video { position: absolute; inset: 0; display: none; width: 100%; height: 100%; object-fit: cover; background: #111; z-index: 0; }
.scanner-video.active { display: block; }
.scanner-reader video { width: 100% !important; height: 100% !important; object-fit: cover; }
.scanner-reader div { border: 0 !important; box-shadow: none !important; }
.scanner-bg { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(160deg, rgba(34,23,25,.5), rgba(95,110,97,.28) 52%, rgba(21,19,20,.58)); }
.scan-box { position: absolute; left: 50%; top: 42%; z-index: 2; pointer-events: none; transform: translate(-50%, -50%); width: 290px; height: 190px; border: 2px solid rgba(255,255,255,.8); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,.38); }
.scan-line { position: absolute; left: 14px; right: 14px; height: 3px; top: 32px; border-radius: 4px; background: var(--green); animation: scan 2.4s linear infinite; box-shadow: 0 0 20px var(--green); }
@keyframes scan { 0%,100% { transform: translateY(0); } 50% { transform: translateY(118px); } }
.scanner-actions { position: absolute; left: 18px; right: 18px; bottom: 28px; z-index: 5; display: grid; gap: 10px; }
.scanner-top { position: absolute; left: 18px; right: 18px; top: 18px; z-index: 6; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.scanner-top .icon-btn, .scanner-top .badge { pointer-events: auto; }
.manual-scan { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.manual-scan input { min-width: 0; border-radius: 16px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.16); color: white; padding: 0 14px; outline: 0; }
.manual-scan input::placeholder { color: rgba(255,255,255,.72); }
.manual-scan button { min-height: 48px; border-radius: 16px; background: white; color: var(--ink); font-weight: 800; padding: 0 14px; }
.scanner-note { margin: 0; border-radius: 12px; background: rgba(255,255,255,.13); color: rgba(255,255,255,.78); padding: 9px 11px; font-size: 11px; line-height: 1.35; }
.scanner-status.loading { background: #fff0ce; color: #7b5508; }
.scanner-status.searching { background: var(--orchid-soft); color: var(--plum); }
.scanner-status.success { background: #e3f1e9; color: var(--green-dark); }
.scanner-status.error { background: #ffe0dc; color: #a83a32; }
.demo-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.demo-strip button { min-height: 44px; border-radius: 14px; background: rgba(255,255,255,.16); color: white; font-size: 12px; font-weight: 900; padding: 0 8px; }
.scanner-close { min-height: 44px; border-radius: 14px; background: rgba(255,255,255,.92); color: var(--ink); font-weight: 900; }

.score-card { color: white; background: var(--green); border-radius: 8px; padding: 18px; display: grid; grid-template-columns: 116px 1fr; gap: 14px; align-items: center; }
.score-card.yellow { background: var(--yellow); }
.score-card.red { background: var(--red); }
.score-card small { display: block; margin-top: 8px; color: rgba(255,255,255,.72); font-size: 12px; font-weight: 800; }
.ring { width: 108px; height: 108px; border-radius: 50%; background: conic-gradient(#fff calc(var(--score) * 1%), rgba(255,255,255,.25) 0); display: grid; place-items: center; }
.ring span { width: 80px; height: 80px; border-radius: 50%; background: rgba(0,0,0,.16); display: grid; place-items: center; font-size: 28px; font-weight: 900; }
.fact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fact { border-radius: 8px; padding: 12px; border: 1px solid var(--line); background: white; }
.fact span { color: var(--muted); font-size: 12px; display: block; }
.fact strong { display: block; margin-top: 3px; }
.check-list { display: grid; gap: 8px; }
.check { display: flex; gap: 9px; align-items: flex-start; line-height: 1.35; font-size: 14px; }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: none; background: var(--green); }
.dot.warn { background: var(--yellow); }
.dot.bad { background: var(--red); }
.ingredient { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ingredient:last-child { border-bottom: 0; }
.ingredient small { color: var(--muted); display: block; }
.add-card { display: grid; gap: 12px; }
.add-card span { color: var(--muted); display: block; font-size: 13px; margin-top: 3px; }
.add-card label { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.add-card input, .add-card select { width: 118px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: white; color: var(--ink); }
.reason-grid { display: grid; gap: 10px; }
.reason-card { display: grid; gap: 8px; }
.reason-card > strong { margin-bottom: 2px; }
.alternative-card { display: grid; gap: 8px; }
.alternative-card p { margin: 0; border-radius: 8px; background: var(--orchid-soft); color: var(--plum); padding: 11px; font-size: 13px; line-height: 1.4; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-row span { border-radius: 999px; background: #e3f1e9; color: var(--green-dark); padding: 6px 9px; font-size: 11px; font-weight: 900; }
.macro-card { display: grid; gap: 14px; }
.macro-line { display: grid; gap: 8px; }
.macro-line > div:first-child { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.macro-line span { color: var(--muted); font-size: 12px; }
.bar { height: 9px; border-radius: 999px; background: #eadfd0; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.bar.purple { background: #e5d9f1; margin-top: 12px; }
.bar.purple i { background: linear-gradient(90deg, var(--plum), var(--orchid)); }
.empty { display: grid; gap: 10px; }
.empty span { color: var(--muted); font-size: 14px; }
.meal-section { display: grid; gap: 8px; margin-bottom: 12px; }
.meal-head { display: flex; justify-content: space-between; align-items: center; border-radius: 8px; background: var(--orchid-soft); color: var(--plum); padding: 10px 12px; }
.meal-head span { font-size: 12px; font-weight: 900; }
.meal-empty { border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); padding: 12px; font-size: 13px; }

.profile-grid { display: grid; gap: 10px; padding-bottom: 88px; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.toggle-row input[type="checkbox"] { appearance: none; width: 48px; height: 28px; border-radius: 999px; background: #d7cdc0; position: relative; flex: none; transition: .16s ease; }
.toggle-row input[type="checkbox"]:after { content: ""; width: 22px; height: 22px; border-radius: 50%; background: white; position: absolute; top: 3px; left: 3px; transition: .16s ease; }
.toggle-row input[type="checkbox"]:checked { background: var(--green); }
.toggle-row input[type="checkbox"]:checked:after { transform: translateX(20px); }
.switch { width: 48px; height: 28px; border-radius: 999px; background: var(--green); position: relative; flex: none; }
.switch:after { content: ""; width: 22px; height: 22px; border-radius: 50%; background: white; position: absolute; top: 3px; right: 3px; }
.goal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.field { display: grid; gap: 6px; border-radius: 8px; border: 1px solid var(--line); background: white; padding: 11px; font-size: 13px; color: var(--muted); }
.field div { display: flex; align-items: center; gap: 6px; }
.field input, .field select { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-weight: 800; }
.field small { color: var(--muted); font-weight: 800; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 14px; }
.tabs button { border-radius: 14px; padding: 10px 4px; background: #efe6d8; color: var(--muted); font-weight: 900; font-size: 12px; }
.tabs button.active { color: white; background: var(--ink); }

.auth { flex: 1; display: flex; flex-direction: column; justify-content: space-between; padding: 10px 22px 28px; }
.auth-scroll { padding: 8px 0 20px; overflow: visible; }
.auth-code { display: grid; gap: 10px; }
.auth-code input { width: 100%; border: 1px solid var(--line); background: white; border-radius: 16px; padding: 16px; outline: 0; }
.pitch { max-width: 520px; }
.pitch h1 { font-size: clamp(34px, 5vw, 62px); line-height: .98; margin: 0 0 20px; letter-spacing: 0; }
.pitch p { color: #5f5551; font-size: 18px; line-height: 1.55; }
.pitch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 26px; }
.pitch-card { background: rgba(255,250,242,.68); border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.pitch-card strong { display: block; margin-bottom: 6px; }
.pitch-card span { color: var(--muted); font-size: 14px; line-height: 1.4; }

@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; padding: 0; gap: 0; }
  .phone { width: 100%; height: 100vh; min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
  .pitch { display: none; }
}

/* ============ TAGES-SCORE ============ */
.home-hero.compact { padding: 4px 0 2px; }
.home-hero.compact .headline { font-size: 26px; margin: 8px 0 4px; }
.day-score { margin-top: 14px; border-radius: 14px; padding: 16px; display: grid; grid-template-columns: 132px 1fr; gap: 14px; align-items: center; background: linear-gradient(135deg, #fff, var(--orchid-soft)); border: 1px solid #ded0f0; color: var(--plum); }
.day-score.yellow { background: linear-gradient(135deg, #fff, #fff0ce); border-color: #f1d995; color: #9b6a09; }
.day-score.red { background: linear-gradient(135deg, #fff, #ffe0dc); border-color: #f3b8b1; color: #a83a32; }
.ds-ring { width: 132px; height: 132px; border-radius: 50%; background: conic-gradient(currentColor calc(var(--score) * 1%), rgba(0,0,0,.06) 0); display: grid; place-items: center; }
.ds-inner { width: 100px; height: 100px; border-radius: 50%; background: white; display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); color: currentColor; }
.ds-value { font-size: 36px; font-weight: 900; line-height: 1; }
.ds-inner small { color: var(--muted); font-size: 11px; font-weight: 800; margin-top: 2px; }
.ds-meta { display: grid; gap: 10px; }
.ds-trend strong { display: block; font-size: 22px; font-weight: 900; }
.ds-trend span { color: var(--muted); font-size: 12px; font-weight: 700; }
.ds-spark { color: currentColor; }
.spark { width: 100%; height: 36px; display: block; }

.ds-breakdown { display: grid; gap: 10px; margin-top: 14px; }
.ds-row { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; display: grid; gap: 6px; }
.ds-row-head { display: flex; justify-content: space-between; align-items: baseline; }
.ds-row-head strong { font-size: 13px; }
.ds-row-head span { font-weight: 900; font-size: 16px; }
.ds-row-head small { color: var(--muted); font-weight: 700; margin-left: 4px; font-size: 11px; }
.ds-row.good .bar i { background: var(--green); }
.ds-row.warn .bar i { background: var(--yellow); }
.ds-row.bad .bar i { background: var(--red); }
.ds-hint { color: var(--muted); font-size: 11px; }

.tip-card { background: white; border: 1px solid var(--line); border-left: 4px solid var(--orchid); border-radius: 10px; padding: 11px 12px; display: grid; gap: 4px; }
.tip-card strong { font-size: 13px; color: var(--plum); }
.tip-card span { color: var(--muted); font-size: 12px; line-height: 1.4; }
.tip-card.good { border-left-color: var(--green); }
.tip-card.good strong { color: var(--green-dark); }

/* Wasser */
.water-card { margin-top: 16px; background: linear-gradient(135deg, #fff, #e8f1f8); border: 1px solid #cfddea; border-radius: 14px; padding: 14px; display: grid; gap: 10px; color: var(--blue); }
.water-pill { background: rgba(88,123,157,.12); color: var(--blue); padding-block: 5px; }
.water-card strong { font-size: 24px; font-weight: 900; color: var(--ink); }
.water-card small { color: var(--muted); font-weight: 800; }
.water-card .bar { background: rgba(88,123,157,.18); }
.water-card .bar i { background: linear-gradient(90deg, var(--blue), #79a3c4); }
.water-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.water-row button { min-height: 40px; border-radius: 12px; background: white; color: var(--blue); font-weight: 900; font-size: 13px; border: 1px solid #cfddea; }
.water-row button.ghost-btn { background: transparent; color: var(--muted); border-color: var(--line); }

/* Makro-Ampel */
.macro-amp { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.amp-cell { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 4px; position: relative; }
.amp-cell span { color: var(--muted); font-size: 12px; font-weight: 800; }
.amp-cell strong { font-size: 18px; font-weight: 900; }
.amp-good { border-color: #b6d4c2; background: #f1faf4; }
.amp-neutral { border-color: #f1d995; background: #fff8e6; }
.amp-bad { border-color: #f3b8b1; background: #fff1ee; }
.lite { display: inline-block; width: 12px; height: 12px; border-radius: 50%; position: absolute; top: 12px; right: 12px; }
.lite-good { background: var(--green); }
.lite-neutral { background: var(--yellow); }
.lite-bad { background: var(--red); }
.macro-lights { display: inline-flex; gap: 3px; flex: none; position: relative; }
.macro-lights .lite { position: static; }

/* Ingredient buttons + Modal */
.ingredient-btn { width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; }
.ingredient-btn:last-child { border-bottom: 0; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(47,36,38,.55); display: grid; place-items: center; z-index: 50; padding: 18px; }
.modal { background: var(--card); border-radius: 18px; padding: 22px; width: 100%; max-width: 320px; position: relative; box-shadow: 0 24px 60px rgba(0,0,0,.3); display: grid; gap: 10px; }
.modal h3 { margin: 0; font-size: 22px; }
.modal h4 { margin: 8px 0 -4px; font-size: 13px; color: var(--muted); }
.modal p { margin: 0; line-height: 1.45; font-size: 14px; }
.modal-close { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; display: grid; place-items: center; background: rgba(0,0,0,.06); border-radius: 50%; color: var(--ink); }

/* Diary head + Insights */
.diary-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.diary-score { padding: 10px 14px; border-radius: 14px; display: grid; place-items: center; min-width: 86px; background: var(--orchid-soft); color: var(--plum); }
.diary-score.yellow { background: #fff0ce; color: #9b6a09; }
.diary-score.red { background: #ffe0dc; color: #a83a32; }
.diary-score strong { font-size: 24px; font-weight: 900; line-height: 1; }
.diary-score span { font-size: 10px; font-weight: 800; margin-top: 2px; }

.insight-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.stat { display: grid; gap: 4px; text-align: left; }
.stat span { color: var(--muted); font-size: 11px; font-weight: 800; }
.stat strong { font-size: 26px; font-weight: 900; line-height: 1; }
.stat small { color: var(--muted); font-size: 10px; }
.big-spark { color: var(--plum); padding: 14px 10px 4px; }
.spark-lg { width: 100%; height: auto; display: block; }

/* Nav 5 cols */
.nav { grid-template-columns: repeat(5, 1fr); }
.nav button:nth-child(4).active { background: var(--orchid-soft); color: var(--plum); }
.nav button:nth-child(5).active { background: #efe6d8; color: var(--ink); }

/* ====== Personalization additions ====== */
.ds-focus { display: grid; gap: 4px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.ds-focus strong { font-size: 16px; font-weight: 800; color: var(--ink); }
.ds-focus strong small { color: var(--muted); font-weight: 700; font-size: 11px; margin-left: 4px; }
.ds-focus .bar { height: 6px; background: #f0e7d8; border-radius: 999px; overflow: hidden; }
.ds-focus .bar i { display: block; height: 100%; border-radius: 999px; transition: width .3s ease; }

.reminder-card { display: grid; gap: 4px; border-left: 4px solid var(--plum); background: linear-gradient(180deg, #fffaf3, #f7f0ff); margin-top: 12px; }
.reminder-card strong { font-size: 16px; font-weight: 800; }
.reminder-card .subtle { font-size: 13px; }

.checkin-card { display: grid; gap: 12px; margin-top: 14px; }
.checkin-grid { display: grid; gap: 10px; }
.ci-row { display: grid; gap: 4px; }
.ci-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 800; color: var(--muted); }
.ci-head strong { color: var(--plum); font-size: 16px; }
.ci-row input[type="range"] { width: 100%; accent-color: var(--plum); }
.ci-scale { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }
.checkin-card .primary.compact { min-height: 44px; font-size: 14px; }
.checkin-trend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding-top: 10px; border-top: 1px dashed var(--line); }
.checkin-trend > div { display: grid; gap: 2px; font-size: 11px; color: var(--muted); font-weight: 700; }
.checkin-trend strong { font-size: 14px; color: var(--ink); }
.mini-spark { width: 100%; height: 18px; display: block; }

.plan-card { display: grid; gap: 10px; }
.plan-row { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.plan-row:last-of-type { border-bottom: 0; padding-bottom: 0; }
.plan-row .eyebrow { font-size: 10px; color: var(--plum); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.plan-row strong { font-weight: 700; font-size: 14px; line-height: 1.35; }
.plan-focus { display: flex; gap: 8px; align-items: flex-start; padding: 10px; border-radius: 12px; background: var(--orchid-soft); color: var(--plum); font-size: 13px; }
.plan-focus .icon { stroke: currentColor; flex: none; }

/* Food search in scanner */
.search-block { display: grid; gap: 10px; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.95); color: var(--ink); margin-top: 10px; }
.search-head strong { font-size: 14px; font-weight: 800; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 12px; border-radius: 999px; background: #f1e8dc; color: var(--ink); font-size: 12px; font-weight: 700; border: 1px solid transparent; }
.chip.active { background: var(--plum); color: white; border-color: var(--plum); }
.search-results { max-height: 220px; overflow: auto; }
.search-results .row { background: #fffaf3; }

/* ====== Scanner search toggle ====== */
.scanner-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.manual-scan.grow { width: 100%; }
.search-toggle { min-height: 48px; border-radius: 16px; background: rgba(255,255,255,.16); color: white; font-weight: 800; padding: 0 14px; font-size: 13px; border: 1px solid rgba(255,255,255,.22); }
.search-toggle.active { background: var(--plum); border-color: var(--plum); }
.search-block.hidden { display: none; }
.search-block { max-height: 320px; overflow: auto; }

/* ====== Reminders ====== */
.reminder-list { display: grid; gap: 8px; }
.reminder-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.reminder-row.on { border-left: 4px solid var(--plum); }
.reminder-row.off { opacity: .68; }
.rr-meta { display: grid; gap: 2px; }
.rr-meta strong { font-size: 13px; font-weight: 800; }
.rr-meta span { color: var(--muted); font-size: 11px; font-weight: 700; }
.reminder-row input[type="checkbox"] { appearance: none; width: 40px; height: 24px; border-radius: 999px; background: #d7cdc0; position: relative; flex: none; transition: .16s; cursor: pointer; }
.reminder-row input[type="checkbox"]:after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: white; transition: .16s; }
.reminder-row input[type="checkbox"]:checked { background: var(--plum); }
.reminder-row input[type="checkbox"]:checked:after { transform: translateX(16px); }

/* ====== Einkaufsliste ====== */
.shopping-card { display: grid; gap: 12px; }
.manual-scan.light input { background: white; color: var(--ink); border: 1px solid var(--line); }
.manual-scan.light input::placeholder { color: var(--muted); }
.manual-scan.light button { min-height: 44px; border-radius: 14px; background: var(--plum); color: white; font-weight: 900; padding: 0 16px; }
.shopping-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.shopping-actions .chip { background: var(--orchid-soft); color: var(--plum); }
.shopping-actions .chip.ghost-chip { background: transparent; color: var(--muted); border: 1px dashed var(--line); }
.shop-group { display: grid; gap: 6px; }
.shop-cat { font-size: 11px; font-weight: 900; color: var(--plum); text-transform: uppercase; letter-spacing: .06em; padding-top: 6px; border-top: 1px dashed var(--line); }
.shop-item { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; font-size: 14px; cursor: pointer; }
.shop-item input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--green); cursor: pointer; }
.shop-item.done span { text-decoration: line-through; color: var(--muted); }
.shop-item .mini-btn { width: 26px; height: 26px; font-size: 16px; }

/* ====== Wochen-Fortschritt ====== */
.progress-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.progress-card { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; min-height: 132px; }
.progress-card.good { border-left: 3px solid var(--green); }
.progress-card.bad { border-left: 3px solid var(--red); }
.progress-card.neutral { border-left: 3px solid var(--muted); }
.pc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.pc-head strong { display: block; font-size: 18px; font-weight: 900; margin-top: 2px; }
.pc-trend { text-align: right; }
.pc-trend span { font-size: 11px; font-weight: 900; }
.pc-trend small { display: block; color: var(--muted); font-size: 10px; font-weight: 700; }
.progress-card.good .pc-trend span { color: var(--green-dark); }
.progress-card.bad .pc-trend span { color: #a83a32; }
.progress-card.neutral .pc-trend span { color: var(--muted); }
.pc-spark { width: 100%; height: 28px; display: block; }
.pc-interp { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.35; }

/* ====== Compact Home ====== */
.scroll.compact { padding: 14px 14px 96px; }
.home-hero.tight { padding: 2px 0 4px; }
.home-hero.tight .headline { font-size: 24px; margin: 6px 0 4px; }
.home-hero.tight .nba { margin: 0; font-size: 13px; line-height: 1.4; }
.home-hero.tight .nba strong { color: var(--plum); }
.dash-card { margin-top: 10px; padding: 12px; border-radius: 8px; border: 1px solid #ded0f0; background: linear-gradient(135deg, #fff, var(--orchid-soft)); display: grid; grid-template-columns: 88px 1fr; gap: 12px; align-items: center; }
.dash-card.yellow { border-color: #f1d995; background: linear-gradient(135deg, #fff, #fff0ce); }
.dash-card.red { border-color: #f3b8b1; background: linear-gradient(135deg, #fff, #ffe0dc); }
.dash-ring { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--plum) calc(var(--score) * 1%), rgba(0,0,0,.06) 0); }
.dash-card.yellow .dash-ring { background: conic-gradient(#9b6a09 calc(var(--score) * 1%), rgba(0,0,0,.06) 0); }
.dash-card.red .dash-ring { background: conic-gradient(#a83a32 calc(var(--score) * 1%), rgba(0,0,0,.06) 0); }
.dash-ring-inner { width: 68px; height: 68px; border-radius: 50%; background: white; display: grid; place-items: center; }
.dash-ring-inner span { font-size: 22px; font-weight: 900; color: var(--ink); line-height: 1; }
.dash-ring-inner small { font-size: 10px; color: var(--muted); font-weight: 800; }
.dash-stats { display: grid; gap: 6px; }
.dash-stat .ds-line { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; color: var(--muted); font-weight: 800; }
.dash-stat .ds-line strong { font-size: 13px; color: var(--ink); font-weight: 900; }
.dash-stat .ds-line strong small { color: var(--muted); font-weight: 700; margin-left: 3px; font-size: 10px; }
.dash-stat .bar { height: 6px; }

.quick-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.quick-btn { display: grid; place-items: center; gap: 4px; padding: 12px 4px; border-radius: 8px; background: white; border: 1px solid var(--line); color: var(--ink); font-size: 11px; font-weight: 800; line-height: 1.2; text-align: center; min-height: 64px; }
.quick-btn.primary-tint { background: var(--orchid-soft); border-color: #ded0f0; color: var(--plum); }
.quick-btn .icon { width: 18px; height: 18px; }

.mini-reminder { margin-top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-left: 4px solid var(--plum); padding: 10px 12px; }
.mini-reminder strong { display: block; font-size: 14px; font-weight: 800; margin-top: 2px; }
.mini-reminder .subtle { font-size: 11px; }
.rr-toggle input { appearance: none; width: 40px; height: 24px; border-radius: 999px; background: #d7cdc0; position: relative; cursor: pointer; }
.rr-toggle input:after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: white; transition: .16s; }
.rr-toggle input:checked { background: var(--plum); }
.rr-toggle input:checked:after { transform: translateX(16px); }

.today-macros { margin-top: 10px; }
.today-macros .section-row strong { font-size: 14px; font-weight: 800; }
.macro-mini.five { grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 0; }
.macro-mini.five span { padding: 7px 2px; text-align: center; font-size: 10px; }
.macro-mini.five strong { display: block; color: var(--ink); font-size: 12px; margin-bottom: 1px; }

.more-details { margin-top: 12px; }
.more-details summary { cursor: pointer; font-weight: 800; color: var(--plum); font-size: 13px; padding: 6px 0; list-style: none; }
.more-details summary::-webkit-details-marker { display: none; }
.more-details summary:before { content: "▸ "; }
.more-details[open] summary:before { content: "▾ "; }

/* ====== Food Search ====== */
.scanner-fallback { min-height: 42px; border-radius: 12px; background: rgba(156,123,201,.28); color: white; font-weight: 800; font-size: 13px; padding: 0 12px; border: 1px solid rgba(255,255,255,.18); }
.slider-card { display: grid; gap: 14px; margin-top: 12px; }
.macro-slider { display: grid; gap: 4px; }
.ms-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--muted); font-weight: 800; }
.ms-head strong { color: var(--plum); font-size: 14px; font-weight: 900; }
.macro-slider input[type="range"] { width: 100%; accent-color: var(--plum); height: 26px; }
.ms-scale { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }
.food-matches { display: grid; gap: 10px; }
.food-match { background: white; border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: grid; gap: 8px; }
.fm-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.fm-head strong { display: block; font-size: 14px; }
.fm-head .subtle { font-size: 11px; }
.fm-match { text-align: right; flex: none; }
.fm-match strong { display: block; font-size: 22px; font-weight: 900; color: var(--plum); line-height: 1; }
.fm-match small { font-size: 10px; color: var(--muted); font-weight: 800; }
.fm-macros { display: flex; flex-wrap: wrap; gap: 4px; }
.fm-macros span { font-size: 11px; padding: 4px 8px; background: #f5efe4; border-radius: 999px; color: var(--ink); font-weight: 700; }
.fm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.fm-actions button { min-height: 40px; font-size: 13px; padding: 0 10px; }

