:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --background: #101116;
  --surface: #181a21;
  --surface-raised: #20232c;
  --text: #f5f4f1;
  --muted: #9396a3;
  --lime: #d6fc65;
  --border: rgba(255, 255, 255, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(119, 130, 73, 0.13), transparent 42%),
    var(--background);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 4px;
}

.game-shell {
  width: min(100% - 40px, 680px);
  margin: 0 auto;
  padding: 28px 0 30px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
}

.wordmark {
  color: var(--text);
  font-size: 30px;
  font-weight: 850;
  letter-spacing: -3px;
  text-decoration: none;
}

.wordmark span {
  color: var(--lime);
}

.daily-label,
.date-label,
.eyebrow,
.progress-heading,
.card-footer {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 1.4px;
}

.daily-label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #d0d1d6;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px rgba(214, 252, 101, 0.7);
}

.date-label {
  color: var(--muted);
  letter-spacing: 0.7px;
}

.game-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(28, 30, 38, 0.98), rgba(22, 24, 31, 0.98));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.25);
}

.intro {
  padding: 43px 48px 31px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--lime);
}

h1 {
  margin: 0;
  font-size: clamp(36px, 7vw, 52px);
  font-weight: 780;
  letter-spacing: -2.8px;
  line-height: 1.04;
}

h1 span {
  color: var(--lime);
}

.intro-copy {
  max-width: 400px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.game-content {
  margin: 0 48px 37px;
  padding: 23px 24px 26px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(12, 13, 17, 0.47);
}

.start-screen {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 0 54px 39px;
  padding: 23px 25px;
  border: 1px solid rgba(85, 70, 219, 0.14);
  border-radius: 15px;
  background:
    radial-gradient(circle at 100% 0%, rgba(85, 70, 219, 0.08), transparent 40%),
    var(--surface-raised);
}

.start-screen[hidden] {
  display: none;
}

.start-copy {
  min-width: 0;
}

.start-kicker {
  margin: 0 0 7px;
  color: var(--violet);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.start-copy h2 {
  margin: 0;
  color: #25243a;
  font-size: 21px;
  letter-spacing: -0.5px;
}

.start-status {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.start-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.progress-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  letter-spacing: 1px;
}

.progress-heading p {
  margin: 0;
}

.progress-heading p span,
.score-label {
  color: var(--muted);
}

.score-label strong {
  color: var(--lime);
}

.score-label span {
  color: var(--muted);
}

.progress-track {
  height: 4px;
  margin-top: 15px;
  overflow: hidden;
  border-radius: 10px;
  background: #30323a;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--lime);
  transition: width 180ms ease;
}

.question-area {
  padding-top: 29px;
}

.rarity-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: -7px 0 19px;
}

.rarity-item {
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.rarity-item:last-child {
  border-color: rgba(214, 252, 101, 0.35);
  color: var(--lime);
}

.question-number {
  margin: 0 0 9px;
  color: var(--lime);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 1px;
}

.timer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 1px;
}

.timer-value {
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.timer-track {
  height: 4px;
  margin-bottom: 20px;
  overflow: hidden;
  border-radius: 10px;
  background: #30323a;
}

.timer-track span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--lime);
  transition: width 100ms linear;
}

.timer-track.is-low span {
  background: #ff9a91;
}

.question-area h2,
.complete-screen h2 {
  margin: 0 0 22px;
  font-size: clamp(19px, 4vw, 23px);
  font-weight: 620;
  letter-spacing: -0.5px;
  line-height: 1.4;
}

.answer-row {
  display: flex;
  gap: 10px;
}

.answer-row input {
  width: 100%;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
}

.answer-row input::placeholder {
  color: #777a86;
}

.submit-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 17px;
  border: 0;
  border-radius: 8px;
  background: var(--lime);
  color: #171a0d;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  transition: background 150ms ease, transform 150ms ease;
}

.submit-button:hover {
  transform: translateY(-1px);
  background: #e2ff86;
}

.feedback {
  margin-top: 15px;
  font-size: 13px;
  font-weight: 600;
}

.is-correct {
  color: var(--lime);
}

.is-incorrect {
  color: #ff9a91;
}

.complete-screen {
  padding: 17px 48px 39px;
}

.complete-screen[hidden],
.game-content[hidden] {
  display: none;
}

.final-score {
  margin: 4px 0 12px;
  color: var(--lime);
  font-size: 76px;
  font-weight: 780;
  letter-spacing: -5px;
  line-height: 1;
}

.final-score span {
  color: var(--muted);
  font-size: 20px;
  letter-spacing: -1px;
}

.complete-screen h2 {
  margin-bottom: 0;
  font-size: 25px;
}

.results-review {
  margin-top: 28px;
  text-align: left;
}

.results-review h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.guess-review,
.attempt-list,
.answer-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.guess-review {
  display: grid;
  gap: 9px;
}

.guess-review-item {
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(12, 13, 17, 0.35);
}

.question-review-content h4 {
  margin: 0 0 9px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
}

.question-review-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.question-review-summary::after {
  width: 7px;
  height: 7px;
  margin: 3px 2px 0 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  flex: 0 0 auto;
  transform: rotate(45deg);
  transition: transform 150ms ease;
}

.question-answer-details[open] > .question-review-summary::after {
  transform: rotate(225deg);
}

.question-review-summary::-webkit-details-marker {
  display: none;
}

.question-review-prompt {
  min-width: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.question-review-result {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.5;
  text-align: right;
}

.question-review-content {
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid var(--border);
}

.accepted-answers-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px !important;
}

.question-answer-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.attempt-list {
  display: grid;
  gap: 6px;
}

.attempt-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #d3d4d8;
  font-size: 12px;
}

.attempt-text {
  overflow-wrap: anywhere;
}

.attempt-rarity,
.answer-entry-rarity {
  flex: 0 0 auto;
  color: var(--lime);
  font-size: 10px;
  font-weight: 700;
}

.attempt-rarity.is-missed {
  color: #ff9a91;
}

.no-guess {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.answer-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.answer-controls label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.answer-controls input,
.answer-controls select {
  min-width: 0;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 12px;
}

.answer-count {
  margin: 0;
  padding: 0 0 9px;
  color: var(--muted);
  font-size: 10px;
}

.answer-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.answer-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  border-color: color-mix(in srgb, var(--answer-rarity-color, var(--border)) 60%, var(--border));
  background: color-mix(in srgb, var(--answer-rarity-color, var(--surface)) 22%, var(--surface));
}

.answer-list .no-matching-answers {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
}

.answer-entry-name {
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 650;
}

.replay-button {
  margin-top: 23px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 17px 48px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 1px;
}

.test-reset {
  padding: 0;
  border: 0;
  background: transparent;
  color: #777a86;
  cursor: pointer;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

.test-reset:hover {
  color: var(--lime);
}

.footer-icon {
  margin-right: 5px;
  color: var(--lime);
  font-size: 12px;
}

.page-note {
  margin: 20px 0 0;
  color: #777a86;
  font-size: 12px;
  text-align: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 560px) {
  .game-shell {
    width: min(100% - 24px, 680px);
    padding-top: 18px;
  }

  .topbar {
    margin-bottom: 28px;
  }

  .daily-label {
    font-size: 9px;
  }

  .intro {
    padding: 32px 24px 25px;
  }

  .game-content {
    margin: 0 16px 23px;
    padding: 20px 17px 22px;
  }

  .complete-screen {
    padding: 12px 24px 30px;
  }

  .answer-list {
    grid-template-columns: 1fr;
  }

  .answer-row {
    flex-direction: column;
  }

  .submit-button {
    width: 100%;
  }

  .card-footer {
    padding: 15px 20px;
    font-size: 8px;
    letter-spacing: 0.6px;
  }
}

:root {
  color-scheme: light;
  --background: #f3f0e7;
  --surface: #fffdf7;
  --surface-raised: #f6f5ed;
  --text: #202524;
  --muted: #747a72;
  --lime: #d7ff62;
  --border: rgba(32, 37, 36, 0.12);
  --violet: #5546db;
  --coral: #ff7863;
}

body {
  position: relative;
  background:
    radial-gradient(ellipse at 9% 9%, rgba(255, 120, 99, 0.15), transparent 29%),
    radial-gradient(ellipse at 94% 29%, rgba(85, 70, 219, 0.13), transparent 32%),
    var(--background);
  color: var(--text);
}

body::before {
  position: fixed;
  z-index: -1;
  background-image: radial-gradient(rgba(32, 37, 36, 0.12) 0.7px, transparent 0.7px);
  background-size: 17px 17px;
  content: "";
  inset: 0;
  opacity: 0.26;
  pointer-events: none;
}

.game-shell {
  width: min(100% - 40px, 760px);
  padding-top: 30px;
}

.topbar {
  margin-bottom: 27px;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.theme-picker select {
  max-width: 120px;
  padding: 8px 11px;
  border: 1px solid rgba(85, 70, 219, 0.18);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.82);
  color: #4a466a;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}

.wordmark {
  color: #24233a;
  font-size: 34px;
  letter-spacing: -3.5px;
}

.wordmark span {
  color: var(--violet);
}

.daily-label {
  padding: 10px 14px;
  border: 1px solid rgba(85, 70, 219, 0.14);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.72);
  color: #4a466a;
  letter-spacing: 1.2px;
}

.live-dot {
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 120, 99, 0.13);
}

.date-label {
  color: #666b65;
  font-size: 11px;
}

.game-card {
  border: 1px solid rgba(45, 42, 63, 0.1);
  border-radius: 25px;
  background: var(--surface);
  box-shadow:
    0 32px 80px rgba(44, 37, 68, 0.11),
    0 3px 10px rgba(44, 37, 68, 0.04);
}

.intro {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 49px 54px 39px;
  background: linear-gradient(118deg, #25243f 0%, #373264 53%, #5144a4 100%);
}

.intro::before,
.intro::after {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.intro::before {
  top: -165px;
  right: -88px;
  width: 345px;
  height: 345px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 0 0 28px rgba(255, 255, 255, 0.035),
    0 0 0 58px rgba(255, 255, 255, 0.025);
}

.intro::after {
  right: 104px;
  bottom: 28px;
  width: 13px;
  height: 13px;
  background: var(--lime);
  box-shadow: 0 0 30px rgba(215, 255, 98, 0.55);
}

.intro > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  color: var(--lime);
}

h1 {
  max-width: 550px;
  font-size: clamp(39px, 7vw, 61px);
  letter-spacing: -3.7px;
  line-height: 1.02;
}

.intro h1 {
  color: #fffdf7;
}

h1 span {
  color: var(--lime);
}

.intro-copy {
  color: rgba(255, 255, 255, 0.7);
}

.game-content {
  margin: 0 54px 39px;
  padding: 24px 27px 28px;
  border: 1px solid rgba(85, 70, 219, 0.12);
  border-radius: 15px;
  background: linear-gradient(145deg, #fbfaf4, #f5f3eb);
}

.progress-heading {
  color: #383746;
}

.score-label strong {
  color: var(--violet);
}

.score-label span,
.progress-heading p span {
  color: #8a8b8b;
}

.progress-track,
.timer-track {
  background: #e4e2d9;
}

.progress-track span {
  background: linear-gradient(90deg, var(--violet), #9181ff);
}

.question-number {
  color: var(--violet);
}

.timer-row {
  color: #777a72;
}

.timer-value {
  color: #27263d;
}

.timer-track span {
  background: linear-gradient(90deg, #b6e946, #d7ff62);
}

.timer-track.is-low span {
  background: var(--coral);
}

.question-area h2,
.complete-screen h2 {
  color: #25243a;
}

.rarity-item {
  border-color: rgba(85, 70, 219, 0.14);
  background: rgba(255, 255, 255, 0.62);
  color: #66657a;
}

.rarity-item:last-child {
  border-color: rgba(255, 120, 99, 0.34);
  background: rgba(255, 120, 99, 0.08);
  color: #c45043;
}

.answer-row input,
.answer-controls input,
.answer-controls select {
  border-color: #deddd5;
  background: #fffefa;
  color: var(--text);
}

.answer-row input::placeholder,
.answer-controls input::placeholder {
  color: #96978f;
}

.submit-button {
  background: var(--violet);
  color: #fff;
  box-shadow: 0 5px 13px rgba(85, 70, 219, 0.2);
}

.submit-button:hover {
  background: #4435c3;
}

.feedback.is-correct {
  color: #498329;
}

.feedback.is-incorrect {
  color: #c45043;
}

.complete-screen {
  padding: 35px 54px 43px;
}

.complete-screen .eyebrow {
  color: var(--violet);
}

.final-score {
  color: var(--violet);
  font-size: clamp(68px, 12vw, 92px);
}

.final-score span {
  color: #888794;
}

.complete-screen .intro-copy {
  color: var(--muted);
}

.results-review {
  margin-top: 31px;
}

.results-review h3 {
  font-size: 17px;
  letter-spacing: -0.3px;
}

.guess-review {
  padding-right: 4px;
}

.guess-review-item {
  border-color: #e5e2d9;
  background: #faf9f3;
  transition: border-color 150ms ease, transform 150ms ease;
}

.guess-review-item:hover {
  transform: translateY(-1px);
  border-color: rgba(85, 70, 219, 0.3);
}

.question-review-content h4 {
  color: #343344;
}

.question-review-result,
.question-answer-count {
  color: #777970;
}

.question-review-content {
  border-top-color: #e5e2d9;
}

.attempt-list li {
  color: #555950;
}

.attempt-rarity {
  color: #56872e;
}

.attempt-rarity.is-missed {
  color: #c45043;
}

.answer-controls label {
  color: #686b63;
}

.answer-count {
  color: #74776f;
}

.answer-list li {
  border-color: color-mix(in srgb, var(--answer-rarity-color, #eae8df) 60%, #eae8df);
  background: color-mix(in srgb, var(--answer-rarity-color, #fffefa) 22%, #fffefa);
}

.answer-list .no-matching-answers {
  color: #777970;
}

.answer-entry-rarity {
  color: #5b4ac7;
}

.card-footer {
  border-top-color: #e9e6dd;
  color: #777970;
}

.footer-icon {
  color: var(--coral);
}

.test-reset {
  color: #85867e;
}

.test-reset:hover {
  color: var(--violet);
}

.page-note {
  color: #74766f;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline-color: var(--violet);
}

@media (max-width: 560px) {
  .game-shell {
    width: min(100% - 24px, 760px);
    padding-top: 18px;
  }

  .topbar {
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .topbar-meta {
    gap: 8px;
  }

  .theme-picker select {
    max-width: 104px;
    padding: 7px 9px;
    font-size: 10px;
  }
}

  .intro {
    padding: 36px 25px 29px;
  }

  body[data-theme="midnight"] {
    color-scheme: dark;
    --background: #11121a;
    --surface: #1d1e29;
    --surface-raised: #262735;
    --text: #f5f2ff;
    --muted: #a4a2b3;
    --lime: #d7ff62;
    --border: rgba(255, 255, 255, 0.11);
    --violet: #a493ff;
    --coral: #ff9a83;
    background:
      radial-gradient(ellipse at 9% 9%, rgba(255, 120, 99, 0.12), transparent 29%),
      radial-gradient(ellipse at 94% 29%, rgba(132, 112, 255, 0.17), transparent 32%),
      var(--background);
    color: var(--text);
  }

  body[data-theme="midnight"]::before {
    background-image: radial-gradient(rgba(220, 216, 255, 0.2) 0.7px, transparent 0.7px);
    opacity: 0.16;
  }

  body[data-theme="midnight"] .wordmark {
    color: #fffdf7;
  }

  body[data-theme="midnight"] .daily-label {
    border-color: rgba(190, 179, 255, 0.19);
    background: rgba(32, 31, 49, 0.82);
    color: #e4e0ff;
  }

  body[data-theme="midnight"] .live-dot {
    background: var(--lime);
    box-shadow: 0 0 0 4px rgba(215, 255, 98, 0.12);
  }

  body[data-theme="midnight"] .date-label {
    color: #b6b3c5;
  }

  body[data-theme="midnight"] .theme-picker select {
    border-color: rgba(190, 179, 255, 0.22);
    background: #222230;
    color: #f5f2ff;
  }

  body[data-theme="midnight"] .game-card {
    border-color: rgba(202, 195, 255, 0.15);
    background: #191a24;
    box-shadow:
      0 32px 80px rgba(0, 0, 0, 0.3),
      0 3px 10px rgba(0, 0, 0, 0.14);
  }

  body[data-theme="midnight"] .intro {
    background: linear-gradient(118deg, #242238 0%, #302b58 53%, #493c91 100%);
  }

  body[data-theme="midnight"] .intro h1,
  body[data-theme="midnight"] .question-area h2,
  body[data-theme="midnight"] .complete-screen h2 {
    color: #fffdf7;
  }

  body[data-theme="midnight"] .intro-copy,
  body[data-theme="midnight"] .complete-screen .intro-copy {
    color: #b3b0c1;
  }

  body[data-theme="midnight"] .game-content {
    border-color: rgba(190, 179, 255, 0.14);
    background: linear-gradient(145deg, #20212c, #1a1b25);
  }

  body[data-theme="midnight"] .start-screen {
    border-color: rgba(190, 179, 255, 0.16);
    background:
      radial-gradient(circle at 100% 0%, rgba(132, 112, 255, 0.14), transparent 40%),
      #20212c;
  }

  body[data-theme="midnight"] .start-copy h2 {
    color: #fffdf7;
  }

  body[data-theme="midnight"] .start-status {
    color: #aaa7b9;
  }

  body[data-theme="midnight"] .progress-heading {
    color: #e9e6f4;
  }

  body[data-theme="midnight"] .progress-heading p span,
  body[data-theme="midnight"] .score-label,
  body[data-theme="midnight"] .score-label span {
    color: #a4a2b3;
  }

  body[data-theme="midnight"] .score-label strong,
  body[data-theme="midnight"] .question-number {
    color: var(--lime);
  }

  body[data-theme="midnight"] .progress-track,
  body[data-theme="midnight"] .timer-track {
    background: #383846;
  }

  body[data-theme="midnight"] .progress-track span {
    background: linear-gradient(90deg, #8b78ff, #c0adff);
  }

  body[data-theme="midnight"] .timer-row {
    color: #aaa7b9;
  }

  body[data-theme="midnight"] .timer-value {
    color: #f5f2ff;
  }

  body[data-theme="midnight"] .timer-track span {
    background: linear-gradient(90deg, #b6e946, #d7ff62);
  }

  body[data-theme="midnight"] .timer-track.is-low span {
    background: var(--coral);
  }

  body[data-theme="midnight"] .rarity-item {
    border-color: rgba(190, 179, 255, 0.18);
    background: rgba(255, 255, 255, 0.045);
    color: #c1bdd0;
  }

  body[data-theme="midnight"] .rarity-item:last-child {
    border-color: rgba(255, 154, 131, 0.35);
    background: rgba(255, 154, 131, 0.08);
    color: #ffb09c;
  }

  body[data-theme="midnight"] .answer-row input,
  body[data-theme="midnight"] .answer-controls input,
  body[data-theme="midnight"] .answer-controls select {
    border-color: #41414f;
    background: #242530;
    color: #f5f2ff;
  }

  body[data-theme="midnight"] .answer-row input::placeholder,
  body[data-theme="midnight"] .answer-controls input::placeholder {
    color: #9997a8;
  }

  body[data-theme="midnight"] .submit-button {
    background: #7867ee;
    color: #fff;
    box-shadow: 0 5px 16px rgba(120, 103, 238, 0.25);
  }

  body[data-theme="midnight"] .submit-button:hover {
    background: #8b7bff;
  }

  body[data-theme="midnight"] .feedback.is-correct {
    color: var(--lime);
  }

  body[data-theme="midnight"] .feedback.is-incorrect {
    color: #ff9a83;
  }

  body[data-theme="midnight"] .complete-screen .eyebrow {
    color: var(--lime);
  }

  body[data-theme="midnight"] .final-score {
    color: var(--lime);
  }

  body[data-theme="midnight"] .final-score span {
    color: #aaa7b9;
  }

  body[data-theme="midnight"] .guess-review-item {
    border-color: #383945;
    background: #20212c;
  }

  body[data-theme="midnight"] .guess-review-item:hover {
    border-color: rgba(164, 147, 255, 0.5);
  }

  body[data-theme="midnight"] .question-review-content h4 {
    color: #f0edf8;
  }

  body[data-theme="midnight"] .question-review-result,
  body[data-theme="midnight"] .question-answer-count {
    color: #a4a2b3;
  }

  body[data-theme="midnight"] .question-review-content {
    border-top-color: #383945;
  }

  body[data-theme="midnight"] .attempt-list li {
    color: #d0cdda;
  }

  body[data-theme="midnight"] .attempt-rarity {
    color: var(--lime);
  }

  body[data-theme="midnight"] .attempt-rarity.is-missed {
    color: #ff9a83;
  }

  body[data-theme="midnight"] .no-guess,
  body[data-theme="midnight"] .answer-count {
    color: #a4a2b3;
  }

  body[data-theme="midnight"] .answer-controls label {
    color: #b5b2c2;
  }

  body[data-theme="midnight"] .answer-list li {
    border-color: color-mix(in srgb, var(--answer-rarity-color, #393a47) 60%, #393a47);
    background: color-mix(in srgb, var(--answer-rarity-color, #22232e) 22%, #22232e);
  }

  body[data-theme="midnight"] .answer-list .no-matching-answers {
    color: #a4a2b3;
  }

  body[data-theme="midnight"] .answer-entry-rarity {
    color: #b7aaff;
  }

  body[data-theme="midnight"] .card-footer {
    border-top-color: #343540;
    color: #aaa7b9;
  }

  body[data-theme="midnight"] .footer-icon {
    color: var(--coral);
  }

  body[data-theme="midnight"] .test-reset {
    color: #aaa7b9;
  }

  body[data-theme="midnight"] .test-reset:hover {
    color: #c0b5ff;
  }

  body[data-theme="midnight"] .page-note {
    color: #aaa7b9;
  }

  body[data-theme="midnight"] button:focus-visible,
  body[data-theme="midnight"] input:focus-visible,
  body[data-theme="midnight"] select:focus-visible,
  body[data-theme="midnight"] a:focus-visible,
  body[data-theme="midnight"] summary:focus-visible {
    outline-color: #b7aaff;
  }

  @media (max-width: 560px) {
    .topbar-meta {
      width: 100%;
      justify-content: space-between;
    }

    .start-screen {
      align-items: stretch;
      flex-direction: column;
      gap: 16px;
      margin: 0 14px 24px;
      padding: 19px;
    }

    .start-button {
      width: 100%;
    }
  }

@media (max-width: 560px) {
  .intro::before {
    top: -115px;
    right: -150px;
  }

  h1 {
    letter-spacing: -2.5px;
  }

  .game-content {
    margin: 0 14px 24px;
    padding: 20px 17px 22px;
  }

  .complete-screen {
    padding: 26px 22px 32px;
  }

  .card-footer {
    padding: 15px 20px;
  }
}

.feedback {
  display: grid;
  gap: 10px;
}

.feedback[hidden],
.rarity-reveal[hidden] {
  display: none;
}

.rarity-reveal {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  overflow: hidden;
  padding: 12px 14px;
  border: 1px solid var(--rarity-color, var(--violet));
  border-radius: 12px;
  background: var(--surface-raised);
  animation: rarity-bloom 460ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.rarity-reveal::before {
  position: absolute;
  top: 50%;
  right: 45px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--rarity-color), transparent 70%);
  content: "";
  opacity: 0.16;
  pointer-events: none;
  transform: translateY(-50%);
}

.rarity-sigil {
  position: relative;
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--rarity-color);
  border-radius: 14px;
  background: radial-gradient(circle, var(--rarity-color), transparent 76%);
  color: #24233a;
  font-size: 21px;
  transform: rotate(-8deg);
}

.rarity-sigil::before {
  position: absolute;
  border: 1px solid var(--rarity-color);
  border-radius: 17px;
  content: "";
  inset: -4px;
  opacity: 0.55;
  animation: rarity-ring 780ms ease-out both;
}

.rarity-sigil span {
  position: relative;
  z-index: 1;
  animation: rarity-spark 520ms 100ms ease-out both;
}

.rarity-copy {
  position: relative;
  display: grid;
  gap: 3px;
  min-width: 0;
}

.rarity-kicker {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.15px;
}

.rarity-title {
  overflow-wrap: anywhere;
  color: var(--rarity-color);
  font-size: 16px;
  letter-spacing: -0.3px;
  line-height: 1.15;
}

.rarity-points {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 7px 9px;
  border: 1px solid var(--rarity-color);
  border-radius: 999px;
  color: var(--rarity-color);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.feedback-message {
  margin: 0;
  font-size: 12px;
  font-weight: 650;
}

@keyframes rarity-bloom {
  from {
    opacity: 0;
    transform: translateY(7px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes rarity-ring {
  from {
    opacity: 0.7;
    transform: scale(0.65);
  }

  to {
    opacity: 0;
    transform: scale(1.45);
  }
}

@keyframes rarity-spark {
  from {
    opacity: 0;
    transform: scale(0.35) rotate(-35deg);
  }

  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rarity-reveal,
  .rarity-sigil::before,
  .rarity-sigil span {
    animation: none;
  }
}