/* Pro 充值 · 前台样式
   视觉规范见 docs/design-system.md：暖奶油底、柔光卡片、大圆角、
   Plus Jakarta Sans + DM Mono，紫色实按钮 + 蜜桃/薰衣草/天蓝柔和渐变。 */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("./shared/fonts/PlusJakartaSans-var.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Mono";
  src: url("./shared/fonts/DMMono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Mono";
  src: url("./shared/fonts/DMMono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #16140f;
  background: #f5f0e7;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;

  --canvas: #f2f3f9;
  --surface: #fafbff;
  --surface-high: #ffffff;
  --sunk: rgba(20, 22, 43, 0.04);

  --ink: #14161f;
  --ink-soft: #343a4d;
  --muted: rgba(20, 22, 43, 0.58);
  --faint: rgba(20, 22, 43, 0.38);
  --hair: rgba(20, 22, 43, 0.08);
  --edge: rgba(20, 22, 43, 0.07);

  --brand: #6a4bff;
  --brand-ink: #4b33cc;
  --brand-soft: #eeeaff;
  --spark: #38bdf8;
  --wash: linear-gradient(95deg, #a9b6ff 0%, #b9a3ff 48%, #8fd4ff 100%);

  --ok: #0ea67a;
  --ok-soft: #e4f7f1;
  --ok-line: rgba(14, 166, 122, 0.24);
  --danger: #d9434c;
  --danger-soft: #fdedee;
  --warn: #b06a12;
  --warn-soft: #fdf3e4;

  /* 旧选择器沿用的别名 */
  --line: var(--hair);
  --line-strong: var(--edge);
  --mist: var(--sunk);
  --soft: var(--sunk);
  --white: var(--surface-high);
  --violet: var(--brand);
  --brand-deep: var(--brand-ink);
  --brand-gradient: var(--wash);
  --chip-indigo-bg: var(--brand-soft);
  --chip-indigo-text: var(--brand-ink);
  --chip-violet-bg: var(--brand-soft);
  --chip-violet-text: var(--brand-ink);
  --chip-green-bg: var(--ok-soft);
  --chip-green-text: var(--ok);
  --chip-red-bg: var(--danger-soft);
  --chip-red-text: var(--danger);
  --chip-amber-bg: var(--warn-soft);
  --chip-amber-text: var(--warn);

  --shadow-card:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 1px 2px rgba(20, 22, 43, 0.04),
    0 18px 44px -30px rgba(20, 22, 43, 0.28);
  --shadow-lift:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(20, 22, 43, 0.05),
    0 28px 60px -28px rgba(20, 22, 43, 0.32);
  --shadow-brand:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 10px 24px -12px rgba(106, 75, 255, 0.75);
  --shadow-pill: 0 1px 2px rgba(20, 22, 43, 0.05);

  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-ui: cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 16px;
  --radius-card: 20px;
  --radius-panel: 28px;
  --content: 1120px;
  --spin-ms: 2.4s;
  --spin-sync: 0ms;
}

@property --turn {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

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

html {
  background: var(--canvas);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.7;
}

body,
button,
a,
input,
textarea,
select {
  font-family: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: var(--brand-ink);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

/* ---------- 背景三层 ---------- */

.app-shell {
  position: relative;
  min-height: 100vh;
}

.app-shell::before {
  content: "";
  position: fixed;
  inset: -10%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(closest-side, rgba(169, 182, 255, 0.52), rgba(169, 182, 255, 0)) -8% -14% / 58vw 58vw no-repeat,
    radial-gradient(closest-side, rgba(201, 187, 252, 0.5), rgba(201, 187, 252, 0)) 102% -8% / 52vw 52vw no-repeat,
    radial-gradient(closest-side, rgba(143, 201, 255, 0.42), rgba(143, 201, 255, 0)) 88% 96% / 46vw 46vw no-repeat;
  animation: bloom-drift 32s var(--ease-out) infinite alternate;
  /* 固定层只覆盖一屏，整页截图或短页面时下边缘会留一条直线。先淡出就看不到接缝 */
  mask-image: linear-gradient(180deg, #000 0%, #000 42%, rgba(0, 0, 0, 0.35) 68%, transparent 92%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 42%, rgba(0, 0, 0, 0.35) 68%, transparent 92%);
}

.app-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(20, 22, 43, 0.05) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(rgba(20, 22, 43, 0.05) 1px, transparent 1px) 0 0 / 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.18) 42%, transparent 78%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.18) 42%, transparent 78%);
}

@keyframes bloom-drift {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
  to { transform: translate3d(1.5%, 2%, 0) scale(1.06); }
}

/* ---------- 顶栏 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 72px;
  background: rgba(242, 243, 249, 0.72);
  backdrop-filter: blur(20px) saturate(170%);
  transition: box-shadow 320ms var(--ease-ui), background 320ms var(--ease-ui);
}

.site-header.is-stuck {
  background: rgba(250, 251, 255, 0.86);
  box-shadow: 0 1px 0 var(--hair), 0 18px 40px -34px rgba(20, 22, 43, 0.5);
}

.site-header__inner {
  width: min(calc(100% - 48px), var(--content));
  min-height: 72px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand::before {
  content: "";
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: var(--wash);
  box-shadow: var(--shadow-pill), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.brand__name {
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.header-spacer {
  justify-self: end;
  width: 1px;
  height: 1px;
}

.primary-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  min-height: 42px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: var(--shadow-pill), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.primary-nav button {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: color 250ms var(--ease-ui), background 250ms var(--ease-ui), box-shadow 250ms var(--ease-ui);
}

.primary-nav button:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.primary-nav button[aria-selected="true"] {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-brand);
}

/* ---------- 页面骨架 ---------- */

.page {
  width: min(calc(100% - 48px), var(--content));
  margin: 0 auto;
  padding: 40px 0 96px;
}

.panel:not([hidden]) {
  animation: panel-in 500ms var(--ease-out) both;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

.page-intro {
  max-width: 68ch;
  margin-bottom: 28px;
}

.page-intro h1 {
  margin: 0;
  color: var(--ink);
  font-size: 34px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.03em;
}

/* 强调词保持墨色，底下压一条招牌渐变，和参考站的下划线处理一致 */
.page-intro h1 em {
  font-style: normal;
  color: var(--ink);
  background: var(--wash) 0 100% / 100% 4px no-repeat;
  padding-bottom: 3px;
  border-radius: 2px;
}

.page-intro p {
  max-width: 60ch;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
}

/* ---------- 微标签 ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--spark);
  animation: breathe 1.8s var(--ease-ui) infinite;
}

.eyebrow--plain::before {
  display: none;
}

@keyframes breathe {
  0%, 100% { opacity: 0.45; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* ---------- 卡片 ---------- */

.card {
  padding: 32px;
  border: 1px solid var(--edge);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: box-shadow 320ms var(--ease-out), transform 320ms var(--ease-out);
}

.card:hover {
  box-shadow: var(--shadow-lift);
}

.card + .card,
.stack > * + * {
  margin-top: 20px;
}

.card h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.03em;
}

.card > p.lead {
  max-width: 62ch;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
}

/* ---------- 表单 ---------- */

.field {
  display: grid;
  gap: 10px;
}

.field + .field {
  margin-top: 22px;
}

.field label,
.field-label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.next-step {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.7;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--surface-high);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(20, 22, 43, 0.04);
  transition: border-color 250ms var(--ease-ui), box-shadow 250ms var(--ease-ui);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--faint);
}

.field textarea {
  min-height: 200px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.65;
}

#status-code {
  min-height: 104px;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.02em;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--brand);
  box-shadow: inset 0 1px 2px rgba(20, 22, 43, 0.03), 0 0 0 3px var(--brand-soft);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

/* ---------- 按钮 ---------- */

.btn {
  min-height: 46px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 250ms var(--ease-out), border-color 250ms var(--ease-out),
    color 250ms var(--ease-out), transform 250ms var(--ease-out), box-shadow 250ms var(--ease-out);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-brand);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 16px 32px -14px rgba(106, 75, 255, 0.85);
}

.btn-ghost {
  border-color: var(--edge);
  background: var(--surface-high);
  color: var(--ink);
  box-shadow: var(--shadow-pill);
}

.btn-ghost:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 1px 2px rgba(20, 22, 43, 0.05), 0 14px 28px -18px rgba(20, 22, 43, 0.4);
}

.btn:active:not(:disabled) {
  transform: translateY(0) scale(0.99);
}

/* ---------- 徽章 ---------- */

.chip {
  width: fit-content;
  min-height: 24px;
  padding: 3px 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.chip--violet {
  background: var(--brand-soft);
  color: var(--brand-ink);
}

.chip--violet::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  animation: breathe 1.8s var(--ease-ui) infinite;
}

.chip--green {
  background: var(--ok-soft);
  color: var(--ok);
}

.chip--red {
  background: var(--danger-soft);
  color: var(--danger);
}

.chip--amber {
  background: var(--warn-soft);
  color: var(--warn);
}

.chip--muted {
  background: var(--sunk);
  color: var(--muted);
}

.chip--tag {
  padding: 4px 12px;
}

.chip--plan {
  padding: 4px 12px;
  background: var(--brand-soft);
  color: var(--brand-ink);
}

/* 兑换页输入框下方那张「将要充值」卡片：卡密格式一对上就浮出来。
   按视觉规范，卡片靠光浮起来不靠边框，眉标走 mono 小字，档位名走标题字号。 */
.plan-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 2px 0 0;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--surface-high);
  box-shadow: var(--shadow-card);
  animation: plan-rise 0.32s var(--ease-out) both;
}

@keyframes plan-rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .plan-preview { animation: none; }
}

.plan-preview__mark {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-ink);
}

/* 四种状态：核对完可用、正在问服务器、卡密还在处理中、卡密不能用。 */
.plan-preview[data-tone="wait"] .plan-preview__mark {
  background: var(--sunk);
  color: var(--muted);
}

.plan-preview[data-tone="warn"] .plan-preview__mark {
  background: var(--warn-soft);
  color: var(--warn);
}

.plan-preview[data-tone="bad"] .plan-preview__mark {
  background: var(--danger-soft);
  color: var(--danger);
}

.plan-preview__spin {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2.5px solid var(--hair);
  border-top-color: var(--muted);
  transform: rotate(var(--turn));
  animation: spin var(--spin-ms) linear infinite;
  animation-delay: var(--spin-sync);
}

@media (prefers-reduced-motion: reduce) {
  .plan-preview__spin { animation: none; }
}

.plan-preview__body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.plan-preview__label {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
}

.plan-preview__name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

/* 卡密不能用时，名字那一行放的是服务器的原话，一句话按标题字号太重了。 */
.plan-preview[data-tone="bad"] .plan-preview__name {
  color: var(--danger);
  font-size: 16px;
  letter-spacing: normal;
}

.plan-preview__note {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.plan-preview__spot {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: normal;
}

.plan-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.5;
  box-shadow: var(--shadow-brand);
}

/* ---------- 提示块 ---------- */

.notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--danger-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.notice .chip {
  flex: 0 0 auto;
  margin-top: 2px;
}

.notice p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.7;
}

/* ---------- 步骤说明（白色胶囊条） ---------- */

.steps {
  margin: 10px 0 32px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.steps li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--surface-high);
  box-shadow: var(--shadow-pill);
  transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out);
}

.steps li:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 2px rgba(20, 22, 43, 0.05), 0 14px 28px -20px rgba(20, 22, 43, 0.4);
}

.steps .n {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 2;
}

.steps strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.steps span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.steps a {
  color: var(--brand-ink);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  word-break: break-all;
}

.shortcuts {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.shortcuts > span {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

/* ---------- 可折叠帮助 ---------- */

.helper {
  margin: 0 0 24px;
  border-radius: var(--radius);
  background: var(--sunk);
}

.helper > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
  user-select: none;
  border-radius: var(--radius);
  transition: color 250ms var(--ease-ui);
}

.helper > summary::-webkit-details-marker {
  display: none;
}

.helper > summary::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg) translate(-1px, -1px);
  transition: transform 300ms var(--ease-out);
}

.helper[open] > summary::before {
  transform: rotate(45deg) translate(-1px, -1px);
}

.helper > summary:hover {
  color: var(--ink);
}

.helper .steps {
  margin: 0;
  padding: 0 14px 14px;
}

/* ---------- 账号预览 ---------- */

.account-preview {
  margin-top: 16px;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--brand-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.account-preview.is-in {
  animation: panel-in 450ms var(--ease-out) both;
}

.account-preview__label {
  margin: 0;
  color: var(--brand-ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.5;
}

.account-preview__email {
  margin: 12px 0 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.account-preview__hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
}

.rename-choice {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  cursor: pointer;
}

.account-preview .rename-choice input {
  width: 17px;
  height: 17px;
  min-height: 17px;
  margin: 4px 0 0;
  padding: 0;
  flex: 0 0 auto;
  border: 0;
  border-radius: 5px;
  box-shadow: none;
  accent-color: var(--brand);
}

.account-preview .rename-choice input:focus {
  border-color: transparent;
  box-shadow: none;
}

.rename-field {
  margin-top: 14px;
}

.rename-field input {
  margin-top: 6px;
}

/* ---------- 反馈 ---------- */

.feedback {
  margin: 18px 0 0;
  font-size: 14px;
  line-height: 1.65;
}

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

.feedback .text-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  line-height: inherit;
  vertical-align: baseline;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.feedback .text-link:hover {
  text-decoration-thickness: 2px;
}

.feedback--ok {
  color: var(--ok);
}

.state {
  padding: 26px 4px 4px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

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

.result-slot {
  margin-top: 20px;
}

.empty {
  margin: 0;
  padding: 32px;
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.empty.pending::before,
.doc-pending.pending::before {
  content: "";
  display: block;
  width: min(42%, 170px);
  height: 8px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(20, 22, 43, 0.07) 0%, rgba(255, 255, 255, 0.9) 45%, rgba(20, 22, 43, 0.07) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

.doc-pending {
  margin: 10px 0 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.doc-pending.pending::before {
  margin-bottom: 8px;
}

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

/* ---------- 进度条 ---------- */

.stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 20px;
  padding: 26px 20px;
  list-style: none;
  border: 1px solid var(--edge);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.stepper li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--faint);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.stepper li::before {
  content: "";
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-high);
  box-shadow: inset 0 0 0 1px var(--edge), var(--shadow-pill);
}

.stepper li::after {
  content: "";
  position: absolute;
  top: 13px;
  left: calc(50% + 22px);
  width: calc(100% - 44px);
  height: 2px;
  border-radius: 1px;
  background: var(--hair);
}

.stepper li:last-child::after {
  display: none;
}

.stepper li.is-done {
  color: var(--ok);
}

.stepper li.is-done::before {
  background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.2 8.1 6.4 11.2 12.8 4.6' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px 14px no-repeat;
  box-shadow: 0 6px 14px -8px rgba(14, 166, 122, 0.85);
}

.stepper li.is-done::after {
  background: var(--ok-line);
}

.stepper li.is-done.is-final {
  color: var(--brand-ink);
}

.stepper li.is-done.is-final::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.2 8.1 6.4 11.2 12.8 4.6' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-color: var(--brand);
  background-position: center;
  background-size: 14px 14px;
  background-repeat: no-repeat;
  box-shadow: var(--shadow-brand);
}

.stepper li.is-current {
  color: var(--brand-ink);
}

.stepper li.is-current::before {
  background: var(--surface-high);
  border: 2.5px solid var(--brand-soft);
  border-top-color: var(--brand);
  box-shadow: none;
  transform: rotate(var(--turn));
  animation: spin var(--spin-ms) linear infinite;
  animation-delay: var(--spin-sync);
}

@keyframes spin {
  from { --turn: 0deg; }
  to { --turn: 360deg; }
}

.stepper li.is-bad {
  color: var(--danger);
}

.stepper li.is-bad::before {
  background: var(--danger-soft);
  box-shadow: inset 0 0 0 2px var(--danger);
}

/* ---------- 结果看板 ---------- */

.board {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 20px;
  align-items: start;
}

.board__summary h2,
.board .card h2 {
  margin-bottom: 10px;
}

.meta {
  display: grid;
  gap: 8px;
  margin: 20px 0 0;
}

.meta div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  min-height: 52px;
  padding: 10px 18px;
  border-radius: 14px;
  background: var(--surface-high);
  box-shadow: var(--shadow-pill);
}

.meta dt {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.meta dd {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.billing-name {
  font-family: var(--mono);
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* ---------- 时间线 ---------- */

.timeline {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  column-gap: 16px;
  padding-bottom: 22px;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 4px;
  top: 18px;
  bottom: -4px;
  width: 2px;
  border-radius: 1px;
  background: var(--ok-line);
}

.timeline li.is-wait:not(:last-child)::after,
.timeline li.is-review:not(:last-child)::after,
.timeline li.is-next:not(:last-child)::after,
.timeline li.is-bad:not(:last-child)::after {
  background: var(--hair);
}

.timeline .dot {
  position: relative;
  z-index: 1;
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px var(--ok-soft);
}

.timeline li.is-wait .dot {
  width: 14px;
  height: 14px;
  margin-top: 5px;
  margin-left: -2px;
  background: transparent;
  box-shadow: none;
  border: 2px solid var(--brand-soft);
  border-top-color: var(--brand);
  transform: rotate(var(--turn));
  animation: spin var(--spin-ms) linear infinite;
  animation-delay: var(--spin-sync);
}

.timeline li.is-bad .dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px var(--danger-soft);
}

/* 后面还没走到的步骤：淡灰空心点，标题也淡下来。 */
.timeline li.is-next .dot {
  background: var(--surface-high);
  border: 2px solid var(--hair);
  box-shadow: 0 0 0 4px var(--surface-high);
}

.timeline li.is-next strong {
  color: var(--muted);
  font-weight: 500;
}

/* 人工处理中（待核对）：琥珀实心点，不转圈——它在等人，不是自己在走。 */
.timeline li.is-review .dot {
  background: var(--warn);
  box-shadow: 0 0 0 4px var(--warn-soft);
}

.timeline li.is-review strong {
  color: var(--warn);
}

.timeline strong {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 8px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

/* 一行里：步骤名 + 紧挨着的秒数在左，完成时间戳顶到最右。 */
.timeline strong .step-name,
.timeline strong .step-time,
.timeline strong .step-at {
  display: inline;
  margin-top: 0;
}

/* 走完的环节在最右边写完成那一刻的时间戳。 */
.timeline strong .step-at {
  margin-left: auto;
  flex: none;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--faint);
  letter-spacing: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.timeline strong .step-name {
  min-width: 0;
}

/* 每个环节标题右边那枚计时：当前环节「已用」、走完的「耗时」。 */
.step-time {
  flex: none;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.step-time--done {
  color: var(--muted);
}

/* 当前环节在走，计时用品牌紫；人工处理中用琥珀，和那一步的点一个调。 */
.timeline li.is-wait .step-time {
  color: var(--brand-ink);
}

.timeline li.is-review .step-time {
  color: var(--warn);
}

/* 失败停下的那一步：名字和下面那行「充值失败」都用红。 */
.timeline li.is-bad strong .step-name,
.timeline li.is-bad > div > span {
  color: var(--danger);
}

.timeline span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.timeline .doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.timeline .btn-doc {
  min-height: 36px;
  padding: 0 16px;
  font-size: 14px;
}

.timeline .doc-note,
.timeline .doc-expired {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.5;
}

.timeline .doc-note {
  color: var(--muted);
}

.doc-date {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}

.timeline .doc-date {
  display: inline;
  margin-top: 0;
}

.timeline .doc-expired {
  color: var(--warn);
  font-weight: 500;
}

/* ---------- 横幅 ---------- */

.banner {
  margin-top: 22px;
  min-height: 52px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius);
  background: var(--ok-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  color: var(--ok);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
}

.banner--bad {
  background: var(--danger-soft);
  color: var(--danger);
}

/* 失败之后的下一步指引，跟在失败原因下面 */
.next-step {
  margin: 12px 0 0;
  color: var(--muted, #6b6f80);
  font-size: 14px;
  line-height: 1.6;
}

.banner--wait {
  background: var(--brand-soft);
  color: var(--brand-ink);
}

/* 充值中：别关 GPT 窗口、别退出登录的提醒，标题一行、说明一行 */
.banner--keep {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.banner--keep .banner__title {
  font-weight: 600;
}

.banner--keep .banner__note {
  color: var(--brand-ink);
}

/* 续费没关掉的提醒里，「不要同意降价降额度」那句用小字 */
.banner--keep .banner__small {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

/* 提醒正文里：取消路径单独一行、正常色加粗；路径之外的说明淡色 */
.banner--keep .banner__dim {
  color: var(--muted);
}

.banner--keep .banner__path {
  display: block;
  margin: 4px 0;
  color: var(--ink);
  font-weight: 600;
}

.banner--alert {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  background: var(--danger-soft);
  color: var(--danger);
}

.banner__title,
.banner__note {
  margin: 0;
}

.banner__note {
  color: var(--warn);
  font-size: 14px;
  font-weight: 400;
}

/* ---------- 订阅结果 ---------- */

.account-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.account-head h2 {
  margin: 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  min-height: 116px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--surface-high);
  box-shadow: var(--shadow-pill);
  transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out);
}

.metric__label {
  margin: 0;
  flex: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.5;
}

.metric__value {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 42px;
  margin: 12px 0 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.metric__value--accent {
  color: var(--spark);
}

.metric__value--tags {
  gap: 8px;
  flex-wrap: wrap;
}

.metric__aside {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.5;
}

.metric--copy {
  cursor: pointer;
}

.metric--copy:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 2px rgba(20, 22, 43, 0.05), 0 20px 36px -22px rgba(20, 22, 43, 0.45);
}

.metric--copy:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.metric--copy.is-copied .metric__label::after,
.metric--copy.is-copy-failed .metric__label::after {
  margin-left: 8px;
  font-weight: 500;
}

.metric--copy.is-copied .metric__label::after {
  content: "已复制";
  color: var(--ok);
}

.metric--copy.is-copy-failed .metric__label::after {
  content: "没复制上";
  color: var(--danger);
}

/* ---------- 卡密与复制 ---------- */

.result-card .result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.result-card .code-line {
  flex: 1;
  min-width: 0;
  margin: 0;
  flex-wrap: nowrap;
}

.result-card .eyebrow {
  margin: 0;
  color: var(--muted);
}

.result-card .code,
.code-line .code {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.25;
  color: var(--ink);
}

.result-card .meta .code--mark {
  color: var(--brand-ink);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.result-card .meta .code-line {
  margin: 0;
}

.code-line {
  margin: 8px 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.copy-btn {
  flex: 0 0 auto;
  height: 26px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--sunk);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 250ms var(--ease-ui), color 250ms var(--ease-ui);
}

.copy-btn:hover {
  background: var(--brand-soft);
  color: var(--brand-ink);
}

.copy-btn.is-copied {
  background: var(--ok-soft);
  color: var(--ok);
}

.result-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.result-card .timeline {
  margin-top: 24px;
}

/* ---------- 订阅同步 ---------- */

.sync-row {
  margin-top: 18px;
}

.sync-hint {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.sync-btn {
  min-height: 28px;
  margin-left: 6px;
  padding: 0 14px;
  font-size: 13px;
  vertical-align: baseline;
}

.sync-note {
  margin: 8px 0 0;
  color: var(--ok);
  font-size: 14px;
  font-weight: 500;
}

.sync-note.is-bad {
  color: var(--danger);
}

.renew-actions {
  margin-top: 22px;
}

.renew-actions .btn {
  min-height: 40px;
  padding: 0 20px;
  font-size: 14px;
}

.payment-row {
  margin-top: 16px;
  min-height: 80px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: var(--radius);
  background: var(--surface-high);
  box-shadow: var(--shadow-pill);
}

.payment-row p {
  margin: 6px 0 0;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* ---------- 定义列表 ---------- */

.dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.dl div {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--surface-high);
  box-shadow: var(--shadow-pill);
}

.dl dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 2;
}

.dl dd {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

/* ---------- 查询表格（白色胶囊行） ---------- */

.status-table-wrap {
  overflow-x: auto;
  margin-top: 10px;
}

.status-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.status-table th {
  padding: 4px 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: left;
}

.status-table td {
  padding: 16px 14px;
  background: var(--surface-high);
  box-shadow: var(--shadow-pill);
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  vertical-align: middle;
}

.status-table td:first-child {
  border-radius: 14px 0 0 14px;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

.status-table td:last-child {
  border-radius: 0 14px 14px 0;
}

.status-table tbody tr {
  transition: transform 260ms var(--ease-out);
}

.status-table tbody tr:hover {
  transform: translateY(-1px);
}

.status-table th:last-child,
.status-table td:last-child {
  width: 120px;
  text-align: right;
}

.status-table td:last-child .chip {
  margin-left: auto;
}

.status-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.status-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.kbd {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 7px;
  background: var(--surface-high);
  box-shadow: var(--shadow-pill), inset 0 -1px 0 rgba(20, 22, 43, 0.08);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
}

[hidden] {
  display: none !important;
}

/* ---------- 窄屏 ---------- */

@media (max-width: 720px) {
  body {
    font-size: 15px;
  }

  .site-header__inner {
    width: calc(100% - 32px);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 14px;
    padding: 14px 0;
  }

  .header-spacer {
    display: none;
  }

  .primary-nav {
    width: 100%;
  }

  .primary-nav button {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 34px;
    height: auto;
    padding: 8px 10px;
    font-size: 13px;
  }

  .page {
    width: calc(100% - 40px);
    padding: 40px 0 80px;
  }

  .page-intro {
    margin-bottom: 28px;
  }

  .page-intro h1 {
    font-size: 26px;
    letter-spacing: -0.03em;
  }

  .page-intro p {
    font-size: 16px;
  }

  .card {
    width: 100%;
    padding: 22px 18px;
    border-radius: 18px;
  }

  .card h2 {
    font-size: 22px;
  }

  .dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .meta div {
    grid-template-columns: 92px minmax(0, 1fr);
    padding: 10px 14px;
  }

  .board,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .stepper {
    padding: 20px 10px;
  }

  .stepper li {
    font-size: 12px;
  }

  /* 手机上主操作按钮铺满一行，次操作跟在下面 */
  .actions {
    gap: 10px;
  }

  .actions .btn {
    flex: 1 1 100%;
  }

  .actions .sync-btn,
  .actions .btn-doc {
    flex: 0 0 auto;
  }

  .result-card .code {
    font-size: 17px;
  }

  .app-shell::after {
    background-size: 48px 48px, 48px 48px;
  }
}

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

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Toast ---------- */

.toast-stack {
  position: fixed;
  left: 50%;
  top: 88px;
  z-index: 80;
  display: grid;
  gap: 10px;
  justify-items: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  max-width: min(420px, calc(100vw - 32px));
  padding: 13px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 2px 6px rgba(20, 22, 43, 0.06), 0 24px 48px -20px rgba(20, 22, 43, 0.6);
  pointer-events: auto;
  cursor: pointer;
  animation: toast-in 320ms var(--ease-out) both;
}

.toast--ok {
  background: var(--ok);
}

.toast--bad {
  background: var(--danger);
}

.toast.is-out {
  animation: toast-out 280ms var(--ease-ui) both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate3d(0, -14px, 0) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes toast-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translate3d(0, -8px, 0); }
}

/* ---------- 查询中心：作废并换新（给代理用） ---------- */
.swap-open {
  margin-left: auto;
  color: var(--danger);
}

.swap-card .actions {
  margin-top: 16px;
}

/* 代理密钥（2026-11-22）：在确认按钮上方；存过一把就只剩一行「已保存代理密钥 · 换一把」 */
.swap-key {
  margin-top: 18px;
}

.swap-key .feedback {
  margin-top: 0;
}

.swap-key-saved {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.swap-key-change {
  margin: 0 0 0 10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.swap-key-change:hover {
  text-decoration-thickness: 2px;
}

.swap-warn {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--danger-soft);
  color: #8f2630;
  font-size: 14px;
  line-height: 1.7;
}

.swap-warn--once {
  background: var(--warn-soft);
  color: #7a4a0c;
}

.swap-table {
  margin-top: 16px;
}

.swap-table td:first-child {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(20, 22, 43, 0.3);
}

.swap-table tr.is-failed td:first-child {
  text-decoration: none;
}

.swap-new {
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  user-select: all;
}

.swap-fail {
  color: #a5323c;
  font-size: 13.5px;
}

@media (max-width: 720px) {
  .swap-open {
    margin-left: 0;
  }

  .swap-card .actions .btn {
    flex: 1 1 100%;
  }

  .swap-table thead {
    display: none;
  }

  .swap-table,
  .swap-table tbody,
  .swap-table tr,
  .swap-table td {
    display: block;
    width: 100%;
  }

  .swap-table tr {
    margin-bottom: 10px;
  }

  .swap-table td {
    border-radius: 0 !important;
    padding: 6px 14px;
    word-break: break-all;
  }

  .swap-table td:first-child {
    border-radius: 14px 14px 0 0 !important;
    padding-top: 12px;
  }

  .swap-table td:last-child {
    border-radius: 0 0 14px 14px !important;
    padding-bottom: 12px;
  }
}

/* 更换结果表：三列都靠左、卡号不折行，窄了横向滚 */
.swap-table th,
.swap-table td,
.swap-table th:last-child,
.swap-table td:last-child {
  text-align: left;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .swap-table td,
  .swap-table td:last-child {
    white-space: normal;
  }
}
