/* ==========================================================================
   Rig the Map — Gerrymandering Game
   ========================================================================== */

/* --------------------------------------------------------------------------
   Custom Properties (mirrors main site)
   -------------------------------------------------------------------------- */
:root {
  --orange: #FF8A65;
  --orange-bright: #FF6D3F;
  --magenta: #E91E63;
  --magenta-dark: #C2185B;
  --purple: #4A148C;
  --purple-deep: #311B92;
  --cream: #FFF8F0;
  --cream-dark: #F5EDE4;
  --charcoal: #2D2D2D;
  --slate: #1F2933;
  --white: #FFFFFF;

  --font-display: 'Bebas Neue', 'Arial Black', sans-serif;
  --font-body: 'Barlow', 'Segoe UI', sans-serif;
  --font-accent: 'Permanent Marker', cursive;

  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;

  /* Voter colors */
  --voter-purple: #7E57C2;
  --voter-orange: #FF8A65;

  /* District palette — high contrast against both purple and orange voters */
  --dist-1: #E91E63;
  --dist-2: #00E5FF;
  --dist-3: #FFEB3B;
  --dist-4: #FFFFFF;
  --dist-5: #76FF03;
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--cream);
  background: linear-gradient(160deg, #0d0d1a 0%, var(--purple-deep) 40%, #1a0a2e 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--orange);
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--orange-bright);
}

/* --------------------------------------------------------------------------
   Header (matches form pages)
   -------------------------------------------------------------------------- */
.game-header {
  background: rgba(0, 0, 0, 0.25);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.game-header__brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  text-decoration: none;
  background: var(--white);
  padding: 0.35rem 1rem;
  border: 2.5px solid var(--charcoal);
  transform: rotate(-4deg);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  line-height: 1;
  clip-path: polygon(
    0% 1%, 3% 0%, 8% 2%, 15% 0%, 22% 1%, 30% 0%,
    40% 1.5%, 50% 0%, 60% 1%, 70% 0%, 80% 1.5%, 90% 0%, 97% 1%, 100% 0%,
    100% 99%, 97% 100%, 90% 98%, 82% 100%, 74% 99%, 65% 100%,
    55% 98.5%, 45% 100%, 35% 99%, 25% 100%, 15% 98.5%, 8% 100%, 2% 99%, 0% 100%
  );
}

.game-header__brand:hover {
  transform: rotate(-1deg) scale(1.04);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.35);
}

.game-header__name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--purple);
}

.game-header__tagline {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  color: var(--orange-bright);
}

.game-header__back {
  font-family: var(--font-accent);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.3);
  padding-bottom: 2px;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.game-header__back:hover {
  color: var(--orange);
  border-color: var(--orange);
}

.game-header__back-arrow {
  display: inline-block;
  transition: transform var(--transition-fast);
}

.game-header__back:hover .game-header__back-arrow {
  transform: translateX(-4px);
}

@media (max-width: 600px) {
  .game-header__tagline { display: none; }
  .game-header__back-long { display: none; }
}

/* --------------------------------------------------------------------------
   Game Main
   -------------------------------------------------------------------------- */
.game-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
}

/* --------------------------------------------------------------------------
   Intro Screen
   -------------------------------------------------------------------------- */
.game-intro {
  text-align: center;
  max-width: 480px;
}

.game-intro__title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 12vw, 6rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1;
  color: var(--white);
  margin: 0 0 1rem;
}

.game-intro__sub {
  font-size: clamp(1.05rem, 3vw, 1.25rem);
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 2rem;
  line-height: 1.5;
}

.game-intro__time {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.35);
  margin: 1rem 0 0;
}

/* Link-style button */
.link-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-accent);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
  transition: color var(--transition-fast), border-color var(--transition-fast);
  margin-top: 1.25rem;
}

.link-btn:hover {
  color: var(--orange);
  border-color: var(--orange);
}

.link-btn:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Hall of Shame Modal
   -------------------------------------------------------------------------- */
.hall-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
}

.hall-modal.is-open {
  display: flex;
}

.hall-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.hall-modal__window {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 400px;
  padding: 1.5rem;
  background: var(--slate);
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.hall-modal__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--orange);
  margin: 0 0 0.25rem;
}

.hall-modal__sub {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
  font-style: italic;
  margin: 0 0 1rem;
}

.hall-modal__body {
  text-align: left;
  margin-bottom: 1rem;
}

.hall-modal__loading,
.hall-modal__empty {
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
  margin: 1rem 0;
}

/* --------------------------------------------------------------------------
   Shared Button Styles
   -------------------------------------------------------------------------- */
.game-btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--white);
  background: var(--magenta);
  transform: rotate(-1deg);
}

.game-btn:hover {
  background: var(--magenta-dark);
  transform: rotate(0deg) scale(1.03);
}

.game-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: rotate(0deg);
}

.game-btn:disabled:hover {
  background: var(--magenta);
  transform: rotate(0deg) scale(1);
}

.game-btn:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.game-btn--start {
  font-size: 1.6rem;
  padding: 1rem 3rem;
}

.game-btn--skip {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.25);
  font-size: 0.95rem;
  padding: 0.5rem 1.4rem;
  transform: none;
  color: rgba(255, 255, 255, 0.6);
}

.game-btn--skip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.45);
  color: var(--white);
  transform: none;
}

.game-btn--reset {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
  font-size: 1rem;
  padding: 0.6rem 1.5rem;
  transform: none;
}

.game-btn--reset:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  transform: none;
}

.game-btn--submit {
  font-size: 1.1rem;
  padding: 0.7rem 1.8rem;
}

.game-btn--dismiss {
  font-size: 1rem;
  padding: 0.6rem 2rem;
  margin-top: 1rem;
  background: var(--orange);
  color: var(--charcoal);
}

.game-btn--dismiss:hover {
  background: var(--orange-bright);
  color: var(--charcoal);
}

.game-btn--cta {
  font-size: 1.1rem;
  padding: 0.75rem 1.5rem;
  margin: 0.3rem;
}

.game-btn--donate {
  background: var(--orange);
  color: var(--charcoal);
  transform: rotate(1deg);
}

.game-btn--donate:hover {
  background: var(--orange-bright);
  color: var(--charcoal);
}

.game-btn--share {
  background: transparent;
  border: 2px solid var(--orange);
  color: var(--orange);
  transform: rotate(0.5deg);
}

.game-btn--share:hover {
  background: rgba(255, 138, 101, 0.15);
}

/* --------------------------------------------------------------------------
   Gameplay Section
   -------------------------------------------------------------------------- */
.game-play {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

/* Level Bar */
.level-bar {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  width: 100%;
}

.level-bar__label {
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--orange);
}

.level-bar__objective {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Scoreboard */
.scoreboard {
  width: 100%;
  display: flex;
  gap: 0.5rem;
}

.scoreboard__row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  width: 100%;
}

.score-chip {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.15);
  white-space: nowrap;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.score-chip__swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.score-chip.is-won {
  border-color: var(--voter-purple);
  background: rgba(126, 87, 194, 0.15);
}

.score-chip.is-lost {
  border-color: var(--voter-orange);
  background: rgba(255, 138, 101, 0.15);
}

.score-chip.is-tie {
  border-color: rgba(255, 255, 255, 0.4);
}

/* --------------------------------------------------------------------------
   Grid
   -------------------------------------------------------------------------- */
.grid-wrap {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  width: min(90vw, 360px);
  aspect-ratio: 1;
  background: rgba(0, 0, 0, 0.4);
  padding: 3px;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 4px solid transparent;
  cursor: pointer;
  transition: border-color var(--transition-fast), filter var(--transition-fast);
  font-family: var(--font-display);
  font-size: clamp(1rem, 3.5vw, 1.3rem);
  font-weight: 700;
  color: var(--white);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  -webkit-tap-highlight-color: transparent;
}

.cell:hover {
  filter: brightness(1.15);
}

.cell:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: -3px;
  z-index: 1;
}

.cell[data-voter="purple"] {
  background: var(--voter-purple);
}

.cell[data-voter="orange"] {
  background: var(--voter-orange);
}

/* District assignment border */
.cell[data-district="1"] { border-color: var(--dist-1); }
.cell[data-district="2"] { border-color: var(--dist-2); }
.cell[data-district="3"] { border-color: var(--dist-3); }
.cell[data-district="4"] { border-color: var(--dist-4); }
.cell[data-district="5"] { border-color: var(--dist-5); }

/* Active district highlight */
.cell.is-active-district {
  filter: brightness(1.2);
}

/* --------------------------------------------------------------------------
   Warning
   -------------------------------------------------------------------------- */
.game-warning {
  font-size: 0.85rem;
  color: var(--magenta);
  min-height: 1.5em;
  margin: 0;
  text-align: center;
}

/* --------------------------------------------------------------------------
   District Palette
   -------------------------------------------------------------------------- */
.palette {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.palette__label {
  font-family: var(--font-display);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.5);
}

.palette__buttons {
  display: flex;
  gap: 0.4rem;
}

.palette-btn {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1rem;
  color: rgba(0, 0, 0, 0.6);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.palette-btn:hover {
  border-color: var(--white);
  transform: scale(1.1);
}

.palette-btn.is-selected {
  border-color: var(--white);
  box-shadow: 0 0 0 2px var(--white);
  transform: scale(1.12);
}

.palette-btn:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.palette-btn[data-district="1"] { background: var(--dist-1); }
.palette-btn[data-district="2"] { background: var(--dist-2); }
.palette-btn[data-district="3"] { background: var(--dist-3); }
.palette-btn[data-district="4"] { background: var(--dist-4); }
.palette-btn[data-district="5"] { background: var(--dist-5); }

.palette__eraser {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all var(--transition-fast);
}

.palette__eraser:hover {
  border-color: var(--white);
  transform: scale(1.1);
}

.palette__eraser.is-selected {
  border-color: var(--white);
  box-shadow: 0 0 0 2px var(--white);
  transform: scale(1.12);
}

.palette__eraser:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Action Buttons
   -------------------------------------------------------------------------- */
.game-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* --------------------------------------------------------------------------
   Help Button (in level bar)
   -------------------------------------------------------------------------- */
.help-btn {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-display);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all var(--transition-fast);
}

.help-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.help-btn:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Help Overlay
   -------------------------------------------------------------------------- */
.help-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
}

.help-overlay.is-open {
  display: flex;
}

.help-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.help-overlay__window {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 420px;
  padding: 1.5rem;
  background: var(--slate);
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.help-overlay__title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--orange);
  margin: 0 0 1rem;
}

.help-overlay__steps {
  margin: 0 0 1rem;
  padding: 0 0 0 1.25rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  line-height: 1.6;
}

.help-overlay__steps li {
  margin-bottom: 0.5rem;
}

.help-overlay__steps strong {
  color: var(--white);
}

.help-overlay__hint {
  font-size: 0.85rem;
  color: var(--magenta);
  font-style: italic;
  margin: 0 0 1rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Boss Chat Overlay
   -------------------------------------------------------------------------- */
.boss-chat {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
}

.boss-chat.is-open {
  display: flex;
}

.boss-chat__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.boss-chat__window {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 400px;
  padding: 1.5rem;
  background: var(--slate);
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.boss-chat__sender {
  font-family: var(--font-accent);
  font-size: 0.85rem;
  color: var(--magenta);
  margin: 0 0 1rem;
  letter-spacing: 0.03em;
}

.boss-chat__messages {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.boss-bubble {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.65rem 1rem;
  border-radius: 12px 12px 12px 2px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
  max-width: 90%;
  opacity: 0;
  transform: translateY(8px);
  animation: bubbleIn 0.3s ease forwards;
}

@keyframes bubbleIn {
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   Reveal Screen
   -------------------------------------------------------------------------- */
.game-reveal {
  text-align: center;
  max-width: 560px;
  padding: 1rem;
}

.reveal__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.reveal__headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 3.5rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: var(--white);
  margin: 0;
}

.reveal__time {
  font-family: var(--font-accent);
  font-size: clamp(1rem, 3vw, 1.3rem);
  color: var(--orange);
  margin: 0;
}

.reveal__body {
  text-align: left;
  width: 100%;
}

.reveal__body p {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
  margin: 0 0 1rem;
}

.reveal__body strong {
  color: var(--orange);
}

.reveal__callout {
  background: rgba(255, 138, 101, 0.1);
  border-left: 4px solid var(--orange);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.reveal__callout p {
  margin: 0;
  font-size: 1.05rem;
}

/* --------------------------------------------------------------------------
   Leaderboard
   -------------------------------------------------------------------------- */
.leaderboard {
  width: 100%;
  max-width: 360px;
  margin: 0.5rem 0;
}

.leaderboard__entry {
  margin-bottom: 1rem;
}

.leaderboard__prompt {
  font-family: var(--font-display);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--orange);
  display: block;
  margin-bottom: 0.5rem;
}

.leaderboard__input-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

.leaderboard__input {
  width: 5rem;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.25);
  outline: none;
  transition: border-color var(--transition-fast);
}

.leaderboard__input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.leaderboard__input:focus {
  border-color: var(--orange);
}

.game-btn--score {
  font-size: 1rem;
  padding: 0.55rem 1.2rem;
  transform: none;
}

.leaderboard__entry.is-submitted .leaderboard__input,
.leaderboard__entry.is-submitted .game-btn--score {
  display: none;
}

.leaderboard__entry.is-submitted .leaderboard__prompt {
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-accent);
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: 0;
}

.leaderboard__table-wrap {
  display: none;
}

.leaderboard__table-wrap.is-visible {
  display: block;
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.lb-table th {
  font-family: var(--font-display);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.4);
  text-align: left;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lb-table th:last-child {
  text-align: right;
}

.lb-table td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
}

.lb-table td:first-child {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
  width: 2rem;
}

.lb-table td:nth-child(2) {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lb-table td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.lb-table tr.is-you td {
  color: var(--orange);
}

.lb-table tr.is-you td:nth-child(2) {
  color: var(--orange);
}

.reveal__ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* --------------------------------------------------------------------------
   Footer (matches issue/form pages)
   -------------------------------------------------------------------------- */
.game-footer {
  background: rgba(0, 0, 0, 0.3);
  padding: 1.5rem;
  text-align: center;
}

.game-footer__disclaimer {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 0.75rem;
}

.game-footer__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.game-footer__links a {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.game-footer__links a:hover {
  color: var(--orange);
}

.game-footer__links svg {
  display: block;
}

/* --------------------------------------------------------------------------
   Focus States
   -------------------------------------------------------------------------- */
:focus {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Reduced Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .boss-bubble {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .cell {
    transition: none;
  }

  .game-btn {
    transition: none;
  }

  .palette-btn {
    transition: none;
  }

  .score-chip {
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */
@media print {
  .game-header,
  .game-footer,
  .boss-chat {
    display: none;
  }
}
