:root {
  --bg-top: #f4eeff;
  --bg-bottom: #edf4ff;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-soft: #f6f1ff;
  --text-main: #201a36;
  --text-soft: #7d7694;
  --primary: #6f43ff;
  --primary-strong: #7f4dff;
  --border: rgba(123, 97, 255, 0.16);
  --shadow: 0 18px 44px rgba(103, 73, 202, 0.14);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --type-scale: 1;
}

* {
  box-sizing: border-box;
}

html {
  font-size: calc(16px * var(--type-scale));
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  font-family: "Pretendard Variable", "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(123, 97, 255, 0.18), transparent 34%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

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

button,
input {
  font: inherit;
}

.page-shell {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: 10px 12px 56px;
}

.hero-card,
.info-card,
.toolbar-card,
.section-card,
.result-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-card,
.info-card,
.toolbar-card,
.survey-section,
.result-card {
  margin-top: 26px;
}

.hero-card {
  padding: 18px 14px 16px;
  margin-top: 8px;
}

.eyebrow,
.section-badge,
.question-number {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(123, 97, 255, 0.11);
  color: var(--primary-strong);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.eyebrow {
  margin-bottom: 12px;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.06;
  letter-spacing: -0.05em;
  color: var(--primary);
}

.hero-lead {
  margin-bottom: 14px;
  font-size: 1.02rem;
  line-height: 1.55;
  font-weight: 800;
}

.hero-copy,
.card-copy,
.helper-copy,
.form-footer,
.toolbar-copy,
.section-copy,
.question-alt,
.likert-caption,
.result-copy,
.feature-card p {
  color: var(--text-soft);
}

.hero-copy {
  margin-bottom: 10px;
  line-height: 1.75;
}

.soft-highlight {
  color: #6a53f0;
  font-weight: 700;
}

.feature-grid {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.feature-card {
  padding: 18px 16px;
  border-radius: 20px;
  border: 1px solid rgba(123, 97, 255, 0.12);
  background: rgba(255, 255, 255, 0.86);
}

.feature-card h2 {
  margin-bottom: 6px;
  font-size: 1.55rem;
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.feature-card p {
  margin-bottom: 0;
  line-height: 1.65;
}

.feature-card-accent {
  background: linear-gradient(135deg, rgba(244, 239, 255, 0.98), rgba(255, 255, 255, 1));
  border-color: rgba(123, 97, 255, 0.2);
}

.info-card,
.toolbar-card,
.result-card {
  padding: 18px;
}

.info-card {
  margin-top: 44px;
}

.card-title {
  margin-bottom: 8px;
  font-size: 2rem;
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.card-copy {
  margin-bottom: 18px;
  font-size: 1rem;
  line-height: 1.65;
}

.info-form {
  display: grid;
  gap: 16px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: grid;
  gap: 10px;
}

.field span {
  font-size: 1.05rem;
  font-weight: 800;
}

.field input {
  width: 100%;
  min-height: 60px;
  padding: 0 18px;
  border-radius: 18px;
  border: 1px solid rgba(123, 97, 255, 0.12);
  background: #fff;
  color: var(--text-main);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.field input:focus {
  outline: 2px solid rgba(111, 67, 255, 0.18);
  border-color: rgba(111, 67, 255, 0.36);
}

.helper-copy,
.form-footer {
  margin-bottom: 0;
  line-height: 1.65;
}

.form-footer {
  margin-top: 18px;
}

.toolbar-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.toolbar-copy-wrap {
  min-width: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.toolbar-title {
  display: block;
  margin-bottom: 4px;
  font-size: 1rem;
  font-weight: 800;
}

.toolbar-copy {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.toolbar-actions,
.submit-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar-actions {
  margin-left: auto;
  flex-wrap: nowrap;
}

.survey-form {
  margin-top: 0;
}

.survey-section {
  margin-top: 102px;
}

#surveyRoot {
  display: grid;
  gap: 20px;
}

.section-card {
  padding: 20px 18px 18px;
}

.section-card-intro {
  padding-top: 26px;
}

.section-head {
  margin-bottom: 16px;
}

.section-head-intro {
  margin-bottom: 22px;
}

.section-badge {
  margin-bottom: 10px;
}

.section-intro-title-wrap {
  margin-bottom: 54px;
}

.section-badge-main {
  min-height: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  color: var(--text-main);
  font-size: clamp(2.25rem, 6vw, 3.1rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.07em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
}

.section-title {
  margin-bottom: 8px;
  font-size: 1.65rem;
  line-height: 1.14;
  letter-spacing: -0.04em;
}

.section-copy {
  margin-bottom: 0;
  line-height: 1.65;
}

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

.question-card {
  padding: 18px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(246, 242, 255, 0.96), rgba(255, 255, 255, 0.98));
}

.question-number {
  margin-bottom: 12px;
}

.question-title {
  margin-bottom: 8px;
  font-size: 1rem;
  line-height: 1.72;
  font-weight: 700;
}

.question-alt-wrap {
  display: grid;
  justify-items: start;
  gap: 10px;
  margin-bottom: 14px;
}

.question-alt-toggle {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(123, 97, 255, 0.2);
  background: rgba(123, 97, 255, 0.08);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 800;
}

.question-alt-toggle:hover,
.question-alt-toggle:focus-visible {
  border-color: rgba(123, 97, 255, 0.38);
  background: rgba(123, 97, 255, 0.14);
}

.question-alt {
  margin-bottom: 0;
  color: var(--text-main);
  font-size: 0.97rem;
  line-height: 1.7;
  font-weight: 600;
}

.likert-shell {
  border-radius: 20px;
  border: 1px solid rgba(123, 97, 255, 0.12);
  background: #fff;
  padding: 18px 18px 16px;
}

.likert-row {
  display: grid;
  grid-template-columns: minmax(128px, 160px) 1fr minmax(128px, 160px);
  gap: 18px;
  align-items: start;
}

.likert-label {
  text-align: center;
}

.likert-label strong {
  display: block;
  position: relative;
  width: fit-content;
  margin: 0 auto 18px;
  font-size: 1rem;
  line-height: 1.1;
  font-weight: 900;
}

.likert-label strong::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12px;
  width: 38px;
  height: 3px;
  border-radius: 999px;
  background: rgba(123, 97, 255, 0.45);
  transform: translateX(-50%);
}

.likert-caption {
  display: block;
  font-size: 0.78rem;
  line-height: 1.4;
  font-weight: 700;
}

.likert-options {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding-top: 2px;
}

.likert-option {
  position: relative;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.likert-option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.likert-dot {
  width: 15px;
  height: 15px;
  border-radius: 999px;
  border: 2px solid rgba(123, 97, 255, 0.5);
  background: #fff;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.likert-option:hover .likert-dot,
.likert-option:focus-within .likert-dot {
  transform: scale(1.08);
  border-color: var(--primary);
}

.likert-option input:checked + .likert-dot {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 5px rgba(123, 97, 255, 0.16);
}

.question-card.is-missing {
  border-color: rgba(238, 93, 124, 0.42);
  box-shadow: 0 0 0 4px rgba(238, 93, 124, 0.08);
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 56px;
  padding: 0 20px;
  border-radius: 18px;
  border: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.primary-button {
  width: 100%;
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  box-shadow: 0 14px 24px rgba(104, 75, 240, 0.28);
}

.primary-button-large {
  margin-top: 2px;
}

.secondary-button {
  color: var(--text-main);
  background: #fff;
  border: 1px solid rgba(123, 97, 255, 0.12);
  box-shadow: 0 10px 20px rgba(35, 27, 59, 0.06);
  min-width: 126px;
  padding: 0 22px;
}

.ghost-button {
  color: var(--primary-strong);
  background: rgba(123, 97, 255, 0.08);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.ghost-button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.submit-row {
  margin-top: 20px;
}

.result-title {
  margin-bottom: 8px;
  font-size: 1.1rem;
  font-weight: 800;
}

.result-copy {
  margin-bottom: 14px;
  line-height: 1.65;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(16px);
  min-width: min(320px, calc(100vw - 32px));
  max-width: 560px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(35, 27, 59, 0.92);
  color: #fff;
  text-align: center;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  box-shadow: 0 16px 32px rgba(35, 27, 59, 0.24);
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.is-hidden {
  display: none;
}

@media (max-width: 720px) {
  .field-row,
  .toolbar-row {
    grid-template-columns: 1fr;
  }

  .toolbar-actions > * {
    flex: 1 1 140px;
  }

  .toolbar-actions {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
  }

  .likert-shell {
    padding: 16px 14px;
  }

  .likert-row {
    grid-template-columns: minmax(92px, 108px) 1fr minmax(92px, 108px);
    gap: 10px;
    align-items: start;
  }

  .likert-label {
    text-align: center;
  }

  .likert-label strong {
    margin-inline: auto;
    margin-bottom: 16px;
  }

  .likert-label strong::after {
    left: 50%;
    bottom: -10px;
    width: 30px;
    transform: translateX(-50%);
  }

  .likert-options {
    gap: 8px;
    padding-top: 2px;
  }

  .likert-caption {
    font-size: 0.72rem;
    word-break: keep-all;
  }

  .likert-option {
    width: 24px;
    height: 24px;
  }

  .likert-dot {
    width: 13px;
    height: 13px;
  }
}

@media (max-width: 480px) {
  html {
    font-size: calc(15px * var(--type-scale));
  }

  .page-shell {
    padding-inline: 10px;
  }

  .info-card {
    margin-top: 46px;
  }

  .toolbar-card,
  .survey-section,
  .result-card {
    margin-top: 72px;
  }

  .toolbar-card {
    padding: 14px;
  }

  .secondary-button {
    min-width: 0;
  }

  .hero-card,
  .info-card,
  .toolbar-card,
  .section-card,
  .result-card {
    border-radius: 24px;
  }

  .card-title {
    font-size: 1.85rem;
  }

  .feature-card h2 {
    font-size: 1.4rem;
  }

  .section-card-intro {
    padding-top: 22px;
  }

  .section-intro-title-wrap {
    margin-bottom: 48px;
  }
}
