/* Cookly: warm kitchen palette, Devanagari-first details, phone-first layout. */
:root {
  --bg: #F7F0E4;
  --paper: #FFFCF6;
  --card: #FFFDF9;
  --ink: #2A1B14;
  --ink-2: #5B4739;
  --muted: #8C7767;
  --line: #EBE0CD;
  --line-2: #DDCDB2;
  --sand: #EFE5D3;
  --turmeric: #E7A93A;
  --saffron: #C8661F;
  --chili: #B8432F;
  --leaf: #2F6B45;
  --wa: #1D9A55;
  --wa-d: #157F45;
  --r: 16px;
  --shadow: 0 1px 2px rgba(60, 40, 20, .05), 0 10px 28px rgba(60, 40, 20, .07);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --dev: 'Tiro Devanagari Marathi', 'Mukta', 'Noto Sans Devanagari', serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15.5px/1.5 var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
body.noscroll { overflow: hidden; }
#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; background: var(--bg); position: relative; }
@media (min-width: 600px) {
  body { background: #E9DDC8; }
  #app { box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgba(60, 40, 20, .12); }
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--turmeric); outline-offset: 2px; border-radius: 10px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dev { font-family: var(--dev); }
.muted { color: var(--muted); }
.center { text-align: center; }
.ti { font-size: 1.15em; line-height: 1; vertical-align: -0.15em; }

/* ---------- type ---------- */
.display { font-family: var(--serif); font-weight: 600; font-size: 38px; line-height: 1.06; letter-spacing: -0.015em; margin: 6px 0 10px; font-optical-sizing: auto; }
.display.sm { font-size: 30px; }
.display em { font-style: italic; font-weight: 500; color: var(--chili); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--saffron); margin: 0; }
.lede { font-size: 16px; color: var(--ink-2); margin: 0 0 18px; line-height: 1.55; }
.label { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 22px 0 8px; }
.hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.fine { font-size: 12.5px; color: var(--muted); margin: 14px 0 0; display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; }
.error { color: var(--chili); font-size: 14px; font-weight: 600; min-height: 1em; margin: 0; }
.empty { color: var(--muted); text-align: center; padding: 18px; margin: 0; }
.empty.small { padding: 10px; font-size: 14px; }
.brand-title { font-family: var(--serif); font-size: 34px; font-weight: 600; margin: 10px 0 2px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 14px; padding: 12px 16px; font-weight: 700; font-size: 15px;
  border: 1.5px solid transparent; transition: transform .12s ease, background .2s, box-shadow .2s; user-select: none;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .6; pointer-events: none; }
.btn.primary { background: var(--ink); color: #FFF7EA; box-shadow: 0 6px 16px rgba(42, 27, 20, .22); }
.btn.ghost { background: var(--paper); border-color: var(--line-2); color: var(--ink); }
.btn.ghost.on, .btn.ghost.loved { border-color: var(--chili); color: var(--chili); background: #FCEEEA; }
.btn.wa { background: var(--wa); color: #fff; box-shadow: 0 8px 20px rgba(29, 154, 85, .28); }
.btn.wa:hover { background: var(--wa-d); }
.btn.danger { color: var(--chili); }
.btn.block { width: 100%; }
.btn.lg { padding: 16px 20px; font-size: 16px; border-radius: 16px; }
.btn.sm { padding: 8px 12px; font-size: 13px; border-radius: 12px; }
.btn small { font-weight: 500; opacity: .75; }
.btn.grow, .grow { flex: 1; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 12px; color: var(--ink-2); }
.icon-btn:hover { background: var(--sand); }
.icon-btn.on { color: var(--saffron); background: #FFF1D6; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }

/* ---------- fields ---------- */
.field { display: block; margin: 16px 0 0; }
.field > span { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.field > span small { font-weight: 500; color: var(--muted); }
.field input, .field textarea, textarea, .search input {
  width: 100%; padding: 14px 16px; font-size: 16px; border-radius: 14px;
  border: 1.5px solid var(--line-2); background: var(--paper); outline: none; transition: border .15s, box-shadow .15s;
}
.field input:focus, textarea:focus, .search input:focus { border-color: var(--turmeric); box-shadow: 0 0 0 4px rgba(231, 169, 58, .18); }
.field.big input { font-size: 18px; padding: 16px 18px; }
.search { position: relative; display: block; flex: 1; }
.search .ti { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 42px; }

/* ---------- chips, segments, days, switch ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px;
  border: 1.5px solid var(--line-2); background: var(--paper); font-size: 14px; font-weight: 600; color: var(--ink-2); transition: all .15s;
}
.chip.on { background: var(--ink); border-color: var(--ink); color: #FFF7EA; }
.chip.add { border-style: dashed; color: var(--ink); }
.chip .dev { font-size: 16px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--sand); padding: 4px; border-radius: 14px; }
.seg button { padding: 10px 8px; border-radius: 11px; font-size: 14px; font-weight: 600; color: var(--ink-2); transition: all .15s; }
.seg button.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(60, 40, 20, .12); }
.seg .dev { font-size: 17px; }
.seg.wide { margin: 4px 0 14px; }
.days { display: flex; gap: 6px; justify-content: space-between; }
.day {
  width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--paper);
  font-weight: 700; font-size: 14px; color: var(--ink-2);
}
.day.on { background: var(--chili); border-color: var(--chili); color: #fff; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; }
.toggle-row b { display: block; font-weight: 600; }
.toggle-row small { color: var(--muted); font-size: 13px; }
.switch { width: 50px; height: 30px; border-radius: 999px; background: var(--line-2); position: relative; flex: none; transition: background .2s; }
.switch span { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch.on { background: var(--leaf); }
.switch.on span { transform: translateX(20px); }

/* ---------- cards & lists ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.card.list > * + * { border-top: 1px solid var(--line); }
.card + .label, .card + .btn { margin-top: 14px; }
.btn.ghost.block { margin-top: 12px; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--sand); color: var(--ink-2); font-style: normal; }
.pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.pill.ok { background: #E1F3E8; color: var(--wa-d); }

.avatar {
  --c: #B85A1A; width: 40px; height: 40px; border-radius: 50%; background: var(--c); color: #fff;
  display: inline-grid; place-items: center; font-weight: 700; flex: none; font-size: 16px;
}
.avatar.xs { width: 22px; height: 22px; font-size: 11px; }
.avatar.sm { width: 34px; height: 34px; font-size: 14px; }
.avatar.lg { width: 56px; height: 56px; font-size: 22px; }
.avatar.xl { width: 72px; height: 72px; font-size: 28px; }

.mono {
  width: 46px; height: 46px; border-radius: 50%; flex: none; display: inline-grid; place-items: center;
  background: var(--t); color: var(--c); font-family: var(--dev); font-size: 22px; line-height: 1;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 22%, transparent); padding-top: 3px;
}
.mono.sm { width: 30px; height: 30px; font-size: 15px; }
.mono.xl { width: 76px; height: 76px; font-size: 36px; }

.diet { width: 14px; height: 14px; border: 1.5px solid currentColor; border-radius: 3px; display: inline-grid; place-items: center; flex: none; }
.diet::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.diet.veg { color: #2E7D32; }
.diet.egg { color: #C99512; }
.diet.nv { color: #A3352A; }

/* ---------- setup / onboarding ---------- */
.setup { min-height: 100dvh; display: flex; flex-direction: column; }
.setup-top {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
}
.progress { flex: 1; height: 6px; background: var(--sand); border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--turmeric), var(--chili)); border-radius: 999px; transition: width .4s ease; }
.step-count { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-left: auto; }
.setup-body { flex: 1; padding: 8px 20px calc(120px + var(--safe-b)); animation: rise .35s ease both; }
.setup-foot {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 6;
  padding: 14px 20px calc(16px + var(--safe-b)); background: linear-gradient(to top, var(--bg) 72%, rgba(247, 240, 228, 0));
}
.welcome { padding: 26px 22px 40px; text-align: center; animation: rise .5s ease both; }
.welcome .lede { margin-bottom: 4px; }
.welcome .field { text-align: left; margin: 22px 0 18px; }
.welcome-art { display: grid; place-items: center; margin: 6px 0 4px; }
.big-thali { width: min(250px, 66vw); height: auto; filter: drop-shadow(0 14px 24px rgba(120, 80, 30, .16)); }
.namaskar { font-family: var(--dev); font-size: 30px; color: var(--chili); margin: 6px 0 0; }
.kg { font-family: var(--dev); font-size: 19px; }
.katori { animation: pop .5s cubic-bezier(.2, 1.5, .4, 1) both; cursor: pointer; }
.katori:focus { outline: none; }
.katori:focus-visible circle { stroke-width: 4; }

.member-list { display: grid; gap: 10px; margin: 6px 0 4px; }
.member-card {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; transition: border .15s;
}
.member-card:hover { border-color: var(--line-2); }
.mc-text { flex: 1; min-width: 0; }
.mc-text b { display: block; font-weight: 700; }
.mc-text small { color: var(--muted); font-size: 13px; display: block; }
.mc-text .tag { margin-left: 6px; vertical-align: 1px; }

.cuisine-row { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; }
.cuisine-row > span { display: flex; justify-content: space-between; align-items: baseline; }
.cuisine-row small { color: var(--muted); font-size: 15px; }
.cuisine-row .seg button { padding: 8px 4px; font-size: 13px; }

.fav-tools { display: flex; gap: 10px; align-items: center; margin-bottom: 2px; }
.count-pill { flex: none; background: var(--ink); color: #FFF7EA; border-radius: 999px; padding: 8px 12px; font-size: 13px; }
.fav-group h3 { font-family: var(--serif); font-size: 19px; font-weight: 600; margin: 24px 0 10px; display: flex; justify-content: space-between; align-items: baseline; }
.fav-group h3 small { font-family: var(--sans); font-size: 12.5px; color: var(--muted); font-weight: 600; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { position: relative; background: var(--paper); border: 1.5px solid var(--line); border-radius: 16px; transition: all .15s; opacity: .62; }
.tile .mono { filter: grayscale(.85); transition: filter .2s; }
.tile.on { opacity: 1; border-color: var(--ink); box-shadow: 0 2px 0 var(--ink); }
.tile.on .mono { filter: none; }
.tile-main { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; width: 100%; padding: 12px; text-align: left; min-height: 116px; }
.tile-text b { display: block; font-size: 14px; font-weight: 700; line-height: 1.25; }
.tile-text small { font-size: 13.5px; color: var(--muted); }
.heart { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--line-2); }
.heart.on { color: var(--chili); background: #FCE4DE; }

.wa-bubble {
  background: #E5F8D7; border: 1px solid #CBE9B3; border-radius: 16px 16px 16px 4px; padding: 12px 14px;
  white-space: pre-wrap; font-family: 'Mukta', var(--sans); font-size: 15px; line-height: 1.5; max-height: 320px; overflow: auto;
}
.special-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.special-row > span:nth-child(2) { flex: 1; }
.special-row b { display: block; }
.special-row small { color: var(--muted); }
.sd-icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #FBE3EC; color: #A23C63; }

.ready { min-height: 100dvh; display: grid; place-content: center; text-align: center; padding: 30px; gap: 4px; }
.ready-steps { list-style: none; padding: 0; margin: 8px auto 0; text-align: left; display: grid; gap: 10px; }
.ready-steps li { display: flex; gap: 10px; align-items: center; font-weight: 600; color: var(--ink-2); animation: rise .5s ease both; }
.ready-steps .ti { color: #fff; background: var(--leaf); border-radius: 50%; padding: 3px; font-size: 14px; }

/* ---------- login / who ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; text-align: center; animation: rise .45s ease both; }
.login-card .stack { text-align: left; margin-top: 18px; }
.stack { display: grid; gap: 12px; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-top: 18px; }
.who { display: grid; justify-items: center; gap: 6px; padding: 18px 10px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); transition: all .15s; }
.who:hover { border-color: var(--ink); transform: translateY(-2px); }
.who small { color: var(--muted); }
.splash { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 6px; }

/* ---------- app shell ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--serif); font-size: 23px; font-weight: 600; }
.main { padding: 0 16px calc(170px + var(--safe-b)); }
/* Opacity only: a transform here would trap the fixed CTA dock inside <main>. */
.main.enter { animation: fade .3s ease both; }
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr); background: var(--paper); border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + var(--safe-b));
}
.tab { display: grid; justify-items: center; gap: 2px; padding: 6px 0; font-size: 11.5px; font-weight: 600; color: var(--muted); position: relative; }
.tab .ti { font-size: 23px; }
.tab.on { color: var(--chili); }
.tab.on::before { content: ''; position: absolute; top: -7px; width: 26px; height: 3px; border-radius: 0 0 3px 3px; background: var(--chili); }
.cta-dock {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(62px + var(--safe-b)); width: 100%; max-width: 480px; z-index: 25;
  padding: 18px 16px 10px; background: linear-gradient(to top, var(--bg) 62%, rgba(247, 240, 228, 0));
}
.cta-dock.two { display: flex; gap: 10px; }
.page-head { margin: 8px 0 14px; }

/* ---------- day strip ---------- */
.daystrip { display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px 12px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.daystrip::-webkit-scrollbar { display: none; }
.daychip {
  flex: none; width: 54px; padding: 8px 0 9px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line);
  display: grid; justify-items: center; gap: 1px; position: relative; transition: all .15s;
}
.daychip small { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.daychip b { font-family: var(--serif); font-size: 20px; font-weight: 600; }
.daychip.on { background: var(--ink); border-color: var(--ink); color: #FFF7EA; box-shadow: 0 6px 14px rgba(42, 27, 20, .22); }
.daychip.on small { color: #E8D7B5; }
.sent-dot { position: absolute; top: 6px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--wa); }

/* ---------- plan ---------- */
.plan-hero { display: grid; grid-template-columns: 1fr 148px; align-items: center; gap: 8px; margin: 4px 0 12px; }
.plan-hero .display { margin-bottom: 4px; }
.plan-hero .muted { margin: 0; font-size: 14px; }
.thali { width: 148px; height: 148px; filter: drop-shadow(0 10px 18px rgba(120, 80, 30, .16)); }
.thali-day { font-family: var(--serif); font-size: 32px; font-weight: 600; fill: var(--ink); }
.thali-dow { font-size: 10px; font-weight: 700; letter-spacing: .16em; fill: var(--muted); }

.banner { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; font-size: 14px; margin-bottom: 10px; }
.banner .ti { font-size: 20px; flex: none; }
.banner.celebrate { background: #FBE3EC; color: #85294D; }
.banner.fast { background: #E3F0E1; color: var(--leaf); }
.banner.sent { background: #E1F3E8; color: var(--wa-d); }
.banner.votes { background: var(--card); border: 1px solid var(--line); flex-wrap: wrap; }
.vote { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.vote.up { color: var(--wa-d); }
.vote.change { color: var(--saffron); }
.votes-row { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; padding: 8px 0 2px; }

.prep { background: #FFF3D6; border: 1px solid #F0D79C; border-radius: 18px; padding: 14px 16px; margin-bottom: 14px; }
.prep h3 { margin: 0 0 8px; font-size: 15px; display: flex; gap: 8px; align-items: center; color: #7A4E08; }
.prep ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.prep li { padding-left: 14px; position: relative; }
.prep li::before { content: ''; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--turmeric); }
.prep li b { display: block; font-weight: 600; font-size: 14.5px; }
.prep li small { color: #8A6A35; font-size: 12.5px; }

.slots { display: grid; gap: 12px; }
.slot { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 12px 14px 6px; box-shadow: var(--shadow); transition: border .2s, background .2s; scroll-margin: 90px; }
.slot.locked { border-color: #EDC874; background: #FFFAEE; }
.slot.fasting { background: #F4FAF2; border-color: #CFE5CA; }
.slot.flash { animation: flash 1s ease; }
.slot.swapped .items { animation: rise .35s ease both; }
.slot-head { display: flex; align-items: center; gap: 10px; padding-bottom: 4px; }
.slot-ic { width: 34px; height: 34px; border-radius: 50%; background: #F6EAD3; color: var(--saffron); display: grid; place-items: center; flex: none; }
.slot-title { flex: 1; min-width: 0; }
.slot-title b { display: block; font-size: 16px; font-weight: 700; line-height: 1.2; }
.slot-title small { color: var(--muted); font-size: 13.5px; }
.slot-tools { display: flex; gap: 2px; }
.slot-note { font-size: 12.5px; color: var(--muted); margin: 2px 0 8px; display: flex; gap: 6px; align-items: center; }
.packed { display: flex; align-items: center; gap: 10px; padding: 8px 0 10px; }
.packed-monos { display: flex; flex: none; }
.packed-monos .mono { margin-left: -8px; box-shadow: 0 0 0 2px var(--card); }
.packed-monos .mono:first-child { margin-left: 0; }
.packed-text { font-size: 14px; color: var(--ink-2); line-height: 1.35; }
.packed-text small { display: block; color: var(--muted); font-size: 12.5px; }
.items { display: grid; }
.dish-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 9px 2px; border-top: 1px dashed var(--line); border-radius: 0; }
.items .dish-row:first-child { border-top: 0; }
.dish-row:hover .dr-text b { color: var(--chili); }
.dish-row.dim { opacity: .55; }
.dr-text { flex: 1; min-width: 0; }
.dr-text b { display: block; font-weight: 600; font-size: 15.5px; line-height: 1.25; transition: color .15s; }
.dr-text small { color: var(--muted); font-size: 14px; }
.dish-row > .ti { font-size: 18px; }
.alt { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 6px; }
.alt > small { font-size: 12px; font-weight: 700; color: var(--leaf); }
.alt .dish-row { border-top: 0; }
.plan-actions { display: flex; gap: 10px; margin: 16px 0 0; }
.plan-actions .btn { flex: 1; }

/* ---------- week ---------- */
.week-list { display: grid; gap: 12px; margin-top: 14px; }
.week-day { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 14px; box-shadow: var(--shadow); }
.week-day.is-today { border-color: var(--ink); }
.week-day header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.week-day header b { font-family: var(--serif); font-size: 18px; font-weight: 600; }
.wm { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.wm-label { width: 70px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; flex: none; }
.wm-name { font-weight: 600; font-size: 14.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.week-day footer { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ---------- helper message ---------- */
.wa-compose { background: #EFE7DC; border-radius: 20px; padding: 12px; }
.wa-text {
  width: 100%; min-height: 46vh; resize: vertical; border: 1px solid #CBE9B3 !important; background: #E5F8D7 !important;
  border-radius: 16px 16px 16px 4px !important; padding: 14px !important; font-family: 'Mukta', var(--sans) !important; font-size: 16px !important; line-height: 1.55;
}

/* ---------- grocery ---------- */
.g-summary { font-size: 14px; color: var(--muted); margin: 0 0 6px; }
.g-summary b { font-family: var(--serif); font-size: 26px; color: var(--ink); margin-right: 4px; }
.g-group { margin-top: 14px; }
.g-group h3, .g-group summary { font-family: var(--serif); font-size: 18px; font-weight: 600; margin: 0 0 6px; }
.g-group summary { cursor: pointer; padding: 10px 0; list-style: none; }
.g-group summary::-webkit-details-marker { display: none; }
.g-group summary small { font-family: var(--sans); font-size: 12.5px; color: var(--muted); font-weight: 500; margin-left: 6px; }
.g-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 11px 12px; margin-bottom: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; transition: all .15s; }
.g-item .check { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #FFF1D6; color: var(--saffron); flex: none; }
.g-item.have { opacity: .55; }
.g-item.have .check { background: #E1F3E8; color: var(--wa-d); }
.g-item.have b { text-decoration: line-through; }
.g-text b { display: block; font-weight: 600; }
.g-text small { color: var(--muted); font-size: 12.5px; }

/* ---------- family ---------- */
.link-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 13px 14px; }
.link-row > span:nth-child(2) { flex: 1; min-width: 0; }
.link-row b { display: block; font-weight: 600; }
.link-row small { color: var(--muted); font-size: 13px; }
.lr-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--sand); color: var(--ink-2); flex: none; }
.about { justify-content: flex-start; text-align: left; line-height: 1.5; margin-top: 20px; }

/* ---------- sheet ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(32, 20, 12, .45); opacity: 0; transition: opacity .25s; }
.sheet {
  position: absolute; left: 50%; bottom: 0; width: 100%; max-width: 480px; max-height: 90vh; overflow: auto;
  background: var(--paper); border-radius: 26px 26px 0 0; padding: 26px 18px calc(22px + var(--safe-b));
  transform: translate(-50%, 100%); transition: transform .3s cubic-bezier(.2, .85, .2, 1); overscroll-behavior: contain;
}
.sheet.tall { min-height: 72vh; }
.sheet::before { content: ''; position: absolute; top: 9px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--line-2); }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: translate(-50%, 0); }
.sheet-x { position: absolute; top: 14px; right: 12px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--sand); color: var(--ink-2); z-index: 2; }
.sheet-title { font-family: var(--serif); font-size: 24px; font-weight: 600; margin: 0 40px 6px 0; line-height: 1.15; }
.sheet-head { display: flex; gap: 14px; align-items: center; margin-bottom: 4px; }
.sheet-head p { margin: 0; }
.sheet-actions { display: flex; gap: 10px; margin-top: 22px; }
.sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 4px; }
.dish-hero { display: flex; gap: 16px; align-items: center; }
.dish-hero .dev.big { font-size: 19px; color: var(--ink-2); margin: 0 0 8px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.recipe { margin-top: 10px; font-size: 15px; }
.recipe ul, .recipe ol, .thread ul, .thread ol { padding-left: 20px; margin: 6px 0 10px; }
.recipe li, .thread li { margin: 3px 0; }
.recipe p, .thread p { margin: 6px 0; }
.recipe b { font-family: var(--serif); font-size: 17px; font-weight: 600; }
.pick-list { margin-top: 10px; display: grid; }
.pick-list .dish-row { border-top: 1px solid var(--line); }
.steps-list p { margin: 10px 0; }
.thread { display: grid; gap: 10px; margin: 14px 0; }
.thread .q { justify-self: end; background: var(--ink); color: #FFF7EA; padding: 10px 14px; border-radius: 16px 16px 4px 16px; max-width: 85%; font-weight: 500; }
.thread .a { background: var(--card); border: 1px solid var(--line); padding: 10px 14px; border-radius: 16px 16px 16px 4px; font-size: 15px; }
.ask-form { display: flex; gap: 8px; align-items: flex-end; position: sticky; bottom: calc(-22px - var(--safe-b)); background: var(--paper); padding: 12px 0 4px; margin-top: 12px; }
.ask-form textarea { flex: 1; resize: none; padding: 12px 14px; }
.ask-form .btn { height: 50px; width: 50px; padding: 0; border-radius: 14px; }

/* ---------- toast & loading ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(150px + var(--safe-b)); transform: translate(-50%, 16px); opacity: 0; z-index: 80;
  background: var(--ink); color: #FFF7EA; padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(42, 27, 20, .3); transition: all .25s ease; max-width: calc(100% - 40px); text-align: center;
}
.toast.in { opacity: 1; transform: translate(-50%, 0); }
.toast.warn { background: var(--chili); }
.loading { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 14px; padding: 8px 0; }
.loading span { width: 7px; height: 7px; border-radius: 50%; background: var(--turmeric); animation: bounce 1s infinite ease-in-out; }
.loading span:nth-child(2) { animation-delay: .15s; background: var(--saffron); }
.loading span:nth-child(3) { animation-delay: .3s; background: var(--chili); margin-right: 6px; }
.empty-state { text-align: center; padding: 50px 20px; }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }
@keyframes bounce { 0%, 80%, 100% { transform: scale(.6); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(231, 169, 58, .0); } 30% { box-shadow: 0 0 0 6px rgba(231, 169, 58, .45); } 100% { box-shadow: var(--shadow); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (max-width: 360px) {
  .display { font-size: 32px; }
  .display.sm { font-size: 26px; }
  .plan-hero { grid-template-columns: 1fr 120px; }
  .thali { width: 120px; height: 120px; }
  .tiles { grid-template-columns: 1fr; }
}
