:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eff6ff;
  --ok: #059669;
  --ok-soft: #ecfdf5;
  --warn: #d97706;
  --warn-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f4f6fa;
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px -12px rgba(15, 23, 42, .18);
}

* { box-sizing: border-box; }

/**
 * [hidden] 必须真的隐藏。
 * 浏览器默认的 `[hidden] { display: none }` 只是 UA 样式，作者样式里任何 `display: flex/inline-flex/…`
 * 都会把它盖掉（.tabs 是 flex、.checkbox 是 inline-flex 都中招过），所以这里显式兜底。
 */
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- 布局 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.logo { font-size: 17px; font-weight: 700; letter-spacing: .2px; }
.logo span { color: var(--brand); }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--ink-2);
  font-weight: 500;
}
.nav a:hover { background: var(--brand-soft); color: var(--brand); text-decoration: none; }
.nav a.active { background: var(--brand); color: #fff; }
.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}
.nav-user .who {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-user button { padding: 5px 11px; }

.page { max-width: 1200px; margin: 0 auto; padding: 22px 20px 80px; }

.page-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: 21px; margin: 0; }
.page-head .sub { color: var(--muted); font-size: 13px; }

/* ---------- 通用组件 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 18px;
}
.card h2 { font-size: 15px; margin: 0 0 12px; }

button, .btn {
  font: inherit;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  transition: background .15s, opacity .15s;
}
button:hover:not(:disabled), .btn:hover { background: var(--brand-dark); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.ghost { background: #fff; color: var(--ink-2); border: 1px solid var(--line); }
button.ghost:hover:not(:disabled) { background: #f8fafc; }
button.soft { background: var(--brand-soft); color: var(--brand); }
button.soft:hover:not(:disabled) { background: #dbeafe; }
button.danger { background: var(--danger); }
button.danger:hover:not(:disabled) { background: #b91c1c; }

input, textarea, select {
  font: inherit;
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12.5px; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .grow { flex: 1; min-width: 200px; }
.checkbox { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); white-space: nowrap; }
.checkbox input { width: auto; }

/* ---------- 徽标 / 提示 ---------- */
.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: #f1f5f9;
  color: var(--ink-2);
  white-space: nowrap;
}
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }

.msg { padding: 10px 13px; border-radius: 8px; margin: 12px 0 0; }
.msg.ok { background: var(--ok-soft); color: #065f46; }
.msg.err { background: var(--danger-soft); color: #991b1b; }
.msg.info { background: var(--brand-soft); color: #1e40af; }
.msg.warn { background: var(--warn-soft); color: #92400e; }

.empty { text-align: center; color: var(--muted); padding: 44px 20px; }
.empty .big { font-size: 34px; display: block; margin-bottom: 8px; }

/* ---------- 统计卡 ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.stat .label { color: var(--muted); font-size: 12.5px; }
.stat .value { font-size: 24px; font-weight: 700; margin-top: 2px; }
.stat .value.ok { color: var(--ok); }
.stat .value.danger { color: var(--danger); }

/* ---------- 表格 ---------- */
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data th { background: #f8fafc; color: var(--muted); font-weight: 600; white-space: nowrap; position: sticky; top: 0; }
table.data tbody tr:hover { background: #f8fafc; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr.detail-row > td { background: #fbfdff; padding: 0; }
.table-wrap { overflow: auto; max-height: 62vh; border: 1px solid var(--line); border-radius: 10px; }
table.detail { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.detail th, table.detail td { padding: 7px 10px; border-bottom: 1px dashed var(--line); text-align: left; }
table.detail th { color: var(--muted); font-weight: 600; background: transparent; }
.mono { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

pre.raw {
  margin: 0;
  padding: 12px;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.5;
  max-height: 260px;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ---------- 商城 ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(186px, 1fr)); gap: 14px; }

.product {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.product:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -14px rgba(15, 23, 42, .3); }
.product .thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f1f5f9;
  overflow: hidden;
}
.product .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product .thumb .ph { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 30px; color: #cbd5e1; }
.product .thumb .stock {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 23, 42, .72);
  color: #fff;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11.5px;
}
.product .thumb .stock.none { background: rgba(220, 38, 38, .85); }
.product .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product .name { font-weight: 600; line-height: 1.35; min-height: 38px; }
.product .sku { color: var(--muted); font-size: 12px; }
.product .price { color: var(--danger); font-weight: 700; font-size: 16px; }
.product .price.ask { color: var(--muted); font-weight: 500; font-size: 13px; }
.product .card-actions { display: flex; gap: 8px; margin-top: auto; }
.product .card-actions button { flex: 1; padding: 7px 10px; }

/* VIP 折扣：划线原价 + 角标 */
.price-old { color: var(--muted); text-decoration: line-through; font-size: 12px; font-weight: 500; margin-left: 6px; }
.vip-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 700;
}
/* 详情弹窗里（非绝对定位的角标）跟随文字 */
.vip-badge.inline { position: static; margin-left: 6px; }

/* ---------- 商品列表底部/顶部：总数 + 翻页 ---------- */
.list-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
  min-height: 34px;
}
/* 顶部的翻页栏：紧贴商品列表上方，间距往下而不是往上 */
.list-foot-top {
  margin-top: 0;
  margin-bottom: 12px;
}
.list-total { color: var(--muted); font-size: 13px; }
.pager { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; }
.pager-info { color: var(--ink-2); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pager button { padding: 6px 13px; }
.pager button:disabled { opacity: .4; }

/* ---------- 购物车（右上角按钮 + 弹窗） ---------- */
.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 600;
}
.cart-btn:hover:not(:disabled) { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.cart-btn .badge { background: var(--brand); color: #fff; min-width: 22px; text-align: center; font-weight: 700; }

/* 写在 .modal 之前，故用 .modal.cart-modal 提高优先级以覆盖默认宽度 */
.modal.cart-modal { width: min(620px, 100%); }
.cart-list { max-height: 46vh; overflow: auto; margin: 4px 0 10px; border: 1px solid var(--line); border-radius: 10px; }
.cart-row { display: flex; gap: 11px; padding: 10px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.cart-row:last-child { border-bottom: none; }
.cart-row .info { flex: 1; min-width: 0; }
.cart-row .t { font-weight: 600; font-size: 13px; }
.cart-row .m { color: var(--muted); font-size: 12px; }
.cart-row .m.price { margin-top: 2px; }
.cart-row .m.price b { color: var(--danger); font-size: 13px; }
.cart-thumb {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-thumb .ph { font-size: 22px; color: #cbd5e1; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.stepper button {
  background: #f8fafc;
  color: var(--ink-2);
  border-radius: 0;
  padding: 3px 9px;
  line-height: 1.2;
}
.stepper button:hover:not(:disabled) { background: #eef2f7; }
.stepper input {
  width: 46px;
  border: none;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-radius: 0;
  text-align: center;
  padding: 3px 0;
}
.cart-total { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 2px; border-top: 1px dashed var(--line); }
.cart-total .v { font-size: 19px; font-weight: 700; color: var(--danger); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
  font-size: 13px;
}
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- 弹窗 / 抽屉 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 60;
}
.modal-mask[hidden] { display: none; }
.modal {
  background: #fff;
  border-radius: 14px;
  width: min(560px, 100%);
  max-height: 86vh;
  overflow: auto;
  padding: 20px;
  box-shadow: 0 24px 60px -20px rgba(15, 23, 42, .5);
}
.modal h3 { margin: 0 0 12px; font-size: 17px; }
.modal .close { float: right; background: transparent; color: var(--muted); font-size: 18px; padding: 0 6px; }
.modal .close:hover { background: transparent; color: var(--ink); }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.req { color: var(--danger); }
code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* 表格行内操作按钮（编辑 / 删除 / 确认删除） */
.row-actions { white-space: nowrap; }
.row-actions button { padding: 4px 10px; font-size: 12.5px; margin-right: 6px; }
.row-actions button:last-child { margin-right: 0; }

/* ---------- 订单状态徽标 ---------- */
/* 空 = 进行中（黄） · "1" = 已完成（绿） · 其它字符串 = 运输中（蓝，且可点击看快递单号） */
.status-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.status-chip.pending { background: var(--warn-soft); color: var(--warn); }
.status-chip.done { background: var(--ok-soft); color: var(--ok); }
.status-chip.shipping {
  background: var(--brand-soft);
  color: var(--brand);
  border: 1px solid #bfdbfe;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 2px 10px;
  cursor: pointer;
}
.status-chip.shipping:hover { background: #dbeafe; }

/* 订单号下方的解析异常小字（原来是「状态」列） */
.warn-note {
  margin-top: 2px;
  font-size: 11px;
  color: var(--warn);
  cursor: help;
}

/* 快递单号弹窗里的单号：等宽 + 可整段选中复制 */
.track-value {
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfdff;
  font-size: 15px;
  word-break: break-all;
  user-select: all;
}

.batches { border: 1px solid var(--line); border-radius: 10px; max-height: 190px; overflow: auto; }
.batch-row { display: flex; justify-content: space-between; padding: 7px 11px; border-bottom: 1px solid var(--line); font-size: 13px; }
.batch-row:last-child { border-bottom: none; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button {
  background: transparent;
  color: var(--ink-2);
  border-radius: 8px 8px 0 0;
  border-bottom: 2px solid transparent;
  padding: 9px 14px;
}
.tabs button:hover:not(:disabled) { background: var(--brand-soft); color: var(--brand); }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 11px 20px;
  border-radius: 10px;
  z-index: 80;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5);
  max-width: 90vw;
}
.toast[hidden] { display: none; }
.toast.err { background: var(--danger); }
.toast.ok { background: var(--ok); }

.spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: -2px;
  margin-right: 6px;
}
/* 白底上的 spinner（列表底部「载入中…」），默认配色在浅色背景上会看不见 */
.spinner.brand { border-color: rgba(37, 99, 235, .3); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 登录页 ---------- */
body.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(1100px 520px at 50% -12%, #dbeafe 0%, #f4f6fa 58%, #eef2f7 100%);
}

.login-wrap { width: min(400px, 100%); }

.login-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 60px -26px rgba(15, 23, 42, .38);
  padding: 28px 26px 24px;
  margin: 0;
}
.login-brand { font-size: 21px; font-weight: 700; text-align: center; letter-spacing: .2px; }
.login-brand span { color: var(--brand); }
.login-sub { text-align: center; color: var(--muted); font-size: 13px; margin: 6px 0 20px; word-break: break-all; }
.login-remember { margin-bottom: 14px; font-size: 13px; }
.login-btn { width: 100%; padding: 10px; font-weight: 600; }
.login-foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 16px; }

.login-session {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--brand-soft);
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  color: #1e40af;
}
.login-session[hidden] { display: none; }
.login-session .txt { flex: 1; min-width: 150px; }
.login-session button { padding: 5px 12px; font-size: 13px; }
.login-session button.ghost { background: #fff; }

/* ---------- 注册页 ---------- */
/* 比登录卡宽一些：注册要放用户名 / 手机号 / 密码 / 地址 / 税号，窄了会很长 */
.login-wrap-wide { width: min(560px, 100%); }
.reg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}
.field-head label { margin-bottom: 0; }
button.small, .btn.small { padding: 3px 9px; font-size: 12.5px; border-radius: 7px; }

/* 地址 / 税号的一行：输入框 + 删除按钮 */
.reg-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.reg-row input { flex: 1; min-width: 0; }
.reg-row .rm {
  flex: 0 0 auto;
  width: 34px;
  padding: 7px 0;
  background: #f1f5f9;
  color: var(--muted);
  border: 1px solid var(--line);
  line-height: 1.2;
}
.reg-row .rm:hover:not(:disabled) { background: var(--danger-soft); color: var(--danger); border-color: #fecaca; }
.reg-row .rm:disabled { opacity: .35; cursor: not-allowed; }

.reg-optional {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-top: 4px;
  background: #fbfdff;
}
.reg-optional > summary { cursor: pointer; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.reg-optional[open] > summary { margin-bottom: 4px; }
.reg-optional .hint { margin-top: 4px; }

/* ---------- 「我的」页面：账号概览 ---------- */
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 16px; }
.profile-grid > div { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.profile-grid .k { flex: 0 0 auto; font-size: 12.5px; color: var(--muted); }
.profile-grid .v { font-weight: 600; overflow-wrap: anywhere; }

/* ---------- 手机（窄屏）：整体缩小 + 商品固定两列 ---------- */
/**
 * 全站只有这一个断点，640px 以下按手机处理。
 *
 * 商品网格原来是 repeat(auto-fill, minmax(186px, 1fr))，在 390px 宽的屏上放不下两列
 * （186*2 + 14 间距 = 386px，还要减掉 .page 与 .card 的内边距），于是退化成 1 列：
 * 卡片被拉到 ~298px 宽、缩略图 298px 高，一屏只看得到 2 个商品。这里改成固定两列。
 */
@media (max-width: 640px) {
  body { font-size: 13px; }

  /* 顶栏：logo + 页面入口 + 购物车 + 账号挤在 390px 里会折成多行（实测 140px 高） */
  .topbar-inner { padding: 6px 12px; gap: 6px; }
  .logo { font-size: 14px; }
  .nav { gap: 2px; }
  .nav a { padding: 4px 8px; border-radius: 7px; font-size: 12.5px; line-height: 1.35; }
  .nav-user { gap: 6px; padding-left: 8px; }
  .nav-user .who { font-size: 12px; max-width: 78px; }
  .nav-user button { padding: 3px 8px; font-size: 12.5px; line-height: 1.35; }
  .cart-btn { gap: 6px; padding: 4px 10px; font-size: 12.5px; line-height: 1.35; }

  .page { padding: 14px 12px 56px; }
  .page-head { gap: 10px; margin-bottom: 12px; }
  .page-head h1 { font-size: 18px; }
  .page-head .sub { font-size: 12.5px; }

  .card { padding: 12px; margin-bottom: 12px; border-radius: 10px; }
  .card h2 { font-size: 14px; margin-bottom: 8px; }

  button, .btn { padding: 7px 11px; font-size: 13px; }
  input, textarea, select { padding: 7px 10px; }
  textarea { font-size: 12px; }

  /* 搜索框独占一行，筛选按钮与「刷新」再换行，避免都挤成一行 */
  .toolbar { gap: 8px; margin-bottom: 10px; }
  .toolbar .grow { min-width: 100%; }
  .filters { gap: 6px; }
  .chip { padding: 3px 10px; font-size: 12.5px; }

  /* 翻页：手机上让总数和按钮各占一行，按钮铺满更好点 */
  .list-foot { gap: 8px; margin-top: 12px; }
  .list-foot-top { margin-top: 0; margin-bottom: 10px; }
  .list-total { font-size: 12.5px; }
  .pager { width: 100%; margin-left: 0; justify-content: space-between; gap: 8px; }
  .pager-info { font-size: 12.5px; }
  .pager button { padding: 6px 10px; }

  .msg { padding: 8px 11px; margin-top: 10px; font-size: 12.5px; }
  .empty { padding: 30px 14px; }
  .empty .big { font-size: 26px; margin-bottom: 6px; }

  .stats { grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; margin-bottom: 12px; }
  .stat { padding: 10px 12px; }
  .stat .label { font-size: 11.5px; }
  .stat .value { font-size: 19px; }

  /* 商品卡：固定两列 + 字号内边距整体缩小 */
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product { border-radius: 10px; }
  .product .thumb .ph { font-size: 24px; }
  .product .thumb .stock { top: 5px; left: 5px; padding: 1px 7px; font-size: 10.5px; }
  .product .body { padding: 8px 9px 9px; gap: 4px; }
  .product .name { font-size: 12.5px; line-height: 1.3; min-height: 0; }
  .product .sku { font-size: 10.5px; }
  .product .price { font-size: 14px; }
  .product .price.ask { font-size: 12px; }
  .product .card-actions { gap: 6px; }
  .product .card-actions button { padding: 6px 8px; font-size: 12.5px; }

  /* 表格：手机上行高更紧凑，横向溢出交给 .table-wrap 滚动 */
  table.data { font-size: 12.5px; }
  table.data th, table.data td { padding: 7px 8px; }
  table.detail { font-size: 12px; }
  table.detail th, table.detail td { padding: 6px 8px; }
  .table-wrap { max-height: 56vh; }
  .row-actions button { padding: 3px 8px; font-size: 12px; margin-right: 4px; }
  .status-chip, .status-chip.shipping { font-size: 12px; padding: 2px 8px; }
  .track-value { font-size: 14px; }
  pre.raw { font-size: 11px; padding: 10px; }

  .modal-mask { padding: 12px; }
  .modal { padding: 16px; border-radius: 12px; }
  .modal h3 { font-size: 16px; margin-bottom: 10px; }
  .cart-thumb { width: 46px; height: 46px; }
  .cart-total .v { font-size: 17px; }

  /* 登录页 / 注册页 */
  body.login-body { padding: 16px; }
  .login-card { padding: 22px 18px 20px; border-radius: 14px; }
  .login-brand { font-size: 19px; }
  .login-session { padding: 8px 11px; gap: 8px; font-size: 12.5px; }
  .login-session .txt { min-width: 100%; }

  /* 注册页：用户名 / 手机号在窄屏上竖排，地址行按钮也跟着缩小 */
  .reg-grid { grid-template-columns: 1fr; }
  .reg-optional { padding: 8px 10px; }
  .reg-row { gap: 6px; margin-bottom: 6px; }
  .reg-row .rm { width: 30px; padding: 6px 0; }
}
