body {
  display:flex;
  min-height:100vh;
  margin:0;
  font-family:"Trebuchet MS",sans-serif;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  background:#fff;
  color:#111;
  padding:14px 10px 20px;
  box-sizing:border-box;
}

html.modal-open,
body.modal-open {
  overflow:hidden;
}

h1 {
  margin:4px 0 4px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  line-height:1.1;
}

.title-icon {
  height:1em;
  width:auto;
  display:block;
}

.credit { margin:0 0 8px; text-align:center; font-size:1rem; }
.credit a { color:#0b57d0; text-underline-offset:2px; }
p.lead { margin:0 0 10px; text-align:center; max-width:980px; }

.breadcrumbs {
  width:min(1100px,95vw);
  margin:4px auto 6px;
  font-size:.88rem;
  color:#4b5563;
}

.breadcrumbs ol {
  display:flex;
  gap:6px;
  justify-content:center;
  flex-wrap:wrap;
  margin:0;
  padding:0;
  list-style:none;
}

.breadcrumbs li:not(:last-child)::after {
  content:"›";
  margin-left:6px;
  color:#6b7280;
}

.breadcrumbs a {
  color:#4b5563;
  text-underline-offset:2px;
}

.controls {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:center;
  margin:8px 0 14px;
}

.big-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
  padding:13px 24px;
  min-width:190px;
  height:58px;
  background:#000;
  color:#fff;
  border:none;
  border-radius:10px;
  cursor:pointer;
  text-decoration:none;
  box-sizing:border-box;
}

.big-button:disabled {
  opacity:.55;
  cursor:not-allowed;
}

.big-button.secondary-button {
  background:#f4f4f4;
  color:#111;
  border:1px solid #999;
}

.big-button.secondary-button:hover {
  text-decoration:underline;
}

.game-container {
  display:flex;
  width:min(1100px,95vw);
  min-height:min(60vh,540px);
  gap:12px;
  align-items:stretch;
}

.player {
  position:relative;
  flex:1;
  display:grid;
  grid-template-rows:auto auto auto 1fr auto;
  gap:10px;
  align-items:start;
  text-align:center;
  border:2px solid #000;
  border-radius:14px;
  padding:16px;
  background:#fff;
  min-height:0;
}

.player h2 {
  margin:0;
  font-size:clamp(1.12rem,2.1vw,1.45rem);
  line-height:1.1;
}

.active { background:#fffbe6; }
.wrong { animation:shake .35s linear; background:#ffdfdf !important; }
.correct { box-shadow:0 0 0 3px #c8f7c5 inset; }
.winner { background:#d6f6d6 !important; }
.loser { background:#ffd0d0 !important; }

@keyframes shake {
  0%,100% { transform:translateX(0); }
  20% { transform:translateX(-3px); }
  40% { transform:translateX(3px); }
  60% { transform:translateX(-2px); }
  80% { transform:translateX(2px); }
}

.crown { display:none; margin-left:8px; vertical-align:middle; width:22px; height:22px; }
.winner .crown { display:inline; }

.timer {
  font-size:2rem;
  line-height:1.1;
}
.question {
  font-size:clamp(1.16rem,2.1vw,1.42rem);
  min-height:86px;
  display:none;
  line-height:1.34;
  height:auto;
  overflow-y:visible;
  overflow-x:hidden;
  padding:2px 4px;
  box-sizing:border-box;
}
.q-main {
  min-height:74px;
  height:auto;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  text-align:center;
  width:100%;
  max-width:100%;
  overflow-wrap:break-word;
  word-break:normal;
}
.q-main.long-question { justify-content:flex-start; }
.q-main.short-question { line-height:1.22; }
.q-main.with-think-progress {
  flex-direction:column;
  gap:8px;
}
.q-content {
  width:100%;
  max-width:100%;
}
.math-prose,
.math-inline {
  display:inline;
  white-space:normal;
}
.math-inline {
  display:inline-block;
  white-space:nowrap;
  max-width:100%;
}
.q-main .q-line {
  width:100%;
}
.topic-footer {
  min-height:20px;
  font-size:.78rem;
  color:rgba(0,0,0,.52);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  flex-wrap:wrap;
}

.options {
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
  min-height:210px;
  align-content:start;
}

.options button {
  min-height:94px;
  padding:10px 12px;
  font-size:clamp(1rem,1.6vw,1.1rem);
  line-height:1.28;
  cursor:pointer;
  border-radius:14px;
  border:1px solid #bbb;
  background:#fff;
  white-space:normal;
  overflow-wrap:break-word;
  word-break:normal;
}

.options button:disabled {
  cursor:default;
  opacity:1;
}

.options button.option-correct {
  background:#dcfce7;
  border-color:#16a34a;
  color:#14532d;
}

.options button.option-wrong {
  background:#fee2e2;
  border-color:#dc2626;
  color:#7f1d1d;
}

.question mjx-container,
.options mjx-container,
#exampleQuestion mjx-container,
#exampleOptions mjx-container,
.all-question-text mjx-container,
.all-answer mjx-container,
#statsToast .incorrect-review-question mjx-container,
#statsToast .review-option mjx-container {
  max-width:100%;
  white-space:normal !important;
  margin:0 !important;
}

.question mjx-container[jax="SVG"] > svg,
.options mjx-container[jax="SVG"] > svg,
#exampleQuestion mjx-container[jax="SVG"] > svg,
#exampleOptions mjx-container[jax="SVG"] > svg {
  max-width:100%;
  height:auto !important;
}

.options button:hover { border-color:#777; }
.options button:active { transform:scale(.99); }

.think-time-progress {
  display:flex;
  align-items:center;
  justify-content:center;
  padding:6px 0 2px;
  width:min(360px,80%);
  margin:0 auto;
}

.think-time-progress-bar {
  width:100%;
  height:8px;
  border-radius:4px;
  background:#d9dce1;
  overflow:hidden;
  border:none;
  box-shadow:none;
}

.think-time-progress-bar-fill {
  display:block;
  width:0;
  height:100%;
  background:#1f2937;
  transition:width .08s linear;
}

.game-over { display:none; text-align:center; font-size:1.2rem; margin-top:14px; }

.streak-high-score {
  display:none;
  width:min(1100px,95vw);
  margin:10px auto 0;
  padding:10px 14px;
  border:2px solid #111;
  border-radius:12px;
  background:#fffbeb;
  box-sizing:border-box;
  align-items:center;
  justify-content:center;
  gap:12px;
  text-align:center;
}

.streak-high-score-item {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
  min-width:140px;
}

.streak-high-score-label {
  font-weight:700;
}

.streak-high-score-value {
  font-size:1.35rem;
  font-weight:700;
}

#statsToast {
  display:none;
  position:fixed;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  background:#111;
  color:#fff;
  padding:22px 24px;
  border-radius:16px;
  z-index:20;
  width:min(95vw,980px);
  max-height:min(85vh,780px);
  overflow:auto;
  box-shadow:0 20px 50px rgba(0,0,0,.38);
}

#statsToastBackdrop {
  display:none;
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.24);
  backdrop-filter:blur(1.5px);
  z-index:19;
}

#statsToast.review-mode {
  background:#f8fafc;
  color:#111;
  border:1px solid #d1d5db;
  box-shadow:0 24px 56px rgba(15,23,42,.22);
}

#statsToast.review-mode h3 {
  color:#111;
}

#statsToast h3 { margin:0 0 14px 0; font-size:1.3rem; }
#statsToast table { border-collapse:collapse; width:100%; }
#statsToast th,
#statsToast td { padding:9px 12px; border-bottom:1px solid rgba(255,255,255,.18); text-align:center; font-size:1.02rem; }
#statsToast tr:last-child td { border-bottom:none; }
#statsToast .right { text-align:center; }
#statsToast .row { display:flex; gap:10px; justify-content:center; margin-top:16px; flex-wrap:wrap; }
#statsToast .new-high { color:#86efac; font-size:.92rem; margin-left:8px; }
#statsToast .note { margin:12px 0 0; color:#d8d8d8; font-size:.96rem; }
#statsToast .review-stats {
  margin-bottom:18px;
  padding-bottom:18px;
  border-bottom:1px solid #d8dee7;
}
#statsToast .incorrect-review-note { margin:0 0 14px; color:#d8d8d8; font-size:.96rem; }
#statsToast .incorrect-review-list { display:grid; gap:14px; margin-top:8px; }
#statsToast .incorrect-review-item {
  border:1px solid rgba(255,255,255,.14);
  border-radius:14px;
  background:rgba(255,255,255,.04);
  padding:14px;
}
#statsToast .incorrect-review-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:8px;
}
#statsToast .incorrect-review-player {
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  background:rgba(14,165,233,.18);
  color:#bae6fd;
  font-size:.8rem;
  font-weight:700;
}
#statsToast .incorrect-review-topic {
  margin:0 0 10px;
  color:#d8d8d8;
  font-size:.93rem;
}
#statsToast .incorrect-review-question {
  margin:0 0 12px;
  font-size:1.02rem;
  line-height:1.42;
}
#statsToast .incorrect-review-options {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
#statsToast .review-option {
  min-height:68px;
  padding:10px 12px;
  border:1px solid #5b5b5b;
  border-radius:12px;
  background:#1a1a1a;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  line-height:1.3;
  overflow-wrap:break-word;
  word-break:normal;
  box-sizing:border-box;
}
#statsToast .review-option.option-correct {
  background:#dcfce7;
  border-color:#16a34a;
  color:#14532d;
}
#statsToast .review-option.option-wrong {
  background:#fee2e2;
  border-color:#dc2626;
  color:#7f1d1d;
}
#statsToast .incorrect-review-question mjx-container,
#statsToast .incorrect-review-options mjx-container {
  max-width:100%;
  white-space:normal !important;
}
#statsToast .incorrect-review-question mjx-container[jax="SVG"] > svg,
#statsToast .incorrect-review-options mjx-container[jax="SVG"] > svg {
  max-width:100%;
  height:auto !important;
}

#statsToast.review-mode .incorrect-review-note {
  color:#475569;
}

#statsToast.review-mode th,
#statsToast.review-mode td {
  border-bottom:1px solid #d8dee7;
}

#statsToast.review-mode .new-high {
  color:#166534;
}

#statsToast.review-mode .note {
  color:#475569;
}

#statsToast.review-mode .incorrect-review-item {
  border:1px solid #d8dee7;
  background:#fff;
}

#statsToast.review-mode .incorrect-review-topic {
  color:#526071;
}

#statsToast.review-mode .incorrect-review-player {
  background:#fffbe6;
  color:#111;
  border:1px solid #111;
}

#statsToast.review-mode .review-option {
  background:#fff;
  border-color:#cbd5e1;
  color:#111827;
}

#statsToast.review-mode .review-option.option-correct {
  background:#dcfce7;
  border-color:#16a34a;
  color:#14532d;
}

#statsToast.review-mode .review-option.option-wrong {
  background:#fee2e2;
  border-color:#dc2626;
  color:#7f1d1d;
}

.btn { padding:10px 14px; border-radius:10px; border:0; cursor:pointer; font-weight:600; }
.btn-secondary { background:#2a2a2a; color:#fff; }
.btn-primary { background:#0ea5e9; color:#001018; }

#topicPanel {
  width:min(1100px,95vw);
  border:2px solid #000;
  border-radius:12px;
  padding:10px;
  box-sizing:border-box;
  margin-top:10px;
}

#topicHeader {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

#topicButtons {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

#topicToggle,
#topicSelectAll {
  padding:8px 12px;
  border-radius:8px;
  border:1px solid #777;
  background:#f7f7f7;
  cursor:pointer;
  font-weight:700;
}

#topicSections {
  margin-top:8px;
  display:grid;
  gap:16px;
}

#topicPanel.dimmed {
  opacity:.45;
  transition:opacity .2s ease;
}

#topicPanel.dimmed .topic-item input,
#topicPanel.dimmed .topic-item .ex-btn,
#topicPanel.dimmed .topic-item .practice-btn,
#topicPanel.dimmed #topicToggle,
#topicPanel.dimmed #topicSelectAll,
#topicPanel.dimmed .stage-btn {
  pointer-events:none;
}

.stage-block h3 {
  margin:0 0 8px;
  font-size:1rem;
}

.stage-block h3 a {
  color:#111;
  text-underline-offset:2px;
}

.stage-head {
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  margin-bottom:6px;
}

.stage-head .row {
  display:flex;
  gap:6px;
}

.stage-btn {
  font-size:.7rem;
  padding:2px 6px;
  border:1px solid #c4c4c4;
  border-radius:6px;
  background:#fcfcfc;
  color:#444;
  cursor:pointer;
}

.alevel-stage-block {
  gap:10px;
}

.year-block {
  border:0;
  border-radius:0;
  padding:0;
  background:transparent;
}

.year-block + .year-block {
  margin-top:10px;
}

.year-head {
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  margin-bottom:8px;
}

.year-head h4 {
  margin:0;
  font-size:.95rem;
  color:#3d3560;
}

.year-head .row {
  display:flex;
  gap:6px;
}

.year-block-a2 .year-head h4 {
  color:#31445d;
}

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

.topic-item {
  display:flex;
  gap:8px;
  align-items:center;
  min-width:0;
}

.topic-item .spacer { flex:1; }
.topic-item.selected label { font-weight:700; }
.topic-item.example-active { padding:2px 0; }
.topic-item.example-active label {
  color:#4b3f72;
  font-style:normal;
}
.topic-item input { margin:0; }

.topic-item label {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  min-width:0;
}

.ex-btn {
  font-size:.8rem;
  padding:5px 8px;
  border:1px solid #999;
  background:#f4f4f4;
  border-radius:8px;
  cursor:pointer;
}

.practice-btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:.8rem;
  padding:5px 8px;
  border:1px solid #777;
  background:#111;
  color:#fff;
  border-radius:8px;
  cursor:pointer;
  text-decoration:none;
  line-height:1.2;
}

.practice-btn:hover {
  text-decoration:underline;
}

#topicPanel.topic-locked .topic-item label {
  white-space:normal;
}

#exampleBox {
  display:none;
  grid-column:1 / -1;
  margin-top:10px;
  margin-bottom:4px;
  border:1px solid #4b3f72;
  border-radius:10px;
  padding:10px;
  background:#faf9ff;
}

#exampleBox h4 { margin:0 0 8px; }
#exampleQuestion { min-height:36px; font-size:1.18rem; }
#exampleOptions { margin-top:8px; display:grid; grid-template-columns:repeat(2,1fr); gap:8px; }
#exampleOptions button {
  min-height:54px;
  font-size:1.08rem;
  border-radius:10px;
  border:1px solid #bbb;
  background:#fff;
  color:#111;
  cursor:default;
  opacity:1;
}
#exampleOptions button.correct-answer {
  border-color:#166534;
  background:#dcfce7;
  box-shadow:0 0 0 2px rgba(22,101,52,.18);
  font-weight:700;
}
#exampleFeedback { margin-top:8px; min-height:24px; font-weight:700; }

.settings-row {
  width:min(980px,94vw);
  margin:12px auto 0;
  display:grid;
  grid-template-columns:repeat(3,minmax(160px,1fr));
  gap:12px;
  align-items:stretch;
  justify-items:stretch;
}

.container,
.mode-select {
  width:100%;
  text-align:center;
  margin:0 auto;
  border:none;
  border-radius:0;
  padding:0 4px 2px;
  box-sizing:border-box;
}
.mode-select {
  grid-column: 1 / -1;
}

.start-time-container {
  justify-self:center;
  width:100%;
}

.container p,
.mode-select p { margin:0 0 8px; }

#startTimeSlider { width:min(260px,100%); }
.think-time-container {
  width:100%;
}
.think-time-container p {
  margin-bottom:8px;
}
#thinkTimeSlider,
#bonusTimeSlider {
  width:min(260px,100%);
}
.mode-select .row { display:flex; gap:14px; justify-content:center; align-items:center; flex-wrap:wrap; }
.mode-select label { font-size:.95rem; cursor:pointer; }

#statusBadge {
  position:fixed;
  top:34px;
  right:10px;
  border-radius:999px;
  padding:6px 10px;
  font-size:.8rem;
  display:none;
  z-index:30;
}

#statusBadge.ok {
  background:#16a34a;
  color:#fff;
}

#statusBadge.error {
  background:#dc2626;
  color:#fff;
}

#statusBadge.info {
  background:#334155;
  color:#fff;
}

#versionBadge {
  position:fixed;
  top:8px;
  right:10px;
  font-size:.78rem;
  color:#555;
  background:rgba(255,255,255,.86);
  border:1px solid #d0d0d0;
  border-radius:999px;
  padding:2px 8px;
  z-index:31;
  letter-spacing:.01em;
}

#topNav {
  position:fixed;
  top:8px;
  left:10px;
  display:flex;
  align-items:center;
  gap:6px;
  z-index:31;
}

#topNav .top-pill {
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:.78rem;
  color:#555;
  background:rgba(255,255,255,.86);
  border:1px solid #d0d0d0;
  border-radius:999px;
  padding:2px 8px;
  letter-spacing:.01em;
  text-decoration:none;
}

#topNav a.top-pill {
  color:#111;
  font-weight:700;
}

#topNav a.top-pill:hover {
  text-decoration:underline;
}

#topNav .subject-label {
  color:#666;
  font-size:.74rem;
  font-weight:700;
}

#topNav select {
  border:none;
  background:transparent;
  color:#555;
  font-size:.78rem;
  padding:0;
  max-width:130px;
}

#topNav select:focus {
  outline:none;
}

.question code,
.options code,
#exampleQuestion code,
#exampleOptions code {
  font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;
  font-size:.95em;
}

.question pre,
.options pre,
#exampleQuestion pre,
#exampleOptions pre {
  margin:6px 0;
  text-align:left;
  border:1px solid #ddd;
  border-radius:8px;
  padding:8px;
  background:#f8fafc;
  white-space:pre-wrap;
  word-break:break-word;
  overflow-x:hidden;
}

.seo-section {
  width:min(1100px,95vw);
  margin:18px auto 0;
  padding:18px 20px;
  border:2px solid #111;
  border-radius:14px;
  background:#f8fafc;
  box-sizing:border-box;
}

.seo-section h2 {
  margin:0 0 10px;
  text-align:center;
  font-size:1.25rem;
}

.seo-section p {
  margin:0 0 10px;
  line-height:1.5;
}

.seo-topic-groups {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:12px;
  margin-top:14px;
}

.seo-topic-group {
  border:1px solid #d1d5db;
  border-radius:12px;
  background:#fff;
  padding:12px 14px;
}

.seo-topic-group h3 {
  margin:0 0 8px;
  font-size:1rem;
}

.seo-topic-group h4 {
  margin:10px 0 6px;
  font-size:.95rem;
}

.seo-topic-list {
  margin:0;
  padding-left:18px;
}

.seo-topic-list li {
  margin:0 0 4px;
  line-height:1.35;
}

.seo-secondary-link {
  color:#4b5563;
  font-size:.94em;
  text-underline-offset:2px;
}

.practice-title-section {
  border:0;
  background:transparent;
  padding:0 20px;
  margin:12px auto 8px;
}

.practice-title-section h2 {
  margin:0;
  font-size:clamp(2.1rem,5vw,3.4rem);
  line-height:1.05;
}

.practice-title-section .all-questions-intro {
  max-width:760px;
  margin:10px auto 0;
  text-align:center;
  color:#374151;
}

.practice-links-section {
  border:0;
  background:transparent;
  padding:0;
  margin:16px auto 0;
}

.practice-links-section h2 {
  font-size:1.15rem;
  margin:0 0 10px;
}

.practice-links-section .seo-topic-groups {
  margin-top:0;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
}

.practice-links-section .seo-topic-group {
  border:1px solid #ddd;
  border-radius:8px;
  background:#f8fafc;
  padding:12px 14px;
}

.practice-description-section {
  border:1px solid #ddd;
  border-radius:8px;
  background:#f8fafc;
  margin:16px auto 0;
  padding:14px 16px;
}

.practice-description-section h2 {
  margin:0 0 8px;
  text-align:left;
  font-size:1.15rem;
}

.practice-description-section h3 {
  margin:12px 0 6px;
  font-size:1rem;
}

.practice-description-section p {
  margin:0 0 8px;
}

.practice-description-section ul {
  margin:0;
  padding-left:20px;
}

.practice-description-section li {
  margin:0 0 4px;
  line-height:1.35;
}

.all-questions-page {
  width:min(980px,95vw);
  margin:12px auto 0;
  display:grid;
  gap:14px;
}

.all-question-card {
  border:1px solid #4b3f72;
  border-radius:10px;
  background:#faf9ff;
  padding:10px;
  box-sizing:border-box;
}

.all-question-card h3 {
  margin:0 0 8px;
  font-size:1rem;
}

.all-question-text {
  min-height:36px;
  margin:0;
  font-size:1.18rem;
  line-height:1.45;
}

.all-answer-list {
  margin:8px 0 0;
  padding:0;
  list-style:none;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.all-answer {
  min-height:54px;
  border:1px solid #bbb;
  border-radius:10px;
  background:#fff;
  padding:10px 12px;
  box-sizing:border-box;
  display:flex;
  align-items:center;
  font-size:1.05rem;
}

.all-answer.correct-answer {
  border-color:#166534;
  background:#dcfce7;
  box-shadow:0 0 0 2px rgba(22,101,52,.18);
  color:#14532d;
  font-weight:700;
}

body[data-subject-id="maths"] .question,
body[data-subject-id="maths"] .options button,
body[data-subject-id="maths"] #exampleQuestion,
body[data-subject-id="maths"] #exampleOptions button,
body[data-subject-id="maths"] .all-question-text,
body[data-subject-id="maths"] .all-answer,
body[data-subject-id="maths"] #statsToast .incorrect-review-question,
body[data-subject-id="maths"] #statsToast .review-option {
  font-family:"Times New Roman", Georgia, serif;
}

@media (max-width: 920px) {
  .game-container {
    width:min(1100px,97vw);
    min-height:min(56vh,500px);
    gap:10px;
  }
  .player {
    padding:12px;
    gap:8px;
    border-radius:12px;
  }
  .timer { font-size:clamp(1.35rem,3.9vw,1.8rem); }
  .question {
    height:auto;
    font-size:clamp(1.04rem,2.1vw,1.24rem);
  }
  .options {
    gap:8px;
    min-height:182px;
  }
  .options button {
    min-height:74px;
    font-size:clamp(.92rem,1.7vw,1rem);
    border-radius:12px;
  }
  .settings-row { grid-template-columns:repeat(3,minmax(140px,1fr)); }
  .topic-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #exampleOptions { grid-template-columns:1fr; }
  .seo-section {
    width:min(1100px,97vw);
  }
  .streak-high-score {
    width:min(1100px,97vw);
  }
}

@media (max-width: 760px) {
  .settings-row { grid-template-columns:1fr; }

  .game-container {
    height:auto;
    flex-direction:column;
  }
  .question {
    height:auto;
    min-height:78px;
    font-size:clamp(.98rem,2.4vw,1.14rem);
  }
  .options {
    min-height:150px;
  }
}

@media (max-width: 620px) {
  body {
    padding:10px 8px 14px;
  }
  h1 {
    font-size:1.32rem;
    gap:8px;
  }
  p.lead {
    font-size:.9rem;
    margin-bottom:8px;
  }
  .controls {
    margin:6px 0 10px;
  }
  .big-button {
    font-size:1rem;
    padding:9px 14px;
    min-width:144px;
    height:44px;
    border-radius:9px;
  }
  .game-container {
    width:min(1100px,98vw);
    height:auto;
    gap:6px;
    flex-direction:column;
  }
  .player {
    padding:8px;
    gap:6px;
    border-radius:10px;
  }
  .player h2 {
    margin:0;
    font-size:1rem;
  }
  .timer {
    font-size:clamp(1.1rem,3.8vw,1.4rem);
  }
  .question {
    height:auto;
    min-height:74px;
    font-size:clamp(.95rem,2.5vw,1.08rem);
  }
  .q-main.short-question {
    line-height:1.22;
  }
  .options {
    gap:6px;
    min-height:142px;
  }
  .options button {
    min-height:56px;
    padding:6px 8px;
    border-radius:9px;
    font-size:clamp(.84rem,2.2vw,.94rem);
    line-height:1.24;
  }
  .topic-footer {
    min-height:16px;
    font-size:.67rem;
  }
  .think-time-progress {
    width:min(220px,88%);
    padding:5px 0;
  }
  .think-time-progress-bar {
    height:7px;
  }
  .topic-grid { grid-template-columns:1fr; }
  #topNav {
    position:static;
    width:100%;
    justify-content:center;
    margin-bottom:6px;
    flex-wrap:wrap;
  }
  .seo-section {
    width:min(1100px,98vw);
    padding:14px 12px;
  }
  .streak-high-score {
    width:min(1100px,98vw);
    padding:9px 12px;
    gap:8px;
  }
  .streak-high-score-value {
    font-size:1.18rem;
  }
  .seo-section h2 {
    font-size:1.08rem;
  }
  #statsToast .incorrect-review-options {
    grid-template-columns:1fr;
  }
  #statsToast .review-option {
    min-height:56px;
    padding:8px 10px;
  }
}

@media (max-width: 540px) {
  .options { grid-template-columns:1fr; }
}
