:root {
  color-scheme: light;
  --background: #f5f4ef;
  --surface: #fffefa;
  --surface-subtle: #ecefe9;
  --ink: #172421;
  --muted: #5f6d68;
  --line: #d7ddd8;
  --primary: #1f6657;
  --primary-dark: #164d42;
  --primary-soft: #dfeee9;
  --accent: #a55c38;
  --focus: #0b63ce;
  --radius: 18px;
  --shadow: 0 12px 34px rgb(26 49 42 / 7%);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 0;
  width: 100%;
  color: var(--ink);
  background: var(--background);
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

[tabindex="-1"]:focus {
  outline: none;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: 8px;
  color: white;
  background: var(--ink);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  width: 100%;
}

.screen {
  width: min(100% - 32px, 700px);
  margin: 0 auto;
  padding: 48px 0 56px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.3;
  letter-spacing: -0.025em;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(2rem, 9vw, 3rem);
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(1.35rem, 5vw, 1.65rem);
}

h3 {
  font-size: 1.15rem;
}

.eyebrow,
.section-kicker {
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: 0 0 auto;
}

.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 13px 20px;
  font-weight: 750;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.button:not(:disabled):active {
  transform: translateY(1px);
}

.button.primary {
  color: white;
  background: var(--primary);
}

.button.primary:hover:not(:disabled) {
  background: var(--primary-dark);
}

.button.secondary {
  border-color: var(--line);
  color: var(--ink);
  background: var(--surface);
}

.button.secondary:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.button:disabled {
  color: #87908d;
  background: #e1e4e1;
  cursor: not-allowed;
}

.intro-screen {
  text-align: center;
}

.intro-screen .lead {
  margin-bottom: 34px;
  color: #40504b;
  font-size: clamp(1.05rem, 4vw, 1.25rem);
}

.intro-copy {
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-align: left;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.intro-copy p:last-child {
  margin-bottom: 0;
}

.facts {
  display: grid;
  gap: 10px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
  text-align: left;
}

.facts li {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 13px 15px;
  background: rgb(255 254 250 / 70%);
}

.facts .icon {
  width: 23px;
  height: 23px;
  color: var(--primary);
}

.facts span {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}

.facts small {
  color: var(--muted);
}

.start-button {
  width: 100%;
}

.privacy-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.question-screen {
  min-height: 100svh;
}

.question-header {
  margin-bottom: 26px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.progress-meta strong {
  color: var(--ink);
  font-size: 1rem;
}

.progress-track,
.score-track {
  overflow: hidden;
  border-radius: 99px;
  background: #dde2de;
}

.progress-track {
  height: 8px;
}

.progress-track span,
.score-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 180ms ease;
}

.question-guide {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.question-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 6vw, 32px);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.question-card fieldset {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.question-card legend {
  display: block;
  width: 100%;
  margin-bottom: 34px;
  padding: 0;
  color: var(--ink);
  font-size: clamp(1.25rem, 5vw, 1.5rem);
  font-weight: 750;
  line-height: 1.55;
}

.question-number {
  display: block;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.scale-end-labels {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.3;
}

.scale-end-labels span:nth-child(2) {
  text-align: center;
}

.scale-end-labels span:last-child {
  text-align: right;
}

.likert-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: clamp(4px, 1.5vw, 8px);
}

.scale-option {
  position: relative;
  min-width: 0;
}

.scale-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.scale-number {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #bfc8c3;
  border-radius: 10px;
  color: #384842;
  background: white;
  font-size: 1.05rem;
  font-weight: 750;
  cursor: pointer;
}

.scale-option input:hover + .scale-number {
  border-color: var(--primary);
}

.scale-option input:focus-visible + .scale-number {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.scale-option input:checked + .scale-number {
  border: 3px solid var(--primary-dark);
  color: white;
  background: var(--primary);
  box-shadow: inset 0 0 0 2px white;
}

.selected-label {
  min-height: 27px;
  margin: 16px 0 0;
  color: var(--muted);
  text-align: center;
}

.selected-label strong {
  color: var(--primary-dark);
}

.question-nav {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 10px;
  margin-top: 18px;
}

.keyboard-hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.result-screen {
  width: min(100% - 32px, 720px);
}

.result-header {
  margin-bottom: 30px;
  text-align: center;
}

.result-header > p:last-child {
  max-width: 550px;
  margin: 0 auto;
  color: var(--muted);
}

.complete-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 50%;
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.complete-mark .icon {
  width: 26px;
  height: 26px;
}

.score-card,
.interpretation,
.situations,
.disclaimer {
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 5vw, 30px);
  background: var(--surface);
}

.score-row + .score-row {
  margin-top: 22px;
}

.score-row.is-relative {
  margin-right: -12px;
  margin-left: -12px;
  border: 2px solid var(--accent);
  border-radius: 13px;
  padding: 12px;
}

.score-label {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.score-label > span {
  justify-self: start;
  border-radius: 99px;
  padding: 2px 8px;
  color: #7d381e;
  background: #f5e6df;
  font-size: 0.7rem;
  font-weight: 750;
}

.score-label b {
  justify-self: end;
  font-size: 1.15rem;
}

.score-label small {
  color: var(--muted);
  font-size: 0.75em;
  font-weight: 500;
}

.score-track {
  height: 11px;
}

.score-row.is-relative .score-track span {
  background: var(--accent);
}

.score-caption {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.interpretation {
  border-color: #aacdc4;
  background: #edf6f2;
}

.interpretation p:last-child {
  margin-bottom: 0;
}

.average-note {
  display: inline-block;
  margin-top: 5px;
  border-radius: 8px;
  padding: 7px 10px;
  background: rgb(255 255 255 / 70%);
}

.advice-section {
  margin: 42px 0 26px;
}

.section-heading {
  margin-bottom: 17px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.advice-list {
  display: grid;
  gap: 14px;
}

.advice-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 5vw, 26px);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.advice-card ol {
  margin: 0 0 20px;
  padding-left: 1.4em;
}

.advice-card li {
  padding-left: 5px;
}

.advice-card li + li {
  margin-top: 8px;
}

.advice-emphasis {
  margin: 0 0 16px;
  border-left: 4px solid var(--primary);
  padding: 10px 13px;
  color: #354640;
  background: var(--surface-subtle);
}

.today-action {
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-radius: 12px;
  padding: 14px 16px;
  color: white;
  background: var(--primary);
}

.today-action span {
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.05em;
}

.combined-today {
  margin-top: 14px;
}

.today-choice {
  margin: 14px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--surface);
}

.today-choice legend {
  padding: 0 5px;
  font-weight: 750;
}

.today-choice label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px;
  cursor: pointer;
}

.today-choice label + label {
  margin-top: 9px;
}

.today-choice input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin-top: 3px;
  accent-color: var(--primary);
}

.today-choice span {
  display: flex;
  flex-direction: column;
}

.situations ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.situations li {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

.situations li:last-child {
  padding-bottom: 0;
}

.situations li > span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
}

.situations li p {
  margin: 4px 0 0;
}

.disclaimer {
  color: #4d5c57;
  background: #eceeea;
}

.disclaimer strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.disclaimer p {
  margin: 0;
  font-size: 0.92rem;
}

.result-actions {
  margin-top: 28px;
}

.result-actions .button {
  width: 100%;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

@media (min-width: 600px) {
  .screen {
    padding-top: 72px;
  }

  .facts {
    grid-template-columns: 1fr 1fr;
  }

  .facts li:last-child {
    grid-column: 1 / -1;
  }

  .start-button {
    width: auto;
    min-width: 260px;
  }
}

@media (max-width: 380px) {
  .screen {
    width: min(100% - 24px, 700px);
    padding-top: 32px;
  }

  .question-card {
    padding-right: 15px;
    padding-left: 15px;
  }

  .scale-number {
    min-height: 46px;
    border-radius: 8px;
    font-size: 0.95rem;
  }

  .score-label {
    grid-template-columns: 1fr auto;
  }

  .score-label > span {
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .wide-only {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
