:root {
  --bg: #F8F4EA;
  --bg-soft: #FAF7EF;
  --card: #FFFFFF;
  --card-warm: #FFFDF8;
  --green: #3E9428;
  --green-dark: #2F7D20;
  --green-soft: #EAF6E5;
  --text: #111111;
  --muted: #6F6A61;
  --border: #E9DFD0;
  --warning: #E0A300;
  --danger: #D94A4A;
  --shadow: 0 12px 28px rgba(61, 54, 43, 0.08);
  --shadow-sm: 0 4px 14px rgba(61, 54, 43, 0.06);
  --radius: 24px;
  --radius-lg: 26px;
  --radius-sm: 14px;
  --nav-h: 68px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
}

.screen {
  flex: 1;
  padding: calc(12px + var(--safe-top)) 16px calc(var(--nav-h) + var(--safe-bottom) + 16px);
  animation: fade .25s ease;
}
.screen.no-nav { padding-bottom: calc(16px + var(--safe-bottom)); }

.icon { width: 20px; height: 20px; stroke: currentColor; fill: none; flex-shrink: 0; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }
.btn-spin { animation: spin .8s linear infinite; }

@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Header */
.app-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.logo { font-size: 22px; font-weight: 800; color: var(--green); letter-spacing: -.5px; }
.brand-logo { max-height: 36px; width: auto; }
.logo span { color: var(--text); }
.head-actions { display: flex; align-items: center; gap: 12px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--card); display: grid; place-items: center; cursor: pointer; color: var(--muted);
}
.avatar {
  width: 42px; height: 42px; border-radius: 50%; background: var(--green-soft);
  display: grid; place-items: center; font-weight: 700; color: var(--green); overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Topbar (inner screens) */
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.topbar .back { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--card); display: grid; place-items: center; cursor: pointer; flex: none; color: var(--text); }
.topbar h1 { font-size: 19px; font-weight: 700; }

/* Cards */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.card.warm { background: var(--card-warm); }

.eyebrow { color: var(--muted); font-size: 14px; margin-bottom: 6px; }
.h-big { font-size: 30px; font-weight: 800; letter-spacing: -.5px; display: flex; align-items: center; gap: 10px; }
.h-big .badge-check { width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; }

/* Params list */
.params { list-style: none; margin-top: 16px; display: grid; gap: 14px; }
.params li { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.params .p-ico {
  width: 28px; height: 28px; border-radius: 50%; background: var(--green-soft);
  display: grid; place-items: center; color: var(--green-dark); flex: none;
}
.params .p-muted { color: var(--muted); }

/* Savings card */
.savings {
  background: #FFFDF8; border-radius: 24px; padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.savings-body { flex: 1; min-width: 0; }
.savings .s-label { color: var(--green-dark); font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.savings .s-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 10px; }
.savings .s-amount { font-size: 28px; font-weight: 800; color: var(--green-dark); letter-spacing: -.3px; line-height: 1.1; }
.savings .s-time { font-size: 15px; font-weight: 600; color: var(--green-dark); line-height: 1.3; }
.savings .s-illus { width: 88px; height: auto; flex: none; object-fit: contain; }

/* Section title */
.section-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; margin: 6px 2px 12px; }
.section-title .hint { color: var(--muted); font-weight: 400; font-size: 13px; }

/* Style tabs / segmented */
.segmented { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 20px; scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }
.seg {
  flex: none; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--card); color: var(--muted); font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.seg.active { background: var(--green-soft); color: var(--green-dark); border-color: var(--green-soft); font-weight: 600; }

/* Week preview */
.week-preview { display: flex; gap: 10px; overflow-x: auto; margin-bottom: 24px; scrollbar-width: none; }
.week-preview::-webkit-scrollbar { display: none; }
.wp-day { flex: none; text-align: center; }
.wp-day .wp-name { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.wp-day .wp-plate {
  width: 56px; height: 56px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow-sm);
  border: 2px solid #FFFDF8;
}
.wp-day .wp-plate img { width: 100%; height: 100%; object-fit: cover; }
.wp-day .wp-plate .wp-dash { color: var(--muted); font-size: 18px; font-weight: 600; }

/* Buttons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 16px; border-radius: var(--radius-sm); border: none; font-size: 16px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}
.btn-primary { background: linear-gradient(180deg, #48A82E, var(--green)); color: #fff; box-shadow: 0 8px 20px rgba(62,148,40,.28); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.btn-soft { background: var(--green-soft); color: var(--green-dark); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

/* Day tabs (menu screen) — 7 дней в одну строку */
.day-tabs {
  display: flex; gap: 4px; margin-bottom: 14px;
  width: 100%; overflow: hidden;
}
.day-tab {
  flex: 1; min-width: 0; padding: 7px 2px; border-radius: 12px; text-align: center;
  background: var(--card); border: 1px solid var(--border); cursor: pointer;
}
.day-tab.active { background: var(--green); border-color: var(--green); }
.day-tab.active .dt-dow, .day-tab.active .dt-date { color: #fff; }
.dt-dow { font-size: 11px; font-weight: 600; line-height: 1.2; }
.dt-date { font-size: 10px; color: var(--muted); line-height: 1.2; margin-top: 2px; }

/* Meal card — компактный список */
.meal-card {
  background: var(--card); border-radius: 16px; box-shadow: var(--shadow-sm); padding: 10px 12px;
  margin-bottom: 8px; display: flex; gap: 10px; align-items: center;
  animation: cardIn .3s ease both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.meal-info { flex: 1; min-width: 0; }
.meal-type { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.meal-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; line-height: 1.3; }
.meal-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11px; color: var(--muted); }
.meal-meta span { display: inline-flex; align-items: center; gap: 3px; }
.meal-thumb {
  width: 64px; height: 64px; border-radius: 50%; flex: none; overflow: hidden;
  display: grid; place-items: center; position: relative;
  box-shadow: var(--shadow-sm); border: 2px solid #FFFDF8; background: var(--green-soft);
}
.meal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.meal-thumb img.meal-img-ph { object-fit: contain; padding: 4px; background: var(--green-soft); }
.meal-replace {
  font-size: 12px; color: var(--green-dark); background: none; border: none;
  cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 3px; font-family: inherit;
}
.meal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 5px; }

/* Recipe detail */
.recipe-hero {
  width: 100%; border-radius: 18px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); background: var(--card);
}
.recipe-hero img { width: 100%; height: auto; display: block; object-fit: contain; }
.recipe-hero-emoji { display: none; }
.recipe-hero-placeholder { width: 100%; height: auto; max-height: 240px; object-fit: contain; }
.recipe-title { font-size: 22px; font-weight: 700; margin: 4px 0 10px; }
.recipe-h3 { font-size: 16px; font-weight: 700; margin: 20px 0 10px; }
.macro-row { display: flex; gap: 10px; margin-top: 14px; }
.macro { flex: 1; background: var(--card); border-radius: 14px; box-shadow: var(--shadow-sm); padding: 12px; text-align: center; }
.macro b { display: block; font-size: 16px; }
.macro span { font-size: 12px; color: var(--muted); }
.recipe-ings { background: var(--card); border-radius: 16px; box-shadow: var(--shadow-sm); overflow: hidden; }
.recipe-ing { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid rgba(0,0,0,.06); font-size: 14px; }
.recipe-ing:last-child { border-bottom: none; }
.recipe-ing b { color: var(--green-dark); white-space: nowrap; }
.recipe-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.recipe-steps li { font-size: 14px; line-height: 1.5; }

/* Shopping */
.shop-home-card {
  background: #FAF7EF; border-radius: 20px; padding: 16px 14px 14px;
  margin-bottom: 18px; box-shadow: var(--shadow-sm);
}
.shop-home-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 14px; }
.shop-home-scroll {
  display: flex; gap: 14px; overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.shop-home-scroll::-webkit-scrollbar { display: none; }
.shop-home-item { flex: none; width: 64px; text-align: center; }
.shop-home-thumb {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 6px;
  background: var(--card); box-shadow: var(--shadow-sm); position: relative;
  display: grid; place-items: center; overflow: hidden;
}
.shop-home-thumb img { width: 100%; height: 100%; object-fit: cover; }
.shop-home-thumb .hp-letter { font-size: 18px; font-weight: 700; color: var(--green-dark); }
.shop-home-badge {
  position: absolute; right: -2px; bottom: -2px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--green); color: #fff;
  display: grid; place-items: center; border: 2px solid #FAF7EF;
}
.shop-home-name { font-size: 11px; line-height: 1.25; color: var(--text); font-weight: 500; }
.shop-home-more {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 6px;
  background: var(--card); border: 1px dashed var(--border);
  display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--muted);
  line-height: 1.2; text-align: center; padding: 4px;
}

.shop-buy-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 4px 2px 12px; gap: 12px;
}
.shop-buy-head .sb-title { font-size: 15px; font-weight: 600; }
.shop-buy-head .sb-total { font-size: 18px; font-weight: 800; white-space: nowrap; }

.shop-list { margin-bottom: 16px; }
.shop-item {
  display: grid; grid-template-columns: 44px 1fr auto auto 36px;
  align-items: center; gap: 10px; padding: 11px 0;
  border-bottom: 1px solid rgba(233, 223, 208, 0.7);
}
.shop-item:last-child { border-bottom: none; }
.shop-thumb {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  background: #FAF7EF; display: grid; place-items: center; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(233, 223, 208, 0.6);
}
.shop-thumb img { width: 100%; height: 100%; object-fit: cover; }
.shop-thumb .hp-letter { font-size: 15px; font-weight: 700; color: var(--green-dark); }
.shop-body { min-width: 0; }
.shop-name { font-size: 14px; font-weight: 600; line-height: 1.25; }
.shop-item.checked .shop-name { text-decoration: line-through; color: var(--muted); font-weight: 500; }
.shop-qty { font-size: 13px; color: var(--muted); text-align: center; white-space: nowrap; min-width: 52px; }
.shop-price { font-weight: 700; font-size: 14px; white-space: nowrap; text-align: right; min-width: 58px; }
.shop-item.checked .shop-price { color: var(--muted); }
.shop-add {
  width: 32px; height: 32px; border-radius: 50%; border: none; flex: none;
  background: var(--green); color: #fff; display: grid; place-items: center;
  cursor: pointer; box-shadow: 0 4px 10px rgba(62, 148, 40, 0.25);
}
.shop-add.on { background: var(--green-soft); color: var(--green); box-shadow: none; }
.shop-more-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 12px 0 4px; border: none; background: none;
  color: var(--muted); font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit;
}

.shop-total-card {
  background: #FAF7EF; border-radius: 22px; padding: 18px 18px 16px;
  margin: 8px 0 14px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.shop-total-top {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 14px; padding-right: 88px;
}
.shop-total-top .st-label { font-size: 14px; color: var(--muted); font-weight: 500; }
.shop-total-top .st-value { font-size: 22px; font-weight: 800; }
.shop-total-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-height: 72px; }
.shop-savings-amt { font-size: 16px; font-weight: 800; color: var(--green); line-height: 1.3; }
.shop-savings-sub { font-size: 12px; color: var(--muted); margin-top: 4px; max-width: 200px; line-height: 1.35; }
.shop-piggy {
  position: absolute; right: 10px; bottom: 6px; width: 88px; height: 88px;
  object-fit: contain; pointer-events: none;
}
.shop-disclaimer { color: var(--muted); font-size: 11px; margin-top: 12px; line-height: 1.4; }
.disclaimer { color: var(--muted); font-size: 11px; margin-top: 10px; line-height: 1.4; }
.shop-actions-row { display: flex; gap: 10px; margin-top: 4px; }
.shop-actions-row .btn { flex: 1; font-size: 14px; padding: 12px 14px; }

/* legacy aliases */
.home-chips { display: none; }
.home-chip { display: none; }
.total-card { display: none; }
.shop-check, .shop-mini, .shop-actions { display: none; }

/* Option cards (Как вам удобнее) */
.option-card {
  display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 18px;
  background: var(--card); box-shadow: var(--shadow-sm); margin-bottom: 12px; border: 2px solid transparent;
}
.option-card.best { background: var(--green-soft); border-color: var(--green); }
.option-card.soon { background: #F5F2EC; opacity: 1; }
.oc-ico {
  width: 44px; height: 44px; border-radius: 50%; background: var(--green-soft);
  display: grid; place-items: center; color: var(--green-dark); flex: none;
}
.option-card.soon .oc-ico { background: #E9E4DA; color: var(--muted); }
.oc-body { flex: 1; }
.oc-title { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.oc-price { font-weight: 700; color: var(--green-dark); }
.oc-sub { color: var(--muted); font-size: 13px; }
.oc-tag { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: var(--warning); color: #fff; font-weight: 600; }
.oc-radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); flex: none; }
.option-card.best .oc-radio { border-color: var(--green); background: radial-gradient(circle at center, var(--green) 45%, transparent 48%); }

/* Bottom nav */
.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 430px;
  height: var(--nav-h); background: var(--card);
  box-shadow: 0 -4px 20px rgba(61, 54, 43, 0.06);
  display: flex; justify-content: space-around; align-items: center;
  padding-bottom: calc(8px + var(--safe-bottom)); z-index: 40;
}
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font-size: 11px; cursor: pointer; background: none; border: none; font-family: inherit; flex: 1; padding: 6px 0; }
.nav-item .ni-ico { display: grid; place-items: center; }
.nav-item.active { color: var(--green); }
.nav-item.active .icon { stroke: var(--green); }

/* Forms */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.input, .select {
  width: 100%; padding: 15px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--card); font-size: 16px; font-family: inherit; color: var(--text); outline: none;
}
.input:focus, .select:focus { border-color: var(--green); }
.input.big-code { text-align: center; letter-spacing: 8px; font-size: 26px; font-weight: 700; }

.chips-select { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-opt { padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--card); cursor: pointer; font-size: 15px; }
.chip-opt.on { background: var(--green-soft); border-color: var(--green); color: var(--green-dark); font-weight: 600; }

/* Home editor: свои продукты + автоподстановка */
.home-selected { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sel-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 8px 8px 14px; border-radius: 999px; background: var(--green-soft); color: var(--green-dark); font-size: 14px; font-weight: 600; }
.sel-chip.warn { background: #FBF1D8; color: #8A6A00; }
.sel-chip .sel-warn { width: 16px; height: 16px; border-radius: 50%; background: var(--warning); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; cursor: help; }
.sel-chip .sel-x { border: none; background: rgba(0,0,0,.08); color: inherit; width: 20px; height: 20px; border-radius: 50%; font-size: 15px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.ac-wrap { position: relative; }
.ac-drop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); overflow: hidden; max-height: 260px; overflow-y: auto; }
.ac-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; cursor: pointer; font-size: 15px; border-bottom: 1px solid var(--border); }
.ac-item:last-child { border-bottom: none; }
.ac-item:hover { background: var(--green-soft); }
.ac-item .ac-unit { color: var(--muted); font-size: 12px; }
.ac-item.ac-add { color: var(--green-dark); font-weight: 600; }

.counter { display: flex; align-items: center; gap: 16px; }
.counter button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); font-size: 22px; cursor: pointer; }
.counter .c-val { font-size: 22px; font-weight: 700; min-width: 32px; text-align: center; }

/* Stepper progress */
.stepper { margin-bottom: 22px; }
.stepper .st-label { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.stepper .st-track { height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.stepper .st-fill { height: 100%; background: var(--green); border-radius: 999px; transition: width .3s ease; }
.step-title { font-size: 22px; font-weight: 800; margin-bottom: 6px; letter-spacing: -.3px; }
.step-hint { color: var(--muted); font-size: 14px; margin-bottom: 20px; }

/* Onboarding / centered */
.center-screen { display: flex; flex-direction: column; justify-content: center; min-height: calc(100vh - 40px); }
.welcome-emoji { font-size: 56px; text-align: center; margin-bottom: 12px; }

/* States */
.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-state .es-ico { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: var(--green-soft); display: grid; place-items: center; color: var(--green); }
.empty-state .es-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px; }

.skeleton { background: linear-gradient(90deg, #EDE8DE 25%, #F5F0E6 50%, #EDE8DE 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { width: 34px; height: 34px; border: 3px solid var(--green-soft); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
#toast-wrap { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px); z-index: 100; display: flex; flex-direction: column; gap: 8px; width: calc(100% - 36px); max-width: 400px; }
.toast { padding: 13px 16px; border-radius: 12px; color: #fff; font-size: 14px; box-shadow: var(--shadow); animation: fade .2s ease; display: flex; align-items: center; gap: 8px; }
.toast.ok { background: var(--green); }
.toast.err { background: var(--danger); }
.toast.info { background: #333; }

.section-note { color: var(--muted); font-size: 12px; margin: 4px 2px 14px; }
.link-btn { background: none; border: none; color: var(--green-dark); cursor: pointer; font-size: 14px; font-family: inherit; padding: 6px 0; }
.divider { height: 1px; background: var(--border); margin: 14px 0; }
.text-muted { color: var(--muted); }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mb-8 { margin-bottom: 8px; }

/* Welcome screen */
.welcome-screen {
  display: flex; flex-direction: column; align-items: center;
  min-height: 100vh; text-align: center;
  padding: calc(24px + var(--safe-top)) 20px calc(28px + var(--safe-bottom));
}
.welcome-brand { margin-bottom: 12px; display: flex; flex-direction: column; align-items: center; }
.welcome-logo { max-height: 44px; width: auto; }
.welcome-logo-text {
  font-size: 34px; font-weight: 800; color: var(--green); letter-spacing: -.5px; line-height: 1;
}
.welcome-logo-text span { color: var(--green); }
.welcome-smile { width: 52px; height: 12px; margin-top: 4px; color: var(--green); }
.welcome-hero { width: 100%; margin: 8px 0 20px; display: flex; justify-content: center; }
.welcome-hero img { width: 100%; max-width: 300px; height: auto; object-fit: contain; }
.welcome-title { font-size: 24px; font-weight: 800; line-height: 1.28; margin: 0 0 22px; letter-spacing: -.3px; }
.wt-line { display: block; color: var(--text); }
.wt-accent { display: block; color: var(--green); margin-top: 2px; }
.welcome-features {
  display: flex; gap: 10px; width: 100%; max-width: 360px; margin-bottom: 8px;
}
.welcome-feat {
  flex: 1; min-width: 0; background: #FAF7EF; border-radius: 16px;
  padding: 14px 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.welcome-feat .wf-ico {
  width: 36px; height: 36px; display: grid; place-items: center;
  color: var(--green-dark);
}
.welcome-feat .wf-text { font-size: 11px; line-height: 1.35; color: var(--text); font-weight: 500; }
.welcome-btn-wrap { width: 100%; max-width: 360px; margin-top: auto; padding-top: 20px; }
.welcome-btn { width: 100%; border-radius: 999px; padding: 17px 24px; font-size: 17px; }
.welcome-btn .welcome-arrow { transform: rotate(180deg); margin-left: 2px; }

/* Generating screen */
.gen-screen {
  display: flex; flex-direction: column;
  min-height: 100vh;
  padding: calc(8px + var(--safe-top)) 20px calc(20px + var(--safe-bottom));
  max-width: 430px; margin: 0 auto;
}
.gen-hero { text-align: center; margin-bottom: 8px; }
.gen-hero img { width: 100%; max-width: 360px; height: auto; display: block; margin: 0 auto; }
.gen-title {
  font-size: 22px; font-weight: 800; text-align: center;
  margin: 16px 0 28px; letter-spacing: -.3px; line-height: 1.3; color: var(--text);
}
.gen-steps { display: flex; flex-direction: column; gap: 14px; margin-bottom: auto; padding: 0 4px 28px; }
.gen-step { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--muted); }
.gen-step.done { color: var(--text); font-weight: 500; }
.gen-step.active { color: var(--text); font-weight: 600; }
.gen-check {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: #E5DFD4; display: grid; place-items: center; color: transparent;
}
.gen-step.done .gen-check { background: var(--green); color: #fff; }
.gen-step.active .gen-check { background: var(--green-soft); color: var(--green); }
.gen-bottom { margin-top: auto; padding-top: 8px; }
.gen-bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.gen-bar { flex: 1; height: 8px; background: #E5DFD4; border-radius: 99px; overflow: hidden; }
.gen-bar-fill { height: 100%; width: 0; background: var(--green); border-radius: 99px; transition: width .2s ease; }
.gen-pct { font-size: 15px; font-weight: 600; color: var(--text); min-width: 42px; text-align: right; flex: none; }
.gen-footer { text-align: center; color: var(--muted); font-size: 14px; margin: 0; }
.gen-continue { width: 100%; margin-top: 16px; }

/* Week ready */
.week-ready {
  display: flex; flex-direction: column; align-items: center;
  min-height: 100vh; text-align: center;
  padding: calc(28px + var(--safe-top)) 20px calc(28px + var(--safe-bottom));
  max-width: 430px; margin: 0 auto;
}
.wr-hero { position: relative; margin-bottom: 20px; width: 100%; }
.wr-confetti::before,
.wr-confetti::after {
  content: ''; position: absolute; border-radius: 50%; background: var(--green); opacity: .25;
}
.wr-confetti::before { width: 8px; height: 8px; top: 8px; left: calc(50% - 52px); }
.wr-confetti::after { width: 6px; height: 6px; top: 20px; right: calc(50% - 48px); opacity: .2; }
.wr-badge {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto;
  background: var(--green); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 8px 28px rgba(62, 148, 40, 0.28);
}
.wr-badge.draft { background: var(--warning); box-shadow: 0 8px 28px rgba(224, 163, 0, 0.28); }
.wr-title { font-size: 26px; font-weight: 800; margin: 0 0 10px; letter-spacing: -.4px; color: var(--text); line-height: 1.2; }
.wr-sub { color: var(--muted); margin: 0 0 24px; font-size: 15px; line-height: 1.45; max-width: 320px; }
.wr-cards { display: flex; flex-direction: column; gap: 12px; width: 100%; margin-bottom: 28px; }
.wr-card {
  display: flex; align-items: center; gap: 14px; text-align: left;
  background: var(--card); border-radius: 18px; padding: 14px 16px;
  box-shadow: var(--shadow-sm); width: 100%;
}
.wr-card-img { width: 52px; height: 52px; object-fit: contain; flex: none; }
.wr-card-body { flex: 1; min-width: 0; }
.wr-card-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.wr-card-sub { font-size: 13px; color: var(--muted); line-height: 1.35; }
.wr-actions { width: 100%; margin-top: auto; padding-top: 8px; display: flex; flex-direction: column; align-items: center; }
.wr-btn-open { width: 100%; border-radius: 999px; padding: 17px 24px; font-size: 17px; }
.wr-btn-open .welcome-arrow { transform: rotate(180deg); }
.wr-link {
  background: none; border: none; color: var(--green); font-size: 15px; font-weight: 600;
  cursor: pointer; font-family: inherit; padding: 12px 8px; margin-top: 4px;
}
.wr-link.muted { color: var(--muted); font-weight: 500; font-size: 14px; }

/* Off-plan days */
.wp-day.off-plan { opacity: .55; }
.wp-day.off-plan .wp-plate { background: #e8e4da !important; position: relative; }
.wp-day.off-plan .wp-plate::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: rgba(111, 106, 97, 0.18);
}
.wp-off { font-size: 9px; color: var(--muted); margin-top: 2px; }
.day-tab.off-plan { opacity: .5; }
.off-plan-msg { text-align: center; padding: 40px 16px; color: var(--muted); }

.shop-cost-line { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; margin: 12px 0; padding: 12px 14px; background: var(--card); border-radius: 14px; box-shadow: var(--shadow-sm); }
.shop-cost-line .p-ico { width: 28px; height: 28px; border-radius: 50%; background: var(--green-soft); display: grid; place-items: center; color: var(--green-dark); flex: none; }

/* Profile */
.profile-card-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.profile-grid { display: grid; gap: 12px; }
.profile-field { display: flex; align-items: flex-start; gap: 12px; }
.profile-field .pf-ico {
  width: 32px; height: 32px; border-radius: 50%; background: var(--green-soft);
  display: grid; place-items: center; color: var(--green-dark); flex: none; margin-top: 2px;
}
.profile-field .pf-body { flex: 1; min-width: 0; }
.profile-field .pf-label { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.profile-field .pf-value { font-size: 15px; font-weight: 600; }
.chip-day { min-width: 44px; text-align: center; }
