/* Apple-style tokens: linen 60 / navy 30 / amber 10. Text on amber is always navy. See docs/design.md. */
:root {
  --linen: #f1ece3; --linen-2: #e9e2d5; --linen-3: #ded5c4; --card: #fbf9f5; --white: #fff;
  --navy: #14213d; --navy-2: #24324f; --ink: #14213d; --ink-2: #3a4562; --hair: rgba(20, 33, 61, .10);
  --amber: #ffb020; --amber-soft: #fff1cf; --amber-ink: #8a5a00; --on-amber: #14213d;
  --green: #1a6b43; --green-soft: #e1efe6; --red: #b3261e; --red-soft: #fbe4e2;
  --r-sm: 12px; --r-md: 16px; --r-lg: 22px; --r-xl: 28px;
  --shadow-1: 0 1px 2px rgba(20, 33, 61, .06), 0 2px 8px rgba(20, 33, 61, .05);
  --shadow-2: 0 2px 6px rgba(20, 33, 61, .08), 0 12px 32px rgba(20, 33, 61, .12);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Arabic", "Segoe UI", "Noto Sans Arabic", Tahoma, system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--linen); overflow-x: clip; }
/* Nothing may push the page sideways (a slide transition in RTL did, and phones then zoomed the whole app out). */
body, #app { overflow-x: clip; }
body { font: 400 1rem/1.5 var(--font); color: var(--ink); background: var(--linen); -webkit-font-smoothing: antialiased; min-height: 100dvh; -webkit-tap-highlight-color: transparent; }
[dir=rtl] body { line-height: 1.65; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; box-shadow: 0 0 0 5px var(--navy); border-radius: 6px; }
[hidden] { display: none !important; }
/* Titles get programmatic focus on navigation (screen readers); no ring for that. */
h1[tabindex="-1"]:focus { outline: none; box-shadow: none; }
.ic { width: 22px; height: 22px; flex: none; }
.ic.xs { width: 14px; height: 14px; vertical-align: -2px; } .ic.sm { width: 16px; height: 16px; }
.ic.dim { opacity: .45; }
[dir=rtl] .ic.flip { transform: scaleX(-1); }
.muted { color: var(--ink-2); } .small { font-size: .8125rem; } .center { text-align: center; } .grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; } .between { justify-content: space-between; } .gap { gap: 10px; } .gap-s { gap: 6px; } .center-row { justify-content: center; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.pad { padding: 16px 20px; } .pad-l { padding: 18px; }

/* boot */
.boot { min-height: 100dvh; display: grid; place-items: center; }
.boot-mark { width: 56px; height: 56px; border-radius: 50%; background: radial-gradient(circle at 50% 45%, var(--card) 0 45%, var(--linen-3) 46% 60%, transparent 61%); box-shadow: inset 0 0 0 4px var(--navy); }

/* layout */
.view { max-width: 560px; margin: 0 auto; min-height: 100dvh; padding-bottom: calc(110px + var(--safe-b)); }
.view.bare { padding-bottom: 24px; }
.screen { padding-top: calc(var(--safe-t) + 8px); }
.section { padding: 0 20px; }
.navbar { padding: 6px 20px 10px; }
.navbar.compact { padding-bottom: 4px; }
.nav-row { min-height: 44px; }
.large-title { font-size: 2rem; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }
.title-1 { font-size: 1.75rem; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }
.title-2 { font-size: 1.5rem; line-height: 1.2; font-weight: 800; }
.title-3 { font-size: 1.0625rem; font-weight: 700; margin-bottom: 6px; }
[dir=rtl] .large-title, [dir=rtl] .title-1, [dir=rtl] .title-2 { letter-spacing: 0; line-height: 1.35; }
.subtitle { color: var(--ink); font-size: .9375rem; margin-top: 2px; }
.lead { color: var(--ink); font-size: 1rem; line-height: 1.55; margin-top: 6px; }
.wordmark { display: flex; gap: 8px; align-items: baseline; font-weight: 800; font-size: 1.125rem; color: var(--navy); }
.wordmark span[lang=ar] { font-size: 1.25rem; }
.wordmark i { font-style: normal; color: var(--amber-ink); }
.eyebrow { font-size: .8125rem; font-weight: 700; color: var(--amber-ink); letter-spacing: .02em; text-transform: uppercase; }
[dir=rtl] .wordmark { display: flex; gap: 8px; align-items: baseline; font-weight: 800; font-size: 1.125rem; color: var(--navy); }
.wordmark span[lang=ar] { font-size: 1.25rem; }
.wordmark i { font-style: normal; color: var(--amber-ink); }
.eyebrow { letter-spacing: 0; text-transform: none; }
.sec-title { font-size: .8125rem; font-weight: 700; color: var(--ink-2); margin: 20px 4px 8px; }
.card { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.card.empty { padding: 22px; text-align: center; display: grid; gap: 12px; justify-items: center; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 20px; border-radius: var(--r-md); border: 0; font-weight: 700; font-size: 1.0625rem; cursor: pointer; transition: transform .1s var(--ease), background .2s; text-align: center; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.big { width: 100%; }
.btn.sm { min-height: 40px; font-size: .9375rem; padding: 0 14px; border-radius: var(--r-sm); }
.btn.primary { background: var(--navy); color: var(--linen); }
.btn.primary:active { background: var(--navy-2); }
.btn.amber { background: var(--amber); color: var(--on-amber); }
.btn.ghost { background: rgba(20, 33, 61, .07); color: var(--navy); }
.btn.danger { background: var(--red); color: #fff; }
.btn.glass { background: rgba(251, 249, 245, .82); backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%); box-shadow: var(--shadow-1); color: var(--navy); }
.danger-text { color: var(--red) !important; }
.link, .link-btn { color: var(--navy); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; cursor: pointer; padding: 8px 4px; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.icon-btn, .round { width: 40px; height: 40px; min-width: 40px; border-radius: 50%; border: 0; display: inline-grid; place-items: center; background: rgba(20, 33, 61, .07); color: var(--navy); cursor: pointer; }
.round.sm { width: 32px; height: 32px; min-width: 32px; }
.round .ic, .icon-btn .ic { width: 20px; height: 20px; }
.icon-btn:active, .round:active { transform: scale(.94); }
.glass { background: rgba(251, 249, 245, .72); backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%); }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border-radius: 999px; font-size: .8125rem; font-weight: 600; background: rgba(20, 33, 61, .07); color: var(--navy); }
.chip.big { min-height: 44px; font-size: 1rem; }
.points-chip { background: var(--amber-soft); color: var(--amber-ink); }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(20, 33, 61, .07); white-space: nowrap; }
.pill.s-placed, .pill.s-accepted { background: var(--amber-soft); color: var(--amber-ink); }
.pill.s-shopping, .pill.s-bought, .pill.s-out_for_delivery { background: #e3e8f4; color: var(--navy); }
.pill.s-delivered { background: var(--green-soft); color: var(--green); }
.pill.s-cancelled { background: var(--red-soft); color: var(--red); }
.badge-soft { font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(20, 33, 61, .07); color: var(--ink-2); }
.badge-amber { font-size: .6875rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--amber-soft); color: var(--amber-ink); white-space: nowrap; }
.badge-red { font-size: .6875rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--red-soft); color: var(--red); }
.tag-home { font-size: .6875rem; font-weight: 700; color: var(--green); background: var(--green-soft); padding: 2px 7px; border-radius: 999px; }
.warn { color: var(--red); font-weight: 600; margin-top: 8px; }
.lock-note { margin: 4px 20px 0; color: var(--ink); }
.note-box { display: flex; gap: 8px; align-items: flex-start; font-size: .875rem; color: var(--ink-2); background: var(--card); border-radius: var(--r-md); padding: 12px 14px; margin-top: 16px; }

/* forms */
.form { padding: 18px; display: grid; gap: 14px; }
.form.tight { gap: 10px; padding: 14px; }
.field { display: grid; gap: 6px; flex: 1; min-width: 0; }
.field > span { font-size: .8125rem; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid rgba(20, 33, 61, .14); background: var(--white); font-size: 1rem; }
.field textarea { min-height: 0; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(255, 176, 32, .55); }
.form-error { color: var(--red); font-weight: 600; font-size: .9375rem; }
.chk-row { display: flex; gap: 10px; align-items: center; min-height: 44px; font-size: .9375rem; }
.chk-row input { width: 22px; height: 22px; accent-color: var(--navy); }
.search { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; border-radius: var(--r-sm); background: rgba(20, 33, 61, .07); color: var(--ink-2); }
.search input { flex: 1; border: 0; background: none; min-height: 46px; font-size: 1rem; color: var(--ink); }
.search input:focus { outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(20, 33, 61, .14); background: var(--card); font-weight: 600; font-size: .9375rem; cursor: pointer; transition: background .15s, transform .1s; }
.chip-btn:active { transform: scale(.96); }
.chip-btn.on { background: var(--navy); color: var(--linen); border-color: var(--navy); }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper-label { flex: 1; font-weight: 600; font-size: 1.0625rem; }
.stepper-val { min-width: 32px; text-align: center; font-size: 1.375rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.seg { display: inline-flex; background: rgba(20, 33, 61, .07); border-radius: 10px; padding: 2px; }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 8px; font-size: .875rem; font-weight: 600; color: var(--ink-2); cursor: pointer; min-height: 34px; }
.seg button.on { background: var(--white); color: var(--navy); box-shadow: 0 1px 3px rgba(20, 33, 61, .12); }
.seg.wide { display: flex; margin-top: 18px; } .seg.wide button { flex: 1; }
.list { display: grid; gap: 8px; }
.radio { width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(20, 33, 61, .25); flex: none; }
.on > .radio, .on .radio { border: 7px solid var(--navy); }
.choice, .store-row, .swap-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: var(--r-md); border: 2px solid transparent; background: var(--card); box-shadow: var(--shadow-1); text-align: start; cursor: pointer; min-height: 64px; }
.choice { flex-wrap: wrap; } .choice b { flex: 1; } .choice small { order: 3; flex-basis: 100%; }
.choice.on, .store-row.on { border-color: var(--navy); }
.store-row small, .swap-opt small { display: block; }
.logo { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: .875rem; color: var(--linen); background: var(--navy-2); text-transform: capitalize; flex: none; }
.radio-row { display: flex; gap: 12px; align-items: center; min-height: 56px; padding: 8px 16px; border-bottom: .5px solid var(--hair); cursor: pointer; }
.radio-row input { width: 20px; height: 20px; accent-color: var(--navy); }
.radio-row small { display: block; }

/* tab bar (floating translucent pill) */
.tabbar { position: fixed; inset-inline: 12px; bottom: calc(14px + var(--safe-b)); max-width: 536px; margin: 0 auto; height: 64px; border-radius: 32px; display: flex; justify-content: space-around; align-items: center;
  background: rgba(251, 249, 245, .78); backdrop-filter: blur(20px) saturate(180%); -webkit-backdrop-filter: blur(20px) saturate(180%); box-shadow: 0 0 0 .5px rgba(20, 33, 61, .12), 0 8px 24px rgba(20, 33, 61, .12); z-index: 20; }
.tab { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .6875rem; font-weight: 600; color: var(--ink-2); min-width: 60px; min-height: 52px; justify-content: center; }
.tab .ic { width: 24px; height: 24px; }
.tab.on { color: var(--navy); }
.tab .pip { width: 5px; height: 5px; border-radius: 50%; }
.tab.on .pip { background: var(--amber); }

/* welcome / auth / onboarding */
.welcome { padding: calc(var(--safe-t) + 12px) 24px 32px; display: flex; flex-direction: column; gap: 14px; min-height: 100dvh; }
.welcome-top { display: flex; justify-content: flex-end; }
.welcome-art { display: grid; place-items: center; padding: 24px 0 8px; }
.plate { width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle at 50% 45%, var(--card) 0 52%, var(--linen-2) 53% 66%, var(--card) 67%); box-shadow: var(--shadow-2); display: grid; place-items: center; }
.plate span { width: 58px; height: 58px; border-radius: 50%; background: var(--amber); box-shadow: 30px -18px 0 -14px var(--navy), -26px 16px 0 -16px var(--green); }
.plate.spin { animation: spin 2.4s linear infinite; width: 110px; height: 110px; } .plate.spin span { width: 40px; height: 40px; }
@keyframes spin { to { transform: rotate(360deg); } }
.welcome .stack { margin-top: auto; }
.auth { display: grid; gap: 18px; }
.onboarding { display: flex; flex-direction: column; min-height: 100dvh; padding-bottom: 12px; }
.ob-head { padding: 4px 20px 10px; }
.progress { display: flex; gap: 5px; margin: 10px 0 14px; }
.progress b { flex: 1; height: 4px; border-radius: 2px; background: rgba(20, 33, 61, .15); }
.progress b.on { background: var(--navy); }
.ob-body { padding: 0 20px; flex: 1; }
.ob-foot { position: sticky; bottom: 0; padding: 12px 20px calc(12px + var(--safe-b)); background: linear-gradient(to top, var(--linen) 75%, rgba(241, 236, 227, 0)); display: grid; gap: 6px; z-index: 5; }
.map-wrap { position: relative; height: 300px; border-radius: var(--r-lg); overflow: hidden; background: #e8e1d3; margin-bottom: 12px; box-shadow: var(--shadow-1); }
.map-wrap .map, .map-wrap .maplibregl-map { position: absolute; inset: 0; }
.map-pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); color: var(--navy); pointer-events: none; z-index: 2; }
.map-pin .ic { width: 40px; height: 40px; fill: var(--amber); stroke: var(--navy); stroke-width: 1.6; filter: drop-shadow(0 3px 4px rgba(20, 33, 61, .3)); }
.locate { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 3; }
.map-msg { position: absolute; inset: auto 12px 64px; background: var(--card); padding: 10px; border-radius: var(--r-sm); z-index: 3; }
.week-pick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day-pick { display: grid; justify-items: center; gap: 1px; padding: 10px 0; border-radius: var(--r-sm); border: 0; background: rgba(20, 33, 61, .06); cursor: pointer; font-size: .75rem; font-weight: 600; color: var(--ink-2); min-height: 72px; }
.day-pick b { font-size: 1.25rem; color: var(--navy); } .day-pick small { font-size: .6875rem; }
.day-pick.on { background: var(--navy); color: #cfd3dc; } .day-pick.on b { color: var(--linen); }
.amount-field { margin-top: 14px; }
.building { min-height: 70dvh; display: grid; place-content: center; justify-items: center; gap: 22px; text-align: center; }

/* plan */
.week { display: flex; gap: 6px; padding: 4px 20px 6px; position: sticky; top: 0; z-index: 6; background: linear-gradient(var(--linen) 80%, rgba(241, 236, 227, 0)); }
.day { flex: 1; height: 64px; border-radius: var(--r-sm); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; background: rgba(20, 33, 61, .05); font-size: .75rem; font-weight: 600; color: var(--ink-2); }
.day b { font-size: 1.125rem; color: var(--navy); }
.day .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--amber); }
.day.off { opacity: .5; } .day.off .dot { background: transparent; }
.day.past { opacity: .35; }
.day-sec { scroll-margin-top: 84px; }
.meal { display: flex; gap: 12px; padding: 10px; align-items: center; margin-bottom: 10px; position: relative; transition: opacity .2s; }
.meal.busy { opacity: .5; }
.meal.done .thumb { opacity: .55; filter: saturate(.6); }
.meal-link { display: flex; gap: 12px; align-items: center; flex: 1; min-width: 0; }
.food { object-fit: cover; background: linear-gradient(135deg, #c98b4e, #8a5a33); }
.food.ph { background: radial-gradient(circle at 50% 50%, var(--card) 0 40%, var(--linen-3) 41% 55%, #c98b4e 56%); }
.food.broken { background: radial-gradient(circle at 50% 50%, var(--card) 0 40%, var(--linen-3) 41% 55%, #c98b4e 56%); color: transparent; }
.thumb { width: 84px; height: 84px; border-radius: var(--r-md); flex: none; }
.thumb.sm { width: 64px; height: 64px; }
.info { display: flex; flex-direction: column; min-width: 0; }
.slot { font-size: .75rem; font-weight: 700; color: var(--amber-ink); }
.info .t { font-size: 1.0625rem; font-weight: 700; margin-top: 2px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.info .d { font-size: .8125rem; color: var(--ink-2); margin-top: 3px; display: flex; gap: 8px; align-items: center; }
.swap { flex: none; }
.summary { display: flex; gap: 10px; margin-top: 8px; }
.summary .card { flex: 1; padding: 12px 14px; display: grid; }
.summary .k { font-size: .75rem; color: var(--ink-2); font-weight: 600; }
.summary .v { font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.has-cta { padding-bottom: 80px; }
.cta-bar { position: fixed; inset-inline: 20px; bottom: calc(92px + var(--safe-b)); max-width: 520px; margin: 0 auto; z-index: 15; }
.view.bare .cta-bar, .view:not(:has(+ .tabbar)) .cta-bar { bottom: calc(16px + var(--safe-b)); }
.cta-bar .btn { box-shadow: var(--shadow-2); }
.days-grid { display: grid; gap: 4px; margin: 12px 0; max-height: 52dvh; overflow: auto; }
.day-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: .5px solid var(--hair); }
.day-row .dname { width: 104px; flex: none; display: grid; } .day-row.past { opacity: .45; }
.slot-toggles { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.mini-chip { min-height: 36px; padding: 0 9px; border-radius: 999px; border: 1px solid rgba(20, 33, 61, .14); background: var(--card); font-size: .8125rem; font-weight: 600; cursor: pointer; }
.mini-chip.on { background: var(--navy); color: var(--linen); border-color: var(--navy); }
.swap-opt .delta { font-weight: 700; font-size: .875rem; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--red); } .delta.down { color: var(--green); }

/* sheet */
.scrim { position: fixed; inset: 0; background: rgba(20, 33, 61, .35); z-index: 40; }
.sheet { position: fixed; inset-inline: 0; bottom: 0; max-width: 560px; margin: 0 auto; background: var(--linen); border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 8px 20px calc(20px + var(--safe-b)); box-shadow: 0 -8px 30px rgba(20, 33, 61, .18); z-index: 41; max-height: 92dvh; overflow: auto; will-change: transform; }
.grabber { width: 44px; height: 22px; margin: 0 auto 6px; cursor: grab; touch-action: none; position: relative; }
.grabber::after { content: ""; position: absolute; left: 4px; right: 4px; top: 8px; height: 5px; border-radius: 3px; background: rgba(20, 33, 61, .2); }
.sheet-body { display: grid; gap: 14px; }
.sheet-msg { font-size: 1.0625rem; }
.toast { position: fixed; left: 50%; top: calc(var(--safe-t) + 14px); transform: translate(-50%, -150%); background: var(--navy); color: var(--linen); padding: 12px 18px; border-radius: 999px; font-weight: 600; z-index: 60; transition: transform .35s var(--ease); max-width: 90vw; text-align: center; box-shadow: var(--shadow-2); }
.toast.show { transform: translate(-50%, 0); }
.toast.error { background: var(--red); }

/* home */
.tips { display: grid; gap: 8px; margin-top: 4px; }
.tip { display: flex; gap: 10px; align-items: flex-start; background: #e3e8f4; border-radius: var(--r-md); padding: 12px 14px; font-size: .9375rem; }
.order-card { display: grid; gap: 4px; padding: 14px 16px; margin-bottom: 8px; }
.status-bar { display: flex; gap: 4px; margin-top: 8px; } .status-bar i { flex: 1; height: 4px; border-radius: 2px; background: rgba(20, 33, 61, .12); } .status-bar i.on { background: var(--navy); }
.progress-card { display: flex; gap: 14px; align-items: center; padding: 14px 16px; margin-top: 14px; }
.ring { --p: 0; width: 56px; height: 56px; border-radius: 50%; background: conic-gradient(var(--amber) calc(var(--p) * 1%), rgba(20, 33, 61, .1) 0); display: grid; place-items: center; flex: none; }
.ring span { width: 44px; height: 44px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-size: .8125rem; font-weight: 800; }

/* kitchen */
.filters-row { margin: 10px 0 0; overflow-x: auto; }
.filters-row .chips { flex-wrap: nowrap; }
.chip-btn { white-space: nowrap; }
.hscroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hscroll > * { scroll-snap-align: start; }
.rgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.rcard, .hcard { display: grid; gap: 4px; }
.rcard b, .hcard b { font-size: .9375rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile { width: 100%; aspect-ratio: 1; border-radius: var(--r-md); }
.hcard { width: 120px; flex: none; } .tile.sm { width: 120px; height: 120px; }

/* lists (Settings style) */
.list-card { overflow: hidden; margin-bottom: 14px; }
.row-link { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 16px; border-bottom: .5px solid var(--hair); width: 100%; background: none; border-inline: 0; border-top: 0; text-align: start; cursor: pointer; }
.row-link:last-child { border-bottom: 0; }
.row-link small { display: block; }
.row-link .end { display: grid; justify-items: end; gap: 2px; }
.me { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 14px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--navy); color: var(--linen); display: grid; place-items: center; font-size: 1.375rem; font-weight: 800; }
.points-card { display: flex; gap: 12px; align-items: center; padding: 14px 16px; margin: 8px 0; color: var(--amber-ink); }
.points-card b { color: var(--ink); display: block; }
.points-hero { display: grid; justify-items: center; gap: 6px; padding: 24px; color: var(--amber-ink); }
.points-hero b { font-size: 1.75rem; color: var(--ink); }
details summary { cursor: pointer; font-weight: 700; display: flex; gap: 8px; align-items: center; min-height: 44px; }

/* meal detail */
.detail-screen { padding-top: 0; }
.hero { position: relative; height: 320px; }
.hero-img { width: 100%; height: 100%; object-fit: cover; }
.hero-top { position: absolute; top: calc(var(--safe-t) + 12px); inset-inline: 16px; display: flex; justify-content: space-between; }
.detail { position: relative; margin-top: -28px; background: var(--linen); border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 20px 20px 0; }
.rating { color: var(--ink-2); font-size: .875rem; margin-top: 4px; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.stars-static { color: var(--amber-ink); }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.fact { background: var(--card); border-radius: var(--r-md); padding: 10px 6px; text-align: center; box-shadow: var(--shadow-1); display: grid; gap: 2px; }
.fact .k { font-size: .6875rem; color: var(--ink-2); font-weight: 600; }
.fact b { font-size: .9375rem; font-weight: 800; } .fact b.small { font-size: .75rem; font-weight: 700; }
.allergen { font-size: .8125rem; color: var(--red); font-weight: 600; margin-top: 10px; }
.tabpane { margin-top: 12px; }
.ing { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: .5px solid var(--hair); font-size: .9375rem; min-height: 48px; }
.ing:last-child { border-bottom: 0; } .ing.opt { opacity: .7; }
.ing .q { color: var(--ink-2); font-size: .875rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(20, 33, 61, .25); background: none; display: grid; place-items: center; cursor: pointer; flex: none; color: transparent; }
.check .ic { width: 15px; height: 15px; stroke-width: 3; }
.check.on { background: var(--green); border-color: var(--green); color: #fff; }
.steps { list-style: none; display: grid; gap: 10px; margin-bottom: 14px; }
.step { display: flex; gap: 12px; background: var(--card); border-radius: var(--r-md); padding: 14px; box-shadow: var(--shadow-1); line-height: 1.55; }
.step .n { width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: var(--linen); display: grid; place-items: center; font-weight: 800; font-size: .875rem; flex: none; }
.step-meta { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.cooked-row { display: flex; gap: 10px; margin-top: 18px; }
.done-card { display: flex; align-items: center; gap: 8px; padding: 12px 16px; flex: 1; color: var(--green); }
.done-card b { color: var(--ink); } .done-card .link-btn { margin-inline-start: auto; }
.source { margin: 18px 0 8px; } .source a { text-decoration: underline; }
.stars-input { display: flex; gap: 6px; justify-content: center; }
.star { width: 48px; height: 48px; border: 0; background: none; color: rgba(20, 33, 61, .25); cursor: pointer; }
.star .ic { width: 36px; height: 36px; } .star.on { color: var(--amber-ink); } .star.on .ic { fill: var(--amber); }

/* cooking mode */
.cook { min-height: 100dvh; display: flex; flex-direction: column; }
.cook-track { flex: 1; display: grid; align-content: center; padding: 0 24px; }
.cook-step { display: grid; gap: 18px; }
.cook-text { font-size: 1.5rem; line-height: 1.45; font-weight: 700; }
.cook-foot { padding-bottom: calc(16px + var(--safe-b)); }

/* order */
.lines { overflow: hidden; }
.line { padding: 12px 14px; border-bottom: .5px solid var(--hair); }
.line:last-child { border-bottom: 0; }
.line-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.line-h .price { margin-inline-start: auto; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.split { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.split span { font-size: .75rem; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: rgba(20, 33, 61, .05); color: var(--ink-2); }
.split span b { color: var(--navy); } .split .extra { background: var(--amber-soft); color: var(--amber-ink); }
.store-tip { display: flex; gap: 6px; font-size: .75rem; color: var(--ink-2); margin-top: 7px; line-height: 1.45; }
.slots { padding: 2px 2px 8px; }
.slotc { flex: none; width: 112px; min-height: 64px; padding: 10px; border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow-1); border: 2px solid transparent; font-size: .8125rem; text-align: start; cursor: pointer; }
.slotc b { display: block; font-size: .9375rem; } .slotc.on { border-color: var(--navy); } .slotc:disabled { opacity: .4; }
.totals { padding: 14px 16px; margin-top: 14px; font-size: .9375rem; display: grid; gap: 6px; }
.totals .r { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.totals .r.big { font-size: 1.125rem; font-weight: 800; padding-top: 8px; border-top: .5px solid var(--hair); }
.events { list-style: none; padding: 8px 16px; display: grid; } .events li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: .5px solid var(--hair); } .events li:last-child { border-bottom: 0; }
.center-col { min-height: 60dvh; display: grid; place-content: center; justify-items: center; gap: 16px; text-align: center; }

@media (min-width: 700px) {
  .rgrid { grid-template-columns: repeat(3, 1fr); }
  .view { padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .tabbar, .glass, .btn.glass { background: var(--card); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .card, .chip-btn, .day-pick { border: 1px solid var(--navy); }
}
.map-wrap .maplibregl-ctrl-attrib { font-size: 10px; line-height: 1.3; max-width: 70%; }
