/* 掌店 · 设计系统：移动优先，零框架 */
:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #16181d;
  --muted: #7b808a;
  --line: #e8e9ee;
  --accent: #ff5a36;
  --accent-ink: #ffffff;
  --ok: #12a150;
  --warn: #d97b00;
  --danger: #e0483d;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 18, 27, 0.04), 0 10px 24px -16px rgba(16, 18, 27, 0.18);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.sheet-open { overflow: hidden; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
[hidden] { display: none !important; }

.app-shell { max-width: 560px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--safe-t)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar-title { flex: 1; min-width: 0; }
.topbar-title strong { display: block; font-size: 16px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title span { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo-chip {
  width: 38px; height: 38px; border-radius: 12px; border: 0;
  display: grid; place-items: center; font-size: 20px;
  background: color-mix(in srgb, var(--accent) 14%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
  flex: none;
}
.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card);
  display: grid; place-items: center; color: var(--text);
}
.icon-btn:active { transform: scale(0.96); }
.icon-btn svg { width: 21px; height: 21px; }
.badge {
  position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 1;
  display: grid; place-items: center; padding: 0 4px;
  box-shadow: 0 0 0 2px var(--bg);
}

/* ---------- 通用 ---------- */
.view { padding: 4px 16px calc(96px + var(--safe-b)); }
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 12px 0 10px; }
.page-head h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.page-head .sub { color: var(--muted); font-size: 13px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 10px; }
.section-title h2 { font-size: 15px; font-weight: 650; }
.section-title .link { font-size: 13px; color: var(--muted); background: none; border: 0; padding: 4px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.card-pad { padding: 14px; }
.stack { display: grid; gap: 10px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.strong { font-weight: 650; }
.accent { color: var(--accent); }
.ok-text { color: var(--ok); }
.warn-text { color: var(--warn); }
.danger-text { color: var(--danger); }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.flex-1 { flex: 1; min-width: 0; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }
.center { text-align: center; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 12px; padding: 11px 16px; font-size: 15px; font-weight: 600;
  background: var(--accent); color: var(--accent-ink); transition: transform 0.08s ease, opacity 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn.block { width: 100%; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn.ghost { background: var(--card); color: var(--text); border: 1px solid var(--line); }
.btn.soft { background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent); }
.btn.danger { background: color-mix(in srgb, var(--danger) 10%, #fff); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 22%, #fff); }
.btn.ghost.danger { background: transparent; }
.btn-row { display: flex; gap: 8px; }
.btn-row > .btn { flex: 1; }

/* ---------- 表单 ---------- */
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  font: inherit; font-size: 15px; background: var(--card); color: var(--text);
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}
.field textarea { min-height: 84px; resize: vertical; }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.field.inline { display: flex; align-items: center; gap: 10px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.input-prefix { position: relative; }
.input-prefix > b { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 500; font-size: 14px; }
.input-prefix input { padding-left: 28px; }
.seg { display: flex; gap: 6px; background: color-mix(in srgb, var(--text) 5%, var(--bg)); border-radius: 12px; padding: 4px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 9px; padding: 8px 10px; font-size: 13px; color: var(--muted); font-weight: 600; }
.seg button.active { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 500;
}
.chip.active { background: var(--text); border-color: var(--text); color: #fff; }
.switch { display: inline-flex; align-items: center; gap: 8px; }
.switch input { appearance: none; width: 46px; height: 28px; border-radius: 999px; background: #d6d8de; position: relative; transition: background 0.2s; margin: 0; }
.switch input:checked { background: var(--ok); }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
.switch input:checked::after { transform: translateX(18px); }
.mode-grid { display: grid; gap: 8px; }
.mode-card {
  display: flex; gap: 10px; align-items: flex-start; cursor: pointer;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--card);
}
.mode-card input {
  appearance: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #cfd2d8; margin: 2px 0 0; flex: none; position: relative; background: #fff;
}
.mode-card input:checked { border-color: var(--accent); }
.mode-card input:checked::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
.mode-card:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, #fff); }

/* ---------- 列表 / 商品 ---------- */
.list { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--card); width: 100%; border: 0; text-align: left; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item:active { background: #fafafb; }
.thumb {
  width: 56px; height: 56px; border-radius: 12px; flex: none; object-fit: cover;
  background: color-mix(in srgb, var(--accent) 10%, #fff);
  display: grid; place-items: center; font-size: 22px; color: var(--accent);
  overflow: hidden;
}
.thumb.lg { width: 84px; height: 84px; font-size: 30px; border-radius: 14px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.price { font-variant-numeric: tabular-nums; font-weight: 700; }
.price small { font-size: 11px; font-weight: 500; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: 12px; margin-left: 6px; font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.pill[data-tone="ok"] { background: color-mix(in srgb, var(--ok) 12%, #fff); color: var(--ok); }
.pill[data-tone="warn"] { background: color-mix(in srgb, var(--warn) 13%, #fff); color: var(--warn); }
.pill[data-tone="danger"] { background: color-mix(in srgb, var(--danger) 12%, #fff); color: var(--danger); }
.pill[data-tone="muted"] { background: color-mix(in srgb, var(--text) 7%, #fff); color: var(--muted); }
.pill[data-tone="accent"] { background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent); }

/* ---------- 首页统计 ---------- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-size: 23px; font-weight: 750; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.stat.highlight { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.stat.highlight .k, .stat.highlight .v small { color: color-mix(in srgb, var(--accent-ink) 78%, transparent); }

.bars { display: flex; align-items: flex-end; gap: 8px; height: 96px; padding: 6px 2px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar-fill { width: 100%; max-width: 26px; border-radius: 6px 6px 3px 3px; background: color-mix(in srgb, var(--accent) 26%, #fff); min-height: 3px; transition: height 0.3s; }
.bar-col.today .bar-fill { background: var(--accent); }
.bar-col .lbl { font-size: 10px; color: var(--muted); }

.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 8px; display: grid; gap: 6px; justify-items: center; font-size: 12.5px; color: var(--text); box-shadow: var(--shadow); }
.quick span.ico { font-size: 20px; }
.todo-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.todo-item:last-child { border-bottom: 0; }
.todo-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none; }

/* ---------- 订单 ---------- */
.order-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; display: grid; gap: 10px; }
.order-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.order-no { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.order-items { display: flex; gap: 6px; flex-wrap: wrap; }
.order-items .oi { display: flex; align-items: center; gap: 6px; background: #fafafb; border-radius: 10px; padding: 4px; padding-right: 8px; font-size: 12px; }
.order-items .oi img, .order-items .oi .ph { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 10%, #fff); color: var(--accent); font-size: 14px; }
.order-meta { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.timeline { display: grid; gap: 0; }
.timeline .tl { display: flex; gap: 10px; position: relative; padding-bottom: 14px; }
.timeline .tl:last-child { padding-bottom: 0; }
.timeline .tl::before { content: ""; position: absolute; left: 4.5px; top: 14px; bottom: 0; width: 1px; background: var(--line); }
.timeline .tl:last-child::before { display: none; }
.timeline .tl .pt { width: 10px; height: 10px; border-radius: 50%; background: #cfd2d8; margin-top: 4px; flex: none; z-index: 1; }
.timeline .tl:first-child .pt { background: var(--accent); }
.timeline .tl .tx { font-size: 13px; }
.timeline .tl .at { font-size: 11px; color: var(--muted); margin-top: 1px; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; max-width: 560px; margin: 0 auto;
  padding: 6px 8px calc(6px + var(--safe-b));
  background: color-mix(in srgb, #fff 92%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar button { flex: 1; border: 0; background: none; display: grid; gap: 2px; justify-items: center; padding: 6px 2px; color: var(--muted); font-size: 10.5px; }
.tabbar button svg { width: 22px; height: 22px; }
.tabbar button.active { color: var(--accent); }
.tabbar button .dot-badge { position: absolute; }
.tabbar button { position: relative; }

/* ---------- 悬浮按钮 ---------- */
.fab {
  position: fixed; right: 18px; bottom: calc(84px + var(--safe-b)); z-index: 25;
  width: 54px; height: 54px; border-radius: 18px; border: 0;
  background: var(--accent); color: #fff; font-size: 26px; line-height: 1;
  box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--accent) 70%, transparent);
  display: grid; place-items: center;
}
.fab:active { transform: scale(0.95); }
.fab svg { width: 24px; height: 24px; }

/* ---------- 消息 / 空状态 ---------- */
.notif { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.notif:last-child { border-bottom: 0; }
.notif .ni { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; font-size: 15px; }
.notif.unread { background: color-mix(in srgb, var(--accent) 5%, #fff); }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty .em { font-size: 34px; display: block; margin-bottom: 8px; }
.empty p { font-size: 13px; }

/* ---------- 弹层 ---------- */
.sheet-root { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(12, 14, 20, 0.42); backdrop-filter: blur(2px); animation: fade 0.16s ease; }
.sheet {
  position: relative; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  background: var(--bg); border-radius: 22px 22px 0 0; padding: 8px 16px calc(20px + var(--safe-b));
  animation: rise 0.2s cubic-bezier(0.2, 0.8, 0.3, 1);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.16);
}
.sheet.dark { background: var(--card); }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 6px 0 10px; position: sticky; top: -8px; background: linear-gradient(var(--bg) 70%, transparent); z-index: 2; }
.sheet-head h3 { font-size: 17px; font-weight: 700; flex: 1; }
.sheet-close { width: 32px; height: 32px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--text) 8%, #fff); display: grid; place-items: center; }
.sheet-close svg { width: 16px; height: 16px; }
.sheet-body { padding-top: 2px; }
.sheet-actions {
  position: sticky; bottom: calc(-1 * (20px + var(--safe-b))); z-index: 3;
  display: flex; gap: 8px;
  margin: 14px -16px calc(-1 * (20px + var(--safe-b)));
  padding: 10px 16px calc(12px + var(--safe-b));
  background: color-mix(in srgb, var(--bg) 94%, #fff);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.sheet-actions .btn { flex: 1; }
.notice-text {
  white-space: pre-wrap; word-break: break-word;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; font-size: 13px; line-height: 1.7; margin-top: 10px;
}
@keyframes rise { from { transform: translateY(24px); opacity: 0.6; } to { transform: translateY(0); opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.toast-root { position: fixed; left: 0; right: 0; bottom: calc(100px + var(--safe-b)); z-index: 80; display: grid; justify-items: center; gap: 8px; pointer-events: none; }
.toast { background: rgba(22, 24, 29, 0.92); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 13.5px; max-width: 82%; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); animation: toastIn 0.18s ease; }
.toast[data-tone="ok"] { background: rgba(10, 122, 62, 0.95); }
.toast[data-tone="err"] { background: rgba(190, 45, 35, 0.95); }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- 顾客店铺 ---------- */
.shop-hero { padding: calc(20px + var(--safe-t)) 16px 18px; background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 88%, #000), color-mix(in srgb, var(--accent) 62%, #000)); color: #fff; border-radius: 0 0 24px 24px; }
.shop-hero .brand-row { display: flex; align-items: center; gap: 12px; }
.shop-hero .brand-logo { width: 52px; height: 52px; border-radius: 16px; background: rgba(255, 255, 255, 0.18); display: grid; place-items: center; font-size: 26px; backdrop-filter: blur(4px); }
.shop-hero h1 { font-size: 21px; font-weight: 750; letter-spacing: -0.01em; }
.shop-hero .tagline { font-size: 12.5px; opacity: 0.82; margin-top: 2px; }
.shop-type { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 650; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.28); }
.shop-hero .notice { margin-top: 14px; background: rgba(255, 255, 255, 0.14); border-radius: 12px; padding: 9px 12px; font-size: 12.5px; display: flex; gap: 7px; align-items: flex-start; }
.shop-hero .top-actions { display: flex; gap: 8px; margin-top: 14px; }
.shop-hero .ghost-chip { border: 1px solid rgba(255, 255, 255, 0.34); background: rgba(255, 255, 255, 0.12); color: #fff; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; }

.shop-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 6px; }
.shop-toolbar h2 { font-size: 15px; font-weight: 650; }
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px; }
.product-card { background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); text-align: left; padding: 0; display: flex; flex-direction: column; }
.product-card .pc-img { aspect-ratio: 1 / 1; background: color-mix(in srgb, var(--accent) 10%, #fff); display: grid; place-items: center; font-size: 40px; position: relative; overflow: hidden; }
.product-card .pc-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card .pc-img .soldout { position: absolute; inset: 0; background: rgba(22, 24, 29, 0.5); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; }
.product-card .pc-body { padding: 9px 10px 11px; display: grid; gap: 4px; }
.product-card .pc-title { font-size: 13px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card .pc-price { display: flex; align-items: baseline; gap: 6px; }
.product-card .pc-price .price { color: var(--accent); font-size: 16px; }
.product-card .pc-sold { font-size: 11px; color: var(--muted); }

/* v7：超市式浏览（搜索 / 分类导航 / 排序 / 排名徽章） */
.shop-search { display: flex; align-items: center; gap: 8px; margin: 14px 16px 0; padding: 0 12px; height: 42px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); }
.shop-search .ss-icon { font-size: 14px; opacity: 0.7; }
.shop-search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 14px; color: var(--text); min-width: 0; }
.shop-search .ss-clear { border: 0; background: transparent; color: var(--muted); font-size: 13px; padding: 4px; }
.cat-nav { display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px 2px; scrollbar-width: none; }
.cat-nav::-webkit-scrollbar { display: none; }
.cat-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); border-radius: 999px; padding: 7px 12px; font-size: 12.5px; white-space: nowrap; }
.cat-chip .cat-n { font-size: 10.5px; color: var(--muted); }
.cat-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cat-chip.on .cat-n { color: rgba(255, 255, 255, 0.82); }
.sort-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px 0; }
.sort-tabs { display: flex; gap: 6px; }
.sort-tab { border: 1px solid transparent; background: transparent; color: var(--muted); border-radius: 8px; padding: 5px 9px; font-size: 12.5px; }
.sort-tab.on { background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 26%, #fff); font-weight: 650; }
.catalog-note { padding: 4px 16px 10px; margin: 0; }
.pc-tile { position: relative; display: block; }
.pc-tile .rank-medal { position: absolute; left: 6px; top: 6px; font-size: 15px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25)); }
.pc-tile .pc-flag { position: absolute; right: 6px; top: 6px; background: rgba(22, 24, 29, 0.62); color: #fff; font-size: 10.5px;
  border-radius: 999px; padding: 2px 7px; }
.product-card .pc-cat { display: inline-block; background: color-mix(in srgb, var(--accent) 10%, #fff); color: var(--accent);
  border-radius: 6px; padding: 1px 5px; margin-right: 4px; font-size: 10px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 16px; }

/* v7：平台商品超市（跨店浏览 + 逐店结算） */
.mkt-hero { background: linear-gradient(135deg, #ff7a3d 0%, #ff5a36 55%, #e9482a 100%); color: #fff; padding: calc(16px + var(--safe-t)) 16px 20px;
  border-radius: 0 0 22px 22px; }
.mkt-hero .brand-row { display: flex; align-items: center; gap: 12px; }
.mkt-hero .brand-logo { width: 52px; height: 52px; border-radius: 16px; background: rgba(255, 255, 255, 0.18); display: grid; place-items: center; font-size: 26px; }
.mkt-hero h1 { font-size: 21px; font-weight: 750; }
.mkt-hero .tagline { font-size: 12.5px; opacity: 0.86; margin-top: 2px; }
.mkt-hero .top-actions { display: flex; gap: 8px; margin-top: 14px; }
.mkt-hero .ghost-chip { border: 1px solid rgba(255, 255, 255, 0.34); background: rgba(255, 255, 255, 0.12); color: #fff; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; }
.mkt-card .mkt-store { display: inline-block; margin-top: 2px; font-size: 11px; color: var(--muted); text-decoration: none; }
.mkt-card .pc-body { cursor: pointer; }
.mkt-cart-group { border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 4px; }
.mkt-cart-group:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.mkt-cart-store { font-size: 12.5px; font-weight: 650; margin-bottom: 8px; }
.mkt-line { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.mkt-line .ml-title { font-size: 13px; font-weight: 600; }
.qty.sm { transform: scale(0.9); }
.section-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }

/* v7：押金额度仪表 */
.meter { height: 8px; border-radius: 999px; background: #eef1f6; overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #ffa235, #ff5a36); }
.dep-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.dep-nums > div { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.dep-nums span { font-size: 12px; color: var(--muted); }
.dep-nums b { font-size: 13.5px; }

.cart-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; max-width: 560px; margin: 0 auto; padding: 10px 16px calc(10px + var(--safe-b)); background: color-mix(in srgb, #fff 94%, transparent); backdrop-filter: blur(16px); border-top: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.cart-bar .sum { flex: 1; }
.cart-bar .sum b { font-size: 18px; }
.cart-bar .sum span { display: block; font-size: 11.5px; color: var(--muted); }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.qty button { width: 32px; height: 32px; border: 0; background: transparent; font-size: 17px; color: var(--muted); }
.qty button:disabled { opacity: 0.35; }
.qty span { min-width: 34px; text-align: center; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }

.cart-line { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }

.pay-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; box-shadow: var(--shadow); }
.pay-box .amount { font-size: 32px; font-weight: 750; letter-spacing: -0.02em; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.qr-wrap { width: 190px; margin: 12px auto; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #fff; padding: 8px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 13.5px; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); flex: none; }
.kv .v { text-align: right; word-break: break-word; overflow-wrap: anywhere; }
.copy-inline { border: 0; background: none; color: var(--accent); font-size: 12px; padding: 0 0 0 6px; }

.steps { display: flex; align-items: flex-start; gap: 0; margin: 14px 0 6px; }
.steps .st { flex: 1; text-align: center; position: relative; font-size: 11px; color: var(--muted); }
.steps .st .sd { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #d5d8de; margin: 0 auto 6px; background: #fff; display: grid; place-items: center; font-size: 10px; color: #fff; }
.steps .st.done .sd { background: var(--accent); border-color: var(--accent); }
.steps .st.done { color: var(--text); font-weight: 600; }
.steps .st::after { content: ""; position: absolute; top: 8px; left: 50%; width: 100%; height: 2px; background: #e4e6ea; z-index: 0; }
.steps .st:last-child::after { display: none; }
.steps .st.done::after { background: var(--accent); }
.steps .st .sd { position: relative; z-index: 1; }

/* 落地页 */
.landing { max-width: 560px; margin: 0 auto; padding: 0 0 40px; }
.hero { padding: calc(40px + var(--safe-t)) 22px 30px; background: linear-gradient(160deg, #1d1f26, #2b2f3a); color: #fff; border-radius: 0 0 28px 28px; }
.hero .kicker { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: #ffb4a2; font-weight: 600; }
.hero h1 { font-size: 30px; line-height: 1.24; font-weight: 760; letter-spacing: -0.02em; margin: 10px 0 10px; }
.hero p { color: #b9bec9; font-size: 14px; }
.hero .cta { display: flex; gap: 10px; margin-top: 20px; }
.hero .cta .btn { background: #ff5a36; }
.hero .cta .btn.ghost { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.24); color: #fff; }
.landing-section { padding: 22px 18px 0; }
.feature { display: flex; gap: 12px; padding: 12px 0; }
.feature .fi { width: 40px; height: 40px; border-radius: 12px; background: #fff0eb; color: #ff5a36; display: grid; place-items: center; font-size: 19px; flex: none; }
.feature h3 { font-size: 14.5px; font-weight: 650; }
.feature p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.auth-card { margin: 18px 16px 0; }
.auth-tabs { display: flex; gap: 4px; background: #eef0f3; border-radius: 12px; padding: 4px; margin-bottom: 16px; }
.auth-tabs button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 9px; font-weight: 650; color: var(--muted); font-size: 14px; }
.auth-tabs button.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.demo-hint { margin: 12px 16px 0; font-size: 12.5px; color: var(--muted); background: #fff8f0; border: 1px dashed #f0c9a8; border-radius: 12px; padding: 10px 12px; }

@media (min-width: 620px) {
  .app-shell, .tabbar, .cart-bar, .sheet, .landing { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04); }
  body { background: #e9eaee; }
  .app-shell { box-shadow: 0 0 60px rgba(0, 0, 0, 0.08); }
}

/* ---------- 资质公示（顾客端） ---------- */
.cred-strip { padding: 0 16px 4px; }
.cred-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.cred-card .btn { padding: 6px 12px; font-size: 12.5px; }

/* ---------- 平台管理后台 ---------- */
.admin-body { background: #f3f4f7; }
.admin-body .topbar { background: #1f2430; color: #fff; }
.admin-body .topbar-title .tiny { color: rgba(255, 255, 255, 0.6); }
.admin-body .tabbar button.active { color: var(--accent); }
.admin-body .icon-btn { width: auto; padding: 0 10px; font-size: 13px; background: rgba(255, 255, 255, 0.12); border: 0; border-radius: 10px; height: 34px; color: #fff; }
.pill[data-tone="ok"] { background: #e8f6ee; color: #1d7a45; }
.pill[data-tone="warn"] { background: #fff5e2; color: #8a5a12; }
.pill[data-tone="danger"] { background: #ffecea; color: #96302a; }
.mode-grid { display: grid; gap: 8px; }
.mode-card { display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fff; }
.mode-card input { margin-top: 3px; }
.mode-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent); }
.stack > * + * { margin-top: 10px; }
.cred-strip + p { padding-top: 4px; }

/* v3：广告位（第一阶段唯一的收入来源，做得克制一点） */
.ad-card {
  display: flex; align-items: center; gap: 10px; margin-top: 10px;  padding: 10px 12px; border-radius: var(--radius);
  background: #fffdf6; border: 1px dashed #e4d9c2;
  cursor: pointer;
}
.ad-card:active { transform: scale(0.995); }
.ad-tag {
  flex: 0 0 auto; font-size: 10px; letter-spacing: .04em; color: #8a7c62;
  border: 1px solid #e4d9c2; border-radius: 4px; padding: 1px 4px; background: #fff;
}
.ad-title { font-size: 14px; font-weight: 650; color: #3f3629; }
.ad-cta { flex: 0 0 auto; font-size: 12px; color: #8a7c62; }

/* v3：后台阶段进度条 */
.phase-bar { height: 10px; border-radius: 999px; background: #eceff4; overflow: hidden; }
.phase-bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #0f766e, #0e7490); }
.phase-hero { background: linear-gradient(135deg, #0f766e, #0e7490); color: #fff; border: 0; }
.phase-hero .tiny, .phase-hero .small { color: rgba(255, 255, 255, 0.82); }
.phase-hero .mt-4 { margin-top: 4px; }
.phase-hero .big { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.phase-hero .phase-bar { background: rgba(255, 255, 255, 0.22); }
.phase-hero .phase-bar > i { background: #fff; }
.ad-row { display: flex; gap: 10px; align-items: flex-start; }
.ad-row .thumb-sm { width: 42px; height: 42px; border-radius: 10px; background: #f3f4f6; display: grid; place-items: center; font-size: 20px; flex: 0 0 auto; }
.ad-slot { padding: 0 16px; margin-top: 4px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hero-badge { font-size: 12px; font-weight: 650; color: #0f766e; background: #e9f7f2; border: 1px solid #cbe9df; border-radius: 999px; padding: 5px 12px; }

/* ---- v4：开店实名（国家网络身份认证） ---- */
.identity-state {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px; padding: 10px 12px; border-radius: 10px;
  background: #f4f6f8; font-size: 13.5px; font-weight: 600; color: var(--muted);
}
.identity-state[data-state="verified"] { background: #eafaf3; color: #0f766e; }
.identity-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: 0.65; flex: none; }

.idv-mask { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.idv-mask[hidden] { display: none; }
.idv-mask::before { content: ""; position: absolute; inset: 0; background: rgba(12, 14, 20, 0.5); }
.idv-panel {
  position: relative; width: min(460px, 100%); max-height: 88vh; overflow: auto;
  background: #fff; border-radius: 18px 18px 0 0; padding: 20px 18px 26px;
  box-shadow: 0 -12px 40px rgba(10, 14, 22, 0.28);
}
.idv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.idv-head h2 { font-size: 19px; margin: 4px 0 0; }
.idv-x { border: 0; background: transparent; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; }

/* ---------- v8：商户类型与专属服务 ---------- */
.support-sla {
  border-radius: 10px;
  background: #fff7f2;
  border: 1px solid #ffe2d3;
  padding: 8px 10px;
  font-size: 12.5px;
  color: #8a3d16;
  line-height: 1.5;
}
.support-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.support-feat {
  display: flex; flex-direction: column; gap: 3px; text-align: left;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  padding: 9px 10px; font: inherit; color: inherit; cursor: pointer;
}
.support-feat b { font-size: 13.5px; }
.support-feat:hover { border-color: var(--accent); }
.support-feat.locked { background: #f7f8fa; cursor: default; opacity: 0.85; }
.support-feat.locked:hover { border-color: var(--line); }
.support-upgrade { border: 1px dashed #ffc9a8; border-radius: 12px; padding: 10px 12px; background: #fffaf6; }
.chip.static { cursor: default; background: #f4f6fa; }
@media (max-width: 380px) { .support-grid { grid-template-columns: 1fr; } }

/* ---------- 二维码标签 ---------- */
.qr-label-preview {
  display: flex; gap: 10px; align-items: center;
  border: 1px dashed var(--line); border-radius: 14px; padding: 10px;
  background: #fff;
}
.qr-label-preview-code {
  width: 112px; height: 112px; flex: 0 0 112px;
  padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: 8px;
}
.qr-label-preview-code svg { width: 100%; height: 100%; display: block; }
.qr-label-preview-info { min-width: 0; }
.btn.disabled, .btn[disabled] { opacity: 0.5; pointer-events: none; }






