:root {
  --ink: #10231d;
  --muted: #60716b;
  --paper: #f4f1e8;
  --card: rgba(255, 255, 255, 0.76);
  --line: rgba(16, 35, 29, 0.14);
  --lime: #c8f45a;
  --green: #176a50;
  --orange: #ff8a4c;
  --shadow: 0 30px 80px rgba(20, 43, 35, 0.12);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(16, 35, 29, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 35, 29, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  overflow-x: hidden;
}

button, select, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.ambient { position: fixed; border-radius: 50%; filter: blur(18px); pointer-events: none; z-index: 0; }
.ambient-a { width: 360px; height: 360px; top: -150px; right: -70px; background: rgba(200, 244, 90, 0.36); }
.ambient-b { width: 280px; height: 280px; bottom: -150px; left: -90px; background: rgba(255, 138, 76, 0.2); }

.topbar, .site-footer, #app { position: relative; z-index: 1; }
.topbar {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
}
.brand { text-decoration: none; font-weight: 850; letter-spacing: -0.04em; font-size: 18px; }
.brand span { display: inline-block; padding: 6px 8px; margin-right: 5px; border-radius: 8px; background: var(--ink); color: var(--lime); }
.research-tag { color: var(--muted); font-size: 13px; }

#app { width: min(1120px, calc(100% - 36px)); min-height: calc(100vh - 144px); margin: 0 auto; display: grid; align-items: center; padding: 42px 0; }
.screen { animation: rise .42s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.hero { display: grid; grid-template-columns: 1.35fr .65fr; gap: clamp(28px, 7vw, 92px); align-items: end; }
.kicker { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 24px; color: var(--green); font-size: 13px; font-weight: 760; letter-spacing: .16em; }
.kicker::before { content: ""; width: 30px; height: 2px; background: currentColor; }
h1 { margin: 0; font-size: clamp(56px, 10.5vw, 126px); line-height: .88; letter-spacing: -.075em; font-weight: 880; }
h1 em { display: block; color: var(--green); font-style: normal; }
.lead { max-width: 660px; margin: 34px 0; color: var(--muted); font-size: clamp(17px, 2vw, 22px); line-height: 1.75; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.pill { border: 1px solid var(--line); border-radius: 999px; padding: 9px 13px; background: rgba(255,255,255,.42); font-size: 13px; }

.consent-card, .panel {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.consent-card { padding: 28px; }
.consent-card h2, .panel h2 { margin: 0 0 12px; font-size: 24px; letter-spacing: -.03em; }
.consent-card p, .consent-card li { color: var(--muted); line-height: 1.65; font-size: 14px; }
.consent-card ul { padding-left: 20px; margin: 16px 0 20px; }
.consent-check { display: flex; gap: 11px; align-items: flex-start; padding: 14px; border-radius: 14px; background: #edf4e6; cursor: pointer; font-size: 14px; line-height: 1.5; }
.consent-check input { width: 19px; height: 19px; accent-color: var(--green); margin-top: 1px; flex: 0 0 auto; }

.primary, .secondary, .ghost {
  min-height: 48px;
  border-radius: 14px;
  border: 0;
  padding: 0 20px;
  font-weight: 760;
  cursor: pointer;
  transition: transform .18s ease, opacity .18s ease, background .18s ease;
}
.primary { width: 100%; margin-top: 14px; color: white; background: var(--ink); }
.primary:hover, .secondary:hover, .ghost:hover { transform: translateY(-1px); }
.primary:disabled { cursor: not-allowed; opacity: .38; transform: none; }
.secondary { color: var(--ink); background: var(--lime); }
.ghost { border: 1px solid var(--line); color: var(--ink); background: transparent; }

.quiz-shell { width: min(850px, 100%); margin: auto; }
.progress-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; font-size: 13px; color: var(--muted); }
.progress { height: 7px; flex: 1; border-radius: 99px; overflow: hidden; background: rgba(16,35,29,.09); }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--green),var(--lime)); transition: width .3s ease; }
.panel { padding: clamp(26px, 5vw, 54px); }
.dimension { margin: 0 0 16px; color: var(--green); font-size: 13px; font-weight: 780; letter-spacing: .12em; }
.question { margin: 0; font-size: clamp(25px, 4vw, 40px); line-height: 1.28; letter-spacing: -.035em; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 40px; }
.scale button { min-height: 86px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.58); color: var(--ink); cursor: pointer; transition: .18s ease; }
.scale button:hover, .scale button.selected { border-color: var(--green); background: #e7f5d5; transform: translateY(-2px); }
.scale strong { display: block; font-size: 24px; }
.scale small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.quiz-nav { display: flex; justify-content: space-between; margin-top: 18px; }

.result-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 22px; }
.type-card { position: relative; overflow: hidden; min-height: 460px; padding: clamp(30px, 5vw, 56px); border-radius: 28px; background: var(--ink); color: white; box-shadow: var(--shadow); }
.type-card::after { display: none; }
.type-label { color: var(--lime); font-size: 13px; letter-spacing: .16em; font-weight: 800; }
.type-code { position: relative; z-index: 1; margin: 28px 0 10px; font-size: clamp(68px, 11vw, 122px); line-height: .9; letter-spacing: -.08em; }
.type-name { position: relative; z-index: 1; margin: 0; font-size: 27px; }
.type-summary { position: relative; z-index: 1; max-width: 460px; margin-top: 28px; color: rgba(255,255,255,.7); line-height: 1.75; }
.result-panel { padding: clamp(28px, 5vw, 48px); }
.dimension-bars { display: grid; gap: 20px; margin: 28px 0; }
.bar-row { display: grid; grid-template-columns: 95px 1fr 44px; gap: 12px; align-items: center; font-size: 13px; }
.bar { height: 9px; border-radius: 99px; overflow: hidden; background: rgba(16,35,29,.09); }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.notice { padding: 14px 16px; border-left: 3px solid var(--orange); background: #fff0e8; color: #76523e; line-height: 1.6; font-size: 13px; }
.result-actions { display: flex; gap: 10px; margin-top: 22px; }

.form-shell { width: min(920px, 100%); margin: auto; }
.form-head { margin-bottom: 24px; }
.form-head h1 { font-size: clamp(38px, 6vw, 72px); line-height: 1; }
.form-head p { color: var(--muted); line-height: 1.7; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 720; }
.field select { width: 100%; height: 50px; border: 1px solid var(--line); border-radius: 13px; padding: 0 13px; color: var(--ink); background: rgba(255,255,255,.72); }
.pi-list { display: grid; gap: 13px; margin-top: 28px; }
.pi-item { padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.45); }
.pi-item p { margin: 0 0 13px; line-height: 1.55; }
.mini-scale { display: flex; flex-wrap: wrap; gap: 8px; }
.mini-scale label { cursor: pointer; }
.mini-scale input { position: absolute; opacity: 0; pointer-events: none; }
.mini-scale span { display: inline-grid; place-items: center; width: 42px; height: 38px; border: 1px solid var(--line); border-radius: 11px; background: white; font-weight: 740; }
.mini-scale input:checked + span { color: white; border-color: var(--green); background: var(--green); }
.scale-legend { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 11px; }
.submit-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 26px; }
.submit-row p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.submit-row .secondary { min-width: 170px; }
.error { margin-top: 14px; color: #a53f2c; font-size: 13px; }

.success { width: min(680px, 100%); margin: auto; text-align: center; }
.success-mark { display: grid; place-items: center; width: 82px; height: 82px; margin: 0 auto 25px; border-radius: 50%; background: var(--lime); font-size: 36px; }
.success h1 { font-size: clamp(46px, 8vw, 84px); }
.success p { color: var(--muted); line-height: 1.7; }

.site-footer { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px clamp(20px,5vw,72px); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

@media (max-width: 820px) {
  .hero, .result-grid { grid-template-columns: 1fr; }
  .consent-card { max-width: 620px; }
  .type-card { min-height: 390px; }
}
@media (max-width: 620px) {
  .research-tag { display: none; }
  #app { width: min(100% - 24px, 1120px); padding: 24px 0; }
  h1 { font-size: 58px; }
  .scale { gap: 5px; }
  .scale button { min-height: 78px; border-radius: 12px; }
  .scale small { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .result-actions, .submit-row { align-items: stretch; flex-direction: column; }
  .site-footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
