/* Colours come from the game's own palette (src/render/palette.ts). */
:root {
  --night: #10121c; --ink: #1a1c2c; --slate: #333c57; --steel: #566c86; --silver: #94b0c2; --white: #f4f4f4;
  --cyan: #73eff7; --lime: #a7f070; --gold: #ffcd75; --plum: #5d275d; --forest: #1b4d3e;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(93, 39, 93, 0.35), rgba(16, 18, 28, 0) 520px),
    repeating-linear-gradient(0deg, rgba(115, 239, 247, 0.03) 0 1px, transparent 1px 4px),
    var(--night);
  color: var(--white);
  font: 16px/1.6 var(--mono);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
main.wrap { flex: 1; padding: 24px 16px 48px; }
a { color: var(--cyan); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; image-rendering: pixelated; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.top { border-bottom: 2px solid var(--slate); background: var(--ink); }
.bar { height: 48px; display: flex; align-items: center; }
.brand { color: var(--white); text-decoration: none; font-weight: 700; letter-spacing: 0.04em; display: inline-flex; align-items: center; gap: 10px; }
.brand .dim { color: var(--silver); font-weight: 400; }
.led { width: 10px; height: 10px; background: var(--lime); box-shadow: 0 0 8px var(--lime); display: inline-block; }

/* The player: 16:9, as large as the page and the window allow. */
.player { width: min(100%, calc((100vh - 150px) * 16 / 9)); min-width: min(100%, 320px); margin: 0 auto; }
.stage { position: relative; aspect-ratio: 16 / 9; background: var(--night); border: 2px solid var(--slate); box-shadow: 6px 6px 0 var(--night), 6px 6px 0 2px var(--plum); overflow: hidden; }
.poster { width: 100%; height: 100%; object-fit: cover; }
.game { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--night); display: block; }
.play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 14px; padding: 16px 40px;
  background: var(--lime); color: var(--night); border: 2px solid var(--lime); box-shadow: 5px 5px 0 var(--forest);
  font: 700 clamp(20px, 3vw, 30px)/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer;
}
.play[hidden], .tool[hidden], .note[hidden] { display: none; }
.play:hover, .play:focus-visible { background: var(--cyan); border-color: var(--cyan); }
.play:active { transform: translate(calc(-50% + 2px), calc(-50% + 2px)); box-shadow: 3px 3px 0 var(--forest); }
.tri { width: 0; height: 0; border-left: 16px solid currentColor; border-top: 10px solid transparent; border-bottom: 10px solid transparent; }

.tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 16px; font-size: 14px; }
.note { margin: 0 auto 0 0; color: var(--silver); }
.tool { font: inherit; color: var(--cyan); background: none; border: 0; border-bottom: 1px solid currentColor; padding: 0 0 1px; cursor: pointer; text-decoration: none; }
.tool:hover { color: var(--white); }

.about { max-width: 720px; margin: 40px auto 0; }
.about h2 { margin: 0 0 12px; font-size: 26px; line-height: 1.2; color: var(--gold); }
.about p { margin: 0 0 16px; }
.chips { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 12px; padding: 2px 8px; border: 1px solid var(--steel); color: var(--silver); }
.links { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; }
.soon { color: var(--steel); }
.fine { color: var(--steel); font-size: 13px; }

.foot { border-top: 2px solid var(--slate); padding: 16px 0; color: var(--steel); font-size: 13px; }
.foot p { margin: 0; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.foot nav { display: flex; gap: 16px; }
.foot a { color: var(--silver); }
.foot a:hover { color: var(--white); }

/* Imprint and privacy: plain text pages. */
.legal { max-width: 720px; margin: 16px auto 0; }
.legal h1 { margin: 0 0 8px; font-size: 28px; line-height: 1.2; color: var(--gold); }
.legal h2 { margin: 32px 0 8px; font-size: 18px; color: var(--white); }
.legal p, .legal ul { margin: 0 0 12px; color: var(--silver); }
.legal ul { padding-left: 20px; }
.legal .lead { color: var(--steel); font-size: 14px; }
.legal .card { margin: 0 0 12px; padding: 14px 18px; border: 1px solid var(--slate); background: var(--ink); color: var(--white); font-style: normal; }
.legal .back { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--slate); }

@media (max-width: 700px) {
  main.wrap { padding-top: 16px; }
  .player { width: 100%; }
  .stage { box-shadow: none; }
  .about { margin-top: 28px; }
  .tools { justify-content: flex-start; }
}
@media (prefers-reduced-motion: no-preference) { .led { animation: pulse 2.4s steps(2, end) infinite; } }
@keyframes pulse { 50% { opacity: 0.45; } }
