:root {
  --background: #0d0d0f;
  --surface: #1c1c1e;
  --surface-raised: #27272a;
  --surface-pressed: #303034;
  --line: rgba(255, 255, 255, .11);
  --text: #f5f5f7;
  --secondary: #a1a1aa;
  --accent: #e08478;
  --accent-soft: rgba(224, 132, 120, .16);
  --shadow: 0 18px 44px rgba(0, 0, 0, .2);
  --radius-card: 20px;
  --radius-control: 14px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--background); }
body { margin: 0; min-width: 320px; background: var(--background); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(224, 132, 120, .42); outline-offset: 3px; }
#app { min-height: 100dvh; }

.shell { width: min(100%, 760px); min-height: 100dvh; margin: 0 auto; padding: max(24px, env(safe-area-inset-top)) 20px calc(32px + env(safe-area-inset-bottom)); }
.content { width: 100%; }
.overline { margin: 0 0 10px; color: var(--secondary); font-size: 15px; font-weight: 600; letter-spacing: .01em; }
h1, h2, p { margin-top: 0; }
h1, h2 { color: var(--text); font-weight: 700; letter-spacing: -.045em; }
h1 { margin-bottom: 16px; font-size: clamp(36px, 7vw, 52px); line-height: 1.08; }
h2 { margin-bottom: 14px; font-size: clamp(26px, 5vw, 34px); line-height: 1.18; }
.lead { max-width: 35em; margin-bottom: 0; color: var(--secondary); font-size: 17px; line-height: 1.68; }
.notes { margin: 22px 2px 0; color: var(--secondary); font-size: 12px; line-height: 1.65; }

.gate { display: grid; place-items: center; }
.gate-card, .intro-card, .question, .loading-card, .report-hero, .radar-card, .report-collection { border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow); }
.gate-card { width: min(100%, 460px); padding: 28px 22px 24px; }
.brand-name { margin-bottom: 22px; color: var(--text); font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.field-label { display: block; margin: 25px 0 8px; color: var(--secondary); font-size: 13px; font-weight: 600; }
.code-input { display: block; width: 100%; height: 52px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--background); color: var(--text); font-size: 17px; outline: none; }
.code-input::placeholder { color: #727277; }
.code-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.error { min-height: 20px; margin: 8px 0 0; color: #ff8378; font-size: 13px; }

.btn, .secondary-btn { display: inline-flex; width: 100%; min-height: 50px; align-items: center; justify-content: center; border: 0; border-radius: var(--radius-control); padding: 12px 18px; font-weight: 700; text-align: center; transition: transform .16s ease-out, background .16s ease-out, opacity .16s ease-out; }
.btn { background: var(--accent); color: #231513; }
.secondary-btn { border: 1px solid var(--line); background: var(--surface-raised); color: var(--text); }
.btn:hover { background: #ec9489; }
.secondary-btn:hover { background: var(--surface-pressed); }
.btn:active, .secondary-btn:active, .answer:active { transform: scale(.985); }
.btn:disabled, .secondary-btn:disabled { opacity: .42; cursor: default; }

.intro-card { margin-top: clamp(24px, 8vh, 82px); padding: 34px 24px 28px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 28px 0 18px; }
.stat { min-height: 86px; padding: 14px 10px; border-radius: 14px; background: var(--surface-raised); text-align: left; }
.stat b { display: block; margin-bottom: 4px; color: var(--text); font-size: 25px; letter-spacing: -.04em; }
.stat small { color: var(--secondary); font-size: 12px; }
.info-box, .intro-detail { display: grid; gap: 6px; border-radius: var(--radius-control); background: rgba(255, 255, 255, .055); color: var(--secondary); font-size: 15px; line-height: 1.6; }
.info-box { padding: 15px 16px; }
.info-box b, .intro-detail b { color: var(--text); font-size: 14px; }
.start-actions { display: grid; gap: 12px; margin-top: 18px; }
.text-action { min-height: 44px; border: 0; background: transparent; color: var(--secondary); font-size: 14px; font-weight: 600; }
.text-action:hover { color: var(--text); }
.intro-detail { margin-top: 14px; padding: 14px 16px; }
.intro-detail[hidden] { display: none; }

.quiz-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 2px 15px; }
.progress-label { color: var(--secondary); font-size: 16px; font-weight: 600; }
.progress-pct { color: var(--accent); font-size: 16px; font-weight: 700; }
.progress { height: 5px; overflow: hidden; border-radius: 999px; background: var(--surface-raised); }
.progress > i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .28s ease-out; }
.question { margin-top: 20px; padding: 26px 20px 18px; }
.question-prompt { margin-bottom: 12px; color: var(--secondary); font-size: 16px; font-weight: 500; }
.question h2 { font-size: clamp(27px, 5.8vw, 37px); }
.answers { display: grid; gap: 10px; margin-top: 22px; }
.answer { display: grid; width: 100%; min-height: 76px; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--surface-raised); padding: 15px 14px; text-align: left; transition: transform .16s ease-out, border-color .16s ease-out, background .16s ease-out; }
.answer:hover { border-color: rgba(255,255,255,.24); background: #2d2d30; }
.answer:disabled { cursor: default; opacity: 1; }
.answer-key { display: grid; width: 20px; height: 20px; place-items: center; border: 1.5px solid #737378; border-radius: 50%; }
.answer.selected { border-color: var(--accent); background: var(--accent-soft); }
.answer.selected .answer-key::after { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); content: ""; }
.answer-main { display: block; color: var(--text); font-size: 17px; font-weight: 600; line-height: 1.48; }
.answer-hint { display: block; margin-top: 6px; color: var(--secondary); font-size: 15px; line-height: 1.5; }
.answer-confirm { display: block; margin-top: 8px; color: var(--accent); font-size: 12px; font-weight: 700; }
.quiz-footer { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 3px 0; }
.back { min-width: 64px; min-height: 44px; border: 0; background: transparent; color: var(--secondary); font-size: 14px; text-align: left; }
.back:not(:disabled):hover { color: var(--text); }
.back:disabled { opacity: .3; cursor: default; }
.auto { color: var(--secondary); font-size: 14px; text-align: right; }

.loading { display: grid; place-items: center; }
.loading-card { width: min(100%, 510px); padding: 32px 24px; }
.loading-avatar { width: 56px; height: 56px; margin-bottom: 24px; border-radius: 18px; background: linear-gradient(145deg, var(--accent-soft), rgba(255,255,255,.08)); }
.loading-lines { display: grid; gap: 10px; margin-top: 28px; }
.loading-lines i { display: block; height: 10px; border-radius: 999px; background: var(--surface-raised); }
.loading-lines i:nth-child(1) { width: 82%; }
.loading-lines i:nth-child(2) { width: 100%; }
.loading-lines i:nth-child(3) { width: 63%; }
@media (prefers-reduced-motion: no-preference) { .loading-lines i { animation: breathe 1.1s ease-in-out infinite alternate; } .loading-lines i:nth-child(2) { animation-delay: .12s; } .loading-lines i:nth-child(3) { animation-delay: .24s; } }

.report-shell { min-height: 100dvh; background: var(--background); }
.report-body { width: min(100%, 960px); margin: 0 auto; padding: max(24px, env(safe-area-inset-top)) 20px calc(42px + env(safe-area-inset-bottom)); }
.report-hero { padding: 30px 24px; }
.report-hero .overline { color: var(--accent); }
.identity { margin: 0 0 8px; color: var(--text); font-size: clamp(40px, 7vw, 62px); font-weight: 750; letter-spacing: -.065em; line-height: 1.02; }
.match { color: var(--secondary); font-size: 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.tag { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); font-size: 14px; }
.core-line { max-width: 34em; margin: 0; color: #dedee2; font-size: 17px; line-height: 1.7; }
.radar-card { display: grid; gap: 18px; margin-top: 14px; padding: 24px; }
.radar-card h2 { margin-bottom: 8px; font-size: 26px; }
.chart-note { max-width: 32em; margin-bottom: 0; color: var(--secondary); font-size: 16px; line-height: 1.62; }
.radar-wrap { display: grid; min-height: 290px; place-items: center; }
svg { width: min(100%, 330px); height: auto; overflow: visible; }
.axis { stroke: #4a4a50; stroke-width: 1; }
.ring { fill: none; stroke: #414146; stroke-width: 1; }
.shape { fill: rgba(224,132,120,.2); stroke: var(--accent); stroke-width: 2.2; }
.node { fill: var(--accent); }
.axis-label { fill: #bebec4; font: 14px var(--sans); }
.rank-list { display: grid; gap: 2px; margin-top: 24px; }
.rank-row { display: grid; grid-template-columns: 30px max-content max-content; justify-content: start; gap: 12px; align-items: center; min-height: 42px; color: var(--secondary); font-size: 15px; }
.rank-row span { color: var(--accent); font-size: 13px; font-weight: 700; }
.rank-row b { color: var(--text); font-size: 17px; }
.rank-row small { color: var(--secondary); font-size: 15px; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.report-collection { margin-top: 14px; overflow: hidden; }
.report-section { margin: 0; padding: 26px 24px; border-bottom: 1px solid var(--line); }
.report-section:last-child { border-bottom: 0; }
.report-section h2 { margin-bottom: 12px; font-size: 25px; }
.report-section p { margin-bottom: 0; color: #d1d1d6; font-size: 17px; line-height: 1.76; }
.practice-section { margin: 16px; border: 1px solid rgba(224,132,120,.34); border-radius: var(--radius-control); background: var(--accent-soft); }
.practice-section h2 { color: #f2d1cd; }

@keyframes breathe { from { opacity: .48; transform: scaleX(.98); } to { opacity: 1; transform: scaleX(1); } }
@media (min-width: 760px) {
  .shell { padding-left: 28px; padding-right: 28px; }
  .intro-card { margin-top: clamp(36px, 12vh, 120px); padding: 38px 36px 30px; }
  .question { padding: 32px 30px 22px; }
  .report-body { padding-left: 28px; padding-right: 28px; }
  .report-hero { padding: 38px 36px; }
  .radar-card { grid-template-columns: minmax(0, 1fr) 330px; align-items: center; padding: 30px 32px; }
  .result-actions { grid-template-columns: 220px 160px; }
}
@media (max-width: 390px) {
  .shell, .report-body { padding-left: 16px; padding-right: 16px; }
  .gate-card, .intro-card, .question, .loading-card, .report-hero, .radar-card, .report-collection { border-radius: 18px; }
  .gate-card, .intro-card, .question, .loading-card, .report-hero, .radar-card { padding-left: 18px; padding-right: 18px; }
  .report-section { padding-left: 18px; padding-right: 18px; }
  .answer { min-height: 72px; padding: 13px 12px; }
  .stats { gap: 6px; }
  .stat { padding: 12px 8px; }
  .result-actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.site-filing { padding: 22px 20px 30px; color: #7e7b86; text-align: center; font-size: 14px; line-height: 1.5; }.site-filing a { color: inherit; text-decoration: none; }.site-filing a:hover { color: #d6c690; }
