:root {
  color-scheme: dark;
  --bg: #121019;
  --surface: #1b1826;
  --surface-2: #242033;
  --line: #2e2940;
  --text: #ece9f4;
  --muted: #a49fb6;
  --accent: #e2366b;
  --gradient: linear-gradient(135deg, #ff7a45, #e2366b);
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0; min-height: 100vh; padding: 24px 16px;
  background: var(--bg); color: var(--text); font: 16px/1.6 system-ui, sans-serif;
}

/* The front page: one centred column. */
body.home { display: grid; place-items: center; }
.home main { max-width: 440px; text-align: center; }
.home .logo { width: 56px; height: 56px; }
.home h1 { margin: 20px 0 8px; font-size: 1.6rem; letter-spacing: -.02em; }
.home p { margin: 0 0 28px; color: var(--muted); }
.home .btn { display: block; margin-top: 10px; }

.btn {
  display: inline-block; padding: 12px 18px; border-radius: 10px; border: 0;
  font: inherit; font-weight: 600; text-decoration: none; text-align: center; cursor: pointer;
  color: #fff; background: var(--gradient);
}
.btn:hover { filter: brightness(1.1); }
.btn.secondary { background: var(--surface-2); color: var(--text); }
.btn.secondary:hover { filter: brightness(1.25); }

/* An invite page: the game card, then the steps. */
.invite { max-width: 560px; margin: 0 auto; }

.brand { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; color: var(--muted); font-weight: 600; text-decoration: none; }
.brand img { width: 28px; height: 28px; }

.card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.cover { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; background: var(--surface-2); }
.cover.blank { display: grid; place-items: center; background: var(--gradient); }
.cover.blank img { width: 22%; height: auto; }
.card-body { padding: 20px 22px 22px; }
.eyebrow { margin: 0; color: var(--muted); font-size: .9rem; font-weight: 600; letter-spacing: .02em; }
.card h1 { margin: 2px 0 0; font-size: 1.75rem; line-height: 1.2; letter-spacing: -.02em; overflow-wrap: anywhere; }
.desc { margin: 12px 0 0; color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.meta li { padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .85rem; }

.steps { margin: 28px 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps > li { position: relative; margin: 0 0 26px; padding-left: 46px; counter-increment: step; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface-2); color: var(--text); font-weight: 700; font-size: .9rem;
}
.steps h2 { margin: 0 0 6px; font-size: 1.1rem; line-height: 30px; }
.steps p { margin: 0 0 10px; color: var(--muted); }
.steps strong { color: var(--text); }

.downloads { display: flex; flex-wrap: wrap; gap: 10px; }
.downloads .btn { flex: 1 1 200px; }
.note { margin: 10px 0 0; font-size: .9rem; color: var(--muted); }
.note[hidden] { display: none; }

details { margin-top: 12px; color: var(--muted); font-size: .9rem; }
summary { cursor: pointer; }
details h3 { margin: 14px 0 6px; font-size: .9rem; color: var(--text); }
pre {
  margin: 0; padding: 12px; overflow-x: auto; border-radius: 10px; background: var(--surface);
  border: 1px solid var(--line); color: var(--text); font: .8rem/1.5 ui-monospace, monospace;
}

.code {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.code code {
  flex: 1; min-width: 0; font: 600 clamp(1.15rem, 5vw, 1.6rem)/1.4 ui-monospace, monospace;
  letter-spacing: .08em; overflow-wrap: anywhere; user-select: all;
}
.code .btn { flex: none; padding: 10px 16px; }

.foot { margin: 8px 0 0; color: var(--muted); font-size: .85rem; text-align: center; }
.foot a { color: inherit; }
