/* SPDX-License-Identifier: GPL-3.0-or-later */

:root {
  color-scheme: dark;
  --bg: #0a100d;
  --panel: #16201c;
  --border: #26362f;
  --text: #eef3ef;
  --muted: #9db3a8;
  --accent: #d8ff80;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

.game-shell {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1rem 2rem;
}

.topbar {
  width: min(100%, 20rem);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.topbar h1 {
  margin: 0;
  font-size: 1.4rem;
}

.stats {
  color: var(--muted);
  font-size: 0.95rem;
}

.stats strong {
  color: var(--accent);
}

canvas#board {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  image-rendering: pixelated;
}

.status {
  min-height: 1.2rem;
  color: var(--accent);
  font-weight: 600;
}

.help {
  max-width: 26rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.help kbd {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  font-family: inherit;
}

.provenance a {
  color: var(--muted);
}

.provenance {
  margin-top: 0.75rem;
}

.archive-touch { display:none; }
@media (any-pointer:coarse) {
  .game-shell {gap:8px;padding:10px;}
  canvas#board {width:auto;height:min(48vh,480px);max-width:100%;}
  .archive-touch {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;width:min(100%,340px);}
  .archive-touch button {min-height:44px;color:var(--text);background:var(--panel);border:1px solid var(--muted);touch-action:manipulation;}
  .archive-touch button[aria-pressed="true"] {color:var(--bg);background:var(--accent);}
  .status {margin:0;}
}
@media (any-pointer:coarse) and (orientation:landscape) and (min-width:360px) {
  .game-shell {display:grid;grid-template-columns:minmax(90px,1fr) minmax(225px,1.25fr);max-width:580px;margin:auto;}
  .topbar,.help,.status {grid-column:1/-1;justify-self:center;}
  canvas#board {height:min(65vh,420px);justify-self:center;}
}
