/* finesse · register=h5+commerce · morph=A-app-shell+D-commerce-stack · A=white+orange(#FB7701, 后台可改)
 * B=system-CJK + 价格整数放大 · C=参照站版面：App 横幅/搜索页首/分类文字标签/信任条/无框双列网格/深色页脚
 * D=css-transitions+cart-arc · SOUL=4 SPECTACLE=2 DENSITY=8 */

:root {
  --bg: #ffffff;
  --card: #ffffff;
  --sunk: #f6f6f6;
  --ink: #222222;
  --ink-2: #555555;
  --dim: #777777;
  --line: #eeeeee;
  --line-2: #dddddd;
  --accent: #FB7701;
  --accent-ink: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, #ffffff);
  --accent-deep: color-mix(in srgb, var(--accent) 78%, #000000);
  --trust: #348623;
  --strip: #000000;
  --ok: #2e7a52;
  --ok-soft: #e4f2ea;
  --wait: #9a5b00;
  --wait-soft: #fbf0dc;
  --bad: #b3261e;
  --demo: #5b5fc7;
  --r-card: 14px;
  --r-sheet: 22px;
  --ease: cubic-bezier(.32, .86, .28, 1);
  --shadow: 0 10px 30px -18px rgba(70, 20, 38, .45);
  --tab-h: 58px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "PingFang TC", "Hiragino Sans", "Noto Sans SC",
          "Noto Sans TC", "Noto Sans JP", "Noto Sans KR", "Malgun Gothic", "Noto Sans Thai", "Segoe UI", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow-x: clip; }
body {
  overflow: hidden; background: #2a1f22; color: var(--ink);
  font: 14px/1.5 var(--font); display: flex; align-items: center; justify-content: center;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- frame ---------- */
.phone {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  background: var(--bg); display: flex; flex-direction: column;
}
@media (min-width: 560px) {
  body { background: radial-gradient(120% 90% at 50% 0%, #4a3238 0%, #22181b 62%); }
  .phone {
    width: 406px; height: min(880px, 94vh); border-radius: 46px;
    border: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 46px 120px -30px rgba(0, 0, 0, .9), 0 0 0 10px #1b1315;
  }
}
.status {
  flex: none; height: calc(env(safe-area-inset-top) + 40px);
  padding: env(safe-area-inset-top) 26px 0; display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 600; color: var(--ink); background: var(--bg); position: relative; z-index: 70;
}
.status-icons { display: flex; gap: 6px; align-items: center; fill: currentColor; }
.home-ind {
  position: absolute; z-index: 90; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom) + 5px); width: 118px; height: 4px; border-radius: 99px;
  background: var(--ink); opacity: .16; pointer-events: none;
}

.views { flex: 1; position: relative; min-height: 0; }
.view {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: clip; display: none;
  padding-bottom: calc(env(safe-area-inset-bottom) + var(--tab-h) + 28px);
  scrollbar-width: none;
}
.view::-webkit-scrollbar, .scroll::-webkit-scrollbar, .rail::-webkit-scrollbar { display: none; }
.view.on { display: block; }

/* ---------- tabbar (edge-to-edge) ---------- */
.tabbar {
  position: absolute; z-index: 40; left: 0; right: 0; bottom: 0;
  height: calc(env(safe-area-inset-bottom) + var(--tab-h) + 10px);
  padding: 4px 6px calc(env(safe-area-inset-bottom) + 10px);
  background: rgba(255, 252, 251, .92); backdrop-filter: blur(18px) saturate(150%);
  border-top: 1px solid var(--line); display: flex;
}
.tabbar button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 11px; color: var(--dim); position: relative; min-height: 48px;
  transition: transform .18s var(--ease);
}
.tabbar button:active { transform: scale(.94); }
.tabbar .ico { width: 44px; height: 28px; border-radius: 99px; display: grid; place-items: center; transition: background .25s var(--ease); }
.tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button.on { color: var(--accent); font-weight: 600; }
.tabbar button.on .ico { background: var(--accent-soft); }
.tabbar button.on svg { stroke-width: 2; }
.badge {
  position: absolute; top: 2px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px;
  border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 10.5px; font-weight: 700;
  line-height: 17px; text-align: center; border: 1.5px solid var(--card);
}
.badge.pop { animation: pop .42s var(--ease); }
@keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.5); } 100% { transform: scale(1); } }

/* ---------- push layers ---------- */
.layer {
  position: absolute; left: 0; right: 0; bottom: 0; top: calc(env(safe-area-inset-top) + 40px);
  z-index: 60; background: var(--bg); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .42s var(--ease); box-shadow: -12px 0 30px -20px rgba(40, 10, 20, .35);
}
.layer.on { transform: none; }
.layer.under { transform: translateX(-22%); }
.layer .scroll { flex: 1; overflow-y: auto; overflow-x: clip; scrollbar-width: none; }
.layer .scroll.pad-bar { padding-bottom: calc(env(safe-area-inset-bottom) + 84px); }
.layer .scroll.pad-sm { padding-bottom: calc(env(safe-area-inset-bottom) + 28px); }

.topbar {
  flex: none; height: 48px; display: flex; align-items: center; gap: 4px; padding: 0 6px;
  background: var(--bg); border-bottom: 1px solid transparent; position: relative; z-index: 2;
}
.topbar.line { border-bottom-color: var(--line); }
.topbar h1 { flex: 1; font-size: 16.5px; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .sp { flex: 1; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; position: relative; flex: none;
  transition: background .18s, transform .18s var(--ease);
}
.icon-btn:active { background: var(--sunk); transform: scale(.94); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .badge { top: 4px; left: 26px; }

/* ---------- common blocks ---------- */
.pad { padding: 0 14px; }
.sec { margin-top: 18px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; padding: 0 14px; margin-bottom: 10px; }
.sec-h h2 { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.sec-h a, .link { color: var(--dim); font-size: 13px; display: inline-flex; align-items: center; min-height: 32px; }
.card { background: var(--card); border-radius: var(--r-card); border: 1px solid var(--line); }
.muted { color: var(--dim); }
.small { font-size: 12.5px; }
.tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; background: var(--accent-soft); color: var(--accent-deep); white-space: nowrap;
}
.tag.gray { background: var(--sunk); color: var(--ink-2); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.wait { background: var(--wait-soft); color: var(--wait); }
.demo-tag { color: var(--demo); font-size: 11.5px; font-weight: 600; }
.price { color: var(--accent); font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.price small { font-size: .62em; font-weight: 700; margin-right: 1px; }
.strike { color: var(--dim); text-decoration: line-through; font-size: 12px; font-variant-numeric: tabular-nums; }

.btn {
  height: 46px; padding: 0 18px; border-radius: 99px; font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
  transition: transform .16s var(--ease), filter .16s;
}
.btn:active { transform: scale(.97); filter: brightness(.94); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.soft { background: var(--accent-soft); color: var(--accent-deep); }
.btn.ghost { background: var(--card); border: 1px solid var(--line-2); color: var(--ink); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.demo { background: transparent; border: 1.5px dashed var(--demo); color: var(--demo); height: 40px; font-size: 13.5px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 14px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 34px; padding: 0 14px; border-radius: 99px; background: var(--card);
  border: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); white-space: nowrap;
  transition: transform .16s var(--ease);
}
.chip:active { transform: scale(.96); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }

/* ---------- home ---------- */
.home-head { padding: 6px 14px 10px; display: flex; align-items: center; gap: 10px; }
.logo { font-size: 21px; font-weight: 900; letter-spacing: -.03em; color: var(--accent); }
.logo-note { font-size: 10.5px; color: var(--dim); border: 1px dashed var(--line-2); border-radius: 6px; padding: 1px 5px; }
.region-btn {
  margin-left: auto; height: 34px; padding: 0 10px 0 8px; border-radius: 99px; background: var(--card);
  border: 1px solid var(--line); display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--ink-2);
}
.region-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.search-bar {
  margin: 0 14px; height: 42px; border-radius: 99px; background: var(--card); border: 1.5px solid var(--accent);
  display: flex; align-items: center; gap: 8px; padding: 0 5px 0 14px; color: var(--dim); font-size: 14px; width: calc(100% - 28px);
}
.search-bar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; flex: none; }
.search-bar .go { margin-left: auto; height: 32px; padding: 0 14px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 13.5px; display: grid; place-items: center; }
.quick-cats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 14px 10px 0; }
.qc { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-2); min-height: 44px; }
.qc .ph { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; background: var(--sunk); border: 1px solid var(--line); }
.qc .ph img { width: 100%; height: 100%; object-fit: cover; }
.qc:active .ph { transform: scale(.95); }
.banner {
  margin: 16px 14px 0; height: 132px; border-radius: 16px; overflow: hidden; position: relative; display: block; width: calc(100% - 28px); text-align: left;
}
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(35, 15, 22, .72) 0%, rgba(35, 15, 22, .25) 62%, rgba(35, 15, 22, 0) 100%); }
.banner .txt { position: relative; z-index: 1; padding: 20px 18px; color: #fff8f6; }
.banner b { display: block; font-size: 22px; font-weight: 900; letter-spacing: -.02em; }
.banner span { font-size: 12.5px; opacity: .9; }
.banner .cta { display: inline-flex; margin-top: 10px; height: 28px; padding: 0 12px; border-radius: 99px; background: #fff8f6; color: var(--accent-deep); font-weight: 700; font-size: 12.5px; align-items: center; }

/* group rail on home */
.rail { display: flex; gap: 10px; overflow-x: auto; margin: 0; padding: 0 14px 4px; scroll-snap-type: x mandatory; scroll-padding-inline: 14px; scrollbar-width: none; }
.rail::after { content: ""; flex: none; width: 4px; }
.rail > * { flex: none; scroll-snap-align: start; }
.gmini { width: 138px; text-align: left; }
.gmini .ph { width: 138px; height: 138px; border-radius: 12px; overflow: hidden; background: var(--sunk); position: relative; }
.gmini .ph img { width: 100%; height: 100%; object-fit: cover; }
.gmini .size { position: absolute; left: 6px; top: 6px; }
.gmini .t { margin-top: 6px; font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.gmini .price { font-size: 17px; }

/* product grid */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 10px; }
.pcard { background: var(--card); border-radius: 12px; overflow: hidden; text-align: left; display: flex; flex-direction: column; border: 1px solid var(--line); transition: transform .16s var(--ease); }
.pcard:active { transform: scale(.98); }
.pcard .ph { aspect-ratio: 1; background: var(--sunk); position: relative; }
.pcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.pcard .ph .tag { position: absolute; left: 6px; bottom: 6px; }
.pcard .body { padding: 8px 9px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard .t { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.pcard .row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.pcard .price { font-size: 18px; }
.pcard .add {
  width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent);
  display: grid; place-items: center; position: relative;
}
.pcard .add::before { content: ""; position: absolute; inset: -6px; }
.pcard .add svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.end-note { text-align: center; color: var(--dim); font-size: 12.5px; padding: 18px 0 6px; }
.foot-links { display: flex; justify-content: center; gap: 16px; padding: 4px 0 8px; }

/* ---------- category ---------- */
.cat-wrap { display: grid; grid-template-columns: 86px minmax(0, 1fr); height: 100%; }
#v-cat { padding-bottom: 0; }
#v-cat .cat-wrap { height: calc(100% - 56px); }
.cat-side { background: var(--sunk); overflow-y: auto; padding-bottom: calc(env(safe-area-inset-bottom) + var(--tab-h) + 24px); scrollbar-width: none; }
.cat-side button { display: block; width: 100%; height: 52px; font-size: 13.5px; color: var(--ink-2); position: relative; }
.cat-side button.on { background: var(--bg); color: var(--ink); font-weight: 700; }
.cat-side button.on::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.cat-main { overflow-y: auto; padding: 4px 10px calc(env(safe-area-inset-bottom) + var(--tab-h) + 24px); scrollbar-width: none; }
.cat-main h3 { font-size: 14px; margin: 8px 2px 10px; }
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cat-grid .pcard .t { font-size: 12.5px; }
.cat-grid .pcard .price { font-size: 16px; }

/* ---------- search ---------- */
.search-top { display: flex; align-items: center; gap: 6px; padding: 0 10px 0 4px; height: 52px; }
.search-input {
  flex: 1; height: 38px; border-radius: 99px; background: var(--card); border: 1.5px solid var(--accent);
  padding: 0 14px; font-size: 14.5px; outline: none; min-width: 0;
}
.search-input:focus-visible { box-shadow: 0 0 0 3px var(--accent-soft); }
.hist { padding: 6px 14px; }
.hist h3 { font-size: 14px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.hist .chips { padding: 0; flex-wrap: wrap; }
.sortbar { display: flex; gap: 4px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 2; }
.sortbar button { height: 36px; padding: 0 10px; border-radius: 8px; font-size: 13.5px; color: var(--ink-2); }
.sortbar button.on { color: var(--accent); font-weight: 700; }
.sortbar .filter { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.active-filters { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 14px 0; }
.active-filters .chip { height: 30px; font-size: 12.5px; }
.result-count { padding: 8px 14px 8px; font-size: 12.5px; color: var(--dim); }
.empty { text-align: center; padding: 48px 28px; color: var(--dim); }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 6px; }
.empty .btn { margin-top: 16px; }

/* ---------- PDP ---------- */
.gallery { position: relative; aspect-ratio: 1; background: var(--sunk); }
.gallery .track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery .track::-webkit-scrollbar { display: none; }
.gallery .track img { flex: none; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; }
.gallery .pager { position: absolute; right: 12px; bottom: 12px; background: rgba(35, 25, 28, .62); color: #fff8f6; font-size: 12px; padding: 2px 9px; border-radius: 99px; }
.pdp-float {
  position: absolute; left: 0; right: 0; top: 0; height: 52px; display: flex; align-items: center; padding: 0 6px; gap: 2px; z-index: 3;
  transition: background .25s;
}
.pdp-float.solid { background: var(--bg); border-bottom: 1px solid var(--line); }
.pdp-float .icon-btn { background: rgba(255, 252, 251, .86); width: 38px; height: 38px; margin: 3px; }
.pdp-float .icon-btn::before { content: ""; position: absolute; inset: -3px; }
.pdp-float.solid .icon-btn { background: transparent; }
.pdp-float .icon-btn svg { width: 20px; height: 20px; }
.pdp-float .icon-btn .badge { top: -2px; left: 22px; }
.pdp-info { padding: 14px 14px 4px; background: var(--card); }
.pdp-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pdp-price .price { font-size: 28px; }
.pdp-title { font-size: 17px; font-weight: 700; line-height: 1.4; margin-top: 6px; }
.tax-note { font-size: 12px; color: var(--dim); }
.gb-entry {
  margin: 10px 14px 0; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
  background: var(--accent-soft); width: calc(100% - 28px); text-align: left; color: var(--accent-deep);
}
.gb-entry b { font-size: 15px; }
.gb-entry .go { margin-left: auto; font-weight: 700; font-size: 13px; white-space: nowrap; }
.rows { margin-top: 10px; background: var(--card); }
.rowi {
  display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 10px 14px; border-top: 1px solid var(--line);
  width: 100%; text-align: left; font-size: 14px;
}
.rowi:first-child { border-top: 0; }
.rowi .k { color: var(--dim); width: 44px; flex: none; font-size: 13px; }
.rowi .v { flex: 1; min-width: 0; }
.rowi .v .muted { display: block; font-size: 12.5px; }
.rowi .chev { color: var(--dim); flex: none; }
.rowi .chev svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.need { color: var(--accent); font-weight: 600; }
.block { margin-top: 10px; background: var(--card); padding: 14px; }
.block h3 { font-size: 15px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: baseline; }
.review { padding: 10px 0; border-top: 1px solid var(--line); }
.review:first-of-type { border-top: 0; }
.stars { color: var(--accent); letter-spacing: 1px; font-size: 12px; }

.buybar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; background: rgba(255, 252, 251, .96);
  backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  padding: 8px 10px calc(env(safe-area-inset-bottom) + 10px); display: flex; align-items: center; gap: 2px;
}
.buybar .mini { width: 50px; min-height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11px; color: var(--ink-2); gap: 1px; flex: none; border-radius: 10px; }
.buybar .mini:active { background: var(--sunk); }
.buybar .mini svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.buybar .mini.on { color: var(--accent); }
.buybar .mini.on svg { fill: var(--accent); stroke: var(--accent); }
.seg { flex: 1; display: flex; height: 46px; border-radius: 99px; overflow: hidden; margin-left: 6px; min-width: 0; }
.seg button { flex: 1; font-weight: 700; font-size: 14.5px; white-space: nowrap; transition: filter .16s; padding: 0 6px; }
.seg button:active { filter: brightness(.92); }
.seg .a { background: var(--accent-soft); color: var(--accent-deep); }
.seg .b { background: var(--accent); color: var(--accent-ink); }
.seg.single .b { border-radius: 99px; }
.buybar .total { flex: 1; padding-left: 8px; min-width: 0; }
.buybar .total .price { font-size: 20px; }
.buybar .total .muted { font-size: 11.5px; display: block; line-height: 1.3; }

/* ---------- bottom sheet ---------- */
.scrim { position: absolute; inset: 0; z-index: 80; background: rgba(30, 14, 20, .42); opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 85; background: var(--card);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0; padding: 10px 16px calc(env(safe-area-inset-bottom) + 18px);
  transform: translateY(102%); transition: transform .42s var(--ease); max-height: 86%; overflow-y: auto; scrollbar-width: none;
}
.sheet.on { transform: none; }
.grab { width: 42px; height: 4px; border-radius: 99px; background: var(--ink); opacity: .14; margin: 0 auto 10px; }
.sheet h2 { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.sheet .sub { color: var(--dim); font-size: 12.5px; margin-bottom: 12px; }
.sheet-close { position: absolute; right: 8px; top: 8px; }
.sku-head { display: flex; gap: 12px; align-items: flex-end; margin-bottom: 12px; }
.sku-head img { width: 88px; height: 88px; border-radius: 12px; object-fit: cover; background: var(--sunk); border: 1px solid var(--line); }
.sku-head .price { font-size: 24px; }
.opt-g { margin-top: 12px; }
.opt-g h4 { font-size: 14px; margin-bottom: 8px; }
.opt-g.missing h4 { color: var(--accent); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  min-width: 56px; height: 38px; padding: 0 14px; border-radius: 10px; background: var(--sunk); border: 1.5px solid transparent;
  font-size: 13.5px; transition: transform .14s var(--ease);
}
.opt:active { transform: scale(.96); }
.opt.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-deep); font-weight: 600; }
.opt.out { color: var(--dim); text-decoration: line-through; opacity: .6; }
.qty-row { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 99px; height: 36px; }
.stepper button { width: 38px; height: 36px; font-size: 18px; color: var(--ink-2); }
.stepper button[disabled] { opacity: .3; }
.stepper span { min-width: 30px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.sheet .actions { display: flex; gap: 8px; margin-top: 18px; }
.sheet .actions .btn { flex: 1; }
.list-opt { display: flex; align-items: center; gap: 12px; min-height: 50px; width: 100%; text-align: left; border-top: 1px solid var(--line); padding: 8px 2px; font-size: 14.5px; }
.list-opt:first-of-type { border-top: 0; }
.list-opt .muted { margin-left: auto; font-size: 13px; }
.list-opt .tick { color: var(--accent); font-weight: 800; width: 18px; }
.sheet h3 { font-size: 13px; color: var(--dim); font-weight: 600; margin: 14px 0 4px; }

/* ---------- forms ---------- */
.field { margin-top: 12px; }
.field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--card); padding: 0 14px; font-size: 15px; outline: none;
}
.field textarea { height: 80px; padding: 10px 14px; resize: none; }
.field input:focus-visible, .field select:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field .err { color: var(--bad); font-size: 12.5px; margin-top: 5px; }
.field.bad input { border-color: var(--bad); }
.hint { font-size: 12.5px; color: var(--dim); margin-top: 6px; line-height: 1.5; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 13.5px; line-height: 1.5; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin-top: 1px; }
.code-input { letter-spacing: .4em; font-size: 20px !important; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.demo-box { margin-top: 12px; border: 1.5px dashed var(--demo); border-radius: 12px; padding: 10px 12px; color: var(--demo); font-size: 13px; background: rgba(91, 95, 199, .05); }

/* ---------- cart ---------- */
.cart-head { padding: 8px 14px 4px; display: flex; align-items: baseline; justify-content: space-between; }
.cart-head h1 { font-size: 22px; font-weight: 900; letter-spacing: -.02em; }
.citem { display: grid; grid-template-columns: 30px 84px minmax(0, 1fr); gap: 10px; padding: 12px; margin: 8px 10px 0; align-items: start; }
.cbox {
  width: 24px; height: 24px; border-radius: 50%; border: 1.6px solid var(--line-2); margin-top: 30px; display: grid; place-items: center; position: relative;
}
.cbox::before { content: ""; position: absolute; inset: -10px; }
.cbox.on { background: var(--accent); border-color: var(--accent); }
.cbox.on::after { content: ""; width: 9px; height: 5px; border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); transform: rotate(-45deg) translate(1px, -1px); }
.citem img { width: 84px; height: 84px; border-radius: 10px; object-fit: cover; background: var(--sunk); }
.citem .t { font-size: 13.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.citem .spec { display: inline-flex; margin-top: 4px; font-size: 12px; background: var(--sunk); border-radius: 6px; padding: 1px 8px; color: var(--ink-2); }
.citem .row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.citem .price { font-size: 17px; }
.citem .rm { font-size: 12.5px; color: var(--dim); min-height: 32px; padding: 0 4px; }
.cart-bar {
  position: absolute; left: 0; right: 0; z-index: 30; bottom: calc(env(safe-area-inset-bottom) + var(--tab-h) + 10px);
  background: rgba(255, 252, 251, .96); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; transform: translateY(160%); transition: transform .35s var(--ease);
}
.cart-bar.on { transform: none; }
.cart-bar .all { display: flex; align-items: center; gap: 6px; font-size: 13px; min-height: 44px; }
.cart-bar .all .cbox { margin: 0; }
.cart-bar .sum { flex: 1; text-align: right; line-height: 1.25; min-width: 0; }
.cart-bar .sum .price { font-size: 19px; }
.cart-bar .sum .muted { font-size: 11.5px; display: block; }
#v-cart.has-bar { padding-bottom: calc(env(safe-area-inset-bottom) + var(--tab-h) + 96px); }

/* ---------- checkout / order ---------- */
.ck { margin: 10px 10px 0; padding: 14px; }
.ck h3 { font-size: 14.5px; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; }
.addr b { font-size: 15px; }
.addr .muted { font-size: 13px; }
.li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.li:first-of-type { border-top: 0; }
.li img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--sunk); }
.li .t { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.li .r { text-align: right; font-size: 13px; }
.fee { display: flex; justify-content: space-between; font-size: 13.5px; padding: 4px 0; }
.fee.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-weight: 700; }
.pay-note { display: flex; gap: 10px; align-items: flex-start; background: var(--wait-soft); color: #6d4300; border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.5; }
.pay-note svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; margin-top: 1px; }
.steps { display: flex; gap: 6px; margin-top: 10px; }
.steps span { flex: 1; font-size: 11.5px; color: var(--dim); border-top: 3px solid var(--sunk); padding-top: 6px; line-height: 1.35; }
.steps span.on { border-color: var(--accent); color: var(--ink); font-weight: 600; }
.ostatus { margin: 10px 10px 0; padding: 16px; background: var(--ink); color: var(--bg); border-radius: var(--r-card); }
.ostatus b { font-size: 18px; display: block; }
.ostatus span { font-size: 13px; opacity: .82; }
.ostatus .btn { margin-top: 12px; background: var(--bg); color: var(--ink); height: 40px; font-size: 14px; }
.ocard { margin: 8px 10px 0; padding: 12px 14px; display: block; width: calc(100% - 20px); text-align: left; }
.ocard .top { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--dim); }
.ocard .imgs { display: flex; gap: 6px; margin: 10px 0; }
.ocard .imgs img { width: 58px; height: 58px; border-radius: 8px; object-fit: cover; background: var(--sunk); }
.ocard .bot { display: flex; justify-content: space-between; align-items: center; }
.tabs { display: flex; gap: 2px; padding: 0 8px; border-bottom: 1px solid var(--line); background: var(--bg); overflow-x: auto; scrollbar-width: none; flex: none; }
.tabs button { flex: none; height: 42px; padding: 0 12px; font-size: 14px; color: var(--ink-2); position: relative; white-space: nowrap; }
.tabs button.on { color: var(--ink); font-weight: 700; }
.tabs button.on::after { content: ""; position: absolute; left: 30%; right: 30%; bottom: 0; height: 3px; border-radius: 99px; background: var(--accent); }

/* ---------- group buy ---------- */
.gb-hero { padding: 6px 14px 4px; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.gb-hero h1 { font-size: 24px; font-weight: 900; letter-spacing: -.02em; }
.gb-hero p { font-size: 12.5px; color: var(--dim); }
.gb-rule { margin: 10px 14px 0; display: flex; gap: 8px; }
.gb-rule div { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; font-size: 12px; color: var(--dim); line-height: 1.35; }
.gb-rule b { display: block; color: var(--ink); font-size: 13.5px; }
.gcard { margin: 10px 10px 0; padding: 10px; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; text-align: left; width: calc(100% - 20px); }
.gcard img { width: 112px; height: 112px; border-radius: 10px; object-fit: cover; background: var(--sunk); }
.gcard .t { font-size: 14px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gcard .meta { font-size: 12px; color: var(--dim); margin-top: 3px; }
.gcard .bot { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 8px; gap: 8px; }
.gcard .price { font-size: 21px; line-height: 1; }
.gcard .btn { height: 34px; font-size: 13px; padding: 0 14px; }
.gcard.dim { opacity: .66; }
.bar { height: 6px; border-radius: 99px; background: var(--sunk); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); width: 0; transition: width .9s var(--ease); }
.groups { padding: 2px 0; }
.grp { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.grp:first-child { border-top: 0; }
.grp .name { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.grp .bar { margin: 7px 0 4px; }
.grp .small { color: var(--dim); }
.grp .btn { height: 36px; font-size: 13.5px; padding: 0 16px; }
.avatars { display: inline-flex; }
.avatars i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--card); margin-left: -6px; background: var(--sunk); display: inline-block; }
.avatars i:first-child { margin-left: 0; }
.avatars i.f { background: linear-gradient(135deg, #e8a3b6, #c8285a); }
.avatars i.me { background: var(--ink); }
.rule-list { font-size: 13.5px; line-height: 1.6; color: var(--ink-2); padding-left: 18px; }
.rule-list li { margin: 4px 0; }
.prog-hero { margin: 10px 10px 0; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); }
.prog-hero .big { font-size: 40px; font-weight: 300; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.prog-hero .big b { font-weight: 800; color: var(--accent); }
.prog-hero .bar { height: 10px; margin: 12px 0 8px; }

/* ---------- me ---------- */
.me-head { padding: 12px 16px 16px; display: flex; align-items: center; gap: 12px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, #f2c7d3, #c8285a); display: grid; place-items: center; color: #fff8f6; font-weight: 800; font-size: 20px; flex: none; }
.me-head b { font-size: 18px; display: block; }
.me-head .btn { height: 38px; font-size: 14px; }
.qgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 10px 4px; }
.qgrid button { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: var(--ink-2); min-height: 58px; position: relative; }
.qgrid svg { width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.qgrid .badge { top: -4px; left: calc(50% + 4px); }
.menu { margin: 10px 10px 0; overflow: hidden; }
.menu .rowi { font-size: 14.5px; }
.menu .rowi svg.lead { width: 20px; height: 20px; fill: none; stroke: var(--ink-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.menu .rowi .muted { margin-left: auto; font-size: 13px; }
.proto-note { margin: 16px 14px 0; font-size: 12px; color: var(--dim); line-height: 1.6; }

/* ---------- chat ---------- */
.chat-sub { text-align: center; font-size: 11.5px; color: var(--dim); margin-top: -4px; padding-bottom: 6px; }
.chat-sub b { color: var(--ok); font-weight: 600; }
.chat { flex: 1; overflow-y: auto; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: none; }
.sys { align-self: center; max-width: 88%; text-align: center; font-size: 12px; color: var(--dim); background: var(--sunk); border-radius: 10px; padding: 6px 10px; line-height: 1.5; }
.sys.warn { background: var(--wait-soft); color: #6d4300; }
.msg { max-width: 78%; padding: 9px 12px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; word-break: break-word; }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 5px; }
.msg.cs { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg .st { display: block; font-size: 10.5px; opacity: .75; margin-top: 2px; text-align: right; }
.who { font-size: 11.5px; color: var(--dim); margin: 0 0 -6px 4px; }
.who .demo-tag { margin-left: 6px; }
.ordercard { align-self: flex-end; width: 82%; background: var(--card); border: 1px solid var(--line-2); border-radius: 16px; border-bottom-right-radius: 5px; padding: 10px 12px; text-align: left; }
.ordercard .lbl { font-size: 11.5px; color: var(--dim); display: flex; justify-content: space-between; }
.ordercard .in { display: flex; gap: 10px; margin-top: 8px; }
.ordercard img { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; }
.ordercard .t { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ordercard .price { font-size: 16px; }
.ctxcard { margin: 0 12px; padding: 8px 10px; display: flex; gap: 10px; align-items: center; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-size: 12.5px; }
.ctxcard img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.ctxcard .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-demo { padding: 8px 12px 0; display: flex; gap: 6px; flex-wrap: wrap; }
.chat-demo .btn { flex: 1; min-width: 140px; }
.composer { flex: none; display: flex; align-items: center; gap: 6px; padding: 8px 8px calc(env(safe-area-inset-bottom) + 10px); border-top: 1px solid var(--line); background: var(--card); }
.composer input { flex: 1; height: 40px; border-radius: 99px; border: 1px solid var(--line-2); padding: 0 14px; background: var(--bg); outline: none; min-width: 0; font-size: 15px; }
.composer input:focus-visible { border-color: var(--accent); }
.composer .btn { height: 40px; padding: 0 16px; font-size: 14px; }

/* ---------- toast & fly ---------- */
.toast {
  position: absolute; z-index: 95; left: 50%; bottom: calc(env(safe-area-inset-bottom) + var(--tab-h) + 30px);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--bg);
  border-radius: 99px; padding: 10px 16px; font-size: 13.5px; display: flex; gap: 12px; align-items: center; white-space: nowrap;
  transition: opacity .25s, transform .3s var(--ease); max-width: calc(100% - 32px);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { color: #ffb4c8; font-weight: 700; min-height: 32px; }
.fly { position: absolute; z-index: 96; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); left: 0; top: 0; opacity: 0; pointer-events: none; box-shadow: 0 4px 10px -2px rgba(200, 40, 90, .6); }

.lang-note { margin: 8px 14px 0; font-size: 12px; color: var(--demo); border: 1px dashed var(--demo); border-radius: 10px; padding: 6px 10px; }
.policy-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.policy-table th { text-align: left; color: var(--dim); font-weight: 600; width: 92px; vertical-align: top; padding: 8px 8px 8px 0; }
.policy-table td { padding: 8px 0; border-top: 1px solid var(--line); }
.policy-table tr:first-child td, .policy-table tr:first-child th { border-top: 0; }
.policy-table th { border-top: 1px solid var(--line); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.rise > * { animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .fly { display: none; }
  .layer.on, .layer, .sheet, .toast, .scrim { transition: opacity .2s ease !important; }
}

/* brand logo set in admin.html (品牌设置) */
.brand-logo { height: 36px; max-width: 160px; object-fit: contain; display: block; }
.home-head .logo { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
