/* GOOLI — Just tell me. */
/* GOOLI (قلي) — Just tell me. Brand: Night, Voice Coral, Thought Lilac, Cream, Peach, Butter. */
:root {
  --night: #24102A; --coral: #FF5A47; --lilac: #9D7BF5; --cream: #FFF5EC; --peach: #FFC2B0; --butter: #FFC845;
  --bg: var(--cream);
  --surface: #FFFFFF;
  --surface-2: #FCEBE1;        /* soft peach surface */
  --ink: var(--night);
  --ink-2: #4A3550;
  --muted: #86758A;
  --line: #F0DED3;
  --accent: var(--night);      /* primary actions: Night + Cream */
  --accent-press: #3A2342;
  --accent-ink: var(--cream);
  --accent-soft: #FFE6DC;
  --saffron: var(--coral);     /* highlights: voice, cart, add buttons (Night text on coral) */
  --saffron-ink: var(--night);
  --saffron-soft: #FFE1DB;
  --lilac-ink: #7A5FD6;        /* lilac as small text on cream */
  --success: #2E7D4F;
  --danger: #C63A2B;
  --shadow-sm: 0 1px 2px rgba(36, 16, 42, .05), 0 2px 8px rgba(36, 16, 42, .06);
  --shadow: 0 2px 6px rgba(36, 16, 42, .05), 0 14px 34px rgba(36, 16, 42, .10);
  --shadow-accent: 0 12px 30px rgba(36, 16, 42, .28);
  --shadow-coral: 0 14px 34px rgba(255, 90, 71, .38);
  --r-sm: 12px;
  --r: 20px;
  --r-lg: 28px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--night); --surface: #341C3B; --surface-2: #3E2546; --ink: var(--cream); --ink-2: #E9D9E2; --muted: #B7A3B6;
    --line: #4A2F52; --accent: var(--coral); --accent-press: #FF7462; --accent-ink: var(--night); --accent-soft: #4A2238;
    --saffron-soft: #4A2238; --lilac-ink: #B9A1FA; --success: #7FCFA2; --danger: #FF8A7A;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.35); --shadow: 0 14px 34px rgba(0,0,0,.45); --shadow-accent: 0 12px 30px rgba(255,90,71,.25);
  }
}
:root[data-theme="dark"] {
  --bg: var(--night); --surface: #341C3B; --surface-2: #3E2546; --ink: var(--cream); --ink-2: #E9D9E2; --muted: #B7A3B6;
  --line: #4A2F52; --accent: var(--coral); --accent-press: #FF7462; --accent-ink: var(--night); --accent-soft: #4A2238;
  --saffron-soft: #4A2238; --lilac-ink: #B9A1FA; --success: #7FCFA2; --danger: #FF8A7A;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.35); --shadow: 0 14px 34px rgba(0,0,0,.45); --shadow-accent: 0 12px 30px rgba(255,90,71,.25);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: "Outfit", "Readex Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
[lang="ar"] body { line-height: 1.8; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: 14px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 20px; border-radius: var(--r-sm); font-weight: 600; transition: transform .15s var(--ease), background .15s; }
.btn:active { transform: scale(.98); }
.btn.block { width: 100%; }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.btn.primary:hover { background: var(--accent-press); }
.btn.primary:disabled { opacity: .6; cursor: default; }
.btn.soft { background: var(--accent-soft); color: var(--accent); }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.danger-text { color: var(--danger); }
.link { color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); transition: background .15s; }
.icon-btn:hover { background: var(--surface-2); }

/* ---------- auth ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; position: relative;
  background: radial-gradient(90% 50% at 15% 0%, var(--accent-soft), transparent 70%), radial-gradient(70% 40% at 100% 100%, var(--saffron-soft), transparent 70%), var(--bg); }
.lang-switch { position: absolute; top: max(16px, env(safe-area-inset-top)); inset-inline-end: 16px; padding: 8px 14px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm); font-weight: 600; font-size: 14px; }
.auth-card { width: 100%; max-width: 400px; text-align: center; }
.auth-logo { border-radius: 18px; box-shadow: var(--shadow); }
.auth h1 { margin: 14px 0 0; font-size: 34px; font-weight: 700; letter-spacing: -.01em; }
.auth-tag { margin: 2px 0 28px; color: var(--muted); }
.seg { display: flex; background: var(--surface-2); border-radius: 14px; padding: 4px; margin-bottom: 20px; }
.seg button { flex: 1; padding: 10px; border-radius: 10px; font-weight: 600; color: var(--muted); transition: all .2s var(--ease); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg.small { margin: 0; }
.seg.small button { padding: 8px; font-size: 14px; }
#authForm { text-align: start; display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.field input, .add-addr textarea {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm);
  padding: 13px 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .add-addr textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
[dir="rtl"] .field input[dir="ltr"] { text-align: right; }
.pw { position: relative; }
.pw input { padding-inline-end: 46px; }
.pw-toggle { position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; color: var(--muted); border-radius: 8px; }
.hint { color: var(--muted); font-size: 13px; }
.form-error { color: var(--danger); font-size: 14px; margin: 0; min-height: 1px; }
#authSubmit { margin-top: 4px; padding: 15px; font-size: 17px; }

/* ---------- app shell ---------- */
.app { height: 100dvh; display: flex; flex-direction: column; max-width: 600px; margin: 0 auto; position: relative; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; padding-top: max(12px, env(safe-area-inset-top)); }
.logo { display: flex; align-items: center; gap: 8px; direction: ltr; }
.logo .mark { height: 34px; width: auto; }
.wordmark { font-family: "Outfit", sans-serif; font-weight: 700; font-size: 24px; letter-spacing: .02em; color: var(--ink); direction: ltr; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mark { content: url("gooli-mark-cream.svg"); } }
:root[data-theme="dark"] .mark { content: url("gooli-mark-cream.svg"); }
.top-actions { display: flex; align-items: center; gap: 6px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; display: grid; place-items: center; font-size: 16px; }
.avatar.lg { width: 60px; height: 60px; font-size: 24px; flex: none; }

.scroller { flex: 1; overflow-y: auto; padding: 0 20px 16px; min-height: 0; scroll-behavior: smooth; }

/* ---------- home ---------- */
.home { padding-top: 12px; animation: rise .35s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.greet { font-size: 28px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.greet-sub { font-size: 18px; color: var(--muted); margin: 2px 0 18px; }
.addr-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px 8px 14px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm); font-size: 14px; color: var(--ink-2); max-width: 100%; }
.addr-chip svg { color: var(--accent); flex: none; }
.addr-chip .chev { color: var(--muted); }
.addr-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addr-chip.empty span { color: var(--accent); font-weight: 600; }

.reorder { display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 18px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-sm); text-align: start; transition: transform .15s var(--ease), box-shadow .15s; }
.reorder:hover { box-shadow: var(--shadow); }
.reorder:active { transform: scale(.99); }
.reorder-icon { width: 42px; height: 42px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 20px; font-weight: 700; flex: none; }
.reorder-body { display: grid; min-width: 0; }
.reorder-body small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.section-title { font-size: 15px; font-weight: 600; color: var(--muted); margin: 26px 0 12px; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.r-card { background: var(--surface); border-radius: var(--r); padding: 16px; text-align: start; box-shadow: var(--shadow-sm); display: grid; gap: 2px; transition: transform .15s var(--ease), box-shadow .15s; }
.r-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.r-card:active { transform: scale(.98); }
.r-emoji { width: 48px; height: 48px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; font-size: 26px; margin-bottom: 10px; }
.r-card b { font-weight: 600; font-size: 15px; }
.r-card small { color: var(--muted); font-size: 12.5px; }

/* ---------- voice-first hero ---------- */
.hero { display: grid; justify-items: center; text-align: center; padding: 10px 0 6px; }
.hello { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-2); background: var(--surface); padding: 6px 14px 6px 8px; border-radius: 999px; box-shadow: var(--shadow-sm); }
[dir="rtl"] .hello { padding: 6px 8px 6px 14px; }
.orb-big { position: relative; width: 170px; height: 170px; margin: 22px 0 6px; display: grid; place-items: center; border-radius: 50%; }
.orb-big .core { position: relative; z-index: 2; width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  color: var(--night); background: radial-gradient(circle at 32% 26%, #FF8A7A 0%, var(--coral) 55%, #E8432F 100%); box-shadow: var(--shadow-coral), inset 0 -6px 14px rgba(0,0,0,.12); transition: transform .2s var(--ease); }
.orb-big:hover .core { transform: scale(1.04); }
.orb-big:active .core { transform: scale(.95); }
.orb-big .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--coral); opacity: 0; animation: ripple 3.6s var(--ease) infinite; }
.orb-big .ring.r1 { border-color: var(--lilac); }
.orb-big .ring.r2 { animation-delay: 1.2s; }
.orb-big .ring.r3 { animation-delay: 2.4s; border-color: var(--lilac); }
@keyframes ripple { 0% { transform: scale(.62); opacity: .55; } 100% { transform: scale(1.08); opacity: 0; } }
.ask { margin: 8px 0 2px; font-size: 44px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.try { color: var(--muted); font-size: 15px; min-height: 1.6em; padding: 2px 8px; border-radius: 8px; transition: opacity .35s; unicode-bidi: plaintext; }
.try:hover { color: var(--accent); }
.try.fade { opacity: 0; }
.hero .link { margin-top: 6px; }
.moods { display: flex; gap: 8px; overflow-x: auto; padding: 18px 2px 4px; scrollbar-width: none; }
.moods::-webkit-scrollbar { display: none; }
.mood { flex: none; display: flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); font-weight: 500; font-size: 14.5px; white-space: nowrap; transition: transform .15s var(--ease); }
.mood:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.mood span { font-size: 18px; }
.home-row { display: flex; justify-content: center; margin-top: 14px; }

/* ---------- GOOLI in chat ---------- */
.who-row { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--lilac-ink); margin: 6px 0 -4px; align-self: flex-start; }
.who-row img { width: auto; height: 22px; }

/* ---------- suggestion cards ---------- */
.sugs { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; animation: rise .25s var(--ease); }
.sugs::-webkit-scrollbar { display: none; }
.sug { flex: none; width: 200px; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; display: grid; text-align: start; }
.sug-ph { position: relative; }
.sug img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-2); display: block; }
.sug-qty { position: absolute; top: 8px; inset-inline-start: 8px; background: var(--saffron); color: var(--saffron-ink); font-weight: 800; font-size: 14px; border-radius: 999px; padding: 2px 10px; box-shadow: var(--shadow-sm); }
.sug .sf { flex-wrap: wrap; gap: 6px; }
.sug .sb { padding: 10px 12px 12px; display: grid; gap: 3px; }
.sug b { font-size: 14.5px; line-height: 1.35; }
.sug small { color: var(--muted); font-size: 12.5px; }
.sug .why { color: var(--ink-2); font-size: 13px; line-height: 1.4; }
.sug .sf { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.sug .sf b { font-size: 14px; }
.sug .plus { background: var(--saffron); color: var(--saffron-ink); border-radius: 10px; padding: 5px 12px; font-weight: 700; font-size: 13px; }

/* ---------- photo-grid menu ---------- */
.items-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 560px) { .items-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.icard { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-sm); overflow: hidden; text-align: start; display: grid; grid-template-rows: auto 1fr; transition: transform .15s var(--ease), box-shadow .15s; }
.icard:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.icard:active { transform: scale(.98); }
.icard .ph { position: relative; aspect-ratio: 1 / 1; background: var(--surface-2); }
.icard .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.icard .add { position: absolute; bottom: 8px; inset-inline-end: 8px; width: 34px; height: 34px; border-radius: 50%; background: var(--saffron); color: var(--saffron-ink); display: grid; place-items: center; font-size: 22px; font-weight: 600; box-shadow: var(--shadow); }
.icard .qty-tag { position: absolute; top: 8px; inset-inline-start: 8px; background: var(--saffron); color: var(--saffron-ink); font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 9px; }
.icard .ib { padding: 9px 11px 11px; display: grid; gap: 2px; align-content: space-between; }
.icard .nm { font-weight: 600; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.icard .pr { font-weight: 700; font-size: 14px; margin-top: 4px; }
.icard .pr small { color: var(--muted); font-weight: 400; }

/* ---------- chat thread ---------- */
.thread { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; }
.msg { max-width: 82%; padding: 11px 15px; border-radius: 20px; white-space: pre-wrap; word-wrap: break-word; unicode-bidi: plaintext; animation: rise .25s var(--ease); }
.msg.me { align-self: flex-end; background: var(--night); color: var(--cream); border-end-end-radius: 6px; }
.msg.bot { align-self: flex-start; background: var(--surface); box-shadow: var(--shadow-sm); border-end-start-radius: 6px; }
.msg.error { align-self: center; background: transparent; color: var(--danger); font-size: 14px; text-align: center; box-shadow: none; }
.msg .vtag { display: flex; align-items: center; gap: 6px; font-size: 12px; opacity: .8; margin-bottom: 2px; }

.voice { min-width: 230px; }
.voice-row { display: flex; align-items: center; gap: 10px; }
.play { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.22); display: grid; place-items: center; flex: none; font-size: 12px; }
.wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 26px; }
.wave i { flex: 1; background: currentColor; opacity: .55; border-radius: 2px; min-height: 3px; }
.wave.playing i { opacity: .95; }
.dur { font-size: 12px; opacity: .85; font-variant-numeric: tabular-nums; }
.transcript { font-size: 14px; opacity: .92; border-top: 1px solid rgba(255,255,255,.25); padding-top: 6px; margin-top: 6px; unicode-bidi: plaintext; }

.transcript.pending { opacity: .7; font-style: italic; animation: blink 1.4s infinite; }
.typing { align-self: flex-start; background: var(--surface); box-shadow: var(--shadow-sm); padding: 14px 16px; border-radius: 20px; border-end-start-radius: 6px; display: flex; gap: 5px; }
.typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--lilac); animation: blink 1.2s infinite; }
.typing i:first-child { background: var(--coral); border-radius: 2px; transform: rotate(45deg); }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.card { background: var(--surface); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); animation: rise .25s var(--ease); }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.card-head b { font-size: 17px; }
.card .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 12px; }
.line { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.line:last-child { border-bottom: 0; }
.line .q { color: var(--accent); font-weight: 700; margin-inline-end: 6px; }
.line small { display: block; color: var(--muted); font-size: 12.5px; }
.totals { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--muted); display: grid; gap: 3px; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { color: var(--ink); font-weight: 700; font-size: 18px; margin-top: 4px; }
.card .btn.primary { margin-top: 14px; width: 100%; padding: 15px; font-size: 16px; border-radius: 14px; box-shadow: var(--shadow-accent); }
.pill { font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }

.track { display: flex; gap: 6px; margin-top: 14px; }
.cancelled-note { margin: 10px 0 0; color: var(--danger); font-weight: 600; font-size: 14px; }
#opsLink { margin: 6px 0; text-decoration: none; }
.track div { flex: 1; text-align: center; font-size: 12px; color: var(--muted); }
.track div::before { content: ""; display: block; height: 5px; border-radius: 3px; background: var(--line); margin-bottom: 6px; transition: background .4s; }
.track div.done { color: var(--ink); font-weight: 600; }
.track div.done::before { background: var(--butter); }

/* ---------- dock ---------- */
.dock { padding: 10px 20px; padding-bottom: max(14px, env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); }
.dock-home { display: grid; justify-items: center; gap: 6px; padding-top: 4px; }
.mic-big { width: 76px; height: 76px; border-radius: 50%; background: var(--coral); color: var(--night); display: grid; place-items: center; box-shadow: var(--shadow-accent); transition: transform .2s var(--ease); position: relative; }
.mic-big::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--accent); opacity: .25; animation: halo 2.4s var(--ease) infinite; }
@keyframes halo { 0% { transform: scale(.9); opacity: .35; } 100% { transform: scale(1.25); opacity: 0; } }
.mic-big:active { transform: scale(.94); }
.dock-hint { margin: 4px 0 0; font-weight: 600; color: var(--ink-2); }
.composer { display: flex; gap: 8px; align-items: center; background: var(--surface); border-radius: 999px; padding: 6px; padding-inline-start: 18px; box-shadow: var(--shadow); }
.composer input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; padding: 8px 0; unicode-bidi: plaintext; }
.send-btn { width: 44px; height: 44px; border-radius: 50%; background: var(--coral); color: var(--night); display: grid; place-items: center; flex: none; }
.send-btn .i-send { display: none; }
.send-btn.has-text .i-send { display: block; }
.send-btn.has-text .i-mic { display: none; }
[dir="rtl"] .i-send { transform: scaleX(-1); }

/* ---------- recording sheet ---------- */
.rec { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; background: rgba(36, 16, 42, .45); backdrop-filter: blur(6px); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.rec-card { width: 100%; max-width: 600px; background: var(--surface); border-radius: 28px 28px 0 0; padding: 22px 24px; padding-bottom: max(28px, env(safe-area-inset-bottom)); display: grid; justify-items: center; gap: 10px; animation: up .3s var(--ease); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.rec-lang { display: flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.rec-lang button { padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); }
.rec-lang button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.orb { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; margin: 14px 0 4px; background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%); }
.orb span { width: 72px; height: 72px; border-radius: 50%; background: var(--coral); box-shadow: var(--shadow-coral); transition: transform .08s linear; }
.rec-time { font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; }
.rec-live { min-height: 3.2em; margin: 0; text-align: center; color: var(--ink-2); max-width: 100%; unicode-bidi: plaintext; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rec-actions { display: flex; gap: 40px; align-items: center; margin-top: 6px; }
.round { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; transition: transform .15s var(--ease); }
.round:active { transform: scale(.94); }
.round.ghost { background: var(--surface-2); color: var(--ink-2); width: 56px; height: 56px; }
.round.primary { background: var(--coral); color: var(--night); box-shadow: var(--shadow-coral); width: 72px; height: 72px; }

/* ---------- profile sheet ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(36, 16, 42, .45); backdrop-filter: blur(4px); animation: fade .2s; }
.sheet { position: relative; width: 100%; max-width: 600px; max-height: 92dvh; overflow-y: auto; background: var(--bg); border-radius: 28px 28px 0 0; padding: 10px 20px; padding-bottom: max(24px, env(safe-area-inset-bottom)); animation: up .3s var(--ease); }
@media (min-width: 900px) {
  .sheet-wrap { justify-content: flex-end; align-items: stretch; }
  .sheet { max-width: 420px; max-height: none; height: 100%; border-radius: 0; animation: side .3s var(--ease); }
  [dir="rtl"] .sheet-wrap { justify-content: flex-start; }
  .sheet-grip { display: none; }
}
@keyframes side { from { transform: translateX(30px); opacity: 0; } }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 8px; }
.sheet-close { position: absolute; top: 12px; inset-inline-end: 12px; }
.profile-head { display: flex; align-items: center; gap: 14px; margin: 14px 0 8px; }
.profile-head h2 { margin: 0; font-size: 21px; }
.p-section { background: var(--surface); border-radius: var(--r); padding: 16px; margin: 12px 0; box-shadow: var(--shadow-sm); }
.p-section h3 { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.p-section .muted.small { margin: -4px 0 10px; }
.list { list-style: none; margin: 0 0 10px; padding: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .grow b { display: block; font-weight: 600; font-size: 15px; }
.list .grow small { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.list .empty { color: var(--muted); font-size: 14px; border: 0; }
.mini { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); flex: none; }
.mini:hover { background: var(--surface-2); color: var(--ink); }
.mini.star.on { color: var(--accent); }
.list .mem span { display: block; font-size: 15px; unicode-bidi: plaintext; }
.mem-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.status { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.status.delivered { background: var(--butter); color: var(--night); }
.add-addr { display: grid; gap: 10px; margin-bottom: 10px; }
.add-addr textarea { resize: vertical; unicode-bidi: plaintext; }
.add-addr .row { display: flex; gap: 8px; justify-content: flex-end; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips button { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; }
.chips button.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* ---------- restaurant cards (photos) ---------- */
.grid.photos { grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 520px) { .grid.photos { grid-template-columns: 1fr 1fr; } }
.r-card.photo { padding: 0; overflow: hidden; gap: 0; }
.r-card.photo .cover { aspect-ratio: 16 / 7; width: 100%; object-fit: cover; background: var(--surface-2); display: block; }
.r-card.photo .body { display: flex; gap: 12px; align-items: center; padding: 12px 14px 14px; }
.r-card.photo .logo-sm { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; margin-top: -30px; border: 3px solid var(--surface); background: var(--surface); box-shadow: var(--shadow-sm); flex: none; }
.r-card.photo .txt { display: grid; min-width: 0; }
.r-card.photo .txt small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rating { color: var(--accent); font-weight: 600; }

/* ---------- header cart button ---------- */
.cart-btn { position: relative; color: var(--accent); background: var(--accent-soft); }
.cart-btn.bump { animation: bump .5s var(--ease); }
@keyframes bump { 30% { transform: scale(1.25); } 60% { transform: scale(.92); } }
.badge { position: absolute; top: 2px; inset-inline-end: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--saffron); color: var(--saffron-ink); font-size: 11px; font-weight: 700; display: grid; place-items: center; }

/* ---------- restaurant page ---------- */
.rpage { position: absolute; inset: 0; z-index: 10; background: var(--bg); display: flex; flex-direction: column; animation: fade .2s; }
.rpage-scroll { flex: 1; overflow-y: auto; padding-bottom: 110px; }
.r-hero { position: relative; aspect-ratio: 16 / 7; background: var(--surface-2); }
.r-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-btn { position: absolute; top: max(12px, env(safe-area-inset-top)); inset-inline-start: 12px; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; }
[dir="rtl"] .hero-btn svg { transform: scaleX(-1); }
.r-info { padding: 0 20px 6px; text-align: center; }
.r-logo { width: 76px; height: 76px; border-radius: 20px; object-fit: cover; margin-top: -38px; border: 4px solid var(--bg); background: var(--surface); box-shadow: var(--shadow); position: relative; }
.r-info h2 { margin: 6px 0 0; font-size: 22px; }
.r-meta { display: flex; justify-content: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.r-meta span { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm); }
.r-sticky { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 10px 20px 0; }
.r-search { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 14px; padding: 0 14px; box-shadow: var(--shadow-sm); color: var(--muted); }
.r-search input { flex: 1; border: 0; background: transparent; outline: none; padding: 11px 0; min-width: 0; }
.r-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.r-tabs::-webkit-scrollbar { display: none; }
.r-tabs button { flex: none; padding: 7px 14px; border-radius: 999px; font-size: 14px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.r-tabs button.on { background: var(--ink); color: var(--bg); }
.r-menu { padding: 0 20px; }
.r-section { scroll-margin-top: 120px; }
.r-section h3 { font-size: 18px; margin: 22px 0 6px; }
.item-row { display: flex; gap: 14px; width: 100%; padding: 14px 0; border-bottom: 1px solid var(--line); text-align: start; align-items: flex-start; }
.item-row .info { flex: 1; min-width: 0; display: grid; gap: 3px; }
.item-row b { font-weight: 600; }
.item-row .desc { color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-row .price { font-weight: 600; margin-top: 4px; }
.item-row .price small { color: var(--muted); font-weight: 400; }
.thumb { position: relative; flex: none; width: 96px; height: 96px; }
.thumb img { width: 100%; height: 100%; border-radius: 14px; object-fit: cover; background: var(--surface-2); display: block; }
.thumb .add { position: absolute; bottom: -6px; inset-inline-end: -6px; width: 32px; height: 32px; border-radius: 50%; background: var(--saffron); color: var(--saffron-ink); box-shadow: var(--shadow); display: grid; place-items: center; font-size: 20px; font-weight: 600; }
.thumb .qty-tag { position: absolute; top: 6px; inset-inline-start: 6px; background: var(--saffron); color: var(--saffron-ink); font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 8px; }
.empty-search { text-align: center; color: var(--muted); padding: 40px 0; }
/* Mic sits beside the cart bar, on the side away from the item photos. */
.fab-mic { position: absolute; bottom: max(16px, env(safe-area-inset-bottom)); inset-inline-start: 20px; width: 56px; height: 56px; border-radius: 50%; background: var(--coral); color: var(--night); box-shadow: var(--shadow); display: grid; place-items: center; z-index: 3; }
.cart-bar { position: absolute; inset-inline-start: 86px; inset-inline-end: 20px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 3; display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-radius: 16px; background: var(--saffron); color: var(--saffron-ink); font-weight: 600; box-shadow: var(--shadow-coral); animation: up .25s var(--ease); }
.cart-bar span:nth-child(2) { flex: 1; text-align: start; }
.cart-count { min-width: 26px; height: 26px; border-radius: 8px; background: rgba(0,0,0,.1); display: grid; place-items: center; font-size: 14px; }

/* ---------- item sheet ---------- */
.item-sheet { padding: 0; overflow-x: hidden; }
.item-img { aspect-ratio: 4 / 3; background: var(--surface-2); }
.item-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item-img.noimg { aspect-ratio: auto; height: 56px; }
.sheet-close.on-img { background: var(--surface); box-shadow: var(--shadow); }
.item-body { padding: 18px 20px; display: grid; gap: 8px; }
.item-body h2 { margin: 0; font-size: 21px; }
.item-price { font-size: 18px; font-weight: 700; margin: 0; }
.opt-note { margin: 0; font-size: 13.5px; color: var(--accent); background: var(--accent-soft); padding: 8px 12px; border-radius: 10px; }
.item-actions { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.stepper { display: flex; align-items: center; background: var(--surface-2); border-radius: 12px; }
.stepper button { width: 42px; height: 46px; font-size: 22px; font-weight: 600; color: var(--accent); }
.stepper span { min-width: 24px; text-align: center; font-weight: 700; }
.stepper.sm button { width: 32px; height: 32px; font-size: 18px; }
.btn.grow { flex: 1; padding: 14px; }
.btn.big { padding: 16px; font-size: 17px; border-radius: 14px; box-shadow: var(--shadow-accent); margin-top: 14px; }

/* ---------- option groups ---------- */
.opt-groups { display: grid; gap: 12px; margin: 4px 0; }
.opt-group { border: 0; margin: 0; padding: 12px 14px 6px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-sm); min-width: 0; }
.opt-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; padding: 0 0 6px; float: left; }
[dir="rtl"] .opt-head { float: right; }
.opt-head + * { clear: both; }
.opt-head b { display: block; font-size: 15px; }
.opt-head small { color: var(--muted); font-size: 12.5px; }
.opt-badge { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.opt-badge.req { background: var(--accent-soft); color: var(--accent); }
.opt-badge.ok { background: rgba(59, 138, 94, .12); color: var(--success); }
.opt-row { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-top: 1px solid var(--line); cursor: pointer; }
.opt-row input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; flex: none; }
.opt-row input:disabled + .opt-name { color: var(--muted); }
.opt-name { flex: 1; }
.opt-price { color: var(--muted); font-size: 14px; white-space: nowrap; }
.opt-row.on .opt-name { font-weight: 600; }
.btn.primary.dim { background: var(--surface-2); color: var(--muted); box-shadow: none; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.item-sheet .item-actions { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0 4px; }

/* ---------- cart sheet ---------- */
.sheet-title { margin: 14px 0 0; font-size: 22px; }
.cart-lines { list-style: none; margin: 12px 0; padding: 0; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.cart-lines li { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.cart-lines li:last-child { border-bottom: 0; }
.cart-lines img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--surface-2); flex: none; }
.cart-lines .grow { flex: 1; min-width: 0; }
.cart-lines .grow b { display: block; font-weight: 600; font-size: 15px; }
.cart-lines .grow small { color: var(--muted); font-size: 12.5px; display: block; }
.cart-lines .lp { font-weight: 600; font-size: 14px; white-space: nowrap; }
.addr-pick { display: grid; gap: 8px; }
.addr-opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.addr-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.addr-opt input { accent-color: var(--accent); margin-top: 4px; }
.addr-opt small { display: block; color: var(--muted); font-size: 13px; }
.plain-input { width: 100%; border: 1px solid var(--line); background: var(--bg); border-radius: 12px; padding: 11px 12px; outline: none; }
.plain-input:focus { border-color: var(--accent); }
#cartSheet .totals { padding: 4px 4px 0; border-top: 0; }

/* ---------- map pin picker ---------- */
.mappick { position: fixed; inset: 0; z-index: 35; background: var(--surface-2); }
.map { position: absolute; inset: 0; }
.map-pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); color: var(--accent); z-index: 500; pointer-events: none; filter: drop-shadow(0 4px 6px rgba(0,0,0,.25)); transition: transform .15s var(--ease); }
.map-pin svg { display: block; }
.map-pin .pin-shadow { position: absolute; left: 50%; bottom: -4px; width: 10px; height: 4px; margin-left: -5px; border-radius: 50%; background: rgba(0,0,0,.3); }
.mappick.moving .map-pin { transform: translate(-50%, calc(-100% - 10px)); }
.map-top { position: absolute; top: max(12px, env(safe-area-inset-top)); inset-inline: 12px; z-index: 600; display: flex; gap: 10px; align-items: flex-start; }
.map-top .hero-btn { position: static; flex: none; }
.map-search { flex: 1; position: relative; }
.map-search input { width: 100%; border: 0; border-radius: 14px; padding: 11px 14px; background: var(--surface); box-shadow: var(--shadow); outline: none; }
.map-results { list-style: none; margin: 6px 0 0; padding: 4px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); max-height: 50vh; overflow-y: auto; }
.map-results li { padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.map-results li:hover, .map-results li:focus { background: var(--surface-2); }
.map-results small { display: block; color: var(--muted); font-size: 12.5px; }
.locate-btn { position: absolute; z-index: 600; inset-inline-end: 12px; bottom: calc(var(--card-h, 290px) + 12px); display: flex; gap: 6px; align-items: center; padding: 10px 14px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); font-weight: 600; font-size: 14px; color: var(--accent); }
.map-card { position: absolute; z-index: 600; inset-inline: 0; bottom: 0; background: var(--surface); border-radius: 24px 24px 0 0; padding: 16px 20px; padding-bottom: max(18px, env(safe-area-inset-bottom)); display: grid; gap: 10px; box-shadow: var(--shadow); max-width: 600px; margin: 0 auto; }
.map-hint { margin: 0; color: var(--muted); font-size: 13.5px; }
.map-area { display: flex; gap: 8px; align-items: center; font-size: 16px; min-height: 26px; }
.map-area b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-card .btn.big { margin-top: 2px; }
.leaflet-container { font: inherit; background: var(--surface-2); }
.leaflet-control-attribution { font-size: 10px; }
.addr-flag { color: var(--accent); font-size: 12.5px; font-weight: 600; }
.pin-btn { font-size: 13px; color: var(--accent); font-weight: 600; padding: 4px 8px; border-radius: 8px; background: var(--accent-soft); white-space: nowrap; }

/* ---------- toast ---------- */
.toast { position: fixed; bottom: calc(120px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 40; box-shadow: var(--shadow); animation: rise .2s var(--ease); max-width: calc(100vw - 32px); text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
