:root {
  --ink: #141c2e;
  --ink-soft: #1f2a40;
  --primary: #b91c1c;
  --primary-dark: #991b1b;
  --primary-light: #dc2626;
  --gold: #c9a227;
  --gold-soft: #f5ecd5;
  --pro: #9a6b00;
  --pro-bg: #fdfaf3;
  --pro-border: #e8d4a8;
  --page-bg: #e8ebf0;
  --card: #ffffff;
  --text: #1a2332;
  --muted: #5c6778;
  --line: #dde3ec;
  --ok: #047857;
  --bad: #b91c1c;
  --radius: 16px;
  --shadow: 0 12px 40px rgba(20, 28, 46, 0.08);
  --content-w: 1120px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--page-bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.open-page {
  min-height: 100vh;
  padding-bottom: calc(2rem + var(--safe-bottom));
}

/* —— 顶栏 Hero —— */
.hero-band {
  background:
    linear-gradient(135deg, rgba(201, 162, 39, 0.12) 0%, transparent 42%),
    linear-gradient(160deg, var(--ink) 0%, var(--ink-soft) 55%, #2a3650 100%);
  color: #fff;
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 10px 32px rgba(20, 28, 46, 0.22);
}

.hero-inner {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 2rem;
}

.hero-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.65);
}

.hero-headline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 0.85rem;
}

.hero-headline h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.15;
  flex: 0 0 auto;
}

.hero-lead {
  margin: 0;
  max-width: 52rem;
  font-size: clamp(0.9375rem, 1.5vw, 1.05rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
}

.hero-lead strong.hero-lead-strong {
  font-weight: 700;
  color: #fff;
}

.hero-pro-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin: 1rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}

.hero-pro-label {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: rgba(201, 162, 39, 0.22);
  border: 1px solid rgba(201, 162, 39, 0.45);
  color: #f5ecd5;
}

.hero-game-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.hero-game-chips span {
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.hero-pro-extra {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 1 1 auto;
  justify-content: flex-start;
}

.hero-tags li {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.94);
  white-space: nowrap;
}

/* —— 主体双栏 —— */
.layout-body {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  gap: 1.5rem;
}

.layout-side {
  display: none;
}

.signup-card {
  margin-top: -1.25rem;
  padding: 1.35rem 1.25rem 1.5rem;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.hidden { display: none !important; }
.hint { color: var(--muted); font-size: 0.9375rem; margin: 0; }

.form-head {
  margin-bottom: 1.1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.form-head-title {
  margin: 0 0 0.65rem;
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--ink);
}

.flow-steps {
  display: flex;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.75rem;
  color: var(--muted);
}

.flow-steps li {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.4rem 0.35rem;
  border-radius: 999px;
  background: #f3f5f8;
  font-weight: 600;
}

.flow-steps li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: #c5cdd8;
  color: #fff;
  font-size: 0.625rem;
}

.flow-steps li.is-active {
  color: var(--primary);
  background: #fef2f2;
}

.flow-steps li.is-active span {
  background: var(--primary);
}

.plan-picker {
  border: none;
  margin: 0 0 0.9rem;
  padding: 0;
}

.plan-picker legend {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--ink);
}

.plan-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.plan-card {
  position: relative;
  display: block;
  cursor: pointer;
  margin: 0;
  min-width: 0;
}

.plan-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.plan-card-body {
  display: block;
  height: 100%;
  padding: 0.85rem 0.75rem 0.85rem 2.5rem;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fafbfc;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.plan-card-head {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.25rem;
}

.plan-card-title {
  font-size: 0.9375rem;
}

.plan-card-price {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--ink);
}

.plan-card-pro .plan-card-price {
  color: var(--pro);
}

.plan-card-desc {
  display: block;
  font-size: 0.6875rem;
  color: var(--muted);
  line-height: 1.45;
}

.plan-card-badge {
  position: absolute;
  top: -0.4rem;
  right: 0.5rem;
  z-index: 1;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #fff;
  box-shadow: 0 2px 8px rgba(184, 134, 11, 0.35);
}

.plan-card-check {
  position: absolute;
  left: 0.75rem;
  top: 0.85rem;
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid #c5cdd8;
  border-radius: 50%;
  background: #fff;
}

.plan-card-check::after {
  content: "";
  position: absolute;
  left: 0.28rem;
  top: 0.1rem;
  width: 0.32rem;
  height: 0.58rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.12s;
}

.plan-card:has(input:checked) .plan-card-body {
  border-color: var(--ink-soft);
  background: #f8f9fb;
  box-shadow: 0 0 0 1px rgba(31, 42, 64, 0.08);
}

.plan-card:has(input:checked) .plan-card-check {
  border-color: var(--ink-soft);
  background: var(--ink-soft);
}

.plan-card:has(input:checked) .plan-card-check::after {
  transform: rotate(45deg) scale(1);
}

.plan-card-pro:has(input:checked) .plan-card-body {
  border-color: var(--pro-border);
  background: var(--pro-bg);
  box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.2);
}

.plan-card-pro:has(input:checked) .plan-card-check {
  border-color: var(--gold);
  background: linear-gradient(135deg, #d4af37, #b8860b);
}

.pro-pay-note {
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  font-size: 0.8125rem;
  line-height: 1.5;
  background: #f0f4fa;
  border: 1px solid #cbd5e1;
  color: var(--ink-soft);
}

.pro-pay-note p { margin: 0; }

.chain-pricing-note {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  font-size: 0.8125rem;
  line-height: 1.5;
  background: #fff8e8;
  border: 1px solid #e8d4a8;
  color: #6b4f1d;
}

.wx-auth-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding: 0.75rem 0.85rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  font-size: 0.8125rem;
}

.wx-auth-bar.ok {
  background: #ecfdf5;
  border-color: #86efac;
}

.wx-auth-copy { flex: 1; min-width: 0; }

.wx-auth-title {
  margin: 0 0 0.15rem;
  font-weight: 700;
  color: #166534;
}

.wx-auth-bar p {
  margin: 0;
  color: #15803d;
  line-height: 1.45;
}

.wx-auth-btn {
  flex-shrink: 0;
  padding: 0.5rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: #15803d;
  color: #fff;
  cursor: pointer;
}

.wx-auth-bar.ok .wx-auth-btn { display: none; }

.plan-compare-fold {
  margin: 0 0 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fafbfc;
}

.plan-compare-fold summary {
  padding: 0.7rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  list-style: none;
}

.plan-compare-fold summary::-webkit-details-marker { display: none; }

.plan-compare-fold summary::after {
  content: "展开";
  float: right;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.75rem;
}

.plan-compare-fold[open] summary::after { content: "收起"; }

.plan-compare-fold[open] summary {
  border-bottom: 1px solid var(--line);
}

.plan-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.plan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.plan-table th,
.plan-table td {
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.plan-table tr:last-child th,
.plan-table tr:last-child td { border-bottom: none; }

.plan-table thead th {
  background: #f3f5f8;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

.plan-table .col-feature,
.plan-table tbody th[scope="row"] {
  text-align: left;
  font-weight: 600;
  color: var(--text);
  min-width: 6rem;
}

.plan-table .col-free { background: #fafbfc; width: 26%; }
.plan-table .col-pro { background: var(--pro-bg); color: #7c5a10; }
.plan-table thead .col-pro { color: var(--pro); }
.plan-table .col-pro.is-highlight { background: #fbf3e0; }

.plan-table .cell-yes {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: #d1fae5;
  color: var(--ok);
  font-weight: 700;
  font-size: 0.75rem;
}

.plan-table .cell-no {
  color: #cbd5e1;
  font-weight: 600;
}

.form-section {
  margin-bottom: 0.25rem;
  padding-top: 0.65rem;
  border-top: 1px solid #eef1f5;
}

.form-section-title {
  margin: 0 0 0.7rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
}

.form-section-desc {
  margin: -0.4rem 0 0.65rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.field {
  display: block;
  margin-bottom: 0.9rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.field input {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 400;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(31, 42, 64, 0.1);
}

.field-hint {
  display: block;
  margin-top: 0.3rem;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.75rem;
}

.field-hint.ok { color: var(--ok); }
.field-hint.bad { color: var(--bad); }

.agree-line {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.8125rem;
  font-weight: 400;
  margin: 0.9rem 0 0.8rem;
  color: var(--muted);
}

.agree-line input { margin-top: 0.2rem; }
.agree-line a { color: var(--primary); font-weight: 600; }

button, .link-btn {
  font-family: inherit;
  border: none;
  border-radius: 12px;
  padding: 0.875rem 1.1rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s, opacity 0.15s;
}

button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: 0.65; cursor: not-allowed; }

.primary {
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(185, 28, 28, 0.28);
}

.primary:hover:not(:disabled) {
  box-shadow: 0 8px 24px rgba(185, 28, 28, 0.34);
}

.primary.is-pro {
  background: linear-gradient(180deg, #d4af37 0%, #b8860b 100%);
  box-shadow: 0 6px 20px rgba(184, 134, 11, 0.32);
  color: #fff;
}

.secondary {
  background: #eef1f5;
  color: var(--ink-soft);
  margin-top: 0.75rem;
}

.block { display: block; width: 100%; }
.link-btn { text-align: center; text-decoration: none; }

.submit-footnote {
  margin: 0.6rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}

.state-panel {
  text-align: center;
  padding: 1.5rem 0.5rem;
}

.state-panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  color: var(--ink);
}

.state-lead {
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.6;
}

.state-icon {
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.4rem;
}

.state-icon-muted { background: #eef1f5; }
.state-icon-pay { background: #d1fae5; color: var(--ok); font-weight: 800; }
.state-icon-done { background: var(--gold-soft); }

.pay-qr-box {
  margin: 0.75rem 0;
  padding: 1rem;
  background: #fafbfc;
  border-radius: 12px;
  border: 1px dashed var(--line);
}

.pay-qr-box img {
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

.pay-qr-hint {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.pay-status {
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 0.25rem;
}

.done-links {
  margin-top: 1rem;
  padding: 0.75rem 0.85rem;
  background: #f6f8fa;
  border-radius: 10px;
  font-size: 0.8125rem;
  color: var(--muted);
  word-break: break-all;
}

.done-links a { color: var(--primary); font-weight: 600; }

.toast {
  position: fixed;
  bottom: max(1.25rem, var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 28, 46, 0.92);
  color: #fff;
  padding: 0.8rem 1.35rem;
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 600;
  font-size: 0.875rem;
  max-width: min(92vw, 480px);
  text-align: center;
  pointer-events: none;
}

.toast.show { opacity: 1; }

/* —— PC 宽屏双栏 —— */
@media (min-width: 960px) {
  .hero-inner {
    padding: 2.5rem 2rem 2.75rem;
  }

  .hero-headline {
    gap: 1rem 1.5rem;
    margin-bottom: 1rem;
  }

  .hero-headline h1 {
    font-size: 2.35rem;
  }

  .hero-tags {
    justify-content: flex-end;
    flex: 1 1 280px;
  }

  .hero-tags li {
    font-size: 0.8125rem;
    padding: 0.38rem 0.9rem;
  }

  .hero-lead {
    font-size: 1.0625rem;
    max-width: none;
  }

  .hero-pro-line {
    margin-top: 1.15rem;
    padding-top: 1rem;
    gap: 0.55rem 0.75rem;
  }

  .layout-body {
    grid-template-columns: minmax(0, 1fr) 420px;
    align-items: start;
    gap: 2rem;
    padding: 0 2rem;
    margin-top: -2rem;
  }

  .layout-side {
    display: block;
    padding-top: 2.5rem;
  }

  .side-intro h2 {
    margin: 0 0 1rem;
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--ink);
  }

  .side-list {
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
  }

  .side-list li {
    position: relative;
    padding: 0.85rem 0 0.85rem 1rem;
    border-left: 3px solid var(--gold);
    margin-bottom: 0.65rem;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 0 10px 10px 0;
  }

  .side-list li strong {
    display: block;
    font-size: 0.9375rem;
    color: var(--ink);
    margin-bottom: 0.2rem;
  }

  .side-list li span {
    display: block;
    font-size: 0.8125rem;
    color: var(--muted);
    line-height: 1.5;
  }

  .side-compare h3 {
    margin: 0 0 0.75rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--ink);
  }

  .side-compare .plan-table-wrap {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(20, 28, 46, 0.04);
  }

  .plan-compare-fold {
    display: none;
  }

  .signup-card {
    margin-top: 0;
    position: sticky;
    top: 1.25rem;
    padding: 1.5rem 1.35rem 1.65rem;
  }

  .plan-cards {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .form-section:last-of-type {
    margin-bottom: 0;
  }
}

@media (min-width: 1200px) {
  :root {
    --content-w: 1180px;
  }

  .layout-body {
    grid-template-columns: minmax(0, 1fr) 440px;
    gap: 2.5rem;
  }
}

@media (max-width: 520px) {
  .plan-cards {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    padding: 1.35rem 1rem 1.6rem;
  }

  .hero-headline {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .hero-tags {
    width: 100%;
  }

  .hero-pro-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .signup-card {
    margin-top: -0.85rem;
    margin-left: 0.65rem;
    margin-right: 0.65rem;
    padding: 1.15rem 1rem 1.35rem;
  }

  .layout-body {
    padding: 0 0.65rem;
  }
}
