/* Placeholder look until the design references arrive: every colour and size is a token
   here, so the new design mostly replaces this block. Logical properties (inline-start/end)
   keep the layout right in Arabic (right-to-left). */
/* Direction from the references (Nov 2026): near-black backgrounds, deep green as a second
   surface, warm copper accent, cream pill buttons, rounded dark cards, geometric type,
   top-down food photography (photos arrive with the recipe library). */
:root {
  --bg: #0e0d0c; --bg-2: #14201a; --card: #1c1b19; --card-2: #252320; --ink: #f4efe6; --muted: #a39b8f; --line: #2e2b27;
  --accent: #e07a3f; --accent-ink: #1a0f08; --accent-soft: rgba(224, 122, 63, .14); --cream: #efe6d6; --cream-ink: #1a1714;
  --green: #2f5a43; --warn: #ff8f6b; --warn-soft: rgba(255, 120, 90, .13);
  --radius: 22px; --gap: 14px;
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Noto Sans Arabic", system-ui, sans-serif;
  color-scheme: dark;
}
html[lang="ar"] { --font: var(--font-ar); }
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body { margin: 0; min-height: 100vh; color: var(--ink); font: 16px/1.5 var(--font); -webkit-text-size-adjust: 100%;
  background: radial-gradient(120% 60% at 100% 0%, rgba(47, 90, 67, .35), transparent 60%), var(--bg); background-attachment: fixed; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgba(14, 13, 12, .72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 18px; letter-spacing: .02em; color: var(--ink); text-decoration: none; }
.brand::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-inline-end: 8px; vertical-align: middle; }
main { max-width: 560px; margin: 0 auto; padding: 16px 16px calc(32px + env(safe-area-inset-bottom)); }
h1 { font-size: 30px; line-height: 1.15; font-weight: 600; letter-spacing: -.01em; margin: 8px 0 6px; }
h2 { font-size: 18px; font-weight: 600; margin: 0 0 10px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: var(--gap) 0; }
.stack > * + * { margin-top: 10px; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spread { justify-content: space-between; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
input, select { width: 100%; font: inherit; padding: 13px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card-2); color: var(--ink); }
input::placeholder { color: #6e675d; }
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.code-input { font-size: 24px; letter-spacing: .3em; text-align: center; }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent; background: var(--cream); color: var(--cream-ink);
  cursor: pointer; text-decoration: none; min-height: 48px; letter-spacing: .01em; transition: transform .15s ease, background .2s ease; }
button:active, .btn:active { transform: scale(.98); }
.btn.accent, button.accent { background: var(--accent); color: var(--accent-ink); }
button.full, .btn.full { width: 100%; }
button.ghost, .btn.ghostlink { background: transparent; color: var(--ink); border-color: var(--line); }
button.link { background: none; border: 0; padding: 4px 0; min-height: 0; color: var(--accent); font-weight: 600; }
button.danger { background: var(--warn-soft); color: var(--warn); }
button.small, .btn.small { padding: 7px 14px; min-height: 36px; font-size: 14px; }
button:disabled { opacity: .5; cursor: default; }
.provider { background: var(--card-2); color: var(--ink); border-color: var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 14px; min-height: 38px; border-radius: 999px; background: var(--card-2); color: var(--ink); border: 1px solid var(--line); font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.choice { display: block; width: 100%; text-align: start; background: var(--card-2); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; margin-top: 8px; font-weight: 600; }
.choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.choice small { display: block; font-weight: 400; color: var(--muted); }
.error { background: var(--warn-soft); color: var(--warn); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.note { background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.member { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.member:first-of-type { border-top: 0; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); border: 1px solid var(--line); color: var(--cream); font-weight: 600; flex: none; }
.member .who { flex: 1; min-width: 0; }
.member .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.tag.pending { background: var(--warn-soft); color: var(--warn); }
.linkbox { word-break: break-all; font-size: 13px; background: var(--bg); border: 1px dashed #4a453e; border-radius: 14px; padding: 10px 12px; direction: ltr; text-align: start; }
.switch { display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin: 6px 0 4px; }
.switch button { flex: 1; background: transparent; color: var(--ink); min-height: 38px; }
.switch button[aria-pressed="true"] { background: var(--cream); color: var(--cream-ink); }
.steps { display: flex; gap: 6px; margin-bottom: 12px; }
.steps i { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.steps i.on { background: var(--accent); }
dialog { border: 0; border-radius: var(--radius); padding: 18px; width: min(92vw, 440px); background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgba(0,0,0,.4); }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
@media (prefers-reduced-motion: no-preference) { .card { animation: in .2s ease both; } @keyframes in { from { opacity: 0; transform: translateY(4px); } } }

/* pieces added for the reference look */
.card { box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
.hero { position: relative; padding: 18px 0 8px; isolation: isolate; }
.hero::after { content: ""; position: absolute; inset-inline-end: -40px; top: -30px; width: 160px; height: 160px; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle at 35% 35%, #3a2a1d, #15110d 70%); box-shadow: 0 30px 60px rgba(0, 0, 0, .6), inset 0 0 0 10px #1d1915; opacity: .9; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: 12px; color: var(--accent); margin: 0; }
html[lang="ar"] .eyebrow { letter-spacing: 0; }
.back { display: inline-block; color: var(--muted); text-decoration: none; margin: 4px 0; }
details.card > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: "+"; font-size: 22px; color: var(--accent); }
details.card[open] > summary::after { content: "–"; }
details.card > summary h2 { margin: 0; }
details.card[open] > summary { margin-bottom: 12px; }
.member .acts { justify-content: flex-end; gap: 6px; }
@media (max-width: 420px) { .member { flex-wrap: wrap; } .member .acts { width: 100%; justify-content: flex-start; padding-inline-start: 54px; } }
.note-card { border-color: var(--accent); }
.tag { background: var(--card-2); color: var(--muted); border: 1px solid var(--line); font-weight: 500; }
.note { background: var(--accent-soft); color: var(--cream); }
@media (prefers-reduced-transparency: reduce) { .top { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); } }

/* ---------- Phase 2 ---------- */
main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
/* page change: content rises in softly */
@media (prefers-reduced-motion: no-preference) {
  main > * { animation: rise .32s cubic-bezier(.2, .8, .2, 1) both; }
  main > *:nth-child(2) { animation-delay: .03s; } main > *:nth-child(3) { animation-delay: .06s; } main > *:nth-child(4) { animation-delay: .09s; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } }
}
/* bottom tabs: a dark floating bar like the references */
.tabs { position: fixed; z-index: 10; inset-inline: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); max-width: 536px; margin: 0 auto;
  display: flex; justify-content: space-around; padding: 6px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(20, 19, 17, .82); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); box-shadow: 0 16px 40px rgba(0,0,0,.5); }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; }
.tabs a i { font-style: normal; font-size: 17px; line-height: 1; }
.tabs a.on { background: var(--cream); color: var(--cream-ink); }
/* a plate: dark ceramic with a warm glow, where the food photo will go */
.plate { width: 56px; height: 56px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 50% 50%, #3b2f24 0 38%, #1b1814 39% 62%, #26221d 63% 70%, #141210 71%);
  box-shadow: 0 10px 24px rgba(0,0,0,.55), inset 0 2px 0 rgba(255,255,255,.06); }
.plate.sm { width: 44px; height: 44px; } .plate.lg { width: 210px; height: 210px; } .plate.xl { width: 170px; height: 170px; }
.recipe-hero { display: grid; place-items: center; padding: 10px 0 4px; }
@media (prefers-reduced-motion: no-preference) { .recipe-hero .plate { animation: spin-in .7s cubic-bezier(.2, .8, .2, 1) both; } @keyframes spin-in { from { opacity: 0; transform: rotate(-70deg) scale(.7); } } }
/* the plate rail: swipe between today's meals; the middle plate is big, the others turn away */
.plate-rail { display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px calc(50% - 95px) 14px; margin: 0 -16px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.plate-rail::-webkit-scrollbar { display: none; }
.plate-card { --d: 0; flex: 0 0 190px; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  color: var(--ink); text-decoration: none; transform: scale(calc(1 - .22 * abs(var(--d)))); opacity: calc(1 - .45 * abs(var(--d))); transition: transform .12s linear, opacity .12s linear; }
.plate-card .plate { transform: rotate(calc(var(--d) * 70deg)); transition: transform .12s linear; }
.plate-card b { font-size: 16px; line-height: 1.25; }
@supports not (transform: scale(calc(1 - .2 * abs(1)))) { .plate-card { transform: none; opacity: 1; } }
.slot { display: block; text-transform: uppercase; letter-spacing: .12em; font-size: 11px; color: var(--accent); font-weight: 600; }
html[lang="ar"] .slot { letter-spacing: 0; }
.day-card { display: block; color: var(--ink); text-decoration: none; }
.day-card.past { opacity: .55; }
.meal-list { list-style: none; padding: 0; margin: 8px 0 0; }
.meal-list li { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; border-top: 1px solid var(--line); }
.meal-list li:first-child { border-top: 0; }
.meal-list .slot { width: 78px; flex: none; }
.slot-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.slot-row:first-child { border-top: 0; }
.slot-row a { color: var(--ink); text-decoration: none; }
.slot-row.skipped { opacity: .5; }
.grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.warn { color: var(--warn); font-size: 13px; }
.tag.ready { background: rgba(124, 196, 160, .14); color: #8fd1ad; border-color: transparent; }
.tag.cancelled { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.tag.draft { color: var(--cream); }
.tag.sep { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.alert-card { display: flex; color: var(--ink); text-decoration: none; border-color: var(--accent); }
.actions { margin: 14px 0; }
table.grid, table.ing { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid th { text-align: start; color: var(--muted); font-weight: 500; font-size: 12px; padding: 4px; }
table.grid td, table.ing td { padding: 7px 4px; border-top: 1px solid var(--line); }
td.num, th.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.req { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.req:first-of-type { border-top: 0; }
/* the cook view */
.meal-block h2 { margin: 2px 0 0; } .meal-block h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 16px 0 8px; }
.meal-block .row { gap: 14px; }
.part h4 { margin: 14px 0 6px; font-size: 15px; }
.part ol { padding-inline-start: 20px; margin: 8px 0; } .part li { margin-bottom: 6px; }
.part.sep { border-inline-start: 3px solid var(--accent); padding-inline-start: 12px; }
li.pack-sep { list-style: none; margin-inline-start: -20px; background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn); border-radius: 14px; padding: 9px 12px; font-weight: 700; }
.box-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.bx-wrap { background: var(--card-2); border: 1px solid var(--line); border-radius: 16px; padding: 10px; }
.bx-who { font-size: 14px; margin-bottom: 6px; }
.bx { display: flex; gap: 4px; height: 96px; border: 2px solid #4a443c; border-radius: 12px; padding: 4px; }
.bx-sec { flex-basis: 0; min-width: 0; border-radius: 8px; background: #2f2a24; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 3px; overflow: hidden; }
.bx-sec:nth-child(2) { background: #2c3a30; } .bx-sec:nth-child(3) { background: #3a2f22; } .bx-sec:nth-child(4) { background: #2b2f3a; }
.bx-sec span { font-size: 10px; line-height: 1.15; color: var(--muted); } .bx-sec b { font-size: 12px; }
.bx-pots { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pot { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
/* recipes */
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.recipe-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; margin: 0; color: var(--ink); text-decoration: none; }
.recipe-card .plate { width: 96px; height: 96px; margin-bottom: 4px; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
@media (hover: hover) { .recipe-card:hover .plate { transform: rotate(40deg) scale(1.05); } }
.macros .macro-row { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; margin: 6px 0; }
.macro-row div { display: flex; flex-direction: column; } .macro-row b { font-size: 20px; } .macro-row span { font-size: 12px; color: var(--muted); }
.macro-row div + div { border-inline-start: 1px solid var(--line); }
/* picker */
dialog.picker { max-height: 86vh; display: flex; flex-direction: column; }
dialog.picker[open] { display: flex; }
.pick-list { overflow-y: auto; margin-top: 8px; }
.choice.pick small.warn { color: var(--warn); }
/* shopping */
.money .bar { height: 8px; border-radius: 8px; background: var(--card-2); overflow: hidden; margin: 8px 0; }
.money .bar i { display: block; height: 100%; background: var(--accent); border-radius: 8px; } .money .bar i.over { background: var(--warn); }
.shop-row { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.shop-row:first-of-type { border-top: 0; }
.shop-row.done b { text-decoration: line-through; color: var(--muted); }
.tick { width: 28px; height: 28px; min-height: 0; padding: 0; border-radius: 50%; background: transparent; border: 2px solid #5a5248; flex: none; }
.tick[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.tick[aria-pressed="true"]::after { content: "✓"; color: var(--accent-ink); font-size: 14px; }
.price { width: 92px; padding: 8px 10px; text-align: end; }
/* progress */
.week-bars { display: flex; gap: 8px; height: 110px; align-items: flex-end; margin-top: 12px; }
.wb { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.wb i { width: 100%; max-width: 26px; border-radius: 8px 8px 4px 4px; background: linear-gradient(var(--accent), #a8542a); min-height: 3px; }
.wb i.over { background: var(--warn); } .wb span { font-size: 11px; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) { .wb i { animation: grow .6s cubic-bezier(.2, .8, .2, 1) both; transform-origin: bottom; } @keyframes grow { from { transform: scaleY(0); } } }
.ghostlink { background: transparent; color: var(--ink); border: 1px solid var(--line); }
@media (prefers-reduced-motion: reduce) { .plate-card, .plate-card .plate { transform: none !important; opacity: 1 !important; } }
.pot.allergy { background: var(--warn-soft); color: var(--warn); text-decoration: line-through; }
.pot.allergy .warn { text-decoration: none; display: inline-block; }
.bx-sec.allergy { outline: 2px solid var(--warn); }
.bx-sec .warn { font-size: 10px; }
/* the recipe page from the second animation reference: ingredients slide in one after another */
@media (prefers-reduced-motion: no-preference) {
  .part table.ing tr { animation: slide-in .4s cubic-bezier(.2, .8, .2, 1) both; }
  .part table.ing tr:nth-child(2) { animation-delay: .05s; } .part table.ing tr:nth-child(3) { animation-delay: .1s; }
  .part table.ing tr:nth-child(4) { animation-delay: .15s; } .part table.ing tr:nth-child(5) { animation-delay: .2s; } .part table.ing tr:nth-child(n+6) { animation-delay: .25s; }
  @keyframes slide-in { from { opacity: 0; transform: translateX(18px); } }
  html[dir="rtl"] .part table.ing tr { animation-name: slide-in-rtl; } @keyframes slide-in-rtl { from { opacity: 0; transform: translateX(-18px); } }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .25s; }
  ::view-transition-group(*) { animation-duration: .45s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
}
/* from the latest references: glossy deep-green meal rows with a light streak, plates that
   break out of their cards, a round check button */
.list-title { margin: 22px 0 10px; font-size: 22px; }
.meal-row { position: relative; overflow: hidden; display: flex; gap: 14px; align-items: center; padding: 14px; margin-bottom: 10px; border-radius: 24px;
  background: linear-gradient(115deg, rgba(255,255,255,0) 55%, rgba(220,255,235,.07) 62%, rgba(255,255,255,0) 70%), linear-gradient(160deg, #22302a, #171c19 70%);
  border: 1px solid rgba(255,255,255,.07); box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.meal-row .plate { width: 64px; height: 64px; }
.meal-row b { font-weight: 500; font-size: 16px; }
.meal-row.skipped { opacity: .45; } .meal-row.skipped b { text-decoration: line-through; }
.macros-mini { font-size: 13px; color: var(--muted); } .macros-mini i { font-style: normal; color: var(--accent); margin-inline-start: 6px; } .macros-mini i:first-child { margin-inline-start: 0; }
.check { width: 46px; height: 46px; min-height: 0; padding: 0; border-radius: 50%; flex: none; background: rgba(255,255,255,.06); color: var(--muted); border: 1px solid rgba(255,255,255,.15); }
.check[aria-pressed="true"] { background: var(--cream); color: var(--cream-ink); border-color: var(--cream); }
@media (prefers-reduced-motion: no-preference) { .check { transition: background .2s, transform .2s; } .check:active { transform: scale(.9); } }
.recipe-grid { margin-top: 44px; row-gap: 48px; }
.recipe-card { overflow: visible; }
.recipe-card .plate { margin-top: -44px; width: 104px; height: 104px; }
/* creator credit and their video (official player, loaded on tap) */
.credit { margin: 4px 0 8px; color: var(--muted); font-size: 14px; } .credit a { color: var(--accent); }
.by { color: var(--accent); }
.video-card iframe { display: block; width: 100%; border: 0; border-radius: 16px; margin-top: 4px; background: #000; }
.video-card iframe.yt { aspect-ratio: 9 / 16; max-height: 70vh; }
.video-card iframe.reel { height: 640px; max-height: 80vh; }

/* ---------- design pass (Nov 2026) ---------- */
/* loading: a soft outline of the page with a slow sheen */
.skeleton { display: grid; gap: 14px; padding-top: 12px; }
.skeleton i { display: block; border-radius: var(--radius); background: var(--card); position: relative; overflow: hidden; }
.skeleton .sk-title { width: 55%; height: 34px; border-radius: 12px; }
.skeleton .sk-plate { width: 170px; height: 170px; border-radius: 50%; justify-self: center; margin: 8px 0; }
.skeleton .sk-card { height: 120px; } .skeleton .sk-card.short { height: 76px; }
@media (prefers-reduced-motion: no-preference) {
  .skeleton { animation: fade-in .3s .15s both; } @keyframes fade-in { from { opacity: 0; } }
  .skeleton i::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.045), transparent); animation: sheen 1.4s ease-in-out infinite; }
  @keyframes sheen { to { transform: translateX(100%); } }
}
/* empty pages: a drawn plate and one line */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 28px 20px; margin: var(--gap) 0;
  border-radius: var(--radius); border: 1px dashed #3a362f; background: radial-gradient(80% 60% at 50% 0%, rgba(47, 90, 67, .18), transparent 70%); }
.empty svg { width: 96px; height: 96px; }
.empty p { color: var(--muted); max-width: 30ch; margin: 0; }
.e-rim { fill: #1b1814; stroke: #3a332b; stroke-width: 2; } .e-well { fill: #2a241e; }
.e-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: .8; } .e-line.dash { stroke-dasharray: 6 6; }
/* round icon button (plan settings) */
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
/* a page title with its status under it, so long dates never squeeze */
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; } .title-row h1 { flex: 1 1 100%; margin-bottom: 0; }
/* filters in one swipeable line */
.chips.scroller { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 2px 16px; }
.chips.scroller::-webkit-scrollbar { display: none; } .chips.scroller .chip { flex: none; }
/* the boxes table: the numbers sit under their meal */
table.grid th:not(:first-child), table.grid td.num { text-align: center; }
/* macros: one small chip-like group per number, safe in right-to-left */
.macros-mini { display: flex; flex-wrap: wrap; gap: 2px 10px; } .macros-mini bdi { white-space: nowrap; } .macros-mini i { margin-inline-start: 0; margin-inline-end: 2px; }
/* progress: bars inside a track with a dashed target line */
.week-bars { position: relative; }
.wb-track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; position: relative; }
.wb-track::before { content: ""; position: absolute; inset-inline: -4px; bottom: var(--goal); border-top: 1px dashed rgba(239, 230, 214, .35); }
.wb i { width: 100%; max-width: 26px; } .wb.today span { color: var(--accent); font-weight: 700; }
.wb-key { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; } .wb-key i { width: 18px; border-top: 1px dashed rgba(239, 230, 214, .5); }
/* plate links in meal rows */
.plate-link { flex: none; border-radius: 50%; }
/* real recipe photos: cropped round, sitting in the dark ceramic rim so the plate look stays */
.plate.photo { position: relative; overflow: hidden; background: #141210; padding: 7%; }
.plate.photo img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255,255,255,.06), inset 0 0 0 1px rgba(0,0,0,.4); }
.plate.photo::after { content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 30% 22%, rgba(255,255,255,.14), transparent 35%); }
.plate.sm.photo, .meal-row .plate.photo { padding: 4px; }
.title-row { margin-bottom: 6px; }
/* amounts like "150 g" keep their order in Arabic and stay at the far edge */
html[dir="rtl"] td.num { direction: ltr; text-align: left; }
html[dir="rtl"] table.grid td.num { text-align: center; }
.bx-sec b, .pot b { unicode-bidi: isolate; direction: ltr; }
/* people: the avatar tint says the role at a glance */
.avatar.r-main { background: var(--accent-soft); color: var(--accent); border-color: rgba(224, 122, 63, .35); }
.avatar.r-cook { background: rgba(47, 90, 67, .35); color: #9fd8b8; border-color: rgba(124, 196, 160, .3); }
.avatar.r-child { background: #2a2620; color: var(--cream); }
/* Swahili meal names are long ("Chakula cha mchana"): the label sits above the dish */
html[lang="sw"] .meal-list li { flex-direction: column; gap: 0; padding: 7px 0; }
html[lang="sw"] .meal-list .slot { width: auto; }
html[lang="sw"] .slot { letter-spacing: .08em; }
/* welcome: three plates, the middle one big, drifting slowly like the home rail */
.welcome { text-align: center; padding: 6px 0 4px; }
.welcome .plates { position: relative; height: 230px; margin: 0 -16px 6px; }
.welcome .plate { position: absolute; top: 50%; left: 50%; }
.welcome .plate:nth-child(1) { width: 190px; height: 190px; margin: -95px 0 0 -95px; z-index: 2; box-shadow: 0 30px 60px rgba(0,0,0,.6), 0 0 80px rgba(224, 122, 63, .14), inset 0 2px 0 rgba(255,255,255,.06); }
.welcome .plate:nth-child(2) { width: 112px; height: 112px; margin: -86px 0 0 -170px; opacity: .7; }
.welcome .plate:nth-child(3) { width: 124px; height: 124px; margin: -20px 0 0 52px; opacity: .8; }
.welcome h1 { font-size: 32px; } .welcome p { max-width: 32ch; margin-inline: auto; }
@media (prefers-reduced-motion: no-preference) {
  .welcome .plate { animation: drift 9s ease-in-out infinite alternate; }
  .welcome .plate:nth-child(2) { animation-duration: 11s; animation-delay: -3s; } .welcome .plate:nth-child(3) { animation-duration: 13s; animation-delay: -6s; }
  @keyframes drift { from { transform: translateY(-5px) rotate(-8deg); } to { transform: translateY(6px) rotate(10deg); } }
}
/* code, PIN and invite screens: a small plate on top, centred */
.card.auth { text-align: center; padding-top: 22px; margin-top: 28px; }
.auth-plate { width: 64px; height: 64px; margin: 0 auto 4px; }
.card.auth h1 { font-size: 26px; } .card.auth label, .card.auth .error { text-align: start; }
/* onboarding: one roomy question at a time, buttons at the bottom, steps slide in */
.card.onboard { margin-top: 18px; padding: 20px 18px; min-height: min(560px, calc(100vh - 160px)); display: flex; flex-direction: column; }
.onboard .steps { margin-bottom: 4px; } .onboard .eyebrow { margin: 6px 0 0; }
.onboard-body h2 { font-size: 26px; line-height: 1.2; margin: 4px 0 14px; }
.onboard-body > label { margin-top: 4px; }
.onboard-nav { margin-top: auto; padding-top: 16px; } .onboard-nav .grow-btn { flex: 1; }
.code-input::placeholder { color: #4a453e; letter-spacing: .3em; }
@media (prefers-reduced-motion: no-preference) {
  .onboard-body.from-next { animation: step-next .35s cubic-bezier(.2, .8, .2, 1) both; }
  .onboard-body.from-back { animation: step-back .35s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes step-next { from { opacity: 0; transform: translateX(24px); } } @keyframes step-back { from { opacity: 0; transform: translateX(-24px); } }
  html[dir="rtl"] .onboard-body.from-next { animation-name: step-back; } html[dir="rtl"] .onboard-body.from-back { animation-name: step-next; }
  .steps i { transition: background .3s; }
}
