/* HiZero 账号门户。暗色玻璃拟态：深石板底、靛蓝强调、克制的网格光效。
   CSP 是 style-src 'self'：本文件之外不允许内联样式，脚本也不写 style 属性。
   动效只动 transform / opacity，并完整尊重 prefers-reduced-motion。
   375px 窄屏为准：所有多列在 840px / 640px 以下折成单列，表格改为纵向卡片，
   页面不出现横向滚动。 */

:root {
  color-scheme: dark;
  --bg: #070a10;
  --surface: rgba(255, 255, 255, .045);
  --surface-strong: rgba(255, 255, 255, .07);
  --surface-inset: rgba(3, 7, 13, .55);
  --line: rgba(255, 255, 255, .11);
  --line-soft: rgba(255, 255, 255, .07);
  --ink: #eef1f7;
  --ink-2: #c7ceda;
  --ink-soft: #8e99aa;
  --ink-faint: #7b8799;
  --indigo: #6366f1;
  --indigo-bright: #818cf8;
  --indigo-deep: #4f46e5;
  --cyan: #22d3ee;
  --brand: #2dd4bf;
  --brand-deep: #5eead4;
  --good: #34d399;
  --good-bg: rgba(52, 211, 153, .10);
  --good-line: rgba(52, 211, 153, .30);
  --bad: #f87171;
  --bad-bg: rgba(248, 113, 113, .10);
  --bad-line: rgba(248, 113, 113, .30);
  --warn: #fbbf24;
  --warn-bg: rgba(251, 191, 36, .10);
  --warn-line: rgba(251, 191, 36, .30);
  --radius: 12px;
  --radius-card: 20px;
  --shadow: 0 24px 60px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .05);
  --font-sans: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-num: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html { background: var(--bg); }
html, body { margin: 0; min-height: 100%; }

body {
  color: var(--ink);
  font: 14px/1.65 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  background:
    radial-gradient(1100px 620px at 50% -12%, rgba(99, 102, 241, .20), transparent 62%),
    radial-gradient(900px 520px at 92% 2%, rgba(34, 211, 238, .07), transparent 58%),
    var(--bg);
  /* 唯一的横向溢出防线：任何子元素都不允许把页面撑宽。 */
  overflow-x: hidden;
}

/* 顶部渐隐的细网格：只做背景，不拦截指针。 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 58% at 50% 0%, #000 18%, transparent 76%);
  mask-image: radial-gradient(ellipse 80% 58% at 50% 0%, #000 18%, transparent 76%);
}

.top, .page, .foot, .toast, .skip { position: relative; z-index: 1; }

:where(a) { color: var(--brand-deep); }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface-strong);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 0 0 var(--radius) 0;
  z-index: 10;
}
.skip:focus { left: 0; }

/* ---------------------------------------------------------------- header */

.top {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px clamp(12px, 4vw, 32px);
  background: rgba(8, 12, 19, .72);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mark { display: block; border-radius: 9px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
.brand-name { font-weight: 650; letter-spacing: .01em; color: var(--ink); }
.brand-sub { color: var(--ink-soft); font-size: 12px; }

.tabs {
  display: flex;
  gap: 2px;
  margin-left: auto;
  padding: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, .045);
  flex-wrap: wrap;
}
.tabs a {
  display: block;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  font-size: 13px;
  transition: color .15s ease, background-color .15s ease;
}
.tabs a:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
.tabs a[aria-current="page"] {
  color: #fff;
  background: linear-gradient(135deg, rgba(99, 102, 241, .95), rgba(79, 70, 229, .95));
  box-shadow: 0 6px 18px rgba(79, 70, 229, .34);
}

.who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.who-name {
  color: var(--ink-soft);
  font-size: 13px;
  max-width: 30vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .top { gap: 8px; }
  .tabs { margin-left: 0; order: 3; width: 100%; justify-content: center; }
  .who { margin-left: auto; }
  .who-name { max-width: 40vw; }
}

/* ---------------------------------------------------------------- layout */

.page {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 36px) clamp(12px, 4vw, 32px) 44px;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .022));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 28px);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.card + .card { margin-top: 16px; }

.card-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.card-head h2 { margin: 0; font-size: 15px; font-weight: 650; }
.card-head .hint { color: var(--ink-soft); font-size: 12px; }

h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -.01em; }
.lead { color: var(--ink-soft); margin: 0 0 20px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -.01em;
}
.section-title::before {
  content: "";
  width: 3px;
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--indigo-bright), var(--indigo-deep));
  box-shadow: 0 0 14px rgba(99, 102, 241, .55);
}
.section-hint { font-size: 12px; color: var(--ink-soft); }

/* ---------------------------------------------------------------- forms */

.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 12px; color: var(--ink-soft); margin-bottom: 5px; }

input[type="text"], input[type="password"], input[type="email"], textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-inset);
  color: var(--ink);
  font: inherit;
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
textarea { min-height: 72px; resize: vertical; }
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--indigo-bright);
  outline-offset: 2px;
}

button {
  font: inherit;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 10px 16px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--indigo), var(--indigo-deep));
  color: #fff;
  font-weight: 560;
  box-shadow: 0 8px 22px rgba(79, 70, 229, .30);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
button:hover:not(:disabled) {
  background: linear-gradient(135deg, #7c7ff5, #5b52ee);
  box-shadow: 0 10px 28px rgba(79, 70, 229, .42);
}
button:disabled { opacity: .5; cursor: not-allowed; }
button.ghost {
  background: rgba(255, 255, 255, .04);
  color: var(--ink-2);
  border-color: var(--line);
  padding: 5px 11px;
  box-shadow: none;
}
button.ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .08); }
button.small { padding: 9px 14px; font-size: 13px; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

/* ---------------------------------------------------------------- overview */

.overview {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr);
}

.stat {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .018));
  min-width: 0;
}
.stat-primary {
  border-color: rgba(129, 140, 248, .22);
  background:
    radial-gradient(420px 200px at 0% 0%, rgba(99, 102, 241, .22), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
}
.stat-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--ink-soft);
}
.stat-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--indigo-bright);
  background: rgba(99, 102, 241, .14);
  border: 1px solid rgba(129, 140, 248, .26);
}
.stat-icon.cyan {
  color: var(--cyan);
  background: rgba(34, 211, 238, .10);
  border-color: rgba(34, 211, 238, .24);
}
.stat-icon.good {
  color: var(--good);
  background: var(--good-bg);
  border-color: var(--good-line);
}
.stat-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 14px 0 2px;
  min-width: 0;
}
.stat-value.compact { margin: 16px 0 4px; }
.big-num {
  font-family: var(--font-num);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: #fff;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.metric-num {
  font-family: var(--font-num);
  font-size: 26px;
  font-weight: 650;
  line-height: 1.1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.stat-unit { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.stat-sub { font-size: 12px; color: var(--ink-soft); }
.stat-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--ink-2);
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line-soft);
  white-space: nowrap;
}
.badge.good { color: var(--good); background: var(--good-bg); border-color: var(--good-line); }
.badge.warn { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }

.split { display: grid; gap: 11px; margin-top: 16px; }
.split-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  min-width: 0;
}
.split-label { display: flex; align-items: center; gap: 7px; color: var(--ink-soft); min-width: 0; }
.split-row b {
  font-family: var(--font-num);
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.split-end { display: flex; align-items: center; gap: 6px; color: var(--ink-2); min-width: 0; }
.split-end strong { font-weight: 600; color: var(--ink); }
.split-end.muted { color: var(--ink-faint); }
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
  background: var(--ink-faint);
}
.dot.good { background: var(--good); box-shadow: 0 0 8px rgba(52, 211, 153, .55); }
.dot.cyan { background: var(--cyan); box-shadow: 0 0 8px rgba(34, 211, 238, .55); }
.dot.warn { background: var(--warn); box-shadow: 0 0 8px rgba(251, 191, 36, .45); }
.stat-note { margin: 14px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--ink-faint); }

/* ---------------------------------------------------------------- plans */

.plans {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

.plan {
  position: relative;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 22px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.plan[data-selected="true"] { border-color: var(--indigo-bright); background: rgba(255, 255, 255, .055); }
.plan-name { font-size: 13px; font-weight: 600; color: var(--ink-2); letter-spacing: .04em; }
.plan-credits {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-num);
  font-size: 30px;
  font-weight: 650;
  line-height: 1.15;
  color: #fff;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.plan-unit { font-family: var(--font-sans); font-size: 12px; font-weight: 400; color: var(--ink-soft); }
.plan-bonus { font-size: 12px; color: var(--brand-deep); }
.plan-price { font-family: var(--font-num); font-size: 13px; color: var(--ink-soft); }
.plan-meta { font-size: 11.5px; color: var(--ink-faint); }
.plan button { margin-top: auto; width: 100%; }

/* 申请额度卡：带图标与高亮边框的版本。 */
.mock-plan { padding: 22px; gap: 10px; }
.mock-plan:hover {
  border-color: rgba(129, 140, 248, .34);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .32);
}
.mock-plan .plan-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: var(--indigo-bright);
  font-size: 17px;
  background: rgba(99, 102, 241, .14);
  border: 1px solid rgba(129, 140, 248, .28);
  margin-bottom: 6px;
}
.mock-plan button { margin-top: 16px; }
.plan-featured {
  border-color: rgba(129, 140, 248, .55);
  background:
    radial-gradient(520px 240px at 50% 0%, rgba(99, 102, 241, .24), transparent 72%),
    linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  box-shadow: 0 0 0 1px rgba(129, 140, 248, .22), 0 26px 64px rgba(79, 70, 229, .26);
}
.plan-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--indigo-bright);
  background: rgba(99, 102, 241, .16);
  border: 1px solid rgba(129, 140, 248, .32);
  white-space: nowrap;
}
.monthly-plan { padding: 20px; }
.monthly-plan .plan-credits { font-size: 26px; }

/* ---------------------------------------------------------------- tables */

.list { width: 100%; border-collapse: collapse; }
.list th, .list td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line-soft); }
.list th { font-size: 12px; font-weight: 500; color: var(--ink-soft); }
.list td { vertical-align: top; color: var(--ink-2); }
.list tbody tr:last-child td { border-bottom: 0; }
.list .num { font-family: var(--font-num); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.list .when { color: var(--ink-soft); font-size: 12px; white-space: nowrap; }
.list td[data-tone="good"] { color: var(--good); }
.list td[data-tone="bad"] { color: var(--bad); }

@media (max-width: 640px) {
  /* 窄屏把表格折成卡片：横向滚动在 375px 上等于内容不可见。 */
  .list thead { display: none; }
  .list, .list tbody, .list tr, .list td { display: block; width: 100%; }
  .list tr {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 8px 10px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, .025);
  }
  .list td { border: 0; padding: 2px 0; }
  .list .num { text-align: left; }
}

/* ---------------------------------------------------------------- states */

.tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--line);
  color: var(--ink-2);
  background: rgba(255, 255, 255, .04);
  white-space: nowrap;
}
.tag[data-tone="good"] { color: var(--good); border-color: var(--good-line); background: var(--good-bg); }
.tag[data-tone="bad"] { color: var(--bad); border-color: var(--bad-line); background: var(--bad-bg); }
.tag[data-tone="warn"] { color: var(--warn); border-color: var(--warn-line); background: var(--warn-bg); }

.empty, .loading {
  color: var(--ink-soft);
  font-size: 13px;
  padding: 18px 0;
  text-align: center;
}
.empty {
  border: 1px dashed var(--line-soft);
  border-radius: var(--radius);
  padding: 28px 16px;
  margin-top: 6px;
}
.empty::before {
  content: "";
  display: block;
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 38%, rgba(129, 140, 248, .30) 0 4px, transparent 5px),
    linear-gradient(180deg, rgba(255, 255, 255, .05), transparent);
}

.notice {
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 12px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .04);
  color: var(--ink-2);
}
.notice[data-tone="bad"] { border-color: var(--bad-line); background: var(--bad-bg); color: var(--bad); }
.notice[data-tone="warn"] { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn); }

.terms { font-size: 12px; color: var(--ink-soft); margin-top: 16px; }
.terms b { color: var(--ink-2); font-weight: 600; }

/* ---------------------------------------------------------------- footer */

.foot {
  padding: 16px clamp(12px, 4vw, 32px) 26px;
  color: var(--ink-faint);
  font-size: 12px;
  text-align: center;
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}
.foot .dot { color: var(--line); }

/* ---------------------------------------------------------------- toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: rgba(16, 22, 34, .94);
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, .5);
  max-width: calc(100vw - 32px);
  z-index: 20;
}

@media (prefers-reduced-motion: no-preference) {
  .toast { animation: rise .18s ease-out; }
  .view { animation: fade .16s ease-out; }
  .mock-plan, .plan { transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
  .mock-plan:hover { transform: translateY(-2px); }
}

@keyframes rise {
  from { opacity: 0; transform: translate(-50%, 6px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------------------------------------------------------------- credits page */

.back-download { margin-left: 18px; font-size: 12px; font-weight: 560; color: var(--ink-soft); text-decoration: none; }
.back-download:hover { color: var(--brand-deep); }

.mock-recharge { display: grid; gap: 20px; }

.mock-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(30px, 5vw, 56px);
  border-radius: 26px;
  border: 1px solid rgba(129, 140, 248, .20);
  background:
    radial-gradient(720px 320px at 16% 0%, rgba(99, 102, 241, .38), transparent 64%),
    radial-gradient(620px 340px at 100% 100%, rgba(34, 211, 238, .16), transparent 60%),
    linear-gradient(118deg, #151d33 0%, #0b1120 56%, #101a2c 100%);
  box-shadow: 0 34px 90px rgba(0, 0, 0, .46), inset 0 1px 0 rgba(255, 255, 255, .07);
  color: #fff;
}

/* 网格线：只在右上区域显出，避免整块发灰。 */
.mock-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 72% 92% at 74% 30%, #000 0%, transparent 74%);
  mask-image: radial-gradient(ellipse 72% 92% at 74% 30%, #000 0%, transparent 74%);
}

/* 光斑与斜向光带。 */
.mock-hero::after {
  content: "";
  position: absolute;
  top: -190px;
  right: -150px;
  width: 560px;
  height: 520px;
  transform: rotate(-24deg);
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(closest-side at 50% 50%, rgba(129, 140, 248, .30), transparent 72%),
    linear-gradient(100deg, transparent 38%, rgba(189, 218, 238, .10) 50%, rgba(255, 255, 255, .035) 58%, transparent 72%);
  border-left: 1px solid rgba(255, 255, 255, .08);
  filter: blur(.4px);
}

.mock-eyebrow {
  font-size: 11px;
  letter-spacing: .24em;
  color: #9db4d8;
  font-weight: 650;
  margin-bottom: 20px;
}
.mock-hero h1 {
  font-size: clamp(28px, 4.4vw, 46px);
  letter-spacing: -.035em;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
}
.mock-hero p {
  color: #b9c6d9;
  font-size: 14px;
  line-height: 1.85;
  max-width: 64ch;
  margin: 17px 0 28px;
}
.mock-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.step {
  font-size: 11.5px;
  color: #e6eef2;
  background: rgba(255, 255, 255, .075);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.step-arrow { color: rgba(255, 255, 255, .30); font-size: 13px; }

.credits-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid rgba(129, 140, 248, .28);
  border-radius: 14px;
  background: rgba(99, 102, 241, .10);
}
.credits-switch strong { display: block; color: var(--ink); font-size: 13px; }
.credits-switch small { display: block; margin-top: 3px; color: var(--ink-soft); font-size: 11.5px; line-height: 1.6; }
.credits-switch a { flex: none; color: var(--indigo-bright); font-size: 12.5px; white-space: nowrap; }
@media (max-width: 640px) {
  .credits-switch { align-items: flex-start; flex-direction: column; }
}

.application-result:empty { display: none; }
.application-result:not(:empty) { margin-top: 16px; }
.application-list { display: grid; gap: 0; }
.application-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px 2px;
  border-bottom: 1px solid var(--line-soft);
}
.application-row:last-child { border-bottom: 0; }
.application-row strong { font-size: 13px; font-weight: 620; color: var(--ink); }
.application-row p { margin: 3px 0 0; font-size: 12px; }
.application-row .tag { flex-shrink: 0; }

@media (max-width: 840px) {
  .overview { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .mock-hero { border-radius: 18px; }
  .mock-hero p { font-size: 13px; }
  .back-download { display: none; }
  .mock-plan { padding: 18px; }
  .application-row { gap: 9px; }
  .stat { padding: 18px; }
}

/* ---------------------------------------------------------------- 对话入口 */
/*
   D151：网页版对话入口。布局照桌面对话页（会话栏 → 顶栏 → 转录 → 输入岛），
   颜色与圆角沿用门户的暗色令牌，避免同站出现第二套皮肤。
   窄屏（≤820px）收起会话栏，只留一列；输入框跟随安全区，触屏上不强制 Enter 发送。
*/

body.is-chat { height: 100dvh; overflow: hidden; }
body.is-chat .page {
  max-width: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
/* 页面里真正装视图的是 #view，不是 .chat-shell；它不撑开，输入岛就浮在半空。 */
body.is-chat .view {
  flex: 1;
  min-height: 0;
  display: flex;
}
body.is-chat .foot { display: none; }

.chat-shell {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
}

/* 会话栏 */

.chat-rail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  gap: 10px;
  padding: 14px 12px;
  border-right: 1px solid var(--line-soft);
  background: rgba(8, 12, 19, .46);
}

.chat-rail-head { display: flex; flex-direction: column; gap: 10px; }
.chat-new {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}
.chat-new:hover:not(:disabled) { background: rgba(255, 255, 255, .10); box-shadow: none; }
.chat-rail-eye {
  padding: 0 6px;
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--ink-faint);
}

.chat-sessions {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-rail-empty {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
  padding: 14px 12px;
  border: 1px dashed var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, .02);
}
.chat-rail-empty strong { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.chat-rail-empty span { font-size: 11.5px; line-height: 1.5; color: var(--ink-faint); }

.chat-rail-foot {
  margin: 0;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-faint);
}

/* 主列 */

.chat-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.chat-top {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(8, 12, 19, .42);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.chat-titles { min-width: 0; display: flex; flex-direction: column; }
.chat-titles strong {
  font-size: 14px;
  font-weight: 620;
  color: var(--ink);
  line-height: 1.3;
}
.chat-titles span {
  font-size: 11.5px;
  color: var(--ink-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-status {
  margin-left: auto;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--warn-line);
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 11.5px;
  font-weight: 560;
  white-space: nowrap;
}
.chat-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}
.chat-status[data-state="ready"] {
  border-color: var(--good-line);
  background: var(--good-bg);
  color: var(--good);
}

.chat-rail-toggle {
  display: none;
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  color: var(--ink-2);
  box-shadow: none;
  font-size: 16px;
  line-height: 1;
}
.chat-rail-toggle:hover:not(:disabled) { background: rgba(255, 255, 255, .09); box-shadow: none; }

/* 转录 */

.chat-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 5vh, 54px) 20px 26px;
}
.chat-thread {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(8px, 4vh, 48px) 0 0;
}
/* 空态是转录用意的唯一内容时居中；一旦出现提示或消息，回到顶部阅读顺序。 */
.chat-hero:only-child {
  margin-block: auto;
  padding-top: 0;
}
.chat-hero[hidden] { display: none; }
.chat-hero-mark {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 18px 40px rgba(0, 0, 0, .35);
}
.chat-eyebrow {
  margin: 18px 0 0;
  font-size: 10.5px;
  letter-spacing: .16em;
  color: var(--ink-faint);
}
.chat-hero h1 {
  margin: 10px 0 0;
  font-size: clamp(23px, 3.6vw, 30px);
  font-weight: 650;
  letter-spacing: -.01em;
  color: var(--ink);
}
.chat-lead {
  max-width: 46ch;
  margin: 10px auto 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.chat-suggest {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}
.chat-suggest-btn {
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .045);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: none;
}
.chat-suggest-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .18);
  color: var(--ink);
  box-shadow: none;
}

.chat-notice {
  align-self: center;
  max-width: 56ch;
  margin: 2px 0;
  padding: 9px 13px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, .035);
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.6;
  text-align: center;
}
.chat-notice[data-tone="bad"] {
  border-color: var(--bad-line);
  background: var(--bad-bg);
  color: var(--bad);
}

.chat-msg { display: flex; gap: 10px; min-width: 0; }
.chat-msg-user { justify-content: flex-end; }
.chat-bubble {
  max-width: min(560px, 86%);
  padding: 10px 14px;
  border-radius: 16px 16px 5px 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .075);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-avatar {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(99, 102, 241, .9), rgba(79, 70, 229, .9));
  color: #fff;
  font-size: 11px;
  box-shadow: 0 6px 16px rgba(79, 70, 229, .3);
}
.chat-msg-body {
  min-width: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
}

/* 输入岛 */

.chat-composer {
  flex: none;
  margin: 0;
  padding: 8px clamp(12px, 3vw, 24px) calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(7, 10, 16, 0), rgba(7, 10, 16, .92) 38%);
}
.chat-composer-inner {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.chat-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 12px 10px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(9, 13, 21, .88);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .04);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.chat-input {
  width: 100%;
  min-height: 30px;
  max-height: 180px;
  padding: 2px 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 15px/1.55 var(--font-sans);
  resize: none;
  field-sizing: content;
  overflow-y: auto;
}
.chat-input:focus-visible { outline: none; }

.chat-tools { display: flex; align-items: center; gap: 8px; min-width: 0; }
.chat-chip {
  flex: none;
  padding: 3px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  color: var(--ink-soft);
  font-size: 11px;
  white-space: nowrap;
}
.chat-hint {
  margin-left: auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--ink-faint);
}
.chat-send {
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--indigo), var(--indigo-deep));
  color: #fff;
  font-size: 17px;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(79, 70, 229, .34);
}
.chat-send:hover:not(:disabled) { box-shadow: 0 10px 26px rgba(79, 70, 229, .46); }

.chat-note {
  margin: 9px 2px 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink-faint);
  text-align: center;
}

.chat-scrim { display: none; }

/* 窄屏：与移动端一致，只留一列；会话栏改为覆盖式抽屉。 */

@media (max-width: 820px) {
  .chat-shell { grid-template-columns: minmax(0, 1fr); }
  .chat-rail-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .chat-rail {
    /* 门户的 z-index 分层里，整页内容在顶栏之下；抽屉因此定位在 .page（顶栏下方）
       而不是视口，否则「新对话」会藏到顶栏后面。 */
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    width: min(300px, 84vw);
    padding-top: 14px;
    background: rgba(10, 14, 22, .97);
    transform: translateX(-102%);
    transition: transform .22s ease;
  }
  .chat-shell[data-rail="open"] .chat-rail { transform: translateX(0); }

  .chat-scrim {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 25;
    border: 0;
    padding: 0;
    border-radius: 0;
    background: rgba(3, 6, 12, .58);
    box-shadow: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
  }
  .chat-shell[data-rail="open"] .chat-scrim { opacity: 1; pointer-events: auto; }

  .chat-top { padding: 9px 12px; }
  .chat-scroll { padding: 16px 14px 12px; }
  .chat-hero { padding-top: 6px; }
  .chat-hero h1 { font-size: 23px; }
  .chat-lead { font-size: 13px; }
  .chat-composer { padding: 6px 10px calc(16px + env(safe-area-inset-bottom)); }
  .chat-box { border-radius: 18px; }
  /* iOS 在字号小于 16px 的输入框上会自动放大页面。 */
  .chat-input { font-size: 16px; }
  .chat-hint { display: none; }
}

@media (max-width: 640px) {
  body.is-chat .top { padding: 8px 12px; }
  body.is-chat .brand-sub,
  body.is-chat .back-download { display: none; }
  body.is-chat .tabs { padding: 3px; }
  body.is-chat .tabs a { padding: 5px 10px; font-size: 12.5px; }
  .chat-suggest { flex-direction: column; width: 100%; max-width: 320px; margin-left: auto; margin-right: auto; }
  .chat-suggest-btn { width: 100%; }
}

@media (max-width: 380px) {
  .chat-titles span { display: none; }
  .chat-status { padding: 4px 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .chat-rail,
  .chat-scrim { transition: none; }
}

/* ---------------------------------------------------------------- plan purchase */

/* 充值页用浅色高对比仪表盘：价格与标题必须是深色文字，不随暗色令牌变化。 */
.plans-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  color: #0f172a;
}

.plans-hero {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border: 1px solid rgba(129, 140, 248, .28);
  border-radius: 16px;
  background:
    radial-gradient(640px 280px at 12% 0%, rgba(99, 102, 241, .30), transparent 66%),
    radial-gradient(520px 260px at 100% 100%, rgba(34, 211, 238, .10), transparent 62%),
    linear-gradient(120deg, #121a2d 0%, #0a101c 60%, #0d1726 100%);
  box-shadow: 0 18px 48px rgba(2, 6, 23, .28), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.plans-eyebrow {
  margin: 0;
  color: #a5b4fc;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.plans-hero h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(26px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.plans-lead {
  max-width: none;
  margin: 0;
  color: #e2e8f0;
  font-size: 14px;
  line-height: 1.7;
}
.plans-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0;
  width: fit-content;
  margin: 4px 0;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, .32);
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
}
.plans-toggle button {
  border: 0;
  border-radius: 999px;
  padding: 6px 24px;
  background: transparent;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  box-shadow: none;
  cursor: pointer;
  transition: color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.plans-toggle button:hover:not(:disabled) { background: transparent; color: #ffffff; box-shadow: none; }
.plans-toggle button[aria-pressed="true"] {
  background: #4f46e5;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .12);
}
/* 选中态必须在悬停时保持可见：点完按钮后指针仍停在上面。 */
.plans-toggle button[aria-pressed="true"]:hover:not(:disabled) {
  background: #4338ca;
  color: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .16);
}
.plans-toggle-note { margin: 0; color: #e2e8f0; font-size: 12px; }

.plans-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-top: 4px;
  padding: 12px 16px;
  border: 1px solid rgba(252, 211, 77, .8);
  border-radius: 12px;
  background: #fffbeb;
  color: #b45309;
  font-size: 14px;
  line-height: 1.6;
}
.plans-status strong { margin-right: 8px; color: #92400e; font-weight: 700; white-space: nowrap; }
.plans-status span { color: #b45309; }
.plans-status a {
  flex: none;
  color: #4f46e5;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.plans-status a:hover { color: #3730a3; text-decoration: underline; }

.plans-steps { padding: 0; border: 0; border-radius: 0; background: transparent; }
.plans-steps-title { margin: 0 0 10px; color: #1e293b; font-size: 14px; font-weight: 700; letter-spacing: 0; }
.plans-steps ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.plans-steps li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 14px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f1f5f9;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}
.plans-step-num { flex: none; color: #4f46e5; font-family: var(--font-num); font-size: 12px; font-weight: 700; }
.plans-step-body { display: grid; flex: 1; gap: 2px; min-width: 0; }
.plans-step-body strong { color: #0f172a; font-size: 14px; font-weight: 700; line-height: 1.4; }
.plans-step-body span { color: #475569; font-size: 12px; line-height: 1.5; text-wrap: balance; }
.plans-step-arrow { flex: none; color: #94a3b8; font-weight: 700; }
.plans-steps-note { margin: 8px 0 0; color: #b45309; font-size: 12px; font-weight: 500; line-height: 1.6; }

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  align-items: stretch;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  min-width: 0;
  padding: 28px;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.plan-card:hover { box-shadow: 0 8px 24px rgba(15, 23, 42, .08); }
.plan-card-main { min-width: 0; }
.plan-card[data-tier="plus"] {
  padding: 27px;
  border: 2px solid #4f46e5;
  background: linear-gradient(180deg, rgba(238, 242, 255, .5) 0%, #fff 62%, #fff 100%);
  box-shadow: 0 10px 30px -5px rgba(79, 70, 229, .15);
}
.plan-card[data-tier="plus"]:hover { box-shadow: 0 14px 34px -5px rgba(79, 70, 229, .22); }
.plan-card[data-tier="pro"] {
  border: 1px solid rgba(252, 211, 77, .9);
  background: linear-gradient(180deg, rgba(255, 251, 235, .5) 0%, #fff 62%, #fff 100%);
  box-shadow: 0 10px 30px -5px rgba(245, 158, 11, .1);
}
.plan-card[data-tier="pro"]:hover { box-shadow: 0 14px 34px -5px rgba(245, 158, 11, .18); }
/* 主推卡本身已有靛蓝描边，选中时不再叠第二圈，避免像输入框聚焦环。 */
.plan-selected { outline: 2px solid #4f46e5; outline-offset: 3px; }
.plan-card.plan-recommended.plan-selected { outline: none; }
.plan-card[data-tier="pro"].plan-selected { outline-color: #f59e0b; }

.plan-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plan-card-head h2 { margin: 0; color: #0f172a; font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.plan-flag {
  flex: none;
  padding: 2px 12px;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  background: #e0e7ff;
  color: #4338ca;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.plan-card-summary { margin: 6px 0 0; min-height: 40px; color: #64748b; font-size: 14px; line-height: 1.6; text-wrap: balance; }
.plan-card[data-tier="plus"] .plan-card-summary,
.plan-card[data-tier="pro"] .plan-card-summary { color: #475569; }

.plan-card-price { display: flex; align-items: baseline; gap: 4px; min-width: 0; margin-top: 20px; }
.plan-card-amount {
  color: #0f172a;
  font-family: var(--font-sans);
  font-size: clamp(30px, 2.6vw, 36px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.plan-card-per { margin-left: 4px; color: #475569; font-size: 14px; font-weight: 500; white-space: nowrap; }
.plan-card-note { margin: 6px 0 0; color: #475569; font-size: 12px; line-height: 1.6; }

.plan-card-credits {
  display: grid;
  gap: 4px;
  margin: 20px 0;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 12px;
  background: #f1f5f9;
}
.plan-card-credits strong { color: #0f172a; font-size: 14px; font-weight: 700; line-height: 1.5; }
.plan-card-credits span { color: #334155; font-size: 12px; line-height: 1.5; }
.plan-card[data-tier="plus"] .plan-card-credits { border-color: rgba(199, 210, 254, .8); background: rgba(238, 242, 255, .8); }
.plan-card[data-tier="pro"] .plan-card-credits { border-color: rgba(253, 230, 138, .8); background: rgba(255, 251, 235, .8); }
.plan-card-credits .plan-installments {
  color: #4338ca;
  font-size: 11.5px;
  font-weight: 500;
}

.plan-buy {
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: #4f46e5;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .12);
  cursor: pointer;
  transition: background-color .16s ease, box-shadow .16s ease, filter .16s ease;
}
.plan-buy:hover:not(:disabled) { background: #4338ca; box-shadow: 0 4px 14px rgba(79, 70, 229, .3); }
.plan-card[data-tier="plus"] .plan-buy { font-weight: 700; box-shadow: 0 4px 14px rgba(79, 70, 229, .35); }
.plan-card[data-tier="plus"] .plan-buy:hover:not(:disabled) { background: #4338ca; }
.plan-card[data-tier="pro"] .plan-buy {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  color: #020617;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(245, 158, 11, .3);
}
.plan-card[data-tier="pro"] .plan-buy:hover:not(:disabled) {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  filter: brightness(1.05);
  box-shadow: 0 6px 18px rgba(245, 158, 11, .36);
}

.plan-features { min-width: 0; }
.plan-features-label {
  margin: 0 0 12px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.plan-features ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.plan-features li {
  position: relative;
  padding-left: 20px;
  color: #334155;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}
.plan-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #4f46e5;
  font-weight: 700;
}
.plan-card[data-tier="pro"] .plan-features li::before { color: #d97706; }
.plan-features-note { margin: 20px 0 0; color: #b45309; font-size: 12px; font-weight: 500; }

.plans-notes {
  padding: 24px;
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
  color: #475569;
  font-size: 12px;
  line-height: 1.75;
}
.plans-notes p { margin: 0; }
.plans-notes p + p { margin-top: 8px; }
.plans-notes a { color: #4f46e5; font-weight: 600; text-decoration: none; }
.plans-notes a:hover { text-decoration: underline; }
.plans-links a { color: #4f46e5; }
.plans-links span { color: #94a3b8; }

.checkout-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade .15s ease;
}
.checkout-dialog {
  width: min(520px, 100%);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .22);
}
.checkout-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.checkout-head h2 { margin: 4px 0 0; color: #0f172a; font-size: 21px; letter-spacing: -.01em; }
.checkout-head .mock-eyebrow { margin-bottom: 4px; }
.checkout-close {
  flex: none;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  box-shadow: none;
  font-size: 18px;
  line-height: 1;
}
.checkout-close:hover:not(:disabled) { background: #e2e8f0; color: #0f172a; }
.checkout-summary {
  display: grid;
  gap: 0;
  margin: 18px 0;
  padding: 4px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}
.checkout-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #eef2f6;
  font-size: 12.5px;
}
.checkout-row:last-child { border-bottom: 0; }
.checkout-row-label { color: #64748b; flex: none; white-space: nowrap; }
.checkout-row-value { color: #0f172a; text-align: right; font-weight: 560; min-width: 0; }
.checkout-total .checkout-row-value { font-family: var(--font-num); font-size: 22px; font-weight: 700; color: #0f172a; }
.pay-label { margin: 0 0 10px; font-size: 12px; color: #64748b; }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-method {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
}
.pay-method:hover:not(:disabled) { background: #f8fafc; box-shadow: none; }
.pay-method.is-selected {
  border-color: #4f46e5;
  background: #eef2ff;
  box-shadow: 0 0 0 1px rgba(79, 70, 229, .2);
}
.pay-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
}
.pay-method[data-method="wechat"] .pay-mark { color: #047857; background: #ecfdf5; border: 1px solid #a7f3d0; }
.pay-method[data-method="alipay"] .pay-mark { color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe; }
.pay-copy { display: grid; gap: 2px; min-width: 0; }
.pay-copy strong { font-size: 12.5px; color: #0f172a; }
.pay-copy small { color: #64748b; font-size: 11px; }
.checkout-status {
  margin-top: 12px;
  padding: 12px 13px;
  border-radius: 10px;
  display: grid;
  gap: 4px;
  font-size: 12px;
  line-height: 1.65;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.wechat-pay-qr {
  display: block;
  width: 224px;
  max-width: 100%;
  height: auto;
  justify-self: center;
  margin: 8px 0;
  background: #fff;
}
.checkout-status strong { color: #0f172a; }
.checkout-status[data-tone="warn"] { background: #fffbeb; border-color: #fcd34d; }
.checkout-status[data-tone="warn"] strong { color: #92400e; }
.checkout-status[data-tone="bad"] { background: #fff1f2; border-color: #f0c9cf; }
.checkout-status[data-tone="bad"] strong { color: #b43e4c; }
.checkout-terms { margin: 14px 0 0; color: #94a3b8; font-size: 11px; line-height: 1.6; }
.checkout-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.checkout-actions button { min-width: 84px; }

/* 2026-11-05 production hotfix: the plan screens sit inside the light portal shell.
   Keep the dark hero, but give steps, cards and the checkout dialog explicit light
   surfaces so white-on-light prices and dark-on-dark dialog text cannot recur. */
.plans-hero h1 { color: #fff; }
.plans-lead,
.plans-toggle-note,
.plans-toggle button { color: #cbd5e1; }
.plans-toggle { border-color: rgba(255, 255, 255, .18); }
.plans-steps { border-color: #e2e8f0; background: #fff; }
.plans-steps-title { color: #475569; }
.plans-steps li { border-color: #e2e8f0; background: #f1f5f9; }
.plans-steps li::before { color: #4f46e5; }
.plans-steps li strong { color: #0f172a; }
.plans-steps li span { color: #475569; }
.plans-steps-note { color: #b45309; }
.plan-card {
  border-color: #e2e8f0;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
}
.plan-recommended {
  border-color: #4f46e5;
  background: linear-gradient(180deg, rgba(238, 242, 255, .5), #fff 62%);
  box-shadow: 0 10px 30px -5px rgba(79, 70, 229, .15);
}
.plan-card[data-tier="pro"] {
  border-color: rgba(252, 211, 77, .9);
  background: linear-gradient(180deg, rgba(255, 251, 235, .5), #fff 62%);
}
.plan-card-head h2 { color: #0f172a; }
.plan-card-summary { color: #64748b; }
.plan-card-amount { color: #0f172a; }
.plan-card-per,
.plan-card-note { color: #475569; }
.plan-flag { color: #4338ca; background: #e0e7ff; border-color: #c7d2fe; }
.plan-card[data-tier="pro"] .plan-flag {
  color: #b45309;
  background: #fef3c7;
  border-color: #fde68a;
}
.plan-card-credits { background: #f1f5f9; border-color: #e2e8f0; }
.plan-card[data-tier="plus"] .plan-card-credits { background: #eef2ff; border-color: #c7d2fe; }
.plan-card[data-tier="pro"] .plan-card-credits { background: #fffbeb; border-color: #fde68a; }
.plan-card-credits strong { color: #0f172a; }
.plan-card-credits span { color: #334155; }
.plan-card-credits .plan-pending { color: #b45309; }
.plan-card-credits .plan-installments { color: #4338ca; }
.plan-features { border-top-color: #f1f5f9; }
.plan-features-label { color: #475569; }
.plan-features li { color: #334155; }
.plan-features-note { color: #b45309; }
.plans-notes { border-color: #e2e8f0; background: #fff; color: #475569; }
.plans-links a { color: #28579d; }
.plans-links span { color: #94a3b8; }

.checkout-dialog {
  border-color: #e2e8f0;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 25px 80px rgba(0, 0, 0, .18);
}
.checkout-head h2 { color: #0f172a; }
.checkout-close { background: #f1f5f9; color: #334155; }
.checkout-summary { border-color: #e2e8f0; background: #f8fafc; }
.checkout-row { border-bottom-color: #e2e8f0; }
.checkout-row-label { color: #64748b; }
.checkout-row-value { color: #0f172a; }
.checkout-total .checkout-row-value { color: #0f172a; }
.pay-label { color: #64748b; }
.pay-method { border-color: #e2e8f0; background: #fff; color: #0f172a; }
.pay-method:hover:not(:disabled) { background: #f8fafc; }
.pay-method.is-selected {
  border-color: #4f46e5;
  background: #eef2ff;
  box-shadow: 0 0 0 1px rgba(79, 70, 229, .25);
}
.pay-method[data-method="wechat"] .pay-mark {
  color: #15803d;
  background: #ecfdf5;
  border-color: #bbf7d0;
}
.pay-method[data-method="alipay"] .pay-mark {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}
.pay-copy small { color: #64748b; }
.checkout-status {
  color: #475569;
  background: #f8fafc;
  border-color: #e2e8f0;
}
.checkout-status strong { color: #0f172a; }
.checkout-terms { color: #94a3b8; }

@media (max-width: 900px) {
  .plan-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .plan-card-summary { min-height: 0; }
  .plans-steps ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .plans-page { gap: 18px; }
  .plans-hero { padding: 20px; border-radius: 16px; }
  .plans-hero h1 { font-size: 26px; }
  .plans-toggle { width: 100%; }
  .plans-toggle button { flex: 1; padding: 8px 10px; }
  .plans-status { flex-direction: column; align-items: flex-start; gap: 8px; }
  .plans-status strong { display: block; margin: 0 0 2px; }
  .plans-steps ol { grid-template-columns: minmax(0, 1fr); }
  .plan-card { padding: 20px; }
  .plan-card[data-tier="plus"] { padding: 19px; }
  .plan-card-amount { font-size: 32px; }
  .plans-notes { padding: 18px; }
  .pay-methods { grid-template-columns: minmax(0, 1fr); }
  .checkout-dialog { border-radius: 18px; }
  .checkout-row { gap: 10px; }
}

/* ---------------------------------------------------------------- 邀请落地页
   `#/org-join?code=…` 是组织邀请接口返回的地址，必须真的能打开。
   沿用门户现有的卡片语言：一块居中窄栏、深色标题、浅色表单。 */
.join-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 28px;
  border: 1px solid #e3e8ef;
  border-radius: 16px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .06);
}

.join-page h1 { margin: 0; font-size: 20px; letter-spacing: -.02em; }

.join-note { margin: 0; color: #5b6674; font-size: 13px; line-height: 1.65; }

.join-form { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }

.join-field { display: flex; flex-direction: column; gap: 6px; }
.join-field > span { font-size: 12px; font-weight: 600; color: #44505f; }

.join-code {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d6dde6;
  border-radius: 10px;
  background: #fbfcfd;
  /* 邀请码要能逐字符核对，等宽字体比正文更好读。 */
  font: 13px/1.5 ui-monospace, "SF Mono", Consolas, monospace;
  color: #0f172a;
}
.join-code:focus { outline: 2px solid #93b4e6; outline-offset: 1px; border-color: #93b4e6; }

/* 失败原因来自服务端：用中性提示色，不用刺眼红条，也不把它伪装成成功。 */
.join-message {
  margin: 0;
  padding: 9px 12px;
  border: 1px solid #e6d9c4;
  border-radius: 10px;
  background: #fdf9f2;
  color: #7a5a2a;
  font-size: 13px;
}

.join-submit {
  align-self: flex-start;
  padding: 10px 18px;
  border: 0;
  border-radius: 10px;
  background: #1f2937;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.join-submit:hover { background: #111827; }
.join-submit:disabled { opacity: .55; cursor: default; }

.join-done { display: flex; flex-direction: column; gap: 12px; }
.join-done h1 { margin: 0; font-size: 20px; letter-spacing: -.02em; }

@media (max-width: 560px) {
  .join-page { padding: 20px; border-radius: 14px; }
  .join-submit { align-self: stretch; text-align: center; }
}
