:root {
  --blue: #0b67df;
  --blue-dark: #083e93;
  --ink: #13213a;
  --muted: #70809b;
  --line: #e6eef9;
  --yellow: #ffe31a;
  --soft-blue: #eef7ff;
  --soft-yellow: #fff9d8;
  --green: #10b981;
  --red: #ef4444;
  --shadow: 0 8px 18px rgba(32, 76, 125, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 227, 26, 0.24), transparent 26rem),
    linear-gradient(135deg, #f7fbff 0%, #eef7ff 100%);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Hiragino Sans", "Yu Gothic", "YuGothic", "Noto Sans JP", Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
}

.quiz-site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(230, 238, 249, 0.9);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.quiz-site-header-inner {
  width: min(100% - 36px, 980px);
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 0 auto;
}

.quiz-site-brand {
  flex: 0 0 auto;
  display: block;
  width: 168px;
}

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

.quiz-site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.quiz-site-nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.quiz-site-nav a:hover {
  background: var(--soft-blue);
}

.quiz-site-nav a.is-current {
  color: var(--ink);
  background: var(--yellow);
}

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

button {
  font: inherit;
  letter-spacing: 0;
}

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

.quiz-shell {
  width: min(100%, 1180px);
  min-height: calc(100vh - 77px);
  display: grid;
  place-items: start center;
  margin: 0 auto;
  padding: clamp(40px, 5vh, 64px) 18px 32px;
}

.quiz-app {
  width: 100%;
}

.screen,
.loading-panel,
.error-panel {
  position: relative;
  overflow: hidden;
  width: min(100%, 640px);
  margin: 0 auto;
  padding: 34px;
  border: 1px solid rgba(230, 238, 249, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.start-screen {
  overflow: visible;
  width: min(100%, 1120px);
  padding: 34px 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.quiz-screen,
.feedback-screen,
.result-screen,
.loading-panel,
.error-panel {
  width: min(100%, 640px);
}

.is-entering {
  animation: fade-slide 360ms ease both;
}

.hero-copy {
  text-align: center;
}

.hero-lead {
  max-width: 720px;
  margin: 0 auto 14px;
  color: var(--blue-dark);
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 900;
  line-height: 1.75;
}

.hero-lead-marker {
  display: inline;
  font-size: 2em;
  line-height: 1.35;
}

.hero-lead-marker-line {
  display: inline;
  padding: 0 0.1em;
  background:
    linear-gradient(transparent 58%, rgba(255, 227, 26, 0.82) 58%, rgba(255, 227, 26, 0.82) 91%, transparent 91%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.hero-lead-mobile-break {
  display: none;
}

.hero-copy h1,
.result-hero h1,
.error-panel h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 8vw, 46px);
  font-weight: 900;
  line-height: 1.15;
}

.hero-title {
  display: inline-block;
  color: transparent;
  background:
    linear-gradient(115deg, #0057ff 0%, #12a8ff 28%, #ffe31a 52%, #006dff 76%, #fff15a 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 12px rgba(11, 103, 223, 0.24));
}

.hero-subtitle {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
  font-weight: 800;
}

.hero-note {
  margin: 14px auto 0;
  color: var(--blue-dark);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.7;
}

.start-form {
  display: grid;
  gap: 20px;
  margin-top: 30px;
}

.field-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field-group legend,
.stats-section h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.chip,
.segment,
.category-card,
.primary-button,
.secondary-button,
.answer-button,
.share-link {
  border: 0;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease,
    border-color 160ms ease;
}

.category-scroll-wrap {
  position: relative;
  margin-inline: 0;
}

.category-card-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  overflow: visible;
  padding: 4px 0 16px;
  scrollbar-width: none;
  user-select: none;
}

.category-card-track::-webkit-scrollbar {
  height: 8px;
}

.category-card-track::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #c8d8ef;
}

.category-card {
  position: relative;
  flex: 0 0 176px;
  width: 100%;
  aspect-ratio: 3 / 4;
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 8px;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background:
    linear-gradient(180deg, #ffffff 0%, rgba(238, 247, 255, 0.78) 100%);
  box-shadow: 0 8px 16px rgba(32, 76, 125, 0.08);
  scroll-snap-align: start;
  text-align: left;
}

.category-card::after {
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: inherit;
  pointer-events: none;
  content: "";
}

.category-card.is-selected {
  background:
    linear-gradient(180deg, #ffffff 0%, #eef7ff 58%, #fff9d8 100%);
  box-shadow: 0 12px 24px rgba(11, 103, 223, 0.18);
}

.category-card.is-selected::after {
  border-color: var(--blue);
}

.category-card:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.category-card:disabled:hover {
  box-shadow: 0 8px 16px rgba(32, 76, 125, 0.08);
}

.category-card-name {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.category-card-count,
.category-card-cleared {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.category-card-rate {
  margin-top: auto;
  color: var(--blue);
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.category-card-progress {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #dbe8f8;
}

.category-card-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--yellow), var(--blue));
  transition: width 500ms ease-out;
}

.swipe-hint {
  position: fixed;
  top: var(--swipe-hint-top, 50%);
  left: 50%;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.swipe-hint[hidden] {
  display: none;
}

.swipe-hint span {
  display: block;
  font-size: 66px;
  line-height: 1;
  filter: drop-shadow(0 8px 12px rgba(32, 76, 125, 0.22));
  transform-origin: 50% 80%;
  animation: swipe-hand 1800ms ease-in-out infinite;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.chip span {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  color: var(--blue-dark);
  background: var(--soft-blue);
  font-size: 12px;
}

.chip.is-selected {
  border-color: rgba(11, 103, 223, 0.3);
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 8px 16px rgba(11, 103, 223, 0.18);
}

.chip.is-selected span {
  color: var(--ink);
  background: var(--yellow);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-blue);
}

.segment {
  min-height: 44px;
  border-radius: 6px;
  color: var(--blue-dark);
  background: transparent;
  font-size: 14px;
  font-weight: 900;
}

.segment.is-selected {
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 6px 14px rgba(32, 76, 125, 0.12);
}

.primary-button,
.secondary-button,
.share-link {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 900;
}

.primary-button {
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 10px 18px rgba(11, 103, 223, 0.24);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.secondary-button,
.share-link {
  border: 1px solid var(--line);
  color: var(--blue-dark);
  background: #ffffff;
}

.wrong-only-toggle {
  min-height: 52px;
  width: min(100%, 640px);
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(32, 76, 125, 0.06);
}

.wrong-only-toggle input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--blue);
}

.wrong-only-toggle:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.48;
}

.exam-start-button {
  --exam-button-lift: 0px;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 92px;
  width: min(100%, 440px);
  justify-self: center;
  padding: 18px 18px;
  border: 1px solid rgba(255, 227, 26, 0.72);
  border-radius: 8px;
  line-height: 1.45;
  text-align: center;
  white-space: normal;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.44), transparent 28%),
    linear-gradient(115deg, #004fd1 0%, #0b67df 38%, #15a7ff 58%, #ffe31a 100%);
  box-shadow:
    0 0 0 3px rgba(255, 227, 26, 0.2),
    0 18px 34px rgba(11, 103, 223, 0.34),
    0 0 34px rgba(255, 227, 26, 0.54);
  transform-origin: center;
  animation: exam-button-breathe 2600ms ease-in-out infinite;
  will-change: transform;
}

.exam-start-button::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    repeating-linear-gradient(
      110deg,
      rgba(255, 255, 255, 0) 0 24px,
      rgba(255, 255, 255, 0.16) 24px 34px,
      rgba(255, 227, 26, 0.14) 34px 46px,
      rgba(255, 255, 255, 0) 46px 72px
    );
  background-size: 96px 96px;
  opacity: 0.42;
  animation: exam-soft-flow 7200ms linear infinite;
  pointer-events: none;
  content: "";
}

.exam-start-button::after {
  position: absolute;
  inset: 2px;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.18);
  opacity: 0.86;
  animation: exam-button-glow 2600ms ease-in-out infinite;
  pointer-events: none;
  content: "";
}

.exam-button-title {
  position: relative;
  z-index: 2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 18px;
  line-height: 1.35;
  text-shadow:
    0 2px 8px rgba(8, 62, 147, 0.4),
    0 0 12px rgba(255, 227, 26, 0.46);
}

.exam-start-copy {
  margin: -8px 0 0;
  color: var(--blue-dark);
  text-align: center;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.75;
}

.data-foot {
  margin: -8px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  font-weight: 800;
}

.data-foot span {
  display: block;
  margin-top: 6px;
  color: var(--blue-dark);
}

.quiz-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.quiz-header > div {
  flex: 1;
}

.quiz-header p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.progress-track,
.mini-track {
  overflow: hidden;
  border-radius: 999px;
  background: #dbe8f8;
}

.progress-track {
  width: 100%;
  height: 12px;
}

.progress-track span,
.mini-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--yellow), var(--blue));
  transition: width 500ms ease-out;
}

.category-badge {
  flex: 0 0 auto;
  max-width: 48%;
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--blue-dark);
  background: var(--soft-blue);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
}

.question-card {
  min-height: 210px;
  display: grid;
  place-items: center;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(238, 247, 255, 0.68), rgba(255, 255, 255, 0.94)),
    #ffffff;
  box-shadow: 0 8px 16px rgba(32, 76, 125, 0.08);
  animation: card-rise 420ms ease both;
}

.question-card p {
  margin: 0;
  color: var(--ink);
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 900;
  line-height: 1.45;
  text-align: center;
}

.quiz-back-button {
  width: min(100%, 260px);
  min-height: 46px;
  display: flex;
  margin: 16px auto 0;
  font-size: 14px;
}

.quiz-back-button.is-bottom {
  margin-top: 22px;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.answer-grid.is-choice-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

.answer-button {
  min-height: 112px;
  border: 2px solid var(--line);
  border-radius: 8px;
  color: var(--blue-dark);
  background: #ffffff;
  box-shadow: 0 8px 16px rgba(32, 76, 125, 0.08);
}

.answer-button .answer-symbol {
  font-size: clamp(42px, 12vw, 64px);
  font-weight: 900;
  line-height: 1;
}

.answer-button.is-choice-answer {
  min-height: 72px;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  text-align: left;
}

.answer-option-key {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--blue);
  font-size: 18px;
  font-weight: 900;
}

.answer-option-text {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.55;
}

.feedback-screen.is-wrong {
  animation: fade-slide 260ms ease both, shake 420ms ease 160ms;
}

.result-mark {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 8px 0 24px;
  text-align: center;
}

.result-mark > span {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 38px;
  font-weight: 900;
}

.is-correct .result-mark > span {
  background: var(--green);
  box-shadow: 0 10px 18px rgba(16, 185, 129, 0.22);
}

.is-wrong .result-mark > span {
  background: var(--red);
  box-shadow: 0 10px 18px rgba(239, 68, 68, 0.2);
}

.result-mark h2 {
  margin: 0;
  font-size: 30px;
  font-weight: 900;
}

.result-mark p {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.result-mark strong {
  color: var(--ink);
  font-size: 22px;
}

.explain-card,
.note-card,
.title-card,
.stats-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 16px rgba(32, 76, 125, 0.08);
}

.explain-card,
.note-card {
  padding: 22px;
}

.note-card {
  margin-top: 14px;
  background: var(--soft-yellow);
}

.explain-card h3,
.note-card h3 {
  margin: 0 0 10px;
  color: var(--blue-dark);
  font-size: 16px;
  font-weight: 900;
}

.note-card h3::before {
  content: "💡 ";
}

.explain-card p,
.note-card p,
.title-card p {
  margin: 0;
  line-height: 1.8;
}

.explain-card a,
.note-card a {
  color: var(--blue);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.feedback-screen .primary-button {
  width: 100%;
  margin-top: 22px;
}

.confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.confetti span {
  position: absolute;
  top: -14px;
  left: calc((var(--i) + 1) * 5.8%);
  width: 9px;
  height: 16px;
  border-radius: 2px;
  background: var(--yellow);
  animation: confetti-fall 900ms ease-out both;
  animation-delay: calc(var(--i) * 22ms);
}

.confetti span:nth-child(3n) {
  background: var(--blue);
}

.confetti span:nth-child(3n + 1) {
  background: var(--green);
}

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

.score-line {
  margin: 24px 0 0;
  color: var(--ink);
  font-size: clamp(46px, 14vw, 76px);
  font-weight: 900;
  line-height: 1;
}

.score-percent {
  margin: 8px 0 0;
  color: var(--blue);
  font-size: 28px;
  font-weight: 900;
}

.title-card {
  margin-top: 26px;
  padding: 24px;
  text-align: center;
  background: linear-gradient(180deg, var(--soft-yellow), #ffffff);
}

.title-card .stars {
  margin: 0 0 8px;
  color: #f5b700;
  font-size: 28px;
  letter-spacing: 2px;
}

.title-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 900;
}

.stats-section {
  margin-top: 18px;
  padding: 22px;
}

.stats-list {
  display: grid;
  gap: 13px;
}

.stat-row {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) minmax(110px, 1.5fr) 48px;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.mini-track {
  height: 10px;
}

.stat-row strong {
  color: var(--ink);
  text-align: right;
}

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

.result-bottom-action {
  grid-template-columns: 1fr;
  margin-top: 14px;
}

.share-panel {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.share-panel[hidden] {
  display: none;
}

.loading-panel,
.error-panel {
  text-align: center;
}

.loading-panel h1 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: clamp(28px, 7vw, 42px);
  font-weight: 900;
  line-height: 1.2;
}

.loading-panel p,
.error-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.loading-summary {
  max-width: 480px;
  margin: 12px auto 0;
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 800;
}

.error-panel p + p {
  margin-top: 12px;
}

.chip:hover,
.segment:hover,
.category-card:hover,
.primary-button:hover:not(:disabled),
.secondary-button:hover,
.answer-button:hover,
.share-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(32, 76, 125, 0.14);
}

.exam-start-button:hover:not(:disabled) {
  --exam-button-lift: -2px;

  box-shadow:
    0 0 0 5px rgba(255, 227, 26, 0.42),
    0 0 0 12px rgba(255, 227, 26, 0.14),
    0 24px 48px rgba(11, 103, 223, 0.48),
    0 0 74px rgba(255, 227, 26, 0.96),
    0 0 34px rgba(21, 167, 255, 0.7);
}

.exam-start-button:hover:not(:disabled)::before {
  opacity: 0.82;
  animation: exam-soft-flow 1900ms linear infinite;
}

.exam-start-button:hover:not(:disabled)::after {
  border-color: rgba(255, 255, 255, 0.82);
  animation: exam-button-hover-flare 760ms ease-in-out infinite;
}

@media (max-width: 767px) {
  .exam-start-button:not(:disabled) {
    --exam-button-lift: -2px;

    box-shadow:
      0 0 0 5px rgba(255, 227, 26, 0.42),
      0 0 0 12px rgba(255, 227, 26, 0.14),
      0 24px 48px rgba(11, 103, 223, 0.48),
      0 0 74px rgba(255, 227, 26, 0.96),
      0 0 34px rgba(21, 167, 255, 0.7);
  }

  .exam-start-button:not(:disabled)::before {
    opacity: 0.82;
    animation: exam-soft-flow 1900ms linear infinite;
  }

  .exam-start-button:not(:disabled)::after {
    border-color: rgba(255, 255, 255, 0.82);
    animation: exam-button-hover-flare 760ms ease-in-out infinite;
  }
}

.answer-button:hover {
  border-color: rgba(11, 103, 223, 0.35);
}

.seo-guide {
  width: 100%;
  padding: clamp(48px, 7vw, 78px) 18px 58px;
  border-top: 1px solid rgba(198, 216, 239, 0.75);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.46) 0%, rgba(238, 247, 255, 0.86) 100%);
}

.seo-guide-inner {
  width: min(100%, 980px);
  margin: 0 auto;
}

.seo-kicker {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.4;
  text-transform: uppercase;
}

.seo-guide h2 {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(27px, 4vw, 40px);
  font-weight: 900;
  line-height: 1.28;
}

.seo-lede {
  max-width: 820px;
  margin: 18px 0 0;
  color: #3d4e68;
  font-size: 16px;
  font-weight: 700;
  line-height: 2;
}

.seo-topic-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 36px;
  margin-top: 36px;
  border-top: 1px solid rgba(198, 216, 239, 0.9);
}

.seo-topic {
  padding: 24px 0;
  border-bottom: 1px solid rgba(198, 216, 239, 0.9);
}

.seo-topic h3,
.seo-faq h3 {
  margin: 0 0 10px;
  color: var(--blue-dark);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.55;
}

.seo-topic p,
.seo-faq p {
  margin: 0;
  color: #42536c;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.95;
}

.seo-faq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 36px;
  margin-top: 30px;
}

.seo-faq > div {
  padding-top: 20px;
  border-top: 2px solid rgba(11, 103, 223, 0.16);
}

.creator-profile {
  width: min(100%, 900px);
  margin: 68px auto 0;
}

.creator-profile-label {
  margin: 0 0 5px;
  color: #00aeef;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1.6;
  text-transform: uppercase;
}

.creator-profile-card {
  display: flex;
  align-items: flex-start;
  gap: 25px;
  padding: 30px;
  border: 1px solid #eeeeee;
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.creator-avatar {
  flex: 0 0 100px;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 4px solid #ffffff;
  border-radius: 50%;
  background: #f0f4f8;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.creator-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.creator-profile-body {
  min-width: 0;
  flex: 1 1 auto;
}

.creator-profile-name {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.6;
}

.creator-profile-copy {
  margin: 0 0 15px;
  color: #4a5568;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.8;
}

.creator-profile-action {
  min-height: 39px;
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 999px;
  color: #ffffff;
  background: #000000;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.6;
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.creator-profile-action:hover {
  background: #1f2937;
  transform: translateY(-1px);
}

.creator-profile-action-icon {
  font-size: 13px;
  line-height: 1;
}

.chip:focus-visible,
.segment:focus-visible,
.category-card:focus-visible,
.wrong-only-toggle:focus-within,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.answer-button:focus-visible,
.share-link:focus-visible,
.creator-profile-action:focus-visible,
.quiz-site-brand:focus-visible,
.quiz-site-nav a:focus-visible {
  outline: 3px solid rgba(11, 103, 223, 0.35);
  outline-offset: 3px;
}

@keyframes fade-slide {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

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

@keyframes card-rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-8px);
  }

  40%,
  80% {
    transform: translateX(8px);
  }
}

@keyframes confetti-fall {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0deg);
  }

  20% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(230px) rotate(260deg);
  }
}

@keyframes swipe-hand {
  0%,
  100% {
    transform: translateX(8px) rotate(8deg);
  }

  45% {
    transform: translateX(-18px) rotate(-16deg);
  }

  65% {
    transform: translateX(-18px) rotate(-16deg);
  }
}

@keyframes exam-soft-flow {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 96px 0;
  }
}

@keyframes exam-button-breathe {
  0%,
  100% {
    transform: translateY(var(--exam-button-lift)) scale(1);
  }

  50% {
    transform: translateY(var(--exam-button-lift)) scale(1.035);
  }
}

@keyframes exam-button-glow {
  0%,
  100% {
    opacity: 0.78;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.18);
  }

  50% {
    opacity: 1;
    box-shadow:
      inset 0 0 24px rgba(255, 255, 255, 0.26),
      0 0 24px rgba(255, 227, 26, 0.32);
  }
}

@keyframes exam-button-hover-flare {
  0%,
  100% {
    opacity: 0.9;
    box-shadow:
      inset 0 0 22px rgba(255, 255, 255, 0.28),
      0 0 22px rgba(255, 227, 26, 0.42);
  }

  42% {
    opacity: 1;
    box-shadow:
      inset 0 0 34px rgba(255, 255, 255, 0.5),
      0 0 36px rgba(255, 227, 26, 0.78),
      0 0 64px rgba(21, 167, 255, 0.46);
  }

  68% {
    opacity: 1;
    box-shadow:
      inset 0 0 40px rgba(255, 255, 255, 0.58),
      0 0 48px rgba(255, 227, 26, 0.92),
      0 0 84px rgba(255, 227, 26, 0.42);
  }
}

@media (prefers-reduced-motion: reduce) {
  .exam-start-button,
  .exam-start-button::before,
  .exam-start-button::after {
    animation: none;
  }
}

@media (max-width: 767px) {
  .quiz-site-header {
    position: static;
  }

  .quiz-site-header-inner {
    width: min(100% - 28px, 980px);
    min-height: 68px;
    gap: 12px;
  }

  .quiz-site-brand {
    width: 122px;
  }

  .quiz-site-nav {
    gap: 4px;
  }

  .quiz-site-nav a {
    min-height: 32px;
    padding: 0 8px;
    font-size: 11px;
  }

  .quiz-shell {
    display: block;
    min-height: calc(100svh - 68px);
    padding: 0;
  }

  .screen,
  .loading-panel,
  .error-panel {
    min-height: calc(100svh - 68px);
    width: 100%;
    padding: 28px 18px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .start-screen {
    padding-inline: 18px;
  }

  .hero-copy h1,
  .result-hero h1,
  .error-panel h1 {
    font-size: 34px;
  }

  .hero-lead {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.7;
  }

  .hero-lead-marker .hero-lead-desktop-punctuation {
    display: none;
  }

  .hero-lead-mobile-break {
    display: block;
  }

  .category-scroll-wrap {
    margin-inline: -18px;
  }

  .category-card-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-inline: 18px;
    scroll-padding-inline: 18px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    cursor: grab;
  }

  .category-card-track.is-dragging {
    cursor: grabbing;
  }

  .category-card {
    flex-basis: 156px;
    width: auto;
    padding: 16px 14px;
  }

  .category-card-name {
    font-size: 16px;
  }

  .category-card-rate {
    font-size: 31px;
  }

  .chip {
    justify-content: space-between;
    min-width: 0;
    padding-inline: 11px;
    gap: 6px;
    font-size: 12px;
  }

  .chip span {
    min-width: 22px;
    height: 22px;
    padding-inline: 6px;
  }

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

  .exam-start-button {
    min-height: 86px;
    width: 100%;
    padding: 16px 10px;
  }

  .exam-button-title {
    font-size: 15px;
  }

  .quiz-header {
    align-items: flex-start;
    margin-bottom: 22px;
  }

  .category-badge {
    max-width: 42%;
  }

  .question-card {
    min-height: 250px;
    padding: 24px 18px;
  }

  .quiz-back-button {
    width: 100%;
  }

  .answer-grid,
  .action-row,
  .share-panel {
    grid-template-columns: 1fr;
  }

  .answer-button {
    min-height: 92px;
  }

  .answer-button.is-choice-answer {
    min-height: 76px;
    grid-template-columns: 38px 1fr;
    padding: 13px 14px;
  }

  .answer-option-key {
    width: 38px;
    height: 38px;
  }

  .stat-row {
    grid-template-columns: 1fr 84px;
    gap: 8px;
  }

  .stat-row .mini-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .seo-guide {
    padding: 42px 18px 46px;
  }

  .seo-kicker {
    margin-bottom: 10px;
  }

  .seo-guide h2 {
    font-size: 27px;
  }

  .seo-lede {
    font-size: 15px;
    line-height: 1.9;
  }

  .seo-topic-grid,
  .seo-faq {
    grid-template-columns: 1fr;
  }

  .seo-topic-grid {
    margin-top: 30px;
  }

  .seo-topic {
    padding: 22px 0;
  }

  .creator-profile {
    margin-top: 46px;
  }

  .creator-profile-card {
    flex-direction: column;
    gap: 16px;
    padding: 22px;
  }

  .creator-avatar {
    flex-basis: 86px;
    width: 86px;
    height: 86px;
  }

  .creator-profile-name {
    font-size: 20px;
  }

  .creator-profile-copy {
    font-size: 14px;
  }

  .creator-profile-action {
    width: 100%;
    padding-inline: 14px;
    font-size: 13px;
    text-align: center;
  }

  .creator-profile-action span:last-child {
    overflow-wrap: anywhere;
  }
}

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