:root {
  --green: #1f5138;
  --green-600: #2c6a49;
  --green-100: #e4efe7;
  --accent: #f0a04b;
  --accent-600: #e08a2e;
  --cream: #f6f3ec;
  --card: #ffffff;
  --ink: #23281f;
  --muted: #566053;
  --line: #e7e2d6;
  --ok: #2c7a4b;
  --danger: #c0392b;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(31, 81, 56, 0.08);
  --shadow-sm: 0 2px 10px rgba(31, 81, 56, 0.06);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; overflow-x: clip; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--cream); color: var(--ink);
  font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }

/* Layout */
.screen { max-width: 560px; margin: 0 auto; padding: 18px 16px 96px; }
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(246, 243, 236, 0.9); backdrop-filter: blur(8px);
  padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; max-width: 560px; margin: 0 auto; }
.topbar h1 { font-size: 20px; }
.brand-dot { color: var(--accent); }
.subtle { color: var(--muted); font-size: 14px; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 12px; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 22px 4px 10px; font-weight: 600; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 14px;
  padding: 13px 18px; font-weight: 600; font-size: 15px; background: var(--green); color: #fff; width: 100%; transition: transform .05s ease, background .15s; }
.btn:active { transform: scale(0.98); }
.btn.secondary { background: var(--green-100); color: var(--green); }
.btn.accent { background: var(--accent); color: #3a2410; }
.btn.ghost { background: transparent; color: var(--green); border: 1px solid var(--line); }
.btn.small { width: auto; padding: 9px 14px; font-size: 14px; border-radius: 12px; }
.btn:disabled { opacity: .55; }

/* Forms */
label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
input, select, textarea { width: 100%; font-size: 16px; font-family: inherit; padding: 13px 14px; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green-100); border-color: var(--green-600); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 13px; font-size: 14px; font-weight: 500; color: var(--ink); }
.chip.on { background: var(--green); color: #fff; border-color: var(--green); }
.chip.mini { padding: 4px 10px; font-size: 12px; }
.tag { display: inline-block; background: var(--green-100); color: var(--green); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.tag.bonus { background: #fdecd6; color: var(--accent-600); }
.tag.nova1 { background: #e4f0e6; color: #2c7a4b; }
.tag.nova2 { background: #eef2df; color: #6a7a2c; }
.tag.nova3 { background: #fdeede; color: #b5731e; }
.tag.nova4 { background: #f7e0dc; color: #b23b2c; }

/* Meal / recipe card */
.meal { display: flex; gap: 12px; align-items: flex-start; }
.thumb { width: 52px; height: 52px; border-radius: 14px; flex: 0 0 52px; display: flex; align-items: center; justify-content: center;
  background: var(--green-100); color: var(--green); font-family: 'Fraunces', serif; font-weight: 600; font-size: 20px; }
.meal h3 { font-size: 17px; }
.macros { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.macro { text-align: center; background: var(--cream); border-radius: 10px; padding: 6px 10px; min-width: 58px; }
.macro b { display: block; font-size: 15px; }
.macro span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.reason { margin-top: 10px; font-size: 13px; color: var(--accent-600); background: #fdf2e4; padding: 8px 11px; border-radius: 10px; }
.dayhead { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }

/* Price compare */
.storebar { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.storebar:last-child { border-bottom: none; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 12px; }
.bar-wrap { flex: 1; height: 8px; background: var(--green-100); border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--green); }
.price { font-weight: 700; font-variant-numeric: tabular-nums; }
.big-save { background: var(--green); color: #fff; border-radius: var(--radius); padding: 16px; }
.big-save .amt { font-family: 'Fraunces', serif; font-size: 30px; }

/* List items */
.li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: none; }
.li.checked { opacity: .5; }
.li.checked .li-name { text-decoration: line-through; }
.check { width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--green); flex: 0 0 24px; display: flex; align-items: center; justify-content: center; background: #fff; }
.check.on { background: var(--green); }
.check.on::after { content: ''; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-1px); }
.li-name { flex: 1; font-weight: 500; }
.li-qty { color: var(--muted); font-size: 14px; }

/* Chat */
.chat-wrap { display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 85%; padding: 12px 14px; border-radius: 16px; font-size: 15px; }
.bubble.user { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 5px; }
.bubble.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 5px; white-space: pre-wrap; }
.composer { position: fixed; bottom: calc(64px + env(safe-area-inset-bottom)); left: 0; right: 0; max-width: 560px; margin: 0 auto; padding: 10px 12px;
  background: rgba(246,243,236,.95); backdrop-filter: blur(8px); display: flex; gap: 8px; border-top: 1px solid var(--line); }
.composer input { border-radius: 22px; }
.composer .btn { width: auto; border-radius: 22px; padding: 12px 18px; }

/* Tab bar */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; max-width: 560px; margin: 0 auto; background: #fff; border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; padding: 8px 4px calc(8px + env(safe-area-inset-bottom)); z-index: 30; }
.tab { flex: 1; background: none; border: none; color: var(--muted); font-size: 10px; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px; }
.tab.on { color: var(--green); }
.tab svg { width: 21px; height: 21px; }

/* Landing / auth */
.hero { text-align: center; padding: 30px 8px 10px; }
.hero h1 { font-size: 34px; }
.hero .pill { display: inline-block; background: var(--green-100); color: var(--green); padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.hero p { color: var(--muted); font-size: 16px; max-width: 420px; margin: 12px auto 0; }
.feat { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.feat:last-child { border-bottom: none; }
.feat .n { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: #3a2410; display: flex; align-items: center; justify-content: center; font-weight: 700; flex: 0 0 30px; }

/* Modal */
.modal-back { position: fixed; inset: 0; background: rgba(20,30,22,.45); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.modal { background: var(--cream); width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; border-radius: 22px 22px 0 0; padding: 20px 16px 30px; }
.modal-grip { width: 42px; height: 5px; background: var(--line); border-radius: 3px; margin: 0 auto 14px; }

.toast { position: fixed; bottom: calc(130px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 14px; z-index: 60; box-shadow: var(--shadow); }
.center { text-align: center; }
.mt { margin-top: 14px; } .mt-s { margin-top: 8px; } .muted { color: var(--muted); }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
.spinner.dark { border-color: var(--green-100); border-top-color: var(--green); }
@keyframes spin { to { transform: rotate(360deg); } }
.error-txt { color: var(--danger); font-size: 14px; margin-top: 8px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* Coach snelvragen */
.quickbar { position: fixed; bottom: calc(118px + env(safe-area-inset-bottom)); left: 0; right: 0; max-width: 560px; margin: 0 auto; padding: 6px 12px;
  display: flex; gap: 8px; overflow-x: auto; white-space: nowrap; }
.quickbar .chip { white-space: nowrap; background: #fff; box-shadow: var(--shadow-sm); }

.storebar.chosen { background: var(--green-100); border-radius: 10px; padding-left: 8px; padding-right: 8px; border-bottom: 1px solid var(--line); }

/* Nutri-Score */
.nutri { display:inline-block; width:20px; height:20px; line-height:20px; text-align:center; border-radius:5px; color:#fff; font-weight:700; font-size:12px; }
.nutri.a{background:#038141}.nutri.b{background:#85bb2f;color:#233}.nutri.c{background:#fecb02;color:#233}.nutri.d{background:#ee8100}.nutri.e{background:#e63e11}
/* Deal-tiers */
.deal-top{background:#fdecd6;color:#b5601e}.deal-goed{background:#fdf6d6;color:#8a7a1e}.deal-ok{background:#eee;color:#666}
