.games {
  --content-width: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  padding-bottom: clamp(36px, 5vw, 68px);
}
.games [hidden] { display: none !important; }
.games-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid #26526a;
  background: #061422;
}
.games-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #061422 8%, #061422df 32%, transparent 65%),
    url('./assets/mini-missions.webp') right 17% / min(100%, 1080px) auto no-repeat;
}
.games-hero-inner {
  max-width: var(--content-width);
  margin: auto;
  padding: clamp(44px, 5vw, 76px) var(--gutter);
}
.games h1 {
  margin: 0;
  width: fit-content;
  max-width: 70%;
  font-size: clamp(44px, 6.1vw, 86px);
  font-weight: 780;
  line-height: 1.05;
  letter-spacing: -.04em;
  text-shadow: 0 2px 18px #03101f;
}
.games-intro { max-width: 60%; margin: 14px 0 0; color: #d9e7f4; }
.games-back { margin-top: 8px; }
.games-grid, .board-pages {
  max-width: var(--content-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  margin-top: clamp(24px, 3vw, 42px);
}
.game-card {
  --game-accent: #80eaff;
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
  align-self: start;
  min-width: 0;
  padding: clamp(18px, 2.5vw, 30px);
  border: 1px solid #2d4759;
  border-top: 3px solid var(--game-accent);
  border-radius: 10px;
  background: linear-gradient(148deg, #132737, #0b1926 68%);
}
.game-card[data-game="pac-trooper"] { --game-accent: #ffd45b; }
.game-heading { display: flex; align-items: center; gap: 16px; grid-row: 1; }
.game-heading img { width: clamp(76px, 9vw, 116px); height: 78px; object-fit: contain; }
.game-heading h2 { margin: 0; font-size: clamp(24px, 2.5vw, 36px); letter-spacing: -.035em; }
.game-description { grid-row: 2; margin: 12px 0 18px; color: #bccedd; }
.game-links { grid-row: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; margin-bottom: 22px; }
.game-card .game-board { color: var(--game-accent); }
.game-results { grid-row: 4; align-self: start; min-width: 0; }
.game-card table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.game-card th, .game-card td { padding: 10px 4px; text-align: end; border-bottom: 1px solid var(--line); }
.game-card thead th { font-size: 12px; color: var(--muted); }
.game-card :is(th, td):nth-child(-n+2) { text-align: start; }
.game-card td:nth-child(2) { overflow-wrap: anywhere; }
.game-card td:nth-child(3) { font-weight: 700; white-space: nowrap; }
.game-card tbody tr:first-child td:first-child { font-weight: 700; }
.game-card tr[data-leading] { color: var(--game-accent); }
.game-status { margin: 14px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.game-status:empty { display: none; }
.games.full-board .games-grid { grid-template-columns: minmax(0, 1fr); }
.games.full-board .game-card { display: block; }
.board-pages { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 20px; margin-top: 12px; }
.page-count { font-variant-numeric: tabular-nums; }
html[dir="rtl"] .games-hero::before { transform: scaleX(-1); }
@media (max-width: 800px) {
  .games-grid { grid-template-columns: 1fr; gap: 16px; }
  .game-card { display: block; grid-row: auto; }
  .games-hero::before {
    background: linear-gradient(90deg, #061422de, #0614228a 50%, transparent 82%),
      url('./assets/mini-missions.webp') right top / auto 120% no-repeat;
  }
  .games-intro { max-width: 65%; }
}
