/* ==========================================================================
   KK选品雷达 · 下单系统
   设计语言与官网一致：深色 + 扫描绿 + 等宽编号 + 雷达意象
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #08090c;
  --ink-2: #0e1015;
  --ink-3: #14171e;
  --ink-4: #1b1f28;
  --rule: #232833;
  --rule-2: #2e3542;

  --fg: #f2f4f8;
  --fg-2: #a3abb9;
  --fg-3: #6c7484;

  --scan: #00e5a0;
  --scan-glow: rgba(0,229,160,.14);
  --amber: #ffb648;
  --danger: #ff5d5d;

  --maxw: 1180px;
  --gut: clamp(18px, 4vw, 40px);

  --e-out: cubic-bezier(.16,1,.3,1);
  --e-io: cubic-bezier(.65,0,.35,1);

  --font-display: "Space Grotesk", "Sora", ui-sans-serif, system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* overflow-x 必须挂 html：挂 body 会让 body 变独立滚动容器，
     导致 window.scrollY 恒为 0（官网踩过的坑，此处沿用修复） */
  overflow-x: hidden;
}

body {
  background: var(--ink);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  min-height: 100vh;
}

::selection { background: var(--scan); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font: inherit; }
img, svg { display: block; max-width: 100%; }

:focus-visible { outline: 2px solid var(--scan); outline-offset: 2px; border-radius: 2px; }
.hide { display: none !important; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--fg-3); }

/* ---------- 背景 ---------- */
.bg-fx { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 100% 50% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 100% 50% at 50% 0%, #000 30%, transparent 75%);
}
.bg-glow {
  position: absolute; top: -20vh; left: 50%;
  width: min(900px, 120vw); height: 50vh;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 0%, var(--scan-glow), transparent 68%);
  filter: blur(3px);
}

.shell { position: relative; z-index: 1; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(8,9,12,.86);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--rule);
}
.topbar-in {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--gut);
  height: 60px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { width: 30px; height: 30px; flex: 0 0 auto; }
.brand-mark svg { width: 30px; height: 30px; }
.brand-mark .ring { transform-origin: 12px 12px; animation: spin 8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.brand-text { display: flex; flex-direction: column; line-height: 1.12; }
.brand-name { font-family: var(--font-display); font-size: 14px; font-weight: 600; letter-spacing: .2px; }
.brand-sub {
  font-family: var(--font-mono); font-size: 9px; color: var(--fg-3);
  letter-spacing: 1.3px; text-transform: uppercase;
}

.topbar-right { display: flex; align-items: center; gap: 9px; }

.icon-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--rule); border-radius: 7px;
  background: var(--ink-3);
  color: var(--fg-2);
  transition: all .2s var(--e-out);
  flex: 0 0 auto;
  padding: 0;
}
.icon-btn:hover { border-color: var(--scan); color: var(--scan); }
.icon-btn svg { width: 16px; height: 16px; stroke-width: 1.8; }

.user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink-4); border: 1px solid var(--rule-2);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: var(--scan);
  overflow: hidden; flex: 0 0 auto;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 主区 ---------- */
.main {
  max-width: var(--maxw); margin: 0 auto;
  padding: 26px var(--gut) calc(100px + env(safe-area-inset-bottom));
}

.view { display: none; }
.view.active { display: block; animation: fadeUp .32s var(--e-out); }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-head { margin-bottom: 22px; }
.page-eyebrow {
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--scan);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 9px;
}
.page-eyebrow::after {
  content: ""; height: 1px; flex: 1; max-width: 46px;
  background: linear-gradient(to right, rgba(0,229,160,.5), transparent);
}
.page-title {
  font-family: var(--font-display);
  font-size: clamp(21px, 3.4vw, 28px);
  font-weight: 600; letter-spacing: -.02em; line-height: 1.25;
}
.page-desc { margin-top: 7px; font-size: 13.5px; color: var(--fg-2); max-width: 46em; }

/* ---------- 步骤条 ---------- */
.steps {
  display: flex; align-items: center; gap: 0;
  margin-bottom: 24px;
  border: 1px solid var(--rule); border-radius: 10px;
  overflow: hidden; background: var(--ink-2);
}
.step {
  flex: 1; display: flex; align-items: center; gap: 9px;
  padding: 12px 14px;
  border-right: 1px solid var(--rule);
  font-size: 12.5px; color: var(--fg-3);
  transition: all .3s var(--e-out);
  min-width: 0;
}
.step:last-child { border-right: 0; }
.step-num {
  font-family: var(--font-mono); font-size: 10px;
  width: 19px; height: 19px; border-radius: 5px;
  display: grid; place-items: center;
  background: var(--ink-4); color: var(--fg-3);
  flex: 0 0 auto;
  transition: all .3s var(--e-out);
}
.step-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step.on { color: var(--fg); background: rgba(0,229,160,.05); }
.step.on .step-num { background: var(--scan); color: var(--ink); font-weight: 700; }
.step.done { color: var(--fg-2); }
.step.done .step-num { background: rgba(0,229,160,.18); color: var(--scan); }

/* ---------- 平台切换 ---------- */
.plat-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-bottom: 16px;
}
.plat-tab {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 13px 15px;
  background: var(--ink-2); border: 1px solid var(--rule);
  border-radius: 9px;
  text-align: left;
  transition: all .25s var(--e-out);
  position: relative; overflow: hidden;
}
.plat-tab::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(to right, transparent, var(--scan), transparent);
  opacity: 0; transition: opacity .3s var(--e-out);
}
.plat-tab:hover { border-color: var(--rule-2); background: var(--ink-3); }
.plat-tab.on { border-color: rgba(0,229,160,.45); background: rgba(0,229,160,.06); }
.plat-tab.on::before { opacity: 1; }
.plat-name {
  font-family: var(--font-display); font-size: 14.5px; font-weight: 600;
  letter-spacing: -.01em;
}
.plat-meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-3); letter-spacing: .4px; }
.plat-tab.on .plat-meta { color: var(--scan); }

/* ---------- 服务卡 ---------- */
.plans { display: grid; gap: 10px; margin-bottom: 20px; }

.plan {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px; align-items: center;
  padding: 16px 18px;
  background: var(--ink-2); border: 1px solid var(--rule);
  border-radius: 10px;
  cursor: pointer;
  transition: all .25s var(--e-out);
  position: relative; overflow: hidden;
  text-align: left;
  width: 100%;
}
.plan::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--scan); opacity: 0;
  transition: opacity .25s var(--e-out);
}
.plan:hover { border-color: var(--rule-2); background: var(--ink-3); transform: translateY(-1px); }
.plan.on { border-color: rgba(0,229,160,.5); background: rgba(0,229,160,.055); }
.plan.on::before { opacity: 1; }

.plan-main { min-width: 0; }
.plan-name {
  font-family: var(--font-display); font-size: 15px; font-weight: 600;
  letter-spacing: -.01em; margin-bottom: 5px; line-height: 1.35;
}
.plan-desc { font-size: 12.5px; color: var(--fg-2); line-height: 1.55; margin-bottom: 8px; }
.plan-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ptag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .3px;
  padding: 2px 7px; border-radius: 4px;
  background: var(--ink-4); color: var(--fg-3);
  border: 1px solid var(--rule);
}
.ptag.hl { color: var(--scan); border-color: rgba(0,229,160,.25); background: rgba(0,229,160,.06); }

.plan-price { text-align: right; flex: 0 0 auto; }
.plan-price .num {
  font-family: var(--font-display); font-size: 21px; font-weight: 600;
  letter-spacing: -.03em; color: var(--scan);
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.plan-price .unit { font-family: var(--font-mono); font-size: 10px; color: var(--fg-3); }

/* ---------- 表单 ---------- */
.panel {
  background: var(--ink-2); border: 1px solid var(--rule);
  border-radius: 12px; padding: 18px;
  margin-bottom: 14px;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 15px; padding-bottom: 13px;
  border-bottom: 1px solid var(--rule);
}
.panel-title {
  font-family: var(--font-display); font-size: 14px; font-weight: 600;
  letter-spacing: -.01em;
}
.panel-hint { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-3); }

.field { margin-bottom: 15px; }
.field:last-child { margin-bottom: 0; }
.field-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-bottom: 7px;
}
.field-label { font-size: 12.5px; color: var(--fg-2); }
.field-label .req { color: var(--danger); margin-left: 2px; }
.field-note { font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-3); }

.inp, .txa {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: var(--fg);
  font-size: 14px;
  padding: 11px 12px;
  outline: none;
  transition: border-color .2s var(--e-out), box-shadow .2s var(--e-out);
  -webkit-appearance: none;
  appearance: none;
}
.inp::placeholder, .txa::placeholder { color: #4a5160; }
.inp:focus, .txa:focus {
  border-color: var(--scan);
  box-shadow: 0 0 0 3px rgba(0,229,160,.12);
}
.txa { resize: vertical; min-height: 62px; line-height: 1.6; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  font-family: var(--font-mono); font-size: 11px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--ink-4); border: 1px solid var(--rule);
  color: var(--fg-2);
  transition: all .18s var(--e-out);
}
.chip:hover { border-color: rgba(0,229,160,.4); color: var(--scan); }

/* 关键词计数 */
.kw-count {
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--fg-3);
}
.kw-count b { color: var(--scan); }

/* ---------- 预估 ---------- */
.estimate {
  background: var(--ink-2); border: 1px solid var(--rule);
  border-radius: 12px; padding: 16px 18px;
  margin-bottom: 14px;
}
.est-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0; font-size: 13px;
}
.est-row + .est-row { border-top: 1px dashed var(--rule); }
.est-key { color: var(--fg-2); }
.est-val {
  font-family: var(--font-mono); font-size: 13px;
  font-variant-numeric: tabular-nums;
}
/* panel 内的说明小字：与上面的 est-row 用同一条虚线分隔，
   避免又变成一张独立的卡片把页面切得太碎。 */
.panel-note {
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--rule);
  font-size: 12.5px; color: var(--fg-3); line-height: 1.75;
}
.panel-note b { color: var(--fg-2); font-weight: 500; }
.panel-note .btn { margin-left: 8px; vertical-align: middle; }

.est-total {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-top: 12px; padding-top: 13px;
  border-top: 1px solid var(--rule);
}
.est-total .k { font-size: 13px; color: var(--fg-2); }
.est-total .v {
  font-family: var(--font-display); font-size: 26px; font-weight: 600;
  letter-spacing: -.03em; color: var(--scan);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.est-total .v .u { font-size: 11px; font-weight: 400; color: var(--fg-3); margin-left: 3px; letter-spacing: 0; }
.est-total .v .cur { font-size: 15px; font-weight: 500; margin-right: 2px; opacity: .8; }
.est-warn {
  margin-top: 10px; padding: 9px 11px;
  background: rgba(255,93,93,.07); border: 1px solid rgba(255,93,93,.22);
  border-radius: 7px; font-size: 12px; color: #f0b0b0;
  display: flex; gap: 8px; align-items: flex-start;
}
.est-warn svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 2px; stroke-width: 2; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: var(--font-display); font-size: 14.5px; font-weight: 500;
  padding: 12px 22px; border-radius: 8px;
  white-space: nowrap;
  transition: all .22s var(--e-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:disabled { opacity: .42; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: scale(.99); }
.btn svg { width: 15px; height: 15px; stroke-width: 2.2; transition: transform .25s var(--e-out); }
.btn:hover:not(:disabled) svg { transform: translateX(2px); }

.btn-primary {
  background: var(--scan); color: var(--ink);
  box-shadow: 0 3px 16px rgba(0,229,160,.22);
}
.btn-primary:hover:not(:disabled) {
  background: #12ffb4;
  box-shadow: 0 6px 24px rgba(0,229,160,.36);
  transform: translateY(-1px);
}
.btn-ghost {
  border: 1px solid var(--rule-2); color: var(--fg-2);
  background: rgba(255,255,255,.015);
}
.btn-ghost:hover:not(:disabled) { border-color: var(--scan); color: var(--scan); }
.btn-block { width: 100%; }
.btn-sm { font-size: 12.5px; padding: 8px 14px; border-radius: 7px; }
.btn-sm svg { width: 13px; height: 13px; }

/* ---------- 订单列表 ---------- */
/* ---------- 订单状态筛选 ---------- */
/* 窄屏 5 个 chip 一行放不下，让它横向滚动而不是折行 —— 折两行会把首屏
   往下推，订单卡看不见。滚动条隐藏，靠右侧露出的半个 chip 暗示可滑。 */
.of-bar {
  display: flex; gap: 7px;
  margin: 15px 0 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.of-bar::-webkit-scrollbar { display: none; }
.of-chip {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 11.5px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--ink-4);
  border: 1px solid var(--rule);
  color: var(--fg-2);
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s var(--e-out), border-color .18s var(--e-out), color .18s var(--e-out);
}
.of-chip:hover { border-color: var(--rule-2); color: var(--fg); }
.of-chip.is-on {
  background: var(--scan-glow);
  border-color: rgba(0,229,160,.45);
  color: var(--scan);
}
.of-n {
  font-size: 10px; line-height: 1;
  min-width: 15px; text-align: center;
  padding: 2px 4px; border-radius: 999px;
  background: var(--ink-3); color: var(--fg-3);
}
.of-chip.is-on .of-n { background: rgba(0,229,160,.16); color: var(--scan); }
/* 待支付的数量用琥珀色：这是唯一需要客户动手的一格，值得单独提醒 */
.of-n.is-hot { background: rgba(255,182,72,.16); color: var(--amber); }

.order-list { display: grid; gap: 10px; }

.order-card {
  background: var(--ink-2); border: 1px solid var(--rule);
  border-radius: 11px; padding: 15px 17px;
  transition: border-color .25s var(--e-out);
}
.order-card:hover { border-color: var(--rule-2); }

.order-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 10px;
}
.order-no {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-3);
  letter-spacing: -.1px;
}

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 500;
  padding: 3px 9px; border-radius: 999px;
  border: 1px solid transparent; white-space: nowrap;
}
.pill .d { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.pill-info  { color: #8fb4e8; background: rgba(76,141,255,.1);   border-color: rgba(76,141,255,.2); }
.pill-run   { color: var(--scan); background: rgba(0,229,160,.1); border-color: rgba(0,229,160,.25); }
.pill-ok    { color: #34d399; background: rgba(52,211,153,.1);   border-color: rgba(52,211,153,.22); }
.pill-warn  { color: var(--amber); background: rgba(255,182,72,.1); border-color: rgba(255,182,72,.22); }
.pill-err   { color: var(--danger); background: rgba(255,93,93,.1); border-color: rgba(255,93,93,.22); }
.pill-muted { color: var(--fg-3); background: var(--ink-4); border-color: var(--rule); }

.order-mid { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.order-name {
  font-family: var(--font-display); font-size: 14px; font-weight: 600;
  letter-spacing: -.01em; margin-bottom: 4px; line-height: 1.35;
}
.order-meta { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); }
.order-cost { text-align: right; flex: 0 0 auto; }
.order-cost .n {
  font-family: var(--font-display); font-size: 16px; font-weight: 600;
  color: var(--scan); font-variant-numeric: tabular-nums; line-height: 1.1;
}
.order-cost .u { font-family: var(--font-mono); font-size: 9.5px; color: var(--fg-3); }

/* 进度 */
.order-prog { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--rule); }
.prog-head {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono); font-size: 10.5px; color: var(--fg-3);
  margin-bottom: 6px;
}
.prog-bar {
  height: 3px; background: var(--ink-4); border-radius: 2px; overflow: hidden;
}
.prog-fill {
  height: 100%; background: var(--scan); border-radius: 2px;
  transition: width .5s var(--e-out);
  box-shadow: 0 0 8px rgba(0,229,160,.5);
}
.prog-fill.fail { background: var(--danger); box-shadow: none; }
/* 待支付：整条填满的琥珀色，表示「停在这里等你操作」，不是进度 */
.prog-fill.wait { background: var(--amber); box-shadow: 0 0 8px rgba(255,182,72,.35); }

/* 不确定态进度：真实进度未知时用它，绝不显示编造的百分比。
   关键帧在可视区内留了停留段（20%~80%），否则大部分时间块体都在容器外，
   用户盯着看会以为进度条没在动。 */
@keyframes progSlide {
  0%   { transform: translateX(-120%); }
  20%  { transform: translateX(0); }
  80%  { transform: translateX(257%); }
  100% { transform: translateX(257%); }
}
.prog-fill.indet {
  width: 28%;
  animation: progSlide 1.5s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(0,229,160,.35);
}
@media (prefers-reduced-motion: reduce) {
  .prog-fill.indet { animation-duration: 3.6s; }
}

/* 失败卡片下方的补救说明 */
.order-hint {
  margin-top: 7px;
  font-size: 11.5px; line-height: 1.5;
  color: var(--fg-3);
}

/* 交付 */
.order-deliver {
  margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.deliver-file {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 56px 20px; }
.empty-icon {
  width: 52px; height: 52px; margin: 0 auto 16px;
  border-radius: 14px; background: var(--ink-2);
  border: 1px solid var(--rule);
  display: grid; place-items: center;
}
.empty-icon svg { width: 23px; height: 23px; stroke-width: 1.6; color: var(--fg-3); }
.empty-title { font-family: var(--font-display); font-size: 14.5px; color: var(--fg-2); margin-bottom: 5px; }
.empty-desc { font-size: 12.5px; color: var(--fg-3); margin-bottom: 16px; }

/* ---------- 骨架 ---------- */
.sk {
  background: linear-gradient(90deg, var(--ink-2) 25%, var(--ink-3) 37%, var(--ink-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 9px;
}
@keyframes shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
.sk-card { height: 88px; margin-bottom: 10px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(12px);
  background: #1c2130; border: 1px solid #2d3448;
  color: var(--fg); font-size: 13px;
  padding: 10px 18px; border-radius: 999px;
  box-shadow: 0 8px 30px rgba(0,0,0,.5);
  opacity: 0; pointer-events: none;
  transition: opacity .25s var(--e-out), transform .25s var(--e-out);
  z-index: 200; max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 底部导航（<980px） ---------- */
.tabbar {
  position: fixed; left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 100%; max-width: var(--maxw);
  z-index: 50;
  display: flex;
  background: rgba(8,9,12,.94);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--rule);
  padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
}
.tabbar .tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 0;
  color: var(--fg-3); font-size: 10.5px;
  transition: color .2s var(--e-out);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.tabbar .tab svg { width: 20px; height: 20px; stroke-width: 1.7; }
.tabbar .tab.on { color: var(--scan); }
.tabbar .tab.on::before {
  content: ""; position: absolute; top: -6px; left: 50%;
  transform: translateX(-50%);
  width: 22px; height: 2px; border-radius: 0 0 2px 2px;
  background: var(--scan);
  box-shadow: 0 0 8px rgba(0,229,160,.7);
}

/* ---------- 顶栏导航（≥980px） ---------- */
/* flex:1 + 居中：去掉积分 chip 后右侧只剩两个图标，若仍用 margin-right:auto
   会让导航紧贴品牌名、右边留一大片空，观感失衡。 */
.topnav {
  display: none; align-items: center; justify-content: center;
  gap: 2px; flex: 1;
}
.topnav .tab {
  position: relative;
  padding: 7px 14px; border-radius: 7px;
  font-size: 13px; color: var(--fg-3);
  transition: color .2s var(--e-out), background .2s var(--e-out);
  -webkit-tap-highlight-color: transparent;
}
.topnav .tab:hover { color: var(--fg); }
.topnav .tab.on { color: var(--scan); background: rgba(0,229,160,.08); }
.topnav .tab.on::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 1.5px; border-radius: 2px;
  background: var(--scan);
  box-shadow: 0 0 8px rgba(0,229,160,.7);
}

/* ---------- 通知条 ---------- */
.notice {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 11px 13px; border-radius: 8px;
  font-size: 12.5px; line-height: 1.6;
  margin-bottom: 14px;
}
.notice svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 2px; stroke-width: 1.9; }
.notice-info { background: rgba(76,141,255,.07); border: 1px solid rgba(76,141,255,.2); color: #a8c3ec; }
.notice-warn { background: rgba(255,182,72,.06); border: 1px solid rgba(255,182,72,.2); color: #e8cf94; }
.notice-err  { background: rgba(255,93,93,.06); border: 1px solid rgba(255,93,93,.2); color: #f0b0b0; }
.notice b { color: var(--fg); font-weight: 500; }

/* ---------- 确认弹层 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(4,5,8,.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity .25s var(--e-out), visibility .25s;
}
.modal-mask.open { opacity: 1; visibility: visible; }
.modal {
  width: 100%; max-width: 400px;
  background: var(--ink-2); border: 1px solid var(--rule-2);
  border-radius: 14px; padding: 22px;
  transform: translateY(10px) scale(.985);
  transition: transform .28s var(--e-out);
  max-height: 86vh; overflow-y: auto;
}
.modal-mask.open .modal { transform: translateY(0) scale(1); }
.modal-title {
  font-family: var(--font-display); font-size: 17px; font-weight: 600;
  letter-spacing: -.02em; margin-bottom: 6px;
}
.modal-sub { font-size: 12.5px; color: var(--fg-3); margin-bottom: 18px; }

.modal-rows { margin-bottom: 18px; }
.modal-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 8px 0; font-size: 13px;
  border-bottom: 1px dashed var(--rule);
}
.modal-row:last-child { border-bottom: 0; }
.modal-row .k { color: var(--fg-3); flex: 0 0 auto; }
.modal-row .v {
  font-family: var(--font-mono); font-size: 12.5px; text-align: right;
  word-break: break-all;
}
.modal-row.big .v {
  font-family: var(--font-display); font-size: 20px; font-weight: 600;
  color: var(--scan);
}
.modal-actions { display: flex; gap: 9px; }
.modal-actions .btn { flex: 1; }

/* ---------- 取消订单确认 ---------- */
.modal-confirm { max-width: 372px; }
.cancel-body { margin-bottom: 18px; }
.cancel-orderno {
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--fg-3); margin-bottom: 6px;
}
.cancel-amount {
  font-family: var(--font-display); font-size: 24px; font-weight: 600;
  letter-spacing: -.02em; margin-bottom: 14px; color: var(--fg);
}
.cancel-note {
  margin: 0 0 8px; font-size: 12.5px; line-height: 1.72; color: var(--fg-2);
}
.cancel-note b { color: var(--fg); font-weight: 600; }
.cancel-note.note-ok {
  margin-bottom: 0; color: var(--fg-3);
  padding-left: 10px; border-left: 2px solid rgba(0,229,160,.4);
}
.btn-danger {
  border: 1px solid rgba(255,93,93,.32);
  background: rgba(255,93,93,.1);
  color: var(--danger);
}
.btn-danger:hover:not(:disabled) {
  background: rgba(255,93,93,.18);
  border-color: var(--danger);
  color: #ff7b7b;
}

/* 卡片底部：金额左、按钮组右。金额可压缩，按钮不换行。 */
.deliver-acts { display: flex; gap: 8px; flex: 0 0 auto; }
.order-deliver .deliver-file { flex: 1 1 auto; min-width: 0; }

/* 360px 上下，两个按钮会把卡片撑破 → 让按钮组换到金额下面一行 */
@media (max-width: 380px) {
  .order-deliver { flex-wrap: wrap; row-gap: 10px; }
  .order-deliver .deliver-file { flex: 1 0 100%; }
  .deliver-acts { flex: 1 1 100%; }
  .deliver-acts .btn { flex: 1; }
}

/* ---------- 收银台 ---------- */
.modal-pay { max-width: 380px; }

.pay-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.pay-x {
  width: 28px; height: 28px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 6px; color: var(--fg-3);
  transition: background .2s var(--e-out), color .2s var(--e-out);
}
.pay-x:hover { background: var(--ink-4); color: var(--fg); }
.pay-x svg { width: 18px; height: 18px; stroke-width: 1.8; }

.pay-amount {
  display: flex; align-items: baseline; gap: 3px;
  font-family: var(--font-display); font-size: 34px; font-weight: 600;
  letter-spacing: -.035em; color: var(--fg);
  font-variant-numeric: tabular-nums; line-height: 1.1;
  margin: 2px 0 3px;
}
.pay-amount .cur { font-size: 18px; font-weight: 500; color: var(--fg-2); }
.pay-orderno {
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-3);
  word-break: break-all; margin-bottom: 15px;
}

.pay-stage {
  min-height: 228px;
  display: grid; place-items: center;
  background: var(--ink-3);
  border: 1px dashed var(--rule-2);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 13px;
}

.qr-box { text-align: center; }
.qr-box canvas {
  display: block; background: #fff; border-radius: 8px;
  margin: 0 auto;
  /* 二维码必须按物理像素清晰呈现，不能被缩放插值糊掉 */
  image-rendering: pixelated;
}
.qr-tip {
  margin-top: 9px; font-size: 11.5px; color: var(--fg-3);
  font-family: var(--font-mono); letter-spacing: .3px;
}

.pay-boot { text-align: center; }
.pay-spin {
  width: 26px; height: 26px; margin: 0 auto 12px;
  border: 2px solid var(--rule-2); border-top-color: var(--scan);
  border-radius: 50%; animation: spin .8s linear infinite;
}
.pay-boot-t { font-size: 13px; color: var(--fg-2); }
.pay-boot-s { font-size: 11px; color: var(--fg-3); margin-top: 4px; font-family: var(--font-mono); }

.pay-off { text-align: center; padding: 8px 4px; }
.pay-off svg { width: 30px; height: 30px; margin: 0 auto 12px; color: var(--amber); stroke-width: 1.6; }
.pay-off-t { font-size: 14px; color: var(--fg); margin-bottom: 6px; }
.pay-off-s { font-size: 12px; color: var(--fg-3); line-height: 1.65; }

.pay-cd {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-3);
  text-align: center; margin-bottom: 11px; min-height: 16px;
}
.pay-cd b { color: var(--amber); font-weight: 600; font-variant-numeric: tabular-nums; }
.pay-cd.is-done b { color: var(--danger); }
.pay-actions { display: flex; gap: 9px; }
.pay-actions .btn { flex: 1; }

/* ---------- 登录页 ---------- */
.login-wrap {
  min-height: calc(100vh - 60px);
  display: grid; place-items: center;
  padding: 30px 20px 90px;
}
.login-box {
  width: 100%; max-width: 360px; text-align: center;
}
.login-mark {
  width: 60px; height: 60px; margin: 0 auto 22px;
}
.login-mark svg { width: 60px; height: 60px; }
.login-mark .ring { transform-origin: 12px 12px; animation: spin 8s linear infinite; }
.login-title {
  font-family: var(--font-display); font-size: 21px; font-weight: 600;
  letter-spacing: -.025em; margin-bottom: 8px; line-height: 1.3;
}
.login-desc {
  font-size: 13px; color: var(--fg-2); line-height: 1.7; margin-bottom: 26px;
}
.login-note {
  margin-top: 20px; font-family: var(--font-mono);
  font-size: 10.5px; color: var(--fg-3); line-height: 1.7;
}
/* 隐私政策入口：这是个法务链接，必须看起来像能点的，
   但字号仍与说明保持一致，否则会把登录按钮的视觉重心抢走。 */
.login-note a { color: var(--scan); text-decoration: none; border-bottom: 1px solid rgba(0,229,160,.32); }
.login-note a:hover { border-bottom-color: var(--scan); }
.login-note b { color: var(--fg-2); font-weight: 500; }

/* ==========================================================================
   手机号登录表单（2026-11-09）

   视觉沿用登录区现有体系：深底、--rule 描边、--scan 绿色聚焦。
   不引入新配色，避免同一屏出现两套设计语言。
   ========================================================================== */
/* .login-box 整体是 text-align:center（标题、说明、按钮都居中）。
   但表单内部必须左对齐 —— 标签跟着居中会让「手机号」「验证码」
   飘在输入框上方中间，视觉上像脱节的说明文字，不像字段名。 */
.login-form { margin-bottom: 4px; text-align: left; }

.lf-row { margin-bottom: 10px; }

.lf-label {
  display: block; margin-bottom: 6px;
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--fg-3); letter-spacing: .04em;
}

.lf-input {
  width: 100%; padding: 11px 13px;
  background: var(--ink-3); color: var(--fg);
  border: 1px solid var(--rule); border-radius: 8px;
  font-family: var(--font-mono); font-size: 14px;
  letter-spacing: .03em;
  transition: border-color .18s var(--e-out), background-color .18s var(--e-out);
}
.lf-input::placeholder { color: var(--fg-3); letter-spacing: 0; font-family: inherit; }
.lf-input:hover { border-color: var(--rule-2); }
.lf-input:focus {
  outline: none; border-color: var(--scan);
  background: var(--ink-4);
  box-shadow: 0 0 0 3px var(--scan-glow);
}
/* 校验失败态：只染边框，不整块变红 —— 红底在深色里过于刺眼 */
.lf-input.is-bad { border-color: var(--danger); }
.lf-input.is-bad:focus { box-shadow: 0 0 0 3px rgba(255,93,93,.13); }

/* 验证码一行：输入框吃满，发码按钮固定在右侧 */
.lf-code { display: flex; gap: 8px; }
.lf-code .lf-input { flex: 1 1 auto; min-width: 0; }
.lf-send {
  flex: 0 0 auto; padding: 0 14px; font-size: 12px;
  white-space: nowrap; min-width: 92px;
}
/* 倒计时期间按钮变灰且不可点，但宽高不变 —— 避免数字跳动让整行抖 */
.lf-send:disabled { cursor: default; opacity: .55; }

/* 字段级错误：高度固定为 0，有内容才撑开，避免空占位把按钮推下去 */
.lf-err {
  font-size: 11.5px; color: var(--danger); line-height: 1.5;
  min-height: 0; margin: -2px 0 8px;
  font-family: var(--font-mono);
}
.lf-err:empty { display: none; }

/* 分隔线：手机号与微信两个入口的视觉分界 */
.login-or {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0 16px;
  color: var(--fg-3); font-size: 10.5px;
  font-family: var(--font-mono); letter-spacing: .08em;
}
.login-or::before, .login-or::after {
  content: ""; flex: 1 1 auto; height: 1px; background: var(--rule);
}
.login-or span { flex: 0 0 auto; }


/* ---------- 响应式 ---------- */
@media (min-width: 980px) {
  .topnav { display: flex; }
  .tabbar { display: none !important; }
  .main { padding-bottom: 64px; }
  .toast { bottom: 34px; }
  .login-wrap { padding-bottom: 40px; }
}

@media (max-width: 760px) {
  /* 竖排步骤条必须 stretch，否则 .steps 的 align-items:center 会把每行压成内容宽度 */
  .steps { flex-direction: column; align-items: stretch; gap: 0; }
  .step { border-right: 0; border-bottom: 1px solid var(--rule); padding: 9px 13px; font-size: 12px; }
  .step:last-child { border-bottom: 0; }
  .plat-tabs { grid-template-columns: 1fr; }
  .plat-tab { flex-direction: row; align-items: center; justify-content: space-between; }
  .plan { grid-template-columns: 1fr; gap: 10px; }
  .plan-price { text-align: left; display: flex; align-items: baseline; gap: 6px; }
  .order-mid { flex-direction: column; }
  .order-cost { text-align: left; display: flex; align-items: baseline; gap: 5px; }
}

@media (max-width: 420px) {
  .main { padding-left: 14px; padding-right: 14px; }
  .panel { padding: 15px; }
  .brand-sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ==========================================================
   结算页（购物车交接过来的订单确认）
   与订单卡同一套底色与描边，保持视觉连续；金额用等宽字体右对齐，
   方便一眼比对「购物车合计」和「收银台金额」是不是同一个数。
   ========================================================== */
.co-list { display: grid; gap: 10px; margin-bottom: 14px; }

.co-item {
  background: var(--ink-2); border: 1px solid var(--rule);
  border-radius: 11px; padding: 15px 17px;
  transition: border-color .25s var(--e-out);
}
.co-item.is-bad { border-color: rgba(255,93,93,.45); }

.co-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.co-name { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--fg); }
.co-amt { font-family: var(--font-mono); font-size: 15px; color: var(--scan); white-space: nowrap; }

.co-meta { margin-top: 6px; font-size: 12.5px; color: var(--fg-3); line-height: 1.6; }

.co-asins {
  margin-top: 9px; padding: 8px 10px; border-radius: 6px;
  background: rgba(255,255,255,.02); border: 1px solid var(--rule);
  font-family: var(--font-mono); font-size: 12px; color: var(--fg-2);
  word-break: break-all; line-height: 1.65;
}

.co-bad { margin-top: 8px; font-size: 12.5px; color: var(--danger); }

.co-total {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 16px 17px; margin-bottom: 12px;
  background: var(--ink-2); border: 1px solid var(--rule); border-radius: 11px;
}
.co-total > span { font-size: 13px; color: var(--fg-3); }
.co-total b { font-family: var(--font-mono); font-size: 24px; font-weight: 600; color: var(--fg); }
.co-total b i { font-style: normal; font-size: 15px; color: var(--fg-3); margin-right: 3px; }

.co-back { margin-top: 10px; }

/* 联系方式与来源渠道：与订单卡同一套底色描边，读起来是一张「填表」而不是弹窗。
   微信号必填是因为交付只能靠它找人；来源渠道纯统计用，留空的权力留给客户。 */
.co-form {
  background: var(--ink-2); border: 1px solid var(--rule);
  border-radius: 11px; padding: 15px 17px; margin-bottom: 12px;
}
.co-form-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.co-form-title { font-family: var(--font-display); font-size: 14px; font-weight: 600; color: var(--fg); }
.co-form-tip { font-size: 12px; color: var(--fg-3); text-align: right; }

.co-field { display: block; }
.co-field + .co-field { margin-top: 13px; }
.co-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--fg-2); margin-bottom: 6px; }

.co-req, .co-opt {
  font-style: normal; font-size: 11px; line-height: 1;
  padding: 2px 5px; border-radius: 4px; border: 1px solid transparent;
}
.co-req { color: var(--scan); border-color: rgba(0,229,160,.3); background: rgba(0,229,160,.08); }
.co-opt { color: var(--fg-3); border-color: var(--rule); }

.co-input {
  display: block; width: 100%; box-sizing: border-box;
  height: 42px; padding: 0 12px;
  background: rgba(255,255,255,.02); border: 1px solid var(--rule);
  border-radius: 8px; color: var(--fg);
  font-family: inherit; font-size: 14px; line-height: 40px;
  transition: border-color .2s var(--e-out), background .2s var(--e-out);
  -webkit-appearance: none; appearance: none;
}
.co-input::placeholder { color: var(--fg-3); opacity: .75; }
.co-input:focus { outline: none; border-color: rgba(0,229,160,.5); background: rgba(255,255,255,.035); }
.co-input.is-bad { border-color: rgba(255,93,93,.55); }

/* appearance:none 会连原生箭头一起去掉，这里自己补一个，
   否则 iOS 上是一个没有任何暗示的空框。 */
.co-select {
  padding-right: 34px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--fg-3) 50%),
                    linear-gradient(135deg, var(--fg-3) 50%, transparent 50%);
  background-position: calc(100% - 17px) 19px, calc(100% - 12px) 19px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.co-select option { background: #12161c; color: var(--fg); }

.co-err { display: block; margin-top: 6px; font-size: 12px; color: var(--danger); }
.co-err:empty { display: none; }

@media (max-width: 380px) {
  .co-form { padding: 13px 14px; }
  .co-form-hd { display: block; }
  .co-form-tip { display: block; text-align: left; margin-top: 3px; }
}

/* 顶栏「返回首页」：整个用户中心里唯一带文字的图标按钮。
   刷新/退出都是纯图标，多一个纯图标按钮会被当成同类装饰；
   而"离开用户中心"是个导航动作，需要能一眼读懂。
   高度、边框、hover 一律沿用 .icon-btn，只有宽度随文字变，别自创第二套按钮语言。 */
.top-home {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; width: auto; padding: 0 11px;
  font-size: 12.5px; letter-spacing: .2px;
}
.top-home svg { width: 15px; height: 15px; }

/* 窄屏放不下「返回首页」四个字：退回纯图标，尺寸与刷新/退出对齐，
   靠 title + aria-label 保住可读性。 */
@media (max-width: 560px) {
  .top-home { width: 34px; padding: 0; gap: 0; }
  .top-home .top-home-txt { display: none; }
}

/* 320~344 的极窄屏：品牌名 + 返回首页/刷新/退出/头像 实测要 330px，
   会把「KK选品雷达」压成两行。这里收窄内边距与按钮尺寸换回一行，
   一个入口都不删。 */
@media (max-width: 344px) {
  .topbar-in { padding: 0 10px; gap: 8px; }
  .topbar-right { gap: 6px; }
  .topbar .icon-btn { width: 32px; height: 32px; }
  .user-avatar { width: 28px; height: 28px; }
  .brand-sub { display: none; }
  .brand-name { font-size: 13px; letter-spacing: 0; white-space: nowrap; }
  /* 344px 下 5 个 chip 会溢出 13px，把「全部」切掉一半。
     收紧内边距而不是让用户去横向滑动——兜底项不该藏在屏幕外。 */
  .of-chip { padding: 5px 9px; font-size: 11px; gap: 4px; }
  .of-bar { gap: 5px; }
}

/* ==========================================================================
   活动优惠标注（2026-11-07）
   有活动时结算页会同时出现「原价划线 + 折后价 + 活动名」，
   不标清楚客户会以为金额算错了。
   ========================================================================== */
.co-was{
  color:var(--fg-3,#8b94a3);
  text-decoration:line-through;
  font-weight:400;
  margin-right:2px;
}
.co-now{color:#c0392b;font-weight:700}
.co-camp{
  font-size:11.5px;
  color:#c0392b;
  background:rgba(192,57,43,.08);
  border-radius:5px;
  padding:2px 7px;
  margin-top:5px;
  display:inline-block;
}
