/* 顾客页样式。展柜页用 base.css，两边不共用。
 * 尺寸全用 rem：三档字号只改 html 的字号，整页跟着放大。
 * 颜色：暖白底、墨绿主色、珊瑚色价格（沿用设计预览的配色）。 */

:root {
  --brand: #1f4d3a;
  --brand-ink: #173b2d;
  --brand-soft: #e7efe8;
  --accent: #e0603a;
  --accent-soft: #fdeee8;
  --ink: #1f2a24;
  --muted: #7d847e;
  --line: #ebe8e0;
  --paper: #f6f4ee;
  --card: #ffffff;
  --warn: #9a5b0a;
  --warn-bg: #fff5e3;
  --danger: #c0392b;
  --ok: #2b7a4b;
  --radius: 0.875rem;
  --tabbar-h: 3.5rem;
  --float-h: 3.75rem;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* 三档字号 */
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
html[data-font="1.2"] { font-size: 19.2px; }
html[data-font="1.4"] { font-size: 22.4px; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.shop {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", sans-serif;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper);
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 0.5rem);
  -webkit-tap-highlight-color: transparent;
}
body.shop.has-float { padding-bottom: calc(var(--tabbar-h) + var(--float-h) + var(--safe-b) + 0.75rem); }
[hidden] { display: none !important; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible, [role="button"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
h1, h2, h3, p { margin: 0; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.shop-main { max-width: 48rem; margin: 0 auto; }
.tab { padding: 0 0.75rem; }
.muted { color: var(--muted); }
.small { font-size: 0.8125rem; }
.error { color: var(--danger); }
.ok { color: var(--ok); }
.empty { text-align: center; color: var(--muted); padding: 2.5rem 1rem; }
.page-title { font-size: 1.25rem; font-weight: 700; padding: 1rem 0.25rem 0.75rem; }

/* ---------- 通用：按钮、卡片、表单 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
  min-height: 2.75rem; padding: 0.5rem 1.125rem;
  border: none; border-radius: 0.75rem;
  background: var(--brand); color: #fff;
  font-size: 0.9375rem; font-weight: 600; text-decoration: none;
}
.btn:active { background: var(--brand-ink); }
.btn:disabled { background: #c9cec9; color: #fff; cursor: default; }
.btn-plain { background: #efede6; color: var(--ink); }
.btn-plain:active { background: #e4e1d8; }
.btn-small { min-height: 2.25rem; padding: 0.375rem 0.875rem; font-size: 0.875rem; border-radius: 0.625rem; }
.btn-block { display: flex; width: 100%; }

.card {
  background: var(--card); border-radius: var(--radius);
  padding: 1rem; margin-bottom: 0.75rem;
  box-shadow: 0 1px 2px rgba(31, 42, 36, 0.04);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; }
.card-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.card-head .card-title { margin-bottom: 0; }

.row-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.notice {
  background: var(--warn-bg); color: var(--warn);
  border-radius: 0.625rem; padding: 0.625rem 0.75rem; margin: 0 0 0.75rem;
  font-size: 0.875rem;
}
.ok-notice { background: var(--brand-soft); color: var(--brand); }

.field { display: block; margin-bottom: 0.75rem; }
.field-label { display: block; font-size: 0.8125rem; color: var(--muted); margin-bottom: 0.25rem; }
.field input, .field textarea, .modal textarea {
  width: 100%; padding: 0.625rem 0.75rem;
  border: 1px solid var(--line); border-radius: 0.625rem; background: #fcfbf8;
  font-size: 1rem;
}
.field input:focus, .field textarea:focus { border-color: var(--brand); outline: none; background: #fff; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.field-pair .field { margin-bottom: 0.5rem; }
.check { display: flex; align-items: center; gap: 0.375rem; margin: 0.25rem 0 0.5rem; font-size: 0.875rem; }
.choice {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.625rem 0.75rem; margin-bottom: 0.5rem;
  border: 1px solid var(--line); border-radius: 0.625rem; background: #fcfbf8;
}
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choice input { accent-color: var(--brand); width: 1.125rem; height: 1.125rem; margin: 0; }
.choice-off { color: var(--muted); background: #f5f4f0; }
.choice-text { display: flex; flex-direction: column; line-height: 1.3; }
.choice-why { font-size: 0.6875rem; }
.back-link { display: inline-block; padding: 0.875rem 0.25rem 0.5rem; color: var(--muted); text-decoration: none; font-size: 0.875rem; }
.me-hint { margin-top: 0.5rem; }

dl.info { display: grid; grid-template-columns: auto 1fr; gap: 0.375rem 0.75rem; margin: 0.5rem 0 0; }
dl.info dt { color: var(--muted); }
dl.info dd { margin: 0; word-break: break-all; }

.fold > summary { cursor: pointer; list-style: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: " ›"; color: var(--muted); }
.fold[open] > summary::after { content: " ⌄"; }

/* ---------- 店铺页：店头 ---------- */
.store-head {
  margin: 0 -0.75rem;
  padding: 1rem 1rem 0.5rem;
  background: linear-gradient(180deg, #e3ece3 0%, var(--paper) 100%);
}
.store-top { display: flex; align-items: center; gap: 0.75rem; }
.store-logo {
  flex: none; width: 3.25rem; height: 3.25rem; border-radius: 0.875rem;
  display: grid; place-items: center;
  background: var(--brand); color: #fff; font-size: 1.5rem; font-weight: 700;
  box-shadow: inset 0 0 0 3px var(--brand), inset 0 0 0 4px rgba(255, 255, 255, 0.35);
}
.store-id { flex: 1; min-width: 0; }
.store-name { font-size: 1.25rem; font-weight: 800; letter-spacing: 0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; margin-top: 0.25rem; font-size: 0.75rem; color: var(--muted); }
.status-pill {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.0625rem 0.5rem; border-radius: 1rem;
  background: var(--brand-soft); color: var(--brand); font-weight: 600;
}
.status-pill::before { content: ""; width: 0.375rem; height: 0.375rem; border-radius: 50%; background: #4f9a6b; }
.status-pill.off { background: #f7e4e1; color: var(--danger); }
.status-pill.off::before { background: var(--danger); }
.icon-btn {
  flex: none; width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(31, 42, 36, 0.12);
}
.icon-btn svg { width: 1.25rem; height: 1.25rem; fill: currentColor; stroke: none; }

.notice-line {
  display: flex; align-items: flex-start; gap: 0.5rem;
  margin-top: 0.625rem; padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.75); border-radius: 0.625rem;
  font-size: 0.8125rem; cursor: pointer;
}
.notice-tag {
  flex: none; padding: 0 0.375rem; border-radius: 0.25rem;
  background: var(--brand); color: #fff; font-size: 0.6875rem; line-height: 1.25rem; font-weight: 600;
}
.notice-tag.tag-warm { background: var(--accent); }
.notice-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.25rem; }
.notice-line.open .notice-text { white-space: normal; }
.notice-text strong { font-weight: 600; color: var(--ink); }
.activity-desc { display: none; margin-top: 0.25rem; color: var(--muted); }
.notice-line.open .activity-desc { display: block; }
.activity-line .notice-text { color: var(--ink); }

.store-info { margin-top: 0.375rem; font-size: 0.8125rem; }
.store-info > summary { list-style: none; color: var(--muted); padding: 0.25rem 0; cursor: pointer; display: inline-block; }
.store-info > summary::-webkit-details-marker { display: none; }
.store-info > summary::after { content: " ›"; }
.store-info[open] > summary::after { content: " ⌄"; }
.store-info dl { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 0.75rem; margin: 0.25rem 0 0.25rem; padding: 0.625rem 0.75rem; background: #fff; border-radius: 0.625rem; }
.store-info dt { color: var(--muted); }
.store-info dd { margin: 0; word-break: break-all; }

/* 加到桌面横幅 */
.a2hs-banner {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  margin: 0.5rem 0 0; padding: 0.5rem 0.75rem;
  background: var(--warn-bg); border-radius: 0.625rem; font-size: 0.8125rem;
}
.a2hs-banner .a2hs-fold { flex: 1; min-width: 12rem; }
.a2hs-banner .a2hs-title { font-weight: 600; color: var(--warn); list-style: none; cursor: pointer; }
.a2hs-banner .a2hs-title::-webkit-details-marker { display: none; }
.a2hs-banner .a2hs-fold p { margin-top: 0.375rem; }
.a2hs-banner .row-actions { margin-top: 0; }

/* 搜索 */
.search-box {
  position: relative; margin: 0.625rem 0 0.5rem;
}
.search-box svg { position: absolute; left: 0.75rem; top: 50%; width: 1.125rem; height: 1.125rem; transform: translateY(-50%); color: var(--muted); }
.search-box input {
  width: 100%; height: 2.5rem; padding: 0 0.75rem 0 2.375rem;
  border: none; border-radius: 1.25rem; background: #fff;
  font-size: 0.9375rem; box-shadow: 0 1px 2px rgba(31, 42, 36, 0.06);
  -webkit-appearance: none; appearance: none;
}
.search-box input:focus { outline: 2px solid var(--brand-soft); }

/* ---------- 货架：左分类、右商品 ---------- */
.shelf {
  display: grid; grid-template-columns: 5.5rem 1fr;
  margin: 0 -0.75rem; border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(to right, #f3f1ea 5.5rem, #fff 5.5rem);
  min-height: 50vh;
}
.shelf.searching { grid-template-columns: 1fr; background: #fff; }
.cat-side {
  position: sticky; top: 0; align-self: start;
  max-height: calc(100vh - var(--tabbar-h) - var(--float-h) - var(--safe-b) - 1rem);
  overflow-y: auto; overscroll-behavior: contain;
  border-radius: var(--radius) 0 0 0;
  padding-bottom: 1rem;
}
.cat-item {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 3.25rem; padding: 0.5rem 0.375rem;
  border: none; background: transparent; color: #555d57;
  font-size: 0.8125rem; text-align: center; line-height: 1.25;
}
.cat-item.active { background: #fff; color: var(--brand); font-weight: 700; }
.cat-item.active::before {
  content: ""; position: absolute; left: 0; top: 0.875rem; bottom: 0.875rem; width: 0.1875rem;
  border-radius: 0 0.1875rem 0.1875rem 0; background: var(--brand);
}
.cat-item:first-child.active { border-radius: var(--radius) 0 0 0; }
.cat-badge {
  position: absolute; top: 0.25rem; right: 0.25rem;
  min-width: 1rem; height: 1rem; padding: 0 0.25rem; border-radius: 0.5rem;
  background: var(--accent); color: #fff; font-size: 0.625rem; line-height: 1rem; font-weight: 700;
}
.product-list { min-width: 0; padding: 0 0.75rem 1rem; }
.cat-sec { scroll-margin-top: 0.5rem; }
.cat-title { font-size: 0.8125rem; font-weight: 700; color: var(--muted); padding: 0.875rem 0 0.25rem; }

.product { display: flex; gap: 0.625rem; padding: 0.625rem 0; border-bottom: 1px solid #f2f0ea; }
.product:last-child { border-bottom: none; }
.thumb {
  flex: none; width: 4.75rem; height: 4.75rem; border-radius: 0.625rem; overflow: hidden;
  background: #f4f2ec; display: grid; place-items: center;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.no-img {
  color: #b0b3ad; font-size: 0.6875rem;
  background: repeating-linear-gradient(135deg, #f4f2ec 0 0.5rem, #efede6 0.5rem 1rem);
}
.product-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.product-name {
  font-size: 0.9375rem; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-meta { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.125rem; font-size: 0.75rem; color: var(--muted); }
.product-stock.soldout { color: var(--danger); }
.share-link { border: none; background: none; padding: 0.125rem 0; color: var(--muted); font-size: 0.75rem; text-decoration: underline; text-underline-offset: 2px; }
.product-foot { margin-top: auto; padding-top: 0.25rem; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.product-price { color: var(--accent); font-weight: 700; font-size: 1.125rem; white-space: nowrap; }
.product-price small, .cf-price small { font-size: 0.7em; font-weight: 600; }
.product.soldout .thumb, .product.soldout .product-name { opacity: 0.5; }
.soldout-tag { font-size: 0.75rem; color: var(--muted); background: #f0eee8; border-radius: 0.75rem; padding: 0.125rem 0.625rem; }

.add-btn, .step-btn {
  width: 1.75rem; height: 1.75rem; border-radius: 50%;
  display: inline-grid; place-items: center; padding: 0;
  font-size: 1.125rem; line-height: 1; font-weight: 600;
}
.add-btn, .step-plus { border: none; background: var(--brand); color: #fff; }
.step-minus { border: 1px solid #c9cfc9; background: #fff; color: var(--brand); }
.step-btn:disabled { background: #d6dad6; border-color: #d6dad6; color: #fff; cursor: default; }
.add-btn { position: relative; }
.add-btn::after { content: ""; position: absolute; inset: -0.5rem; } /* 手指好点 */
.stepper { display: inline-flex; align-items: center; gap: 0.5rem; }
.step-qty { min-width: 1.25rem; text-align: center; font-weight: 600; }

/* ---------- 底部结算条（店铺页） ---------- */
.cart-float {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 0.5rem);
  width: calc(100% - 1.5rem); max-width: 46.5rem; height: var(--float-h);
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0 0.375rem 0 0.75rem; border-radius: 1.875rem;
  background: #24302a; color: #fff; z-index: 20;
  box-shadow: 0 6px 20px rgba(23, 59, 45, 0.25);
}
.cf-icon {
  position: relative; flex: none; width: 2.75rem; height: 2.75rem; margin-top: -1rem;
  border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: #fff; border: 3px solid #24302a;
}
.cart-float.empty .cf-icon { background: #4a544e; color: #aab1ac; }
.cf-icon svg { width: 1.375rem; height: 1.375rem; }
.cf-count {
  position: absolute; top: -0.25rem; right: -0.375rem;
  min-width: 1.125rem; height: 1.125rem; padding: 0 0.25rem; border-radius: 0.5625rem;
  background: var(--accent); color: #fff; font-size: 0.6875rem; line-height: 1.125rem; text-align: center; font-weight: 700;
}
.cf-sum { flex: 1; min-width: 0; }
.cf-total { font-size: 0.9375rem; font-weight: 600; color: #fff; }
.cart-float.empty .cf-total { color: #aab1ac; font-weight: 400; font-size: 0.875rem; }
.cf-price { font-size: 1.25rem; font-weight: 700; }
.cf-note { font-size: 0.6875rem; color: #aab1ac; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-go {
  display: inline-flex; align-items: center; justify-content: center;
  height: 3rem; min-width: 6rem; padding: 0 1.125rem; border-radius: 1.5rem;
  background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; font-size: 0.9375rem;
}
.cf-go.disabled { background: #4a544e; color: #c8cdc9; font-weight: 500; font-size: 0.8125rem; }

/* ---------- 底栏 ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(255, 255, 255, 0.96); border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.tabbar a {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.125rem;
  color: #8a918b; text-decoration: none; font-size: 0.6875rem;
}
.tabbar a svg { width: 1.375rem; height: 1.375rem; }
.tabbar a.active { color: var(--brand); font-weight: 700; }
.tabbar a.active svg { stroke-width: 2.2; }
.badge {
  position: absolute; top: 0.25rem; left: calc(50% + 0.5rem);
  min-width: 1rem; height: 1rem; padding: 0 0.25rem; border-radius: 0.5rem;
  background: var(--accent); color: #fff; font-size: 0.625rem; line-height: 1rem; text-align: center; font-weight: 700;
}

/* ---------- 购物车 ---------- */
.cart-list { background: #fff; border-radius: var(--radius); padding: 0.25rem 0.875rem; margin-bottom: 0.75rem; }
.cart-list .empty { padding: 2rem 0 1rem; }
.cart-list > .btn-block { margin-bottom: 1rem; }
.cart-item { display: flex; align-items: center; gap: 0.625rem; padding: 0.75rem 0; border-bottom: 1px solid #f2f0ea; }
.cart-item .thumb { width: 3.5rem; height: 3.5rem; }
.cart-info { flex: 1; min-width: 0; }
.cart-info .product-price { font-size: 1rem; }
.clear-btn { margin: 0.75rem 0 0.5rem; background: none; color: var(--muted); padding-left: 0; }

.summary { font-size: 0.875rem; }
.sum-row { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.25rem 0; }
.sum-row.total { font-size: 1.0625rem; font-weight: 700; }
.sum-row.total span:last-child { color: var(--accent); }
.gap { color: var(--warn); margin-top: 0.375rem; }
.summary .notice { margin: 0.5rem 0 0; }

.sticky-bar {
  position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b));
  margin: 0 -0.75rem; padding: 0.625rem 0.75rem;
  background: rgba(246, 244, 238, 0.96); border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.sticky-bar .sum-row { padding: 0 0 0.5rem; }
.checkout-go { min-height: 3rem; border-radius: 1.5rem; background: var(--accent); font-size: 1rem; }
.checkout-go:active { background: #c9512e; }
.checkout-go:disabled { background: #c9cec9; }
.checkout-error { margin-bottom: 0.5rem; }

/* ---------- 结算 ---------- */
.checkout-sum > summary { list-style: none; cursor: pointer; }
.checkout-sum > summary::-webkit-details-marker { display: none; }
.checkout-sum > summary .sum-row.total span:first-child::after { content: "  查看明细 ›"; font-size: 0.75rem; font-weight: 400; color: var(--muted); }
.checkout-sum[open] > summary .sum-row.total span:first-child::after { content: "  收起 ⌄"; }
.checkout-sum .card-title { margin-top: 0.75rem; font-size: 0.875rem; color: var(--muted); }
.addr-choices { margin-bottom: 0.5rem; }
.loc-row { margin-top: 0; }
.loc-status { margin: 0.375rem 0 0.25rem; }
.pay-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.5rem; }

/* ---------- 我的 ---------- */
.me-home { padding: 0.25rem 1rem; }
.me-row {
  display: flex; align-items: center; gap: 0.75rem; width: 100%;
  padding: 0.875rem 0; border: none; border-bottom: 1px solid #f2f0ea; background: none; text-align: left;
}
.me-row:last-child { border-bottom: none; }
.me-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.125rem; }
.me-row-title { font-weight: 600; font-size: 1rem; }
.me-row-side { color: var(--muted); white-space: nowrap; }
.order-row .me-row-side { color: var(--ink); font-weight: 600; }
.order-status { font-weight: 600; }
.order-time { font-weight: 400; }
.order-head { display: flex; justify-content: space-between; gap: 0.5rem; align-items: baseline; flex-wrap: wrap; }
.order-no { font-weight: 700; }
.order-body { margin-top: 0.75rem; border-top: 1px dashed var(--line); padding-top: 0.5rem; font-size: 0.875rem; }
.order-info { margin-top: 0.75rem; font-size: 0.875rem; }
.test-badge { display: inline-block; margin-left: 0.375rem; padding: 0 0.375rem; border-radius: 0.25rem; background: var(--warn-bg); color: var(--warn); font-size: 0.6875rem; font-weight: 600; vertical-align: middle; }
.addr-item { display: flex; gap: 0.5rem; align-items: center; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px solid #f2f0ea; }
.addr-item .row-actions { margin-top: 0; flex-wrap: nowrap; }
.addr-text { min-width: 0; }
.addr-editor { padding: 0.75rem 0; }
.font-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.font-switch button { min-height: 2.5rem; border: 1px solid var(--line); border-radius: 0.625rem; background: #fcfbf8; }
.font-switch button.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 700; }
#a2hs-guide p { margin-top: 0.5rem; }
#a2hs-card .card-title { margin-bottom: 0; }

/* ---------- 提示、弹窗 ---------- */
.net-error {
  position: sticky; top: 0; z-index: 40;
  padding: 0.625rem 1rem; background: #fbe9e6; color: var(--danger); font-size: 0.875rem; text-align: center;
}
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--float-h) + var(--safe-b) + 1.25rem);
  transform: translateX(-50%); z-index: 60;
  max-width: calc(100% - 2rem); padding: 0.625rem 1.125rem; border-radius: 1.5rem;
  background: rgba(31, 42, 36, 0.92); color: #fff; font-size: 0.875rem; text-align: center;
}
.modal {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(20, 28, 24, 0.5);
}
.modal-box {
  width: 100%; max-width: 30rem; max-height: 92vh; overflow-y: auto;
  padding: 1.25rem 1rem calc(1rem + var(--safe-b));
  background: #fff; border-radius: 1.25rem 1.25rem 0 0;
}
.modal-box > p { margin-bottom: 0.75rem; }
@media (min-width: 40rem) {
  .modal { align-items: center; }
  .modal-box { border-radius: 1.25rem; }
}
.pay-title { font-size: 1.125rem; font-weight: 700; text-align: center; }
.pay-sub { text-align: center; margin-top: 0.25rem; }
.pay-amount { text-align: center; font-size: 2rem; font-weight: 800; color: var(--accent); margin: 0.5rem 0; }
.pay-test { text-align: center; }
.pay-qr {
  width: 13.75rem; height: 13.75rem; margin: 0.5rem auto; border-radius: 0.75rem; overflow: hidden;
  display: grid; place-items: center; background: #f6f5f1; border: 1px solid var(--line);
}
.pay-qr img { width: 100%; height: 100%; object-fit: contain; }
.pay-qr.no-qr { color: var(--muted); font-size: 0.875rem; }
.pay-tools { justify-content: center; }
.pay-tools .btn { flex: 1; }
.pay-open-alipay { margin-top: 0.75rem; background: #1677ff; }
.pay-how { margin-top: 0.75rem; }
.pay-note { margin: 0.75rem 0 0.5rem; padding: 0.5rem 0.75rem; background: var(--brand-soft); border-radius: 0.625rem; color: var(--brand); }
.pay-box > .btn-block { margin-top: 0.5rem; }
.pay-later { margin-top: 0.5rem; }

/* 电脑上看：内容居中，底栏也居中 */
@media (min-width: 48rem) {
  .tabbar { left: 50%; right: auto; width: 48rem; transform: translateX(-50%); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
  .store-head, .shelf, .sticky-bar { margin-left: 0; margin-right: 0; }
  .store-head { border-radius: 0 0 var(--radius) var(--radius); }
}
