/* Court King website.
   Noor: a table of light floating in a night sky. One dark theme.
   Gold means a rule or the one main action. Glass holds controls and panels. Cards stay ivory.
   Colours, type and motion come from the approved game design (tokens.json and the approved motion pages). */

@font-face {
  font-family: "Mulish";
  src: url("../fonts/mulish-latin.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --night-950: #060515;
  --night-900: #0A0826;
  --night-800: #110D36;
  --night-700: #1A1550;
  --sky-top: #080624;
  --sky-low: #2A1A78;

  --gold-50: #FFFAE6;
  --gold-100: #FFF0B8;
  --gold-300: #FFD966;
  --gold-500: #F5B62E;
  --gold-700: #B5791B;
  --gold-900: #5C3A08;

  --ivory: #FFFBF2;
  --ivory-200: #EADFC8;
  --ink: #16132E;

  --text-hi: #F8F6FF;
  --text-mid: #D2CEF5;
  --text-lo: #A7A1DB;
  --lilac: #B9A8FF;

  --win: #3DDC97;
  --lose: #FF8A96;

  --ease: cubic-bezier(.2, .8, .2, 1);
  /* the side margin; on a phone held sideways it also clears the notch */
  --gutter: max(clamp(20px, 5vw, 48px), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --wrap: 1120px;
  --r-panel: 28px;
  --barh: 76px;                /* the home page's top bar */
}
@media (max-width: 759px) { :root { --barh: 64px; } }
@media (max-height: 520px) and (min-aspect-ratio: 5/4) { :root { --barh: 56px; } }

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--night-950);
}
@media (prefers-reduced-motion: no-preference) { html:not(.still) { scroll-behavior: smooth; } }
/* the home page's bar stays at the top, so a link to a section stops just under it */
html.has-bar { scroll-padding-top: calc(var(--barh) + 4px); }
@media (max-height: 520px) and (min-aspect-ratio: 5/4) { html.has-bar { scroll-padding-top: 0; } }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--night-950);
  color: var(--text-mid);
  font: 500 1.0625rem/1.6 "Mulish", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, ul, ol, figure, table, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
em { font-style: normal; font-weight: 800; color: var(--text-hi); }

a { color: var(--gold-300); text-underline-offset: .2em; text-decoration-thickness: .07em; }
a:hover { color: var(--gold-100); }

:focus-visible { outline: 3px solid var(--gold-300); outline-offset: 3px; border-radius: 10px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- type */

.display {
  font-size: clamp(2rem, 1.15rem + 3.4vw, 3.5rem);
  font-weight: 1000;
  line-height: 1.05;
  letter-spacing: -.018em;
  color: var(--text-hi);
  text-wrap: balance;
}

.eyebrow {
  font-size: .78rem;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--lilac);
}

.lead {
  font-size: clamp(1.125rem, 1.03rem + .45vw, 1.3125rem);
  line-height: 1.55;
  max-width: 36em;
  text-wrap: pretty;
}

/* ---------------------------------------------------------------- glass, buttons */

.glass {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .07) 50%, rgba(255, 255, 255, .03)),
    rgba(10, 8, 38, .6);
  box-shadow: 0 3px 0 rgba(0, 0, 0, .3);
}
/* the lit rim: bright at the top, faint at the foot */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, .6), rgba(255, 255, 255, .1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 48px;
  padding: 0 30px;
  border: 0;
  border-radius: 999px;
  font-weight: 1000;
  font-size: 1.0625rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease-out, filter .15s ease-out, box-shadow .12s ease-out;
}
.btn--gold {
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold-100), var(--gold-300) 50%, var(--gold-500));
  box-shadow: 0 4px 0 var(--gold-700), 0 8px 22px rgba(245, 182, 46, .3);
}
.btn--gold::after {
  content: "";
  position: absolute;
  left: 2px; right: 2px; top: 1.5px;
  height: 60%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 60%);
  opacity: .75;
  pointer-events: none;
}
.btn--gold:hover { color: var(--ink); filter: brightness(1.06); }
.btn--gold:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--gold-700), 0 4px 12px rgba(245, 182, 46, .3); }
.btn--glass { color: var(--text-hi); }
.btn--glass:hover { color: var(--text-hi); filter: brightness(1.25); }

/* ---------------------------------------------------------------- the top bar */

.sitebar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  padding-block: 6px;
}
.sitebar--end { justify-content: flex-end; }
.sitebar__logo { display: block; flex: none; border-radius: 999px; }
.sitebar__logo img { height: 60px; width: auto; }
.sitebar__logo .logo-seal { display: none; height: 52px; }

/* the lit ivory pill marks where you are; the other sides are plain glass */
.switch {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
}
.switch a {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 0 clamp(13px, 2.6vw, 22px);
  border-radius: 999px;
  color: var(--text-hi);
  font-weight: 900;
  font-size: .98rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s var(--ease);
}
.switch a:hover { background: rgba(255, 255, 255, .1); }
.switch a[aria-current="page"] {
  color: var(--ink);
  background: linear-gradient(180deg, #FFFFFF, var(--ivory-200));
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}

@media (max-width: 520px) {
  .sitebar { min-height: 64px; }
  .sitebar__logo .logo-full { display: none; }     /* narrower than 120 pt: the seal alone */
  .sitebar__logo .logo-seal { display: block; }
}

/* ---------------------------------------------------------------- the night: sky, skyline, floor
   --u is one point of the game's own 844 x 390 canvas, in CSS pixels. --horizon is where the sky meets the floor. */

.night { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }

.night__sky {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: var(--horizon);
  overflow: hidden;
  background:
    radial-gradient(calc(250 * var(--u)) calc(250 * var(--u)) at calc(50% - 362 * var(--u)) calc(24 * var(--u)), rgba(34, 211, 238, .16), rgba(34, 211, 238, 0) 72%),
    radial-gradient(calc(270 * var(--u)) calc(270 * var(--u)) at calc(50% + 368 * var(--u)) calc(10 * var(--u)), rgba(255, 181, 71, .14), rgba(255, 181, 71, 0) 72%),
    radial-gradient(calc(340 * var(--u)) calc(340 * var(--u)) at 50% calc(-40 * var(--u)), rgba(139, 92, 246, .3), rgba(139, 92, 246, 0) 72%),
    url("../img/stars.svg") center bottom / calc(844 * var(--u)) auto repeat,
    linear-gradient(180deg, var(--sky-top), var(--sky-low));
}
/* the pink light behind the city */
.night__sky::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(-34 * var(--u));
  width: calc(1100 * var(--u));
  height: calc(68 * var(--u));
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 61, 154, .55), rgba(255, 61, 154, 0));
  filter: blur(calc(6 * var(--u)));
}
.night__skyline {
  position: absolute;
  left: 0; right: 0;
  top: calc(var(--horizon) - 48 * var(--u));
  height: calc(48 * var(--u));
  background: url("../img/skyline.svg") center bottom / auto 100% repeat-x;
}
.night__line {
  position: absolute;
  left: 50%;
  top: calc(var(--horizon) - .6 * var(--u));
  width: min(100%, calc(1300 * var(--u)));
  height: max(1px, calc(1.2 * var(--u)));
  transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(255, 61, 154, 0), rgba(255, 194, 226, .9) 50%, rgba(255, 61, 154, 0));
}
.night__floor {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  top: var(--horizon);
  background:
    linear-gradient(180deg, rgba(6, 5, 21, 0) calc(170 * var(--u)), var(--night-950) calc(316 * var(--u))),
    radial-gradient(calc(130 * var(--u)) calc(9 * var(--u)) at 50% calc(116 * var(--u)), rgba(245, 182, 46, .2), rgba(245, 182, 46, 0)),
    radial-gradient(calc(330 * var(--u)) calc(110 * var(--u)) at 50% calc(73 * var(--u)), rgba(139, 92, 246, .32), rgba(139, 92, 246, 0)),
    radial-gradient(calc(520 * var(--u)) calc(100 * var(--u)) at 50% calc(198 * var(--u)), rgba(139, 92, 246, .26), rgba(139, 92, 246, 0)),
    linear-gradient(180deg, #170F4C, rgba(18, 12, 62, 0) calc(103 * var(--u))),
    url("../img/floor.svg") center top / calc(1688 * var(--u)) auto no-repeat,
    linear-gradient(180deg, #170F4C, #0B0828 calc(129 * var(--u)), var(--night-950) calc(258 * var(--u)));
}
.night__vig {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle calc(520 * var(--u)) at 50% calc(var(--horizon) + 38 * var(--u)), rgba(7, 5, 28, 0) 35%, rgba(7, 5, 28, .8) 100%);
}

/* ---------------------------------------------------------------- the home page: its top bar */

.skip {
  position: absolute; z-index: 40; left: 12px; top: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ivory); color: var(--ink);
  font-weight: 900; text-decoration: none;
  transform: translateY(-180%);
}
.skip:focus { transform: none; color: var(--ink); }

/* the logo, the page's own sections, and Share once the front's own gold button is out of sight */
.topbar { position: absolute; z-index: 30; left: 0; right: 0; top: 0; }
.has-bar .topbar { position: fixed; }
/* once the page moves, the bar becomes a solid strip of night. No blur: the page moving under it is never re-blurred. */
.topbar::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgb(18, 14, 56), rgb(10, 8, 36));
  box-shadow: 0 1px 0 rgba(185, 168, 255, .14), 0 12px 30px rgba(3, 2, 15, .4);
  opacity: 0;
  transition: opacity .25s ease-out;
  pointer-events: none;
}
.topbar.is-stuck::before { opacity: 1; }
.topbar__in {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  height: var(--barh);
  margin-inline: auto;
}
.is-stuck .topbar__in { height: calc(var(--barh) - 12px); }
/* the logo's seal starts a sixth of its height into the picture, so it is pulled back onto the line the words start on;
   its tap target stays 44 px tall while the picture shrinks */
.topbar__logo {
  flex: none; display: flex; align-items: center;
  min-height: 44px;
  margin-right: auto; margin-left: calc((var(--barh) - 20px) / -6);
  border-radius: 999px;
}
.topbar__logo img { width: auto; height: calc(var(--barh) - 20px); }
.is-stuck .topbar__logo { margin-left: calc((var(--barh) - 26px) / -6); }
.is-stuck .topbar__logo img { height: calc(var(--barh) - 26px); }
.topbar__nav { display: none; align-items: center; gap: 2px; }
.topbar__nav a {
  display: grid; place-items: center;
  min-height: 40px; padding: 0 15px;
  border-radius: 999px;
  color: var(--text-mid);
  font-size: .98rem; font-weight: 800; line-height: 1;
  text-decoration: none; white-space: nowrap;
  transition: color .2s ease-out, background-color .2s ease-out;
}
.topbar__nav a:hover { color: var(--text-hi); background: rgba(255, 255, 255, .08); }
/* where you are: the lit ivory pill of the game's own switches */
.topbar__nav a[aria-current] {
  color: var(--ink);
  background: linear-gradient(180deg, #FFFFFF, var(--ivory-200));
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
/* in em, so a visitor with larger text keeps logo and Share in the bar until the five links truly fit */
@media (min-width: 62.5em) { .topbar__nav { display: flex; } }
/* Share opens into the bar (its width grows) whenever the front's own Share is not wholly in view */
.topbar__share {
  flex: none;
  min-height: 40px; max-width: 0; margin-left: -12px; padding: 0;
  overflow: hidden; white-space: nowrap;
  font-size: .98rem;
  visibility: hidden; opacity: 0;
  transition: opacity .2s ease-out, visibility 0s linear .2s;
}
.topbar__share[hidden] { display: none; }
.show-share .topbar__share {
  max-width: 170px; margin-left: 0; padding: 0 18px 0 15px;
  visibility: visible; opacity: 1;
  transition: opacity .2s ease-out;
}
/* the bar's shrinking and Share's sliding in are motion: only for those who have not asked for less of it */
@media (prefers-reduced-motion: no-preference) {
  .topbar__in { transition: height .25s var(--ease); }
  .topbar__logo { transition: margin-left .25s var(--ease); }
  .topbar__logo img { transition: height .25s var(--ease); }
  .topbar__share { transition: max-width .3s var(--ease), padding .3s var(--ease), margin .3s var(--ease), opacity .2s ease-out, visibility 0s linear .3s; }
  .show-share .topbar__share { transition: max-width .3s var(--ease), padding .3s var(--ease), margin .3s var(--ease), opacity .25s ease-out .05s; }
}
.btn svg.ic { width: 19px; height: 19px; flex: none; }

/* ---------------------------------------------------------------- the front: the words, and the crest
   The game's own opening: the splash's seal and its Ace, King, Queen and Jack, in the splash's light, over the splash's night.
   The words start on the logo's edge and the crest ends on the bar's far edge: the front is as wide as the page's own
   column and no wider. Everything is readable in the first frame; nothing waits for a script. */

.front {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--night-950);
  padding: calc(var(--barh) + 10px) 0 40px;
}
/* the night fades into the page's own at the front's foot: no straight edge where the next section begins */
.front::after {
  content: "";
  position: absolute; z-index: 1; left: 0; right: 0; bottom: 0;
  height: clamp(56px, 12vh, 120px);
  background: linear-gradient(180deg, rgba(6, 5, 21, 0), var(--night-950));
  pointer-events: none;
}
.front__in { position: relative; z-index: 2; }
.front__in {
  position: relative;
  width: min(var(--wrap), 100% - 2 * var(--gutter));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "status" "title" "lead" "art" "actions" "note" "games";
  justify-items: center;
  text-align: center;
}

/* the news, said plainly: a status, not a button and not a loader */
.front__status {
  grid-area: status;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 34px; padding: 5px 15px 5px 13px;
  border: 1px solid rgba(185, 168, 255, .45);
  border-radius: 999px;
  background: rgba(10, 8, 38, .62);
  color: var(--text-hi);
  font-size: .875rem; font-weight: 900; line-height: 1.1;
  text-align: center; text-wrap: balance;     /* one line wherever it fits; never cut off on a tiny or zoomed screen */
}
.front__status::before {
  content: ""; flex: none;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--lilac); box-shadow: 0 0 0 3px rgba(185, 168, 255, .2);
}

.front__title {
  grid-area: title;
  margin-top: 16px;
  font-size: clamp(2.125rem, 7.6vw + .55rem, 4rem);
  font-weight: 1000;
  line-height: 1;
  letter-spacing: -.024em;
  color: var(--text-hi);
}
.front__title > span:not(.vh) { display: block; }
/* the Rung is a rule of the game, so it is gold: the wordmark's own gold */
.front__rung {
  padding-bottom: .06em;
  background: linear-gradient(180deg, #FFF6C4 8%, #FFD966 48%, #F0A81C 92%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
@media (forced-colors: active) {
  .front__rung { background: none; -webkit-text-fill-color: CanvasText; color: CanvasText; }
}

.front__lead {
  grid-area: lead;
  margin-top: 14px;
  max-width: 30em;
  font-size: clamp(1.0625rem, .98rem + .3vw, 1.25rem);
  line-height: 1.5;
  color: var(--text-mid);
  text-wrap: balance;
}

.front__actions {
  grid-area: actions;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  margin-top: 24px;
}
.front__actions .btn { padding: 0 26px; white-space: nowrap; }
.front__actions .front__share { padding-left: 22px; }
/* beside the gold button, the same raised edge in the night's own indigo, as the game's secondary buttons have */
.front__more { box-shadow: 0 4px 0 #453D85; }
.front__actions .front__more { padding-left: 21px; }
.btn svg.ic--play { width: 15px; height: 15px; }

.front__note {
  grid-area: note;
  margin-top: 12px;
  font-size: .9375rem; line-height: 1.45;
  color: var(--text-lo);
  text-wrap: balance;
}
.front__note > span { display: inline-block; }     /* where it breaks, it breaks between the two sentences */

/* the four games, each with the colour of its card in the game. Each one opens its own rules further down. */
.front__games {
  grid-area: games;
  display: grid; justify-items: center; gap: 4px;
  margin-top: 26px;
}
.front__games-label {
  font-size: .8125rem; font-weight: 900; line-height: 1.3;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--lilac);
}
/* two columns; a name wraps only when there is no room (a tiny screen, larger text) rather than being cut off */
.front__games-list { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 0 28px; }
.front__games a {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 40px;
  justify-self: start;
  color: var(--text-hi);
  font-size: 1rem; font-weight: 800; line-height: 1.2;
  text-decoration: none;
}
.front__games a::before {
  content: ""; flex: none;
  width: 9px; height: 9px; border-radius: 2px;
  background: var(--c);
  transform: rotate(45deg);
}
.front__games a:hover { color: var(--text-hi); text-decoration: underline; text-decoration-color: var(--c); }
[data-pick="single"] { --c: #F7B955; }
[data-pick="double"] { --c: #4FD3C4; }
[data-pick="ace"] { --c: #E873D8; }
[data-pick="hidden"] { --c: #6F8CFF; }

/* ---- the art: the crest. Every measure inside it is a share of its own 400 x 180 box, which is the splash's own
   drawing, so it scales as one piece. The box is wider than its column: the cards and the seal fill the column, and
   only the faint far ends of the rays pass its edges. */
.front__art {
  grid-area: art;
  position: relative;
  container-type: inline-size;
  width: 100%; max-width: 500px;
  margin: 18px 0 0;
  pointer-events: none;
}
.crest {
  position: relative;
  width: 120%; margin-left: -10%;
  aspect-ratio: 400 / 180;
}
/* the rays and the glow share one middle, a little under the box's own: where the seal sits */
.crest__rays {
  position: absolute; z-index: 0;
  left: -12.5%; top: -83.3%;
  width: 125%; height: 277.8%; max-width: none;
}
.crest__glow {
  position: absolute; z-index: 0;
  left: 12%; top: -28.8%;
  width: 76%; height: 168.9%;
  border-radius: 50%;
}
.crest__glow::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, #F5B62E 21%, rgba(245, 182, 46, .84) 41%, rgba(245, 182, 46, .5) 60.5%, rgba(245, 182, 46, .16) 80%, rgba(245, 182, 46, 0));
  opacity: .34;
}
/* each card turns about a point far below it, as in the splash: the fan opens from behind the seal */
/* the pause control (WCAG 2.2.2): the crest moves for as long as the page is open, so it can be stopped. A small glass
   button in the crest's corner; stopped, the hand rests open and face up, as for a visitor who asked for less motion. */
.front__calm {
  position: absolute; z-index: 5; right: 0; bottom: -6px;
  display: grid; place-items: center;
  width: 36px; height: 36px; padding: 0;
  border: 0; border-radius: 50%;
  color: var(--text-mid);
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
  cursor: pointer;
  pointer-events: auto;
  opacity: .72;
  -webkit-tap-highlight-color: transparent;
}
.front__calm:hover, .front__calm:focus-visible { opacity: 1; color: var(--text-hi); background: rgba(255, 255, 255, .14); }
.front__calm svg { width: 14px; height: 14px; }
.front__calm .ic--resume, .front__calm[aria-pressed="true"] .ic--hold { display: none; }
.front__calm[aria-pressed="true"] .ic--resume { display: block; }
.front__calm[hidden], .still .front__calm { display: none; }
@media (prefers-reduced-motion: reduce) { .front__calm { display: none; } }
html.calm .crest *, html.calm .crest__glow::before, html.calm .cinema__disc::before { animation: none !important; }
.crest__card {
  position: absolute; z-index: 1;
  left: 41.25%; top: 5%;
  width: 17.5%; height: 54.444%;
  transform-origin: 50% 239.8%;
  transform: rotate(var(--a));
}
/* face up at rest; the back is shown only while the opening plays */
.crest__flip { position: absolute; inset: 0; }
.crest__flip img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; max-width: none;
  border-radius: 7.2% / 5.14%;
  box-shadow: 0 4px 9px rgba(5, 3, 26, .5);
}
.crest__flip .crest__back { opacity: 0; }
/* the seal's shadow lies on the floor under its tip */
.crest__shadow {
  position: absolute; z-index: 3;
  left: 31.5%; width: 37%; top: 79.4%; height: 25.6%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(5, 3, 26, .55), rgba(5, 3, 26, .4) 40%, rgba(5, 3, 26, 0));
}
.crest__seal {
  position: absolute; z-index: 4;
  left: 32.27%; top: 15.37%;
  width: 35.46%; height: auto; max-width: none;
}
/* container units, where the browser has them: the cards' shadow follows the crest's own size. It is kept apart
   because an unknown unit makes a declaration fail: an old browser keeps the plain value above. */
@supports (top: 1cqi) {
  .crest__flip img { box-shadow: 0 .9cqi 2cqi rgba(5, 3, 26, .5); }
}
/* a browser without aspect-ratio (Safari 14) gets the same shape from padding */
@supports not (aspect-ratio: 1) {
  .crest { height: 0; padding-top: 54%; }
}

/* "Link copied", as the game says "Friend code copied" */
.toast {
  position: fixed; z-index: 60; left: 50%; bottom: max(24px, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 0 22px 0 16px;
  border-radius: 999px;
  color: var(--text-hi);
  font-size: 1rem; font-weight: 900; line-height: 1;
  opacity: 0; visibility: hidden;
  transform: translate(-50%, 14px);
  transition: opacity .2s ease-out, transform .25s var(--ease), visibility 0s linear .25s;
  pointer-events: none;
}
.toast.is-on { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .2s ease-out, transform .25s var(--ease); }
.toast svg { width: 20px; height: 20px; color: var(--win); }

/* ---- the night of the front: the splash's own sky, city and floor, drawn to the crest's scale and lined up with it.
   --u is one unit of the crest, --horizon the splash's horizon (it passes behind the seal), --vx the crest's middle
   and --pl the left edge of its column; --wt is where the words start and --at where the art starts. A short script
   under the front measures them before the first paint; until then the city and its line wait, so nothing is ever
   drawn in the wrong place. */
.front__night {
  --u: 1px; --su: max(var(--u), 1.1px);
  --horizon: 52%; --vx: 50%; --pl: 0px; --wt: 90px; --at: 50%;
  position: absolute; z-index: -1; inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.fn-sky {
  position: absolute; left: 0; right: 0; top: 0; height: var(--horizon);
  background:
    radial-gradient(calc(470 * var(--u)) calc(330 * var(--u)) at var(--vx) calc(20 * var(--u)), rgba(139, 92, 246, .34), rgba(139, 92, 246, 0) 72%),
    radial-gradient(min(64vw, 760px) min(48vw, 540px) at 0% 0%, rgba(34, 211, 238, .09), rgba(34, 211, 238, 0) 72%),
    radial-gradient(min(64vw, 760px) min(48vw, 540px) at 100% 0%, rgba(255, 181, 71, .08), rgba(255, 181, 71, 0) 72%),
    linear-gradient(180deg, var(--sky-top) 20%, var(--sky-low));
}
.fn-sky::after {
  content: "";
  position: absolute; left: var(--vx); bottom: calc(-34 * var(--u));
  width: calc(1100 * var(--u)); height: calc(68 * var(--u));
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 61, 154, .5), rgba(255, 61, 154, 0));
}
/* stars, but never among the words, where a star reads as a full stop */
.fn-stars {
  position: absolute; left: 0; right: 0; top: 0; height: var(--horizon);
  background: url("../img/stars.svg") calc(var(--vx) - 422 * var(--su)) bottom / calc(844 * var(--su)) auto repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(var(--wt) - 30px), rgba(0, 0, 0, 0) calc(var(--wt) - 6px), rgba(0, 0, 0, 0) calc(var(--at) - 10px), #000 calc(var(--at) + 30px));
  mask-image: linear-gradient(180deg, #000 calc(var(--wt) - 30px), rgba(0, 0, 0, 0) calc(var(--wt) - 6px), rgba(0, 0, 0, 0) calc(var(--at) - 10px), #000 calc(var(--at) + 30px));
}
.fn-city {
  position: absolute; left: 0; right: 0;
  top: calc(var(--horizon) - 48 * var(--u)); height: calc(48 * var(--u));
  background: url("../img/skyline.svg") calc(var(--vx) - 422 * var(--u)) bottom / auto 100% repeat-x;
}
.fn-line {
  position: absolute;
  left: calc(var(--vx) - 650 * var(--u)); width: calc(1300 * var(--u));
  top: calc(var(--horizon) - .6 * var(--u)); height: max(1px, calc(1.2 * var(--u)));
  background: linear-gradient(90deg, rgba(255, 61, 154, 0), rgba(255, 194, 226, .9) 50%, rgba(255, 61, 154, 0));
}
/* the floor ends in the page's own night at the front's foot, whatever the scale, so the next section joins it with no edge */
.fn-floor {
  position: absolute; left: 0; right: 0; top: var(--horizon); bottom: 0;
  background:
    radial-gradient(calc(560 * var(--u)) calc(120 * var(--u)) at var(--vx) calc(30 * var(--u)), rgba(139, 92, 246, .24), rgba(139, 92, 246, 0)),
    radial-gradient(calc(900 * var(--u)) calc(260 * var(--u)) at var(--vx) calc(250 * var(--u)), rgba(76, 46, 170, .16), rgba(76, 46, 170, 0)),
    linear-gradient(180deg, #170F4C, #0B0828 38%, var(--night-950) 96%);
}
.fn-grid {
  position: absolute; left: 0; right: 0;
  top: var(--horizon); height: calc(318 * var(--u));
  background: url("../img/grid.svg") calc(var(--vx) - 844 * var(--u)) top / calc(1688 * var(--u)) 100% no-repeat;
  /* the splash's grid meets at two points 758 units either side of the middle, outside the splash itself. On a very
     wide window those points and the tile's edge would show, so the grid fades out well before them. */
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) calc(var(--vx) - 680 * var(--u)), #000 calc(var(--vx) - 500 * var(--u)), #000 calc(var(--vx) + 500 * var(--u)), rgba(0, 0, 0, 0) calc(var(--vx) + 680 * var(--u))), linear-gradient(180deg, #000 20%, rgba(0, 0, 0, 0) 92%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) calc(var(--vx) - 680 * var(--u)), #000 calc(var(--vx) - 500 * var(--u)), #000 calc(var(--vx) + 500 * var(--u)), rgba(0, 0, 0, 0) calc(var(--vx) + 680 * var(--u))), linear-gradient(180deg, #000 20%, rgba(0, 0, 0, 0) 92%);
  mask-composite: intersect;
}
.fn-vig {
  position: absolute; inset: 0;
  background: radial-gradient(farthest-corner at var(--vx) 42%, rgba(7, 5, 28, 0) 52%, rgba(7, 5, 28, .6) 100%);
}
/* the splash's four suits, lying faintly on the floor round the crest. They sit in the crest's own units, fade out
   before the front's foot, and are drawn only where there is floor to spare beside the words (two columns). */
.fn-suits { display: none; }
.fn-suits svg {
  position: absolute;
  left: calc(var(--vx) - 200 * var(--u)); top: calc(var(--horizon) - 96 * var(--u));
  width: calc(400 * var(--u)); height: calc(330 * var(--u)); max-width: none;
  overflow: visible;
  opacity: .09;
}
.fn-veil, .fn-mend { display: none; }
.front__night:not(.is-placed) :is(.fn-stars, .fn-city, .fn-line, .fn-grid, .fn-suits) { visibility: hidden; }
.front__night:not(.is-placed) .fn-floor { background: linear-gradient(180deg, var(--sky-low), #170F4C 80px, #0B0828 260px, var(--night-950) 520px); }

/* ---------------------------------------------------------------- a wide window: the words on the left half of the
   page's column, the crest on the right half. Landscape windows from 760 px (a laptop's half screen, a foldable
   opened out) and short sideways phones from 560 px take it too. */
@media (min-width: 760px) and (min-aspect-ratio: 1/1), (min-width: 560px) and (min-aspect-ratio: 5/4) {
  .front {
    --cg: clamp(28px, 4.6vw, 64px);          /* the gap between the words and the crest */
    display: flex; flex-direction: column; justify-content: center;
    min-height: min(100vh, 940px);           /* on a tall window the next section shows under it */
    padding: var(--barh) 0 clamp(24px, 6vh, 76px);
  }
  @supports (height: 100svh) { .front { min-height: min(100svh, 940px); } }
  .front__in {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: ". art" "status art" "title art" "lead art" "actions art" "note art" "games art" ". art";
    grid-template-rows: 1fr repeat(6, auto) 1fr;
    column-gap: var(--cg);
    justify-items: start;
    text-align: left;
  }
  /* beside the crest the news stays one line (a wrapped pill would stretch across the column). From 560 to 759 px it
     is set smaller, so it ends inside the words' column. */
  .front__status { white-space: nowrap; }
  /* sized by the window, never by the text setting (the column is as wide as the window allows, so a larger text
     setting would break the lines), and never so tall that a short laptop window cannot hold the words */
  .front__title {
    margin-top: clamp(18px, 2.6vh, 28px);
    font-size: clamp(40px, min(4.6vw + 6.4px, 8.8vh), 83.2px);
    font-size: clamp(40px, min(4.6vw + 6.4px, 8.8svh), 83.2px);
    line-height: .97;
  }
  /* the F of "Four" and the O of "One" stand on the column's edge with the logo and the news, not a few pixels in.
     Not in ?og, where the headline is centred. */
  html:not(.og) .front__title > span:nth-child(2) { margin-left: -.055em; }
  html:not(.og) .front__title > span:nth-child(4) { margin-left: -.035em; }
  .front__lead { margin-top: clamp(16px, 2.2vh, 24px); max-width: 26em; font-size: clamp(1.0625rem, .9rem + .4vw, 1.3125rem); text-wrap: balance; }
  .front__actions { justify-content: flex-start; margin-top: clamp(24px, 3.6vh, 40px); }
  .front__note { margin-top: 14px; }
  .front__games { justify-items: start; margin-top: clamp(22px, 4vh, 44px); }
  /* beside the crest each name keeps one line */
  .front__games-list { grid-template-columns: repeat(2, max-content); }
  /* the crest fills its half: the outer cards' corners end just inside the page's column, under the bar's last link */
  .front__art { align-self: center; justify-self: stretch; max-width: none; margin: 0; }
  .crest { width: 124%; margin-left: -12%; }

  .front__night { --horizon: 50%; --vx: 75%; --pl: 52%; }
  /* stars stay out of the words' column and out of the bar (which is clear until the page moves). The layer starts
     under the bar; its stars hang from the horizon, so none of them moves. */
  .fn-stars {
    top: var(--barh); height: calc(var(--horizon) - var(--barh));
    -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .12) calc(var(--pl) - 150px), #000 calc(var(--pl) + 20px)), linear-gradient(180deg, #000 calc(var(--wt) - var(--barh) - 40px), rgba(0, 0, 0, 0) calc(var(--wt) - var(--barh) - 10px));
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, .12) calc(var(--pl) - 150px), #000 calc(var(--pl) + 20px)), linear-gradient(180deg, #000 calc(var(--wt) - var(--barh) - 40px), rgba(0, 0, 0, 0) calc(var(--wt) - var(--barh) - 10px));
  }
  /* the city, its light and the floor belong to the crest; the words stand in its shadow. Each starts halfway across
     the gap, never in the words' column. */
  .fn-city {
    -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) calc(var(--pl) - var(--cg) / 2), #000 calc(var(--pl) + 30px));
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) calc(var(--pl) - var(--cg) / 2), #000 calc(var(--pl) + 30px));
  }
  .fn-grid {
    -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) calc(var(--pl) - var(--cg) / 2), #000 calc(var(--pl) + 30px), #000 calc(var(--vx) + 500 * var(--u)), rgba(0, 0, 0, 0) calc(var(--vx) + 680 * var(--u))), linear-gradient(180deg, #000 20%, rgba(0, 0, 0, 0) 92%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) calc(var(--pl) - var(--cg) / 2), #000 calc(var(--pl) + 30px), #000 calc(var(--vx) + 500 * var(--u)), rgba(0, 0, 0, 0) calc(var(--vx) + 680 * var(--u))), linear-gradient(180deg, #000 20%, rgba(0, 0, 0, 0) 92%);
    mask-composite: intersect;
  }
  .fn-line {
    left: calc(var(--pl) - var(--cg) / 2); right: 0; width: auto;
    background: linear-gradient(90deg, rgba(255, 61, 154, 0), rgba(255, 194, 226, .85) calc(var(--cg) / 2), rgba(255, 194, 226, .7) 85%, rgba(255, 61, 154, 0));
  }
  .fn-suits {
    display: block;
    position: absolute; inset: 0;
    -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 170px), rgba(0, 0, 0, 0) calc(100% - 30px));
    mask-image: linear-gradient(180deg, #000 calc(100% - 170px), rgba(0, 0, 0, 0) calc(100% - 30px));
  }
  /* where the words are, the sky runs into the floor with no edge: the horizon belongs to the crest. The band is solid
     on the horizon itself, in the colour halfway between sky and floor, and fades out above and below. */
  .fn-mend {
    display: block;
    position: absolute; left: 0;
    width: calc(var(--pl) + 40px);
    top: calc(var(--horizon) - 90px); height: 180px;
    background: linear-gradient(180deg, rgba(40, 25, 114, 0), rgba(33, 21, 98, 1) 50%, rgba(22, 14, 72, 0));
    /* it fades across the gap only, where the horizon line takes over; never under the lead */
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px - var(--cg)), rgba(0, 0, 0, 0) calc(100% - 40px));
    mask-image: linear-gradient(90deg, #000 calc(100% - 40px - var(--cg)), rgba(0, 0, 0, 0) calc(100% - 40px));
  }
  .fn-veil {
    display: block;
    position: absolute; inset: 0;
    background:
      radial-gradient(70% 60% at 0% 45%, rgba(6, 5, 21, .5), rgba(6, 5, 21, 0)),
      linear-gradient(90deg, rgba(6, 5, 21, .62), rgba(6, 5, 21, .42) calc(var(--pl) - 240px), rgba(6, 5, 21, 0) calc(var(--pl) + 20px));
  }
}

/* a wide window that is not very wide: a headline that stands clearly above the section headings below, and buttons
   set a little tighter, so both share a line where they can */
@media (min-width: 900px) and (max-width: 1199px) and (min-aspect-ratio: 1/1) {
  .front__title {
    font-size: clamp(40px, min(5.2vw + 6.4px, 8.8vh), 83.2px);
    font-size: clamp(40px, min(5.2vw + 6.4px, 8.8svh), 83.2px);
  }
  .front__actions { gap: 10px; }
  .front__actions .btn { padding: 0 20px; }
  .front__actions .front__share { padding-left: 17px; }
  .front__actions .front__more { padding-left: 16px; }
}
@media (min-width: 900px) and (max-width: 1099px) and (min-aspect-ratio: 1/1) {
  .front__actions .btn { font-size: 1rem; }
}
/* below 1200 px the headline fills its column, so the stars start at the column's own edge, not 150 px before the
   crest: none of them sits by a full stop */
@media (min-width: 760px) and (max-width: 1199px) and (min-aspect-ratio: 1/1), (min-width: 560px) and (max-width: 1199px) and (min-aspect-ratio: 5/4) {
  .fn-stars {
    -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .12) calc(var(--pl) - var(--cg)), #000 calc(var(--pl) + 20px)), linear-gradient(180deg, #000 calc(var(--wt) - var(--barh) - 40px), rgba(0, 0, 0, 0) calc(var(--wt) - var(--barh) - 10px));
    mask-image: linear-gradient(90deg, rgba(0, 0, 0, .12) calc(var(--pl) - var(--cg)), #000 calc(var(--pl) + 20px)), linear-gradient(180deg, #000 calc(var(--wt) - var(--barh) - 40px), rgba(0, 0, 0, 0) calc(var(--wt) - var(--barh) - 10px));
  }
}
/* a short laptop window: the words keep a clear gap under the bar, and the whole front fits the window */
@media (min-width: 760px) and (min-aspect-ratio: 1/1) and (max-height: 800px), (min-width: 560px) and (min-aspect-ratio: 5/4) and (max-height: 800px) {
  .front { padding-top: calc(var(--barh) + clamp(12px, 3vh, 24px)); padding-bottom: clamp(16px, 4vh, 40px); }
  @supports (height: 100svh) {
    .front { padding-top: calc(var(--barh) + clamp(12px, 3svh, 24px)); padding-bottom: clamp(16px, 4svh, 40px); }
  }
}
/* a very short one (660 px or less, a laptop with its browser's bars): a tighter rhythm, so the front still fits */
@media (min-width: 760px) and (min-aspect-ratio: 1/1) and (min-height: 521px) and (max-height: 660px), (min-width: 560px) and (min-aspect-ratio: 5/4) and (min-height: 521px) and (max-height: 660px) {
  .front { padding-bottom: 10px; }
  .front__title { margin-top: 14px; }
  .front__lead { margin-top: 12px; }
  .front__actions { margin-top: 18px; }
  .front__games { margin-top: 12px; }
}
/* a window too short for the whole front: the four names under the buttons go (the games follow further down the
   page), so nothing is cut at the window's foot. Where the words' column is narrow they stand taller, so they go
   sooner; on the shortest of those windows the note goes too. */
@media (min-width: 760px) and (max-width: 899px) and (min-aspect-ratio: 1/1) and (min-height: 521px) and (max-height: 715px),
       (min-width: 560px) and (max-width: 759px) and (min-aspect-ratio: 5/4) and (min-height: 521px),
       (min-width: 900px) and (max-width: 929px) and (min-height: 521px) and (max-height: 620px),
       (min-width: 900px) and (max-width: 989px) and (min-height: 521px) and (max-height: 685px),
       (min-width: 900px) and (min-height: 521px) and (max-height: 590px),
       (min-width: 1300px) and (min-height: 521px) and (max-height: 602px),
       (min-width: 1440px) and (min-height: 521px) and (max-height: 635px) {
  .front__games { display: none; }
}
@media (min-width: 760px) and (min-aspect-ratio: 1/1) and (min-height: 521px) and (max-height: 560px),
       (min-width: 560px) and (max-width: 759px) and (min-aspect-ratio: 5/4) and (min-height: 521px) and (max-height: 560px) {
  .front__note { display: none; }
}
/* the section headings never outgrow the front's headline. On a short wide window both are capped by its height, and
   where the headline cannot grow (under 900 px, or a sideways window from 560 px taller than a phone) the headings
   scale down with the window instead. Not the 404 page's heading, which is alone on its page. */
@media (min-width: 760px) and (min-aspect-ratio: 1/1) and (min-height: 521px) {
  .home .display {
    font-size: clamp(2rem, min(1.15rem + 3.4vw, 7.8vh), 3.5rem);
    font-size: clamp(2rem, min(1.15rem + 3.4vw, 7.8svh), 3.5rem);
  }
}
@media (min-width: 760px) and (max-width: 899px) and (min-aspect-ratio: 1/1) and (min-height: 521px), (min-width: 560px) and (max-width: 759px) and (min-aspect-ratio: 5/4) and (min-height: 521px) {
  .home .display {
    font-size: clamp(2rem, min(4.2vw + .35rem, 7.8vh), 3.5rem);
    font-size: clamp(2rem, min(4.2vw + .35rem, 7.8svh), 3.5rem);
  }
}

/* a phone held sideways: the game's own shape. The bar scrolls away with the page; a fixed one would take too much of it. */
@media (max-height: 520px) and (min-aspect-ratio: 5/4) {
  .has-bar .topbar { position: absolute; }
  .front { padding: var(--barh) 0 14px; }
  .front__status { min-height: 28px; padding: 4px 12px 4px 10px; font-size: .8125rem; }
  .front__title { margin-top: 10px; font-size: clamp(28px, 7.4vh, 36px); }
  .front__lead { margin-top: 8px; font-size: .9375rem; line-height: 1.45; }
  /* the trailer is the next thing down the page, so its button is left out and Share stays in the first screen */
  .front__note, .front__games, .front__more { display: none; }
  .front__actions { margin-top: 14px; }
  .front__actions .btn { min-height: 44px; padding: 0 20px; font-size: 1rem; }
  .home .display { font-size: clamp(1.5rem, 8.5vh, 2.25rem); }
}
/* a small phone held sideways (560 to 639 px): a narrower gap, so the words keep their lines */
@media (min-width: 560px) and (max-width: 639px) and (max-height: 520px) and (min-aspect-ratio: 5/4) {
  .front { --cg: 20px; }
}
/* any sideways window from 560 to 759 px: the news in a smaller pill, so it ends inside the words' column */
@media (min-width: 560px) and (max-width: 759px) and (min-aspect-ratio: 5/4) {
  .front__status { gap: 7px; padding: 4px 10px 4px 8px; font-size: .75rem; }
}

/* a narrow window: the gold button spans the column, and the trailer is a plain link under it */
@media (max-width: 559px) {
  .front { padding-bottom: 32px; }
  .front__title { margin-top: 14px; }
  .front__lead { margin-top: 10px; }
  .front__actions { width: 100%; flex-direction: column; align-items: center; gap: 2px; margin-top: 18px; }
  .front__actions .front__share { width: 100%; max-width: 400px; }
  .front__more { min-height: 44px; background: none; box-shadow: none; color: var(--text-hi); font-weight: 900; }
  .front__more::before { display: none; }
  .front__more:hover { color: var(--gold-100); filter: none; }
  .front__note { margin-top: 6px; }
  .front__games { margin-top: 20px; }
}
/* a short phone (an app's own browser, say): a little tighter, so the whole gold Share is in the first screen */
@media (max-width: 559px) and (max-height: 700px) {
  .front { padding-top: calc(var(--barh) + 4px); }
  .front__title { margin-top: 12px; font-size: clamp(2rem, 7vw + .4rem, 2.25rem); }
  .front__art { max-width: 300px; margin-top: 12px; }
  .front__actions { margin-top: 14px; }
}
@media (max-width: 359px) {
  .front__status { gap: 8px; padding: 5px 11px 5px 10px; font-size: .78rem; }
  .front__games-list { column-gap: 22px; }
  .front__games a { gap: 9px; font-size: .9375rem; }
}
/* above the crest (every layout but the two columns), a news line that has to wrap (a very narrow window, larger
   text) keeps its dot beside the first word, not stranded at the pill's far edge. A one-line pill is unchanged. */
@media (width < 560px), (width < 760px) and (aspect-ratio < 5/4), (aspect-ratio < 1) {
  .front__status {
    display: inline-block;
    padding-block: calc((34px - 2px - 1.1em) / 2);
    padding-block: calc((34px - 2px - 1lh) / 2);      /* where the reader's own line spacing is set, it follows it */
  }
  .front__status::before { display: inline-block; margin-right: 10px; vertical-align: .08em; }
}
@media (width < 360px) { .front__status::before { margin-right: 8px; } }

/* ---- the crest's motion, in CSS alone. It opens as the splash does, with the splash's own timings: the seal stamps
   in, the four cards fan out from behind it face down and turn over one by one (a flat flip, as in the splash: no 3D
   to go wrong). Then the hand keeps moving, 8 seconds a round: it stays open and sways, closes back behind the seal,
   waits a moment and opens again, and the seal gives a small beat each time it does. The rays turn and the glow
   breathes throughout. Each card turns face down again only while it is hidden behind the seal. Everything rests
   while the front is out of sight, and nothing moves at all for a visitor who has asked for less motion. */
@media screen and (prefers-reduced-motion: no-preference) {
  html:not(.still) .crest__rays { animation: ckFade .6s ease-out .2s both, ckTurn 48s linear .2s infinite; }
  html:not(.still) .crest__glow { animation: ckGlowIn .5s ease-out .15s both; }
  html:not(.still) .crest__glow::before { animation: ckBreathe 3.2s ease-in-out .7s infinite alternate; }
  html:not(.still) .crest__seal { animation: ckPop .5s cubic-bezier(.2, 1.4, .4, 1) .1s both, ckBeat 8s ease-out 8.4s infinite both; }
  html:not(.still) .crest__shadow { animation: ckFade .5s ease-out .1s both; }
  html:not(.still) .crest__card { animation: ckHand 8s linear calc(.4s + var(--i) * .06s) infinite both, ckSway var(--d) ease-in-out 2s infinite alternate; }
  html:not(.still) .crest__flip { animation: ckFlip 8s ease-in-out calc(var(--i) * .12s) infinite both; }
  html:not(.still) .crest__flip img { animation: ckShow 8s step-end calc(var(--i) * .12s) infinite both; }
  html:not(.still) .crest__flip .crest__back { animation-name: ckHide; }
  html:not(.still) .front.is-away .crest *, html:not(.still) .front.is-away .crest__glow::before { animation-play-state: paused; }
}
@keyframes ckFade { from { opacity: 0; } }
@keyframes ckTurn { to { transform: rotate(360deg); } }
@keyframes ckGlowIn { from { opacity: 0; transform: scale(.6); } }
@keyframes ckBreathe { to { opacity: .5; transform: scale(1.1); } }
@keyframes ckPop { from { opacity: 0; scale: .4; } }
@keyframes ckBeat { 0% { scale: 1; } 2.2% { scale: 1.05; } 6.5%, 100% { scale: 1; } }
/* one round of a card: out in 0.55 s, open until 6.4 s, back behind the seal by 6.9 s (it fades only once it is
   tucked in), hidden until 8 s */
@keyframes ckHand {
  0% { opacity: 0; transform: rotate(0deg); animation-timing-function: cubic-bezier(.2, .9, .3, 1.15); }
  2.06% { opacity: 1; }
  6.875% { transform: rotate(var(--a)); }
  80% { opacity: 1; transform: rotate(var(--a)); animation-timing-function: cubic-bezier(.6, 0, .3, 1); }
  85% { opacity: 1; }
  86.25%, 100% { opacity: 0; transform: rotate(0deg); }
}
/* the sway is added to the card's place by the rotate property, so it never fights the round above */
@keyframes ckSway { to { rotate: var(--s); } }
/* the turn-over starts 1 s into the round and takes 0.42 s; face and back change places at its middle */
@keyframes ckFlip { 0%, 12.5% { transform: scaleX(1); } 15.125% { transform: scaleX(0); } 17.75%, 100% { transform: scaleX(1); } }
@keyframes ckShow { 0% { opacity: 0; } 15.125%, 100% { opacity: 1; } }
@keyframes ckHide { 0% { opacity: 1; } 15.125%, 100% { opacity: 0; } }

/* ---------------------------------------------------------------- sections of the home page */

.section { position: relative; padding-block: clamp(52px, 7.5vw, 104px); }
.section__head { display: grid; gap: 18px; }
.section__head--center { justify-items: center; text-align: center; }
.section__head--center .lead { margin-inline: auto; text-wrap: balance; }

/* a section arrives the way a screen of the game does: it rises 14 pt and fades in. On screen only: a printed page
   shows every section, scrolled to or not. */
@media screen and (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .35s var(--ease), transform .35s var(--ease); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}

/* the night carries on down the page: faint blooms in the game's own violet, cyan and amber */
.home {
  position: relative;
  overflow-x: clip;      /* nothing below the front may widen the page under the fixed bar */
  background:
    radial-gradient(900px 640px at 10% 9%, rgba(139, 92, 246, .15), rgba(139, 92, 246, 0) 70%),
    radial-gradient(900px 700px at 100% 63%, rgba(34, 211, 238, .07), rgba(34, 211, 238, 0) 70%),
    radial-gradient(1000px 720px at 0% 92%, rgba(255, 181, 71, .075), rgba(255, 181, 71, 0) 70%);
}

/* ---- the trailer: one screen in the middle of the page, in the game's own glass. Nothing of the video is fetched
   until Play is pressed; without a script the browser's own controls play it. */
.trailer { padding-top: clamp(40px, 6vw, 88px); }
.cinema {
  --bezel: clamp(5px, .8vw, 10px);
  --pr: clamp(16px, 2.4vw, 30px);
  width: min(100%, 1000px);
  width: min(100%, 1000px, calc((100vh - var(--barh) - 40px) * 16 / 9));
  width: min(100%, 1000px, calc((100svh - var(--barh) - 40px) * 16 / 9));
  margin: clamp(28px, 4vw, 52px) auto 0;
}
/* a sideways phone: the bar scrolls away with the page, so the player may use the whole height */
@media (max-height: 520px) and (min-aspect-ratio: 5/4) {
  .cinema { width: min(100%, 1000px, calc((100svh - 24px) * 16 / 9)); }
}
/* one focus ring for the button and the playing video alike, round the glass frame, on the page's own night */
.cinema__frame:has(:focus-visible) { outline: 3px solid var(--gold-300); outline-offset: 3px; }
.cinema__play:focus-visible, .cinema__video:focus-visible { outline: none; }
.cinema__frame {
  position: relative;
  padding: var(--bezel);
  border-radius: var(--pr);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .17), rgba(255, 255, 255, .05) 42%, rgba(255, 255, 255, .03)),
    rgba(12, 9, 42, .82);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .3), 0 24px 44px -20px rgba(3, 2, 15, .92), 0 40px 110px -46px rgba(139, 92, 246, .95);
}
/* the lit rim of the game's glass: bright at the top, faint at the foot */
.cinema__frame::before {
  content: "";
  position: absolute; inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, .6), rgba(255, 255, 255, .1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
.cinema__screen {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--pr) - var(--bezel));
  overflow: hidden;
  background: #0b0920;
  isolation: isolate;
}
@supports not (aspect-ratio: 1) {
  .cinema__screen::before { content: ""; display: block; padding-top: 56.25%; }
}
.cinema__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; max-width: none;
  object-fit: cover;
  background: #0b0920;
}
.cinema__video:fullscreen { object-fit: contain; }
.cinema__video:-webkit-full-screen { object-fit: contain; }
/* over the poster: the gold button of the game, round, with what it does and how long it takes */
.cinema__play {
  position: absolute; z-index: 1; inset: 0;
  display: grid; place-content: center; justify-items: center; gap: 4px;
  width: 100%; margin: 0; padding: 0 16px;
  border: 0; border-radius: inherit;
  background: radial-gradient(64% 76% at 50% 52%, rgba(6, 5, 21, .66), rgba(6, 5, 21, .24) 72%, rgba(6, 5, 21, .36)),
    #0b0920 url("../img/trailer-poster.webp") center / cover no-repeat;
  color: var(--text-hi);
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cinema__play[hidden], .cinema.is-playing .cinema__play { display: none; }
.cinema__disc {
  position: relative;
  display: grid; place-items: center;
  width: clamp(60px, 9.4vw, 104px); height: clamp(60px, 9.4vw, 104px);
  margin-bottom: clamp(8px, 1.4vw, 16px);
  border-radius: 50%;
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold-100), var(--gold-300) 50%, var(--gold-500));
  box-shadow: 0 5px 0 var(--gold-700), 0 12px 34px rgba(245, 182, 46, .45);
  transition: transform .2s var(--ease), filter .15s ease-out, box-shadow .12s ease-out;
}
.cinema__disc::after {
  content: "";
  position: absolute; left: 6%; right: 6%; top: 3%;
  height: 56%;
  border-radius: 50% 50% 46% 46% / 62% 62% 38% 38%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%);
  opacity: .7;
  pointer-events: none;
}
/* a ring leaves the button now and then: this is the thing to press */
.cinema__disc::before {
  content: "";
  position: absolute; inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(255, 217, 102, .7);
  opacity: 0;
  pointer-events: none;
}
.cinema__disc svg { position: relative; z-index: 1; width: 40%; height: 40%; margin-left: 7%; }
.cinema__play:hover .cinema__disc { transform: scale(1.06); filter: brightness(1.06); }
.cinema__play:active .cinema__disc { transform: translateY(3px); box-shadow: 0 2px 0 var(--gold-700), 0 6px 18px rgba(245, 182, 46, .4); }
.cinema__label {
  font-size: clamp(1.0625rem, .86rem + .9vw, 1.5rem); font-weight: 1000; line-height: 1.2; letter-spacing: -.01em;
  text-shadow: 0 2px 14px rgba(5, 3, 26, .8);
}
.cinema__time {
  font-size: clamp(.875rem, .82rem + .25vw, 1rem); font-weight: 700; line-height: 1.3;
  max-width: 24em;
  color: var(--text-mid);
  text-shadow: 0 1px 10px rgba(5, 3, 26, .9);
  text-wrap: balance;
}
.cinema__about {
  max-width: 40em;
  margin: 18px auto 0;
  font-size: 1rem; line-height: 1.5;
  color: var(--text-lo);
  text-align: center; text-wrap: balance;
}
/* the trailer in words: closed, one quiet line under the player */
.cinema__words { max-width: 40em; margin: 10px auto 0; text-align: center; color: var(--text-lo); }
.cinema__words summary {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 10px;
  font-size: .9375rem; font-weight: 800;
  color: var(--text-mid);
  cursor: pointer;
  list-style: none;
}
.cinema__words summary::-webkit-details-marker { display: none; }
.cinema__words summary::after {
  content: ""; width: 7px; height: 7px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.cinema__words[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.cinema__words summary:hover { color: var(--text-hi); }
.cinema__words p { margin-top: 8px; font-size: 1rem; line-height: 1.6; text-align: left; }
@media (prefers-reduced-motion: no-preference) {
  html:not(.still) .cinema__disc::before { animation: ring 2.6s ease-out 1s infinite; }
}
@keyframes ring { 0% { opacity: .9; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.42); } }

/* ---- coming soon: the splash's own words and a short gold rule, at the foot of the page */
.soon { padding-bottom: clamp(28px, 4vw, 56px); }
.soon__card {
  position: relative;
  display: grid; justify-items: center; gap: 16px;
  padding: clamp(36px, 6vw, 72px) clamp(20px, 5vw, 64px) clamp(40px, 6vw, 76px);
  border-radius: var(--r-panel);
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(56% 78% at 50% 0%, rgba(245, 182, 46, .17), rgba(245, 182, 46, 0) 70%),
    radial-gradient(90% 120% at 50% 108%, rgba(139, 92, 246, .34), rgba(139, 92, 246, 0) 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03)),
    rgba(10, 8, 38, .7);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 30px 90px -50px rgba(139, 92, 246, .8);
}
.soon__seal { width: clamp(76px, 9vw, 108px); height: auto; }
.soon__bar {
  width: min(120px, 40%); height: 4px;
  margin-block: 2px 4px;
}
.soon__bar span {
  display: block;
  width: 100%; height: 100%;
  border-radius: 3px;
  background: var(--gold-300);
  box-shadow: 0 0 10px rgba(255, 217, 102, .75);
  transform-origin: center;
}
.soon .lead { margin-inline: auto; text-wrap: balance; }
.soon__share { margin-top: 8px; white-space: nowrap; }
@media (max-width: 340px) { .soon__card { padding-inline: 14px; } .soon__share { padding-inline: 20px; } }
/* the rule draws out from its middle as the section arrives, at the splash's own pace (on screen only, like the sections) */
@media screen and (prefers-reduced-motion: no-preference) {
  .js .soon__card:not(.is-in) .soon__bar span { transform: scaleX(0); }
  .js .soon__card.is-in .soon__bar span { animation: barfill 2.8s cubic-bezier(.3, .1, .3, 1) .35s both; }
}
@keyframes barfill { from { transform: scaleX(0); } }

/* ---- the game: three pictures */
.game__also { margin-top: -4px; font-size: .98rem; color: var(--text-lo); }

.shots { display: grid; gap: clamp(28px, 4vw, 44px) clamp(20px, 3vw, 36px); margin-top: clamp(36px, 5vw, 64px); }
@media (min-width: 760px) {
  .shots { grid-template-columns: 1fr 1fr; }
  .shot--wide { grid-column: 1 / -1; }
}
.shot__pane {
  position: relative;
  border-radius: clamp(12px, 2.4vw, 26px);
  overflow: hidden;
  background: var(--night-800);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .18), 0 26px 80px -34px rgba(139, 92, 246, .7);
}
.shot__pane img { width: 100%; height: auto; aspect-ratio: 844 / 390; }
.shot figcaption { margin-top: 14px; max-width: 34em; font-size: 1rem; line-height: 1.5; color: var(--text-lo); }
.shot figcaption strong { color: var(--text-hi); font-weight: 900; }

/* ---- four games: the table and the hand of the home screen */
.games { overflow: hidden; }
.games::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 46% at 50% 44%, rgba(139, 92, 246, .22), rgba(139, 92, 246, 0));
  pointer-events: none;
}

.picker { position: relative; margin-top: clamp(28px, 4vw, 52px); --cw: clamp(86px, 21.5vw, 150px); }

.table { position: relative; width: min(100%, 880px); margin-inline: auto; container-type: inline-size; }
.table__art { width: 100%; height: auto; overflow: visible; }
.table__felt { opacity: 0; transition: opacity 0s linear .4s; }
.table__felt.is-on { opacity: 1; transition: opacity .4s ease-out; }
.table__words {
  position: absolute;
  left: 10%; right: 10%;
  top: 47%;
  transform: translateY(-50%);
  display: grid;
  justify-items: center;
  gap: 8px;
  gap: 1.4cqi;
  text-align: center;
  color: #FFFFFF;
}
.table__eyebrow {
  font-size: 12px;
  font-size: max(9.5px, 1.85cqi);
  font-weight: 900;
  letter-spacing: .13em;
  white-space: nowrap;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .84);
}
.table__names { display: grid; justify-items: center; }
.table__game { grid-area: 1 / 1; display: grid; gap: .6cqi; opacity: 0; transform: translateY(6px); transition: opacity .12s ease-in, transform .12s ease-in; }
.table__game.is-on { opacity: 1; transform: none; transition: opacity .25s ease-out .12s, transform .25s var(--ease) .12s; }
.table__name { font-size: clamp(21px, 5.5vw, 48px); font-size: max(21px, 5.5cqi); font-weight: 1000; line-height: 1.1; letter-spacing: -.01em; text-shadow: 0 2px 10px rgba(5, 3, 26, .35); }
.table__line { max-width: 86%; margin-inline: auto; font-size: 15px; font-size: max(13.5px, 2.5cqi); font-weight: 600; line-height: 1.3; color: #F1ECFF; text-wrap: balance; text-shadow: 0 1px 6px rgba(5, 3, 26, .4); }

@media (prefers-reduced-motion: no-preference) {
  .table__sweep { animation: sweep 3.2s linear infinite; }      /* steady, no rest: it leaves on the right as it comes in on the left */
}
@keyframes sweep { from { transform: translateX(90px) skewX(-24deg); } to { transform: translateX(710px) skewX(-24deg); } }

.hand {
  position: relative;
  z-index: 1;
  width: calc(var(--cw) * 3.9);
  max-width: 100%;
  height: calc(var(--cw) * 1.86);
  margin: calc(var(--cw) * -.2) auto 0;
}
.gamecard {
  position: absolute;
  left: 50%;
  top: calc(var(--cw) * .2);
  width: var(--cw);
  aspect-ratio: 92 / 128;
  margin-left: calc(var(--cw) / -2);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transform-origin: 50% calc(50% + var(--cw) * 2.85);
  transform: rotate(var(--a));
  z-index: var(--z);
  border-radius: calc(var(--cw) * .12);
  -webkit-tap-highlight-color: transparent;
}
.gamecard[aria-selected="true"] { z-index: 6; }
.gamecard__body {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: inherit;
  background-image: var(--pat), linear-gradient(158deg, var(--c1), var(--c2));
  background-size: calc(var(--cw) * var(--pw)) auto, auto;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45), 0 5px 10px rgba(5, 3, 26, .55);
  transition: transform .3s cubic-bezier(.2, .9, .3, 1.25), box-shadow .2s ease-out;
}
.gamecard:hover .gamecard__body { transform: translateY(calc(var(--cw) * -.055)); }
.gamecard[aria-selected="true"] .gamecard__body {
  transform: translateY(calc(var(--cw) * -.152));
  box-shadow: inset 0 0 0 2.5px #FFE9A6, 0 5px 10px rgba(5, 3, 26, .55), 0 0 calc(var(--cw) * .16) calc(var(--cw) * .03) rgba(255, 217, 102, .7);
}
.gamecard:focus-visible { outline-offset: calc(var(--cw) * .2); }
.gamecard__name {
  position: absolute;
  left: 12%;
  top: 7.5%;
  font-size: calc(var(--cw) * .15);
  font-weight: 1000;
  line-height: 1.14;
  color: #FFFFFF;
  text-align: left;
}
.gamecard__art {
  position: absolute;
  left: 43.5%;
  top: 43.5%;
  width: 43.5%;
  height: auto;
  transform: rotate(6deg);
  border-radius: 7%;
  box-shadow: 0 calc(var(--cw) * .03) calc(var(--cw) * .05) rgba(5, 3, 26, .45);
}

.gamecard--single { --c1: #F7B955; --c2: #A2541A; --pw: .2022; --pat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30' fill='none' stroke='%23fff' stroke-opacity='.26' stroke-width='1.3'%3E%3Cpath d='M15 2 28 15 15 28 2 15Z'/%3E%3Cpath d='M15 10 20 15 15 20 10 15Z'/%3E%3C/svg%3E"); }
.gamecard--double { --c1: #4FD3C4; --c2: #12606E; --pw: .2696; --pat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 28' fill='none' stroke='%23fff' stroke-opacity='.26' stroke-width='1.3'%3E%3Ccircle cx='14' cy='14' r='9'/%3E%3Ccircle cx='26' cy='14' r='9'/%3E%3C/svg%3E"); }
.gamecard--ace { --c1: #E873D8; --c2: #5B2BA6; --pw: .2291; --pat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34' fill='none' stroke='%23fff' stroke-opacity='.26' stroke-width='1.3'%3E%3Cpath d='M17 6.5 20.08 9.58H24.42V13.92L27.5 17 24.42 20.08V24.42H20.08L17 27.5 13.92 24.42H9.58V20.08L6.5 17 9.58 13.92V9.58H13.92ZM0 0 5.4 5.4M34 0 28.6 5.4M0 34 5.4 28.6M34 34 28.6 28.6'/%3E%3C/svg%3E"); }
.gamecard--hidden { --c1: #6F8CFF; --c2: #2B2A96; --pw: .2157; --pat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 16' fill='none' stroke='%23fff' stroke-opacity='.26' stroke-width='1.3'%3E%3Cpath d='M0 16A16 16 0 0 1 32 16M-16 8A16 16 0 0 1 16 8M16 8A16 16 0 0 1 48 8'/%3E%3C/svg%3E"); }

/* the hand is dealt as it comes into view (on screen only, like the sections) */
@media screen and (prefers-reduced-motion: no-preference) {
  .js .hand:not(.is-in) .gamecard { opacity: 0; }
  .js .hand.is-in .gamecard { animation: deal .5s cubic-bezier(.2, .9, .3, 1.15) calc(.1s + var(--z) * .07s) both; }
}
@keyframes deal { from { opacity: 0; transform: rotate(0deg) translateY(calc(var(--cw) * 1.6)); } 25% { opacity: 1; } to { transform: rotate(var(--a)); } }

.rules { margin-top: clamp(20px, 3vw, 36px); }
.rules__panel + .rules__panel { margin-top: 40px; }
.rules__title { text-align: center; }
.rules__list { display: grid; gap: 14px; margin-top: 18px; }
@media (min-width: 720px) { .rules__list { grid-template-columns: 1fr 1fr; gap: 16px; } }
.rule-card { padding: 20px 22px 22px; border-radius: 20px; }
.rule-card h4 { font-size: 1.0625rem; font-weight: 900; line-height: 1.3; color: var(--text-hi); }
.rule-card p { margin-top: 6px; font-size: 1rem; line-height: 1.5; }
/* a game's rules arrive as its card is picked: they rise 14 pt and fade in */
@media (prefers-reduced-motion: no-preference) {
  .rules__panel.is-swapping { animation: rise .3s var(--ease) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---- three ways to sit down: each with its own table from the game */
.ways__grid { display: grid; gap: 44px; margin-top: clamp(32px, 4.5vw, 56px); }
@media (min-width: 860px) {
  .ways__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(22px, 2.8vw, 32px); }
}
.way__shot { margin-bottom: 20px; border-radius: clamp(12px, 1.6vw, 18px); box-shadow: 0 0 0 1px rgba(255, 255, 255, .18), 0 22px 60px -30px var(--tag); }
.way__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--tag);
  border-radius: 999px;
  background: rgba(10, 8, 38, .92);
  color: #FFFFFF;
  font-size: .82rem;
  font-weight: 900;
  line-height: 1;
}
.way__tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tag); }
.way h3 { margin-top: 16px; font-size: clamp(1.4rem, 1.2rem + .8vw, 1.75rem); font-weight: 1000; line-height: 1.15; letter-spacing: -.01em; color: var(--text-hi); }
.way p { margin-top: 10px; max-width: 30em; text-wrap: pretty; }
.way--online { --tag: #FFD966; }
.way--private { --tag: #8FF0E4; }
.way--practice { --tag: #FFD08A; }

/* ---- chips: the entry fee sheet of the game */
.chips__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (min-width: 980px) { .chips__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.chips__facts { display: grid; gap: 14px; margin-top: 26px; }
.chips__facts li { position: relative; padding-left: 30px; max-width: 30em; }
.chips__facts li::before {
  content: "";
  position: absolute;
  left: 0; top: .28em;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(245, 182, 46, 0) 0 34%, #FFF1B8 36% 46%, #F5B62E 48%);
  box-shadow: 0 1.5px 0 #9A5B00;
}

.stakes { padding: clamp(20px, 3.4vw, 34px); border-radius: var(--r-panel); }
.stakes__title { font-size: clamp(1.3rem, 1.15rem + .8vw, 1.7rem); font-weight: 1000; line-height: 1.15; color: var(--text-hi); }
.stakes__sub { margin-top: 4px; font-size: 1rem; }
.stakes__sub b { color: var(--gold-100); font-weight: 900; }

.fees { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 18px; }
@media (max-width: 560px) { .fees { grid-template-columns: repeat(3, 1fr); } }
.fee {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: end;
  gap: 4px;
  min-height: 84px;
  padding: 10px 4px 9px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 18px;
  background: rgba(255, 255, 255, .07);
  color: #FFFFFF;
  font-weight: 1000;
  font-size: 1.0625rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color .15s ease-out, border-color .15s ease-out, box-shadow .15s ease-out;
  -webkit-tap-highlight-color: transparent;
}
.fee:hover { background: rgba(255, 255, 255, .12); }
.fee svg { width: 34px; height: 36px; overflow: visible; }
.fee[aria-checked="true"] {
  border-color: var(--gold-300);
  background: linear-gradient(180deg, rgba(255, 217, 102, .5), rgba(245, 182, 46, .3));
  box-shadow: 0 0 0 1px var(--gold-300), 0 0 18px rgba(255, 217, 102, .45);
}
.fee[aria-checked="true"]::after {
  content: "";
  position: absolute;
  right: 6px; top: 6px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gold-300) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none' stroke='%2316132E' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 9.4 7.9 12.2 13 6.4'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* the table scrolls on its own if it cannot fit (a tiny window, much larger text), so no figure is ever out of reach;
   the sheet around it stays still */
.stakes__scroll { margin-top: 14px; overflow-x: auto; }
.stakes__table {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 18px;
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(10, 8, 38, .35);
  font-weight: 1000;
  font-variant-numeric: tabular-nums;
}
.stakes__table th, .stakes__table td { padding: 9px 6px; text-align: center; line-height: 1.2; }
.stakes__table thead th { padding-block: 14px 12px; color: #FFFFFF; font-size: clamp(.85rem, .78rem + .4vw, 1.0625rem); font-weight: 1000; border-bottom: 1px solid rgba(255, 255, 255, .16); }
.stakes__table thead th small { display: block; margin-top: 2px; color: var(--text-mid); font-size: .82em; font-weight: 700; }
.stakes__table thead th:first-child, .stakes__table tbody th { padding-left: clamp(12px, 2.4vw, 22px); text-align: left; }
.stakes__table thead th:first-child { color: var(--lilac); font-size: .72rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.stakes__table tbody th { color: #FFFFFF; font-size: clamp(.9rem, .82rem + .4vw, 1.0625rem); white-space: nowrap; }
.stakes__table tbody th::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 10px; border-radius: 50%; background: currentColor; }
.stakes__table tbody td { font-size: clamp(1rem, .85rem + .8vw, 1.375rem); }
.stakes__table tbody tr:first-child > * { padding-top: 14px; }
.stakes__table tbody tr:last-child > * { padding-bottom: 14px; }
.stakes__table .is-win td, .stakes__table .is-win th::before { color: var(--win); }
.stakes__table .is-lose td, .stakes__table .is-lose th::before { color: var(--lose); }
/* the Goon Court column wears a gold edge, as it does in the game */
.stakes__table .is-goon { background: rgba(245, 182, 46, .13); box-shadow: inset 1.5px 0 0 #DA994A, inset -1.5px 0 0 #DA994A; }
.stakes__table thead .is-goon { color: var(--gold-300); border-radius: 0 17px 0 0; box-shadow: inset 1.5px 0 0 #DA994A, inset -1.5px 0 0 #DA994A, inset 0 1.5px 0 #DA994A; border-bottom-color: rgba(218, 153, 74, .5); }
.stakes__table thead .is-goon small { color: var(--gold-100); }
.stakes__table tbody tr:last-child .is-goon { border-radius: 0 0 17px 0; box-shadow: inset 1.5px 0 0 #DA994A, inset -1.5px 0 0 #DA994A, inset 0 -1.5px 0 #DA994A; }
.stakes__note { margin-top: 14px; font-size: 1rem; color: var(--text-mid); }
/* a phone under 380 px (or a wider one with larger text): the table packs a little tighter, so it fits the sheet */
@media (max-width: 23.7em) {
  .stakes { padding-inline: 12px; }
  .stakes__table th, .stakes__table td { padding-inline: 3px; }
  .stakes__table thead th:first-child, .stakes__table tbody th { padding-left: 10px; }
  .stakes__table tbody th::before { margin-right: 6px; }
  .stakes__table tbody td { font-size: .95rem; }
  .stakes__table thead th { font-size: .8rem; }
}
/* from 380 to 391 px the table's own cells pack a little (its figures keep their size), so "A game" keeps one line */
@media (min-width: 23.75em) and (max-width: 24.4375em) {
  .stakes__table th, .stakes__table td { padding-inline: 4px; }
}
/* under 333 px the sheet reaches a little into the margins, so the table still fits */
@media (max-width: 20.75em) {
  .stakes { margin-inline: -8px; }
}

/* ---------------------------------------------------------------- footer */

.footer { position: relative; margin-top: clamp(24px, 4vw, 56px); padding-block: 44px 40px; border-top: 1px solid rgba(185, 168, 255, .16); }
.footer__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }
.footer__brand { display: block; border-radius: 999px; }
.footer__brand img { height: 56px; width: auto; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.footer__links a { color: var(--text-hi); font-weight: 800; text-decoration: none; }
.footer__links a:hover { color: var(--gold-300); }
.footer__meta { display: grid; gap: 6px; margin-top: 26px; font-size: .92rem; line-height: 1.5; color: var(--text-lo); }
.footer__meta a { color: var(--text-mid); }

/* ---------------------------------------------------------------- reading pages: Terms, Privacy, Support */

.page { position: relative; isolation: isolate; }
.page .night { bottom: auto; height: 760px; --u: 1.3px; --horizon: 236px; }

.doc { position: relative; z-index: 1; }
.doc__head { display: grid; gap: 6px; padding-block: clamp(14px, 3vw, 30px) clamp(20px, 3vw, 30px); }
.doc__title { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.25rem); font-weight: 1000; line-height: 1.05; letter-spacing: -.018em; color: var(--text-hi); text-wrap: balance; }
.doc__changed { font-size: 1.0625rem; color: var(--text-mid); }

.sheet {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  padding: clamp(22px, 4.6vw, 52px);
  border-radius: var(--r-panel);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, .05) 320px, rgba(255, 255, 255, .03)),
    rgba(10, 8, 38, .72);
}
.sheet--narrow { max-width: 900px; }
@media (min-width: 980px) {
  .sheet--toc { grid-template-columns: 232px minmax(0, 1fr); gap: 60px; }
  .toc { position: sticky; top: 24px; align-self: start; max-height: calc(100vh - 48px); overflow-y: auto; }
  .toc summary { pointer-events: none; }
  .toc summary::after { display: none; }
}

.toc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--lilac);
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after {
  content: "";
  width: 9px; height: 9px;
  margin-right: 4px;
  border-right: 2.5px solid var(--lilac);
  border-bottom: 2.5px solid var(--lilac);
  transform: rotate(45deg) translateY(-3px);
  transition: transform .2s var(--ease);
}
.toc[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.toc ol { display: grid; margin-top: 14px; }
.toc a {
  display: block;
  padding: 7px 0 7px 14px;
  border-left: 2px solid rgba(255, 255, 255, .13);
  color: var(--text-lo);
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}
.toc a:hover { color: var(--text-hi); }
.toc a.is-current { color: var(--gold-300); border-left-color: var(--gold-300); }
@media (max-width: 979px) {
  .toc { padding-bottom: 22px; border-bottom: 1px solid rgba(255, 255, 255, .13); }
}

.prose { max-width: 43rem; }
.prose > :first-child { margin-top: 0; }
.prose h2 {
  margin-top: 2.5em;
  font-size: clamp(1.35rem, 1.2rem + .7vw, 1.7rem);
  font-weight: 1000;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--text-hi);
  scroll-margin-top: 24px;
  text-wrap: balance;
}
.prose h3 { margin-top: 1.7em; font-size: 1.0625rem; font-weight: 900; line-height: 1.35; color: var(--text-hi); scroll-margin-top: 24px; }
.prose p, .prose ul, .prose ol, .prose .rule, .prose .table-scroll { margin-top: .95em; }
.prose .short, .prose .contact { margin-top: 1.6em; }
.prose h2 + .contact, .prose h2 + .rule, .prose h2 + .table-scroll { margin-top: 1.1em; }
.prose h3 + p, .prose h3 + ul { margin-top: .45em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul > li { position: relative; }
.prose ul > li::before {
  content: "";
  position: absolute;
  left: -1.08em; top: .62em;
  width: .4em; height: .4em;
  border-radius: 50%;
  background: var(--lilac);
}
.prose ol { list-style: decimal; }
.prose ol > li { padding-left: .3em; }
.prose ol > li::marker { color: var(--gold-300); font-weight: 900; }
.prose li + li { margin-top: .5em; }
.prose strong { color: var(--text-hi); font-weight: 800; }
.prose a { font-weight: 700; overflow-wrap: anywhere; }

/* gold marks a rule of the game: here, the lines a player must not miss */
.rule {
  position: relative;
  padding: 16px 20px 17px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 217, 102, .14), rgba(245, 182, 46, .07));
  box-shadow: inset 0 0 0 1.5px rgba(255, 217, 102, .62);
  color: var(--text-hi);
  font-weight: 700;
}
.rule > :first-child { margin-top: 0; }

.short { padding: 20px 22px 22px; border-radius: 20px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .13); }
.short__title { font-size: .78rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: var(--lilac); }
.prose .short ul { margin-top: .7em; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 16px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.facts { width: 100%; min-width: 460px; border-collapse: collapse; font-size: .98rem; line-height: 1.45; }
.facts th, .facts td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.facts thead th { font-size: .74rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; color: var(--lilac); background: rgba(255, 255, 255, .05); }
.facts tbody th { width: 34%; color: var(--text-hi); font-weight: 800; }
/* a narrow window: each row stacks, so nothing scrolls sideways */
@media (max-width: 640px) {
  .facts { min-width: 0; }
  .facts thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .facts tr { display: block; padding: 13px 16px 14px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .facts tr:last-child { border-bottom: 0; }
  .facts tbody th, .facts tbody td { display: block; width: auto; padding: 0; border: 0; }
  .facts tbody td { margin-top: 4px; }
}

/* Support */
.contact { display: grid; gap: 18px; align-items: center; padding: clamp(20px, 3.4vw, 30px); border-radius: 22px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .13); }
@media (min-width: 640px) { .contact { grid-template-columns: minmax(0, 1fr) auto; } }
.contact__mail { font-size: clamp(1.15rem, 1rem + .9vw, 1.5rem); font-weight: 1000; color: var(--text-hi); overflow-wrap: anywhere; line-height: 1.25; }
.contact p { margin-top: 4px; }
.prose .contact .btn { color: var(--ink); font-weight: 1000; }

/* the page that is not there: the cards lie face down, as on the game's own "something is wrong" screens */
.lost { --u: max(.6px, min(.235vw, 1.3px)); display: grid; justify-items: center; gap: 12px; padding-block: 18px 30px; text-align: center; }
.lost .cluster { flex: none; width: calc(400 * var(--u)); height: calc(180 * var(--u)); margin-bottom: 14px; overflow: visible; }
.lost .lead { margin-inline: auto; }
.lost .btn { margin-top: 14px; }

/* ?og on the home page frames the front alone, for the picture a shared link shows (1200 x 630). It is centred,
   so a square crop of the middle still holds the logo, the news and the headline; the crest stands under them. */
.og :is(.topbar__nav, .topbar__share, .skip, .toast, .front__lead, .front__actions, .front__note, .front__games, .front__calm, .fn-veil, .fn-mend) { display: none !important; }
.og .topbar__in { justify-content: center; height: 96px; }
.og .topbar__logo { margin: 0; }
.og .topbar__logo img { height: 58px; }
.og .front { display: block; height: 100vh; min-height: 0; padding: 92px 0 0; }
.og .front__in {
  width: 100%; margin: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "status" "title" "art";
  grid-template-rows: auto;
  justify-items: center;
  text-align: center;
}
.og .front__status { min-height: 46px; gap: 12px; padding: 0 22px 0 18px; font-size: 21px; }
.og .front__status::before { width: 11px; height: 11px; }
.og .front__title { margin-top: 16px; font-size: 56px; line-height: .98; }
.og .front__art { width: 500px; max-width: none; margin-top: 22px; align-self: start; justify-self: center; }
.og .crest { width: 120%; margin-left: -10%; }
/* no stars in the middle column, over the logo, the news and the headline; the sky either side keeps them */
.og .fn-stars {
  top: 0; height: var(--horizon);
  -webkit-mask-image: linear-gradient(90deg, #000 330px, rgba(0, 0, 0, 0) 370px, rgba(0, 0, 0, 0) 830px, #000 870px), linear-gradient(180deg, rgba(0, 0, 0, 0) calc(var(--at) - 10px), #000 calc(var(--at) + 30px));
  mask-image: linear-gradient(90deg, #000 330px, rgba(0, 0, 0, 0) 370px, rgba(0, 0, 0, 0) 830px, #000 870px), linear-gradient(180deg, rgba(0, 0, 0, 0) calc(var(--at) - 10px), #000 calc(var(--at) + 30px));
}
/* centred, so the city, its line and the floor grid run on both sides of the crest alike */
.og .fn-city { -webkit-mask-image: none; mask-image: none; }
.og .fn-line {
  left: calc(var(--vx) - 650 * var(--u)); right: auto; width: calc(1300 * var(--u));
  background: linear-gradient(90deg, rgba(255, 61, 154, 0), rgba(255, 194, 226, .9) 50%, rgba(255, 61, 154, 0));
}
.og .fn-grid {
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) calc(var(--vx) - 680 * var(--u)), #000 calc(var(--vx) - 500 * var(--u)), #000 calc(var(--vx) + 500 * var(--u)), rgba(0, 0, 0, 0) calc(var(--vx) + 680 * var(--u))), linear-gradient(180deg, #000 20%, rgba(0, 0, 0, 0) 92%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) calc(var(--vx) - 680 * var(--u)), #000 calc(var(--vx) - 500 * var(--u)), #000 calc(var(--vx) + 500 * var(--u)), rgba(0, 0, 0, 0) calc(var(--vx) + 680 * var(--u))), linear-gradient(180deg, #000 20%, rgba(0, 0, 0, 0) 92%);
  mask-composite: intersect;
}

/* ?still on any address shows the page at rest, with nothing moving: for pictures of the site */
.still *, .still *::before, .still *::after { animation: none !important; transition: none !important; }
.still .reveal, .still .hand .gamecard { opacity: 1 !important; }
.still .reveal { transform: none !important; }
.still .soon__bar span { transform: none !important; }

/* high contrast (forced colours): the stuck bar stays solid, the section being read keeps a mark, and every button
   keeps an edge */
@media (forced-colors: active) {
  .topbar::before { background-color: Canvas; }
  .topbar__nav a[aria-current] { outline: 2px solid CanvasText; outline-offset: -2px; }
  .btn, .cinema__disc { border: 1px solid ButtonText; }
  .cinema__disc { background: ButtonFace; color: ButtonText; border-width: 2px; }
  .soon__card, .cinema__frame, .way__shot { border: 1px solid CanvasText; }
  .front__calm { border: 1px solid ButtonText; }
}

@media print {
  /* white paper, margins included (the dark colour scheme would print them near black) */
  :root { color-scheme: light; }
  html { background: #fff !important; }
  .night, .sitebar .switch, .toc, .footer__links, .topbar, .toast, .front__night, .cinema__frame { display: none !important; }
  body, .sheet { background: #fff !important; color: #111 !important; }
  .prose h2, .prose h3, .prose strong, .doc__title, .rule { color: #111 !important; }
  .doc__changed, .prose p, .prose li { color: #222 !important; }
  .sheet { padding: 0; }
  .glass::before { display: none; }
  a { color: #111 !important; }
  /* the front on paper: dark words on white, the cards face up, no glows, sheens or shadows */
  .front { background: none !important; }
  .crest__rays, .crest__glow, .crest__shadow, .crest__back, .btn--gold::after, .soon__bar { display: none !important; }
  .front__rung { background: none !important; -webkit-text-fill-color: #111; color: #111 !important; }
  .front__title, .front__status, .front__lead, .front__note, .front__games a, .front__games-label { color: #111 !important; }
  .front__status { background: none !important; border-color: #999 !important; }
  .crest__flip img { box-shadow: none !important; }
  .btn { background: none !important; box-shadow: none !important; border: 1px solid #999 !important; color: #111 !important; }
  /* the sections: dark headings, each picture of the game in a thin frame instead of its violet glow, and no glow
     over the four games (on paper it would print, or blank out the heading under it). The trailer cannot be printed,
     so its screen is left out and the line under it stays. */
  .display, .rule-card h4, .way h3, .stakes__title, .shot figcaption strong, .fee, .stakes__table th { color: #111 !important; }
  .shot__pane { box-shadow: 0 0 0 1px #bbb !important; }
  .games::before { display: none !important; }
  .soon__card { background: none !important; box-shadow: 0 0 0 1px #bbb !important; }
  .cinema__about, .cinema__words { color: #222 !important; }
  .crest, .crest * { animation: none !important; }
  .front__calm { display: none !important; }
  .chips__grid { display: block; }
  .chips__grid > * + * { margin-top: 32px; }
  .section__head { break-inside: avoid; break-after: avoid; }
}
