@font-face {
  font-family: "DaVinci Pretendard";
  src: url("/assets/PretendardVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: "DaVinci Pretendard", Pretendard, "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --page: #080d18;
  --surface: #111a29;
  --surface-raised: #172235;
  --surface-selected: #112d3b;
  --ink: #f2f6fc;
  --muted: #c2cede;
  --quiet: #aab9cf;
  --line: #344155;
  --line-strong: #50627c;
  --cyan: #66ddf5;
  --cyan-ink: #06151d;
  --error: #ffb8b8;
  --error-surface: #321c27;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--page); scroll-behavior: smooth; }
body {
  min-width: 320px;
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.58;
  overflow-x: hidden;
}
button, input, textarea { font: inherit; }
button { color: inherit; }
::selection { color: var(--cyan-ink); background: var(--cyan); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

.page-shell { position: relative; z-index: 1; width: min(100% - 48px, 1080px); margin: 0 auto; }
.edge-light { position: fixed; z-index: 0; pointer-events: none; width: 240px; height: 540px; opacity: .16; filter: blur(68px); }
.edge-light-left { left: -190px; top: 16vh; background: #12617a; }
.edge-light-right { right: -210px; top: 48vh; background: #173b6b; opacity: .13; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 94px;
  gap: 20px;
  border-bottom: 1px solid rgba(165, 188, 219, .22);
  transition: min-height 180ms ease-out;
}
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; color: var(--ink); text-decoration: none; }
.brand-emblem { display: grid; place-items: center; width: 54px; height: 54px; flex: 0 0 auto; padding: 5px; overflow: hidden; border-radius: 8px; background: #f4f0e3; }
.brand-emblem img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand-copy { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.brand-copy strong { font-size: 18px; font-weight: 700; letter-spacing: -.025em; }
.brand-copy small { margin-top: 5px; color: #d8e0eb; font-size: 12px; font-weight: 500; letter-spacing: .105em; }
.header-state { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.header-kicker { color: var(--muted); font-size: 12px; font-weight: 600; }
.header-state strong { max-width: min(48vw, 420px); color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.35; }
.topbar.is-compact { min-height: 72px; }
.topbar.is-compact .brand-emblem { width: 42px; height: 42px; }
.topbar.is-compact .brand-copy strong { font-size: 16px; }

.survey-column { width: min(100%, 720px); margin: 0 auto; padding-top: 34px; }
.app-content { min-height: 360px; }
.screen { animation: arrive 210ms cubic-bezier(.2,.8,.2,1) both; }
@keyframes arrive { from { opacity: .7; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.stage-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; color: var(--cyan); font-size: 13px; font-weight: 680; }
.stage-line span:last-child { color: var(--muted); font-weight: 570; text-align: right; }
.screen-title { max-width: 25ch; margin: 0; color: var(--ink); font-size: clamp(25px, 4vw, 32px); font-weight: 680; letter-spacing: -.035em; line-height: 1.38; text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; }
.screen-lede { max-width: 62ch; margin: 12px 0 0; color: var(--muted); font-size: 16px; font-weight: 430; line-height: 1.6; word-break: keep-all; }
.screen-lede strong { color: var(--ink); font-weight: 680; }
.concern-intro { margin-bottom: 34px; }

.question-list { display: grid; gap: 30px; margin-top: 32px; }
.question { min-width: 0; margin: 0; padding: 0 0 28px; border: 0; border-bottom: 1px solid rgba(165, 188, 219, .2); }
.question:last-child { padding-bottom: 4px; border-bottom: 0; }
.question.concern-choices { padding: 0; border: 0; }
.question.has-error { padding: 14px; border: 1px solid #ad6472; border-radius: 12px; background: rgba(50, 28, 39, .65); }
.question legend { width: 100%; padding: 0; color: var(--ink); font-size: 21px; font-weight: 700; letter-spacing: -.02em; line-height: 1.46; word-break: keep-all; }
.question-help { margin: 6px 0 13px; color: var(--muted); font-size: 14px; line-height: 1.55; word-break: keep-all; }
.question-options { display: grid; gap: 9px; margin-top: 14px; }
.choice {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  min-height: 52px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 150ms ease-out, background-color 150ms ease-out;
}
.choice:hover { border-color: #60718a; background: #131e30; }
.choice input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; clip: rect(0 0 0 0); clip-path: inset(50%); }
.choice input:focus-visible + .choice-mark { outline: 3px solid var(--cyan); outline-offset: 4px; }
.choice:has(input:checked) { border-color: var(--cyan); background: var(--surface-selected); }
.choice-mark { position: relative; display: block; flex: 0 0 20px; width: 20px; height: 20px; margin-top: 1px; border: 1.5px solid #c0ccdd; background: #0b1220; }
.choice.multi .choice-mark { border-radius: 5px; }
.choice.single .choice-mark { border-radius: 50%; }
.choice input:checked + .choice-mark { border-color: var(--cyan); background: var(--cyan); }
.choice.multi input:checked + .choice-mark::after { position: absolute; left: 5px; top: 2px; width: 6px; height: 10px; border-right: 2px solid var(--cyan-ink); border-bottom: 2px solid var(--cyan-ink); content: ""; transform: rotate(42deg); }
.choice.single input:checked + .choice-mark::after { position: absolute; inset: 5px; border-radius: 50%; background: var(--cyan-ink); content: ""; }
.choice-label { min-width: 0; color: var(--ink); font-size: 17px; font-weight: 480; line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere; }
.choice:has(input:checked) .choice-label { font-weight: 540; }
.choice:has(input:disabled) { opacity: .48; cursor: not-allowed; }

.write-in { display: block; margin: 12px 0 0 34px; }
.field-label { display: block; margin-bottom: 7px; color: var(--ink); font-size: 15px; font-weight: 650; }
.text-field { display: block; width: 100%; min-height: 52px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: #0c1422; color: var(--ink); caret-color: var(--cyan); font-size: 16px; line-height: 1.55; }
textarea.text-field { min-height: 98px; resize: vertical; }
.text-field::placeholder { color: #b7c4d6; opacity: 1; }
.text-field:disabled { color: #a5b2c4; border-color: #344258; background: #111a29; opacity: .72; }

.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 29px; padding-bottom: 16px; }
.nav-spacer { flex: 1; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; min-width: 116px; padding: 12px 20px; border: 1px solid var(--line-strong); border-radius: 11px; background: transparent; color: var(--ink); font-size: 16px; font-weight: 690; line-height: 1.3; text-align: center; text-decoration: none; cursor: pointer; transition: background-color 150ms ease-out, border-color 150ms ease-out, color 150ms ease-out; }
.button:hover:not(:disabled) { border-color: #b4c3d7; background: #172235; }
.button.primary { border-color: var(--cyan); background: var(--cyan); color: var(--cyan-ink); }
.button.primary:hover:not(:disabled) { border-color: #a5f0ff; background: #a5f0ff; }
.button:disabled { border-color: #4a5667; background: #263142; color: #c0c9d5; cursor: not-allowed; }
.button.secondary { color: var(--muted); }
.error-message { margin: 18px 0 0; padding: 11px 13px; border: 1px solid #ad6472; border-radius: 10px; background: var(--error-surface); color: var(--error); font-size: 15px; font-weight: 620; line-height: 1.5; }
.status-note { margin: 24px 0 0; padding: 15px 16px; border: 1px solid #43536b; border-radius: 11px; background: #111a29; color: var(--muted); font-size: 14px; line-height: 1.58; }
.status-note strong { color: var(--ink); font-weight: 700; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; margin-top: 31px; }
.contact-field { min-width: 0; }
.contact-field.wide { grid-column: 1 / -1; }
.completion-mark { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 0 23px; border: 1px solid var(--cyan); border-radius: 50%; color: var(--cyan); font-size: 23px; font-weight: 600; }
.review-tools { margin-top: 48px; border-top: 1px solid rgba(165, 188, 219, .2); color: var(--muted); }
.review-tools summary { width: fit-content; padding: 15px 0 6px; color: var(--muted); font-size: 13px; cursor: pointer; }
.review-tools p { margin: 7px 0 12px; font-size: 13px; }
.review-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 15px; }
.review-actions button { min-height: 42px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 14px; cursor: pointer; }
.review-actions button:hover { border-color: var(--cyan); }
.page-footer { display: flex; justify-content: space-between; gap: 12px; width: min(100%, 720px); margin: 42px auto 0; padding: 17px 0 max(22px, env(safe-area-inset-bottom)); border-top: 1px solid rgba(165, 188, 219, .2); color: var(--quiet); font-size: 12px; line-height: 1.4; }

@media (max-width: 600px) {
  .page-shell { width: calc(100% - 36px); }
  .topbar { min-height: 82px; gap: 10px; }
  .brand { gap: 9px; }
  .brand-emblem { width: 48px; height: 48px; }
  .brand-copy strong { font-size: 17px; }
  .brand-copy small { font-size: 11px; }
  .topbar.is-compact { min-height: 68px; }
  .header-kicker { font-size: 11px; }
  .header-state strong { max-width: 45vw; font-size: 13px; }
  .survey-column { width: 100%; }
  .survey-column { padding-top: 27px; }
  .screen-title { max-width: 27ch; font-size: clamp(25px, 7vw, 28px); }
  .screen-lede { font-size: 15px; }
  .concern-intro { margin-bottom: 27px; }
  .question-list { gap: 26px; margin-top: 26px; }
  .question { padding-bottom: 23px; }
  .question legend { font-size: 20px; }
  .question-help { font-size: 14px; }
  .question-options { gap: 8px; margin-top: 12px; }
  .concern-choices .question-options { margin-top: 0; }
  .choice { min-height: 50px; gap: 11px; padding: 12px 12px; }
  .choice-label { font-size: 16px; }
  .write-in { margin-left: 31px; }
  .nav-row { margin-top: 25px; }
  .button { min-width: 104px; min-height: 50px; padding: 11px 16px; }
  .contact-grid { grid-template-columns: 1fr; gap: 17px; }
  .contact-field.wide { grid-column: auto; }
  .page-footer { margin-top: 34px; font-size: 11px; }
}

@media (max-width: 370px) {
  .page-shell { width: calc(100% - 32px); }
  .brand-copy strong { font-size: 16px; }
  .brand-copy small { letter-spacing: .07em; }
  .header-state strong { max-width: 42vw; font-size: 12px; }
  .screen-title { font-size: 24px; }
}

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