/* Question Grid — design tokens
   Palette: dark navy + pale chalk yellow, grounded in the
   classroom/exercise-book subject matter rather than a generic dashboard.
   Display face (Anton) gives the title bold, blocky impact for a
   projector; Inter handles UI text so it stays legible at a distance;
   JetBrains Mono is used sparingly for counts/numbers.
*/

:root {
  --bg: #F6F3EC;
  --panel: #FFFFFF;
  --ink: #1B2333;
  --muted: #6B7280;
  --board: #16233F;
  --board-line: #2A3B63;
  --chalk-yellow: #F5E2A0;
  --chalk-yellow-dark: #E0C877;
  --chalk-yellow-faded: #8B826F;
  --chalk-yellow-faded2: #4E5357;
  --chalk-blue: #6E9FB5;
  --line: #DDD6C6;
  --error: #B3453D;
  --error-bg: #FBECEA;
  --success: #4C7A5B;
  --success-bg: #EBF3EE;
  --warn: #9C7A2E;
  --warn-bg: #FBF3E0;
  --radius: 10px;
  --font-display: 'Josefin Sans', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

/* #gridView (and any other element) sets its own display value via an
   ID selector, which outranks the browser's default [hidden] rule by
   specificity - meaning "hidden" elements could still render at full
   size underneath the visible view. This guarantees hidden always
   wins, regardless of what else targets the element. */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
}

#setupView {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- Header ---------- */

.board {
  background: var(--board);
  background-image: linear-gradient(180deg, var(--board) 0%, #0F1A30 100%);
  color: var(--chalk-yellow);
  padding: 15px 24px;
  border-bottom: 4px solid var(--chalk-yellow);
  text-align: center;
  overflow: hidden;
  flex: 0 0 auto;
}

.board__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 1.4rem;
  overflow: hidden;
}

.board__title-text {
  color: var(--chalk-yellow);
  flex-shrink: 0;
  white-space: nowrap;
}

.board__title-squares {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: 0.35em;
  color: var(--chalk-yellow-faded2);
  font-size: 0.85em;
}

.board__title-squares--left {
  -webkit-mask-image: linear-gradient(to right, transparent, black 90%);
  mask-image: linear-gradient(to right, transparent, black 90%);
  text-align: right;
}

.board__title-squares--right {
  -webkit-mask-image: linear-gradient(to left, transparent, black 90%);
  mask-image: linear-gradient(to left, transparent, black 90%);
  text-align: left;
}

/* ---------- Layout ---------- */

.setup {
  flex: 1;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 20px 20px;
  display: flex;
  align-items: stretch;
}

.card {
  flex: 1;
  min-height: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---------- Two-column setup layout ---------- */

.setup-columns {
  display: flex;
  gap: 56px;
  align-items: flex-start;
}

.setup-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.setup-col--students > .field__label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}

@media (max-width: 820px) {
  .setup-columns { flex-direction: column; }
}

/* ---------- Students button row ---------- */

.students-btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.students-btn-row .btn {
  flex: 1;
  min-width: 140px;
  align-self: stretch;
}

/* ---------- Setup actions (Generate / Return to quiz) ---------- */

.setup-actions {
  display: flex;
  gap: 12px;
}

.setup-actions .btn--generate {
  flex: 1;
}

.btn--secondary {
  background: transparent;
  color: var(--board);
  border: 2px solid var(--board);
  box-shadow: none;
}

.btn--secondary:hover { background: #EEF3F0; }

/* ---------- Fields ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label,
.field__label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}

.field__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.field--spaced {
  margin-top: 6px;
}

select,
input[type="number"],
input[type="text"],
textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
}

/* Native <select> chrome varies by OS/browser and can include a
   coloured "valid" or "selected" highlight we don't control directly
   (this is what shows as a dark rounded box around the dropdowns).
   Removing native appearance entirely and supplying our own arrow
   sidesteps it for good, rather than chasing each browser's quirk. */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M5 8l5 5 5-5' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  box-shadow: none !important;
  outline: none;
}

/* Some browsers (notably Firefox) apply a default green glow/outline
   to form controls it considers "valid" - our selects have no real
   validation rules, so this reads as an unintended highlight. */
select:valid,
input:valid,
select:-moz-ui-valid,
input:-moz-ui-valid {
  box-shadow: none;
}

select:disabled,
input:disabled {
  color: var(--muted);
  background: #FAF8F3;
}

select:focus-visible,
input:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 3px solid var(--chalk-blue);
  outline-offset: 2px;
}

.hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.hint-box {
  padding: 8px 10px;
  border-radius: 8px;
  background: #FBF3D9;
  border: 1px solid var(--chalk-yellow-dark);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.hint-box--saved {
  background: var(--success-bg);
  border-color: var(--success);
  color: var(--success);
}

/* ---------- Students ---------- */

.students-panel {
  margin-top: 8px;
  padding: 14px;
  background: #FAF8F3;
  border: 1px dashed var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.students-panel label {
  font-size: 0.85rem;
  color: var(--muted);
}

.students-panel textarea {
  resize: vertical;
}

/* ---------- Method tabs (Pearson book / Dr Frost skills / Saved starter) ---------- */

.method-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: #FAF8F3;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.method-tab {
  flex: 1;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 10px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.method-tab:hover { color: var(--ink); }

.method-tab--active {
  background: var(--board);
  color: var(--chalk-yellow);
}

.method-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
}

/* ---------- Hint link (e.g. Dr Frost reference sheet) ---------- */

.hint-link {
  font-size: 0.85rem;
  color: var(--chalk-blue);
  text-decoration: none;
  font-weight: 600;
}

.hint-link:hover { text-decoration: underline; }

/* ---------- Topic checklist ---------- */

.topic-checklist[hidden] {
  display: none;
}

.topic-checklist {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 170px;
  overflow-y: auto;
  padding: 12px;
  background: #FAF8F3;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.topic-checklist label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  font-size: 0.92rem;
  cursor: pointer;
}

.topic-checklist input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.topic-checklist .count {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-left: auto;
}

.checklist-select-all {
  font-weight: 600 !important;
  padding-bottom: 6px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.checklist-group-header {
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
}

.checklist-group-header--first {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

/* ---------- Checkbox rows ---------- */

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}

.checkbox input {
  width: 18px;
  height: 18px;
}

/* ---------- Buttons ---------- */

.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn:active { transform: translateY(1px); }

.btn--ghost {
  background: transparent;
  border: 1px solid var(--board);
  color: var(--board);
}

.btn--ghost:hover { background: #EEF3F0; }

.btn--primary {
  background: var(--board);
  color: var(--chalk-yellow);
  align-self: flex-start;
}

.btn--primary:hover { background: #0F1A30; }

.btn--generate {
  background: var(--chalk-yellow);
  color: var(--board);
  font-size: 1.05rem;
  padding: 14px 20px;
  box-shadow: 0 2px 0 var(--chalk-yellow-dark);
}

.btn--generate:hover:not(:disabled) { background: #EBC968; }

.btn--generate:disabled {
  background: #E8E3D4;
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
}

/* ---------- Status ---------- */

.status {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.status--info { background: #EEF3F0; color: var(--board); }
.status--success { background: var(--success-bg); color: var(--success); }
.status--warn { background: var(--warn-bg); color: var(--warn); }
.status--error { background: var(--error-bg); color: var(--error); }


/* ==================================================================
   GRID VIEW
   ================================================================== */

#gridView {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.board--grid {
  padding: 10px 18px;
  border-bottom-width: 3px;
  flex: 0 0 auto;
  text-align: left;
}

.board--grid__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.board--grid__row .board__title {
  flex: 1;
  min-width: 0;
}

.board__title--small {
  font-size: 1.4rem;
  text-align: center;
  flex: 1;
  min-width: 90px;
}

.grid-header-actions {
  display: flex;
  gap: 6px;
}

.icon-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--chalk-yellow);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-body);
  white-space: nowrap;
}

.icon-btn:hover { background: rgba(255,255,255,0.18); }

.icon-btn--symbol {
  font-size: 1.25rem;
  line-height: 1;
}

.icon-btn svg {
  display: block;
}

/* ---------- Inline timer (sits directly left of the icon cluster) ---------- */

.timer-inline {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 14px; /* separates the timer group from the icon cluster */
}

.timer-inline__display {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--chalk-yellow);
  margin-right: 8px; /* separates the number from its control buttons */
  min-width: 56px;
  text-align: center;
}

.timer-inline .icon-btn {
  padding: 5px 9px;
  font-size: 0.9rem;
}

/* ---------- Save confirmation banner ---------- */

.save-confirm {
  margin: 8px 0 0;
  padding: 6px 12px;
  background: var(--chalk-yellow);
  color: var(--board);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  text-align: center;
}

/* ---------- Grid layout (3x3) ---------- */

.grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  overflow: hidden;
}

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

/* ---------- Square ---------- */

.square__hide-question-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  color: inherit;
  cursor: pointer;
  opacity: 0.6;
}

.square__hide-question-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.6);
}

.square {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  color: var(--square-text, var(--ink));
}

.square--blank {
  background: repeating-linear-gradient(
    135deg, #EFEBE0, #EFEBE0 10px, #E8E2D4 10px, #E8E2D4 20px
  ) !important;
  border-style: dashed;
}

.square--noalt { animation: shake 0.35s; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ---------- Content area (question / panel) ---------- */

.square__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 14px;
}

.square__question {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  font-weight: 700;
  line-height: 1.85;
}

/* Choices and answer split the content area top/bottom with the
   question by default; hint/explain replace the question entirely
   (handled by the [hidden] attribute in the markup, no split needed
   there). The hide-question toggle removes the question from choices/
   answer too, at which point this rule no longer applies. */
.square__content--split .square__question {
  flex: 0 0 46%;
}

.square__panel-full {
  /* Only take as much height as the content actually needs - a short
     answer or a hint/explanation shouldn't be forced to stretch across
     the full available area - capped at 90% so a genuinely long one
     still has most of the box once the question is hidden. */
  flex: 0 1 auto;
  max-height: 90%;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.panel-text {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  line-height: 1.85;
}

/* Standalone answer reveal (question has no wrong1/wrong2, so there's
   nothing to choose between) - same green, bold, centered look as a
   revealed-correct choice button, just as one box instead of three.
   The wrap fills the panel and centers its contents; the box itself
   shrink-wraps to the answer text rather than stretching full width. */
.answer-box-wrap {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.answer-box {
  display: inline-flex;
  max-width: 100%;
  max-height: 100%;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  line-height: 1.6;
  border-radius: 6px;
  border: 1px solid var(--success);
  background: var(--success-bg);
  color: var(--success);
  font-weight: 700;
  padding: 8px 16px;
}

/* ---------- Math markup (fractions, exponents, roots) ---------- */

.frac {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin: 0 0.15em;
  /* Pulls the two-line stack down so it sits against the surrounding
     text's baseline instead of hanging from the numerator's baseline -
     without this, a fraction right after a plain digit/word visually
     drops the whole line, since the tall stack's default alignment
     point is its top row, not its middle. */
  vertical-align: -0.4em;
  margin: 0 0.06em;
  line-height: 1;
}

/* A bare number fraction ({3/4}) can afford to be small and still
   read cleanly. An algebraic fraction needs the extra size to stay
   legible, so it keeps closer to full text size. */
.frac { font-size: 0.85em; }

.frac__num,
.frac__den {
  padding: 0 0.1em;
  line-height: 1.1;
}

.frac__num--line {
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.frac__den--line {
  text-decoration: overline;
  text-decoration-thickness: 0.08em;
  padding-top: 0.12em;
}

.vector {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  position: relative;
  top: 0.15em;
  font-size: 0.85em;
  margin: 0 0.15em;
}


.vector__bracket {
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 1.75em;
  line-height: 1;
  transform: scaleY(1.15);
}

.vector__stack {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 0 0.12em;
}

.vector__top,
.vector__bottom {
  padding: 0 0.05em;
  line-height: 1.1;
}

sub {
  position: relative;
  bottom: -0.15em;
  font-size: 0.62em;
  line-height: 0;
  vertical-align: baseline;
}

sup {
  position: relative;
  top: -0.35em;
  font-size: 0.62em;
  line-height: 0;
  vertical-align: baseline;
}

.radical {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.radical__sym {
  margin-right: 1px;
}

.radical__body {
  border-top: 0.09em solid currentColor;
  padding: 0 0.12em;
}

/* ---------- Answer choices (side by side buttons) ---------- */

.choices {
  flex: 0 1 auto;
  max-height: 90%;
  min-height: 0;
  display: flex;
  flex-direction: row;
  gap: 6px;
  margin-top: 6px;
}

.choice-btn {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.65);
  padding: 10px 6px;
  cursor: pointer;
  overflow: hidden;
  transition: opacity 1s ease;
}

.choice-btn:hover:not(:disabled) { background: rgba(255,255,255,0.9); }

.choice-btn__label {
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  text-align: center;
  font-family: var(--font-body);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.choice-btn--correct {
  background: var(--success-bg);
  border-color: var(--success);
}
.choice-btn--correct .choice-btn__label { color: var(--success); font-weight: 700; }

.choice-btn--wrong {
  background: var(--error-bg);
  border-color: var(--error);
}
.choice-btn--wrong .choice-btn__label { color: var(--error); }

.choice-btn--fading {
  opacity: 0;
  pointer-events: none;
}

/* ---------- Footer bar: icons left, student chip right ---------- */

.square__footer {
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,0.5);
}

.square__icons {
  display: flex;
}

.square__icons .icon {
  background: transparent;
  border: none;
  border-right: 1px solid var(--line);
  padding: 7px 9px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--square-text, var(--muted));
  cursor: pointer;
  opacity: 0.75;
}

.square__icons .icon:hover { opacity: 1; }

.square__icons .icon--indicator {
  cursor: default;
}

.square__icons .icon--indicator:hover { opacity: 0.75; }

.square__icons .icon[aria-pressed="true"] {
  background: var(--board);
  color: var(--chalk-yellow);
  opacity: 1;
}

.square__studentchip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
}

.square__studentchip--revealed {
  background: var(--chalk-yellow);
}

.student-icon {
  background: transparent;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  line-height: 1;
  padding: 2px;
}

.student-name {
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--board);
}

/* ---------- Shutters ---------- */

.square__shutter {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg, #BEBEB4, #BEBEB4 8px, #9F9F94 8px, #9F9F94 16px
  );
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
}

.square__shutter-text {
  font-family: 'Open Sans', var(--font-body);
  font-weight: 400;
  font-size: 2.1rem;
  line-height: 1.15;
  color: #C9C9BE;
  text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.35), 1px 1px 1px rgba(255, 255, 255, 0.55);
  letter-spacing: 0.02em;
}

.square__shutter-text sup {
  font-size: 0.65em;
}

.square__shutter-text--title {
  text-transform: uppercase;
  font-size: 1.6rem;
  letter-spacing: 0.1em;
}

/* ---------- Responsive ---------- */

@media (max-width: 480px) {
  .board__title { font-size: 1.6rem; }
  .card { padding: 18px; }
}

@media (max-width: 700px) {
  .grid { grid-template-columns: 1fr; grid-template-rows: repeat(9, minmax(110px, 1fr)); }
  .grid--four { grid-template-rows: repeat(4, minmax(110px, 1fr)); }
}

/* ---------- Quotes popup ---------- */

.quotes-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 26, 48, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}

.quotes-modal {
  position: relative;
  background: var(--panel);
  border-radius: var(--radius);
  padding: 44px 36px 36px;
  max-width: 560px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.quotes-modal__text {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
}

.quotes-modal__author {
  margin: 0;
  align-self: stretch;
  text-align: right;
  font-size: 1rem;
  font-style: italic;
  color: var(--muted);
}

.quotes-modal__topbar {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.quotes-modal__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--board);
  color: var(--chalk-yellow);
  font-size: 1rem;
  cursor: pointer;
}

.quotes-modal__icon-btn:hover { background: #0F1A30; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
