/* ============ 基础 ============ */
:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --accent: #8b5cf6;
  --text: #0f172a;
  --text-sub: #64748b;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --border: #e2e8f0;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --header-h: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: min(1180px, 92%); margin: 0 auto; }
.container.narrow { width: min(820px, 92%); }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 6px 18px rgba(59, 130, 246, .35);
}
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 8px 22px rgba(59, 130, 246, .45); }

.btn-outline { border-color: var(--border); color: var(--text); background: #fff; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-ghost { color: var(--text-sub); padding: 10px 12px; }
.btn-ghost:hover { color: var(--primary); }

.btn-light { background: #fff; color: var(--primary-dark); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.btn-light:hover { transform: translateY(-2px); }

.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }

/* ============ 顶部导航 ============ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: box-shadow .2s ease;
}
.site-header.scrolled { box-shadow: 0 2px 14px rgba(15, 23, 42, .08); }

.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 100%; }

.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; color: var(--text); letter-spacing: .2px; }
.logo strong { color: var(--primary-dark); }

.site-nav { display: flex; gap: 30px; }
.site-nav a { font-size: 15px; color: var(--text-sub); font-weight: 500; transition: color .15s; }
.site-nav a:hover, .site-nav a.active { color: var(--primary-dark); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ Hero ============ */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 72px) 0 88px;
  text-align: center;
  overflow: hidden;
  color: #fff;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 480px at 15% -5%, rgba(59,130,246,.55), transparent 60%),
    radial-gradient(900px 520px at 88% 8%, rgba(139,92,246,.45), transparent 60%),
    linear-gradient(160deg, #0b1530 0%, #122350 55%, #1b1040 100%);
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 75%);
}

.hero-inner { position: relative; z-index: 1; }

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  font-size: 13.5px;
  color: #c7d6f5;
  margin-bottom: 22px;
}

.hero h1 { font-size: clamp(34px, 5.4vw, 58px); line-height: 1.22; font-weight: 800; letter-spacing: .5px; }
.grad-text {
  background: linear-gradient(90deg, #7dd3fc, #a78bfa 55%, #f0abfc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub { margin: 20px auto 0; font-size: clamp(15px, 1.6vw, 17.5px); color: #b6c4e3; }

.hero-actions { margin-top: 34px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-actions .btn-outline { background: transparent; border-color: rgba(255,255,255,.35); color: #fff; }
.hero-actions .btn-outline:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }

.hero-stats {
  margin: 60px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 860px;
}
.hero-stats > div {
  padding: 18px 8px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
}
.hero-stats dt { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; color: #fff; }
.hero-stats dd { font-size: 13.5px; color: #9fb0d4; margin-top: 2px; }

/* ============ 通用区块 ============ */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }

.section-title { font-size: clamp(26px, 3.4vw, 36px); text-align: center; font-weight: 800; }
.section-title.left { text-align: left; }
.section-sub { text-align: center; color: var(--text-sub); margin: 14px 0 48px; font-size: 16.5px; }

/* ============ 功能卡片 ============ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
.feature-icon {
  width: 52px; height: 52px;
  border-radius: 13px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 12%, #fff);
  color: var(--c);
  margin-bottom: 18px;
}
.feature-icon svg { width: 26px; height: 26px; }
.feature-card h3 { font-size: 18.5px; margin-bottom: 8px; }
.feature-card p { color: var(--text-sub); font-size: 14.5px; }

/* ============ 平台 ============ */
.platform-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.platform-list li {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 10px;
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  color: #475569;
  transition: transform .18s ease, box-shadow .18s ease, color .18s;
}
.platform-list li:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--primary-dark); }
.platform-list .pf-name { display: block; }
.platform-list .pf-tag {
  display: inline-block;
  margin-top: 8px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 9px;
  border-radius: 999px;
}

/* 已支持：日本乐天 */
.platform-list li.live { border-color: var(--primary); box-shadow: 0 10px 26px rgba(59,130,246,.16); color: var(--primary-dark); }
.platform-list li.live .pf-tag { background: rgba(16,185,129,.12); color: #059669; }

/* 未接入：置灰，且不做 hover 抬升，避免暗示可点 */
.platform-list li.coming { background: #f1f5f9; border-style: dashed; color: #94a3b8; }
.platform-list li.coming .pf-tag { background: #e2e8f0; color: #94a3b8; }
.platform-list li.coming:hover { transform: none; box-shadow: none; color: #94a3b8; }

.platform-tip { text-align: center; color: var(--text-sub); font-size: 13.5px; margin-top: 22px; }

/* ============ 解决方案 ============ */
.solution-wrap {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
.check-list { margin: 26px 0 32px; display: grid; gap: 16px; }
.check-list li {
  position: relative;
  padding-left: 32px;
  color: var(--text-sub);
  font-size: 15.5px;
}
.check-list li strong { color: var(--text); margin-right: 6px; }
.check-list li::before {
  content: "";
  position: absolute; left: 0; top: 7px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.check-list li::after {
  content: "✓";
  position: absolute; left: 4px; top: 6px;
  font-size: 11px; font-weight: 800; color: #fff;
}

/* 界面示意（纯 CSS mock） */
.mock-window {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .12);
  overflow: hidden;
}
.mock-bar { display: flex; gap: 7px; padding: 13px 16px; border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.mock-bar i { width: 11px; height: 11px; border-radius: 50%; background: #cbd5e1; }
.mock-bar i:nth-child(1) { background: #fca5a5; }
.mock-bar i:nth-child(2) { background: #fcd34d; }
.mock-bar i:nth-child(3) { background: #86efac; }
.mock-body { display: flex; min-height: 300px; }
.mock-side { width: 64px; border-right: 1px solid var(--border); padding: 16px 12px; display: grid; gap: 12px; align-content: start; background: var(--bg-alt); }
.mock-side span { height: 12px; border-radius: 4px; background: #dbe3ee; }
.mock-side span.on { background: linear-gradient(90deg, var(--primary), var(--accent)); }
.mock-main { flex: 1; padding: 20px; display: grid; gap: 12px; align-content: start; }
.mock-row { height: 14px; border-radius: 5px; background: #e8edf5; }
.w90 { width: 90%; } .w80 { width: 80%; } .w70 { width: 70%; } .w60 { width: 60%; }
.mock-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 4px 0; }
.mock-cards i { height: 58px; border-radius: 10px; background: linear-gradient(160deg, #eef4ff, #e7e0fb); }
.mock-chart { display: flex; align-items: flex-end; gap: 10px; height: 110px; margin-top: 8px; padding: 0 4px; }
.mock-chart i { flex: 1; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--primary), var(--accent)); opacity: .85; }

/* ============ 价格 ============ */
/* 基础计费说明条 */
.billing-rule {
  display: flex;
  align-items: center;
  gap: 22px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 26px 30px;
  margin-bottom: 44px;
}
.billing-rule .br-icon {
  flex: none;
  width: 52px; height: 52px;
  border-radius: 13px;
  display: grid; place-items: center;
  background: rgba(59, 130, 246, .1);
  color: var(--primary);
}
.billing-rule .br-icon svg { width: 26px; height: 26px; }
.billing-rule .br-text h3 { font-size: 17.5px; margin-bottom: 4px; }
.billing-rule .br-text p { color: var(--text-sub); font-size: 14.5px; }
.billing-rule .br-text strong { color: var(--primary-dark); }
.billing-rule .br-price {
  margin-left: auto;
  flex: none;
  font-size: 34px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}
.billing-rule .br-price em { font-style: normal; font-size: 15px; font-weight: 600; color: var(--text-sub); -webkit-text-fill-color: var(--text-sub); }

/* 注册赠送说明条（绿色，区别于基础计费） */
.billing-rule.gift { border-color: rgba(16, 185, 129, .45); background: linear-gradient(135deg, rgba(16,185,129,.06), rgba(59,130,246,.05)); }
.billing-rule.gift .br-icon { background: rgba(16, 185, 129, .12); color: #10b981; }
.billing-rule.gift .br-text strong { color: #059669; }
.billing-rule.gift .br-price { background: linear-gradient(135deg, #10b981, var(--primary)); -webkit-background-clip: text; background-clip: text; }
.billing-rule.gift .br-price em { display: block; font-size: 13px; text-align: right; }

.price-group-title { text-align: center; font-size: 19px; font-weight: 800; margin-bottom: 26px; }

.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.price-grid.four { grid-template-columns: repeat(4, 1fr); gap: 18px; }
.price-grid.four .price-card { padding: 28px 22px; }
.price-grid.four .price em { font-size: 31px; }
.price-card {
  position: relative;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 34px 30px;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.price-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.price-card.recommended { border-color: var(--primary); box-shadow: 0 16px 44px rgba(59,130,246,.18); }
.price-flag {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; font-size: 12.5px; font-weight: 700;
  padding: 4px 16px; border-radius: 999px; white-space: nowrap;
}
.price-card h3 { font-size: 18px; }
.price { margin-top: 12px; font-size: 15px; color: var(--text-sub); }
.price em { font-style: normal; font-size: 38px; font-weight: 800; color: var(--text); }
.price-note { color: var(--text-sub); font-size: 13.5px; margin-top: 2px; }
.price-card ul { margin: 22px 0 28px; display: grid; gap: 11px; flex: 1; }
.price-card ul li { position: relative; padding-left: 24px; font-size: 14.5px; color: #334155; }
.price-card ul li::before {
  content: "✓";
  position: absolute; left: 0;
  color: var(--primary); font-weight: 800;
}
.price-tip { text-align: center; color: var(--text-sub); font-size: 14px; margin-top: 28px; }

/* ============ FAQ ============ */
.faq-list { display: grid; gap: 14px; margin-top: 40px; }
.faq-list details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px;
  transition: box-shadow .2s ease;
}
.faq-list details[open] { box-shadow: var(--shadow); }
.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15.5px;
  list-style: none;
  position: relative;
  padding-right: 30px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  font-size: 20px; color: var(--text-sub); transition: transform .2s ease;
}
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-list details p { margin-top: 10px; color: var(--text-sub); font-size: 14.5px; }

/* ============ CTA ============ */
.cta-banner {
  background: linear-gradient(135deg, #1d4ed8 0%, #7c3aed 100%);
  color: #fff;
  text-align: center;
  padding: 72px 0;
}
.cta-banner h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; }
.cta-banner p { margin: 12px 0 28px; color: #dbe4ff; font-size: 16px; }

/* ============ 页脚 ============ */
.site-footer { background: #0b1220; color: #94a3b8; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 64px 0 44px;
}
.footer-brand .logo { color: #fff; margin-bottom: 14px; }
.footer-brand p { font-size: 14px; line-height: 1.9; }
.footer-col { display: grid; gap: 12px; align-content: start; }
.footer-col h4 { color: #e2e8f0; font-size: 15px; margin-bottom: 4px; }
.footer-col a { font-size: 14px; transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(148, 163, 184, .15); padding: 20px 0; font-size: 13px; text-align: center; }
.footer-bottom a { transition: color .15s; }
.footer-bottom a:hover { color: #fff; }
/* 全局 svg 是 display:block，行内小图标需覆盖 */
.ext-icon { display: inline-block; vertical-align: -0.125em; margin-left: 4px; }

/* ============ 顶栏登录态 ============ */
.nav-guest, .nav-user { display: flex; align-items: center; gap: 12px; }
/* display:flex 会覆盖 [hidden] 的 UA 默认隐藏，需显式收掉 */
.nav-guest[hidden], .nav-user[hidden] { display: none; }

/* 纯文字入口（非按钮），与下拉里的退出项同风格 */
.btn-console {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-sub);
  padding: 6px 2px;
  transition: color .15s ease;
}
.btn-console:hover { color: var(--primary-dark); }

/* 头像 + 悬停下拉菜单 */
.user-menu { position: relative; }
.user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 6px 4px 4px;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 999px;
}
.user-trigger:hover { background: var(--bg-alt); }
.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-name:empty { display: none; }
.nav-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-alt);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.user-trigger:hover .nav-avatar,
.user-trigger:focus-visible .nav-avatar,
.user-menu:hover .nav-avatar {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .14);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 190px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .16);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
  z-index: 110;
}
/* 悬停区与触发器之间不留间隙，避免鼠标移过去菜单消失 */
.user-dropdown::before {
  content: "";
  position: absolute;
  top: -12px; right: 0;
  width: 100%; height: 12px;
}
.user-menu:hover .user-dropdown,
.user-menu:focus-within .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.ud-info { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.ud-name { font-size: 14px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ud-account { font-size: 12.5px; color: var(--text-sub); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ud-account:empty { display: none; }

.ud-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-sub);
  text-align: left;
}
.ud-item:hover { background: #fef2f2; color: #dc2626; }

/* ============ 登录弹窗 ============ */
.login-modal[hidden] { display: none; }
.login-modal {
  position: fixed; inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
}
.login-mask {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.login-dialog {
  position: relative;
  width: min(400px, 100%);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .28);
  padding: 34px 32px 30px;
  animation: loginPop .22s ease;
}
@keyframes loginPop {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.login-close {
  position: absolute; top: 12px; right: 14px;
  width: 34px; height: 34px;
  border: 0; background: none; cursor: pointer;
  font-size: 24px; line-height: 1; color: var(--text-sub);
  border-radius: 8px;
}
.login-close:hover { background: var(--bg-alt); color: var(--text); }
.login-brand {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(59,130,246,.28);
}
.login-brand img { width: 56px; height: 56px; border-radius: 16px; }
.login-dialog h3 { text-align: center; font-size: 21px; font-weight: 800; }
.login-sub { text-align: center; color: var(--text-sub); font-size: 13.5px; margin: 6px 0 22px; }

.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 13.5px; font-weight: 600; color: #334155; margin-bottom: 7px; }
.field input {
  width: 100%;
  padding: 11px 14px;
  font-size: 15px;
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input::placeholder { color: #94a3b8; }
.field input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .14);
}
.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 13.5px;
  padding: 9px 13px;
  border-radius: 10px;
  margin-bottom: 14px;
}
#loginSubmit[disabled] { opacity: .65; cursor: not-allowed; }
.login-foot { text-align: center; font-size: 13px; color: var(--text-sub); margin-top: 16px; }
.login-foot button { border: 0; background: none; padding: 0; font-size: 13px; font-weight: 600; color: var(--primary-dark); cursor: pointer; }
.login-foot button:hover { text-decoration: underline; }

/* ============ 注册弹窗（register.js 渲染并接管全部逻辑） ============ */
.reg-modal[hidden] { display: none; }
.reg-modal {
  position: fixed; inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
}
.reg-mask {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.reg-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .28);
  padding: 32px 34px 30px;
  animation: regPop .22s ease;
}
@keyframes regPop {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.reg-close {
  position: absolute; top: 12px; right: 14px;
  width: 34px; height: 34px;
  border: 0; background: none; cursor: pointer;
  font-size: 24px; line-height: 1; color: var(--text-sub);
  border-radius: 8px;
}
.reg-close:hover { background: var(--bg-alt); color: var(--text); }
.reg-dialog h3 { text-align: center; font-size: 21px; font-weight: 800; }
.reg-sub { text-align: center; color: var(--text-sub); font-size: 13.5px; margin: 6px 0 24px; }

/* 步骤条 */
.reg-stepper { display: flex; margin-bottom: 24px; }
.reg-stepper li { flex: 1; display: flex; align-items: center; min-width: 0; }
.reg-stepper li:last-child { flex: none; }
.reg-stepper li::after { content: ""; flex: 1; height: 2px; background: var(--border); border-radius: 2px; margin: 0 12px; }
.reg-stepper li:last-child::after { display: none; }
.reg-stepper li.done::after { background: var(--primary); }
.reg-step-btn { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.reg-step-dot { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1.5px solid var(--border); font-size: 14px; font-weight: 700; color: var(--text-sub); }
.reg-step-label { font-size: 14px; font-weight: 600; color: var(--text-sub); white-space: nowrap; }
.reg-stepper li.current .reg-step-dot { border-color: var(--primary); background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; box-shadow: 0 4px 12px rgba(59,130,246,.35); }
.reg-stepper li.current .reg-step-label { color: var(--text); }
.reg-stepper li.done .reg-step-dot { border-color: var(--primary); background: rgba(59,130,246,.1); color: var(--primary-dark); }
.reg-stepper li.done .reg-step-label { color: var(--primary-dark); }

/* 步骤面板 */
.reg-pane { animation: regIn .25s ease; }
@keyframes regIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.reg-pane-title { font-size: 16.5px; font-weight: 800; margin-bottom: 20px; }
.reg-pane-center { text-align: center; }
.reg-next { margin-top: 8px; }
.reg-btns { display: flex; gap: 12px; margin-top: 10px; }
.reg-btns .btn { flex: 1; }

/* 字段错误 / 可选标注 */
.field-err { font-size: 12.5px; color: #dc2626; margin-top: 6px; }
.field-err[hidden] { display: none; }
.field input.invalid { border-color: #f87171; }
.field .opt { font-style: normal; font-weight: 400; color: var(--text-sub); font-size: 12.5px; }
.field .opt.warn { color: #b45309; }
.prefix-hint { font-size: 12.5px; color: var(--text-sub); margin-top: 6px; }
.prefix-hint strong { color: var(--primary-dark); font-weight: 700; letter-spacing: .3px; }

/* 验证码行 */
.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; min-width: 0; }
.btn-code { flex: none; padding: 10px 16px; font-size: 14px; }
.btn-code[disabled] { opacity: .6; cursor: not-allowed; }
.reg-demo-tip { font-size: 12.5px; color: #92400e; background: #fffbeb; border: 1px dashed #fcd34d; border-radius: 8px; padding: 6px 10px; margin-top: 8px; }
.reg-demo-tip strong { font-size: 14px; letter-spacing: 1px; }

/* 企业 logo 上传：96px 方形位，图片 cover 裁成正方形展示 */
.logo-row { display: flex; align-items: center; gap: 16px; }
.logo-upload { position: relative; flex: none; width: 96px; height: 96px; border: 1.5px dashed var(--border); border-radius: 12px; cursor: pointer; color: var(--text-sub); transition: border-color .15s, background .15s; }
.logo-upload:hover, .logo-upload:focus-visible { border-color: var(--primary); background: #f5f9ff; outline: none; }
.logo-upload.has-image { border-style: solid; }
.logo-empty { height: 100%; display: grid; place-content: center; justify-items: center; gap: 4px; }
.logo-empty svg { width: 22px; height: 22px; color: var(--primary); }
.logo-empty span { font-size: 13px; font-weight: 600; }
.logo-filled { position: relative; width: 100%; height: 100%; border-radius: inherit; }
.logo-filled img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.logo-remove { position: absolute; top: -9px; right: -9px; width: 22px; height: 22px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 50%; background: #334155; color: #fff; font-size: 13px; line-height: 1; cursor: pointer; transition: background .15s; }
.logo-remove:hover { background: #dc2626; }
.logo-tip { font-size: 12.5px; color: #94a3b8; line-height: 1.8; }

/* 审核状态（第 3 步） */
.reg-status-icon { width: 64px; height: 64px; margin: 6px auto 14px; border-radius: 50%; display: grid; place-items: center; }
.reg-status-icon svg { width: 30px; height: 30px; }
.reg-status-icon.pending { background: rgba(245, 158, 11, .12); color: #d97706; }
.reg-status-icon.approved { background: rgba(16, 185, 129, .12); color: #059669; }
.reg-pane-center h3 { font-size: 20px; }
.reg-status-desc { color: var(--text-sub); font-size: 14.5px; margin: 8px 0 20px; }
.reg-summary { max-width: 430px; margin: 0 auto 22px; text-align: left; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px; padding: 4px 18px; }
.reg-summary > div { display: flex; justify-content: space-between; gap: 18px; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.reg-summary > div:last-child { border-bottom: 0; }
.reg-summary dt { flex: none; color: var(--text-sub); }
.reg-summary dd { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.reg-console-btn { min-width: 220px; }
.reg-demo-box { max-width: 430px; margin: 4px auto 0; border: 1.5px dashed #fcd34d; background: #fffbeb; border-radius: 12px; padding: 16px 18px; }
.reg-demo-box p { font-size: 13px; color: #92400e; margin-bottom: 10px; }
.reg-mini-note { font-size: 12.5px; color: #94a3b8; margin-top: 14px; }
.reg-reset { display: block; margin: 16px auto 0; border: 0; background: none; font-size: 13px; color: var(--text-sub); cursor: pointer; text-decoration: underline; }
.reg-reset:hover { color: var(--primary-dark); }

/* ============ 全局 loading（懒加载登录/注册脚本期间，main.js 注入） ============ */
.global-loading[hidden] { display: none; }
.global-loading {
  position: fixed; inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
}
.global-loading-mask {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.global-loading-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, .24);
  padding: 15px 24px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  animation: loginPop .22s ease;
}
.global-loading-spinner {
  flex: none;
  width: 22px; height: 22px;
  border: 3px solid rgba(59, 130, 246, .2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: globalLoadingSpin .7s linear infinite;
}
@keyframes globalLoadingSpin {
  to { transform: rotate(360deg); }
}

/* ============ 进场动画 ============ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .login-dialog { animation: none; }
  .reg-dialog, .reg-pane { animation: none; }
  .global-loading-card { animation: none; }
  .global-loading-spinner { animation: none; }
}

/* ============ 响应式 ============ */
@media (max-width: 960px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .platform-list { grid-template-columns: repeat(4, 1fr); }
  .solution-wrap { grid-template-columns: 1fr; gap: 44px; }
  .price-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .price-grid.four { grid-template-columns: repeat(2, 1fr); max-width: none; margin: 0; }
  .price-card.recommended { order: -1; }
  .price-grid.four .price-card.recommended { order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .site-nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    box-shadow: 0 14px 30px rgba(15,23,42,.12);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform .2s ease, opacity .2s ease;
  }
  .site-nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .site-nav a { padding: 13px 24px; }
  .nav-toggle { display: flex; }
  .nav-guest .btn-login { padding: 8px 10px; font-size: 14px; }
  .nav-actions .nav-guest .btn-primary { padding: 8px 16px; font-size: 14px; }
  .nav-user { gap: 10px; }
  .hero { padding-top: calc(var(--header-h) + 48px); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hide-mobile { display: none; }
  .section { padding: 64px 0; }
  .billing-rule { flex-direction: column; text-align: center; gap: 14px; }
  .billing-rule .br-price { margin-left: 0; }
  .billing-rule.gift .br-price em { text-align: center; }
  .reg-dialog { padding: 26px 22px 24px; }
}

@media (max-width: 520px) {
  .feature-grid { grid-template-columns: 1fr; }
  .platform-list { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .price-grid.four { grid-template-columns: 1fr; }
  .nav-avatar { width: 30px; height: 30px; }
  /* 极窄屏只留头像，姓名收进下拉里看 */
  .user-name { display: none; }
  /* 纯文字入口在极窄屏收缩，给 logo / 汉堡键留位 */
  .btn-console { font-size: 13px; }
  .nav-user { gap: 8px; }
  .login-dialog { padding: 28px 22px 24px; }
  /* 注册步骤条窄屏只留当前步骤文字，圆点与连线保持完整 */
  .reg-stepper li { gap: 0; }
  .reg-stepper li::after { margin: 0 7px; }
  .reg-stepper li:not(.current) .reg-step-label { display: none; }
  .reg-btns { flex-direction: column-reverse; } /* 主操作「提交审核」保持在上 */
}
