/* The per-game pages.
   A separate, small stylesheet rather than the app's: these pages are static
   HTML a crawler reads, and pulling in the whole game bundle's CSS to render
   an H1, a list and a form would be paying for the app on a page that has
   none of it. The palette matches the landing page so it still reads as the
   same site. */
:root {
  --ink: #eef0ff;
  --dim: #8f9bc4;
  --plum: #7b2cbf;
  --edge: rgba(238, 240, 255, .16);
}
* { box-sizing: border-box; }
body {
  margin: 0; background: #0b0b2a; color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  background-image:
    radial-gradient(1100px 700px at 15% -10%, rgba(123, 44, 191, .35), transparent 60%),
    radial-gradient(900px 600px at 95% 10%, rgba(76, 201, 240, .16), transparent 60%);
  background-attachment: fixed;
}
a { color: #c8b6ff; }

.gp-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 940px; margin: 0 auto; padding: 16px 20px;
}
.gp-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; }
.gp-brand b { color: #c8b6ff; font-weight: 800; }
.gp-lobby {
  text-decoration: none; color: var(--ink); font-weight: 700;
  border: 1px solid var(--edge); border-radius: 10px; padding: 8px 16px;
}
.gp-lobby:hover { border-color: var(--plum); }

.gp-main { max-width: 940px; margin: 0 auto; padding: 10px 20px 60px; }

.gp-hero { text-align: center; padding: 20px 0 34px; }
.gp-icon { font-size: 4.2rem; line-height: 1; }
.gp-hero h1 {
  font-size: clamp(1.8rem, 5vw, 3rem); line-height: 1.15; margin: 12px 0 14px;
  background: linear-gradient(92deg, #ffd166, #ff6ec7 45%, #4cc9f0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gp-intro { color: #c9cee8; font-size: 1.08rem; max-width: 680px; margin: 0 auto 22px; }
.gp-facts { color: var(--dim); font-size: .88rem; margin-top: 14px; }
.gp-hint { color: #c8b6ff; }

/* the shared login block — same class names the landing page uses, so
   identity.js drives it without knowing which page it is on */
.name-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
[hidden] { display: none !important; }
#player-name {
  flex: 1 1 240px; max-width: 320px;
  background: rgba(8, 6, 26, .8); color: var(--ink);
  border: 1px solid var(--edge); border-radius: 12px; padding: 14px 16px; font-size: 1rem;
}
#player-name::placeholder { color: #6f74a3; }
.btn {
  border: none; border-radius: 12px; padding: 14px 26px; font-size: 1rem;
  font-weight: 800; cursor: pointer; font-family: inherit;
}
.btn-primary {
  background: linear-gradient(92deg, #ffd166, #ff6ec7); color: #23103f;
  box-shadow: 0 0 30px rgba(255, 110, 199, .45);
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-google { background: #eef0ff; color: #23103f; }
.cta-row { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 30px; }
.google-note, .agree-note { color: #7f84b3; font-size: .82rem; margin: 10px 0 0; }
.agree-note a, .google-note a { color: #b8bce0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.attention { animation: gp-shake .4s; border-color: #ff6ec7 !important; }
@keyframes gp-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

.gp-block {
  border: 1px solid var(--edge); border-radius: 18px;
  background: rgba(255, 255, 255, .035);
  padding: 22px 26px; margin: 0 0 20px;
}
.gp-block h2 { font-size: 1.4rem; margin: 0 0 14px; }
.gp-rules { margin: 0; padding-left: 22px; color: #c9cee8; }
.gp-rules li { margin-bottom: 8px; }
.gp-faq { margin: 0; }
.gp-faq dt { font-weight: 800; margin-top: 16px; }
.gp-faq dt:first-child { margin-top: 0; }
.gp-faq dd { margin: 6px 0 0; color: #c9cee8; }
.gp-links { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 10px; }
.gp-links a {
  display: inline-block; text-decoration: none; color: var(--ink);
  border: 1px solid var(--edge); border-radius: 999px; padding: 7px 15px; font-size: .92rem;
}
.gp-links a:hover { border-color: var(--plum); background: rgba(123, 44, 191, .2); }
.gp-lobbylink { font-weight: 700; }

.gp-foot {
  max-width: 940px; margin: 0 auto; padding: 26px 20px 50px;
  color: var(--dim); font-size: .86rem; text-align: center;
}
@media (prefers-reduced-motion: reduce) { .attention { animation: none; } }

/* ---------- the silent showcase replay ---------- */
/* Lives HERE, not in the app's styles.css: these pages load only this file,
   and the rules were invisible there — the frame collapsed to its default
   150px and the 16:9 never applied. */
/* 16:9, and never more than half the height of the window, so the thing being
   sold stays above the fold on a laptop. aspect-ratio does the shape; the
   max-height stops a wide window making it tall. */
.gp-showcase {
  width: 100%; max-width: 900px; margin: 0 auto 26px;
  aspect-ratio: 16 / 9; max-height: 50vh;
  border: 1px solid var(--edge); border-radius: 16px; overflow: hidden;
  background: #0f0a1e;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
}
/* The frame renders at a REAL desktop 16:9 size and is then scaled down as a
   whole, like a video. Every board sizes itself from viewport units, and a
   CSS transform does not change what `vh` means — so a 500px-tall iframe made
   them lay out for a 500px-tall screen, which is not a shape any of them were
   designed for. At 1280x720 they lay out the way they do on a desktop, and the
   scaling is uniform and cosmetic.
   --gp-scale is set by the small script on the page, from the frame's measured
   width; the fallback covers the moment before it runs. */
.gp-showcase { position: relative; }
.gp-showcase iframe {
  position: absolute; top: var(--gp-top, 0); left: var(--gp-left, 0);
  width: 1280px; height: 720px; border: 0; display: block;
  transform-origin: top left;
  transform: scale(var(--gp-scale, 0.7));
}
