:root {
  --page: #efebe3;
  --bg: #fcfbf8;
  --card: #ffffff;
  --surface: #f7f6f2;
  --line: #ebe7df;
  --ink: #14202e;
  --ink-2: #3b4656;
  --muted: #7a8190;
  --navy: #13233a;
  --teal: #19a7b9;
  --teal-soft: #e6f5f7;
  --blue: #2f7fd9;
  --blue-soft: #edf4fc;
  --green: #2fb36d;
  --orange: #f5a524;
  --red: #ef4d4d;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 32, 46, .04), 0 4px 16px rgba(20, 32, 46, .05);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--page);
  color: var(--ink);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--blue); cursor: pointer; text-decoration: none; font-weight: 500; }
h1, h2, h3, p { margin: 0; }

/* ---------- App frame ---------- */
.app {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 440px;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
  overflow: clip;
}
@media (min-width: 520px) {
  body { padding: 24px 0; }
  .app { height: min(900px, calc(100dvh - 48px)); border-radius: 36px; box-shadow: 0 20px 60px rgba(20, 32, 46, .18); }
}

.top {
  display: flex; align-items: center; gap: 12px;
  padding: calc(14px + var(--safe-top)) 20px 8px;
  min-height: 56px;
}
.top .title { flex: 1; text-align: center; font-weight: 600; font-size: 17px; }
.top .title small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 2px; }
.top .side { width: 56px; display: flex; }
.top .side.right { justify-content: flex-end; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); }
.icon-btn:active { background: var(--surface); }
.icon-btn[disabled] { opacity: .25; pointer-events: none; }
.link-btn { color: var(--blue); font-weight: 600; font-size: 15px; padding: 6px 0; }

.content { flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 8px 20px 24px; -webkit-overflow-scrolling: touch; }
.foot { padding: 12px 20px calc(16px + var(--safe-bottom)); background: var(--bg); }

.h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.sub { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.section-gap { height: 20px; }

svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
svg.i.sm { width: 18px; height: 18px; }

/* ---------- Progress ---------- */
.progress { flex: 1; display: flex; gap: 6px; }
.lang-spacer { width: 44px; flex-shrink: 0; }
.progress span { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.progress span.on { background: var(--green); }

/* ---------- Buttons ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 50px; border-radius: 12px;
  font-weight: 600; font-size: 15px;
  transition: transform .08s ease, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-light { background: #fff; color: var(--navy); }
.btn-outline { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.btn-social { background: #fff; color: var(--ink); font-weight: 500; }
.btn-danger { background: transparent; color: var(--red); border: 1px solid #f6d3d3; }
.btn-ghost { background: transparent; color: var(--blue); height: 40px; }
.btn.sm { height: 40px; font-size: 14px; }

/* ---------- Forms ---------- */
.label { display: block; font-size: 13.5px; font-weight: 500; color: var(--ink-2); margin: 18px 0 8px; }
.field { position: relative; display: flex; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; height: 50px; padding: 0 14px; transition: border-color .15s, box-shadow .15s; }
.field:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.field input, .field select { flex: 1; min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; height: 100%; font-size: 15px; }
.field input::placeholder { color: #b0b5bf; }
.field .unit { color: var(--muted); font-size: 13px; margin-inline-start: 8px; white-space: nowrap; }
.field .clear { color: var(--muted); display: grid; place-items: center; }
.field.err { border-color: var(--red); }
input[type="date"] { -webkit-appearance: none; appearance: none; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.error { color: var(--red); font-size: 13px; margin-top: 12px; min-height: 18px; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

/* ---------- Gender tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 88px; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); transition: all .15s; }
.tile svg { width: 30px; height: 30px; }
.tile.on { background: var(--blue-soft); border-color: #c9ddf5; color: var(--blue); font-weight: 600; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.card-title { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; }
.card-title .grow { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- Welcome ---------- */
.welcome { --sand: #f3ebe0; position: relative; flex: 1; display: flex; flex-direction: column; overflow-x: hidden; overflow-y: auto; background: var(--sand); }
/* The photo fills the space above the buttons; anchored low so the breakfast bowl stays visible. */
.welcome .photo { position: relative; flex: 1; min-height: 260px; }
.welcome .photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; display: block; }
.welcome .veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16, 42, 72, .55) 0%, rgba(16, 42, 72, .32) 38%, rgba(16, 42, 72, 0) 60%, rgba(243, 235, 224, 0) 88%, var(--sand) 100%); }
.welcome .intro { position: relative; color: #fff; padding: calc(52px + var(--safe-top)) 24px 0; text-align: center; }
/* Logo on a frosted cream card, so its olive and tan colours stay legible over the photo. */
.welcome .brand { display: inline-block; padding: 12px 18px 10px; margin-bottom: 18px; border-radius: 18px; background: rgba(250, 245, 238, .3); -webkit-backdrop-filter: blur(12px) saturate(1.15); backdrop-filter: blur(12px) saturate(1.15); box-shadow: 0 10px 30px rgba(16, 42, 72, .2); animation: brand-in .6s ease both; }
.welcome .brand img { display: block; width: min(250px, 66vw); height: auto; }
@keyframes brand-in { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .welcome .brand { animation: none; } }
.welcome h1 { font-size: 34px; line-height: 1.08; font-weight: 700; letter-spacing: -.03em; text-shadow: 0 2px 18px rgba(8, 24, 44, .35); }
.welcome .tag { margin-top: 12px; font-size: 15px; line-height: 1.45; text-shadow: 0 1px 10px rgba(8, 24, 44, .4); }
.welcome .actions { position: relative; padding: 4px 24px calc(22px + var(--safe-bottom)); background: var(--sand); }
.welcome .btn + .btn { margin-top: 12px; }
.welcome .btn-light, .welcome .btn-social { border: 1px solid #e6dccd; }
.welcome .or { display: flex; align-items: center; gap: 12px; margin: 14px 0; font-size: 13px; color: var(--muted); }
.welcome .or::before, .welcome .or::after { content: ""; flex: 1; height: 1px; background: #e0d5c5; }
.welcome .already { text-align: center; color: var(--ink-2); font-size: 13.5px; margin-top: 16px; }
@media (max-height: 740px) {
  .welcome .intro { padding-top: calc(22px + var(--safe-top)); }
  .welcome .brand { padding: 9px 14px 8px; margin-bottom: 12px; border-radius: 14px; }
  .welcome .brand img { width: min(200px, 56vw); }
  .welcome h1 { font-size: 27px; }
  .welcome .tag { margin-top: 8px; font-size: 14px; }
  .welcome .btn { height: 46px; }
  .welcome .btn + .btn { margin-top: 10px; }
  .welcome .or { margin: 10px 0; }
  .welcome .already { margin-top: 12px; }
}

/* ---------- Body measurements ---------- */
.body-grid { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 16px; margin-top: 20px; align-items: start; }
.body-fig svg { width: 100%; height: auto; }
.m-inputs { display: flex; flex-direction: column; gap: 10px; }
.m-inputs .field { height: 44px; }
.m-inputs .field .lbl { width: 76px; font-size: 13.5px; color: var(--ink-2); }
.m-inputs .field input { text-align: end; width: 100%; }
.info { display: flex; gap: 10px; align-items: center; margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); font-size: 13px; line-height: 1.4; }

/* ---------- Habits ---------- */
.habit-head { display: flex; align-items: flex-start; gap: 12px; }
.habit-head .t { font-weight: 600; }
.habit-head .v { font-size: 14px; color: var(--ink-2); margin-top: 3px; }
.habit-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.glasses { display: flex; align-items: flex-end; gap: 6px; margin-top: 14px; }
.glass { flex: 1 1 0; max-width: 24px; min-width: 10px; height: 30px; border-radius: 3px 3px 6px 6px; background: #edf1f5; border: 1.5px solid #d9e2ea; position: relative; overflow: hidden; transition: all .15s; }
.glass.on { background: linear-gradient(180deg, #7cc3ff, #2f8ae6); border-color: #2f8ae6; }
.glass-add { flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; margin-inline-start: auto; background: #fff; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 4px; margin-top: 16px; outline: none; background: linear-gradient(90deg, #6f7df0 var(--p, 50%), #e9ebf5 var(--p, 50%)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid #6f7df0; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid #6f7df0; }
.checks { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.check { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 14px; text-align: start; width: 100%; }
.box { width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid #c5cad3; display: grid; place-items: center; transition: all .15s; }
.check.on .box { background: var(--teal); border-color: var(--teal); color: #fff; }
.box svg { width: 14px; height: 14px; stroke-width: 3; opacity: 0; }
.check.on .box svg { opacity: 1; }
.add-row { margin-top: 12px; }

/* ---------- Date nav ---------- */
.day-nav .title { font-size: 20px; font-weight: 700; }

/* ---------- Ring & macros ---------- */
.ring-wrap { display: grid; place-items: center; margin: 4px 0 18px; position: relative; }
.ring-wrap svg { width: 170px; height: 170px; transform: rotate(-90deg); }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-center b { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.ring-center span { display: block; font-size: 14px; color: var(--ink-2); }
.ring-center small { font-size: 12.5px; color: var(--muted); }
.ring-arc { transition: stroke-dashoffset .6s ease; }
.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.macro .n { font-size: 13px; font-weight: 600; }
.macro .v { font-size: 12px; color: var(--muted); margin: 2px 0 7px; }
.bar { height: 6px; border-radius: 3px; background: #eef0f3; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; transition: width .5s ease; }
.over { color: var(--red) !important; }

/* ---------- Meals list ---------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); text-align: start; width: 100%; }
.list-item:last-child { border-bottom: 0; }
.thumb { width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0%, #f3ede2 70%); border: 1px solid #efe7d9; display: grid; place-items: center; font-size: 24px; flex-shrink: 0; }
.list-item .main { flex: 1; min-width: 0; }
.list-item .name { font-weight: 600; font-size: 14.5px; }
.list-item .desc { font-size: 12.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .kcal { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.list-item .trash { color: var(--ink-2); padding: 6px; }
.empty { text-align: center; padding: 26px 10px; color: var(--muted); font-size: 14px; }
.empty .big { font-size: 34px; margin-bottom: 8px; }

.totals .row { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 14px; }
.totals .row .grow { flex: 1; }
.totals .head { font-weight: 700; font-size: 16px; padding-bottom: 12px; }
.dot { width: 9px; height: 9px; border-radius: 50%; }

/* ---------- Profile ---------- */
.profile-head { text-align: center; margin-top: 6px; }
.avatar { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 10px; display: grid; place-items: center; font-size: 30px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #19a7b9, #2f7fd9); box-shadow: 0 6px 18px rgba(47, 127, 217, .25); border: 3px solid #fff; }
.profile-head .nm { font-weight: 700; font-size: 18px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stats .k { font-size: 12.5px; color: var(--muted); }
.stats .val { font-weight: 700; font-size: 17px; margin-top: 4px; }
.m-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13.5px; }
.m-table td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.m-table tr:last-child td { border-bottom: 0; }
.m-table td:nth-child(2) { text-align: end; font-weight: 600; padding-inline-end: 16px; }
.m-table td:nth-child(3) { text-align: end; width: 56px; }
.d-down { color: var(--teal); } .d-up { color: var(--orange); } .d-zero { color: var(--muted); }
.goal-card { display: flex; align-items: center; gap: 14px; text-align: start; width: 100%; }
.goal-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip { height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--line); background: #fff; font-size: 13.5px; }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---------- Home ---------- */
.hello { margin-top: 4px; }
.hello .h1 { font-size: 26px; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.quick .card { margin: 0; padding: 14px; text-align: start; }
.quick .q-v { font-size: 20px; font-weight: 700; margin-top: 10px; }
.quick .q-v small { font-size: 13px; font-weight: 500; color: var(--muted); }
.quick .q-l { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.supp-card { margin-top: 14px; }
.supp-card .card-title .grow small { display: block; font-size: 12.5px; font-weight: 400; margin-top: 2px; }
.supp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.supp-chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 10px; border-radius: 19px; border: 1px solid var(--line); background: #fff; font-size: 13.5px; transition: all .15s; }
.supp-chip.on { background: var(--teal-soft); border-color: #bfe5ea; color: #0b6f7d; font-weight: 600; }
.supp-chip.on .box { background: var(--teal); border-color: var(--teal); color: #fff; }
.supp-chip.on .box svg { opacity: 1; }
.mini { display: flex; align-items: center; gap: 16px; }
.mini .ring-wrap { margin: 0; }
.mini .ring-wrap svg { width: 104px; height: 104px; }
.mini .ring-center b { font-size: 20px; }
.mini .ring-center small { font-size: 11px; }
.mini .macros { grid-template-columns: 1fr; gap: 8px; flex: 1; }
.mini .macro .v { margin: 0 0 4px; display: inline; margin-inline-start: 6px; }

/* ---------- Tab bar ---------- */
.tabbar { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: #fff; padding: 8px 6px calc(8px + var(--safe-bottom)); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); padding: 4px 0; }
.tab.on { color: var(--navy); font-weight: 600; }
.tab.on svg { stroke-width: 2.4; }

/* ---------- Sheet ---------- */
.sheet-back { position: absolute; inset: 0; background: rgba(20, 32, 46, .35); z-index: 20; animation: fade .2s ease; display: flex; align-items: flex-end; }
.sheet { width: 100%; max-height: 88%; display: flex; flex-direction: column; background: var(--bg); border-radius: 22px 22px 0 0; animation: up .25s cubic-bezier(.2, .8, .2, 1); padding-bottom: var(--safe-bottom); }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: #d8d4cc; margin: 8px auto 0; }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 12px 20px 6px; }
.sheet-head h3 { flex: 1; font-size: 17px; font-weight: 600; }
.sheet-body { overflow-y: auto; padding: 6px 20px 20px; }
.results-note { font-size: 12.5px; color: var(--muted); padding: 10px 2px 4px; }
.food-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.food-row .thumb { width: 40px; height: 40px; font-size: 20px; }
.food-row .main { flex: 1; }
.food-row .name { font-weight: 500; font-size: 14.5px; }
.food-row .desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.food-row .plus { color: var(--blue); }
.preview { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; margin: 16px 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 6px; }
.preview b { display: block; font-size: 17px; }
.preview span { font-size: 11.5px; color: var(--muted); }
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.type-btn { height: 74px; border-radius: 14px; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-weight: 500; font-size: 14px; }
.type-btn .e { font-size: 24px; }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top, 0px)); transform: translate(-50%, -12px); background: var(--navy); color: #fff; font-size: 14px; padding: 11px 18px; border-radius: 22px; opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 50; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }
.screen-in { animation: fade .18s ease; }
.sheet-food { height: 82%; }

/* ---------- Language & RTL ---------- */
html[lang="he"] body { font-family: Heebo, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
html[lang="he"] .h1, html[lang="he"] .welcome h1 { letter-spacing: 0; }
.ltr { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .icon-btn svg.i, [dir="rtl"] .goal-card > svg.i { transform: scaleX(-1); }
[dir="rtl"] .range { background: linear-gradient(270deg, #6f7df0 var(--p, 50%), #e9ebf5 var(--p, 50%)); }
[dir="rtl"] .field .unit { margin-inline-start: 8px; }
.lang-btn { flex-shrink: 0; height: 30px; min-width: 44px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 700; letter-spacing: .04em; color: var(--navy); }
.lang-btn:active { background: var(--surface); }
.lang-btn.on-hero { position: absolute; z-index: 2; top: calc(16px + var(--safe-top)); inset-inline-end: 20px; background: rgba(255, 255, 255, .88); border-color: transparent; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.top .lang-btn + .link-btn { margin-inline-start: 12px; }
.home-top { min-height: 48px; padding-bottom: 0; }
.home-top .grow { flex: 1; }
.mini-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.lang-card { padding: 12px 16px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { height: 32px; padding: 0 14px; border-radius: 8px; font-size: 13.5px; color: var(--ink-2); }
.seg button.on { background: var(--navy); color: #fff; font-weight: 600; }

/* ---------- Loading / status ---------- */
.content.center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--teal); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error.ok { color: var(--green); }
.btn:disabled { pointer-events: none; }

/* ---------- Personal menu ---------- */
.menu-notes { margin-top: 12px; font-size: 14px; line-height: 1.55; color: var(--ink-2); white-space: pre-line; }
.menu-slot .list-item { padding: 10px 0; }
.menu-item .menu-check { flex-shrink: 0; width: 30px; height: 30px; display: grid; place-items: center; margin-inline-end: -4px; }
.menu-item.done .thumb, .menu-item.done .main .name, .menu-item.done .kcal { opacity: .55; }
.menu-check.on .box { background: var(--teal); border-color: var(--teal); color: #fff; }
.menu-check.on .box svg { opacity: 1; }
.done-tag { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--green); }
.done-tag svg, .slot-done svg { width: 14px; height: 14px; stroke-width: 3; }
.slot-hint { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.slot-done { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #e8f6ee; color: #1d7a4a; font-size: 13.5px; font-weight: 600; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.slot-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13.5px; }
.slot-sum span:first-child { font-weight: 600; }
.slot-sum .muted { font-size: 12.5px; flex-basis: 100%; }
.list-item .desc.wrap { white-space: normal; }
.menu-promo { border-color: #cfe9ec; background: linear-gradient(180deg, #fff, #f3fafb); }
.tabbar .tab span { white-space: nowrap; }

/* ---------- Messages ---------- */
.chat-btn { position: relative; margin-inline-end: 8px; }
.chat-btn .dot { position: absolute; top: 6px; inset-inline-end: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); border: 2px solid var(--bg); }
.badge-dot { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11.5px; font-weight: 700; margin-inline-start: 6px; vertical-align: 2px; }
.chat-list { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.chat-empty { margin: auto 0; }
.chat-day { align-self: center; font-size: 12px; color: var(--muted); background: var(--surface); border-radius: 10px; padding: 3px 10px; margin: 8px 0 2px; }
.bubble { max-width: 80%; padding: 8px 12px 6px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; box-shadow: 0 1px 2px rgba(20, 32, 46, .06); }
.bubble.mine { align-self: flex-end; background: var(--navy); color: #fff; border-end-end-radius: 6px; }
.bubble.theirs { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-end-start-radius: 6px; }
.bubble p { white-space: pre-wrap; word-break: break-word; }
.bubble img { display: block; width: 100%; max-width: 240px; max-height: 300px; object-fit: cover; border-radius: 12px; margin: 2px 0 6px; }
.bubble .photo-missing { font-size: 28px; padding: 18px; text-align: center; }
.bubble .meta { display: block; font-size: 11px; opacity: .65; margin-top: 2px; text-align: end; }
.chat-compose { padding-top: 10px; border-top: 1px solid var(--line); }
.chat-row { display: flex; align-items: center; gap: 8px; }
.chat-row .field { flex: 1; height: 44px; border-radius: 22px; }
.chat-photo { cursor: pointer; color: var(--teal); flex-shrink: 0; width: 44px; height: 44px; background: var(--teal-soft); }
.chat-send { flex-shrink: 0; width: 44px; height: 44px; background: var(--navy); color: #fff; }
.chat-send:disabled { opacity: .5; }
[dir="rtl"] .chat-send svg { transform: scaleX(-1); }
.chat-preview { position: relative; display: inline-block; margin-bottom: 8px; }
.chat-preview img { display: block; height: 84px; border-radius: 12px; }
.chat-preview.busy { display: flex; align-items: center; gap: 10px; height: 84px; padding: 0 16px; border-radius: 12px; background: var(--surface); font-size: 13px; color: var(--muted); }
.chat-preview.busy .spinner { width: 24px; height: 24px; border-width: 2px; }
.chat-preview .icon-btn { position: absolute; top: -8px; inset-inline-end: -8px; width: 26px; height: 26px; background: var(--navy); color: #fff; }
