:root {
  /* 品牌色（参考推小蜂模板：中性深色系） */
  --brand: #14181f;
  --brand-ink: #14181f;
  --brand-bg: #eef0f4;
  --brand-line: #dee2e9;
  /* 文字色阶 */
  --ink: #0f141b;
  --ink2: #5b6472;
  --ink3: #98a1ad;
  /* 表面 */
  --bg: #f5f6f8;
  --surface: #fff;
  --surface-2: #fafbfc;
  --surface-3: #f3f5f8;
  /* 深色卡 */
  --dk1: #26282e;
  --dk2: #1a1c21;
  --dk3: #101114;
  /* 语义色 */
  --ok: #12a150;
  --ok-bg: #ecfdf3;
  --warn: #a15c07;
  --warn-bg: #fffaeb;
  --warn-line: #f6e6c8;
  --danger: #e5484d;
  --danger-bg: #fef3f2;
  --danger-line: #fbdcdc;
  /* 兼容旧变量名（逐步迁移） */
  --text: var(--ink);
  --muted: var(--ink2);
  --border: var(--line);
  --line: #e9ecf1;
  --card: var(--surface);
  --card-2: var(--surface-2);
  --card-3: var(--surface-3);
  --primary: var(--brand);
  --accent: var(--brand);
  --green: var(--ok);
  --red: var(--danger);
  --red-text: var(--danger);
  --green-text: var(--ok);
  --warning-bg: var(--warn-bg);
  --warning-text: var(--warn);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 18px rgba(16, 24, 40, .05);
  --grad: linear-gradient(150deg, var(--dk1) 0%, var(--dk2) 52%, var(--dk3) 100%);
  --grad-dark: linear-gradient(150deg, var(--dk1) 0%, var(--dk2) 52%, var(--dk3) 100%);
  --grad-orange: var(--brand);
  --grad-green: var(--ok);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font-family: inherit; }
[hidden] { display: none !important; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
.uppercase { text-transform: uppercase; }
.break-all { word-break: break-all; }
.right { text-align: right; }

.shell {
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--line);
  position: relative;
  overflow-x: hidden;
}

/* ---------------------------------------------------------------- 顶栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: rgba(245, 246, 248, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { font-size: 17px; font-weight: 700; white-space: nowrap; }
.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  white-space: nowrap;
}
.top-link { color: var(--muted); text-decoration: none; font-size: 13px; }
.top-link:hover { color: var(--primary); }
.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.link-btn:hover { color: var(--primary); }
.inline-form { display: inline; }
.back-link {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  text-decoration: none;
  font-size: 30px;
  line-height: 1;
  margin-left: -4px;
}

.content { padding: 16px 16px 32px; }
.has-tabbar .content { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }

/* ---------------------------------------------------------------- 底部页签 */
.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: calc(64px + env(safe-area-inset-bottom));
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  z-index: 60;
}
.tabbar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--ink3);
  font-size: 11px;
  text-decoration: none;
  border-radius: 12px;
  transition: color .15s ease, background .18s ease;
  letter-spacing: .2px;
}
.tabbar-item .tab-ic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 26px;
  margin: 0 auto 3px;
  border-radius: 9px;
  transition: background .18s ease, transform .18s ease;
}
.tabbar-item svg { width: 21px; height: 21px; }
.tabbar-item.active {
  color: var(--brand);
  font-weight: 700;
}
.tabbar-item.active .tab-ic {
  background: var(--brand-bg);
  transform: translateY(-1px);
}

/* ---------------------------------------------------------------- 我的页 */
.avatar-upload { margin: 0; flex-shrink: 0; }
.avatar-edit-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  cursor: pointer;
}
.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid #D8D5CA;
  background: #F3F1EA;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
  text-decoration: none;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-avatar-sm { width: 44px; height: 44px; font-size: 17px; }
.avatar-edit-wrap:hover .profile-avatar { border-color: var(--primary); }
.avatar-edit-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--card);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 深色资产卡：头像 + 昵称 + 余额 + 充值 + 统计 */
.wallet-hero {
  position: relative;
  overflow: hidden;
  background: var(--grad-dark);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: 0 8px 24px rgba(20, 24, 31, .18);
}
.wallet-hero::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -70px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .07), transparent 68%);
  pointer-events: none;
}
.wallet-hero > * { position: relative; z-index: 1; }
.wallet-top { position: relative; display: flex; align-items: center; gap: 13px; }
.wallet-id { min-width: 0; flex: 1; }
.wallet-name { font-size: 16.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wallet-sub { font-size: 12px; color: rgba(255, 255, 255, .6); margin-top: 4px; }
.wallet-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .13);
  color: rgba(255, 255, 255, .88);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.wallet-hero .profile-avatar {
  width: 46px;
  height: 46px;
  border: 2px solid rgba(255, 255, 255, .22);
  background: var(--brand);
  color: #fff;
  font-size: 19px;
}
.wallet-hero .avatar-edit-badge { background: #fff; color: var(--brand); border-color: var(--dk3); }
.wallet-mid {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
.wallet-label { font-size: 12.5px; color: rgba(255, 255, 255, .62); letter-spacing: .3px; }
.wallet-balance {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  margin-top: 5px;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.6px;
}
.wallet-balance small { font-size: 17px; font-weight: 700; margin-right: 2px; }
.wallet-recharge {
  flex-shrink: 0;
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 11px;
  text-decoration: none;
  margin-bottom: 4px;
  transition: opacity .15s ease;
}
.wallet-recharge:active { opacity: .85; }
.wallet-stats {
  position: relative;
  display: flex;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.wallet-stat {
  flex: 1;
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
}
.wallet-stat + .wallet-stat {
  margin-left: 14px;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, .12);
}
.wallet-stat span { font-size: 11.5px; color: rgba(255, 255, 255, .66); white-space: nowrap; }
.wallet-stat b { font-size: 14.5px; font-weight: 800; color: #fff; letter-spacing: -.2px; white-space: nowrap; }
.wallet-stat-div { display: none; }

/* 首页简化余额卡：余额左、充值按钮右，内联一行 */
.wallet-hero--home { padding: 18px; }
.wallet-home-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.wallet-home-left { min-width: 0; }
.wallet-hero--home .wallet-label { font-size: 12.5px; color: rgba(255, 255, 255, .62); }
.wallet-hero--home .wallet-balance { margin-top: 5px; font-size: 30px; }
.wallet-hero--home .wallet-recharge { margin-bottom: 0; flex-shrink: 0; }

/* 首页欢迎区 */
.home-hero {
  background: linear-gradient(135deg, var(--brand) 0%, #4f6df5 100%);
  border-radius: 16px;
  padding: 18px 18px 20px;
  color: #fff;
  margin-bottom: 12px;
  box-shadow: 0 6px 18px rgba(43, 90, 237, .28);
}
.home-hello { font-size: 13px; opacity: .88; margin-bottom: 8px; }
.home-balance { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.home-balance-label { font-size: 12px; opacity: .82; }
.home-balance-num { font-size: 28px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.home-recharge-link {
  margin-left: auto;
  background: rgba(255, 255, 255, .2);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  text-decoration: none;
  align-self: center;
}

/* 下单页头部 */
.order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.order-title { font-size: 20px; font-weight: 800; color: var(--ink); letter-spacing: -.3px; }
.order-balance { font-size: 13px; color: var(--ink2); font-variant-numeric: tabular-nums; }

/* 首页今日统计行 */
.today-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.today-cell {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px 6px 14px;
  text-align: center;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .15s ease;
}
.today-cell:active { transform: scale(.96); }
.today-n {
  font-size: 23px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  letter-spacing: -.5px;
}
.today-l {
  font-size: 11.5px;
  color: var(--ink2);
  margin-top: 5px;
}

/* 货架状态点 */
.shelf-dot {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .14);
}
.shelf-dot.soldout-dot {
  background: #cbd5e1;
  box-shadow: none;
}

/* 主按钮 */
.big-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 13px;
  padding: 15px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin: 2px 0 14px;
  box-shadow: 0 4px 14px rgba(20, 24, 31, .22);
  transition: opacity .15s ease, transform .15s ease;
}
.big-btn:active { opacity: .88; transform: scale(.99); }

/* 区块标题 */
.sec-title {
  font-size: 12px;
  color: var(--ink3);
  margin: 2px 4px 8px;
  letter-spacing: .3px;
}

/* 公告列表 */
.notice-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.notice-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink2);
  border-bottom: 1px solid #f3f4f6;
}
.notice-item:last-child { border-bottom: none; }
.notice-dot {
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 7px;
}
.notice-text { word-break: break-word; }

/* 公告按类型上色 */
.notice-item.notice-type-0 .notice-dot,
.notice-item.notice-type-1 .notice-dot { background: #d97706; }
.notice-item.notice-type-2 .notice-dot { background: #2563eb; }
.notice-item.notice-type-3 .notice-dot { background: #dc2626; }
.notice-item.notice-type-3 { background: #fff5f5; }

/* 货架网格：三列 */
.shelf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  margin-bottom: 12px;
}

.shelf-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  width: 100%;
  min-height: 0;
  padding: 12px 10px 10px;
  border: 1px solid var(--line);
  font-family: inherit;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.shelf-card:active {
  transform: scale(.97);
  border-color: var(--brand-line);
}
.shelf-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f4f5f7, #e9ebef);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 23px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  margin-bottom: 8px;
  overflow: hidden;
}
.shelf-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}
.shelf-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
  width: 100%;
}
.shelf-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: .2px;
}
.shelf-price {
  font-size: 13px;
  font-weight: 800;
  color: var(--brand-ink);
  font-variant-numeric: tabular-nums;
}
.shelf-price em { font-style: normal; font-size: 11px; font-weight: 400; color: var(--ink3); margin-left: 2px; }
.shelf-stock { font-size: 11px; color: var(--ink3); line-height: 1.2; display: block; margin-top: 0; }
.shelf-stock.low { color: var(--danger); }
.shelf-stock.out { color: var(--ink3); }

.shelf-card.soldout {
  opacity: .55;
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow);
  cursor: default;
}
.shelf-card.soldout .shelf-mark { background: linear-gradient(135deg, #f4f5f7, #e9ebef); color: var(--ink3); }
.shelf-card.soldout .shelf-name { color: var(--ink3); }
.shelf-card.soldout .shelf-price { color: var(--ink3); }
.soldout-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 2px 7px;
  border-radius: 6px;
  background: #f1f3f6;
  color: var(--ink3);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
}

.me-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 12px;
}
.me-title { font-size: 14.5px; font-weight: 700; margin-bottom: 8px; color: var(--ink); }
.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--surface-3);
  font-size: 12px;
}
.info-row:last-child { border-bottom: none; }
.info-row > span { color: var(--ink2); }
.info-row strong { font-weight: 600; word-break: break-all; text-align: right; }
.me-hint { font-size: 13px; color: var(--ink2); line-height: 1.6; }

/* 菜单分组（我的页） */
.menu-group-label {
  font-size: 13px;
  color: var(--ink3);
  font-weight: 600;
  margin: 22px 6px 10px;
  letter-spacing: .3px;
}
.menu-group-label:first-of-type { margin-top: 0; }

.action-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 12px;
}
.action-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 15px;
  border: none;
  border-bottom: 1px solid #f5f6f8;
  background: none;
  color: var(--ink);
  font-size: 15px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease;
}
.action-list > *:last-child .action-row,
.action-list form:last-child .action-row { border-bottom: none; }
.action-row:active { background: var(--surface-2); }
.action-row > span { flex: 1; text-align: left; }
.action-danger {
  color: var(--danger);
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.action-danger .mi-ico { color: var(--danger); }
.mi-ico {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--ink2);
}
.chevron {
  color: #c9cfd8;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1;
  margin-left: auto;
}

.recharge-tip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-top: 12px;
}
.recharge-tip-title { font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.recharge-tip-body { font-size: 13px; color: var(--ink); line-height: 1.7; word-break: break-all; white-space: pre-wrap; margin-bottom: 10px; }

/* ---------------------------------------------------------------- 通用元素 */
.flash-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.flash {
  padding: 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
}
.flash-success { background: var(--ok-bg); color: #166534; }
.flash-error { background: var(--danger-bg); color: #b42318; }
.flash-info { background: var(--surface-3); color: var(--ink2); }

.notice {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  color: var(--warn);
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 12.5px;
  line-height: 1.65;
  margin-bottom: 10px;
  white-space: pre-wrap;
  word-break: break-word;
}
.notice-info { background: var(--brand-bg); border-color: var(--brand-line); color: var(--brand-ink); }
.notice-danger { background: var(--danger-bg); border-color: var(--danger-line); color: #b42318; }
.notice-tag {
  display: inline-block;
  padding: 1px 6px;
  margin-right: 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .06);
  color: var(--warn);
  font-size: 10px;
  font-weight: 700;
  vertical-align: 1px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.page-head h1 { font-size: 20px; font-weight: 800; letter-spacing: -.2px; color: var(--ink); }
.page-sub { font-size: 12px; color: var(--ink3); white-space: nowrap; }

/* 记录页筛选栏 */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.filter-search {
  flex: 1;
  position: relative;
  height: 40px;
  box-sizing: border-box;
}
.filter-search input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  outline: none;
  background: var(--surface);
  border-radius: 11px;
  font-size: 13.5px;
  color: var(--ink);
  font-family: inherit;
  padding: 0 70px 0 14px;
  height: 40px;
  box-sizing: border-box;
}
.filter-search input:focus { border-color: var(--brand-line); }
.filter-search input::placeholder { color: var(--ink3); }
.filter-submit {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: var(--brand);
  color: #fff;
  border-radius: 8px;
  padding: 0 14px;
  height: 30px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
}
.filter-reset {
  font-size: 12px;
  color: var(--ink2);
  text-decoration: none;
  padding: 0 4px;
  flex-shrink: 0;
}

.empty-state {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 16px;
  text-align: center;
}
.empty-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.empty-desc { font-size: 13px; color: var(--ink2); margin: 8px 0 16px; }

/* ---------------------------------------------------------------- 按钮与表单 */
.btn {
  height: 48px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 13px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  transition: transform .08s ease, filter .15s ease;
}
.btn:active { transform: scale(.97); filter: brightness(1.15); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 4px 14px rgba(20, 24, 31, .22); }
.btn-green { background: var(--ok); color: #fff; box-shadow: 0 6px 16px rgba(18, 161, 80, .25); }
.btn-dark { background: var(--surface-3); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"], .btn.is-disabled {
  background: var(--surface-3);
  color: var(--ink3);
  cursor: not-allowed;
  box-shadow: none;
}
.btn.is-loading { opacity: .7; cursor: wait; }

.btn-mini {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-mini:hover { border-color: var(--brand); color: var(--brand); }
.btn-mini-wide { width: 100%; margin-top: 8px; }
.code-actions { display: flex; gap: 8px; margin-top: 8px; }
.code-actions .btn-mini { flex: 1; }
.result-hint { font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 8px; }

.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 13px; color: var(--ink2); margin-bottom: 4px; }
input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
textarea {
  padding: 12px;
  line-height: 1.6;
  resize: vertical;
}
input:focus, select:focus, textarea:focus {
  background: #fff;
  border-color: var(--brand-line);
  box-shadow: 0 0 0 3px rgba(20, 24, 31, .06);
}
.pwd-wrap { position: relative; display: block; }
.pwd-wrap input { padding-right: 56px; }
.pwd-eye {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  height: 28px;
  padding: 0 4px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

/* ---------------------------------------------------------------- 登录 */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 20px;
}
.login-head { text-align: center; margin-bottom: 20px; }
.login-head h1 { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -.2px; }
.login-head p { font-size: 13px; color: var(--ink2); margin-top: 4px; }
.tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab {
  flex: 1;
  height: 44px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--ink3);
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
}
.tab.active { color: var(--ink); font-weight: 700; border-bottom-color: var(--brand); }
.auth-form { margin-top: 4px; }
.auth-switch { text-align: center; font-size: 13px; color: var(--ink2); margin-top: 12px; }
.auth-switch .link-btn { color: var(--brand); font-size: 13px; }
.login-foot {
  text-align: center;
  font-size: 12px;
  color: var(--ink3);
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.error-card { text-align: center; }
.error-code { font-size: 40px; font-weight: 800; color: var(--brand); }
.error-message { font-size: 14px; color: var(--ink2); margin: 12px 0 24px; }

/* ---------------------------------------------------------------- 结果页 & 充值页 */

/* 余额大卡：充值页余额展示，深色资产卡风格 */
.hero-card {
  position: relative;
  overflow: hidden;
  background: var(--grad-dark);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  text-align: left;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(20, 24, 31, .18);
  margin-bottom: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.hero-card::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -70px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .07), transparent 68%);
  pointer-events: none;
}
.hero-card > * { position: relative; z-index: 1; }
.hero-num {
  position: relative;
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.6px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin-top: 5px;
}
.hero-num small { font-size: 17px; font-weight: 700; margin-right: 2px; }
.hero-num em { font-style: normal; font-size: 14px; font-weight: 400; color: rgba(255, 255, 255, .8); margin-left: 4px; }
.hero-label { position: relative; font-size: 12.5px; color: rgba(255, 255, 255, .62); }

.success-hero { text-align: center; padding: 16px 0 4px; }
.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(20, 24, 31, .18);
}
.success-title { font-size: 20px; font-weight: 800; margin-top: 12px; color: var(--ink); }
.success-sub { font-size: 13px; color: var(--ink2); margin-top: 4px; }

.btn-row { display: flex; gap: 12px; margin-top: 16px; }
.btn-row .btn { flex: 1; }

.steps { margin: 16px 0 12px; }
.step-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  line-height: 1.6;
}
.step-no {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--surface-3);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  margin-top: 1px;
}

.contact-box {
  background: var(--surface-2);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 12px;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}
.contact-actions { margin-top: 8px; }

/* 联系客服展开卡片 */
.contact-card {
  margin: 0 0 10px;
}
.contact-card-inner {
  padding: 4px 0;
}
.contact-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 4px 0;
  font-size: 13px;
  line-height: 1.5;
}
.contact-row + .contact-row { border-top: 1px dashed #f0f2f5; }
.contact-k {
  color: var(--ink2);
  flex-shrink: 0;
  min-width: 56px;
}
.contact-v {
  color: var(--ink);
  font-weight: 600;
  word-break: break-all;
}
.contact-card .btn { margin-top: 8px; }

.chevron-toggle { transition: transform .2s ease; }

/* 下单页顶部提示条 */
.order-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff8e6;
  border: 1px solid #f5d98a;
  color: #8a6300;
  border-radius: 11px;
  padding: 11px 13px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 14px;
}
.order-tip span { word-break: break-word; }
.order-tip.order-tip-0, .order-tip.order-tip-1 { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.order-tip.order-tip-2 { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.order-tip.order-tip-3 { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }

/* 联系客服页 */
.contact-hero {
  text-align: center;
  padding: 24px 0 18px;
}
.contact-avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), #4f8cff);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(64, 120, 255, .28);
}
.contact-avatar svg { width: 32px; height: 32px; }
.contact-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 5px;
}
.contact-sub {
  font-size: 13px;
  color: var(--ink3);
  margin: 0;
}
.contact-tips {
  margin-top: 10px;
  padding: 4px 0;
}
.tip-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 4px 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink2);
}
.tip-num {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

/* 卡密充值 */
.card-recharge-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.card-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 11px;
  padding: 0 14px;
  height: 42px;
  font-size: 14px;
  color: var(--ink);
  font-family: inherit;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-sizing: border-box;
}
.card-input:focus {
  outline: none;
  border-color: var(--brand-line);
  background: var(--surface);
}
.card-recharge-form .btn-primary {
  flex-shrink: 0;
  height: 42px;
  padding: 0 18px;
}

.flow-note { font-size: 11px; color: var(--muted); }
.flow-plus { color: var(--green-text); }

.success-bar {
  background: #ECFDF5;
  color: #166534;
  border-radius: 10px;
  padding: 12px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}
.result-label { font-size: 12px; color: var(--muted); margin: 12px 0 4px; }
.result-number {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
}
.result-number .mono {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 18px;
  letter-spacing: .3px;
}
.code-box {
  background: #F3F1EA;
  border-radius: 8px;
  padding: 12px;
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 160px;
  overflow-y: auto;
}
.result-note { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.6; }
.sms-result {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: var(--card-2);
}
.sms-code {
  font-size: 40px;
  font-weight: 800;
  color: var(--red-text);
  text-align: center;
  line-height: 1.2;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
}
.sms-raw { font-size: 13px; line-height: 1.6; word-break: break-word; white-space: pre-wrap; }
.sms-message { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* ---------------------------------------------------------------- 我的记录 */
.record-list { display: flex; flex-direction: column; gap: 10px; }
.record {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.record-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: transform .08s ease;
}
.record-item:active { transform: scale(.99); }
.record-main { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.record-cat { font-size: 12px; color: var(--ink2); }
.record-country { font-weight: 700; color: var(--ink); }
.record-oid { font-size: 11px; color: var(--ink3); margin-left: 6px; font-variant-numeric: tabular-nums; }
.record-phone { font-size: 15px; font-weight: 700; color: var(--ink); }
.record-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }
.record-time { font-size: 11px; color: var(--ink3); white-space: nowrap; }
.record-price {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  background: var(--surface-3);
  border-radius: 9px;
  padding: 3px 10px;
  font-variant-numeric: tabular-nums;
}
/* me.html 列表行右侧箭头 */
.chevron { color: #c9cfd8; width: 16px; height: 16px; flex-shrink: 0; margin-left: 4px; }

.panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.form-panel .btn-block { margin-top: 8px; }

.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 16px; }
.pager-btn {
  height: 36px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
}
.pager-btn.disabled { color: #A8A59A; background: var(--card-2); }
.pager-info { font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- 居中弹窗 */
body.modal-open { overflow: hidden; }
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(20, 24, 31, .55);
  display: flex;
  padding: 20px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: mask-in .18s ease;
}
.modal-mask.is-closing { animation: mask-out .16s ease forwards; }
.modal-box {
  position: relative;
  width: 100%;
  max-width: 260px;
  margin: auto;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(20, 24, 31, .28);
  padding: 14px 14px 12px;
  text-align: left;
  animation: modal-in .26s cubic-bezier(.34, 1.4, .64, 1);
}
.modal-mask.is-closing .modal-box { animation: modal-out .16s ease forwards; }
@keyframes mask-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes mask-out { to { opacity: 0; } }
@keyframes modal-in {
  from { opacity: 0; transform: scale(.94) translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes modal-out {
  to { opacity: 0; transform: translateY(12px) scale(.97); }
}
.modal-close {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  color: var(--ink3);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:active { color: var(--ink); }
.modal-title { font-size: 18px; font-weight: 800; padding-left: 32px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.title-country { font-size: 14px; font-weight: 700; color: var(--ink2); }
.modal-sub { font-size: 12px; color: var(--ink2); margin-top: 2px; padding-left: 24px; text-align: left; }
.buy-country { font-weight: 700; color: var(--ink); }
.order-no-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 10px;
  background: var(--surface-3);
  border-radius: 10px;
}
.order-no-label { font-size: 16px; font-weight: 700; color: var(--ink); flex-shrink: 0; }
.order-country { font-size: 16px; font-weight: 800; color: var(--ink); flex-shrink: 0; }
.order-no-val { font-size: 16px; font-weight: 400; color: var(--ink2); font-variant-numeric: tabular-nums; flex: 1; min-width: 0; letter-spacing: .5px; }
.modal-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }

/* 购买弹窗：数量 stepper 与合计 */
.buy-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 0 16px;
}
.buy-qty-label { font-size: 18px; font-weight: 700; color: var(--ink); }
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
}
.qty-stepper button {
  width: 42px;
  height: 42px;
  border: none;
  background: var(--surface-3);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.qty-stepper button:active { background: #E8E6DC; }
.qty-stepper button:disabled { color: #6B6557; background: var(--card-3); cursor: not-allowed; }
.qty-stepper input {
  width: 52px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  background: var(--card);
  -moz-appearance: textfield;
  appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.buy-divider { height: 1px; background: var(--line); margin: 14px 0; }

.buy-total-box { margin-top: 2px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.buy-total-line { display: flex; align-items: baseline; gap: 8px; }
.buy-total-label { font-size: 14px; color: var(--ink2); font-weight: 600; }
.buy-total-num {
  font-size: 30px;
  font-weight: 800;
  color: var(--brand-ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.5px;
  line-height: 1.1;
}
.buy-balance { font-size: 12px; color: var(--ink3); }

.modal-btns { margin-top: 16px; align-items: center; }
.modal-btns .btn-primary { height: 46px; font-size: 16px; border-radius: 12px; width: 100%; padding: 0 20px; }
.buy-error {
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  margin-top: 12px;
  line-height: 1.6;
}
.buy-recharge-link {
  display: block;
  height: 44px;
  line-height: 44px;
  text-align: center;
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.buy-recharge-link:active { opacity: .7; }
.buy-hint { font-size: 12px; color: var(--ink3); text-align: center; margin-top: 12px; }

/* 使用教程板块 */
.guide-panel .me-title { font-size: 14px; }

/* 免责声明 */
.disclaimer {
  margin: 18px 0 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}
.disclaimer-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.disclaimer p {
  font-size: 12px;
  line-height: 1.75;
  color: var(--ink3);
}
.disclaimer p + p { margin-top: 6px; }

/* ---------------------------------------------------------------- Toast */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  padding: 10px 20px;
  border-radius: 20px;
  background: rgba(20, 24, 31, .92);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  z-index: 300;
  box-shadow: 0 8px 24px rgba(20, 24, 31, .24);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .shell { max-width: 100%; box-shadow: none; }
}
