/* =========================================================
   POSE 16 · 나의 생각하는 자세 — 스타일
   1080×1920 고정 아트보드를 뷰포트에 스케일(원본 시안 위치 그대로 재현)
   ========================================================= */

@font-face {
  font-family: 'Pretendard';
  src: url('assets/fonts/PretendardVariable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #000622;
  --bg-soft: #0a1130;
  --line: rgba(150, 170, 255, 0.22);

  --pink: #ff63c7;
  --violet: #b58bee;
  --teal: #74f7d2;
  --grad: linear-gradient(95deg, #ff63c7 0%, #b58bee 48%, #74f7d2 100%);

  --text: #eaf0ff;
  --muted: #97a2ce;
  --muted-dim: #6d78a6;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Pretendard', 'Malgun Gothic', -apple-system, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

/* 레터박스 영역까지 은은한 글로우 */
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(120% 55% at 50% 0%, rgba(120, 90, 200, 0.10), transparent 60%),
    radial-gradient(90% 45% at 50% 100%, rgba(0, 200, 180, 0.06), transparent 60%);
  pointer-events: none; z-index: 0;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}

/* ---------- 스테이지: 1080×1920 고정, 뷰포트에 맞춰 scale ---------- */
.stage {
  position: relative; z-index: 1;
  width: 1080px; height: 1920px;
  flex: none;
  transform: scale(var(--scale, 1));
  transform-origin: center center;
  overflow: hidden;
  background:
    radial-gradient(120% 42% at 50% 0%, rgba(120, 90, 200, 0.12), transparent 60%),
    radial-gradient(90% 36% at 50% 100%, rgba(0, 200, 180, 0.07), transparent 60%),
    var(--bg);
}

.screen {
  position: absolute; inset: 0;
  display: none;
  flex-direction: column;
  animation: fade .5s ease both;
}
.screen.is-active { display: flex; }
@keyframes fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- 버튼 공통 ---------- */
.btn {
  font-family: inherit; cursor: pointer;
  border: 0; background: none; color: var(--text);
  transition: transform .15s ease, filter .2s ease, box-shadow .25s ease;
}
.btn:active { transform: scale(.98); }

/* 그라디언트 테두리 라운드-사각형 버튼 */
.btn--pill {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 26px;
  padding: 34px 70px;
  font-size: 50px; font-weight: 800; letter-spacing: .02em;
  border-radius: 22px;
  color: #fff;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    var(--grad) border-box;
  border: 3px solid transparent;
  box-shadow: 0 0 40px rgba(180, 120, 230, 0.28), inset 0 0 30px rgba(120, 200, 220, 0.06);
}
.btn--pill:hover { filter: brightness(1.08); }
.btn__arrow { font-weight: 700; font-size: 1.15em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.btn--ghost {
  font-size: 34px; font-weight: 600; color: var(--muted);
  padding: 24px 52px; border-radius: 999px;
  border: 2px solid var(--line);
  background: rgba(255,255,255,0.02);
}
.btn--ghost:hover { color: var(--text); border-color: rgba(150,170,255,.4); }

/* =========================================================
   1. 인트로  (원본 좌표 절대배치)
   ========================================================= */
.screen--intro { display: none; }
.screen--intro.is-active { display: block; }

.intro-top { position: absolute; top: 337px; left: 130px; right: 80px; }

.wordmark { position: relative; }
/* 원본 제도(製圖)식 가이드: POSE+16 프레임 + 4모서리 링 노드 */
.wordmark__guides {
  --gc: rgba(160, 180, 255, .30);
  position: absolute; left: -46px; top: 42px; right: 70px; height: 636px;
  pointer-events: none; z-index: -1;
  background:
    linear-gradient(var(--gc), var(--gc)) left 0 top 0 / 100% 2px no-repeat,
    linear-gradient(var(--gc), var(--gc)) left 0 bottom 0 / 100% 2px no-repeat,
    linear-gradient(var(--gc), var(--gc)) left 0 top 0 / 2px 100% no-repeat,
    linear-gradient(var(--gc), var(--gc)) right 0 top 0 / 2px 100% no-repeat,
    linear-gradient(var(--gc), var(--gc)) left 0 top 300px / 100% 2px no-repeat,
    radial-gradient(circle at left top,     transparent 6px, rgba(180,195,255,.65) 6px, rgba(180,195,255,.65) 9px, transparent 10px) left top / 26px 26px no-repeat,
    radial-gradient(circle at right top,    transparent 6px, rgba(180,195,255,.65) 6px, rgba(180,195,255,.65) 9px, transparent 10px) right top / 26px 26px no-repeat,
    radial-gradient(circle at left bottom,  transparent 6px, rgba(180,195,255,.65) 6px, rgba(180,195,255,.65) 9px, transparent 10px) left bottom / 26px 26px no-repeat,
    radial-gradient(circle at right bottom, transparent 6px, rgba(180,195,255,.65) 6px, rgba(180,195,255,.65) 9px, transparent 10px) right bottom / 26px 26px no-repeat;
}

.wordmark__row { display: flex; align-items: flex-start; }
.wordmark__pose {
  font-weight: 900; font-size: 300px; line-height: .86; letter-spacing: -0.02em;
}
.wordmark__row--2 { align-items: flex-end; gap: 30px; margin-top: 6px; }
.wordmark__16 {
  font-weight: 900; font-size: 300px; line-height: .78; letter-spacing: -0.02em;
}
.wordmark__kr {
  font-weight: 800; font-size: 90px; line-height: 1.02; padding-bottom: 16px; color: var(--text);
}
.wordmark__en {
  margin-top: 40px; font-size: 30px; font-weight: 700; color: var(--muted); letter-spacing: .01em;
}
.wordmark__en b { color: #c9d3ff; }
.wordmark__sub { margin-top: 12px; font-size: 26px; color: var(--muted-dim); font-weight: 500; }

.intro-lead {
  position: absolute; left: 80px; right: 80px; top: 1205px; text-align: center;
  font-size: 41px; line-height: 1.6; color: #cdd6f5; font-weight: 500;
}
.intro-bottom { position: absolute; left: 80px; right: 80px; bottom: 244px; text-align: center; }
.intro-cta-label {
  font-size: 37px; color: var(--pink); font-weight: 600; letter-spacing: .01em; margin-bottom: 40px;
}
.intro-bottom .btn--pill { width: 640px; }

/* =========================================================
   2. 질문
   ========================================================= */
.screen--question { justify-content: flex-start; padding: 96px 80px 80px; }

.q-topnote {
  text-align: center; font-size: 28px; color: var(--muted); font-weight: 500;
  letter-spacing: .01em; margin-bottom: 20px;
}
.q-topnote b { color: #c2cbf0; font-weight: 600; }

.q-figure {
  flex: 1 1 auto; min-height: 0;
  display: flex; align-items: center; justify-content: center; padding: 16px 0;
}
.q-figure img {
  max-width: 78%; max-height: 100%; height: auto; object-fit: contain;
  filter: drop-shadow(0 12px 60px rgba(120, 120, 220, 0.25));
  animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }

.q-body { flex: 0 0 auto; }
.q-title {
  text-align: center; font-weight: 800; color: #fff;
  font-size: 62px; line-height: 1.26; margin-bottom: 44px; word-break: keep-all;
}
.q-title span:first-child { color: var(--text); }

.q-options { display: flex; flex-direction: column; gap: 28px; }
.opt {
  display: flex; align-items: center; justify-content: center; text-align: center;
  width: 100%; min-height: 138px; padding: 36px 52px;
  font-family: inherit; font-size: 38px; font-weight: 600; line-height: 1.34;
  color: #dfe6ff; cursor: pointer; border-radius: 24px;
  background:
    linear-gradient(var(--bg-soft), var(--bg-soft)) padding-box,
    var(--grad) border-box;
  border: 3px solid transparent; word-break: keep-all;
  transition: transform .14s ease, box-shadow .25s ease, filter .2s ease;
}
.opt:hover { filter: brightness(1.12); }
.opt:active { transform: scale(.99); }
.opt.is-picked { box-shadow: 0 0 46px rgba(180, 120, 230, .5); filter: brightness(1.18); }
.opt__letter { font-weight: 700; color: #cfd7ff; white-space: nowrap; }

.q-foot {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 26px; padding-top: 42px;
}
.help-btn {
  width: 92px; height: 92px; border-radius: 50%;
  font-family: inherit; font-size: 42px; font-weight: 800; color: var(--violet); cursor: pointer;
  background: rgba(255,255,255,0.02); border: 2px solid var(--line);
  display: grid; place-items: center;
  transition: transform .15s ease, border-color .2s ease, color .2s;
}
.help-btn:hover { border-color: rgba(180,140,240,.6); color: #fff; }
.help-btn:active { transform: scale(.9); }
.q-pager { font-size: 32px; color: var(--muted-dim); font-weight: 600; letter-spacing: .06em; }
.q-pager #q-cur { color: var(--violet); }

/* 도움말 팝오버 (? 위) */
.help-sheet[hidden] { display: none; }
.help-sheet {
  position: absolute; inset: 0; z-index: 30;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(0, 3, 16, 0.42);
  padding: 0 80px 300px;
  animation: fade .18s ease both;
}
.help-card {
  position: relative; width: 720px;
  background: rgba(16, 23, 58, 0.97); border: 2px solid var(--line);
  border-radius: 32px; padding: 44px 48px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
  animation: pop .26s cubic-bezier(.2, .9, .25, 1) both;
}
.help-card::after {
  content: ''; position: absolute; left: 50%; bottom: -17px; transform: translateX(-50%);
  border: 18px solid transparent; border-bottom: 0; border-top-color: rgba(16, 23, 58, .97);
}
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.help-heading { font-size: 40px; font-weight: 800; color: #fff; margin-bottom: 30px; word-break: keep-all; line-height: 1.4; }
.help-lines { display: flex; flex-direction: column; gap: 20px; margin-bottom: 34px; }
.help-line { font-size: 34px; line-height: 1.4; color: var(--muted); word-break: keep-all; }
.help-line b {
  display: inline-block; min-width: 260px; font-weight: 800;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.help-close {
  width: 100%; padding: 24px; border-radius: 16px;
  font-family: inherit; font-size: 34px; font-weight: 700; color: var(--muted); cursor: pointer;
  background: rgba(255, 255, 255, 0.04); border: 2px solid var(--line);
}
.help-close:hover { color: var(--text); }

/* =========================================================
   3. 로딩
   ========================================================= */
.screen--loading { align-items: center; justify-content: center; gap: 90px; padding: 80px; }
.loading-ring { width: 880px; aspect-ratio: 1; display: grid; place-items: center; }
.loading-ring__img {
  width: 100%; height: 100%; object-fit: contain;
  animation: spin 22s linear infinite;
  filter: drop-shadow(0 0 70px rgba(120,140,230,.3));
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 38px; color: var(--muted); font-weight: 500; letter-spacing: .02em; }
.loading-cta { min-width: 520px; justify-content: center; }

/* =========================================================
   4. 결과
   ========================================================= */
.screen--result { justify-content: center; gap: 56px; padding: 70px 80px; }

.result-card {
  position: relative; border-radius: 44px; padding: 56px 52px 64px; text-align: center;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(60, 40, 110, 0.35), rgba(6, 10, 34, 0.2)),
    linear-gradient(180deg, #080d28, #05081f);
  box-shadow: 0 30px 90px rgba(0,0,0,.5);
}
.result-card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 3px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .85; pointer-events: none;
}
.result-pose { display: flex; justify-content: center; margin-bottom: 18px; }
.result-pose img {
  width: auto; max-height: 760px; max-width: 82%; object-fit: contain;
  filter: drop-shadow(0 16px 60px rgba(130,120,230,.35));
}
.result-nick { font-size: 46px; font-weight: 800; color: #fff; margin-bottom: 2px; }
.result-code { font-weight: 900; font-size: 180px; line-height: 1; letter-spacing: .02em; margin: 6px 0 14px; }
.result-desc { font-size: 37px; line-height: 1.5; color: var(--muted); font-weight: 500; word-break: keep-all; }

.result-share { display: flex; align-items: center; gap: 40px; padding: 0 30px; }
.result-qr {
  flex: 0 0 auto; width: 200px; aspect-ratio: 1;
  background: #fff; border-radius: 22px; padding: 14px; box-shadow: 0 10px 34px rgba(0,0,0,.4);
}
.result-qr img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.result-share-text { font-size: 33px; line-height: 1.5; color: #cdd6f5; font-weight: 500; text-align: left; }
.result-share-text b { color: #fff; font-weight: 800; }

.result-restart { align-self: center; margin-top: 8px; }
