:root {
  color-scheme: light;
  --bg: #17120f;
  --ink: #191510;
  --subtle: #6c6258;
  --panel: #fff5df;
  --panel-strong: #ffffff;
  --stage: #120f13;
  --stage-ink: #fff4d6;
  --line: #d5c19b;
  --accent: #0f5966;
  --accent-ink: #12323a;
  --accent-soft: #d9edf0;
  --green: #168252;
  --green-soft: #dff4e9;
  --red: #b83248;
  --red-soft: #f8dde3;
  --gold: #d99b2b;
  --gold-soft: #ffe8a6;
  --blue: #245da8;
  --blue-soft: #dbe8f7;
  --coral: #b9583c;
  --shadow: 0 28px 70px rgba(8, 5, 3, 0.34);
  --shadow-soft: 0 12px 28px rgba(8, 5, 3, 0.16);
}

body[data-category="history"] {
  --accent: #8a4b34;
  --accent-ink: #4a2519;
  --accent-soft: #f1ded4;
}

body[data-category="science"],
body[data-category="technology"] {
  --accent: #2f6f7e;
  --accent-ink: #123946;
  --accent-soft: #dcecf0;
}

body[data-category="literature"],
body[data-category="art-music"] {
  --accent: #6c558b;
  --accent-ink: #352445;
  --accent-soft: #e8e0f0;
}

body[data-category="entertainment"],
body[data-category="sports-games"] {
  --accent: #a85d2f;
  --accent-ink: #542b13;
  --accent-soft: #f3dfcf;
}

body[data-category="geography"],
body[data-category="nature-animals"] {
  --accent: #3f7552;
  --accent-ink: #1d3b28;
  --accent-soft: #dfeee3;
}

body[data-category="food-culture"] {
  --accent: #9a6a28;
  --accent-ink: #4a3211;
  --accent-soft: #f1e4ca;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 7%, rgba(255, 179, 74, 0.26), transparent 28%),
    radial-gradient(circle at 86% 4%, rgba(107, 55, 92, 0.28), transparent 30%),
    linear-gradient(180deg, rgba(13, 10, 11, 0.22), rgba(13, 10, 11, 0.58)),
    repeating-linear-gradient(135deg, rgba(255, 232, 166, 0.055) 0 1px, transparent 1px 22px),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 245, 223, 0.1), transparent 24% 74%, rgba(255, 245, 223, 0.08)),
    linear-gradient(180deg, rgba(255, 232, 166, 0.09), transparent 42%);
  opacity: 0.95;
}

button,
input,
select {
  font: inherit;
}

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

.shell {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0;
}

.topbar {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  min-height: 260px;
  padding: clamp(16px, 3vw, 28px);
  overflow: hidden;
  border: 1px solid rgba(255, 232, 166, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(12, 10, 12, 0.92), rgba(12, 10, 12, 0.54) 52%, rgba(12, 10, 12, 0.84)),
    var(--stage);
  box-shadow: var(--shadow);
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 8, 9, 0.98) 0 34%, rgba(11, 8, 9, 0.58) 62%, rgba(11, 8, 9, 0.9) 100%),
    url("qotd-share-facebook.png") 58% center / cover no-repeat;
  opacity: 0.72;
}

.topbar::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 232, 166, 0.28);
  border-radius: 6px;
  pointer-events: none;
}

.topbar > * {
  position: relative;
  z-index: 1;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand-mark {
  width: 72px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 232, 166, 0.66);
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.35), transparent 42%),
    radial-gradient(circle at 50% 34%, #ffe9aa, var(--gold) 48%, #8d5217);
  color: #21150a;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34), inset 0 0 0 4px rgba(43, 22, 9, 0.26);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3rem;
  font-weight: 950;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--gold-soft);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 640px;
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3.55rem;
  line-height: 0.95;
  font-weight: 900;
  color: var(--stage-ink);
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.62);
}

.top-games-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-top: 12px;
  padding: 7px 11px;
  border: 1px solid rgba(250, 232, 189, 0.42);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.08);
  color: var(--gold-soft);
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
  transition: transform 140ms ease, background 140ms ease, color 140ms ease;
}

.top-games-link:hover,
.top-games-link:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 250, 240, 0.16);
  color: #fff8ea;
  outline: none;
}

h2 {
  margin-bottom: 0;
}

.score-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(82px, 1fr));
  overflow: hidden;
  border: 1px solid rgba(255, 232, 166, 0.28);
  border-radius: 8px;
  background: rgba(255, 245, 223, 0.94);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.player-summary {
  display: grid;
  grid-template-columns: 250px minmax(390px, 1fr);
  gap: 12px;
  align-items: stretch;
}

.avatar-card {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 232, 166, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 232, 166, 0.18), transparent 45%),
    rgba(12, 10, 12, 0.42);
  color: var(--stage-ink);
  backdrop-filter: blur(12px);
}

.avatar-icon {
  width: 64px;
  height: 64px;
}

.avatar-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.25));
}

.avatar-card small {
  display: block;
  margin-bottom: 4px;
  color: var(--gold-soft);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.avatar-card strong {
  display: block;
  overflow: hidden;
  color: #fff8ea;
  font-size: 1rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-strip div {
  padding: 13px 16px;
  border-left: 1px solid var(--line);
}

.score-strip div:first-child {
  border-left: 0;
}

.score-strip span {
  display: block;
  color: var(--accent-ink);
  font-size: 1.55rem;
  font-weight: 900;
}

.score-strip small {
  color: var(--subtle);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.question-panel,
.side-panel section {
  border: 1px solid rgba(255, 232, 166, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), transparent 38%),
    linear-gradient(180deg, rgba(255, 249, 237, 0.98), rgba(246, 232, 203, 0.98));
  box-shadow: var(--shadow);
}

.question-panel {
  position: relative;
  min-height: 600px;
  padding: clamp(18px, 4vw, 36px);
  overflow: hidden;
  border-color: rgba(255, 232, 166, 0.36);
}

.question-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 12px;
  background:
    linear-gradient(90deg, var(--gold) 0 20%, var(--accent) 20% 70%, #7b2f4f 70% 100%);
}

.question-panel::after {
  content: "";
  position: absolute;
  inset: 10px 0 auto;
  height: 1px;
  background: rgba(21, 23, 28, 0.12);
}

.question-meta,
.phase-row,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.question-meta {
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(9, 46, 53, 0.18);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.84rem;
  font-weight: 950;
  box-shadow: 0 2px 0 rgba(21, 23, 28, 0.06);
}

.pill.muted {
  background: var(--gold-soft);
  color: #6c4612;
}

.question-id,
.points-note,
.section-heading span {
  color: var(--subtle);
  font-size: 0.88rem;
  font-weight: 800;
}

.question-id {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(21, 23, 28, 0.06);
}

.phase-row {
  margin-top: 30px;
}

.phase-row h2 {
  font-size: 1.45rem;
  color: var(--accent-ink);
}

.points-note {
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--stage);
  color: var(--accent-ink);
  color: var(--stage-ink);
}

.question-text {
  margin: 24px 0;
  max-width: 850px;
  font-size: 2.25rem;
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: 0;
}

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

.choice {
  position: relative;
  min-height: 86px;
  padding: 18px 18px 18px 58px;
  border: 2px solid rgba(83, 53, 24, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #fffdf8, #f8edd8);
  color: var(--ink);
  text-align: left;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(83, 53, 24, 0.18);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.choice::before {
  counter-increment: choice;
  content: counter(choice, upper-alpha);
  position: absolute;
  left: 18px;
  top: 18px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.84rem;
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(21, 23, 28, 0.08);
}

.choice:hover:not(:disabled),
.choice:focus-visible:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 10px 20px rgba(21, 23, 28, 0.14), 0 3px 0 rgba(21, 23, 28, 0.18);
  outline: none;
}

.choice:disabled {
  cursor: default;
}

.choice.correct {
  border-color: var(--green);
  background: linear-gradient(180deg, #effaf4, var(--green-soft));
}

.choice.correct::before {
  background: var(--green);
  color: white;
}

.choice.wrong {
  border-color: var(--red);
  background: linear-gradient(180deg, #fff1f4, var(--red-soft));
}

.choice.wrong::before {
  background: var(--red);
  color: white;
}

.result-box {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(21, 23, 28, 0.14);
  border-radius: 8px;
  background: #fffdf8;
  box-shadow: var(--shadow-soft);
}

.result-box strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.result-box p {
  margin-bottom: 0;
  color: var(--subtle);
  line-height: 1.45;
}

.question-stats-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--accent-ink);
  font-weight: 850;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.testing-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.testing-controls.hidden {
  display: none;
}

.primary,
.secondary {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(21, 23, 28, 0.12);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
}

.primary {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow-soft);
}

.secondary {
  border: 1px solid rgba(83, 53, 24, 0.18);
  background: linear-gradient(180deg, #fffdf8, #f3e5c9);
  color: var(--ink);
}

.primary:hover,
.secondary:hover {
  transform: translateY(-1px);
}

.compact {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 0.88rem;
}

.player-code-box {
  display: grid;
  gap: 12px;
}

.player-code-box strong {
  display: block;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(214, 146, 34, 0.11), transparent 56%),
    #fffdf8;
  color: var(--accent-ink);
  font-size: 1.02rem;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.code-actions {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
}

.code-actions input {
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.code-actions input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(47, 111, 126, 0.18);
}

.code-actions input::placeholder {
  color: #7f8784;
  font-style: italic;
}

.team-reminder {
  margin-top: 8px;
  color: var(--subtle);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.35;
}

.student-code-select {
  min-width: 0;
  min-height: 40px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.student-code-select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(47, 111, 126, 0.18);
}

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

.side-panel section {
  padding: 18px;
  border-left: 5px solid var(--gold);
}

.section-heading {
  margin-bottom: 14px;
}

.section-heading h2 {
  font-size: 1rem;
  color: var(--accent-ink);
}

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

.community-stats div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(83, 53, 24, 0.1);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.56);
}

.community-stats strong {
  display: block;
  color: var(--accent-ink);
  font-size: 1.25rem;
  font-weight: 950;
}

.community-stats span {
  display: block;
  color: var(--subtle);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.18;
  text-transform: uppercase;
}

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

.badge-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  column-gap: 7px;
  row-gap: 4px;
  align-items: center;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(22, 27, 28, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.45);
}

.badge-row:first-child {
  border-top: 1px solid rgba(22, 27, 28, 0.08);
  padding-top: 7px;
}

.badge-name {
  display: contents;
  min-width: 0;
  font-weight: 850;
}

.badge-name span:last-child {
  align-self: end;
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.25em;
  font-size: 0.82rem;
  line-height: 1.12;
  white-space: normal;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.badge-icon {
  position: relative;
  grid-row: 1 / 4;
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--subtle);
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 950;
}

.badge-icon.earned {
  color: #1b150b;
}

.badge-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 5px 8px rgba(21, 23, 28, 0.18));
}

.badge-rank {
  position: absolute;
  right: -2px;
  bottom: -2px;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 2px solid #fff8ea;
  border-radius: 999px;
  background: var(--gold);
  color: #1b150b;
  font-size: 0.7rem;
  font-weight: 950;
}

.badge-count {
  color: var(--subtle);
  text-align: left;
  font-size: 0.82rem;
  font-weight: 850;
}

.meter {
  grid-column: 2;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #ece6da;
}

.meter span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--green));
}

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

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.history-item:first-child {
  border-top: 0;
}

.history-item strong {
  display: block;
  font-size: 0.92rem;
}

.history-item span {
  color: var(--subtle);
  font-size: 0.84rem;
  font-weight: 750;
}

.status-chip {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: #173e5f;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.status-chip.won {
  background: var(--green-soft);
  color: var(--green);
}

.status-chip.missed {
  background: var(--red-soft);
  color: var(--red);
}

.source-note {
  margin: -4px 2px 0;
  color: var(--subtle);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
}

.discord-panel p,
.share-panel p,
.support-panel p {
  margin-bottom: 12px;
  color: var(--subtle);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.35;
}

.support-panel {
  background:
    linear-gradient(135deg, rgba(214, 146, 34, 0.16), transparent 58%),
    rgba(255, 250, 240, 0.96);
}

.discord-invite,
.facebook-share,
.support-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #5865f2;
  border-radius: 8px;
  background: #5865f2;
  color: #ffffff;
  font-weight: 950;
  text-align: center;
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.discord-invite {
  border-color: #5865f2;
  background: #5865f2;
}

.facebook-share {
  border-color: #1877f2;
  background: #1877f2;
}

.support-link {
  border-color: var(--gold);
  background: var(--gold);
  color: #21160a;
}

.discord-invite:hover,
.discord-invite:focus-visible,
.facebook-share:hover,
.facebook-share:focus-visible,
.support-link:hover,
.support-link:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.discord-invite:hover,
.discord-invite:focus-visible {
  background: #4752c4;
}

.facebook-share:hover,
.facebook-share:focus-visible {
  background: #166fe5;
}

.support-link:hover,
.support-link:focus-visible {
  background: #bf7f18;
}

.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(13, 9, 7, 0.72);
  backdrop-filter: blur(8px);
}

.onboarding-card {
  width: min(460px, 100%);
  padding: clamp(20px, 5vw, 30px);
  border: 1px solid rgba(255, 232, 166, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 232, 166, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(255, 249, 237, 0.98), rgba(246, 232, 203, 0.98));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
  text-align: center;
}

.onboarding-mark {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border: 2px solid rgba(83, 53, 24, 0.22);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 34%, #ffe9aa, var(--gold) 48%, #8d5217);
  color: #21150a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.2rem;
  font-weight: 950;
  box-shadow: var(--shadow-soft);
}

.onboarding-card h2 {
  margin-bottom: 8px;
  color: var(--accent-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
}

.onboarding-card p {
  margin-bottom: 16px;
  color: var(--subtle);
  font-weight: 750;
  line-height: 1.42;
}

.onboarding-card input {
  width: 100%;
  min-height: 48px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.onboarding-card input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(47, 111, 126, 0.18);
}

.onboarding-card input::placeholder {
  color: #7f8784;
  font-style: italic;
}

.onboarding-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.onboarding-result {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(83, 53, 24, 0.16);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.78);
  text-align: left;
}

.onboarding-result strong {
  display: block;
  margin-bottom: 5px;
  color: var(--accent-ink);
}

.onboarding-result p {
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}

.onboarding-skip {
  margin-top: 14px;
  border: 0;
  background: transparent;
  color: var(--subtle);
  font-weight: 850;
  text-decoration: underline;
  cursor: pointer;
}

.onboarding-skip:hover,
.onboarding-skip:focus-visible {
  color: var(--accent-ink);
  outline: none;
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
    min-height: 0;
  }

  .topbar::before {
    background:
      linear-gradient(180deg, rgba(11, 8, 9, 0.88), rgba(11, 8, 9, 0.62) 48%, rgba(11, 8, 9, 0.9)),
      url("qotd-share-facebook.png") center / cover no-repeat;
  }

  .player-summary {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 3rem;
  }

  .question-text {
    font-size: 2rem;
  }

  .game-layout {
    grid-template-columns: 1fr;
  }

  .score-strip {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding: 16px 0;
  }

  .brand-lockup {
    align-items: flex-start;
    gap: 12px;
  }

  .topbar {
    padding: 14px;
  }

  .brand-mark {
    width: 52px;
    font-size: 2.15rem;
  }

  .avatar-card {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .avatar-icon {
    width: 54px;
    height: 54px;
  }

  h1 {
    font-size: 2.25rem;
  }

  .top-games-link {
    min-height: 32px;
    margin-top: 10px;
    font-size: 0.78rem;
  }

  .question-text {
    font-size: 1.55rem;
    line-height: 1.18;
  }

  .phase-row h2 {
    font-size: 1.25rem;
  }

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

  .score-strip div {
    padding: 11px 10px;
    border-top: 1px solid var(--line);
  }

  .score-strip div:nth-child(1),
  .score-strip div:nth-child(2) {
    border-top: 0;
  }

  .score-strip div:nth-child(3),
  .score-strip div:nth-child(5) {
    border-left: 0;
  }

  .score-strip span {
    font-size: 1.25rem;
  }

  .score-strip small {
    font-size: 0.68rem;
  }

  .choices {
    grid-template-columns: 1fr;
  }

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

  .choice {
    min-height: 74px;
  }

  .code-actions {
    grid-template-columns: 1fr;
  }

  .onboarding-actions {
    grid-template-columns: 1fr;
  }

  .question-panel {
    min-height: auto;
  }

  .question-meta,
  .phase-row,
  .section-heading {
    align-items: flex-start;
  }

  .phase-row {
    flex-direction: column;
  }
}
