:root {
  color-scheme: dark;
  --bg: #101719;
  --line: #34413e;
  --cream: #eee9d8;
  --muted: #aeb8b1;
  --gold: #dcc087;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--cream); font-family: Arial, Helvetica, sans-serif; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }

.site-header {
  height: 68px;
  padding: 0 clamp(20px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.wordmark { font-size: 13px; font-weight: 800; letter-spacing: .13em; white-space: nowrap; }
.header-link { color: var(--muted); font-size: 13px; white-space: nowrap; }
.header-link:hover { color: var(--cream); }

.home-main { max-width: 1160px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 64px) 70px; }
.intro { padding: 55px 0 38px; }
.intro h1 { margin: 0 0 10px; font: 400 clamp(38px, 5vw, 64px)/1.08 Georgia, 'Times New Roman', serif; letter-spacing: -.04em; }
.intro p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; }

.game-list { border-top: 1px solid var(--line); }
.game-entry {
  min-height: 170px;
  padding: 18px 0;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  transition: border-color .2s;
}
.game-entry:hover { border-color: var(--gold); }
.game-entry img {
  display: block;
  width: 230px;
  height: 133px;
  object-fit: cover;
  transition: filter .2s;
}
.game-entry:hover img { filter: brightness(1.15); }
.game-info { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.game-name { font: 400 clamp(29px, 3vw, 41px)/1.05 Georgia, 'Times New Roman', serif; letter-spacing: -.035em; }
.game-stats { display: flex; flex-wrap: wrap; gap: 7px 28px; color: var(--muted); font-size: 14px; }
.game-stats b { color: var(--cream); font-weight: 600; margin-right: 6px; }
.play-label { color: var(--gold); font-size: 13px; font-weight: 700; }
.site-note { margin: 24px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.play-page { height: 100dvh; overflow: hidden; }
.play-header {
  height: 56px;
  padding: 0 clamp(14px, 2vw, 30px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--line);
}
.back-link { font-size: 13px; font-weight: 700; white-space: nowrap; }
.back-link span { color: var(--gold); font-size: 20px; vertical-align: -1px; margin-right: 5px; }
.back-link:hover, .play-repo:hover { color: var(--gold); }
.play-edition { color: var(--gold); font: 700 11px 'Courier New', monospace; letter-spacing: .15em; text-align: center; }
.play-repo { color: var(--muted); font-size: 12px; white-space: nowrap; }
.game-frame-wrap { width: 100%; height: calc(100dvh - 56px); background: #070b0d; }
.game-frame-wrap iframe { display: block; width: 100%; height: 100%; border: 0; }
.frame-message { margin: 0; padding: 40px; text-align: center; color: var(--muted); }
.frame-message a { color: var(--gold); text-decoration: underline; }

@media (max-width: 680px) {
  .site-header { height: 58px; }
  .wordmark { font-size: 11px; }
  .header-link { font-size: 11px; }
  .intro { padding: 38px 0 30px; }
  .intro p { font-size: 14px; }
  .game-entry { grid-template-columns: 112px minmax(0, 1fr); min-height: 138px; gap: 16px; padding: 14px 0; }
  .game-entry img { width: 112px; height: 100px; }
  .game-info { gap: 8px; }
  .game-name { font-size: clamp(22px, 6vw, 30px); }
  .game-stats { display: block; font-size: 12px; line-height: 1.45; }
  .game-stats > span { display: block; }
  .play-label { font-size: 12px; }
  .play-header { height: 54px; }
  .game-frame-wrap { height: calc(100dvh - 54px); }
  .play-edition { font-size: 9px; letter-spacing: .05em; }
  .play-repo { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .game-entry, .game-entry img { transition: none; }
}
