:root {
  --ink: #172033;
  --muted: #687086;
  --line: #e4e7f1;
  --soft: #f5f6fb;
  --primary: #5b5ceb;
  --primary-dark: #3f3fbd;
  --purple: #7c6cf2;
  --success: #18946d;
  --healthy: #3478d4;
  --warning: #dc7c24;
  --danger: #d14b54;
  --shadow: 0 24px 70px rgba(39, 43, 96, 0.12);
}

* { box-sizing: border-box; }
html { background: #f7f7fb; color: var(--ink); font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 50% -20%, #e9e7ff 0, #f7f7fb 42%, #f7f7fb 100%); }
button, textarea, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.page { width: min(100%, 760px); min-height: 100vh; margin: 0 auto; padding: 28px 22px 56px; }
.cover-page { width: min(100%, 920px); }
.hero-card { position: relative; overflow: hidden; padding: 64px 58px 48px; border-radius: 34px; color: white; background: linear-gradient(145deg, #30337e 0%, var(--primary) 54%, #8873f5 100%); box-shadow: 0 30px 90px rgba(54, 55, 153, 0.28); }
.hero-card::before, .hero-card::after { content: ""; position: absolute; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); }
.hero-card::before { width: 360px; height: 360px; right: -140px; top: -190px; }
.hero-card::after { width: 220px; height: 220px; right: -70px; top: -100px; }
.eyebrow { display: inline-flex; padding: 7px 12px; border-radius: 99px; font-size: 13px; font-weight: 700; letter-spacing: .08em; color: #e7e7ff; background: rgba(255,255,255,.12); }
.eyebrow.light { color: #dfe0ff; }
.hero-card h1 { max-width: 620px; margin: 24px 0 16px; font-size: clamp(42px, 7vw, 70px); line-height: 1.08; letter-spacing: -.04em; }
.hero-subtitle { margin: 0; color: #e7e8ff; font-size: clamp(18px, 3vw, 24px); line-height: 1.55; }
.badge-row { display: flex; gap: 12px; margin: 34px 0; }
.metric-badge { min-width: 110px; padding: 14px 18px; border: 1px solid rgba(255,255,255,.16); border-radius: 18px; background: rgba(255,255,255,.09); backdrop-filter: blur(10px); }
.metric-badge strong { display: block; font-size: 24px; }
.metric-badge span { font-size: 13px; color: #e8e9ff; }
.primary-button, .secondary-button { width: 100%; min-height: 58px; border-radius: 17px; border: 0; cursor: pointer; font-weight: 800; transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease; }
.primary-button { color: white; background: linear-gradient(135deg, var(--primary), var(--purple)); box-shadow: 0 12px 28px rgba(91,92,235,.28); }
.hero-card .primary-button { width: auto; min-width: 220px; padding: 0 28px; color: var(--primary-dark); background: white; box-shadow: none; }
.primary-button:hover, .secondary-button:hover { transform: translateY(-1px); }
.primary-button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.privacy-note { margin: 18px 0 0; color: #dfe0ff; font-size: 12px; }
.intro-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 16px; margin-top: 20px; }
.info-card, .notice-card, .question-card, .example-card, .dimension-card, .pattern-card, .disclaimer { border: 1px solid rgba(222,224,236,.86); border-radius: 24px; background: rgba(255,255,255,.9); box-shadow: 0 14px 38px rgba(41,46,90,.06); }
.info-card { padding: 26px; }
.accent-card { color: white; background: #20264a; border-color: #20264a; }
.info-card h2 { margin: 9px 0 20px; font-size: 22px; }
.info-card p { margin: 10px 0 0; line-height: 1.75; color: var(--muted); }
.accent-card p { color: #e2e5f5; }
.card-kicker { color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.accent-card .card-kicker { color: #aaaefe; }
.feature-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.feature-list li::before { content: "✓"; margin-right: 9px; color: #aaaefe; }
.notice-card { margin-top: 16px; padding: 24px 26px; border-color: #dddafa; background: #f0efff; }
.notice-card p { margin: 8px 0 0; color: #4f5570; line-height: 1.75; }
.section-header { padding: 22px 0 28px; }
.section-header .text-button { margin-bottom: 36px; }
.section-header h1 { margin: 8px 0 10px; font-size: clamp(32px, 7vw, 48px); letter-spacing: -.03em; }
.section-header p { margin: 0; color: var(--muted); line-height: 1.7; }
.step-label { color: var(--primary); font-size: 13px; font-weight: 800; }
.text-button { padding: 0; border: 0; color: var(--muted); background: transparent; cursor: pointer; font-weight: 700; }
.profile-group { margin: 0 0 18px; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: 0 12px 36px rgba(41,46,90,.045); }
.profile-group legend { display: flex; align-items: center; gap: 10px; padding: 0; font-size: 17px; font-weight: 800; }
.profile-group legend span { color: var(--primary); font-size: 12px; }
.profile-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.compact-options { grid-template-columns: repeat(3, 1fr); }
.profile-choice { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: #fafbfe; cursor: pointer; text-align: left; }
.profile-choice.selected { border-color: var(--primary); color: var(--primary-dark); background: #efefff; box-shadow: inset 0 0 0 1px var(--primary); }
.choice-mark { display: grid; width: 22px; height: 22px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: white; background: var(--primary); font-size: 12px; }
.profile-choice:not(.selected) .choice-mark { color: var(--muted); background: #eceef5; }
.field-hint { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.form-error { min-height: 22px; margin: 10px 0; color: var(--danger); font-weight: 700; font-size: 13px; }
.quiz-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.question-count { color: var(--muted); font-size: 13px; font-weight: 800; }
.progress-track { height: 7px; overflow: hidden; border-radius: 99px; background: #e5e7f0; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--purple)); transition: width .25s ease; }
.question-card { margin-top: 26px; padding: 34px; }
.dimension-pill { display: inline-flex; padding: 7px 11px; border-radius: 99px; color: var(--primary-dark); background: #efefff; font-size: 12px; font-weight: 800; }
.question-card h1 { margin: 22px 0 10px; font-size: clamp(25px, 5vw, 34px); line-height: 1.42; letter-spacing: -.02em; }
.question-help { margin: 0 0 24px; color: var(--muted); }
.score-options { display: grid; gap: 10px; }
.score-choice { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 76px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: #fbfbfd; cursor: pointer; text-align: left; }
.score-choice:hover { border-color: #c4c4f5; background: #f7f7ff; }
.score-choice.selected { border-color: var(--primary); background: #efefff; box-shadow: inset 0 0 0 1px var(--primary); }
.score-number { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 13px; color: var(--primary-dark); background: #ececff; font-size: 18px; font-weight: 900; }
.score-choice.selected .score-number { color: white; background: var(--primary); }
.score-copy { display: grid; gap: 4px; flex: 1; }
.score-copy strong { font-size: 15px; }
.score-copy small { color: var(--muted); line-height: 1.45; }
.radio-dot { width: 18px; height: 18px; flex: 0 0 auto; border: 2px solid #c7cad8; border-radius: 50%; }
.score-choice.selected .radio-dot { border: 5px solid var(--primary); background: white; }
.question-card .primary-button { margin-top: 8px; }
.compact-header { max-width: 640px; margin: 0 auto; }
.example-card { padding: 30px; }
.lead-card { border:1px solid var(--line); border-radius:24px; background:white; box-shadow:var(--shadow); }
.lead-card label { display:grid; gap:8px; font-weight:800; }
.text-input, select, .lead-card textarea { width:100%; min-height:52px; padding:13px 15px; border:1px solid var(--line); border-radius:14px; color:var(--ink); background:white; outline:none; }
.text-input:focus, select:focus, .lead-card textarea:focus { border-color:var(--primary); box-shadow:0 0 0 3px rgba(91,92,235,.12); }
.code-input { text-transform:uppercase; letter-spacing:.08em; font-weight:800; }
.save-status { margin:12px 0; color:var(--success); text-align:center; font-size:12px; }
.example-card label { display: block; margin-bottom: 10px; font-weight: 800; }
.example-card textarea { width: 100%; min-height: 210px; resize: vertical; padding: 18px; border: 1px solid var(--line); border-radius: 16px; outline: none; line-height: 1.7; }
.example-card textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(91,92,235,.12); }
.example-card .primary-button { margin-top: 22px; }
.result-page { width: min(100%, 900px); padding-top: 0; }
.result-hero { margin: 0 -22px; padding: 58px max(24px, calc((100vw - 856px) / 2)) 48px; color: white; text-align: center; background: linear-gradient(145deg, #24275d, var(--primary) 62%, #7d6cef); border-radius: 0 0 34px 34px; box-shadow: 0 25px 70px rgba(62,63,167,.22); }
.score-orbit { display: flex; align-items: baseline; justify-content: center; margin-top: 20px; }
.score-orbit strong { font-size: clamp(72px, 15vw, 112px); line-height: 1; letter-spacing: -.06em; }
.score-orbit span { margin-left: 8px; color: #dfe0ff; font-weight: 700; }
.level-chip { display: inline-flex; margin: 18px auto; padding: 8px 15px; border: 1px solid rgba(255,255,255,.2); border-radius: 99px; background: rgba(255,255,255,.12); font-weight: 800; }
.result-hero h1 { max-width: 690px; margin: 8px auto 30px; color: #eef0ff; font-size: clamp(17px, 3vw, 21px); line-height: 1.65; font-weight: 500; }
.result-highlights { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 680px; margin: 0 auto; }
.result-highlights div { padding: 16px; border: 1px solid rgba(255,255,255,.15); border-radius: 17px; background: rgba(255,255,255,.08); }
.result-highlights span, .result-highlights strong { display: block; }
.result-highlights span { margin-bottom: 6px; color: #cfd2fb; font-size: 12px; }
.result-highlights strong { line-height: 1.45; }
.report-meta { display:flex; flex-wrap:wrap; justify-content:center; gap:8px 16px; margin-top:20px; color:#d9dcff; font-size:12px; }
.risk-alert { margin-top: 24px; padding: 20px 24px; border: 1px solid #f0c9cc; border-radius: 18px; color: #8b3037; background: #fff0f1; }
.risk-alert p { margin: 6px 0 0; }
.result-section { margin-top: 42px; }
.section-title { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.section-title > span { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 14px; color: var(--primary); background: #ececff; font-size: 12px; font-weight: 900; }
.section-title p, .section-title h2 { margin: 0; }
.section-title p { color: var(--muted); font-size: 12px; }
.section-title h2 { margin-top: 3px; font-size: 25px; }
.section-lead { margin: -6px 0 18px 58px; color: var(--muted); }
.dimension-list { display: grid; gap: 12px; }
.dimension-card { padding: 22px; }
.dimension-head { display: flex; justify-content: space-between; gap: 18px; }
.dimension-head h3 { margin: 0 0 8px; font-size: 17px; }
.dimension-head > strong { color: var(--primary-dark); font-size: 30px; }
.dimension-head > strong small { color: var(--muted); font-size: 12px; }
.status { display: inline-flex; padding: 4px 8px; border-radius: 99px; font-size: 11px; font-weight: 800; }
.status.success { color: var(--success); background: #e6f6f0; }
.status.healthy { color: var(--healthy); background: #eaf2fd; }
.status.warning { color: var(--warning); background: #fff1df; }
.status.danger { color: var(--danger); background: #fdebed; }
.dimension-bar { height: 8px; margin: 18px 0 14px; overflow: hidden; border-radius: 99px; background: #e9eaf1; }
.dimension-bar span { display: block; height: 100%; border-radius: inherit; }
.dimension-bar .success { background: var(--success); }
.dimension-bar .healthy { background: var(--healthy); }
.dimension-bar .warning { background: var(--warning); }
.dimension-bar .danger { background: var(--danger); }
.dimension-card p { margin: 0; color: var(--muted); line-height: 1.65; }
.action-list { display: grid; gap: 12px; }
.action-card { display: flex; gap: 16px; padding: 22px; border-radius: 20px; color: white; background: #20264a; box-shadow: var(--shadow); }
.action-index { color: #aaaefe; font-size: 12px; font-weight: 900; }
.action-card h3 { margin: 0 0 8px; font-size: 18px; }
.action-card p { margin: 0; color: #dfe2f4; line-height: 1.7; }
.pattern-card { margin-top: 24px; padding: 30px; border-color: #d8d5fa; background: linear-gradient(140deg, #f0efff, white); }
.pattern-card h2 { margin: 10px 0; font-size: 30px; }
.pattern-card > p { color: var(--muted); line-height: 1.7; }
.pattern-action { display: grid; gap: 6px; margin-top: 18px; padding: 17px; border-left: 4px solid var(--primary); border-radius: 0 14px 14px 0; background: white; }
.pattern-action strong { color: var(--primary); font-size: 12px; }
.discussion-list { display: grid; gap: 12px; padding: 0; list-style: none; counter-reset: questions; }
.discussion-list li { position: relative; padding: 22px 22px 22px 58px; border: 1px solid var(--line); border-radius: 18px; background: white; line-height: 1.65; counter-increment: questions; }
.discussion-list li::before { content: counter(questions); position: absolute; left: 20px; top: 20px; display: grid; width: 26px; height: 26px; place-items: center; border-radius: 9px; color: var(--primary); background: #ececff; font-size: 12px; font-weight: 900; }
.disclaimer { margin-top: 32px; padding: 24px; color: var(--muted); background: #f0f1f6; box-shadow: none; }
.lead-card { margin-top:32px; padding:30px; border-color:#d8d5fa; }
.lead-card h2 { margin:10px 0; font-size:clamp(25px,5vw,34px); }
.lead-card > p { color:var(--muted); line-height:1.7; }
.lead-card form { display:grid; gap:16px; margin-top:24px; }
.lead-card textarea { min-height:120px; resize:vertical; }
.consent-row { grid-template-columns:auto 1fr; align-items:start; font-weight:500 !important; line-height:1.5; }
.consent-row input { width:20px; height:20px; margin-top:1px; accent-color:var(--primary); }
.consent-row a { color:var(--primary-dark); }
.privacy-hint { margin:0; color:var(--muted); font-size:12px; line-height:1.6; }
.success-panel { padding:22px; border-radius:16px; color:#176b52; background:#e9f8f2; }
.success-panel p { margin:7px 0 0; }
.disclaimer strong { color: var(--ink); }
.disclaimer p { margin: 7px 0 0; line-height: 1.7; }
.result-actions { display: grid; gap: 10px; max-width: 520px; margin: 30px auto 0; }
.secondary-button { color: var(--primary-dark); border: 1px solid #cfcff5; background: white; }
.restart-button { margin: 10px auto 0; }
.copy-feedback { min-height: 20px; margin: 0; color: var(--success); text-align: center; font-size: 12px; }
.mobile-only { display: none; }

@media (max-width: 720px) {
  .page { padding: max(18px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(44px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .hero-card { padding: 42px 24px 30px; border-radius: 26px; }
  .hero-card h1 { margin-top: 20px; }
  .hero-card .primary-button { width: 100%; }
  .badge-row { gap: 8px; }
  .metric-badge { min-width: 0; flex: 1; padding: 12px; }
  .metric-badge strong { font-size: 21px; }
  .intro-grid { grid-template-columns: 1fr; }
  .info-card { padding: 22px; }
  .profile-group { padding: 20px 16px; }
  .profile-options, .compact-options { grid-template-columns: 1fr; }
  .question-card { padding: 24px 16px; }
  .score-choice { gap: 10px; padding: 11px 12px; }
  .score-number { width: 38px; height: 38px; }
  .score-copy small { font-size: 11px; }
  .result-page { padding-top: 0; }
  .result-hero { margin: 0 -16px; padding: 45px 20px 36px; border-radius: 0 0 28px 28px; }
  .result-highlights { grid-template-columns: 1fr; }
  .section-lead { margin-left: 0; }
  .dimension-card, .pattern-card { padding: 20px 16px; }
  .lead-card { padding:22px 16px; }
  .mobile-only { display: initial; }
}

@media print {
  body { background: white; }
  .result-page { width: 100%; padding: 0; }
  .result-hero { box-shadow: none; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .result-actions, .lead-card { display: none; }
  .dimension-card, .pattern-card, .action-card, .discussion-list li { break-inside: avoid; box-shadow: none; }
}
