/* Valor SMP, "Dusk Citadel".
   One accent (ember), sharp corners everywhere (blocks have no radius), one dark theme on purpose:
   the site is a night scene, so it does not flip with the OS theme (taste-skill 4.11 page theme lock). */

@font-face { font-family: "Cabinet Grotesk"; src: url("fonts/cabinet-grotesk-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Cabinet Grotesk"; src: url("fonts/cabinet-grotesk-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Cabinet Grotesk"; src: url("fonts/cabinet-grotesk-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Grenze Gotisch"; src: url("fonts/grenze-gotisch.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }

:root {
  color-scheme: dark;
  --night: #14111a;
  --night-2: #1b1722;
  --night-3: #262030;
  --sculk: #0c1716;
  --sculk-2: #12211f;
  --ink: #efe9e1;
  --ink-2: #bdb4aa;
  --ink-3: #958c83;
  --line: rgb(239 233 225 / .12);
  --line-2: rgb(239 233 225 / .22);
  --ember: #e39a3b;
  --ember-lit: #f2b562;
  --ember-ink: #1c1206;

  --heading: "Grenze Gotisch", "Cabinet Grotesk", Georgia, serif;
  --display: "Cabinet Grotesk", "Avenir Next", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
  --nav-h: 68px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 500 17px/1.6 var(--display);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
::selection { background: var(--ember); color: var(--ember-ink); }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ember); color: var(--ember-ink); padding: 10px 14px; font-weight: 700; }
.skip:focus { top: 12px; }

/* ------------------------------------------------------------ type */
/* big headings in Grenze Gotisch (blackletter); h3 and smaller stay in Cabinet Grotesk for legibility */
h1, h2 { font-family: var(--heading); font-weight: 800; letter-spacing: .005em; text-wrap: balance; }
h3 { font-family: var(--display); font-weight: 800; letter-spacing: -.025em; text-wrap: balance; }
h1 { font-size: clamp(2.9rem, 7vw, 6.2rem); line-height: .98; }
h2 { font-size: clamp(2.2rem, 4.6vw, 3.9rem); line-height: 1.02; }
h3 { font-size: 1.3rem; line-height: 1.2; letter-spacing: -.01em; font-weight: 700; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.5; color: var(--ink-2); max-width: 46ch; }
.body { color: var(--ink-2); max-width: 62ch; }
.body + .body { margin-top: 1em; }
.mono { font-family: var(--mono); font-weight: 500; letter-spacing: 0; }
em.ember, .ember { color: var(--ember); font-style: normal; }

/* ------------------------------------------------------------ buttons */
.btn {
  --bg: transparent; --fg: var(--ink); --bd: var(--line-2);
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 20px;
  background: var(--bg); color: var(--fg); border: 1px solid var(--bd);
  font: 700 1rem/1 var(--display); letter-spacing: .005em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .12s var(--ease);
}
.btn:hover { --bd: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn--ember { --bg: var(--ember); --fg: var(--ember-ink); --bd: var(--ember); }
.btn--ember:hover { --bg: var(--ember-lit); --bd: var(--ember-lit); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn .mono { font-size: .92rem; }
.btn-copy[data-state="done"] .copy-label::after { content: " ✓"; }

/* ------------------------------------------------------------ nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  transition: background .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-solid { background: rgb(20 17 26 / .82); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-color: var(--line); }
.nav .wrap { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.35rem/1 var(--heading); letter-spacing: .01em; }
.brand img { width: 32px; height: 32px; image-rendering: pixelated; }
.nav-links { display: flex; gap: 24px; margin-left: auto; font-size: .95rem; color: var(--ink-2); }
.nav-links a { text-decoration: none; padding: 6px 0; transition: color .2s; white-space: nowrap; }
.nav-links a:hover { color: var(--ink); }
.nav .btn { min-height: 40px; padding: 0 16px; font-size: .95rem; }
/* Eight links (the home page's) need ~1000px on one line even with the tighter gaps; below that they go. */
@media (max-width: 1100px) { .nav .wrap { gap: 20px; } .nav-links { gap: 16px; } }
@media (max-width: 1000px) { .nav-links { display: none; } .nav .btn { margin-left: auto; } }
@media (max-width: 380px) { .brand span { display: none; } }

/* ------------------------------------------------------------ phone menu
   Where the links fold away (1000px above), .nav-toggle drops them as a panel under the bar.
   assets/nav.js sets .is-open; without JS the button stays hidden. */
.nav-toggle { display: none; }
@media (max-width: 1000px) {
  .nav-toggle {
    display: grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0;
    background: transparent; border: 1px solid var(--line-2); cursor: pointer; transition: border-color .2s;
  }
  .no-js .nav-toggle { display: none; }
  .nav-toggle:hover, .nav.is-open .nav-toggle { border-color: var(--ink); }
  /* three bars from one span; the outer two cross into an X */
  .nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 18px; height: 2px; background: currentColor; }
  .nav-toggle span { position: relative; transition: background-color .15s; }
  .nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; transition: transform .25s var(--ease); }
  .nav-toggle span::before { top: -6px; }
  .nav-toggle span::after { top: 6px; }
  .nav.is-open .nav-toggle span { background-color: transparent; }
  .nav.is-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
  .nav.is-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

  .nav.is-open { background: var(--night); border-color: var(--line); }
  .nav.is-open .nav-links {
    display: flex; flex-direction: column; gap: 0; margin: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    max-height: calc(100svh - var(--nav-h)); overflow-y: auto; overscroll-behavior: contain;
    padding: 4px var(--gutter) 20px; background: var(--night); border-bottom: 1px solid var(--line);
    box-shadow: 0 40px 80px rgb(0 0 0 / .6);
    font-size: 1.15rem; animation: nav-drop .25s var(--ease);
  }
  .nav.is-open .nav-links a { display: flex; align-items: center; min-height: 54px; padding: 0; border-bottom: 1px solid var(--line); }
  .nav.is-open .nav-links a:last-child { border-bottom: 0; }
  .nav.is-open .nav-links a[aria-current="page"] { color: var(--ember); }
}
/* the bar holds brand, button and menu on a 375px phone only with tighter spacing */
@media (max-width: 480px) { .nav .wrap { gap: 12px; } .nav .btn { padding: 0 12px; } }
@keyframes nav-drop { from { opacity: 0; transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .nav.is-open .nav-links { animation: none; } .nav-toggle span::before, .nav-toggle span::after { transition: none; } }

/* ------------------------------------------------------------ hero */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; isolation: isolate; overflow: clip; }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 58% 50%; transform-origin: 60% 55%; animation: hero-settle 2.4s var(--ease) both; }
@keyframes hero-settle { from { transform: scale(1.08); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgb(20 17 26 / .86) 0%, rgb(20 17 26 / .55) 38%, rgb(20 17 26 / 0) 66%),
    linear-gradient(180deg, rgb(20 17 26 / .5) 0%, rgb(20 17 26 / 0) 22%, rgb(20 17 26 / 0) 62%, var(--night) 100%);
}
.hero-copy { padding-block: calc(var(--nav-h) + 48px) clamp(56px, 12vh, 120px); max-width: 760px; }
.hero h1 { margin-top: 20px; }
.hero .lede { margin-top: 22px; color: #d6cec4; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.status { display: inline-flex; align-items: center; gap: 10px; font: 500 .85rem/1 var(--mono); color: var(--ink-2); }
.status-dot { width: 8px; height: 8px; background: var(--ink-3); flex: none; }
.status[data-online="true"] .status-dot { background: #7fcf6a; box-shadow: 0 0 0 4px rgb(127 207 106 / .16); animation: pulse 2.4s ease-in-out infinite; }
.status[data-online="false"] .status-dot { background: #c9584c; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgb(127 207 106 / 0); } }
.hero-reveal > * { animation: rise .9s var(--ease) both; }
.hero-reveal > :nth-child(2) { animation-delay: .12s; }
.hero-reveal > :nth-child(3) { animation-delay: .22s; }
.hero-reveal > :nth-child(4) { animation-delay: .32s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ sections */
.section { padding-block: clamp(88px, 12vw, 160px); position: relative; }
.section-head { max-width: 820px; }
.section-head .lede { margin-top: 20px; }

/* manifesto: one big statement, then the reasons it holds */
.manifesto { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 120px); align-items: start; }
.manifesto h2 { font-size: clamp(2.4rem, 5.2vw, 4.4rem); }
.manifesto h2 .ember { display: block; }
.manifesto .closing { margin-top: 32px; font-size: 1.2rem; line-height: 1.45; color: var(--ink); max-width: 30ch; }
.reasons { border-top: 1px solid var(--line-2); }
.reasons li { padding: 26px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 5.5rem 1fr; gap: 20px; align-items: baseline; }
.reasons .num { font: 800 2.4rem/1 var(--display); color: var(--ember); letter-spacing: -.03em; }
.reasons h3 { margin-bottom: 6px; }
.reasons p { color: var(--ink-2); }
@media (max-width: 860px) { .manifesto { grid-template-columns: 1fr; } }

/* world: a full-bleed player build opens it, then the strip of screenshots */
.world { padding-bottom: clamp(88px, 12vw, 160px); }
.statement { position: relative; isolation: isolate; min-height: min(100svh, 62vw); display: grid; align-items: end; overflow: clip; }
.statement-media { position: absolute; inset: 0; z-index: -2; }
.statement-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.statement::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--night) 0%, rgb(20 17 26 / 0) 9%, rgb(20 17 26 / 0) 68%, rgb(20 17 26 / .82) 90%, var(--night) 100%); }
.statement-copy { padding-block: 120px clamp(40px, 6vw, 72px); }
.statement-copy h2 { max-width: 16ch; }
.statement-copy .lede { margin-top: 18px; color: #d6cec4; }
@media (max-width: 760px) { .statement { min-height: 88svh; } .statement-media img { object-position: 50% 30%; } }

/* gallery: horizontal strip of real screenshots */
.gallery-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: clamp(32px, 4vw, 56px); }
.gallery-label { font: 500 .9rem/1 var(--mono); color: var(--ink-3); }
.gallery-nav { display: flex; gap: 8px; }
.gallery-nav button { width: 48px; height: 48px; display: grid; place-items: center; background: transparent; border: 1px solid var(--line-2); cursor: pointer; transition: border-color .2s, background .2s; }
.gallery-nav button:hover { border-color: var(--ink); }
.gallery-nav button:disabled { opacity: .35; cursor: default; }
.gallery-nav svg { width: 20px; height: 20px; }
.gallery {
  margin-top: 24px; display: grid; grid-auto-flow: column; grid-auto-columns: min(82vw, 980px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2)); scroll-padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2));
}
.gallery::-webkit-scrollbar { display: none; }
.shot { scroll-snap-align: start; }
.shot-frame { aspect-ratio: 21 / 9; overflow: hidden; background: var(--night-2); }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.shot:hover img { transform: scale(1.03); }
.shot figcaption { margin-top: 14px; display: flex; gap: 14px; align-items: baseline; color: var(--ink-2); font-size: .98rem; }
.shot figcaption strong { color: var(--ink); font-weight: 700; }
.shot--todo .shot-frame { display: grid; place-items: center; border: 1px dashed var(--line-2); color: var(--ink-3); font: 500 .85rem var(--mono); }
.extras { margin-top: 56px; display: flex; flex-wrap: wrap; gap: 10px 28px; color: var(--ink-2); }
.extras li { display: flex; align-items: center; gap: 10px; }
.extras li::before { content: ""; width: 6px; height: 6px; background: var(--ember); }

/* underworld: the one section with its own mood (teal-black), still the same accent */
.underworld { background: linear-gradient(180deg, var(--night) 0, var(--sculk) 140px, var(--sculk) calc(100% - 140px), var(--night) 100%); }
.uw-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.uw-copy { position: sticky; top: calc(var(--nav-h) + 40px); }
.uw-copy h2 { max-width: 12ch; }
.uw-copy .lede { margin-top: 20px; }
.uw-facts { margin-top: 36px; display: grid; gap: 22px; }
.uw-facts dt { font-weight: 700; color: var(--ink); }
.uw-facts dd { color: var(--ink-2); margin-top: 4px; }
.potions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.potions li { font: 500 .8rem/1 var(--mono); padding: 7px 9px; border: 1px solid rgb(239 233 225 / .14); color: var(--ink-2); }
.viewer { position: relative; aspect-ratio: 1 / 1; background: radial-gradient(70% 60% at 50% 55%, #173431 0%, var(--sculk) 70%); border: 1px solid rgb(120 220 205 / .12); overflow: hidden; touch-action: pan-y; }
.viewer canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; cursor: grab; }
.viewer canvas:active { cursor: grabbing; }
.viewer-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 6%; transition: opacity .6s var(--ease); }
.viewer.is-live .viewer-fallback { opacity: 0; pointer-events: none; }
.viewer-ui { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 14px; font: 500 .8rem/1.2 var(--mono); color: var(--ink-2); opacity: 0; transition: opacity .4s; }
.viewer.is-live .viewer-ui { opacity: 1; }
.viewer-ui label { display: flex; align-items: center; gap: 12px; flex: 1; background: rgb(12 23 22 / .72); backdrop-filter: blur(8px); padding: 10px 14px; border: 1px solid rgb(239 233 225 / .1); }
.viewer-ui input[type=range] { flex: 1; accent-color: var(--ember); }
.viewer-note { margin-top: 14px; color: var(--ink-3); font-size: .9rem; }
@media (max-width: 960px) { .uw-grid { grid-template-columns: 1fr; } .uw-copy { position: static; } }

/* relics: bento, 3D items drawn by one shared canvas over the grid */
.relics-head { max-width: 860px; }
.relics-head h2 { max-width: 18ch; }
.relics-head .body:first-of-type { margin-top: 22px; }
.bento { position: relative; margin-top: 56px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.relic { position: relative; background: var(--night-2); border: 1px solid var(--line); padding: 24px; min-height: 300px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.relic:nth-child(1) { grid-column: span 3; grid-row: span 2; min-height: 520px; background: radial-gradient(80% 70% at 50% 38%, #3a2614 0%, var(--night-2) 70%); }
.relic:nth-child(2) { grid-column: span 3; }
.relic:nth-child(3) { grid-column: span 3; }
.relic:nth-child(4), .relic:nth-child(5) { grid-column: span 3; }
.relic-stage { position: absolute; inset: 0 0 38% 0; }
.relic:nth-child(1) .relic-stage { inset: 0 0 26% 0; }
.relic-sprite { position: absolute; left: 50%; top: 42%; width: 96px; height: 96px; transform: translate(-50%, -50%); image-rendering: pixelated; background-image: url("data/relics.png"); background-size: 500% 100%; transition: opacity .5s; }
.relic:nth-child(1) .relic-sprite { width: 160px; height: 160px; top: 40%; }
.bento.is-live .relic-sprite { opacity: 0; }
.relic-copy { position: relative; }
.relic h3 { color: var(--ember); }
.relic p { margin-top: 8px; color: var(--ink-2); font-size: .98rem; max-width: 42ch; }
.relic .ench { margin-top: 12px; font: 500 .78rem/1.5 var(--mono); color: var(--ink-3); }
.relics-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
@media (max-width: 760px) {
  .bento { grid-template-columns: 1fr; }
  .relic, .relic:nth-child(n) { grid-column: auto; grid-row: auto; min-height: 320px; }
  .relic:nth-child(1) { min-height: 400px; }
}

/* market: two columns, earn and spend */
.market { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); margin-top: 56px; }
.ledger h3 { font-size: 1rem; font-family: var(--mono); font-weight: 500; color: var(--ink-3); letter-spacing: 0; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.ledger li { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.ledger li span:first-child { color: var(--ink); font-weight: 700; }
.ledger li span:last-child { color: var(--ink-2); text-align: right; }
.ledger a { color: var(--ember); text-underline-offset: 4px; }
.market-note { margin-top: 28px; color: var(--ink-2); max-width: 52ch; }
@media (max-width: 860px) { .market { grid-template-columns: 1fr; } }

/* live map band */
.mapband { position: relative; isolation: isolate; overflow: clip; border-block: 1px solid var(--line); }
.mapband-media { position: absolute; inset: 0 0 0 auto; width: min(62%, 1100px); z-index: -2; }
.mapband-media img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 40%; filter: saturate(.85) brightness(.8); }
.mapband::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--night) 38%, rgb(20 17 26 / .55) 60%, rgb(20 17 26 / .1) 85%); }
@media (max-width: 760px) { .mapband-media { width: 100%; opacity: .35; } .mapband::before { background: linear-gradient(180deg, var(--night), rgb(20 17 26 / .7)); } }
.mapband .wrap { padding-block: clamp(80px, 10vw, 140px); }
.mapband h2 { max-width: 14ch; }
.mapband .lede { margin-top: 18px; }
.mapband .btn { margin-top: 30px; }
.online { margin-top: 36px; }
.online-label { font: 500 .85rem/1 var(--mono); color: var(--ink-3); }
.online ul { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; max-width: 640px; }
.online li { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; background: rgb(20 17 26 / .7); border: 1px solid var(--line); font: 500 .85rem/1 var(--mono); }
.online li .head { width: 22px; height: 22px; }

/* client rules */
.rules { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); margin-top: 48px; }
.rules h3 { padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.rules ul { margin-top: 6px; }
.rules li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; color: var(--ink-2); }
.rules .yes li::before { content: "+"; color: #8fcf7a; font-family: var(--mono); }
.rules .no li::before { content: "×"; color: #d66a5c; font-family: var(--mono); }
.rules .pvp p { margin-top: 18px; color: var(--ink-2); }
.rules .pvp p strong { color: var(--ink); }
@media (max-width: 900px) { .rules { grid-template-columns: 1fr 1fr; } .rules .pvp { grid-column: 1 / -1; } }
@media (max-width: 560px) { .rules { grid-template-columns: 1fr; } }

/* join */
.join { position: relative; isolation: isolate; overflow: clip; }
.join-media { position: absolute; inset: 0; z-index: -2; }
.join-media img { width: 100%; height: 100%; object-fit: cover; }
.join::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--night) 0%, rgb(20 17 26 / .7) 30%, rgb(20 17 26 / .78) 100%); }
.join .wrap { padding-block: clamp(120px, 16vw, 220px) clamp(80px, 10vw, 140px); }
.join h2 { font-size: clamp(2.6rem, 6vw, 5rem); }
.steps { margin-top: 48px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line-2); max-width: 1040px; }
.steps li { padding: 24px 28px 0 0; }
.steps li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.steps h3 { font-size: 1.15rem; }
.steps p { margin-top: 8px; color: var(--ink-2); font-size: .98rem; }
.steps code { font-family: var(--mono); color: var(--ember); font-size: .95em; }
.join-actions { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } .steps li, .steps li + li { padding: 20px 0; border-left: 0; border-bottom: 1px solid var(--line); } }

/* footer */
.foot { border-top: 1px solid var(--line); padding-block: 40px 56px; color: var(--ink-3); font-size: .92rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; }
.foot .brand { color: var(--ink); }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { text-decoration: none; color: var(--ink-2); }
.foot a:hover { color: var(--ink); }
.foot .legal { margin-left: auto; text-align: right; line-height: 1.6; }
@media (max-width: 760px) { .foot .legal { margin-left: 0; width: 100%; text-align: left; } }


/* ------------------------------------------------------------ the Pit of the Nine */
/* A night-sky stage (pit.js draws stars and rising end-rod motes on .pit-sky), the render with bloomed beams, then the
   nine seals as stones set in a ring around the Heart. --key is each seal's beam colour. */
.pit { overflow: hidden; isolation: isolate;
  background: radial-gradient(55% 45% at 72% 38%, #2a1838 0%, transparent 70%), radial-gradient(40% 35% at 30% 85%, #1a1430 0%, transparent 70%), #0e0b14; }
.pit::after { content: ""; position: absolute; inset: auto 0 0; height: 180px; z-index: -1; pointer-events: none; background: linear-gradient(transparent, var(--night)); }
.pit-sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.pit-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.pit-kicker { font: 500 .8rem/1.5 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: #c58bea; margin-bottom: 14px; }
.pit-copy h2 { max-width: 14ch; font-size: clamp(2.6rem, 5.4vw, 4.6rem); }
.pit-copy .lede { margin-top: 20px; }
.pit-copy .body { margin-top: 18px; }
.pit-stage { position: relative; }
.pit-view { position: relative; width: min(100%, 560px); margin-inline: auto;
  --fade: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent), linear-gradient(180deg, transparent, #000 8%, #000 78%, transparent);
  -webkit-mask-image: var(--fade); -webkit-mask-composite: source-in; mask-image: var(--fade); mask-composite: intersect; }
.pit-view img { display: block; width: 100%; height: auto; }
.pit-beam, .pit-bloom { position: absolute; inset: 0; mix-blend-mode: screen; opacity: 0; transition: opacity 1.2s var(--ease); pointer-events: none; }
.pit-bloom { filter: blur(14px) saturate(1.6) brightness(1.5); }
.pit-beam.is-lit { opacity: 1; animation: pit-burn 5s ease-in-out infinite; }
.pit-bloom.is-lit { opacity: .9; animation: pit-burn 5s ease-in-out infinite; }
.pit-beam.is-focus:not(.is-lit) { opacity: .35; }
.pit-bloom.is-focus { opacity: 1; }
.pit-beam.is-hunt, .pit-bloom.is-hunt { animation: pit-stir 2.4s ease-in-out infinite; }
@keyframes pit-burn { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.25); } }
.pit-bloom.is-lit { animation-name: pit-bloom; }
@keyframes pit-bloom { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
@keyframes pit-stir { 0%, 100% { opacity: .08; } 50% { opacity: .5; } }

/* live hunts, in the copy column */
.pit-hunts { margin-top: 26px; display: grid; gap: 10px; }
.pit-hunts:empty { display: none; }
.pit-hunt { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center; padding: 14px 16px;
  background: color-mix(in srgb, var(--key) 9%, rgb(14 11 20 / .8)); border: 1px solid color-mix(in srgb, var(--key) 45%, transparent);
  box-shadow: 0 0 32px -8px color-mix(in srgb, var(--key) 55%, transparent); color: var(--ink); }
.pit-hunt img { grid-row: span 2; width: 40px; height: 40px; image-rendering: pixelated; filter: drop-shadow(0 0 8px var(--key)); animation: pit-float 3s ease-in-out infinite; }
.pit-hunt small { display: flex; align-items: center; gap: 8px; color: var(--key); font: 500 .74rem/1.5 var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.pit-hunt small::before { content: ""; width: 7px; height: 7px; background: var(--key); box-shadow: 0 0 10px var(--key); animation: pit-dot 1.4s ease-in-out infinite; }
.pit-hunt a { color: var(--ink); font-weight: 700; text-underline-offset: 3px; }
.pit-hunt .hunt-bar { grid-column: 1 / -1; height: 3px; margin-top: 8px; background: rgb(239 233 225 / .1); }
.pit-hunt .hunt-bar i { display: block; height: 100%; width: var(--left); background: var(--key); box-shadow: 0 0 10px var(--key); }
@keyframes pit-dot { 50% { opacity: .25; } }
@keyframes pit-float { 50% { transform: translateY(-3px); } }

/* the seal ring */
.pit-seals { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: center; margin-top: clamp(56px, 8vw, 104px); }
.seal-wheel { position: relative; width: min(100%, 560px); aspect-ratio: 1; margin-inline: auto; container-type: inline-size; --r: 38cqi; --stone: clamp(50px, 14cqi, 76px); }
/* the dais: a worn obsidian disc with a faint rune band, so the ring reads as a thing in the world */
.seal-wheel::before { content: ""; position: absolute; inset: 4%; border-radius: 50%;
  background: radial-gradient(circle, transparent 0 30%, rgb(255 255 255 / .03) 30.5% 31%, transparent 31.5% 60%, rgb(197 139 234 / .07) 60.5% 61.5%, transparent 62% 86%, rgb(197 139 234 / .1) 86.5% 87.5%, transparent 88%),
    radial-gradient(circle at 50% 40%, #1e1729, #0d0a13 72%);
  box-shadow: inset 0 0 60px rgb(0 0 0 / .8), 0 30px 80px -20px rgb(0 0 0 / .9); }
.seal-wheel::after { content: ""; position: absolute; inset: 4%; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgb(239 233 225 / .05) 0 .6deg, transparent .6deg 6deg);
  -webkit-mask: radial-gradient(circle, transparent 0 86%, #000 86.5% 88%, transparent 88.5%); mask: radial-gradient(circle, transparent 0 86%, #000 86.5% 88%, transparent 88.5%);
  animation: seal-turn 120s linear infinite; }
@keyframes seal-turn { to { transform: rotate(1turn); } }
.seal-ring { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.seal { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.seal-ley { position: absolute; left: 0; top: -1px; width: calc(var(--r) - var(--stone) * .5); height: 2px; transform-origin: 0 50%; transform: rotate(var(--a));
  background: linear-gradient(90deg, transparent 12%, rgb(239 233 225 / .07)); transition: background .6s, box-shadow .6s; }
.seal.is-lit .seal-ley { background: linear-gradient(90deg, transparent 8%, var(--key)); box-shadow: 0 0 12px var(--key); opacity: .85; }
.seal.is-hunt .seal-ley { background: repeating-linear-gradient(90deg, var(--key) 0 6px, transparent 6px 14px); opacity: .7; animation: ley-flow 1s linear infinite; }
@keyframes ley-flow { from { background-position: 0 0; } to { background-position: -14px 0; } }
.seal-stone { position: absolute; left: calc(cos(var(--a)) * var(--r)); top: calc(sin(var(--a)) * var(--r)); translate: -50% -50%;
  display: grid; place-items: center; width: var(--stone); height: var(--stone); padding: 0; cursor: pointer;
  background: linear-gradient(145deg, #2a2433, #141019 70%); border: 1px solid rgb(239 233 225 / .14);
  box-shadow: inset 2px 2px 0 rgb(255 255 255 / .06), inset -3px -3px 0 rgb(0 0 0 / .45), 0 6px 18px rgb(0 0 0 / .6);
  transition: transform .35s var(--ease), border-color .35s, box-shadow .35s; }
.seal-stone img { width: 62%; height: 62%; image-rendering: pixelated; filter: grayscale(1) brightness(.4) contrast(1.2); opacity: .75; transition: filter .5s, opacity .5s, transform .35s var(--ease); }
/* sealed stones carry a chiselled cross-hatch, the "lock" that breaks when the key arrives */
.seal-stone::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(45deg, transparent 47%, rgb(0 0 0 / .5) 47% 53%, transparent 53%), linear-gradient(-45deg, transparent 47%, rgb(0 0 0 / .5) 47% 53%, transparent 53%); opacity: .55; transition: opacity .5s; }
.seal-stone:hover, .seal-stone:focus-visible, .seal.is-focus .seal-stone { transform: scale(1.08); border-color: color-mix(in srgb, var(--key) 70%, transparent); outline: none; }
.seal-stone:focus-visible { box-shadow: 0 0 0 2px var(--night), 0 0 0 4px var(--key); }
.seal.is-focus .seal-stone img, .seal-stone:hover img { filter: grayscale(.4) brightness(.8); opacity: 1; }
.seal.is-lit .seal-stone { background: linear-gradient(145deg, color-mix(in srgb, var(--key) 30%, #2a2433), #160f1d 75%); border-color: color-mix(in srgb, var(--key) 75%, transparent);
  box-shadow: inset 0 0 18px color-mix(in srgb, var(--key) 40%, transparent), 0 0 28px -2px var(--key), 0 6px 18px rgb(0 0 0 / .6); }
.seal.is-lit .seal-stone::before { opacity: 0; }
.seal.is-lit .seal-stone img { filter: drop-shadow(0 0 6px var(--key)); opacity: 1; animation: pit-float 3.4s ease-in-out infinite; }
.seal.is-hunt .seal-stone { border-color: color-mix(in srgb, var(--key) 55%, transparent); animation: seal-pulse 2s ease-in-out infinite; }
.seal.is-hunt .seal-stone img { filter: grayscale(.2) brightness(.9) drop-shadow(0 0 4px var(--key)); opacity: 1; }
@keyframes seal-pulse { 50% { box-shadow: 0 0 26px -2px var(--key), 0 6px 18px rgb(0 0 0 / .6); } }
/* the 24-hour clock on a carried key: a square ring that drains as the hours run out */
.seal-clock { position: absolute; inset: -6px; padding: 2px; pointer-events: none; opacity: 0; background: conic-gradient(var(--key) var(--left, 0%), rgb(239 233 225 / .1) 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.seal.is-carried .seal-clock { opacity: 1; }
/* head of whoever broke it, pinned to the stone's corner */
.seal-stone .head { position: absolute; right: -7px; bottom: -7px; width: calc(var(--stone) * .32); height: calc(var(--stone) * .32); outline: 2px solid #0e0b14; box-shadow: 0 0 0 3px var(--key); }

.seal-heart { position: absolute; left: 50%; top: 50%; width: 15cqi; height: 15cqi; translate: -50% -50%; rotate: 45deg;
  background: linear-gradient(145deg, #2a2433, #0f0c14); border: 1px solid rgb(239 233 225 / .16); box-shadow: 0 0 40px rgb(0 0 0 / .8); }
.seal-heart span { position: absolute; inset: 28%; background: #3a3344; box-shadow: inset 0 0 6px #000; transition: background 1s, box-shadow 1s; }
/* each broken seal feeds the heart a little light */
.seal-heart { --fed: 0; }
.seal-heart span { background: color-mix(in srgb, #f3eefc calc(var(--fed) * 70%), #2b2533); box-shadow: 0 0 calc(var(--fed) * 40px) rgb(243 238 252 / calc(var(--fed) * .7)); }
.seal-heart.is-lit span { background: #fff; box-shadow: 0 0 40px 8px #fff, 0 0 120px 30px rgb(197 139 234 / .6); animation: pit-burn 3s ease-in-out infinite; }
.seal-gate { position: absolute; left: 50%; top: calc(50% + var(--r) + var(--stone) * .2); translate: -50% 0; font: 500 .7rem/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.seal-gate::before { content: ""; display: block; width: 1px; height: 18px; margin: 0 auto 8px; background: linear-gradient(transparent, var(--ink-3)); }

/* the reading panel beside the ring */
.seal-detail { position: relative; padding: clamp(24px, 3vw, 36px); min-height: 360px; background: linear-gradient(160deg, color-mix(in srgb, var(--key) 10%, #1a1522), #110d17 70%);
  border: 1px solid color-mix(in srgb, var(--key) 30%, var(--line)); box-shadow: 0 0 60px -20px color-mix(in srgb, var(--key) 50%, transparent); transition: border-color .5s, box-shadow .5s; }
.sd-key { float: right; display: grid; place-items: center; width: 84px; height: 84px; margin: 0 0 12px 16px;
  background: radial-gradient(circle, color-mix(in srgb, var(--key) 30%, transparent), transparent 70%); }
.sd-key img { width: 64px; height: 64px; image-rendering: pixelated; filter: drop-shadow(0 0 10px var(--key)); animation: pit-float 3.4s ease-in-out infinite; }
.seal-detail.is-dark .sd-key img { filter: grayscale(1) brightness(.5); animation: none; }
.sd-kicker { font: 500 .76rem/1.5 var(--mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .1em; }
.sd-name { margin-top: 6px; font: 400 clamp(2rem, 3.4vw, 2.8rem)/1 var(--heading); color: var(--ink); }
.sd-state { display: inline-block; margin-top: 14px; padding: 4px 10px; font: 600 .74rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .12em;
  color: var(--key); border: 1px solid color-mix(in srgb, var(--key) 50%, transparent); background: color-mix(in srgb, var(--key) 10%, transparent); }
.seal-detail.is-dark .sd-state { color: var(--ink-3); border-color: var(--line); background: none; }
.sd-rows { clear: both; display: grid; gap: 14px; margin-top: 22px; }
.sd-row { display: grid; gap: 6px; color: var(--ink-2); }
.sd-row small { font: 500 .72rem/1.4 var(--mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .1em; }
.sd-who { display: inline-flex; align-items: center; gap: 10px; width: fit-content; color: var(--ink); font-weight: 700; text-decoration: none; }
.sd-who:hover { text-decoration: underline; text-underline-offset: 3px; }
.sd-who .head { width: 28px; height: 28px; }
.sd-prize { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--ink); }
.sd-prize img { width: 32px; height: 32px; image-rendering: pixelated; }
.sd-prize img.is-ench { animation: ench-glint 2.6s linear infinite; }
@keyframes ench-glint { 0%, 100% { filter: drop-shadow(0 0 0 #b07cff); } 50% { filter: drop-shadow(0 0 6px #b07cff) brightness(1.3); } }
.sd-bar { height: 4px; background: rgb(239 233 225 / .1); }
.sd-bar i { display: block; height: 100%; width: var(--left); background: var(--key); box-shadow: 0 0 10px var(--key); }
.sd-hint { margin-top: 26px; font: 500 .74rem/1.5 var(--mono); color: var(--ink-3); }

/* the live-hunt pill, shown anywhere on the page while a key is out and the Pit isn't on screen */
.pit-alert { position: fixed; left: 50%; bottom: 18px; z-index: 40; display: flex; align-items: center; gap: 12px; max-width: calc(100% - 32px);
  padding: 8px 8px 8px 12px; translate: -50% 140%; opacity: 0; transition: translate .5s var(--ease), opacity .5s;
  background: rgb(14 11 20 / .92); border: 1px solid color-mix(in srgb, var(--key) 55%, transparent); box-shadow: 0 0 36px -6px color-mix(in srgb, var(--key) 70%, transparent), 0 12px 30px rgb(0 0 0 / .6);
  backdrop-filter: blur(8px); color: var(--ink); font-size: .92rem; }
.pit-alert.is-on { translate: -50% 0; opacity: 1; }
.pit-alert img { width: 28px; height: 28px; image-rendering: pixelated; flex: none; filter: drop-shadow(0 0 6px var(--key)); }
.pit-alert a { color: var(--ink); text-decoration: none; }
.pit-alert a b { color: var(--key); }
.pit-alert button { flex: none; width: 30px; height: 30px; border: 0; background: none; color: var(--ink-3); font-size: 1.1rem; cursor: pointer; }
.pit-alert button:hover { color: var(--ink); }

@media (max-width: 960px) { .pit-grid, .pit-seals { grid-template-columns: 1fr; } .pit-view { width: min(100%, 460px); } .seal-detail { min-height: 0; } }
@media (prefers-reduced-motion: reduce) {
  .pit-beam, .pit-bloom, .seal-wheel::after, .seal-ley, .seal-stone, .seal-stone img, .sd-key img, .sd-prize img, .pit-hunt img, .pit-hunt small::before, .seal-heart span { animation: none !important; }
  .pit-beam, .pit-bloom, .pit-alert { transition: none; }
}

/* ------------------------------------------------------------ scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------ phones */
.relic-copy { z-index: 3; }
@media (max-width: 760px) {
  .hero::after { background: linear-gradient(180deg, rgb(20 17 26 / .35) 0%, rgb(20 17 26 / .1) 28%, rgb(20 17 26 / .78) 58%, var(--night) 100%); }
  .hero-media img { object-position: 64% 30%; }
  .relic, .relic:nth-child(n) { min-height: 360px; }
  .relic-stage, .relic:nth-child(n) .relic-stage { inset: 0 0 46% 0; }
  .relic:nth-child(1) { min-height: 470px; }
  .relic:nth-child(1) .relic-stage { inset: 0 0 50% 0; }
  .relic:nth-child(1) .relic-sprite { width: 128px; height: 128px; }
  .shot figcaption { flex-direction: column; gap: 2px; }
}

/* ------------------------------------------------------------ factions page */
.nav-links a[aria-current="page"] { color: var(--ink); }
.f-hero { padding-block: calc(var(--nav-h) + clamp(64px, 10vw, 140px)) clamp(48px, 6vw, 88px); }
.f-hero h1 { font-size: clamp(3rem, 8vw, 7rem); line-height: .92; }
.f-hero h1 span { display: block; }
.f-hero h1 span + span { color: var(--ember); }
.f-hero .lede { margin-top: 28px; max-width: 52ch; }

.faction-list { display: grid; gap: 16px; }
.faction {
  --f: var(--ember); --f-lit: var(--ink);
  position: relative; display: grid; grid-template-columns: 1fr; gap: clamp(28px, 5vw, 72px);
  padding: clamp(28px, 4vw, 56px); overflow: hidden; isolation: isolate;
  background: var(--night-2); border: 1px solid var(--line);
}
.faction::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 90% at 12% 50%, color-mix(in srgb, var(--f) 26%, transparent), transparent 70%); }
.faction::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--f); }
.faction-art { position: relative; display: grid; place-items: center; min-height: 280px; }
.faction-art .banner { width: min(100%, 256px); height: auto; aspect-ratio: 1; image-rendering: pixelated; filter: drop-shadow(0 18px 30px rgb(0 0 0 / .45)); }
.faction-art .crest { position: absolute; right: 6%; bottom: 4%; width: 72px; height: 72px; image-rendering: pixelated; }
.faction-copy { align-self: center; }
.faction-tag { color: var(--f-lit); font-size: .95rem; }
.faction h2 { margin-top: 10px; font-size: clamp(2.8rem, 6vw, 5rem); }
.faction-about { margin: 18px 0 0; padding-left: 16px; border-left: 2px solid var(--f); color: var(--ink); font-size: 1.2rem; line-height: 1.45; max-width: 46ch; }
.faction-facts { margin-top: 28px; display: grid; grid-template-columns: auto 1fr; gap: 22px 40px; border-top: 1px solid var(--line-2); padding-top: 22px; }
.faction-facts .wide { grid-column: 1 / -1; }
.faction-facts dt { font: 500 .8rem/1 var(--mono); color: var(--ink-3); }
.faction-facts dd { margin-top: 10px; font-weight: 700; }
.roster { display: flex; flex-wrap: wrap; gap: 8px; }
.roster li { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; background: rgb(20 17 26 / .55); border: 1px solid var(--line); font: 500 .88rem/1 var(--mono); }
.roster .head { width: 20px; height: 20px; }
.roster .rank { font-size: .74rem; color: var(--ink-3); }
.faction-hq { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; padding: 20px 22px; background: rgb(20 17 26 / .55); border: 1px solid color-mix(in srgb, var(--f-lit) 30%, transparent); }
.faction-hq > div:first-child { flex: 1 1 320px; }
.faction-hq-label { color: var(--f-lit); font-size: .8rem; }
.faction-hq p:last-child { margin-top: 8px; color: var(--ink-2); max-width: 56ch; }
.faction-hq-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn--faction { --bg: var(--f-lit); --fg: #1c1206; --bd: var(--f-lit); }
.btn--faction:hover { --bg: color-mix(in srgb, var(--f-lit) 80%, #fff); --bd: var(--bg); }
@media (max-width: 860px) {
  .faction { grid-template-columns: 1fr; }
  .faction-art { min-height: 0; }
  .faction-art .banner { width: 160px; }
  .faction-facts { grid-template-columns: 1fr; }
}

.f-rules { margin-top: 48px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px clamp(32px, 5vw, 80px); }
.f-rules h3 { padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.f-rules li { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
@media (max-width: 760px) { .f-rules { grid-template-columns: 1fr; } }

.f-cta { border-top: 1px solid var(--line); }
.f-cta .wrap { padding-block: clamp(80px, 10vw, 140px); }
.f-cta h2 { font-size: clamp(2.4rem, 5vw, 4rem); }
.f-cta .lede { margin-top: 18px; }

/* a player's face cut from their skin (via /api/skin): hat layer over the face, both 8x8 of a 64x64 texture */
.head {
  display: inline-block; flex: none; width: 20px; height: 20px; background-color: var(--night-3);
  background-image: var(--skin), var(--skin);
  background-size: 800% 800%, 800% 800%;
  background-position: 71.4286% 14.2857%, 14.2857% 14.2857%;
  image-rendering: pixelated;
}

/* ------------------------------------------------------------ players: shared pieces */
/* A title as the tab list shows it: its own colours (from Valor Market's & codes) on a dark plate. */
.title-chip { display: inline-block; padding: 3px 7px; background: rgb(0 0 0 / .45); border: 1px solid var(--line); font: 700 .8rem/1.2 var(--display); letter-spacing: .01em; white-space: nowrap; }
/* A title the resource pack draws as a picture (Eggbearer, Titan): the art at about a line and a half, its overhang
   taken back by the margins so the chip keeps a text chip's height. */
.mc-glyph { display: inline-block; height: 1.5em; width: auto; margin-block: -.15em; vertical-align: middle; }
/* The art is see-through, so it sits straight on the page with no dark plate (span. outranks .lb-sub .title-chip). */
span.title-chip.is-art { padding-inline: 0; background: none; border-color: transparent; }
.faction-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border: 1px solid color-mix(in srgb, var(--f-lit) 35%, transparent); border-left: 3px solid var(--f); background: color-mix(in srgb, var(--f) 18%, var(--night)); color: var(--ink); font: 700 .82rem/1.2 var(--display); text-decoration: none; }
.faction-badge .mono { color: var(--f-lit); font-size: .78rem; }
.faction-badge:hover { border-color: var(--f-lit); }
code.mono { padding: 1px 6px; background: var(--night-3); border: 1px solid var(--line); font-size: .9em; color: var(--ink); }
a.roster-link, .online a { text-decoration: none; }
a.roster-link:hover, .online a:hover { color: var(--ember-lit); }

/* ------------------------------------------------------------ players: leaderboard */
.p-hero { padding-bottom: clamp(32px, 4vw, 56px); }
.lb { padding-bottom: clamp(80px, 10vw, 140px); }
.lb-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.lb-sorts { display: flex; flex-wrap: wrap; gap: 6px; }
.lb-sorts button { min-height: 40px; padding: 0 14px; background: transparent; border: 1px solid var(--line-2); color: var(--ink-2); font: 700 .92rem/1 var(--display); cursor: pointer; transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease); }
.lb-sorts button:hover { border-color: var(--ink); color: var(--ink); }
.lb-sorts button[aria-pressed="true"] { background: var(--ember); border-color: var(--ember); color: var(--ember-ink); }
.lb-search input { width: min(260px, 100%); min-height: 40px; padding: 0 12px; background: var(--night-2); border: 1px solid var(--line-2); color: var(--ink); font: 500 .95rem/1 var(--mono); border-radius: 0; }
.lb-search input:focus-visible { outline: 2px solid var(--ember); outline-offset: 0; border-color: transparent; }
.lb-note { margin-top: 18px; max-width: 64ch; color: var(--ink-2); font-size: .95rem; }
.lb-meta { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; }
.lb-status { color: var(--ink-3); font-size: .82rem; }
.lb-records { color: var(--ember); font-weight: 700; text-decoration: none; }
.lb-records:hover { color: var(--ember-lit); }
.lb-scroll { margin-top: 12px; }
.lb-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.lb-table th { padding: 10px 12px; border-bottom: 1px solid var(--line-2); font: 500 .76rem/1 var(--mono); color: var(--ink-3); text-align: right; white-space: nowrap; }
.lb-table th:nth-child(2) { text-align: left; }
.lb-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: right; color: var(--ink-2); white-space: nowrap; }
.lb-table th.is-sort { color: var(--ember); }
.lb-table td.is-sort { color: var(--ink); font-weight: 700; }
.lb-table tbody tr { transition: background .15s var(--ease); }
.lb-table tbody tr:hover { background: var(--night-2); }
.lb-table .lb-rank { width: 3.2em; text-align: right; color: var(--ink-3); font-size: .85rem; }
.lb-table td:nth-child(2) { text-align: left; white-space: normal; }
.lb-player { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.lb-player .head { width: 32px; height: 32px; }
.lb-who { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lb-name { font: 700 1rem/1.2 var(--mono); overflow-wrap: anywhere; }
.lb-player:hover .lb-name { text-decoration: underline; text-underline-offset: 3px; }
.lb-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lb-sub .title-chip { font-size: .72rem; padding: 2px 6px; }
.lb-tag { font-size: .72rem; color: var(--ink-3); }
@media (max-width: 760px) {
  /* Phones keep rank, player and the column being ranked by. */
  .lb-table th[data-col]:not(.is-sort), .lb-table td[data-col]:not(.is-sort) { display: none; }
  .lb-table th, .lb-table td { padding: 10px 6px; }
  .lb-search, .lb-search input { width: 100%; }
}

/* ------------------------------------------------------------ players: profile */
.pp-hero { padding-block: calc(var(--nav-h) + clamp(40px, 6vw, 88px)) clamp(32px, 4vw, 56px); }
.pp-back { display: inline-block; color: var(--ink-3); font-size: .82rem; text-decoration: none; }
.pp-back:hover { color: var(--ink); }
.pp-id { margin-top: 28px; display: flex; align-items: center; gap: clamp(18px, 3vw, 32px); }
.pp-head { width: clamp(72px, 12vw, 120px); height: clamp(72px, 12vw, 120px); box-shadow: 0 18px 40px rgb(0 0 0 / .45); }
.pp-id h1 { font: 800 clamp(2.2rem, 6vw, 4.4rem)/1 var(--display); letter-spacing: -.03em; overflow-wrap: anywhere; }
.pp-nick { margin-top: 8px; color: var(--ink-2); }
.pp-tags { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pp-tags:empty { display: none; }
.pp-tags .mc-glyph { height: 2em; margin-block: -.3em; }
.pp-meta { margin-top: 14px; color: var(--ink-3); font-size: .85rem; }
.pp-section { padding-block: clamp(28px, 4vw, 48px); border-top: 1px solid var(--line); }
.pp-h { font: 800 1.3rem/1.2 var(--display); letter-spacing: -.01em; }
.pp-note { margin-top: 6px; color: var(--ink-3); font-size: .92rem; }

.pp-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pp-kpis > div { padding: 18px 20px 20px; background: var(--night-2); border: 1px solid var(--line); }
.pp-kpis dt { font-size: .9rem; color: var(--ink-3); }
.pp-kpis dd { margin-top: 8px; font: 800 clamp(1.8rem, 3.4vw, 2.6rem)/1 var(--display); letter-spacing: -.02em; color: var(--ink); }
@media (max-width: 860px) { .pp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.pp-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px clamp(32px, 5vw, 80px); }
.pp-list { margin-top: 12px; }
.pp-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.pp-list dt { color: var(--ink-2); }
.pp-list dd { color: var(--ink); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .pp-groups { grid-template-columns: 1fr; } }

/* Titles, rarest first: legendary (one or two holders) glow in the accent, rare ones get an accent edge. */
.pp-titles { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }
.pp-title { display: inline-flex; align-items: stretch; border: 1px solid var(--line); background: rgb(0 0 0 / .3); }
.pp-title .title-chip { font-size: .88rem; padding: 6px 9px; border: 0; background: none; }
.pp-title:has(.is-art) { background: none; }
.pp-title span.title-chip.is-art { padding-inline: 9px; }
.pp-title-meta { display: flex; align-items: center; padding: 0 9px; border-left: 1px solid var(--line); color: var(--ink-3); font-size: .72rem; white-space: nowrap; }
.pp-title.is-rare { border-color: color-mix(in srgb, var(--ember) 45%, transparent); }
.pp-title.is-legendary { border-color: var(--ember); box-shadow: 0 0 0 1px rgb(227 154 59 / .25), 0 0 22px rgb(227 154 59 / .28); }
.pp-title.is-legendary .pp-title-meta { color: var(--ember-lit); border-left-color: color-mix(in srgb, var(--ember) 50%, transparent); }

/* Titles still to earn: a dashed outline (not held yet), the title in its real colours, how to get it, who has it. */
.pp-locked { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px; }
.pp-lock { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 12px 11px; border: 1px dashed var(--line-2); background: rgb(0 0 0 / .18); }
.pp-lock .title-chip { font-size: .86rem; padding: 0; border: 0; background: none; }
.pp-lock-hint { color: var(--ink-2); font-size: .9rem; line-height: 1.35; }
.pp-lock-meta { margin-top: auto; color: var(--ink-3); font-size: .72rem; }

/* Archetype and percentile badges, under the name */
.pp-arch { margin-top: clamp(24px, 3vw, 36px); padding: 20px 22px; max-width: 760px; background: var(--night-2); border: 1px solid var(--line); border-left: 3px solid var(--ember); }
.pp-arch-name { font: 800 clamp(1.7rem, 3.2vw, 2.4rem)/1 var(--heading); color: var(--ember); }
.pp-arch-the { color: var(--ink-2); }
.pp-arch-blurb { margin-top: 10px; color: var(--ink-2); max-width: 60ch; }
.pp-badges { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.pp-badges:empty { display: none; }
.pp-badge { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; background: var(--night); border: 1px solid var(--line-2); font-weight: 700; font-size: .9rem; }
.pp-badge-top { padding: 3px 6px; background: var(--ember); color: var(--ember-ink); font-size: .74rem; font-weight: 600; }

/* Activity: calendar and token graph */
.pp-activity { margin-top: 22px; display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 28px clamp(32px, 5vw, 72px); align-items: start; }
.pp-h3 { font: 700 .95rem/1.2 var(--display); color: var(--ink-2); margin-bottom: 14px; }
@media (max-width: 900px) { .pp-activity { grid-template-columns: 1fr; } }
.cal { --cell: 18px; --gap: 4px; display: flex; gap: 10px; max-width: 100%; overflow-x: auto; padding-bottom: 4px; }
/* Weekday labels sit beside rows 1, 3, 5 and 7, below the month row (its height plus the body's gap). */
.cal-days { display: grid; grid-template-rows: repeat(7, var(--cell)); gap: var(--gap); padding-top: calc(14px + var(--gap)); font: 500 .66rem/var(--cell) var(--mono); color: var(--ink-3); }
.cal-body { display: grid; gap: var(--gap); }
.cal-months, .cal-grid { display: grid; grid-template-columns: repeat(var(--weeks), var(--cell)); gap: var(--gap); }
.cal-months { height: 14px; font: 500 .66rem/14px var(--mono); color: var(--ink-3); white-space: nowrap; }
.cal-grid { grid-template-rows: repeat(7, var(--cell)); }
.cal-cell { display: block; width: var(--cell); height: var(--cell); background: var(--night-3); outline: 1px solid var(--line); outline-offset: -1px; }
.cal-1 { background: #704b28; outline: 0; }
.cal-2 { background: #a9722f; outline: 0; }
.cal-3 { background: #e39a3b; outline: 0; }
.cal-out { visibility: hidden; }
.cal-grid .cal-cell:not(.cal-out):hover { outline: 2px solid var(--ink); outline-offset: 0; }
.cal-legend { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--ink-3); }
.cal-key { display: inline-flex; align-items: center; gap: 6px; }
.cal-key .cal-cell { width: 12px; height: 12px; }

.chart-svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-base { stroke: var(--line-2); stroke-width: 1; }
.chart-tick { fill: var(--ink-3); font: 500 11px var(--mono); }
.chart-line { fill: none; stroke: var(--ember); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { fill: var(--ember); opacity: .1; }
.chart-cross { stroke: var(--ink-3); stroke-width: 1; }
.chart-dot { fill: var(--ember); stroke: var(--night); stroke-width: 2; }
.chart-hit { fill: transparent; cursor: crosshair; }
.chart-tip { position: absolute; left: 0; top: 0; z-index: 60; pointer-events: none; display: grid; gap: 2px; padding: 8px 10px; background: var(--night); border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgb(0 0 0 / .45); font-size: .82rem; white-space: nowrap; }
.chart-tip[hidden] { display: none; }
.chart-tip strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.chart-tip span { color: var(--ink-3); }
.chart-table { margin-top: 10px; font-size: .82rem; color: var(--ink-3); }
.chart-table summary { cursor: pointer; width: fit-content; }
.chart-table summary:hover { color: var(--ink); }
.chart-table table { margin-top: 8px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.chart-table th, .chart-table td { padding: 4px 16px 4px 0; text-align: left; border-bottom: 1px solid var(--line); }
.chart-table th { color: var(--ink-3); font: 500 .72rem/1 var(--mono); }
.chart-table td { color: var(--ink-2); }

/* Rivals */
.pp-rivals { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .pp-rivals { grid-template-columns: 1fr; } }
.pp-rival { padding: 20px 22px; background: var(--night-2); border: 1px solid var(--line); }
.pp-rival-label { color: var(--ink-3); font-size: .78rem; }
.pp-rival-mob { margin-top: 8px; font: 800 clamp(1.5rem, 2.6vw, 2rem)/1.05 var(--display); letter-spacing: -.02em; }
.pp-rival-count { margin-top: 6px; color: var(--ember-lit); font-weight: 700; }
.pp-rival-rest { margin-top: 14px; border-top: 1px solid var(--line); }
.pp-rival-rest li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: .92rem; }
.pp-rival-rest .mono { color: var(--ink); font-variant-numeric: tabular-nums; }

.pp-facts { grid-column: 1 / -1; display: grid; gap: 8px; padding: 16px 20px; background: var(--night-2); border: 1px solid var(--line); color: var(--ink-2); }
.pp-facts li::before { content: "◆"; color: var(--ember); margin-right: 10px; font-size: .7em; vertical-align: .15em; }

/* Timeline */
.pp-timeline { margin-top: 16px; max-width: 720px; border-left: 1px solid var(--line-2); }
.pp-event { position: relative; display: flex; align-items: baseline; gap: 16px; padding: 8px 0 8px 22px; }
.pp-event::before { content: ""; position: absolute; left: -5px; top: 15px; width: 9px; height: 9px; background: var(--night-3); outline: 1px solid var(--line-2); }
.pp-event.is-boss::before { background: var(--ember); outline: 0; }
.pp-event-day { flex: none; width: 4.2rem; color: var(--ink-3); font-size: .8rem; }
.pp-event-text { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--ink); }
.pp-event-text .title-chip { font-size: .8rem; }
.pp-event-first { padding: 2px 6px; border: 1px solid var(--ember); color: var(--ember-lit); font-size: .7rem; }

/* One series, ranked by count: accent bars (thin, square like every block on the site) from one baseline,
   the count at each bar's tip in text ink, the share on hover. */
.pp-bars { margin-top: 18px; display: grid; gap: 10px; max-width: 720px; }
.pp-bars li { display: grid; grid-template-columns: 8.5rem 1fr; align-items: center; gap: 14px; }
.pp-bar-label { color: var(--ink-2); font-size: .95rem; }
.pp-bar-track { display: flex; align-items: center; gap: 10px; min-height: 24px; }
.pp-bar { flex: none; width: max(2px, calc((100% - 6rem) * var(--r, 0))); height: 14px; background: var(--ember); }
.pp-bar-value { color: var(--ink); font-size: .85rem; font-variant-numeric: tabular-nums; }
.pp-bar-tip { color: var(--ink-3); font-size: .78rem; opacity: 0; transition: opacity .15s var(--ease); }
.pp-bars li:hover .pp-bar-tip { opacity: 1; }
.pp-bars li:hover .pp-bar { background: var(--ember-lit); }
@media (max-width: 560px) { .pp-bars li { grid-template-columns: 6.5rem 1fr; gap: 10px; } }
.pp-foot { padding-block: 8px 72px; color: var(--ink-3); font-size: .8rem; }

/* ------------------------------------------------------------ records */
.r-title span { display: block; }
.r-title span + span { color: var(--ember); }
.r-body > .lb-status { margin-top: 0; padding-bottom: 8px; }
.r-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 18px; }
@media (max-width: 1100px) { .r-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .r-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.r-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.r-card { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; background: var(--night-2); border: 1px solid var(--line); }
.r-label { color: var(--ink-3); font-size: .76rem; }
.r-who { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.r-who .head { width: 28px; height: 28px; }
.r-who-name { font: 700 1rem/1.2 var(--mono); overflow-wrap: anywhere; }
.r-who:hover .r-who-name { text-decoration: underline; text-underline-offset: 3px; }
.r-value { font: 800 1.6rem/1.05 var(--display); letter-spacing: -.02em; }
.r-sub { margin-top: auto; color: var(--ink-3); font-size: .84rem; }
.r-rare { margin-top: 16px; display: grid; gap: 10px; max-width: 820px; }
.r-rare-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 12px 16px; background: var(--night-2); border: 1px solid var(--ember); box-shadow: 0 0 18px rgb(227 154 59 / .14); }
.r-rare-row .title-chip { font-size: .9rem; padding: 5px 9px; }
.r-rare-who { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.r-rare-who .head { width: 22px; height: 22px; }
.r-rare-who .r-who-name { font-size: .9rem; }

/* --- Valor Games board (/games) ---------------------------------------------------------------
   Reuses .lb-* so the games page reads like the players table. The extras are: a per-game section,
   compact per-board tables inside it, and a tint on the three podium rows. */
.lb-game { margin-top: 44px; }
.lb-game > h3 { font: 700 clamp(1.1rem, 2.4vw, 1.5rem)/1.2 var(--display); color: var(--ink); }
.lb-game > .lb-note { margin-top: 6px; font-size: .85rem; }
.lb-board { margin-top: 20px; }
.lb-board h4 { font: 500 .78rem/1 var(--mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.lb-board .lb-hint { text-transform: none; letter-spacing: 0; color: var(--ink-3); font-weight: 400; }
.lb-table--compact { margin-top: 8px; }
.lb-table--compact td { padding: 7px 12px; }
.lb-table--compact .lb-value { color: var(--ink); font-weight: 700; }
/* Gold, silver and bronze: a left edge rather than a full row tint, so the table stays readable. */
.lb-medal td:first-child { border-left: 3px solid transparent; }
.lb-medal--1 td:first-child { border-left-color: var(--ember); }
.lb-medal--2 td:first-child { border-left-color: var(--ink-2); }
.lb-medal--3 td:first-child { border-left-color: #8a5a2b; }
.lb-medal--1 .lb-value { color: var(--ember); }
.page-games .lb-scroll { overflow-x: auto; }
@media (max-width: 760px) {
  /* Phones keep place, player and the medals; points only when the server ranks by them. */
  .page-games .lb-table .lb-boards, .page-games .lb-table:not(.is-points) .lb-points { display: none; }
  .page-games .lb-table th, .page-games .lb-table td { padding-inline: 4px; }
  /* Seventeen games would wrap into a wall of buttons; one strip that scrolls sideways instead. */
  .page-games .lb-sorts { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 6px; scrollbar-width: thin; }
  .page-games .lb-sorts button { flex: none; }
}
@media (prefers-reduced-motion: reduce) { .lb-table tbody tr { transition: none; } }
