/* ── fCC COMMAND-LINE CHIC TOKENS ── */
:root {
  --gray-00: #ffffff;
  --gray-10: #dfdfe2;
  --gray-15: #d0d0d5;
  --gray-45: #858591;
  --gray-75: #3b3b4f;
  --gray-80: #2a2a40;
  --gray-85: #1b1b32;
  --gray-90: #0a0a23;

  --yellow-gold:  #ffbf00;
  --blue-light:   #99c9ff;
  --blue-dark:    rgb(0, 46, 173);
  --blue-mid:     #198eee;
  --green-light:  #acd157;
  --red-light:    #ffadad;
  --purple-light: #dbb8ff;

  --font-sans: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Fira Mono', Menlo, Consolas, monospace;
}

html { font-size: 18px; }
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

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

.skip-link {
  position: absolute;
  top: -100%;
  left: 8px;
  padding: 8px 16px;
  background: var(--gray-85);
  color: var(--gray-00);
  border: 2px solid var(--blue-light);
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  z-index: 9999;
}
.skip-link:focus-visible { top: 8px; outline: 2px solid var(--blue-mid); outline-offset: 2px; }

body {
  font-family: var(--font-sans);
  background: var(--gray-90);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  color: var(--gray-10);
  line-height: 1.5;
}

.wrap { width: 100%; max-width: 580px; flex: 1; display: flex; flex-direction: column; }

.logo { text-align: center; margin-bottom: 18px; position: relative; padding-top: 36px; }
.logo h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-00);
  letter-spacing: -0.5px;
}
.logo p {
  font-size: 0.67rem;
  color: var(--gray-45);
  margin-top: 4px;
  font-family: var(--font-mono);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* No drop shadow — depth via background luminance difference */
.card-wrap { margin: 0 0 auto; display: flex; flex-direction: column; }
.card {
  background: var(--gray-85);
  border-radius: 6px;
  padding: 28px;
  border: 1px solid var(--gray-75);
}

/* ── TIMER BAR ── */
.timer-track {
  height: 5px;
  background: var(--gray-45);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 20px;
}
.timer-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--green-light);
  width: 100%;
  transform-origin: left center;
  transform: scaleX(1);
  will-change: transform, background;
}
.timer-fill.off { background: var(--gray-75); opacity: 0.5; }
@keyframes drain {
  0%   { transform: scaleX(1); background: var(--green-light); }
  25%  { background: var(--green-light); }
  45%  { background: var(--yellow-gold); }
  100% { transform: scaleX(0); background: var(--red-light); }
}

/* ── PROGRESS DOTS ── */
.progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.dots { display: flex; gap: 7px; list-style: none; }
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gray-45);
  transition: background 0.25s;
}
.dot.active  { background: var(--blue-light); }
.dot.correct { background: var(--green-light); }
.dot.wrong   { background: var(--red-light); }
.dot.timeout { background: var(--gray-45); }

.counter {
  font-size: 0.67rem;
  font-weight: 700;
  color: var(--gray-45);
  letter-spacing: 1px;
  font-family: var(--font-mono);
  text-transform: uppercase;
}

/* ── SENTENCE ── */
.sentence-box {
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.translation {
  font-size: 0.72rem;
  color: var(--gray-45);
  font-style: italic;
  text-align: center;
  margin-top: 5px;
  min-height: 1em;
}
.sentence {
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--gray-00);
  line-height: 1.65;
  text-align: center;
}
.blank {
  display: inline-block;
  min-width: 52px;
  border-bottom: 2px solid var(--purple-light);
  color: var(--purple-light);
  padding: 0 2px;
  font-family: var(--font-mono);
  font-weight: 700;
}
.fade-in { animation: fadeUp 0.28s ease forwards; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* ── TIMEOUT MSG ── */
.timeout-msg {
  height: 22px;
  text-align: center;
  font-size: 0.67rem;
  font-weight: 700;
  color: var(--red-light);
  margin-bottom: 16px;
  font-family: var(--font-mono);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ── ANSWER BUTTONS ── */
.buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.btn-ans {
  padding: 16px 6px;
  height: 52px;
  white-space: nowrap;
  overflow: hidden;
  border: 1px solid var(--gray-45);
  border-radius: 4px;
  background: var(--gray-80);
  font-family: var(--font-mono);
  font-size: 0.89rem;
  font-weight: 700;
  color: var(--gray-10);
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
  user-select: none;
  letter-spacing: 0.5px;
}
.btn-ans:hover:not([aria-disabled="true"]) {
  border-color: var(--blue-light);
  color: var(--blue-light);
}
.btn-ans:focus-visible {
  outline: 2px solid var(--blue-mid);
  outline-offset: 2px;
}
.btn-ans[aria-disabled="true"] { cursor: default; opacity: 0.55; }
.btn-ans.correct { background: var(--green-light); border-color: var(--green-light); color: var(--gray-90); }
.btn-ans.wrong   { background: var(--red-light);   border-color: var(--red-light);   color: var(--gray-90); }
.btn-ans.reveal  { background: var(--green-light); border-color: var(--green-light); color: var(--gray-90); }
.btn-ans.none-label { font-size: 0.72rem; }

/* ── SCREENS ── */
.screen { display: none; }
#gameScreen, #reviewScreen { width: 100%; max-width: 560px; margin-left: auto; margin-right: auto; }
.screen.active { display: block; animation: fadeUp 0.3s ease; }

/* ── START SCREEN ── */
.start-inner { text-align: center; }
@media (min-width: 700px) {
  .wrap { max-width: 920px; }
  .card-wrap { margin: 0; }
  .card { display: flex; flex-direction: column; }
  .card-wrap:has(#gameScreen.active),
  .card-wrap:has(#reviewScreen.active) { flex: 1; }
  .card:has(#gameScreen.active),
  .card:has(#reviewScreen.active) { flex: 1; }
  #gameScreen, #reviewScreen { margin: auto; }
  #startScreen.active { display: flex; flex-direction: column; }
  /* two independent flex columns — spacing comes only from gap, never from shared row heights */
  .start-inner { display: flex; gap: 40px; align-items: flex-start; text-align: left; }
  .start-left, .start-right { flex: 1; display: flex; flex-direction: column; gap: 20px; }
  /* lang before Start Round on desktop (DOM order: CEFR, time, btn-cta, status, lang) */
  .start-right .lang-section    { order: 1; }
  .start-right .btn-cta         { order: 2; margin-top: 24px; }
  .start-right #startStatus     { order: 3; }
  .start-right .btn-theory-link { order: 4; }
  /* zero out margins that would add to gap */
  .start-intro p { margin-bottom: 0; }
  .start-right .time-section,
  .start-right .time-section:last-of-type { margin-bottom: 0; }
  .start-right .lang-section { margin-top: 0; padding-top: 0; border-top: none; }
  .start-left  .rules-box    { margin-bottom: 0; }
  .start-right .lang-picker  { display: grid; grid-template-columns: repeat(3, 1fr); }
}
.start-inner h2 {
  font-size: 1.33rem; font-weight: 700; color: var(--gray-00); margin-bottom: 8px;
}
.start-inner p {
  color: var(--gray-15); font-size: 0.89rem; margin-bottom: 20px; line-height: 1.6;
}
.rules-box {
  background: var(--gray-80);
  border: 1px solid var(--gray-75);
  border-radius: 4px;
  padding: 14px 18px;
  margin-bottom: 18px;
  text-align: left;
  list-style: none;
}
.rule {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 5px 0; font-size: 0.83rem; color: var(--gray-15);
}
.rule-ico { flex-shrink: 0; }

/* ── CTA — yellow-gold on dark, per fCC spec ── */
.btn-cta {
  width: 100%;
  padding: 14px;
  background: var(--yellow-gold);
  color: var(--gray-90);
  border: none;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.12s, transform 0.1s;
  letter-spacing: 0.2px;
}
.btn-cta:hover  { filter: brightness(1.1); transform: translateY(-1px); }
.btn-cta:active { filter: brightness(0.95); transform: translateY(0); }
.btn-cta:focus-visible { outline: 2px solid var(--blue-mid); outline-offset: 2px; }
.btn-cta[aria-disabled="true"] { opacity: 0.35; cursor: not-allowed; transform: none; filter: none; background: var(--gray-75); }

/* ── REVIEW SCREEN ── */
.review-header { text-align: center; margin-bottom: 22px; }
.review-title {
  font-size: 1.22rem; font-weight: 700; color: var(--gray-00); margin-bottom: 12px;
}
.stars { display: flex; justify-content: center; gap: 10px; margin-bottom: 6px; }
.star { font-size: 2rem; color: var(--gray-75); transition: color 0.3s; }
.star.lit {
  color: var(--yellow-gold);
  animation: starPop 0.4s cubic-bezier(.34,1.56,.64,1) backwards;
}
@keyframes starPop {
  from { transform: scale(0) rotate(-15deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg);   opacity: 1; }
}
.score-text {
  font-size: 0.67rem; color: var(--gray-45); font-weight: 700;
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 1px;
}

.review-list {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 22px; max-height: 380px; overflow-y: auto; padding-right: 2px;
  list-style: none;
}
.review-list::-webkit-scrollbar { width: 4px; }
.review-list::-webkit-scrollbar-thumb { background: var(--gray-75); border-radius: 2px; }

.r-item {
  border-radius: 4px;
  padding: 12px 14px;
  border-left: 3px solid;
  background: var(--gray-80);
}
.r-item.correct { border-color: var(--green-light); }
.r-item.wrong   { border-color: var(--red-light); }
.r-item.timeout { border-color: var(--gray-45); }

.r-sentence { font-size: 0.89rem; font-weight: 700; color: var(--gray-00); margin-bottom: 2px; }
.r-translation { font-size: 0.72rem; color: var(--gray-45); font-style: italic; margin-bottom: 4px; }
.r-meta     { font-size: 0.78rem; color: var(--gray-15); }
.r-meta .u-wrong { color: var(--red-light);   font-weight: 700; }
.r-meta .u-right { color: var(--green-light); font-weight: 700; }
.r-explain {
  font-size: 0.72rem; color: var(--gray-45);
  margin-top: 6px; line-height: 1.55;
  border-top: 1px solid var(--gray-75);
  padding-top: 6px;
}

/* ── PICKERS (CEFR + TIME) ── */
.time-section { margin-bottom: 14px; }
.time-section:last-of-type { margin-bottom: 18px; }
fieldset.time-section { border: none; padding: 0; margin-top: 0; min-width: 0; }
legend.time-label { padding: 0; display: block; }
.time-label {
  font-size: 0.61rem; font-weight: 700; color: var(--gray-45);
  text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 8px;
  font-family: var(--font-mono);
}
.time-picker { display: flex; gap: 6px; }
.time-btn, .cefr-btn {
  flex: 1; padding: 10px 4px;
  border: 1px solid var(--gray-45); border-radius: 4px;
  background: var(--gray-80);
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700;
  color: var(--gray-15); cursor: pointer; transition: border-color 0.12s, color 0.12s;
}
.time-btn:hover, .cefr-btn:hover { border-color: var(--blue-light); color: var(--blue-light); }
.time-btn:focus-visible, .cefr-btn:focus-visible { outline: 2px solid var(--blue-mid); outline-offset: 2px; }
.time-btn.sel, .cefr-btn.sel { background: var(--purple-light); border-color: var(--purple-light); color: var(--gray-90); box-shadow: inset 0 0 0 2px currentColor; }

/* ── LANGUAGE PICKER ── */
.lang-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--gray-75);
}
.lang-picker { display: flex; gap: 6px; }
@media (max-width: 480px) {
  .lang-picker { display: grid; grid-template-columns: repeat(3, 1fr); }
  #shortcutsToggle { display: none; }
}
.lang-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border: 1px solid var(--gray-45);
  border-radius: 4px;
  background: var(--gray-80);
  cursor: pointer;
  transition: border-color 0.12s;
}
.lang-btn:hover { border-color: var(--blue-light); }
.lang-btn:hover .lang-name { color: var(--blue-light); }
.lang-btn:focus-visible { outline: 2px solid var(--blue-mid); outline-offset: 2px; }
.lang-btn.sel { background: var(--purple-light); border-color: var(--purple-light); color: var(--gray-90); box-shadow: inset 0 0 0 2px currentColor; }
.lang-btn.sel .lang-name { color: var(--gray-90); }
.lang-flag { font-size: 1.3rem; line-height: 1; }
.lang-name {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 700;
  color: var(--gray-45);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* ── EXIT BUTTON ── */
.btn-back {
  display: none;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--gray-45);
  font-size: 0.83rem;
  cursor: pointer;
  padding: 4px 0;
  margin-bottom: 10px;
  transition: color 0.12s;
}
.btn-back:hover { color: var(--red-light); }
.btn-back:focus-visible { outline: 2px solid var(--blue-mid); outline-offset: 2px; border-radius: 2px; }

/* ── THEORY BUTTON (start screen) ── */
.btn-theory-link {
  display: block;
  margin-top: 12px;
  background: none;
  border: none;
  color: var(--gray-45);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  cursor: pointer;
  letter-spacing: 0.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.12s;
  padding: 4px 0;
  width: 100%;
}
.btn-theory-link:hover { color: var(--gray-15); }
.btn-theory-link:focus-visible { outline: 2px solid var(--blue-mid); outline-offset: 2px; }

/* ── THEORY MODAL ── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; animation: fadeUp 0.22s ease; }
.modal-box {
  background: var(--gray-85);
  border: 1px solid var(--gray-75);
  border-radius: 6px;
  padding: 24px 28px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.modal-header .theory-head { margin-bottom: 0; }
.modal-close {
  background: none;
  border: 1px solid var(--gray-75);
  border-radius: 4px;
  color: var(--gray-45);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  min-width: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.12s, color 0.12s;
}
.modal-close:hover { border-color: var(--red-light); color: var(--red-light); }
.modal-close:focus-visible { outline: 2px solid var(--blue-mid); outline-offset: 2px; }

/* ── THEORY SCREEN ── */
.theory-head {
  font-size: 1.22rem; font-weight: 700; color: var(--gray-00);
  margin-bottom: 14px; text-align: center;
}
.theory-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.theory-tab-btn {
  flex: 1; padding: 9px 4px;
  border: 1px solid var(--gray-75); border-radius: 4px;
  background: var(--gray-80);
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700;
  color: var(--gray-15); cursor: pointer;
  -webkit-appearance: none; appearance: none;
  transition: border-color 0.12s, color 0.12s;
}
.theory-tab-btn:hover { border-color: var(--blue-light); color: var(--blue-light); }
.theory-tab-btn:focus-visible { outline: 2px solid var(--blue-mid); outline-offset: 2px; }
.theory-tab-btn[data-tab="a"].active    { background: #26200a; border-color: var(--yellow-gold); color: var(--yellow-gold); }
.theory-tab-btn[data-tab="an"].active   { background: #0a1a2e; border-color: var(--blue-light);   color: var(--blue-light); }
.theory-tab-btn[data-tab="the"].active  { background: #0f2416; border-color: var(--green-light);  color: var(--green-light); }
.theory-tab-btn[data-tab="none"].active { background: #1a0e2e; border-color: var(--purple-light); color: var(--purple-light); }
.theory-tab-btn[data-tab="edge"].active { background: #2a1410; border-color: #ffb347;             color: #ffb347; }
.theory-tab-btn[data-tab="nom"].active  { background: #26200a; border-color: var(--yellow-gold); color: var(--yellow-gold); }
.theory-tab-btn[data-tab="akk"].active  { background: #0a1a2e; border-color: var(--blue-light);   color: var(--blue-light); }
.theory-tab-btn[data-tab="ein"].active  { background: #0f2416; border-color: var(--green-light);  color: var(--green-light); }
.theory-tab-btn[data-tab="full"].active { background: #1a0e2e; border-color: var(--purple-light); color: var(--purple-light); }
.theory-tab-btn[data-tab="verb"].active { background: #2a1410; border-color: #ffb347;             color: #ffb347; }
.theory-tab-btn[data-tab="prep"].active { background: #0a1e28; border-color: var(--blue-mid);     color: var(--blue-mid); }
/* Spanish / Portuguese / Italian share the same 4-tab colour scheme */
.theory-tab-btn[data-tab$="-gend"].active  { background: #26200a; border-color: var(--yellow-gold); color: var(--yellow-gold); }
.theory-tab-btn[data-tab$="-def"].active   { background: #0a1a2e; border-color: var(--blue-light);   color: var(--blue-light); }
.theory-tab-btn[data-tab$="-indef"].active { background: #0f2416; border-color: var(--green-light);  color: var(--green-light); }
.theory-tab-btn[data-tab$="-rules"].active,
.theory-tab-btn[data-tab$="-prep"].active,
.theory-tab-btn[data-tab$="-part"].active  { background: #1a0e2e; border-color: var(--purple-light); color: var(--purple-light); }
.theory-content { flex: 1; overflow-y: auto; padding-right: 2px; min-height: 0; }
.theory-content::-webkit-scrollbar { width: 4px; }
.theory-content::-webkit-scrollbar-thumb { background: var(--gray-75); border-radius: 2px; }
.theory-tab-pane { display: none; }
.theory-tab-pane.active { display: block; }
.theory-tab-pane:focus-visible { outline: 2px solid var(--blue-mid); outline-offset: 2px; }
.theory-tab-subtitle {
  font-size: 0.72rem; font-family: var(--font-mono); color: var(--gray-45);
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-75);
}
.theory-rule { margin-bottom: 12px; }
.theory-rule:last-child { margin-bottom: 0; }
.theory-rule-head { font-size: 0.83rem; font-weight: 700; color: var(--gray-10); margin-bottom: 5px; }
.theory-rule-head b { color: var(--yellow-gold); }
.theory-examples { display: flex; flex-direction: column; gap: 3px; }
.ex {
  font-size: 0.78rem; color: var(--gray-45);
  padding-left: 10px; border-left: 2px solid var(--gray-75); line-height: 1.55;
}
.ex i { font-style: italic; }
.art   { color: var(--yellow-gold);  font-weight: 700; font-family: var(--font-mono); }
.noart { color: var(--purple-light); font-weight: 700; font-family: var(--font-mono); }

/* ── GERMAN DECLENSION TABLES ── */
.de-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.75rem; font-family: var(--font-mono);
  margin: 6px 0 2px;
}
.de-table th, .de-table td {
  padding: 5px 8px; text-align: center;
  border: 1px solid var(--gray-75);
}
.de-table th {
  background: var(--gray-80); color: var(--gray-45);
  font-weight: 700; text-transform: uppercase; font-size: 0.65rem;
}
.de-table td:first-child {
  background: var(--gray-80); color: var(--gray-45);
  font-weight: 700; text-transform: uppercase; font-size: 0.65rem;
}
.de-table td.art { background: transparent; border-color: var(--gray-75); }

/* ── HEADER ACTIONS (theme + shortcuts + sound toggles) ── */
.header-actions {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 6px;
}
.btn-theme, .btn-shortcuts, .btn-sound {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  padding: 0;
  background: none;
  border: 1px solid var(--gray-45);
  border-radius: 4px;
  color: var(--gray-45);
  font-size: 0.83rem;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
}
.btn-theme:hover, .btn-shortcuts:hover, .btn-sound:hover { border-color: var(--gray-15); color: var(--gray-15); }
.btn-theme:focus-visible, .btn-shortcuts:focus-visible, .btn-sound:focus-visible { outline: 2px solid var(--blue-mid); outline-offset: 2px; }
.btn-shortcuts svg, .btn-sound svg { width: 1.1em; height: 1.1em; fill: currentColor; display: block; }
/* show correct icon based on current sfx state */
.btn-sound .sfx-off { display: none; }
.btn-sound[data-sfx="off"] .sfx-on  { display: none; }
.btn-sound[data-sfx="off"] .sfx-off { display: block; }

/* ── SHORTCUTS MODAL ── */
.shortcuts-box { max-width: 400px; }
.shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 4px 0 2px;
}
.shortcut-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.shortcut-row dt {
  min-width: 96px;
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.shortcut-row dd {
  margin: 0;
  color: var(--gray-15);
}
.shortcut-ctx {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--gray-45);
  margin-left: 6px;
}
kbd {
  display: inline-block;
  background: var(--gray-80);
  border: 1px solid var(--gray-75);
  border-bottom-width: 2px;
  border-radius: 3px;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gray-10);
  white-space: nowrap;
}

/* ── LIGHT THEME ── */
[data-theme="light"] {
  --gray-00: #0a0a23;
  --gray-10: #1b1b32;
  --gray-15: #3b3b4f;
  --gray-45: #5c5c6e;
  --gray-75: #c4c4cc;
  --gray-80: #e4e4ea;
  --gray-85: #f0f0f4;
  --gray-90: #ffffff;
  --blue-light: #1971c2;
  --purple-light: var(--green-light);
}
[data-theme="light"] .modal-overlay { background: rgba(0, 0, 0, 0.4); }
[data-theme="light"] .btn-cta { color: var(--gray-00); }

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  /* Timer drain is game-essential — restore it at its actual duration */
  .timer-fill {
    animation-duration: var(--drain-duration, 15s) !important;
    animation-iteration-count: 1 !important;
  }
}
[data-theme="light"] .btn-ans.correct,
[data-theme="light"] .btn-ans.wrong,
[data-theme="light"] .btn-ans.reveal { color: #0a0a23; }
[data-theme="light"] .time-btn.sel,
[data-theme="light"] .cefr-btn.sel,
[data-theme="light"] .lang-btn.sel { color: #0a0a23; }
[data-theme="light"] .lang-btn.sel .lang-name { color: #0a0a23; }
[data-theme="light"] .theory-tab-btn[data-tab="a"].active,
[data-theme="light"] .theory-tab-btn[data-tab="nom"].active,
[data-theme="light"] .theory-tab-btn[data-tab$="-gend"].active { background: #fff8e1; }
[data-theme="light"] .theory-tab-btn[data-tab="an"].active,
[data-theme="light"] .theory-tab-btn[data-tab="akk"].active,
[data-theme="light"] .theory-tab-btn[data-tab$="-def"].active { background: #e3f2fd; }
[data-theme="light"] .theory-tab-btn[data-tab="the"].active,
[data-theme="light"] .theory-tab-btn[data-tab="ein"].active,
[data-theme="light"] .theory-tab-btn[data-tab$="-indef"].active { background: #f0fdf4; }
[data-theme="light"] .theory-tab-btn[data-tab="none"].active,
[data-theme="light"] .theory-tab-btn[data-tab="full"].active,
[data-theme="light"] .theory-tab-btn[data-tab$="-rules"].active,
[data-theme="light"] .theory-tab-btn[data-tab$="-prep"].active,
[data-theme="light"] .theory-tab-btn[data-tab$="-part"].active { background: #faf5ff; }
[data-theme="light"] .theory-tab-btn[data-tab="edge"].active,
[data-theme="light"] .theory-tab-btn[data-tab="verb"].active { background: #fff7ed; }
[data-theme="light"] .theory-tab-btn[data-tab="prep"].active { background: #e0f2fe; }
