/* Self-hosted fonts (SIL OFL). latin + latin-ext covers English and Polish. */
@font-face { font-family: "Big Shoulders Display"; font-weight: 700 900; font-display: swap;
  src: url(fonts/bsd-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Big Shoulders Display"; font-weight: 700 900; font-display: swap;
  src: url(fonts/bsd-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-display: swap;
  src: url(fonts/ah-400-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-display: swap;
  src: url(fonts/ah-400-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-display: swap;
  src: url(fonts/ah-700-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-display: swap;
  src: url(fonts/ah-700-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF; }

/* Colours are taken from the game: sand floor, HUD panels, hazard paint, robot orange, enemy eyes. */
:root {
  --sand: #e6b677;
  --sand-deep: #cf9a58;
  --hud: #2b2723;
  --hud-deep: #211e1b;
  --hud-line: #463f38;
  --cream: #f3ebdd;
  --cream-dim: #cfc4b3;
  --hazard: #f2b705;
  --orange: #f39a3d;
  --eye: #e5392f;
  --steel-hi: #d9dde0;
  --steel: #a9b0b6;
  --steel-lo: #7d858c;

  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: 16px;
  --radius-panel: 10px;
  --radius-btn: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: clip;
  font: 400 1.0625rem/1.6 var(--body);
  background: var(--hud);
  color: var(--cream);
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.02; margin: 0 0 .5em; letter-spacing: .005em; }
h2 { font-size: clamp(2.4rem, 7vw, 4rem); }
h3 { font-size: clamp(1.6rem, 4vw, 2rem); }
p { margin: 0 0 1em; max-width: 68ch; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: .08em; }
:focus-visible { outline: 3px solid var(--focus, var(--hazard)); outline-offset: 3px; border-radius: 3px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 10; background: var(--hazard); color: var(--hud); padding: 8px 14px; font-weight: 700; }
.skip:focus { top: 8px; }

/* Placeholder marker, visible only while showTodos is true. */
.todo {
  display: inline-block; vertical-align: middle; margin-left: .4em;
  font: 700 .72rem/1 var(--body); letter-spacing: .04em;
  background: var(--eye); color: #fff; padding: .3em .45em; border-radius: 3px;
}

/* Hazard paint: the yellow and black stripes from the game's crates and booster chests. */
.hazard, .topbar::before, .footer::before {
  height: 14px;
  background: repeating-linear-gradient(-45deg, var(--hazard) 0 18px, var(--hud) 18px 36px);
}

/* ---------- top bar ---------- */
.topbar { background: var(--hud); position: relative; }
.topbar::before { content: ""; display: block; height: 8px; }
.topbar__row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; padding-top: 10px; padding-bottom: 10px; }
.topbar__name { font: 900 1.6rem/1 var(--display); text-decoration: none; color: var(--hazard); margin-right: auto; }
.topbar__lang { order: 2; font-weight: 700; padding: 6px 12px; border: 2px solid var(--hud-line); border-radius: var(--radius-btn); text-decoration: none; }
.topbar__lang:hover { border-color: var(--hazard); }
.topbar__nav { order: 3; width: 100%; display: flex; flex-wrap: wrap; gap: 2px 18px; padding: 4px 0; }
.topbar__nav a { text-decoration: none; color: var(--cream-dim); white-space: nowrap; }
.topbar__nav a:hover { color: var(--cream); text-decoration: underline; }
@media (min-width: 900px) {
  .topbar__nav { order: 1; width: auto; }
  .topbar__name { margin-right: 12px; }
  .topbar__nav { margin-right: auto; }
}

/* ---------- sections ---------- */
.dark { background: var(--hud); color: var(--cream); padding: 72px 0; --focus: var(--hazard); }
.sand { background: var(--sand); color: var(--hud); padding: 72px 0; --focus: var(--hud); }
.lead { font-size: 1.25rem; line-height: 1.55; }

/* ---------- hero ---------- */
.hero { background: var(--sand); color: var(--hud); --focus: var(--hud); }
.hero__grid { display: grid; gap: 32px; padding-top: 36px; padding-bottom: 44px; align-items: center; }
@media (min-width: 960px) {
  .hero__grid { grid-template-columns: 1fr 1fr; gap: 56px; padding-top: 64px; padding-bottom: 72px; }
}
.hero__text { container-type: inline-size; }
.hero__tagline { font-size: clamp(1.2rem, 2.6vw, 1.45rem); line-height: 1.45; max-width: 30ch; margin: 22px 0 26px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__media { margin: 0; }
.hero__shot {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border: 6px solid var(--hud); border-radius: var(--radius-panel);
  box-shadow: 0 18px 0 -6px var(--sand-deep);
  transform: rotate(.6deg);
}

/* The name plate: a riveted, brushed steel tag like the ones bolted to the machines. Edit the
   name in site.config.json; long names shrink through the clamp and wrap if they must. */
.plate {
  position: relative; display: inline-block; margin: 0; max-width: 100%;
  padding: .2em .5em .14em;
  border-radius: 8px;
  background:
    radial-gradient(circle at 12px 12px, var(--steel-lo) 0 4px, transparent 5px),
    radial-gradient(circle at calc(100% - 12px) 12px, var(--steel-lo) 0 4px, transparent 5px),
    radial-gradient(circle at 12px calc(100% - 12px), var(--steel-lo) 0 4px, transparent 5px),
    radial-gradient(circle at calc(100% - 12px) calc(100% - 12px), var(--steel-lo) 0 4px, transparent 5px),
    repeating-linear-gradient(0deg, rgb(255 255 255 / .07) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, var(--steel-hi), var(--steel));
  border: 3px solid var(--hud);
  box-shadow: inset 0 -4px 0 rgb(0 0 0 / .14), 0 6px 0 var(--hud);
}
.plate__name {
  display: block;
  /* --plate-fit is set by build.mjs from the name's length, so any name fits on one line. */
  font: 900 clamp(2.4rem, var(--plate-fit, 18cqi), 8.5rem)/.9 var(--display);
  text-transform: uppercase; letter-spacing: .02em;
  color: var(--hud);
  text-shadow: 0 2px 0 rgb(255 255 255 / .55), 0 -1px 0 rgb(0 0 0 / .25);
  overflow-wrap: anywhere;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; min-height: 52px; padding: 12px 22px;
  font: 800 1.35rem/1 var(--display); letter-spacing: .02em;
  text-decoration: none; border-radius: var(--radius-btn);
  border: 3px solid var(--hud); box-shadow: 0 5px 0 var(--hud);
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--hud); }
.btn--go { background: var(--hazard); color: var(--hud); }
.btn--go:hover { background: #ffc61a; }
.btn--steel { background: var(--hud); color: var(--cream); }
.btn--steel:hover { background: #3a342f; }

/* ---------- game features ---------- */
#game h2 { color: var(--hazard); }
.features { display: grid; gap: 20px; margin: 40px 0 28px; }
@media (min-width: 900px) { .features { grid-template-columns: 1fr 1fr; gap: 24px; } }
.panel { background: var(--hud-deep); border: 1px solid var(--hud-line); border-radius: var(--radius-panel); padding: 24px 22px; }
.panel h3 { color: var(--cream); }
.panel p { color: var(--cream-dim); }
.panel__note { font-size: .95rem; margin: 14px 0 0; }

.robots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 18px 0 0; }
.robots__item { border-left: 3px solid var(--orange); padding-left: 10px; }
.robots dt { font: 800 1.35rem/1.1 var(--display); color: var(--orange); }
.robots dd { margin: 0; font-size: .95rem; color: var(--cream-dim); }

.bosses { list-style: none; margin: 18px 0 0; padding: 0; }
.bosses__item { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--hud-line); }
.bosses__item:last-child { border-bottom: 1px solid var(--hud-line); }
.bosses__name { font: 800 1.3rem/1.15 var(--display); }
.bosses__zone { font-size: .9rem; padding-left: 16px; position: relative; color: var(--cream-dim); }
.bosses__zone::before { content: ""; position: absolute; left: 0; top: .35em; width: 10px; height: 10px; border-radius: 2px; background: var(--zone); }
.zone--scrap { --zone: #c0703a; }
.zone--cryo { --zone: #8fd3ef; }
.zone--toxic { --zone: #9ccc3d; }
.zone--foundry { --zone: #ff6a2b; }
.zone--storm { --zone: #f6d743; }
.zone--abyss { --zone: #a77ff0; }

.more { color: var(--cream-dim); margin: 0; }

/* ---------- gallery ---------- */
.gallery { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 720px) { .gallery { grid-template-columns: 1fr 1fr; } .gallery__item--big { grid-column: 1 / -1; } }
@media (min-width: 960px) {
  .gallery { grid-template-columns: 2fr 1fr; grid-auto-rows: auto; }
  .gallery__item--big { grid-column: 1; grid-row: span 3; }
}
.gallery__item a { display: block; border: 5px solid var(--hud); border-radius: var(--radius-panel); overflow: hidden; background: var(--hud); }
.gallery__item img { width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .25s; }
.gallery__item a:hover img { transform: scale(1.03); }
.gallery__item--big a { height: 100%; }
.gallery__item--big img { aspect-ratio: auto; }
.gallery__item--todo {
  grid-column: 1 / -1; display: grid; place-items: center; min-height: 160px;
  border: 3px dashed var(--hud); border-radius: var(--radius-panel); text-align: center; padding: 20px;
}
.gallery__item--todo p { margin: 0; font: 800 1.5rem/1.2 var(--display); }

/* ---------- why free ---------- */
.notice {
  max-width: 780px; margin: 0 auto;
  background: var(--cream); color: var(--hud); --focus: var(--hud);
  border-radius: var(--radius-panel); padding: 34px 24px 28px;
  border: 10px solid transparent;
  border-image: repeating-linear-gradient(-45deg, var(--hazard) 0 14px, var(--hud-deep) 14px 28px) 10;
}
@media (min-width: 720px) { .notice { padding: 48px 56px 40px; } }
.notice h3 { margin-top: 1.2em; }
.notice__big { font-size: clamp(1.35rem, 3.4vw, 1.7rem); line-height: 1.4; font-weight: 700; }
.notice__sign { font: 800 1.4rem/1 var(--display); margin: 1.4em 0 0; }

/* ---------- support ---------- */
.support { display: grid; gap: 36px; }
@media (min-width: 960px) { .support { grid-template-columns: 7fr 5fr; align-items: end; gap: 56px; } }
.support h3 { margin-top: 1.4em; }
.report { border-collapse: collapse; margin: 8px 0 16px; min-width: min(100%, 420px); }
.report caption { text-align: left; font-weight: 700; padding-bottom: 6px; }
.report th, .report td { text-align: left; padding: 8px 16px 8px 0; border-bottom: 2px solid var(--hud); }

.donate { display: grid; gap: 12px; }
.donate__btn {
  display: flex; flex-direction: column; gap: 2px; padding: 16px 20px; text-decoration: none;
  background: var(--hud); color: var(--cream); border-radius: var(--radius-btn);
  border: 3px solid var(--hud); box-shadow: 0 5px 0 #000;
}
a.donate__btn:hover { background: #3a342f; }
.donate__btn__name { font: 800 1.6rem/1.1 var(--display); color: var(--hazard); }
.donate__btn__note { font-size: .95rem; color: var(--cream-dim); }
.donate__btn--off { background: transparent; color: var(--hud); border-style: dashed; box-shadow: none; }
.donate__btn--off .donate__btn__name { color: var(--hud); }
.donate__btn--off .donate__btn__note { color: var(--hud); }

/* ---------- download + release sign-up ---------- */
#download h2 { color: var(--hazard); }
.download { display: grid; gap: 40px; }
@media (min-width: 960px) { .download { grid-template-columns: 5fr 6fr; gap: 64px; align-items: start; } }
.platforms { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.platforms__item { font: 800 1.35rem/1 var(--display); padding: 10px 14px; border: 2px solid var(--hud-line); border-radius: var(--radius-btn); }
.platforms__item a { text-decoration: none; color: var(--hazard); }
.notify { color: var(--cream); background: var(--hud-deep); border: 1px solid var(--hud-line); border-radius: var(--radius-panel); padding: 24px 22px; }
.notify p { color: var(--cream-dim); }
.notify fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.notify fieldset[disabled] { opacity: .55; }
.notify__label { display: block; font-weight: 700; margin-bottom: 6px; }
.notify__row { display: flex; flex-wrap: wrap; gap: 10px; }
.notify__email {
  flex: 1 1 220px; min-height: 52px; padding: 10px 14px; font: inherit; font-size: 1.05rem;
  color: var(--hud); background: var(--cream); border: 3px solid var(--hazard); border-radius: var(--radius-btn);
}
.notify .btn { border-color: var(--hazard); box-shadow: 0 5px 0 #000; }
.notify__consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; font-size: .95rem; color: var(--cream-dim); }
.notify__consent input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--hazard); }
.notify__consent a { color: var(--cream); }
.notify__todo { margin: 14px 0 0; font-weight: 700; color: var(--cream); }
/* Sign-up result: the function sends the browser back to #signup-ok / -invalid / -error. */
.notify__msg { display: none; margin: 14px 0 0; padding: 12px 14px; border-radius: 8px; font-weight: 700; color: var(--cream); background: rgb(0 0 0 / .3); border-left: 4px solid var(--hazard); scroll-margin-top: 180px; }
.notify__msg:target { display: block; }
.notify__msg--ok { border-left-color: #8bd450; }
.notify__msg--error, .notify__msg--invalid { border-left-color: #ff6b4a; }
.notify__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- faq ---------- */
.faq > * { max-width: 820px; }
.faq__item { border-top: 2px solid var(--hud); }
.faq__item:last-of-type { border-bottom: 2px solid var(--hud); }
.faq__item summary {
  cursor: pointer; list-style: none; padding: 18px 44px 18px 0; position: relative;
  font: 800 clamp(1.35rem, 3.6vw, 1.7rem)/1.15 var(--display);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  background: linear-gradient(var(--hud) 0 0) center / 100% 4px no-repeat, linear-gradient(var(--hud) 0 0) center / 4px 100% no-repeat;
  transition: transform .2s;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { margin: 0 0 20px; }
.page { min-height: 60vh; }
.page h1 { font-size: clamp(2.4rem, 7vw, 4rem); }
.policy .wrap > * { max-width: 760px; }
.policy h2 { font-size: clamp(1.7rem, 4.4vw, 2.3rem); margin-top: 1.4em; }
.policy ul { padding-left: 1.2em; max-width: 68ch; }
.policy li { margin-bottom: .4em; }
.policy__meta { font-weight: 700; }
.policy__draft { border-left: 6px solid var(--hud); padding: 10px 14px; background: rgb(255 255 255 / .25); }
.missing { font-weight: 700; }

/* ---------- footer ---------- */
.footer { background: var(--hud-deep); color: var(--cream-dim); }
.footer::before { content: ""; display: block; }
.footer__row { padding-top: 36px; padding-bottom: 40px; }
.footer__name { font: 900 2rem/1 var(--display); color: var(--cream); }
.footer__links { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer__small { font-size: .88rem; }

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

/* =====================================================================================
   v2: motion, cards, enemy decks, the card sphere, beta, links
   ===================================================================================== */

:root {
  --r-common: #b3b3ad; --r-uncommon: #59d959; --r-rare: #5999ff; --r-epic: #b866f2; --r-legendary: #ffc733; --r-mythic: #ff5c26;
  --plate: #28251f; --inset: #0f0e0d; --bar: #13120f;
}

/* ---------- top bar: the beta button ---------- */
.topbar { position: sticky; top: 0; z-index: 20; }
section[id] { scroll-margin-top: 64px; }
.topbar__beta {
  order: 2; font: 800 1.15rem/1 var(--display); text-decoration: none; color: var(--hud);
  background: var(--hazard); padding: 8px 14px; border-radius: var(--radius-btn); box-shadow: 0 3px 0 #000;
  transition: transform .12s;
}
.topbar__beta:hover { transform: translateY(-2px) rotate(-1.5deg); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero__grid { position: relative; z-index: 1; }
.hero__kicker {
  display: inline-block; margin: 0 0 18px; padding: 4px 10px; font: 800 1.05rem/1.2 var(--display);
  letter-spacing: .06em; text-transform: uppercase; background: var(--hud); color: var(--hazard); border-radius: 4px;
}
.hero__slogan { font: 800 1.5rem/1.1 var(--display); margin: -10px 0 26px; }
.plate { transform-origin: 20% 0; animation: plate-swing 7s ease-in-out infinite; }
@keyframes plate-swing { 0%, 100% { transform: rotate(-.6deg); } 50% { transform: rotate(.8deg); } }
.hero__media { position: relative; }
.hero__shot { animation: shot-bob 6s ease-in-out infinite; }
@keyframes shot-bob { 0%, 100% { transform: rotate(.6deg) translateY(0); } 50% { transform: rotate(-.4deg) translateY(-6px); } }
.sticker {
  position: absolute; left: -10px; top: -14px; z-index: 2; max-width: 70%;
  font: 800 1rem/1.15 var(--display); letter-spacing: .03em; text-transform: uppercase;
  background: var(--cream); color: var(--hud); padding: 8px 12px; border: 3px solid var(--hud);
  transform: rotate(-4deg); box-shadow: 0 4px 0 var(--hud);
}
.sticker::before { content: ""; position: absolute; left: 50%; top: -12px; width: 46px; height: 18px; margin-left: -23px; background: rgb(242 183 5 / .75); transform: rotate(3deg); }
.hero__nuts { position: absolute; inset: 0; pointer-events: none; }
.hero__nuts i {
  position: absolute; bottom: -40px; left: calc(var(--i) * 11% + 2%);
  width: calc(14px + var(--i) % 3 * 6px); aspect-ratio: 1;
  background: radial-gradient(circle, transparent 27%, #f2c230 29%, #d9a51e 70%);
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
  opacity: .55; animation: nut-rise calc(9s + var(--i) % 4 * 2s) linear infinite; animation-delay: calc(var(--i) * -1.7s);
}
@keyframes nut-rise { from { transform: translateY(0) rotate(0); } to { transform: translateY(-900px) rotate(540deg); } }

/* ---------- ticker ---------- */
.ticker {
  display: flex; overflow: hidden; background: var(--hud-deep); color: var(--cream);
  border-block: 3px solid var(--hazard); padding: 10px 0;
}
.ticker__track {
  flex: none; display: flex; margin: 0; padding: 0; list-style: none;
  animation: ticker 70s linear infinite;
}
.ticker:hover .ticker__track, .ticker:active .ticker__track { animation-play-state: paused; }
.ticker li { flex: none; padding: 0 1.6em; font: 800 1.2rem/1.2 var(--display); letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
.ticker li:not(.sr)::before { content: "◆"; color: var(--hazard); margin-right: 1.6em; }
@keyframes ticker { to { transform: translateX(-100%); } }

/* ---------- shared bits ---------- */
.kicker { display: inline-block; font: 800 1rem/1 var(--display); letter-spacing: .12em; text-transform: uppercase; margin: 0 0 10px; padding: 5px 9px; border: 2px solid currentColor; border-radius: 4px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.hint { font-size: .95rem; opacity: .8; }
.split { display: grid; gap: 32px; margin: 18px 0 48px; align-items: start; }
@media (min-width: 960px) { .split { grid-template-columns: 6fr 5fr; gap: 48px; } .split--even { grid-template-columns: 1fr 1fr; } }
.panel--wide { grid-column: 1 / -1; }
.panel--sand { background: rgb(255 255 255 / .22); border: 3px solid var(--hud); color: var(--hud); }
.panel--sand p, .panel--sand h3 { color: var(--hud); }
.shot { margin: 0; }
.shot a { display: block; border: 5px solid var(--hud); border-radius: var(--radius-panel); overflow: hidden; background: var(--hud); }
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .3s; }
.shot a:hover img { transform: scale(1.04); }
.shot figcaption, .clip figcaption { font-size: .95rem; margin-top: 8px; }
.facts { list-style: none; padding: 0; margin: 26px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.facts li { background: var(--hud); color: var(--cream); border-radius: var(--radius-btn); padding: 12px 14px; }
.facts b { display: block; font: 900 2.6rem/1 var(--display); color: var(--hazard); }
.facts span { font-size: .95rem; }

/* ---------- a card: the game's own render (tools/render_cards.gd) ---------- */
/* The box is the card body; the image is bigger by the glow's padding (20 of 262 px each side). */
.cbox { --cw: 200px; position: relative; display: block; width: var(--cw); aspect-ratio: 262 / 367; border-radius: calc(var(--cw) * .054); }
.card-img {
  position: absolute; left: calc(var(--cw) * -20 / 262); top: calc(var(--cw) * -20 / 262);
  width: calc(var(--cw) * 302 / 262); max-width: none; height: auto; pointer-events: none; user-select: none; -webkit-user-drag: none;
}
.gcard__sheen {
  position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(128deg, transparent calc(var(--sp, 50%) - 14%), rgb(255 255 255 / calc(.26 * var(--sk, 0))) var(--sp, 50%), transparent calc(var(--sp, 50%) + 14%));
}

/* ---------- cards that tilt (tilt.js, the game's CardTilt) ---------- */
.fan { list-style: none; margin: 18px 0 56px; padding: 24px 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 34px 26px; }
.fan .cbox { --cw: clamp(148px, 41vw, 210px); }
.tilt__flavor { width: clamp(148px, 41vw, 210px); margin: 16px auto 0; font-style: italic; font-size: .95rem; line-height: 1.35; text-align: center; }
.tilt__btn { all: unset; position: relative; display: block; cursor: pointer; perspective: calc(clamp(148px, 41vw, 210px) * 1.4 * 1.8); -webkit-tap-highlight-color: transparent; }
.tilt .cbox { transform: rotateY(var(--ry, 0)) rotateX(var(--rx, 0)); }
.tilt__shadow {
  position: absolute; inset: 6% 4% 0; border-radius: 1em; background: rgb(0 0 0 / .45); filter: blur(14px);
  transform: translate(var(--sx, 0), var(--sy, 10px));
}
.tilt__btn:focus-visible .cbox { outline: 3px solid var(--focus, var(--hazard)); outline-offset: 5px; }
html:not(.js) .tilt .cbox { animation: sway 5.5s ease-in-out infinite; animation-delay: calc(var(--i) * -.9s); }
@keyframes sway {
  0%, 100% { transform: rotateX(.05rad) rotateY(-.07rad); }
  25% { transform: rotateX(-.04rad) rotateY(.02rad); }
  50% { transform: rotateX(-.05rad) rotateY(.075rad); }
  75% { transform: rotateX(.03rad) rotateY(.01rad); }
}

/* ---------- your deck ---------- */
.deck h2, .deck .kicker { color: var(--hud); }
.mixes { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.mix { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: var(--hud); color: var(--cream); border-radius: var(--radius-btn); padding: 7px 10px; font-size: .92rem; }
.mix b { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font: 800 1.2rem/1 var(--display); color: var(--hazard); margin-left: auto; }
.mix__el { display: inline-flex; align-items: center; gap: 4px; color: var(--ec); }
.mix__el .icon { width: 22px; height: 22px; }
.mix b .icon { width: 28px; height: 28px; }
.mix__el span { color: var(--cream); }
.mix__op { color: var(--cream-dim); }
.mix--prism { grid-column: 1 / -1; justify-content: center; background: linear-gradient(90deg, #ff8029, #8fe0ff, #4d75ff, #9e5ceb, #8fe638); }
.mix--prism b { margin: 0; color: var(--hud); }
.booster { position: relative; margin-bottom: 22px; padding-right: 140px; min-height: 250px; }
.booster__pack { position: absolute; right: 22px; bottom: 20px; width: 100px; height: 150px; }
.booster__foil { position: absolute; left: 0; bottom: 0; width: 100px; height: auto; filter: drop-shadow(0 6px 0 rgb(0 0 0 / .25)); }
.booster__back {
  position: absolute; left: 14px; bottom: 26px; width: 72px; height: auto;
  animation: deal-out 5s cubic-bezier(.3, 1.4, .5, 1) infinite; animation-delay: calc(var(--i) * .18s);
}
@keyframes deal-out {
  0%, 12% { transform: translateY(0) rotate(0); opacity: 0; }
  20% { opacity: 1; }
  38%, 80% { transform: translate(calc((var(--i) - 1) * 28px), -58px) rotate(calc((var(--i) - 1) * 14deg)); opacity: 1; }
  92%, 100% { transform: translateY(0) rotate(0); opacity: 0; }
}

/* ---------- enemy decks ---------- */
.enemy { background: radial-gradient(ellipse at 80% 0%, #3a1f3f 0%, var(--hud) 60%); overflow-x: clip; }
.enemy h2 { color: #ff6b5e; }
.enemy .kicker { color: #ff6b5e; }
.enemy h3 { color: var(--cream); }
.enemy .fan .cbox { --cw: clamp(148px, 41vw, 210px); }
/* On a wide screen both hands of five cards sit in one row (never one card left alone below). */
@media (min-width: 900px) {
  .fan { container-type: inline-size; flex-wrap: nowrap; }
  .fan .cbox, .enemy .fan .cbox { --cw: min(210px, (100cqi - 4 * 26px) / 5); }
}
@property --n { syntax: "<integer>"; inherits: true; initial-value: 31; }
.draw { margin-top: 26px; padding: 16px; background: var(--hud-deep); border: 1px solid var(--hud-line); border-radius: var(--radius-panel); animation: deal 18s linear infinite; }
@keyframes deal { 0% { --n: 0; } 82% { --n: 31; } 100% { --n: 31; } }
.draw__row { display: grid; grid-template-columns: repeat(15, 1fr) 2.6fr; gap: 5px 4px; align-items: center; }
.draw__row i {
  aspect-ratio: 262 / 367; background: var(--enemy-back) center / 115.3% auto no-repeat;
  opacity: clamp(0, var(--n) - var(--i), 1); transform: translateY(calc(clamp(0, var(--i) + 1 - var(--n), 1) * -14px));
  transition: opacity .3s, transform .3s;
}
.draw__boss {
  grid-column: 16; grid-row: 1 / span 2; aspect-ratio: 262 / 367; display: grid; place-items: center; margin-left: 8px; border-radius: 6px;
  background: #2e0d0c; border: 2px solid var(--r-legendary); color: var(--eye); box-shadow: 0 0 12px #ffc73366;
  opacity: clamp(.15, var(--n) - 30, 1); transform: scale(calc(.75 + .3 * clamp(0, var(--n) - 30, 1)));
  transition: opacity .3s, transform .35s cubic-bezier(.3, 1.8, .5, 1);
}
.draw__boss img { width: 80%; height: auto; }
.draw__legend { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: .9rem; color: var(--cream-dim); }
.clip { margin: 0; }
.clip video { width: 100%; aspect-ratio: 1; object-fit: cover; border: 5px solid #000; border-radius: var(--radius-panel); background: #1b1530; }
.clip figcaption { color: var(--cream-dim); }
.orders { list-style: none; padding: 0; margin: 24px 0 48px; display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.order {
  position: relative; background: #efe6d2; color: var(--hud); padding: 18px 18px 54px; border-radius: 3px;
  border-top: 8px solid var(--zone); box-shadow: 0 10px 0 -4px rgb(0 0 0 / .35);
  background-image: repeating-linear-gradient(180deg, transparent 0 27px, rgb(43 39 35 / .07) 27px 28px);
  transition: transform .2s;
}
.order:nth-child(odd) { transform: rotate(-.8deg); }
.order:nth-child(even) { transform: rotate(.7deg); }
.order:hover { transform: rotate(0) translateY(-4px); }
.order h4 { font: 800 1.6rem/1.05 var(--display); margin: 2px 0 10px; }
.order p { margin: 0; font-size: .95rem; }
.order__no { font: 700 .78rem/1 ui-monospace, Menlo, monospace; letter-spacing: .05em; opacity: .7; }
.order dl { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 0 0 12px; font-size: .9rem; }
.order dt { font-weight: 700; text-transform: uppercase; font-size: .72rem; letter-spacing: .06em; opacity: .7; }
.order dd { margin: 0; font-weight: 700; }
.order__zone { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--zone); margin-right: 6px; vertical-align: 0; }
.order__stamp {
  position: absolute; right: 12px; bottom: 10px; padding: 3px 9px; border: 3px double #c4302b; border-radius: 4px;
  color: #c4302b; font: 900 1rem/1 var(--display); letter-spacing: .1em; text-transform: uppercase; opacity: .78;
  transform: rotate(-11deg); mix-blend-mode: multiply;
}
.yours { margin-bottom: 36px; }
.shots { display: grid; gap: 20px; }
@media (min-width: 720px) { .shots { grid-template-columns: 1fr 1fr; } }
.enemy .shot a { border-color: #000; }
.enemy .shot figcaption { color: var(--cream-dim); }

/* ---------- the card sphere (sphere.js) ---------- */
.sphere { position: relative; background: radial-gradient(ellipse at 50% 45%, #3b3229 0%, #1b1815 65%); color: var(--cream); overflow: hidden; padding: 64px 0; }
.sphere h2 { color: var(--hazard); }
.sphere__hint { color: var(--cream-dim); font-size: .95rem; }
.sphere__world { list-style: none; margin: 0; padding: 0; }
.sphere--on { cursor: grab; }
.sphere--drag, .sphere--drag .sphere__card { cursor: grabbing; }
/* Without the script: a wall of cards that scrolls sideways. */
.sphere:not(.sphere--on) .sphere__world { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); gap: 16px; overflow-x: auto; padding: 20px var(--gutter); }
.sphere__card { all: unset; --sw: 150px; display: block; cursor: pointer; }
.sphere .cbox { --cw: var(--sw); }
.sphere--on { padding: 0; }
.sphere--on .sphere__head {
  position: absolute; inset: 0 0 auto; z-index: 3; pointer-events: none; padding-top: 44px; padding-bottom: 60px;
  background: linear-gradient(180deg, rgb(27 24 21 / .92) 30%, transparent);
}
.sphere--on .sphere__head p { text-shadow: 0 1px 2px #000; }
.sphere--on .sphere__view {
  position: relative; height: min(100svh, 920px); min-height: 560px; perspective: var(--p, 800px);
  overflow: hidden; cursor: grab; touch-action: pan-y;
}
.sphere--on .sphere__view:active { cursor: grabbing; }
.sphere--on .sphere__view::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(ellipse at center, transparent 45%, rgb(15 13 11 / .85) 100%);
}
.sphere--on .sphere__world { position: absolute; left: 50%; top: 52%; width: 0; height: 0; transform-style: preserve-3d; }
.sphere--on .sphere__world li { position: absolute; left: 0; top: 0; transform-style: preserve-3d; }
.sphere--on .sphere__card { position: absolute; left: calc(var(--sw) / -2); top: calc(var(--sw) * -.7); will-change: transform, opacity; backface-visibility: hidden; }
.sphere__card:focus-visible .cbox { outline: 3px solid var(--hazard); outline-offset: 3px; }
@media (max-width: 700px) { .sphere__card { --sw: 120px; } }

/* ---------- beta: the job posting ---------- */
.beta { background: var(--hazard); color: var(--hud); --focus: var(--hud); }
.beta__grid { display: grid; gap: 36px; padding-top: 64px; padding-bottom: 64px; align-items: start; }
@media (min-width: 960px) { .beta__grid { grid-template-columns: 1fr 1fr; gap: 56px; } }
.posting { background: var(--cream); border: 4px solid var(--hud); border-radius: 6px; padding: 28px 24px; box-shadow: 10px 10px 0 var(--hud); transform: rotate(-1deg); }
.posting h2 { font-size: clamp(2.6rem, 7vw, 4.4rem); text-transform: uppercase; }
.posting dl { margin: 0 0 18px; display: grid; gap: 10px; }
.posting dl div { display: grid; grid-template-columns: 9.5em 1fr; gap: 10px; border-top: 2px dashed var(--hud); padding-top: 10px; }
.posting dt { font: 800 1.2rem/1.2 var(--display); text-transform: uppercase; }
.posting dd { margin: 0; }
.posting__platforms { font-weight: 700; }
.beta__follow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.chip { display: inline-block; padding: 6px 12px; border: 2px solid var(--hud); border-radius: 99px; font-weight: 700; text-decoration: none; }
.chip:hover { background: var(--hud); color: var(--hazard); }
.beta .notify { box-shadow: 10px 10px 0 rgb(0 0 0 / .35); }
.notify h3 { color: var(--hazard); }
.notify__sub { font-style: italic; }
@media (max-width: 520px) { .posting dl div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- where to play ---------- */
.platforms__item small { display: block; font: 700 .72rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase; margin-top: 6px; color: var(--cream-dim); }
.platforms__item--first { border-color: var(--hazard); color: var(--hazard); }
.platforms__item--first small { color: var(--hazard); }
.platforms__item--soon { border-style: dashed; color: var(--cream-dim); }
#download .btn { margin-top: 24px; }

/* ---------- the card viewer ---------- */
.viewer { inset: 0; width: auto; height: auto; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--cream); }
.viewer[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; padding: 20px 0; }
.viewer::backdrop { background: rgb(20 18 16 / .86); backdrop-filter: blur(6px); }
/* The button sits right under the card; the stage is the card plus room to turn it. */
.viewer__stage { display: grid; place-items: center; padding: 24px 40px; perspective: 1100px; cursor: grab; touch-action: none; }
.viewer__stage:active { cursor: grabbing; }
.viewer__card { --cw: min(380px, 76vw, 48svh); position: relative; transform-style: preserve-3d; transform: rotateX(var(--rx, 0)) rotateY(var(--ry, 0)); }
.viewer__card .cbox { --cw: inherit; }
.viewer__face, .viewer__card { width: var(--cw); aspect-ratio: 262 / 367; }
.viewer__face, .viewer__back { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.viewer__back { position: absolute; inset: 0; transform: rotateY(180deg); }
.viewer__back img { position: absolute; left: calc(var(--cw) * -20 / 262); top: calc(var(--cw) * -20 / 262); width: calc(var(--cw) * 302 / 262); max-width: none; height: auto; }
.viewer__close { box-shadow: 0 5px 0 #000; border-color: #000; }

/* ---------- links page ---------- */
.links-page { background: var(--hud) repeating-linear-gradient(-45deg, transparent 0 40px, rgb(242 183 5 / .04) 40px 80px); }
.links { min-height: 100svh; padding: 40px var(--gutter) 56px; }
.links__col { max-width: 520px; margin: 0 auto; display: grid; gap: 18px; justify-items: center; text-align: center; }
.links__plate { text-decoration: none; font-size: 1rem; }
.links__plate .plate__name { font-size: clamp(2.6rem, 13vw, 4rem); }
.links__intro { font: 800 1.35rem/1.25 var(--display); color: var(--cream); margin: 0; }
.links__list { list-style: none; padding: 0; margin: 0; width: 100%; display: grid; gap: 12px; }
.linkbtn {
  display: grid; gap: 2px; padding: 14px 18px; text-decoration: none; border-radius: 8px; text-align: center;
  background: var(--cream); color: var(--hud); border: 3px solid #000; box-shadow: 0 5px 0 #000;
  transition: transform .12s, box-shadow .12s;
}
a.linkbtn:hover { transform: translateY(-2px) rotate(-.6deg); box-shadow: 0 7px 0 #000; }
a.linkbtn:active { transform: translateY(4px); box-shadow: 0 1px 0 #000; }
.linkbtn b { font: 800 1.6rem/1.05 var(--display); }
.linkbtn span { font-size: .92rem; }
.linkbtn--go { background: var(--hazard); animation: nudge 3.5s ease-in-out infinite; }
@keyframes nudge { 0%, 86%, 100% { transform: rotate(0); } 90% { transform: rotate(-1.5deg); } 94% { transform: rotate(1.5deg); } }
.linkbtn--off { background: transparent; color: var(--cream-dim); border: 2px dashed var(--hud-line); box-shadow: none; }
.links .notify { width: 100%; text-align: left; scroll-margin-top: 20px; }
.links__foot { font-size: .92rem; color: var(--cream-dim); }

/* ---------- reveal on scroll (where the browser can tie it to the scroll) ---------- */
@supports (animation-timeline: view()) {
  .panel, .order, .shot, .clip, .facts li, .mix, .posting, .notify, .gallery__item, .faq__item {
    animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 70%;
  }
  .order__stamp { animation: stamp linear both; animation-timeline: view(); animation-range: entry 60% cover 40%; }
}
@keyframes rise { from { opacity: 0; translate: 0 40px; } to { opacity: 1; translate: 0 0; } }
@keyframes stamp { from { opacity: 0; scale: 1.4; } 70% { opacity: .9; scale: .95; } to { opacity: .78; scale: 1; } }

@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none !important; }
  .ticker { overflow-x: auto; }
  .draw { --n: 31; }
}

/* Phones: the nav is one row that scrolls sideways, so the bar stays short. */
@media (max-width: 899px) {
  .topbar__nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 18px; }
  .topbar__nav::-webkit-scrollbar { display: none; }
}
html:has(.viewer[open]) { overflow: hidden; }
video { cursor: pointer; }

/* Cookie banner (consent.js): only when analytics.ga4 is set; Google loads after "Accept". */
.consent {
  position: fixed; left: var(--gutter); right: var(--gutter); bottom: var(--gutter); z-index: 50;
  max-width: 640px; margin: 0 auto; padding: 16px 18px;
  background: var(--hud); color: var(--cream); border: 2px solid var(--hazard);
  border-radius: var(--radius-panel); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); --focus: var(--hazard);
}
.consent[hidden] { display: none; }
.consent__text { margin: 0 0 12px; font-size: .95rem; line-height: 1.45; }
.consent__text b { color: var(--hazard); }
.consent__text a { color: var(--cream); }
.consent__btns { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.consent__btns .btn--steel { border: 1px solid var(--hud-line); }

/* Links page icons: brand glyph on the left, text stays centred (empty right column balances it). */
.linkbtn { grid-template-columns: 34px 1fr 34px; column-gap: 10px; align-items: center; }
.linkbtn > b, .linkbtn > span { grid-column: 2; }
.linkbtn__ico { grid-column: 1; grid-row: 1 / span 2; width: 30px; height: 30px; fill: currentColor; justify-self: start; }
.linkbtn--off .linkbtn__ico { opacity: .55; }

/* Ko-fi tip panel (kofi.js): a placeholder until consent or a click, then Ko-fi's iframe. */
.kofi-panel { display: grid; gap: 12px; justify-items: start; padding: 18px; background: var(--cream); color: var(--hud); border: 3px solid #000; border-radius: var(--radius-panel); box-shadow: 0 5px 0 #000; }
.kofi-panel[hidden] { display: none; }
.kofi-panel p { margin: 0; font-size: .95rem; }
.kofi-panel--on { padding: 0; background: #f9f9f9; overflow: hidden; }
.kofi-panel iframe { display: block; width: 100%; border: 0; }
