:root {
  --bg: #fdfcf7;
  --card: #ffffff;
  --text: #1d1b1f;
  --muted: #5f5b66;
  --line: #e7e3d8;
  --yellow: #ffc20e;
  --blue: #1597e5;
  --soon-bg: #f1eee6;
  --soon-text: #8a8577;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141316;
    --card: #1e1c21;
    --text: #f3f1ec;
    --muted: #aaa5b0;
    --line: #322f37;
    --blue: #4db4f5;
    --soon-bg: #2a272e;
    --soon-text: #8f8a95;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--blue); }
img { max-width: 100%; display: block; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
.wrap-wide { max-width: 960px; }

/* ---------- landing page ---------- */

header { text-align: center; padding: 40px 0 8px; }
header img { width: 160px; height: 160px; margin: 0 auto; }
header h1 { margin: 12px 0 4px; font-size: 1.9rem; letter-spacing: -0.01em; }
header p { margin: 0; color: var(--muted); }

.coffee {
  margin: 32px 0 48px;
  padding: 24px;
  background: var(--card);
  border: 2px solid var(--yellow);
  border-radius: 20px;
  display: flex;
  gap: 24px;
  align-items: center;
}
.coffee img {
  width: 180px; height: 180px; flex: none;
  border-radius: 12px; background: #fff; padding: 8px;
}
.coffee h2 { margin: 0 0 6px; font-size: 1.35rem; }
.coffee p { margin: 0 0 16px; color: var(--muted); }
.btn-coffee {
  display: inline-block;
  background: var(--yellow);
  color: #1d1b1f;
  font-weight: 700;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 999px;
}
.coffee small { display: block; margin-top: 8px; color: var(--muted); word-break: break-all; }

h2.section { font-size: 1.35rem; margin: 0 0 16px; }
.game {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 14px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.game:hover { border-color: var(--blue); }
.game .cover { aspect-ratio: 21 / 5; width: 100%; object-fit: cover; }
.game .cover-blank {
  aspect-ratio: 21 / 5;
  display: grid; place-items: center;
  background: var(--soon-bg); color: var(--soon-text);
  font-weight: 700; letter-spacing: 0.08em; font-size: 0.8rem;
}
.game-body { padding: 20px; }
.game h3 { margin: 0; font-size: 1.25rem; }
.game h3 a { color: var(--text); text-decoration: none; }
/* the title link covers the whole card */
.game h3 a::after { content: ""; position: absolute; inset: 0; }
.game .meta { color: var(--muted); font-size: 0.9rem; margin: 2px 0 10px; }
.game p { margin: 0 0 16px; }
.more { color: var(--blue); font-weight: 600; font-size: 0.95rem; }
.game.placeholder { border-style: dashed; background: transparent; color: var(--muted); }
.game.placeholder:hover { border-color: var(--line); }

/* ---------- downloads ---------- */

.dl { display: flex; flex-wrap: wrap; gap: 10px; position: relative; z-index: 1; }
.btn-dl {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}
.soon {
  display: inline-flex; gap: 8px; align-items: baseline;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--soon-bg);
  color: var(--soon-text);
  font-weight: 600;
  font-size: 0.95rem;
}
.soon b { font-size: 0.72rem; letter-spacing: 0.08em; }
p.note { margin: 12px 0 0; font-size: 0.88rem; color: var(--muted); }

/* ---------- game pages ---------- */

.topbar { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; }
.topbar .home { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
.topbar .home img { width: 40px; height: 40px; }
.back { font-weight: 600; text-decoration: none; }

.hero-img { border-radius: 16px; width: 100%; aspect-ratio: 21 / 5; object-fit: cover; }
.game-page h1 { font-size: 2.2rem; margin: 24px 0 0; line-height: 1.15; }
.game-page .meta { color: var(--muted); margin: 4px 0 20px; }
.game-page h2 { font-size: 1.35rem; margin: 40px 0 12px; }
.game-page h3 { font-size: 1.05rem; margin: 20px 0 4px; }
.game-page p, .game-page li { margin-top: 0; }
.game-page ul { padding-left: 1.2em; }
.downloads { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin: 8px 0 0; }

.shots { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.shots.pilots { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 720px) { .shots.pilots { grid-template-columns: repeat(6, 1fr); } }
.shots.stages { grid-template-columns: repeat(2, 1fr); margin-top: 16px; }
@media (min-width: 560px) { .shots.stages { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 860px) { .shots.stages { grid-template-columns: repeat(7, 1fr); } }
.shots.gallery { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .shots.gallery { grid-template-columns: repeat(4, 1fr); } }
.shots.wide { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.shots a, .shots figure { margin: 0; }
.shots img { width: 100%; border-radius: 10px; }
.shots figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 4px; text-align: center; }
.shot-blank {
  border: 2px dashed var(--line);
  border-radius: 10px;
  display: grid; place-items: center;
  color: var(--soon-text);
  font-weight: 700; letter-spacing: 0.08em; font-size: 0.75rem;
  aspect-ratio: 7 / 10;
}
.shots.wide .shot-blank { aspect-ratio: 10 / 7; }
.pixel { image-rendering: pixelated; }

table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
td:first-child { font-weight: 700; white-space: nowrap; width: 1%; padding-right: 20px; }

/* ---------- footer ---------- */

footer {
  text-align: center;
  color: var(--muted);
  padding: 40px 0 48px;
  font-size: 0.95rem;
}
footer .links { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 20px; }
.yt { display: inline-flex; align-items: center; gap: 6px; }
.yt svg { width: 20px; height: 20px; }

@media (max-width: 560px) {
  .coffee { flex-direction: column; text-align: center; }
  .coffee img { width: 200px; height: 200px; }
  .game .cover, .game .cover-blank, .hero-img { aspect-ratio: 21 / 8; }
}

table.items { margin-bottom: 16px; }
table.items td { vertical-align: middle; }
img.item { width: 32px; height: 32px; max-width: none; }
