/* Sufra demo — design system "Za'atar & Saffron" (route A identity + route B information design).
   Layout: a phone (390x844) centred on desktop with the tour panel beside it; full screen on phones. */
:root {
  --zaatar: #1F3D31; --zaatar-2: #2C5444; --zaatar-3: #3E6B58;
  --saffron: #F2A93B; --saffron-ink: #1F3D31; --saffron-soft: #FCEFD6; --saffron-line: #EBC27A;
  --sumac: #B23A3A; --sumac-soft: #F8E3E0;
  --mint: #DDEBE1; --mint-ink: #24604A; --mint-strong: #2E7D5B;
  --rice: #F7F6F1; --card: #FFFFFF; --card-2: #FBFAF6;
  --ink: #18211D; --muted: #5F6B65; --faint: #8A948E; --line: #E3E5DF; --line-2: #EEEFEA;
  --sky: #DCE8F2; --sky-ink: #2F5A7A; --rose: #F6DEE4; --rose-ink: #8A3A52;
  --shadow: 0 1px 2px rgba(24,33,29,.06), 0 8px 24px rgba(24,33,29,.08);
  --shadow-lg: 0 24px 60px rgba(24,33,29,.22);
  --desk: #E9E7DF; --desk-ink: #37423C;
  --f-display: 'Young Serif', 'Iowan Old Style', Georgia, serif;
  --f-ui: 'Rubik', 'Segoe UI', system-ui, sans-serif;
  --f-ar: 'Noto Naskh Arabic', 'Geeza Pro', 'Segoe UI', serif;
  --r-s: 12px; --r: 18px; --r-l: 26px; --navh: 86px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --zaatar: #A9D3BE; --zaatar-2: #1C3B2F; --zaatar-3: #2C5444;
  --saffron: #F2AE47; --saffron-ink: #13261E; --saffron-soft: #3A2E17; --saffron-line: #7A5A22;
  --sumac: #F08A80; --sumac-soft: #3B1F1D;
  --mint: #1E3429; --mint-ink: #9ED7BC; --mint-strong: #6CC79F;
  --rice: #0F1714; --card: #17221D; --card-2: #1B2721;
  --ink: #ECF0EB; --muted: #A5B1AA; --faint: #7D8983; --line: #2A3832; --line-2: #22302A;
  --sky: #1D2B37; --sky-ink: #A8C8E3; --rose: #35212A; --rose-ink: #F0B5C6;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 24px 60px rgba(0,0,0,.55);
  --desk: #0B100E; --desk-ink: #C9D2CC; color-scheme: dark; } }
:root[data-theme="dark"] {
  --zaatar: #A9D3BE; --zaatar-2: #1C3B2F; --zaatar-3: #2C5444;
  --saffron: #F2AE47; --saffron-ink: #13261E; --saffron-soft: #3A2E17; --saffron-line: #7A5A22;
  --sumac: #F08A80; --sumac-soft: #3B1F1D;
  --mint: #1E3429; --mint-ink: #9ED7BC; --mint-strong: #6CC79F;
  --rice: #0F1714; --card: #17221D; --card-2: #1B2721;
  --ink: #ECF0EB; --muted: #A5B1AA; --faint: #7D8983; --line: #2A3832; --line-2: #22302A;
  --sky: #1D2B37; --sky-ink: #A8C8E3; --rose: #35212A; --rose-ink: #F0B5C6;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35); --shadow-lg: 0 24px 60px rgba(0,0,0,.55);
  --desk: #0B100E; --desk-ink: #C9D2CC; color-scheme: dark; }

/* fixed colours for the always-dark surfaces (hero card, cook mode) */
:root { --night: #1F3D31; --night-2: #284C3D; --night-3: #36614F; --cream: #F6F1E4; --cream-2: #D9DFD6; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body, #app { height: 100%; }
body { margin: 0; background: var(--desk); color: var(--ink); font-family: var(--f-ui); font-size: 15px; line-height: 1.45; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; border-radius: 8px; }
.ar { font-family: var(--f-ar); direction: rtl; unicode-bidi: isolate; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- stage: phone + tour ---------- */
.stage { min-height: 100%; display: flex; justify-content: center; align-items: flex-start; gap: 40px;
  padding-block: 28px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.phone { position: relative; width: 390px; height: 844px; flex: 0 0 auto; border-radius: 48px; background: var(--rice);
  box-shadow: 0 0 0 10px #111814, 0 0 0 11px #2b3530, var(--shadow-lg); overflow: hidden; isolation: isolate; }
.statusbar { position: absolute; inset: 0 0 auto 0; height: 44px; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px 0 32px; font-weight: 600; font-size: 15px; pointer-events: none; color: var(--ink); }
.statusbar.on-dark { color: #fff; }
.statusbar .sys { display: flex; gap: 6px; align-items: center; }
.statusbar svg { width: 17px; height: 17px; }
.screen-wrap { position: absolute; inset: 0; }
.screen { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; padding-top: 44px; padding-bottom: calc(var(--navh) + 18px); }
.screen::-webkit-scrollbar { display: none; }
.screen.full { padding-bottom: 24px; }
.screen.flush { padding-top: 0; }
.anim-push { animation: push .32s cubic-bezier(.2,.8,.2,1); }
.anim-pop { animation: pop .28s cubic-bezier(.2,.8,.2,1); }
.anim-fade { animation: fade .22s ease; }
@keyframes push { from { transform: translateX(28%); opacity: .4 } to { transform: none; opacity: 1 } }
@keyframes pop { from { transform: translateX(-18%); opacity: .5 } to { transform: none; opacity: 1 } }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@media (prefers-reduced-motion: reduce) { .anim-push, .anim-pop, .anim-fade { animation: none; } }

.tour { width: 360px; flex: 0 0 auto; position: sticky; top: 28px; color: var(--desk-ink); }
.tour-fab { display: none; }
.guide-chip { display: none; height: 28px; padding: 0 10px; font-size: 12px; }

/* phone widths: the app is the page */
@media (max-width: 860px) {
  .stage { padding: 0; gap: 0; display: block; height: 100%; }
  .phone { position: fixed; inset: 0; width: auto; height: auto; border-radius: 0; box-shadow: none; }
  .statusbar { display: none; }
  .screen { padding-top: max(10px, env(safe-area-inset-top, 0px)); }
  .screen.flush { padding-top: 0; }
  .tour { display: none; position: fixed; inset: 0; width: auto; z-index: 100; background: var(--rice); overflow-y: auto;
    padding-block: 20px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .tour.open { display: block; }
  .guide-chip { display: inline-flex; }
  .tour-fab.unused { display: flex; position: fixed; z-index: 60; right: env(safe-area-inset-right, 0px); top: 38%;
    flex-direction: column; align-items: center; gap: 2px; width: 36px; padding: 8px 0 7px; border-radius: 12px 0 0 12px; background: var(--ink); color: var(--rice);
    font-size: 10px; font-weight: 600; box-shadow: var(--shadow); opacity: .92; }
}

/* ---------- type ---------- */
.h-xl { font-family: var(--f-display); font-weight: 400; font-size: 34px; line-height: 1.08; letter-spacing: -.01em; margin: 0; text-wrap: balance; color: var(--zaatar-ink, var(--ink)); }
.h-l { font-family: var(--f-display); font-weight: 400; font-size: 27px; line-height: 1.12; margin: 0; text-wrap: balance; }
.h-m { font-family: var(--f-display); font-weight: 400; font-size: 21px; line-height: 1.2; margin: 0; }
.h-s { font-family: var(--f-display); font-weight: 400; font-size: 17px; line-height: 1.25; margin: 0; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.small { font-size: 13px; } .tiny { font-size: 12px; }
.strong { font-weight: 600; }
.pad { padding-inline: 20px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-l { display: flex; flex-direction: column; gap: 22px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.sec { padding-inline: 20px; margin-top: 26px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.link { color: var(--zaatar); font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
:root[data-theme="dark"] .link { color: var(--mint-ink); }

/* ---------- icons ---------- */
.i { width: 20px; height: 20px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.i-s { width: 16px; height: 16px; } .i-l { width: 24px; height: 24px; } .i-xl { width: 30px; height: 30px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px; padding: 0 20px; border-radius: 16px;
  font-weight: 600; font-size: 16px; transition: transform .12s ease, filter .12s ease; text-align: center; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--saffron); color: var(--saffron-ink); }
.btn-primary:hover { filter: brightness(1.04); }
.btn-dark { background: var(--night); color: var(--cream); }
.btn-ghost { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost-dark { color: var(--cream); box-shadow: inset 0 0 0 1.5px rgba(246,241,228,.55); }
.btn-block { width: 100%; }
.btn-s { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.icon-btn.flat { box-shadow: none; background: transparent; }
.icon-btn.glass { background: rgba(255,255,255,.88); color: #18211D; backdrop-filter: blur(6px); }
.topbar { display: flex; align-items: center; gap: 8px; padding: 6px 12px 0 8px; min-height: 52px; }
.topbar .title { font-family: var(--f-display); font-size: 19px; }

/* ---------- chips, pills, badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 99px; background: var(--card);
  box-shadow: inset 0 0 0 1.5px var(--line); font-size: 14px; font-weight: 500; white-space: nowrap; }
.chip.on { background: var(--saffron); color: var(--saffron-ink); box-shadow: none; }
.chip.dark.on { background: var(--zaatar); color: var(--rice); }
.chip .i { width: 16px; height: 16px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 20px; margin-inline: -20px; flex-shrink: 0; }
.chips::-webkit-scrollbar { display: none; }
.seg { display: flex; background: var(--card); border-radius: 99px; padding: 4px; box-shadow: inset 0 0 0 1.5px var(--line); }
.seg button { flex: 1; height: 38px; border-radius: 99px; font-weight: 500; font-size: 14px; color: var(--muted); }
.seg button.on { background: var(--saffron); color: var(--saffron-ink); font-weight: 600; }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 8px; font-size: 12px; font-weight: 500;
  background: var(--line-2); color: var(--muted); white-space: nowrap; }
.badge .i { width: 13px; height: 13px; }
.badge.mine { background: var(--saffron-soft); color: #7A4B0B; }
:root[data-theme="dark"] .badge.mine { color: var(--saffron); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge.mine { color: var(--saffron); } }
.badge.ok { background: var(--mint); color: var(--mint-ink); }
.badge.warn { background: var(--sumac-soft); color: var(--sumac); }
.badge.ai { background: var(--sky); color: var(--sky-ink); }
.badge.fam { background: var(--rose); color: var(--rose-ink); }
.pill-need { color: var(--sumac); font-weight: 500; display: inline-flex; gap: 4px; align-items: center; }

/* ---------- avatars ---------- */
.av { width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 600; font-size: 14px; flex: 0 0 auto; position: relative; }
.av.saffron { background: var(--saffron-soft); color: #8A560C; } .av.zaatar { background: var(--mint); color: var(--mint-ink); }
.av.sky { background: var(--sky); color: var(--sky-ink); } .av.rose { background: var(--rose); color: var(--rose-ink); }
:root[data-theme="dark"] .av.saffron { color: var(--saffron); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .av.saffron { color: var(--saffron); } }
.av.l { width: 46px; height: 46px; font-size: 17px; }
.av.off { opacity: .35; }
.av .tick { position: absolute; inset-inline-end: -3px; bottom: -3px; width: 17px; height: 17px; border-radius: 50%; background: var(--mint-strong); color: #fff; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--rice); }
.av .tick .i { width: 11px; height: 11px; stroke-width: 3; }
.avs { display: flex; } .avs .av { margin-inline-start: -8px; box-shadow: 0 0 0 2px var(--card); } .avs .av:first-child { margin-inline-start: 0; }

/* ---------- cards ---------- */
.card { background: var(--card); border-radius: var(--r); box-shadow: 0 0 0 1px var(--line-2); }
.card.pad-c { padding: 16px; }
.plate { border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--card), 0 4px 12px rgba(24,33,29,.18); flex: 0 0 auto; background: var(--line-2); }
.ph { object-fit: cover; background: var(--line-2); }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--saffron-soft); border-inline-start: 4px solid var(--saffron); font-size: 14px; }
.note .i { color: #B07214; margin-top: 1px; }
.banner { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--mint); color: var(--mint-ink); font-size: 14px; }
.banner.warn { background: var(--sumac-soft); color: var(--sumac); }
.banner.sky { background: var(--sky); color: var(--sky-ink); }
.divider { height: 1px; background: var(--line); margin: 0; border: 0; }

/* ---------- list rows (recipes) ---------- */
.rrow { display: flex; gap: 14px; align-items: center; padding: 10px; border-radius: var(--r); background: var(--card); box-shadow: 0 0 0 1px var(--line-2); text-align: start; width: 100%; }
.rrow img { width: 84px; height: 84px; border-radius: 14px; }
.rrow .t { font-weight: 600; font-size: 16px; line-height: 1.25; }
.rrow .m { font-size: 13px; color: var(--muted); margin-top: 2px; }
.rrow .b { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.rrow .chev { color: var(--faint); }
.rhero { display: block; width: 100%; text-align: start; border-radius: var(--r-l); overflow: hidden; background: var(--card); box-shadow: 0 0 0 1px var(--line-2), var(--shadow); }
.rhero img { width: 100%; height: 190px; object-fit: cover; }
.rhero .body { padding: 14px 16px 16px; }

/* ---------- bottom nav ---------- */
.nav { position: absolute; left: 0; right: 0; bottom: 0; z-index: 20; height: 86px; padding: 0 10px 18px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(12px); box-shadow: 0 -1px 0 var(--line); }
.nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 500; color: var(--faint); height: 56px; justify-content: center; position: relative; }
.nav button.on { color: var(--zaatar); font-weight: 600; }
:root[data-theme="dark"] .nav button.on { color: var(--mint-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav button.on { color: var(--mint-ink); } }
.nav button.on::after { content: ''; position: absolute; bottom: -3px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.nav .i { width: 24px; height: 24px; }
.nav .navcook { align-self: start; margin-top: -22px; height: auto; color: var(--ink); }
.nav .navcook .disc { width: 62px; height: 62px; border-radius: 50%; background: var(--saffron); color: var(--saffron-ink); display: grid; place-items: center; box-shadow: 0 0 0 5px var(--card), 0 8px 18px rgba(176,114,20,.35); }
.nav .navcook .i { width: 28px; height: 28px; }
@media (max-width: 860px) { :root { --navh: calc(66px + max(12px, env(safe-area-inset-bottom, 0px))); } .nav { padding-bottom: max(12px, env(safe-area-inset-bottom, 0px)); height: var(--navh); padding-top: 4px; } .r-hero .tb { top: max(12px, env(safe-area-inset-top, 0px)); } }

/* ---------- sheets, toasts, overlays ---------- */
.scrim { position: absolute; inset: 0; z-index: 40; background: rgba(15,23,20,.45); animation: fade .2s ease; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 86%; overflow-y: auto; background: var(--rice); border-radius: 26px 26px 0 0;
  padding: 10px 20px 28px; animation: up .28s cubic-bezier(.2,.8,.2,1); box-shadow: var(--shadow-lg); }
.sheet .grab { width: 40px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 14px; }
@keyframes up { from { transform: translateY(40%); opacity: .3 } to { transform: none; opacity: 1 } }
@keyframes down { from { transform: translateY(-30%); opacity: 0 } to { transform: none; opacity: 1 } }
.toast { position: absolute; left: 16px; right: 16px; top: 52px; z-index: 50; display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 16px;
  background: var(--night); color: var(--cream); font-size: 14px; box-shadow: var(--shadow-lg); animation: down .25s ease; pointer-events: none; }
.toast .i { color: var(--saffron); }
@media (max-width: 860px) { .toast { top: max(12px, env(safe-area-inset-top, 0px)); } }

/* ---------- forms ---------- */
.field { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); font-size: 15px; resize: none; }
.field:focus { outline: none; border-color: var(--saffron); }
.check { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: var(--mint); color: var(--mint-strong); }
.check.no { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); color: transparent; }
.check.swap { background: var(--saffron-soft); color: #B07214; }
.check .i { width: 15px; height: 15px; stroke-width: 2.6; }
.box { width: 24px; height: 24px; border-radius: 7px; box-shadow: inset 0 0 0 1.8px var(--faint); display: grid; place-items: center; flex: 0 0 auto; color: transparent; }
.box.on { background: var(--mint-strong); box-shadow: none; color: #fff; }
.box .i { width: 15px; height: 15px; stroke-width: 2.8; }

/* ---------- TODAY ---------- */
.greet { padding: 8px 20px 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.hero { margin: 18px 16px 0; border-radius: 26px; background: var(--night); color: var(--cream); position: relative; overflow: hidden; min-height: 214px; }
.hero .photo { position: absolute; inset-inline-end: -92px; top: -4px; width: 228px; height: 228px; border-radius: 50%; object-fit: cover; box-shadow: -10px 10px 40px rgba(0,0,0,.35); }
.hero .copy { position: relative; padding: 22px 18px 20px; width: 72%; display: flex; flex-direction: column; gap: 12px; }
.hero h2 { font-family: var(--f-display); font-weight: 400; font-size: 29px; line-height: 1.08; margin: 0 0 4px; color: var(--cream); }
.hero .btn { min-height: 46px; font-size: 15px; justify-content: flex-start; padding: 0 14px; white-space: nowrap; }
.hero.ramadan { background: linear-gradient(160deg, #1F3D31, #13261E 70%); }
.mealrow { display: flex; gap: 14px; align-items: center; padding: 12px 14px; text-align: start; width: 100%; }
.mealrow + .mealrow { border-top: 1px solid var(--line-2); }
.mealrow .ico { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); color: var(--muted); flex: 0 0 auto; }
.mealrow img.plate { width: 54px; height: 54px; }
.memory { position: relative; display: block; width: 100%; border-radius: var(--r-l); overflow: hidden; text-align: start; }
.memory img { width: 100%; height: 220px; object-fit: cover; }
.memory .cap { position: absolute; inset: auto 0 0 0; padding: 40px 18px 16px; background: linear-gradient(transparent, rgba(10,16,13,.82)); color: #fff; }
.memory .cap .h-m { color: #fff; }
.mini { display: flex; gap: 12px; align-items: center; padding: 14px; text-align: start; width: 100%; }

/* ---------- CAPTURE ---------- */
.cap-photo { position: relative; width: 112px; height: 112px; border-radius: 18px; overflow: hidden; flex: 0 0 auto; box-shadow: var(--shadow); }
.cap-photo img { width: 100%; height: 100%; object-fit: cover; }
.scanline { position: absolute; left: 0; right: 0; height: 40%; background: linear-gradient(transparent, rgba(242,169,59,.45), transparent); animation: scan 1.1s ease-in-out infinite; }
@keyframes scan { from { transform: translateY(-100%) } to { transform: translateY(250%) } }
.ings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ing { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 8px 8px 8px 8px; border-radius: 16px; background: var(--mint); color: var(--ink); position: relative; text-align: start; }
.ing .pic { width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto; background: var(--card) center/cover no-repeat; box-shadow: 0 0 0 2px var(--card); }
.ing .pic.icon { background-size: 84%; }
.ing .nm { font-weight: 600; font-size: 14px; line-height: 1.2; overflow-wrap: break-word; min-width: 0; }
.ing .x { margin-inline-start: auto; color: var(--muted); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; flex: 0 0 auto; }
.ing.ask { grid-column: span 2; background: var(--card); box-shadow: inset 0 0 0 2px var(--saffron-line); }
.ing.new { animation: pop-in .35s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes pop-in { from { transform: scale(.7); opacity: 0 } to { transform: none; opacity: 1 } }
.soon { display: inline-block; margin-top: 3px; font-size: 11.5px; font-weight: 600; color: var(--mint-ink); background: var(--card); border-radius: 6px; padding: 1px 7px; }
.picker-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 10px; border-radius: 16px; background: var(--card); box-shadow: 0 0 0 1px var(--line-2); font-size: 12px; font-weight: 500; text-align: center; position: relative; line-height: 1.15; }
.pick img { width: 54px; height: 54px; }
.pick.on { background: var(--mint); box-shadow: 0 0 0 2px var(--mint-strong); }
.pick.on::after { content: '✓'; position: absolute; top: 5px; inset-inline-end: 7px; width: 18px; height: 18px; border-radius: 50%; background: var(--mint-strong); color: #fff; font-size: 11px; display: grid; place-items: center; font-weight: 700; }
.sticky-cta { position: sticky; bottom: -18px; padding: 14px 20px 24px; margin-inline: -20px; background: linear-gradient(transparent, var(--rice) 26%); margin-top: 8px; z-index: 4; }
.screen.full .sticky-cta { bottom: -24px; padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }

/* ---------- RECIPE ---------- */
.r-hero { position: relative; height: 330px; }
.r-hero img { width: 100%; height: 100%; object-fit: cover; }
.r-hero::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 120px; background: linear-gradient(rgba(10,16,13,.42), transparent); pointer-events: none; }
.r-hero .tb { z-index: 2; }
.r-hero .tb { position: absolute; top: 52px; left: 14px; right: 14px; display: flex; justify-content: space-between; }
.r-sheet { position: relative; margin-top: -28px; background: var(--rice); border-radius: 28px 28px 0 0; padding: 22px 20px 0; }
.meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--ink); font-size: 14.5px; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.stepper { display: inline-flex; align-items: center; border-radius: 99px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); height: 40px; }
.stepper button { width: 40px; height: 40px; display: grid; place-items: center; }
.stepper b { min-width: 26px; text-align: center; font-variant-numeric: tabular-nums; }
.ilist { display: grid; grid-template-columns: 1fr; gap: 2px; }
.iline { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: 15px; }
.iline .q { font-weight: 600; }
.iline img { width: 34px; height: 34px; flex: 0 0 auto; }
.iline .swapnote { display: block; font-size: 12.5px; color: #8A560C; }
:root[data-theme="dark"] .iline .swapnote { color: var(--saffron); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .iline .swapnote { color: var(--saffron); } }
.fam { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; }
.fam + .fam { border-top: 1px solid var(--line-2); }
.steps-prev { counter-reset: s; display: flex; flex-direction: column; gap: 12px; padding: 0; margin: 0; list-style: none; }
.steps-prev li { display: flex; gap: 12px; font-size: 15px; }
.steps-prev li::before { counter-increment: s; content: counter(s); width: 26px; height: 26px; border-radius: 50%; background: var(--line-2); display: grid; place-items: center; font-size: 13px; font-weight: 600; flex: 0 0 auto; }
.bottombar { position: sticky; bottom: -24px; z-index: 5; display: flex; gap: 10px; align-items: center; padding: 12px 16px calc(36px + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--rice) 92%, transparent); backdrop-filter: blur(10px); box-shadow: 0 -1px 0 var(--line); margin-top: 22px; }
.tok { font-weight: 600; background: var(--saffron-soft); border-radius: 6px; padding: 0 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* ---------- COOK MODE (always dark) ---------- */
.cook { position: absolute; inset: 0; background: var(--night); color: var(--cream); display: flex; flex-direction: column; padding-top: 50px; }
@media (max-width: 860px) { .cook { padding-top: max(14px, env(safe-area-inset-top, 0px)); } }
.cook .top { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; gap: 8px; }
.cook .icon-btn { background: rgba(246,241,228,.1); color: var(--cream); box-shadow: none; }
.cook .prog { display: flex; gap: 6px; padding: 14px 20px 0; }
.cook .prog i { flex: 1; height: 6px; border-radius: 9px; background: rgba(246,241,228,.18); }
.cook .prog i.on { background: var(--saffron); }
.cook .body { flex: 1 1 auto; overflow-y: auto; padding: 20px 22px 12px; display: flex; flex-direction: column; gap: 18px; scrollbar-width: none; }
.cook .body > * { flex-shrink: 0; }
.cook .stepno { font-size: 14px; font-weight: 600; color: rgba(246,241,228,.7); letter-spacing: .02em; }
.cook .say { font-family: var(--f-display); font-size: 31px; line-height: 1.16; margin: 0; text-wrap: pretty; }
.cook .say .tok { background: rgba(242,169,59,.2); color: #FFD796; }
.cook .uses { display: flex; flex-wrap: wrap; gap: 8px; }
.cook .uses span { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 6px; border-radius: 99px; background: var(--cream-2); color: #1F3D31; font-size: 14px; font-weight: 500; }
.cook .uses img { width: 26px; height: 26px; }
.cook .uses .mine { background: #FFE2A8; }
.cook .ring { position: relative; width: 210px; height: 210px; margin: 4px auto 0; display: grid; place-items: center; }
.cook .ring > svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.cook .ring .lab { text-align: center; }
.cook .ring .t { font-size: 46px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; }
.cook .ring button.pp { width: 50px; height: 50px; border-radius: 50%; background: var(--saffron); color: #1F3D31; display: grid; place-items: center; margin: 8px auto 0; }
.cook .startt { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 auto; height: 54px; padding: 0 22px; border-radius: 99px; background: rgba(242,169,59,.16); color: #FFD796; font-weight: 600; box-shadow: inset 0 0 0 1.5px rgba(242,169,59,.6); }
.cook .pills { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.cook .tpill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 99px; box-shadow: inset 0 0 0 1.5px rgba(246,241,228,.4); font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; }
.cook .tpill.done { background: var(--saffron); color: #1F3D31; box-shadow: none; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.05) } }
.cook .tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 12px; color: rgba(246,241,228,.88); font-size: 12.5px; }
.cook .tools button { display: flex; flex-direction: column; gap: 4px; align-items: center; padding: 6px 2px; border-radius: 12px; }
.cook .tools button .i { width: 20px; height: 20px; }
.cook .foot { display: flex; gap: 10px; padding: 10px 16px 22px; }
.cook .foot .back { width: 108px; flex: 0 0 auto; }
.cook .foot .next { flex: 1; min-height: 64px; font-size: 19px; border-radius: 20px; }
.cook .tapzone { position: absolute; inset-inline-end: 0; top: 120px; bottom: 120px; width: 34%; }
.cook .awake { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(246,241,228,.75); }
.cook .gather, .cook-sheet .gather { display: flex; flex-direction: column; gap: 6px; }
.cook .gather button, .cook-sheet .gather button { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 14px; text-align: start; background: rgba(246,241,228,.06); font-size: 15.5px; }
.cook .gather button.on, .cook-sheet .gather button.on { opacity: .55; text-decoration: line-through; }
.cook .gather img, .cook-sheet .gather img { width: 34px; height: 34px; }
.cook .gather .bx, .cook-sheet .gather .bx { width: 24px; height: 24px; border-radius: 7px; box-shadow: inset 0 0 0 1.8px rgba(246,241,228,.6); display: grid; place-items: center; flex: 0 0 auto; color: transparent; }
.cook .gather button.on .bx, .cook-sheet .gather button.on .bx { background: var(--saffron); box-shadow: none; color: #1F3D31; }
.sheet.cook-sheet { background: #183327; color: var(--cream); }
.sheet.cook-sheet .grab { background: rgba(246,241,228,.25); }
.sheet.cook-sheet .fam + .fam { border-color: rgba(246,241,228,.12); }

/* ---------- MADE IT / SHARE ---------- */
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 8px; border-radius: 2px; animation: fall 1.6s ease-in forwards; }
@keyframes fall { to { transform: translateY(860px) rotate(540deg); opacity: .2 } }
.polaroid { border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); position: relative; background: var(--line-2); }
.polaroid img { width: 100%; height: 300px; object-fit: cover; }
.polaroid .add { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; gap: 8px; color: var(--muted); background: var(--card-2); }
.rate { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rate button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 13.5px; font-weight: 500; }
.rate button.on { background: var(--saffron-soft); box-shadow: inset 0 0 0 2px var(--saffron); }
.rate .face { font-size: 26px; line-height: 1; }
.who { display: flex; gap: 8px; flex-wrap: wrap; }
.who button { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 99px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 14px; font-weight: 500; }
.who button.on { box-shadow: inset 0 0 0 2px var(--zaatar-3); background: var(--mint); }
.who .av { width: 28px; height: 28px; font-size: 12px; }
.sharecanvas { width: 100%; border-radius: 18px; box-shadow: var(--shadow); background: var(--line-2); }
.sharetabs { display: flex; gap: 8px; }
.sharebtns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sharebtns button { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; }
.sharebtns .disc { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--card); box-shadow: 0 0 0 1px var(--line); }
.sharebtns .wa .disc { background: #25D366; color: #fff; box-shadow: none; }
.sharebtns .ig .disc { background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF); color: #fff; box-shadow: none; }

/* ---------- JOURNAL ---------- */
.recap { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; padding: 14px 6px; }
.recap b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 28px; line-height: 1; color: var(--ink); }
.recap span { font-size: 12.5px; color: var(--muted); }
.recap > div + div { border-inline-start: 1px solid var(--line); }
.jgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.jcard { display: block; text-align: start; border-radius: 18px; overflow: hidden; background: var(--card); box-shadow: 0 0 0 1px var(--line-2); }
.jcard img { width: 100%; aspect-ratio: 4/4.4; object-fit: cover; }
.jcard .nop { aspect-ratio: 4/4.4; display: grid; place-items: center; background: var(--card-2); }
.jcard .nop img.plate { width: 96px; height: 96px; aspect-ratio: auto; }
.jcard .cap { padding: 10px 12px 12px; }
.jcard .d { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 6px; }
.jcard .n { font-family: var(--f-display); font-size: 16px; line-height: 1.2; margin-top: 2px; }
.jcard .q { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.3; }
.jcard.wide { grid-column: span 2; display: grid; grid-template-columns: 1.3fr 1fr; }
.jcard.wide img { aspect-ratio: auto; height: 100%; min-height: 150px; }
.today-tag { font-size: 11px; font-weight: 600; background: var(--saffron); color: var(--saffron-ink); border-radius: 99px; padding: 1px 8px; }
.hist { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin-inline: -20px; padding-inline: 20px; }
.hist > * { flex: 0 0 auto; }

/* ---------- misc ---------- */
.empty { text-align: center; padding: 28px 18px; color: var(--muted); }
.tilegrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 1/0.82; text-align: start; display: block; width: 100%; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile .lab { position: absolute; inset: auto 0 0 0; padding: 28px 12px 10px; background: linear-gradient(transparent, rgba(10,16,13,.8)); color: #fff; }
.tile .lab b { font-family: var(--f-display); font-weight: 400; font-size: 18px; display: block; line-height: 1.15; }
.tile .lab span { font-size: 12px; opacity: .9; }
.tile.on { box-shadow: 0 0 0 3px var(--saffron); }
.tile.on::after { content: '✓'; position: absolute; top: 8px; inset-inline-end: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--saffron); color: #1F3D31; display: grid; place-items: center; font-weight: 700; }
.prog-dots { display: flex; gap: 6px; } .prog-dots i { width: 22px; height: 5px; border-radius: 9px; background: var(--line); } .prog-dots i.on { background: var(--saffron); }
.kbd-hint { font-size: 12px; color: var(--faint); text-align: center; }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--saffron); animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg) } }
.steplist { display: flex; flex-direction: column; gap: 10px; }
.steplist .s { display: flex; gap: 12px; align-items: center; font-size: 15px; }
.steplist .s .dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); color: var(--faint); flex: 0 0 auto; }
.steplist .s.done .dot { background: var(--mint); color: var(--mint-strong); }
.steplist .s.now .dot { background: var(--saffron-soft); }
.flag { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--saffron-soft); box-shadow: inset 0 0 0 1.5px var(--saffron-line); }
.flag .qmark { width: 24px; height: 24px; border-radius: 50%; background: var(--saffron); color: #1F3D31; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: 0 0 auto; }
.flag.ok { background: var(--mint); box-shadow: none; }
.flag.ok .qmark { background: var(--mint-strong); color: #fff; }
.handcard { border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.handcard img { width: 100%; height: 260px; object-fit: cover; object-position: center 30%; }

/* ---------- tour panel ---------- */
.tour h1 { font-family: var(--f-display); font-weight: 400; font-size: 30px; margin: 0; line-height: 1.1; color: var(--desk-ink); }
.tour .lead { font-size: 14px; line-height: 1.5; margin: 8px 0 0; opacity: .85; }
.tour .box-t { margin-top: 18px; background: var(--card); color: var(--ink); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); }
.tour .tl { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.tour .ti { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 10px; text-align: start; width: 100%; font-size: 14px; }
.tour .ti:hover { background: var(--line-2); }
.tour .ti .ck { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.6px var(--line); display: grid; place-items: center; flex: 0 0 auto; color: transparent; }
.tour .ti.done .ck { background: var(--mint-strong); box-shadow: none; color: #fff; }
.tour .ti.done .tx { color: var(--muted); }
.tour .ti .go { margin-inline-start: auto; font-size: 12px; color: var(--faint); }
.tour .bar { height: 6px; border-radius: 9px; background: var(--line-2); overflow: hidden; margin-top: 8px; }
.tour .bar i { display: block; height: 100%; background: var(--saffron); transition: width .3s ease; }
.tour .ctl { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tour .close-tour { display: none; }
@media (max-width: 860px) { .tour .close-tour { display: inline-flex; } }

/* ---------- Arabic (right to left) ---------- */
.lang-ar { --f-display: 'El Messiri', 'Noto Naskh Arabic', Georgia, serif; --f-ui: 'Rubik', 'Noto Naskh Arabic', 'Segoe UI', system-ui, sans-serif; }
.lang-ar, .lang-ar * { letter-spacing: 0 !important; } /* letter-spacing breaks Arabic joining */
.lang-ar .eyebrow { text-transform: none; font-size: 13px; }
.lang-ar .h-xl { line-height: 1.3; } .lang-ar .h-l { line-height: 1.35; } .lang-ar .h-m, .lang-ar .h-s { line-height: 1.4; }
.lang-ar .hero h2 { line-height: 1.25; }
.lang-ar .cook .say { line-height: 1.5; font-size: 29px; }
.lang-ar .tour h1 { line-height: 1.3; }
[dir="rtl"] .i.flip { transform: scaleX(-1); }
.alt-name { color: var(--muted); font-size: 18px; margin-top: 4px; }
.lang-ar .alt-name { font-family: var(--f-ui); font-size: 15px; }
.langsw { display: inline-flex; background: var(--line-2); border-radius: 99px; padding: 3px; gap: 2px; }
.langsw button { height: 30px; padding: 0 12px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--muted); }
.langsw button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }

/* ---------- tester feedback tab ---------- */
.fb-tab { position: absolute; z-index: 25; inset-inline-end: 0; top: 52%; display: flex; flex-direction: column; align-items: center; gap: 3px;
  width: 38px; padding: 9px 0 8px; border-radius: 12px 0 0 12px; background: var(--saffron); color: var(--saffron-ink); font-size: 11px; font-weight: 700;
  box-shadow: 0 4px 14px rgba(0,0,0,.18); opacity: .94; }
[dir="rtl"] .fb-tab { border-radius: 0 12px 12px 0; }
.fb-tab.dim { opacity: .55; }
@media (max-width: 860px) { .fb-tab { position: fixed; } }
