/* =========================================================
   TPS — Truly Personal Scent
   디자인 톤: 부드러운 버터옐로우 + 탄골드, 프리미엄 향수 브랜드 미니멀
   ========================================================= */

:root {
  --bg-top: #FFFAE8;
  --bg-bottom: #FBEDC8;
  --surface: #FFFCF3;
  --pill-bg: linear-gradient(135deg, #E4CE96, #D2B26E);
  --pill-text: #FFFBF0;
  --border: #F0E3BE;
  --border-soft: #F5EBCE;

  --gold: #C9A227;
  --gold-deep: #A67C1E;
  --gold-bright: #E3C878;
  --gold-pale: #F5E7BE;

  --text-primary: #2E2612;
  --text-secondary: #8C7F5E;
  --text-heading: #B7A16B;
  --text-warm: #8A6D2F;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-heading: 'Noto Sans KR', -apple-system, "Malgun Gothic", sans-serif;
  --font-body: 'Noto Sans KR', -apple-system, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --font-kr-serif: 'Noto Serif KR', "Batang", serif;

  --shadow-soft: 0 2px 10px rgba(170, 135, 45, 0.08);
  --shadow-card: 0 4px 18px rgba(170, 135, 45, 0.10), 0 1px 3px rgba(120, 90, 20, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 500px at 50% -8%, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0) 55%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  background-attachment: fixed;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 44px 20px;
  color: var(--text-primary);
  position: relative;
}

/* 은은한 도트 패턴 텍스처 (전체 배경에 아주 옅게) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(169,124,27,0.10) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  opacity: 0.5;
}

.app { width: 100%; max-width: 480px; position: relative; z-index: 1; }

.hidden { display: none !important; }

/* ---------- 히어로 글로우 (화면 상단 은은한 광채) ---------- */
.hero-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  width: 340px;
  height: 340px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(227,200,120,0.35) 0%, rgba(227,200,120,0) 70%);
  pointer-events: none;
  z-index: -1;
}

/* ---------- 워드마크 / 장식선 / 뱃지 ---------- */
.wordmark { text-align: center; margin-bottom: 14px; position: relative; z-index: 1; }
.wordmark-mark {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  color: var(--gold-deep);
  letter-spacing: 0.05em;
  text-shadow: 0 1px 0 rgba(255,255,255,0.6);
}
.wordmark-sub {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.34em;
  color: var(--gold);
  margin-top: 4px;
}

.ornament {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 220px;
  margin: 16px auto 22px;
}
.ornament span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); }
.ornament i {
  width: 6px; height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
  display: inline-block;
  box-shadow: 0 0 6px rgba(201,162,39,0.5);
}

.pill {
  display: block;
  width: fit-content;
  margin: 0 auto 22px;
  background: var(--pill-bg);
  color: var(--pill-text);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 8px 20px;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(169,124,27,0.25);
}

/* ---------- 공통 버튼 ---------- */
.primary-btn {
  width: 100%;
  padding: 17px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 55%, var(--gold-deep));
  color: #FFFCF3;
  font-family: var(--font-body);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  margin-top: 24px;
  box-shadow: 0 8px 20px rgba(169,124,27,0.28), inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.primary-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 10px 24px rgba(169,124,27,0.34), inset 0 1px 0 rgba(255,255,255,0.35);
}
.primary-btn:active:not(:disabled) { transform: translateY(0); }
.primary-btn:disabled {
  background: var(--border-soft);
  color: var(--text-secondary);
  cursor: not-allowed;
  box-shadow: none;
}

/* 문항 화면 하단 이전/다음 버튼 — 이전은 왼쪽, 다음은 오른쪽으로 나란히 배치 */
.page-nav-row {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}
.page-nav-row .primary-btn,
.page-nav-row .secondary-btn {
  width: auto;
  flex: 1;
  margin-top: 0;
}
.page-nav-prev.hidden { display: none; }

.secondary-btn {
  width: 100%;
  padding: 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-warm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 30px;
  transition: all 0.18s ease;
}
.secondary-btn:hover { border-color: var(--gold); color: var(--gold-deep); box-shadow: var(--shadow-soft); }

.text-link-btn {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 14px 0 0;
  cursor: pointer;
}
.text-link-btn:hover { color: var(--gold-deep); }

/* ---------- TPS 코드로 바로 찾기 ---------- */
.quick-code-form {
  margin-top: 26px;
  text-align: left;
}
.quick-code-row { margin-bottom: 18px; }
.quick-code-label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-deep);
  margin-bottom: 6px;
}
.quick-code-select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A67C1E' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}
.quick-code-select:focus { outline: none; border-color: var(--gold); }

/* ---------- 시작 화면 ---------- */
#startScreen, #quickCodeScreen, #uniformWarningScreen { text-align: center; padding-top: 26px; }
.title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 21.5px;
  line-height: 1.55;
  margin-bottom: 16px;
  color: var(--text-primary);
  word-break: keep-all;      /* 한글 단어 중간에서 안 끊기게 */
  overflow-wrap: normal;
}
.title em {
  font-style: normal;
  color: var(--gold-deep);
}
.desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 6px;
  word-break: keep-all;
}

.feature-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}
.feature-chip {
  flex: 1;
  max-width: 140px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 14px 6px;
  box-shadow: var(--shadow-soft);
}
.feature-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--gold-deep);
}
.feature-label {
  display: block;
  font-size: 10.5px;
  color: var(--text-secondary);
  margin-top: 2px;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- 문항 화면 ---------- */
.progress-bar {
  width: 100%;
  height: 5px;
  background: var(--border-soft);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: inset 0 1px 2px rgba(120,90,20,0.08);
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
  transition: width 0.35s ease;
  box-shadow: 0 0 8px rgba(201,162,39,0.5);
}

.page-indicator {
  font-size: 11.5px;
  color: var(--text-secondary);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 24px;
  text-align: center;
}

.question-block {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 20px 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

/* "N번 문항에 답해주세요" 눌렀을 때 해당 문항 카드에 잠깐 들어오는 강조 효과 */
.question-block-alert {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,162,39,0.25), var(--shadow-card);
}

.page-warning {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #A6472C;
  background: #FBEAE3;
  border: 1px solid #F0CFC0;
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 14px;
}
.page-warning.hidden { display: none; }

.question-block-index {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-deep);
  margin-bottom: 6px;
}

.question-block-text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-primary);
  margin-bottom: 14px;
  font-weight: 500;
}

.options { display: flex; flex-direction: column; gap: 8px; }

.option-btn {
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  background: #FFFEFA;
  color: var(--text-primary);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}
.option-btn:hover:not(:disabled) {
  border-color: var(--gold);
  background: var(--bg-top);
}
.option-btn.selected {
  border-color: var(--gold);
  border-width: 2px;
  background: var(--gold-pale);
  color: var(--text-primary);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(201,162,39,0.15);
}
.option-btn:disabled { cursor: default; opacity: 0.55; }
.option-btn:disabled.selected { opacity: 1; }

/* ---------- 축/하위분류 문항용 7단계 좌우 선택형 스케일 ---------- */
.slider-wrap { margin-top: 6px; padding-top: 4px; }

.slider-current-label {
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 15px;
  color: var(--gold-deep);
  margin-bottom: 14px;
  min-height: 19px;
}
/* 아직 아무 점도 안 눌렀을 때: 확실히 "미답변"으로 보이게 흐리고 얇은 안내 문구로 */
.slider-current-label.placeholder {
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12.5px;
}

.slider-track { position: relative; padding: 10px 2px 6px; }

/* 배경 트랙 (선택 전엔 완전히 비어있는 회색 선) */
.slider-track::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 14px;
  right: 14px;
  height: 3px;
  background: var(--border-soft);
  border-radius: 2px;
  transform: translateY(-50%);
}

/* 선택된 값까지만 채워지는 골드 라인 (선택 전엔 width 0%) */
.slider-fill {
  position: absolute;
  top: 50%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-bright));
  border-radius: 2px;
  transform: translateY(-50%);
  transition: left 0.2s ease, width 0.2s ease;
  z-index: 1;
  /* left/width는 JS에서 값에 따라 동적으로 계산해서 넣음 (중간에서 시작해 방향에 따라 채워짐) */
}

.slider-dots {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.slider-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  position: relative;
}
/* 눌리는 영역은 넉넉하게(모바일 터치용), 실제 보이는 점 크기는 아래에서 위치별로 다르게 */
.slider-dot::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 2.5px solid var(--border);
  transform: translate(-50%, -50%);
  transition: all 0.15s ease;
}
.slider-dot:hover::after { border-color: var(--gold); }
.slider-dot.active::after {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 2px 8px rgba(169,124,27,0.45);
}

/* 가운데(중간)는 제일 작고, 양 끝(매우 싫어요/매우 좋아요)으로 갈수록 점점 커지는
   MBTI 테스트 스타일. 1·7번째가 제일 크고 4번째(중간)가 제일 작음 */
.slider-dot:nth-child(1)::after, .slider-dot:nth-child(7)::after { width: 26px; height: 26px; }
.slider-dot:nth-child(2)::after, .slider-dot:nth-child(6)::after { width: 21px; height: 21px; }
.slider-dot:nth-child(3)::after, .slider-dot:nth-child(5)::after { width: 16px; height: 16px; }
.slider-dot:nth-child(4)::after { width: 11px; height: 11px; }

.slider-dot:nth-child(1).active::after, .slider-dot:nth-child(7).active::after { width: 31px; height: 31px; }
.slider-dot:nth-child(2).active::after, .slider-dot:nth-child(6).active::after { width: 26px; height: 26px; }
.slider-dot:nth-child(3).active::after, .slider-dot:nth-child(5).active::after { width: 16px; height: 16px; }
.slider-dot:nth-child(4).active::after { width: 13px; height: 13px; }

.slider-end-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ---------- 결과 화면 ---------- */
.result-title {
  font-family: var(--font-kr-serif);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.5;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 12px;
}
/* 탑○미○베○ 6글자 전체를 감싸는 바깥 박스 — 좀 더 진한 톤으로 "이게 하나의
   코드다"라는 게 한눈에 보이게 함. 안쪽 개별 글자 박스(연한 톤)는 그대로 유지 */
#codeInline {
  display: inline-block;
  color: var(--gold-deep);
  letter-spacing: -0.01em;
  background: rgba(201, 162, 39, 0.16);
  border-radius: 12px;
  padding: 4px 10px;
}
/* 탑○미○베○의 ○ 자리(축 약자)만 더 옅은 박스로 감싸서, 콜론이나 공백 없이도
   "여기가 채워진 자리구나"가 자연스럽게 읽히게 함 — 한 단어처럼 붙여 씀.
   바깥 박스보다 안쪽 박스가 더 밝아야 두 겹이 구분돼서 보임 */
.code-letter {
  display: inline-block;
  background: var(--gold-pale);
  border-radius: 6px;
  padding: 0 5px;
  margin: 0 1px;
}

.detail-toggle {
  display: block;
  margin: 0 auto 30px;
  background: none;
  border: none;
  color: var(--gold-deep);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 0;
  cursor: pointer;
  position: relative;
}
.detail-toggle::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background: var(--gold-deep);
  margin-top: 2px;
  opacity: 0.5;
}
.detail-toggle:hover { color: var(--gold); }

.code-detail {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  margin: -18px auto 26px;
  max-width: 320px;
  line-height: 1.6;
}

/* 피라미드가 뭘 의미하는지 미리 설명해주는 한 줄 — 처음 보는 사람도
   "왜 위아래로 나뉘어 있는지"를 바로 이해하게 함 */
.pyramid-intro {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.65;
  max-width: 300px;
  margin: 4px auto 18px;
}
.pyramid-intro b {
  font-weight: 700;
  color: var(--text-primary);
}

/* ---------- 입체 피라미드 (perspective + rotateX로 실제 원근감을 줌) ---------- */
/* 피라미드 전체(도형+라벨)를 하나의 카드처럼 테두리로 감싸서 중앙에 배치 */
.pyramid-card {
  width: fit-content;
  margin: 16px auto 20px;
  padding: 18px 22px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.5), rgba(255,255,255,0.15));
  box-shadow: var(--shadow-soft);
}

/* 피라미드 + TOP/MIDDLE/BASE 라벨을 한 공간에 겹쳐서 배치.
   라벨을 고정된 세로줄에 맞추면 삼각형이 좁은 위쪽엔 여백이 뜨고 넓은
   아래쪽엔 거의 안 뜨는 문제가 생겨서, 대신 각 라벨을 "그 높이의 삼각형
   가장자리로부터 항상 똑같은 간격(6px)"만큼만 떨어뜨려 배치함 — 그래서
   아래로 갈수록 라벨이 삼각형을 따라 자연스럽게 오른쪽으로 벌어지고,
   이 전체(삼각형+계단식 라벨) 덩어리를 하나로 묶어서 중앙에 배치함 */
.pyramid-annotated {
  position: relative;
  width: 250px;
  height: 173px;
  margin: 0 auto;
}

.pyramid-stage {
  position: absolute;
  top: 0; left: 0;
  width: 150px;
  height: 173px;
  perspective: 600px;
}

/* 바닥에 깔리는 은은한 그림자 타원 — 공중에 뜬 게 아니라 바닥에 놓여있다는 느낌 */
.pyramid-shadow {
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 92px;
  height: 14px;
  background: radial-gradient(ellipse, rgba(120, 90, 30, 0.35) 0%, rgba(120, 90, 30, 0) 72%);
  transform: translateX(-50%);
  filter: blur(2px);
}

/* 실제로 기울여서(rotateX) 원근감을 만드는 부분 — 여기가 "입체감"의 핵심 */
.pyramid-3d {
  position: absolute;
  inset: 0;
  transform: rotateX(15deg);
  transform-origin: 50% 100%;
  transform-style: preserve-3d;
  filter: drop-shadow(0 22px 20px rgba(140, 105, 25, 0.35));
}

.pyramid-face { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.pyramid-face-left {
  clip-path: polygon(50% 0%, 50% 100%, 0% 100%);
  background:
    linear-gradient(200deg, #FBEFC8 0%, #F1D68F 20%, #E0B45E 45%, #C4933A 68%, #9C7420 88%, #7A5A16 100%);
}
.pyramid-face-right {
  clip-path: polygon(50% 0%, 100% 100%, 50% 100%);
  background:
    linear-gradient(160deg, #EAD199 0%, #D6AC53 22%, #B98A2E 48%, #8F6D1E 70%, #6B5115 90%, #4F3B0F 100%);
}

/* 탑/미들/베이스가 "한 층 한 층" 쌓인 느낌이 나도록 삼각형을 가로로 3등분해서
   각 층마다 다른 톤을 덧입힘 (탑=제일 밝고 가벼움, 베이스=제일 어둡고 묵직함) */
.pyramid-band {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
}
.pyramid-band-top {
  clip-path: polygon(50% 0%, 66.67% 33.33%, 33.33% 33.33%);
  background: linear-gradient(180deg, rgba(255,250,225,0.55), rgba(255,250,225,0.12));
}
.pyramid-band-middle {
  clip-path: polygon(33.33% 33.33%, 66.67% 33.33%, 83.33% 66.67%, 16.67% 66.67%);
  background: linear-gradient(180deg, rgba(230,190,110,0.30), rgba(230,190,110,0.04));
}
.pyramid-band-base {
  clip-path: polygon(16.67% 66.67%, 83.33% 66.67%, 100% 100%, 0% 100%);
  background: linear-gradient(180deg, rgba(55,38,10,0.05), rgba(55,38,10,0.38));
}

/* 층과 층 사이 경계선 — 그 높이에서의 삼각형 실제 폭에 맞춰 짧게 그어서
   "여기서부터 다음 층" 이라는 게 시각적으로 확실히 구분되게 함 */
.pyramid-band-line {
  position: absolute;
  left: 50%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, rgba(255,252,235,0.9) 15%, rgba(255,252,235,0.9) 85%, transparent);
  transform: translateX(-50%);
  z-index: 3;
}
.pyramid-band-line-1 { top: 33.33%; width: 33.33%; }
.pyramid-band-line-2 { top: 66.67%; width: 66.67%; }

/* 가운데 능선 하이라이트 + 좌/우 바깥 모서리를 따라가는 얇은 하이라이트 라인
   -> 실제 "여러 면이 깎인 오벨리스크"처럼 보이게 만드는 디테일 */
.pyramid-ridge-center {
  position: absolute;
  top: 0; left: 50%;
  width: 2px; height: 100%;
  background: linear-gradient(180deg, rgba(255,252,235,0.98), rgba(255,252,235,0.15));
  transform: translateX(-50%);
  z-index: 4;
}
.pyramid-ridge-left, .pyramid-ridge-right {
  position: absolute;
  top: 0; left: 50%;
  width: 1.5px; height: 109%;
  background: linear-gradient(180deg, rgba(255,252,235,0.75), rgba(255,252,235,0));
  transform-origin: top center;
  z-index: 4;
}
.pyramid-ridge-left { transform: rotate(-23.4deg); }
.pyramid-ridge-right { transform: rotate(23.4deg); }

.pyramid-apex-gem {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 9px;
  height: 9px;
  background: radial-gradient(circle at 35% 30%, #FFFBEA, #F1D68F 55%, #B98A2E 100%);
  border: 1px solid rgba(255,255,255,0.6);
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 0 0 12px rgba(220, 180, 90, 0.8), 0 0 3px rgba(255,255,255,0.9);
  z-index: 3;
}

/* TOP/MIDDLE/BASE 라벨 — 각자 그 높이의 삼각형 가장자리에서 6px 떨어진
   지점(왼쪽 좌표)에 배치. 위쪽일수록 안쪽, 아래쪽일수록 바깥쪽으로 자연스럽게
   벌어짐 (계산: 87.5/112.5/137.5px가 그 높이의 삼각형 가장자리 x좌표) */
.pyramid-callout {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 4px;
  transform: translateY(-50%);
}
.callout-top { top: 16.67%; left: 93.5px; }
.callout-middle { top: 50%; left: 118.5px; }
.callout-base { top: 83.33%; left: 143.5px; }

/* 리더선이 시작되는 지점에 작은 점을 찍어서 "정확히 여기를 가리킨다"는 느낌을 줌.
   점·선·라벨 색을 그 층의 피라미드 밴드 톤과 맞춰서, 위치뿐 아니라 색으로도
   "이 라벨 = 이 층"이라는 게 바로 느껴지게 함 */
.callout-dot {
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(169,124,27,0.5);
}
.callout-line {
  flex-shrink: 0;
  width: 8px;
  height: 1.5px;
}
.callout-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  word-break: keep-all;
}
.callout-text b {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.callout-value {
  font-family: var(--font-kr-serif);
  font-weight: 900;
  font-size: 14px;
  margin-top: 1px;
}

/* TOP/MIDDLE/BASE 글자(캡션)와 축이름(값) 둘 다, 그 층의 피라미드 밴드 톤과
   똑같은 색으로 통일 — 위치뿐 아니라 색으로도 "이 라벨=이 층"이 한번에 보이게 */
.callout-top .callout-dot, .callout-top .callout-line { background: var(--gold-bright); }
.callout-top .callout-text b, .callout-top .callout-value { color: var(--gold); }

.callout-middle .callout-dot, .callout-middle .callout-line { background: var(--gold); }
.callout-middle .callout-text b, .callout-middle .callout-value { color: var(--gold-deep); }

.callout-base .callout-dot, .callout-base .callout-line { background: var(--gold-deep); }
.callout-base .callout-text b, .callout-base .callout-value { color: #6B4F14; }

/* ---------- 코드 수동 조정 (탑/미들/베이스 변경) ---------- */
.axis-adjust {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 16px 16px 6px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-soft);
}
.axis-adjust-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 4px;
}
.axis-adjust-hint {
  font-size: 11px;
  color: var(--gold-deep);
  text-align: center;
  margin-bottom: 12px;
  line-height: 1.6;
}
.axis-adjust-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 2px;
  border-top: 1px solid var(--border-soft);
}
.axis-adjust-row:first-of-type { border-top: none; }
/* TOP/MIDDLE/BASE 글자 길이가 다 달라도(TOP·MIDDLE·BASE), 고정폭 칸 안에서
   가운데 정렬해서 오른쪽의 세로 막대(구분선) 위치가 항상 일정하게 맞춰짐 */
.axis-adjust-tag-col {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 58px;
  flex-shrink: 0;
}
.axis-adjust-tag {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}
.axis-adjust-divider {
  flex-shrink: 0;
  width: 1px;
  height: 16px;
  background: var(--border);
}
.axis-adjust-value {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-deep);
}
.axis-adjust-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gold-deep);
  cursor: pointer;
}
.axis-adjust-toggle:hover { border-color: var(--gold); background: var(--bg-top); }

.axis-adjust-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 2px 12px;
}
.axis-adjust-options.hidden { display: none; }
.axis-adjust-pill {
  padding: 6px 12px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: #FFFEFA;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}
.axis-adjust-pill:hover { border-color: var(--gold); }
.axis-adjust-pill.active {
  border-color: var(--gold);
  background: var(--gold);
  color: #FFFBF0;
}

/* "다른 자리랑 겹쳐서 밀려난 축이 있다"는 걸 알려주는 안내 문구 */
.axis-adjust-suggestion {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--gold-deep);
  background: var(--gold-pale);
  border-radius: 8px;
  padding: 8px 10px;
  margin: -4px 2px 10px;
}

/* 시그니처 카피 — 실용 팁(Styling Tip)이랑 톤을 다르게, 감성적인
   한 문장 인용구 느낌으로 디자인 */
.signature-box {
  background: linear-gradient(180deg, var(--gold-pale), var(--surface));
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 22px 20px 20px;
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
  text-align: center;
}
.signature-label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.signature-box p:last-child {
  font-family: var(--font-kr-serif);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
  font-weight: 700;
}

.guidance-box {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 22px 20px 20px;
  box-shadow: var(--shadow-card);
  margin-bottom: 8px;
  position: relative;
}
.guidance-label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.guidance-box p:last-child {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-warm);
  font-weight: 500;
}

.section-title {
  font-family: var(--font-kr-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold-deep);
  text-align: center;
  margin-bottom: 18px;
}

/* ---------- 향수 추천: 막대그래프 리스트 ---------- */
.perfume-list { display: flex; flex-direction: column; gap: 20px; margin-bottom: 6px; }

.perfume-item-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.perfume-item-name .rank-num {
  display: inline-block;
  color: var(--gold-deep);
  font-family: var(--font-display);
  font-style: italic;
}
.perfume-item-name .brand-name { color: var(--text-warm); }

/* 점수를 없애고 등급(강력추천/추천/무난한선택/참고용)만 뱃지로 보여줌
   — 숫자를 보여주면 "우리가 향수를 평가해서 매긴 점수"처럼 보일 수 있어서,
   취향 진단 결과라는 성격에 맞게 정성적인 등급만 표시 */
.perfume-tier-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--gold-pale);
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-deep);
}

/* 정렬 방식 선택 (지금은 가나다순만 있지만, 나중에 옵션이 늘어날 걸
   감안해서 드롭다운 형태로 만들어둠) */
.sort-control {
  position: relative;
  display: flex;
  justify-content: center;
  margin: -6px 0 16px;
}
.sort-toggle {
  background: none;
  border: none;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 8px;
}
.sort-toggle:hover { color: var(--gold-deep); }
.sort-options {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 120px;
}
.sort-options.hidden { display: none; }
.sort-option-pill {
  padding: 7px 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}
.sort-option-pill:hover { background: var(--bg-top); }
.sort-option-pill.active { background: var(--gold); color: #FFFBF0; }

/* ---------- 구매처 링크 (공식/쿠팡/올리브영/무신사 등) ---------- */
.perfume-purchase-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}
.purchase-link-btn {
  flex: 1;
  min-width: 64px;
  text-align: center;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: #FFFEFA;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.15s ease;
}
.purchase-link-btn:hover {
  border-color: var(--gold);
  background: var(--gold-pale);
  color: var(--gold-deep);
}
