:root {
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #111827;
  background: #fbfbfd;
  font-synthesis: none;
  --navy: #111827;
  --text: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --surface: #ffffff;
  --soft: #f4f3ff;
  --primary: #6375f4;
  --primary-dark: #4c5ed7;
  --green: #0f9f6e;
  --footer: #11172b;
  --shadow: 0 18px 45px rgba(62, 72, 130, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: #fbfbfd; color: var(--text); line-height: 1.65; }
a { color: inherit; }
button { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.container { width: min(1040px, calc(100% - 32px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 100; top: -70px; left: 14px; padding: 10px 14px; border: 2px solid var(--navy); background: #fff; font-weight: 800; }
.skip-link:focus { top: 12px; }
.eyebrow { margin: 0 0 7px; color: #596bea; font-size: .78rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, h3, strong { color: var(--navy); }

.site-header { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid #ececf2; background: rgba(255, 255, 255, .94); box-shadow: 0 1px 16px rgba(30, 41, 59, .04); backdrop-filter: blur(12px); }
.header-inner { display: flex; min-height: 66px; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand-mark { display: block; width: 34px; height: 34px; object-fit: contain; }
.brand strong { font-size: 1.24rem; font-weight: 900; line-height: 1; letter-spacing: -.045em; }
.site-header nav { display: flex; align-items: center; gap: 4px; }
.site-header nav a { padding: 8px 10px; border-radius: 7px; color: #475569; font-size: .9rem; font-weight: 650; text-decoration: none; }
.site-header nav a:hover { background: #f3f2ff; color: #4657d2; }

.hero { padding: 56px 0 28px; text-align: center; }
.hero h1 { margin: 0; font-size: clamp(2.35rem, 7vw, 3.65rem); line-height: 1.1; letter-spacing: -.06em; }
.hero p:last-child { max-width: 650px; margin: 13px auto 0; color: var(--muted); font-size: 1.02rem; }

.test-shell { padding-bottom: 72px; }
.test-card { overflow: hidden; border: 1px solid #e3e4ed; border-radius: 22px; background: #fff; box-shadow: 0 12px 36px rgba(40, 48, 91, .07); }
.test-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.test-toolbar div { display: flex; align-items: center; gap: 10px; }
.test-toolbar strong { font-size: .93rem; }
.progress { display: flex; gap: 7px; }
.progress span { width: 26px; height: 7px; border-radius: 999px; background: #e6e7ee; }
.progress span.is-current { background: #aab3ff; }
.progress span.is-complete { background: var(--primary); }
.text-button { padding: 7px 4px; border: 0; background: transparent; color: #687085; font-size: .82rem; font-weight: 780; cursor: pointer; }
.text-button:hover { color: var(--primary-dark); }

.reaction-pad { display: grid; width: 100%; min-height: 360px; place-items: center; padding: 38px 24px; border: 0; background: linear-gradient(145deg, #f4f3ff, #eef0ff); color: var(--navy); text-align: center; touch-action: manipulation; cursor: pointer; transition: background .18s ease, color .18s ease, transform .12s ease; user-select: none; -webkit-tap-highlight-color: transparent; }
.reaction-pad:active { transform: scale(.997); }
.pad-content { max-width: 700px; pointer-events: none; }
.pad-kicker { display: inline-flex; min-height: 28px; align-items: center; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .75); color: #4c5ed7; font-size: .75rem; font-weight: 850; letter-spacing: .02em; }
.pad-title { display: block; margin-top: 19px; color: inherit; font-size: clamp(2rem, 7vw, 3.35rem); line-height: 1.15; letter-spacing: -.055em; }
.pad-description { display: block; margin-top: 13px; color: #667085; font-size: .95rem; }
.reaction-pad[data-state="waiting"] { background: linear-gradient(145deg, #f35d66, #d82f3d); color: #fff; }
.reaction-pad[data-state="ready"] { background: linear-gradient(145deg, #18b983, #07865f); color: #fff; }
.reaction-pad[data-state="false-start"] { background: linear-gradient(145deg, #fff2d9, #ffdf9c); color: #6b3f00; }
.reaction-pad[data-state="result"] { background: linear-gradient(145deg, #e9edff, #dfe5ff); color: #24306f; }
.reaction-pad[data-state="complete"] { background: linear-gradient(145deg, #7f72f3, #536de9); color: #fff; }
.reaction-pad[data-state="waiting"] .pad-kicker,
.reaction-pad[data-state="ready"] .pad-kicker,
.reaction-pad[data-state="complete"] .pad-kicker { background: rgba(255, 255, 255, .18); color: #fff; }
.reaction-pad[data-state="waiting"] .pad-description,
.reaction-pad[data-state="ready"] .pad-description,
.reaction-pad[data-state="complete"] .pad-description { color: rgba(255, 255, 255, .88); }
.reaction-pad[data-state="false-start"] .pad-kicker { color: #8c5608; }

.result-panel { padding: 22px; border-top: 1px solid var(--line); }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.summary-grid > div { padding: 13px 10px; border: 1px solid #e6e7ef; border-radius: 12px; background: #fafaff; text-align: center; }
.summary-grid span { display: block; color: #7c8497; font-size: .7rem; font-weight: 800; }
.summary-grid strong { display: block; margin-top: 2px; font-size: 1.17rem; }
.trial-chart { margin-top: 18px; padding: 16px 16px 8px; border: 1px solid #e6e7ef; border-radius: 14px; background: #fcfcff; }
.chart-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 4px; }
.chart-heading strong { font-size: .9rem; }
.chart-heading span { color: var(--muted); font-size: .72rem; font-weight: 750; }
.trial-chart canvas, .distribution-chart canvas { display: block; width: 100%; }

.distribution-result { margin-top: 20px; padding: 24px; border: 1px solid #dfe1ef; border-radius: 18px; background: #f8f8ff; }
.distribution-copy { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.distribution-eyebrow { color: var(--primary-dark); font-size: .72rem; font-weight: 850; letter-spacing: .06em; }
.distribution-copy h2 { margin: 3px 0 0; font-size: clamp(1.7rem, 5vw, 2.4rem); letter-spacing: -.045em; }
.distribution-copy p { margin: 6px 0 0; color: #596174; font-size: .9rem; }
.distribution-average { flex: 0 0 auto; color: var(--primary-dark); font-size: clamp(1.35rem, 4vw, 1.8rem); }
.distribution-chart { margin-top: 18px; padding: 6px 4px 0; border-radius: 13px; background: #fff; }
.distribution-note { margin: 12px 0 0; color: #7c8497; font-size: .74rem; line-height: 1.55; }

.history-section { padding: 46px 0 68px; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.section-heading h2 { margin: 0; font-size: clamp(1.55rem, 4vw, 2rem); letter-spacing: -.04em; }
.best-ever { text-align: right; }
.best-ever span { display: block; color: var(--muted); font-size: .72rem; font-weight: 800; }
.best-ever strong { font-size: 1.35rem; }
.history-empty { margin: 0; padding: 24px; border: 1px dashed #d9dbea; border-radius: 13px; color: #858da0; text-align: center; }
.history-list { display: grid; margin: 0; padding: 0; gap: 8px; list-style: none; }
.history-list li { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 16px; border: 1px solid #e5e6ef; border-radius: 11px; background: #fff; }
.history-list span { color: var(--primary-dark); font-size: .76rem; font-weight: 900; }
.history-list strong { font-size: .86rem; text-align: right; }

.content { padding-bottom: 86px; }
.content-block { padding: 48px 0; border-top: 1px solid var(--line); }
.content-block h2, .related h2 { margin: 0 0 18px; font-size: clamp(1.45rem, 4vw, 1.9rem); letter-spacing: -.04em; }
.content-block ol { margin: 0; padding-left: 22px; }
.content-block li + li { margin-top: 8px; }
.tip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tip-grid article { padding: 19px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.tip-grid h3 { margin: 0 0 7px; font-size: 1rem; }
.tip-grid p { margin: 0; color: #596174; font-size: .88rem; }
.explanation-copy { max-width: 820px; }
.explanation-copy p { margin: 0; color: #4f5b70; }
.explanation-copy p + p { margin-top: 14px; }
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { padding: 17px 2px; color: var(--navy); font-weight: 800; cursor: pointer; }
details p { margin: -3px 2px 18px; color: #596174; }
.related { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px; border: 1px solid #dfe1ef; border-radius: 18px; background: #fff; }
.related h2 { margin-bottom: 0; }
.related-actions { display: flex; gap: 8px; }
.button-secondary { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; padding: 8px 14px; border: 1px solid #dfe1ea; border-radius: 9px; background: #fff; color: var(--navy); font-weight: 800; text-decoration: none; }
.button-secondary:hover { background: #f5f5fa; }
.ad-slot { width: min(1040px, calc(100% - 32px)); min-height: 100px; margin: 0 auto 30px; }

.site-footer { padding: 38px 0 24px; background: var(--footer); color: #dbe1f2; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 24px; }
.footer-inner strong { color: #fff; }
.footer-inner p { margin: 5px 0; color: #adb7d0; font-size: .86rem; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-inner a, .footer-link { color: #dbe1f2; font-size: .84rem; }
.footer-link { padding: 0; border: 0; background: transparent; text-decoration: underline; cursor: pointer; }
.footer-link:hover { color: #fff; }
.footer-inner small { grid-column: 1 / -1; padding-top: 16px; border-top: 1px solid #30394f; color: #929db8; }
.consent { position: fixed; z-index: 40; right: 18px; bottom: 18px; width: min(470px, calc(100% - 36px)); padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.consent p { margin: 0 0 13px; color: var(--text); font-size: .9rem; }
.consent-actions { display: flex; justify-content: flex-end; gap: 8px; }
.consent button { min-height: 39px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--navy); font-weight: 800; cursor: pointer; }
.consent button:last-child { border-color: var(--primary); background: var(--primary); color: #fff; }
.noscript { margin: 0; padding: 12px; background: #fff1f2; color: #9f2638; text-align: center; }

.policy-shell { width: min(800px, calc(100% - 32px)); min-height: 65vh; margin: 0 auto; padding: 58px 0 82px; }
.policy-shell h1 { margin: 0; font-size: clamp(2rem, 6vw, 2.8rem); letter-spacing: -.045em; }
.policy-shell h2 { margin: 34px 0 9px; font-size: 1.25rem; }
.policy-shell p, .policy-shell li { color: #4b5563; }
.policy-meta { color: var(--muted); font-size: .86rem; }
.policy-shell a { color: var(--primary-dark); font-weight: 750; }
.contact-card { margin-top: 30px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.contact-card a { color: var(--primary-dark); font-weight: 800; }
.not-found { display: grid; min-height: 70vh; place-items: center; padding: 24px; text-align: center; }
.not-found div { max-width: 560px; }
.not-found h1 { margin: 4px 0; font-size: clamp(2rem, 7vw, 3.5rem); }
.not-found p { color: var(--muted); }

@media (max-width: 760px) {
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .tip-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .container { width: min(100% - 22px, 1040px); }
  .header-inner { min-height: 60px; gap: 10px; }
  .site-header nav { max-width: calc(100vw - 104px); overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
  .site-header nav::-webkit-scrollbar { display: none; }
  .site-header nav a { padding-inline: 6px; font-size: .78rem; }
  .hero { padding: 44px 0 20px; }
  .hero p:last-child { font-size: .92rem; }
  .test-shell { padding-bottom: 52px; }
  .test-card { border-radius: 16px; }
  .test-toolbar { align-items: flex-start; padding: 15px; }
  .test-toolbar > div { align-items: flex-start; flex-direction: column; gap: 7px; }
  .progress span { width: 22px; }
  .reaction-pad { min-height: 330px; padding-inline: 18px; }
  .result-panel { padding: 15px; }
  .trial-chart { padding-inline: 8px; }
  .distribution-result { padding: 18px 13px; }
  .distribution-copy { flex-direction: column; gap: 6px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .best-ever { text-align: left; }
  .history-list li { align-items: flex-start; flex-direction: column; gap: 3px; }
  .history-list strong { text-align: left; }
  .related { align-items: stretch; flex-direction: column; padding: 22px; }
  .related-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-inner nav { flex-direction: column; gap: 7px; }
  .footer-inner small { grid-column: auto; }
  .consent-actions { display: grid; grid-template-columns: 1fr 1fr; }
}

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