/* ==========================================================================
   号屿 HAOYU · App 模式（登录后）
   白底、卡片、底部导航 —— 只作用于 .app-root 内部，不影响营销站
   ========================================================================== */

.app-root {
  --a-bg: #f4f5f7;
  --a-card: #ffffff;
  --a-soft: #f7f8fa;
  --a-line: #ebedf1;
  --a-line-2: #f2f4f7;
  --a-ink: #12161f;
  --a-ink-2: #59616f;
  --a-ink-3: #9aa1af;
  --a-accent: #c4442a;
  --a-accent-2: #a6341d;
  --a-accent-soft: #fdf1ed;
  --a-green: #0f7a58;
  --a-green-soft: #eaf6f1;
  --a-amber: #a9741b;
  --a-radius: 14px;

  min-height: 100vh;
  min-height: 100dvh;
  background: var(--a-bg);
  color: var(--a-ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
}

body.app-mode {
  background: #e9ebef;
}

body.app-mode::before {
  display: none;
}

/* 桌面端把 App 收进手机宽度，居中显示 */
.app-frame {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--a-bg);
  padding-bottom: calc(66px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

.app-frame.is-detail {
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

@media (min-width: 600px) {
  .app-frame {
    box-shadow: 0 0 0 1px rgba(18, 22, 31, 0.05), 0 24px 60px -24px rgba(18, 22, 31, 0.28);
  }
}

/* ---------- 顶部栏 ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--a-line-2);
}

.app-id {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.app-logo {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--a-ink);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}

.app-id b {
  display: block;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.app-id small {
  display: block;
  font-size: 11px;
  color: var(--a-ink-3);
  margin-top: -1px;
}

.app-balance {
  margin-left: auto;
  flex: none;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--a-accent-soft);
  color: var(--a-accent);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  line-height: 32px;
  transition: background 0.16s ease;
}

.app-balance:active {
  background: #fbe4dd;
}

.app-balance span {
  font-size: 12px;
  font-weight: 600;
}

.app-hbtn {
  margin-left: auto;
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--a-line);
  border-radius: 10px;
  background: #fff;
  color: var(--a-ink-2);
  cursor: pointer;
}

/* ---------- 页面容器 ---------- */
.app-page {
  padding: 14px 14px 20px;
}

.app-page.flush {
  padding: 0 0 20px;
}

.app-sec {
  margin-top: 18px;
}

.app-sec:first-child {
  margin-top: 0;
}

.app-sec-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 2px;
}

.app-sec-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.app-sec-head .a-link {
  margin-left: auto;
  font-size: 12px;
  color: var(--a-ink-3);
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
}

.app-sec-head .a-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--a-ink-3);
  font-variant-numeric: tabular-nums;
}

/* ---------- 搜索框 ---------- */
.a-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 13px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--a-line);
  color: var(--a-ink-3);
}

.a-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--a-ink);
}

.a-search input::placeholder {
  color: var(--a-ink-3);
}

.a-search .a-clear {
  flex: none;
  border: 0;
  background: none;
  padding: 2px;
  color: var(--a-ink-3);
  cursor: pointer;
  line-height: 0;
}

/* ---------- 应用九宫格（只作用于 App 模式，别泄漏到营销站） ---------- */
.app-root .svc-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: min-content;
  gap: 6px;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius);
}

.svc-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  width: 100%;
  min-height: 84px;
  padding: 10px 2px 8px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease;
}

/* 标签必须 flex:none，否则在 flex 列里会被压缩成 0 高（截图里"只有图标没有名字"就是这个原因） */
.svc-cell .svc-label {
  flex: none;
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  color: var(--a-ink-2);
  line-height: 1.25;
  text-align: center;
}

/* 每个应用底下标一个「¥x.xx 起」，一眼看到最便宜多少 */
.svc-cell .svc-price {
  flex: none;
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
  line-height: 1.2;
  color: var(--a-accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.svc-cell .svc-icon,
.svc-cell .svc-fallback {
  flex: none;
}

.svc-cell.on {
  background: var(--a-accent-soft);
}

.svc-cell.on .svc-label {
  color: var(--a-accent);
  font-weight: 650;
}

.svc-cell:active {
  background: var(--a-line-2);
}

.svc-cell.on:active {
  background: #fbe4dd;
}

/* ---------- 国家横滑 ---------- */
.cty-scroll {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.cty-scroll::-webkit-scrollbar {
  display: none;
}

.cty-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 11px 0 9px;
  border: 1px solid var(--a-line);
  border-radius: 999px;
  background: #fff;
  color: var(--a-ink-2);
  font-family: inherit;
  font-size: 12.5px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cty-chip.on {
  position: relative;
  overflow: hidden;
  border-color: var(--a-accent);
  background: var(--a-accent-soft);
  color: var(--a-accent);
  font-weight: 650;
}

/* 选中的胶囊：一道光从左扫到右，隔一会儿再来一次 */
.cty-chip.on::after {
  content: '';
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: -70%;
  width: 55%;
  pointer-events: none;
  background: linear-gradient(100deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.85) 45%,
    rgba(255, 255, 255, 0.95) 55%,
    rgba(255, 255, 255, 0) 100%);
  transform: skewX(-20deg);
  animation: cty-shine 2.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes cty-shine {
  0%   { left: -70%; }
  45%  { left: 130%; }
  100% { left: 130%; }
}

@media (prefers-reduced-motion: reduce) {
  .cty-chip.on::after {
    animation: none;
    opacity: 0;
  }
}

.cty-chip .flag {
  border-radius: 50%;
}

.cty-chip.more {
  color: var(--a-ink-3);
  padding: 0 12px;
}

/* ---------- 渠道切换（国际 / 国内） ---------- */
.ch-tabs {
  display: flex;
  gap: 6px;
  margin: 10px 0 2px;
  padding: 4px;
  border-radius: 12px;
  background: #e9ebef;
}

.ch-tab {
  flex: 1;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--a-ink-2);
  font-family: inherit;
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.ch-tab.on {
  background: #fff;
  color: var(--a-ink);
  font-weight: 650;
  box-shadow: 0 1px 3px rgba(18, 22, 31, 0.1);
}

/* ---------- 国内通道 ---------- */
.dm-tip {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0 2px 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: #fff8ec;
  border: 1px solid #f4e3c4;
  color: #8a6320;
  font-size: 11.5px;
  line-height: 1.65;
}

.dm-tip svg {
  flex: none;
  margin-top: 2px;
}

.dm-ops {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dm-op {
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--a-line);
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--a-ink-2);
  cursor: pointer;
  transition: all 0.15s ease;
}

.dm-op.on {
  border-color: var(--a-accent);
  background: var(--a-accent-soft);
  color: var(--a-accent);
  font-weight: 650;
}

/* 国内取号表单：关键词 / 卡类型 / 省份 */
.dm-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px 14px 16px;
}

.dm-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.dm-field > label {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--a-ink-2);
}

/* 使用三步 */
.dm-steps {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px dashed var(--a-line);
  border-radius: 10px;
  background: #fff;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--a-ink-3);
}

.dm-steps b {
  font-size: 12px;
  color: var(--a-ink-2);
  margin-bottom: 1px;
}

/* ---------- 排序条（全部国家时出现） ---------- */
.sort-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin: -2px 0 10px;
  padding: 2px 2px 3px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.sort-row::-webkit-scrollbar {
  display: none;
}

.sort-chip {
  flex: none;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--a-line);
  border-radius: 999px;
  background: #fff;
  color: var(--a-ink-2);
  font-family: inherit;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sort-chip.on {
  border-color: var(--a-accent);
  background: var(--a-accent-soft);
  color: var(--a-accent);
  font-weight: 650;
}

/* ---------- 线路列表 ---------- */
.offer-list {
  background: #fff;
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius);
  overflow: hidden;
}

.offer-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 13px;
  border-bottom: 1px solid var(--a-line-2);
}

.offer-row:last-child {
  border-bottom: 0;
}

.offer-row.is-out {
  opacity: 0.45;
}

.offer-main {
  min-width: 0;
  flex: 1;
}

.offer-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--a-ink);
}

.offer-name .badge {
  flex: none;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--a-accent-soft);
  color: var(--a-accent);
  line-height: 1.5;
}

.offer-meta {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--a-ink-3);
  font-variant-numeric: tabular-nums;
}

.offer-price {
  flex: none;
  font-size: 17px;
  font-weight: 700;
  color: var(--a-accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.offer-price em {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  margin-right: 1px;
}

.offer-buy {
  flex: none;
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--a-accent);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.offer-buy:disabled {
  background: #d9dce2;
  color: #fff;
  cursor: not-allowed;
}

.offer-buy:active:not(:disabled) {
  background: var(--a-accent-2);
}

/* ---------- 通用卡片 / 列表 ---------- */
.a-card {
  background: #fff;
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius);
  overflow: hidden;
}

.a-list {
  background: #fff;
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius);
  overflow: hidden;
}

.a-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 14px 14px;
  border: 0;
  border-bottom: 1px solid var(--a-line-2);
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: var(--a-ink);
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

.a-row:last-child {
  border-bottom: 0;
}

.a-row:active {
  background: var(--a-soft);
}

.a-row .a-row-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--a-soft);
  color: var(--a-ink-2);
}

.a-row .a-row-main {
  flex: 1;
  min-width: 0;
}

.a-row .a-row-main b {
  display: block;
  font-weight: 550;
  font-size: 14px;
}

.a-row .a-row-main small {
  display: block;
  font-size: 11.5px;
  color: var(--a-ink-3);
  margin-top: 1px;
}

.a-row .a-row-extra {
  flex: none;
  font-size: 12.5px;
  color: var(--a-ink-3);
  font-variant-numeric: tabular-nums;
}

.a-row .chev {
  flex: none;
  color: #c8ccd5;
}

.a-row.danger {
  color: var(--a-accent);
}

.a-row.danger .a-row-ico {
  background: var(--a-accent-soft);
  color: var(--a-accent);
}

/* ---------- 按钮 ---------- */
.a-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}

.a-btn.block {
  display: flex;
  width: 100%;
}

.a-btn.primary {
  background: var(--a-accent);
  color: #fff;
}

.a-btn.primary:active:not(:disabled) {
  background: var(--a-accent-2);
}

.a-btn.primary:disabled {
  background: #e2b7ad;
  cursor: not-allowed;
}

.a-btn.ghost {
  background: #fff;
  border-color: var(--a-line);
  color: var(--a-ink);
}

.a-btn.ghost:active {
  background: var(--a-soft);
}

.a-btn.sm {
  height: 34px;
  padding: 0 13px;
  font-size: 13px;
  border-radius: 9px;
}

.a-btn.danger {
  background: #fff;
  border-color: #f0cdc5;
  color: var(--a-accent);
}

/* 二次确认小弹层 */
.a-sheet-mini { padding: 18px 18px 20px; }
.a-confirm-title {
  margin: 6px 0 4px;
  font-size: 16px;
  font-weight: 650;
  text-align: center;
}
.a-confirm-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.a-confirm-actions .a-btn { flex: 1; }

/* ---------- 底部弹层 ---------- */
.a-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(11, 15, 22, 0.44);
  animation: a-mask-in 0.18s ease;
}

@keyframes a-mask-in {
  from { opacity: 0; }
}

.a-sheet {
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 6px 16px calc(18px + env(safe-area-inset-bottom));
  background: #fff;
  border-radius: 18px 18px 0 0;
  animation: a-sheet-up 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes a-sheet-up {
  from { transform: translateY(24px); opacity: 0.6; }
}

.a-sheet-grip {
  width: 36px;
  height: 4px;
  margin: 6px auto 10px;
  border-radius: 999px;
  background: #e3e6ec;
}

.a-sheet-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0 12px;
}

.a-sheet-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
}

.a-sheet-head .a-x {
  margin-left: auto;
  border: 0;
  background: none;
  padding: 4px;
  line-height: 0;
  color: var(--a-ink-3);
  cursor: pointer;
}

/* ---------- 表单 ---------- */
.a-field {
  margin-bottom: 12px;
}

.a-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  color: var(--a-ink-2);
  font-weight: 550;
}

.a-input {
  width: 100%;
  box-sizing: border-box;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--a-line);
  border-radius: 11px;
  background: #fff;
  font-family: inherit;
  font-size: 15px;
  color: var(--a-ink);
  outline: 0;
}

.a-input:focus {
  border-color: var(--a-accent);
}

.a-input.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.a-hint {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--a-ink-3);
  line-height: 1.6;
}

/* ---------- 金额选择 ---------- */
.a-amounts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.a-amount {
  height: 46px;
  border: 1px solid var(--a-line);
  border-radius: 11px;
  background: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--a-ink);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}

.a-amount.on {
  border-color: var(--a-accent);
  background: var(--a-accent-soft);
  color: var(--a-accent);
}

/* ---------- 确认摘要 ---------- */
.a-summary {
  padding: 2px 0 4px;
}

.a-summary-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0;
  font-size: 13.5px;
  color: var(--a-ink-2);
}

.a-summary-row b {
  margin-left: auto;
  color: var(--a-ink);
  font-weight: 600;
  text-align: right;
}

.a-summary-total {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px dashed var(--a-line);
  color: var(--a-ink-2);
  font-size: 13.5px;
}

.a-summary-total strong {
  margin-left: auto;
  font-size: 24px;
  font-weight: 700;
  color: var(--a-accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.a-tip {
  margin: 12px 0 0;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--a-ink-3);
  text-align: center;
}

/* ---------- 底部导航 ---------- */
.app-tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  max-width: 480px;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-top: 1px solid var(--a-line);
}

.app-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 7px 0 6px;
  color: #9aa1af;
  text-decoration: none;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  -webkit-tap-highlight-color: transparent;
}

.app-tab .app-tab-ico {
  position: relative;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
}

.app-tab.on {
  color: var(--a-accent);
  font-weight: 650;
}

.app-tab.on .app-tab-ico::after {
  content: '';
  position: absolute;
  inset: -3px -7px;
  border-radius: 9px;
  background: var(--a-accent-soft);
  z-index: -1;
}

.app-tab:active {
  opacity: 0.65;
}

/* ---------- 我的：资料卡 ---------- */
.a-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius);
}

.a-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(140deg, #2b3545, #12161f);
  color: #fff;
  font-size: 19px;
  font-weight: 600;
  font-family: var(--font-serif);
  overflow: hidden;
}

.a-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.a-profile-main {
  min-width: 0;
  flex: 1;
}

.a-profile-main b {
  display: block;
  font-size: 15.5px;
  font-weight: 650;
}

.a-profile-main small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--a-ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.a-wallet-card {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: var(--a-radius);
  background: linear-gradient(135deg, #1b2230 0%, #12161f 100%);
  color: #fff;
  overflow: hidden;
  position: relative;
}

.a-wallet-card::after {
  content: '';
  position: absolute;
  right: -30px;
  top: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(196, 68, 42, 0.28);
  filter: blur(6px);
}

.a-wallet-main {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}

.a-wallet-main small {
  display: block;
  font-size: 11.5px;
  color: #a9b1c0;
  letter-spacing: 0.04em;
}

.a-wallet-main strong {
  display: block;
  margin-top: 2px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.a-wallet-main strong em {
  font-style: normal;
  font-size: 15px;
  font-weight: 600;
  margin-right: 2px;
  color: #e8d6d1;
}

.a-wallet-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
}

.a-wallet-actions .a-btn {
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 9px;
}

.a-wallet-actions .a-btn.primary {
  background: #fff;
  color: #12161f;
}

.a-wallet-actions .a-btn.ghost {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* 四个快捷入口 */
.a-quick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.a-quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 14px 4px 12px;
  border: 1px solid var(--a-line);
  border-radius: 12px;
  background: #fff;
  font-family: inherit;
  font-size: 11.5px;
  color: var(--a-ink-2);
  cursor: pointer;
  text-decoration: none;
  position: relative;
}

/* 客服回了新消息时的小红点 */
.quick-badge {
  position: absolute;
  top: 7px;
  right: 9px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 8px;
  background: #c0392b;
  color: #fff;
  font-size: 9.5px;
  font-style: normal;
  line-height: 15px;
  text-align: center;
}

.a-quick-item:active {
  background: var(--a-soft);
}

.a-quick-item .ico {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--a-soft);
  color: var(--a-ink);
}

.a-quick-item .ico.accent {
  background: var(--a-accent-soft);
  color: var(--a-accent);
}

/* ---------- 订单卡 ---------- */
.a-order {
  display: block;
  padding: 13px 14px;
  border-bottom: 1px solid var(--a-line-2);
  text-decoration: none;
  color: inherit;
}

.a-order:last-child {
  border-bottom: 0;
}

.a-order:active {
  background: var(--a-soft);
}

.a-order-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.a-order-app {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1;
  font-size: 13.5px;
  font-weight: 600;
}

.a-order-app span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.a-order-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  font-size: 11.5px;
  color: var(--a-ink-3);
  font-variant-numeric: tabular-nums;
}

.a-order-bottom .phone {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--a-ink-2);
}

.a-order-bottom .price {
  margin-left: auto;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--a-ink);
}

/* 状态标签 */
.a-status {
  flex: none;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  line-height: 1.5;
  background: var(--a-soft);
  color: var(--a-ink-2);
}

.a-status.PENDING,
.a-status.PROVISIONING {
  background: #eef4fd;
  color: #2a5fa8;
}

.a-status.RECEIVED {
  background: var(--a-accent-soft);
  color: var(--a-accent);
}

.a-status.FINISHED {
  background: var(--a-green-soft);
  color: var(--a-green);
}

.a-status.CANCELED,
.a-status.TIMEOUT,
.a-status.FAILED,
.a-status.BANNED {
  background: #f3f4f6;
  color: #8b919d;
}

/* ---------- 订单详情 ---------- */
.a-hero {
  padding: 18px 16px 20px;
  background: #fff;
  border-bottom: 1px solid var(--a-line);
}

.a-hero-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--a-ink-2);
}

.a-hero-status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--a-accent);
  box-shadow: 0 0 0 3px var(--a-accent-soft);
}

.a-hero-status .dot.busy {
  background: #2a5fa8;
  box-shadow: 0 0 0 3px #eef4fd;
  animation: a-pulse 1.4s ease-in-out infinite;
}

.a-hero-status .dot.done {
  background: var(--a-green);
  box-shadow: 0 0 0 3px var(--a-green-soft);
}

@keyframes a-pulse {
  50% { opacity: 0.35; }
}

.a-phone-big {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.a-phone-big .num {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--a-ink);
  line-height: 1.2;
  word-break: break-all;
}

.a-phone-big .copy {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--a-line);
  border-radius: 9px;
  background: #fff;
  color: var(--a-ink-2);
  cursor: pointer;
}

.a-hero-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--a-ink-3);
  font-variant-numeric: tabular-nums;
}

.a-sms {
  margin: 14px 14px 0;
  padding: 16px;
  border-radius: var(--a-radius);
  background: #fff;
  border: 1px solid var(--a-line);
}

.a-sms-wait {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 0;
  color: var(--a-ink-3);
  font-size: 12.5px;
  text-align: center;
}

.a-sms-wait .dots {
  display: flex;
  gap: 5px;
}

.a-sms-wait .dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c9ced8;
  animation: a-bounce 1.1s ease-in-out infinite;
}

.a-sms-wait .dots i:nth-child(2) { animation-delay: 0.14s; }
.a-sms-wait .dots i:nth-child(3) { animation-delay: 0.28s; }

@keyframes a-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.55; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.a-sms-label {
  font-size: 11.5px;
  color: var(--a-ink-3);
  letter-spacing: 0.04em;
}

.a-sms-code {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--a-accent);
  line-height: 1.25;
  word-break: break-all;
}

.a-sms-text {
  margin-top: 8px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--a-ink-2);
  word-break: break-word;
}

.a-sms-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.a-sms-actions .a-btn {
  flex: 1;
}

.a-kv {
  padding: 2px 0;
}

.a-kv-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--a-line-2);
  font-size: 13px;
}

.a-kv-row:last-child {
  border-bottom: 0;
}

.a-kv-row .k {
  flex: none;
  color: var(--a-ink-3);
  font-size: 12.5px;
}

.a-kv-row .v {
  margin-left: auto;
  text-align: right;
  color: var(--a-ink);
  word-break: break-all;
}

.a-kv-row .v.mono {
  font-family: var(--font-mono);
  font-size: 12px;
}

.a-actions-bar {
  display: flex;
  gap: 9px;
  margin: 16px 14px 0;
}

.a-actions-bar .a-btn {
  flex: 1;
}

/* ---------- 空态 / 骨架 ---------- */
.a-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 20px;
  color: var(--a-ink-3);
  font-size: 13px;
  text-align: center;
}

.a-empty .ico {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--a-soft);
  color: #c2c8d2;
}

.a-skel {
  height: 46px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: linear-gradient(100deg, #eef0f4 25%, #f6f7f9 37%, #eef0f4 63%);
  background-size: 400% 100%;
  animation: a-shimmer 1.3s ease infinite;
}

@keyframes a-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* ---------- 分段控件 ---------- */
.a-seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  background: #eceef2;
}

.a-seg button {
  flex: 1;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--a-ink-2);
  cursor: pointer;
  transition: background 0.15s ease;
}

.a-seg button.on {
  background: #fff;
  color: var(--a-ink);
  font-weight: 650;
  box-shadow: 0 1px 2px rgba(18, 22, 31, 0.08);
}

/* ---------- 占位板块 ---------- */
.a-soon {
  padding: 26px 18px 22px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius);
}

.a-soon .ico {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--a-accent-soft);
  color: var(--a-accent);
  margin-bottom: 12px;
}

.a-soon h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
}

.a-soon p {
  margin: 8px auto 0;
  max-width: 300px;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--a-ink-3);
}

.a-soon-tag {
  display: inline-block;
  margin-top: 14px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--a-soft);
  color: var(--a-ink-3);
  font-size: 11.5px;
}

.a-teaser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.a-teaser-item {
  padding: 14px;
  border-radius: 12px;
  border: 1px dashed var(--a-line);
  background: rgba(255, 255, 255, 0.6);
  color: var(--a-ink-3);
  font-size: 12px;
  line-height: 1.6;
  min-height: 78px;
}

.a-teaser-item b {
  display: block;
  color: var(--a-ink-2);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 3px;
}

/* toast 在 App 里挪到底部导航上方 */
.app-root .toast-wrap {
  position: fixed;
  top: auto;
  right: auto;
  left: 50%;
  bottom: calc(78px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 420px;
  align-items: center;
}

.app-root .toast {
  min-width: 0;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 12px 30px -12px rgba(18, 22, 31, 0.5);
}

.app-frame.is-detail .toast-wrap,
.app-root .toast-wrap.no-tab {
  bottom: calc(22px + env(safe-area-inset-bottom));
}

/* ---------- 在线客服（聊天窗口） ---------- */
.chat-sheet {
  display: flex;
  flex-direction: column;
  padding: 0;
  max-height: 88vh;
  overflow: hidden;
}

.chat-sheet .a-sheet-grip {
  margin: 6px auto 2px;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px 11px;
  border-bottom: 1px solid var(--a-line-2);
}

.chat-ava {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--a-accent);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
}

.chat-ava.img {
  background: var(--a-soft);
}

.chat-ava img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-head-main {
  flex: 1;
  min-width: 0;
}

.chat-head-main b {
  display: block;
  font-size: 14px;
  font-weight: 650;
}

.chat-head-main small {
  display: block;
  margin-top: 1px;
  font-size: 10.5px;
  color: var(--a-ink-3);
}

.dot-online {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--a-green);
  vertical-align: 1px;
}

.chat-head .a-x {
  flex: none;
  border: 0;
  background: none;
  padding: 4px;
  line-height: 0;
  color: var(--a-ink-3);
  cursor: pointer;
}

.chat-body {
  flex: 1;
  min-height: 170px;
  max-height: 46vh;
  overflow-y: auto;
  padding: 12px 14px 6px;
  background: var(--a-soft);
  -webkit-overflow-scrolling: touch;
}

.chat-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 40px 0;
  font-size: 12px;
  color: var(--a-ink-3);
}

.chat-empty {
  padding: 34px 0;
  text-align: center;
  font-size: 12px;
  color: var(--a-ink-3);
}

.chat-msg {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-bottom: 8px;
}

.chat-msg.me {
  flex-direction: row-reverse;
}

.chat-face {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;
  color: var(--a-ink-2);
  font-size: 11px;
  font-weight: 650;
  box-shadow: 0 1px 2px rgba(18, 22, 31, 0.06);
}

.chat-msg.me .chat-face {
  background: var(--a-accent);
  color: #fff;
  box-shadow: none;
}

.chat-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 76%;
}

.chat-msg.me .chat-main {
  align-items: flex-end;
}

.chat-msg .bubble {
  padding: 7px 10px;
  border-radius: 11px;
  font-size: 12.5px;
  line-height: 1.55;
  white-space: pre-line;
  word-break: break-word;
}

.chat-msg.cs .bubble {
  background: #fff;
  color: var(--a-ink);
  border-top-left-radius: 3px;
  box-shadow: 0 1px 2px rgba(18, 22, 31, 0.05);
}

.chat-msg.me .bubble {
  background: var(--a-accent);
  color: #fff;
  border-top-right-radius: 3px;
}

.chat-time {
  margin-top: 3px;
  font-size: 10px;
  line-height: 1;
  color: var(--a-ink-3);
}

.chat-quick {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 14px 0;
  scrollbar-width: none;
}

.chat-quick::-webkit-scrollbar {
  display: none;
}

.chat-input {
  display: flex;
  gap: 7px;
  margin-top: 8px;
  padding: 8px 14px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--a-line-2);
  background: #fff;
}

.chat-input input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--a-line);
  border-radius: 9px;
  background: #fff;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--a-ink);
  outline: 0;
}

.chat-input input:focus {
  border-color: var(--a-accent);
}

.chat-input button {
  flex: none;
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: var(--a-accent);
  color: #fff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.chat-input button:disabled {
  background: #e2b7ad;
  cursor: not-allowed;
}



/* ---------- 产品渠道（卡密商品） ---------- */
.pd-cats {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pd-cats::-webkit-scrollbar { display: none; }

.pd-cat {
  flex: none;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--a-line);
  border-radius: 999px;
  background: #fff;
  font-family: inherit;
  font-size: 12.5px;
  color: var(--a-ink-2);
  cursor: pointer;
  white-space: nowrap;
}

.pd-cat.on {
  border-color: var(--a-accent);
  background: var(--a-accent-soft);
  color: var(--a-accent);
  font-weight: 650;
}

.pd-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pd-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  background: #fff;
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius);
}

.pd-row.is-out { opacity: 0.55; }

.pd-thumb {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--a-paper-2, #f4f5f7);
  border: 1px solid var(--a-line);
}

.pd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pd-thumb.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b9bdc7;
}

.pd-main { flex: 1; min-width: 0; }

.pd-title {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  color: var(--a-ink);
  /* 标题最多两行，避免长标题把行撑爆 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pd-sub {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--a-ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pd-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--a-ink-3);
}

.pd-stock { color: #0e7a56; }
.pd-tag {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--a-paper-2, #f4f5f7);
  color: var(--a-ink-3);
}

.pd-right {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.pd-price {
  font-family: var(--a-mono, ui-monospace, Menlo, monospace);
  font-size: 16px;
  font-weight: 700;
  color: var(--a-accent);
  font-variant-numeric: tabular-nums;
}
.pd-price em { font-style: normal; font-size: 11px; margin-right: 1px; }

.pd-buy {
  height: 30px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: var(--a-accent);
  color: #fff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.pd-buy:disabled { background: #d8dbe1; cursor: default; }

/* 订单详情里的卡密行 */
.a-card-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--a-line);
  border-radius: 10px;
  background: var(--a-paper-2, #f7f8fa);
}
.a-card-line code {
  flex: 1;
  min-width: 0;
  font-family: var(--a-mono, ui-monospace, Menlo, monospace);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--a-ink);
  word-break: break-all;
}


/* ---------- 商品详情页 ---------- */
.pd-detail { padding-bottom: 92px; }

.pd-hero {
  height: 190px;
  border-radius: var(--a-radius);
  border: 1px solid var(--a-line);
  background: #fff;
  overflow: hidden;
  margin-bottom: 10px;
}

.pd-hero img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pd-hero-ph {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c3c7d0;
  background: var(--a-paper-2, #f6f7f9);
}

.pd-head { padding: 14px; }

.pd-dtitle {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--a-ink);
}

.pd-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.pd-badge {
  padding: 2px 8px;
  border: 1px solid #cfd9ea;
  border-radius: 999px;
  font-size: 11px;
  color: #4a6b9d;
  background: #f4f8ff;
}

.pd-badge.is-out {
  border-color: #f0cdc5;
  background: #fff5f3;
  color: #b4442f;
}

.pd-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 12px;
}

.pd-dprice {
  font-family: var(--a-mono, ui-monospace, Menlo, monospace);
  font-size: 24px;
  font-weight: 700;
  color: var(--a-accent);
  font-variant-numeric: tabular-nums;
}
.pd-dprice em { font-style: normal; font-size: 14px; margin-right: 1px; }

.pd-dnote { font-size: 11.5px; color: var(--a-ink-3); }

.pd-desc-card { margin-top: 10px; padding: 14px; }

.pd-sec-title {
  font-size: 13.5px;
  font-weight: 650;
  color: var(--a-ink);
  padding-bottom: 9px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--a-line);
}

/* 上游详情是富文本，带自己的内联样式，这里只兜住溢出和图片宽度 */
.pd-desc {
  font-size: 13px;
  line-height: 1.75;
  color: #56606e;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.pd-desc img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 8px;
  display: block;
  margin: 6px 0;
}

.pd-desc a { color: #2f6fec; word-break: break-all; }
.pd-desc p { margin: 0 0 8px; }
.pd-desc table { width: 100%; max-width: 100%; display: block; overflow-x: auto; }
.pd-desc * { max-width: 100%; }

.pd-desc-empty {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--a-ink-3);
}

.pd-buybar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 480px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-top: 1px solid var(--a-line);
}

.pd-buybar-left {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.pd-buybar-left small { font-size: 10.5px; color: var(--a-ink-3); }
.pd-buybar-left strong {
  font-family: var(--a-mono, ui-monospace, Menlo, monospace);
  font-size: 19px;
  color: var(--a-accent);
  font-variant-numeric: tabular-nums;
}

.pd-buybar-btn { flex: 1; height: 42px; }

/* ---------- 小屏微调 ---------- */
@media (max-width: 360px) {
  .app-page { padding: 12px 11px 18px; }
  .app-root .svc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .a-phone-big .num { font-size: 22px; }
  .a-sms-code { font-size: 29px; }
}

/* ---------- 公告条 + 公告弹窗 ---------- */
.an-wrap {
  margin: 10px 0 4px;
}

.an-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--a-line);
  border-radius: 10px;
  background: #fff;
  color: var(--a-ink-2);
  font-family: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.an-bar:active {
  background: var(--a-soft);
}

.an-bar.unread {
  border-color: #f2c4ba;
  background: #fdf1ed;
  color: var(--a-accent-2);
}

.an-ico {
  flex: none;
  display: grid;
  place-items: center;
  line-height: 0;
  color: var(--a-ink-3);
}

.an-bar.unread .an-ico {
  color: var(--a-accent);
}

.an-cap {
  flex: none;
  font-weight: 600;
}

/* 标题一行一行往下滚：当前那行淡入，切换时从上方落下来 */
.an-tick {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 18px;
  overflow: hidden;
}

.an-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 18px;
  line-height: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(-100%);
  transition: opacity 0.34s ease, transform 0.34s ease;
}

.an-line.on {
  opacity: 1;
  transform: translateY(0);
}

.an-arrow {
  flex: none;
  font-size: 14px;
  color: var(--a-ink-3);
}

.an-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(11, 15, 22, 0.46);
}

/* 变小窗：宽度限制在 340，方便以后放头像不挤 */
.an-pop {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 340px;
  max-height: 78vh;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(10, 15, 25, 0.26);
}

.an-pop-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 15px 15px 9px;
}

.an-pop-tag {
  flex: none;
  margin-top: 2px;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--a-accent-soft);
  color: var(--a-accent-2);
  font-size: 10px;
  font-weight: 600;
}

.an-pop-head b {
  flex: 1;
  font-size: 15px;
  line-height: 1.45;
}

.an-x {
  flex: none;
  border: 0;
  background: none;
  padding: 2px;
  color: var(--a-ink-3);
  line-height: 0;
  cursor: pointer;
}

.an-pop-body {
  flex: 1;
  overflow-y: auto;
  padding: 2px 15px 14px;
  /* 字号 / 行高 / 段距统一由 app.css 的 .an-rich 决定 */
  color: var(--a-ink);
  -webkit-overflow-scrolling: touch;
}

.an-pop-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--a-line-2);
}

.an-pop-time {
  flex: 1;
  font-size: 11px;
  color: var(--a-ink-3);
}

.an-more {
  border: 0;
  background: none;
  padding: 0;
  font-family: inherit;
  font-size: 12px;
  color: var(--a-accent);
  cursor: pointer;
}

.an-ok {
  height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 9px;
  background: var(--a-accent);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.an-sheet {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(10, 15, 25, 0.26);
}

.an-sheet-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--a-line-2);
}

.an-sheet-head h3 {
  flex: 1;
  font-size: 15px;
}

.an-readall {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--a-line);
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 11.5px;
  color: var(--a-ink-2);
  cursor: pointer;
}

.an-sheet-body {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

.an-item {
  border-bottom: 1px solid var(--a-line-2);
}

.an-item:last-child {
  border-bottom: 0;
}

.an-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 15px;
  border: 0;
  background: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.an-new-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--a-accent);
}

.an-item-title {
  flex: 1;
  font-size: 13.5px;
  color: var(--a-ink);
}

.an-item-date {
  flex: none;
  font-size: 11px;
  color: var(--a-ink-3);
}

.an-item-body {
  padding: 0 15px 14px;
  color: var(--a-ink-2);
}

/* 公告正文排版统一在 app.css 的 .an-rich 里（编辑器、预览、前台共用一套），
   这里不再重复定义字号和间距，否则三处又会各长一个样。 */

/* ---------- 未登录：公告条替身 / 登录引导 ---------- */
.an-bar.guest {
  border-style: dashed;
  border-color: #f0c9bf;
  background: #fdf6f3;
  color: var(--a-accent-2);
}

.an-bar.guest .an-ico {
  color: var(--a-accent);
}

.an-bar.guest .an-line {
  font-weight: 600;
}

/* 整页占位（直接访问 #/app/me、#/app/orders 时） */
.gate-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 70vh;
  padding: 40px 30px;
  text-align: center;
}

.gate-page h3 {
  margin: 4px 0 0;
  font-size: 17px;
  color: var(--a-ink);
}

.gate-page p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--a-ink-3);
}

.gate-page .a-btn {
  width: 100%;
  max-width: 260px;
}

/* 弹层引导 */
.gate-mask {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 900;
}

/* 弹层挂在根组件下，不在 .app-root 里面，取不到 --a-* 变量，这里补一套 */
.gate-mask,
.gate-page {
  --a-accent: #c4442a;
  --a-accent-2: #a6341d;
  --a-accent-soft: #fdf1ed;
  --a-ink: #12161f;
  --a-ink-2: #59616f;
  --a-ink-3: #9aa1af;
  --a-line: #ebedf1;
  --a-soft: #f7f8fa;
  font-family: var(--font-sans);
}

.gate-box {
  width: 100%;
  max-width: 320px;
  padding: 26px 22px 16px;
  border-radius: 18px;
  background: #fff;
  text-align: center;
  box-shadow: 0 18px 50px rgba(16, 27, 45, .18);
}

.gate-ico {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--a-accent-soft);
  color: var(--a-accent);
}

.gate-box h3 {
  margin: 0 0 8px;
  font-size: 17px;
  color: var(--a-ink);
}

.gate-box p {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--a-ink-3);
}

.gate-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gate-cancel {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  border: 0;
  background: none;
  color: var(--a-ink-3);
  font-family: inherit;
  font-size: 12.5px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

/* ---------- 活动与对接：开放 API / 邀请 ---------- */
.dev-hero {
  margin: 4px 0 16px;
  padding: 20px 18px;
  border-radius: 18px;
  background: linear-gradient(150deg, #1b2534 0%, #101b2d 62%, #2a1a16 100%);
  color: #f6f3ee;
}

.dev-hero-ico {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .12);
  color: #ffd9cf;
}

.dev-hero h2 {
  margin: 0 0 6px;
  font-size: 19px;
  letter-spacing: .01em;
}

.dev-hero p {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.75;
  color: rgba(246, 243, 238, .74);
}

.dev-hero-actions {
  display: flex;
  gap: 8px;
}

.dev-hero-actions .a-btn {
  height: 38px;
  font-size: 13.5px;
  padding: 0 16px;
}

.dev-hero-actions .a-btn.primary {
  background: #f6f3ee;
  color: #14202e;
}

.dev-hero-actions .a-btn.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, .22);
  color: #f6f3ee;
}

.dev-hero-meta {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  font-size: 11.5px;
  color: rgba(246, 243, 238, .52);
}

/* 邀请卡 */
.inv-card {
  padding: 16px 14px;
}

.inv-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inv-line small,
.inv-stats small {
  display: block;
  font-size: 11.5px;
  color: var(--a-ink-3);
}

.inv-code-sm {
  display: block;
  margin-top: 2px;
  font-size: 20px;
  letter-spacing: .14em;
  font-family: var(--font-mono);
}

.inv-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--a-line-2);
}

.inv-stats-3 {
  grid-template-columns: repeat(3, 1fr);
  margin: 12px 0 0;
  padding: 14px;
  border: 1px solid var(--a-line);
  border-radius: 14px;
  background: #fff;
}

.inv-stats b {
  display: block;
  margin-top: 2px;
  font-size: 16px;
}

.inv-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.inv-actions .a-btn {
  flex: 1;
  height: 38px;
  font-size: 13.5px;
}

/* 邀请明细页 */
.inv-hero {
  padding: 22px 18px;
  border-radius: 18px;
  background: linear-gradient(150deg, #fdf1ed 0%, #faf8f3 100%);
  border: 1px solid #f2ddd5;
  text-align: center;
}

.inv-hero small {
  font-size: 12px;
  color: var(--a-ink-3);
}

.inv-code {
  margin: 6px 0 14px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: .18em;
  font-family: var(--font-mono);
  color: var(--a-accent-2);
}

.inv-hero-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.inv-record {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--a-line-2);
}

.inv-record:last-child {
  border-bottom: 0;
}

.inv-record b {
  display: block;
  font-size: 13.5px;
  font-weight: 550;
}

.inv-record small {
  font-size: 11.5px;
  color: var(--a-ink-3);
}

.inv-amount {
  color: var(--a-green);
  font-size: 15px;
  flex: none;
}

/* API 说明卡 */
.dev-note {
  padding: 14px;
}

.dev-note-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--a-ink);
}

.dev-note ol {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--a-ink-2);
}

.dev-note code,
.dev-key-meta code,
.dev-secret code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--a-soft);
  color: var(--a-ink-2);
  word-break: break-all;
}

.dev-note-foot {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--a-line);
  font-size: 11.5px;
  color: var(--a-ink-3);
  word-break: break-all;
}

/* Key 列表 */
.dev-key {
  padding: 14px;
  border-bottom: 1px solid var(--a-line-2);
}

.dev-key:last-child {
  border-bottom: 0;
}

.dev-key.off {
  opacity: .6;
}

.dev-key-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dev-key-head b {
  font-size: 14px;
}

.dev-key-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--a-ink-3);
}

.dev-key-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.a-btn.ghost.danger {
  color: var(--a-accent);
  border-color: #f0d2c9;
}

/* 一次性 secret */
.dev-secret {
  margin: 6px 0 12px;
  padding: 12px;
  border: 1px dashed #f0c9bf;
  border-radius: 12px;
  background: #fdf6f3;
}

.dev-secret-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

.dev-secret-row small {
  flex: none;
  width: 46px;
  font-size: 11.5px;
  color: var(--a-ink-3);
}

.dev-secret-row code {
  flex: 1;
  min-width: 0;
}

/* 调用记录 */
.dev-log {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--a-line-2);
  font-size: 12px;
}

.dev-log:last-child {
  border-bottom: 0;
}

.dev-log-code {
  flex: none;
  width: 34px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 0;
  border-radius: 5px;
}

.dev-log-code.ok {
  background: var(--a-green-soft);
  color: var(--a-green);
}

.dev-log-code.bad {
  background: var(--a-accent-soft);
  color: var(--a-accent-2);
}

.dev-log-path {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--a-ink-2);
}

.dev-log-time {
  flex: none;
  font-size: 11px;
  color: var(--a-ink-3);
}

/* ---------- 我的 · 会员等级 ---------- */
.a-level {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--a-line);
  border-left: 3px solid var(--lv);
  border-radius: var(--a-radius);
  background: #fff;
  background: linear-gradient(120deg, #fff 0%, color-mix(in srgb, var(--lv) 7%, #fff) 100%);
}

.a-level-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #f4f5f7;
  background: color-mix(in srgb, var(--lv) 16%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lv) 24%, #fff);
}

.a-level-body {
  flex: 1;
  min-width: 0;
}

.a-level-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.a-level-row b {
  font-size: 14px;
  font-weight: 650;
  color: var(--a-ink);
}

.a-level-fold {
  padding: 1px 6px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--lv) 14%, #fff);
  color: var(--lv);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
}

.a-level-fold.plain {
  background: var(--a-soft);
  color: var(--a-ink-3);
  font-weight: 500;
}

.a-level-manual {
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--a-line);
  color: var(--a-ink-3);
  font-size: 10.5px;
}

.a-level-track {
  height: 4px;
  margin: 7px 0 5px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--lv) 12%, #f1f2f5);
  overflow: hidden;
}

.a-level-track i {
  display: block;
  height: 100%;
  border-radius: 3px;
  transition: width .5s ease;
}

.a-level-body small {
  display: block;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--a-ink-3);
}

/* 确认弹窗里的「会员价」标记与原价划线 */
.a-lv-flag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--a-accent-soft);
  color: var(--a-accent);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 600;
  vertical-align: 1px;
}

.a-summary-total s {
  margin-left: 7px;
  color: var(--a-ink-3);
  font-size: 12px;
  font-weight: 400;
}
