/* Light by default whatever the device setting (item #1705, Al, 3 November 2026); the page has no
   theme switch. Values below are copied from creag apps/lasair/src/theme/tokens.css; keep them in step by hand. */
:root {
  color-scheme: light;
  --color-bg: #f5f6fb;
  --color-surface: #ffffff;
  --color-border: #dde1ee;
  --color-text: #0f1324;
  --color-text-muted: #454c66;
  --color-accent: #3a3fd1;
  --color-focus: #3a3fd1;
  --radius-md: 4px;
  --radius-lg: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font: 16px/1.5 "Inter Variable", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

main { max-width: 960px; margin: 0 auto; padding: 24px; display: grid; gap: 16px; }

h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: 0.02em; }

.frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
figure { margin: 0; }
video { width: 100%; height: 100%; object-fit: cover; }
.frame:has(video[hidden]) { background: var(--color-surface) url("poster.svg") center / cover; }
/* The chart carries no text, so "coming soon" is for screen readers only. */
.soon {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
video:not([hidden]) ~ .soon { display: none; }

/* Games: one card per game, each with its own colours set by its game-<name> class below. */
h2 { margin: 0 0 12px; font-size: 16px; font-weight: 600; letter-spacing: 0.02em; }
.games { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.game {
  --g-bg: var(--color-surface); --g-fg: var(--color-text); --g-muted: var(--color-text-muted);
  --g-border: var(--color-border); --g-accent: var(--color-accent);
  display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-content: start; height: 100%;
  padding: 16px; text-decoration: none; border: 1px solid var(--g-border); border-radius: var(--radius-lg);
  background: var(--g-bg); color: var(--g-fg);
}
.game:hover { border-color: var(--g-accent); }
.game:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.game .icon { grid-row: 1 / 3; width: 48px; height: 48px; border-radius: 10px; }
.game .name { font-weight: 700; font-size: 18px; }
.game .blurb { grid-column: 2; color: var(--g-muted); font-size: 14px; }
.game .icon ~ .blurb { grid-column: 2; }
.game .name:first-child, .game .name:first-child ~ .blurb, .game .name:first-child ~ .go { grid-column: 1 / -1; }
.game .go { grid-column: 2; margin-top: 8px; font-weight: 600; color: var(--g-accent); }
/* Carved Ages: toy-box wood and warm paper, rounded and chunky (palette from its manifest and icon). */
.game-carved-ages {
  --g-bg: #f3ead7; --g-fg: #3a2a14; --g-muted: #5e4a2c; --g-border: #c9a86a; --g-accent: #8a4b0f;
  border-width: 2px; border-radius: 14px; box-shadow: 0 3px 0 #c9a86a;
}
.game-carved-ages .name { font-family: Georgia, "Times New Roman", serif; font-size: 20px; }
/* Deepmere: night and mist, thin and quiet (palette from its coming-soon page). */
.game-deepmere {
  --g-bg: #0f1a26; --g-fg: #c9d3dd; --g-muted: #a9b6c2; --g-border: #2c4256; --g-accent: #9fd4e6;
  background: radial-gradient(ellipse at 50% 0%, #17283a, #07090f 80%); border-radius: var(--radius-md);
}
.game-deepmere .name { font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; font-size: 17px; }

/* Musings Radio: near-black and gold, from its icon (apps/radio/web/icons/icon.svg in grayal/studio). */
.game-radio {
  --g-bg: #1e1b18; --g-fg: #f1e9dc; --g-muted: #cbbfae; --g-border: #3a332b; --g-accent: #f4d58f;
}
/* Creag: chalk and slate, a crag in the mist (its icon, creag.svg). */
.game-creag { --g-bg: #f4f6f7; --g-fg: #1d2a33; --g-muted: #4b5a64; --g-border: #9aaab4; --g-accent: #2c5b6e; }
/* Studio render: plain surface with a slate edge; a tool, not a show. */
.game-render { --g-border: #b9c0d6; --g-accent: #2f5d8a; }

@media (max-width: 640px) {
  main { padding: 16px; }
}
