:root {
  color-scheme: dark;
  --bg: #14131c;
  --panel: #211f2e;
  --line: #38344b;
  --text: #ece9f5;
  --muted: #aaa5bd;
  --accent: #ffc94d;
  --accent-text: #2a2008;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 24px;
}

header nav { display: flex; gap: 20px; }
.home { color: var(--text); font-weight: 700; text-decoration: none; }

main {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 24px 48px;
}

h1 { margin: 0 0 8px; font-size: clamp(2rem, 6vw, 3rem); line-height: 1.1; }
.lead { max-width: 42em; margin: 0 0 12px; color: var(--muted); font-size: 1.15rem; }
.controls { margin: 0 0 28px; color: var(--muted); }

kbd {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--panel);
  color: var(--text);
  font: 0.85em ui-monospace, monospace;
}

.games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.game {
  display: flex;
  flex-direction: column;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.game img {
  display: block;
  width: 100%;
  aspect-ratio: 8 / 7;
  border-radius: 4px;
  background: #000;
  object-fit: cover;
  image-rendering: pixelated;
}

.game h2 { margin: 12px 0 2px; font-size: 1.25rem; }
.game p { margin: 0 0 10px; font-size: 0.95rem; }
.game .keys { flex: 1; color: var(--muted); font-size: 0.86rem; }
.game .links { display: flex; align-items: center; gap: 16px; margin: 0; }

.play {
  display: inline-block;
  padding: 7px 18px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
  text-decoration: none;
}

.play:hover { filter: brightness(1.08); }

.start {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
}

.start h1 { font-size: clamp(2.6rem, 9vw, 4.5rem); }
.choices { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin: 16px 0 28px; }
.choices .play { padding: 10px 22px; }
.note { max-width: 42em; margin: 0; color: var(--muted); font-size: 0.92rem; }

footer {
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}
