/* gemstroids.com: the game's own interface on the web.
   Kit pieces (img/kit/*.png) are 9-slices from the game's Assets/Sprites/UI/kit, sliced with the
   margins UIStyle uses (see img/kit/kit.json in the source tree). Colours are UIStyle's palette. */

/* Nunito (SIL OFL 1.1, fonts/OFL-Nunito.txt), variable weight; one file per script */
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("/fonts/nunito-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("/fonts/nunito-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-052F, U+1C80-1C8A, U+20B4, U+2116, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("/fonts/nunito-latin.woff2") format("woff2");
  unicode-range: U+0000-024F, U+02BB-02BC, U+02C6-02C7, U+02D8-02DD, U+0300-0308, U+030A-030C, U+0326-0329, U+1E9E, U+2000-206F, U+20AC, U+20B5, U+2122, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito Fallback";
  src: local("Arial"), local("ArialMT"), local("Helvetica"), local("Liberation Sans");
  size-adjust: 101.74%;
  ascent-override: 99.37%;
  descent-override: 34.69%;
  line-gap-override: 0%;
}

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
  --navy: #140f29;            /* the art's outline (UIStyle.C_OUTLINE) */
  --space: #14102a;
  --space-2: #1c1642;
  --deep: #0d0b20;
  --glass: rgba(20, 16, 42, 0.9);
  --text: #f2f5ff;
  --text-med: #c7d0ea;
  --text-dim: #9aa3c4;
  --cyan: #59e0ff;
  --cyan-soft: #8fe9ff;
  --gold: #ffd940;
  --green: #5cf28c;
  --purple: #c08cff;
  --orange: #ffa448;
  --rim: #4c6cc4;
  --rim-dim: rgba(76, 108, 196, 0.38);
  --focus: #ffe673;
  --wrap: 1200px;
  --gut: 16px;
  --font: "Nunito", "Nunito Fallback", system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
  scrollbar-color: #4c6cc4 var(--deep);
}
@media (min-width: 700px) { :root { --gut: 24px; } }
@media (min-width: 1100px) { :root { --gut: 40px; } }

:lang(zh-CN) { --font: "Nunito", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
:lang(zh-TW) { --font: "Nunito", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif; }
:lang(ja) { --font: "Nunito", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif; }
:lang(ko) { --font: "Nunito", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; }
:lang(th) { --font: "Nunito", "Leelawadee UI", "Noto Sans Thai", "Tahoma", sans-serif; }
:lang(ja) { word-break: auto-phrase; line-break: strict; }
:lang(ko) { word-break: keep-all; }
:lang(zh-CN), :lang(zh-TW) { line-break: strict; }

/* ── Base ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 650;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--space);
  caret-color: var(--gold);
}
:lang(zh-CN) body, :lang(zh-TW) body, :lang(ja) body, :lang(ko) body { line-height: 1.75; }
img, video, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
:where(ul[role="list"], ol[role="list"]) { list-style: none; padding: 0; }
.nowrap { white-space: nowrap; }
a { color: var(--cyan-soft); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { color: #fff; }
::selection { background: var(--gold); color: var(--navy); -webkit-text-stroke: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 10px; }
button { font: inherit; color: inherit; }
.sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 1.35em; height: 1.35em; flex: none; color: #fff; }
.ico--big { width: 1.6em; height: 1.6em; }
.skip {
  position: absolute; left: var(--gut); top: -80px; z-index: 100;
  padding: 10px 18px; background: var(--gold); color: var(--navy); font-weight: 900;
  border-radius: 12px; text-decoration: none;
}
.skip:focus { top: 12px; }
.skip:hover { color: var(--navy); }

/* Lettering: heavy, with the art's navy outline and a soft drop (UIStyle.make_heading) */
.h1, .h2, .h3, .hero__tagline, .btn, .hud__pill b, .zone__name, .wave__title, .banner__title,
.upg__tab span, .final__release, .pin, .annot__n, .masthead h1 {
  -webkit-text-stroke: var(--ol, 0.16em) var(--navy);
  paint-order: stroke fill;
}
.h1 {
  font-weight: 950; font-size: clamp(2.6rem, 2rem + 3vw, 4.5rem); line-height: 1.02;
  color: var(--gold); text-shadow: 0 0.07em 0.05em rgba(0, 0, 0, 0.5); text-wrap: balance;
}
.h2 {
  font-weight: 950; font-size: clamp(2rem, 1.35rem + 2.2vw, 3.25rem); line-height: 1.08;
  color: var(--gold); text-shadow: 0 0.07em 0.05em rgba(0, 0, 0, 0.5);
  text-wrap: balance; margin-bottom: 0.45em; letter-spacing: -0.005em;
}
.h2--center { text-align: center; margin-inline: auto; max-width: 22ch; }
.h3 {
  --ol: 0.14em; font-weight: 900; font-size: clamp(1.35rem, 1.15rem + 0.7vw, 1.75rem); line-height: 1.15;
  color: #fff; text-shadow: 0 0.06em 0.04em rgba(0, 0, 0, 0.45); margin: 0 0 0.5em;
}
:lang(zh-CN) .h2, :lang(zh-TW) .h2, :lang(ja) .h2, :lang(ko) .h2, :lang(th) .h2 { --ol: 0.12em; }
.lead { font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.3rem); color: var(--text-med); max-width: 62ch; text-wrap: pretty; }
.lead--center { text-align: center; margin-inline: auto; }
.body { color: var(--text-med); max-width: 62ch; text-wrap: pretty; }
.body + .body { margin-top: 0.9em; }

/* ── Kit pieces ─────────────────────────────────────────────────────────── */
.btn {
  --ol: 0.2em;
  --face: url("/img/kit/btn_blue_normal.png");
  --face-hover: url("/img/kit/btn_blue_hover.png");
  --face-down: url("/img/kit/btn_blue_pressed.png");
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 64px; padding: 11px 28px 18px;
  border: 0 solid transparent;
  border-image: var(--face) 20 24 27 24 fill / 20px 24px 27px 24px;
  font: inherit; font-weight: 900; font-size: 1.125rem; line-height: 1.2; color: #fff;
  text-align: center; text-decoration: none; text-wrap: balance;
  border-radius: 20px; cursor: pointer;
  text-shadow: 0 2px 1px rgba(0, 0, 0, 0.35);
  transition: transform 0.12s var(--ease);
}
.btn::after { /* fetches the other faces early, so the first hover does not flash */
  content: ""; position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none;
  background-image: var(--face-hover), var(--face-down);
}
.btn:hover { border-image-source: var(--face-hover); color: #fff; }
.btn:active { border-image-source: var(--face-down); padding-top: 16px; padding-bottom: 13px; }
.btn:focus-visible { outline-offset: 4px; border-radius: 20px; }
.btn--green { --face: url("/img/kit/btn_green_normal.png"); --face-hover: url("/img/kit/btn_green_hover.png"); --face-down: url("/img/kit/btn_green_pressed.png"); }
.btn--orange { --face: url("/img/kit/btn_orange_normal.png"); --face-hover: url("/img/kit/btn_orange_hover.png"); --face-down: url("/img/kit/btn_orange_pressed.png"); }
.btn--navy { --face: url("/img/kit/btn_navy_normal.png"); --face-hover: url("/img/kit/btn_navy_hover.png"); --face-down: url("/img/kit/btn_navy_pressed.png"); }
.btn--big {
  --cta-box: calc(100vw - 2 * var(--gut) - 96px);   /* the text's room in the hero panel */
  min-height: 76px; padding: 13px 34px 21px;
  font-size: clamp(0.875rem, calc(var(--cta-box) / var(--fit, 12)), clamp(1.2rem, 1.1rem + 0.45vw, 1.5rem));
}
.btn--big:active { padding-top: 18px; padding-bottom: 16px; }
/* Wishlist buttons stay on one line in every language: build.py measures each label in Nunito
   Black (fit-N: it needs N em) and the text takes the size at which N em fill the button's room,
   never above the usual size nor below 0.875rem. */
.fit-4 { --fit: 4; } .fit-5 { --fit: 5; } .fit-6 { --fit: 6; } .fit-7 { --fit: 7; } .fit-8 { --fit: 8; }
.fit-9 { --fit: 9; } .fit-10 { --fit: 10; } .fit-11 { --fit: 11; } .fit-12 { --fit: 12; }
.fit-13 { --fit: 13; } .fit-14 { --fit: 14; } .fit-15 { --fit: 15; } .fit-16 { --fit: 16; }
.fit-17 { --fit: 17; } .fit-18 { --fit: 18; } .fit-19 { --fit: 19; } .fit-20 { --fit: 20; }
.fit-21 { --fit: 21; } .fit-22 { --fit: 22; }
@media (max-width: 699px) {   /* tight rooms: a touch of tracking (the measure counts it) */
  .btn[class*="fit-"] { letter-spacing: -0.02em; }
  :is(:lang(zh-CN), :lang(zh-TW), :lang(ja), :lang(ko), :lang(th)) .btn[class*="fit-"] { letter-spacing: 0; }
}
@media (max-width: 479px) { .btn--big { --cta-box: calc(100vw - 80px); } }
@media (min-width: 1025px) { .btn--big { --cta-box: 432px; } }
/* in the hero the room is the panel's own width (beside the HUD it can be narrower than 560 px) */
.hero__panel { container-type: inline-size; }
.hero__panel .btn { --cta-box: calc(100cqi - 48px); }
@media (max-width: 479px) { .hero__panel .btn { --cta-box: calc(100cqi - 24px); } }
.btn--small {
  min-height: 46px; padding: 6px 18px 11px; font-size: 1rem; --ol: 0.18em;
  border-image-width: 14px 17px 19px 17px;
}
.btn--small:active { padding-top: 9px; padding-bottom: 8px; }

/* round glossy icon button (pause, viewer arrows) */
.rbtn {
  display: inline-grid; place-items: center; width: 50px; height: 50px; padding: 0 0 5px;
  border: 0 solid transparent; border-radius: 16px; cursor: pointer; color: #fff;
  border-image: url("/img/kit/btn_navy_normal.png") 20 24 27 24 fill / 14px 17px 19px 17px;
  background: none;
}
.rbtn:hover { border-image-source: url("/img/kit/btn_navy_hover.png"); }
.rbtn:active { border-image-source: url("/img/kit/btn_navy_pressed.png"); padding: 5px 0 0; }
.rbtn .ico { width: 24px; height: 24px; }
.rbtn[hidden] { display: none; }

.panel {
  border: 0 solid transparent;
  border-image: url("/img/kit/panel_blue.png") 30 30 33 30 fill / 30px 30px 33px 30px;
  padding: 26px 30px 32px;
}
.screen {
  --rim: url("/img/kit/panel_blue.png");
  border: 0 solid transparent;
  border-image: var(--rim) 30 30 33 30 fill / 30px 30px 33px 30px;
  padding: 10px 10px 13px;
}
.screen--cyan { --rim: url("/img/kit/panel_cyan.png"); }
.screen--gold { --rim: url("/img/kit/panel_gold.png"); }
.screen--purple { --rim: url("/img/kit/panel_purple.png"); }
.screen--green { --rim: url("/img/kit/panel_green.png"); }
.screen > video, .screen > img, .screen > a { border-radius: 16px; }

.pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 5px 18px 6px;
  border: 0 solid transparent;
  border-image: url("/img/kit/pill_blue.png") 19 20 19 20 fill / 19px 20px 19px 20px;
  font-weight: 800; font-size: 1rem; color: #fff;
}
.pill--gold { border-image-source: url("/img/kit/pill_gold.png"); }
.pill--cyan { border-image-source: url("/img/kit/pill_cyan.png"); }
.pill--green { border-image-source: url("/img/kit/pill_green.png"); }

/* ── Sticky bar ─────────────────────────────────────────────────────────── */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  background: #110e28;   /* opaque: no heading ghosts through it */
  box-shadow: 0 1px 0 var(--rim-dim), 0 10px 24px -8px rgba(0, 0, 0, 0.6);
  transform: translateY(-110%); visibility: hidden;
  transition: transform 0.35s var(--ease), visibility 0s linear 0.35s;
}
.is-stuck .bar { transform: none; visibility: visible; transition: transform 0.35s var(--ease); }
.bar__in {
  width: min(100% - 2 * var(--gut), var(--wrap)); margin-inline: auto;
  display: flex; align-items: center; gap: 16px; min-height: 66px;
}
.bar__logo img { width: auto; height: 40px; }
.bar__nav { display: none; gap: 4px; margin-left: auto; }
.bar__nav a {
  padding: 8px 12px; border-radius: 10px; color: var(--text-med); font-weight: 800;
  font-size: 0.95rem; text-decoration: none; white-space: nowrap;
}
.bar__nav a:hover { color: #fff; background: rgba(76, 108, 196, 0.25); }
.bar .motion { margin-left: auto; width: 46px; height: 46px; }
@media (min-width: 1000px) { .bar__nav { display: flex; } .bar__nav ~ .motion { margin-left: 0; } }
.bar .btn--small { white-space: nowrap; flex: none; }
@media (max-width: 479px) {
  /* the compact button's room: the width less the gutters, logo (87), pause (42), gaps, padding */
  .bar__in { gap: 8px; }
  .bar__logo img { height: 28px; }
  .bar .motion { width: 42px; height: 42px; }
  .bar .btn--small { padding-inline: 12px; font-size: clamp(0.75rem, calc((100vw - 201px) / var(--fit, 8)), 1rem); }
}
@media (max-width: 340px) {
  .bar__logo { display: none; }
  .bar .btn--small { font-size: clamp(0.75rem, calc((100vw - 106px) / var(--fit, 8)), 1rem); }
}

/* ── Hero: the field ───────────────────────────────────────────────────── */
.hero {
  position: relative; isolation: isolate;
  min-height: max(640px, 100vh);
  min-height: max(640px, 100svh);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "hud" "copy" "stage" "foot";
  grid-template-rows: auto auto minmax(300px, 1fr) auto;
  gap: 12px;
  padding: 12px var(--gut) 18px;
  background: #121a46 url("/img/backdrops/asteroid_belt-1024.webp") 50% 50% / cover no-repeat;
}
@media (min-width: 1025px) {
  .hero { background-image: url("/img/backdrops/asteroid_belt-1920.webp"); }
}
.hero__copy { grid-area: copy; position: relative; z-index: 4; display: grid; gap: 4px; justify-items: start; }
.hero__logo { width: min(100%, 420px); margin-left: -6px; }
.hero__logo img { width: 100%; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45)); }
.hero__panel {
  position: relative; display: grid; gap: 12px; justify-items: start; width: 100%;
  padding: 22px 24px 30px;
}
.hero__panel::before { /* the dark glass, a touch see-through so the field shows at the rim */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.94;
  border: 0 solid transparent;
  border-image: url("/img/kit/panel_gold.png") 30 30 33 30 fill / 30px 30px 33px 30px;
}
.hero__tagline {
  --ol: 0.17em;
  font-weight: 950; font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2.15rem); line-height: 1.12;
  color: #fff; text-wrap: balance; text-shadow: 0 0.07em 0.04em rgba(0, 0, 0, 0.5);
}
.hero__release { color: var(--cyan-soft); font-weight: 800; font-size: 1rem; line-height: 1.4; }
.hero__panel .btn { margin-top: 6px; width: 100%; padding-inline: 24px; }
/* Phones: a smaller logo and a tighter panel leave more of the field in view */
@media (max-width: 479px) {
  .hero { gap: 10px; padding-top: 10px; grid-template-rows: auto auto minmax(260px, 1fr) auto; }
  .hero__logo { width: min(100%, 330px); }
  .hero__tagline { font-size: clamp(1.3rem, 0.75rem + 2.8vw, 1.45rem); }
  .hero__panel { gap: 8px; padding: 16px 12px 20px; }
  .hero__tagline, .hero__release { padding-inline: 6px; }
  .hero__release { font-size: 0.92rem; }
  .hero__panel .btn { min-height: 62px; padding: 10px 12px 17px; }
  .hero__panel .btn:active { padding-top: 15px; padding-bottom: 12px; }
  .final .btn--big { padding-inline: 16px; }
}
/* Portrait: the backdrop's painted clouds frame the field (its middle is empty sky) */
@media (max-aspect-ratio: 4/5) {
  .hero { background-position: 4% 50%; }
}

.hud {
  grid-area: hud; position: relative; z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px;
}
.hud__pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 5px 16px 6px 12px;
  border: 0 solid transparent;
  border-image: url("/img/kit/pill_gold.png") 19 20 19 20 fill / 19px 20px 19px 20px;
  font-weight: 800; line-height: 1;
}
.hud__pill img { width: 30px; height: 30px; margin: -4px 0 -4px -4px; }
.hud__pill b {
  --ol: 0.22em; font-weight: 950; font-size: 1.3rem; color: var(--gold);
  font-variant-numeric: tabular-nums; min-width: 3.2ch;
}
.hud__pill--wave { border-image-source: url("/img/kit/pill_cyan.png"); color: var(--cyan-soft); font-size: 1rem; padding-inline: 16px; }
.hud__pill--credits { margin-right: auto; }
@media (max-width: 479px) {
  .hud { gap: 6px; flex-wrap: nowrap; }
  .hud__pill { padding-inline: 10px 12px; }
  .hud__pill b { font-size: 1.15rem; min-width: 2.6ch; }
  .hud__pill--wave { padding-inline: 12px; font-size: 0.92rem; white-space: nowrap; }
  .lang__btn { padding-inline: 11px 12px; }
  .lang__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .hud .motion { width: 46px; height: 46px; flex: none; }
  /* the menu opens under the whole HUD row, not off the screen's left edge */
  .hud .lang { position: static; }
  .hud .lang__list { left: 0; right: 0; width: auto; max-width: none; padding-inline: 12px; }
  .hud .lang__list a { padding-inline: 8px; white-space: normal; line-height: 1.3; }
}
.live-only { visibility: hidden; }
.is-live .live-only { visibility: visible; }

.lang { position: relative; }
.lang__btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 6px 16px 11px 12px;
  border: 0 solid transparent; border-radius: 14px;
  border-image: url("/img/kit/btn_navy_normal.png") 20 24 27 24 fill / 14px 17px 19px 17px;
  font-weight: 800; font-size: 0.98rem; color: #fff; cursor: pointer; list-style: none; white-space: nowrap;
}
.lang__btn::-webkit-details-marker { display: none; }
.lang__btn:hover { border-image-source: url("/img/kit/btn_navy_hover.png"); }
.lang__btn .ico { width: 22px; height: 22px; }
.lang[open] .lang__btn { border-image-source: url("/img/kit/btn_blue_normal.png"); }
.lang__list {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20;
  width: max-content; max-width: min(92vw, 420px); max-height: min(70vh, 520px); overflow: auto;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 6px;
  margin: 0; padding: 18px 18px 22px; list-style: none;
  border: 0 solid transparent;
  border-image: url("/img/kit/panel_blue.png") 30 30 33 30 fill / 30px 30px 33px 30px;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.7);
}
.lang__list a {
  display: block; padding: 7px 12px; border-radius: 10px; color: var(--text); font-weight: 750;
  text-decoration: none; white-space: nowrap;
}
.lang__list a:hover { background: rgba(92, 163, 250, 0.22); }
.lang__list a[aria-current] { background: rgba(255, 217, 64, 0.16); color: var(--gold); }

.hero__stage { grid-area: stage; position: relative; z-index: 2; min-height: 0; pointer-events: none; }
.field {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%;
  display: none; touch-action: pan-y pinch-zoom; -webkit-tap-highlight-color: transparent;
}
.hero__foot { grid-area: foot; position: relative; z-index: 4; display: grid; justify-items: start; align-self: end; }
/* how to steer, and the note that this is a toy, on one dark plate (readable over any cloud) */
.hero__status {
  display: grid; gap: 5px; max-width: min(100%, 620px);
  padding: 8px 16px 10px 9px; border-radius: 18px;
  background: rgba(13, 11, 32, 0.86);
  box-shadow: inset 0 0 0 2px var(--rim-dim), 0 10px 22px -10px rgba(0, 0, 0, 0.7);
}
.hero__line {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
  font-weight: 750; font-size: 0.95rem; line-height: 1.4; color: var(--text-med);
}
.hero__mode {
  display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px 4px;
  border-radius: 999px; background: rgba(89, 224, 255, 0.16); color: var(--cyan-soft); font-weight: 900;
}
.hero__mode::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 0 2px var(--navy);
}
.hero__mode.is-you { background: rgba(92, 242, 140, 0.18); color: var(--green); }
.hero__mode.is-you::before { background: var(--green); }
.hint--touch { display: none; }
@media (scripting: none) { .hero__foot { display: none; } }
@media (prefers-reduced-motion: reduce) { .hero:not(.is-live) .hero__foot { display: none; } }
.is-frozen .hero__foot { display: none; }
@media (hover: none) and (pointer: coarse) { .hint--pointer { display: none; } .hint--touch { display: inline; } }
.hero__note { font-size: 0.85rem; line-height: 1.4; color: var(--text-med); max-width: 60ch; padding-left: 3px; }
@media (max-width: 479px) {
  .hint__more { display: none; }   /* phones: only the instruction ("Tap the field to steer.") */
  .hero__status { padding: 7px 12px 9px 8px; border-radius: 16px; }
  .hero__line { font-size: 0.9rem; }
  .hero__note { font-size: 0.8rem; }
}

/* the wave banner (SessionHud's WAVE 2 + Field cleared!) */
.wave {
  position: absolute; z-index: 3; left: 50%; top: 52%; translate: -50% -50%;
  width: max-content; max-width: min(92vw, 560px);
  display: grid; justify-items: center; gap: 8px; pointer-events: none;
  opacity: 0; scale: 0.92;
  transition: opacity 0.25s ease-out, scale 0.5s var(--ease);
}
.wave.is-on { opacity: 1; scale: 1; }
.wave__title {
  --ol: 0.18em;
  padding: 10px 30px 16px; font-weight: 950; font-size: clamp(2rem, 1.4rem + 2.4vw, 3.4rem);
  line-height: 1; color: var(--gold); text-transform: uppercase; white-space: nowrap;
  border: 0 solid transparent;
  border-image: url("/img/kit/panel_gold.png") 30 30 33 30 fill / 22px 22px 25px 22px;
}
.wave__sub {
  padding: 5px 18px 7px; border: 0 solid transparent; text-align: center;
  border-image: url("/img/kit/pill_green.png") 19 20 19 20 fill / 19px 20px 19px 20px;
  font-weight: 900; color: #c9ffd9; font-size: 1rem; line-height: 1.4; max-width: 100%; text-wrap: balance;
}

/* Without motion or JavaScript: the field frozen, with labels */
.frozen { position: relative; display: grid; gap: 12px; }
.frozen__pic {
  position: relative; height: clamp(250px, 44svh, 360px); overflow: hidden;
  container-type: size; border-radius: 20px;
  box-shadow: 0 0 0 3px var(--navy), 0 0 0 5px rgba(89, 224, 255, 0.65), 0 14px 30px -10px rgba(0, 0, 0, 0.8);
}
.frozen__box, .annot {
  --W: max(100cqw, 100cqh * 2.3133);
  --H: calc(var(--W) / 2.3133);
  --L: max(calc(100cqw - var(--W)), calc(var(--W) * -0.25));
  --T: calc((100cqh - var(--H)) / 2);
}
.frozen__box { position: absolute; width: var(--W); height: var(--H); left: max(calc(100cqw - var(--W)), calc(50cqw - var(--W) * 0.5)); top: var(--T); }
.frozen__img { width: 100%; height: 100%; max-width: none; }
.pin, .annot__n {
  --ol: 0.3em;
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--gold); color: var(--navy); font-weight: 950; font-size: 0.95rem; line-height: 1;
  -webkit-text-stroke: 0; box-shadow: 0 0 0 3px var(--navy), 0 4px 8px rgba(0, 0, 0, 0.6);
}
.pin { position: absolute; left: calc(var(--px) * 100%); top: calc(var(--py) * 100%); translate: -50% -50%; }
.pin--ring, .annot--ring { --px: 0.6672; --py: 0.388; }
.pin--ship, .annot--ship { --px: 0.6146; --py: 0.6747; }
.pin--drones, .annot--drones { --px: 0.5927; --py: 0.8241; }
.pin--black_hole, .annot--black_hole { --px: 0.5; --py: 0.8313; }
.pin--comet, .annot--comet { --px: 0.3375; --py: 0.9373; }
.frozen__legend { display: grid; gap: 8px; }
.frozen__title { font-weight: 900; color: var(--gold); font-size: 1.05rem; text-shadow: 0 1px 3px #000; }
.annots { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.annot {
  display: flex; align-items: flex-start; gap: 10px; padding: 9px 14px 10px 9px; border-radius: 16px;
  background: rgba(13, 11, 32, 0.88); box-shadow: inset 0 0 0 2px var(--rim-dim);
  font-size: 0.95rem; line-height: 1.4; color: var(--text);
}
.annot__n { flex: none; width: 26px; height: 26px; font-size: 0.85rem; }

@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .frozen { display: none; }
  .field { display: block; }
}
.is-live .frozen { display: none; }
.is-live .field { display: block; }
.is-frozen .frozen { display: grid; }
.is-frozen .field { display: none; }

@media (min-width: 1025px) and (min-height: 600px) {
  .hero {
    grid-template-columns: minmax(0, 560px) 1fr auto;
    grid-template-rows: auto 1fr auto;
    grid-template-areas: "copy . hud" "copy . ." "foot foot foot";
    padding: 22px var(--gut) 26px;
    column-gap: 24px;
  }
  .hero__copy { align-self: start; gap: 8px; }
  .hero__logo { width: 100%; max-width: 540px; }
  @media (max-width: 1180px) {   /* a narrower copy column keeps the ship's spot in the open */
    .hero { grid-template-columns: minmax(0, 480px) 1fr auto; }
  }
  .hero__panel { padding: 26px 30px 34px; gap: 14px; }
  .hero__panel .btn { width: auto; min-width: 70%; }
  .hud { align-self: start; flex-wrap: nowrap; }
  .hud__pill--credits { margin-right: 0; }
  .hero__stage { position: absolute; inset: 0; z-index: 2; }

  /* the frozen frame fills the hero; labels stand next to their spots */
  .frozen { position: absolute; inset: 0; display: block; container-type: size; overflow: clip; }
  .is-frozen .frozen { display: block; }
  .frozen__pic { position: absolute; inset: 0; height: auto; container-type: normal; border-radius: 0; box-shadow: none; }
  .frozen__pic::after { /* keeps the copy's corner calm */
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(100deg, rgba(14, 12, 36, 0.78) 0%, rgba(14, 12, 36, 0.35) 34%, rgba(14, 12, 36, 0) 50%);
  }
  .frozen__box { left: var(--L); }
  .pin { display: none; }
  .frozen__legend { position: absolute; inset: 0; pointer-events: none; display: block; }
  .frozen__title {
    position: absolute; right: var(--gut); top: 92px; padding: 6px 16px 8px;
    border: 0 solid transparent;
    border-image: url("/img/kit/pill_gold.png") 19 20 19 20 fill / 19px 20px 19px 20px;
  }
  .annots { display: block; }
  .annot {
    position: absolute; width: max-content;
    /* never past the frame's right edge (the gutter kept): narrower labels wrap instead */
    max-width: min(260px, calc(100cqw - var(--gut) + 15px - var(--L) - var(--W) * var(--px)));
    left: calc(var(--L) + var(--W) * var(--px)); top: calc(var(--T) + var(--H) * var(--py));
    translate: -15px -15px; padding: 0; background: none; box-shadow: none;
    align-items: flex-start; gap: 10px;
  }
  .annot--black_hole { --px: 0.7604; --py: 0.4434; }
  .annot__text {
    padding: 8px 14px 9px; border-radius: 14px; background: rgba(13, 11, 32, 0.9);
    box-shadow: inset 0 0 0 2px rgba(255, 217, 64, 0.55), 0 8px 18px -6px rgba(0, 0, 0, 0.7);
  }
  .annot__n { width: 30px; height: 30px; font-size: 0.95rem; }
  .annot--comet, .annot--ring { translate: -15px calc(-100% + 15px); align-items: flex-end; }
  @container (max-width: 1180px) {
    /* the black hole sits near the right edge: its label goes under the pin, never toward the
       copy panel on the left */
    .annot--black_hole { flex-direction: column; gap: 6px; }
  }
  @container (max-aspect-ratio: 29 / 20) {
    /* a tall frame leaves little room right of the ring and the black hole: their labels open to
       the left instead, stopping short of the copy column (gutter + 560 px + 24 px gap) */
    .annot--ring, .annot--black_hole {
      flex-direction: row-reverse; gap: 10px;
      max-width: min(260px, calc(var(--L) + var(--W) * var(--px) + 15px - var(--gut) - 584px));
    }
    .annot--ring { translate: calc(-100% + 15px) calc(-100% + 15px); }
    .annot--black_hole { translate: calc(-100% + 15px) -15px; }
  }
  @container (max-aspect-ratio: 121 / 100) {
    .annot--black_hole { display: none; }   /* its spot is past the frame's right edge */
  }
}

/* ── Sections ───────────────────────────────────────────────────────────── */
.wrap { width: min(100% - 2 * var(--gut), var(--wrap)); margin-inline: auto; }
.sec {
  position: relative; isolation: isolate;
  padding-block: clamp(64px, 3rem + 4vw, 128px) clamp(24px, 1rem + 2vw, 56px);
  background-color: var(--space);
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='420' height='420'><g fill='#fff'><circle cx='50' cy='76' r='1.2' opacity='.75'/><circle cx='286' cy='34' r='.8' opacity='.6'/><circle cx='132' cy='302' r='.8' opacity='.55'/><circle cx='388' cy='388' r='.8' opacity='.5'/></g><circle cx='344' cy='269' r='1.4' fill='#c5dcff' opacity='.7'/><circle cx='218' cy='172' r='1.1' fill='#ffecbe' opacity='.6'/></svg>");
  background-size: 420px 420px;
}
.sec__bg, .final__bg {
  position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; max-width: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 82%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 82%, transparent 100%);
}
/* Go deeper and Warp sit in their zones: the Gas Giant and the Black Hole Rim */
.blk--deeper .sec__bg, .blk--warp .sec__bg { opacity: 0.8; }

/* Trailer */
.sec--trailer { padding-top: clamp(56px, 3rem + 3vw, 104px); }
.trailer { position: relative; max-width: 1100px; margin: 8px auto 0; }
.trailer__link { position: relative; display: block; overflow: hidden; border-radius: 16px; }
.trailer__poster { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: scale 0.6s var(--ease), filter 0.4s; }
.trailer__link:hover .trailer__poster { scale: 1.02; filter: brightness(1.08); }
.trailer__link::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(ellipse at 50% 55%, rgba(13, 11, 32, 0.15) 0%, rgba(13, 11, 32, 0.55) 100%);
}
.trailer__play { position: absolute; z-index: 2; left: 50%; top: 50%; translate: -50% -50%; pointer-events: none; white-space: nowrap; }
.trailer__link:hover .trailer__play { border-image-source: var(--face-hover); }
.trailer__link:active .trailer__play { border-image-source: var(--face-down); }
.trailer__link:focus-visible { outline-offset: 6px; }
.trailer video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 16px; }
.trailer__len { text-align: center; margin-top: 14px; color: var(--text-dim); font-weight: 800; font-size: 0.95rem; }

/* Clips */
.clip { position: relative; }
.clip__video { width: 100%; aspect-ratio: 16 / 9; height: auto; background: #0b0a1c; border-radius: 14px; }

/* Crack rocks: centred, the clip wide */
.blk--crack .clip { max-width: 1040px; margin: clamp(28px, 4vw, 48px) auto 0; }

/* Waves: the heading in the game's WAVE banner, overlapping the clip */
.blk__grid { display: grid; gap: 20px; }
.banner {
  position: relative; z-index: 2; padding: 26px 26px 32px;
  border: 0 solid transparent;
  border-image: url("/img/kit/panel_gold.png") 30 30 33 30 fill / 30px 30px 33px 30px;
}
.banner__title { color: var(--gold); }
.banner__title::after {
  content: ""; display: block; width: 64px; height: 6px; margin-top: 14px; border-radius: 3px;
  background: var(--green); box-shadow: 0 0 0 2px var(--navy);
}

/* Build: the upgrade screen. Each of the game's tabs over its own panel, cut from the store
   screenshots at their native size (img/build/<en|ru>/), so the in-game text stays readable:
   the skill tree's window, a talent card, the guns with their mastery stars, an artifact card. */
.blk__head { margin-bottom: clamp(24px, 3vw, 40px); }
.upg {
  display: grid; gap: 30px 24px; padding: 22px 16px 30px;
  border: 0 solid transparent;
  border-image: url("/img/kit/panel_blue.png") 30 30 33 30 fill / 30px 30px 33px 30px;
}
.upg__pane { display: grid; align-content: start; gap: 12px; min-width: 0; }
.upg__tab {
  display: inline-flex; align-items: center; gap: 10px; justify-self: start; margin: 0;
  padding: 5px 18px 11px 8px; min-height: 52px;
  border: 0 solid transparent;
  border-image: url("/img/kit/btn_navy_normal.png") 20 24 27 24 fill / 15px 18px 20px 18px;
}
.upg__tab img { width: 40px; height: 40px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5)); }
.upg__tab span { --ol: 0.2em; font-weight: 950; font-size: 1.15rem; color: #fff; line-height: 1.15; }
.upg__view { justify-self: start; max-width: 100%; }
.upg__shot { max-width: 100%; }
.upg__text { color: var(--text-med); font-size: 1rem; line-height: 1.5; max-width: 52ch; text-wrap: pretty; }
/* the skill tree: a window into the tree at the game's own scale (it scrolls in the game too) */
.upg__pane--skills .upg__view {
  justify-self: stretch; overflow: hidden; border-radius: 16px; background: #0b0a1c;
  box-shadow: 0 0 0 3px var(--navy), 0 0 0 5px rgba(89, 224, 255, 0.45), 0 14px 26px -12px rgba(0, 0, 0, 0.8);
}
.upg__pane--skills .upg__shot { width: 100%; height: 400px; object-fit: none; object-position: 50% 30%; }
/* the cards stand on the panel as they do in the game (cut out along their outline) */
.upg__pane--talent .upg__shot, .upg__pane--artifact .upg__shot { filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.45)); }
/* the guns: on a phone the first two (the Mining Laser with its stars, the next gun) */
.upg__pane--guns .upg__view { justify-self: stretch; }
.upg__pane--guns .upg__shot { width: 100%; aspect-ratio: 410 / 189; object-fit: cover; object-position: 0 0; }

/* Go deeper: five zones, stepping down */
.zones { display: grid; gap: 14px; margin: clamp(32px, 4vw, 56px) 0 0; padding: 0; list-style: none; }
.zone {
  --card: url("/img/kit/card_dim.png");
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "card name" "card gem";
  align-items: center; column-gap: 14px; row-gap: 4px; padding: 16px 18px 20px;
  border: 0 solid transparent;
  border-image: var(--card) 24 24 27 24 fill / 24px 24px 27px 24px;
  min-height: 112px;
}
.zone--d1 { --card: url("/img/kit/card_blue.png"); }
.zone--d2 { --card: url("/img/kit/card_orange.png"); }
.zone--d3 { --card: url("/img/kit/card_purple.png"); }
.zone--d4 { --card: url("/img/kit/card_gold.png"); }
.zone__bg {
  position: absolute; inset: 5px 5px 8px; z-index: -1; width: calc(100% - 10px); height: calc(100% - 13px);
  object-fit: cover; border-radius: 17px; max-width: none; opacity: 0.85;
}
.zone::before {
  content: ""; position: absolute; inset: 5px 5px 8px; z-index: -1; border-radius: 17px;
  background: linear-gradient(90deg, rgba(10, 9, 26, 0.72), rgba(10, 9, 26, 0.2));
}
.zone__card { grid-area: card; width: 76px; height: 76px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.55)); }
.zone__name { grid-area: name; --ol: 0.2em; font-weight: 950; font-size: 1.3rem; line-height: 1.1; color: #fff; text-shadow: 0 2px 2px rgba(0, 0, 0, 0.5); }
.zone__gem { grid-area: gem; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.zone__gems { display: flex; }
.zone__gems img { width: 30px; height: 30px; margin-right: -7px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.6)); }
.zone__gemname {
  padding: 2px 12px 3px; border-radius: 999px; background: rgba(13, 11, 32, 0.75);
  box-shadow: inset 0 0 0 2px rgba(89, 224, 255, 0.45); color: var(--cyan-soft); font-weight: 850; font-size: 0.9rem;
}
.zone--d4 .zone__gemname { box-shadow: inset 0 0 0 2px rgba(255, 217, 64, 0.6); color: var(--gold); }

/* Warp: one purple panel */
.warp {
  display: grid; gap: 24px; padding: 30px 22px 36px;
  border: 0 solid transparent;
  border-image: url("/img/kit/panel_purple.png") 30 30 33 30 fill / 30px 30px 33px 30px;
}

/* Features: the stat list of the ship panel */
.stats {
  display: grid; margin: clamp(24px, 3vw, 36px) 0 0; padding: 14px 22px 22px; list-style: none;
  border: 0 solid transparent;
  border-image: url("/img/kit/panel_blue.png") 30 30 33 30 fill / 30px 30px 33px 30px;
}
.stat {
  display: flex; align-items: center; gap: 14px; min-height: 62px; padding: 10px 4px;
  border-bottom: 1px solid var(--rim-dim); font-weight: 750; color: var(--text); line-height: 1.4;
}
.stat:last-child { border-bottom: 0; }
.stat img { width: 36px; height: 36px; flex: none; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5)); }

/* Screenshots */
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: clamp(20px, 3vw, 32px) 0 0; padding: 0; list-style: none; }
.shot a {
  display: block; padding: 5px 5px 8px; border: 0 solid transparent;
  border-image: url("/img/kit/card_blue.png") 24 24 27 24 fill / 24px 24px 27px 24px;
  transition: translate 0.3s var(--ease);
}
.shot a:hover { border-image-source: url("/img/kit/card_cyan.png"); translate: 0 -3px; }
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 15px; }
.shot--1, .shot--10, .shot--11 { grid-column: span 2; }

/* Final call */
.sec--final { padding-block: clamp(96px, 7rem + 4vw, 200px); background: #120f2c; }
.final__bg { opacity: 0.95; }
.final { display: grid; justify-items: center; gap: 14px; text-align: center; }
.final__logo { width: min(78vw, 400px); margin-bottom: 8px; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5)); }
.final .h2 { margin-bottom: 0; }
.final .lead { margin-bottom: 14px; }
.final__release { --ol: 0.16em; margin-top: 6px; font-weight: 900; color: #fff; font-size: 1.1rem; text-shadow: 0 2px 3px rgba(0, 0, 0, 0.5); }
.pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 4px 0 0; padding: 0; list-style: none; }

/* Footer */
.foot { background: var(--deep); padding: 56px 0 28px; box-shadow: inset 0 1px 0 var(--rim-dim); font-size: 0.95rem; }
.foot__grid { display: grid; gap: 32px; }
.foot__logo { width: 200px; margin-bottom: 12px; }
.foot__made { color: var(--text-med); font-weight: 750; }
.foot__h { font-size: 1rem; font-weight: 900; color: var(--text); margin: 0 0 6px; }
.foot__h a { color: var(--gold); }
.foot__text { color: var(--text-dim); line-height: 1.55; margin-bottom: 18px; max-width: 46ch; }
.foot__text + .foot__text { margin-top: -8px; }
.foot__langlist { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 2px 18px; margin: 0; padding: 0; list-style: none; }
.foot__langlist a { color: var(--text-med); text-decoration: none; font-weight: 700; padding: 3px 0; display: inline-block; }
.foot__langlist a:hover { color: #fff; text-decoration: underline; }
.foot__langlist a[aria-current] { color: var(--gold); }
.foot__end { display: flex; justify-content: flex-end; margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(76, 108, 196, 0.25); }
.foot__top { display: inline-flex; align-items: center; gap: 8px; font-weight: 850; color: var(--text-med); text-decoration: none; }
.foot__top .ico { width: 22px; height: 22px; }

/* Language suggestion (English root) */
.suggest {
  position: fixed; z-index: 60; left: 50%; bottom: 16px; translate: -50% 0;
  width: min(100% - 32px, 560px);
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 16px 20px 22px;
  border: 0 solid transparent;
  border-image: url("/img/kit/panel_cyan.png") 30 30 33 30 fill / 30px 30px 33px 30px;
  box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.8);
}
.suggest[hidden] { display: none; }
@media (min-width: 1025px) {   /* clear of the steering note at the bottom left */
  .suggest { left: auto; right: var(--gut); translate: none; }
}
.suggest p { flex: 1 1 240px; font-weight: 800; }
.suggest__actions { display: flex; gap: 8px; align-items: center; }
.suggest__no {
  background: none; border: 0; padding: 10px 12px; color: var(--text-med); font-weight: 800; cursor: pointer;
  text-decoration: underline; text-underline-offset: 0.2em; border-radius: 10px;
}

/* Screenshot viewer */
.viewer {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: transparent; color: #fff; overflow: hidden;
}
.viewer::backdrop { background: rgba(8, 7, 22, 0.94); }
.viewer[open] { display: grid; place-items: center; }
.viewer__frame { width: min(94vw, calc((100dvh - 150px) * 16 / 9), 1600px); }
.viewer__img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; border-radius: 14px; box-shadow: 0 0 0 3px var(--navy), 0 0 0 5px rgba(89, 224, 255, 0.6), 0 30px 60px -20px #000; }
.viewer__count { position: absolute; left: 50%; bottom: 22px; translate: -50% 0; font-weight: 900; color: var(--text-med); }
.viewer__prev, .viewer__next { position: absolute; top: 50%; translate: 0 -50%; }
.viewer__prev { left: 14px; }
.viewer__next { right: 14px; }
.viewer__close { position: absolute; top: 14px; right: 14px; }
@media (max-width: 700px) {
  .viewer__prev, .viewer__next { top: auto; bottom: 10px; translate: none; }
  .viewer__count { bottom: 24px; }
}

/* ── Wider layouts ──────────────────────────────────────────────────────── */
@media (min-width: 700px) {
  .upg { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "sk sk" "ta ar" "gu gu"; padding: 26px 24px 34px; }
  .upg__pane--skills { grid-area: sk; }
  .upg__pane--talent { grid-area: ta; }
  .upg__pane--artifact { grid-area: ar; }
  .upg__pane--guns { grid-area: gu; }
  .upg__pane--skills .upg__shot { height: 440px; }
  .upg__pane--guns .upg__view { justify-self: start; }
  .upg__pane--guns .upg__shot { width: auto; aspect-ratio: auto; }
  .shots { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .shot--1 { grid-column: span 2; grid-row: span 2; }
  .shot--10, .shot--11 { grid-column: span 2; }
  .foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zone--d4 { grid-column: 1 / -1; }
}
@media (min-width: 1000px) {
  .blk--waves .blk__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: center; gap: 0; }
  .blk--waves .blk__media { grid-column: 1 / span 7; grid-row: 1; }
  .blk--waves .banner { grid-column: 8 / -1; grid-row: 1; margin-left: -10px; padding: 34px 34px 40px; }
  /* a game screen: the skill tree on the left, the cards and the guns on the right */
  .upg {
    grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px 24px; padding: 30px 28px 38px;
    grid-template-areas: "sk sk sk sk sk sk ta ta ta ar ar ar" "sk sk sk sk sk sk gu gu gu gu gu gu";
  }
  .upg__pane--skills .upg__shot { height: 600px; object-fit: cover; object-position: 40% 0; }
  .blk__grid--deeper { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 40px; }
  .warp { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 36px; padding: 40px 40px 46px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; padding: 18px 32px 26px; }
  .stat:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
  .foot__grid { grid-template-columns: 1.1fr 1fr 1fr 1.2fr; }

  .zones { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; align-items: start; }
  .zone--d4 { grid-column: auto; }
  .zone {
    grid-template-columns: 1fr; grid-template-areas: "card" "name" "gem";
    justify-items: center; text-align: center; padding: 22px 14px 26px; row-gap: 10px;
    min-height: 0; height: calc(270px + var(--d) * 22px);
    align-content: start;
  }
  .zone--d0 { --d: 0; } .zone--d1 { --d: 1; } .zone--d2 { --d: 2; } .zone--d3 { --d: 3; } .zone--d4 { --d: 4; }
  .zone { margin-top: calc(var(--d) * 26px); }
  .zone::before { background: linear-gradient(180deg, rgba(10, 9, 26, 0.15), rgba(10, 9, 26, 0.75) 75%); }
  .zone__card { width: 96px; height: 96px; margin-top: calc(var(--d) * 8px); }
  .zone__name { font-size: 1.2rem; min-height: 2.3em; display: grid; place-items: center; }
  .zone__gem { flex-direction: column; justify-content: center; }
  .zone__gems { justify-content: center; }
  .zone__gems img { width: 34px; height: 34px; }
}
@media (min-width: 1200px) {
  .shots { gap: 16px; }
  .upg__pane--skills .upg__shot { height: auto; object-fit: fill; }   /* the whole cut, ~0.8 scale */
}

/* ── Press kit (Read mode) ──────────────────────────────────────────────── */
.masthead { position: relative; isolation: isolate; overflow: hidden; padding: 28px 0 56px; background: #12183e; }
.masthead__bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; max-width: none; opacity: 0.9; }
.masthead::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(14, 12, 36, 0.2), rgba(14, 12, 36, 0.75)); }
.masthead__in { display: grid; justify-items: start; gap: 12px; }
.masthead__logo img { width: clamp(220px, 30vw, 340px); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45)); }
.masthead__lead { max-width: 60ch; color: var(--text); font-size: 1.15rem; text-shadow: 0 1px 4px #000; }
.masthead__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.doc { display: grid; gap: 32px; padding-block: 48px 96px; }
.toc { font-weight: 800; }
.toc__h { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 8px; }
.toc__list { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.toc__list a { display: block; padding: 6px 12px; border-radius: 10px; color: var(--text-med); text-decoration: none; background: rgba(76, 108, 196, 0.14); }
.toc__list a:hover { color: #fff; background: rgba(76, 108, 196, 0.3); }
.doc__main { max-width: 72ch; }
.doc__sec { padding-top: 40px; }
.doc__sec + .doc__sec { border-top: 1px solid rgba(76, 108, 196, 0.25); margin-top: 40px; }
.doc__h { font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.5rem); }
.doc__main p { color: var(--text-med); margin-bottom: 1em; }
.doc__main .h3 { margin-top: 1.6em; }
.doc__short { font-size: 1.2rem; color: var(--text) !important; }
.doc__tag { font-weight: 900; color: var(--gold) !important; }
.doc__list { padding-left: 1.2em; color: var(--text-med); margin: 0 0 1em; }
.doc__list li { margin-bottom: 0.45em; }
.doc__list li::marker { color: var(--cyan); }
.facts {
  display: grid; margin: 0; padding: 14px 24px 22px;
  border: 0 solid transparent;
  border-image: url("/img/kit/panel_blue.png") 30 30 33 30 fill / 30px 30px 33px 30px;
}
.facts > div { display: grid; gap: 2px 20px; padding: 11px 0; border-bottom: 1px solid var(--rim-dim); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--text-dim); font-weight: 800; font-size: 0.95rem; }
.facts dd { color: var(--text); font-weight: 750; overflow-wrap: anywhere; }   /* the Steam URL on a phone */
.doc > * { min-width: 0; }
@media (min-width: 640px) { .facts > div { grid-template-columns: 13em 1fr; } }
.files { margin: 18px 0 8px; padding: 0; list-style: none; display: grid; gap: 8px; }
.files li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.files a { font-weight: 850; }
.files__meta { color: var(--text-dim); font-size: 0.9rem; font-weight: 700; }
.files--cols { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.page-press .trailer { margin: 20px 0 0; }
.pshots { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 14px; margin: 18px 0 22px; padding: 0; list-style: none; }
.pshots a { display: grid; gap: 6px; text-decoration: none; }
.pshots img { width: 100%; border-radius: 12px; box-shadow: 0 0 0 2px var(--rim-dim); }
.pshots a:hover img { box-shadow: 0 0 0 3px var(--cyan); }
.pshots--art img { aspect-ratio: auto; object-fit: contain; background: var(--deep); }
.assets { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); margin-top: 16px; }
.asset { display: grid; gap: 8px; align-content: start; padding: 18px; border-radius: 16px; text-decoration: none; background: rgba(76, 108, 196, 0.12); box-shadow: inset 0 0 0 2px var(--rim-dim); }
.asset--wide { grid-column: 1 / -1; }
@media (min-width: 440px) { .asset--wide { grid-column: span 2; } }
.asset img { width: 100%; max-height: 180px; object-fit: contain; }
@media (min-width: 1100px) {
  .doc { grid-template-columns: 220px minmax(0, 1fr); gap: 56px; }
  .toc { position: sticky; top: 24px; align-self: start; padding-top: 40px; }
  .toc__list { display: grid; gap: 2px; }
  .toc__list a { background: none; }
}

/* ── 404 ───────────────────────────────────────────────────────────────── */
.lost { position: relative; isolation: isolate; min-height: 100svh; display: grid; place-items: center; padding: 48px var(--gut); overflow: hidden; background: #150c2a; }
.lost__bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; max-width: none; }
.lost__in { display: grid; justify-items: center; gap: 16px; text-align: center; max-width: 640px; }
.lost__hole { width: clamp(160px, 30vw, 260px); }
.lost__langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin: 18px 0 0; padding: 0; list-style: none; font-weight: 750; }
.lost__langs a { color: var(--text-med); }
@media (prefers-reduced-motion: no-preference) {
  .lost__hole { animation: spin 40s linear infinite; }
  @keyframes spin { to { rotate: 1turn; } }
}

/* Motion off: no transitions that move things */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
.motion .motion__play { display: none; }
.is-paused .motion .motion__play { display: block; }
.is-paused .motion .motion__pause { display: none; }
