/* Daily Basket - accessible, bilingual (RTL/LTR via logical properties), picture-first. Colours meet WCAG 2.2 AA. */
:root {
  --brand: #15803d; --brand-dark: #14532d; --leaf: #f0fdf4; --sun: #b45309; --ink: #0f172a; --muted: #475569; --line: #cbd5e1;
  --ok: #15803d; --warn: #b45309; --bad: #b91c1c; --bg: #fafaf9; --radius: 16px; --focus: #1d4ed8;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
html.big { font-size: 19px; }
body { margin: 0; font-family: "Cairo", "Tajawal", "Segoe UI", Tahoma, system-ui, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.6; }
a { color: var(--brand-dark); }
:focus-visible { outline: 4px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 8px; }

header.top { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); color: #fff; padding: 12px 18px; display: flex; gap: 12px;
  align-items: center; justify-content: space-between; flex-wrap: wrap; }
header.top .logo { color: #fff; font-weight: 800; font-size: 1.3rem; text-decoration: none; display: flex; gap: 8px; align-items: center; }
header.top nav { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
header.top nav a, header.top nav button, .chip { color: #fff; background: rgba(255,255,255,.16); border: 2px solid rgba(255,255,255,.35); border-radius: 999px;
  padding: 7px 14px; text-decoration: none; font: inherit; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 18px; }
.hero { background: linear-gradient(180deg, #ecfccb, #f0fdf4 70%, var(--bg)); padding: 34px 18px 26px; text-align: center; }
.hero h1 { margin: 0 0 8px; font-size: 2rem; color: var(--brand-dark); }
.hero p { margin: 0 auto; max-width: 760px; color: var(--muted); font-size: 1.1rem; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spread { justify-content: space-between; }
.center { justify-content: center; }
.meta { color: var(--muted); font-size: .92rem; }
.card { background: #fff; border: 2px solid #e2e8f0; border-radius: var(--radius); padding: 16px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 22px 0 10px; flex-wrap: wrap; }
.section-title h2 { margin: 0; font-size: 1.35rem; }
button, .btn { background: var(--brand); color: #fff; border: 2px solid var(--brand); border-radius: 12px; padding: 10px 18px; font: inherit; font-weight: 700;
  cursor: pointer; min-height: 48px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
button.ghost, .btn.ghost { background: #fff; color: var(--brand-dark); }
button.danger { background: var(--bad); border-color: var(--bad); }
button.warn { background: var(--sun); border-color: var(--sun); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.say { background: #fff; color: var(--ink); border: 2px solid var(--line); min-height: 40px; min-width: 40px; padding: 4px 8px; border-radius: 999px; font-size: 1rem; }
input, select, textarea { font: inherit; width: 100%; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; background: #fff; min-height: 48px; color: var(--ink); }
input[type="checkbox"], input[type="radio"] { width: 24px; height: 24px; min-height: 0; accent-color: var(--brand); }
label { display: block; font-weight: 700; margin: 10px 0 4px; }
.form-grid { display: grid; gap: 4px 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.stepper { display: flex; gap: 6px; align-items: stretch; }
.stepper input { text-align: center; font-weight: 800; flex: 1; min-width: 44px; padding-inline: 4px; }
.step-btn { flex: 0 0 52px; padding: 0; font-size: 1.6rem; background: var(--leaf); color: var(--brand-dark); }
.product .stepper { gap: 4px; }
.product .step-btn { flex-basis: 44px; min-height: 44px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; border-bottom: 2px solid #e2e8f0; padding-bottom: 8px; }
.tabs button { background: transparent; color: var(--ink); border-color: transparent; border-radius: 999px; }
.tabs button[aria-selected="true"] { background: var(--brand); color: #fff; }
.tabs .count { background: #e11d48; color: #fff; border-radius: 999px; padding: 0 8px; font-size: .8rem; }
.empty { text-align: center; color: var(--muted); padding: 30px; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
th, td { padding: 10px; border-bottom: 1px solid #e2e8f0; text-align: start; vertical-align: top; }
th { background: var(--leaf); color: var(--brand-dark); }
@media (max-width: 760px) { table { display: block; overflow-x: auto; } }

/* picture-first catalogue */
.cats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); margin: 12px 0 18px; }
.cat { background: #fff; color: var(--ink); border: 3px solid #e2e8f0; border-radius: 20px; padding: 10px 6px; display: flex; flex-direction: column;
  align-items: center; gap: 4px; min-height: 128px; font-weight: 800; }
.cat .ic { font-size: 3rem; line-height: 1.1; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 16%, #fff); }
.cat[aria-pressed="true"] { border-color: var(--c, var(--brand)); background: color-mix(in srgb, var(--c, var(--brand)) 10%, #fff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--brand)) 35%, transparent); }
.product { display: flex; flex-direction: column; gap: 6px; border-top: 6px solid var(--c, var(--brand)); position: relative; }
.product .photo { width: 100%; height: 160px; object-fit: cover; border-radius: 12px; background: var(--leaf); }
.product .photo.art, .thumb.art { display: grid; place-items: center; font-size: 4.5rem; background: color-mix(in srgb, var(--c) 14%, #fff); }
.product h3 { margin: 0; font-size: 1.1rem; display: flex; justify-content: space-between; gap: 6px; align-items: flex-start; }
.product .price { font-size: 1.35rem; font-weight: 800; color: var(--brand-dark); }
.product.sold-out { opacity: .65; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 700; background: #f1f5f9; }
.tag.local { background: #dcfce7; color: #14532d; } .tag.organic { background: #ecfccb; color: #3f6212; } .tag.verified { background: #dbeafe; color: #1e3a8a; }
.tag.offer { background: #fee2e2; color: #991b1b; } .tag.sponsored { background: #fef3c7; color: #78350f; }
.price s, .meta s { color: var(--muted); font-weight: 400; font-size: .85em; }
.pro-hint { color: #6d28d9; font-weight: 700; }
.estimate { display: flex; gap: 10px; align-items: center; background: #ecfeff; border: 2px solid #67e8f9; border-radius: 14px; padding: 10px 14px; margin: 0 0 12px; }
.estimate .ic { font-size: 2rem; } .estimate small { display: block; color: #6d28d9; font-weight: 700; }
.cash-due { margin-top: 8px; padding: 8px 12px; border-radius: 12px; background: #fefce8; border: 2px solid #facc15; font-weight: 800; color: #713f12; }
.offer-ask { border-inline-start: 7px solid #dc2626; }
.type-pick { display: grid; gap: 4px; font-weight: 700; }
.type-pick select { min-height: 48px; font-size: 1rem; }
.seller-note { color: #14532d; }
.types-box { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 6px; }
.types-box summary { cursor: pointer; font-weight: 700; min-height: 32px; }
.type-line { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #e2e8f0; }
.type-line small { display: block; }
.line-note { margin-top: 6px; width: 100%; }
.strip-title { margin: 6px 0 8px; }
.bundles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-bottom: 14px; }
.bundle { border-top: 6px solid var(--brand); }
.bundle-items { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 4px; }
.bundle-items li.gone { color: var(--muted); text-decoration: line-through; }
.bundle-row { display: grid; grid-template-columns: 2fr 1fr 2fr auto; gap: 6px; align-items: center; margin-bottom: 6px; }
@media (max-width: 640px) { .bundle-row { grid-template-columns: 1fr 1fr; } }
.promo-row { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; margin-bottom: 8px; scroll-snap-type: x proximity; }
.promo-chip { flex: 0 0 auto; max-width: 300px; display: flex; gap: 8px; align-items: center; text-align: start; scroll-snap-align: start;
  background: #fff; color: var(--ink); border: 2px solid var(--line); border-radius: 14px; padding: 6px 12px; min-height: 52px; font-weight: 400; }
.promo-chip .ic { font-size: 1.6rem; } .promo-chip b { display: block; font-size: .95rem; } .promo-chip small { display: block; font-size: .8rem; color: var(--muted); }
.promo-chip.ad { background: var(--c); border-color: var(--c); color: #fff; } .promo-chip.ad small { color: #fff; opacity: .9; }
.promo-chip.pro { border-color: #a78bfa; background: #f5f3ff; } .promo-chip.eta-chip { border-color: #67e8f9; background: #ecfeff; }
.promo-chip.bundle-chip { border-color: var(--brand); background: var(--leaf); }
.shop-bar { position: sticky; top: 0; z-index: 30; background: var(--bg, #f8fafc); padding: 8px 0; display: grid; gap: 8px; border-bottom: 1px solid var(--line); }
.shop-search { display: flex; gap: 8px; align-items: center; background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 0 14px; }
.shop-search input { border: 0; background: transparent; flex: 1; min-height: 46px; font-size: 1rem; }
.shop-search:focus-within { border-color: var(--brand); }
.chip-cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.cat-chip { flex: 0 0 auto; background: #fff; color: var(--ink); border: 2px solid var(--line); border-radius: 999px; padding: 6px 12px; min-height: 44px; font-weight: 700; white-space: nowrap; }
.cat-chip small { color: var(--muted); font-weight: 400; }
.cat-chip[aria-pressed="true"] { border-color: var(--c, var(--brand)); background: color-mix(in srgb, var(--c, var(--brand)) 14%, #fff); }
.shop-tools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.shop-tools select { min-height: 44px; flex: 1 1 150px; max-width: 260px; }
.tool { min-height: 44px; padding: 6px 12px; }
.tool[aria-pressed="true"] { background: var(--brand); color: #fff; }
.view-toggle { display: flex; gap: 4px; margin-inline-start: auto; }
.seller-link { background: none; border: 0; color: var(--ink); padding: 2px 0; min-height: 32px; text-align: start; font-weight: 400; cursor: pointer; }
.seller-link:hover b, .seller-link:focus-visible b { text-decoration: underline; }
.seller-group { margin: 14px 0; } .seller-head { margin: 0 0 8px; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.products.compact { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; }
.products.compact .product { padding: 10px; gap: 4px; font-size: .92rem; }
.products.compact .product .photo { height: 110px; }
.products.compact .product .photo.art { font-size: 3.2rem; }
.products.compact .product h3 { font-size: 1rem; }
.products.compact .product .price { font-size: 1.1rem; }
.products.compact .tags { gap: 4px; } .products.compact .tag, .products.compact .fresh { font-size: .72rem; }
.products.compact .product button { padding: 6px 10px; }
.products.list { grid-template-columns: 1fr; gap: 6px; }
.products.list .product { display: grid; grid-template-columns: 56px 1fr; column-gap: 10px; row-gap: 2px; padding: 8px 10px; border-top: 0; border-inline-start: 6px solid var(--c, var(--brand)); align-items: center; }
.products.list .product > * { grid-column: 2; }
.products.list .product .photo { grid-column: 1; grid-row: 1 / span 3; width: 56px; height: 56px; border-radius: 10px; align-self: start; }
.products.list .product .photo.art { font-size: 2rem; }
.products.list .product { grid-template-columns: 56px 1fr auto; }
.products.list .product > * { grid-column: 2 / -1; }
.products.list .product h3 { grid-column: 2; grid-row: 1; }
.products.list .product .price { grid-column: 3; grid-row: 1; white-space: nowrap; text-align: end; }
.products.list .product .price s { display: block; }
.products.compact .tag.local, .products.compact .tag.verified, .products.compact .tag.organic, .products.compact .fresh,
.products.compact .seller-link small, .products.compact .type-pick > span, .products.compact .seller-note, .products.compact .pro-hint { display: none; }
.products.compact .type-pick select { min-height: 44px; font-size: .9rem; }
.products.compact .price { line-height: 1.25; }
.products.compact .price small { display: block; font-size: .75rem; }
.products.compact .stepper input, .products.compact .step-btn, .products.list .stepper input { min-height: 44px; height: 44px; padding-block: 0; }
.products.compact .buy .row { margin-top: 4px; }
.products.compact .buy button { min-height: 44px; flex: 1; }
.products.compact .seller-link { min-height: 28px; font-size: .85rem; }
.products.list .product .tags, .products.list .product .fresh, .products.list .product .seller-note, .products.list .product .dish-facts,
.products.list .product .pro-hint, .products.list .type-pick > span, .products.list .seller-link small { display: none; }
.products.list .product h3 { font-size: 1rem; } .products.list .product .price { font-size: 1rem; }
.products.list .type-pick select { min-height: 40px; }
.products.list .buy { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.products.list .buy .qty-row { flex: 0 1 170px; }
.products.list .buy .row, .products.list .buy .mode-row { margin: 0; flex-wrap: nowrap; }
.products.list .buy button { padding: 6px 12px; min-height: 44px; }
.products.list .step-btn { flex-basis: 40px; min-height: 40px; }
.products.list .in-cart { top: 6px; }
@media (max-width: 640px) {
  .products.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .products.compact .product .photo { height: 90px; }
  .shop-tools select { max-width: none; }
}
.fresh { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.fresh i { width: 12px; height: 12px; border-radius: 50%; background: currentColor; }
.fresh-excellent { background: #dcfce7; color: #14532d; } .fresh-good { background: #ecfccb; color: #3f6212; } .fresh-fair { background: #fef3c7; color: #92400e; }
.qty-row { display: flex; gap: 6px; align-items: center; }
.qty-row .stepper { flex: 1; }
.in-cart { position: absolute; top: 10px; inset-inline-end: 10px; background: var(--brand); color: #fff; border-radius: 999px; padding: 2px 10px; font-weight: 800; }
.thumb { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: 0 0 64px; }
.line { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #e2e8f0; }
.line .grow { flex: 1; min-width: 0; }
.totals { display: grid; gap: 4px; margin-top: 10px; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-size: 1.35rem; font-weight: 800; color: var(--brand-dark); border-top: 2px solid var(--brand); padding-top: 6px; }
.cart-fab { position: fixed; bottom: 18px; inset-inline-end: 18px; z-index: 40; border-radius: 999px; padding: 12px 22px; font-size: 1.15rem;
  box-shadow: 0 10px 30px rgba(20,83,45,.35); }
.choice-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.choice { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border: 3px solid #e2e8f0;
  border-radius: 16px; background: #fff; cursor: pointer; text-align: center; font-weight: 700; margin: 0; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .ic { font-size: 2.2rem; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--leaf); box-shadow: 0 0 0 3px rgba(21,128,61,.3); }
.choice:has(input:checked)::after { content: "✓"; position: absolute; top: 6px; inset-inline-start: 8px; background: var(--brand); color: #fff;
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; }
.choice:has(input:focus-visible) { outline: 4px solid var(--focus); }

/* how-to pictograms + sign guide */
.how { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 18px 0; }
.how li { list-style: none; background: #fff; border: 2px solid #e2e8f0; border-radius: 16px; padding: 12px; text-align: center; font-weight: 800; }
.how .ic { display: block; font-size: 2.6rem; }
.how .n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; }
.how .sign { display: block; font-size: 1.8rem; opacity: .9; }

/* order progress */
.progress-steps { margin: 10px 0; }
.progress-steps .bar { height: 12px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.progress-steps .bar span { display: block; height: 100%; background: linear-gradient(90deg, #15803d, #84cc16); transition: width .6s; }
.progress-steps ol { list-style: none; display: flex; justify-content: space-between; padding: 0; margin: 8px 0 0; }
.progress-steps li { flex: 1; display: flex; flex-direction: column; align-items: center; color: var(--muted); text-align: center; }
.progress-steps li i { font-style: normal; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #f1f5f9;
  border: 3px solid var(--line); font-size: 1.25rem; }
.progress-steps li.done i { background: var(--ok); color: #fff; border-color: var(--ok); font-weight: 900; }
.progress-steps li.done small { color: var(--brand-dark); font-weight: 700; }
.progress-steps li.current i { border-color: var(--sun); background: #fff7ed; animation: pulse 1.6s infinite; }
.progress-steps li.current small { color: var(--sun); font-weight: 800; }
.status { display: inline-flex; gap: 4px; align-items: center; padding: 3px 12px; border-radius: 999px; font-weight: 700; background: #f1f5f9; }
.st-delivered, .st-paid, .st-packed { background: #dcfce7; color: #14532d; } .st-out_for_delivery, .st-at_pickup { background: #dbeafe; color: #1e3a8a; }
.st-pending_payment { background: #fef3c7; color: #92400e; } .st-failed, .st-cancelled { background: #fee2e2; color: #991b1b; }
.order { border-inline-start: 7px solid var(--brand); }
.order.os-pending_payment { border-inline-start-color: var(--sun); } .order.os-failed, .order.os-cancelled { border-inline-start-color: var(--bad); }
.order.os-delivered, .order.os-at_pickup { border-inline-start-color: #1e3a8a; }
.code-card { display: inline-flex; align-items: center; gap: 12px; padding: 10px 16px; background: #0f172a; color: #fff; border-radius: 16px; }
.code-card b { font-size: 2.2rem; letter-spacing: 10px; font-family: ui-monospace, monospace; }
.icons-row { display: flex; gap: 6px; flex-wrap: wrap; }
.icons-row span { background: #f1f5f9; border-radius: 12px; padding: 4px 10px; font-weight: 700; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(180,83,9,.45); } 50% { box-shadow: 0 0 0 9px rgba(180,83,9,0); } }

/* tracking */
.track-map { height: 340px; border-radius: 16px; border: 2px solid var(--line); overflow: hidden; background: var(--leaf); }
.eta { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 10px 0; }
.eta div { background: var(--leaf); border-radius: 14px; padding: 10px 14px; }
.eta b { display: block; font-size: 1.5rem; color: var(--brand-dark); }
.map-pin { background: transparent; border: 0; }
.map-pin span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; font-size: 1.4rem; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.map-pin.me span { background: #fef3c7; } .map-pin.driver span { background: var(--brand); animation: pulse 1.8s infinite; }
.stop-num span { background: #1e3a8a; color: #fff; font-weight: 800; font-size: 1rem; }

/* driver keypad */
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 320px; margin: 10px auto; direction: ltr; }
.keypad button { min-height: 64px; font-size: 1.6rem; background: #fff; color: var(--ink); border-color: var(--line); }
.code-display { text-align: center; font-size: 2.4rem; letter-spacing: 14px; font-family: ui-monospace, monospace; min-height: 60px; direction: ltr; }

/* dialogs, panels, alerts */
dialog { border: 0; border-radius: 20px; padding: 18px; width: min(760px, 96vw); max-height: 92vh; }
dialog::backdrop { background: rgba(15,23,42,.55); }
.panel { position: fixed; top: 70px; inset-inline-end: 12px; width: min(400px, 94vw); max-height: 80vh; overflow: auto; background: #fff; border-radius: 18px;
  box-shadow: 0 20px 50px rgba(15,23,42,.3); padding: 14px; z-index: 60; }
.panel h2 { margin: 0 0 8px; font-size: 1.2rem; }
.pref { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid #e2e8f0; margin: 0; }
.notif-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px; }
.notif-list button { width: 100%; justify-content: flex-start; text-align: start; background: #f8fafc; color: var(--ink); border: 2px solid #e2e8f0;
  border-inline-start: 6px solid var(--brand); display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-weight: 400; }
.notif-list .ic { grid-row: span 3; font-size: 1.8rem; }
.notif-list .unread button { background: var(--leaf); font-weight: 700; }
.notif-list .warning button { border-inline-start-color: var(--sun); } .notif-list .danger button { border-inline-start-color: var(--bad); }
.bell { position: relative; }
.bell .n { position: absolute; top: -6px; inset-inline-end: -6px; background: #e11d48; color: #fff; border-radius: 999px; min-width: 22px; height: 22px;
  font-size: .75rem; font-weight: 800; display: grid; place-items: center; padding: 0 5px; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px;
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 80; max-width: 92vw; display: flex; gap: 8px; align-items: center; font-weight: 700; }
#toast.show { opacity: 1; pointer-events: auto; }
#toast.danger { background: var(--bad); } #toast.warning { background: var(--sun); }
#alert-stack { position: fixed; top: 78px; inset-inline-start: 12px; display: grid; gap: 10px; z-index: 70; width: min(380px, 92vw); }
.alert-pop { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: center; text-align: start; background: #fff; color: var(--ink);
  border: 3px solid var(--brand); border-radius: 16px; padding: 12px; box-shadow: 0 12px 34px rgba(0,0,0,.25); font-weight: 400; }
.alert-pop .ic { font-size: 2rem; grid-row: span 2; }
.alert-pop.warning { border-color: var(--sun); } .alert-pop.danger { border-color: var(--bad); }
.flash { position: fixed; inset: 0; pointer-events: none; z-index: 90; border: 14px solid var(--brand); animation: flash 1.5s ease-out; }
.flash.warning { border-color: var(--sun); } .flash.danger { border-color: var(--bad); }
@keyframes flash { 0%, 40% { opacity: 1; } 20%, 60% { opacity: .2; } 100% { opacity: 0; } }

html.contrast { --muted: #1e293b; --line: #334155; --bg: #fff; }
html.contrast .card, html.contrast .cat, html.contrast .choice { border-color: #0f172a; }
html.contrast .meta { color: #0f172a; }
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media (max-width: 560px) {
  .hero h1 { font-size: 1.5rem; }
  .progress-steps li small { font-size: .7rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .product .photo { height: 120px; }
}
@media print { header.top, .tabs, .cart-fab, #toast, .bell, .panel { display: none !important; } }
footer { text-align: center; color: var(--muted); padding: 24px; }

/* local dishes + cooking at the customer's place */
.st-accepted, .st-cooking { background: #ffedd5; color: #9a3412; } .st-chef_on_way { background: #dbeafe; color: #1e3a8a; }
.order.os-accepted, .order.os-chef_on_way, .order.os-cooking { border-inline-start-color: #c2410c; }
.dish-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.dish-facts span { background: #fff7ed; color: #9a3412; border-radius: 999px; padding: 2px 10px; font-size: .85rem; font-weight: 700; }
.mode-row { display: grid; gap: 6px; grid-template-columns: 1fr 1fr; }
.mode-row button.cook { background: #c2410c; border-color: #c2410c; }
.food-banner { background: linear-gradient(135deg, #fff7ed, #ffedd5); border: 2px solid #fdba74; border-radius: 18px; padding: 14px 18px; margin-bottom: 14px;
  display: flex; gap: 14px; align-items: center; }
.food-banner .ic { font-size: 3rem; }
.template-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.template-chips button { background: #fff7ed; color: #9a3412; border-color: #fdba74; min-height: 44px; }
.cook-state { font-weight: 800; padding: 8px 12px; border-radius: 12px; }
.cook-state.free { background: #dcfce7; color: #14532d; } .cook-state.busy { background: #fee2e2; color: #991b1b; }
.mode-row { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }
.mode-row button { min-width: 0; white-space: normal; padding-inline: 8px; }
.choice small { display: block; font-weight: 400; }
