@import url("https://fonts.googleapis.com/css2?family=DotGothic16&display=swap");

:root {
  --ink: #4b3650;
  --muted: #8b718a;
  --line: #f6b8d6;
  --pink: #f58cc2;
  --pink-soft: #fff0f8;
  --cyan: #8bdff2;
  --cyan-soft: #eefcff;
  --violet: #c6a9ef;
  --yellow: #fff0a8;
  --white: #fffaff;
  --shadow: 0 18px 48px rgba(151, 114, 156, 0.13), 0 0 0 1px rgba(255, 255, 255, 0.78) inset;
  --heart-shadow: 0 10px 26px rgba(245, 140, 194, 0.2), 0 8px 22px rgba(139, 223, 242, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "DotGothic16", "MS Gothic", "Yu Gothic", monospace;
  line-height: 1.7;
  background:
    radial-gradient(circle at 16px 16px, rgba(245, 140, 194, 0.2) 0 2px, transparent 3px),
    radial-gradient(circle at 38px 34px, rgba(139, 223, 242, 0.22) 0 2px, transparent 3px),
    linear-gradient(90deg, rgba(245, 140, 194, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(139, 223, 242, 0.075) 1px, transparent 1px),
    linear-gradient(145deg, #fff 0%, #fff3fa 42%, #effcff 100%);
  background-size: 58px 58px, 58px 58px, 28px 28px, 28px 28px, auto;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(135deg, transparent 0 48%, rgba(255, 255, 255, 0.5) 48% 52%, transparent 52%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Ctext x='18' y='42' fill='%23f3aacd' fill-opacity='.26' font-size='18'%3E♡%3C/text%3E%3Ctext x='78' y='88' fill='%238bdff2' fill-opacity='.28' font-size='16'%3E♡%3C/text%3E%3C/svg%3E");
  content: "";
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.previous-game-pop {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 60;
  display: grid;
  gap: 1px;
  width: min(260px, calc(100vw - 28px));
  padding: 9px 12px;
  border: 1px solid rgba(255, 64, 92, 0.84);
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(17, 8, 14, 0.97), rgba(74, 7, 24, 0.94)),
    linear-gradient(90deg, rgba(255, 36, 68, 0.22) 1px, transparent 1px),
    linear-gradient(rgba(255, 36, 68, 0.16) 1px, transparent 1px);
  background-size: auto, 10px 10px, 10px 10px;
  color: #fff2f4;
  text-decoration: none;
  box-shadow: 0 16px 34px rgba(7, 0, 6, 0.46), 0 0 24px rgba(255, 36, 68, 0.28);
}

.previous-game-pop span {
  color: #ff5b75;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.previous-game-pop strong {
  color: #fff2f4;
  font-size: 15px;
  line-height: 1.25;
  text-shadow: 2px 2px 0 rgba(255, 36, 68, 0.55);
}

.previous-game-pop small {
  color: #ff9cab;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.35;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
}

.page-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 14px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 14px;
  background: linear-gradient(180deg, rgba(255, 250, 255, 0.96), rgba(255, 250, 255, 0));
  backdrop-filter: blur(10px);
}

.brand-mark {
  width: min(270px, 58vw);
  text-decoration: none;
}

.compact-credit {
  display: inline-flex;
  max-width: 240px;
  justify-content: flex-end;
  font-size: 12px;
  text-align: right;
}

.sound-toggle {
  display: inline-grid;
  place-items: center;
  width: auto;
  min-width: 108px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(245, 140, 194, 0.74);
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(238,252,255,.88));
  color: #c76da8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(245, 140, 194, 0.13);
}

.sound-toggle[aria-pressed="true"] {
  color: #7fb9ca;
  background: linear-gradient(145deg, #fff0f8, #eefcff);
}

.sound-toggle[aria-pressed="false"] {
  color: #c76da8;
  background: linear-gradient(145deg, #fffaff, #fff0f8);
}

.credit-link {
  color: #5e277e;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgba(255, 93, 171, 0.45);
  text-underline-offset: 4px;
}

.screen {
  display: none;
}

.screen.is-active {
  display: block;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.result-reveal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 44%, rgba(255,255,255,1) 0 24%, rgba(255,247,252,.98) 46%, rgba(238,252,255,.96) 100%);
  opacity: 0;
}

.result-reveal.is-playing {
  display: grid;
  animation: resultRevealFade 1800ms cubic-bezier(.2,.7,.2,1) both;
}

.result-reveal.is-heartbeat {
  display: grid;
  pointer-events: auto;
  opacity: 1;
  animation: heartbeatMist 3000ms ease both;
}

.heartbeat-stage {
  display: none;
  place-items: center;
  gap: 8px;
  padding: 28px;
  text-align: center;
  color: #b469a2;
}

.result-reveal.is-heartbeat .heartbeat-stage {
  display: grid;
}

.heartbeat-icon {
  display: grid;
  place-items: center;
  width: 116px;
  aspect-ratio: 1;
  border: 1px solid rgba(245, 140, 194, 0.38);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,240,248,.98) 0 44%, rgba(238,252,255,.86) 45% 100%);
  color: #f19ac6;
  font-size: 82px;
  line-height: 1;
  text-shadow: 0 0 18px rgba(245, 140, 194, 0.34);
  box-shadow: 0 22px 60px rgba(245, 140, 194, 0.18), inset 0 0 0 10px rgba(255,255,255,.56);
  animation: heartbeatPulse 820ms cubic-bezier(.18,.9,.24,1) infinite;
}

.heartbeat-stage p {
  margin: 12px 0 0;
  color: #7d6379;
  font-size: 18px;
  font-weight: 900;
}

.heartbeat-stage span {
  color: #8fb7ca;
  font-size: 14px;
  font-weight: 900;
}

@keyframes resultRevealFade {
  0% {
    opacity: 1;
  }
  52% {
    opacity: .96;
  }
  100% {
    opacity: 0;
  }
}

@keyframes heartbeatMist {
  0% {
    opacity: 0;
    filter: blur(10px);
  }
  14%,
  84% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    opacity: 0;
    filter: blur(5px);
  }
}

@keyframes heartbeatPulse {
  0%,
  38%,
  100% {
    transform: scale(1);
  }
  12% {
    transform: scale(1.16);
  }
  22% {
    transform: scale(.96);
  }
  30% {
    transform: scale(1.08);
  }
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(390px, 1.08fr);
  gap: 24px;
  align-items: center;
  min-height: calc(100vh - 122px);
  padding: 18px 0 30px;
}

.hero-copy,
.quiz-panel,
.result-card,
.types-head,
.type-preview {
  border: 1px solid rgba(246, 184, 214, 0.68);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 243, 250, 0.88) 52%, rgba(239, 252, 255, 0.88)),
    repeating-linear-gradient(0deg, transparent 0 12px, rgba(139, 223, 242, 0.05) 12px 13px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-copy {
  padding: 24px;
}

.age-badge,
.section-kicker {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 12px;
  padding: 4px 10px;
  border: 1px solid rgba(198, 169, 239, 0.6);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.86);
  color: #9a6cc8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  box-shadow: 0 6px 16px rgba(139, 223, 242, 0.16);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.18;
  letter-spacing: 0;
  color: #5b405f;
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.95), 0 0 24px rgba(245, 140, 194, 0.24);
}

.home-hook {
  margin: 0;
  color: #5b405f;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 900;
  line-height: 1.25;
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.95), 0 0 20px rgba(245, 140, 194, 0.2);
}

.subtitle {
  margin: 10px 0 0;
  color: #d56fa9;
  font-size: 20px;
  font-weight: 900;
}

.hashtag-chip {
  width: fit-content;
  margin: 12px 0 0;
  padding: 5px 10px;
  border: 1px solid rgba(139, 223, 242, 0.74);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.86);
  color: #b469a2;
  font-size: 14px;
  font-weight: 900;
  box-shadow: var(--heart-shadow);
}

.lead {
  margin: 18px 0 0;
  font-size: 17px;
  font-weight: 800;
}

.notice {
  margin-top: 18px;
  padding: 14px;
  border: 1px dashed rgba(245, 140, 194, 0.78);
  border-radius: 6px;
  background: rgba(238, 252, 255, 0.74);
  color: #6b5267;
  font-size: 13px;
}

.notice p {
  margin: 0;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
}

button,
.link-button {
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  filter: grayscale(0.35);
}

button:not(:disabled):active,
.link-button:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #f69fc9, #d7bdf5 54%, #8bdff2);
  box-shadow: var(--heart-shadow);
}

.ghost-button {
  color: #9d5f9f;
  border: 1px solid rgba(245, 140, 194, 0.72);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(139, 223, 242, 0.14);
}

.banner-frame {
  position: relative;
  margin: 0;
  border: 1px solid rgba(198, 169, 239, 0.48);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 52px rgba(139, 223, 242, 0.18);
}

.banner-frame::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 240, 248, 0.16));
  content: "";
}

.banner-caption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 2;
  display: grid;
  gap: 2px;
  width: fit-content;
  max-width: calc(100% - 36px);
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #5b405f;
  box-shadow: 0 10px 26px rgba(245, 140, 194, 0.16);
  backdrop-filter: blur(10px);
}

.banner-caption span {
  font-size: clamp(15px, 2.3vw, 24px);
  font-weight: 900;
  line-height: 1.1;
}

.banner-caption small {
  color: #c76da8;
  font-size: clamp(11px, 1.8vw, 17px);
  font-weight: 900;
}

.quiz-panel {
  width: min(780px, 100%);
  margin: 34px auto;
  padding: 22px;
}

.quiz-talk {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  margin: 20px 0 18px;
}

.quiz-character-stage {
  display: grid;
  gap: 10px;
  align-content: center;
  justify-items: center;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(139, 223, 242, 0.62);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(255, 240, 248, 0.68)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Ctext x='8' y='28' fill='%23f58cc2' fill-opacity='.24' font-size='18'%3E♡%3C/text%3E%3Ctext x='42' y='52' fill='%238bdff2' fill-opacity='.28' font-size='16'%3E♡%3C/text%3E%3C/svg%3E");
  box-shadow: 0 12px 26px rgba(139, 223, 242, 0.13);
}

.quiz-character-glow {
  display: grid;
  place-items: center;
  width: 132px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 48%, rgba(238, 252, 255, 0.82) 49% 100%);
  box-shadow: inset 0 0 0 6px rgba(255, 240, 248, 0.72), 0 10px 22px rgba(245, 140, 194, 0.14);
}

.quiz-character-glow img {
  width: 96%;
  height: 96%;
  object-fit: contain;
  filter: drop-shadow(0 8px 12px rgba(126, 86, 134, 0.14));
}

.quiz-character-copy {
  display: grid;
  gap: 2px;
  text-align: center;
}

.quiz-character-copy span {
  color: #8fb7ca;
  font-family: "Arial Black", "Yu Gothic", sans-serif;
  font-size: 19px;
  line-height: 1;
}

.quiz-character-copy strong {
  color: #b469a2;
  font-size: 18px;
  line-height: 1.35;
}

.quiz-character-copy small {
  color: #8b718a;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.question-bubble {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 190px;
  padding: 18px 18px 20px;
  border: 1px solid rgba(245, 140, 194, 0.62);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 240, 248, 0.9) 58%, rgba(238, 252, 255, 0.9)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Ctext x='10' y='34' fill='%23f58cc2' fill-opacity='.20' font-size='20'%3E♡%3C/text%3E%3Ctext x='52' y='64' fill='%238bdff2' fill-opacity='.24' font-size='18'%3E♡%3C/text%3E%3C/svg%3E");
  box-shadow: 0 14px 30px rgba(245, 140, 194, 0.13);
}

.question-bubble::before {
  position: absolute;
  top: 44px;
  left: -16px;
  width: 28px;
  height: 28px;
  border-left: 1px solid rgba(245, 140, 194, 0.62);
  border-bottom: 1px solid rgba(245, 140, 194, 0.62);
  background: rgba(255, 248, 252, 0.96);
  transform: rotate(45deg);
  content: "";
}

.speaker-label {
  width: fit-content;
  margin: 0 0 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(238, 252, 255, 0.92);
  color: #b469a2;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(139, 223, 242, 0.13);
}

.quiz-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.question-count {
  margin: 0;
  color: #b469a2;
  font-weight: 900;
}

.progress-shell {
  height: 14px;
  overflow: hidden;
  border: 1px solid rgba(245, 140, 194, 0.55);
  border-radius: 4px;
  background: #fff;
}

.progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #f6a8cf, #bfeefa, #f6a8cf);
  transition: width 220ms ease;
}

#questionText {
  min-height: auto;
  margin: 0;
  font-size: 26px;
  line-height: 1.45;
  letter-spacing: 0;
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  color: #b469a2;
  font-size: 13px;
  font-weight: 900;
}

.answer-scale {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 14px;
  padding-top: 10px;
}

.answer-scale::before {
  position: absolute;
  top: 31px;
  left: 7%;
  right: 7%;
  height: 4px;
  border-radius: 0;
  background: linear-gradient(90deg, #f6a8cf, #d9f6fc, #bfeefa);
  content: "";
}

.answer-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 76px;
  padding: 2px 2px 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.answer-dot::before {
  display: grid;
  place-items: center;
  width: 44px;
  height: 42px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f1a0ca;
  font-family: "Arial Rounded MT Bold", "DotGothic16", "Yu Gothic", sans-serif;
  font-size: 39px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 4px 0 rgba(255, 255, 255, 0.96), 0 10px 18px rgba(139, 223, 242, 0.18);
  content: "♡";
  transition: color 160ms ease, filter 160ms ease, text-shadow 160ms ease, transform 160ms ease;
}

.answer-dot:not(:disabled):hover::before {
  color: #ef82bd;
  transform: translateY(-2px) scale(1.05);
}

.answer-dot span {
  display: block;
  width: 100%;
  margin-top: 2px;
  color: #7d6379;
  font-size: 11px;
  line-height: 1.25;
}

.answer-dot.is-selected::before {
  color: #ff72b8;
  text-shadow:
    -2px 0 0 #8bdff2,
    2px 0 0 #fff0a8,
    0 4px 0 rgba(255, 255, 255, 0.96),
    0 12px 20px rgba(245, 140, 194, 0.28);
  content: "♥";
  filter: drop-shadow(0 0 10px rgba(255, 132, 196, 0.42));
  transform: scale(1.18);
}

.selected-label {
  min-height: 32px;
  margin: 0;
  padding: 8px 10px;
  border-left: 5px solid #f6a8cf;
  background: rgba(255, 255, 255, 0.82);
  color: #7d6379;
  font-weight: 900;
}

.quiz-actions {
  justify-content: space-between;
}

.quiz-panel.is-result-ready {
  display: grid;
  min-height: min(520px, calc(100vh - 160px));
  place-items: center;
}

.quiz-panel.is-result-ready .quiz-meta,
.quiz-panel.is-result-ready .quiz-talk,
.quiz-panel.is-result-ready .scale-labels,
.quiz-panel.is-result-ready .answer-scale,
.quiz-panel.is-result-ready .selected-label,
.quiz-panel.is-result-ready #backButton {
  display: none;
}

.quiz-panel.is-result-ready .quiz-actions {
  width: min(420px, 100%);
  justify-content: center;
  margin: 0;
}

.quiz-panel.is-result-ready #nextButton {
  display: inline-grid;
  width: 100%;
  min-height: 68px;
  place-items: center;
  font-size: clamp(20px, 4vw, 30px);
}

.result-card {
  width: min(980px, 100%);
  margin: 28px auto;
  padding: 18px;
}

.result-visual {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.result-visual img {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(139, 223, 242, 0.7);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.94) 0 45%, rgba(255, 240, 248, 0.72) 46% 70%, rgba(238, 252, 255, 0.8) 71%);
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(126, 86, 134, 0.16));
}

.result-code {
  margin: 4px 0;
  color: #5b405f;
  font-family: "Arial Black", "Yu Gothic", sans-serif;
  font-size: 58px;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 4px 0 rgba(255, 255, 255, 0.95), 0 0 20px rgba(139, 223, 242, 0.34);
}

.axis-text {
  margin: 8px 0 0;
  color: #7d6379;
  font-weight: 900;
}

.result-body h2 {
  margin: 22px 0 4px;
  font-size: 34px;
  line-height: 1.25;
}

.catchcopy {
  margin: 0 0 18px;
  color: #c76da8;
  font-size: 19px;
  font-weight: 900;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.detail-grid section,
.match-row p {
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(245, 140, 194, 0.35);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.76);
}

.detail-grid h3 {
  margin: 0 0 6px;
  color: #b469a2;
  font-size: 15px;
}

.detail-grid p {
  margin: 0;
}

.match-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.result-hashtag {
  margin-top: 14px;
}

.match-row strong {
  display: block;
  color: #7a2d7d;
}

.match-row span {
  display: block;
  margin-top: 4px;
  font-weight: 900;
}

.result-actions {
  align-items: stretch;
}

.types-head {
  margin: 28px auto 16px;
  padding: 20px;
}

.types-head h2 {
  margin: 0;
  font-size: 34px;
}

.types-head p {
  margin: 8px 0 0;
  font-weight: 800;
}

.types-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.type-card {
  min-height: 100%;
  padding: 10px;
  border: 1px solid rgba(139, 223, 242, 0.58);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(255,240,248,.72));
  box-shadow: 0 12px 24px rgba(245, 140, 194, 0.12);
  cursor: pointer;
}

.type-card:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 2px;
}

.type-card img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  background: radial-gradient(circle, #fff 0 45%, #eefcff 46% 100%);
  object-fit: contain;
  filter: drop-shadow(0 9px 11px rgba(126, 86, 134, 0.13));
}

.type-card .code {
  margin: 8px 0 0;
  color: #6b5267;
  font-family: "Arial Black", "Yu Gothic", sans-serif;
  font-size: 19px;
  line-height: 1;
}

.type-card .name {
  margin: 4px 0 0;
  color: #b469a2;
  font-weight: 900;
  line-height: 1.35;
}

.type-card .summary {
  margin: 6px 0 0;
  color: #7d6379;
  font-size: 13px;
  line-height: 1.45;
}

.type-preview {
  display: none;
  margin: 16px 0 28px;
  padding: 16px;
}

.type-preview.is-open {
  display: grid;
  grid-template-columns: minmax(120px, 190px) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.type-preview img {
  width: 100%;
  border-radius: 8px;
  background: radial-gradient(circle, #fff 0 45%, #eefcff 46% 100%);
  filter: drop-shadow(0 12px 14px rgba(126, 86, 134, 0.14));
}

.type-preview h3 {
  margin: 0;
  font-size: 26px;
}

.type-preview p {
  margin: 6px 0 0;
}

.site-footer {
  padding: 24px 0 12px;
  color: #8b718a;
  font-size: 13px;
  text-align: center;
}

.site-footer p {
  margin: 4px 0;
}

@media (max-width: 860px) {
  .hero-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .banner-frame {
    order: -1;
  }

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

@media (max-width: 520px) {
  .page-shell {
    padding: 10px;
  }

  .topbar {
    align-items: flex-start;
  }

  .compact-credit {
    max-width: 132px;
    font-size: 10px;
    line-height: 1.35;
  }

  .sound-toggle {
    width: auto;
    min-width: 92px;
    min-height: 34px;
    padding: 0 8px;
    font-size: 10px;
  }

  .hero-copy,
  .quiz-panel,
  .result-card,
  .types-head,
  .type-preview {
    padding: 14px;
    box-shadow: 0 12px 28px rgba(151, 114, 156, 0.13);
  }

  h1 {
    font-size: 31px;
  }

  .subtitle {
    font-size: 16px;
  }

  .lead {
    font-size: 15px;
  }

  .quiz-talk {
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 16px 0 14px;
  }

  .quiz-character-stage {
    grid-template-columns: 82px minmax(0, 1fr);
    justify-items: start;
    align-items: center;
    padding: 9px;
  }

  .quiz-character-glow {
    width: 80px;
  }

  .quiz-character-copy {
    text-align: left;
  }

  .quiz-character-copy span {
    font-size: 16px;
  }

  .quiz-character-copy strong {
    font-size: 14px;
  }

  .quiz-character-copy small {
    font-size: 11px;
  }

  .question-bubble {
    min-height: 146px;
    padding: 15px;
  }

  .question-bubble::before {
    top: -10px;
    left: 42px;
    width: 20px;
    height: 20px;
    border-top: 1px solid rgba(245, 140, 194, 0.62);
    border-left: 1px solid rgba(245, 140, 194, 0.62);
    border-bottom: 0;
    transform: rotate(45deg);
  }

  .action-row,
  .quiz-actions,
  .result-actions {
    flex-direction: column;
    align-items: stretch;
  }

  button,
  .link-button {
    width: 100%;
  }

  #questionText {
    font-size: 21px;
  }

  .answer-scale {
    gap: 2px;
  }

  .answer-scale::before {
    left: 8%;
    right: 8%;
  }

  .answer-dot {
    min-height: 76px;
  }

  .answer-dot::before {
    width: 34px;
    height: 34px;
    font-size: 32px;
  }

  .answer-dot span {
    font-size: 9px;
  }

  .result-visual,
  .detail-grid,
  .match-row,
  .type-preview.is-open {
    grid-template-columns: 1fr;
  }

  .result-visual img {
    width: min(250px, 100%);
    margin: 0 auto;
  }

  .result-code {
    font-size: 48px;
  }

  .result-body h2,
  .types-head h2 {
    font-size: 27px;
  }

  .types-grid {
    gap: 8px;
  }

  .type-card {
    padding: 8px;
  }

  .type-card .code {
    font-size: 16px;
  }

  .type-card .name {
    font-size: 13px;
  }

  .type-card .summary {
    font-size: 11px;
  }
}

/* Game mode polish */
body {
  color: #f9f3ff;
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 116, 188, 0.28), transparent 26%),
    radial-gradient(circle at 84% 8%, rgba(91, 224, 255, 0.24), transparent 28%),
    radial-gradient(circle at 72% 82%, rgba(255, 238, 145, 0.16), transparent 24%),
    linear-gradient(90deg, rgba(255, 128, 202, 0.13) 1px, transparent 1px),
    linear-gradient(rgba(123, 232, 255, 0.12) 1px, transparent 1px),
    linear-gradient(145deg, #211b3e 0%, #33214b 44%, #12374a 100%);
  background-size: auto, auto, auto, 42px 42px, 42px 42px, auto;
}

body::before {
  background-image:
    linear-gradient(135deg, transparent 0 48%, rgba(255, 255, 255, 0.13) 48% 52%, transparent 52%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150' viewBox='0 0 150 150'%3E%3Cpath d='M38 46c-10-10-28-2-28 13 0 16 28 29 28 29s28-13 28-29c0-15-18-23-28-13z' fill='%23ff8bc7' fill-opacity='.16'/%3E%3Cpath d='M113 80c-8-8-22-2-22 10 0 13 22 23 22 23s22-10 22-23c0-12-14-18-22-10z' fill='%238be7ff' fill-opacity='.18'/%3E%3C/svg%3E");
  opacity: 0.9;
}

.page-shell {
  width: min(1180px, 100%);
}

.topbar {
  padding: 10px 0 16px;
  background: linear-gradient(180deg, rgba(25, 19, 48, 0.94), rgba(25, 19, 48, 0));
}

.brand-mark {
  display: inline-grid;
  width: min(220px, 46vw);
  max-width: 220px;
  filter: drop-shadow(0 0 18px rgba(139, 223, 242, 0.28));
}

.brand-mark img {
  display: block;
  width: 100%;
  height: auto;
}

.credit-link {
  color: #ffe8f5;
  text-shadow: 0 0 12px rgba(255, 116, 188, 0.32);
}

.sound-toggle {
  border-color: rgba(139, 223, 242, 0.62);
  background: linear-gradient(145deg, rgba(255, 240, 248, 0.96), rgba(190, 245, 255, 0.9));
  box-shadow: 0 0 0 2px rgba(255,255,255,.4) inset, 0 0 24px rgba(139, 223, 242, 0.22);
}

.hero-layout {
  grid-template-columns: minmax(0, 0.78fr) minmax(460px, 1.22fr);
  min-height: calc(100vh - 94px);
}

.hero-copy,
.quiz-panel,
.result-card,
.types-head,
.type-preview,
.how-panel,
.credits-panel {
  border: 1px solid rgba(139, 223, 242, 0.44);
  background:
    linear-gradient(145deg, rgba(255, 247, 252, 0.94), rgba(242, 250, 255, 0.88) 48%, rgba(255, 238, 249, 0.88)),
    linear-gradient(90deg, rgba(255, 120, 196, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(139, 223, 242, 0.1) 1px, transparent 1px);
  background-size: auto, 26px 26px, 26px 26px;
  color: #3f3148;
  box-shadow:
    0 22px 60px rgba(7, 10, 31, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.82) inset,
    0 0 38px rgba(139, 223, 242, 0.12);
}

.title-panel {
  position: relative;
  overflow: hidden;
  padding: 26px;
}

.title-panel::before {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 116, 188, 0.28);
  border-radius: 7px;
  pointer-events: none;
  content: "";
}

.home-hook {
  color: #2f2940;
  font-size: clamp(27px, 4.5vw, 43px);
}

.subtitle {
  color: #e070b4;
}

.title-stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.title-stat-strip span,
.result-status span {
  display: grid;
  place-items: center;
  min-height: 34px;
  border: 1px solid rgba(139, 223, 242, 0.65);
  border-radius: 6px;
  background: linear-gradient(145deg, rgba(255,255,255,.88), rgba(238,252,255,.78));
  color: #72579a;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(139, 223, 242, 0.16);
}

.start-button {
  min-width: min(280px, 100%);
  min-height: 64px;
  padding: 16px 28px;
  background: linear-gradient(135deg, #ff79bd, #ad7cff 48%, #59dcff);
  font-size: clamp(22px, 4vw, 34px);
  box-shadow:
    0 18px 34px rgba(255, 116, 188, 0.38),
    0 0 34px rgba(139, 223, 242, 0.34),
    0 0 0 2px rgba(255, 255, 255, 0.64) inset;
}

.banner-frame {
  border-color: rgba(255, 143, 200, 0.68);
  background: #1c1736;
  box-shadow: 0 24px 70px rgba(7, 10, 31, 0.34), 0 0 48px rgba(255, 116, 188, 0.16);
}

.banner-frame .banner-caption {
  display: none;
}

.banner-caption {
  background: rgba(33, 27, 62, 0.76);
  color: #fffaff;
  border-color: rgba(139, 223, 242, 0.52);
  box-shadow: 0 0 22px rgba(255, 116, 188, 0.22);
}

.banner-caption small {
  color: #9eefff;
}

.question-count,
.selected-label,
.question-bubble,
.quiz-character-stage {
  box-shadow: 0 14px 26px rgba(33, 27, 62, 0.08), 0 0 18px rgba(139, 223, 242, 0.1);
}

.result-board {
  position: relative;
  display: grid;
  gap: 18px;
  width: min(1080px, 100%);
  overflow: hidden;
  padding: 20px;
}

.result-board.is-unlocked {
  animation: resultCardUnlock 1100ms cubic-bezier(.16,1.08,.32,1) both;
}

.result-board::before {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 143, 200, 0.28);
  border-radius: 8px;
  pointer-events: none;
  content: "";
}

.result-board::after {
  position: absolute;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 22%, rgba(255, 143, 200, 0.78) 0 4px, transparent 5px),
    radial-gradient(circle at 82% 26%, rgba(139, 223, 242, 0.86) 0 4px, transparent 5px),
    radial-gradient(circle at 74% 78%, rgba(255, 240, 168, 0.78) 0 5px, transparent 6px),
    radial-gradient(circle at 28% 82%, rgba(255, 255, 255, 0.86) 0 3px, transparent 4px);
  opacity: 0;
  transform: scale(.86) rotate(-8deg);
  content: "";
}

.result-board.is-unlocked::after {
  animation: resultSparkleBurst 1200ms ease-out both;
}

.result-game-header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.result-title-label {
  margin: 0;
  color: #7c5ca9;
  font-size: 15px;
  font-weight: 900;
}

.result-visual {
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(210px, 300px) minmax(0, 1fr);
  padding: 14px;
  border: 1px solid rgba(139, 223, 242, 0.42);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(33, 27, 62, 0.92), rgba(50, 34, 82, 0.84) 52%, rgba(22, 67, 85, 0.78));
  color: #fffaff;
}

.result-avatar-frame {
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 143, 200, 0.52);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.96) 0 35%, rgba(255, 217, 239, 0.88) 36% 60%, rgba(175, 238, 255, 0.68) 61%),
    linear-gradient(135deg, #fff0f8, #eefcff);
  box-shadow: 0 22px 42px rgba(7, 10, 31, 0.2), 0 0 30px rgba(255, 143, 200, 0.2);
}

.result-avatar-frame::after {
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: rgba(255, 116, 188, 0.72);
  font-size: 34px;
  font-weight: 900;
  content: "♡";
}

.result-avatar-frame img,
.result-visual img {
  width: 100%;
  max-width: 280px;
  border: 0;
  background: transparent;
  filter: drop-shadow(0 16px 18px rgba(33, 27, 62, 0.22));
}

.result-code {
  color: #fffaff;
  font-family: "DotGothic16", "MS Gothic", monospace;
  font-size: clamp(34px, 7vw, 70px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.08;
  -webkit-text-stroke: 1px rgba(47, 41, 64, 0.22);
  text-shadow:
    3px 0 0 rgba(255, 116, 188, 0.76),
    0 3px 0 rgba(255, 116, 188, 0.76),
    -3px 0 0 rgba(91, 220, 255, 0.62),
    0 -3px 0 rgba(91, 220, 255, 0.62),
    5px 5px 0 rgba(47, 41, 64, 0.28),
    0 0 24px rgba(255, 255, 255, 0.38);
}

.axis-text {
  color: #effcff;
}

.result-status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.status-meter {
  display: grid;
  grid-template-columns: minmax(70px, auto) minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 7px 8px;
  border: 1px solid rgba(139, 223, 242, 0.5);
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 240, 248, 0.12));
  color: #fffaff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}

.status-meter span {
  min-width: 58px;
  padding: 3px 6px;
  border: 1px solid rgba(139, 223, 242, 0.45);
  border-radius: 6px;
  background: rgba(255, 250, 255, 0.92);
  color: #67507b;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-shadow: none;
}

.status-meter b {
  position: relative;
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.status-meter b::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--value);
  border-radius: inherit;
  background: linear-gradient(90deg, #ff79bd, #fff0a8, #66e5ff);
  content: "";
}

.status-meter em {
  color: #fff0a8;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
  text-shadow: 0 1px 0 rgba(43, 33, 68, 0.5), 0 0 8px rgba(255, 240, 168, 0.24);
}

.result-body {
  position: relative;
  z-index: 1;
}

.result-body h2 {
  display: inline-block;
  margin-top: 4px;
  padding: 0 8px;
  color: #3b2d45;
  background: linear-gradient(transparent 58%, rgba(255, 143, 200, 0.32) 58%);
  font-size: clamp(28px, 5vw, 46px);
}

.catchcopy {
  color: #cf5aa2;
  font-size: clamp(18px, 3vw, 22px);
  text-shadow: 1px 1px 0 #fff;
}

.result-insight-panel {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid rgba(139, 223, 242, 0.52);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 250, 255, 0.94), rgba(238, 252, 255, 0.82)),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(255, 143, 200, 0.06) 18px 19px);
  box-shadow: 0 14px 28px rgba(139, 223, 242, 0.14);
}

.result-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.result-keywords span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 116, 188, 0.55);
  border-radius: 999px;
  background: #fffaff;
  color: #b95f9e;
  font-size: 12px;
  font-weight: 900;
}

.insight-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.insight-list div {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(246, 184, 214, 0.55);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.78);
}

.insight-list dt {
  margin: 0 0 5px;
  color: #b469a2;
  font-size: 13px;
  font-weight: 900;
}

.insight-list dd {
  margin: 0;
  color: #5b405f;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.6;
}

.detail-grid section,
.ranking-card,
.match-row p {
  border-color: rgba(139, 223, 242, 0.45);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 24px rgba(33, 27, 62, 0.08);
}

.match-ranking-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.ranking-card {
  padding: 14px;
  border-radius: 8px;
}

.ranking-card h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.good-ranking h3 {
  color: #3d9bb4;
}

.bad-ranking h3 {
  color: #c65a9f;
}

.match-list {
  display: grid;
  gap: 10px;
}

.match-item {
  padding: 0;
  border: 0;
  background: transparent;
}

.match-link {
  display: grid;
  grid-template-columns: 48px 64px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(246, 184, 214, 0.55);
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(255, 250, 255, 0.95), rgba(238, 252, 255, 0.78));
  color: inherit;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.match-link:hover,
.match-link:focus-visible {
  border-color: rgba(255, 116, 188, 0.78);
  box-shadow: 0 12px 24px rgba(255, 116, 188, 0.16), 0 0 18px rgba(139, 223, 242, 0.16);
  transform: translateY(-2px);
  outline: none;
}

.match-rank {
  display: grid;
  place-items: center;
  min-height: 52px;
  border-radius: 7px;
  background: linear-gradient(135deg, #ff8fc8, #8bdff2);
  color: #fff;
  font-family: "Arial Black", "Yu Gothic", sans-serif;
  font-size: 18px;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(33, 27, 62, 0.18);
}

.match-character {
  width: 64px;
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid rgba(139, 223, 242, 0.42);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.96) 0 40%, rgba(255, 218, 239, 0.72) 41% 70%, rgba(190, 245, 255, 0.64) 71%);
  box-shadow: 0 10px 18px rgba(33, 27, 62, 0.12);
}

.match-copy {
  display: grid;
  min-width: 0;
}

.match-title {
  display: block;
  min-width: 0;
}

.match-code {
  display: inline-flex;
  margin-right: 6px;
  color: #513b68;
  font-family: "DotGothic16", "MS Gothic", monospace;
  font-weight: 900;
}

.match-name {
  color: #b95f9e;
  font-weight: 900;
}

.match-example {
  margin: 4px 0 0;
  color: #6b5267;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.how-panel,
.credits-panel {
  display: grid;
  gap: 22px;
  width: min(980px, 100%);
  margin: 32px auto;
  padding: 22px;
}

.how-panel {
  grid-template-columns: 1fr;
}

.how-panel h2 {
  margin: 0;
  color: #3b2d45;
  font-size: clamp(30px, 5vw, 52px);
}

.how-lead,
.score-note {
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(255, 143, 200, 0.42);
  border-radius: 8px;
  background: rgba(255, 250, 255, 0.78);
  color: #5b405f;
  font-weight: 800;
  line-height: 1.8;
}

.axis-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.axis-guide-grid section {
  padding: 14px;
  border: 1px solid rgba(139, 223, 242, 0.5);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 250, 255, 0.92), rgba(238, 252, 255, 0.82));
}

.axis-guide-grid span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff8fc8, #8bdff2);
  color: #fff;
  font-weight: 900;
}

.axis-guide-grid h3,
.score-note h3 {
  margin: 0 0 8px;
  color: #b95f9e;
  font-size: 16px;
}

.axis-guide-grid p,
.score-note p {
  margin: 0;
  color: #5b405f;
  font-weight: 800;
  line-height: 1.75;
}

.credits-panel {
  grid-template-columns: minmax(250px, 360px) minmax(0, 1fr);
}

.credit-visual {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 143, 200, 0.56);
  border-radius: 8px;
  background: linear-gradient(145deg, #f3eaff, #fff7fc);
  box-shadow: 0 18px 44px rgba(7, 10, 31, 0.2);
}

.credit-visual img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  object-position: center;
}

.credit-copy h2 {
  margin: 0;
  font-size: clamp(34px, 6vw, 58px);
}

.credit-copy p {
  margin: 12px 0 0;
  font-weight: 800;
}

.credit-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.credit-links a {
  min-height: 50px;
  padding: 12px;
  border: 1px solid rgba(139, 223, 242, 0.55);
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(255,240,248,.75));
  color: #513b68;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(139, 223, 242, 0.12);
}

.result-reveal {
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,1) 0 16%, rgba(255,240,248,.98) 30%, rgba(170,242,255,.92) 58%, rgba(33,27,62,.92) 100%);
}

.result-reveal.is-heartbeat {
  animation: analyzeMist 5000ms ease both;
}

.heartbeat-stage {
  width: min(560px, calc(100% - 32px));
}

.analyze-window {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  gap: 8px;
  padding: 28px;
  border: 1px solid rgba(139, 223, 242, 0.62);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(33, 27, 62, 0.9), rgba(64, 36, 84, 0.86));
  color: #fffaff;
  box-shadow: 0 24px 80px rgba(7, 10, 31, 0.34), 0 0 42px rgba(255, 116, 188, 0.22);
}

.analyze-window::before {
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(255, 143, 200, 0.32);
  border-radius: 7px;
  pointer-events: none;
  content: "";
}

.heartbeat-icon {
  width: 104px;
  background: radial-gradient(circle, rgba(255,240,248,.98) 0 44%, rgba(190,245,255,.86) 45% 100%);
  color: #ff77bd;
  animation: heartbeatPulse 820ms cubic-bezier(.18,.9,.24,1) infinite;
}

.heartbeat-stage p {
  color: #fffaff;
  font-size: 20px;
}

.heartbeat-stage span,
.heartbeat-stage small {
  color: #bcefff;
  font-weight: 900;
}

.analyze-traits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 0;
  min-height: 42px;
  margin-top: 8px;
  color: #fff6a8;
  font-size: clamp(18px, 4.5vw, 27px);
  font-weight: 900;
  text-shadow: 3px 3px 0 rgba(255, 116, 188, 0.35), 0 0 18px rgba(139, 223, 242, 0.38);
}

.analyze-traits b {
  opacity: 0;
  transform: translateY(10px) scale(.94);
}

.result-reveal.is-heartbeat .analyze-traits b:nth-child(1) {
  animation: analyzeTraitOne 5000ms ease both;
}

.result-reveal.is-heartbeat .analyze-traits b:nth-child(2) {
  animation: analyzeTraitTwo 5000ms ease both;
}

.result-reveal.is-heartbeat .analyze-traits b:nth-child(3) {
  animation: analyzeTraitThree 5000ms ease both;
}

.analyze-final {
  min-height: 36px;
  color: #ffb9df;
  font-size: clamp(21px, 5vw, 34px);
  font-weight: 900;
  opacity: 0;
  text-shadow: 3px 3px 0 rgba(139, 223, 242, 0.32), 0 0 18px rgba(255, 143, 200, 0.42);
}

.result-reveal.is-heartbeat .analyze-final {
  animation: analyzeFinalPop 5000ms ease both;
}

.analyze-bar {
  width: min(380px, 100%);
  height: 16px;
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.68);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.analyze-bar i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff79bd, #fff0a8, #74e6ff);
  transform-origin: left center;
  animation: analyzeLoad 5000ms linear both;
}

@keyframes analyzeMist {
  0% {
    opacity: 0;
    filter: blur(8px);
  }
  8%,
  92% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    opacity: 0;
    filter: blur(5px);
  }
}

@keyframes analyzeLoad {
  0% {
    transform: scaleX(0.04);
  }
  100% {
    transform: scaleX(1);
  }
}

@keyframes analyzeTraitOne {
  0%,
  10% {
    opacity: 0;
    transform: translateY(10px) scale(.94);
  }
  16%,
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes analyzeTraitTwo {
  0%,
  30% {
    opacity: 0;
    transform: translateY(10px) scale(.94);
  }
  38%,
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes analyzeTraitThree {
  0%,
  50% {
    opacity: 0;
    transform: translateY(10px) scale(.94);
  }
  58%,
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes analyzeFinalPop {
  0%,
  72% {
    opacity: 0;
    transform: translateY(12px) scale(.92);
  }
  82% {
    opacity: 1;
    transform: translateY(0) scale(1.08);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes resultCardUnlock {
  0% {
    opacity: 0;
    transform: translateY(28px) scale(.96);
    filter: saturate(1.4) brightness(1.2) blur(3px);
  }
  58% {
    opacity: 1;
    transform: translateY(-6px) scale(1.015);
    filter: saturate(1.25) brightness(1.08) blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: none;
  }
}

@keyframes resultSparkleBurst {
  0% {
    opacity: 0;
    transform: scale(.72) rotate(-10deg);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.18) rotate(8deg);
  }
}

@media (max-width: 760px) {
  .hero-layout,
  .result-visual,
  .match-ranking-panel,
  .credits-panel {
    grid-template-columns: 1fr;
  }

  .title-stat-strip,
  .result-status,
  .insight-list,
  .credit-links {
    grid-template-columns: 1fr;
  }

  .result-avatar-frame {
    max-width: 240px;
    margin: 0 auto;
  }
}
