:root {
  color-scheme: light;
  --bg: #f7efe3;
  --bg-soft: #fbf7ef;
  --card: #fffaf1;
  --card-hover: #fffdf8;
  --text: #27221b;
  --muted: #6f665b;
  --accent: #9a6a43;
  --border: #dfd0bc;
  --border-strong: #c5ad8d;
  --icon-bg: #f1e3cf;
  --shadow: 0 18px 50px rgba(112, 82, 48, 0.12);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #151a18;
    --bg-soft: #1b211e;
    --card: #1f2723;
    --card-hover: #252f2a;
    --text: #f0e7d9;
    --muted: #b9ad9d;
    --accent: #d8bb8c;
    --border: #34423b;
    --border-strong: #647966;
    --icon-bg: #29342f;
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
  }
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 42rem);
}

a {
  color: inherit;
}

.site-header,
.page-shell,
.site-footer {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  padding: 76px 0 42px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 16px;
  font-size: clamp(2.4rem, 8vw, 5.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.07em;
}

.lede {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.7;
}

.games-section {
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.game-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 16px;
  min-height: 138px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.game-card:hover,
.game-card:focus-within {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  background: var(--card-hover);
}

.game-card:hover .game-title,
.game-card:focus-visible .game-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

.game-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--game-icon-bg, var(--icon-bg));
  color: var(--accent);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.06em;
}

.game-icon img {
  width: 68%;
  height: 68%;
  object-fit: contain;
}

.game-body {
  display: grid;
  gap: 9px;
}

.game-body h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.game-body p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 32px;
  border: 1px dashed var(--border);
  border-radius: 18px;
  background: var(--card);
  color: var(--muted);
  text-align: center;
}

.site-footer {
  padding: 36px 0 48px;
  color: var(--muted);
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .site-header {
    padding-top: 46px;
  }

  .section-heading {
    display: block;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .game-card {
    min-height: auto;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
