/* 小厘商城 · 暖色编辑风（系统字体，无外链阻塞） */

html.mall-theme-pending:not(.mall-theme-ready) body.mall-app #screen-app {
  visibility: hidden;
}

:root {
  --bg-base: #f6f1ea;
  --bg: #f6f1ea;
  --bg-deep: #ebe3d6;
  --surface: #fffdf9;
  --surface-2: #faf6f0;
  --ink: #1c1612;
  --ink-soft: #5c5348;
  --ink-muted: #8a8074;
  --accent: #c45c26;
  --accent-light: #e8925a;
  --accent-dark: #9a3f18;
  --accent-soft: var(--accent-soft);
  --accent-muted: var(--accent-muted);
  --accent-border: rgba(196, 92, 38, 0.15);
  --accent-border-strong: var(--accent-border-strong);
  --accent-shadow: var(--accent-shadow);
  --accent-shadow-strong: var(--accent-shadow-strong);
  --bg-glow-1: rgba(232, 146, 90, 0.35);
  --bg-glow-2: rgba(184, 134, 11, 0.2);
  --gold: #b8860b;
  --gold-soft: #f0e0b8;
  --success: #2d6a4f;
  --danger: #b91c1c;
  --danger-bg: #fde8e8;
  --border: rgba(28, 22, 18, 0.08);
  --shadow-sm: 0 2px 8px rgba(28, 22, 18, 0.06);
  --shadow-md: 0 8px 28px rgba(28, 22, 18, 0.1);
  --shadow-lg: 0 20px 48px var(--accent-shadow);
  --radius: 16px;
  --radius-sm: 10px;
  --font-display: "Songti SC", "STSong", "SimSun", serif;
  --font-ui: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  background: var(--bg-base);
  overflow-x: hidden;
}

/* 背景氛围 */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 80% at 100% -20%, var(--bg-glow-1), transparent 50%),
    radial-gradient(ellipse 90% 60% at -10% 100%, var(--bg-glow-2), transparent 45%),
    linear-gradient(165deg, var(--bg-base) 0%, var(--bg-deep) 100%);
}

.bg-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

.page {
  position: relative;
  z-index: 1;
  max-width: 440px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 20px max(40px, env(safe-area-inset-bottom));
  animation: page-in 0.7s var(--ease-out) both;
}

.page-login {
  min-height: 100vh;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* 品牌区 */
.brand {
  text-align: center;
  padding: 8px 0 28px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  margin-bottom: 14px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: rgba(255, 253, 249, 0.85);
  border: 1px solid var(--border);
  border-radius: 100px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}

.brand-badge svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.brand h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.brand .sub {
  margin: 8px 0 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

/* 卡片 */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  margin-top: 0;
  box-shadow: var(--shadow-md);
  animation: card-in 0.6s var(--ease-out) 0.1s both;
}

.card + .card,
.balance-hero + .card {
  margin-top: 16px;
  animation-delay: 0.18s;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.card-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold-soft), #fff);
  color: var(--accent);
}

.card-icon svg {
  width: 20px;
  height: 20px;
}

/* 表单 */
.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.field input {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.field input::placeholder {
  color: var(--ink-muted);
  opacity: 0.7;
}

.field input:focus {
  outline: none;
  border-color: var(--accent-light);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-border);
}

/* 余额主视觉 */
.balance-hero {
  position: relative;
  padding: 28px 24px 24px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(145deg, #2a221c 0%, #1c1612 55%, #3d2e24 100%);
  color: #fffdf9;
  box-shadow: var(--shadow-lg);
  animation: card-in 0.6s var(--ease-out) 0.05s both;
}

.balance-hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 146, 90, 0.45), transparent 70%);
}

.balance-hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 134, 11, 0.25), transparent 70%);
}

.balance-hero-inner {
  position: relative;
  z-index: 1;
}

.balance-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

.balance-amount {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.balance-amount .currency {
  font-size: 1.25rem;
  font-weight: 600;
  opacity: 0.85;
  margin-right: 2px;
}

.balance-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 253, 249, 0.12);
  font-size: 0.8125rem;
  opacity: 0.9;
}

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

.balance-meta svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
  padding: 14px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s var(--ease-out), box-shadow 0.2s, background 0.2s, color 0.2s;
}

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

.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn.primary {
  margin-top: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  box-shadow: 0 4px 16px var(--accent-shadow-strong);
}

.btn.primary:hover {
  box-shadow: 0 6px 22px var(--accent-shadow-strong);
}

.btn.is-loading {
  opacity: 0.82;
  pointer-events: none;
}

.btn.is-loading .btn-label::after {
  content: '…';
  animation: btn-loading-dots 1s steps(3, end) infinite;
}

@keyframes btn-loading-dots {
  0% {
    content: '';
  }
  33% {
    content: '.';
  }
  66% {
    content: '..';
  }
  100% {
    content: '…';
  }
}

.btn.featured {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
}

.btn.secondary {
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.btn.secondary:hover {
  background: var(--gold-soft);
  border-color: rgba(184, 134, 11, 0.25);
}

.btn.ghost {
  color: var(--ink-muted);
  background: transparent;
  border: 1px dashed var(--border);
  font-weight: 500;
}

.btn.ghost:hover {
  color: var(--ink-soft);
  border-color: var(--ink-muted);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.actions-title {
  margin: 0 0 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* 兑换页状态 */
.entry-page .card {
  text-align: center;
  padding: 32px 24px;
}

.status-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-height: 120px;
  justify-content: center;
}

.status {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.status.loading {
  color: var(--ink-muted);
}

.status.error {
  color: var(--danger);
}

/* 加载动画 */
.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--gold-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

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

.hint {
  font-size: 0.75rem;
  color: var(--ink-muted);
  line-height: 1.5;
  margin: 20px 0 0;
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}

.link-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: gap 0.2s;
}

.link-back:hover {
  gap: 10px;
}

.link-back svg {
  width: 16px;
  height: 16px;
}

/* 页脚 */
.footer {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.6875rem;
  line-height: 1.65;
  color: var(--ink-muted);
  text-align: center;
}

.footer code {
  font-family: ui-monospace, monospace;
  font-size: 0.625rem;
  padding: 2px 6px;
  background: rgba(28, 22, 18, 0.06);
  border-radius: 4px;
  color: var(--ink-soft);
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: max(calc(var(--tabbar-h, 56px) + 16px), calc(12px + env(safe-area-inset-bottom)));
  z-index: 200;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: max-content;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: left;
  color: var(--ink);
  background: rgba(255, 252, 248, 0.97);
  border: 1px solid rgba(28, 22, 18, 0.08);
  border-radius: 14px;
  box-shadow:
    0 10px 36px rgba(28, 22, 18, 0.12),
    0 2px 8px rgba(28, 22, 18, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform: translateX(-50%) translateY(16px) scale(0.98);
  opacity: 0;
  transition:
    transform 0.32s var(--ease-out),
    opacity 0.32s var(--ease-out);
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0) scale(1);
  opacity: 1;
}

.toast-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.toast-text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.toast.success .toast-icon {
  color: #2d6a4f;
  background: rgba(45, 106, 79, 0.12);
}

.toast.success {
  color: var(--ink);
  border-color: rgba(45, 106, 79, 0.16);
}

.toast.error {
  color: #8f1d1d;
  background: rgba(255, 250, 250, 0.98);
  border-color: rgba(185, 28, 28, 0.2);
  box-shadow:
    0 10px 36px rgba(185, 28, 28, 0.1),
    0 2px 8px rgba(185, 28, 28, 0.05);
}

.toast.error .toast-icon {
  color: #fff;
  background: var(--danger);
}

body.cdi-sheet-open .toast {
  bottom: max(132px, calc(108px + env(safe-area-inset-bottom)));
  z-index: 150;
}

body.mall-sheet-open .toast {
  bottom: max(132px, calc(108px + env(safe-area-inset-bottom)));
  z-index: 150;
}

/* Confirm dialog */
.mall-confirm-mask {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(28, 22, 18, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.28s var(--ease-out);
  pointer-events: none;
}

.mall-confirm-mask.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mall-confirm {
  width: min(320px, calc(100vw - 48px));
  padding: 24px 22px 20px;
  text-align: center;
  background: var(--surface);
  border: 1px solid rgba(28, 22, 18, 0.06);
  border-radius: 20px;
  box-shadow:
    0 24px 56px rgba(28, 22, 18, 0.16),
    0 4px 12px rgba(28, 22, 18, 0.06);
  transform: translateY(12px) scale(0.96);
  opacity: 0;
  transition:
    transform 0.32s var(--ease-out),
    opacity 0.28s var(--ease-out);
}

.mall-confirm-mask.is-open .mall-confirm {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.mall-confirm-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  background: var(--accent-muted);
  border: 1px solid var(--accent-border);
}

.mall-confirm.is-danger .mall-confirm-icon {
  color: var(--danger);
  background: var(--danger-bg);
  border-color: rgba(185, 28, 28, 0.14);
}

.mall-confirm-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}

.mall-confirm-message {
  margin: 0 0 22px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.mall-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mall-confirm-btn {
  min-height: 44px;
  padding: 0 14px;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition:
    transform 0.15s var(--ease-out),
    background 0.2s,
    color 0.2s,
    box-shadow 0.2s;
}

.mall-confirm-btn:active {
  transform: scale(0.98);
}

.mall-confirm-btn--cancel {
  color: var(--ink-soft);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.mall-confirm-btn--cancel:active {
  background: var(--bg-deep);
}

.mall-confirm-btn--ok {
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  box-shadow: 0 4px 14px var(--accent-shadow);
}

.mall-confirm.is-danger .mall-confirm-btn--ok {
  background: linear-gradient(135deg, #dc2626 0%, var(--danger) 100%);
  box-shadow: 0 4px 14px rgba(185, 28, 28, 0.28);
}

body.mall-confirm-open {
  overflow: hidden;
}

/* 演示横幅 */
.demo-banner {
  margin: 0 0 16px;
  padding: 12px 14px;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--accent-dark);
  background: linear-gradient(135deg, rgba(240, 224, 184, 0.9), rgba(232, 146, 90, 0.25));
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
}

.demo-banner strong {
  color: var(--accent-dark);
}

/* CDI 栏目 */
.cdi-column {
  margin-bottom: 14px;
  border: 1px solid var(--accent-border-strong);
  background: linear-gradient(145deg, #fffdf9 0%, #fff6ee 100%);
  box-shadow: var(--shadow-md);
}

.cdi-column-head h3 {
  margin: 8px 0 6px;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
}

.cdi-column-head p {
  margin: 0 0 16px;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.cdi-tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: 100px;
}

/* 商品网格 */
.product-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.product-grid-cards {
  gap: 12px;
}

.product-grid > li {
  display: flex;
  min-width: 0;
}

.product-grid .product-card {
  flex: 1;
  width: 100%;
}

.product {
  width: 100%;
  padding: 0;
  text-align: left;
  font-family: inherit;
  color: inherit;
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
}

.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
}

.product-card:active {
  transform: scale(0.98);
}

.product-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  background: linear-gradient(180deg, var(--surface-2) 0%, #fff 100%);
}

.product-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 10px 12px;
}

.product-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

.product-price {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--accent);
}

.product-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}

.product-price-origin {
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--ink-muted);
  text-decoration: line-through;
}

.product-sales {
  font-size: 0.625rem;
  color: var(--ink-muted);
}

.mall-product-card {
  position: relative;
}

.product-card-open {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  margin: 0;
  font: inherit;
  text-align: left;
  color: inherit;
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
}

.product-card-open:active {
  opacity: 0.92;
}

.product-quick-cart {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--accent-dark);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border: 1px solid var(--accent-border-strong);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(28, 22, 18, 0.08);
  cursor: pointer;
  transition: transform 0.15s var(--ease-out), background 0.15s;
}

.product-quick-cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 0.5625rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  color: #fff;
  background: var(--accent);
  border-radius: 100px;
  box-shadow: 0 1px 3px rgba(122, 51, 20, 0.35);
  pointer-events: none;
}

.product-quick-cart .icon-flat,
.product-quick-cart-icon .icon-flat {
  width: 16px;
  height: 16px;
}

.product-quick-cart:active {
  transform: scale(0.94);
  background: var(--accent-muted);
}

.mall-product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 2px 6px;
  font-size: 0.625rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 4px;
}

.home-mall-cat-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.product-sheet-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}

.product-sheet-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
}

.compact-actions {
  padding-top: 8px;
  padding-bottom: 8px;
}

.compact-actions .btn {
  width: 100%;
}

/* 桥接页 / 全屏过渡 overlay */
.bridge-page .bridge-page-inner,
.bridge-page-inner {
  max-width: 440px;
}

.bridge-brand {
  text-align: center;
}

.bridge-staff {
  margin-top: 4px;
}

.bridge-card {
  text-align: center;
}

.bridge-hint {
  margin-top: 16px;
}

.cdi-bridge-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(246, 241, 234, 0.92);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-out);
}

.cdi-bridge-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.cdi-bridge-overlay-inner {
  text-align: center;
  max-width: 280px;
}

.cdi-bridge-overlay-title {
  margin: 16px 0 4px;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
}

.cdi-bridge-overlay-text {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

/* 演示兑换页（暖色，与商城一致） */
.mock-user-line {
  margin: 6px 0 8px;
  font-weight: 600;
  font-size: 0.9375rem;
}

.mock-balance-line {
  margin: 0;
  font-size: 1.75rem;
}

.voucher-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.voucher {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  text-align: left;
  color: var(--ink);
  background: var(--surface-2);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.voucher:hover {
  box-shadow: var(--shadow-sm);
}

.voucher.active {
  border-color: var(--accent);
  background: #fff6ee;
  box-shadow: var(--shadow-sm);
}

.voucher-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.voucher-name {
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.mock-success-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--success);
}

.mock-success-msg {
  margin: 0 0 16px;
  font-size: 0.875rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ========== 商城 App 壳 + 底部 Tab ========== */
.mall-app {
  --tabbar-h: calc(52px + env(safe-area-inset-bottom));
  --app-pad-x: 16px;
  --section-gap: 14px;
}

.page-login {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding-bottom: 40px;
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 440px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: var(--tabbar-h);
  background: transparent;
}

.app-shell .card {
  animation: none;
  margin-top: 0;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
  padding: max(8px, env(safe-area-inset-top)) var(--app-pad-x) 10px;
  background: rgba(246, 241, 234, 0.92);
  background: color-mix(in srgb, var(--bg-base) 92%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
}

.topbar-left {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.topbar-logo {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.topbar-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.topbar-balance {
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-dark);
  white-space: nowrap;
  background: linear-gradient(135deg, var(--gold-soft), #fff);
  border: 1px solid var(--accent-border);
  border-radius: 100px;
}

.topbar-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.topbar-icon-btn svg {
  width: 20px;
  height: 20px;
}

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 10px var(--app-pad-x) 12px;
  overflow: hidden;
}

.app-banner {
  flex-shrink: 0;
  margin: 0 0 var(--section-gap);
}

.tab-panel {
  animation: tab-in 0.35s var(--ease-out) both;
}

.tab-panel-fill {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 0 calc(var(--app-pad-x) * -1);
  padding: 0 var(--app-pad-x);
}

.section-block {
  margin-top: var(--section-gap);
}

.section-block:first-child {
  margin-top: 0;
}

.section-label {
  margin: 0 0 8px;
  padding-left: 2px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

@keyframes tab-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* 首页 · 可滚动 */
.tab-panel-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 calc(var(--app-pad-x) * -1);
  padding: 0 var(--app-pad-x) 16px;
}

.app-shell[data-tab="home"] .app-topbar {
  display: none;
}

.app-shell[data-tab="category"] .app-topbar {
  display: none;
}

.app-shell[data-tab="home"] .app-main {
  padding-top: 0;
}

.app-shell[data-tab="home"] .tab-panel-scroll {
  padding-top: 0;
}

.app-shell[data-tab="category"] .category-top {
  padding-top: max(10px, env(safe-area-inset-top));
}

.home-mall-notice,
.diy-notice-bar {
  margin: 0 0 10px;
  padding: 8px 12px;
  font-size: 0.75rem;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 8px;
}

.home-page {
  padding-bottom: 8px;
}

/* 首页 · 标准电商布局 */
.home-mall {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 28px;
}

.home-mall-header {
  display: flex;
  align-items: center;
  padding: 2px 0 4px;
}

.home-mall-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.home-mall-logo {
  font-family: var(--font-display);
  font-size: 1.3125rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.home-mall-tagline {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.home-mall-panel {
  padding: 12px;
  background: var(--surface);
  border: 1px solid rgba(28, 22, 18, 0.06);
  border-radius: 14px;
  box-shadow: none;
}

.home-mall-panel-search {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 14px 14px;
}

.home-mall-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.home-mall-panel-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.home-mall-panel-more {
  padding: 4px 10px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border: none;
  border-radius: 100px;
  cursor: pointer;
}

.home-mall-panel-products {
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.home-mall-addr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 2px;
  background: transparent;
  border: none;
  border-radius: 0;
}

.home-mall-addr-icon {
  flex-shrink: 0;
  color: var(--accent);
}

.home-mall-addr-text {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-mall-addr-edit {
  flex-shrink: 0;
  padding: 4px 10px;
  font-family: inherit;
  font-size: 0.75rem;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border: none;
  border-radius: 100px;
  cursor: pointer;
}

/* 首页头区 · 搜索 / Tab / 轮播 */
.home-hero {
  position: relative;
  margin: 0 calc(var(--app-pad-x) * -1) 14px;
  padding: env(safe-area-inset-top, 0px) var(--app-pad-x) 16px;
  overflow: hidden;
  border-radius: 0 0 1px 1px;
}

.home-hero-bg {
  position: absolute;
  inset: -24px;
  z-index: 0;
  background: linear-gradient(125deg, #6b2d10 0%, var(--accent) 42%, #e8a06a 100%);
  background-size: cover;
  background-position: center;
  filter: blur(32px);
  transform: scale(1.12);
  transition: background-image 0.45s ease;
  pointer-events: none;
}

.home-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0.02) 38%,
    rgba(246, 241, 234, 0.62) 100%
  );
  pointer-events: none;
}

.home-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-hero-search {
  width: 100%;
  margin-top: 15px;
}

.home-hero-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 0;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 100px;
  box-shadow: none;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
}

.home-hero-search-bar:active {
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(255, 255, 255, 0.45);
}

.home-hero-search-bar .home-mall-search-placeholder {
  flex: 1;
  min-width: 0;
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: none;
}

.home-hero-search-icon {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.88);
  opacity: 1;
}

.home-hero-search-icon svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.6;
}

.home-hero-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 0;
}

.home-hero-tabs-list {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.home-hero-tabs-list::-webkit-scrollbar {
  display: none;
}

.home-hero-tab {
  position: relative;
  flex-shrink: 0;
  padding: 0;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.68);
  background: none;
  border: none;
  border-radius: 0;
  cursor: pointer;
  text-shadow: none;
  transition: color 0.2s, font-weight 0.2s;
}

.home-hero-tab:hover {
  color: rgba(255, 255, 255, 0.82);
}

.home-hero-tab.active {
  color: #fff;
  font-weight: 600;
}

.home-hero-tabs-grid {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-bottom: 0;
  padding: 0;
  font-family: inherit;
  color: rgba(255, 255, 255, 0.88);
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.2s;
}

.home-hero-tabs-grid:active {
  opacity: 1;
}

.home-hero-tabs-grid svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.5;
}

.home-hero .home-mall-panel-banner {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.home-hero .home-mall-banner-slider {
  border-radius: 14px 14px 12px 12px;
}

.home-hero .home-mall-banner-slide {
  min-height: 0;
}

.home-hero .home-mall-banner-dots {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

.home-mall-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 100px;
  cursor: pointer;
}

.home-mall-search.home-hero-search-bar {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.home-mall-search.home-hero-search-bar:active {
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(255, 255, 255, 0.45);
}

.home-mall-search:active {
  border-color: var(--accent-border);
}

.home-mall-search svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
}

.home-mall-search-placeholder {
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
  text-align: left;
}

.home-mall-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-mall-keyword {
  padding: 5px 12px;
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--surface-2);
  border: none;
  border-radius: 100px;
  cursor: pointer;
}

.home-mall-keyword:active {
  background: var(--accent-muted);
  color: var(--accent-dark);
}

.home-mall-banner-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 310 / 150;
  min-height: 0;
  border-radius: 14px;
  overflow: hidden;
}

.home-mall-panel-banner {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.home-mall-banner-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.45s ease;
  will-change: transform;
}

.home-mall-banner-slide {
  position: relative;
  flex: 0 0 100%;
  max-width: 100%;
  min-width: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  text-align: left;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(125deg, #6b2d10 0%, var(--accent) 42%, #e8a06a 100%);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  overflow: hidden;
  min-height: 0;
}

.home-mall-banner-dots {
  position: absolute;
  right: 14px;
  bottom: 12px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.home-mall-banner-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transition: background 0.2s, transform 0.2s;
}

.home-mall-banner-dots span.active {
  background: #fff;
  transform: scale(1.15);
}

.home-mall-banner {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(125deg, #6b2d10 0%, var(--accent) 42%, #e8a06a 100%);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: none;
  overflow: hidden;
}

.home-mall-banner-bg {
  position: absolute;
  inset: 0;
  background: url("/static/img/home-banner-bg.svg") right center / auto 100% no-repeat;
  pointer-events: none;
}

.home-mall-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(107, 45, 16, 0.35) 0%,
    transparent 55%
  );
  pointer-events: none;
}

.home-mall-banner--image::after {
  display: none;
}

.home-mall-banner-inner,
.home-mall-banner-bg,
.home-mall-banner-tag,
.home-mall-banner-title,
.home-mall-banner-desc {
  display: none;
}

.home-mall-banner-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 18px 20px;
}

.home-mall-cdi {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  font-family: inherit;
  color: inherit;
  background: linear-gradient(135deg, #fffdf9 0%, rgba(240, 224, 184, 0.45) 100%);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.home-mall-cdi:active {
  transform: scale(0.99);
}

.home-mall-cdi-icon {
  flex-shrink: 0;
  color: var(--accent-dark);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.home-mall-cdi-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.home-mall-cdi-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
}

.home-mall-cdi-badge {
  padding: 1px 6px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: 4px;
}

.home-mall-cdi-desc {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-dark);
}

.home-mall-cdi-arrow {
  flex-shrink: 0;
  color: var(--ink-muted);
}

.home-mall-promos {
  display: grid;
}

.home-mall-promo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  font-family: inherit;
  background: var(--surface);
  border: 1px solid rgba(28, 22, 18, 0.06);
  border-radius: 12px;
  cursor: pointer;
  box-shadow: none;
  transition: opacity 0.15s var(--ease-out);
}

.home-mall-promo:active {
  opacity: 0.88;
}

.home-mall-promos--plain .home-mall-promo {
  background: transparent;
  border: none;
}

.home-mall-promo-icon {
  color: var(--accent);
  background: var(--accent-muted);
}

.home-mall-promo-icon.home-mall-promo-icon--custom {
  background: transparent;
  color: transparent;
  padding: 0;
}

.home-mall-promo-icon-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.home-mall-promo-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.home-mall-promos--card .home-mall-promo--card {
  align-items: stretch;
  text-align: center;
  gap: 4px;
  padding: 12px 10px 10px;
}

.home-mall-promo-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.home-mall-promo-sub {
  font-size: 0.625rem;
  font-weight: 400;
  line-height: 1.35;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.home-mall-promo-media {
  width: 100%;
  aspect-ratio: 1;
  margin-top: auto;
  overflow: hidden;
  color: var(--accent);
  background: var(--accent-muted);
}

.home-mall-promo-media.home-mall-promo-icon--custom {
  background: transparent;
  color: transparent;
  padding: 0;
}

.home-mall-banner-tag {
  padding: 3px 10px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 100px;
}

.home-mall-banner-title {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.25;
}

.home-mall-banner-desc {
  font-size: 0.75rem;
  opacity: 0.92;
}

.home-mall-panel-cats {
  padding: 12px 10px 14px;
}

.home-mall-panel-cats .home-mall-cats {
  margin: 0;
}

.home-mall-cats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px 6px;
}

.home-mall-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 2px 6px;
  font-family: inherit;
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.home-mall-cat:active {
  background: var(--surface-2);
}

.home-mall-cat-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: var(--accent-dark);
  background: var(--surface-2);
  border: none;
  box-shadow: none;
}

.home-mall-cat-name {
  width: 100%;
  text-align: center;
  line-height: 1.25;
  min-height: 2.5em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
}

.home-cat-loading {
  grid-column: 1 / -1;
  padding: 16px 8px;
  font-size: 0.8125rem;
  color: var(--ink-muted);
  text-align: center;
}

.home-mall-block {
  margin-top: 0;
}

.home-mall-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.home-mall-block-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.home-mall-block-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
}

.home-mall-block-sub {
  margin: 0;
  font-size: 0.6875rem;
  color: var(--ink-muted);
}

.home-mall-block-more {
  padding: 0;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-dark);
  background: none;
  border: none;
  cursor: pointer;
}

.home-mall .product-grid .product-thumb {
  flex-shrink: 0;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
  background: #f3ece4;
}

.product-thumb-img,
.product-sheet-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-mall .product-grid .product-thumb-img {
  object-fit: contain;
  padding: 12px;
  box-sizing: border-box;
  background: #f3ece4;
}

.home-mall .product-grid .product-thumb.icon-box {
  background: #f3ece4;
}

.product-sheet-thumb-img {
  max-height: 220px;
  border-radius: 12px;
  margin: 0 auto 12px;
}

.home-product-empty {
  grid-column: 1 / -1;
  list-style: none;
  padding: 24px 12px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 14px;
}

.home-product-skeleton {
  list-style: none;
  padding: 10px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--border);
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}

.home-product-skeleton-thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    rgba(28, 22, 18, 0.06) 25%,
    rgba(28, 22, 18, 0.1) 50%,
    rgba(28, 22, 18, 0.06) 75%
  );
  background-size: 200% 100%;
  margin-bottom: 10px;
}

.home-product-skeleton-line {
  height: 10px;
  border-radius: 6px;
  background: rgba(28, 22, 18, 0.08);
  margin-bottom: 8px;
}

.home-product-skeleton-line.w80 {
  width: 80%;
}

.home-product-skeleton-line.w50 {
  width: 50%;
}

@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.72;
  }
}

.home-product-empty {
  grid-column: 1 / -1;
}

.home-product-retry {
  border: none;
  background: none;
  color: var(--accent, #c45c26);
  font-size: 14px;
  padding: 8px;
  cursor: pointer;
}

/* 首页商品列表 · 复用分类页 product-card */
.home-mall .product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-mall .product-grid > li {
  display: flex;
  min-width: 0;
}

.home-mall .product-grid .product-card {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(28, 22, 18, 0.06);
  border-radius: 12px;
  box-shadow: none;
  overflow: hidden;
}

.home-mall .product-grid .product-card-open:active {
  opacity: 0.92;
}

.home-mall .product-grid .product-thumb {
  border-radius: 0;
}

.home-mall .product-grid .product-quick-cart {
  right: 8px;
  bottom: 8px;
  top: auto;
}

.home-mall .product-grid .product-body {
  flex: 1;
  padding: 10px 36px 12px 10px;
  background: #fff;
}

.mall-feed-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mall-feed-card:active {
  transform: scale(0.98);
}

.mall-feed-card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 2px 6px;
  font-size: 0.625rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 4px;
}

.mall-feed-card__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--surface-2) 0%, #fff 100%);
  color: var(--accent);
}

.mall-feed-card__thumb .icon-flat {
  width: 48px;
  height: 48px;
}

.mall-feed-card__body {
  display: block;
  padding: 10px 10px 12px;
  flex: 1;
}

.mall-feed-card__name {
  margin: 0 0 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mall-feed-card__price {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}

.mall-feed-card__price em {
  font-style: normal;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.mall-feed-card__price s {
  font-size: 0.6875rem;
  color: var(--ink-muted);
  text-decoration: line-through;
}

.mall-feed-card__sales {
  display: block;
  margin-top: 4px;
  font-size: 0.625rem;
  color: var(--ink-muted);
}

/* 商品详情 Sheet */
.product-sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  text-align: center;
  -webkit-overflow-scrolling: touch;
}

.product-sheet-body--rich {
  text-align: left;
}

.product-sheet-loading {
  padding: 48px 16px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.product-sheet-hero-frame {
  width: 100%;
  max-width: 280px;
  height: 280px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--surface-2);
  overflow: hidden;
}

.product-sheet-hero-frame .product-sheet-thumb {
  width: 88px;
  height: 88px;
}

.product-sheet-hero-img {
  width: 100%;
  max-width: 280px;
  max-height: 280px;
  margin: 0;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  display: block;
}

.product-sheet-fetching {
  margin-top: 12px;
  padding: 10px 0;
  font-size: 0.8125rem;
  color: var(--ink-muted);
  text-align: center;
}

.product-sheet-core {
  text-align: center;
}

.product-sheet-extra {
  text-align: left;
}

.product-sheet-gallery {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin: 0 -4px 14px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.product-sheet-gallery-img {
  flex: 0 0 72%;
  max-width: 240px;
  height: 200px;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--surface-2);
  scroll-snap-align: start;
}

.product-spec-block {
  margin: 0 0 14px;
  text-align: left;
}

.product-spec-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
}

.product-spec-count {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.product-spec-options {
  display: grid;
  gap: 10px;
}

.product-spec-options--grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-spec-options--list {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.product-spec-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 8px 28px 8px 8px;
  border: 1.5px solid var(--line, #ebe3d9);
  border-radius: 12px;
  background: var(--surface, #fff);
  font: inherit;
  font-size: 0.8125rem;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.12s ease;
}

.product-spec-option--list {
  align-items: flex-start;
  padding: 10px 34px 10px 10px;
  gap: 10px;
}

.product-spec-option--list .product-spec-option-img {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  margin-top: 1px;
}

.product-spec-option--list .product-spec-option-body {
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.product-spec-option--list .product-spec-option-main {
  flex: 1;
  min-width: 0;
}

.product-spec-option--list .product-spec-option-text {
  font-weight: 500;
  line-height: 1.45;
  word-break: break-word;
  display: block;
}

.product-spec-option--list .product-spec-option-price {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 1px;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.product-spec-option--list .product-spec-option-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.product-spec-option--list .product-spec-option-tag {
  display: inline-block;
  max-width: 100%;
  padding: 3px 8px;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink-soft);
  background: var(--surface-2, #f5f0ea);
  border-radius: 999px;
  word-break: break-word;
}

.product-spec-option--list.is-selected .product-spec-option-tag {
  color: var(--accent, #c45c3e);
  background: rgba(196, 92, 62, 0.12);
}

.product-spec-options--grid .product-spec-option-body {
  flex-direction: column;
  gap: 2px;
}

.product-spec-options--grid .product-spec-option-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
}

.product-spec-options--grid .product-spec-option-tags {
  justify-content: flex-start;
}

.product-spec-option-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.product-spec-option-tag {
  display: inline-block;
  max-width: 100%;
  padding: 2px 6px;
  font-size: 0.625rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink-soft);
  background: var(--surface-2, #f5f0ea);
  border-radius: 999px;
  word-break: break-word;
}

.product-spec-option.is-selected .product-spec-option-tag {
  color: var(--accent, #c45c3e);
  background: rgba(196, 92, 62, 0.12);
}

.product-spec-option:active:not(.is-selected) {
  transform: scale(0.98);
}

.product-spec-option.is-selected {
  border-color: var(--accent, #c45c3e);
  background: linear-gradient(
    145deg,
    rgba(196, 92, 62, 0.1) 0%,
    rgba(196, 92, 62, 0.03) 100%
  );
  box-shadow:
    0 0 0 1px rgba(196, 92, 62, 0.18),
    0 4px 14px rgba(196, 92, 62, 0.1);
}

.product-spec-option-img {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--surface-2);
}

.product-spec-option-img--placeholder {
  display: block;
}

.product-spec-option-body {
  flex: 1;
  min-width: 0;
  display: flex;
}

.product-spec-option-text {
  line-height: 1.3;
  font-weight: 600;
  font-size: 0.8125rem;
}

.product-spec-option-price {
  font-size: 0.75rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

.product-spec-option.is-selected .product-spec-option-text {
  color: var(--accent, #c45c3e);
}

.product-spec-option.is-selected .product-spec-option-price {
  color: var(--accent, #c45c3e);
  font-weight: 600;
  opacity: 0.92;
}

.product-spec-option-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent, #c45c3e);
  opacity: 0;
  transform: scale(0.6);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.product-spec-option-check::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 3px;
  width: 4px;
  height: 8px;
  border: 2px solid #fff;
  border-top: 0;
  border-left: 0;
  transform: rotate(45deg);
}

.product-spec-option.is-selected .product-spec-option-check {
  opacity: 1;
  transform: scale(1);
}

.product-page-body .product-sheet-hero-img {
  transition: opacity 0.2s ease;
}

.product-page-body .product-sheet-hero-img.is-swapping {
  opacity: 0.45;
}

.product-sheet-meta {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.product-sheet-meta li + li {
  margin-top: 4px;
}

.product-sheet-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line, #ebe3d9);
  text-align: left;
}

.product-sheet-block-title {
  margin: 0 0 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.product-sheet-block-text {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  line-height: 1.6;
  white-space: pre-wrap;
}

.product-sheet-intro-html,
.product-sheet-rich-html {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  line-height: 1.5;
  overflow-x: auto;
}

.product-sheet-intro-html img,
.product-sheet-rich-html img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 8px auto;
  border-radius: 6px;
  background: transparent;
}

.product-sheet-rich-html img.is-broken {
  min-height: 0;
  height: 48px;
  background: var(--surface-2);
  object-fit: contain;
}

.product-sheet-intro-html p,
.product-sheet-rich-html p {
  margin: 0 0 8px;
}

.product-sheet-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 4px;
}

.product-sheet-thumb {
  width: 160px;
  height: 160px;
  margin: 0 auto 14px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2) 0%, #fff 100%);
}

.product-sheet-name {
  margin: 0 0 8px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}

.product-sheet-price-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin: 0 0 6px;
}

.product-sheet-price {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.product-sheet-origin {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  text-decoration: line-through;
}

.product-sheet-sales,
.product-sheet-desc {
  margin: 4px 0 0;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.product-sheet-foot {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-sheet-qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.product-sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.product-sheet-actions .btn {
  margin: 0;
}

/* 搜索 Sheet */
.search-sheet-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 16px 12px;
  padding: 8px 10px 8px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
}

.search-sheet-bar svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--ink-muted);
}

.search-sheet-bar input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
}

.search-sheet-go {
  flex-shrink: 0;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border: none;
  border-radius: 100px;
  cursor: pointer;
}

.search-sheet-results {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 16px;
  min-height: 120px;
}

.search-sheet-empty {
  margin: 24px 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.search-sheet-loading {
  margin: 32px 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

#search-sheet .product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#search-sheet .product-grid > li {
  display: flex;
  min-width: 0;
}

#search-sheet .product-grid .product-card {
  flex: 1;
  width: 100%;
}

/* 首页精简版（遗留） */
.home-page-clean {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 4px;
}

.home-loc-compact {
  align-items: center;
  margin-bottom: 0;
  padding: 0 2px;
}

.home-loc-compact .home-loc-line {
  flex: 1;
  min-width: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-page-clean .home-search {
  margin-bottom: 0;
}

.home-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.home-strip-balance {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-dark);
}

.home-strip-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border: none;
  border-radius: 100px;
  cursor: pointer;
}

.home-promo {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, #7a3314 0%, var(--accent) 55%, #e8a06a 100%);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.home-promo-tag {
  flex-shrink: 0;
  padding: 2px 8px;
  font-size: 0.625rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 100px;
}

.home-promo-text {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 600;
}

.home-promo-arrow {
  flex-shrink: 0;
  opacity: 0.85;
}

.home-cats {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-cat-item {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

.home-cat-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--accent);
  background: var(--bg);
}

.home-cat-name {
  white-space: nowrap;
}

.home-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.home-feed-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
}

.home-feed-more {
  padding: 0;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-dark);
  background: none;
  border: none;
  cursor: pointer;
}

.home-feed .product-grid {
  margin-top: 4px;
}


.home-loc {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.home-loc-icon {
  flex-shrink: 0;
  color: var(--accent);
}

.home-loc-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.home-loc-text strong {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.home-loc-text span {
  font-size: 0.6875rem;
  color: var(--ink-muted);
}

.home-loc-change {
  flex-shrink: 0;
  padding: 4px 10px;
  font-family: inherit;
  font-size: 0.75rem;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border: none;
  border-radius: 100px;
  cursor: pointer;
}

.home-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 14px;
  margin-bottom: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  box-shadow: var(--shadow-sm);
}

.home-search svg {
  width: 18px;
  height: 18px;
  color: var(--ink-muted);
  flex-shrink: 0;
}

.home-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.875rem;
  outline: none;
}

.home-search-btn {
  flex-shrink: 0;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border: none;
  border-radius: 100px;
  cursor: pointer;
}

.home-hot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.home-hot-tag {
  padding: 5px 12px;
  font-family: inherit;
  font-size: 0.75rem;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
}

.home-carousel {
  position: relative;
  margin-bottom: 14px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.home-carousel-track {
  position: relative;
  min-height: 132px;
}

.home-banner-slide {
  position: absolute;
  inset: 0;
  padding: 20px 18px 36px;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s var(--ease-out);
}

.home-banner-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.home-banner-slide.theme-a {
  background: linear-gradient(135deg, #7a3314 0%, var(--accent) 50%, #e8a06a 100%);
}

.home-banner-slide.theme-b {
  background: linear-gradient(135deg, #3d4f5c 0%, #5a6d7d 45%, #8fa3b0 100%);
}

.home-banner-slide.home-banner-action {
  cursor: pointer;
}

.home-banner-cta {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 100px;
}

.home-banner-slide.theme-c {
  background: linear-gradient(135deg, #5c4a12 0%, var(--gold) 40%, #f5e6b8 100%);
}

.home-banner-tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 100px;
}

.home-banner-slide h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
}

.home-banner-slide p {
  margin: 0;
  font-size: 0.8125rem;
  opacity: 0.92;
}

.home-carousel-dots {
  position: absolute;
  right: 12px;
  bottom: 10px;
  display: flex;
  gap: 5px;
  z-index: 2;
}

.home-carousel-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.home-carousel-dot.active {
  width: 16px;
  border-radius: 100px;
  background: #fff;
}

.home-services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 14px;
  padding: 10px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.625rem;
  color: var(--ink-soft);
  text-align: center;
}

.home-services span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.home-services em {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-style: normal;
  font-weight: 700;
  font-size: 0.6875rem;
  color: var(--accent-dark);
  background: var(--accent-muted);
  border-radius: 6px;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px 2px;
  margin-bottom: 14px;
  padding: 14px 6px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.home-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  font-family: inherit;
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  cursor: pointer;
}

.home-grid-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff8f0, #fff);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.home-flash {
  margin-bottom: 14px;
  padding: 14px !important;
  background: linear-gradient(180deg, #fff5eb 0%, var(--surface) 100%);
  border: 1px solid var(--accent-border);
}

.home-flash-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 12px;
}

.home-flash-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.home-flash-sub {
  margin: 2px 0 0;
  font-size: 0.6875rem;
  color: var(--ink-muted);
}

.home-countdown {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6875rem;
  color: var(--ink-muted);
}

.home-countdown em {
  min-width: 22px;
  padding: 2px 4px;
  font-style: normal;
  font-weight: 700;
  font-size: 0.75rem;
  text-align: center;
  color: #fff;
  background: var(--accent-dark);
  border-radius: 4px;
}

.home-flash-list {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0 0 4px;
  list-style: none;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.home-flash-item {
  flex: 0 0 108px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  font-family: inherit;
  text-align: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.home-flash-badge {
  font-size: 0.625rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
}

.home-flash-thumb {
  width: 56px;
  height: 56px;
}

.home-flash-name {
  font-size: 0.6875rem;
  color: var(--ink);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-flash-price {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.home-flash-origin {
  font-size: 0.625rem;
  color: var(--ink-muted);
  text-decoration: line-through;
}

/* 首页嵌入：餐卡 / CDI 兑换（非主视觉，依附电商流） */
.home-embed-cdi {
  margin-bottom: 14px;
  padding: 12px 14px !important;
  border: 1px dashed var(--accent-shadow-strong);
  background: linear-gradient(90deg, #fffdf9 0%, #fff8f0 100%);
}

.home-embed-cdi-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 8px 12px;
  align-items: center;
}

.home-embed-cdi-wallet {
  display: flex;
  align-items: center;
  gap: 10px;
  grid-column: 1;
  grid-row: 1;
}

.home-embed-cdi-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--accent);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.home-embed-cdi-label {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.home-embed-cdi-balance {
  display: block;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.home-embed-cdi-hint {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
  font-size: 0.6875rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.home-embed-cdi-hint em {
  font-style: normal;
  font-weight: 600;
  color: var(--accent);
}

.home-embed-cdi-btn {
  grid-column: 2;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-dark);
  background: #fff;
  border: 1px solid var(--accent-shadow-strong);
  border-radius: 100px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.home-embed-cdi-btn:active {
  transform: scale(0.98);
}

.home-block-head,
.home-sections-head {
  margin: 4px 0 10px;
}

.home-block-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.home-block-sub {
  margin: 4px 0 0;
  font-size: 0.6875rem;
  color: var(--ink-muted);
}

.home-sections-head {
  margin-top: 6px;
}

/* 兼容旧类名（若其它页引用） */
.home-wallet {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px 16px !important;
  border: 1px solid var(--accent-border);
  background: linear-gradient(135deg, #fffdf9 0%, #ffefe0 100%);
}

.home-wallet-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: var(--accent);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.home-wallet-tag {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.home-wallet-body h3 {
  margin: 4px 0 2px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}

.home-wallet-body p {
  margin: 0;
  font-size: 0.6875rem;
  color: var(--ink-muted);
  line-height: 1.4;
}

.home-wallet-btn {
  flex-shrink: 0;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border: none;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(196, 92, 38, 0.3);
}

.home-section {
  margin-bottom: 18px;
}

.home-section-sub {
  margin: 2px 0 0;
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--ink-muted);
}

.section-head .section-more {
  padding: 0;
  font-family: inherit;
  font-size: 0.75rem;
  color: var(--ink-muted);
  background: none;
  border: none;
  cursor: pointer;
}

.home-product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 10px;
  text-align: left;
  font-family: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.home-product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  padding: 2px 6px;
  font-size: 0.625rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: 4px;
}

.home-product-thumb {
  width: 100%;
  aspect-ratio: 1;
  max-height: 120px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.home-product-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.home-product-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.home-product-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.home-product-origin {
  font-size: 0.6875rem;
  color: var(--ink-muted);
  text-decoration: line-through;
}

.home-product-sales {
  margin-top: 4px;
  font-size: 0.625rem;
  color: var(--ink-muted);
}

/* 搜索（分类等页复用） */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  box-shadow: var(--shadow-sm);
}

.search-bar svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--ink-muted);
}

.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--ink);
  outline: none;
}

.search-bar input::placeholder {
  color: var(--ink-muted);
}

/* Banner */
.banner-slider {
  position: relative;
  margin-bottom: 16px;
  padding: 22px 20px 28px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #9a3f18 0%, var(--accent) 45%, var(--accent-light) 100%);
  box-shadow: var(--shadow-lg);
  color: #fff;
}

.banner-tag {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 100px;
}

.banner-slide h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
}

.banner-slide p {
  margin: 0;
  font-size: 0.8125rem;
  opacity: 0.9;
}

.banner-dots {
  position: absolute;
  right: 16px;
  bottom: 14px;
  display: flex;
  gap: 6px;
}

.banner-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.banner-dots span.active {
  width: 18px;
  border-radius: 100px;
  background: #fff;
}

/* CDI 横条入口 */
.cdi-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px !important;
  margin-bottom: var(--section-gap);
  border: 1px solid var(--accent-border);
  background: linear-gradient(135deg, #fffdf9 0%, #fff3e8 100%);
  box-shadow: var(--shadow-sm);
}

.cdi-strip-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: var(--accent);
  background: #fff;
  box-shadow: var(--shadow-sm);
}


.cdi-strip-body {
  flex: 1;
  min-width: 0;
}

.cdi-strip-body h3 {
  margin: 4px 0 2px;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}

.cdi-strip-body p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.cdi-strip-btn {
  flex-shrink: 0;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border: none;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--accent-shadow-strong);
}

/* 快捷分类 */
.quick-cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: var(--section-gap);
  padding: 14px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.quick-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
}

.quick-cat:active {
  transform: scale(0.97);
}

.quick-cat > span:last-child {
  font-size: 0.6875rem;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 4px 0 12px;
}

.section-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
}

.section-more {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* 分类页左右栏 */
.tab-panel-category {
  min-height: 0;
  overflow: hidden;
  margin: 0 calc(var(--app-pad-x) * -1);
  padding: 0;
}

body.app-category-tab {
  overflow: hidden;
  height: 100dvh;
  max-height: 100dvh;
  width: 100%;
  position: fixed;
  inset: 0;
}

.app-shell[data-tab="category"] {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

.app-shell[data-tab="category"] .app-main {
  flex: 1 1 0%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.app-shell[data-tab="category"] #tab-category {
  flex: 1 1 0%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.app-shell[data-tab="category"] .tab-panel-category {
  animation: none;
}

.category-top {
  position: relative;
  flex-shrink: 0;
  padding: 10px var(--app-pad-x) 8px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.category-search-bar {
  margin-bottom: 0;
  padding: 8px 14px;
  min-height: 40px;
}

.category-search-clear {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  font-family: inherit;
  font-size: 1.125rem;
  line-height: 1;
  color: var(--ink-muted);
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.category-search-clear:active {
  background: rgba(28, 22, 18, 0.06);
}

.category-search-dropdown {
  position: absolute;
  left: var(--app-pad-x);
  right: var(--app-pad-x);
  top: calc(100% - 4px);
  z-index: 20;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-height: 240px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.category-search-dropdown[hidden] {
  display: none;
}

.category-search-option {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
}

.category-search-option:active {
  background: rgba(28, 22, 18, 0.04);
}

.category-search-empty {
  padding: 12px 14px;
  font-size: 0.8125rem;
  color: var(--ink-muted);
  text-align: center;
}

.category-layout {
  flex: 1 1 0%;
  min-height: 0;
  position: relative;
  background: var(--surface);
  overflow: hidden;
}

.category-sidebar {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  width: 80px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  background: linear-gradient(180deg, var(--surface-2) 0%, #f3ece2 100%);
  border-right: 1px solid var(--border);
}

.category-sidebar::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(196, 92, 38, 0.12) 40%,
    transparent
  );
  pointer-events: none;
}

.category-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 6px 0 calc(10px + env(safe-area-inset-bottom, 0px));
  scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
  display: none;
}

.category-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 8px 6px;
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink-soft);
  text-align: center;
  background: transparent;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition:
    color 0.2s var(--ease-out),
    background 0.2s var(--ease-out);
}

.category-nav-item:active {
  background: rgba(28, 22, 18, 0.04);
}

.category-nav-label {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
  word-break: break-all;
}

.category-nav-item.active {
  color: var(--accent-dark);
  font-weight: 600;
  background: var(--surface);
}

.category-nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 18px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--accent-light), var(--accent));
  transform: translateY(-50%);
}

.category-detail {
  position: absolute;
  inset: 0 0 0 80px;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 90% 50% at 100% 0%, rgba(232, 146, 90, 0.12), transparent 55%),
    var(--surface);
  overflow: hidden;
}

.category-detail-inner {
  flex: 1 1 0%;
  width: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.category-detail-inner > * {
  min-width: 0;
  max-width: 100%;
}

.category-detail-inner--has-subcats {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.category-detail-inner--has-toolbar:not(.category-detail-inner--has-subcats) {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.category-detail-inner--has-subcats.category-detail-inner--has-toolbar {
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

.category-detail-inner--scroll-only {
  display: flex;
  flex-direction: column;
  grid-template-rows: none;
}

.category-detail-inner--scroll-only .category-detail-scroll {
  flex: 1 1 0%;
  min-height: 0;
}

.category-detail-scroll {
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
}

.category-detail-scroll .category-detail-empty {
  min-height: 200px;
}

@keyframes category-detail-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.category-detail-hero {
  position: relative;
  flex-shrink: 0;
  margin: 10px 12px 0;
  padding: 12px 14px;
  min-height: 68px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff8f2 0%, #fffdfb 48%, #fff5eb 100%);
  border: 1px solid var(--accent-muted);
  box-shadow: 0 2px 10px rgba(28, 22, 18, 0.04);
  overflow: hidden;
  box-sizing: border-box;
}

.category-detail-hero--subcats {
  height: 84px;
  min-height: 84px;
  max-height: 84px;
  display: flex;
  align-items: center;
}

.category-detail-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("/static/img/category-banner-bg.svg");
  background-repeat: no-repeat;
  background-position: right -6px center;
  background-size: auto 100%;
  opacity: 0.95;
  pointer-events: none;
}

.category-detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 252, 248, 0.94) 0%,
    rgba(255, 252, 248, 0.72) 42%,
    rgba(255, 252, 248, 0.15) 72%,
    transparent 100%
  );
  pointer-events: none;
}

.category-detail-hero::before {
  content: "";
  position: absolute;
  top: -24px;
  right: -16px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 146, 90, 0.14) 0%, transparent 70%);
  pointer-events: none;
}

.category-detail-hero-text {
  position: relative;
  z-index: 1;
  min-width: 0;
  width: 100%;
}

.category-detail-eyebrow-row {
  min-height: 20px;
  margin-bottom: 6px;
}

.category-detail-eyebrow-row:empty {
  min-height: 20px;
  margin-bottom: 6px;
}

.category-detail-eyebrow {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 100px;
  line-height: 1.2;
}

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

.category-detail-head h3 {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-detail-count {
  flex-shrink: 0;
  padding: 4px 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--accent-dark);
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(196, 92, 38, 0.12);
  border-radius: 100px;
}

.category-detail-head p {
  margin: 6px 0 0;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.category-detail-hero-icon {
  display: none;
}

.category-subcats-wrap {
  flex-shrink: 0;
  z-index: 2;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 10px 0;
  background: var(--surface);
}

.category-subcats-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 14px;
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 12px,
    #000 calc(100% - 12px),
    transparent
  );
}

.category-subcats-scroll::-webkit-scrollbar {
  display: none;
}

.category-subcats {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  width: max-content;
  min-width: 100%;
  padding: 2px 0;
}

.category-subcat {
  flex-shrink: 0;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  transition:
    color 0.2s,
    background 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
}

.category-subcat:active {
  transform: scale(0.97);
}

.category-subcat.active {
  color: #fff;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(196, 92, 38, 0.28);
}

.category-list-toolbar {
  flex-shrink: 0;
  z-index: 2;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.category-view-toggle {
  display: inline-flex;
  flex-shrink: 0;
  padding: 2px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.category-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 36px;
  min-height: 30px;
  padding: 4px 8px;
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--ink-muted);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition:
    color 0.2s,
    background 0.2s,
    box-shadow 0.2s;
}

.category-view-btn .icon-box {
  width: 16px;
  height: 16px;
}

.category-view-label {
  line-height: 1;
}

.category-view-btn.active {
  color: var(--accent-dark);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.category-sort-scroll {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.category-sort-scroll::-webkit-scrollbar {
  display: none;
}

.category-sort-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  width: max-content;
  min-width: 100%;
}

.category-sort-btn {
  flex-shrink: 0;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink-soft);
  white-space: nowrap;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  transition:
    color 0.2s,
    background 0.2s,
    border-color 0.2s;
}

.category-sort-btn.active {
  color: var(--accent-dark);
  font-weight: 600;
  background: var(--accent-soft);
  border-color: var(--accent-border-strong);
}

.category-products-section {
  padding: 0 12px 20px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#category-detail .category-products,
.category-detail-scroll .category-products {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#category-detail .category-products > li,
.category-detail-scroll .category-products > li {
  display: flex;
  min-width: 0;
  width: 100%;
}

#category-detail .category-products .product-card,
.category-detail-scroll .category-products .product-card {
  width: 100%;
  min-width: 0;
  border-radius: 12px;
  transition:
    transform 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out);
}

#category-detail .category-products .product-thumb,
.category-detail-scroll .category-products .product-thumb {
  width: 100%;
  min-width: 0;
  aspect-ratio: 1;
  background: var(--surface-2);
  overflow: hidden;
}

#category-detail .category-products .product-thumb-img,
.category-detail-scroll .category-products .product-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#category-detail .category-products .product-card:active,
.category-detail-scroll .category-products .product-card:active {
  transform: none;
}

#category-detail .category-products .product-card-open:active,
.category-detail-scroll .category-products .product-card-open:active {
  transform: scale(0.98);
}

.category-products {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.category-products .product-name {
  font-size: 0.8125rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#category-detail .category-products--list,
.category-detail-scroll .category-products--list {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.category-products--list > li {
  display: flex;
  min-width: 0;
  width: 100%;
}

.category-products--list > li + li {
  border-top: 1px solid var(--border);
}

.category-products--list .product-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.category-products--list .product-card-open {
  flex: 1;
  flex-direction: row;
  align-items: stretch;
  min-width: 0;
}

.category-products--list .product-card-open:active {
  transform: none;
  background: rgba(28, 22, 18, 0.03);
}

.category-products--list .product-quick-cart {
  position: relative;
  flex-shrink: 0;
  margin: 0 12px 0 4px;
}

.category-products--list .product-thumb {
  flex: 0 0 88px;
  width: 88px;
  aspect-ratio: 1;
  margin: 10px 0 10px 0;
  border-radius: 10px;
  overflow: hidden;
}

.category-products--list .product-body {
  flex: 1;
  min-width: 0;
  justify-content: center;
  padding: 10px 0 10px 10px;
}

.category-products--list .product-name {
  -webkit-line-clamp: 2;
}

.category-products--list .mall-product-badge {
  display: none;
}

.home-cat-loading,
.category-nav-loading,
.category-detail-loading,
.category-detail-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 16px;
  font-size: 0.8125rem;
  color: var(--ink-muted);
  text-align: center;
}

.category-detail-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  color: var(--ink-muted);
  background: var(--surface-2);
  border-radius: 50%;
  opacity: 0.7;
}

.category-detail-retry {
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.category-skeleton {
  padding: 16px 14px;
}

.category-skeleton-line {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    var(--surface-2) 0%,
    #fff 50%,
    var(--surface-2) 100%
  );
  background-size: 200% 100%;
  animation: category-shimmer 1.2s ease-in-out infinite;
}

.category-skeleton-line.w60 {
  width: 60%;
  height: 20px;
  margin-bottom: 10px;
}

.category-skeleton-line.w40 {
  width: 40%;
  margin-bottom: 20px;
}

.category-skeleton-chips {
  display: flex;
  gap: 8px;
  padding: 0 14px 16px;
  overflow: hidden;
}

.category-skeleton-chip {
  flex-shrink: 0;
  width: 64px;
  height: 30px;
  border-radius: 100px;
  background: var(--surface-2);
  animation: category-shimmer 1.2s ease-in-out infinite;
}

.category-skeleton-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 12px;
}

.category-skeleton-card {
  aspect-ratio: 0.72;
  border-radius: 12px;
  background: linear-gradient(
    90deg,
    var(--surface-2) 0%,
    #fff 50%,
    var(--surface-2) 100%
  );
  background-size: 200% 100%;
  animation: category-shimmer 1.2s ease-in-out infinite;
}

@keyframes category-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.category-products-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 24px 12px;
}

.category-products-loading-text {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.category-detail-head {
  margin-bottom: 0;
}

/* 个人中心 */
.profile-hero {
  padding: 18px 16px 16px !important;
  margin-bottom: var(--section-gap);
  overflow: hidden;
}

.profile-hero-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.profile-avatar {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, var(--accent), var(--accent-light));
  border-radius: 50%;
  box-shadow: var(--shadow-md);
}

.profile-name {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
}

.profile-info {
  min-width: 0;
}

.profile-meta {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.profile-balance-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--gold-soft) 0%, #fffaf2 100%);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(184, 134, 11, 0.2);
}

.profile-balance-bar .balance-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.6875rem;
  color: var(--ink-muted);
}

.profile-balance {
  display: block;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: -0.02em;
}

.profile-balance-action {
  flex-shrink: 0;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-dark);
  background: #fff;
  border: 1px solid rgba(196, 92, 38, 0.25);
  border-radius: 100px;
  cursor: pointer;
}

.menu-list {
  padding: 6px 0;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item:active {
  background: var(--surface-2);
}

.menu-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink-soft);
}

.menu-icon svg,
.menu-icon .icon-flat {
  width: 18px;
  height: 18px;
}

.menu-icon-accent {
  background: linear-gradient(135deg, #fff0e6, var(--gold-soft));
  color: var(--accent);
}

.menu-text {
  flex: 1;
  font-weight: 500;
}

.menu-badge {
  padding: 2px 8px;
  font-size: 0.625rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 100px;
}

.menu-hint {
  font-size: 0.75rem;
  color: var(--ink-muted);
}


.logout-btn {
  width: 100%;
  margin-top: var(--section-gap);
}

#tab-profile.tab-panel {
  padding-bottom: 8px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#tab-home.tab-panel {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

/* 底部 TabBar */
.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 100;
  width: 100%;
  max-width: 440px;
  transform: translateX(-50%);
  display: flex;
  align-items: stretch;
  height: var(--tabbar-h);
  padding: 0 8px env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 32px rgba(28, 22, 18, 0.08);
}

.tabbar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 0;
  font-family: inherit;
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--ink-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
  position: relative;
}

.tabbar-item svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.75;
}

.tabbar-item.active {
  color: var(--accent);
  font-weight: 600;
}

.tabbar-item.active::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 18px;
  height: 2px;
  margin-left: -9px;
  background: var(--accent);
  border-radius: 100px;
}

.tabbar-item.active svg {
  stroke-width: 2.25;
}

.tabbar-item-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabbar-cart-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.tabbar-cart-badge {
  position: absolute;
  top: -5px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  color: #fff;
  background: var(--accent);
  border-radius: 100px;
  box-shadow: 0 1px 3px rgba(122, 51, 20, 0.35);
  pointer-events: none;
  z-index: 1;
}

[hidden] {
  display: none !important;
}

/* ========== CDI 演示商城（选品 + 购物车 + 组合支付） ========== */
.cdi-mall-body {
  overflow: hidden;
}

.cdi-mall-app {
  position: relative;
  z-index: 1;
  max-width: 440px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: max(72px, calc(56px + env(safe-area-inset-bottom)));
}

.cdi-mall-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: max(8px, env(safe-area-inset-top)) 12px 10px;
  background: rgba(246, 241, 234, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.cdi-mall-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--ink-soft);
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.cdi-mall-back svg {
  width: 20px;
  height: 20px;
}

.cdi-mall-header-text {
  flex: 1;
  min-width: 0;
}

.cdi-mall-brand {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.cdi-mall-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cdi-mall-balance {
  flex-shrink: 0;
  max-width: 38%;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-dark);
  white-space: nowrap;
  background: linear-gradient(135deg, var(--gold-soft), #fff);
  border-radius: 100px;
  border: 1px solid var(--accent-border);
}

.cdi-cat-tabs {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.cdi-cat-tabs::-webkit-scrollbar {
  display: none;
}

.cdi-cat-tab {
  flex-shrink: 0;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.cdi-cat-tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-color: transparent;
  font-weight: 600;
}

.cdi-mall-main {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 12px 16px;
}

.cdi-product-grid {
  gap: 10px;
}

.cdi-mall-main .product-grid > li {
  display: flex;
  min-width: 0;
}

/* 奇数个商品时，最后一项居中占半宽 */
.cdi-mall-main .cdi-product-grid > li:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  width: calc((100% - 10px) / 2);
  max-width: calc((100% - 10px) / 2);
  justify-self: center;
}

.cdi-mall-main .cdi-product-card {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.cdi-mall-main .cdi-product-card .product-thumb {
  flex-shrink: 0;
  border-radius: 0;
}

.cdi-mall-main .cdi-product-card .product-body {
  flex: 1;
}

.cdi-mall-main .cdi-product-card .product-name {
  -webkit-line-clamp: 2;
}

.cdi-mall-main .cdi-qty-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  margin-top: auto;
  padding: 10px 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.cdi-qty-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px 10px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.cdi-qty-control-sm {
  padding: 0;
  border: none;
  background: transparent;
}

.cdi-qty-btn {
  width: 28px;
  height: 28px;
  font-size: 1.125rem;
  line-height: 1;
  color: var(--accent);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.cdi-qty-num {
  min-width: 20px;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
}

.cdi-qty-add {
  width: 100%;
  padding: 6px 0;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: none;
  cursor: pointer;
}

.cdi-sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(28, 22, 18, 0.4);
  animation: mask-fade-in 0.28s var(--ease-out) both;
}

@keyframes mask-fade-in {
  from {
    opacity: 0;
  }
}

.cdi-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 130;
  width: 100%;
  max-width: 440px;
  max-height: 75vh;
  transform: translateX(-50%) translateY(100%);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--shadow-lg);
  transition: transform 0.32s var(--ease-out);
  will-change: transform;
}

.cdi-sheet.cdi-sheet--open {
  transform: translateX(-50%) translateY(0);
}

.cdi-sheet-tall {
  max-height: 88vh;
}

.cdi-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
}

.cdi-sheet-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
}

.cdi-sheet-close {
  width: 36px;
  height: 36px;
  color: var(--ink-muted);
  background: var(--surface-2);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.cdi-cart-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  overflow-y: auto;
  flex: 1;
  min-height: 120px;
}

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

.cdi-cart-line-img {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--surface-2);
}

.cart-page-line {
  padding: 12px 0;
  border-bottom: 1px solid rgba(28, 22, 18, 0.06);
}

.cart-page-line:last-child {
  border-bottom: none;
}

.cart-line-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--ink-muted);
  background: var(--surface-2);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.cart-line-remove .icon-flat {
  width: 16px;
  height: 16px;
}

.cart-line-remove:active {
  color: var(--accent);
  background: var(--accent-muted);
}

.cart-page-topbar .cart-page-clear {
  flex-shrink: 0;
  padding: 6px 12px;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(28, 22, 18, 0.08);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.cart-page-topbar .cart-page-clear:active {
  color: var(--accent);
  border-color: rgba(196, 92, 38, 0.28);
  background: rgba(196, 92, 38, 0.06);
}

.cart-page-topbar-title {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.cart-page-topbar-title h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
}

.cart-page-topbar {
  background: rgba(255, 255, 255, 0.98);
}

.cart-page-topbar .cart-page-topbar-title h1 {
  flex: none;
}

.cart-page-topbar-sub {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.cart-page-summary {
  margin: 0 0 6px;
  font-size: 0.75rem;
  color: var(--ink-muted);
  text-align: right;
}


.cdi-cart-line-info {
  flex: 1;
  min-width: 0;
}

.cdi-cart-line-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
}

.cdi-cart-line-price {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.cdi-cart-empty {
  padding: 32px 16px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.cdi-sheet-foot {
  padding: 12px 16px max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.cdi-sheet-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.cdi-sheet-total strong {
  font-size: 1.25rem;
  color: var(--accent);
}

.cdi-checkout-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px 12px;
}

.cdi-checkout-items {
  list-style: none;
  margin: 0 0 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.cdi-checkout-items li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 0.875rem;
}

.cdi-checkout-items li span:last-child {
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.cdi-pay-block {
  margin-bottom: 12px;
}

.cdi-pay-title {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.cdi-pay-option {
  display: block;
  margin-bottom: 10px;
  cursor: pointer;
}

.cdi-pay-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cdi-pay-option-inner {
  display: block;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, background 0.2s;
}

.cdi-pay-option input:checked + .cdi-pay-option-inner {
  border-color: var(--accent);
  background: #fff8f2;
}

.cdi-pay-option input:disabled + .cdi-pay-option-inner {
  opacity: 0.45;
}

.cdi-pay-name {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
}

.cdi-pay-desc {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.cdi-pay-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
}

.cdi-pay-split div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cdi-pay-split strong {
  font-size: 1rem;
  color: var(--accent-dark);
}

.cdi-pay-split div:last-child strong {
  color: #07c160;
}

.cdi-success-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(246, 241, 234, 0.95);
}

.cdi-success-card {
  width: 100%;
  max-width: 360px;
  text-align: center;
}

body.cdi-sheet-open {
  overflow: hidden;
}

.cdi-toast {
  bottom: max(132px, calc(108px + env(safe-area-inset-bottom)));
}

/* CDI 结算收货地址 */
.cdi-address-block {
  margin: 12px 0 16px;
  padding: 14px;
  background: var(--surface);
  border-radius: var(--radius-md);
}

.cdi-address-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cdi-address-edit {
  border: none;
  background: none;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
}

.cdi-address-line {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-line;
}

.cdi-address-form .field {
  margin-bottom: 10px;
}

.btn.sm {
  padding: 8px 14px;
  font-size: 13px;
}

/* 主商城订单 / 交易 / 地址抽屉 */
.mall-sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(0, 0, 0, 0.35);
}

.mall-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 150;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
  padding-bottom: env(safe-area-inset-bottom);
}

.mall-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 8px;
}

.mall-sheet-head h2 {
  margin: 0;
  font-size: 17px;
}

.mall-sheet-close {
  border: none;
  background: var(--surface);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mall-sheet-hint {
  margin: 0 18px 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.mall-sheet .record-list,
.mall-sheet .address-form {
  margin: 0 16px 20px;
  overflow-y: auto;
  flex: 1;
}

.record-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.record-card {
  padding: 14px;
  margin-bottom: 10px;
  background: var(--surface);
  border-radius: var(--radius-md);
}

.record-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.record-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(196, 92, 38, 0.12);
  color: var(--accent-dark);
}

.record-amount {
  font-weight: 600;
  color: var(--accent-dark);
}

.record-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 500;
}

.record-meta,
.record-addr {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.record-addr {
  margin-top: 8px;
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.record-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.address-form {
  padding: 16px;
}

body.mall-sheet-open {
  overflow: hidden;
}

/* 子页面：订单 / 交易 / 地址 */
.mall-sub-page {
  --tabbar-h: calc(52px + env(safe-area-inset-bottom));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.sub-page-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: max(10px, env(safe-area-inset-top)) 14px 12px;
  background: rgba(246, 241, 234, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.sub-page-topbar h1 {
  flex: 1;
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  min-width: 0;
}

.sub-page-topbar-start {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.product-topbar {
  position: relative;
}

.product-topbar h1 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  flex: none;
  max-width: calc(100% - 168px);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.sub-page-cart {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: auto;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.sub-page-cart:active {
  transform: scale(0.96);
}

.sub-page-cart-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sub-page-cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 0.5625rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  color: #fff;
  background: var(--accent);
  border-radius: 100px;
  box-shadow: 0 1px 3px rgba(122, 51, 20, 0.35);
  pointer-events: none;
}

.sub-page-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.mall-product-page {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  padding-bottom: 0;
}

.product-page-body {
  flex: none;
  overflow: visible;
  padding: 8px 0 16px;
  text-align: left;
}

.product-page-body .product-sheet-hero-frame {
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  max-height: 360px;
}

.product-page-body .product-sheet-hero-img {
  max-width: 100%;
  max-height: 360px;
}

.product-page-body .product-sheet-name {
  text-align: left;
  font-size: 1.125rem;
}

.product-page-body .product-spec-block {
  margin: 12px 0 14px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid rgba(28, 22, 18, 0.06);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.product-page-body .product-spec-label {
  margin-bottom: 10px;
}

.product-page-body .product-spec-options--grid .product-spec-option {
  align-items: center;
  padding: 8px 26px 8px 8px;
}

.product-page-body .product-spec-options--grid .product-spec-option-img,
.product-page-body .product-spec-options--grid .product-spec-option-img--placeholder {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
}

.product-page-body .product-spec-options--grid .product-spec-option-body {
  align-items: flex-start;
  text-align: left;
}

.product-page-body .product-spec-options--list .product-spec-option {
  padding: 10px 34px 10px 10px;
}

.product-page-body .product-sheet-meta {
  margin-top: 0;
}

.product-page-foot {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 60;
  width: 100%;
  max-width: 440px;
  transform: translateX(-50%);
  padding: 0 12px calc(10px + env(safe-area-inset-bottom, 10px));
  box-sizing: border-box;
  pointer-events: none;
}

.product-buy-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 8px 4px;
  background: color-mix(in srgb, var(--surface) 98%, transparent);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(28, 22, 18, 0.06);
  border-radius: 16px;
  box-shadow:
    0 8px 32px rgba(28, 22, 18, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
  pointer-events: auto;
}

.product-qty-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 4px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid rgba(28, 22, 18, 0.06);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.product-qty-panel-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.product-buy-tools {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0;
}

.product-buy-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 46px;
  padding: 4px 6px;
  font: inherit;
  font-size: 0.625rem;
  line-height: 1.2;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.product-buy-tool:active {
  color: var(--accent);
}

.product-buy-tool.is-active {
  color: var(--accent);
}

.product-buy-tool-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.product-buy-tool-icon .icon-flat {
  width: 20px;
  height: 20px;
}

.product-buy-tool-label {
  white-space: nowrap;
}

.product-buy-qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-buy-qty-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.product-buy-stepper {
  display: inline-flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(196, 92, 38, 0.16);
  border-radius: 999px;
  background: var(--surface);
}

.product-buy-stepper-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-height: 36px;
  padding: 0;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1;
  color: var(--accent-dark);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s var(--ease-out);
}

.product-buy-stepper-btn:active {
  background: var(--accent-muted);
}

.product-buy-stepper-num {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 0 6px;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
  background: transparent;
  border-left: 1px solid rgba(196, 92, 38, 0.12);
  border-right: 1px solid rgba(196, 92, 38, 0.12);
}

.product-buy-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.product-buy-actions .btn {
  margin: 0;
  min-height: 40px;
  padding: 9px 10px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.btn-product-cart {
  color: var(--accent-dark);
  background: #fff;
  border: 1.5px solid var(--accent-shadow-strong);
  box-shadow: none;
}

.btn-product-cart:active {
  background: rgba(196, 92, 38, 0.06);
}

.btn-product-buy {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 45%, var(--accent-dark) 100%);
  border: none;
  box-shadow: 0 4px 14px rgba(196, 92, 38, 0.28);
}

.btn-product-buy:active {
  box-shadow: 0 2px 8px rgba(196, 92, 38, 0.24);
  transform: scale(0.98);
}

.mall-cart-page {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  padding-bottom: var(--tabbar-h);
  box-sizing: border-box;
}

.mall-cart-page.mall-with-tabbar {
  padding-bottom: var(--tabbar-h);
}

.cart-page-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.cart-page-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-item {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(28, 22, 18, 0.06);
  border-radius: 14px;
  overflow: hidden;
}

.cart-item-main {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 12px 0;
}

.cart-item-open {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  cursor: pointer;
}

.cart-item-open:active {
  opacity: 0.82;
}

.cart-item-thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--surface-2);
}

.cart-item-thumb--icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 2px;
}

.cart-item-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

.cart-item-unit {
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.cart-item-remove {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--ink-muted);
  background: var(--surface-2);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.cart-item-remove .icon-flat {
  width: 16px;
  height: 16px;
}

.cart-item-remove:active {
  color: var(--accent);
  background: var(--accent-muted);
}

.cart-item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 12px;
}

.cart-item-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 2px;
  background: var(--surface-2);
  border-radius: 999px;
}

.cart-item-stepper-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 1.125rem;
  line-height: 1;
  color: var(--ink);
  background: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(28, 22, 18, 0.08);
}

.cart-item-stepper-btn:active {
  transform: scale(0.94);
}

.cart-item-stepper-num {
  min-width: 36px;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
}

.cart-item-subtotal {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

.cart-item-subtotal strong {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

.cart-page-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: min(52vh, 420px);
  margin-top: 8px;
  padding: 24px 16px;
  text-align: center;
}

.cart-page-empty-icon {
  margin-bottom: 16px;
  color: var(--ink-muted);
  opacity: 0.55;
}

.cart-page-empty-title {
  margin: 0 0 6px;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ink);
}

.cart-page-empty-desc {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.cart-page-go-shop {
  display: inline-flex;
  width: auto;
  min-width: 140px;
  margin: 20px auto 0;
  justify-content: center;
}

.cart-page-foot {
  position: relative;
  z-index: 55;
  flex-shrink: 0;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  background: transparent;
  border: none;
  box-sizing: border-box;
}

.cart-page-foot-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--surface) 98%, transparent);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(28, 22, 18, 0.06);
  border-radius: 16px;
  box-shadow:
    0 8px 32px rgba(28, 22, 18, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.cart-page-foot-info {
  flex: 1;
  min-width: 0;
}

.cart-page-foot-count {
  margin: 0 0 2px;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.cart-page-foot-total {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.cart-page-foot-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.cart-page-foot-total strong {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.cart-page-checkout-btn {
  flex-shrink: 0;
  min-width: 128px;
  padding: 14px 20px;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(196, 92, 38, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cart-page-checkout-btn:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(196, 92, 38, 0.24);
}

.cart-page-checkout-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.sub-page-main {
  position: relative;
  z-index: 1;
  flex: 1;
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
  padding: 12px 16px max(24px, env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 商品详情：主区滚动 + 底部购买 bar 留白 */
.mall-product-page .sub-page-main {
  flex: 1 1 auto;
  min-height: 0;
  padding-bottom: calc(112px + env(safe-area-inset-bottom, 10px));
  scroll-padding-bottom: calc(112px + env(safe-area-inset-bottom, 10px));
}

/* 购物车：主区滚动，结算栏在 TabBar 上方 */
.mall-cart-page .sub-page-main {
  flex: 1 1 auto;
  min-height: 0;
  padding-bottom: 12px;
  scroll-padding-bottom: 12px;
}

.mall-cart-page.mall-with-tabbar .sub-page-main {
  padding-bottom: 12px;
  scroll-padding-bottom: 12px;
}

.sub-page-hint {
  margin: 0 0 14px;
  font-size: 0.75rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

.sub-page-loading {
  text-align: center;
  padding: 32px 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.menu-link {
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.record-card-link {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.record-card-chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  opacity: 0.5;
}

.record-card-link .record-addr,
.record-card-link .record-meta,
.record-card-link .record-title {
  padding-right: 20px;
}

.mall-sub-page .address-form {
  margin-top: 0;
}

.sub-page-action {
  flex-shrink: 0;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-muted);
  border: none;
  border-radius: 100px;
  cursor: pointer;
}

.address-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.address-card {
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.address-card.is-default {
  border-color: var(--accent-shadow-strong);
  background: linear-gradient(180deg, #fffaf5 0%, var(--surface) 100%);
}

.address-default-tag {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 8px;
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--accent-dark);
  background: rgba(196, 92, 38, 0.12);
  border-radius: 4px;
}

.address-card-name {
  margin: 0 0 6px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.address-card-name span {
  font-weight: 400;
  color: var(--ink-soft);
  margin-left: 6px;
}

.address-card-full {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.address-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.address-action {
  padding: 4px 10px;
  font-family: inherit;
  font-size: 0.75rem;
  color: var(--accent-dark);
  background: transparent;
  border: 1px solid rgba(196, 92, 38, 0.25);
  border-radius: 100px;
  cursor: pointer;
}

.address-action.danger {
  color: var(--danger);
  border-color: rgba(185, 28, 28, 0.25);
}

.address-editor {
  margin-top: 8px;
  padding: 16px !important;
}

.address-editor-title {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 600;
}

.field-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 0.875rem;
  color: var(--ink-soft);
}

.field-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.address-editor-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cdi-address-picker {
  margin-top: 10px;
  max-height: 200px;
  overflow-y: auto;
}

.cdi-address-pick {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  padding: 10px 12px;
  text-align: left;
  font-family: inherit;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.cdi-address-pick.active {
  border-color: var(--accent);
  background: #fff8f0;
}

.cdi-address-pick strong {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 4px;
}

.cdi-address-pick span {
  font-size: 0.75rem;
  color: var(--ink-muted);
  line-height: 1.4;
}

.cdi-address-manage {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 8px;
  font-size: 0.8125rem;
  text-align: center;
  color: var(--accent-dark);
  text-decoration: none;
}

.mall-sub-page .toast {
  bottom: max(28px, calc(12px + env(safe-area-inset-bottom)));
}

body.order-detail-open .toast {
  z-index: 220;
  bottom: max(28px, calc(12px + env(safe-area-inset-bottom)));
}

body.order-detail-open .cdi-sheet-mask {
  z-index: 210;
}

body.order-detail-open .cdi-sheet.aftersale-sheet {
  z-index: 220;
}

body.order-detail-open .aftersale-upload-source-sheet {
  z-index: 230;
}

body.order-detail-open.cdi-sheet-open .toast {
  z-index: 230;
  bottom: max(132px, calc(108px + env(safe-area-inset-bottom)));
}
.order-detail-screen {
  position: fixed;
  inset: 0;
  left: 50%;
  z-index: 200;
  width: 100%;
  max-width: 440px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
  padding-bottom: env(safe-area-inset-bottom);
}

.order-detail-screen[hidden] {
  display: none !important;
}

body.order-detail-open #screen-app,
body.order-detail-open #screen-login {
  display: none !important;
}

.order-detail-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(246, 241, 234, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(28, 22, 18, 0.06);
}

.order-detail-topbar h1 {
  flex: 1;
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.order-detail-back {
  border: none;
  background: rgba(255, 255, 255, 0.88);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(28, 22, 18, 0.06);
}

.order-detail-status {
  flex-shrink: 0;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 700;
  line-height: 1.2;
}

.order-detail-status.is-paid,
.order-detail-status.is-receiving {
  color: #2d6a4f;
  background: rgba(45, 106, 79, 0.1);
}

.order-detail-status.is-unpaid {
  color: #b45309;
  background: rgba(180, 83, 9, 0.12);
}

.order-detail-status.is-done {
  color: #475569;
  background: rgba(71, 85, 105, 0.1);
}

.order-detail-status.is-review {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.1);
}

.order-detail-status.is-cancelled,
.order-detail-status.is-refunded {
  color: #8b5a2b;
  background: rgba(139, 90, 43, 0.12);
}

.order-detail-main {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 14px 20px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-detail-loading {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 0;
  font-size: 14px;
}

/* 顶部状态 Hero */
.order-detail-hero {
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 252, 248, 0.95) 100%);
  border: 1px solid rgba(45, 106, 79, 0.12);
  box-shadow: 0 4px 20px rgba(45, 106, 79, 0.08);
}

.order-detail-hero.is-refunded {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 246, 246, 0.95) 100%);
  border-color: rgba(185, 28, 28, 0.14);
  box-shadow: 0 4px 20px rgba(185, 28, 28, 0.06);
}

.order-detail-hero-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.order-detail-hero-icon {
  flex-shrink: 0;
  color: var(--accent);
  background: var(--accent-muted);
  border: 1px solid rgba(196, 92, 38, 0.12);
}

.order-detail-hero.is-refunded .order-detail-hero-icon {
  color: var(--danger);
  background: rgba(185, 28, 28, 0.08);
  border-color: rgba(185, 28, 28, 0.12);
}

.order-detail-hero-main {
  flex: 1;
  min-width: 0;
}

.order-detail-hero-amount {
  flex-shrink: 0;
  text-align: right;
}

.order-detail-hero-amount-label {
  display: block;
  font-size: 11px;
  color: var(--ink-muted);
  margin-bottom: 2px;
}

.order-detail-hero-amount strong {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-dark);
  font-variant-numeric: tabular-nums;
}

.order-detail-headline {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: #2d6a4f;
  line-height: 1.25;
}

.order-detail-hero.is-refunded .order-detail-headline {
  color: var(--danger);
}

.order-detail-status-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.order-detail-status-chip.is-paid,
.order-detail-status-chip.is-receiving {
  color: #2d6a4f;
  background: rgba(45, 106, 79, 0.1);
}

.order-detail-status-chip.is-unpaid {
  color: #b45309;
  background: rgba(180, 83, 9, 0.12);
}

.order-detail-status-chip.is-done {
  color: #475569;
  background: rgba(71, 85, 105, 0.1);
}

.order-detail-status-chip.is-review {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.1);
}

.order-detail-status-chip.is-cancelled,
.order-detail-status-chip.is-refunded {
  color: #8b5a2b;
  background: rgba(139, 90, 43, 0.12);
}

.order-detail-no {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: rgba(246, 241, 234, 0.72);
  border: 1px dashed rgba(28, 22, 18, 0.08);
}

.order-detail-no-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.order-detail-no-value {
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--ink);
  letter-spacing: 0.03em;
  word-break: break-all;
  line-height: 1.45;
}

.order-detail-meta,
.order-detail-sub {
  margin: 0;
  font-size: 12px;
  color: var(--ink-muted);
}

.order-detail-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
}

/* 通用卡片 */
.order-detail-card {
  margin-bottom: 0;
  padding: 14px;
  min-width: 0;
  overflow-wrap: break-word;
  background: var(--surface);
  border: 1px solid rgba(28, 22, 18, 0.07);
  border-radius: 16px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 4px 18px rgba(28, 22, 18, 0.04);
}

.order-detail-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.order-detail-section-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--accent);
  background: var(--accent-soft);
}

.order-detail-section-extra {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
}

.order-detail-h3 {
  margin: 0;
  flex: 1;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.order-detail-refund-hint {
  margin: 10px 0 0;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-soft);
  background: rgba(246, 241, 234, 0.8);
  border-radius: 10px;
}

.order-detail-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.order-detail-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(28, 22, 18, 0.06);
}

.order-detail-item:first-child {
  padding-top: 0;
}

.order-detail-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.order-detail-item-thumb {
  flex-shrink: 0;
  color: var(--accent);
}

.order-item-thumb-wrap {
  position: relative;
  flex-shrink: 0;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid rgba(28, 22, 18, 0.06);
}

.order-item-thumb-wrap.order-item-thumb-md {
  width: 56px;
  height: 56px;
}

.order-item-thumb-wrap .order-item-thumb {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0;
}

.order-item-thumb-wrap .order-item-thumb--icon {
  width: 100%;
  height: 100%;
}

.order-detail-item .order-item-thumb-wrap.order-item-thumb-md {
  width: 64px;
  height: 64px;
}

.order-detail-item .order-item-thumb {
  width: 100%;
  height: 100%;
}

.order-detail-item .order-item-thumb--icon {
  width: 100%;
  height: 100%;
}

.order-detail-item-info {
  flex: 1;
  min-width: 0;
}

.order-detail-item-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}

.order-detail-item-meta,
.order-detail-item-qty {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.order-detail-item-price {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-dark);
  font-variant-numeric: tabular-nums;
}

.order-detail-addr-box {
  padding: 12px;
  border-radius: 12px;
  background: rgba(246, 241, 234, 0.65);
  border: 1px solid rgba(28, 22, 18, 0.05);
}

.order-detail-addr-name {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.order-detail-addr-phone {
  font-weight: 500;
  color: var(--ink-soft);
}

.order-detail-addr-full {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-muted);
}

.order-detail-pay-lines {
  list-style: none;
  margin: 0;
  padding: 0;
}

.order-detail-pay-lines li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  font-size: 14px;
  color: var(--ink-muted);
  border-bottom: 1px solid rgba(28, 22, 18, 0.04);
}

.order-detail-pay-lines li:last-child {
  border-bottom: none;
}

.order-detail-pay-lines li span:last-child {
  color: var(--ink);
  font-weight: 500;
  text-align: right;
}

.order-detail-pay-total-box {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-soft), rgba(196, 92, 38, 0.03));
  border: 1px solid rgba(196, 92, 38, 0.12);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.order-detail-pay-total-box strong {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-dark);
  font-variant-numeric: tabular-nums;
}

.order-detail-pay-total {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 15px;
}

.order-detail-pay-total strong {
  color: var(--accent-dark);
  font-size: 17px;
}

.order-detail-link-btn,
.order-detail-inline-btn {
  width: auto;
  margin-top: 0;
  padding: 6px 12px;
  font-size: 12px;
}

.order-detail-nav-actions {
  display: flex;
  gap: 10px;
  padding: 4px 0 8px;
}

.order-detail-nav-actions .btn {
  flex: 1;
  margin-top: 0;
  padding: 12px 14px;
  font-size: 0.875rem;
}

.order-detail-refund-btn {
  color: var(--danger);
  border-color: rgba(185, 28, 28, 0.25);
}

body.order-detail-open {
  overflow: hidden;
}

.region-picker-host,
.region-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.region-field select {
  width: 100%;
}

.address-region-warn {
  color: var(--accent-strong, #c45c26);
  font-size: 12px;
}

.cdi-checkout-freight {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.cdi-checkout-freight div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.order-logistics-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.order-logistics-head .order-detail-h3 {
  margin: 0;
}

.order-logistics-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted, #6b635a);
}

.order-logistics-sgid {
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--ink-muted);
  opacity: 0.85;
}

.order-logistics-ships {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.order-logistics-ships li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 14px;
}

.order-logistics-traces {
  list-style: none;
  margin: 0;
  padding: 0 0 0 12px;
  border-left: 2px solid rgba(196, 92, 38, 0.25);
}

.order-logistics-traces li {
  position: relative;
  padding: 0 0 14px 12px;
  font-size: 13px;
}

.order-logistics-traces li time {
  display: block;
  color: var(--text-muted, #6b635a);
  margin-bottom: 4px;
}

.order-logistics-trace-empty {
  margin: 0;
}

/* 我的订单：状态 Tabs */
.orders-tabs-wrap {
  position: sticky;
  top: calc(max(10px, env(safe-area-inset-top)) + 48px);
  z-index: 40;
  margin: 0 auto;
  max-width: 440px;
  width: 100%;
  padding: 0 0 12px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(246, 241, 234, 0.98) 75%, rgba(246, 241, 234, 0));
  backdrop-filter: blur(10px);
}

.orders-tabs-wrap::before,
.orders-tabs-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 12px;
  width: 20px;
  z-index: 1;
  pointer-events: none;
}

.orders-tabs-wrap::before {
  left: 0;
  background: linear-gradient(90deg, rgba(246, 241, 234, 0.98), transparent);
}

.orders-tabs-wrap::after {
  right: 0;
  background: linear-gradient(270deg, rgba(246, 241, 234, 0.98), transparent);
}

.orders-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 12px;
  scroll-padding-inline: 12px;
}

.orders-tabs::-webkit-scrollbar {
  display: none;
}

.orders-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid rgba(28, 22, 18, 0.06);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.orders-tab.active {
  color: var(--accent-dark);
  background: linear-gradient(180deg, #fff 0%, rgba(255, 248, 242, 0.98) 100%);
  border-color: var(--accent-shadow);
  box-shadow: 0 2px 10px rgba(196, 92, 38, 0.12);
}

.orders-tab-badge {
  min-width: 18px;
  padding: 2px 6px;
  border-radius: 100px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.mall-orders-page {
  overflow-x: hidden;
}

.mall-orders-main {
  padding-top: 2px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0));
  overflow-x: hidden;
}

.orders-list-summary {
  margin: 0 0 10px;
  padding: 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

.orders-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 48px;
  padding: 24px 20px 32px;
  text-align: center;
}

.orders-empty-icon {
  margin-bottom: 4px;
  color: var(--accent);
  opacity: 0.85;
  background: var(--accent-soft);
}

.orders-empty-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.orders-empty-desc {
  margin: 0;
  max-width: 260px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-muted);
}

.orders-empty-cta {
  margin-top: 8px;
  min-width: 140px;
}

.orders-loading {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0 24px;
}

.orders-loading-text {
  margin: 4px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--ink-muted);
}

.orders-skeleton {
  height: 148px;
  border-radius: 16px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.92) 50%,
    rgba(255, 255, 255, 0.5) 100%
  );
  background-size: 200% 100%;
  animation: orders-shimmer 1.2s ease-in-out infinite;
  border: 1px solid rgba(28, 22, 18, 0.05);
}

@keyframes orders-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.mall-orders-page .sub-page-hint {
  display: none;
}

/* 我的订单列表 */
.orders-groups {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.order-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 0 2px;
}

.order-group-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.order-group-count {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.order-group-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  min-width: 0;
}

.order-record-wrap {
  list-style: none;
  width: 100%;
  min-width: 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(28, 22, 18, 0.07);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 4px 18px rgba(28, 22, 18, 0.05);
}

.order-record-card {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 14px 14px 12px;
  text-decoration: none;
  color: inherit;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  transition: background 0.15s ease;
}

.order-record-card:active {
  background: rgba(246, 241, 234, 0.45);
}

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

.order-record-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.order-record-thumb-wrap {
  position: relative;
  flex-shrink: 0;
}

.order-record-thumb-more {
  position: absolute;
  right: -4px;
  bottom: -4px;
  min-width: 18px;
  padding: 2px 5px;
  border-radius: 100px;
  background: rgba(28, 22, 18, 0.72);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.order-item-thumb {
  display: block;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid rgba(28, 22, 18, 0.06);
}

.order-item-thumb-md {
  width: 56px;
  height: 56px;
}

.order-item-thumb--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: linear-gradient(145deg, var(--accent-muted), rgba(196, 92, 38, 0.04));
}

.order-record-thumb {
  flex-shrink: 0;
  color: var(--accent);
  background: linear-gradient(145deg, var(--accent-muted), rgba(196, 92, 38, 0.04));
  border: 1px solid var(--accent-muted);
}

.order-record-info {
  flex: 1;
  min-width: 0;
}

.order-record-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.order-record-sub {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-muted);
}

.order-record-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.order-record-status.is-paid,
.order-record-status.is-receiving {
  color: #2d6a4f;
  background: rgba(45, 106, 79, 0.1);
}

.order-record-status.is-unpaid {
  color: #b45309;
  background: rgba(180, 83, 9, 0.12);
}

.order-record-status.is-done {
  color: #475569;
  background: rgba(71, 85, 105, 0.1);
}

.order-record-status.is-review {
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.1);
}

.order-record-status.is-cancelled,
.order-record-status.is-refunded {
  color: #8b5a2b;
  background: rgba(139, 90, 43, 0.12);
}

.order-record-time {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.order-record-no {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: rgba(246, 241, 234, 0.72);
  border: 1px dashed rgba(28, 22, 18, 0.08);
}

.order-record-no-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.order-record-no-value {
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--ink);
  letter-spacing: 0.03em;
  word-break: break-all;
  line-height: 1.45;
}

.order-record-addr {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0 0 10px;
  padding: 0 2px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-muted);
}

.order-record-addr-icon {
  flex-shrink: 0;
  margin-top: 1px;
  opacity: 0.7;
}

.order-record-addr span:last-child {
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.order-record-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(28, 22, 18, 0.06);
}

.order-record-pay {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.order-record-pay-label {
  font-size: 12px;
  color: var(--ink-muted);
}

.order-record-amount {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-dark);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.order-record-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
}

.order-record-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(28, 22, 18, 0.06);
  background: rgba(252, 249, 245, 0.98);
}

.order-detail-actions-bar {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(28, 22, 18, 0.06);
  background: rgba(252, 249, 245, 0.98);
}

.order-record-actions .order-action-btn,
.order-detail-actions-bar .order-action-btn,
.order-detail-footer .order-action-btn {
  width: auto;
  margin-top: 0;
  flex: 0 1 auto;
}

.order-record-wrap.has-actions .order-record-card {
  padding-bottom: 10px;
}

.order-action-btn {
  min-width: 84px;
  padding: 8px 14px;
  font-size: 0.8125rem;
}

.order-action-aftersale {
  color: var(--danger);
  border-color: rgba(185, 28, 28, 0.2);
}

.order-detail-footer {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 90;
  width: 100%;
  max-width: 440px;
  transform: translateX(-50%);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0));
  background: rgba(255, 252, 248, 0.97);
  border-top: 1px solid rgba(28, 22, 18, 0.08);
  backdrop-filter: blur(12px);
  box-shadow: 0 -4px 24px rgba(28, 22, 18, 0.06);
}

.order-detail-screen:has(.order-detail-footer:not([hidden])) .order-detail-main {
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0));
}

.order-detail-footer .order-detail-actions-bar {
  border-top: none;
  padding: 0;
  background: transparent;
  justify-content: stretch;
}

.order-detail-footer .order-action-btn {
  flex: 1;
}

.order-detail-actions-secondary {
  margin-top: 8px;
}

.order-detail-aftersale .btn {
  margin-top: 10px;
  width: 100%;
}

.aftersale-sheet {
  height: min(85vh, 560px);
  max-height: min(85vh, 560px);
  overflow: hidden;
}

.aftersale-sheet > .aftersale-sheet-loading,
.aftersale-sheet > .aftersale-sheet-form {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.aftersale-sheet-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px 16px;
}

.aftersale-sheet-form #btn-aftersale-submit {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: auto;
  flex-shrink: 0;
  width: 100%;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
  box-shadow: 0 4px 16px var(--accent-shadow-strong);
}

.aftersale-sheet-loading {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.aftersale-sheet-hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.aftersale-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.8125rem;
}

.aftersale-field > span:first-child {
  font-weight: 600;
  color: var(--ink);
}

.aftersale-field-reason.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

.aftersale-field select,
.aftersale-field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 10px;
  background-color: #fff;
}

.aftersale-field select {
  padding: 10px 36px 10px 12px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.aftersale-field textarea {
  padding: 10px 12px;
  resize: vertical;
  min-height: 72px;
}

.aftersale-field select:focus,
.aftersale-field textarea:focus {
  outline: none;
  border-color: rgba(196, 92, 62, 0.45);
  box-shadow: 0 0 0 3px rgba(196, 92, 62, 0.12);
}

.aftersale-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  pointer-events: none;
}

.aftersale-choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.aftersale-choice-list--stacked {
  flex-direction: column;
  gap: 6px;
}

.aftersale-choice-list--grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.aftersale-choice-list--grid .aftersale-choice {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.3;
}

.aftersale-choice {
  flex: 0 1 auto;
  min-height: 36px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--ink);
  text-align: center;
  background: #fff;
  border: 1px solid var(--border, #e8e8e8);
  border-radius: 999px;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.aftersale-choice-list--stacked .aftersale-choice {
  width: 100%;
  border-radius: 10px;
  text-align: left;
}

.aftersale-choice:active {
  transform: scale(0.98);
}

.aftersale-choice.is-selected {
  color: var(--accent);
  font-weight: 600;
  background: rgba(196, 92, 62, 0.08);
  border-color: rgba(196, 92, 62, 0.45);
  box-shadow: 0 0 0 2px rgba(196, 92, 62, 0.1);
}

.aftersale-field-static {
  margin: 0;
  padding: 10px 12px;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--ink);
  background: var(--surface-2, #f5f0ea);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.aftersale-field input[type='text'] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border, #e8e8e8);
  border-radius: 10px;
  background: #fff;
  font: inherit;
}

.aftersale-voucher-field .aftersale-field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
}

.aftersale-upload-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
}

.aftersale-images-preview {
  display: contents;
}

.aftersale-image-chip,
.aftersale-upload-add {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.aftersale-image-chip {
  border: 1px solid rgba(28, 22, 18, 0.08);
  background: #fff;
}

.aftersale-image-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.aftersale-image-chip.is-uploading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.72);
}

.aftersale-image-chip.is-uploading .aftersale-image-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  color: var(--ink-muted);
}

.aftersale-image-chip button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}

.aftersale-upload-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  font: inherit;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px dashed rgba(28, 22, 18, 0.16);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.aftersale-file-input-hidden {
  position: fixed;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.aftersale-upload-add.is-disabled,
.aftersale-upload-add:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.aftersale-upload-add:active:not(:disabled):not(.is-disabled) {
  border-color: rgba(196, 92, 38, 0.42);
  color: var(--accent);
  background: rgba(196, 92, 38, 0.05);
}

.aftersale-upload-source-sheet {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.aftersale-upload-source-sheet[hidden] {
  display: none !important;
}

.aftersale-upload-source-mask {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(28, 22, 18, 0.42);
  cursor: pointer;
}

.aftersale-upload-source-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  margin: 0 12px 12px;
  padding: 8px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}

.aftersale-upload-source-item {
  display: block;
  width: 100%;
  padding: 14px 16px;
  font: inherit;
  font-size: 0.9375rem;
  text-align: center;
  color: var(--ink);
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.aftersale-upload-source-item + .aftersale-upload-source-item {
  margin-top: 2px;
}

.aftersale-upload-source-item:active {
  background: rgba(196, 92, 62, 0.08);
}

.aftersale-upload-source-cancel {
  margin-top: 6px;
  color: var(--ink-muted);
  font-size: 0.875rem;
}

.aftersale-upload-add-icon {
  font-size: 1.375rem;
  font-weight: 300;
  line-height: 1;
  color: var(--accent);
}

.aftersale-upload-add-text {
  font-size: 0.625rem;
  line-height: 1.2;
}

.aftersale-upload-hint {
  margin: 8px 0 0;
  font-size: 0.6875rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

.aftersale-return-logistics {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border, #e8e8e8);
}

.aftersale-return-logistics .btn {
  margin-top: 8px;
}

.login-hint {
  margin: 12px 0 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-muted, #8a8a8a);
  text-align: center;
}

.mall-checkout-page {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  padding-bottom: 0;
}

.checkout-page-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 12px calc(120px + env(safe-area-inset-bottom, 12px));
}

.checkout-page-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.checkout-page-items {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(28, 22, 18, 0.06);
  border-radius: 14px;
  padding: 4px 14px;
  margin-bottom: 12px;
}

.checkout-page-hint {
  margin: 0 0 12px;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

.checkout-page-foot {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 60;
  width: 100%;
  max-width: 440px;
  transform: translateX(-50%);
  padding: 0 12px calc(12px + env(safe-area-inset-bottom, 12px));
  box-sizing: border-box;
  pointer-events: none;
}

.checkout-page-foot-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--surface) 98%, transparent);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(28, 22, 18, 0.08);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(28, 22, 18, 0.08);
  pointer-events: auto;
}

.checkout-page-foot-total {
  flex: 1;
  min-width: 0;
}

.checkout-page-foot-label {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.checkout-page-foot-total strong {
  font-size: 1.25rem;
  color: var(--accent);
}

.checkout-page-pay-btn {
  flex-shrink: 0;
  min-width: 120px;
  padding: 12px 18px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #d45a20);
  color: #fff;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}

.checkout-page-pay-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.checkout-page-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50vh;
  text-align: center;
  padding: 24px 16px;
}

.checkout-page-empty-title {
  margin: 12px 0 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
}

.checkout-page-empty-desc {
  margin: 0 0 16px;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.mall-favorites-page .sub-page-main {
  padding-bottom: 24px;
}

.favorites-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.favorite-item {
  display: flex;
  align-items: stretch;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(28, 22, 18, 0.06);
  border-radius: 14px;
  overflow: hidden;
}

.favorite-item-open {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.favorite-item-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-2);
}

.favorite-item-thumb--icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.favorite-item-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.favorite-item-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-item-price {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

.favorite-item-remove {
  flex-shrink: 0;
  width: 44px;
  border: none;
  border-left: 1px solid rgba(28, 22, 18, 0.06);
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
}

.favorite-item-remove:active {
  background: rgba(28, 22, 18, 0.04);
}

.favorites-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50vh;
  text-align: center;
  padding: 24px 16px;
}

.favorites-empty-title {
  margin: 12px 0 0;
  font-size: 1rem;
  font-weight: 600;
}

.favorites-empty-desc {
  margin: 0 0 16px;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
