/* =========================================================
 * 뚜까펫 TBTI — neutral casual game UI
 * 배경/캐릭터의 귀여움은 유지하고 UI는 차분한 모바일 게임 톤으로 정리
 * ========================================================= */

@font-face {
  font-family: 'Paperlogy';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-4Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Paperlogy';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-7Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: 'Paperlogy';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-9Black.woff2') format('woff2');
  font-weight: 900;
  font-display: swap;
}

@font-face {
  font-family: 'KBL Jump';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2601-5@1.0/KBLJump_EB_ExtendedTTF.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}

@font-face {
    font-family: 'Juache';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_one@1.0/BMJUA.woff') format('woff');
    font-weight: normal;
    font-display: swap;
}

@font-face {
    font-family: 'GowoonDodum';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2108@1.1/GowunDodum-Regular.woff') format('woff');
    font-weight: normal;
    font-display: swap;
}

:root {
  --navy-950: #071625;
  --navy-900: #10253a;
  --navy-800: #173650;
  --navy-700: #24506e;
  --forest-700: #1f604c;
  --forest-500: #4b9870;
  --sky-500: #45b6d8;
  --sky-100: #dff5f7;
  --yellow-500: #ffd238;
  --yellow-300: #ffe789;
  --paper: #f7f7ed;
  --surface: rgba(255, 255, 252, 0.94);
  --surface-solid: #fffffc;
  --line: rgba(15, 38, 57, 0.16);
  --line-strong: rgba(15, 38, 57, 0.28);
  --text: #142a3d;
  --text-soft: #60717e;
  --danger: #d85b4a;
  --white: #ffffff;
  --ink: var(--navy-950);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-panel: 0 18px 48px rgba(7, 22, 37, 0.16);
  --shadow-button: 0 8px 18px rgba(7, 22, 37, 0.17);
  --font-display: 'Paperlogy', 'Apple SD Gothic Neo', sans-serif;
  --font-body: 'GowoonDodum', 'Apple SD Gothic Neo', sans-serif;
  --font-game: 'Juache', 'Paperlogy', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
  font-size: clamp(16px, calc(0.35vw + 14.5px), 18px);
  /* body와 동일한 배경을 html에도 둠 — 모바일 브라우저가 스크롤 중 주소창을
     접었다 펴면서 뷰포트가 늘어날 때, body 박스가 그 순간을 못 따라가서
     생기는 흰 여백을 이 배경이 대신 채워줌(흰 화면 노출 방지) */
  background-image:
    linear-gradient(180deg, rgba(247, 247, 237, 0.22), rgba(7, 31, 25, 0.3)),
    url('../assets/bg1.png');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

body {
  height: 100%;
  font-size: 1em;
  color: var(--text);
  font-family: var(--font-body);
  font-synthesis: none;
  background-image:
    linear-gradient(180deg, rgba(247, 247, 237, 0.22), rgba(7, 31, 25, 0.3)),
    url('../assets/bg1.png');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  overflow: hidden;
  overscroll-behavior: none;
}

button,
input { font: inherit; }

button {
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid var(--yellow-500);
  outline-offset: 3px;
}

img {
  -webkit-user-drag: none;
  user-select: none;
}

#app { position: fixed; inset: 0; }

.screen {
  position: absolute;
  inset: 0;
  display: none;
  overflow: hidden;
}

.screen.active { display: block; }

.bg-deco {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 28, 23, 0.18) 0%, rgba(255, 255, 247, 0.08) 24%, rgba(255, 255, 247, 0.3) 50%, rgba(255, 255, 247, 0.08) 76%, rgba(5, 28, 23, 0.18) 100%),
    linear-gradient(180deg, rgba(255, 255, 247, 0.08) 0%, rgba(255, 255, 247, 0.2) 48%, rgba(5, 28, 23, 0.34) 100%),
    radial-gradient(circle at 50% 40%, rgba(255, 255, 252, 0.38), transparent 50%);
}

#splash-canvas {
  position: fixed;
  inset: 0;
  z-index: 100;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  padding: 13px 30px;
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.08em;
  background: var(--navy-900);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-button);
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.btn-primary small {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.72em;
  font-weight: 400;
}

.btn-primary > span {
  font-weight: 900;
  letter-spacing: -0.035em;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 4px 12px rgba(7, 22, 37, 0.16);
}

.btn-big {
  min-width: min(100%, 290px);
  min-height: 60px;
  padding: 13px 38px;
  font-size: 1.25em;
}

.btn-ghost {
  min-height: 46px;
  padding: 11px 22px;
  color: var(--navy-900);
  font-size: 0.95em;
  font-weight: 700;
  background: rgba(255, 255, 252, 0.72);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  transition: background 150ms ease, transform 150ms ease;
}

.btn-ghost:active { transform: translateY(1px); }

/* Intro */
#screen-intro {
  isolation: isolate;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* iOS 등에서 이 영역을 스크롤 끝까지 당기면(러버밴드 바운스) body가 아니라
     이 스크롤 레이어 자체의 배경이 노출되므로, 여기에도 동일한 배경을 둠 */
  background-image:
    linear-gradient(180deg, rgba(247, 247, 237, 0.22), rgba(7, 31, 25, 0.3)),
    url('../assets/bg1.png');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

.intro-character-layer {
  display: block;
  position: absolute;
  bottom: -3vh;
  left: 0;
  z-index: 1;
  width: min(31vw, 520px);
  max-height: 90vh;
  object-fit: contain;
  object-position: left bottom;
  filter: drop-shadow(0 18px 24px rgba(5, 28, 23, 0.3));
  pointer-events: none;
  user-select: none;
}

.intro-inner {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 100%;
  width: min(100%, 520px);
  margin: 0 auto;
  padding: calc(26px + env(safe-area-inset-top)) 24px calc(28px + env(safe-area-inset-bottom));
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  text-align: center;
}

.game-logo {
  width: min(72vw, 330px);
  filter: drop-shadow(0 7px 8px rgba(7, 22, 37, 0.2));
}

.game-logo img { display: block; width: 100%; height: auto; }

.intro-title {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
}

.intro-title-sub {
  padding: 6px 10px;
  font-family: var(--font-game);
  color: var(--navy-800);
  font-size: 0.82em;
  font-weight: 800;
  letter-spacing: 0em;
  background: rgba(255, 255, 252, 0.72);
  border: 1px solid var(--line);
  border-radius: 6px;
  backdrop-filter: blur(8px);
}

.intro-title-main {
   margin-top: 15px;
  color: var(--white);
  font-family: var(--font-game);
  font-size: clamp(44px, 11vw, 64px);
  line-height: 1;
  letter-spacing: 0em;
  -webkit-text-stroke: 8px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 6px 0 rgba(74, 55, 40, 0.15);
}

/*
.intro-title-main {
  color: var(--navy-950);
  font-family: var(--font-game);
  font-size: clamp(46px, 12vw, 64px);
  line-height: 1.06;
  letter-spacing: 0em;
  text-shadow: 0 3px 0 rgba(255, 255, 252, 0.42);
}*/

.intro-title-main em {
  position: relative;
  display: inline-block;
  color: #ff8a3d;
  font-style: normal;
}

.intro-title-main em::after {
  position: absolute;
  right: -2px;
  bottom: 0.02em;
  left: -2px;
  z-index: -1;
  height: 0.24em;
  content: '';
  background: var(--yellow-500);
  border-radius: 2px;
  transform: rotate(-1deg);
}

.intro-desc {
  padding: 4px 12px;
  color: var(--navy-800);
  font-size: 0.95em;
  font-weight: 600;
  line-height: 1.6;
  text-shadow: 0 1px 8px rgba(255, 255, 252, 0.9);
  background: rgba(255, 255, 252, 0.48);
  border-radius: 999px;
  backdrop-filter: blur(5px);
}

.intro-hero {
  position: relative;
  display: flex;
  width: min(100%, 360px);
  height: 148px;
  margin: 2px 0 0;
  align-items: flex-end;
  justify-content: center;
}

.intro-hero::before {
  position: absolute;
  right: 12%;
  bottom: 2px;
  left: 12%;
  height: 30px;
  content: '';
  background: rgba(7, 22, 37, 0.16);
  border-radius: 50%;
  filter: blur(10px);
}

.hero-pet {
  position: relative;
  width: 112px;
  height: 112px;
  object-fit: contain;
  filter: drop-shadow(0 7px 5px rgba(7, 22, 37, 0.18));
  animation: hero-enter 560ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-pet-1 { margin-right: -22px; animation-delay: 80ms; }
.hero-pet-2 { z-index: 2; width: 144px; height: 144px; animation-delay: 0ms; }
.hero-pet-3 { margin-left: -22px; animation-delay: 160ms; }

@keyframes hero-enter {
  from { opacity: 0; transform: translateY(14px) scale(0.92); }
  to { opacity: 1; transform: none; }
}

#screen-intro .btn-primary {
  color: var(--navy-950);
  background: var(--yellow-500);
  border-color: rgba(7, 22, 37, 0.16);
}

#screen-intro .btn-primary small { color: rgba(7, 22, 37, 0.64); }

.link-event-terms {
  padding: 1px 4px;
  color: rgba(7, 22, 37, 0.62);
  font-size: 0.78em;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: underline;
  text-decoration-color: rgba(7, 22, 37, 0.28);
  text-underline-offset: 0.22em;
  transition: color 150ms ease;
}

.floaters { display: none; }

/* Quiz */
#screen-quiz {
  isolation: isolate;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background-image:
    linear-gradient(180deg, rgba(247, 247, 237, 0.22), rgba(7, 31, 25, 0.3)),
    url('../assets/bg1.png');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

.quiz-character-layer {
  display: block;
  position: absolute;
  bottom: -3vh;
  left: 0;
  z-index: 1;
  width: min(28vw, 470px);
  max-height: 84vh;
  object-fit: contain;
  object-position: left bottom;
  filter: drop-shadow(0 18px 24px rgba(5, 28, 23, 0.3));
  pointer-events: none;
  user-select: none;
}

.quiz-inner {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 100%;
  width: min(100%, 600px);
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(22px + env(safe-area-inset-bottom));
  flex-direction: column;
}

.quiz-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 252, 0.76);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(7, 22, 37, 0.1);
  backdrop-filter: blur(12px);
}

.btn-back {
  display: grid;
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  color: var(--navy-900);
  font-size: 1.25em;
  background: rgba(255, 255, 252, 0.84);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
}

.btn-back:disabled { opacity: 0.28; }
.progress-wrap { display: flex; flex: 1; align-items: center; gap: 10px; }

.progress-track {
  position: relative;
  height: 10px;
  flex: 1;
  background: rgba(16, 37, 58, 0.12);
  border-radius: 3px;
}

.progress-fill {
  width: 8%;
  height: 100%;
  background: linear-gradient(90deg, var(--forest-500), var(--sky-500));
  border-radius: 3px;
  transition: width 400ms ease;
}

.progress-pet {
  position: absolute;
  top: 50%;
  left: 8%;
  width: 36px;
  height: 36px;
  transform: translate(-50%, -57%);
  transition: left 400ms ease;
}

.progress-pet img { width: 100%; height: 100%; object-fit: contain; }

.progress-label {
  min-width: 42px;
  color: var(--navy-700);
  font-size: 0.85em;
  font-weight: 800;
  text-align: right;
}

.quiz-card {
  position: relative;
  display: flex;
  min-height: 490px;
  margin-top: 16px;
  padding: 154px 22px;
  align-items: stretch;
  justify-content: center;
  flex: 1;
  flex-direction: column;
  gap: 26px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(15, 38, 57, 0.2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(14px);
}

.quiz-watcher {
  position: absolute;
  top: var(--watcher-top, auto);
  right: var(--watcher-right, auto);
  bottom: var(--watcher-bottom, auto);
  left: var(--watcher-left, auto);
  z-index: 1;
  width: var(--watcher-size, 88px);
  height: var(--watcher-size, 88px);
  object-fit: contain;
  filter: drop-shadow(0 7px 6px rgba(7, 22, 37, 0.2));
  pointer-events: none;
  transform: rotate(var(--watcher-rotate, 0deg)) scaleX(var(--watcher-flip, 1));
  animation: watcher-peek 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes watcher-peek {
  from { opacity: 0; scale: 0.82; }
  to { opacity: 1; scale: 1; }
}

.quiz-card.q-in { animation: card-in 360ms ease both; }
.quiz-card.q-out { animation: card-out 220ms ease both; }

@keyframes card-in {
  from { opacity: 0; transform: translateX(22px); }
  to { opacity: 1; transform: none; }
}

@keyframes card-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateX(-18px); }
}

.q-badge {
  position: relative;
  z-index: 2;
  align-self: center;
  padding: 6px 12px;
  color: white;
  font-size: 0.9em;
  font-weight: 900;
  letter-spacing: 0.06em;
  background: var(--navy-800);
  border-radius: 6px;
}

.q-text {
  position: relative;
  z-index: 2;
  color: var(--navy-950);
  font-family: var(--font-game);
  font-size: clamp(22px, 6vw, 29px);
  font-weight: 900;
  line-height: 1.46;
  text-align: center;
  white-space: pre-line;
}

.q-answers { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 12px; }

.btn-answer {
  position: relative;
  min-height: 5.25em;
  padding: 1em 3.25em 1em 1.15em;
  color: var(--text);
  font-size: 1.05em;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: break-word;
  background: rgba(247, 247, 237, 0.72);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(7, 22, 37, 0.06);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.btn-answer::after {
  position: absolute;
  top: 50%;
  right: 15px;
  width: 8px;
  height: 8px;
  content: '';
  border-top: 2px solid rgba(16, 37, 58, 0.45);
  border-right: 2px solid rgba(16, 37, 58, 0.45);
  transform: translateY(-50%) rotate(45deg);
}

.btn-answer:active { transform: translateY(1px); }

.btn-answer.picked {
  background: var(--sky-100);
  border-color: var(--navy-700);
  box-shadow: inset 5px 0 0 var(--sky-500);
}

/* Loading */
#screen-loading {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background-image:
    linear-gradient(180deg, rgba(247, 247, 237, 0.22), rgba(7, 31, 25, 0.3)),
    url('../assets/bg1.png');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

.loading-inner {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 100%;
  padding: 28px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
}

.loading-egg { position: relative; }

.loading-egg img {
  width: 138px;
  height: 138px;
  object-fit: contain;
  filter: drop-shadow(0 10px 8px rgba(7, 22, 37, 0.2));
  animation: loading-bob 1.15s ease-in-out infinite;
}

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

.loading-shadow {
  width: 88px;
  height: 12px;
  margin: 6px auto 0;
  background: rgba(7, 22, 37, 0.2);
  border-radius: 50%;
  filter: blur(3px);
}

.loading-text {
  color: var(--navy-950);
  font-family: var(--font-display);
  font-size: 1.5em;
  font-weight: 900;
  line-height: 1.45;
  text-align: center;
  text-shadow: 0 2px 10px rgba(255, 255, 252, 0.8);
}

.dots i { display: inline-block; font-style: normal; animation: dot-blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: 160ms; }
.dots i:nth-child(3) { animation-delay: 320ms; }

@keyframes dot-blink {
  0%, 60%, 100% { opacity: 0.22; }
  30% { opacity: 1; }
}

/* Result */
#screen-result {
  overflow: hidden;
  font-family: var(--font-display);
}

.result-scroll {
  position: relative;
  z-index: 2;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background-image:
    linear-gradient(180deg, rgba(247, 247, 237, 0.22), rgba(7, 31, 25, 0.3)),
    url('../assets/bg1.png');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

.result-hero {
  display: flex;
  min-height: 100%;
  width: min(100%, 600px);
  margin: 0 auto;
  padding: calc(26px + env(safe-area-inset-top)) 18px 30px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
}

.result-eyebrow {
  color: var(--navy-800);
  font-size: 0.9em;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 8px rgba(255, 255, 252, 0.9);
}

.result-card {
  --result-accent: var(--forest-700);
  position: relative;
  isolation: isolate;
  width: min(100%, 390px);
  overflow: hidden;
  padding: 24px 22px 22px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(223, 245, 247, 0.9) 0%, rgba(255, 255, 252, 0.98) 46%, rgba(247, 247, 237, 0.98) 100%);
  border: 2px solid rgba(15, 38, 57, 0.34);
  border-radius: var(--radius-xl);
  box-shadow: none;
  animation: result-enter 480ms ease 80ms both;
}

.result-card::before {
  position: absolute;
  top: 0;
  right: 22px;
  left: 22px;
  z-index: 2;
  height: 7px;
  content: '';
  background: linear-gradient(90deg, var(--result-accent), var(--navy-800), var(--yellow-500));
  border-radius: 0 0 6px 6px;
}

.result-card::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: '';
  opacity: 0.42;
  background-image: radial-gradient(circle, rgba(23, 54, 80, 0.15) 1.2px, transparent 1.4px);
  background-size: 20px 20px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 58%);
  pointer-events: none;
}

.result-card > * { position: relative; z-index: 2; }

@keyframes result-enter {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.result-card-glow {
  position: absolute;
  top: 62px;
  left: 50%;
  z-index: 1;
  display: block;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 210, 56, 0.25), rgba(69, 182, 216, 0.12) 52%, transparent 72%);
  border: 1px dashed rgba(23, 54, 80, 0.18);
  border-radius: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.result-match-label {
  display: inline-flex;
  padding: 7px 12px;
  align-items: center;
  gap: 7px;
  color: var(--navy-800);
  font-size: 0.78em;
  font-weight: 800;
  letter-spacing: 0.035em;
  background: rgba(255, 255, 252, 0.8);
  border: 1px solid rgba(15, 38, 57, 0.18);
  border-radius: 999px;
  box-shadow: none;
}

.result-match-label span {
  width: 7px;
  height: 7px;
  background: var(--result-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(69, 182, 216, 0.14);
}

.result-img-wrap {
  position: relative;
  width: calc(100% + 44px);
  margin: 10px -22px 4px;
  padding: 7px 0;
  background: radial-gradient(circle, rgba(255, 255, 252, 0.92) 0%, rgba(223, 245, 247, 0.32) 52%, transparent 72%);
}

.result-img-wrap img {
  width: min(58vw, 224px);
  height: min(58vw, 224px);
  object-fit: contain;
  filter: drop-shadow(0 10px 8px rgba(7, 22, 37, 0.2));
}

.sparkle {
  position: absolute;
  color: var(--yellow-500);
  font-family: sans-serif;
  font-size: 1.1em;
  text-shadow: 0 2px 6px rgba(7, 22, 37, 0.16);
}
.sparkle.s1 { top: 20%; left: 16%; }
.sparkle.s2 { top: 12%; right: 17%; color: var(--result-accent); }
.sparkle.s3 { right: 12%; bottom: 22%; font-size: 0.82em; }

.result-name {
  color: var(--navy-950);
  font-family: var(--font-display);
  font-size: 2.4em;
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: 0.025em;
}

.result-title {
  margin-top: 6px;
  color: var(--result-accent);
  font-size: 1em;
  font-weight: 800;
}

.result-tagline {
  margin-top: 14px;
  padding: 12px 14px;
  color: var(--text-soft);
  font-size: 0.95em;
  font-weight: 600;
  line-height: 1.6;
  background: rgba(255, 255, 252, 0.78);
  border: 1px solid rgba(15, 38, 57, 0.13);
  border-left: 5px solid var(--result-accent);
  border-radius: 6px 12px 12px 6px;
  box-shadow: none;
}

.result-card-meta {
  display: grid;
  margin-top: 12px;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.result-card-meta > span {
  display: flex;
  min-height: 52px;
  padding: 8px 10px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  background: rgba(247, 247, 237, 0.82);
  border: 1px solid rgba(15, 38, 57, 0.16);
  border-radius: 10px;
}

.result-card-meta small { color: var(--text-soft); font-size: 0.68em; font-weight: 700; }
.result-card-meta b { color: var(--navy-900); font-size: 0.92em; font-weight: 900; }

.share-row {
  display: grid;
  width: min(100%, 420px);
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.share-row.has-kakao {
  grid-template-columns: repeat(2, 1fr);
}

.btn-share {
  display: flex;
  min-height: 48px;
  padding: 9px 6px 8px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  color: var(--navy-900);
  font-size: 0.82em;
  font-weight: 800;
  white-space: nowrap;
  background: var(--yellow-500);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: 0 7px 18px rgba(7, 22, 37, 0.11);
  backdrop-filter: blur(10px);
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.btn-share[hidden] { display: none; }

.share-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  font-family: sans-serif;
  font-size: 1.05em;
  line-height: 1;
  border-radius: 50%;
}

.btn-share-save { color: white; background: var(--navy-900); border-color: var(--navy-900); }
.btn-share-save .share-icon { color: var(--navy-950); background: var(--yellow-500); }
.btn-share-kakao { color: #391B1B; background: #FEE500; border-color: #FEE500; line-height: 1.25; }
.btn-share-send { color: white; background: var(--forest-700); border-color: var(--forest-700); }
.btn-share-send .share-icon { color: var(--forest-700); background: white; }
.btn-share-copy .share-icon { color: var(--navy-800); background: var(--sky-100); }
.btn-share:active { transform: translateY(2px); box-shadow: 0 3px 10px rgba(7, 22, 37, 0.12); }

.scroll-hint {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 10px 18px 10px 20px;
  color: var(--navy-950);
  font-size: 0.94em;
  font-weight: 900;
  line-height: 1.15;
  background: linear-gradient(100deg, #ffd238 0%, #fff09b 48%, #ffd238 100%);
  background-size: 220% 100%;
  border: 2px solid rgba(7, 22, 37, 0.32);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(7, 22, 37, 0.2), 0 0 0 0 rgba(255, 210, 56, 0.5);
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
  animation: scroll-guide-pulse 1.15s ease-in-out infinite, scroll-guide-shine 2.2s linear infinite;
}

.scroll-guide-copy {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.scroll-guide-copy small {
  color: var(--forest-700);
  font-size: 0.66em;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
}

@keyframes scroll-guide-pulse {
  0%, 100% { transform: translateY(0) scale(1); box-shadow: 0 8px 18px rgba(7, 22, 37, 0.2), 0 0 0 0 rgba(255, 210, 56, 0.48); }
  48% { transform: translateY(-4px) scale(1.035); box-shadow: 0 13px 26px rgba(7, 22, 37, 0.25), 0 0 0 8px rgba(255, 210, 56, 0); }
}

@keyframes scroll-guide-shine {
  from { background-position: 110% 0; }
  to { background-position: -110% 0; }
}

.mobile-scroll-guide {
  display: none;
  position: fixed;
  right: auto;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 80;
  width: min(310px, calc(100vw - 28px));
  min-height: 56px;
  padding: 9px 16px 9px 19px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--navy-950);
  font-size: 0.92em;
  font-weight: 900;
  line-height: 1.4;
  background: linear-gradient(100deg, #ffd238, #fff2a7 52%, #ffd238);
  border: 2px solid rgba(7, 22, 37, 0.28);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(7, 22, 37, 0.34), 0 0 0 4px rgba(255, 255, 255, 0.62);
}

@keyframes mobile-guide-attention {
  0%, 100% { transform: translate(-50%, 0) scale(1); box-shadow: 0 10px 28px rgba(7, 22, 37, 0.34), 0 0 0 4px rgba(255, 255, 255, 0.62), 0 0 0 5px rgba(255, 210, 56, 0.34); }
  45% { transform: translate(-50%, -7px) scale(1.035); box-shadow: 0 16px 34px rgba(7, 22, 37, 0.38), 0 0 0 4px rgba(255, 255, 255, 0.68), 0 0 0 13px rgba(255, 210, 56, 0); }
}

.scroll-hint:active { transform: translateY(1px); }

.scroll-hint-arrow {
  display: block;
  width: 0.58em;
  height: 0.58em;
  flex: none;
  align-self: center;
  margin-left: 0.08em;
  border-right: 0.14em solid var(--forest-700);
  border-bottom: 0.14em solid var(--forest-700);
  transform: translateY(-0.1em) rotate(45deg);
  animation: scroll-arrow-bounce 0.72s ease-in-out infinite alternate;
}

@keyframes scroll-arrow-bounce {
  from { transform: translateY(-0.18em) rotate(45deg); }
  to { transform: translateY(0.22em) rotate(45deg); }
}

.result-detail {
  display: flex;
  width: min(100%, 600px);
  margin: 0 auto;
  padding: 10px 18px 40px;
  flex-direction: column;
  gap: 14px;
}

.detail-box {
  --box-accent: var(--sky-500);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 32px 30px;
  background:
linear-gradient(var(--box-accent), var(--box-accent)) 18px calc(100% - 20px) / 20px 2px no-repeat, linear-gradient(var(--box-accent), var(--box-accent)) 18px calc(100% - 20px) / 2px 20px no-repeat, linear-gradient(var(--box-accent), var(--box-accent)) calc(100% - 20px) calc(100% - 20px) / 20px 2px no-repeat, linear-gradient(var(--box-accent), var(--box-accent)) calc(100% - 20px) calc(100% - 20px) / 2px 20px no-repeat, radial-gradient(circle, rgba(23, 54, 80, 0.1) 1.1px, transparent 1.3px) 0 0 / 20px 20px, linear-gradient(180deg, rgba(223, 245, 247, 0.76) 0%, rgba(255, 255, 252, 0.98) 48%, rgba(247, 247, 237, 0.98) 100%);
  border: 1px solid rgba(15, 38, 57, 0.24);
  border-radius: var(--radius-lg);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.result-detail > .detail-box:nth-child(1) { --box-accent: var(--sky-500); }
.result-detail > .detail-box:nth-child(2) { --box-accent: var(--forest-500); }
.result-detail > .detail-box:nth-child(3) { --box-accent: var(--yellow-500); }

.detail-box:not(.cta-box)::before {
  position: absolute;
  top: 0;
  left: 20px;
  z-index: -1;
  width: 76px;
  height: 6px;
  content: '';
  background: var(--box-accent);
  border-radius: 0 0 5px 5px;
}

.detail-box:not(.cta-box)::after {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: '';
  opacity: 0.42;
  background: linear-gradient(to bottom, rgba(255, 255, 252, 0) 0%, rgba(255, 255, 252, 0.86) 62%, rgba(255, 255, 252, 0.96) 100%);
  pointer-events: none;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.reveal.shown { opacity: 1; transform: none; }

.detail-h {
  margin-bottom: 10px;
  color: var(--navy-950);
  font-size: 1.2em;
  font-weight: 900;
  line-height: 1.4;
}

/*
.detail-h::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 9px 0.12em 1px;
  content: '';
  background: var(--box-accent);
  border-radius: 2px;
  transform: rotate(45deg);
}*/

.detail-h span { color: var(--forest-700); }
.detail-desc { color: var(--text); font-size: 1em; line-height: 1.76; }
.detail-sub { margin: -3px 0 15px; color: var(--text-soft); font-size: 0.9em; line-height: 1.55; }

.play-info { display: flex; gap: 8px; }

.play-chip {
  display: flex;
  min-height: 74px;
  padding: 11px;
  align-items: center;
  justify-content: center;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.chip-label { color: var(--text-soft); font-size: 0.82em; font-weight: 700; }
.chip-value { color: var(--navy-900); font-size: 1.15em; font-weight: 900; }
.play-note { margin-top: 10px; color: var(--text-soft); font-size: 0.88em; line-height: 1.5; text-align: center; }

.evo-line { display: flex; align-items: flex-end; justify-content: center; gap: 4px; }

.evo-item {
  position: relative;
  display: flex;
  max-width: 120px;
  align-items: center;
  flex: 1;
  flex-direction: column;
  gap: 5px;
}

.evo-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 5px 4px rgba(7, 22, 37, 0.14));
}

.evo-item.rep img { transform: scale(1.08); }

.evo-item.rep::before {
  position: absolute;
  top: -12px;
  left: 50%;
  z-index: 1;
  padding: 3px 8px;
  color: white;
  font-size: 0.72em;
  font-weight: 900;
  content: 'MY PICK';
  white-space: nowrap;
  background: var(--forest-700);
  border-radius: 5px;
  transform: translateX(-50%);
}

.evo-name { color: var(--navy-900); font-size: 0.85em; font-weight: 800; text-align: center; }
.evo-item.rep .evo-name { color: var(--forest-700); }
.evo-stage { color: var(--text-soft); font-size: 0.72em; }
.evo-arrow { flex: none; padding-bottom: 31px; color: var(--text-soft); font-size: 1em; }

/* TBTI 완료 보상 */
.reward-box {
  --box-accent: var(--yellow-500);
  padding: 0;
  background: linear-gradient(180deg, #fffdf5 0%, #fff 52%, #f8f8ef 100%);
  border: 1px solid rgba(15, 38, 57, 0.22);
  border-radius: var(--radius-lg);
}

.reward-box::after { display: none; }

.reward-heading {
  position: relative;
  overflow: hidden;
  padding: 29px 24px 24px;
  color: white;
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 210, 56, 0.28) 0 4px, transparent 5px),
    radial-gradient(circle at 78% 72%, rgba(69, 182, 216, 0.24) 0 3px, transparent 4px),
    linear-gradient(135deg, var(--navy-900), #173f5b);
}

.reward-heading::after {
  position: absolute;
  right: -25px;
  bottom: -42px;
  width: 132px;
  height: 132px;
  content: '';
  border: 18px solid rgba(255, 210, 56, 0.11);
  border-radius: 50%;
}

.reward-kicker {
  display: inline-block;
  margin-bottom: 9px;
  padding: 4px 8px;
  color: var(--navy-950);
  font-size: 0.64em;
  font-weight: 900;
  letter-spacing: 0.08em;
  background: var(--yellow-500);
  border-radius: 4px;
}

.reward-heading .detail-h {
  margin-bottom: 4px;
  color: white;
  font-size: 1.45em;
}

.reward-heading p {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.9em;
  line-height: 1.5;
}

.reward-summary {
  position: relative;
  z-index: 1;
  display: grid;
  margin-top: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.reward-summary span {
  display: flex;
  min-height: 48px;
  padding: 9px 10px;
  align-items: center;
  gap: 7px;
  color: white;
  font-size: 0.72em;
  font-weight: 800;
  line-height: 1.35;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 10px;
}

.reward-summary b { color: var(--yellow-300); font-size: 0.86em; font-weight: 900; }

.gift-reward { padding: 24px 20px 22px; }

.gift-chest {
  display: block;
  width: min(76%, 310px);
  max-height: 205px;
  margin: 12px auto 8px;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(7, 22, 37, 0.14));
}

.reward-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reward-number {
  display: grid;
  width: 37px;
  height: 37px;
  flex: none;
  place-items: center;
  color: var(--navy-950);
  font-size: 0.76em;
  font-weight: 900;
  background: var(--yellow-500);
  border-radius: 50%;
}

.reward-category {
  display: block;
  margin-bottom: 1px;
  color: var(--text-soft);
  font-size: 0.68em;
  font-weight: 700;
}

.reward-category-free {
  display: inline-block;
  padding: 2px 7px;
  color: var(--forest-700);
  background: rgba(25, 108, 76, 0.1);
  border-radius: 999px;
}

.reward-title-row h4 {
  color: var(--navy-950);
  font-size: 1.08em;
  font-weight: 900;
  line-height: 1.25;
}

.gift-code {
  display: flex;
  margin: 17px 0 18px;
  padding: 12px 14px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: white;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.12) 1px, transparent 1.5px) 0 0 / 14px 14px,
    var(--navy-900);
  border: 1px solid rgba(7, 22, 37, 0.14);
  border-radius: 10px;
}

.gift-code span {
  color: var(--yellow-300);
  font-size: 0.62em;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.gift-code strong {
  font-size: 1.14em;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.reward-items {
  display: flex;
  margin-bottom: 17px;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 6px;
  list-style: none;
}

.reward-items li {
  display: flex;
  flex: 0 1 30%;
  max-width: 94px;
  min-width: 72px;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  color: var(--text-soft);
  font-size: 0.72em;
  text-align: center;
}

.reward-items img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 4px 4px rgba(7, 22, 37, 0.12));
}

.reward-items span,
.reward-items strong { display: block; }
.reward-items strong { margin-top: 1px; color: var(--navy-900); font-size: 1.12em; font-weight: 900; }

.reward-notes {
  padding: 13px 14px;
  background: rgba(16, 37, 58, 0.055);
  border-radius: 10px;
}

.reward-notes > div {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 8px;
  font-size: 0.72em;
  line-height: 1.5;
}

.reward-notes > div + div { margin-top: 5px; }
.reward-notes dt { color: var(--navy-900); font-weight: 900; }
.reward-notes dd { color: var(--text-soft); }

.tata-reward {
  display: grid;
  min-height: 205px;
  padding: 20px;
  align-items: center;
  grid-template-columns: minmax(120px, 42%) 1fr;
  gap: 10px;
  background:
    radial-gradient(circle at 8% 16%, rgba(255, 210, 56, 0.2) 0 4px, transparent 5px),
    linear-gradient(135deg, #fff8d8, #ecf7ee);
  border-top: 1px dashed rgba(15, 38, 57, 0.2);
}

.tata-reward-visual { position: relative; min-width: 0; }

.tata-reward-visual img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  filter: drop-shadow(0 7px 6px rgba(7, 22, 37, 0.2));
}

.new-tata-badge {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  padding: 4px 7px;
  color: white;
  font-size: 0.58em;
  font-weight: 900;
  letter-spacing: 0.06em;
  background: var(--forest-700);
  border-radius: 999px;
}

.tata-reward-copy .reward-title-row { margin-bottom: 12px; }

.tata-reward-copy > p {
  color: var(--text);
  font-size: 0.78em;
  line-height: 1.65;
}

.tata-reward-copy > p strong { color: var(--forest-700); font-weight: 900; }

@media (max-width: 380px) {
  .reward-heading { padding-right: 19px; padding-left: 19px; }
  .gift-reward { padding-right: 15px; padding-left: 15px; }
  .reward-items { column-gap: 2px; }
  .reward-items li { min-width: 67px; }
  .reward-items img { width: 52px; height: 52px; }
  .tata-reward { padding-right: 15px; padding-left: 15px; grid-template-columns: minmax(105px, 39%) 1fr; }
}

/* CTA */
.cta-box {
  padding: 28px 22px;
  color: white;
  text-align: center;
  background:
    radial-gradient(circle at 100% 0%, rgba(69, 182, 216, 0.22), transparent 34%),
    var(--navy-900);
  border-color: rgba(255, 255, 255, 0.12);
}

.cta-title-visual { margin: -2px 0 18px; }

.cta-title-visual > img {
  display: block;
  width: min(58%, 230px);
  max-height: 145px;
  margin: 9px auto -4px;
  object-fit: contain;
  filter: drop-shadow(0 8px 8px rgba(7, 22, 37, 0.22));
}

.cta-title-visual-done > img {
  width: min(76%, 330px);
  max-height: 200px;
  margin-top: 10px;
  margin-bottom: 4px;
}

.prereg-teaser {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 142px;
  margin: 0 0 18px;
  padding: 34px 16px 15px;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  color: var(--navy-950);
  text-align: center;
  background: linear-gradient(135deg, #fff8d8, #ecf7ee);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 14px;
}

.prereg-teaser::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: '';
  opacity: 0.42;
  background: radial-gradient(circle at 20% 15%, white 0 2px, transparent 3px) 0 0 / 22px 22px;
  border-radius: inherit;
  pointer-events: none;
}

.free-reward-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  min-width: 210px;
  padding: 7px 13px;
  color: white;
  font-size: 0.72em;
  font-weight: 900;
  letter-spacing: 0.03em;
  background: var(--forest-700);
  border: 2px solid white;
  border-radius: 999px;
  box-shadow: 0 7px 16px rgba(7, 22, 37, 0.2);
  transform: translateX(-50%);
}

.prereg-teaser-copy > span {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 8px;
  color: var(--navy-950);
  font-size: 0.7em;
  font-weight: 900;
  background: var(--yellow-500);
  border-radius: 999px;
}

.prereg-teaser-copy p { font-size: 0.9em; font-weight: 800; line-height: 1.62; }
.prereg-teaser-copy p strong { color: var(--forest-700); font-size: 1.08em; font-weight: 900; }

.prereg-teaser > img {
  width: 118px;
  height: 118px;
  object-fit: contain;
  filter: brightness(0) drop-shadow(0 6px 5px rgba(7, 22, 37, 0.22));
}

.cta-title { font-size: 1.35em; font-weight: 900; line-height: 1.4; }
.cta-title em { color: var(--yellow-500); font-style: normal; }
.cta-sub { margin: 8px 0 16px; color: rgba(255, 255, 255, 0.68); font-size: 0.9em; }
.phone-row { margin-bottom: 10px; }

#input-phone {
  width: 100%;
  padding: 14px;
  color: var(--navy-950);
  font-size: 1.15em;
  font-weight: 700;
  text-align: center;
  background: white;
  border: 1px solid transparent;
  border-radius: 10px;
  outline: none;
}

#input-phone:focus { box-shadow: 0 0 0 3px var(--sky-500); }
#input-phone.error { animation: input-shake 360ms; box-shadow: 0 0 0 3px var(--danger); }

@keyframes input-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.consent-row {
  display: flex;
  margin-bottom: 14px;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.82em;
  line-height: 1.5;
  cursor: pointer;
}

.consent-row input { width: 17px; height: 17px; flex: none; accent-color: var(--yellow-500); }
.link-privacy { color: white; font-size: 1em; text-decoration: underline; }

.link-privacy-policy {
  display: block;
  margin: -6px 0 14px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.76em;
  text-align: center;
  text-decoration: underline;
}

.btn-cta {
  width: 100%;
  color: var(--navy-950);
  background: var(--yellow-500);
  border-color: rgba(255, 255, 255, 0.12);
}

.btn-cta small { color: rgba(7, 22, 37, 0.64); }
.btn-cta:disabled { opacity: 0.52; filter: grayscale(0.35); }

.prereg-done { animation: result-enter 420ms ease both; }
.prereg-done-title { margin-bottom: 8px; color: var(--yellow-500); font-size: 1.45em; font-weight: 900; }
.free-reward-confirm {
  display: inline-flex;
  margin: 0 auto 12px;
  padding: 8px 13px;
  align-items: center;
  gap: 7px;
  color: var(--navy-950);
  font-size: 0.84em;
  background: var(--yellow-500);
  border-radius: 999px;
  box-shadow: 0 7px 16px rgba(7, 22, 37, 0.24);
}
.free-reward-confirm span { display: grid; width: 19px; height: 19px; place-items: center; color: white; background: var(--forest-700); border-radius: 50%; }
.free-reward-confirm strong { font-weight: 900; }
.prereg-done-message { margin-bottom: 20px; color: rgba(255, 255, 255, 0.78); font-size: 0.9em; line-height: 1.7; }
.prereg-done .reward-box { color: var(--text); text-align: left; }
.store-row { display: flex; margin-top: 16px; justify-content: center; gap: 8px; }

.btn-store {
  padding: 12px 20px;
  color: var(--navy-950);
  font-size: 0.95em;
  font-weight: 800;
  text-decoration: none;
  background: var(--yellow-500);
  border-radius: 9px;
}

.retry-row { padding-top: 4px; text-align: center; }

.page-foot {
  padding: 10px 0 calc(18px + env(safe-area-inset-bottom));
  color: rgba(255, 255, 252, 0.76);
  font-size: 0.8em;
  text-align: center;
  text-shadow: 0 1px 7px rgba(7, 22, 37, 0.5);
}

/* Modal / Toast */
.modal[hidden],
.toast[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  padding: 22px;
  align-items: center;
  justify-content: center;
  background: rgba(7, 22, 37, 0.7);
  backdrop-filter: blur(5px);
}

.modal-card {
  width: min(100%, 420px);
  padding: 24px;
  text-align: center;
  background: var(--surface-solid);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
  animation: result-enter 280ms ease both;
}

.modal-card h3 { margin-bottom: 14px; color: var(--navy-950); font-size: 1.25em; font-weight: 900; }
.modal-body {
  margin-bottom: 18px;
  padding-left: 1.2em;
  color: var(--text);
  font-size: 0.95em;
  line-height: 1.6;
  text-align: left;
  list-style: disc;
}

.modal-body li + li { margin-top: 12px; }
.modal-body li::marker { color: var(--navy-800); }
.modal-note { margin-top: 8px; color: var(--text-soft); font-size: 0.9em; }
.modal-note a { color: var(--navy-900); font-weight: 700; text-decoration: underline; }

.toast {
  position: fixed;
  bottom: calc(28px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 300;
  width: max-content;
  max-width: 88vw;
  padding: 11px 20px;
  color: white;
  font-size: 0.9em;
  font-weight: 700;
  text-align: center;
  background: var(--navy-950);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  box-shadow: var(--shadow-panel);
  transform: translateX(-50%);
  animation: toast-in 280ms ease both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (hover: hover) {
  .btn-primary:hover { background: var(--navy-800); transform: translateY(-1px); }
  #screen-intro .btn-primary:hover,
  .btn-cta:hover { background: var(--yellow-300); }
  .btn-answer:hover { background: white; border-color: var(--navy-700); transform: translateY(-1px); }
  .btn-share:hover { transform: translateY(-1px); }
  .scroll-hint:hover { background: rgba(255, 255, 252, 0.9); }
  .btn-ghost:hover { background: white; }
  .link-event-terms:hover { color: var(--navy-950); }
}

@media (max-height: 700px) {
  .intro-inner { gap: 10px; padding-top: 16px; padding-bottom: 18px; }
  .game-logo { width: min(62vw, 270px); }
  .intro-title-main { font-size: clamp(40px, 10vw, 52px); }
  .intro-hero { height: 112px; }
  .hero-pet { width: 92px; height: 92px; }
  .hero-pet-2 { width: 114px; height: 114px; }
  .quiz-card { min-height: 430px; gap: 18px; padding-top: 148px; padding-bottom: 148px; }
}

@media (min-width: 900px) {
  .intro-inner { width: min(100%, 740px); gap: 12px; padding: 24px 30px; }
  .game-logo { width: 310px; }
  .intro-title-main { font-size: 92px; }
  .intro-title-sub { font-size: 0.9em; }
  .intro-desc { font-size: 1em; }
  .intro-hero { width: 390px; height: 134px; }
  .hero-pet { width: 104px; height: 104px; }
  .hero-pet-2 { width: 136px; height: 136px; }
  .floater { position: absolute; width: 70px; height: 70px; object-fit: contain; opacity: 0.42; filter: drop-shadow(0 4px 5px rgba(7, 22, 37, 0.12)); }
  .quiz-inner,
  .result-hero,
  .result-detail { width: min(100%, 660px); }
  .quiz-card { padding-right: 46px; padding-left: 46px; }
  .btn-answer { font-size: 1.08em; }
  .result-card { width: 420px; }
  .share-row.has-kakao { width: 100%; grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 700px) {
  html,
  body {
    background-image:
      linear-gradient(180deg, rgba(247, 247, 237, 0.34), rgba(7, 31, 25, 0.38)),
      url('../assets/bg1.png');
  }

  .intro-character-layer,
  .quiz-character-layer {
    display: none;
  }

  .mobile-scroll-guide {
    display: inline-flex;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 16px);
  }

  .mobile-scroll-guide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    animation: mobile-guide-attention 1.35s ease-in-out infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
