/* ============================================
   공감 진단 — 모던 모바일 디자인
   기준: iPhone SE 320px / 일반 360-414px
   톤: 흰 바탕, 강한 산세리프(Pretendard), 코랄 단일 액센트
   ============================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --bg-card: #ffffff;
  --paper: #fafafa;
  --ink: #0a0a0a;
  --ink-soft: #5e5e5e;
  --ink-faint: #9a9a9a;
  --line: #ececec;
  --line-soft: #f4f4f4;
  --line-strong: #d4d4d4;
  --accent: #ff5b48;
  --accent-soft: #fff1ee;
  --accent-deep: #d4392a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.04);
  --radius: 4px;
  --radius-sm: 2px;
  --sans: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', system-ui, sans-serif;
  --serif: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', system-ui, sans-serif;
  --mono: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', system-ui, sans-serif;
}

/* 숫자가 들어가는 캡션엔 표 숫자(tabular numerals) 적용해서 정렬감 살리기 */
.mono,
.q-axis-label,
.axis-name,
.axis-card .num,
.axes-list-title,
.topbar-counter,
.topbar-back,
.meta-row,
.landing-mark,
.aux-item .k,
.care-num,
.result-eyebrow,
.result-rarity,
.result-blockquote cite,
.footer-note {
  font-feature-settings: "tnum" 1, "ss01" 1;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.01em;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* 배경 영상 (랜딩) — .page 컨테이너 내부에 한정 */
.page { position: relative; overflow: hidden; }
.page > .container { position: relative; z-index: 1; }

.bg-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.bg-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.15);
}
.bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
}
@media (prefers-reduced-motion: reduce) {
  .bg-video video { display: none; }
  .bg-video { background: url(/assets/video/poster.jpg) center/cover no-repeat; }
}

/* 모바일 줄바꿈 컨트롤 — 320px에서만 보이는 줄바꿈 */
.br-sm { display: none; }
@media (max-width: 360px) {
  .br-sm { display: inline; }
}

button {
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
}
a { color: inherit; -webkit-tap-highlight-color: transparent; }

::selection { background: var(--accent); color: #fff; }

/* === 컨테이너 (모바일 전용) === */
.container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px;
}
.container-narrow {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 0 20px;
}

.serif { font-family: var(--serif); font-weight: 600; }
.mono { font-family: var(--mono); }

/* ============================================
   랜딩 페이지
   ============================================ */
.page {
  min-height: 100vh;
  padding: 32px 0 24px;
}

.landing-mark {
  text-align: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--ink-faint);
  margin-bottom: 56px;
  text-transform: uppercase;
  font-weight: 500;
}
.landing-mark::before, .landing-mark::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--line);
  vertical-align: middle;
  margin: 0 10px;
}

.landing-hero {
  text-align: center;
  padding: 0 0 24px;
}
.landing-hero h1 {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 30px;
  line-height: 1.22;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-bottom: 18px;
}
.landing-hero h1 em {
  font-style: normal;
  color: var(--accent);
  font-weight: 800;
}
.landing-hero .lead {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 auto;
  line-height: 1.7;
  font-weight: 400;
}

.meta-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin: 28px 0 24px;
  font-weight: 500;
}
.meta-row span::before {
  content: '·';
  margin-right: 6px;
  color: var(--accent);
}

.btn-row {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

/* 진단 시작 인트로 (test.html 첫 화면 — 닉네임 입력) */
.intro-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
  text-align: center;
}
.intro-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 4px;
}
.intro-title {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-bottom: 2px;
}
.intro-sub {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: -0.015em;
  margin-bottom: 14px;
  max-width: 280px;
}
.intro-input {
  width: 100%;
  max-width: 320px;
  height: 50px;
  padding: 0 18px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.015em;
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
  outline: none;
  transition: border-color 0.15s ease;
}
.intro-input::placeholder { color: var(--ink-faint); font-weight: 400; }
.intro-input:focus { border-color: var(--ink); }
.intro-start-btn {
  width: 100%;
  max-width: 320px;
  margin-top: 4px;
}
.intro-skip {
  margin-top: 4px;
}

/* 진단 모드 선택 — 간편 / 정밀 두 카드 */
.mode-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(6px);
  animation: fadeUp 0.4s 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.mode-card {
  display: block;
  text-decoration: none;
  padding: 18px 20px;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.1s ease, background 0.15s ease;
}
.mode-card:active { transform: scale(0.99); }
.mode-card:hover { border-color: var(--ink); }
.mode-card-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.mode-card-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.mode-card-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 4px;
}
.mode-card-meta {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.65;
  margin-bottom: 4px;
}
.mode-card-desc {
  font-size: 13px;
  font-weight: 400;
  opacity: 0.85;
  letter-spacing: -0.015em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  background: var(--ink);
  color: var(--bg);
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.2s ease;
  text-decoration: none;
  letter-spacing: -0.01em;
  height: 52px;
  width: 100%;
  max-width: 320px;
}
.btn:active { transform: scale(0.98); background: var(--accent); }
.btn:disabled {
  background: var(--line);
  color: var(--ink-faint);
  cursor: not-allowed;
}

.btn-ghost {
  background: var(--bg);
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-ghost:active {
  background: var(--bg-soft);
  border-color: var(--ink);
}

.link-btn {
  background: none;
  border: none;
  color: var(--ink-soft);
  font-size: 13px;
  padding: 8px 4px;
  cursor: pointer;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.link-btn:active { color: var(--accent); }

/* 다섯 결 (랜딩) — 시처럼 한 줄씩 떠오름 */
.axes-list {
  margin: 28px 0 20px;
  padding: 4px 0;
}
.axes-quote {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.5;
  letter-spacing: -0.025em;
}
.axes-quote > span {
  opacity: 0;
  transform: translateY(6px);
  animation: quoteLineIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.axes-quote > span:nth-child(1) { animation-delay: 0.85s; }
.axes-quote > span:nth-child(2) { animation-delay: 0.92s; }
.axes-quote > span:nth-child(3) { animation-delay: 0.99s; }
.axes-quote > span:nth-child(4) { animation-delay: 1.06s; }
.axes-quote > span:nth-child(5) { animation-delay: 1.13s; }
.axes-quote > span.axes-quote-foot {
  animation-delay: 1.30s;
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.18em;
  margin-top: 6px;
  font-weight: 500;
}

@keyframes quoteLineIn {
  to { opacity: 1; transform: translateY(0); }
}

/* 헤드라인 글자별 진입 — 매우 빠르게 */
.landing-hero h1 .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px);
  animation: charIn 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes charIn {
  to { opacity: 1; transform: translateY(0); }
}

/* 랜딩 후속 요소 — 거의 동시에 */
.landing-mark,
.landing-hero .lead,
.meta-row,
.btn-row {
  opacity: 0;
  transform: translateY(5px);
  animation: fadeUp 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.landing-mark { animation-delay: 0.02s; }
.landing-hero .lead { animation-delay: 0.20s; }
.meta-row { animation-delay: 0.28s; }
.btn-row { animation-delay: 0.36s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .axes-quote > span,
  .landing-hero h1 .char {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.footer-note {
  text-align: center;
  font-size: 11px;
  color: var(--ink-faint);
  padding: 32px 0 8px;
  line-height: 1.7;
}

/* ============================================
   진단 페이지
   ============================================ */
.test-body {
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.test-topbar,
.result-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
}
.result-topbar {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-brand {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.topbar-brand small {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-faint);
  margin-left: 2px;
}
.topbar-back {
  text-decoration: none;
  color: var(--ink-faint);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.topbar-back:active { color: var(--accent); }
.topbar-counter {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.progress {
  height: 3px;
  background: var(--line-soft);
}
.progress-bar {
  height: 100%;
  background: var(--accent);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0 2px 2px 0;
}

.test-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  padding: 36px 0 48px;
}

.q-stage {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  width: 100%;
}
.q-stage.enter {
  opacity: 1;
  transform: translateY(0);
}

.q-axis-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 18px;
  text-align: center;
  font-weight: 500;
}

.q-text {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 28px;
  text-align: center;
  letter-spacing: -0.03em;
  padding: 0 4px;
  min-height: calc(19px * 1.4 * 3);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 옵션 (Likert + 시나리오 통합) */
.opt-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.015em;
  transition: border-color 0.04s ease, background 0.04s ease, color 0.04s ease, transform 0.08s ease;
}
.opt:active { transform: scale(0.98); }
.opt:hover {
  border-color: var(--ink);
  background: var(--bg-soft);
}
.opt.selected {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
  transform: scale(0.99);
}

.test-foot {
  display: flex;
  justify-content: center;
  margin-top: 28px;
  padding-bottom: 12px;
}

/* ============================================
   결과 페이지
   ============================================ */
.result-cover {
  text-align: center;
  padding: 16px 0 10px;
  position: relative;
}
/* 커버 상단 — 좌측 텍스트 + 우측 캐릭터 */
.cover-top {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  margin-bottom: 14px;
}
.cover-text {
  flex: 1;
  min-width: 0;
}
.cover-text .result-name {
  font-size: 26px;
  word-break: keep-all;
  line-height: 1.18;
}
@media (max-width: 360px) {
  .cover-text .result-name { font-size: 22px; }
}
.cover-text .result-rarity,
.cover-text .result-stats {
  justify-content: flex-start;
  margin-left: 0;
}
.cover-text .result-stats {
  width: auto;
  max-width: 100%;
  border-top: none;
  padding-top: 4px;
  margin-top: 6px;
}
.result-cover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.result-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--accent);
  margin-bottom: 8px;
  text-transform: uppercase;
  font-weight: 500;
}
.result-character {
  display: block;
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  object-fit: contain;
  margin: 0;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.08));
  animation: charFadeIn 0.55s 0.1s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
}
@keyframes charFadeIn {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 360px) {
  .result-character { width: 92px; height: 92px; }
}
.result-name {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.045em;
  color: var(--ink);
  margin-bottom: 4px;
}
.result-subtitle {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 500;
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 6px;
  letter-spacing: -0.015em;
}
.result-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  margin: 16px 0 14px;
  padding: 6px 0 6px 14px;
  line-height: 1.65;
  letter-spacing: -0.015em;
  border-left: 3px solid var(--accent);
  text-align: left;
}
/* 희소성 — 부제 바로 아래, 한 줄 깔끔하게 */
.result-rarity {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  letter-spacing: -0.015em;
  margin-top: 2px;
  margin-bottom: 0;
}
.result-rarity .r-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-faint);
  letter-spacing: -0.005em;
}
.result-rarity .r-pct {
  font-weight: 700;
  font-size: 13px;
  font-feature-settings: "tnum" 1;
  color: var(--accent);
}
.result-rarity .r-pct.tier-very-rare { color: var(--accent-deep); }
.result-rarity .r-pct.tier-rare      { color: var(--accent); }
.result-rarity .r-pct.tier-uncommon  { color: var(--accent); }
.result-rarity .r-pct.tier-common    { color: var(--ink); }
.result-rarity .r-pct.tier-very-common { color: #b08d3a; }
.result-rarity .r-sep {
  color: var(--ink-faint);
  opacity: 0.6;
  font-weight: 400;
}
.result-rarity .r-tier {
  font-weight: 600;
  color: var(--ink-soft);
}

/* 통계 라인 — 지금까지 N명 · 인기 K위 (희소성 아래 줄에 항상 분리) */
.result-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: -0.015em;
  margin: 8px auto 0;
  padding-top: 8px;
  width: 200px;
  max-width: 100%;
  border-top: 1px solid var(--line-soft);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.result-stats.visible { opacity: 1; }
.result-stats b {
  font-weight: 700;
  color: var(--ink);
  font-feature-settings: "tnum" 1;
}
.result-stats small {
  font-size: 11px;
  opacity: 0.7;
  margin-left: 1px;
  font-weight: 500;
}
.result-stats .r-stat-rank {
  font-weight: 600;
  color: var(--accent-deep);
}
.result-stats .r-stat-rank b { color: var(--accent-deep); }
.result-stats .r-stat-sep { opacity: 0.5; }

/* 로딩 오버레이 — 결과 계산 중 (멀티 스테이지) */
.calc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.calc-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
.calc-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 8px;
  width: 240px;
}

/* 오각형 시각 */
.calc-visual {
  position: relative;
  width: 88px;
  height: 88px;
}
.calc-pentagon {
  width: 100%;
  height: 100%;
}
.calc-poly-bg { opacity: 0.5; }
.calc-poly-outline {
  stroke-dasharray: 280;
  stroke-dashoffset: 280;
  animation: calcDraw 1.2s 0.05s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes calcDraw {
  0%   { stroke-dashoffset: 280; }
  60%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -280; }
}
.calc-poly-fill {
  transform-origin: 50px 50px;
  animation: calcFillPulse 1.6s 0.3s ease-in-out infinite;
}
@keyframes calcFillPulse {
  0%, 100% { transform: scale(0.85); opacity: 0; }
  50%      { transform: scale(1.0);  opacity: 1; }
}
.calc-poly-dot {
  transform-origin: 50px 50px;
  animation: calcDotPop 1.6s ease-in-out infinite;
  opacity: 0;
}
.calc-poly-dot:nth-child(4) { animation-delay: 0.0s; }
.calc-poly-dot:nth-child(5) { animation-delay: 0.12s; }
.calc-poly-dot:nth-child(6) { animation-delay: 0.24s; }
.calc-poly-dot:nth-child(7) { animation-delay: 0.36s; }
.calc-poly-dot:nth-child(8) { animation-delay: 0.48s; }
@keyframes calcDotPop {
  0%, 70%, 100% { opacity: 0; transform: scale(0); }
  30%, 50%      { opacity: 1; transform: scale(1.2); }
}

/* 5개 도트 (5축 진행 표시) */
.calc-pips {
  display: flex;
  gap: 6px;
}
.calc-pips span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
  animation: calcPip 1.4s ease-in-out infinite;
}
.calc-pips span:nth-child(1) { animation-delay: 0s; }
.calc-pips span:nth-child(2) { animation-delay: 0.12s; }
.calc-pips span:nth-child(3) { animation-delay: 0.24s; }
.calc-pips span:nth-child(4) { animation-delay: 0.36s; }
.calc-pips span:nth-child(5) { animation-delay: 0.48s; }
@keyframes calcPip {
  0%, 100% { background: var(--line); transform: scale(1); }
  40%      { background: var(--accent); transform: scale(1.4); }
}

/* 메시지 텍스트 (페이드 전환) */
.calc-text {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.025em;
  text-align: center;
  min-height: 1.5em;
  transition: opacity 0.18s ease;
}

/* 미세 진행바 (연속 sweep) */
.calc-progress {
  width: 140px;
  height: 2px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.calc-progress-bar {
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  animation: calcSweep 1.3s ease-in-out infinite;
}
@keyframes calcSweep {
  0%   { left: -40%; }
  100% { left: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .calc-poly-outline, .calc-poly-fill, .calc-poly-dot,
  .calc-pips span, .calc-progress-bar {
    animation: none;
  }
}

/* 커버 하단 핵심 결 태그 — 점수에 따라 동적 */
.result-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
}
.cover-tag {
  font-size: 12px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 4px;
  background: var(--bg-soft);
  color: var(--ink);
  letter-spacing: -0.015em;
  border: 1px solid var(--line);
}

/* 오각형 레이더 — 5축 결 패턴 시각화 */
.cover-radar {
  margin: 8px auto 0;
  max-width: 320px;
  padding: 4px 0;
}
.radar-svg {
  display: block;
  width: 100%;
  overflow: visible;
}
.radar-axis-name {
  font-size: 12px;
  font-weight: 700;
  fill: var(--ink);
  letter-spacing: -0.025em;
}
.radar-pole {
  font-size: 11px;
  font-weight: 500;
  fill: var(--accent);
  letter-spacing: -0.02em;
}
.radar-user {
  transform-origin: 140px 140px;
  animation: radarIn 0.8s 0.25s cubic-bezier(0.25, 0.9, 0.3, 1) backwards;
}
.radar-svg circle {
  transform-origin: 140px 140px;
  animation: radarDotIn 0.4s cubic-bezier(0.25, 0.9, 0.3, 1) backwards;
  animation-delay: calc(0.7s + var(--dot-i, 0) * 0.06s);
}
@keyframes radarIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes radarDotIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .radar-user, .radar-svg circle { animation: none; }
}

/* 옛 cover-axes 호환 (사용 안 함) */
.cover-axes { display: none; }
.cover-axis .cax-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 2px;
  text-align: center;
}
.cover-axis .cax-desc {
  font-size: 10.5px;
  font-weight: 400;
  color: var(--ink-faint);
  letter-spacing: -0.005em;
  text-align: center;
  margin-bottom: 8px;
  line-height: 1.4;
}
.cover-axes-note {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 11px;
  color: var(--ink-faint);
  text-align: center;
  letter-spacing: -0.015em;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cover-axes-note .note-dot {
  color: var(--accent);
  font-size: 9px;
  vertical-align: middle;
}
.cover-axes-note .note-line b {
  font-weight: 700;
  color: var(--ink-soft);
}
.cover-axis .cax-track {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
}
.cover-axis .cax-pole {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-faint);
  letter-spacing: -0.015em;
}
.cover-axis .cax-pole.left { text-align: right; }
.cover-axis .cax-pole.right { text-align: left; }
.cover-axis .cax-pole.active {
  color: var(--ink);
  font-weight: 700;
}
.cover-axis .cax-bar {
  position: relative;
  height: 3px;
  background: var(--line);
  border-radius: 4px;
}
.cover-axis .cax-marker {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2px var(--bg-soft);
  animation: markerSlide 0.95s cubic-bezier(0.25, 0.9, 0.3, 1) both;
  animation-delay: var(--marker-delay, 0s);
}
@keyframes markerSlide {
  0% {
    left: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4);
  }
  50% {
    opacity: 1;
  }
  100% {
    left: var(--marker-target);
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .cover-axis .cax-marker {
    animation: none;
    left: var(--marker-target);
  }
}

/* 옛 axes 잔존 — 사용 안 함 */
.axes { display: none; }
.axis-name {
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  margin-top: 6px;
  text-transform: uppercase;
  font-weight: 500;
}

.result-section { margin: 22px 0; }
.result-section h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 12px;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.result-section h3::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}
.result-section p {
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.7;
  margin-bottom: 8px;
  font-weight: 400;
  letter-spacing: -0.015em;
  background: var(--bg-soft);
  padding: 14px 16px;
  border-radius: 4px;
}
.result-section p:last-child { margin-bottom: 0; }
.result-section p b {
  font-weight: 700;
  color: var(--ink);
  background: var(--accent-soft);
  padding: 1px 5px;
  border-radius: 4px;
}
.result-section p strong {
  display: inline;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--accent-deep);
  margin-right: 4px;
  letter-spacing: -0.02em;
}
.result-section p em {
  font-style: italic;
  color: var(--ink);
  font-weight: 500;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.tag {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.005em;
}

.aux-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}
.aux-item {
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 0;
}
.aux-item .k {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-faint);
  letter-spacing: 0.2em;
  margin-bottom: 4px;
  text-transform: uppercase;
  font-weight: 600;
}
.aux-item .v {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -0.02em;
}

/* 잘 맞는 결 / 조심할 결 — 랭킹 테이블 */
.match-table { display: flex; flex-direction: column; }
.match-table-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.015em;
  padding: 6px 0 4px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}
.match-table-head.good { color: var(--accent-deep); }
.match-table-head.watch {
  color: var(--ink-faint);
  margin-top: 16px;
}
.match-row {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 2px;
  border-bottom: 1px solid var(--line-soft);
}
.match-row .match-rank {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-faint);
  font-feature-settings: "tnum" 1;
}
.match-row .match-name {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 2px;
  line-height: 1.3;
}
.match-row .match-desc {
  font-size: 11.5px;
  color: var(--ink-soft);
  letter-spacing: -0.01em;
  line-height: 1.4;
}
.match-row .match-score {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-feature-settings: "tnum" 1;
}
.match-row.good .match-score { color: var(--accent); }
.match-row.watch .match-score { color: var(--ink-faint); }
.match-score-sym {
  font-size: 11px;
  font-weight: 700;
  margin-left: 1px;
}
.match-note {
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-faint);
  text-align: center;
  margin: 14px 0 0;
  letter-spacing: -0.015em;
}

/* 공유 토스트 */
.share-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 18px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
  letter-spacing: -0.015em;
}
.share-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 자기 돌보기 리스트 */
.care-list { list-style: none; margin: 0; padding: 0; }
.care-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.care-item:last-child { border-bottom: 1px solid var(--line); }
.care-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  flex-shrink: 0;
  padding-top: 2px;
  width: 22px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.care-body { flex: 1; }
.care-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: -0.025em;
}
.care-desc {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  letter-spacing: -0.01em;
}

/* 마무리 인용 */
.result-blockquote {
  margin: 18px 0;
  padding: 18px 18px;
  background: var(--accent-soft);
  border-radius: var(--radius);
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
}
.result-blockquote cite {
  display: block;
  margin-top: 12px;
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent-deep);
  font-family: var(--mono);
  font-weight: 600;
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 18px 0 12px;
  align-items: center;
}
.retry-row {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.retry-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-faint);
  letter-spacing: -0.005em;
}
.retry-buttons {
  display: flex;
  gap: 6px;
  width: 100%;
}
.btn-sm {
  flex: 1;
  height: 42px;
  font-size: 13px;
  padding: 0 12px;
  width: auto;
  font-weight: 600;
}

/* ============================================
   320px (iPhone SE 1세대) 미세 조정
   ============================================ */
@media (max-width: 360px) {
  .container, .container-narrow { padding: 0 16px; }
  .test-topbar { padding: 12px 16px; }
  .landing-hero h1 { font-size: 26px; }
  .landing-hero .lead { font-size: 13px; }
  .meta-row { gap: 14px; font-size: 10px; margin: 24px 0 20px; }
  .axis-card .name { width: 64px; font-size: 13px; }
  .axis-card .pole { font-size: 12px; }
  .q-text { font-size: 18px; padding: 0; }
  .q-axis-label { font-size: 9px; letter-spacing: 0.22em; }
  .opt { padding: 14px 14px; font-size: 13.5px; }
  .result-name { font-size: 27px; }
  .result-subtitle { font-size: 13px; }
  .result-quote { font-size: 14px; padding: 0 4px; }
  .axes { padding: 20px 14px; gap: 18px; }
  .axis-label-row { font-size: 12px; }
  .result-section p { font-size: 14px; }
  .result-section h3 { font-size: 16px; }
  .care-num { width: 20px; font-size: 10px; }
  .care-title { font-size: 14px; }
  .care-desc { font-size: 13px; }
  .aux-item { padding: 12px; }
  .result-blockquote { padding: 22px 18px; font-size: 14.5px; }
  .btn { font-size: 14px; padding: 0 24px; height: 50px; }
}

/* 480px 이상 — 데스크탑·태블릿에선 모바일 폭으로 가운데 정렬 */
@media (min-width: 481px) {
  body { background: var(--bg-soft); }
  .test-body, .progress, .test-topbar {
    background: var(--bg);
  }
  .test-body {
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.06);
  }
  .page {
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.06);
    background: var(--bg);
  }
}
