/* Checkpoint Rewind: design language lifted from the 2025 Checkpoint recap.
   One accent colour per card drives the glow, the dot grid, text and outlines. */

@property --accent {
  syntax: "<color>";
  inherits: true;
  initial-value: #3df07a;
}

:root {
  --accent: #3df07a;
  --ink: #0d0b12;
  --base: #110e17;
  --text-dim: color-mix(in srgb, var(--accent) 70%, #cfc9dc);
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --digits: "Pixelify Sans", "Courier New", monospace;
  --body: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
  color-scheme: dark;
  interpolate-size: allow-keywords;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }

body {
  background: var(--base);
  color: var(--accent);
  font: 500 18px/1.35 var(--body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  transition: --accent 600ms ease;
}

button { font: inherit; color: inherit; cursor: pointer; }

/* Thin square scrollbar in the accent colour instead of the browser default. */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent) 45%, transparent);
  border: 3px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--accent); }
@supports (-moz-appearance: none) {
  * { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--accent) 45%, transparent) transparent; }
}
img { display: block; }
[hidden] { display: none !important; }

/* ---------- stage & background ---------- */

.stage {
  position: relative;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  isolation: isolate;
}
/* Soft glow from the top in the accent colour. */
.stage::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(120% 70% at 30% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    radial-gradient(80% 60% at 90% 110%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%);
}
/* Fine dot grid over everything, fading towards the bottom. */
.stage::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(color-mix(in srgb, var(--accent) 30%, transparent) 0.9px, transparent 1.3px);
  background-size: 5px 5px;
  mask-image: linear-gradient(to bottom, #000 0%, rgb(0 0 0 / 0.45) 55%, rgb(0 0 0 / 0.15) 100%);
  opacity: 0.55;
  pointer-events: none;
}

/* ---------- chrome ---------- */

.chrome-top, .chrome-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 18px clamp(16px, 2.2vw, 32px);
}
.chrome-top > :last-child, .chrome-bottom > :last-child { justify-self: end; }
/* Layers: stage backgrounds (glow, dots, rain, deco panel) < cards < header and footer. */
.chrome-top, .chrome-bottom { position: relative; z-index: 2; }
.slides { z-index: 1; }

.logo {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 0; padding: 0;
  font: 900 15px/1 var(--display); letter-spacing: 0.02em;
  justify-self: start;
}
.logo svg { width: 18px; height: 18px; }

.pips { display: flex; gap: 14px; align-items: center; }
.pips button {
  width: 22px; height: 22px; padding: 0; border: 0; background: none;
  opacity: 0.35; transition: opacity 200ms, transform 200ms;
}
.pips button[aria-current="step"] { opacity: 1; transform: scale(1.15); }
.pips button.seen { opacity: 0.7; }
.pips svg { width: 100%; height: 100%; }

.sq {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--ink);
  border: 1px solid var(--accent);
  padding: 0;
}
.sq svg { width: 18px; height: 18px; }
.top-actions { display: flex; gap: 10px; }

/* Offset "shadow block" used on primary buttons. */
.shadowed, .btn {
  box-shadow: 4px 4px 0 0 var(--accent);
  transition: transform 120ms, box-shadow 120ms;
}
.shadowed:hover, .btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 0 var(--accent); }
.shadowed:active, .btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 0 var(--accent); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  background: var(--ink);
  border: 1px solid var(--accent);
  font: 700 14px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
}
.btn svg { width: 14px; height: 14px; }
.btn.ghost { box-shadow: none; background: transparent; }

.fineprint {
  margin: 0; text-align: center;
  font: 400 12px/1.3 var(--mono);
  color: color-mix(in srgb, var(--accent) 55%, #8a8496);
}
.fineprint a { color: inherit; }

/* ---------- slides ---------- */

.slides { position: relative; overflow: hidden; }
/* "safe center": content taller than the card scrolls instead of spilling under the header. */
.slide {
  position: absolute; inset: 0;
  display: grid; align-items: safe center; justify-items: center;
  padding: 8px clamp(16px, 5vw, 80px) 12px;
  overflow-y: auto;
}
.slide.enter { animation: slide-in 520ms cubic-bezier(.2,.7,.2,1) both; }
.slide.leave { animation: slide-out 260ms ease-in both; pointer-events: none; }
@keyframes slide-in {
  0% { opacity: 0; clip-path: inset(0 0 100% 0); filter: blur(6px); }
  40% { opacity: 1; }
  100% { opacity: 1; clip-path: inset(0 0 0 0); filter: none; }
}
@keyframes slide-out {
  to { opacity: 0; transform: translateY(-12px); filter: blur(4px); }
}
/* Scanline sweep that plays with each new card. */
.slide.enter::after {
  content: ""; position: absolute; left: 0; right: 0; height: 3px; top: 0;
  background: var(--accent); box-shadow: 0 0 24px 4px var(--accent);
  opacity: 0.6; animation: sweep 520ms ease-out both; pointer-events: none;
}
@keyframes sweep { from { top: 0; } to { top: calc(100% - 3px); opacity: 0; } }

.eyebrow {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 6px;
  font: 800 13px/1 var(--display); letter-spacing: 0.04em; text-transform: uppercase;
}
.eyebrow svg { width: 16px; height: 16px; }

.headline {
  margin: 0;
  font: 900 clamp(44px, 9vw, 124px)/0.9 var(--display);
  letter-spacing: -0.01em; text-transform: uppercase;
}
/* Unbounded is very wide: "CHECKPOINT" is ~8.6em across, so 10vw keeps it inside the page. */
.headline.xl { font-size: clamp(30px, 10vw, 156px); }

.big-number {
  margin: 4px 0 14px;
  font: 700 clamp(72px, 11vw, 150px)/0.9 var(--digits);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.lede { margin: 0; font-size: clamp(17px, 1.6vw, 22px); max-width: 32ch; color: var(--text-dim); }
.lede b, .chip {
  display: inline-block; padding: 0 6px; margin: 0 1px;
  background: var(--accent); color: var(--ink); font-weight: 600;
}

.doodles { display: flex; gap: 14px; align-items: center; margin-top: 18px; }
.doodles svg { height: 26px; width: auto; }

.note {
  margin: 14px 0 0; max-width: 46ch;
  font: 400 12px/1.4 var(--mono);
  color: color-mix(in srgb, var(--accent) 60%, #8a8496);
}

/* Two-part layout: a visual on the left, text on the right. */
.pair {
  display: grid; grid-template-columns: auto minmax(0, 520px);
  align-items: center; gap: clamp(24px, 6vw, 96px);
}

/* ---------- 3D cube ---------- */

.cube-wrap { width: 180px; height: 180px; perspective: 700px; }
.cube {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  animation: spin 9s linear infinite;
}
.cube > div {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 16%, var(--ink));
  border: 1px solid var(--accent);
  font-size: 110px; line-height: 1;
}
.cube > div img { width: 70%; height: 70%; object-fit: contain; image-rendering: auto; }
.cube > div svg { width: 55%; height: 55%; }
.cube > :nth-child(1) { transform: translateZ(90px); }
.cube > :nth-child(2) { transform: rotateY(90deg) translateZ(90px); }
.cube > :nth-child(3) { transform: rotateY(180deg) translateZ(90px); }
.cube > :nth-child(4) { transform: rotateY(-90deg) translateZ(90px); }
.cube > :nth-child(5) { transform: rotateX(90deg) translateZ(90px); }
.cube > :nth-child(6) { transform: rotateX(-90deg) translateZ(90px); }
@keyframes spin {
  from { transform: rotateX(-22deg) rotateY(0deg); }
  to { transform: rotateX(-22deg) rotateY(360deg); }
}

/* ---------- landing / drop ---------- */

.landing { text-align: center; display: grid; justify-items: center; gap: 10px; }
.landing .lede { max-width: none; }
.landing.home { gap: 12px; padding-block: 12px 24px; }
.landing.home > .drop, .landing.home > .callout, .landing.home > .switch, .landing.home > .faq { width: min(600px, 100%); }

/* Year picker: an inline chip that opens a listbox. */
.year-pick { position: relative; display: inline-block; }
.year-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0 2px; padding: 1px 8px 1px 10px;
  background: var(--accent); color: var(--ink); border: 0;
  font: 700 1em/1.25 var(--body);
  box-shadow: 3px 3px 0 0 color-mix(in srgb, var(--accent) 40%, transparent);
  transition: transform 120ms, box-shadow 120ms;
}
.year-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
.year-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.year-btn svg { width: 0.85em; height: 0.85em; stroke-width: 3; transition: transform 200ms; }
.year-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.year-list {
  position: absolute; left: 50%; top: calc(100% + 12px); z-index: 20;
  min-width: 130px; margin: 0; padding: 6px; list-style: none; text-align: left;
  background: var(--ink); border: 1px solid var(--accent);
  box-shadow: 5px 5px 0 0 var(--accent), 0 18px 40px rgb(0 0 0 / 0.5);
  opacity: 0; visibility: hidden;
  transform: translate(-50%, -6px) scale(0.98); transform-origin: top center;
  transition: opacity 160ms ease, transform 200ms cubic-bezier(.2,.8,.2,1), visibility 0s linear 200ms;
}
.year-list.open { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
.year-list:focus { outline: none; }
.year-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; cursor: pointer;
  font: 700 20px/1 var(--body); letter-spacing: 0.02em; font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.year-list li svg { width: 16px; height: 16px; margin-left: auto; stroke-width: 3; opacity: 0; }
.year-list li[aria-selected="true"] svg { opacity: 1; }
.year-list li.active { background: var(--accent); color: var(--ink); }

.drop {
  margin-top: 18px;
  width: min(560px, 100%);
  padding: 28px 22px 20px;
  border: 1px dashed var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  display: grid; gap: 14px; justify-items: center;
  transition: background 150ms;
}
.drop.over { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.drop p { margin: 0; color: var(--text-dim); }
.drop input { display: none; }
.drop-icon {
  width: 52px; height: 52px; display: grid; place-items: center;
  border: 1px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--ink));
}
.drop-icon svg { width: 24px; height: 24px; }
.drop.over .drop-icon { animation: bob 600ms ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(-5px); } }
.drop .local-badge {
  display: inline-flex; align-items: center; gap: 9px;
  margin-top: 4px; padding: 8px 13px;
  font: 400 12px/1.35 var(--mono); text-align: left; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.local-badge svg { width: 14px; height: 14px; flex: none; }

.callout {
  display: flex; gap: 14px; align-items: flex-start; text-align: left;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}
.callout-icon {
  flex: none; width: 26px; height: 26px; display: grid; place-items: center;
  background: var(--accent); color: var(--ink);
}
.callout-icon svg { width: 16px; height: 16px; stroke-width: 3; }
.callout strong { display: block; font: 700 16px/1.25 var(--body); color: var(--accent); }
.callout p { margin: 4px 0 0; font: 400 14.5px/1.45 var(--body); color: color-mix(in srgb, var(--accent) 30%, #d8d3e2); }

/* On/off switch for the images setting. */
.switch { display: flex; align-items: center; gap: 12px; padding: 4px 2px; text-align: left; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track {
  flex: none; position: relative; width: 40px; height: 22px;
  border: 1px solid var(--accent); transition: background 160ms;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px;
  background: var(--accent); transition: transform 200ms cubic-bezier(.2,.8,.2,1), background 160ms;
}
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); background: var(--ink); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 3px; }
.switch-text { font: 600 15px/1.25 var(--body); color: var(--text-dim); }
.switch-text small { display: block; margin-top: 3px; font: 400 12px/1.3 var(--mono); opacity: 0.75; }

/* FAQ disclosures, with a smooth open where the browser supports ::details-content. */
.faq { display: grid; gap: 8px; text-align: left; }
.faq details {
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--accent) 4%, transparent);
  transition: border-color 160ms, background 160ms;
}
.faq details:hover, .faq details[open] { border-color: var(--accent); }
.faq details[open] { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 14px; cursor: pointer; list-style: none;
  font: 700 15px/1.2 var(--body); color: var(--accent);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.faq summary svg { width: 18px; height: 18px; flex: none; transition: transform 220ms; }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq details::details-content {
  block-size: 0; overflow: hidden;
  transition: block-size 280ms cubic-bezier(.2,.8,.2,1), content-visibility 280ms allow-discrete;
}
.faq details[open]::details-content { block-size: auto; }
.faq ol, .faq ul {
  display: grid; gap: 7px; margin: 0; padding: 0 18px 16px 36px;
  font: 400 15px/1.5 var(--body); color: color-mix(in srgb, var(--accent) 30%, #d8d3e2);
}
.faq li::marker { color: var(--accent); font: 700 13px var(--mono); }
.faq b { color: var(--accent); font-weight: 600; }
.faq a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }
.faq a:hover { text-decoration-thickness: 2px; }

.or {
  display: flex; align-items: center; gap: 14px; width: min(360px, 80%); margin-top: 22px;
  font: 700 11px/1 var(--mono); letter-spacing: 0.2em; text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 55%, #8a8496);
}
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: color-mix(in srgb, var(--accent) 35%, transparent); }
.btn.demo { margin: 4px 0 8px; }

/* Loading screen: digital rain across the whole stage, behind the header, cards and footer. */
.matrix {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%; pointer-events: none;
  animation: fade-in 500ms ease backwards;
  transition: opacity 250ms ease;
  mask-image: radial-gradient(ellipse 50% 45% at 50% 50%, rgb(0 0 0 / 0.25), #000 90%);
}
.matrix.out { opacity: 0; }
@keyframes fade-in { from { opacity: 0; } }
.landing.loading {
  padding: 34px clamp(20px, 4vw, 48px);
  background: color-mix(in srgb, var(--base) 82%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  backdrop-filter: blur(3px);
}

.progress { width: min(560px, 100%); display: grid; gap: 10px; }
.bar {
  height: 18px; border: 1px solid var(--accent); padding: 3px;
}
.bar > i {
  display: block; height: 100%; width: 0%;
  background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 11px);
  transition: width 150ms linear;
}
.error { margin: 0; color: #ff6b8a; font-family: var(--mono); font-size: 14px; }

/* ---------- servers ---------- */

.servers { display: grid; gap: 28px; width: min(760px, 100%); }
.servers-head { display: flex; gap: 24px; align-items: flex-end; flex-wrap: wrap; }
.servers-head .lede { max-width: 22ch; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tile {
  position: relative;
  border: 1px solid var(--accent);
  padding: 18px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 6px 0 -1px color-mix(in srgb, var(--accent) 35%, transparent);
  min-width: 0;
}
.tile.wide { grid-column: 1 / -1; padding: 24px 18px; }
/* Half-width tiles: name on its own row, stats underneath. */
.tile:not(.wide) { flex-wrap: wrap; }
.tile:not(.wide) .name { flex-basis: calc(100% - 60px); white-space: normal; }
.tile:not(.wide) .kv { margin-left: 58px; }
.tile .rank {
  position: absolute; top: -1px; right: -1px;
  background: var(--accent); color: var(--ink);
  font: 700 12px/1 var(--digits); padding: 5px 7px;
}
.tile .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.tile .kv { display: flex; gap: 20px; margin-left: auto; }
.kv div { display: grid; gap: 2px; }
.kv small { font: 800 9px/1 var(--display); text-transform: uppercase; letter-spacing: 0.04em; }
.kv span { font: 700 22px/1 var(--digits); }
.initial {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center; overflow: hidden;
  background: color-mix(in srgb, var(--accent) 12%, #1d1a24); color: #d7d3e0;
  border-radius: 12px; font: 600 18px/1 var(--body);
}
.initial img { width: 100%; height: 100%; object-fit: cover; }
.tile.wide .initial { width: 56px; height: 56px; border-radius: 16px; }

/* ---------- squad & sidekick ---------- */

.squad { position: relative; width: 100%; height: 100%; display: grid; place-items: center; text-align: center; }
.squad .center { display: grid; justify-items: center; gap: 8px; position: relative; z-index: 1; }
.avatar {
  position: relative; display: inline-block;
  width: 84px; height: 84px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 25%, #1d1a24);
  box-shadow: 4px 4px 0 0 color-mix(in srgb, var(--accent) 45%, transparent);
}
.avatar img, .avatar .ph { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar .ph { display: grid; place-items: center; font: 900 30px/1 var(--display); color: var(--ink); background: var(--accent); }
.avatar .tag {
  position: absolute; right: -10px; bottom: -6px;
  background: var(--accent); color: var(--ink);
  font: 700 12px/1 var(--mono); padding: 4px 6px; white-space: nowrap;
  max-width: 140px; overflow: hidden; text-overflow: ellipsis;
}
.floater { position: absolute; animation: float 7s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(10px, -14px); }
  66% { transform: translate(-8px, 8px); }
}

.sidekick { display: grid; justify-items: center; gap: 22px; text-align: center; width: min(720px, 100%); }
.duo { display: flex; align-items: center; gap: 0; }
.duo .link { width: clamp(60px, 16vw, 180px); height: 2px; background: var(--accent); position: relative; }
.duo .link::after {
  content: ""; position: absolute; top: -5px; left: 0; width: 12px; height: 12px;
  background: var(--accent); border-radius: 50%;
  animation: travel 2.4s ease-in-out infinite alternate;
}
@keyframes travel { to { left: calc(100% - 12px); } }
.duo .avatar { width: 110px; height: 110px; }
.stats-row { display: flex; gap: 40px; justify-content: center; }
.stat small { display: block; font: 800 10px/1 var(--display); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.stat span { font: 700 34px/1 var(--digits); }
.panel {
  width: 100%;
  border: 1px solid var(--accent);
  text-align: left;
}
.panel header {
  background: var(--accent); color: var(--ink);
  font: 700 12px/1 var(--mono); letter-spacing: 0.06em; padding: 8px 12px;
}
.panel p { margin: 0; padding: 14px 12px 18px; background: #111; color: var(--text-dim); }

/* ---------- games ---------- */

/* Width follows the viewport height too, so the covers never push the card under the header. */
.games { display: grid; gap: 26px; width: min(980px, 100%, max(520px, (100dvh - 330px) * 1.9)); }
.shelf { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; align-items: start; }
.game { position: relative; display: grid; gap: 10px; min-width: 0; align-content: start; }
.cover {
  position: relative; aspect-ratio: 3 / 4;
  border: 1px solid var(--accent);
  box-shadow: 6px 6px 0 -1px color-mix(in srgb, var(--accent) 35%, transparent);
  overflow: hidden;
  display: grid; place-items: center;
  background:
    radial-gradient(color-mix(in srgb, var(--accent) 45%, transparent) 1px, transparent 1.6px) 0 0 / 7px 7px,
    linear-gradient(160deg, color-mix(in srgb, var(--accent) 30%, var(--ink)), var(--ink));
}
.game:first-child .cover { outline: 2px solid var(--accent); outline-offset: 3px; box-shadow: 9px 9px 0 -1px color-mix(in srgb, var(--accent) 45%, transparent); }
.cover .letters { font: 900 clamp(26px, 4vw, 54px)/0.9 var(--display); text-align: center; padding: 8px; word-break: break-word; }
.cover img.art { width: 100%; height: 100%; object-fit: cover; }
.cover img.icon { width: 58%; aspect-ratio: 1; object-fit: contain; border-radius: 18%; box-shadow: 0 10px 30px rgb(0 0 0 / 0.45); }
.game > .rank {
  position: absolute; left: 0; top: 0; z-index: 1;
  background: var(--accent); color: var(--ink); font: 700 13px/1 var(--digits); padding: 6px 8px;
}
.game h3 { margin: 0; font: 800 12px/1.15 var(--display); text-transform: uppercase; overflow-wrap: anywhere; }
.game small { font: 700 11px/1 var(--mono); }

/* ---------- collectible card ---------- */

.collectible {
  --w: min(300px, 70vw);
  width: var(--w); aspect-ratio: 300 / 440;
  perspective: 1200px;
}
.collectible .flip {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 900ms cubic-bezier(.3,1.4,.4,1);
}
.collectible.revealed .flip { transform: rotateY(180deg); }
.collectible .face, .collectible .back {
  position: absolute; inset: 0; backface-visibility: hidden;
  box-shadow: 14px 16px 0 rgb(0 0 0 / 0.35);
}
.collectible .back {
  background: var(--card, #85a7e4);
  display: grid; place-items: center;
}
.collectible .back canvas { width: 88%; height: 92%; image-rendering: pixelated; }
.collectible .back > * { grid-area: 1 / 1; }
/* The Discord logo sits on the badge the canvas draws in the middle of the back. */
.back-logo { width: 23%; color: var(--card, #85a7e4); display: grid; }
.back-logo svg { width: 100%; height: auto; }
.collectible .face {
  transform: rotateY(180deg);
  background: var(--card, #85a7e4); color: #0d0b12;
  padding: 12px 12px 14px;
  display: grid; grid-template-rows: auto 1fr auto auto auto; gap: 6px;
}
.collectible.static .flip { transform: none; }
.collectible.static .face { transform: none; }
.face .lvl {
  justify-self: start;
  background: var(--card, #85a7e4);
  font: 400 12px/1 var(--mono);
  display: grid; gap: 4px; margin-bottom: -26px; position: relative; z-index: 1;
  padding: 0 14px 6px 0;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}
.face .lvl i {
  display: block; width: 110px; height: 8px;
  background: repeating-linear-gradient(115deg, #0d0b12 0 5px, transparent 5px 8px);
}
.face .lvl b { font-weight: 700; }
.face .art {
  background:
    radial-gradient(rgb(255 255 255 / 0.25) 1px, transparent 1.5px) 0 0 / 6px 6px,
    linear-gradient(180deg, var(--art-a, #7a8ff0), var(--art-b, #5d6fe0));
  display: grid; place-items: center; overflow: hidden;
}
.face .art canvas { width: 78%; image-rendering: pixelated; }
.face .meta { display: flex; justify-content: space-between; font: 700 11px/1 var(--mono); margin-top: 4px; }
.face .pname { font: 900 clamp(26px, 3vw, 34px)/1 var(--display); letter-spacing: -0.02em; }
.face .icons { display: flex; align-items: center; gap: 8px; }
.face .icons svg { height: 22px; width: auto; }
.face .icons .badge { margin-left: auto; width: 30px; height: 30px; border: 2px solid #0d0b12; display: grid; place-items: center; }
.face .icons .badge svg { width: 18px; height: 18px; }
.collectible.revealed:not(.static):hover .flip { transform: rotateY(180deg) rotateX(4deg) rotateZ(-1deg); }

/* ---------- summary ---------- */

.summary { width: min(1100px, 100%); display: grid; grid-template-columns: auto 1fr; gap: clamp(24px, 6vw, 90px); align-items: center; }
.summary .collectible { transform: rotate(-8deg); --w: min(260px, 60vw); }
.summary .headline { font-size: clamp(40px, 7vw, 112px); }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 40px; margin-top: 22px; }
.summary-grid small { display: flex; align-items: center; gap: 6px; font: 800 11px/1 var(--display); text-transform: uppercase; margin-bottom: 6px; }
.summary-grid small svg { width: 14px; height: 14px; }
.summary-grid span { font: 700 26px/1.05 var(--digits); overflow-wrap: anywhere; }
.summary-grid span.text { font: 600 18px/1.2 var(--body); color: var(--text-dim); }
.summary-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }

/* ---------- voice ring ---------- */

.ringed { position: relative; display: grid; justify-items: center; text-align: center; }
.ringed .ring {
  position: absolute; left: 50%; top: 50%;
  width: min(70vh, 86vw); aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%;
  border: 14px dotted color-mix(in srgb, var(--accent) 55%, transparent);
  animation: pulse 4s ease-in-out infinite;
  z-index: -1;
}
@keyframes pulse { 50% { scale: 1.06; opacity: 0.6; } }

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  body { font-size: 16px; }
  .pips { gap: 6px; }
  .pips button { width: 16px; height: 16px; }
  .logo span { display: none; }
  .pair, .summary { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .pair .lede, .summary .lede { margin-inline: auto; }
  .doodles, .summary-actions { justify-content: center; }
  .cube-wrap { width: 120px; height: 120px; }
  .cube > div { font-size: 72px; }
  .cube > :nth-child(1) { transform: translateZ(60px); }
  .cube > :nth-child(2) { transform: rotateY(90deg) translateZ(60px); }
  .cube > :nth-child(3) { transform: rotateY(180deg) translateZ(60px); }
  .cube > :nth-child(4) { transform: rotateY(-90deg) translateZ(60px); }
  .cube > :nth-child(5) { transform: rotateX(90deg) translateZ(60px); }
  .cube > :nth-child(6) { transform: rotateX(-90deg) translateZ(60px); }
  .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tile { flex-wrap: wrap; }
  .tile .name { flex-basis: calc(100% - 60px); white-space: normal; }
  .tile .kv { gap: 24px; margin-left: 58px; }
  .tiles { grid-template-columns: 1fr; }
  .summary-grid { text-align: left; }
  .fineprint { font-size: 10px; }
  .floater .avatar { width: 58px; height: 58px; }
  .squad .sidekick ~ .floater, .squad:has(.sidekick) .floater { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .slide::after { display: none; }
}


/* ---------- servers: ranks 4-10 ---------- */

.more-servers {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px;
  margin-top: -6px;
}
.more-servers .row {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  animation: row-in 320ms cubic-bezier(.2,.7,.2,1) both;
}
@keyframes row-in { from { opacity: 0; transform: translateY(-6px); } }
.more-servers .row-rank { flex: none; width: 30px; font: 700 16px/1 var(--body); font-variant-numeric: tabular-nums; }
.more-servers .initial { width: 32px; height: 32px; border-radius: 9px; font-size: 14px; }
.more-servers .name {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 600; color: var(--text-dim);
}
.row-stats { flex: none; display: flex; gap: 12px; font: 700 16px/1 var(--body); font-variant-numeric: tabular-nums; }
.row-stats small { font: 800 8px/1 var(--display); text-transform: uppercase; letter-spacing: 0.04em; }
.more-btn { justify-self: center; padding: 10px 16px; }
.more-btn svg { width: 16px; height: 16px; transition: transform 200ms; }
.more-btn[aria-expanded="true"] svg { transform: rotate(180deg); }

@media (max-width: 760px) {
  .more-servers { grid-template-columns: 1fr; }
}

/* ---------- deco (card reveal) ---------- */

.deco {
  width: 100%; height: 100%;
  display: grid; grid-template-rows: auto 1fr auto; justify-items: center; align-items: center;
  padding-bottom: 10px;
}
.deco.instant, .deco.instant * { transition: none !important; animation: none !important; }
.deco-title { text-align: center; }
.deco-title .eyebrow { justify-content: center; }
.deco-title .headline { font-size: clamp(44px, 7vw, 104px); }
.deco-card .collectible { --w: min(270px, 62vw, max(170px, (100dvh - 420px) * 0.68)); }
.deco-card { animation: card-drop 950ms cubic-bezier(.25,1.2,.45,1) both; }
.deco.open .deco-card { animation: card-wiggle 700ms ease; }
@keyframes card-drop {
  0% { transform: translateY(-75vh) rotate(-16deg); opacity: 0; }
  12% { opacity: 1; }
  70% { transform: translateY(8px) rotate(4deg); }
  100% { transform: none; }
}
@keyframes card-wiggle {
  0% { transform: rotate(0); }
  30% { transform: rotate(-7deg) scale(1.03); }
  65% { transform: rotate(2deg); }
  100% { transform: none; }
}

/* The Reveal button and the "You're a …" line share one spot and cross-fade. */
.deco-foot { display: grid; place-items: center; min-height: 64px; }
.deco-foot > * { grid-area: 1 / 1; transition: opacity 350ms ease, transform 350ms ease; }
.deco-blurb {
  margin: 0; max-width: 40ch; text-align: center;
  font: 400 clamp(16px, 1.4vw, 19px)/1.4 var(--body); color: var(--text-dim);
  opacity: 0; transform: translateY(8px); pointer-events: none;
}
.deco-blurb b { display: inline-block; padding: 0 6px; background: var(--accent); color: var(--ink); font-weight: 600; }
.deco.open .deco-foot .btn { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.deco.open .deco-blurb { opacity: 1; transform: none; transition-delay: 450ms; pointer-events: auto; }
