:root {
  color-scheme: light dark;
  --page: #fbf8f1;
  --surface: #fffefb;
  --surface-raised: #ffffff;
  --surface-subtle: #f4f8fb;
  --text: #0b1f44;
  --text-muted: #5d6d87;
  --border: #dedbd4;
  --border-strong: #c9d2dd;
  --accent: #1264e8;
  --accent-hover: #084fca;
  --accent-soft: #eaf2ff;
  --accent-contrast: #ffffff;
  --teal: #007f76;
  --teal-bright: #0aa995;
  --teal-soft: #e3f8f4;
  --success: #087a4d;
  --success-soft: #e7f7ef;
  --success-border: #3ca87a;
  --danger: #a72b32;
  --danger-soft: #fff0f0;
  --danger-border: #d66f72;
  --focus: #075ee7;
  --shadow: 0 16px 44px rgba(28, 43, 69, 0.09);
  --shadow-small: 0 5px 16px rgba(28, 43, 69, 0.08);
  --radius-large: 24px;
  --radius-medium: 15px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans",
    "Noto Sans JP", "Noto Sans KR", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page);
  scroll-behavior: smooth;
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 98% 18%, rgba(95, 190, 242, 0.18), transparent 17rem),
    radial-gradient(circle at 2% 78%, rgba(84, 180, 238, 0.14), transparent 19rem),
    radial-gradient(circle, rgba(19, 57, 94, 0.045) 0.7px, transparent 0.8px),
    var(--page);
  background-size: auto, auto, 13px 13px, auto;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.i18n-pending > :not(noscript) {
  visibility: hidden;
}

button,
select,
input {
  font: inherit;
}

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

button,
a {
  touch-action: manipulation;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

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

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 15px;
  border-radius: 10px;
  color: var(--accent-contrast);
  background: var(--accent);
  font-weight: 750;
  transform: translateY(-170%);
  transition: transform 140ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 3px 12px rgba(34, 48, 68, 0.04);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  display: flex;
  width: min(100%, 1440px);
  min-height: 92px;
  margin: 0 auto;
  padding: 14px max(28px, env(safe-area-inset-right)) 14px
    max(28px, env(safe-area-inset-left));
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.wordmark__mark {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  object-fit: contain;
}

.wordmark__copy {
  display: inline-flex;
  min-width: 0;
  align-items: baseline;
  gap: 9px;
}

.wordmark__title {
  flex: 0 0 auto;
  line-height: 1.05;
  white-space: nowrap;
}

.wordmark__credit {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 0.58rem;
  font-weight: 650;
  letter-spacing: 0.015em;
  line-height: 1.2;
  white-space: nowrap;
}

.wordmark__credit--short {
  display: none;
}

.language-control {
  display: flex;
  align-items: center;
}

.language-control > label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.language-control__select-wrap {
  position: relative;
}

.language-control__select-wrap::after {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 17px;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  pointer-events: none;
  transform: translateY(-70%) rotate(45deg);
}

.language-control__icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  pointer-events: none;
  transform: translateY(-50%);
}

.language-control select {
  appearance: none;
  min-width: 142px;
  min-height: 50px;
  padding: 0 48px 0 44px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  color: var(--text);
  background-color: var(--surface-raised);
  box-shadow: 0 2px 8px rgba(28, 43, 69, 0.04);
  font-weight: 700;
  cursor: pointer;
}

.language-control select:disabled {
  cursor: wait;
  opacity: 0.65;
}

.site-main {
  display: flex;
  width: 100%;
  min-height: clamp(680px, 78vh, 980px);
  padding: clamp(34px, 5vw, 72px) max(16px, env(safe-area-inset-right))
    clamp(52px, 7vw, 92px) max(16px, env(safe-area-inset-left));
  align-items: flex-start;
  justify-content: center;
}

.screen {
  width: min(100%, 800px);
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.screen:not([hidden]) {
  animation: screen-enter 360ms var(--ease-out) both;
}

.quiz-screen {
  width: min(100%, 1380px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.18;
}

.start-screen h1,
.result-screen h1 {
  max-width: 660px;
  margin-bottom: 18px;
  font-size: clamp(2.1rem, 7vw, 4rem);
  font-weight: 820;
  letter-spacing: -0.055em;
}

.lead {
  max-width: 640px;
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(1rem, 2.5vw, 1.17rem);
}

.start-form {
  margin-top: clamp(34px, 6vw, 52px);
}

.question-mode,
.question-count {
  padding: 0;
  margin: 0 0 24px;
  border: 0;
}

.question-mode legend,
.question-count legend {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 750;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-subtle);
  gap: 4px;
}

.segmented-control label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.segmented-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.segmented-control span {
  display: flex;
  min-height: 48px;
  padding: 8px;
  border-radius: 11px;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 720;
  text-align: center;
  transition: color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.segmented-control input:checked + span {
  color: var(--text);
  background: var(--surface-raised);
  box-shadow: 0 2px 9px rgba(24, 31, 45, 0.09);
}

.segmented-control input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 52px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  font-weight: 780;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease,
    transform 140ms ease, box-shadow 140ms ease;
}

.primary-button {
  color: var(--accent-contrast);
  background: var(--accent);
  box-shadow: 0 8px 20px rgba(18, 100, 232, 0.2);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.secondary-button {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface-raised);
}

.start-form > .primary-button {
  width: 100%;
}

.keyboard-hint,
.status-message {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
}

.keyboard-hint {
  opacity: 0.76;
}

.status-message {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--accent-soft);
}

.status-message--error {
  color: var(--danger);
  background: var(--danger-soft);
}

.quiz-progress-block {
  display: grid;
  width: min(100%, 1060px);
  margin: 0 auto clamp(30px, 4vw, 48px);
  grid-template-columns: auto minmax(100px, 1fr);
  align-items: center;
  gap: clamp(16px, 3vw, 28px);
}

.question-counter {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-variant-numeric: tabular-nums;
  font-weight: 820;
  letter-spacing: -0.035em;
}

progress {
  display: block;
  width: 100%;
  height: 8px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  appearance: none;
  background: var(--border);
}

progress::-webkit-progress-bar {
  border-radius: 999px;
  background: var(--border);
}

progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal-bright), var(--accent));
  transition: width 180ms ease;
}

progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal-bright), var(--accent));
  transition: width 180ms ease;
}

.quiz-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.question-panel,
.answers-panel {
  min-width: 0;
  padding: clamp(24px, 5vw, 52px);
}

.question-title,
.answers-title {
  position: relative;
  margin-bottom: clamp(26px, 4vw, 38px);
  color: var(--teal);
  font-size: clamp(1.12rem, 2.5vw, 1.4rem);
  font-weight: 820;
  letter-spacing: -0.025em;
}

.question-title::after,
.answers-title::after {
  position: absolute;
  bottom: -13px;
  left: 0;
  width: 58px;
  height: 3px;
  border-radius: 999px;
  background: var(--teal-bright);
  content: "";
}

.question-text {
  min-height: 4.8em;
  margin: 0 0 clamp(26px, 4vw, 38px);
  color: var(--text);
  font-size: clamp(1.12rem, 2.2vw, 1.4rem);
  font-weight: 520;
  line-height: 1.75;
  white-space: pre-line;
}

.question-skill-identity {
  display: flex;
  min-width: 0;
  padding: 10px 12px;
  margin: 0 0 18px;
  border: 1px solid var(--border);
  border-radius: 13px;
  align-items: center;
  gap: 12px;
  background: color-mix(in srgb, var(--surface-subtle) 58%, var(--surface));
}

.question-skill-identity[hidden] {
  display: none;
}

.question-skill-identity__images {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(2, 50px);
  gap: 6px;
}

.question-skill-identity__images img {
  display: block;
  width: 50px;
  height: 50px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-subtle);
  object-fit: cover;
}

.question-skill-identity__images img:last-child {
  object-fit: contain;
}

.question-skill-identity__name {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 1rem;
  font-weight: 820;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.question-skill-identity__slot {
  display: inline-flex;
  width: 40px;
  height: 40px;
  margin-left: auto;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--teal-bright) 48%, var(--border));
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  background: color-mix(in srgb, var(--teal-soft) 56%, var(--surface));
  font-size: 1.05rem;
  font-weight: 850;
}

.skill-details {
  margin-top: 4px;
}

.skill-table-wrap {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface-raised);
}

.skill-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  color: var(--text);
  font-size: clamp(0.72rem, 1.3vw, 0.9rem);
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.skill-table th,
.skill-table td {
  min-width: 0;
  padding: 10px 5px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
  overflow-wrap: normal;
  word-break: keep-all;
}

.skill-table th:last-child,
.skill-table td:last-child {
  border-right: 0;
}

.skill-table tbody tr:last-child th,
.skill-table tbody tr:last-child td {
  border-bottom: 0;
}

.skill-table thead th {
  color: var(--text);
  background: var(--surface-subtle);
  font-weight: 800;
}

.skill-table th:first-child {
  width: 30%;
}

.skill-table tbody th {
  background: color-mix(in srgb, var(--surface-subtle) 55%, var(--surface));
  font-weight: 700;
}

.skill-extras {
  display: flex;
  padding: 0;
  margin: 17px 0 0;
  flex-wrap: wrap;
  list-style: none;
  gap: 6px 0;
  color: var(--text-muted);
  font-size: clamp(0.78rem, 1.5vw, 0.88rem);
  font-weight: 650;
}

.skill-extras li {
  display: inline-flex;
  align-items: center;
}

.skill-extras li:not(:last-child)::after {
  margin: 0 12px;
  color: var(--border-strong);
  content: "•";
}

.answers-panel {
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-raised) 84%, var(--surface-subtle));
}

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

.answer-grid li {
  min-width: 0;
}

.quiz-screen--question-entering .question-text,
.quiz-screen--question-entering .question-skill-identity,
.quiz-screen--question-entering .skill-details {
  animation: question-enter 300ms var(--ease-out) both;
}

.quiz-screen--question-entering .answer-grid li {
  animation: choice-enter 320ms var(--ease-out) both;
}

.quiz-screen--question-entering .answer-grid li:nth-child(2) {
  animation-delay: 45ms;
}

.quiz-screen--question-entering .answer-grid li:nth-child(3) {
  animation-delay: 90ms;
}

.quiz-screen--question-entering .answer-grid li:nth-child(4) {
  animation-delay: 135ms;
}

.choice-button {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 84px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  grid-template-columns: 76px minmax(0, 1fr);
  grid-template-rows: minmax(56px, 1fr) auto;
  color: var(--text);
  background: var(--surface-raised);
  box-shadow: var(--shadow-small);
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease,
    transform 150ms ease, box-shadow 150ms ease;
}

.choice-button:disabled {
  color: var(--text);
  cursor: default;
  opacity: 1;
}

.choice-number {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  display: inline-flex;
  width: 32px;
  height: 32px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--teal-bright);
  box-shadow: 0 3px 10px rgba(5, 65, 59, 0.22);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
}

.choice-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 84px;
  grid-row: 1 / -1;
  background: var(--surface-subtle);
  object-fit: cover;
  object-position: center 24%;
}

.choice-label {
  display: flex;
  min-width: 0;
  padding: 12px 12px 8px;
  align-items: center;
  justify-content: space-between;
  align-self: center;
  gap: 8px;
}

.choice-champion {
  min-width: 0;
  overflow: hidden;
  font-size: clamp(0.95rem, 3vw, 1.15rem);
  font-weight: 820;
  letter-spacing: -0.035em;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.choice-slot {
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--teal-bright) 45%, var(--border));
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  background: color-mix(in srgb, var(--teal-soft) 55%, var(--surface));
  font-size: 1.1rem;
  font-weight: 850;
}

.choice-feedback {
  min-height: 24px;
  padding: 0 12px 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 780;
  line-height: 1.35;
}

.choice-feedback:empty {
  display: none;
}

.choice-button.choice-button--cooldown {
  display: flex;
  min-height: 112px;
  padding: 34px 12px 10px;
  flex-direction: column;
  justify-content: center;
  container-name: cooldown-answer;
  container-type: inline-size;
}

.cooldown-choice {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 7px;
  font-variant-numeric: tabular-nums;
}

.cooldown-choice__row {
  display: grid;
  min-width: 0;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
}

.cooldown-choice__row-label {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-align: left;
  white-space: nowrap;
}

.cooldown-choice__unit {
  display: inline;
}

.cooldown-choice__cells {
  display: grid;
  min-width: 0;
}

.cooldown-choice--ranks-3 .cooldown-choice__cells {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cooldown-choice--ranks-5 .cooldown-choice__cells {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.cooldown-choice--ranks-6 .cooldown-choice__cells {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.cooldown-choice__cell {
  min-width: 0;
  padding: 3px 0;
  border-left: 1px solid var(--border);
  font-size: 0.78rem;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
}

.cooldown-choice__cell--rank {
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 720;
}

.cooldown-choice__cell--value {
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 820;
  letter-spacing: -0.045em;
}

.cooldown-choice--ranks-5 .cooldown-choice__cell--value,
.cooldown-choice--ranks-6 .cooldown-choice__cell--value {
  letter-spacing: -0.065em;
}

@container cooldown-answer (max-width: 270px) {
  .cooldown-choice--dense .cooldown-choice__unit {
    display: none;
  }

  .cooldown-choice--dense .cooldown-choice__row {
    grid-template-columns: 28px minmax(0, 1fr);
  }
}

.choice-button--cooldown .choice-feedback {
  width: 100%;
  min-height: 0;
  padding: 7px 0 0;
}

.choice-button--selected {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent),
    var(--shadow-small);
}

.choice-button--correct {
  border-color: var(--success-border);
  background: var(--success-soft);
  animation: choice-confirm 420ms var(--ease-out) both;
}

.choice-button--correct .choice-number,
.choice-button--correct .choice-feedback {
  color: #ffffff;
  background: var(--success);
}

.choice-button--correct .choice-feedback {
  color: var(--success);
  background: transparent;
}

.choice-button--incorrect {
  border-color: var(--danger-border);
  background: var(--danger-soft);
  animation: choice-miss 300ms ease-out both;
}

.choice-button--incorrect .choice-number {
  background: var(--danger);
}

.choice-button--incorrect .choice-feedback {
  color: var(--danger);
}

.explanation {
  display: grid;
  margin: clamp(22px, 4vw, 34px) auto 0;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-small);
}

.explanation:not([hidden]) {
  transform-origin: top center;
  animation: explanation-enter 360ms var(--ease-out) both;
}

.explanation--correct {
  border-color: var(--success-border);
}

.explanation--incorrect {
  border-color: var(--danger-border);
}

.explanation-status {
  grid-column: 1 / -1;
  margin-bottom: 20px;
  font-size: 1rem;
  font-weight: 820;
}

.explanation--correct .explanation-status {
  color: var(--success);
}

.explanation--incorrect .explanation-status {
  color: var(--danger);
}

.answer-reveal {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 18px;
}

.answer-reveal[hidden],
.cooldown-answer-reveal[hidden] {
  display: none;
}

.cooldown-answer-reveal {
  display: grid;
  width: min(100%, 560px);
  min-width: 0;
  padding: 12px clamp(10px, 2vw, 16px);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-raised);
}

.cooldown-answer-reveal .cooldown-choice {
  width: 100%;
}

.explanation--cooldown .explanation-status {
  grid-column: 1;
  margin-bottom: 0;
}

.explanation--cooldown .cooldown-answer-reveal {
  grid-column: 1 / -1;
  grid-row: 2;
  margin-top: 18px;
}

.explanation--cooldown .primary-button {
  grid-column: 2;
  grid-row: 1;
}

.answer-images {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(2, 62px);
  gap: 8px;
}

.answer-images img {
  width: 62px;
  height: 62px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-raised);
  object-fit: cover;
}

.answer-identity {
  min-width: 0;
}

.answer-identity h3,
.answer-identity p {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  font-weight: 800;
  line-height: 1.3;
}

.answer-identity h3 {
  margin-bottom: 2px;
  letter-spacing: -0.025em;
}

.explanation .primary-button {
  width: auto;
  min-width: 160px;
  margin-top: 0;
}

.result-screen {
  text-align: center;
}

.result-screen .eyebrow {
  text-align: center;
}

.result-screen h1 {
  margin-right: auto;
  margin-left: auto;
}

.result-score {
  display: block;
  margin-top: clamp(30px, 6vw, 50px);
  color: var(--text);
  font-size: clamp(3.5rem, 14vw, 7rem);
  font-variant-numeric: tabular-nums;
  font-weight: 840;
  letter-spacing: -0.07em;
  line-height: 1;
}

.result-screen:not([hidden]) .result-score {
  animation: result-score-enter 520ms var(--ease-out) 80ms both;
}

.result-accuracy {
  margin: 14px 0 0;
  color: var(--teal);
  font-size: 1.08rem;
  font-weight: 760;
}

.result-screen:not([hidden]) .result-accuracy {
  animation: result-detail-enter 380ms var(--ease-out) 160ms both;
}

.result-actions {
  display: grid;
  width: min(100%, 380px);
  margin: clamp(38px, 7vw, 58px) auto 0;
  gap: 10px;
}

.result-screen:not([hidden]) .result-actions {
  animation: result-detail-enter 380ms var(--ease-out) 220ms both;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 95%, transparent);
}

.site-footer__inner {
  width: min(100%, 1100px);
  margin: 0 auto;
  padding: 30px max(20px, env(safe-area-inset-right))
    max(34px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

.footer-meta {
  display: flex;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.site-footer h2 {
  margin-bottom: 7px;
  font-size: 0.82rem;
}

.site-footer p,
.site-footer a {
  font-size: 0.72rem;
}

.site-footer p {
  max-width: 920px;
  margin: 0 0 7px;
  color: var(--text-muted);
  line-height: 1.6;
}

.noscript-message {
  position: fixed;
  z-index: 90;
  right: 16px;
  bottom: 16px;
  left: 16px;
  padding: 16px;
  border: 1px solid var(--danger-border);
  border-radius: 12px;
  color: var(--danger);
  background: var(--danger-soft);
  text-align: center;
}

@keyframes screen-enter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.995);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes question-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes choice-enter {
  from {
    opacity: 0;
    transform: translateY(9px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes choice-confirm {
  0% {
    transform: scale(0.985);
  }

  48% {
    transform: scale(1.012);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes choice-miss {
  0%,
  100% {
    transform: translateX(0);
  }

  35% {
    transform: translateX(-3px);
  }

  68% {
    transform: translateX(3px);
  }
}

@keyframes explanation-enter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes result-score-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes result-detail-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 640px) {
  .answer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .choice-button {
    min-height: 182px;
    grid-template-columns: 1fr;
    grid-template-rows: 118px auto auto;
  }

  .choice-image {
    min-height: 118px;
    max-height: 118px;
    grid-row: auto;
  }

  .choice-label {
    width: 100%;
    padding: 10px 14px 8px;
  }

  .choice-feedback {
    padding: 0 14px 9px;
  }

  .choice-button.choice-button--cooldown {
    min-height: 132px;
    padding: 34px 12px 12px;
  }

  .cooldown-choice__cell {
    font-size: 0.78rem;
  }

  .cooldown-choice__cell--value {
    font-size: 0.82rem;
  }

  .cooldown-choice--ranks-6 .cooldown-choice__cell--value {
    font-size: 0.76rem;
  }
}

@media (min-width: 960px) {
  .site-header__inner {
    min-height: 76px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .site-main {
    min-height: calc(100vh - 77px);
    padding-top: clamp(18px, 3vh, 30px);
    padding-bottom: clamp(28px, 4vh, 46px);
  }

  .quiz-progress-block {
    margin-bottom: clamp(14px, 2.5vh, 24px);
  }

  .question-counter {
    font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  }

  .quiz-card {
    display: grid;
    grid-template-columns: minmax(390px, 0.82fr) minmax(520px, 1.18fr);
  }

  .question-panel,
  .answers-panel {
    padding: clamp(26px, 2.6vw, 38px);
  }

  .question-panel {
    border-right: 1px solid var(--border);
  }

  .answers-panel {
    display: flex;
    border-top: 0;
    align-items: center;
  }

  .question-title {
    margin-bottom: 25px;
    font-size: 1.2rem;
  }

  .question-text {
    min-height: 0;
    margin-bottom: 24px;
    font-size: clamp(1.02rem, 1.55vw, 1.25rem);
    line-height: 1.65;
  }

  .skill-table th,
  .skill-table td {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .skill-extras {
    margin-top: 12px;
  }

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

  .answers-title::after {
    display: none;
  }

  .answer-grid {
    width: 100%;
    gap: 12px;
  }

  .choice-button {
    min-height: 226px;
    grid-template-rows: 162px auto auto;
  }

  .choice-image {
    min-height: 162px;
    max-height: 162px;
    padding: 6px;
    object-fit: contain;
  }

  .choice-button.choice-button--cooldown {
    min-height: 142px;
    padding: 34px 10px 12px;
  }

  .cooldown-choice {
    gap: 9px;
  }

  .cooldown-choice__row {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 4px;
  }

  .cooldown-choice__row-label {
    font-size: 0.68rem;
  }

  .cooldown-choice__cell {
    padding-top: 4px;
    padding-bottom: 4px;
    font-size: 0.78rem;
  }

  .cooldown-choice__cell--value {
    font-size: 0.82rem;
  }

  .cooldown-choice--ranks-6 .cooldown-choice__cell--value {
    font-size: 0.76rem;
  }

  .cooldown-choice__cell--rank {
    font-size: 0.7rem;
  }

  .explanation {
    width: min(100%, 920px);
  }
}

@media (min-width: 1200px) {
  .choice-button.choice-button--cooldown {
    min-height: 148px;
    padding: 38px 16px 13px;
  }

  .cooldown-choice__row {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 6px;
  }

  .cooldown-choice__row-label {
    font-size: 0.72rem;
  }

  .cooldown-choice__cell {
    padding-top: 5px;
    padding-bottom: 5px;
    font-size: 0.86rem;
  }

  .cooldown-choice__cell--value {
    font-size: 0.92rem;
  }

  .cooldown-choice--ranks-6 .cooldown-choice__cell--value {
    font-size: 0.84rem;
  }

  .cooldown-choice__cell--rank {
    font-size: 0.74rem;
  }
}

@media (min-width: 960px) and (max-height: 820px) {
  .site-main {
    padding-top: 14px;
    padding-bottom: 24px;
  }

  .quiz-progress-block {
    margin-bottom: 14px;
  }

  .question-panel,
  .answers-panel {
    padding: 24px;
  }

  .question-title {
    margin-bottom: 22px;
  }

  .question-text {
    margin-bottom: 18px;
    font-size: 1rem;
    line-height: 1.55;
  }

  .skill-table th,
  .skill-table td {
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .skill-extras {
    margin-top: 9px;
  }

  .choice-button {
    min-height: 206px;
    grid-template-rows: 148px auto auto;
  }

  .choice-image {
    min-height: 148px;
    max-height: 148px;
  }
}

@media (max-width: 639px) {
  .site-header__inner {
    min-height: 64px;
    padding: 8px max(12px, env(safe-area-inset-right)) 8px
      max(12px, env(safe-area-inset-left));
    gap: 10px;
  }

  .wordmark {
    gap: 6px;
    font-size: 0.96rem;
  }

  .wordmark__copy {
    gap: 5px;
  }

  .wordmark__mark {
    width: 42px;
    height: 42px;
  }

  .wordmark__credit {
    font-size: 0.48rem;
    line-height: 1.15;
  }

  .wordmark__credit--full {
    display: none;
  }

  .wordmark__credit--short {
    display: inline;
  }

  .language-control select {
    min-width: 108px;
    min-height: 44px;
    padding-right: 38px;
    padding-left: 34px;
    font-size: 0.82rem;
  }

  .language-control__icon {
    left: 10px;
    width: 17px;
    height: 17px;
  }

  .language-control__select-wrap::after {
    right: 13px;
    width: 6px;
    height: 6px;
  }

  .site-main {
    min-height: calc(100vh - 65px);
    padding-top: 14px;
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: 34px;
    padding-left: max(12px, env(safe-area-inset-left));
  }

  .screen {
    padding: 20px 16px;
    border-radius: 19px;
  }

  .quiz-screen {
    padding: 0;
  }

  .quiz-progress-block {
    margin-bottom: 14px;
    gap: 10px;
  }

  .question-counter {
    font-size: 1.15rem;
  }

  .question-panel,
  .answers-panel {
    padding: 18px 14px;
  }

  .question-title,
  .answers-title {
    margin-bottom: 20px;
    font-size: 1.03rem;
  }

  .question-title::after,
  .answers-title::after {
    bottom: -9px;
    width: 44px;
    height: 2px;
  }

  .question-skill-identity {
    padding: 8px 9px;
    margin-bottom: 13px;
    gap: 8px;
  }

  .question-skill-identity__images {
    grid-template-columns: repeat(2, 40px);
    gap: 4px;
  }

  .question-skill-identity__images img {
    width: 40px;
    height: 40px;
    border-radius: 9px;
  }

  .question-skill-identity__name {
    font-size: 0.88rem;
  }

  .question-skill-identity__slot {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 0.92rem;
  }

  .question-text {
    min-height: 0;
    margin-bottom: 16px;
    font-size: 0.94rem;
    line-height: 1.55;
  }

  .skill-table th,
  .skill-table td {
    padding: 6px 2px;
    font-size: 0.65rem;
    letter-spacing: -0.02em;
  }

  .skill-table th:first-child {
    width: 31%;
  }

  .skill-extras li:not(:last-child)::after {
    margin: 0 8px;
  }

  .skill-extras {
    margin-top: 9px;
    font-size: 0.72rem;
  }

  .answer-grid {
    gap: 8px;
  }

  .choice-button {
    min-height: 70px;
    grid-template-columns: 58px minmax(0, 1fr);
    grid-template-rows: minmax(46px, 1fr) auto;
  }

  .choice-image {
    min-height: 70px;
  }

  .choice-number {
    top: 5px;
    left: 5px;
    width: 27px;
    height: 27px;
    font-size: 0.78rem;
  }

  .choice-label {
    padding: 8px 10px 6px;
  }

  .choice-champion {
    font-size: 0.9rem;
  }

  .choice-slot {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .choice-feedback {
    min-height: 20px;
    padding: 0 10px 6px;
    font-size: 0.7rem;
  }

  .segmented-control span {
    padding: 7px 3px;
    font-size: 0.8rem;
  }

  .answer-reveal {
    align-items: center;
    flex-direction: row;
    gap: 10px;
  }

  .explanation {
    margin-top: 16px;
    padding: 18px 14px;
    column-gap: 10px;
  }

  .explanation-status {
    margin-bottom: 14px;
  }

  .explanation--cooldown .cooldown-answer-reveal {
    margin-top: 14px;
  }

  .answer-images {
    grid-template-columns: repeat(2, 44px);
    gap: 5px;
  }

  .answer-images img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }

  .answer-identity h3,
  .answer-identity p {
    font-size: 0.86rem;
  }

  .answer-identity h3 {
    margin-bottom: 2px;
  }

  .explanation .primary-button {
    min-width: 92px;
    min-height: 44px;
    padding: 10px 12px;
    margin-top: 0;
    font-size: 0.78rem;
  }

  .start-screen h1,
  .result-screen h1 {
    margin-bottom: 12px;
    font-size: 2rem;
  }

  .lead {
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .start-form {
    margin-top: 26px;
  }

  .question-mode,
  .question-count {
    margin-bottom: 18px;
  }
}

@media (max-width: 380px) {
  .site-header__inner {
    gap: 8px;
  }

  .wordmark {
    gap: 4px;
    font-size: 0.8rem;
  }

  .wordmark__mark {
    width: 34px;
    height: 34px;
  }

  .wordmark__copy {
    gap: 3px;
  }

  .wordmark__credit {
    font-size: 0.38rem;
  }

  .language-control select {
    min-width: 94px;
    padding-right: 30px;
    padding-left: 28px;
    font-size: 0.76rem;
  }

  .language-control__icon {
    left: 8px;
    width: 15px;
    height: 15px;
  }

  .language-control__select-wrap::after {
    right: 10px;
  }

  .cooldown-answer-reveal {
    padding-right: 6px;
    padding-left: 6px;
  }

  .cooldown-answer-reveal .cooldown-choice__row {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .question-panel,
  .answers-panel {
    padding: 16px 12px;
  }

  .question-title,
  .answers-title {
    margin-bottom: 18px;
  }

  .answer-grid {
    gap: 6px;
  }

  .choice-button {
    min-height: 60px;
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .choice-image {
    min-height: 60px;
  }

  .choice-label {
    padding-right: 10px;
    padding-left: 12px;
    gap: 8px;
  }

  .choice-slot {
    width: 32px;
    height: 32px;
  }

  .choice-button.choice-button--cooldown {
    min-height: 104px;
    padding: 31px 8px 9px;
  }

  .cooldown-choice__row {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 3px;
  }

  .cooldown-choice__row-label {
    font-size: 0.64rem;
  }

  .cooldown-choice__cell {
    font-size: 0.73rem;
  }

  .cooldown-choice__cell--rank {
    font-size: 0.62rem;
  }

  .segmented-control--mode span {
    font-size: 0.72rem;
  }
}

@media (hover: hover) and (pointer: fine) {
  .primary-button:not(:disabled):hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
  }

  .secondary-button:hover,
  .choice-button:not(:disabled):hover {
    border-color: var(--teal-bright);
    box-shadow: 0 9px 24px rgba(28, 43, 69, 0.13);
    transform: translateY(-2px);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0d1420;
    --surface: #151f2e;
    --surface-raised: #1a2637;
    --surface-subtle: #202e41;
    --text: #f2f6ff;
    --text-muted: #a9b7cd;
    --border: #334156;
    --border-strong: #52627a;
    --accent: #72a3ff;
    --accent-hover: #94b9ff;
    --accent-soft: #21365d;
    --accent-contrast: #08142c;
    --teal: #68dfcf;
    --teal-bright: #37c7b4;
    --teal-soft: #153d39;
    --success: #78d6aa;
    --success-soft: #17362c;
    --success-border: #408a67;
    --danger: #ff9b9e;
    --danger-soft: #3d2228;
    --danger-border: #915159;
    --focus: #9cc0ff;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    --shadow-small: 0 6px 18px rgba(0, 0, 0, 0.24);
  }

  body {
    background:
      radial-gradient(circle at 98% 18%, rgba(43, 120, 169, 0.18), transparent 17rem),
      radial-gradient(circle at 2% 78%, rgba(35, 119, 168, 0.15), transparent 19rem),
      radial-gradient(circle, rgba(221, 235, 255, 0.045) 0.7px, transparent 0.8px),
      var(--page);
    background-size: auto, auto, 13px 13px, auto;
  }

  .segmented-control input:checked + span {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
