/* LocalMart — design system. Mobile-first; desktop nav from 900px. */
:root {
  --bg: #f3f6f5; --bg2: #e8eeec; --card: #ffffff; --ink: #0e1b19; --muted: #5b6d69; --line: #e1e8e6;
  --brand: #0f766e; --brand2: #14b8a6; --brand-ink: #ffffff; --brand-soft: #e0f3f0; --grad: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
  --gold: #f59e0b;
  --warn: #a35a06; --warn-soft: #fdf1d6; --bad: #b42318; --bad-soft: #fde8e6; --good: #067647; --good-soft: #dcf6e6; --info: #175cd3; --info-soft: #e3edff;
  --shadow: 0 1px 2px rgba(14, 40, 36, .05), 0 10px 28px -14px rgba(14, 40, 36, .22);
  --shadow-lg: 0 24px 60px -20px rgba(14, 40, 36, .35);
  --r: 16px; --r-sm: 12px; --tab: 64px; --top: 60px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09100f; --bg2: #101b19; --card: #111b19; --ink: #e8f1ef; --muted: #8ea29e; --line: #213230;
    --brand: #2dd4bf; --brand2: #5eead4; --brand-ink: #03201c; --brand-soft: #0e2b27; --grad: linear-gradient(135deg, #14b8a6 0%, #5eead4 100%);
    --warn: #fbbf24; --warn-soft: #33270a; --bad: #fda29b; --bad-soft: #3a1511; --good: #6ee7a8; --good-soft: #0b2c1c; --info: #8ab4ff; --info-soft: #12223d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px -14px rgba(0, 0, 0, .6); --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .8);
  }
}
:root[data-theme="dark"] {
  --bg: #09100f; --bg2: #101b19; --card: #111b19; --ink: #e8f1ef; --muted: #8ea29e; --line: #213230;
  --brand: #2dd4bf; --brand2: #5eead4; --brand-ink: #03201c; --brand-soft: #0e2b27; --grad: linear-gradient(135deg, #14b8a6 0%, #5eead4 100%);
  --warn: #fbbf24; --warn-soft: #33270a; --bad: #fda29b; --bad-soft: #3a1511; --good: #6ee7a8; --good-soft: #0b2c1c; --info: #8ab4ff; --info-soft: #12223d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 28px -14px rgba(0, 0, 0, .6); --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .8);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Inter, Roboto, "Helvetica Neue", sans-serif; overflow-x: hidden; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; letter-spacing: -.015em; line-height: 1.2; }
h1 { font-size: clamp(22px, 4.6vw, 28px); font-weight: 800; }
h2 { font-size: 17px; font-weight: 700; margin: 22px 0 10px; }
h3 { font-size: 15.5px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
code { background: var(--bg2); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.ico { flex: none; }

/* ---------- layout helpers ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 18px; padding-bottom: calc(var(--tab) + 40px + env(safe-area-inset-bottom)); min-height: 70vh; outline: 0; }
#app.enter > * { animation: rise .32s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.muted { color: var(--muted); } .small { font-size: 13px; } .right { text-align: right; } .center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; } .between { justify-content: space-between; } .wrapf { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; } .stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.clip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clip2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.span-all { grid-column: 1 / -1; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.cols { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; margin-bottom: 16px; }
@media (min-width: 900px) { .cols { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } .summary { position: sticky; top: calc(var(--top) + 16px); } }
.two { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; } @media (max-width: 560px) { .two:not(.keep) { grid-template-columns: 1fr; } .two.keep { gap: 10px; } }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin: 4px 0 16px; }
.back { display: inline-block; color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.pad { padding: 16px 16px 6px; margin: 0; }
.big { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.link { background: none; border: 0; color: var(--brand); padding: 0; font: inherit; cursor: pointer; }
.only-desktop, .dnav, .ibtn.only-desktop { display: none; }
@media (min-width: 900px) { .ibtn.only-desktop { display: inline-grid; } .dnav { display: flex; } }
@media (max-width: 420px) { .hide-xs { display: none; } }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 30; background: var(--card); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(10px)) { .top { background: color-mix(in srgb, var(--card) 80%, transparent); backdrop-filter: saturate(1.6) blur(14px); } }
.bar { display: flex; align-items: center; gap: 14px; height: var(--top); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--ink); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.logo { width: 56px; height: 56px; border-radius: 18px; background: var(--grad); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; font-size: 28px; margin: 0 auto 10px; box-shadow: 0 10px 24px -10px var(--brand); }
.logo.sm { width: 34px; height: 34px; border-radius: 11px; font-size: 18px; margin: 0; box-shadow: none; color: #fff; }
:root[data-theme="dark"] .logo { color: #03201c; }
.dnav { gap: 4px; margin-left: 10px; }
.dnav a { display: flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14px; position: relative; }
.dnav a:hover { background: var(--bg2); text-decoration: none; color: var(--ink); }
.dnav a.on { background: var(--brand-soft); color: var(--brand); }
.tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ibtn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; position: relative; }
.ibtn:hover { background: var(--bg2); }
.dot { position: absolute; top: -4px; right: -4px; background: #e11d48; color: #fff; border-radius: 999px; font-size: 10px; font-weight: 700; padding: 0 5px; min-width: 17px; height: 17px; line-height: 17px; text-align: center; border: 2px solid var(--card); box-sizing: content-box; }
.dnav .dot { position: static; margin-left: 2px; border: 0; }
.avatar { width: 44px; height: 44px; border-radius: 14px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; font-size: 20px; }
:root[data-theme="dark"] .avatar { color: #03201c; }
.avatar.sm { width: 36px; height: 36px; border-radius: 12px; font-size: 13px; }
.avatar.lg { width: 56px; height: 56px; border-radius: 18px; font-size: 20px; }
.avatar[style*="--g1"] { background: linear-gradient(135deg, var(--g1), var(--g2)); color: #fff; }

/* ---------- bottom tab bar (phones & small tablets) ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
@supports (backdrop-filter: blur(10px)) { .tabbar { background: color-mix(in srgb, var(--card) 86%, transparent); backdrop-filter: saturate(1.6) blur(16px); } }
.tab { flex: 1; min-width: 0; height: var(--tab); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); background: none; border: 0; position: relative; cursor: pointer; font-family: inherit; }
.tab:hover { text-decoration: none; }
.tab.on { color: var(--brand); }
.tab.on::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 4px 4px; background: var(--brand); }
.tab .dot { top: 6px; right: calc(50% - 34px); }
@media (min-width: 900px) { .tabbar { display: none; } main.wrap { padding-bottom: 60px; } }

/* ---------- floating cart ---------- */
#cartbar { position: fixed; left: 0; right: 0; bottom: calc(var(--tab) + 10px + env(safe-area-inset-bottom)); z-index: 25; padding: 0 12px; display: none; pointer-events: none; }
#cartbar.show { display: block; }
.cartpill { pointer-events: auto; max-width: 560px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--grad); color: var(--brand-ink); border-radius: 18px; padding: 12px 16px; box-shadow: var(--shadow-lg); }
.cartpill:hover { text-decoration: none; }
.cartpill .muted { color: inherit; opacity: .75; font-size: 13px; } .cp-l { display: flex; align-items: center; gap: 10px; min-width: 0; } .cp-l .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cp-r { white-space: nowrap; font-size: 14px; }
@media (min-width: 900px) { #cartbar { bottom: 22px; } }
@media (max-width: 400px) { .cp-l .muted { display: none; } }

/* ---------- surfaces ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card.pad0 { padding: 0; overflow: hidden; }
.card.note { display: block; color: inherit; margin-bottom: 8px; box-shadow: none; } .card.note.read { opacity: .65; } .card:hover.note { text-decoration: none; border-color: var(--brand); }
.scroll { overflow-x: auto; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-sm); margin-bottom: 12px; font-size: 14px; background: var(--info-soft); color: var(--info); }
.notice .ico { margin-top: 1px; } .notice > div { flex: 1; min-width: 0; }
a.notice:hover { text-decoration: none; filter: brightness(.97); }
.notice.warn { background: var(--warn-soft); color: var(--warn); } .notice.bad { background: var(--bad-soft); color: var(--bad); } .notice.good { background: var(--good-soft); color: var(--good); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--bg2); color: var(--ink); white-space: nowrap; }
.b-good { background: var(--good-soft); color: var(--good); } .b-warn { background: var(--warn-soft); color: var(--warn); } .b-bad { background: var(--bad-soft); color: var(--bad); } .b-info { background: var(--info-soft); color: var(--info); }
.badge.solid { background: rgba(255, 255, 255, .92); color: #0e1b19; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); } .badge.solid.b-good { color: #067647; } .badge.solid.b-bad { color: #b42318; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--bg2); color: var(--ink); }
.pill.gold { color: var(--warn); background: var(--warn-soft); } .pill.gold .ico { fill: currentColor; }
.empty { text-align: center; padding: 40px 16px; } .empty-ico { font-size: 44px; margin-bottom: 8px; } .empty h3 { justify-content: center; font-size: 17px; margin-bottom: 4px; } .empty p { margin: 0 0 14px; }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 650; cursor: pointer; min-height: 42px; transition: transform .1s, box-shadow .15s, background .15s, filter .15s; text-align: center; }
.btn:hover { text-decoration: none; background: var(--bg2); } .btn:active { transform: scale(.98); }
.btn.primary { background: var(--grad); color: var(--brand-ink); border-color: transparent; box-shadow: 0 8px 20px -10px var(--brand); } .btn.primary:hover { filter: brightness(1.06); background: var(--grad); }
:root:not([data-theme="dark"]) .btn.primary { color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: var(--brand-ink); } }
.btn.good { background: var(--good-soft); color: var(--good); border-color: transparent; } .btn.good:hover { background: var(--good-soft); filter: brightness(.96); }
.btn.danger { background: var(--bad-soft); color: var(--bad); border-color: transparent; } .btn.danger:hover { background: var(--bad-soft); filter: brightness(.96); }
.btn.sm { padding: 5px 12px; min-height: 34px; font-size: 13px; border-radius: 10px; } .btn.block { width: 100%; } .btn.lg { min-height: 52px; font-size: 16px; border-radius: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
input, select, textarea { width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-size: 16px; min-height: 46px; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; min-height: 0; accent-color: var(--brand); flex: none; }
input[type=file] { padding: 9px; font-size: 14px; }
textarea { resize: vertical; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 12px 0 5px; }
label.inline { display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 14px; font-weight: 500; margin: 12px 0; }
details > summary { cursor: pointer; margin: 10px 0 4px; list-style: none; } details > summary::-webkit-details-marker { display: none; } details > summary::before { content: "＋ "; color: var(--brand); }
details[open] > summary::before { content: "－ "; }
.search { position: relative; display: block; margin: 0; } .search .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; } .search input { padding-left: 42px; }
.opt { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 14px; padding: 13px 14px; margin: 10px 0 0; cursor: pointer; color: var(--ink); font-size: 15px; transition: border-color .15s, background .15s; }
.opt small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; margin-top: 2px; } .opt input { margin-top: 3px; }
.opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.seg { display: flex; background: var(--bg2); border-radius: 14px; padding: 4px; margin-bottom: 14px; } .seg button { flex: 1; border: 0; background: none; padding: 10px; border-radius: 11px; font: inherit; font-weight: 650; color: var(--muted); cursor: pointer; } .seg button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; margin: 0; color: var(--ink); font-size: 14px; font-weight: 650; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; } .switch .track { width: 48px; height: 28px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); transition: transform .2s; }
.switch input:checked + .track { background: var(--brand); } .switch input:checked + .track::after { transform: translateX(20px); } .switch input:focus-visible + .track { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
.toolbar { margin-bottom: 10px; }
.rate { display: inline-flex; flex-direction: row-reverse; gap: 2px; } .rate input { position: absolute; opacity: 0; width: 1px; height: 1px; } .rate label { font-size: 34px; line-height: 1; margin: 0; color: var(--line); cursor: pointer; padding: 2px; }
.rate input:checked ~ label, .rate label:hover, .rate label:hover ~ label { color: var(--gold); } .rate input:focus-visible + label { outline: 3px solid var(--brand); border-radius: 6px; }
.stars-s { color: var(--gold); letter-spacing: 1px; } .rev { padding: 10px 0; border-bottom: 1px solid var(--line); } .rev:last-child { border: 0; }
.pwbox { font: 700 22px/1.4 ui-monospace, Consolas, monospace; background: var(--bg2); padding: 16px; border-radius: 12px; text-align: center; letter-spacing: .06em; user-select: all; word-break: break-all; }

/* ---------- chips & category rail ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin-bottom: 6px; scrollbar-width: none; } .chips::-webkit-scrollbar { display: none; }
.chip { white-space: nowrap; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink); font-family: inherit; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); } :root:not([data-theme="dark"]) .chip.on { color: #fff; }
.cnt { background: var(--bg2); color: var(--ink); border-radius: 999px; font-size: 11px; padding: 0 7px; min-width: 20px; text-align: center; } .chip.on .cnt { background: rgba(255, 255, 255, .25); color: inherit; } .cnt.hot { background: #e11d48; color: #fff; }
.cats { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 4px; scrollbar-width: none; } .cats::-webkit-scrollbar { display: none; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 72px; background: none; border: 0; font: inherit; font-size: 12px; font-weight: 650; color: var(--muted); cursor: pointer; padding: 0; }
.cat-ico { width: 56px; height: 56px; border-radius: 18px; background: var(--card); border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 26px; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.cat:hover .cat-ico { transform: translateY(-2px); } .cat.on { color: var(--brand); } .cat.on .cat-ico { border-color: var(--brand); background: var(--brand-soft); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-radius: 26px; padding: clamp(20px, 5vw, 34px); color: #fff; background: linear-gradient(135deg, #0a5750 0%, #0f766e 48%, #14b8a6 100%); margin-bottom: 16px; }
.hero::before { content: ""; position: absolute; right: -70px; top: -80px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, .26), transparent 68%); }
.hero::after { content: ""; position: absolute; left: 40%; bottom: -120px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .12), transparent 70%); }
.hero > * { position: relative; z-index: 1; } .hero h1 { color: #fff; font-size: clamp(26px, 6vw, 40px); margin: 4px 0 8px; } .hero p { margin: 0; color: rgba(255, 255, 255, .88); max-width: 520px; font-size: clamp(14px, 2.6vw, 16px); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 700; opacity: .85; }
.hero-search { display: grid; grid-template-columns: 1fr 170px; gap: 10px; margin-top: 20px; max-width: 640px; } @media (max-width: 460px) { .hero-search { grid-template-columns: 1fr; } }
.hero .search input { background: rgba(255, 255, 255, .97); border-color: transparent; color: #0e1b19; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .4); } .hero .search input::placeholder { color: #6d807c; } .hero .search .ico { color: #4b6762; }

/* ---------- shop cards & shop page ---------- */
.shop-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); color: var(--ink); transition: transform .18s, box-shadow .18s; }
.shop-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.shop-card.dim { opacity: .62; } .shop-card.dim:hover { opacity: 1; }
.shop-card .banner { height: 96px; background: linear-gradient(135deg, var(--g1), var(--g2)); position: relative; display: grid; place-items: center; }
.shop-card .banner::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 0%, rgba(255, 255, 255, .3), transparent 60%); }
.shop-card .emo { font-size: 46px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .25)); z-index: 1; } .shop-card .badge { position: absolute; top: 10px; right: 10px; z-index: 2; }
.shop-card .body { padding: 14px 16px 16px; } .shop-card h3 { font-size: 17px; margin-bottom: 2px; }
.shop-head { display: flex; gap: 16px; align-items: center; border-radius: 24px; padding: clamp(16px, 4vw, 26px); color: #fff; background: linear-gradient(135deg, var(--g1), var(--g2)); position: relative; overflow: hidden; margin-bottom: 14px; }
.shop-head::after { content: ""; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, .28), transparent 70%); }
.shop-head > * { position: relative; z-index: 1; } .shop-head .emo { font-size: clamp(44px, 10vw, 68px); filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .3)); } .shop-head h1 { color: #fff; font-size: clamp(22px, 5vw, 30px); }
.sh-sub { opacity: .92; font-size: 14px; margin-top: 2px; } .pills.on-dark .pill { background: rgba(255, 255, 255, .22); color: #fff; backdrop-filter: blur(4px); }
.shop-bar { position: sticky; top: var(--top); z-index: 12; background: var(--bg); padding: 10px 0 2px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; } .shop-bar .search { flex: 1 1 260px; } .shop-bar .chips { flex: 1 1 100%; margin: 0; padding-bottom: 6px; }
@media (min-width: 900px) { .shop-bar .chips { flex: 2 1 400px; } }
.items { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.icard { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px; box-shadow: var(--shadow); min-width: 0; }
.icard.off { opacity: .6; } .icard .thumb { width: 76px; height: 76px; border-radius: 14px; object-fit: cover; flex: none; background: var(--bg2); }
.thumb.ph { display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 26px; font-weight: 800; }
.icard .price { font-weight: 800; margin-top: 2px; } .icard .act { flex: none; } .icard .act.col { display: flex; flex-direction: column; gap: 6px; }
.qty { display: inline-flex; align-items: center; background: var(--brand-soft); border-radius: 12px; overflow: hidden; } .qty button { width: 38px; height: 38px; border: 0; background: none; color: var(--brand); font-size: 20px; font-weight: 700; cursor: pointer; } .qty button:hover { background: color-mix(in srgb, var(--brand) 14%, transparent); }
.qty span { min-width: 38px; text-align: center; font-weight: 800; } .qty.sm button { width: 32px; height: 32px; } .qty.sm span { min-width: 32px; }

/* ---------- checkout / summary ---------- */
.summary h3 { margin-bottom: 4px; } .line { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); } .line .amt { min-width: 68px; text-align: right; } .line-s { padding: 7px 0; border-bottom: 1px dashed var(--line); } .line-s:last-of-type { border: 0; }
.sum { padding-top: 10px; display: flex; flex-direction: column; gap: 6px; } .total { font-size: 18px; font-weight: 800; padding-top: 8px; border-top: 1px solid var(--line); margin-top: 4px; }
.summary .btn { margin-top: 14px; }

/* ---------- order: stepper, pay card, timeline ---------- */
.stepper { display: flex; padding: 4px 0; } .step { flex: 1; text-align: center; position: relative; min-width: 0; }
.step::before { content: ""; position: absolute; top: 17px; right: 50%; width: 100%; height: 3px; background: var(--line); } .step:first-child::before { display: none; }
.step.done::before, .step.now::before { background: var(--brand); }
.step .sdot { position: relative; width: 36px; height: 36px; border-radius: 50%; background: var(--card); border: 2px solid var(--line); display: inline-grid; place-items: center; color: var(--muted); min-width: 36px; line-height: 1; padding: 0; z-index: 1; box-sizing: border-box; }
.step.done .dot { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); } :root:not([data-theme="dark"]) .step.done .dot { color: #fff; }
.step.now .dot { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 20%, transparent); animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--brand) 5%, transparent); } }
.step .lab { display: block; font-size: 12px; font-weight: 650; margin-top: 6px; color: var(--muted); } .step.done .lab, .step.now .lab { color: var(--ink); } @media (max-width: 420px) { .step .lab { font-size: 10.5px; } .step .sdot { width: 32px; height: 32px; min-width: 32px; } .step::before { top: 15px; } }
.paycard { border: 1.5px solid color-mix(in srgb, var(--brand) 45%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--brand-soft) 60%, var(--card)), var(--card) 40%); }
.pay-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; } .amount { font-size: clamp(30px, 8vw, 40px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.timer { display: inline-flex; align-items: center; gap: 6px; background: var(--warn-soft); color: var(--warn); padding: 6px 12px; border-radius: 999px; font-size: 14px; white-space: nowrap; }
.pay-grid { display: grid; gap: 16px; } @media (min-width: 720px) { .pay-grid { grid-template-columns: 250px 1fr; align-items: start; } }
.qrbox { text-align: center; } .qrbox img { width: 100%; max-width: 230px; height: auto; background: #fff; padding: 10px; border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); }
ol.how { margin: 0 0 4px; padding-left: 20px; color: var(--muted); font-size: 14px; } ol.how li { margin: 4px 0; } ol.how b { color: var(--ink); }
.tl { list-style: none; padding: 0; margin: 4px 0 0; } .tl li { position: relative; padding: 0 0 14px 20px; border-left: 2px solid var(--line); margin-left: 6px; } .tl li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 3px solid var(--brand); } .tl li:first-child::before { background: var(--brand); } .tl li:last-child { padding-bottom: 0; }
.order-row { display: flex; gap: 14px; align-items: center; color: inherit; transition: transform .15s; } .order-row:hover { text-decoration: none; transform: translateY(-2px); }

/* ---------- merchant ---------- */
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 148px), 1fr)); margin-bottom: 16px; } @media (max-width: 460px) { .stats { gap: 10px; } .stat { padding: 12px; gap: 10px; } .s-ico { width: 36px; height: 36px; border-radius: 12px; } .stat b { font-size: 18px; } .s-lab { font-size: 12px; } }
.stat { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); min-width: 0; }
.s-ico { width: 42px; height: 42px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; } .stat.warn .s-ico { background: var(--warn-soft); color: var(--warn); } .stat.bad .s-ico { background: var(--bad-soft); color: var(--bad); }
.s-lab { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; } .stat b { font-size: 21px; letter-spacing: -.02em; display: block; }
.meter { height: 10px; background: var(--bg2); border-radius: 99px; overflow: hidden; margin-top: 10px; } .meter.wide { margin: -4px 0 14px; } .meter i { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width .5s; } .meter i.hot { background: linear-gradient(90deg, #f59e0b, #e11d48); }
.rank { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 800; margin-right: 6px; }
.ocard { border-left: 4px solid var(--line); } .ocard.urgent { border-left-color: var(--gold); background: linear-gradient(90deg, color-mix(in srgb, var(--warn-soft) 55%, var(--card)), var(--card) 35%); } .ocard .code { color: var(--ink); font-size: 16px; }
.oitems { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; } .oactions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; } @media (max-width: 520px) { .oactions .btn { flex: 1 1 calc(50% - 8px); } }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 10px; } .bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; position: relative; min-width: 0; padding-bottom: 20px; }
.bar-col i { display: block; background: var(--grad); border-radius: 8px 8px 3px 3px; min-height: 4px; transition: height .5s; } .bar-col span { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--muted); }
.doc h2 { margin-top: 0; }

/* ---------- tables → cards on phones ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; } th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; } tr:last-child td { border-bottom: 0; }
th { color: var(--muted); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; background: var(--bg2); white-space: nowrap; } td.right, th.right { text-align: right; }
@media (max-width: 720px) {
  table.rt, table.rt tbody { display: block; } table.rt tr:has(th) { display: none; }
  table.rt tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); } table.rt tr:last-child { border-bottom: 0; }
  table.rt td { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; border: 0; padding: 4px 0; text-align: right; }
  table.rt td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; flex: none; padding-top: 1px; } table.rt td:empty { display: none; }
  .doc table.rt td::before { min-width: 60px; }
}

/* ---------- auth ---------- */
.auth { max-width: 420px; margin: 18px auto 0; } .auth.wide { max-width: 580px; } .auth h1 { margin-bottom: 4px; } .auth .card { margin: 18px 0 14px; }

/* ---------- modal / bottom sheet ---------- */
#modal .back { position: fixed; inset: 0; background: rgba(6, 14, 12, .6); z-index: 60; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s both; }
.sheet { background: var(--card); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 24px 24px 0 0; padding: 10px 20px calc(22px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg); animation: sheet .28s cubic-bezier(.2, .8, .2, 1) both; overscroll-behavior: contain; }
.sheet h2 { margin: 6px 0 10px; font-size: 20px; } .grab { width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 4px auto 10px; }
@media (min-width: 700px) { #modal .back { align-items: center; } .sheet { border-radius: 24px; padding-bottom: 22px; } .grab { display: none; } }
@keyframes sheet { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } } @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.menu { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; } .menu-item { display: flex; align-items: center; gap: 14px; padding: 14px 12px; border-radius: 14px; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-align: left; } .menu-item:hover { background: var(--bg2); text-decoration: none; } .menu-item .ico { color: var(--brand); }
#toast { position: fixed; left: 50%; transform: translate(-50%, 12px); bottom: calc(var(--tab) + 78px + env(safe-area-inset-bottom)); background: #12201e; color: #fff; padding: 11px 18px; border-radius: 14px; z-index: 80; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: min(92vw, 460px); box-shadow: var(--shadow-lg); font-weight: 550; font-size: 14px; }
#toast.show { opacity: 1; transform: translate(-50%, 0); } #toast.err { background: #b42318; } @media (min-width: 900px) { #toast { bottom: 28px; } }
.imgprev { max-width: 160px; border-radius: 14px; margin-top: 8px; border: 1px solid var(--line); display: block; }

/* ---------- skeletons ---------- */
.skel-wrap { display: flex; flex-direction: column; gap: 14px; } .skel { border-radius: var(--r); background: linear-gradient(90deg, var(--bg2) 25%, color-mix(in srgb, var(--bg2) 55%, var(--card)) 50%, var(--bg2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
@media print {
  .top, .tabbar, #cartbar, .no-print, #toast, #modal, .skip { display: none !important; }
  body { background: #fff; color: #000; } main.wrap { padding: 0; } .card { box-shadow: none; border: 0; padding: 0; } th { background: #eee; color: #000; } table.rt { display: table !important; } table.rt tr { display: table-row !important; } table.rt td { display: table-cell !important; } table.rt td::before { display: none; }
}
.ocard .notice { margin: 12px 0 0; }

/* ---------- reports, sharing, WhatsApp settings ---------- */
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.btn.light { background: rgba(255, 255, 255, .22); color: #fff; border-color: transparent; backdrop-filter: blur(4px); } .btn.light:hover { background: rgba(255, 255, 255, .34); }
.shop-head .row.wrapf { gap: 10px; align-items: center; }
.prov { display: none; margin-top: 4px; }
.rep-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 6px 2px 10px; }
tr.tot td { font-weight: 800; background: var(--bg2); }
@media print { .chips, .btn { display: none !important; } .stats { grid-template-columns: repeat(3, 1fr); } }

/* ---------- help / guide pages ---------- */
.guide .card { margin-bottom: 12px; } .guide .card h3 { font-size: 16px; } .guide ul { margin: 6px 0 0; padding-left: 20px; } .guide li { margin: 5px 0; }
.langseg { margin: 0; padding: 3px; } .langseg button { padding: 7px 12px; font-size: 14px; } [hidden] { display: none !important; }
.guide .notice { margin: 12px 0 0; } .guide .page-head + .notice { margin: 0 0 14px; }
.guide ol.how { color: var(--ink); font-size: 15px; } .guide ol.how li { margin: 7px 0; } .guide .card p:last-child { margin-bottom: 0; } .guide .card p:first-of-type { margin-top: 0; }
/* breathing room between full-width cards that sit directly on the page (dashboard share/help cards etc.) */
#app > .card { margin-bottom: 14px; }

/* ---------- food shops: veg marks, was/now price, offers, sizes sheet ---------- */
.diet { display: inline-grid; place-items: center; width: 15px; height: 15px; border: 1.5px solid currentColor; border-radius: 3px; margin-right: 7px; vertical-align: -2px; flex: none; background: #fff; }
.diet::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.d-veg { color: #16a34a; } .d-nonveg { color: #dc2626; } .d-egg { color: #d97706; }
.d-nonveg::after { width: 0; height: 0; border-radius: 0; background: none; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 7px solid currentColor; }
.mrp { text-decoration: line-through; color: var(--muted); font-weight: 500; font-size: 13px; } .offtag { color: var(--good); font-weight: 800; font-size: 12px; }
.offers { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 0 4px; scrollbar-width: none; } .offers::-webkit-scrollbar { display: none; }
.offer { flex: none; display: flex; gap: 10px; align-items: center; border: 1.5px dashed var(--brand); background: var(--brand-soft); color: var(--ink); border-radius: 14px; padding: 9px 14px; font-size: 14px; max-width: 320px; } .offer .ico { color: var(--brand); }
.codechip { font: inherit; font-weight: 800; letter-spacing: .06em; background: var(--card); color: var(--brand); border: 1px solid var(--brand); border-radius: 8px; padding: 1px 8px; cursor: pointer; }
.offer-line { margin-top: 8px; display: flex; gap: 6px; align-items: center; color: var(--good); font-weight: 700; font-size: 13px; }
.card.terms { display: flex; gap: 10px; align-items: center; margin: 0 0 12px; padding: 11px 14px; font-size: 14px; } .card.terms .ico { color: var(--brand); }
.promo { display: flex; gap: 8px; margin-top: 12px; } .promo input { flex: 1; min-width: 0; text-transform: uppercase; } .promo .applied { display: flex; gap: 8px; align-items: center; background: var(--good-soft); color: var(--good); border-radius: 12px; padding: 10px 12px; width: 100%; }
.disc { color: var(--good); font-weight: 700; } .summary .notice { margin-top: 10px; }

.dietseg { display: flex; flex-wrap: wrap; gap: 8px; background: none; padding: 0; margin-bottom: 6px; }
.dietseg label { display: flex; align-items: center; gap: 6px; margin: 0; border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 14px; color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; }
.dietseg label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); } .dietseg input { position: absolute; opacity: 0; width: 1px; height: 1px; } .dietseg .diet { margin: 0; }
.optrow { display: grid; grid-template-columns: 1fr 96px auto; gap: 8px; margin-bottom: 8px; align-items: center; } .optrow .btn { min-height: 42px; }
.codechip { display: inline-block; }

label.consent { align-items: flex-start; gap: 10px; margin-top: 16px; font-size: 14px; line-height: 1.4; font-weight: 500; } label.consent a { text-decoration: underline; }

.stuckrow { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); } .stuckrow:first-of-type { border-top: 0; }
