/* ==========================================================================
   testgogo — 테스트 화면 공통
   랜딩 · 질문 · 분석중 · 결과 · 전체유형. 모든 테스트가 이 파일을 공유합니다.
   ========================================================================== */

/* ── 화면 전환 ──────────────────────────────────────────────────────────── */
.screen { display: none; flex: 1; flex-direction: column; }
.screen.is-active { display: flex; animation: fadeUp .38s var(--ease); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ── 랜딩 ───────────────────────────────────────────────────────────────── */
.intro-head { text-align: center; padding-top: 10px; }
.intro-title {
  margin-top: 14px;
  font-size: clamp(28px, 8.6vw, 36px);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.25;
}
.intro-sub { margin-top: 10px; color: var(--ink-soft); font-size: 15px; }

.intro-art {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  align-content: center;
  margin: 18px 0;
}
.intro-art svg {
  width: 100%; height: auto;
  filter: drop-shadow(0 4px 10px rgba(80, 60, 30, .12));
  animation: bob 3.4s var(--ease) infinite;
}
.intro-art > *:nth-child(2n) svg { animation-delay: -.5s; }
.intro-art > *:nth-child(3n) svg { animation-delay: -1.1s; }
.intro-art > *:nth-child(5n) svg { animation-delay: -1.8s; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

.intro-meta {
  display: flex; flex-wrap: wrap; gap: 7px; justify-content: center;
  margin-bottom: 16px;
}
.intro-note { margin-top: 12px; text-align: center; font-size: 11.5px; color: var(--ink-soft); opacity: .8; }

/* ── 질문 ───────────────────────────────────────────────────────────────── */
.quiz-top { display: flex; align-items: center; gap: 12px; padding: 6px 0 22px; }
.btn-back {
  width: 38px; height: 38px; flex: none;
  border: 0; border-radius: 12px;
  background: rgba(255, 255, 255, .75);
  color: var(--ink-soft);
  font-size: 18px; cursor: pointer;
  transition: opacity .2s;
}
.btn-back:disabled { opacity: .3; cursor: default; }

.progress { flex: 1; }
.progress-bar {
  height: 8px; border-radius: 99px;
  background: rgba(255, 255, 255, .8);
  overflow: hidden;
}
.progress-bar span {
  display: block; height: 100%; width: 0;
  border-radius: 99px;
  background: var(--accent);
  transition: width .4s var(--ease);
}
.progress-label { margin-top: 6px; font-size: 12px; color: var(--ink-soft); text-align: right; }
.progress-label b { color: var(--accent); }

.qcard {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding-bottom: 20px;
}
.qcard.swap { animation: swapIn .34s var(--ease); }
@keyframes swapIn {
  from { opacity: 0; transform: translateX(22px); }
  to   { opacity: 1; transform: none; }
}

.q-axis {
  align-self: flex-start;
  font-size: 12px; font-weight: 800; letter-spacing: .08em;
  color: var(--accent);
  background: rgba(255, 255, 255, .85);
  padding: 5px 11px; border-radius: 999px;
  margin-bottom: 14px;
}
.q-text {
  font-size: clamp(21px, 6.2vw, 25px);
  font-weight: 800;
  line-height: 1.42;
  letter-spacing: -.015em;
  margin-bottom: 26px;
}

.q-choices { display: flex; flex-direction: column; gap: 12px; }
.choice {
  font: inherit;
  text-align: left;
  background: var(--card);
  border: 2px solid transparent;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 18px;
  font-size: 16px; font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  display: flex; align-items: center; gap: 12px;
  transition: transform .14s var(--ease), border-color .16s, box-shadow .2s;
}
.choice .emo { font-size: 22px; flex: none; }
.choice:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.choice:active,
.choice.picked { border-color: var(--accent); transform: scale(.98); }

/* ── 분석 중 ────────────────────────────────────────────────────────────── */
.loader {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px;
}
.loader-paw { font-size: 58px; animation: paw 1s var(--ease) infinite; }
@keyframes paw {
  0%, 100% { transform: translateY(0) rotate(-8deg); opacity: .55; }
  50%      { transform: translateY(-14px) rotate(8deg); opacity: 1; }
}
.loader-text { font-size: 16px; font-weight: 700; color: var(--ink-soft); }

/* ── 결과 ───────────────────────────────────────────────────────────────── */
.shared-banner {
  text-align: center;
  font-size: 13px; font-weight: 700;
  color: var(--accent);
  background: rgba(255, 255, 255, .85);
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 999px;
  padding: 9px 14px;
  margin-bottom: 14px;
}

.result-card {
  background: var(--card);
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
  padding: 26px 22px 24px;
  text-align: center;
}
.result-art { width: 168px; margin: 0 auto 6px; }
.result-art svg { width: 100%; height: auto; animation: pop .5s var(--ease); }
@keyframes pop {
  0%   { transform: scale(.6) rotate(-8deg); opacity: 0; }
  70%  { transform: scale(1.06) rotate(2deg); }
  100% { transform: none; opacity: 1; }
}

.result-catch { font-size: 13.5px; font-weight: 800; letter-spacing: .02em; color: var(--accent); }
.result-name { font-size: 32px; font-weight: 900; letter-spacing: -.02em; margin-top: 2px; }
.result-code {
  font-size: 11.5px; font-weight: 700; letter-spacing: .16em;
  color: var(--ink-soft); opacity: .7; margin-top: 4px;
}
.result-desc {
  margin-top: 16px;
  font-size: 14.8px;
  color: #4A4239;
  text-align: left;
  line-height: 1.78;
}

.result-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 16px; }
.result-tags span {
  font-size: 12.5px; font-weight: 700;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  padding: 6px 11px; border-radius: 999px;
}

.result-bars { margin-top: 22px; display: flex; flex-direction: column; gap: 13px; }
.bar-row { text-align: left; }
.bar-head {
  display: flex; justify-content: space-between;
  font-size: 12px; font-weight: 700; color: var(--ink-soft);
  margin-bottom: 5px;
}
.bar-head .on { color: var(--accent); }
.bar-track { height: 7px; border-radius: 99px; background: #F0ECE5; overflow: hidden; }
.bar-track i {
  display: block; height: 100%; border-radius: 99px;
  background: var(--accent);
  width: 0;
  transition: width .7s var(--ease) .2s;
}

.match-box {
  margin-top: 22px; padding-top: 18px;
  border-top: 1px dashed var(--line);
  text-align: left;
}
.match-label { font-size: 12px; font-weight: 800; color: var(--ink-soft); letter-spacing: .06em; }
.match-row { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.match-art { width: 56px; flex: none; }
.match-art svg { width: 100%; height: auto; }
.match-name { font-size: 16px; font-weight: 800; }
.match-line { font-size: 13px; color: var(--ink-soft); line-height: 1.6; margin-top: 2px; }

/* ── 공유 ───────────────────────────────────────────────────────────────── */
.share-zone { margin-top: 22px; text-align: center; }
.share-title { font-size: 15px; font-weight: 800; margin-bottom: 12px; }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.btn-share { background: var(--card); color: var(--ink); font-size: 14.5px; box-shadow: var(--shadow); }
.btn-share:hover { box-shadow: var(--shadow-lg); }
.btn-kakao { background: #FEE500; color: #2B1F1F; }
.share-hint { margin-top: 11px; font-size: 12.5px; color: var(--ink-soft); }

.result-foot { display: flex; gap: 9px; margin-top: 22px; }
.result-foot .btn { flex: 1; }

/* 다른 테스트 추천 */
.more-tests { margin-top: 26px; }
.more-tests h3 { font-size: 14px; font-weight: 800; margin-bottom: 10px; text-align: center; }

/* ── 전체 유형 ──────────────────────────────────────────────────────────── */
.all-title { font-size: 24px; font-weight: 900; text-align: center; padding: 16px 0 18px; }
.all-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-bottom: 20px; }
.all-item {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 12px;
  text-align: center;
}
.all-item svg { width: 76px; height: auto; }
.all-item b { display: block; font-size: 15.5px; margin-top: 4px; }
.all-item small { display: block; font-size: 12px; color: var(--ink-soft); }
.all-item i {
  display: block; font-style: normal;
  font-size: 10.5px; font-weight: 700; letter-spacing: .14em;
  opacity: .55; margin-top: 3px;
}
