:root {
  color-scheme: light;
  --ink: #18191f;
  --muted: #676b78;
  --line: #d9dce5;
  --paper: #fffaf1;
  --panel: #ffffff;
  --amber: #ffbd3f;
  --coral: #ff5c58;
  --teal: #00a6a6;
  --blue: #3a70e2;
  --plum: #7d4bc6;
  --green: #24a148;
  --shadow: 0 18px 45px rgba(21, 24, 35, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    linear-gradient(135deg, rgba(255, 189, 63, 0.18), transparent 34%),
    linear-gradient(225deg, rgba(0, 166, 166, 0.16), transparent 32%),
    var(--paper);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family:
    Pretendard,
    "Apple SD Gothic Neo",
    "Noto Sans KR",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  width: min(100%, 1120px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px;
}

.screen {
  min-height: calc(100vh - 36px);
  display: grid;
  align-content: center;
  gap: 20px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

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

.open-chat-link {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fee500;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.open-chat-link::before {
  content: "";
  position: absolute;
  right: -4px;
  top: -4px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #ff5c58;
}

.open-chat-icon {
  position: relative;
  width: 22px;
  height: 17px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 9px;
  background: #ffffff;
}

.open-chat-icon::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 6px 0 0 var(--ink), -6px 0 0 var(--ink);
}

.open-chat-icon::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: -5px;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: #ffffff;
  transform: rotate(45deg);
}

.open-chat-link:hover,
.open-chat-link:focus-visible {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 24px 0 8px;
}

.hero-copy {
  display: grid;
  gap: 18px;
}

.eyebrow {
  margin: 0;
  color: var(--coral);
  font-weight: 900;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(2.45rem, 9vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero p {
  max-width: 680px;
  color: #3d414e;
  font-size: clamp(1.05rem, 2.7vw, 1.32rem);
  line-height: 1.65;
  word-break: keep-all;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.start-note {
  max-width: 560px;
  margin-top: -4px;
  color: var(--coral);
  font-size: 0.96rem;
  font-weight: 900;
}

.key-panel {
  display: grid;
  gap: 8px;
  max-width: 560px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  font-weight: 900;
}

.key-panel input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 700;
}

.key-panel input:focus {
  outline: none;
  border-color: var(--ink);
}

.nickname-panel {
  border-color: var(--ink);
  background: #fff1b8;
}

.nickname-panel input {
  font-size: 1.05rem;
  font-weight: 900;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 560px;
}

.meta-item {
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.meta-label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.meta-value {
  display: block;
  margin-top: 5px;
  font-size: 1.2rem;
  font-weight: 950;
}

.hero-stage {
  min-height: 360px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(24, 25, 31, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(24, 25, 31, 0.08) 1px, transparent 1px),
    #f8e86d;
  background-size: 28px 28px;
  box-shadow: var(--shadow);
}

.hero-stage::before,
.hero-stage::after {
  content: "";
  position: absolute;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fff;
}

.hero-stage::before {
  width: 160px;
  height: 160px;
  left: -45px;
  bottom: -35px;
}

.hero-stage::after {
  width: 110px;
  height: 110px;
  right: -25px;
  top: -30px;
}

.voice-room {
  position: relative;
  z-index: 1;
  width: min(88%, 430px);
  padding: 22px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fffaf1;
  transform: rotate(-1.5deg);
}

.cast-preview {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff;
  box-shadow: 4px 4px 0 var(--ink);
}

.stage-open-chat {
  position: absolute;
  left: 22px;
  bottom: 18px;
  z-index: 2;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fee500;
  color: var(--ink);
  font-weight: 950;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.stage-open-chat:hover,
.stage-open-chat:focus-visible {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.room-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  font-weight: 950;
}

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--coral);
  font-size: 0.86rem;
}

.live-dot::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.4s infinite;
}

.speaker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.speaker {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #ffffff;
  font-size: 2rem;
  box-shadow: 4px 4px 0 var(--ink);
}

.speaker:nth-child(2) {
  background: #b9f4e7;
}

.speaker:nth-child(3) {
  background: #ffd5cf;
}

.speaker:nth-child(4) {
  background: #d9d3ff;
}

.speaker:nth-child(5) {
  background: #ffe6a3;
}

.speaker:nth-child(6) {
  background: #bfe3ff;
}

.sound-wave {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: flex;
  gap: 4px;
  align-items: end;
  height: 42px;
}

.sound-wave i {
  width: 9px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--coral);
  animation: bounce 0.85s infinite ease-in-out;
}

.sound-wave i:nth-child(1) {
  height: 18px;
}

.sound-wave i:nth-child(2) {
  height: 34px;
  animation-delay: 0.12s;
}

.sound-wave i:nth-child(3) {
  height: 24px;
  animation-delay: 0.24s;
}

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 950;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--ink);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--ink);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
  box-shadow: 4px 4px 0 var(--ink);
}

.btn-primary {
  background: var(--ink);
  color: #ffffff;
  box-shadow: 4px 4px 0 var(--amber);
}

.btn-accent {
  background: var(--amber);
}

.btn-quiet {
  border-color: var(--line);
  color: var(--muted);
  box-shadow: none;
}

.quiz-shell,
.result-shell,
.type-shell {
  display: grid;
  gap: 18px;
}

.quiz-panel,
.result-hero,
.result-section,
.type-section,
.loading-panel {
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.quiz-panel {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.progress-wrap {
  display: grid;
  gap: 8px;
}

.progress-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 900;
}

.progress {
  height: 12px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #ffffff;
}

.progress-bar {
  width: var(--progress);
  height: 100%;
  background: linear-gradient(90deg, var(--coral), var(--amber), var(--teal));
  transition: width 0.25s ease;
}

.question-kicker {
  color: var(--blue);
  font-weight: 950;
}

.question-title {
  font-size: clamp(1.5rem, 5.2vw, 2.55rem);
  line-height: 1.25;
  word-break: keep-all;
}

.options {
  display: grid;
  gap: 10px;
}

.option {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  line-height: 1.45;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}

.option:hover {
  border-color: var(--ink);
}

.option.selected {
  border-color: var(--ink);
  background: #fff1b8;
  animation: wiggle 0.22s ease;
}

.option-letter {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #ffffff;
  font-weight: 950;
}

.option-text {
  min-width: 0;
  font-weight: 800;
  word-break: keep-all;
}

.custom-option {
  align-items: stretch;
  cursor: text;
}

.custom-input-wrap {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.custom-input-title {
  font-weight: 950;
}

.custom-option textarea {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  padding: 10px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fffaf1;
  color: var(--ink);
  line-height: 1.45;
  font-weight: 750;
}

.custom-option textarea:focus {
  outline: none;
  border-color: var(--ink);
  background: #ffffff;
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.loading-panel {
  min-height: 360px;
  display: grid;
  place-items: center;
  gap: 18px;
  padding: 28px;
  text-align: center;
}

.loader {
  width: 98px;
  height: 98px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--amber);
  font-size: 2.6rem;
  animation: spin 1.1s linear infinite;
}

.loading-panel h2 {
  font-size: clamp(1.6rem, 6vw, 2.7rem);
}

.result-hero {
  position: relative;
  display: grid;
  gap: 20px;
  padding: 18px;
  overflow: hidden;
}

.result-hero::before,
.result-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: 0.58;
}

.result-hero::before {
  width: 220px;
  height: 220px;
  right: -54px;
  top: -62px;
  border: 2px dashed var(--ink);
  border-radius: 50%;
  animation: orbit 13s linear infinite;
}

.result-hero::after {
  inset: 0;
  background:
    linear-gradient(118deg, transparent 0 54%, rgba(255, 255, 255, 0.36) 55% 56%, transparent 57%),
    linear-gradient(32deg, transparent 0 62%, rgba(24, 25, 31, 0.12) 63% 64%, transparent 65%),
    linear-gradient(150deg, transparent 0 72%, rgba(255, 92, 88, 0.2) 73% 75%, transparent 76%);
}

.result-head {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
}

.category {
  color: var(--teal);
  font-weight: 950;
}

.result-title {
  width: 100%;
  max-width: 760px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: clamp(1.85rem, 5vw, 3.15rem);
  line-height: 1.08;
  font-weight: 950;
  word-break: keep-all;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

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

.rank-card {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #ffffff;
}

.rank-card:first-child {
  background: #fff1b8;
}

.rank-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.rank-badge {
  min-width: 44px;
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--coral);
  color: #ffffff;
  font-weight: 950;
}

.rank-main h3 {
  font-size: 1.05rem;
  line-height: 1.2;
}

.rank-main p,
.rank-summary {
  color: var(--muted);
  line-height: 1.45;
  word-break: keep-all;
}

.score-strip {
  display: grid;
  gap: 8px;
}

.score-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 950;
}

.score-meter {
  height: 20px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
}

.score-fill {
  width: var(--score);
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--amber), var(--coral));
}

.mascot-wrap {
  min-height: 280px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.9) 0 10%, transparent 11%),
    linear-gradient(135deg, var(--tone-a), var(--tone-b));
}

.mascot {
  position: relative;
  width: min(250px, 66vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  border-radius: 42% 54% 45% 50%;
  background: #ffffff;
  box-shadow: 10px 10px 0 rgba(24, 25, 31, 0.96);
  transform: rotate(-4deg);
}

.mascot::before,
.mascot::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--tone-b);
  top: 28%;
}

.mascot::before {
  left: 24%;
}

.mascot::after {
  right: 24%;
}

.mascot-face {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 8px;
  place-items: center;
}

.mascot-icon {
  font-size: clamp(3.9rem, 18vw, 6.5rem);
  line-height: 1;
}

.mascot-tag {
  max-width: 190px;
  padding: 7px 9px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--amber);
  font-size: 0.9rem;
  font-weight: 950;
  text-align: center;
}

.art-frame {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.9) 0 10%, transparent 11%),
    linear-gradient(135deg, var(--tone-a), var(--tone-b));
}

.villain-art {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  display: block;
  object-fit: contain;
}

.hero-art {
  position: relative;
  z-index: 1;
  min-height: 320px;
  padding: 16px;
  overflow: visible;
}

.hero-art .villain-art {
  position: relative;
  z-index: 2;
  width: min(100%, 360px);
  height: auto;
  filter: drop-shadow(12px 16px 0 rgba(24, 25, 31, 0.2)) drop-shadow(0 16px 24px rgba(24, 25, 31, 0.22));
  transform-origin: 50% 72%;
  animation: villainFloat 3.4s ease-in-out infinite;
}

.hero-art::before,
.hero-art::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.hero-art::before {
  width: min(72%, 290px);
  height: min(72%, 290px);
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.58);
  box-shadow:
    14px 14px 0 rgba(24, 25, 31, 0.2),
    inset 0 0 0 14px rgba(255, 189, 63, 0.28);
  animation: actionPulse 2.8s ease-in-out infinite;
}

.hero-art::after {
  width: 78%;
  height: 78%;
  background:
    conic-gradient(from 15deg, transparent 0 8%, rgba(24, 25, 31, 0.72) 8% 10%, transparent 10% 20%),
    conic-gradient(from 185deg, transparent 0 12%, rgba(255, 92, 88, 0.7) 12% 14%, transparent 14% 26%);
  border-radius: 50%;
  opacity: 0.58;
  animation: actionSpin 16s linear infinite;
}

.mini-card-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.mini-art,
.type-art {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
}

.type-art {
  width: 64px;
  height: 64px;
}

.result-grid {
  display: grid;
  gap: 14px;
}

.result-section,
.type-section {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.result-section h3,
.type-section h3 {
  font-size: 1.15rem;
}

.text-list {
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.text-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  line-height: 1.55;
  color: #343844;
  word-break: keep-all;
}

.text-list li::before {
  content: "";
  width: 9px;
  height: 9px;
  margin-top: 0.55em;
  border-radius: 50%;
  background: var(--coral);
}

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

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 10px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #ffffff;
  font-weight: 900;
}

.prescription-card {
  padding: 14px;
  border: 2px dashed var(--ink);
  border-radius: 8px;
  background: #fff1b8;
}

.prescription-label {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 5px 8px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #ffffff;
  color: var(--coral);
  font-size: 0.86rem;
  font-weight: 950;
}

.prescription {
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 950;
  line-height: 1.55;
  word-break: keep-all;
}

.pair-grid,
.potential-grid,
.axis-grid {
  display: grid;
  gap: 10px;
}

.mini-card {
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.mini-card strong {
  display: block;
  margin-bottom: 4px;
}

.mini-card span {
  color: var(--muted);
  line-height: 1.5;
}

.share-note {
  min-height: 24px;
  color: var(--green);
  font-weight: 900;
}

.custom-profile {
  display: grid;
  gap: 16px;
}

.custom-profile h2 {
  font-size: clamp(1.45rem, 4vw, 2.25rem);
  line-height: 1.2;
  word-break: keep-all;
}

.custom-profile p {
  color: #343844;
  line-height: 1.65;
  word-break: keep-all;
}

.custom-profile .prescription {
  color: var(--ink);
  line-height: 1.55;
}

.custom-profile .profile-context {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 7px 10px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #e8fff6;
  color: #08745f;
  font-size: 0.98rem;
  font-weight: 950;
  line-height: 1.4;
}

.direct-quotes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.direct-quotes span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 10px;
  border-left: 4px solid var(--coral);
  border-radius: 8px;
  background: #fff1b8;
  color: #d43f3a;
  font-size: 1.08rem;
  font-weight: 950;
  line-height: 1.45;
  word-break: keep-all;
}

.profile-columns {
  display: grid;
  gap: 10px;
}

.profile-columns > div {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.type-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.type-card {
  min-height: 156px;
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.type-card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.type-card h3 {
  font-size: 1.05rem;
}

.type-icon {
  font-size: 1.8rem;
}

.type-card p {
  color: var(--muted);
  line-height: 1.5;
  word-break: keep-all;
}

.footer-note {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.open-chat-promo {
  display: grid;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #fff1b8;
  box-shadow: var(--shadow);
}

.open-chat-promo strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1.12rem;
}

.open-chat-promo p {
  color: #3d414e;
  line-height: 1.55;
  word-break: keep-all;
}

.admin-app {
  max-width: 1180px;
}

.admin-screen {
  align-content: start;
}

.admin-login {
  width: min(100%, 430px);
  justify-self: center;
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.admin-login h1 {
  font-size: clamp(2.2rem, 9vw, 4rem);
  line-height: 0.95;
}

.admin-login label {
  display: grid;
  gap: 8px;
  font-weight: 950;
}

.admin-login input {
  min-height: 48px;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
}

.metric-card,
.admin-panel {
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.metric-card {
  min-height: 112px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  padding: 14px;
}

.metric-card span {
  color: var(--muted);
  font-weight: 900;
}

.metric-card strong {
  color: var(--ink);
  font-size: clamp(1.85rem, 5vw, 2.85rem);
  line-height: 1;
}

.admin-grid {
  display: grid;
  gap: 14px;
}

.admin-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
}

.admin-panel h2 {
  font-size: 1.35rem;
}

.stat-list,
.daily-list,
.combo-list,
.recent-list {
  display: grid;
  gap: 10px;
}

.type-analysis {
  display: grid;
  gap: 12px;
}

.analysis-headline {
  display: grid;
  gap: 3px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}

.analysis-headline strong {
  color: var(--coral);
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  line-height: 1.05;
  word-break: keep-all;
}

.analysis-headline span,
.analysis-copy,
.analysis-rank-row em {
  color: var(--muted);
  font-weight: 850;
}

.analysis-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.analysis-metrics span {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf1;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 900;
}

.analysis-metrics b {
  color: var(--ink);
}

.analysis-copy {
  line-height: 1.45;
  word-break: keep-all;
}

.analysis-rank-list {
  display: grid;
  gap: 9px;
}

.analysis-rank-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 56px;
  gap: 8px;
  align-items: center;
  font-weight: 950;
}

.analysis-rank-row span {
  min-height: 30px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--amber);
  font-size: 0.82rem;
}

.analysis-rank-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.analysis-rank-row b {
  text-align: right;
  color: var(--coral);
}

.analysis-rank-row i {
  grid-column: 2 / 4;
  height: 12px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #ffffff;
}

.analysis-rank-row i::before {
  content: "";
  display: block;
  width: var(--bar);
  height: 100%;
  background: var(--green);
}

.analysis-rank-row em {
  grid-column: 2 / 4;
  font-size: 0.85rem;
  font-style: normal;
}

.bar-row,
.combo-row,
.recent-row {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf1;
}

.bar-top,
.combo-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.bar-top span,
.combo-row span,
.recent-row span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.bar-track,
.daily-bars {
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #ffffff;
}

.bar-track {
  height: 18px;
}

.bar-track i {
  display: block;
  width: var(--bar);
  height: 100%;
  background: var(--coral);
}

.daily-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 56px;
  gap: 9px;
  align-items: center;
  font-weight: 900;
}

.daily-bars {
  display: grid;
  gap: 3px;
  padding: 3px;
}

.daily-bars i {
  display: block;
  width: var(--bar);
  height: 9px;
  border-radius: 8px;
}

.daily-bars .starts {
  background: #bfd7ff;
}

.daily-bars .completions {
  background: var(--green);
}

.recent-row strong {
  color: var(--coral);
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: scaleY(0.76);
  }
  50% {
    transform: scaleY(1);
  }
}

@keyframes wiggle {
  0%,
  100% {
    transform: rotate(0);
  }
  35% {
    transform: rotate(-0.7deg);
  }
  70% {
    transform: rotate(0.7deg);
  }
}

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

@keyframes villainFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg) scale(1);
  }
  50% {
    transform: translateY(-12px) rotate(2deg) scale(1.035);
  }
}

@keyframes actionPulse {
  0%,
  100% {
    transform: scale(0.94);
  }
  50% {
    transform: scale(1.04);
  }
}

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

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

@media (min-width: 760px) {
  .app {
    padding: 28px;
  }

  .screen {
    min-height: calc(100vh - 56px);
  }

  .hero {
    grid-template-columns: minmax(0, 1.06fr) minmax(340px, 0.76fr);
    gap: 34px;
  }

  .hero-stage {
    min-height: 500px;
  }

  .quiz-panel,
  .result-hero,
  .result-section,
  .type-section {
    padding: 24px;
  }

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

  .result-hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(310px, 0.72fr);
    align-items: center;
  }

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

  .admin-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }

  .result-section.wide {
    grid-column: 1 / -1;
  }

  .pair-grid,
  .potential-grid,
  .axis-grid,
  .profile-columns,
  .open-chat-promo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .open-chat-promo .btn {
    justify-self: end;
  }
}

@media (max-width: 430px) {
  .app {
    padding: 12px;
  }

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

  .btn {
    width: 100%;
  }

  .quiz-nav .btn {
    width: auto;
    flex: 1;
  }

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

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