/* Mithila Naturals — one stylesheet for the shop and the business app.
   Mobile first: bottom tab bar on phones, sidebar on wide screens. System fonts only (fast on any connection). */
:root {
  --g: #378700; --g-deep: #24590a; --g-hi: #4fa312; --g-ink: #1d4a05;
  --tint: #eef6e7; --tint2: #dcebcf; --bg: #f5f8f1; --card: #fff;
  --ink: #142310; --muted: #58684f; --line: #e1e9da; --line2: #cfdcc5;
  --ok: #2f7d12; --ok-bg: #e4f3da; --info: #0f5f8a; --info-bg: #e2f0f8; --warn: #8a5300; --warn-bg: #fdf1dc; --bad: #b42318; --bad-bg: #fde8e6;
  --r: 16px; --r-sm: 10px; --shadow: 0 1px 2px rgb(20 35 16 / .06), 0 6px 20px rgb(20 35 16 / .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --top: 58px; --tab: 64px; --side: 252px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(.2,.7,.2,1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 12px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; min-height: 100dvh; }
img { max-width: 100%; display: block; }
a { color: var(--g-deep); text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.45rem, 1.2rem + 1.2vw, 2rem); }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .8em; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--g-hi); outline-offset: 2px; border-radius: 6px; }
svg.i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 18px; height: 18px; }

/* ───────── top bar ───────── */
.top { position: sticky; top: 0; z-index: 30; background: var(--g); color: #fff; padding-top: var(--safe-t); box-shadow: 0 1px 0 rgb(0 0 0 / .06); }
.top-in { height: var(--top); display: flex; align-items: center; gap: 10px; padding: 0 12px; max-width: 1240px; margin: 0 auto; }
.top .logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.top .logo img { height: 44px; width: auto; }
.top .title { font-weight: 650; font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .sp { flex: 1; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: inherit; background: transparent; border: 0; cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: rgb(255 255 255 / .14); }
.count { position: absolute; top: 4px; right: 2px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: #fff; color: var(--g-deep); font-size: .72rem; font-weight: 750; display: grid; place-items: center; }
.count:empty, .count[data-n="0"] { display: none; }
.top nav.desk { display: none; gap: 4px; }
.top nav.desk a { color: #fff; text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 550; opacity: .92; }
.top nav.desk a:hover, .top nav.desk a[aria-current] { background: rgb(255 255 255 / .16); opacity: 1; }
.searchbar { display: none; flex: 1; max-width: 420px; }
.searchbar input { width: 100%; height: 40px; border-radius: 999px; border: 0; padding: 0 16px 0 40px; font: inherit; background: rgb(255 255 255 / .95) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2358684f' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 13px 50% / 18px; }

/* ───────── bottom tab bar (phones) ───────── */
.tabs-bar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding-bottom: var(--safe-b); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; box-shadow: 0 -4px 20px rgb(20 35 16 / .06); }
.tabs-bar a { height: var(--tab); display: grid; justify-items: center; align-content: center; gap: 3px; color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600; position: relative; }
.tabs-bar a[aria-current] { color: var(--g); }
.tabs-bar a[aria-current]::before { content: ""; position: absolute; top: 0; width: 34px; height: 3px; border-radius: 0 0 3px 3px; background: var(--g); }
.tabs-bar .fab { width: 50px; height: 50px; border-radius: 50%; background: var(--g); color: #fff; display: grid; place-items: center; margin-top: -18px; box-shadow: 0 6px 16px rgb(55 135 0 / .4); }
.tabs-bar .count { top: 6px; right: calc(50% - 22px); background: var(--g); color: #fff; }
body.has-tabs main { padding-bottom: calc(var(--tab) + var(--safe-b) + 24px); }

/* ───────── page shell ───────── */
main { display: block; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 16px; }
.wrap.narrow { max-width: 760px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 4px 0 16px; }
.page-head h1 { margin: 0; flex: 1 1 auto; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.back { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .9rem; margin-bottom: 6px; }

/* sidebar (business app, wide screens) */
.side { display: none; }
@media (min-width: 1000px) {
  body.app { display: grid; grid-template-columns: var(--side) 1fr; }
  body.app .tabs-bar { display: none; }
  body.app.has-tabs main { padding-bottom: 32px; }
  body.app .top .logo { display: none; }
  body.app .top { background: var(--bg); color: var(--ink); box-shadow: none; border-bottom: 1px solid var(--line); }
  body.app .top .icon-btn:hover { background: var(--tint); }
  body.app .top-in { max-width: none; padding: 0 24px; }
  body.app .top .title { font-size: 1.1rem; }
  body.app .content { min-width: 0; }
  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; overflow-y: auto; background: var(--g); color: #fff; padding: 20px 14px; gap: 2px; }
  .side .brand { display: grid; justify-items: center; padding: 6px 0 18px; margin-bottom: 8px; border-bottom: 1px solid rgb(255 255 255 / .18); text-decoration: none; color: #fff; }
  .side .brand img { height: 92px; width: auto; }
  .side .who { font-size: .8rem; opacity: .85; margin-top: 10px; text-align: center; }
  .side a.nav { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: #fff; text-decoration: none; font-weight: 550; opacity: .9; }
  .side a.nav:hover { background: rgb(255 255 255 / .12); opacity: 1; }
  .side a.nav[aria-current] { background: #fff; color: var(--g-deep); opacity: 1; }
  .side .group { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; opacity: .65; margin: 14px 12px 4px; }
  .side .foot { margin-top: auto; padding-top: 14px; }
  .wrap { padding: 24px; }
}
@media (min-width: 760px) {
  body.shop .tabs-bar { display: none; }
  body.shop.has-tabs main { padding-bottom: 40px; }
  body.shop .top nav.desk { display: flex; }
  body.shop .searchbar { display: block; }
  body.shop .top .m-only { display: none; }
  .top .logo img { height: 48px; }
}

/* ───────── cards, grids ───────── */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; border: 1px solid var(--line); }
.card + .card { margin-top: 14px; }
.card h2 { display: flex; align-items: center; gap: 8px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 14px; }
.grid.two, .grid.side-r { grid-template-columns: minmax(0, 1fr); }
.grid > * { min-width: 0; }
@media (min-width: 860px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.side-r { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; text-decoration: none; color: inherit; display: grid; gap: 2px; box-shadow: var(--shadow); min-width: 0; }
.kpi .l { font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.kpi .v { font-size: 1.45rem; font-weight: 750; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi .s { font-size: .82rem; color: var(--muted); }
.kpi.hot { background: var(--g); color: #fff; border-color: var(--g); }
.kpi.hot .l, .kpi.hot .s { color: rgb(255 255 255 / .85); }
.kpi.alert .v { color: var(--bad); }

/* ───────── buttons ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--g); background: var(--g); color: #fff; font: 650 .97rem var(--font); text-decoration: none; cursor: pointer; transition: transform .12s, background .2s, box-shadow .2s; white-space: nowrap; }
.btn:hover { background: var(--g-deep); border-color: var(--g-deep); box-shadow: 0 6px 18px rgb(55 135 0 / .25); }
.btn:active { transform: scale(.98); }
.btn.alt { background: #fff; color: var(--g-deep); }
.btn.alt:hover { background: var(--tint); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--g-deep); }
.btn.ghost:hover { background: var(--tint); box-shadow: none; }
.btn.danger { background: #fff; color: var(--bad); border-color: #f0c2bd; }
.btn.danger:hover { background: var(--bad-bg); box-shadow: none; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: .88rem; }
.btn.block { width: 100%; }
.btn.lg { min-height: 54px; font-size: 1.05rem; padding: 0 26px; }
.btn[disabled], .btn.busy { opacity: .55; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ───────── forms ───────── */
form { margin: 0; }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 5px; font-weight: 600; font-size: .9rem; min-width: 0; }
.field small { font-weight: 400; color: var(--muted); }
.row2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .row2 { grid-template-columns: 1fr 1fr; } .row3 { grid-template-columns: 1fr 1fr 1fr; } }
input, select, textarea { font: 400 16px var(--font); color: var(--ink); width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line2); border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 96px; resize: vertical; }
select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2358684f' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 18px; padding-right: 38px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--g); box-shadow: 0 0 0 4px rgb(55 135 0 / .14); }
[aria-invalid="true"], .field:has([aria-invalid="true"]) input { border-color: var(--bad); }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--g); padding: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: .95rem; }
.check input { margin-top: 2px; }
.choice-row { display: grid; gap: 10px; }
.choice-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--line2); border-radius: 14px; cursor: pointer; font-weight: 500; background: #fff; }
.choice-card:has(input:checked) { border-color: var(--g); background: var(--tint); box-shadow: 0 0 0 3px rgb(55 135 0 / .12); }
.choice-card b { display: block; }
.choice-card small { color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.filters input[type="search"] { flex: 1 1 220px; min-height: 42px; border-radius: 999px; }
.filters select { width: auto; min-height: 42px; border-radius: 999px; }

/* chips / segmented tabs */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 15px; border-radius: 999px; border: 1.5px solid var(--line2); background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; }
.chip[aria-current] { background: var(--g); border-color: var(--g); color: #fff; }
.chip .n { background: var(--bad); color: #fff; border-radius: 9px; font-size: .72rem; padding: 0 6px; }

/* badges */
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; background: #eef0ec; color: #4b5545; }
.tone-ok { background: var(--ok-bg); color: var(--ok); }
.tone-info { background: var(--info-bg); color: var(--info); }
.tone-warn { background: var(--warn-bg); color: var(--warn); }
.tone-bad { background: var(--bad-bg); color: var(--bad); }

/* flash messages */
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; font-weight: 550; }
.flash.ok { background: var(--ok-bg); color: var(--g-ink); }
.flash.error { background: var(--bad-bg); color: var(--bad); }
.flash.info { background: var(--info-bg); color: var(--info); }
.note { background: var(--tint); border-radius: 12px; padding: 12px 14px; font-size: .92rem; }
.note.warn { background: var(--warn-bg); color: var(--warn); }
.note.bad { background: var(--bad-bg); color: var(--bad); }

/* ───────── tables → cards on phones ───────── */
.tbl { width: 100%; border-collapse: collapse; font-size: .94rem; }
.tbl th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl a.rowlink { font-weight: 650; text-decoration: none; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #fafcf8; }
.tbl tfoot td { font-weight: 700; border-top: 1.5px solid var(--line); }
@media (max-width: 759px) {
  .tbl.stack thead { display: none; }
  .tbl.stack, .tbl.stack tbody, .tbl.stack tr, .tbl.stack td { display: block; width: 100%; }
  .tbl.stack tr { padding: 12px 2px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; }
  .tbl.stack td { padding: 0; border: 0; }
  .tbl.stack td[data-l]:not(.main):not(.end)::before { content: attr(data-l) ": "; color: var(--muted); font-size: .82rem; }
  .tbl.stack td.main { grid-column: 1; font-weight: 650; }
  .tbl.stack td.end { grid-column: 2; grid-row: 1 / span 2; text-align: right; align-self: center; }
  .tbl.stack td { grid-column: 1; font-size: .9rem; }
  .tbl.stack tfoot { display: block; }
}
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* list rows */
.list { display: grid; }
.list > a, .list > .li { display: flex; align-items: center; gap: 12px; padding: 12px 4px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line); min-width: 0; }
.list > a:last-child, .list > .li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .grow b, .list .grow span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .grow span { color: var(--muted); font-size: .85rem; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--tint2); color: var(--g-deep); font-weight: 750; font-size: .85rem; flex: none; }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.empty svg.i { width: 40px; height: 40px; color: var(--line2); margin: 0 auto 8px; }

/* dialogs (bottom sheet on phones) */
dialog { border: 0; padding: 0; border-radius: 22px; width: min(520px, calc(100vw - 24px)); max-height: 88dvh; box-shadow: 0 30px 80px rgb(0 0 0 / .25); color: var(--ink); }
dialog::backdrop { background: rgb(14 30 6 / .45); backdrop-filter: blur(2px); }
dialog .sheet { padding: 20px; display: grid; gap: 14px; }
dialog .sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
dialog .sheet-head h2 { margin: 0; }
@media (max-width: 599px) {
  dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 22px 22px 0 0; padding-bottom: var(--safe-b); }
  dialog[open] { animation: up .28s var(--ease); }
}
@keyframes up { from { transform: translateY(40px); opacity: .4; } }

/* toast */
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--tab) + var(--safe-b) + 14px); transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 600; transition: .25s var(--ease); pointer-events: none; max-width: calc(100vw - 32px); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.timeline li { display: grid; grid-template-columns: 14px 1fr; gap: 10px; font-size: .92rem; }
.timeline li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--g); margin-top: 6px; box-shadow: 0 0 0 4px var(--tint); }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 6px 0 14px; }
.steps span { height: 6px; border-radius: 3px; background: var(--line); }
.steps span.on { background: var(--g); }
.steps-l { display: grid; grid-template-columns: repeat(5, 1fr); font-size: .7rem; color: var(--muted); text-align: center; gap: 4px; }

/* key-value */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .93rem; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kv dd.num, .kv dd:only-of-type { white-space: nowrap; }
.kv .total { font-weight: 800; font-size: 1.1rem; color: var(--ink); }

/* bar chart (server-rendered SVG) */
.chart { width: 100%; height: 160px; display: block; }
.chart rect { fill: var(--g); }
.chart rect.z { fill: var(--line); }
.bars { display: grid; gap: 8px; }
.bars .b { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; font-size: .9rem; }
.bars .b .t { height: 8px; grid-column: 1 / -1; background: var(--tint); border-radius: 4px; overflow: hidden; }
.bars .b .t i { display: block; height: 100%; background: var(--g); border-radius: 4px; }

/* ───────── shop ───────── */
.hero { background: var(--g); color: #fff; position: relative; overflow: hidden; isolation: isolate; border-radius: 0 0 32px 32px; }
.hero-in { max-width: 1240px; margin: 0 auto; padding: 26px 20px 40px; display: grid; gap: 18px; align-items: center; }
.hero h1 { font-size: clamp(1.9rem, 1.3rem + 3vw, 3.4rem); font-weight: 750; letter-spacing: -.025em; margin: 0; max-width: 14ch; }
.hero p { font-size: 1.08rem; opacity: .92; max-width: 46ch; margin: 0; }
.hero .logo-big { width: 76px; filter: drop-shadow(0 8px 20px rgb(0 0 0 / .2)); }
.hero .btn { background: #fff; color: var(--g-deep); border-color: #fff; }
.hero .btn.alt { background: transparent; color: #fff; border-color: rgb(255 255 255 / .7); }
.hero .leaf { position: absolute; z-index: -1; width: 560px; height: 280px; border-radius: 560px 560px 0 0; background: var(--g-hi); opacity: .32; }
.hero .leaf::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 46%; background: var(--g); border-radius: 50% 50% 0 0 / 100% 100% 0 0; }
.hero .leaf.a { top: -150px; right: -250px; transform: rotate(-14deg); }
.hero .leaf.b { bottom: -190px; left: -280px; transform: rotate(166deg); opacity: .22; }
@media (min-width: 860px) { .hero-in { grid-template-columns: 1fr auto; padding: 56px 32px 72px; } .hero .logo-big { width: 210px; order: 2; } }
.trust { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0 6px; }
@media (min-width: 760px) { .trust { grid-template-columns: repeat(4, 1fr); } }
.trust div { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; font-size: .88rem; font-weight: 600; }
.trust svg.i { color: var(--g); }
.section-h { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.section-h h2 { font-size: 1.35rem; margin: 0; }
.cats { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; display: grid; justify-items: center; gap: 6px; width: 92px; text-decoration: none; color: var(--ink); font-size: .82rem; font-weight: 600; text-align: center; }
.cat .ci { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--g); border: 2px solid transparent; }
.cat[aria-current] .ci, .cat:hover .ci { border-color: var(--g); }
.cat .ci svg.i { width: 30px; height: 30px; }
.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1040px) { .products { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.pcard { background: #fff; border-radius: 18px; border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; min-width: 0; box-shadow: var(--shadow); transition: transform .2s var(--ease), box-shadow .2s; }
.pcard:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgb(20 35 16 / .12); }
.pcard .ph { aspect-ratio: 1; display: block; position: relative; background: var(--tint); }
.pcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.pcard .off { position: absolute; top: 10px; left: 10px; background: var(--g); color: #fff; font-size: .74rem; font-weight: 750; padding: 3px 8px; border-radius: 999px; }
.pcard .body { padding: 10px 12px 12px; display: grid; gap: 4px; flex: 1; align-content: start; }
.pcard .nm { font-weight: 650; color: var(--ink); text-decoration: none; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.pcard .pk { font-size: .8rem; color: var(--muted); }
.pcard .pr { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.pcard .pr b { font-size: 1.1rem; }
.pcard .pr s { color: var(--muted); font-size: .85rem; }
.pcard form { margin-top: 8px; }
.pcard .btn { width: 100%; min-height: 40px; font-size: .9rem; }
.ph-art { width: 100%; height: 100%; display: grid; place-items: center; color: var(--g); background: radial-gradient(circle at 30% 25%, #fff 0 18%, transparent 19%), linear-gradient(145deg, var(--tint), var(--tint2)); }
.ph-art svg { width: 46%; height: auto; opacity: .9; }
.ph-art .mono { position: absolute; bottom: 10px; right: 12px; font-weight: 800; font-size: .8rem; color: var(--g-deep); opacity: .55; letter-spacing: .1em; }
.pd { display: grid; gap: 20px; }
@media (min-width: 860px) { .pd { grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; } }
.pd .media { border-radius: 24px; overflow: hidden; aspect-ratio: 1; background: var(--tint); position: relative; }
.pd .media img { width: 100%; height: 100%; object-fit: cover; }
.pd .price { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.pd .price b { font-size: 1.8rem; }
.pd .price s { color: var(--muted); }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line2); border-radius: 999px; overflow: hidden; background: #fff; }
.qty button { width: 42px; height: 44px; border: 0; background: transparent; font-size: 1.3rem; color: var(--g-deep); cursor: pointer; }
.qty input { width: 52px; min-height: 44px; border: 0; text-align: center; padding: 0; border-radius: 0; font-weight: 700; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty input:focus { box-shadow: none; }
.buybar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sticky-buy { position: sticky; bottom: calc(var(--tab) + var(--safe-b) + 8px); z-index: 5; }
@media (min-width: 760px) { .sticky-buy { position: static; } }
.cartline { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cartline .thumb { width: 72px; height: 72px; border-radius: 14px; overflow: hidden; background: var(--tint); position: relative; }
.cartline .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cartline .nm { font-weight: 650; text-decoration: none; color: var(--ink); display: block; }
.summary { position: sticky; top: calc(var(--top) + 16px); }
.foot { background: var(--g-deep); color: #dbe9cf; margin-top: 40px; }
.foot-in { max-width: 1240px; margin: 0 auto; padding: 26px max(18px, env(safe-area-inset-left)) calc(22px + var(--tab) + var(--safe-b)); display: grid; gap: 22px; font-size: .92rem; }
.foot a { color: #fff; text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot-brand { display: flex; gap: 12px; align-items: center; }
.foot-brand img { height: 48px; width: auto; flex: none; }
.foot-brand b { display: block; color: #fff; font-size: .95rem; }
.foot-brand span { display: block; font-size: .82rem; opacity: .85; }
.foot-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; border-top: 1px solid rgb(255 255 255 / .14); padding-top: 18px; }
.foot-cols h2 { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #b9d3a4; margin: 0 0 4px; font-weight: 700; }
.foot-cols ul { list-style: none; margin: 0; padding: 0; }
.foot-cols li a, .foot .linkish { display: flex; align-items: center; min-height: 40px; color: #fff; font: inherit; font-weight: 500; }
.foot .linkish { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.foot-row { display: grid; gap: 14px; border-top: 1px solid rgb(255 255 255 / .14); padding-top: 18px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: rgb(0 0 0 / .18); border-radius: 999px; padding: 4px; max-width: 360px; }
.seg a { display: grid; place-items: center; min-height: 40px; padding: 0 16px; white-space: nowrap; border-radius: 999px; color: #e7f1df; font-weight: 600; }
.seg a:hover { text-decoration: none; background: rgb(255 255 255 / .08); }
.seg a[aria-current] { background: #fff; color: var(--g-deep); }
.foot-contact { display: flex; flex-wrap: wrap; gap: 8px; }
.foot .pill { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: rgb(255 255 255 / .1); }
.foot .pill:hover { text-decoration: none; background: rgb(255 255 255 / .16); }
.foot-legal { margin: 0; font-size: .78rem; opacity: .7; }
@media (min-width: 760px) {
  .foot-in { grid-template-columns: 1.2fr 2fr; align-items: start; padding-bottom: 30px; column-gap: 48px; }
  .foot-cols { grid-template-columns: repeat(3, 1fr); border-top: 0; padding-top: 0; }
  .foot-row { grid-column: 1 / -1; grid-template-columns: auto 1fr; align-items: center; }
  .foot-row .seg { min-width: 320px; }
  .foot-contact { justify-content: flex-end; }
  .foot-legal { grid-column: 1 / -1; }
}
/* Installed app: the tab bar does the navigating, so the footer stays short. */
@media (display-mode: standalone) { .foot-brand span, .foot-cols > div:nth-child(2) { display: none; } }

/* login / auth */
.auth { min-height: calc(100dvh - var(--top)); display: grid; place-items: start center; padding: 24px 16px 100px; }
.auth .card { width: min(460px, 100%); padding: 24px; }
.auth .brandmark { display: grid; place-items: center; background: var(--g); border-radius: 20px; padding: 22px; margin: -8px -8px 18px; }
.auth .brandmark img { height: 110px; width: auto; }

/* business order form */
.olist { display: grid; gap: 10px; }
.oitem { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.oitem .thumb { width: 56px; height: 56px; border-radius: 12px; overflow: hidden; position: relative; background: var(--tint); }
.oitem .thumb img { width: 100%; height: 100%; object-fit: cover; }
.oitem .meta { min-width: 0; }
.oitem .meta b { display: block; line-height: 1.25; }
.oitem .meta span { font-size: .82rem; color: var(--muted); }
.oitem .ctl { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
@media (min-width: 640px) { .oitem { grid-template-columns: 56px 1fr auto; } .oitem .ctl { grid-column: auto; } }
.oitem.on { border-color: var(--g); box-shadow: 0 0 0 3px rgb(55 135 0 / .1); }
.totalbar { position: sticky; bottom: calc(var(--tab) + var(--safe-b) + 8px); z-index: 6; background: var(--ink); color: #fff; border-radius: 18px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; box-shadow: 0 14px 34px rgb(0 0 0 / .25); margin-top: 14px; }
.totalbar .t { flex: 1; min-width: 0; }
.totalbar .t b { font-size: 1.2rem; display: block; }
.totalbar .t span { font-size: .8rem; opacity: .8; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.totalbar .btn { background: var(--g-hi); border-color: var(--g-hi); }
@media (min-width: 1000px) { body.app .totalbar { bottom: 16px; } }

/* more menu */
.menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .menu-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.menu-grid a, .menu-grid button { display: grid; justify-items: center; gap: 8px; padding: 16px 6px; border-radius: 16px; background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font: 600 .84rem var(--font); text-align: center; cursor: pointer; }
.menu-grid .ic { width: 46px; height: 46px; border-radius: 14px; background: var(--tint); color: var(--g); display: grid; place-items: center; }

/* install banner */
.install { display: none; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.install.show { display: flex; }
.install img { width: 44px; height: 44px; border-radius: 12px; }
.install .t { flex: 1; font-size: .9rem; }
.install .t b { display: block; font-size: .98rem; }

/* print (invoice opens on its own page) */
@media print { .top, .tabs-bar, .side, .no-print { display: none !important; } body { background: #fff; } .card { box-shadow: none; border: 0; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.stack { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-content: start; }
.thumb .ph-art .mono { display: none; }
.thumb .ph-art svg { width: 60%; }

/* Phone hero: the header already carries the logo, so the hero is just the message and the two actions. */
@media (max-width: 859px) {
  .hero .logo-big { display: none; }
  .hero-in { padding: 22px 20px 30px; gap: 14px; }
  .hero h1 { font-size: 2.1rem; max-width: 12ch; }
  .hero p { font-size: 1rem; }
  .hero .btn-row { flex-wrap: nowrap; }
  .hero .btn-row .btn.lg { flex: 1 1 0; min-width: 0; min-height: 50px; padding: 0 12px; font-size: 1rem; }
}
.pincheck { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px; }
.pincheck label { display: flex; gap: 6px; align-items: center; font-weight: 650; }
.pincheck input { min-height: 40px; }
.pincheck p { margin: 0; }
.thumbs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.thumbs-grid figure { margin: 0; display: grid; gap: 6px; position: relative; }
.thumbs-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--tint); }
.thumbs-grid figcaption { position: absolute; top: 8px; left: 8px; }
/* shop product gallery: swipe on phones, thumbnails on wider screens */
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 24px; background: var(--tint); aspect-ratio: 1; }
.gallery::-webkit-scrollbar { display: none; }
.gallery > * { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 1; position: relative; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gal-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.gal-thumbs button { flex: none; width: 64px; height: 64px; padding: 0; border-radius: 12px; overflow: hidden; border: 2px solid transparent; background: var(--tint); cursor: pointer; }
.gal-thumbs button[aria-current] { border-color: var(--g); }
.gal-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.prose { padding: 24px; line-height: 1.65; }
.prose h2 { margin-top: 1.4em; font-size: 1.25rem; }
.prose h3 { margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 4px 0; }
@media (min-width: 760px) { .prose { padding: 36px 40px; } }
.variants { display: flex; flex-wrap: wrap; gap: 8px; }
.pcard .btn.alt { width: 100%; }
.announce { display: block; background: var(--g-deep); color: #fff; text-align: center; font-size: .88rem; font-weight: 600; padding: 8px 16px; text-decoration: none; }
a.announce:hover { text-decoration: underline; }
.hero .hero-img { height: auto; width: 100%; max-width: 460px; aspect-ratio: 1; object-fit: cover; border-radius: 28px; box-shadow: 0 20px 50px rgb(0 0 0 / .25); }
@media (min-width: 860px) { .hero .hero-img { order: 2; width: 380px; } }
@media (max-width: 859px) { .hero .hero-img { order: 2; max-width: 100%; aspect-ratio: 16 / 10; } }
.stories { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 700px) { .stories { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.story { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .2s var(--ease); }
.story:hover { transform: translateY(-2px); }
.story .ph { aspect-ratio: 16 / 10; background: var(--tint); position: relative; display: block; }
.story .ph img { width: 100%; height: 100%; object-fit: cover; }
.story .body { padding: 12px 14px 14px; display: grid; gap: 4px; }
.story .kicker { font-size: .72rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--g); }
.story b { font-size: 1.05rem; line-height: 1.3; }
.prose .cover { height: auto; width: calc(100% + 48px); max-width: none; margin: -24px -24px 18px; aspect-ratio: 16 / 9; object-fit: cover; }
@media (min-width: 760px) { .prose .cover { width: calc(100% + 80px); margin: -36px -40px 22px; } }
.prose .lead { font-size: 1.1rem; color: var(--muted); }
.recipe-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 12px 14px; background: var(--tint); border-radius: 12px; font-weight: 600; }
.recipe-meta span { display: inline-flex; gap: 6px; align-items: center; }
.ingredients li::marker { color: var(--g); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; max-height: 260px; overflow: auto; padding: 4px; border: 1px solid var(--line); border-radius: 12px; }
[hidden] { display: none !important; }
.totalbar .btn.alt { background: transparent; color: #fff; border-color: rgb(255 255 255 / .55); }
@media (max-width: 420px) { .totalbar .btn { padding-inline: 12px; font-size: .9rem; } }

/* ───────── ratings & reviews ───────── */
.stars { position: relative; display: inline-block; line-height: 1; font-size: 1rem; letter-spacing: 1px; vertical-align: -1px; white-space: nowrap; }
.stars.lg { font-size: 1.5rem; }
.stars .s-bg { color: #d9dfd3; }
.stars .s-fg { position: absolute; inset: 0 auto 0 0; overflow: hidden; color: #e8a317; }
.rating-line { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--muted); text-decoration: none; }
.rating-line b { color: var(--ink); }
.pcard .rating-line { font-size: .8rem; margin-top: 2px; }
.reviews-sum { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 22px; align-items: center; }
.reviews-sum .big { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.hist { display: grid; gap: 4px; font-size: .85rem; }
.hist .r { display: grid; grid-template-columns: 2.2em minmax(0, 1fr) 2.5em; gap: 8px; align-items: center; }
.hist .t { height: 8px; background: var(--tint); border-radius: 4px; overflow: hidden; }
.hist .t i { display: block; height: 100%; background: #e8a317; }
.review { padding: 14px 0; border-top: 1px solid var(--line); }
.review:first-child { border-top: 0; }
.review h3 { font-size: 1rem; margin: 6px 0 4px; }
.review p { margin: 4px 0; overflow-wrap: anywhere; }
.review .meta { font-size: .82rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.review .verified { color: var(--ok); font-weight: 600; }
.review .reply { margin-top: 8px; background: var(--tint); border-radius: 10px; padding: 10px 12px; font-size: .92rem; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { font-size: 2rem; line-height: 1; color: #d9dfd3; cursor: pointer; padding: 2px; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: #e8a317; }
.star-input input:focus-visible + label { outline: 2px solid var(--g); border-radius: 4px; }
.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; }

/* ───────── coupons, gift cards, wishlist, account ───────── */
.codes { display: grid; gap: 8px; margin: 10px 0 12px; }
.codes details summary { cursor: pointer; font-weight: 600; color: var(--g-deep); font-size: .92rem; padding: 4px 0; }
.code-form { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.code-form input { flex: 1; min-width: 0; text-transform: uppercase; }
.code-form input[type=email], .code-form input[readonly] { text-transform: none; }
.code-on { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--tint); border-radius: 12px; padding: 8px 12px; font-size: .92rem; }
.code-on > span { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; min-width: 0; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--g-deep); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.pcard { position: relative; }
.wish-card { position: absolute; top: 8px; right: 8px; z-index: 2; margin: 0; }
.wish { display: inline-flex; align-items: center; gap: 6px; border: 0; background: rgb(255 255 255 / .92); color: var(--ink); border-radius: 999px; cursor: pointer; font: inherit; font-weight: 600; }
.wish-card .wish { width: 38px; height: 38px; justify-content: center; box-shadow: 0 2px 8px rgb(0 0 0 / .12); }
.wish svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.wish.on svg { fill: #d43f3a; stroke: #d43f3a; }
.wish-line .wish { padding: 8px 2px; background: none; color: var(--g-deep); }
.gc-hero { background: linear-gradient(135deg, var(--g) 0%, #24590a 100%); color: #fff; border-radius: 18px; padding: 22px; display: flex; justify-content: space-between; align-items: flex-end; aspect-ratio: 1.75; max-height: 220px; margin-bottom: 14px; box-shadow: 0 10px 30px rgb(36 89 10 / .25); }
.gc-hero b { display: block; font-size: 1.15rem; } .gc-hero span { opacity: .85; font-size: .9rem; }
.gc-hero .gc-amt { font-size: 2.2rem; font-weight: 800; opacity: 1; }
.gc-amounts { flex-wrap: wrap; overflow: visible; }
.gc-amounts .chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gc-amounts .chip:has(input:checked) { background: var(--g); border-color: var(--g); color: #fff; }
.gc-amounts .chip:has(input:focus-visible) { outline: 2px solid var(--g-deep); outline-offset: 2px; }
.acct-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.acct-links .card { text-decoration: none; color: inherit; display: grid; gap: 2px; padding: 14px; }
.addr-pick { margin-bottom: 6px; }
@media (max-width: 420px) { .acct-links { gap: 8px; } .acct-links .card { padding: 12px 10px; font-size: .92rem; } }
.push-card { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.push-card > div { flex: 1 1 220px; min-width: 0; }
[data-push].on { background: var(--tint); border-color: var(--g); }

/* ───────── spotlight tips ───────── */
.tour-layer { position: fixed; inset: 0; z-index: 1000; }
.tour-hole { position: fixed; z-index: 1001; border-radius: 14px; box-shadow: 0 0 0 9999px rgb(10 25 5 / .62); pointer-events: none; transition: all .25s ease; outline: 2px solid #fff; }
.tour-pop { position: fixed; z-index: 1002; background: #fff; color: var(--ink); border-radius: 16px; padding: 14px 16px; box-shadow: 0 18px 40px rgb(0 0 0 / .3); outline: none; }
.tour-pop h3 { margin: 2px 0 4px; font-size: 1.05rem; }
.tour-pop p { margin: 0 0 12px; font-size: .95rem; line-height: 1.45; }
.tour-count { font-size: .75rem; color: var(--muted); font-weight: 700; letter-spacing: .04em; }
.tour-btns { display: flex; align-items: center; gap: 8px; }
.tour-welcome .sheet { text-align: center; display: grid; gap: 10px; }
.tour-welcome img { margin: 0 auto; border-radius: 16px; }
.tour-welcome ul { text-align: left; margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.tour-langs { justify-content: center; flex-wrap: wrap; overflow: visible; }
@media (prefers-reduced-motion: reduce) { .tour-hole { transition: none; } }
.help { display: grid; gap: 10px; }
.help details summary { cursor: pointer; font-weight: 700; padding: 2px 0; }
.help details[open] summary { margin-bottom: 8px; }
.help ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.help p { margin: 6px 0; }
.checklist .li { align-items: center; }
.checklist .tick { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; border: 2px solid var(--line2); flex: none; font-size: .9rem; }
.checklist .done .tick { background: var(--g); border-color: var(--g); color: #fff; }
.checklist .done b { text-decoration: line-through; color: var(--muted); }
.push-preview { display: flex; gap: 12px; align-items: flex-start; background: #f1f3f0; border-radius: 18px; padding: 12px 14px; max-width: 420px; }
.push-preview img { width: 38px; height: 38px; border-radius: 10px; flex: none; }
.push-preview > div { min-width: 0; flex: 1; }
.push-preview .pp-top { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); margin-bottom: 2px; }
.push-preview b { display: block; overflow-wrap: anywhere; }
.push-preview p { margin: 2px 0 0; font-size: .92rem; color: var(--ink, #222); overflow-wrap: anywhere; white-space: pre-line; }
.bar { height: 8px; background: var(--line2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--g); transition: width .4s; }
[data-count-for].over { color: var(--danger, #b42318); }

/* ───────── feels like a native app on Android and iPhone ───────── */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { touch-action: manipulation; }
.tabs-bar, .top, .btn, .chip, .icon-btn, .seg { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.tabs-bar { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.top-in { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
@media (hover: none) {
  .tabs-bar a:active { transform: scale(.92); }
  .btn:active, .chip:active, .icon-btn:active { transform: scale(.97); }
  .pcard:active, .choice-card:active, .li:active { transform: scale(.985); }
  .tabs-bar a, .btn, .chip, .icon-btn, .pcard, .choice-card, .li { transition: transform .12s ease; }
}
@media (display-mode: standalone) {
  html, body { overscroll-behavior-y: none; }
  html { background: var(--g); }
}
/* Smooth change between pages (Chrome on Android, Safari 18+ on iPhone); header and tab bar stay put. */
@view-transition { navigation: auto; }
.top { view-transition-name: mn-top; }
.tabs-bar { view-transition-name: mn-tabs; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
.pd-title { display: flex; align-items: flex-start; gap: 8px; justify-content: space-between; }
.share-btn { color: var(--g-deep); background: var(--tint); flex: none; }
.invite-card { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.invite-card .grow { flex: 1; min-width: 240px; }
.invite-qr svg { display: block; width: 156px; height: 156px; border-radius: 12px; border: 1px solid var(--line); }
.earn-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.earn-steps li { display: flex; gap: 12px; align-items: flex-start; }
.earn-steps li > b { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--tint); color: var(--g-deep); display: grid; place-items: center; font-size: .9rem; }
.grid.three { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .grid.three { grid-template-columns: repeat(3, 1fr); } }
.banner-preview { background: var(--tint); border-radius: 14px; display: grid; place-items: center; padding: 8px; min-height: 220px; }
.banner-preview img { display: block; max-width: 100%; max-height: 56vh; border-radius: 10px; box-shadow: 0 6px 18px rgb(0 0 0 / .14); }
.banner-dlg .chips .chip { font: inherit; }

/* courier booking */
.ship-rates { display: grid; gap: 8px; margin-top: 6px; }
.ship-rate { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--card, #fff); }
.ship-rate:has(input:checked) { border-color: var(--g); background: var(--tint); }
.ship-rate input { margin-top: 3px; accent-color: var(--g); }
.ship-rate span { display: grid; gap: 2px; }
.ship-rate small { color: var(--muted); font-size: .82rem; }
.ship-card .li .grow > span { display: block; }
.ship-card .li { display: flex; gap: 12px; align-items: center; }
