:root {
  --ink: #1a1636;
  --ink-soft: #5b5678;
  --line: rgba(255, 255, 255, 0.55);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.88);
  --grad-a: #5b4bff;
  --grad-b: #e8539a;
  --grad-c: #ff8a4c;
  --accent: #5b4fc7;
  --ok: #0d9488;
  --err: #e11d48;
  --radius: 20px;
  --shadow: 0 24px 60px rgba(49, 36, 120, 0.12);
  --shadow-soft: 0 8px 24px rgba(49, 36, 120, 0.08);
  --font-display: "DM Sans", "Noto Sans SC", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.6;
  background: #fff8f0;
  -webkit-font-smoothing: antialiased;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 10% 10%, rgba(255, 220, 180, 0.55), transparent 60%),
    radial-gradient(ellipse 70% 50% at 90% 20%, rgba(255, 180, 210, 0.45), transparent 55%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(200, 210, 255, 0.35), transparent 50%),
    linear-gradient(135deg, #fff8ef 0%, #fff5f8 45%, #fff9f2 100%);
}

.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}

.glass {
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.glass-inner {
  background: var(--glass-strong);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: calc(var(--radius) - 4px);
}

/* Header — dark gradient bar */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  margin: 16px 24px 0;
  border-radius: var(--radius);
  position: sticky;
  top: 12px;
  z-index: 20;
  isolation: isolate;
}

.site-header-dark {
  background:
    linear-gradient(135deg, rgba(26, 22, 54, 0.97) 0%, rgba(45, 27, 105, 0.95) 42%, rgba(74, 25, 66, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 20px 50px rgba(26, 22, 54, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.site-header-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(ellipse 60% 80% at 0% 0%, rgba(91, 75, 255, 0.35), transparent 55%),
    radial-gradient(ellipse 50% 70% at 100% 0%, rgba(232, 83, 154, 0.28), transparent 50%),
    radial-gradient(ellipse 40% 60% at 80% 100%, rgba(255, 138, 76, 0.18), transparent 45%);
  pointer-events: none;
}

.site-header-dark .brand,
.site-header-dark .header-actions {
  position: relative;
  z-index: 1;
}

.site-header-dark .brand h1 {
  color: #fff;
}

.site-header-dark .brand p {
  color: rgba(255, 255, 255, 0.68);
}

.site-header-dark .logo-mark {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.site-header-dark .pill-stat {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.88);
}

.btn-header-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b) 55%, var(--grad-c));
  box-shadow: 0 8px 22px rgba(91, 75, 255, 0.45);
  border: none;
  white-space: nowrap;
}

.btn-header-primary:hover:not(:disabled) {
  box-shadow: 0 10px 28px rgba(232, 83, 154, 0.4);
}

.btn-header-ghost {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  white-space: nowrap;
}

.btn-header-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.brand h1 { margin: 0; font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; font-family: var(--font-display); }
.brand p { margin: 2px 0 0; color: var(--ink-soft); font-size: 0.82rem; }

.logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  box-shadow: 0 8px 20px rgba(91, 75, 255, 0.35);
}

.header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.site-header-dark .site-nav a.active {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.pill-stat {
  font-size: 0.78rem;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(91, 75, 255, 0.15);
  color: var(--grad-a);
  font-weight: 600;
  max-width: 220px;
  line-height: 1.35;
}

/* Main */
.page-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 24px 48px;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  padding: 36px;
  border-radius: calc(var(--radius) + 4px);
  margin-bottom: 24px;
}

.kicker {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--err);
  letter-spacing: 0.04em;
}

.hero-title {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.gradient-text {
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b), var(--grad-c));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  max-width: 520px;
}

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.tag {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--ink-soft);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-cta-panel {
  padding: 20px 22px;
  margin-top: 4px;
}

.hero-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero-cta-or {
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-weight: 600;
  padding: 0 2px;
}

.hero-cta-note {
  margin: 12px 0 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.btn-outline-hero {
  background: rgba(255, 255, 255, 0.92);
  color: var(--grad-a);
  border: 2px solid rgba(91, 75, 255, 0.28);
  box-shadow: 0 4px 14px rgba(91, 75, 255, 0.1);
}

.btn-outline-hero:hover:not(:disabled) {
  border-color: var(--grad-a);
  background: #fff;
  box-shadow: 0 6px 18px rgba(91, 75, 255, 0.18);
}

.hero-stats { padding: 24px; }

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-item {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.stat-item strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1.1;
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-item span { display: block; font-weight: 700; font-size: 0.9rem; margin-top: 4px; }
.stat-item p { margin: 6px 0 0; font-size: 0.78rem; color: var(--ink-soft); line-height: 1.45; }
.stat-foot { margin: 16px 0 0; font-size: 0.78rem; color: var(--ink-soft); }

/* Wizard */
.wizard {
  padding: 28px 32px 32px;
  border-radius: calc(var(--radius) + 4px);
  animation: rise 0.5s ease both;
}

.wizard-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(91, 75, 255, 0.08);
}

.wizard-title { margin: 0; font-size: 1.5rem; font-weight: 800; font-family: var(--font-display); letter-spacing: -0.02em; }

.progress-wrap { min-width: 200px; flex: 1; max-width: 360px; }
.progress-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(91, 75, 255, 0.1);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}
.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b), var(--grad-c));
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(91, 75, 255, 0.35);
}
.progress-label { display: block; margin-top: 8px; font-size: 0.78rem; color: var(--ink-soft); text-align: right; font-weight: 600; }

.section-nav-wrap {
  margin-bottom: 18px;
  padding: 10px 14px;
  position: sticky;
  top: 72px;
  z-index: 8;
}

.section-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

.section-nav .section-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(91, 75, 255, 0.12);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 8px 14px 8px 10px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-soft);
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, color 0.15s;
}

.section-nav .section-link:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
  color: var(--ink);
}

.section-link-num {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--grad-a);
  background: rgba(91, 75, 255, 0.1);
}

.section-nav .section-link.done {
  color: var(--ok);
  border-color: rgba(13, 148, 136, 0.28);
}

.section-nav .section-link.done .section-link-num {
  color: #fff;
  background: var(--ok);
}

.quick-fill-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
  border: 1px dashed rgba(91, 75, 255, 0.18);
}

.quick-fill-label {
  font-size: 0.82rem;
  color: var(--ink-soft);
  font-weight: 700;
  flex: 0 0 auto;
  letter-spacing: 0.02em;
}

.quick-fill-btn {
  font-size: 0.76rem !important;
  padding: 7px 13px !important;
  border-radius: 999px !important;
}

.quick-fill-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.quick-fill-btn.active {
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(91, 75, 255, 0.28);
}

.section-card {
  margin-bottom: 24px;
  padding: 22px 24px 26px;
  border-radius: calc(var(--radius) + 2px);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow-soft);
  animation: rise 0.45s ease both;
  scroll-margin-top: 140px;
}

.section-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.step-badge {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  box-shadow: 0 6px 14px rgba(91, 75, 255, 0.28);
}

.section-fields {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-section {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.section-heading {
  font-size: 1.12rem;
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.core-context-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.core-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}

.core-context-grid .choice-grid {
  grid-template-columns: 1fr;
}

.core-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(91, 75, 255, 0.08), rgba(232, 83, 154, 0.06));
  border: 1px solid rgba(91, 75, 255, 0.16);
  font-size: 0.88rem;
  line-height: 1.55;
}

.core-banner-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  color: #fff;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
}

.core-banner p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-weight: 400;
}

.core-banner strong {
  color: var(--grad-a);
  font-size: 0.92rem;
}

.step-tabs button {
  border: 1px solid rgba(91, 75, 255, 0.12);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 8px 16px;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--ink-soft);
  transition: all 0.2s;
}

.step-tabs button.active {
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b));
  color: #fff;
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(91, 75, 255, 0.3);
}

.step-tabs button.done:not(.active) {
  color: var(--ok);
  border-color: rgba(13, 148, 136, 0.25);
}

.step-tabs button.has-error {
  border-color: var(--err);
  color: var(--err);
}

/* Form */
.choice-group.highlight {
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(248, 246, 255, 0.88));
  border: 1.5px solid rgba(91, 75, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.choice-group.highlight legend {
  font-size: 0.98rem;
  color: var(--grad-a);
  font-weight: 800;
}

.core-metrics-grid .choice-group.highlight {
  margin-bottom: 0;
}

.core-context-grid .choice-group {
  margin-bottom: 0;
}

.core-context-grid .choice-card {
  padding: 10px 12px;
}

.core-context-grid .choice-card span {
  font-size: 0.82rem;
}

.step-intro {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.75);
  border-left: 3px solid rgba(91, 75, 255, 0.35);
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.choice-group.has-error,
.choice-group.flash-error {
  border-color: var(--err) !important;
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.number-input {
  width: 100%;
  max-width: none;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  padding: 16px 18px;
  border: 2px solid rgba(91, 75, 255, 0.18);
  border-radius: 16px;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  letter-spacing: -0.02em;
}

.number-input:focus {
  outline: none;
  border-color: var(--grad-a);
  box-shadow: 0 0 0 4px rgba(91, 75, 255, 0.12);
}

.number-input[data-autofill="1"] {
  border-color: rgba(13, 148, 136, 0.45);
  background: linear-gradient(180deg, #fff, rgba(13, 148, 136, 0.04));
}

.tier-picker { margin: 20px 0; padding: 18px; }
.tier-picker h3 { margin: 0 0 12px; font-size: 0.95rem; }
.tier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.tier-card {
  text-align: left;
  border: 1.5px solid rgba(91, 75, 255, 0.15);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.85);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tier-card.active {
  border-color: transparent;
  background: linear-gradient(135deg, rgba(91,75,255,0.12), rgba(232,83,154,0.1));
  box-shadow: 0 6px 18px rgba(91,75,255,0.18);
}
.tier-card strong { font-size: 0.92rem; }
.tier-card span { font-size: 0.78rem; color: var(--ink-soft); line-height: 1.4; }
.tier-card em { font-size: 0.82rem; color: var(--grad-a); font-style: normal; font-weight: 700; }

.structured-results { margin-bottom: 20px; }
.result-meta { font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 12px; padding: 10px 12px; background: rgba(255,255,255,0.7); border-radius: 10px; }
.tier-head { margin: 16px 0 8px; font-size: 1rem; }
.vol-table-wrap { overflow-x: auto; margin-bottom: 12px; }
.vol-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; background: rgba(255,255,255,0.9); border-radius: 10px; overflow: hidden; }
.vol-table th, .vol-table td { border: 1px solid rgba(0,0,0,0.06); padding: 8px 10px; text-align: left; }
.vol-table th { background: rgba(91,75,255,0.08); }
.rejected-box { font-size: 0.82rem; color: var(--ink-soft); margin-top: 8px; }

.disclaimer-foot {
  margin: 20px 24px 32px;
  padding: 16px 20px;
  border-radius: var(--radius);
  font-size: 0.78rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.hero-tiers {
  margin-top: 8px;
  font-weight: 600;
}

.hero-link {
  margin: 4px 0 12px;
  font-size: 0.92rem;
}

.hero-link a {
  color: var(--brand);
  text-decoration: none;
  word-break: break-all;
}

.hero-link a:hover {
  text-decoration: underline;
}

.share-panel {
  margin: 16px 24px 0;
  padding: 20px 22px 18px;
  animation: rise 0.45s ease both;
}

.share-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.share-panel-desc {
  margin: 6px 0 0;
}

.share-copy-box {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(0, 0, 0, 0.06);
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--ink);
  max-height: 280px;
  overflow: auto;
}

#copyShareHint.ok { color: #059669; }
#copyShareHint.err { color: #dc2626; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.factor-group h2 {
  margin: 0 0 20px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.choice-group {
  border: none;
  margin: 0 0 24px;
  padding: 0;
}

.choice-group.has-error legend { color: var(--err); }

.choice-group legend {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 12px;
  padding: 0;
  color: var(--ink);
}

.req { color: var(--err); }

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px;
}

.scale-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.scale-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: 14px;
  border: 1.5px solid rgba(91, 75, 255, 0.12);
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  text-align: center;
  transition: all 0.18s;
}

.scale-option:hover {
  border-color: rgba(91, 75, 255, 0.35);
}

.scale-option:has(input:checked) {
  border-color: transparent;
  background: linear-gradient(135deg, rgba(91, 75, 255, 0.14), rgba(232, 83, 154, 0.12));
  box-shadow: 0 4px 14px rgba(91, 75, 255, 0.15);
}

.scale-num {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--grad-a);
}

.scale-text {
  font-size: 0.72rem;
  line-height: 1.3;
  color: var(--ink-soft);
}

.other-input-wrap {
  margin-top: 12px;
}

.other-input {
  width: 100%;
  max-width: 480px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(91, 75, 255, 0.2);
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.9);
}

.other-input:focus {
  outline: none;
  border-color: var(--grad-a);
  box-shadow: 0 0 0 3px rgba(91, 75, 255, 0.12);
}

@media (max-width: 640px) {
  .scale-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.choice-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid rgba(91, 75, 255, 0.1);
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: all 0.18s;
  font-weight: 400;
}

.choice-card:hover {
  border-color: rgba(91, 75, 255, 0.35);
  transform: translateY(-1px);
}

.choice-card:has(input:checked) {
  border-color: transparent;
  background: linear-gradient(135deg, rgba(91, 75, 255, 0.12), rgba(232, 83, 154, 0.1));
  box-shadow: 0 4px 14px rgba(91, 75, 255, 0.15);
}

.choice-card input {
  margin-top: 3px;
  accent-color: var(--grad-a);
  flex-shrink: 0;
}

.choice-card span { font-size: 0.86rem; line-height: 1.4; }
.field-hint { display: block; margin-top: 8px; font-size: 0.76rem; color: var(--ink-soft); line-height: 1.45; }
.autofill-note { display: block; margin-top: 6px; font-size: 0.74rem; color: var(--ok); font-weight: 600; }

.alert-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(225, 29, 72, 0.08);
  border: 1px solid rgba(225, 29, 72, 0.25);
  color: var(--err);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.alert-close {
  border: none;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
  color: inherit;
  line-height: 1;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid rgba(91, 75, 255, 0.08);
}

/* Buttons */
.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-lg { padding: 14px 26px; font-size: 0.95rem; }

.btn-gradient {
  color: #fff;
  background: linear-gradient(135deg, var(--grad-a), var(--grad-b) 55%, var(--grad-c));
  box-shadow: 0 10px 28px rgba(91, 75, 255, 0.35);
}

.btn-white {
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-soft {
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink-soft);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.hint { color: var(--ink-soft); font-size: 0.85rem; margin: 10px 0 0; }
.hint.ok { color: var(--ok); font-weight: 600; }
.hint.err { color: var(--err); font-weight: 600; }

/* Result */
.result-panel { margin-top: 28px; padding: 24px; }
.result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.result-head h2 { margin: 0; font-size: 1.2rem; }
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.verdict-box p { margin: 6px 0 0; line-height: 1.65; }
.verdict-strategy { color: var(--grad-a); font-weight: 600; }
.result-warn { border-left: 3px solid #f59e0b; background: rgba(245, 158, 11, 0.08) !important; }
.plan-analysis { white-space: pre-wrap; margin: 8px 0 0; line-height: 1.65; }
.rejected-box { margin-top: 12px; font-size: 0.84rem; color: var(--ink-soft); }
.rejected-box ul { margin: 8px 0 0; padding-left: 1.2em; }
.markdown-body h2 {
  margin-top: 1.4em;
  font-size: 1.05rem;
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.markdown-body ul { padding-left: 1.2em; }

/* Modals */
.modal {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  max-width: 520px;
  width: calc(100% - 32px);
  box-shadow: var(--shadow);
  background: var(--glass-strong);
}
.modal.wide { max-width: 720px; }
.modal::backdrop { background: rgba(26, 22, 54, 0.45); backdrop-filter: blur(4px); }
.modal-card { padding: 0; border-radius: var(--radius); overflow: hidden; }
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.modal-head h3 { margin: 0; font-size: 1.05rem; }
.modal-close { border: none; background: transparent; font-size: 1.4rem; cursor: pointer; color: var(--ink-soft); }
.modal-body { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-body label { display: flex; flex-direction: column; gap: 6px; font-size: 0.88rem; font-weight: 600; }
.modal-body input {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  padding: 10px 14px;
  font: inherit;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.check-row { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 500 !important; }
.pay-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; align-items: start; }
.pay-plan-select-label { display: grid; gap: 8px; margin-bottom: 16px; font-weight: 700; font-size: 0.88rem; }
.pay-plan-select-label select { height: 44px; border-radius: 12px; border: 1.5px solid rgba(91, 75, 255, 0.18); padding: 0 12px; font: inherit; background: #fff; }
.pay-qr-label { font-size: 0.85rem; font-weight: 700; margin-bottom: 8px; color: #334155; }
.pay-qr img { width: 220px; border-radius: 14px; border: 1px solid rgba(0, 0, 0, 0.08); }
.pay-amount { font-size: 1.5rem; font-weight: 900; color: var(--err); text-align: center; margin: 8px 0 0; }
.file-name { font-size: 0.82rem; color: var(--ink-soft); }
.screenshot-preview { max-width: 100%; max-height: 160px; border-radius: 10px; border: 1px solid rgba(0, 0, 0, 0.08); }

/* Admin */
.admin-wrap { max-width: 1200px; margin: 0 auto; padding: 24px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; background: var(--glass-strong); border-radius: var(--radius); overflow: hidden; }
.admin-table th, .admin-table td { border: 1px solid rgba(0, 0, 0, 0.06); padding: 10px 12px; text-align: left; }
.admin-table th { background: rgba(255, 255, 255, 0.6); }
.thumb-link img { max-height: 48px; border-radius: 6px; }

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding: 24px; }
  .site-header { margin: 12px 12px 0; padding: 12px 14px; flex-wrap: wrap; }
  .site-header-dark .header-actions { width: 100%; justify-content: flex-end; }
  .site-header-dark .pill-stat { display: none; }
  .site-header .site-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .btn-header-primary { font-size: 0.82rem; padding: 9px 14px; }
  .btn-header-ghost { font-size: 0.82rem; padding: 9px 14px; }
  .page-main { padding: 12px 12px 32px; }
  .wizard { padding: 20px 16px; }
  .pay-layout { grid-template-columns: 1fr; }
  .core-context-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .core-metrics-grid { grid-template-columns: 1fr; }
  .section-nav-wrap { top: 64px; }
  .section-card { padding: 18px 16px 22px; }
}

@media (max-width: 520px) {
  .core-context-grid { grid-template-columns: 1fr; }
  .section-nav .section-link { font-size: 0.76rem; padding: 7px 12px 7px 8px; }
}
