:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --primary: #4f46e5;
  --secondary: #06b6d4;
  --accent: #f59e0b;
  --green: #22c55e;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --soft-border: rgba(17, 24, 39, 0.08);
  --shadow: 0 20px 54px rgba(15, 23, 42, 0.11);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius: 24px;
  --type-color: #4f46e5;
  --type-accent: #06b6d4;
  --type-soft: #eef2ff;
  font-family: "Inter", "Noto Sans KR", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(79, 70, 229, 0.16), transparent 22rem),
    radial-gradient(circle at 100% 20%, rgba(6, 182, 212, 0.11), transparent 18rem),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 48%, #eef2ff 100%);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.ambient-grid,
.soft-noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
}

.ambient-grid {
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(79, 70, 229, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 70, 229, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 78%);
}

.soft-noise {
  opacity: 0.46;
  background:
    radial-gradient(circle at 16% 18%, rgba(245, 158, 11, 0.08), transparent 15rem),
    radial-gradient(circle at 86% 68%, rgba(34, 197, 94, 0.08), transparent 16rem);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100% - 24px, 430px);
  margin: 0 auto;
}

.screen {
  display: none;
  min-height: 100svh;
  padding: max(16px, env(safe-area-inset-top)) 0 calc(70px + env(safe-area-inset-bottom));
}

.screen.is-active {
  display: block;
  animation: screenIn 220ms ease both;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-mark {
  width: 26px;
  aspect-ratio: 1;
  border-radius: 9px;
  background:
    radial-gradient(circle at 62% 39%, #ffffff 0 8%, transparent 9%),
    conic-gradient(from 35deg, transparent 0 76deg, var(--primary) 77deg 360deg);
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.24);
}

.eyebrow,
.status-pill,
.question-counter,
.question-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.eyebrow {
  width: fit-content;
  margin: 0 0 18px;
  color: var(--primary);
}

.hero-layout {
  display: grid;
  place-items: center;
  min-height: calc(100svh - 56px);
  text-align: center;
}

.hero-copy {
  display: grid;
  justify-items: center;
  width: 100%;
  padding-bottom: 8svh;
}

.hero-pretitle {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 28px;
  font-weight: 900;
}

.hero-copy h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(44px, 13vw, 62px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: 0;
  word-break: keep-all;
}

.hero-subtitle {
  max-width: 330px;
  margin: 20px 0 26px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.55;
  word-break: keep-all;
}

.hero-actions,
.share-actions {
  display: grid;
  width: 100%;
  gap: 10px;
}

.primary-button,
.ghost-button,
.share-button {
  position: relative;
  isolation: isolate;
  min-height: 56px;
  border-radius: 18px;
  font-weight: 900;
  letter-spacing: 0;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.primary-button {
  width: 100%;
  padding: 0 20px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: #ffffff;
  box-shadow: 0 18px 38px rgba(79, 70, 229, 0.3);
}

.primary-button:hover,
.share-button.primary:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 24px 48px rgba(79, 70, 229, 0.34);
}

.dna-button {
  min-height: 76px;
  border-radius: 24px;
  font-size: 20px;
}

.ghost-button,
.share-button {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.share-button.primary {
  border-color: transparent;
  background: var(--primary);
  color: #ffffff;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin-top: 16px;
}

.hero-meta span {
  display: grid;
  place-items: center;
  min-height: 70px;
  padding: 10px 6px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #ffffff;
  color: var(--muted);
  box-shadow: var(--shadow-soft);
  font-size: 13px;
  font-weight: 900;
}

.hero-meta b {
  color: var(--primary);
  font-size: 20px;
}

.scroll-cue {
  margin-top: 28px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  animation: bounceCue 1.4s ease-in-out infinite;
}

.ripple::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5), transparent 58%);
  transform: scale(0.82);
  transition: opacity 180ms ease, transform 180ms ease;
}

.ripple:active::after {
  opacity: 1;
  transform: scale(1.14);
}

.quiz-topbar {
  position: sticky;
  top: 0;
  z-index: 6;
  padding: 6px 0 12px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(248, 250, 252, 0.78));
  backdrop-filter: blur(18px);
}

.progress-shell {
  position: sticky;
  top: 62px;
  z-index: 6;
  padding-bottom: 16px;
}

.progress-track,
.analysis-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

.progress-fill,
.analysis-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--secondary), var(--primary));
  transition: width 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.quiz-card,
.analysis-box,
.glass-panel,
.share-panel,
.share-card-wrap,
.character-stage,
.dopamine-card {
  border: 1px solid var(--soft-border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.quiz-card {
  margin: clamp(24px, 9svh, 70px) 0 0;
  padding: 26px 20px 20px;
  text-align: left;
}

.quiz-card.is-changing {
  animation: quickSwap 200ms ease both;
}

.quiz-card h2 {
  margin: 14px 0 24px;
  color: var(--text);
  font-size: clamp(28px, 8vw, 38px);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: 0;
  word-break: keep-all;
}

.option-grid {
  display: grid;
  gap: 12px;
}

.option-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  font-size: 17px;
  font-weight: 850;
  line-height: 1.42;
  text-align: left;
  word-break: keep-all;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.option-index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #f1f5f9;
  color: var(--primary);
  font-size: 14px;
  font-weight: 900;
}

.option-card:hover,
.option-card.is-selected {
  transform: translateY(-3px) scale(1.01);
  border-color: rgba(79, 70, 229, 0.34);
  background: #f5f7ff;
  box-shadow: 0 18px 38px rgba(79, 70, 229, 0.14);
}

.dopamine-card {
  position: fixed;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 20;
  width: min(390px, calc(100% - 28px));
  padding: 18px 18px;
  color: var(--text);
  transform: translate(-50%, 18px) scale(0.96);
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
}

.dopamine-card.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.dopamine-card strong {
  display: block;
  font-size: 17px;
  line-height: 1.45;
}

.loading-screen.is-active {
  display: grid;
  place-items: center;
}

.analysis-box {
  width: 100%;
  padding: 30px 20px 22px;
  text-align: center;
}

.analysis-orb {
  position: relative;
  width: 116px;
  aspect-ratio: 1;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--primary), var(--secondary), var(--accent), var(--green), var(--primary));
  animation: spin 1s linear infinite;
  box-shadow: 0 24px 46px rgba(79, 70, 229, 0.18);
}

.analysis-orb::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: inherit;
  background: #ffffff;
}

.analysis-orb span {
  display: none;
}

.analysis-box h2 {
  margin: 0 0 18px;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0;
}

.analysis-progress {
  margin-bottom: 18px;
}

.analysis-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.analysis-steps li {
  min-height: 48px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
  color: var(--muted);
  font-size: 15px;
  font-weight: 850;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.analysis-steps li.is-complete {
  transform: translateX(4px);
  border-color: rgba(79, 70, 229, 0.22);
  background: #f5f7ff;
  color: var(--primary);
}

.result-screen {
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

.result-hero {
  display: grid;
  gap: 18px;
  margin: 24px 0 16px;
}

.character-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 520px;
  padding: 38px 22px 28px;
  overflow: visible;
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--type-color) 22%, transparent), transparent 45%),
    linear-gradient(180deg, #ffffff 0%, var(--type-soft) 100%);
}

.character-stage::before {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: 999px;
  background: color-mix(in srgb, var(--type-color) 18%, transparent);
  filter: blur(42px);
}

.character-image-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 420px;
  overflow: visible;
  padding: 28px 14px 20px;
}

.character-png,
.character-svg,
.character-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 410px;
  height: auto;
  max-height: 440px;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 28px 28px rgba(15, 23, 42, 0.18));
  animation: cardFloat 3.8s ease-in-out infinite;
  transition: transform 180ms ease, filter 180ms ease;
}

.character-stage:hover .character-png,
.character-stage:hover .character-svg {
  transform: translateY(-4px);
}

.result-copy h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(42px, 11vw, 62px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: 0;
}

.type-title {
  margin: 10px 0 0;
  color: var(--type-accent);
  font-size: 24px;
  font-weight: 900;
}

.result-line {
  margin: 16px 0 18px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.68;
  word-break: keep-all;
}

.fit-row {
  display: grid;
  gap: 10px;
}

.fit-row > div,
.quote-card {
  min-height: 94px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.fit-row span,
.quote-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.fit-row strong {
  display: block;
  color: var(--text);
  font-size: 30px;
  font-weight: 900;
  line-height: 1.05;
}

#fitScore {
  font-size: 56px;
  color: var(--primary);
}

.quote-card {
  margin-top: 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.84)),
    radial-gradient(circle at 92% 10%, color-mix(in srgb, var(--type-color) 14%, transparent), transparent 12rem);
}

.quote-card p {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.5;
}

.result-grid,
.share-layout {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.glass-panel,
.share-panel,
.share-card-wrap {
  padding: 20px;
  border: 1px solid var(--soft-border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.glass-panel:hover,
.premium-course:hover,
.share-card-wrap:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.13);
}

.glass-panel h3,
.share-panel h3 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0;
}

.glass-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.72;
  word-break: keep-all;
}

.fit-meter {
  height: 20px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.fit-meter span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--type-color), var(--type-accent), var(--primary));
  transition: width 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

.dna-bars {
  display: grid;
  gap: 13px;
  margin-top: 18px;
}

.dna-bar > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: var(--text);
  font-weight: 900;
}

.dna-bar span {
  color: var(--muted);
  font-size: 14px;
}

.dna-bar b {
  color: var(--primary);
}

.dna-bar i {
  display: block;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

.dna-bar em {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--type-color), var(--secondary));
  transition: width 860ms cubic-bezier(0.22, 1, 0.36, 1);
}

.badge-list,
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge-list span,
.chip-list span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--type-color) 22%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--type-color) 9%, #ffffff);
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.badge-list i {
  font-style: normal;
}

.premium-course {
  display: grid;
  gap: 13px;
  min-height: 238px;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--type-color) 18%, var(--border));
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.84)),
    radial-gradient(circle at 86% 8%, color-mix(in srgb, var(--type-color) 16%, transparent), transparent 15rem);
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.course-label {
  width: fit-content;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, #ffffff);
  color: #92400e;
  font-size: 12px;
  font-weight: 900;
}

.premium-course strong {
  color: var(--text);
  font-size: 26px;
  font-weight: 900;
  line-height: 1.18;
}

.course-fit {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.course-fit::before {
  content: "★★★★★";
  color: var(--accent);
  font-size: 16px;
  letter-spacing: 1px;
}

.course-fit span {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.course-fit b {
  color: var(--primary);
  font-size: 30px;
  font-weight: 900;
}

.roadmap-timeline {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.roadmap-timeline span {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
  color: var(--text);
  font-weight: 900;
}

.roadmap-timeline b {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 11px;
  background: var(--primary);
  color: #ffffff;
  font-size: 13px;
}

.roadmap-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.roadmap-form[hidden],
.consultant-card[hidden] {
  display: none;
}

.roadmap-form:not([hidden]) {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 24;
  width: min(430px, 100%);
  margin: 0;
  padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
  border: 1px solid var(--border);
  border-radius: 26px 26px 0 0;
  background: #ffffff;
  box-shadow: 0 -24px 70px rgba(15, 23, 42, 0.18);
  transform: translateX(-50%);
  animation: sheetUp 180ms ease both;
}

.roadmap-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.roadmap-form input {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  font-size: 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.roadmap-form input:focus {
  border-color: rgba(79, 70, 229, 0.45);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.privacy-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
  text-align: center;
}

.lead-success {
  display: grid;
  gap: 12px;
  text-align: center;
}

.lead-success h3 {
  margin: 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.25;
}

.lead-success p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
}

.consultant-box {
  margin-top: 4px;
  padding: 16px;
  border: 1px solid rgba(6, 182, 212, 0.24);
  border-radius: 18px;
  background: #ecfeff;
}

.consultant-box strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.consultant-card {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(6, 182, 212, 0.24);
  border-radius: 18px;
  background: #ecfeff;
  color: var(--text);
}

.consultant-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.consultant-card strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  font-weight: 900;
}

.consultant-card p {
  margin: 4px 0 0;
}

.form-state {
  min-height: 24px;
  margin: 12px 0 0 !important;
  color: var(--primary) !important;
  font-weight: 900 !important;
}

.share-card-wrap {
  padding: 10px;
  background: #ffffff;
}

#shareCanvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
  background: #ffffff;
  object-fit: contain;
  object-position: center;
}

.share-panel h3 {
  font-size: 28px;
  line-height: 1.18;
}

.invite-box {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #f8fafc;
}

.invite-box p {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.invite-box .ghost-button {
  width: 100%;
}

.reveal-item,
[data-reveal] {
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  transition: opacity 360ms cubic-bezier(0.22, 1, 0.36, 1), transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-item.is-visible,
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 30;
  width: min(370px, calc(100% - 28px));
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  color: var(--text);
  box-shadow: var(--shadow);
  font-weight: 900;
  text-align: center;
  transform: translateX(-50%);
  animation: toastIn 180ms ease both;
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes quickSwap {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.65;
    transform: scale(0.985);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

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

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

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

@media (min-width: 760px) {
  .app-shell {
    width: min(100% - 48px, 1040px);
  }

  .hero-copy {
    max-width: 620px;
  }

  .hero-copy h1 {
    font-size: clamp(58px, 7vw, 92px);
  }

  .hero-actions,
  .hero-meta,
  .share-actions {
    max-width: 430px;
  }

  .quiz-card,
  .analysis-box {
    width: min(720px, 100%);
    margin-left: auto;
    margin-right: auto;
    padding: 36px;
  }

  .option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .option-card {
    min-height: 132px;
  }

  .result-hero {
    grid-template-columns: minmax(340px, 0.88fr) minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    margin-top: 38px;
  }

  .character-stage {
    min-height: 600px;
    padding: 46px 30px 34px;
  }

  .character-image-wrap {
    min-height: 500px;
    padding: 38px 22px 26px;
  }

  .character-png,
  .character-svg,
  .character-image {
    max-width: 480px;
    max-height: 520px;
  }

  .fit-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .glass-panel.wide {
    grid-column: 1 / -1;
  }

  .roadmap-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .roadmap-form:not([hidden]) {
    width: min(560px, calc(100% - 48px));
    border-radius: 26px;
    bottom: 24px;
    padding: 24px;
  }

  .roadmap-form button {
    grid-column: 1 / -1;
  }

  .share-layout {
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
    align-items: center;
    gap: 22px;
  }
}

@media (max-width: 480px) {
  .character-stage {
    min-height: 500px;
    padding: 36px 16px 26px;
  }

  .character-image-wrap {
    min-height: 410px;
    padding: 32px 12px 20px;
  }

  .character-png,
  .character-svg,
  .character-image {
    max-width: 330px;
    max-height: 410px;
    object-fit: contain;
    object-position: center;
  }
}

@media (max-width: 360px) {
  .app-shell {
    width: min(100% - 18px, 430px);
  }

  .hero-copy h1 {
    font-size: 40px;
  }

  .hero-pretitle {
    font-size: 24px;
  }

  .hero-meta {
    grid-template-columns: 1fr;
  }

  .character-stage {
    min-height: 470px;
    padding: 34px 16px 24px;
  }

  .character-image-wrap {
    min-height: 390px;
    padding: 30px 10px 18px;
  }

  .character-png,
  .character-svg,
  .character-image {
    max-width: 300px;
    max-height: 390px;
  }
}
