/* Pwned Galaxy: the site is the lobby. One in-game day, dawn to night, as you
   scroll. Floating islands carry the content; prismarine means act, amethyst
   means portal, torch gold means live. */

@font-face {
  font-family: "Bungee";
  src: url("/fonts/bungee-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Pixelify Sans";
  src: url("/fonts/pixelify-sans-latin-wght.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url("/fonts/rubik-latin-wght.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url("/fonts/rubik-latin-wght-italic.woff2") format("woff2");
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --sky: #f3a488;
  --night: 0;               /* 0 = day, 1 = full night; set from scroll */

  --ink: #15112a;
  --ink-soft: #3a3158;
  --white: #f6f3ff;

  --soil: #2a1e17;
  --on-soil: #f3eee6;
  --on-soil-soft: #cdb9a5;
  --grass: #5e9c30;
  --grass-dark: #3d6f1e;

  --prismarine: #3fd8c7;
  --prismarine-light: #8ff0e4;
  --prismarine-dark: #138074;
  --amethyst: #9b5cf2;
  --obsidian: #150e22;
  --torch: #ffcb47;
  --splash: #ffff55;

  --tag-bg: rgb(0 0 0 / 0.46);
  --tag-bg-hover: rgb(0 0 0 / 0.66);

  --font-display: "Bungee", "Pixelify Sans", system-ui, sans-serif;
  --font-pixel: "Pixelify Sans", ui-monospace, monospace;
  --font-body: "Rubik", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --step: steps(4, end);

  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--amethyst) var(--obsidian);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  caret-color: var(--amethyst);
  overflow-x: clip;
}

::selection { background: var(--amethyst); color: var(--white); }

img { display: block; max-width: 100%; height: auto; }

/* Clear the fixed bar when a link or portal lands on a section. */
[id] { scroll-margin-top: 72px; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--prismarine);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
  margin: 0;
}
h2 { font-size: clamp(2.3rem, 5.6vw, 4.4rem); }
h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
p { margin: 0; }

code {
  font-family: var(--font-pixel);
  font-weight: 600;
  font-size: 0.95em;
  background: rgb(0 0 0 / 0.28);
  color: var(--prismarine-light);
  padding: 0.05em 0.4em 0.12em;
}

.icon { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 200;
  background: var(--prismarine); color: var(--ink);
  padding: 10px 14px; font-family: var(--font-pixel); font-weight: 600;
}
.skip:focus { top: 16px; }

/* ---------- Sky ---------- */

.sky {
  position: fixed; inset: 0; z-index: -1;
  background: var(--sky);
  pointer-events: none;
  overflow: hidden;
}
.sky__stars {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: var(--night);
  image-rendering: pixelated;
}
/* The Minecraft sun and moon are squares. They travel with scroll. */
.sky__sun, .sky__moon {
  position: absolute;
  /* site.js keeps them inside x 78-92%, y 12-30%: clear of the left-aligned
     headings and fully inside the viewport. */
  width: clamp(40px, 5vw, 76px); aspect-ratio: 1;
  left: var(--sun-x, 70%); top: var(--sun-y, 30%);
  translate: -50% -50%;
}
.sky__sun {
  background: #fff4b8;
  box-shadow: 0 0 0 10px rgb(255 238 170 / 0.28), 0 0 0 24px rgb(255 232 150 / 0.14);
  /* Gone well before the moon is up, so the two never share the sky. */
  opacity: clamp(0, calc(1 - var(--night) * 3), 1);
}
.sky__moon {
  left: var(--moon-x, 20%); top: var(--moon-y, 120%);
  background:
    linear-gradient(#c9cfe6 0 0) 22% 30% / 22% 22% no-repeat,
    linear-gradient(#c9cfe6 0 0) 64% 62% / 16% 16% no-repeat,
    linear-gradient(#d8ddf0 0 0) 30% 72% / 12% 12% no-repeat,
    #eef1ff;
  box-shadow: 0 0 0 10px rgb(220 228 255 / 0.12);
  /* Rises only once the sun has fully set (sun is gone at night = 0.33). */
  opacity: clamp(0, calc((var(--night) - 0.35) * 1.6), 1);
}

/* ---------- Nametags and the top bar ---------- */

.tag {
  display: inline-flex; align-items: center; gap: 0.4em;
  font-family: var(--font-pixel);
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.2;
  color: var(--white);
  background: var(--tag-bg);
  padding: 0.3em 0.65em 0.38em;
  text-decoration: none;
  text-shadow: 2px 2px 0 rgb(0 0 0 / 0.45);
  border: 0;
  white-space: nowrap;
}
a.tag, button.tag { cursor: pointer; transition: background 120ms var(--step), color 120ms var(--step); }
a.tag:hover, button.tag:hover { background: var(--tag-bg-hover); color: var(--torch); }
.tag--cmd { color: var(--prismarine-light); font-weight: 600; font-size: 0.85rem; }

.bar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  padding: 12px var(--gutter);
}
/* The bar floats over everything, including other text, so its nametags are
   near-opaque where in-world nametags are translucent. */
.bar .tag { background: rgb(12 9 26 / 0.84); }
.bar a.tag:hover, .bar button.tag:hover { background: rgb(12 9 26 / 0.96); }
/* Once the page moves under it, the bar becomes one solid strip so nothing
   scrolls through the gaps between its nametags. */
.bar { transition: background 150ms var(--step); }
/* The strip takes the current sky, pulled most of the way to obsidian, so
   it belongs to the hour; the nametags stay darker plates on top of it. */
.bar.is-solid { background: color-mix(in oklch, var(--sky) 38%, rgb(12 9 26)); }
.bar.is-solid .tag { background: rgb(8 6 18 / 0.9); }
.tag--brand {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-shadow: none;
  padding: 0.4em 0.7em;
}
.bar__nav { margin-left: auto; position: relative; }
.bar__nav ul { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.bar__toggle { display: none; }
.tag--discord .icon { color: #b9a4ff; }
.bar__clock { font-variant-numeric: tabular-nums; min-width: 5.6em; justify-content: center; }
.bar__clock-moon { display: none; }
.is-night .bar__clock-moon { display: block; }
.is-night .bar__clock-sun { display: none; }
.bar__clock-sun { color: var(--torch); }
.bar__clock-moon { color: #cfd6ff; }

@media (max-width: 760px) {
  .bar { padding: 10px 16px; gap: 8px; }
  .bar__toggle { display: inline-flex; }
  .bar__nav ul {
    position: absolute; right: 0; top: calc(100% + 6px);
    flex-direction: column; align-items: stretch; gap: 4px;
    min-width: 11rem;
    display: none;
  }
  .bar__nav ul.is-open { display: flex; }
  .bar__nav ul .tag { width: 100%; padding: 0.6em 0.8em; background: rgb(12 8 24 / 0.86); }
  .bar__clock { display: none; }
}

/* ---------- Islands ---------- */

.island {
  position: relative;
  background: var(--soil);
  color: var(--on-soil);
  padding: clamp(22px, 3vw, 36px);
  margin-top: 14px;
  margin-bottom: var(--under-h, 72px);
}
/* Grass lip: a textured strip with pixel drips, generated in site.js. */
.island::before {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 100%;
  height: 14px;
  background: var(--tex-grass, var(--grass)) 0 0 / 32px 14px repeat-x;
  image-rendering: pixelated;
}
.island::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: 14px;
  background: var(--tex-grass-drip, transparent) 0 0 / 32px 14px repeat-x;
  image-rendering: pixelated;
  pointer-events: none;
}
.island__under {
  position: absolute; left: 0; top: 100%;
  width: 100%; height: var(--under-h, 72px);
  image-rendering: pixelated;
  pointer-events: none;
}
.island p + p { margin-top: 0.8em; }
.island code { background: rgb(0 0 0 / 0.35); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--font-pixel); font-weight: 600; font-size: 1.05rem;
  color: var(--ink);
  background: var(--prismarine);
  padding: 0.6em 1em 0.7em;
  text-decoration: none;
  box-shadow:
    inset 0 3px 0 rgb(255 255 255 / 0.4),
    inset 0 -5px 0 var(--prismarine-dark),
    0 8px 18px -8px rgb(0 0 0 / 0.55);
  transition: filter 100ms var(--step), translate 100ms var(--step);
}
.btn--ghost {
  background: rgb(255 255 255 / 0.08);
  color: var(--prismarine-light);
  box-shadow: inset 0 0 0 2px rgb(143 240 228 / 0.55);
}
a:hover > .btn, .btn:hover { filter: brightness(1.12); translate: 0 -2px; }

/* ---------- Lobby (first viewport) ---------- */

.lobby { position: relative; }

.lobby__scene {
  position: relative;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  container-type: size;
  /* Cover geometry for a 1920x1057 image, so portals land on the real arches.
     --px/--py match the image's object-position. */
  --px: 0.1;
  --py: 0.5;
  --iw: max(100cqw, 100cqh * 1.81646);
  --ih: calc(var(--iw) / 1.81646);
  --il: calc((100cqw - var(--iw)) * var(--px));
  --it: calc((100cqh - var(--ih)) * var(--py));
  --s: calc(var(--iw) / 1920);
  background: #6d6a73;
}
.lobby__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 10% 50%;
}

.portal {
  position: absolute;
  left: calc(var(--il) + var(--x) * var(--s));
  top: calc(var(--it) + var(--y) * var(--s));
  width: calc(var(--w) * var(--s));
  height: calc(var(--h) * var(--s));
  text-decoration: none;
  outline-offset: 6px;
}
.portal__swirl {
  position: absolute;
  left: calc(var(--dx) * var(--s));
  top: calc(var(--dy) * var(--s));
  width: calc(var(--dw) * var(--s));
  height: calc(var(--dh) * var(--s));
  opacity: 0.3;
  image-rendering: pixelated;
  transition: opacity 200ms var(--step);
}
.portal:hover .portal__swirl,
.portal:focus-visible .portal__swirl { opacity: 0.92; }
.portal__label {
  /* Nametags stand on the doorway's threshold. */
  position: absolute; left: 50%; top: calc(100% - 10px);
  translate: -50% 0;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: translate 160ms var(--step);
}
.portal__label .tag:first-child { font-size: 1.05rem; font-weight: 600; }
.portal:hover .portal__label, .portal:focus-visible .portal__label { translate: -50% -4px; }
.portal:hover .portal__label .tag:first-child,
.portal:focus-visible .portal__label .tag:first-child { color: var(--torch); background: var(--tag-bg-hover); }
@media (max-height: 760px) { .portal__label .tag--cmd { display: none; } }

/* The same cover geometry as the scene, from viewport units, so the address
   plate outside the scene's container can find the path between the arches
   (x 1010 in the 1920-wide original). */
.lobby {
  position: relative;
  --piw: max(100vw, max(100svh, 600px) * 1.81646);
  --path-x: calc((100vw - var(--piw)) * 0.1 + 1010 * var(--piw) / 1920);
  --plate-w: min(500px, 40vw);
  --ground: clamp(16px, 3svh, 32px);
}

.lobby__brand {
  position: absolute;
  left: var(--gutter);
  bottom: var(--ground);       /* plus the island's own margin for its underside */
  width: min(390px, 30vw);
  padding: 22px 26px 24px;
}
.lobby__brand h1 {
  font-size: clamp(2.3rem, 3.4vw, 3.4rem);
  color: var(--white);
  text-transform: uppercase;
}
.splash {
  position: absolute;
  right: -0.8em; top: -0.4em;
  rotate: -14deg;
  font-family: var(--font-pixel); font-weight: 600;
  font-size: clamp(0.85rem, 1vw, 1rem);
  color: var(--splash);
  text-shadow: 2px 2px 0 #3f3f15;
  background: none; border: 0; padding: 4px; cursor: pointer;
  white-space: nowrap;
  animation: splash 0.6s steps(3, jump-none) infinite alternate;
  transform-origin: center;
}
@keyframes splash { to { scale: 1.08; } }
.lobby__offer {
  margin-top: 12px;
  color: var(--on-soil-soft);
  font-size: 1rem;
}

.lobby__path {
  position: absolute;
  bottom: var(--ground);
  width: var(--plate-w);
  left: clamp(var(--gutter), calc(var(--path-x) - var(--plate-w) / 2), calc(100vw - var(--plate-w) - var(--gutter)));
}

.address {
  display: flex; align-items: stretch; width: 100%;
  border: 0; padding: 0; cursor: pointer;
  font: inherit; text-align: left;
  background: var(--prismarine);
  color: var(--ink);
  box-shadow:
    inset 0 4px 0 rgb(255 255 255 / 0.45),
    inset 0 -6px 0 var(--prismarine-dark),
    0 14px 26px -10px rgb(0 0 0 / 0.6);
  transition: filter 100ms var(--step), translate 100ms var(--step);
}
.address:hover { filter: brightness(1.08); translate: 0 -2px; }
.address:active { translate: 0 1px; filter: brightness(0.96); }
.address__host {
  flex: 1;
  padding: 0.5em 0.7em 0.6em;
  font-family: var(--font-pixel); font-weight: 700;
  font-size: clamp(1.15rem, 1.7vw, 1.6rem);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.address__action {
  display: flex; align-items: center; gap: 0.4em;
  padding: 0 0.9em;
  background: rgb(0 0 0 / 0.16);
  font-family: var(--font-pixel); font-weight: 600;
  box-shadow: inset 3px 0 0 rgb(0 0 0 / 0.12);
}
.address.is-copied .address__action { background: var(--ink); color: var(--prismarine-light); }

/* Live count and version line: in-world nametags under the plate. */
.join-plate__row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
/* These tags sit over bright screenshots (the lobby path, the lava), so they
   get a darker plate than nametags on the sky. */
.join-plate__row .tag { background: rgb(0 0 0 / 0.74); }
.join-plate__meta { font-size: 0.85rem; }
.live { color: var(--torch); font-weight: 600; font-variant-numeric: tabular-nums; }
.live__dot {
  width: 9px; height: 9px; background: var(--torch); flex: none;
  animation: blink 1.2s steps(2, jump-none) infinite;
}
.live.is-off { color: #d9cfe0; }
.live.is-off .live__dot { background: #8a7a6c; animation: none; }
@keyframes blink { 50% { opacity: 0.35; } }

/* Below 1000px the scene gets shorter and the brand and plate stack under it. */
@media (max-width: 999px) {
  .lobby__scene { height: 58svh; min-height: 380px; --px: 0.55; }
  .lobby__img { object-position: 55% 50%; }
  .lobby__brand, .lobby__path { position: relative; left: auto; bottom: auto; width: auto; margin-inline: var(--gutter); }
  .lobby__brand { margin-top: 28px; }
  .lobby__path { max-width: 560px; }
}
@media (max-width: 700px) {
  .lobby__scene { height: 50svh; min-height: 340px; }
  .portal__label .tag:first-child { font-size: 0.85rem; }
  .portal__label .tag--cmd { display: none; }
  .lobby__brand { padding: 20px; }
  .lobby__brand h1 { font-size: 2.5rem; }
  .splash { position: static; display: block; margin: 8px 0 0 -4px; rotate: -3deg; }
}

/* ---------- Bands (sections on the open sky) ---------- */

.band { position: relative; padding: clamp(80px, 12vw, 160px) 0 clamp(40px, 6vw, 80px); }
.band__inner { width: min(1240px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.band h2 { color: var(--ink); }
.band--crew h2, .band--galaxy h2, .band--crew .crew__head p, .band--galaxy p { color: var(--white); }

/* Join */
.join {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-areas: "head shot" "panel shot";
  column-gap: clamp(24px, 5vw, 72px);
  align-items: start;
}
.join__head { grid-area: head; }
.join__head p { margin-top: 14px; font-size: 1.2rem; color: var(--ink-soft); max-width: 36ch; }
.island--join { grid-area: panel; margin-top: 40px; }
.join__shot { grid-area: shot; align-self: center; }

.edition { display: flex; gap: 6px; margin-bottom: 22px; }
.edition__tab {
  font-family: var(--font-pixel); font-weight: 600; font-size: 1rem;
  border: 0; cursor: pointer;
  padding: 0.5em 0.9em 0.6em;
  background: rgb(255 255 255 / 0.06);
  color: var(--on-soil-soft);
  box-shadow: inset 0 -3px 0 rgb(0 0 0 / 0.3);
}
.edition__tab:hover { color: var(--on-soil); background: rgb(255 255 255 / 0.1); }
.edition__tab[aria-selected="true"] {
  background: var(--grass);
  color: #0f1a07;
  box-shadow: inset 0 3px 0 rgb(255 255 255 / 0.3), inset 0 -4px 0 var(--grass-dark);
}

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 3.1rem;
  min-height: 2.2rem;
  max-width: 58ch;
}
.steps li + li { margin-top: 18px; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -0.1rem;
  width: 2.2rem; height: 2.2rem;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.1rem;
  background: var(--torch); color: var(--ink);
  box-shadow: inset 0 3px 0 rgb(255 255 255 / 0.45), inset 0 -4px 0 #b8861a;
}
.steps strong { color: var(--on-soil); font-weight: 600; }
.inline-copy {
  font: inherit; font-family: var(--font-pixel); font-weight: 700;
  color: var(--prismarine-light);
  background: rgb(0 0 0 / 0.35);
  border: 0; padding: 0.05em 0.4em 0.12em; cursor: pointer;
  text-decoration: underline dotted 2px; text-underline-offset: 0.25em;
}
.inline-copy:hover { color: var(--ink); background: var(--prismarine); }
.note { margin-top: 22px; color: var(--on-soil-soft); font-size: 0.97rem; max-width: 58ch; }
.note a { color: var(--prismarine-light); }

.shot { margin: 0; position: relative; }
.shot img { box-shadow: 0 30px 50px -24px rgb(21 17 42 / 0.6); border: 6px solid var(--obsidian); }
.shot--tilt { rotate: 3deg; }
.shot figcaption { position: absolute; left: 16px; bottom: -16px; rotate: -3deg; }

@media (max-width: 900px) {
  .join { grid-template-columns: 1fr; grid-template-areas: "head" "panel" "shot"; }
  .join__shot { max-width: 520px; margin: 24px auto 0; }
}

/* ---------- Worlds ---------- */

.worlds__title { margin-bottom: clamp(40px, 6vw, 80px); }

.world {
  position: relative;
  width: min(1320px, 100% - 2 * var(--gutter));
  margin: 0 auto clamp(90px, 12vw, 170px);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: center;
}
.world__view { grid-column: 1 / span 8; grid-row: 1; margin: 0; }
.world__text { grid-column: 8 / span 5; grid-row: 1; z-index: 1; margin-block: 60px var(--under-h); }
.world--classic .world__view { grid-column: 5 / span 8; }
.world--classic .world__text { grid-column: 1 / span 5; }
.world__text--wide { grid-column: 3 / span 8 !important; }
.world--lobby { margin-bottom: 0; }

.world__text h3 { color: var(--white); margin-bottom: 16px; }
.world__text > p:not(.world__cmd) { color: var(--on-soil-soft); max-width: 46ch; }
.world__cmd { margin-top: 20px; font-size: 1.2rem; }
.world__text .btn { margin-top: 22px; }

/* A world's picture sits inside an obsidian portal frame. */
.portal-frame {
  position: relative;
  padding: clamp(10px, 1.4vw, 18px);
  background: var(--tex-obsidian, var(--obsidian)) 0 0 / 24px 24px;
  image-rendering: auto;
  box-shadow: 0 34px 60px -30px rgb(21 17 42 / 0.7);
}
.portal-frame img {
  width: 100%;
  box-shadow: 0 0 0 3px var(--amethyst), 0 0 0 7px rgb(155 92 242 / 0.25);
}

@media (max-width: 900px) {
  .world { display: block; }
  .world__text, .world__text--wide { margin: -40px 12px var(--under-h); }
}

/* ---------- Crew ---------- */

.crew__head { max-width: 60ch; margin-bottom: clamp(60px, 9vw, 110px); }
.crew__head p { margin-top: 14px; font-size: 1.2rem; }
.island--ledge { padding: 0; height: 30px; margin-top: 0; --under-h: 110px; }
.crew {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 3vw, 40px);
  /* Feet on the grass lip of the ledge below. */
  margin-bottom: -2px;
  align-items: end;
}
.player { display: flex; flex-direction: column; align-items: center; }
.player img { width: min(100%, 220px); transition: translate 200ms var(--step); }
.player:hover img { translate: 0 -8px; }
/* Idle bob, a pixel at a time, each player slightly out of step. */
.player img { animation: idle 2.4s steps(2, jump-none) infinite; }
.player:nth-child(2) img { animation-delay: -0.6s; }
.player:nth-child(3) img { animation-delay: -1.3s; }
.player:nth-child(4) img { animation-delay: -1.9s; }
@keyframes idle { 50% { transform: translateY(-3px); } }
.nametag {
  font-family: var(--font-pixel); font-weight: 500;
  font-size: clamp(0.8rem, 1.3vw, 1rem);
  color: var(--white);
  background: var(--tag-bg);
  padding: 0.25em 0.6em 0.35em;
  margin-bottom: 10px;
  text-align: center;
  white-space: nowrap;
}
.rank { font-weight: 700; margin-right: 0.2em; }
.rank::before { content: "["; }
.rank::after { content: "]"; }
.rank--pwner { color: #ff5555; }
.rank--enforcer { color: #55ffff; }
.rank--drunk { color: #ffaa00; }
.player--drunk .nametag { animation: sway 3.2s steps(8, jump-none) infinite; transform-origin: 50% 120%; }
@keyframes sway { 0%, 100% { rotate: -4deg; } 50% { rotate: 5deg; } }

@media (max-width: 700px) {
  .crew { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
  /* Two rows on a phone: the top pair gets its own strip of grass to stand on. */
  .player:nth-child(-n+2)::after {
    content: ""; align-self: stretch; height: 12px; margin-top: -2px;
    background: var(--tex-grass, var(--grass)) 0 0 / 32px 14px repeat-x;
    image-rendering: pixelated;
  }
  .nametag { white-space: normal; }
}

/* ---------- More of the galaxy ---------- */

.band--galaxy h2 { margin-bottom: clamp(50px, 7vw, 90px); }
.archipelago {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 30px clamp(20px, 3vw, 40px);
  align-items: start;
}
.isle { display: block; text-decoration: none; transition: translate 200ms var(--step); }
a.isle:hover { translate: 0 -6px; }
.isle h3 { color: var(--white); margin: 14px 0 12px; }
.isle p { color: var(--on-soil-soft); max-width: 44ch; }
.isle .btn { margin-top: 22px; }
.isle__icon { width: 44px; height: 44px; fill: var(--prismarine); }
.isle--discord { grid-column: 1 / span 7; grid-row: 1 / span 2; padding: clamp(30px, 4vw, 52px); --under-h: 120px; }
.isle--discord .isle__icon { width: 64px; height: 64px; fill: #b9a4ff; }
.isle--discord h3 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
.isle--discord p { font-size: 1.15rem; }
.isle--gg { grid-column: 8 / span 5; margin-top: 60px; }
.isle--store { grid-column: 9 / span 4; grid-row: 2; margin-top: 40px; }
.isle--vote { grid-column: 3 / span 4; grid-row: 3; margin-top: 10px; }
.isle--store, .isle--vote { --under-h: 56px; }
.isle--vote h3, .isle--store h3 { font-size: 1.5rem; }
.isle--vote .isle__icon, .isle--store .isle__icon { width: 34px; height: 34px; }
.isle__votes { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 22px; }
.isle .isle__votes .btn { margin-top: 0; }

@media (max-width: 1000px) {
  .isle--discord { grid-column: 1 / -1; grid-row: auto; }
  .isle--gg { grid-column: 1 / -1; margin-top: 0; }
  .isle--store { grid-column: 1 / span 6; grid-row: auto; margin-top: 0; }
  .isle--vote { grid-column: 7 / span 6; grid-row: auto; margin-top: 0; }
}
@media (max-width: 560px) {
  .isle--store, .isle--vote { grid-column: 1 / -1; }
}

/* ---------- Night (the close) ---------- */

.night {
  position: relative;
  min-height: 100svh;
  display: grid; align-items: end;
  overflow: hidden;
  color: var(--white);
}
.night__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 40%;
}
.night__content {
  position: relative;
  width: min(760px, 100% - 2 * var(--gutter));
  margin: 0 auto clamp(60px, 10vh, 120px);
  text-align: center;
}
.night h2 { font-size: clamp(2.4rem, 6vw, 4.8rem); }
.join-plate--night { margin: 32px auto 0; max-width: 560px; }
.join-plate--night .join-plate__row { justify-content: center; }

/* ---------- Footer ---------- */

.foot {
  background: #0a0918;
  color: #bdb6d6;
  padding: 56px var(--gutter) 40px;
  text-align: center;
  font-size: 0.95rem;
}
.foot__logo { width: min(300px, 70vw); margin: 0 auto 24px; opacity: 0.85; }
.foot p + p { margin-top: 10px; }
.foot strong { color: var(--white); font-weight: 600; }
.foot__links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.foot__links a { color: var(--prismarine-light); }
.foot__legal { font-size: 0.85rem; color: #8f88aa; }

/* ---------- Toast and warp ---------- */

.toast {
  position: fixed; right: 16px; top: 72px; z-index: 90;
  display: flex; align-items: center; gap: 14px;
  min-width: 250px;
  padding: 12px 18px 12px 14px;
  background: #212121;
  color: var(--white);
  box-shadow: inset 0 0 0 2px #555, inset 0 0 0 4px #151515, 0 16px 30px -12px rgb(0 0 0 / 0.6);
  font-family: var(--font-pixel);
  animation: toast-in 260ms steps(5, end);
}
.toast[hidden] { display: none; }
.toast__icon { width: 30px; height: 30px; fill: var(--prismarine); flex: none; }
.toast p { display: flex; flex-direction: column; }
.toast__title { color: var(--splash); font-weight: 600; }
.toast__body { font-weight: 500; }
@keyframes toast-in { from { translate: 110% 0; } }

.warp {
  position: fixed; inset: 0; z-index: 100;
  width: 100%; height: 100%;
  pointer-events: none;
  image-rendering: pixelated;
}

@media (max-width: 700px) {
  .sky__sun, .sky__moon { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
