/* S2 분야 선택, S3 세부 고민 선택, S4 상세 질문, 고른 답 확인(임시) */

/* 위쪽 줄: 뒤로 가기와 진행 글자 */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--touch);
  margin: 0 calc(var(--gap-small) * -1);
}

.icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-small);
  color: var(--ink);
}

.icon-button .icon {
  width: var(--icon);
  height: var(--icon);
}

.icon-button:focus-visible {
  outline: 3px solid var(--accent);
}

.topbar-progress {
  padding: 0 var(--gap-small);
  color: var(--sub);
  font-size: var(--text-sub);
  font-weight: var(--weight-semibold);
}

/* 진행 막대 */
.progress {
  height: var(--progress);
  border-radius: var(--radius-pill);
  background: var(--line);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--accent);
  transition: width 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  .progress-fill {
    transition: none;
  }
}

/* 화면 제목과 안내 */
.flow-main {
  padding-bottom: var(--gap-large);
}

.flow-context {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: var(--gap) 0 0;
  color: var(--accent-strong);
  font-size: var(--text-sub);
  font-weight: var(--weight-semibold);
}

.flow-context .icon {
  flex: none;
  width: var(--icon-small);
  height: var(--icon-small);
}

.flow-title {
  margin: var(--gap-small) 0 0;
  font-size: var(--text-slogan);
  font-weight: var(--weight-bold);
  line-height: var(--leading-title);
}

.flow-hint {
  margin: var(--gap-small) 0 0;
  color: var(--sub);
  font-size: var(--text-sub);
}

/* S2·S3 목록: 누르면 다음 화면으로 */
.choice-list {
  display: flex;
  flex-direction: column;
  gap: var(--gap-small);
  margin: var(--gap-large) 0 0;
  padding: 0;
  list-style: none;
}

.choice-row {
  display: flex;
  align-items: center;
  gap: var(--gap);
  width: 100%;
  min-height: calc(var(--touch) * 1.25);
  padding: var(--gap);
  border: 0;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--ink);
  font: inherit;
  font-size: var(--text-card);
  font-weight: var(--weight-bold);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.choice-row:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.row-icon,
.row-chevron {
  display: flex;
  color: var(--accent-strong);
}

.row-icon .icon {
  width: var(--icon-large);
  height: var(--icon-large);
}

.row-chevron .icon {
  width: var(--icon);
  height: var(--icon);
}

.row-label {
  flex: 1;
}

/* S4 선택지 */
.option-list {
  display: flex;
  flex-direction: column;
  gap: var(--gap-small);
  margin: var(--gap-large) 0 0;
}

.option {
  display: flex;
  align-items: center;
  gap: var(--gap);
  width: 100%;
  min-height: var(--touch);
  padding: 14px var(--gap);
  border: var(--border) solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-weight: var(--weight-semibold);
  text-align: left;
  cursor: pointer;
}

.option:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.option-label {
  flex: 1;
}

/* 고르지 않은 선택지의 표시 자리는 빈 동그라미, 고르면 세이지 바탕에 체크 */
.option-mark {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: var(--icon);
  height: var(--icon);
  border: var(--border) solid var(--line);
  border-radius: var(--radius-pill);
  color: transparent;
}

.option[role='checkbox'] .option-mark {
  border-radius: 6px;
}

.option-mark .icon {
  width: var(--icon-small);
  height: var(--icon-small);
}

.option[aria-checked='true'] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.option[aria-checked='true'] .option-mark {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}

/* 화면 아래에 붙는 주 버튼 (다음, 처음부터 다시) */
.bottom-bar {
  position: sticky;
  bottom: 0;
  padding: var(--gap-small) 0 calc(var(--gap) + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
}

.button-primary {
  display: block;
  width: 100%;
  min-height: var(--touch);
  border: 0;
  border-radius: var(--radius);
  background: var(--accent-strong);
  color: var(--bg);
  font: inherit;
  font-size: var(--text-card);
  font-weight: var(--weight-bold);
  cursor: pointer;
}

/* 링크(<a>)를 주 버튼 모양으로 쓸 때 (404 화면의 "홈으로 가기") */
.button-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.button-primary:disabled {
  background: var(--line);
  color: var(--disabled);
  cursor: default;
}

.button-primary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
