/* ===== 설문(질문 선택) 화면 — Figma 407:446 ===== */
body {
  background-color: var(--color-white);
  color: #202020;
}

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

/* 다크 테마용 고정 타이틀 바 제거 */
.title { display: none !important; }
.top-button,
.bottom-button { display: none !important; }

/* ===== 헤더 ===== */
.sv-header {
  flex: none;
  width: 100%;
  height: 84px;
  padding: 0 40px;
  background-color: var(--color-white);
  border-bottom: 1px solid #f0f0f0;
}

.sv-header-inner {
  width: 100%;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sv-logo {
  color: var(--color-blue01);
  font-size: 27px;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1;
}

.sv-nav {
  display: flex;
  align-items: center;
  column-gap: 32px;
}

.sv-nav a {
  color: #454545;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.sv-nav a.sv-login {
  height: 50px;
  padding: 0 20px;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-blue01);
  border-radius: 999px;
  color: var(--color-blue01);
  font-size: 18px;
  font-weight: 700;
  transition: background-color .2s, color .2s;
}

.sv-nav a.sv-login:hover {
  background-color: var(--color-blue01);
  color: var(--color-white);
}

/* ===== 본문 ===== */
.section {
  flex: 1;
  overflow-y: auto;
  background-color: var(--color-white);
  padding: 0;
}

.sv-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 40px 150px; /* 바텀 고정바 높이만큼 여유 */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

/* ===== 스텝퍼 (상단 고정) ===== */
.sv-progress {
  flex: none;
  width: 100%;
  padding: 28px 40px;
  background-color: var(--color-white);
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: center;
}

.stepper {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stepper-dots {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stepper-dots span {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e7e7e7;
  border-radius: 999px;
  color: #8a8a8a;
  font-size: 16px;
  font-weight: 400;
  transition: background .2s, color .2s;
}

.stepper-dots span.on {
  background: var(--color-blue01);
  color: var(--color-white);
}

.stepper-bar {
  position: relative;
  width: 100%;
  height: 8px;
  background: #e7e7e7;
  border-radius: 999px;
}

.stepper-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 8px;
  background: var(--color-blue01);
  border-radius: 999px;
  transition: width .3s ease;
}

/* ===== 타이틀 ===== */
.container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#p_list_title,
#f_list_title {
  gap: 16px;
}

#f_list_title { margin-top: 8px; }

.container h3 {
  margin: 0;
  color: #202020;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: -0.025em;
  text-align: center;
}

.container h2 {
  margin: 0;
  color: #0678ff;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.025em;
  text-align: center;
}

/* ===== 질문 리스트 ===== */
.list {
  width: 100%;
  max-width: 1280px;
  margin: 24px 0 0;
  display: flex;
  flex-direction: column;
  row-gap: 12px;
  counter-reset: numbering;
}

.list li {
  width: 100%;
  padding: 24px 24px 24px 48px;
  display: flex;
  align-items: center;
  gap: 20px;

  background: #f6f6f6;
  border: none;
  border-radius: 999px;

  color: #202020;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: -0.035em;
  box-shadow: none;
  transition: background .2s;
}

.list li p {
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 번호는 JS가 --q-no 로 전체 연번을 넣어준다.
   CSS 카운터는 숨겨진(display:none) 문항을 세지 않아 페이지마다 1로 돌아가기 때문. */
.list li p:before {
  content: var(--q-no, "");
  flex: none;
  width: 32px;
  color: var(--color-blue01);
  font-size: 16px;
  font-weight: 700;
}

/* next/complete 다크 강조 제거 — 균일한 회색 알약 */
.list li.next,
.list li.complete {
  background: #f6f6f6;
  color: #202020;
  border: none;
  box-shadow: none;
}

.list li.next > p,
.list li.next > span {
  color: #202020;
  font-weight: 500;
}

.list li > div {
  margin-left: auto;
  flex: none;
  display: flex;
  align-items: center;
  column-gap: 10px;
}

/* ===== 그렇다/아니다 칩 토글 ===== */
.list li .cb {
  position: relative;
  cursor: pointer;
}

.list li .cb input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.list li .cb span {
  width: 100px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: 0;

  background: var(--color-white);
  border: 1px solid #6d6d6d;
  border-radius: 999px;

  color: #6d6d6d;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.025em;
  transition: border-color .15s, color .15s;
}

.list li .cb span:after {
  display: none !important;
}

.list li .cb input:checked + span {
  border: 3px solid #202020;
  color: #202020;
  font-weight: 700;
}

/* ===== 성별 행 ===== */
.gender-row {
  width: 100%;
  max-width: 1280px;
  padding: 24px 24px 24px 48px;
  display: flex;
  align-items: center;
  gap: 20px;

  background: #edf8ff;
  border-radius: 999px;
}

.gender-text {
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.gender-text b {
  color: var(--color-blue01);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.gender-text span {
  color: #202020;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.gender-btns {
  flex: none;
  display: flex;
  align-items: center;
  column-gap: 10px;
}

.sv-chip {
  width: 100px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--color-white);
  border: 1px solid #6d6d6d;
  border-radius: 999px;

  color: #6d6d6d;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.025em;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

.sv-chip.sel {
  border: 3px solid #202020;
  color: #202020;
}

/* ===== 설문 인트로 페이지 ===== */
.si-main {
  min-height: 100dvh;
}

.si-body {
  flex: 1;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(32px, 6vh, 72px) 24px 80px;

  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.si-star {
  width: clamp(90px, 14vh, 140px);
  height: auto;
  margin-bottom: clamp(20px, 4vh, 44px);
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.15));
}

.si-title {
  color: var(--color-blue01, #0064ff);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.5;
}

.si-desc {
  margin-top: clamp(24px, 4.5vh, 48px);
  display: flex;
  flex-direction: column;
  gap: 18px;

  color: #454545;
  font-size: clamp(15px, 1.35vw, 19px);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: -0.02em;
  word-break: keep-all;
}

.si-meta {
  margin-top: clamp(22px, 4vh, 40px);
  color: #202020;
  font-size: clamp(15px, 1.35vw, 19px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.si-start {
  margin-top: clamp(24px, 4.5vh, 44px);
  min-width: 280px;
  height: 68px;
  padding: 0 44px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: #202020;
  border-radius: 999px;
  box-shadow: 0 20px 40px rgba(33, 33, 33, 0.25);

  color: #ffffff;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: transform .2s;
}

.si-start:hover { transform: translateY(-2px); }

@media (max-width: 1000px) {
  .si-body { padding: 28px 18px 64px; }
  .si-start { min-width: 0; width: 100%; max-width: 340px; height: 58px; font-size: 18px; }
}

/* 미응답 문항 강조 */
.list li.need-answer {
  box-shadow: 0 0 0 2px #e5484d;
  animation: needShake .3s ease-in-out;
}

@keyframes needShake {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-5px); }
  60% { transform: translateX(5px); }
}

/* 안내 토스트 */
#sv-toast {
  position: fixed;
  left: 50%;
  bottom: 110px;
  z-index: 200;
  transform: translateX(-50%) translateY(10px);

  /* 좁은 화면에서 잘리지 않도록 줄바꿈 허용 (넓은 화면에선 한 줄) */
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 14px 24px;

  background: rgba(32, 32, 32, 0.92);
  border-radius: 28px;

  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.02em;
  text-align: center;
  word-break: keep-all;

  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, transform .25s, visibility .25s;
  pointer-events: none;
}

#sv-toast .sv-toast-line { display: inline-block; }

#sv-toast.on {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ===== 바텀 고정바 (이전 / 다음·결과보기) ===== */
.sv-bottombar {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 50;

  width: 100%;
  padding: 14px 40px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background: var(--color-white);
  border-top: 1px solid #f0f0f0;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.05);
}

.bb-prev {
  min-width: 160px;
  height: 60px;
  padding: 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  background: var(--color-white);
  border: 1px solid #6d6d6d;
  border-radius: 999px;

  color: #6d6d6d;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.025em;
  cursor: pointer;
  transition: background-color .2s;
}

.bb-prev:hover { background-color: #f6f6f6; }

.bb-prev i {
  width: 9px;
  height: 9px;
  border-left: 2px solid #6d6d6d;
  border-bottom: 2px solid #6d6d6d;
  transform: rotate(45deg);
}

.bb-next {
  min-width: 180px;
  height: 60px;
  padding: 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  background: #202020;
  border: none;
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(33, 33, 33, 0.25);

  color: var(--color-white);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.025em;
  cursor: pointer;
  transition: transform .2s;
}

.bb-next:hover { transform: translateY(-2px); }

.bb-next i {
  width: 9px;
  height: 9px;
  border-right: 2px solid #ffffff;
  border-top: 2px solid #ffffff;
  transform: rotate(45deg);
}

.bb-next.final { background: var(--color-blue01); }

/* 팝업 내 성별 선택은 인라인으로 대체 → 숨김 */
#popup #gender { display: none; }

/* ===== 반응형 ===== */
@media (max-width: 1000px) {
  .sv-header {
    height: 56px;
    padding: 0 16px;
  }

  .sv-logo { font-size: 20px; }
  .sv-nav { display: none; }

  .sv-progress {
    padding: 16px;
  }

  .sv-inner {
    padding: 28px 16px 120px;
    gap: 28px;
  }

  .sv-bottombar {
    padding: 10px 16px;
  }

  .bb-prev,
  .bb-next {
    min-width: 0;
    flex: 1;
    max-width: 46%;
    height: 52px;
    font-size: 16px;
  }

  /* 모바일 지시문은 한 화면에서 차지하는 높이를 줄인다 */
  .container h3 { font-size: 17px; line-height: 1.5; word-break: keep-all; }
  .container h2 { font-size: 13px; line-height: 1.5; word-break: keep-all; }

  /* PC 기준으로 넣은 강제 줄바꿈은 모바일에서 어색하게 끊기므로 무시 */
  .container h3 br,
  .container h2 br { display: none; }
  #p_list_title,
  #f_list_title { gap: 10px; }

  .list { margin-top: 8px; row-gap: 10px; }

  /* 문항은 한 줄 배치를 유지해 세로 길이를 줄인다 (질문 위 / 버튼 아래 → 좌우 배치) */
  .list li {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 20px;
    font-size: 15px;
    line-height: 1.45;
  }

  .list li p {
    align-items: flex-start;
    gap: 6px;
    word-break: keep-all;
  }

  .list li p:before { width: auto; margin-right: 2px; font-size: 14px; }

  .list li > div {
    width: auto;
    margin-left: auto;
    flex: none;
    column-gap: 6px;
  }

  .list li .cb { flex: none; }
  .list li .cb span { width: 62px; height: 44px; font-size: 15px; }

  /* 화면이 아주 좁으면 버튼을 아래로 내려 글자가 눌리지 않게 */
  @media (max-width: 360px) {
    .list li { flex-direction: column; align-items: stretch; gap: 10px; }
    .list li > div { margin-left: 0; }
    .list li .cb { flex: 1; }
    .list li .cb span { width: 100%; }
  }

  .gender-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    border-radius: 24px;
  }

  .gender-text {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .gender-text b { font-size: 18px; }
  .gender-text span { font-size: 15px; }

  .gender-btns { width: 100%; }
  .sv-chip { flex: 1; width: auto; height: 48px; font-size: 16px; }

  .sv-actions { margin-top: 24px; }
  .btn-prev { width: 110px; height: 56px; font-size: 17px; }
  .btn-result { width: 150px; height: 56px; font-size: 17px; }
}
