/*
 * The site's one stylesheet: every colour is a custom property here, defined
 * for dark (the fleet's default) and redefined for a light preference, and the
 * game's renderer reads its colours from the `--game-*` ones (client/draw.ts),
 * so this file is the one place a colour is written down.
 */
:root {
  color-scheme: dark light;
  --ground: #101418;
  --text: #e8ecef;
  --muted: #a9b3bb;
  --link: #8cc8ff;
  --game-ground: #0b0f12;
  --game-hero: #ffd166;
  --game-drifter: #ef6f6c;
  --game-light: #9be7ff;
  --game-lit: #6ee7a8;
  --game-exit: #c3a6ff;
}
@media (prefers-color-scheme: light) {
  :root {
    --ground: #f6f7f8;
    --text: #15191d;
    --muted: #4a545c;
    --link: #0b57a8;
  }
}
html {
  font-size: 100%;
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 1rem/1.5 system-ui, sans-serif;
}
a {
  color: var(--link);
}
.page {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}
/* The game page is the game: the canvas fills the window at 16:9, letterboxed
   on the ground colour when the window is another shape. */
.play {
  position: fixed;
  inset: 0;
  background: var(--game-ground);
}
.game {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.game-canvas {
  display: block;
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  image-rendering: pixelated;
  background: var(--game-ground);
}
.game-words {
  position: absolute;
  top: 0.5rem;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  pointer-events: none;
}
.menu {
  position: absolute;
  inset: 10% 15%;
  overflow: auto;
  padding: 1.5rem;
  background: var(--ground);
  border: 1px solid var(--muted);
}
.menu-links a {
  margin-right: 1rem;
}
.game-canvas:focus-visible {
  outline: 3px solid var(--link);
}

.storage-notice,
.stamp,
.dated {
  color: var(--muted);
  font-size: 0.9rem;
}
.keep input {
  font: inherit;
  padding: 0.4rem;
}
.site-footer {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1rem;
}
.site-footer nav a {
  margin-right: 1rem;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
