:root {
  --ink: #111315;
  --ink-soft: #26292e;
  --accent: #ff521b;
  --accent-dark: #e0410f;
  --accent-soft: #fff2ed;
  --alipay: #1677ff;
  --wx: #07c160;
  --green: #00b578;
  --green-soft: #e8f9f1;
  --amber: #f59e0b;
  --amber-soft: #fff7e6;
  --red: #ef4444;
  --red-soft: #fef2f2;
  --text: #181a1f;
  --text-secondary: #4b5563;
  --muted: #8b929e;
  --line: rgba(17, 19, 21, 0.07);
  --line-strong: rgba(17, 19, 21, 0.13);
  --surface: #ffffff;
  --bg: #f6f5f2;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;
  --shadow-xs: 0 1px 2px rgba(17, 19, 21, 0.04);
  --shadow-sm: 0 4px 16px rgba(17, 19, 21, 0.05);
  --shadow-float: 0 14px 34px rgba(17, 19, 21, 0.24);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background: #eae8e3;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ---------- 外壳容器 ---------- */
.phone {
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
  position: relative;
  padding-bottom: 104px;
  box-shadow: 0 20px 60px rgba(17, 19, 21, 0.12);
}

/* ---------- 顶部栏（兼容原 index.html） ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(246, 245, 242, 0.84);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 25;
}

.brand {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 82, 27, 0.16);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-actions .link {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 5px 11px;
  border-radius: 999px;
  transition: transform 0.14s ease, background-color 0.16s ease;
}

.topbar-actions .link:active {
  transform: scale(0.95);
}

.topbar-actions .link.dim {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
  font-weight: 500;
  padding: 5px 6px;
}

.link { font-size: 13px; color: var(--accent); }
.link.dim { color: var(--muted); }

/* ---------- 顶部公告条 ---------- */
.banner {
  margin: 10px 14px 2px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
  display: flex;
  align-items: center;
  gap: 8px;
}

.banner::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}

.view {
  padding-bottom: 16px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 子页面导航头 ---------- */
.subhead {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 4px;
}

.back-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: transform 0.14s ease;
}

.back-btn:active { transform: scale(0.92); }

.subhead-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}

.subhead-extra {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

/* ---------- 首页 Hero Bento 卡片 ---------- */
.hero {
  margin: 10px 14px 12px;
  padding: 20px 18px 18px;
  border-radius: 22px;
  background:
    radial-gradient(120% 100% at 96% 0%, rgba(255, 82, 27, 0.34) 0%, rgba(255, 82, 27, 0) 56%),
    radial-gradient(90% 90% at 8% 100%, rgba(0, 181, 120, 0.20) 0%, rgba(0, 181, 120, 0) 58%),
    linear-gradient(145deg, #17191d 0%, #0d0e11 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(17, 19, 21, 0.16);
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.94);
}

.hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.28);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.28); }
  50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.08); }
}

.hero h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.hero p {
  margin: 6px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.5;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background-color 0.16s ease, transform 0.14s ease;
}

.hero-link:active {
  transform: scale(0.95);
  background: rgba(255, 255, 255, 0.22);
}

.hero-meta {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  white-space: nowrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.72);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ---------- 首页分类侧栏 + 商品网格 ---------- */
.catalog {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 2px 12px 0;
}

.cats-vertical {
  flex: 0 0 84px;
  position: sticky;
  top: 62px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  scrollbar-width: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 2px 0 20px;
}
.cats-vertical::-webkit-scrollbar { display: none; }

.cats-vertical .cat {
  width: 100%;
  padding: 10px 6px;
  border-radius: 13px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  position: relative;
  word-break: break-word;
  transition: all 0.18s ease;
}

.cats-vertical .cat:hover {
  background: rgba(255, 255, 255, 0.65);
}

.cats-vertical .cat.active {
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(17, 19, 21, 0.16);
}

.cats-vertical .cat.active::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 14px;
  border-radius: 99px;
  background: var(--accent);
}

.catalog-main {
  flex: 1;
  min-width: 0;
}

.grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: row;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: transform 0.16s ease, box-shadow 0.2s ease;
}

.product:active {
  transform: scale(0.975);
}

.pimg-wrap {
  position: relative;
  width: 104px;
  flex: 0 0 104px;
  height: 104px;
  background: #f0eee9;
  overflow: hidden;
}

.product img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.product.is-soldout img {
  opacity: 0.58;
  filter: grayscale(0.45);
}

.pbadge {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.pbadge.low {
  background: rgba(255, 247, 230, 0.94);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.pbadge.soldout {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(17, 19, 21, 0.78);
  backdrop-filter: blur(4px);
  color: #fff;
  padding: 5px 12px;
  font-size: 11px;
}

.pbody {
  padding: 10px 12px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.pname {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.38;
  min-height: 36px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.porigin {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 3px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.pstock {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.pstock.low {
  color: #d97706;
  font-weight: 600;
}

.pfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
}

.price {
  color: var(--ink);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.price .sym {
  font-size: 11px;
  font-weight: 700;
  margin-right: 1px;
  color: var(--accent);
}

.add {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(255, 82, 27, 0.32);
  transition: transform 0.14s ease, background-color 0.15s ease;
}

.add:active {
  transform: scale(0.86);
  background: var(--accent-dark);
}

.add[disabled] {
  background: #e2e4e8;
  color: #9ca3af;
  box-shadow: none;
  cursor: not-allowed;
}

/* ---------- 商品详情 ---------- */
.detail-hero {
  position: relative;
  width: 100%;
  background: #eceae4;
}

.detail-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

.float-back {
  position: absolute;
  left: 14px;
  top: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(17, 19, 21, 0.52);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.14s ease;
}

.float-back:active { transform: scale(0.92); }

.detail-sheet {
  position: relative;
  margin-top: -22px;
  border-radius: 24px 24px 0 0;
  background: var(--bg);
  padding-top: 14px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin: 12px 14px;
  padding: 16px;
  box-shadow: var(--shadow-xs);
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.stock-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: #047857;
}

.stock-pill.low {
  background: var(--amber-soft);
  color: #b45309;
}

.stock-pill.out {
  background: #f3f4f6;
  color: var(--muted);
}

.detail-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--ink);
}

.detail-price {
  font-size: 28px;
  color: var(--accent);
}

.detail-price .sym {
  font-size: 15px;
}

.detail-desc {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ---------- 步进器 ---------- */
.stepper {
  display: inline-flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.step {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: transform 0.12s ease;
}

.step:active { transform: scale(0.88); }

.step-num {
  min-width: 30px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- 按钮体系 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: transform 0.14s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.btn:active { transform: scale(0.97); }

.btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: 0 8px 20px rgba(17, 19, 21, 0.18);
}

.btn.primary[disabled] {
  background: #c5c9d1;
  border-color: #c5c9d1;
  box-shadow: none;
  cursor: not-allowed;
}

.btn.accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 82, 27, 0.28);
}

.btn.ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn.danger {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.btn.small {
  width: auto;
  padding: 7px 14px;
  font-size: 12px;
}

.btn.link {
  border: none;
  background: none;
  color: var(--accent);
  width: auto;
  padding: 6px 2px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}

/* ---------- 购物车 ---------- */
.free-tip {
  margin: 10px 14px 4px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 82, 27, 0.16);
  color: #b83208;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.free-tip.done {
  background: var(--green-soft);
  border-color: rgba(0, 181, 120, 0.2);
  color: #047857;
}

.cart-item {
  display: flex;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 10px 14px;
  padding: 12px;
  position: relative;
  box-shadow: var(--shadow-xs);
}

.cart-item img {
  width: 78px;
  height: 78px;
  border-radius: 13px;
  object-fit: cover;
  background: #f0eee9;
  flex: 0 0 auto;
}

.ci-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-right: 18px;
}

.ci-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}

.ci-foot {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ci-remove {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.summary {
  margin: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-xs);
}

.summary .line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 5px 0;
  font-variant-numeric: tabular-nums;
}

.summary .line.total {
  border-top: 1px dashed var(--line-strong);
  margin-top: 8px;
  padding-top: 12px;
  font-weight: 800;
  color: var(--ink);
}

.summary .line.total .price {
  font-size: 20px;
  color: var(--accent);
}

/* ---------- 结算页 ---------- */
.addr-box {
  border: 1.5px dashed rgba(255, 82, 27, 0.35);
  background: var(--accent-soft);
  border-radius: 14px;
  padding: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.14s ease, border-color 0.16s ease;
}

.addr-box.has-addr {
  border-style: solid;
  border-color: var(--line);
  background: var(--bg);
}

.addr-box:active { transform: scale(0.985); }

.addr-ico {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-shadow: var(--shadow-xs);
}

.addr-main {
  flex: 1;
  min-width: 0;
}

.addr-chevron {
  color: var(--muted);
  font-size: 18px;
  font-weight: 500;
}

.addr-box .empty-addr {
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}

.addr-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}

.addr-detail {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 3px;
  line-height: 1.45;
}

.phone-ok {
  color: #047857;
  font-weight: 700;
  font-size: 14px;
}

.hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.5;
}

.field {
  display: block;
  margin-top: 12px;
}

.field span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

input[type="text"], input[type="tel"], textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: var(--bg);
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

input:focus, textarea:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(17, 19, 21, 0.08);
}

/* ---------- 底部操作栏 ---------- */
.footer-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 480px;
  margin: 0 auto;
  box-shadow: 0 -8px 28px rgba(17, 19, 21, 0.06);
  z-index: 30;
}

.footer-bar .total {
  flex: 1;
  font-size: 12px;
  color: var(--muted);
}

.footer-bar .total .price {
  display: block;
  font-size: 21px;
  color: var(--ink);
  margin-top: 1px;
}

.footer-bar .btn {
  width: auto;
  min-width: 148px;
  padding: 12px 22px;
}

/* ---------- 订单列表 & 详情 ---------- */
.order-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 12px 14px;
  padding: 15px 16px;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: transform 0.14s ease, box-shadow 0.18s ease;
}

.order-card:active {
  transform: scale(0.985);
}

.oc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--ink);
  font-weight: 700;
}

.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.badge.s0, .badge.s1 { background: var(--amber-soft); color: #b45309; }
.badge.s2 { background: #eef4ff; color: var(--alipay); }
.badge.s3 { background: #ecfeff; color: #0e7490; }
.badge.s4 { background: var(--green-soft); color: #047857; }
.badge.s5, .badge.s7 { background: #f3f4f6; color: var(--muted); }
.badge.s6 { background: var(--red-soft); color: var(--red); }

.oc-lines {
  margin: 10px 0;
}

.oc-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 3px 0;
  font-variant-numeric: tabular-nums;
}

.oc-line span:last-child {
  font-weight: 600;
  color: var(--ink);
  flex: 0 0 auto;
}

.oc-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px dashed var(--line-strong);
  padding-top: 10px;
}

.status-hero {
  margin: 10px 14px 12px;
  padding: 24px 20px;
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(100% 100% at 95% 0%, rgba(255, 82, 27, 0.32) 0%, transparent 60%),
    linear-gradient(145deg, #17191d 0%, #0d0e11 100%);
  box-shadow: 0 12px 28px rgba(17, 19, 21, 0.14);
}

.status-hero.s4 {
  background:
    radial-gradient(100% 100% at 95% 0%, rgba(255, 255, 255, 0.18) 0%, transparent 60%),
    linear-gradient(145deg, #059669 0%, #047857 100%);
}

.status-hero.s5, .status-hero.s7 {
  background: linear-gradient(145deg, #6b7280 0%, #4b5563 100%);
}

.status-hero.s6 {
  background: linear-gradient(145deg, #f59e0b 0%, #b45309 100%);
}

.status-hero h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.status-hero p {
  margin: 6px 0 0;
  font-size: 12px;
  opacity: 0.86;
  line-height: 1.5;
}

/* ---------- 支付轮询动画 ---------- */
.pay-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.22);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
  margin-bottom: 14px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.pay-emblem {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 5px 0;
  gap: 12px;
  font-variant-numeric: tabular-nums;
}

.meta-row span:first-child {
  color: var(--muted);
  flex: 0 0 auto;
}

.meta-row span:last-child {
  text-align: right;
  color: var(--ink);
  font-weight: 500;
  word-break: break-all;
}

.action-bar {
  padding: 4px 14px 12px;
  display: flex;
  gap: 10px;
}

.empty {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 56px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.empty-ico {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
  margin-bottom: 4px;
}

/* ---------- 悬浮购物车（兼容原 index.html） ---------- */
.cartbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom));
  width: calc(100% - 28px);
  max-width: 452px;
  height: 58px;
  background: rgba(17, 19, 21, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  display: flex;
  align-items: center;
  padding: 0 7px 0 18px;
  color: #fff;
  box-shadow: var(--shadow-float);
  z-index: 35;
}

.cart-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  position: relative;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -5px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 999px;
  padding: 0 5px;
  border: 2px solid #15171b;
  font-variant-numeric: tabular-nums;
}

.cart-total {
  flex: 1;
  text-align: left;
  padding-left: 14px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.cart-total .sym {
  font-size: 12px;
  font-weight: 600;
  margin-right: 2px;
  color: rgba(255, 255, 255, 0.72);
}

.cart-go {
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(255, 82, 27, 0.36);
  transition: transform 0.14s ease, background-color 0.16s ease;
}

.cart-go:active {
  transform: scale(0.95);
  background: var(--accent-dark);
}

/* ---------- 底部抽屉弹窗 ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(17, 19, 21, 0.52);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 60;
}

.modal-card {
  background: var(--surface);
  width: 100%;
  max-width: 480px;
  border-radius: 24px 24px 0 0;
  padding: 12px 18px calc(22px + env(safe-area-inset-bottom));
  max-height: 84vh;
  overflow-y: auto;
  animation: sheet 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-card::before {
  content: "";
  display: block;
  width: 38px;
  height: 4px;
  border-radius: 99px;
  background: #e2e4e8;
  margin: 0 auto 14px;
}

@keyframes sheet {
  from { transform: translateY(36px); opacity: 0.5; }
  to { transform: translateY(0); opacity: 1; }
}

.modal h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}

.pick-item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  border-radius: 14px;
  padding: 13px 14px;
  margin-top: 10px;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.14s ease;
}

.pick-item:hover {
  background: var(--surface);
  border-color: var(--ink);
}

.pick-item:active { transform: scale(0.985); }

.pick-item strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.pick-item em {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

/* ---------- 支付方式（支付宝 H5） ---------- */
.pay-method {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid rgba(22, 119, 255, 0.32);
  background: rgba(22, 119, 255, 0.04);
  border-radius: 14px;
  padding: 12px 14px;
}

.pay-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--alipay);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  flex: 0 0 auto;
}

.pay-method + .pay-method { margin-top: 10px; }

.pay-method.active {
  border-color: rgba(255, 82, 27, 0.5);
  background: rgba(255, 82, 27, 0.06);
  box-shadow: 0 2px 10px rgba(255, 82, 27, 0.08);
}

.pay-method.disabled {
  border-color: var(--line-strong);
  background: #fafafa;
  opacity: 0.8;
}

.pay-ico.wx { background: var(--wx); }

.pay-check.off {
  background: transparent;
  border: 1.5px solid var(--line-strong);
  color: transparent;
}

.pay-main { flex: 1; min-width: 0; }
.pay-main strong { display: block; font-size: 14px; color: var(--ink); }
.pay-main em { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-top: 2px; line-height: 1.45; }

.pay-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--alipay);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.pay-warn {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.55;
  color: #b45309;
  background: var(--amber-soft);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 12px;
  padding: 9px 12px;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  background: rgba(17, 19, 21, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  z-index: 70;
  max-width: 86vw;
  text-align: center;
  box-shadow: 0 10px 26px rgba(17, 19, 21, 0.26);
}

/* ---------- 桌面端预览框架 ---------- */
@media (min-width: 520px) {
  body {
    padding: 20px 16px 36px;
    background-image: radial-gradient(rgba(17, 19, 21, 0.08) 1px, transparent 1px);
    background-size: 18px 18px;
  }
  .phone {
    border-radius: 28px;
    overflow: hidden;
    min-height: calc(100vh - 56px);
    border: 1px solid rgba(17, 19, 21, 0.08);
  }
}
/* ---------- 用户管理 / 地址簿 ---------- */
.account-tabs {
  display: flex;
  gap: 5px;
  margin: 6px 14px 4px;
  background: #ecebe6;
  padding: 4px;
  border-radius: 14px;
}
.account-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 9px 0;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}
.account-tab.active {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}
.addr-toolbar { margin: 8px 14px 0; display: flex; justify-content: flex-end; }
.addr-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 10px 14px;
  padding: 14px;
  box-shadow: var(--shadow-xs);
}
.addr-item-head { display: flex; align-items: center; gap: 8px; }
.addr-item-head strong { font-size: 14px; color: var(--ink); }
.addr-default {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  color: #b83208;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 82, 27, 0.18);
  padding: 2px 8px;
  border-radius: 999px;
}
.addr-item-text { margin-top: 6px; font-size: 12px; color: var(--text-secondary); line-height: 1.55; }
.addr-item-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  justify-content: flex-end;
  border-top: 1px dashed var(--line);
  padding-top: 8px;
}
.addr-item-actions .btn.link { font-size: 12px; padding: 2px 0; }
.danger-text { color: var(--red); }
.field-row { display: flex; gap: 8px; }
.field-row .field { flex: 1; min-width: 0; }
.checkline { display: flex; align-items: center; gap: 8px; margin: 10px 0 2px; font-size: 12px; color: var(--text-secondary); }
.checkline input { width: 16px; height: 16px; }
