:root {
  color-scheme: dark;
  --bg: #101318;
  --panel: #1d222b;
  --panel-strong: #252b36;
  --line: rgba(255, 248, 236, 0.18);
  --text: #fff8ec;
  --muted: #d4c8b9;
  --soft: #9fa8b6;
  --amber: #f4bf4f;
  --coral: #ef6f5e;
  --mint: #58d6b2;
  --cyan: #5eb8e9;
  --violet: #9b85f5;
  --paper: #fff1d6;
  --ink: #151921;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background:
    linear-gradient(138deg, rgba(94, 184, 233, 0.2) 0 18%, transparent 18% 100%),
    linear-gradient(28deg, transparent 0 60%, rgba(244, 191, 79, 0.16) 60% 72%, transparent 72%),
    linear-gradient(150deg, #101318 0%, #17151b 48%, #10202a 100%),
    var(--bg);
}

body {
  min-width: 280px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui,
    -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0;
  background-image:
    linear-gradient(90deg, rgba(255, 248, 236, 0.035) 1px, transparent 1px),
    linear-gradient(rgba(255, 248, 236, 0.026) 1px, transparent 1px);
  background-size: 34px 34px;
}

button,
input {
  font: inherit;
}

img {
  max-width: 100%;
}

button {
  min-height: 44px;
  border: 0;
  cursor: pointer;
}

.fx-particle {
  position: fixed;
  left: var(--x);
  top: var(--y);
  z-index: 80;
  width: 7px;
  height: 7px;
  pointer-events: none;
  background: var(--particle-color);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  filter: drop-shadow(0 0 8px var(--particle-color));
  animation: particle-burst 620ms ease-out forwards;
}

.fx-particle--choice {
  width: 8px;
  height: 8px;
}

.fx-particle--reveal {
  width: 10px;
  height: 10px;
  animation-duration: 780ms;
}

.exp-orb,
.exp-trail,
.exp-impact {
  position: fixed;
  z-index: 85;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.exp-orb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 32%, #fff8ec 0 18%, #f4bf4f 19% 45%, #58d6b2 46% 78%, transparent 79%),
    var(--amber);
  box-shadow:
    0 0 12px rgba(244, 191, 79, 0.86),
    0 0 26px rgba(88, 214, 178, 0.46);
  animation: exp-orb-spin 360ms linear infinite;
}

.exp-trail {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 12px rgba(88, 214, 178, 0.7);
  animation: exp-trail-fade 480ms ease-out forwards;
}

.exp-impact {
  width: 8px;
  height: 8px;
  background: var(--amber);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  filter: drop-shadow(0 0 8px rgba(244, 191, 79, 0.86));
  animation: exp-impact-burst 520ms ease-out forwards;
}

button:focus-visible,
.option-button:focus-visible {
  outline: 3px solid rgba(94, 184, 233, 0.55);
  outline-offset: 3px;
}

.app {
  width: 100%;
  max-width: 1080px;
  width: min(100%, 1080px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.screen {
  width: 100%;
}

.site-footer {
  width: 100%;
  margin-top: 10px;
  padding: 18px 4px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 0.8rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.site-footer a {
  min-height: 36px;
  padding: 0 12px;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(244, 191, 79, 0.5);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(244, 191, 79, 0.04);
  font-weight: 760;
  text-decoration: none;
  transition:
    transform 150ms ease,
    color 150ms ease,
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--amber);
  border-color: var(--amber);
  background: rgba(244, 191, 79, 0.1);
  box-shadow: 0 0 18px rgba(244, 191, 79, 0.16);
  transform: translateY(-1px);
  text-decoration: none;
}

.site-nav {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 12px;
  z-index: 10;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 248, 236, 0.09), rgba(255, 248, 236, 0.035)),
    rgba(16, 19, 24, 0.86);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.site-nav__brand,
.nav-link,
.type-picker {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.site-nav__brand {
  min-width: 74px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink);
  background: var(--amber);
  font-weight: 950;
}

.site-nav__mark {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
  filter: brightness(0) saturate(100%);
}

.site-nav__brand-text {
  line-height: 1;
}

.site-nav__links {
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}

.nav-link {
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  font-weight: 820;
  white-space: nowrap;
}

.nav-link__short {
  display: none;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 248, 236, 0.07);
}

.site-nav__brand.is-active {
  filter: brightness(1.06);
}

.type-picker-label {
  width: 202px;
  min-height: 40px;
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  justify-self: end;
  position: relative;
  padding: 0 12px 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--soft);
  background:
    linear-gradient(135deg, rgba(255, 248, 236, 0.08), rgba(255, 248, 236, 0.025)),
    rgba(16, 19, 24, 0.78);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.type-picker-label:focus-within {
  outline: 3px solid rgba(94, 184, 233, 0.55);
  outline-offset: 3px;
}

.type-picker-icon {
  width: 17px;
  height: 14px;
  flex: 0 0 auto;
  display: block;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 6px / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 12px / 100% 2px no-repeat;
}

.type-picker-text {
  color: var(--text);
  line-height: 1;
  white-space: nowrap;
}

.type-picker {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.hero {
  display: grid;
  gap: 18px;
}

.hero__stage {
  min-height: 330px;
  padding: 24px;
  padding: clamp(20px, 4vw, 34px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.76fr);
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(244, 191, 79, 0.22) 0 26%, transparent 26%),
    linear-gradient(216deg, rgba(94, 184, 233, 0.24) 0 28%, transparent 28%),
    linear-gradient(160deg, rgba(88, 214, 178, 0.2), rgba(239, 111, 94, 0.09) 48%, transparent 48%),
    var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  isolation: isolate;
}

.hero__stage::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  z-index: 0;
  opacity: 0.72;
  background:
    linear-gradient(42deg, transparent 0 38%, rgba(255, 248, 236, 0.08) 38% 39%, transparent 39%),
    linear-gradient(132deg, transparent 0 54%, rgba(255, 248, 236, 0.1) 54% 55%, transparent 55%),
    linear-gradient(90deg, rgba(255, 248, 236, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(255, 248, 236, 0.04) 1px, transparent 1px);
  background-size: auto, auto, 28px 28px, 28px 28px;
  animation: menu-grid-drift 9s linear infinite;
}

.hero__stage::after {
  content: "";
  position: absolute;
  z-index: 0;
  right: clamp(20px, 5vw, 64px);
  bottom: 26px;
  width: 42%;
  max-width: 340px;
  width: min(42%, 340px);
  height: 56px;
  background:
    linear-gradient(90deg, rgba(21, 25, 33, 0.35), rgba(21, 25, 33, 0.03)),
    rgba(244, 191, 79, 0.38);
  clip-path: polygon(9% 0, 100% 18%, 90% 100%, 0 82%);
  filter: blur(0.2px);
}

.hero__copy {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  width: min(100%, 640px);
}

.hero__gallery {
  min-height: 290px;
  position: relative;
  z-index: 1;
}

.hero-avatar {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 248, 236, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 248, 236, 0.12), rgba(255, 248, 236, 0.02)),
    rgba(16, 19, 24, 0.32);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  transform: rotate(var(--tilt, 0deg));
  animation: avatar-idle 4.6s ease-in-out infinite;
  animation-delay: var(--idle-delay, 0ms);
}

.hero-avatar::before {
  content: "";
  position: absolute;
  inset: 10px;
  opacity: 0.36;
  background:
    linear-gradient(135deg, transparent 0 42%, rgba(255, 248, 236, 0.26) 42% 43%, transparent 43%),
    linear-gradient(45deg, rgba(244, 191, 79, 0.22), transparent 58%);
  clip-path: polygon(0 0, 100% 8%, 88% 100%, 8% 84%);
}

.hero-avatar__picture {
  position: relative;
  z-index: 1;
  width: 105%;
  height: 105%;
  display: block;
}

.hero-avatar__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.34));
}

.hero-avatar--front {
  --tilt: -3deg;
  --idle-delay: -900ms;
  right: 22%;
  bottom: 8px;
  width: 210px;
  height: 210px;
  aspect-ratio: 1;
}

.hero-avatar--back {
  --tilt: 4deg;
  --idle-delay: -1800ms;
  right: 0;
  top: 10px;
  width: 184px;
  height: 184px;
  aspect-ratio: 1;
}

.hero-avatar--side {
  --tilt: 6deg;
  --idle-delay: -300ms;
  left: 4px;
  bottom: 30px;
  width: 156px;
  height: 156px;
  aspect-ratio: 1;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 800;
}

.hero__title {
  margin: 0;
  font-size: 4rem;
  font-size: clamp(2.15rem, 13vw, 4.9rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero__subtitle {
  max-width: 34rem;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.hero-command-bar {
  width: fit-content;
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-command {
  min-height: 34px;
  padding: 0 12px;
  position: relative;
  overflow: hidden;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(244, 191, 79, 0.5);
  border-radius: var(--radius);
  color: var(--amber);
  background: rgba(16, 19, 24, 0.42);
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: 0 0 18px rgba(244, 191, 79, 0.13);
  animation: command-pulse 1.8s ease-in-out infinite;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.hero-command:hover {
  border-color: rgba(244, 191, 79, 0.86);
  background: rgba(244, 191, 79, 0.12);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(244, 191, 79, 0.18), 0 0 24px rgba(244, 191, 79, 0.18);
}

.hero__meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.meta-chip {
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 248, 236, 0.075), rgba(255, 248, 236, 0.025)),
    rgba(29, 34, 43, 0.78);
}

.meta-chip strong,
.meta-chip span {
  display: block;
}

.meta-chip strong {
  color: var(--text);
  font-size: 1.1rem;
}

.meta-chip span {
  margin-top: 5px;
  color: var(--soft);
  font-size: 0.83rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 248, 236, 0.075), rgba(255, 248, 236, 0.03)),
    rgba(29, 34, 43, 0.94);
  box-shadow: var(--shadow);
}

.intro-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.intro-card--highlighted {
  animation: start-menu-highlight 1.25s ease-out;
}

.menu-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.menu-title span,
.quiz-option em {
  color: var(--soft);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.menu-title strong {
  color: var(--text);
  font-size: 1.08rem;
}

.quiz-length-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.quiz-option {
  min-height: 156px;
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 9px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background:
    linear-gradient(140deg, rgba(255, 248, 236, 0.09) 0 34%, transparent 34%),
    rgba(255, 248, 236, 0.055);
  text-align: left;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.quiz-option::before,
.button::before,
.option-button::before,
.hero-command::before,
.site-footer a::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(110deg, transparent 0 34%, rgba(255, 248, 236, 0.32) 45%, transparent 58%);
  transform: translateX(-120%);
}

.quiz-option:hover {
  border-color: rgba(94, 184, 233, 0.68);
  background: rgba(94, 184, 233, 0.11);
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(94, 184, 233, 0.18), 0 18px 34px rgba(94, 184, 233, 0.12);
}

.quiz-option:hover::before,
.button:hover::before,
.option-button:hover::before,
.hero-command:hover::before,
.site-footer a:hover::before,
.quiz-option.is-pressed::before,
.button.is-pressed::before,
.option-button.is-pressed::before,
.hero-command.is-pressed::before,
.site-footer a.is-pressed::before {
  opacity: 1;
  animation: light-sweep 520ms ease-out;
}

.quiz-option--recommended {
  border-color: rgba(244, 191, 79, 0.82);
  background:
    linear-gradient(135deg, rgba(244, 191, 79, 0.18), rgba(88, 214, 178, 0.08)),
    rgba(255, 248, 236, 0.06);
  box-shadow: 0 0 0 1px rgba(244, 191, 79, 0.16);
}

.quiz-option.is-pressed,
.button.is-pressed,
.option-button.is-pressed,
.site-footer a.is-pressed {
  animation: command-press 260ms ease-out;
}

.quiz-option__label {
  width: fit-content;
  padding: 5px 7px;
  border-radius: var(--radius);
  color: #161312;
  background: var(--mint);
  font-size: 0.75rem;
  font-weight: 900;
}

.quiz-option--recommended .quiz-option__label {
  background: var(--amber);
}

.quiz-option strong {
  display: block;
  color: var(--text);
  font-size: 1.16rem;
  line-height: 1.2;
}

.quiz-option span:last-child {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  padding: 0 18px;
  border-radius: var(--radius);
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent 42%),
    var(--amber);
  font-weight: 850;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.16);
  transition:
    transform 150ms ease,
    filter 150ms ease,
    box-shadow 150ms ease;
}

.button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    inset 0 -2px 0 rgba(0, 0, 0, 0.16),
    0 0 22px rgba(244, 191, 79, 0.2);
}

.button:disabled,
.button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.58;
  filter: grayscale(0.25);
}

.button--secondary {
  color: var(--text);
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255, 248, 236, 0.09), rgba(255, 248, 236, 0.035)),
    rgba(16, 19, 24, 0.34);
  box-shadow: none;
}

.quiz-shell {
  display: grid;
  gap: 14px;
  animation: screen-enter 300ms ease-out both;
}

.quiz-shell.is-advancing .question-card {
  animation: question-exit 280ms ease-in both;
}

.progress {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(88, 214, 178, 0.08), rgba(244, 191, 79, 0.055)),
    rgba(16, 19, 24, 0.42);
}

.progress__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 850;
}

.progress__level {
  color: var(--amber);
}

.progress__bar {
  height: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(90deg, rgba(255, 248, 236, 0.08) 0 2px, transparent 2px 18px),
    rgba(255, 248, 236, 0.07);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.28);
}

.progress__fill {
  width: 0%;
  height: 100%;
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.22), transparent 35%),
    linear-gradient(90deg, var(--mint), var(--amber), var(--coral), var(--violet));
  transition: width 340ms cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 0 20px rgba(88, 214, 178, 0.24);
}

.progress__fill.is-gaining {
  animation: exp-gain 420ms ease-out;
}

.progress__glint {
  position: absolute;
  inset: 1px auto 1px 0;
  width: 34%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 248, 236, 0.5), transparent);
  transform: translateX(-120%);
  animation: exp-glint 2.2s ease-in-out infinite;
}

.progress__gain {
  min-height: 18px;
  color: var(--mint);
  font-size: 0.78rem;
  font-weight: 900;
  opacity: 0;
  transform: translateY(4px);
}

.progress__gain.is-visible {
  animation: exp-text-pop 520ms ease-out both;
}

.question-card {
  padding: 18px;
  animation: question-enter 320ms ease-out both;
}

.question-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.question-number {
  color: var(--amber);
  font-weight: 850;
}

.question-dimension {
  color: var(--soft);
  font-size: 0.86rem;
}

.question-text {
  min-height: 7.5rem;
  margin: 0 0 18px;
  font-size: clamp(1.38rem, 7vw, 2.35rem);
  font-weight: 850;
  line-height: 1.28;
}

.option-list {
  display: grid;
  gap: 10px;
}

.option-button {
  width: 100%;
  min-height: 54px;
  padding: 11px 12px;
  display: grid;
  gap: 8px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255, 248, 236, 0.07), rgba(255, 248, 236, 0.018)),
    rgba(255, 248, 236, 0.045);
  text-align: left;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
  animation: option-enter 260ms ease-out both;
}

.option-button:nth-child(1) {
  animation-delay: 20ms;
}

.option-button:nth-child(2) {
  animation-delay: 60ms;
}

.option-button:nth-child(3) {
  animation-delay: 100ms;
}

.option-button:nth-child(4) {
  animation-delay: 140ms;
}

.option-button:nth-child(5) {
  animation-delay: 180ms;
}

.option-button:hover,
.option-button.is-selected {
  border-color: rgba(244, 191, 79, 0.78);
  background: rgba(244, 191, 79, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(244, 191, 79, 0.2), 0 14px 28px rgba(244, 191, 79, 0.12);
}

.option-button.is-confirming {
  animation: upgrade-confirm 360ms ease-out both;
}

.option-button__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.option-button__label {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 780;
}

.option-button__score {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #151414;
  background: var(--mint);
  font-size: 0.86rem;
  font-weight: 900;
  box-shadow: 0 0 14px rgba(88, 214, 178, 0.28);
}

.option-button__rarity {
  color: var(--amber);
  color: color-mix(in srgb, var(--amber) 75%, white 10%);
  font-size: 0.72rem;
  letter-spacing: 3px;
  line-height: 1;
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.result-card {
  display: grid;
  gap: 18px;
  position: relative;
  animation: screen-enter 320ms ease-out both;
}

.result-card.is-revealing .result-hero {
  animation: result-hero-reveal 980ms 1800ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.result-card.is-revealing .result-body {
  animation: result-body-reveal 720ms 2300ms ease-out both;
}

.result-reveal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 1000;
  display: grid;
  place-items: center;
  pointer-events: none;
  background:
    radial-gradient(circle at center, rgba(244, 191, 79, 0.24), transparent 34%),
    rgba(16, 19, 24, 0.72);
  animation: reveal-overlay 3.2s ease-out both;
}

.result-reveal__panel {
  display: grid;
  gap: 16px;
  justify-items: center;
  color: var(--text);
  text-align: center;
  transform: translateZ(0);
}

.result-reveal__panel span {
  color: var(--amber);
  font-size: 1.2rem;
  font-size: clamp(1rem, 3.4vw, 1.45rem);
  font-weight: 950;
  letter-spacing: 0.1em;
  text-shadow: 0 0 20px rgba(244, 191, 79, 0.48);
}

.result-reveal__panel strong {
  display: flex;
  gap: 8px;
  font-size: 5rem;
  font-size: clamp(3rem, 18vw, 7rem);
  line-height: 1;
}

.result-reveal__panel b,
.result-code__letters b {
  display: inline-block;
  font-style: normal;
  animation: letter-unlock 520ms calc(var(--letter-index) * 90ms) ease-out both;
}

.result-hero {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1fr);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(29, 34, 43, 0.96);
  background:
    linear-gradient(140deg, color-mix(in srgb, var(--result-accent) 26%, transparent) 0 26%, transparent 26%),
    linear-gradient(28deg, transparent 0 56%, color-mix(in srgb, var(--result-accent-2) 18%, transparent) 56% 72%, transparent 72%),
    linear-gradient(160deg, rgba(255, 248, 236, 0.08), rgba(255, 248, 236, 0.03)),
    rgba(29, 34, 43, 0.96);
  box-shadow: var(--shadow);
}

.result-hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(34deg, transparent 0 45%, rgba(255, 248, 236, 0.08) 45% 46%, transparent 46%),
    linear-gradient(116deg, transparent 0 62%, rgba(255, 248, 236, 0.1) 62% 63%, transparent 63%),
    linear-gradient(90deg, rgba(255, 248, 236, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(255, 248, 236, 0.034) 1px, transparent 1px);
  background-size: auto, auto, 30px 30px, 30px 30px;
}

.result-copy {
  min-width: 0;
  position: relative;
  z-index: 1;
  padding: 30px;
  padding: clamp(22px, 4vw, 38px);
  display: grid;
  align-content: center;
  gap: 16px;
}

.result-code {
  width: fit-content;
  min-height: 58px;
  padding: 6px 15px 6px 6px;
  display: inline-flex;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--result-accent);
  border: 1px solid color-mix(in srgb, var(--result-accent) 86%, white 18%);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(16, 19, 24, 0.82);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--result-accent) 34%, transparent), rgba(255, 248, 236, 0.08)),
    rgba(16, 19, 24, 0.74);
  font-weight: 950;
  letter-spacing: 0;
  box-shadow: 0 0 24px rgba(94, 184, 233, 0.2);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--result-accent) 24%, transparent),
    0 0 28px color-mix(in srgb, var(--result-accent) 22%, transparent);
}

.result-code > span:first-child {
  min-height: 40px;
  padding: 0 10px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  color: var(--ink);
  background: var(--result-accent);
  font-size: 0.74rem;
  font-weight: 950;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}

.result-code__letters {
  display: inline-flex !important;
  gap: 5px;
  min-height: 0 !important;
  padding: 0 !important;
  color: var(--text) !important;
  background: transparent !important;
  font-size: 1.8rem;
  font-size: clamp(1.45rem, 4.4vw, 2.25rem);
  line-height: 1;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
  text-shadow:
    0 0 10px color-mix(in srgb, var(--result-accent) 72%, transparent),
    0 2px 0 rgba(0, 0, 0, 0.3);
}

.result-code__letters b {
  color: var(--text);
}

.result-title {
  margin: 0;
  max-width: 8em;
  font-size: 3.4rem;
  font-size: clamp(2.35rem, 9vw, 4.85rem);
  line-height: 0.98;
  letter-spacing: 0;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.result-summary {
  margin: 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.8;
  overflow-wrap: break-word;
}

.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(255, 248, 236, 0.08), rgba(255, 248, 236, 0.025)),
    rgba(16, 19, 24, 0.24);
  font-size: 0.84rem;
}

.result-image-wrap {
  min-height: 520px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: var(--panel-strong);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--result-accent) 34%, transparent) 0 32%, transparent 32%),
    linear-gradient(28deg, transparent 0 58%, color-mix(in srgb, var(--result-accent-2) 28%, transparent) 58% 76%, transparent 76%),
    linear-gradient(215deg, color-mix(in srgb, var(--result-accent-3) 22%, transparent), transparent 48%),
    var(--panel-strong);
  isolation: isolate;
}

.result-image-wrap::before {
  content: "";
  position: absolute;
  top: 20px;
  right: 20px;
  bottom: 20px;
  left: 20px;
  inset: 20px;
  z-index: 0;
  border: 1px solid rgba(255, 248, 236, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 248, 236, 0.12), transparent 43%),
    linear-gradient(45deg, transparent 0 48%, rgba(255, 248, 236, 0.1) 48% 49%, transparent 49%),
    rgba(255, 248, 236, 0.035);
  clip-path: polygon(8% 0, 100% 6%, 92% 100%, 0 86%);
}

.result-image-wrap::after {
  content: "";
  position: absolute;
  top: 48px;
  right: 42px;
  bottom: 48px;
  left: 42px;
  inset: 48px 42px;
  z-index: 0;
  opacity: 0.48;
  background:
    linear-gradient(90deg, rgba(255, 248, 236, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(255, 248, 236, 0.1) 1px, transparent 1px);
  background-size: 26px 26px;
  clip-path: polygon(0 12%, 92% 0, 100% 86%, 10% 100%);
}

.result-image-platform {
  position: absolute;
  left: 17%;
  right: 11%;
  bottom: 48px;
  height: 68px;
  z-index: 1;
  background: var(--result-accent-3);
  background:
    linear-gradient(90deg, rgba(16, 19, 24, 0.34), rgba(16, 19, 24, 0.05)),
    color-mix(in srgb, var(--result-accent-3) 55%, var(--paper) 28%);
  clip-path: polygon(7% 0, 100% 22%, 90% 100%, 0 76%);
  box-shadow: 0 22px 36px rgba(0, 0, 0, 0.22);
}

.result-picture {
  position: relative;
  z-index: 2;
  width: 96%;
  max-width: 520px;
  height: 500px;
  max-height: 520px;
  width: min(96%, 520px);
  height: min(96%, 520px);
  display: grid;
  place-items: center;
}

.result-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
  display: none;
  filter: drop-shadow(0 24px 22px rgba(0, 0, 0, 0.34));
}

.result-image.is-loaded {
  display: block;
}

.result-image-wrap.has-image .image-placeholder {
  display: none;
}

.image-placeholder {
  position: relative;
  z-index: 1;
  width: 78%;
  max-width: 320px;
  min-height: 280px;
  width: min(78%, 320px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 22px;
  border: 1px solid rgba(255, 248, 236, 0.2);
  border-radius: var(--radius);
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(244, 191, 79, 0.2), rgba(88, 214, 178, 0.1)),
    rgba(21, 20, 20, 0.6);
  text-align: center;
}

.image-placeholder strong,
.image-placeholder span {
  display: block;
}

.image-placeholder strong {
  font-size: clamp(2.5rem, 15vw, 5rem);
  line-height: 1;
}

.image-placeholder span {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.result-body {
  display: grid;
  gap: 16px;
  padding: 0;
}

.section-title {
  margin: 0 0 10px;
  font-size: 1rem;
}

.analysis-panel,
.representative-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(29, 34, 43, 0.84);
  background:
    linear-gradient(132deg, color-mix(in srgb, var(--result-accent) 12%, transparent), transparent 42%),
    linear-gradient(35deg, rgba(255, 248, 236, 0.07), rgba(255, 248, 236, 0.025)),
    rgba(29, 34, 43, 0.84);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.analysis-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.86;
}

.primary-game {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border: 1px solid color-mix(in srgb, var(--result-accent) 46%, transparent);
  border-radius: var(--radius);
  background: rgba(16, 19, 24, 0.34);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--result-accent) 24%, transparent), rgba(255, 248, 236, 0.05)),
    rgba(16, 19, 24, 0.34);
}

.primary-game span {
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.primary-game strong {
  color: var(--text);
  font-size: 1.5rem;
  font-size: clamp(1.28rem, 4vw, 1.8rem);
  line-height: 1.2;
}

.game-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.score-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(255, 248, 236, 0.075), rgba(255, 248, 236, 0.026)),
    rgba(29, 34, 43, 0.82);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.score-item__head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.88rem;
}

.score-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.score-side {
  display: grid;
  gap: 6px;
}

.score-side--right {
  text-align: right;
}

.score-side strong {
  color: var(--text);
  font-size: 1.02rem;
}

.score-side span {
  color: var(--soft);
  font-size: 0.82rem;
}

.score-vs {
  color: var(--soft);
  font-size: 0.78rem;
}

.split-bar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: var(--left, 50%) 1fr;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 248, 236, 0.1);
}

.split-bar span:first-child {
  background: var(--mint);
}

.split-bar span:last-child {
  background: var(--coral);
}

.notice {
  margin: 0;
  color: var(--soft);
  font-size: 0.82rem;
  line-height: 1.6;
}

.directory-head {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(132deg, rgba(94, 184, 233, 0.16), transparent 42%),
    linear-gradient(35deg, rgba(244, 191, 79, 0.13), rgba(255, 248, 236, 0.025)),
    rgba(29, 34, 43, 0.84);
  box-shadow: var(--shadow);
}

.directory-head h1 {
  margin: 0;
  font-size: 3rem;
  font-size: clamp(2.2rem, 8vw, 4rem);
  line-height: 1;
}

.directory-head p {
  max-width: 42rem;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.personality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 236px), 1fr));
  gap: 12px;
}

.personality-card {
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(29, 34, 43, 0.88);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--result-accent) 16%, transparent) 0 36%, transparent 36%),
    linear-gradient(30deg, transparent 0 55%, color-mix(in srgb, var(--result-accent-2) 14%, transparent) 55% 74%, transparent 74%),
    rgba(29, 34, 43, 0.88);
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
}

.personality-card a {
  min-height: inherit;
  padding: 12px;
  display: grid;
  align-content: start;
  justify-items: stretch;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.personality-card__picture {
  position: relative;
  width: 100%;
  max-width: 224px;
  height: 224px;
  width: min(100%, 224px);
  justify-self: center;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 248, 236, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 248, 236, 0.1), rgba(255, 248, 236, 0.03)),
    rgba(16, 19, 24, 0.28);
}

.personality-card__image {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 112%;
  height: auto;
  max-width: none;
  display: block;
  margin: 0;
  object-fit: contain;
  object-position: center center;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 16px 14px rgba(0, 0, 0, 0.3));
}

.personality-card .result-code {
  min-height: 34px;
  padding: 4px 8px 4px 4px;
  gap: 7px;
  font-size: 0.82rem;
  box-shadow: none;
}

.personality-card .result-code span {
  min-height: 24px;
  font-size: 0.58rem;
}

.personality-card strong {
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.25;
}

.personality-card p {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}

.share-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.68fr);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(29, 34, 43, 0.84);
  background:
    linear-gradient(132deg, color-mix(in srgb, var(--result-accent-2) 12%, transparent), transparent 42%),
    linear-gradient(35deg, rgba(255, 248, 236, 0.07), rgba(255, 248, 236, 0.025)),
    rgba(29, 34, 43, 0.84);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.share-panel__copy {
  display: grid;
  align-content: start;
  gap: 12px;
}

.share-panel__copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.share-url {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--soft);
  background: rgba(16, 19, 24, 0.34);
  font-size: 0.82rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.share-status {
  min-height: 1.5em;
  color: var(--amber) !important;
  font-weight: 820;
}

.analytics-notice {
  font-size: 0.82rem;
  opacity: 0.82;
}

.share-panel__visual {
  display: grid;
  grid-template-columns: minmax(112px, 0.52fr) minmax(150px, 1fr);
  align-items: stretch;
  gap: 12px;
}

.qr-card {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 19, 24, 0.32);
  text-align: center;
}

.qr-code {
  width: 100%;
  max-width: 180px;
  height: 180px;
  width: min(100%, 180px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 8px;
  border-radius: var(--radius);
  background: var(--text);
}

.qr-code svg {
  width: 100%;
  height: 100%;
  display: block;
}

.qr-card span {
  color: var(--soft);
  font-size: 0.8rem;
}

.poster-preview {
  position: relative;
  display: grid;
  min-height: 0;
}

.poster-canvas {
  width: 100%;
  max-height: 310px;
  aspect-ratio: 18 / 25;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101318;
  object-fit: contain;
}

.poster-loading {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(16, 19, 24, 0.74);
  text-align: center;
  font-size: 0.86rem;
  font-weight: 850;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255, 248, 236, 0.22);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes particle-burst {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.65) rotate(0deg);
  }

  100% {
    opacity: 0;
    transform: translate(calc(var(--tx) - 50%), calc(var(--ty) - 50%)) scale(0.15) rotate(180deg);
  }
}

@keyframes exp-orb-spin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg) scale(0.92);
  }

  50% {
    transform: translate(-50%, -50%) rotate(180deg) scale(1.08);
  }

  100% {
    transform: translate(-50%, -50%) rotate(360deg) scale(0.92);
  }
}

@keyframes exp-trail-fade {
  0% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(calc(var(--trail-x) - 50%), calc(var(--trail-y) - 50%)) scale(0.15);
  }
}

@keyframes exp-impact-burst {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.9) rotate(0deg);
  }

  100% {
    opacity: 0;
    transform: translate(calc(var(--impact-x) - 50%), calc(var(--impact-y) - 50%)) scale(0.1) rotate(160deg);
  }
}

@keyframes light-sweep {
  0% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(120%);
  }
}

@keyframes command-press {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  45% {
    transform: translateY(1px) scale(0.985);
  }
}

@keyframes menu-grid-drift {
  0% {
    background-position: 0 0, 0 0, 0 0, 0 0;
  }

  100% {
    background-position: 0 0, 0 0, 28px 28px, 28px 28px;
  }
}

@keyframes avatar-idle {
  0%,
  100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -8px;
  }
}

@keyframes command-pulse {
  0%,
  100% {
    opacity: 0.74;
    box-shadow: 0 0 12px rgba(244, 191, 79, 0.12);
  }

  50% {
    opacity: 1;
    box-shadow: 0 0 24px rgba(244, 191, 79, 0.24);
  }
}

@keyframes start-menu-highlight {
  0% {
    border-color: rgba(244, 191, 79, 0.55);
    box-shadow: var(--shadow);
    transform: translateY(0) scale(1);
  }

  18% {
    border-color: rgba(244, 191, 79, 0.95);
    box-shadow:
      0 0 0 2px rgba(244, 191, 79, 0.24),
      0 0 34px rgba(244, 191, 79, 0.35),
      0 18px 42px rgba(94, 184, 233, 0.16);
    transform: translateY(-2px) scale(1.006);
  }

  100% {
    border-color: var(--line);
    box-shadow: var(--shadow);
    transform: translateY(0) scale(1);
  }
}

@keyframes screen-enter {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.992);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes question-enter {
  0% {
    opacity: 0;
    transform: translateX(28px) scale(0.985);
  }

  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes question-exit {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateX(-24px) scale(0.985);
  }
}

@keyframes option-enter {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes upgrade-confirm {
  0%,
  100% {
    transform: translateY(-2px) scale(1);
  }

  45% {
    transform: translateY(-2px) scale(1.018);
    box-shadow: 0 0 0 1px rgba(244, 191, 79, 0.28), 0 0 34px rgba(244, 191, 79, 0.3);
  }
}

@keyframes exp-gain {
  0%,
  100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.35);
  }
}

@keyframes exp-glint {
  0%,
  35% {
    transform: translateX(-120%);
  }

  65%,
  100% {
    transform: translateX(320%);
  }
}

@keyframes exp-text-pop {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }

  45% {
    opacity: 1;
    transform: translateY(-2px) scale(1.04);
  }

  100% {
    opacity: 0;
    transform: translateY(-10px) scale(1);
  }
}

@keyframes reveal-overlay {
  0% {
    opacity: 0;
    transform: scale(1.04);
  }

  10%,
  78% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes letter-unlock {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.7) rotate(-8deg);
    filter: blur(6px);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0deg);
    filter: blur(0);
  }
}

@keyframes result-hero-reveal {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.94);
    filter: brightness(1.5) blur(10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: brightness(1) blur(0);
  }
}

@keyframes result-body-reveal {
  0% {
    opacity: 0;
    transform: translateY(22px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .fx-particle,
  .exp-orb,
  .exp-trail,
  .exp-impact,
  .result-reveal {
    display: none;
  }
}

.is-hidden {
  display: none !important;
}

@media (max-width: 767px) {
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 2px 6px;
  }

  .site-footer__links {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: flex-start;
  }

  .site-footer a {
    min-width: 0;
    padding: 0 8px;
    white-space: nowrap;
  }

  .app {
    align-items: flex-start;
    padding: 12px;
  }

  .site-nav {
    width: 100%;
    max-width: 100%;
    min-height: 54px;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 6px;
    position: sticky;
    padding: 6px;
  }

  .site-nav__brand {
    width: 44px;
    min-width: 44px;
    padding: 0;
  }

  .site-nav__mark {
    width: 34px;
    height: 34px;
  }

  .site-nav__brand-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .site-nav__links {
    width: 100%;
    justify-self: center;
    justify-content: center;
    gap: 4px;
  }

  .nav-link {
    padding: 0 9px;
    font-size: 0.88rem;
  }

  .type-picker-label {
    width: 44px;
    min-height: 40px;
    grid-template-columns: 1fr;
    justify-self: end;
    justify-items: center;
    align-items: center;
    place-items: center;
    position: relative;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    background:
      linear-gradient(135deg, rgba(255, 248, 236, 0.08), rgba(255, 248, 236, 0.025)),
      rgba(16, 19, 24, 0.78);
  }

  .type-picker-label:focus-within {
    outline: 3px solid rgba(94, 184, 233, 0.55);
    outline-offset: 3px;
  }

  .type-picker-icon {
    width: 18px;
    height: 14px;
  }

  .type-picker-text {
    display: none;
  }

  .type-picker {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
  }

  .hero__stage {
    min-height: 560px;
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .hero__title {
    font-size: 2.8rem;
  }

  .hero__stage::after {
    width: 74%;
    height: 46px;
    right: 14px;
    bottom: 24px;
  }

  .hero__gallery {
    min-height: 265px;
  }

  .hero-avatar--front {
    right: 24%;
    width: 184px;
    height: 184px;
  }

  .hero-avatar--back {
    right: 0;
    width: 152px;
    height: 152px;
  }

  .hero-avatar--side {
    left: 0;
    width: 132px;
    height: 132px;
  }

  .hero__meta {
    grid-template-columns: 1fr;
  }

  .quiz-length-grid {
    grid-template-columns: 1fr;
  }

  .quiz-option {
    min-height: 118px;
  }

  .intro-card,
  .question-card {
    padding: 14px;
  }

  .question-text {
    min-height: 9.8rem;
  }

  .option-button {
    min-height: 58px;
  }

  .result-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .result-copy {
    padding: 18px;
  }

  .result-reveal__panel span {
    font-size: 1rem;
  }

  .result-reveal__panel strong {
    font-size: 3rem;
  }

  .result-title {
    font-size: 2.7rem;
  }

  .result-image-wrap {
    min-height: 320px;
    min-height: min(92vw, 430px);
    order: -1;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .result-image {
    width: 100%;
    height: 100%;
  }

  .result-picture {
    width: 94%;
    max-width: 410px;
    height: calc(94vw - 24px);
    max-height: 410px;
    width: min(94%, 410px);
    height: min(94%, 410px);
  }

  .result-image-platform {
    bottom: 32px;
    height: 48px;
  }

  .personality-grid {
    grid-template-columns: 1fr;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 10px;
  }

  .personality-card {
    min-height: 0;
  }

  .personality-card a {
    padding: 12px;
  }

  .personality-card__picture {
    width: 90%;
    max-width: 260px;
    height: 260px;
    width: min(90%, 260px);
  }

  .personality-card p {
    font-size: 0.86rem;
    line-height: 1.65;
  }

  .score-grid {
    grid-template-columns: 1fr;
  }

  .share-panel {
    grid-template-columns: 1fr;
  }

  .share-panel__visual {
    grid-template-columns: 1fr;
  }

  .qr-code {
    max-width: 210px;
    height: 210px;
    width: min(100%, 210px);
  }

  .poster-canvas {
    max-height: none;
  }

  .action-buttons,
  .quiz-nav {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }
}

@media (min-width: 768px) {
  .result-body {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    align-items: start;
  }

  .analysis-panel {
    grid-column: 1;
  }

  .representative-panel {
    grid-column: 2;
  }

  .result-body > section:not(.analysis-panel):not(.representative-panel),
  .result-body > .notice,
  .result-body > .action-buttons {
    grid-column: 1 / -1;
  }
}

@media (max-width: 390px) {
  .app {
    padding: 10px;
  }

  .nav-link--last-result .nav-link__full {
    display: none;
  }

  .nav-link--last-result .nav-link__short {
    display: inline;
  }

  .hero__stage {
    padding: 16px;
    min-height: 520px;
  }

  .hero__title {
    font-size: 2.45rem;
  }

  .hero-avatar--front {
    width: 166px;
    height: 166px;
  }

  .hero-avatar--back {
    width: 138px;
    height: 138px;
  }

  .hero-avatar--side {
    width: 118px;
    height: 118px;
  }

  .question-card__head,
  .progress__top {
    align-items: flex-start;
    flex-direction: column;
  }

  .question-text {
    font-size: 1.34rem;
  }

  .personality-grid {
    grid-template-columns: 1fr;
  }

  .personality-card a {
    padding: 10px;
  }

  .personality-card__picture {
    width: 84%;
    max-width: 252px;
    height: 252px;
    width: min(84%, 252px);
  }
}
