:root {
  color-scheme: dark;
  --bg: #171022;
  --panel: #21182e;
  --ink: #fbf7ff;
  --muted: #d1c3db;
  --edge: #463653;
  --brand: #ff83ac;
  --accent: var(--brand);
  --display: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 35% -13%, #402254 0, transparent 48rem), var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
h1, h2, p { margin: 0; }
a { color: inherit; }
a:focus-visible, button:focus-visible, video:focus-visible, canvas:focus-visible {
  outline: 3px solid #ffd18a;
  outline-offset: 4px;
}
.shell { width: min(92%, 81rem); margin-inline: auto; }
.skip {
  position: absolute;
  z-index: 1;
  inset: .75rem auto auto .75rem;
  padding: .6rem 1rem;
  color: var(--bg);
  background: var(--ink);
  transform: translateY(-160%);
}
.skip:focus { transform: none; }
.masthead, .footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.masthead { min-height: 4.6rem; border-bottom: 1px solid var(--edge); }
.wordmark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
  font: 800 1.15rem/1 var(--display);
  letter-spacing: -.07em;
}
.wordmark img { display: block; margin-inline-end: .55rem; border-radius: .28rem; }
.wordmark span, h1 span { color: var(--brand); }
.masthead nav { display: flex; gap: clamp(.8rem, 3vw, 1.7rem); font-weight: 650; }
.masthead nav a { text-decoration: none; }
.masthead nav a:hover, .masthead nav a[aria-current="page"] {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: .32em;
}
.intro { padding-block: clamp(2.6rem, 6vw, 5rem) clamp(2rem, 4vw, 3.2rem); }
.intro h1 { max-width: 100%; }
h1 {
  max-width: 16ch;
  font: 900 clamp(2.45rem, 7.2vw, 5.45rem)/.99 var(--display);
  letter-spacing: -.085em;
  text-wrap: balance;
}
.intro p { margin-top: .95rem; color: var(--muted); font-size: clamp(1rem, 2vw, 1.2rem); }
.game-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 1.7vw, 1.55rem); }
.tile {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  border: 1px solid var(--edge);
  border-top: 3px solid var(--accent);
  border-radius: .6rem;
  background: var(--panel);
  box-shadow: 0 8px 30px #0a031442;
}
.theme-stripkings { --accent: #ff95bc; }
.theme-candytree { --accent: #c9e293; }
.theme-rolldice { --accent: #c6b4ff; }
.theme-firstsettlements { --accent: #ffce84; }
.tile-screen {
  display: grid;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: .38rem .38rem 0 0;
  background: #0e0a15;
}
.tile video { display: block; width: 100%; height: 100%; object-fit: contain; }
.tile video:focus-visible { outline-offset: -4px; }
.tile-body { display: flex; flex-direction: column; align-items: flex-start; padding: 1.05rem; }
.tile-meta {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .25rem .5rem;
  margin-bottom: .55rem;
  color: var(--muted);
  font-size: .875rem;
}
.tile-meta > :first-child, .genre { color: var(--accent); font-weight: 750; }
.tile-meta time { white-space: nowrap; }
.tile h2 { font: 800 1.36rem/1.2 var(--display); letter-spacing: -.06em; }
.tile p { margin: .55rem 0 .85rem; color: var(--muted); }
.tile .platforms { margin-block: auto 1rem; }
.platforms-label {
  margin: 0 0 .45rem;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 700;
}
.platform-list {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.platform-list li {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 1.85rem;
  padding: .25rem .4rem;
  border: 1px solid var(--edge);
  border-radius: .3rem;
  background: var(--panel);
  color: var(--ink);
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}
.platform-list img { display: block; flex: none; }
.play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .62rem;
  min-height: 2.85rem;
  padding: .45rem 1rem;
  border: 1px solid transparent;
  border-radius: .3rem;
  background: var(--accent);
  color: #1d1327;
  text-decoration: none;
  font: 760 1rem/1.2 system-ui, sans-serif;
  cursor: pointer;
}
.tile .play { width: 100%; }
.play:hover { filter: brightness(1.13); }
.play-icon {
  width: 0;
  height: 0;
  border-block: .34rem solid transparent;
  border-left: .53rem solid currentColor;
}
.footer { margin-top: clamp(2.5rem, 6vw, 4.5rem); padding-block: 1.25rem; border-top: 1px solid var(--edge); color: var(--muted); font-size: .9rem; }
.footer a { text-underline-offset: .2em; }

.player-page {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) 2fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  padding-top: clamp(1.7rem, 4vw, 2.8rem);
}
.player-info h1 { margin: .45rem 0 .75rem; font-size: clamp(2.15rem, 4.8vw, 4.25rem); }
.player-info h1 span { color: var(--accent); }
.player-info p:not(.genre) { max-width: 35ch; color: var(--muted); }
.player-info .platforms { margin-top: 1.25rem; }
.back { display: inline-block; margin-bottom: 1.5rem; color: var(--muted); text-underline-offset: .25em; }
.player { min-width: 0; }
.player-stage {
  display: grid;
  position: relative;
  place-items: center;
  container-type: size;
  min-height: 27rem;
  height: min(76svh, 56rem);
  overflow: hidden;
  border: 1px solid var(--edge);
  border-radius: .6rem;
  background: radial-gradient(ellipse at 50% 50%, #2c213c, #0e0a15);
}
.player-stage canvas {
  display: block;
  width: min(100cqw, 46.1538cqh);
  height: auto;
  aspect-ratio: 6 / 13;
  touch-action: none;
  background: var(--bg);
}
.player-stage:fullscreen { width: 100%; height: 100%; border: 0; border-radius: 0; }
.player-message { position: absolute; display: grid; inset: 0; align-content: center; justify-items: center; gap: .8rem; padding: 1.4rem; text-align: center; }
progress { width: min(100%, 13rem); height: .7rem; accent-color: var(--accent); }
.player-tools { display: flex; justify-content: flex-end; margin-top: .6rem; }
.outline { border-color: var(--edge); color: var(--ink); background: var(--panel); }

@media (max-width: 70rem) { .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 46rem) {
  .player-page { grid-template-columns: 1fr; gap: 1rem; }
  .player-stage { min-height: 0; height: min(72svh, calc(92vw * 13 / 6)); }
}
@media (max-width: 36rem) {
  .game-grid { grid-template-columns: minmax(0, 1fr); }
  .masthead { min-height: 3.8rem; }
}
