/* =========================================================================
   World of Minecraft — v2 design.

   Layout follows the RestedXP pattern — utility bar, floating nav with a
   mega-menu, a contained hero carousel, a grid of tall art cards, a feed row,
   alternating promo bands, a centred footer — rebuilt in Minecraft's terms:
   square item-slot emblems instead of round badges, beveled emerald blocks for
   buttons, pixel display type, and Minecraft's own purple tooltip.

   Every class the shared scripts emit (site.js, db.js, classes.js, world.js)
   is styled here, so those files are reused unchanged.
   ========================================================================= */

:root {
  color-scheme: dark;

  /* night sky */
  --ground:       #14162a;
  --ground-deep:  #0d0e1c;
  --band:         #191b33;
  --stone:        #1f2240;
  --stone-raised: #262a4d;
  --stone-hi:     #30355e;
  --edge:         #2d3158;
  --edge-strong:  #3e4475;

  --ink:       #ffffff;
  --ink-dim:   #b9bddc;
  --ink-faint: #7f84ad;
  --ink-soft:  #9599c0;

  /* emerald — the one call to action */
  --cta:      #1fb84f;
  --cta-hi:   #6ff08f;
  --cta-lo:   #0f6e2c;

  /* gold — highlights */
  --brass:      #f6c945;
  --brass-lit:  #ffe58a;
  --brass-deep: #9a6f12;

  --grass:      #5fae3b;
  --grass-lit:  #8fdc5b;
  --diamond:    #4fd8ff;

  --mc-tip-bg:     rgba(16, 0, 16, 0.95);
  --mc-tip-top:    #5000ff;
  --mc-tip-bottom: #28007f;

  --ok:   #55e05f;
  --warn: #ffaa00;
  --bad:  #ff5555;

  --q-poor: #9d9d9d; --q-common: #ffffff; --q-uncommon: #1eff00; --q-rare: #0070dd;
  --q-epic: #a335ee; --q-legendary: #ff8000; --q-artifact: #e6cc80;
  --c-warrior: #c79c6e; --c-paladin: #f58cba; --c-hunter: #abd473; --c-mage: #69ccf0; --c-warlock: #9482c9;

  --display: "Pixelify Sans", ui-monospace, monospace;
  --body: "Rubik", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --t-11: 0.6875rem; --t-12: 0.75rem; --t-13: 0.8125rem; --t-14: 0.875rem;
  --t-15: 0.9375rem; --t-17: 1.0625rem; --t-21: 1.3125rem; --t-27: 1.6875rem;
  --t-34: 2.125rem;  --t-44: 2.75rem;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  --r: 6px;
  --measure: 66ch;
  --col: 1320px;
  --util-h: 40px;
  --nav-h: 76px;
}

/* =========================================================================
   Reset
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); }
body {
  margin: 0; min-height: 100svh;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body); font-size: var(--t-15); line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1 0 auto; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 700; line-height: 1.08; letter-spacing: 0.01em; text-wrap: balance; color: var(--ink); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--diamond); text-decoration-color: rgba(79, 216, 255, 0.35); text-underline-offset: 3px; }
a:hover { color: #9be9ff; text-decoration-color: currentColor; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: 0.88em; padding: 1px 5px; background: rgba(255,255,255,.06); border-radius: 3px; }
:focus-visible { outline: 2px solid var(--brass-lit); outline-offset: 2px; }
::selection { background: rgba(31, 184, 79, 0.4); color: #fff; }
.icon { width: 1em; height: 1em; flex: none; }

/* =========================================================================
   Primitives
   ========================================================================= */

.wrap { width: 100%; max-width: var(--col); margin-inline: auto; padding-inline: var(--s6); }
@media (max-width: 640px) { .wrap { padding-inline: var(--s4); } }

.skip { position: absolute; left: -9999px; top: var(--s2); z-index: 300; padding: var(--s2) var(--s4); background: var(--cta); color: #fff; font-family: var(--display); font-weight: 700; text-decoration: none; border-radius: var(--r); }
.skip:focus { left: var(--s4); }

.label { font-family: var(--display); font-size: var(--t-13); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); }
.eyebrow { font-family: var(--display); font-size: var(--t-14); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cta-hi); }
.lede { max-width: var(--measure); color: var(--ink-dim); font-size: var(--t-17); line-height: 1.7; }
.lede strong { color: var(--ink); font-weight: 600; }
.prose { max-width: var(--measure); color: var(--ink-dim); line-height: 1.72; }
.prose + .prose { margin-top: var(--s4); }
.prose strong { color: var(--ink); font-weight: 600; }
.stack { display: grid; gap: var(--s5); }
.stack--tight { gap: var(--s3); }
.split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--s7); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); gap: var(--s6); } }

.panel {
  position: relative;
  background: var(--stone);
  border: 1px solid var(--edge);
  border-radius: var(--r);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}
.rule { height: 1px; border: 0; margin: 0; background: linear-gradient(90deg, var(--edge-strong), transparent); }

/* --- emblem: a gilded crest that stands in for RestedXP's round badges ----
   Three layers: a metal rim (the element's own background), a dark well tinted
   by --e (::before), and a glass highlight (::after). The icon is a
   game-icons.net silhouette drawn in currentColor, so --e also tints it. */

.emblem {
  --e: var(--cta);
  --rim: 4px;
  position: relative;
  display: inline-grid; place-items: center;
  width: 72px; height: 72px;
  border-radius: 14px;
  background:
    linear-gradient(160deg, #fff3c4 0%, #e9be55 22%, #8a5f12 50%, #d7a73c 74%, #fff0b8 100%);
  box-shadow:
    0 0 0 2px #0a0b16,
    0 8px 18px rgba(0, 0, 0, .45),
    0 0 26px color-mix(in srgb, var(--e) 45%, transparent);
  color: color-mix(in srgb, var(--e) 38%, #fff6dc);
  isolation: isolate;
}
.emblem::before {
  content: ""; position: absolute; inset: var(--rim); z-index: -1;
  border-radius: calc(14px - var(--rim));
  background:
    radial-gradient(120% 90% at 50% 18%, color-mix(in srgb, var(--e) 55%, #23264a) 0%, color-mix(in srgb, var(--e) 22%, #14162c) 55%, #0b0c1a 100%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.6), inset 0 -10px 18px rgba(0,0,0,.45), inset 0 2px 0 rgba(255,255,255,.12);
}
.emblem::after {
  content: ""; position: absolute; inset: var(--rim); pointer-events: none;
  border-radius: calc(14px - var(--rim));
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,0) 46%);
}
.emblem .icon {
  width: 62%; height: 62%;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.7)) drop-shadow(0 0 8px color-mix(in srgb, var(--e) 70%, transparent));
}
.emblem--sm { width: 46px; height: 46px; --rim: 3px; border-radius: 10px; box-shadow: 0 0 0 2px #0a0b16, 0 4px 10px rgba(0,0,0,.4); }
.emblem--sm::before, .emblem--sm::after { border-radius: 7px; }
.emblem--xs { width: 30px; height: 30px; --rim: 2px; border-radius: 7px; box-shadow: 0 0 0 1px #0a0b16; }
.emblem--xs::before, .emblem--xs::after { border-radius: 5px; }
.emblem--xs .icon { width: 68%; height: 68%; filter: drop-shadow(0 1px 0 rgba(0,0,0,.7)); }

/* the logo mark: the isometric grass block on its own, no frame */
.brand__mark { display: grid; place-items: center; width: 56px; height: 56px; flex: none; }
.brand__mark .icon { width: 100%; height: 100%; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)) drop-shadow(0 0 14px rgba(95,174,59,.35)); transition: transform .25s ease; }
.brand:hover .brand__mark .icon { transform: translateY(-2px) rotate(-3deg); }

/* --- buttons: beveled blocks -------------------------------------------- */

.btn {
  --bg: #2f3460; --hi: #4a5091; --lo: #1a1d3a; --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 10px 26px 12px;
  background: var(--bg); color: var(--fg);
  border: 2px solid rgba(0,0,0,.85); border-radius: 4px;
  box-shadow: inset 0 3px 0 var(--hi), inset 0 -4px 0 var(--lo);
  font-family: var(--display); font-size: var(--t-17); font-weight: 700; letter-spacing: 0.02em;
  text-decoration: none; text-shadow: 2px 2px 0 rgba(0,0,0,.3);
  cursor: pointer; white-space: nowrap;
  transition: transform 0.08s ease, filter 0.15s ease;
}
.btn .icon { width: 22px; height: 22px; }
.btn:hover { color: var(--fg); filter: brightness(1.12); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 3px 0 var(--lo), inset 0 -1px 0 var(--hi); }
.btn--cta, .btn--brass { --bg: var(--cta); --hi: var(--cta-hi); --lo: var(--cta-lo); }
.btn--gold { --bg: #e9b62c; --hi: #ffe27a; --lo: #9a6f12; --fg: #2a1b02; text-shadow: 1px 1px 0 rgba(255,240,180,.5); }
.btn--ghost { --bg: rgba(255,255,255,.06); --hi: rgba(255,255,255,.12); --lo: rgba(0,0,0,.3); }
.btn--discord { --bg: #5865f2; --hi: #8a94ff; --lo: #353fb0; }
.btn--sm { min-height: 40px; padding: 6px 16px 8px; font-size: var(--t-15); }
.btn--lg { min-height: 58px; padding: 12px 34px 14px; font-size: var(--t-21); }

.tag-new { display: inline-block; padding: 3px 10px 4px; background: var(--cta); border-radius: 3px; font-family: var(--display); font-size: var(--t-12); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; box-shadow: inset 0 -2px 0 var(--cta-lo); }
.tag-new--gold { background: #e9b62c; color: #2a1b02; box-shadow: inset 0 -2px 0 #9a6f12; }
.tag-new--grey { background: #4a4f7a; box-shadow: inset 0 -2px 0 #2b2f52; }

/* =========================================================================
   Utility bar + floating nav
   ========================================================================= */

.util { position: relative; z-index: 61; height: var(--util-h); background: #0a0b17; border-bottom: 1px solid rgba(255,255,255,.04); }
.util__in { height: 100%; display: flex; align-items: center; gap: var(--s5); }
.util__brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: var(--t-15); color: #fff; text-decoration: none; letter-spacing: 0.04em; }
.util__brand .icon { width: 22px; height: 22px; }
.util__social { display: flex; gap: 10px; }
.util__social a { display: grid; place-items: center; color: var(--ink-dim); opacity: 0.9; }
.util__social a:hover { color: #fff; }
.util__social a:hover { opacity: 1; }
.util__social .icon { width: 18px; height: 18px; }
.util__links { display: flex; gap: var(--s5); margin-left: auto; }
.util__links a { color: var(--ink-dim); font-size: var(--t-13); text-decoration: none; }
.util__links a:hover { color: #fff; }
.util .pip { margin-left: var(--s2); }
@media (max-width: 900px) { .util__links { display: none; } .util .pip { margin-left: auto; } }

.pip { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-size: var(--t-13); color: var(--ink-dim); text-decoration: none; white-space: nowrap; }
.pip i { width: 8px; height: 8px; background: var(--ink-faint); flex: none; }
.pip[data-state="up"] i { background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: breathe 2.6s ease-in-out infinite; }
.pip[data-state="down"] i { background: var(--bad); }
.pip:hover { color: #fff; }

.navshell { position: sticky; top: 0; z-index: 60; padding-top: 14px; margin-bottom: -90px; pointer-events: none; }
.navbar {
  pointer-events: auto;
  position: relative;
  height: var(--nav-h);
  display: flex; align-items: center; gap: var(--s5);
  padding: 0 var(--s3) 0 var(--s4);
  background: rgba(30, 33, 64, 0.82);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; flex: none; }

.brand b { display: block; font-family: var(--display); font-size: 1.55rem; font-weight: 700; line-height: 0.95; letter-spacing: 0.01em; text-transform: uppercase; text-shadow: 2px 2px 0 #000; }
.brand b span { color: var(--cta-hi); }
.brand small { display: block; margin-top: 3px; font-family: var(--display); font-size: var(--t-12); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
.brand:hover { color: #fff; }

.nav { display: flex; align-items: stretch; height: 100%; margin-left: auto; }
.nav > a, .nav__item > button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 16px;
  background: none; border: 0;
  font-family: var(--body); font-size: 1.06rem; font-weight: 500;
  color: #e7e9f7; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.nav > a:hover, .nav__item:hover > button, .nav__item[data-open="true"] > button { color: #fff; background: rgba(255,255,255,.05); }
.nav a[aria-current="page"], .nav__item > button[aria-current="page"] { color: var(--cta-hi); }
.nav__item { position: relative; display: flex; }
.nav__item > button::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); margin-left: 4px; }
.navbar__cta { margin-left: var(--s2); }

.mega {
  position: absolute; top: calc(100% + 1px); left: 50%; transform: translateX(-50%);
  min-width: 620px;
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5);
  padding: var(--s5) var(--s6) var(--s6);
  background: linear-gradient(180deg, #23264a, #2c2f5c);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 24px 50px rgba(0,0,0,.5);
}
.mega--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); min-width: 860px; }
.mega .tag-new { margin-left: auto; }
.nav__item:hover .mega, .nav__item:focus-within .mega, .nav__item[data-open="true"] .mega { display: grid; }
.mega h4 { font-family: var(--body); font-size: var(--t-17); font-weight: 600; margin-bottom: var(--s3); }
.mega ul { list-style: none; display: grid; gap: 4px; }
.mega a { display: flex; align-items: center; gap: 12px; padding: 6px 4px; color: #dfe1f3; text-decoration: none; font-size: var(--t-15); border-radius: 4px; }
.mega a:hover { color: #fff; background: rgba(255,255,255,.05); }
.mega .tag-new { font-size: 10px; padding: 1px 6px 2px; }

.menu-btn { display: none; }

@media (max-width: 1080px) {
  .nav > a, .nav__item > button { padding: 0 11px; font-size: var(--t-15); }
  .navbar__cta span { display: none; }
  .navbar__cta { padding-inline: 14px; }
}
@media (max-width: 900px) {
  .menu-btn {
    display: inline-grid; place-items: center; width: 46px; height: 46px; margin-left: auto;
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 4px; cursor: pointer;
  }
  .menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 20px; height: 3px; background: #fff; position: relative; content: ""; }
  .menu-btn span::before { position: absolute; top: -7px; }
  .menu-btn span::after { position: absolute; top: 7px; }
  .navbar__cta { display: none; }
  .nav {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; height: auto;
    flex-direction: column; align-items: stretch;
    padding: var(--s2);
    background: #1e2140; border: 1px solid rgba(255,255,255,.08); border-radius: 8px;
    box-shadow: 0 24px 50px rgba(0,0,0,.5);
    display: none; max-height: calc(100svh - 120px); overflow-y: auto;
  }
  .nav[data-open="true"] { display: flex; }
  .nav > a, .nav__item > button { padding: 14px 12px; width: 100%; justify-content: space-between; }
  .nav__item { flex-direction: column; }
  .mega, .mega--3 { position: static; transform: none; min-width: 0; grid-template-columns: minmax(0, 1fr); padding: var(--s2) var(--s4) var(--s4); border-radius: 6px; box-shadow: none; }
  .nav__item:hover .mega { display: none; }
  .nav__item[data-open="true"] .mega { display: grid; }
  .nav > .nav__mobile-cta { display: flex; margin: var(--s2); width: auto; justify-content: center; }
}
@media (min-width: 901px) { .nav > .nav__mobile-cta { display: none; } }
@media (max-width: 460px) { .brand small { display: none; } .brand b { font-size: 1.2rem; } .brand__mark { width: 46px; height: 46px; } }

/* =========================================================================
   Hero carousel — contained, rounded, like RestedXP's slide.
   ========================================================================= */

.stage { padding-top: 112px; background: radial-gradient(90% 60% at 50% 0%, #2a2d57 0%, var(--ground) 70%); }
.stage__glow { position: absolute; inset: 0; z-index: -1; overflow: hidden; }

.slides { position: relative; aspect-ratio: 16 / 7.4; min-height: 480px; border-radius: 10px; overflow: hidden; background: #0d0e1c; box-shadow: 0 30px 60px rgba(0,0,0,.45); isolation: isolate; }
@media (max-width: 760px) { .slides { aspect-ratio: auto; min-height: 560px; } }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.8s ease, visibility 0s linear 0.8s; }
.slide[data-active="true"] { opacity: 1; visibility: visible; transition: opacity 0.8s ease; }
.slide picture, .slide > picture img { position: absolute; inset: 0; width: 100%; height: 100%; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide[data-active="true"] img { animation: kenburns 9s ease-out both; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13,14,28,.88) 0%, rgba(13,14,28,.6) 38%, rgba(13,14,28,.05) 70%), linear-gradient(0deg, rgba(13,14,28,.6), transparent 40%); }
.slide__copy {
  position: absolute; z-index: 2; left: 6%; top: 50%; transform: translateY(-50%);
  width: min(560px, 88%);
  display: grid; justify-items: center; text-align: center; gap: var(--s4);
}
.slide__copy h1, .slide__copy h2 { font-size: clamp(2.2rem, 5vw, 4.4rem); line-height: 0.95; text-transform: uppercase; text-shadow: 4px 4px 0 rgba(0,0,0,.7); }
.slide__copy h1 small, .slide__copy h2 small { display: block; font-size: 0.56em; margin-bottom: 0.1em; }
.slide__copy p { font-size: var(--t-17); color: #e6e8f5; max-width: 44ch; text-shadow: 1px 1px 2px rgba(0,0,0,.8); }
.slide__copy .btn { margin-top: var(--s2); }
@media (max-width: 760px) { .slide__copy { left: 50%; transform: translate(-50%, -50%); } .slide::after { background: rgba(13,14,28,.7); } }

.dots { position: absolute; z-index: 3; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 10px; }
.dots button { width: 14px; height: 14px; padding: 0; border: 2px solid rgba(0,0,0,.6); background: rgba(255,255,255,.75); cursor: pointer; }
.dots button[aria-current="true"] { background: var(--cta); box-shadow: 0 0 10px var(--cta); }
.slides__nav { position: absolute; z-index: 3; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; background: rgba(13,14,28,.55); border: 1px solid rgba(255,255,255,.12); border-radius: 4px; color: #fff; cursor: pointer; font-size: 22px; line-height: 1; opacity: 0; transition: opacity .2s; }
.slides:hover .slides__nav, .slides__nav:focus-visible { opacity: 1; }
.slides__nav--prev { left: 14px; } .slides__nav--next { right: 14px; }
@media (hover: none) { .slides__nav { display: none; } }

/* =========================================================================
   Sections
   ========================================================================= */

.section { padding-block: var(--s9); position: relative; }
.section--tight { padding-block: var(--s8); }
.section--band { background: var(--band); border-block: 1px solid rgba(255,255,255,.04); }
.section--deep { background: var(--ground-deep); }

.title { margin-bottom: var(--s7); text-align: center; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s4) var(--s5); }
.title h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); text-transform: uppercase; letter-spacing: 0.02em; }
.title p { flex-basis: 100%; max-width: 64ch; margin-inline: auto; color: var(--ink-dim); font-size: var(--t-17); }

.section__head { display: grid; gap: var(--s3); margin-bottom: var(--s6); max-width: 760px; }
.section__head h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.section__head:has(> .rule) { display: flex; align-items: center; gap: var(--s4); max-width: none; margin-bottom: var(--s5); }
.section__head:has(> .rule) h2 { font-size: var(--t-27); flex: none; text-transform: uppercase; }
.section__head:has(> .rule) .rule { flex: 1 1 auto; }

/* =========================================================================
   Select-your-path cards — tall art, emblem, title, subtitle.
   ========================================================================= */

.paths { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
@media (max-width: 1100px) { .paths { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 780px) { .paths { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 440px) { .paths { grid-template-columns: minmax(0, 1fr); } }

.pcard {
  --e: var(--cta);
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  aspect-ratio: 5 / 7;
  padding: var(--s5) var(--s3) var(--s5);
  border-radius: 6px;
  background: #101122;
  text-align: center; text-decoration: none; color: #fff;
  box-shadow: 0 14px 30px rgba(0,0,0,.35);
  transition: transform .25s ease, box-shadow .25s ease;
}
@media (max-width: 440px) { .pcard { aspect-ratio: 4 / 3; } }
.pcard__art { position: absolute; inset: 0; z-index: -2; }
.pcard__art img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, filter .4s ease; filter: saturate(.85) brightness(.85); }
.pcard::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, color-mix(in srgb, var(--e) 26%, transparent) 0%, transparent 35%, rgba(16,17,34,.55) 55%, rgba(16,17,34,.96) 82%); mix-blend-mode: normal; }
.pcard::after { content: ""; position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.08); border-radius: inherit; pointer-events: none; transition: border-color .25s; }
.pcard:hover { transform: translateY(-6px); color: #fff; box-shadow: 0 24px 44px rgba(0,0,0,.5), 0 0 0 2px var(--e); }
.pcard:hover .pcard__art img { transform: scale(1.07); filter: saturate(1.05) brightness(.95); }
.pcard .emblem { margin-bottom: var(--s3); }
.pcard h3 { font-size: clamp(1.4rem, 2vw, 1.75rem); text-shadow: 2px 2px 0 #000; }
.pcard .sub { margin-top: 4px; font-weight: 600; font-size: var(--t-15); color: #c9cbe3; text-shadow: 1px 1px 0 #000; }
.pcard .tag-new { position: absolute; top: 14px; right: 14px; }
.pcard--locked .pcard__art img { filter: grayscale(1) brightness(.45); }

/* =========================================================================
   Feed row — three cards
   ========================================================================= */

.feed { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
@media (max-width: 900px) { .feed { grid-template-columns: minmax(0, 1fr); } }
.post { display: flex; flex-direction: column; }
.post__img { overflow: hidden; border-radius: 6px; aspect-ratio: 3 / 2; background: #0d0e1c; }
.post__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.post:hover .post__img img { transform: scale(1.05); }
.post__meta { margin-top: var(--s4); font-size: var(--t-13); color: var(--ink-faint); }
.post h3 { margin-top: var(--s2); font-family: var(--body); font-size: var(--t-21); font-weight: 700; line-height: 1.25; }
.post p { margin-top: var(--s2); color: var(--ink-dim); font-weight: 500; font-size: var(--t-15); line-height: 1.55; flex: 1 1 auto; }
.post .btn { margin-top: var(--s4); align-self: flex-start; }

/* =========================================================================
   Promo bands — art one side, emblem + heading + copy + button the other.
   ========================================================================= */

.promo { position: relative; overflow: hidden; border-top: 1px solid rgba(255,255,255,.05); }
.promo:nth-of-type(odd) { background: var(--band); }
.promo__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s8); align-items: center; padding-block: var(--s8); }
.promo--flip .promo__art { order: 2; }
@media (max-width: 900px) { .promo__in { grid-template-columns: minmax(0, 1fr); gap: var(--s6); } .promo--flip .promo__art { order: 0; } }
.promo__art { position: relative; }
.promo__art img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; box-shadow: 0 30px 50px rgba(0,0,0,.45); }
.promo__art .float {
  position: absolute; right: -14px; bottom: -22px;
  width: 104px; height: 104px;
}
.promo--flip .promo__art .float { right: auto; left: -14px; }
.promo__copy .emblem { margin-bottom: var(--s5); }
.promo__copy h2 { font-family: var(--body); font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 700; line-height: 1.15; }
.promo__copy p { margin-top: var(--s4); color: #dcdef0; font-size: var(--t-17); line-height: 1.7; max-width: 58ch; }
.promo__copy .actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }

.checks { list-style: none; display: grid; gap: var(--s2); margin-top: var(--s4); }
.checks li { position: relative; padding-left: 30px; color: #e6e8f5; line-height: 1.5; }
.checks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' shape-rendering='crispEdges'%3E%3Cpath fill='%2355e05f' d='M7 1h2v2H7zM6 3h2v2H6zM5 4h2v2H5zM4 5h2v2H4zM1 4h2v2H1zM2 5h2v2H2zM3 6h2v2H3z'/%3E%3C/svg%3E") center / contain no-repeat; }
.checks--todo li::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' shape-rendering='crispEdges'%3E%3Cpath fill='none' stroke='%237f84ad' d='M1.5 1.5h6v6h-6z'/%3E%3C/svg%3E") center / contain no-repeat; }
.checks li span { color: var(--ink-dim); }
.checks li b { color: #fff; font-weight: 600; }

/* =========================================================================
   Stats strip
   ========================================================================= */

.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s3); list-style: none; }
@media (max-width: 1000px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stats li { display: grid; justify-items: center; text-align: center; gap: 4px; padding: var(--s5) var(--s3); background: var(--stone); border: 1px solid var(--edge); border-radius: 6px; }
.stats b { font-family: var(--display); font-size: clamp(1.6rem, 2.8vw, 2.3rem); font-weight: 700; color: #fff; line-height: 1; white-space: nowrap; }
.stats span { font-size: var(--t-14); font-weight: 500; color: var(--ink-dim); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s2); list-style: none; }
.facts li { padding: var(--s4); background: var(--stone); border: 1px solid var(--edge); border-radius: 6px; }
.facts b { display: block; font-family: var(--display); font-size: var(--t-27); color: #fff; line-height: 1.1; white-space: nowrap; }
.facts span { display: block; margin-top: 4px; font-size: var(--t-13); color: var(--ink-faint); }

/* =========================================================================
   Quest log (built / not built) and FAQ
   ========================================================================= */

.questlog { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); }
@media (max-width: 860px) { .questlog { grid-template-columns: minmax(0, 1fr); } }
.questlog .panel { padding: var(--s6); }
.questlog h3 { display: flex; align-items: center; gap: var(--s3); font-family: var(--body); font-size: var(--t-21); margin-bottom: var(--s2); }

.faq { display: grid; gap: var(--s2); max-width: 900px; margin-inline: auto; }
.faq details { background: var(--stone); border: 1px solid var(--edge); border-radius: 6px; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s4) var(--s5); font-weight: 600; font-size: var(--t-17); cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--display); font-size: 1.7rem; line-height: 1; color: var(--cta-hi); flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 var(--s5) var(--s5); color: var(--ink-dim); line-height: 1.7; }
.faq details > div p + p { margin-top: var(--s3); }

/* =========================================================================
   Inner-page banner — the hero slide, single and shorter.
   ========================================================================= */

.banner { position: relative; isolation: isolate; overflow: hidden; border-radius: 10px; min-height: 360px; display: flex; align-items: center; box-shadow: 0 30px 60px rgba(0,0,0,.4); }
.banner > picture, .banner > picture img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.banner img { object-fit: cover; }
.banner::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(13,14,28,.92) 0%, rgba(13,14,28,.7) 45%, rgba(13,14,28,.2) 100%); }
.banner__copy { padding: var(--s7) clamp(24px, 6%, 72px); max-width: 720px; display: grid; gap: var(--s4); justify-items: start; }
.banner h1 { font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1; text-transform: uppercase; text-shadow: 4px 4px 0 rgba(0,0,0,.6); }
.banner h1 small { display: block; font-size: 0.5em; color: var(--cta-hi); margin-bottom: 0.15em; }
.banner p { color: #e2e4f3; font-size: var(--t-17); line-height: 1.65; }
.banner p strong { color: #fff; }

/* =========================================================================
   Tooltip — Minecraft's own.
   ========================================================================= */

.tip {
  position: relative;
  background: var(--mc-tip-bg);
  border: 3px solid transparent;
  border-image: linear-gradient(180deg, var(--mc-tip-top), var(--mc-tip-bottom)) 1;
  outline: 3px solid var(--mc-tip-bg);
  padding: var(--s4); margin: 3px;
  box-shadow: 0 14px 34px rgba(0,0,0,.6);
  font-size: var(--t-14);
}
.tip__name { font-family: var(--display); font-size: var(--t-21); font-weight: 600; line-height: 1.2; color: var(--q, #fff); text-shadow: 2px 2px 0 color-mix(in srgb, var(--q, #fff) 25%, #000); }
.tip__sub { margin-top: 2px; font-family: var(--display); font-size: var(--t-13); color: #aaaaaa; }
.tip__lines { list-style: none; margin: var(--s3) 0 0; display: grid; gap: 2px; }
.tip__lines li { display: flex; justify-content: space-between; gap: var(--s4); color: #e8e8e8; }
.tip__lines li > span:last-child { font-family: var(--display); color: #bdbdbd; text-align: right; }
.tip__lines li.is-full { display: block; color: #bdbdbd; }
.tip__lines li.is-stat > span:last-child { color: #55ff55; }
.tip__lines li.is-note { color: #8a8a8a; font-size: var(--t-13); }
.tip__sep { height: 2px; background: rgba(80,0,255,.3); margin: var(--s3) 0; }
.tip__flavour { margin-top: var(--s3); color: #ffaa00; font-style: italic; font-size: var(--t-13); line-height: 1.5; }
.tip__foot { margin-top: var(--s3); font-family: var(--display); font-size: var(--t-12); color: #9a9a9a; display: flex; justify-content: space-between; gap: var(--s3); }
.tip .label { color: #aaaaaa; }

.q-poor { --q: var(--q-poor); } .q-common { --q: var(--q-common); } .q-uncommon { --q: var(--q-uncommon); }
.q-rare { --q: var(--q-rare); } .q-epic { --q: var(--q-epic); } .q-legendary { --q: var(--q-legendary); } .q-artifact { --q: var(--q-artifact); }
.c-warrior { --q: var(--c-warrior); --e: var(--c-warrior); } .c-paladin { --q: var(--c-paladin); --e: var(--c-paladin); }
.c-hunter { --q: var(--c-hunter); --e: var(--c-hunter); } .c-mage { --q: var(--c-mage); --e: var(--c-mage); } .c-warlock { --q: var(--c-warlock); --e: var(--c-warlock); }
.qc { color: var(--q, var(--ink)); }

/* =========================================================================
   Live status (site.js)
   ========================================================================= */

.status { display: grid; }
.status__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding-bottom: var(--s3); border-bottom: 1px solid rgba(255,255,255,.08); }
.status__state { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: var(--t-17); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.status__state i { width: 12px; height: 12px; background: currentColor; flex: none; }
.status[data-state="up"] .status__state { color: var(--ok); }
.status[data-state="up"] .status__state i { animation: breathe 2.6s ease-in-out infinite; box-shadow: 0 0 10px var(--ok); }
.status[data-state="down"] .status__state { color: var(--bad); }
.status[data-state="unknown"] .status__state { color: var(--ink-faint); }
.status .tip__lines li { color: var(--ink-dim); }
.status .tip__lines li > span:last-child { color: #fff; font-family: var(--display); }
.status__motd { margin-top: var(--s3); padding: var(--s3); background: rgba(0,0,0,.25); border-left: 3px solid var(--cta); border-radius: 0 4px 4px 0; color: var(--ink-dim); font-size: var(--t-13); line-height: 1.5; white-space: pre-wrap; }
.status__addr { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s3); }
.status__addr--withheld { display: block; padding: var(--s2) var(--s3); background: rgba(255,255,255,.02); border: 1px dashed var(--edge-strong); border-radius: 4px; font-size: var(--t-13); font-style: italic; color: var(--ink-soft); }
.status .tip__foot { color: var(--ink-faint); }
.copy { flex: none; padding: var(--s2) var(--s3); border: 1px solid var(--edge-strong); border-radius: 4px; background: var(--stone-raised); color: var(--ink-dim); font-family: var(--display); font-size: var(--t-13); cursor: pointer; }
.copy:hover { color: #fff; }

/* =========================================================================
   Card grid (inner pages)
   ========================================================================= */

.grid { display: grid; gap: var(--s4); grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid--4 { grid-template-columns: minmax(0, 1fr); } }
.grid > * { padding: var(--s5); background: var(--stone); border: 1px solid var(--edge); border-radius: 6px; }
.feat .emblem { margin-bottom: var(--s4); }
.feat h3 { font-family: var(--body); font-size: var(--t-21); font-weight: 700; margin-bottom: var(--s2); line-height: 1.25; }
.feat p { color: var(--ink-dim); font-size: var(--t-15); line-height: 1.65; }
.feat .label { display: block; margin-bottom: var(--s2); color: var(--cta-hi); }

.state { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-size: var(--t-14); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.state::before { content: ""; width: 10px; height: 10px; flex: none; background: currentColor; }
.state--built { color: var(--ok); } .state--part { color: var(--warn); } .state--todo { color: var(--ink-faint); }
.state--todo::before { background: transparent; box-shadow: inset 0 0 0 2px currentColor; }

/* =========================================================================
   Gallery (site.js)
   ========================================================================= */

.gallery { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.shot { position: relative; display: block; padding: 0; width: 100%; border: 0; border-radius: 6px; background: #0d0e1c; cursor: zoom-in; overflow: hidden; text-align: left; }
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .5s ease; }
.shot:hover { box-shadow: 0 0 0 2px var(--cta); }
.shot:hover img { transform: scale(1.06); }
.shot .cap { position: absolute; inset: auto 0 0 0; display: block; padding: var(--s6) var(--s3) var(--s3); background: linear-gradient(180deg, transparent, rgba(10,11,23,.92)); }
.shot .cap b { display: block; font-family: var(--display); font-size: var(--t-17); font-weight: 600; color: #fff; text-shadow: 2px 2px 0 #000; }
.shot .cap span { display: block; margin-top: 2px; color: #c4c7e0; font-size: var(--t-12); max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.shot:hover .cap span, .shot:focus-visible .cap span { max-height: 4em; }
dialog.lightbox { padding: 0; border: 1px solid var(--edge-strong); border-radius: 8px; overflow: hidden; background: var(--ground-deep); max-width: min(96vw, 1500px); max-height: 94vh; color: var(--ink); }
dialog.lightbox::backdrop { background: rgba(6, 7, 15, 0.92); }
dialog.lightbox img { max-height: 82vh; width: auto; max-width: 96vw; }
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s3) var(--s4); background: var(--stone); }
.lightbox__bar p { font-size: var(--t-13); color: var(--ink-dim); }
.lightbox__bar b { display: block; font-family: var(--display); font-size: var(--t-17); color: #fff; }

/* =========================================================================
   Database (db.js)
   ========================================================================= */

.db { display: grid; grid-template-columns: 250px minmax(0, 1fr) 330px; gap: 1px; background: var(--edge); border: 1px solid var(--edge); border-radius: 8px; overflow: clip; align-items: stretch; min-height: 60vh; }
.db > * { background: var(--ground); }
.sticky { position: sticky; top: calc(var(--nav-h) + 24px); padding: var(--s4); max-height: calc(100svh - var(--nav-h) - 40px); overflow-y: auto; }

.db__tabs { display: flex; gap: var(--s2); overflow-x: auto; scrollbar-width: none; padding-bottom: var(--s4); }
.db__tabs::-webkit-scrollbar { display: none; }
.db__tabs button { padding: 10px 20px 12px; border: 2px solid rgba(0,0,0,.85); border-radius: 4px; background: #2f3460; box-shadow: inset 0 3px 0 #4a5091, inset 0 -4px 0 #1a1d3a; color: #dfe1f3; font-family: var(--display); font-size: var(--t-15); font-weight: 600; cursor: pointer; white-space: nowrap; }
.db__tabs button:hover { filter: brightness(1.12); color: #fff; }
.db__tabs button[aria-selected="true"] { background: var(--cta); box-shadow: inset 0 3px 0 var(--cta-hi), inset 0 -4px 0 var(--cta-lo); color: #fff; }
.db__tabs .count { opacity: 0.65; font-weight: 400; margin-left: 6px; }

.filters h2 { font-size: var(--t-15); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; margin: 0; }
.fset { margin-top: var(--s5); }
.fset > .label { display: block; margin-bottom: var(--s2); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s1); list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid var(--edge); border-radius: 4px; background: var(--stone); color: var(--ink-dim); font-size: var(--t-13); cursor: pointer; }
.chip::before { content: ""; width: 8px; height: 8px; background: var(--q, var(--ink-faint)); flex: none; }
.chip:hover { color: #fff; border-color: var(--edge-strong); }
.chip[aria-pressed="true"] { background: rgba(31,184,79,.16); border-color: var(--cta); color: #fff; }

select, .field { width: 100%; padding: var(--s2) var(--s3); border: 1px solid var(--edge-strong); border-radius: 4px; background: #11122a; color: #fff; font-family: var(--body); font-size: var(--t-14); appearance: none; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-faint) 50%), linear-gradient(135deg, var(--ink-faint) 50%, transparent 50%); background-position: right 14px center, right 9px center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: var(--s6); }
.field:focus, select:focus { outline: 2px solid var(--cta); outline-offset: 0; }
.field::placeholder { color: var(--ink-faint); }
.range { display: flex; align-items: center; gap: var(--s2); }
.range .field { text-align: center; }
.range span { color: var(--ink-faint); font-size: var(--t-12); }

.db__main { min-width: 0; display: flex; flex-direction: column; }
.searchbar { display: flex; gap: var(--s3); padding: var(--s4); border-bottom: 1px solid var(--edge); align-items: center; background: var(--stone); }
.searchbar .field { flex: 1 1 auto; font-size: var(--t-15); padding: var(--s3); }
.searchbar .label { flex: none; white-space: nowrap; }
.resultbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s2) var(--s4); border-bottom: 1px solid var(--edge); background: var(--band); font-size: var(--t-13); color: var(--ink-faint); flex-wrap: wrap; }
.resultbar b { color: #fff; font-weight: 600; }

.tablewrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: var(--t-14); }
table.data th, table.data td { padding: 9px var(--s3); text-align: left; }
table.data thead th { position: sticky; top: 0; z-index: 2; background: var(--stone-raised); border-bottom: 1px solid var(--edge-strong); font-family: var(--display); font-size: var(--t-12); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); white-space: nowrap; }
table.data thead th button { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
table.data thead th button:hover { color: #fff; }
table.data thead th[aria-sort] button { color: var(--cta-hi); }
table.data thead th button::after { content: ""; width: 0; height: 0; }
table.data thead th[aria-sort="ascending"] button::after { border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 5px solid currentColor; }
table.data thead th[aria-sort="descending"] button::after { border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; }
table.data tbody tr { border-bottom: 1px solid rgba(255,255,255,.045); cursor: pointer; }
table.data tbody tr:nth-child(even) { background: rgba(255,255,255,.018); }
table.data tbody tr:hover { background: rgba(31,184,79,.08); }
table.data tbody tr[aria-selected="true"] { background: rgba(31,184,79,.16); box-shadow: inset 3px 0 0 var(--cta); }
table.data tbody tr:focus-visible { outline: 2px solid var(--cta-hi); outline-offset: -2px; }
td.name { font-family: var(--display); font-size: var(--t-15); font-weight: 600; color: var(--q, #fff); }
td.n { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; color: var(--ink-dim); white-space: nowrap; }
td.t { font-size: var(--t-13); color: var(--ink-faint); white-space: nowrap; }
#zones table.data { background: var(--stone); border: 1px solid var(--edge); border-radius: 6px; overflow: hidden; }
#zones table.data tbody tr { cursor: default; }

.pager { display: flex; align-items: center; justify-content: center; gap: var(--s2); padding: var(--s4); border-top: 1px solid var(--edge); }
.pager button { padding: 6px 14px 8px; border: 2px solid rgba(0,0,0,.85); border-radius: 4px; background: #2f3460; box-shadow: inset 0 2px 0 #4a5091, inset 0 -3px 0 #1a1d3a; color: #dfe1f3; font-family: var(--display); font-size: var(--t-14); cursor: pointer; }
.pager button:hover:not(:disabled) { filter: brightness(1.12); }
.pager button:disabled { opacity: 0.35; cursor: default; }
.pager .at { font-family: var(--display); font-size: var(--t-14); color: var(--ink-faint); padding-inline: var(--s2); }
.db__detail .empty { color: var(--ink-faint); font-size: var(--t-14); line-height: 1.6; padding: var(--s5) var(--s4); border: 1px dashed var(--edge-strong); border-radius: 6px; text-align: center; }
.detail__close { display: none; }
.empty-state { padding: var(--s7) var(--s5); text-align: center; color: var(--ink-dim); }
.empty-state b { display: block; font-family: var(--display); font-size: var(--t-21); color: #fff; margin-bottom: var(--s2); }
.empty-state p { max-width: 46ch; margin-inline: auto; font-size: var(--t-14); }

@media (max-width: 1180px) {
  .db { grid-template-columns: 230px minmax(0, 1fr); }
  .db__detail { position: fixed; inset: auto 0 0 0; z-index: 70; background: var(--ground-deep); border-top: 3px solid var(--mc-tip-top); box-shadow: 0 -16px 40px rgba(0,0,0,.6); display: none; }
  .db__detail[data-open="true"] { display: block; }
  .db__detail .sticky { position: static; max-height: 72svh; }
  .detail__close { display: block; width: 100%; margin-top: var(--s3); padding: var(--s3); border: 1px solid var(--edge-strong); border-radius: 4px; background: var(--stone-raised); color: var(--ink-dim); font-family: var(--display); font-size: var(--t-14); cursor: pointer; }
}
@media (max-width: 900px) {
  .db { grid-template-columns: minmax(0, 1fr); }
  .filters .sticky { position: static; max-height: none; overflow: visible; }
  .filters__body { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s4); }
  .filters__body .fset { margin-top: 0; }
}

/* =========================================================================
   Content-page parts
   ========================================================================= */

.deflist { list-style: none; display: grid; border-top: 1px solid var(--edge); }
.deflist li { display: grid; grid-template-columns: minmax(110px, 180px) minmax(0, 1fr); gap: var(--s4); padding: var(--s3) 0; border-bottom: 1px solid var(--edge); align-items: baseline; }
.deflist dt, .deflist b { font-family: var(--display); font-size: var(--t-15); font-weight: 600; color: var(--cta-hi); }
.deflist span { color: var(--ink-dim); font-size: var(--t-15); }
.deflist span strong { color: #fff; font-weight: 600; }
@media (max-width: 560px) { .deflist li { grid-template-columns: minmax(0, 1fr); gap: var(--s1); } }

.steps { list-style: none; counter-reset: step; display: grid; gap: var(--s4); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: var(--s1) var(--s4); align-items: start; }
.steps li::before { grid-column: 1; grid-row: 1 / span 2; content: counter(step); display: grid; place-items: center; width: 42px; height: 42px; background: var(--cta); color: #fff; border: 2px solid rgba(0,0,0,.85); border-radius: 4px; box-shadow: inset 0 3px 0 var(--cta-hi), inset 0 -4px 0 var(--cta-lo); font-family: var(--display); font-size: var(--t-17); font-weight: 700; }
.steps b { grid-column: 2; grid-row: 1; display: block; color: #fff; font-size: var(--t-17); font-weight: 600; }
.steps p { grid-column: 2; grid-row: 2; color: var(--ink-dim); font-size: var(--t-15); }

.notice { display: flex; gap: var(--s4); align-items: flex-start; padding: var(--s4) var(--s5); border: 1px solid rgba(255,170,0,.45); border-radius: 6px; background: rgba(255,170,0,.07); }
.notice b { display: block; color: var(--warn); font-family: var(--display); font-size: var(--t-17); font-weight: 600; margin-bottom: 2px; }
.notice p { color: var(--ink-dim); font-size: var(--t-15); line-height: 1.6; }

.classes { display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.abilities { list-style: none; display: grid; gap: 3px; margin-top: var(--s2); }
.abilities li { display: flex; justify-content: space-between; gap: var(--s3); font-size: var(--t-13); color: #bdbdbd; }
.abilities li b { color: #55ffff; font-weight: 500; }
.abilities li span { font-family: var(--display); font-size: var(--t-12); color: #8a8a8a; white-space: nowrap; }

.tags { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; }
.tags li { padding: 7px 14px; border: 1px solid var(--edge-strong); border-radius: 4px; background: var(--stone); font-weight: 500; font-size: var(--t-14); color: #fff; }

.plate img { width: 100%; border-radius: 8px; box-shadow: 0 24px 44px rgba(0,0,0,.4); }
.plate figcaption { margin-top: var(--s3); color: var(--ink-dim); font-size: var(--t-14); }
.plate figcaption b { color: #fff; }

/* =========================================================================
   Footer — centred, like the reference.
   ========================================================================= */

.foot { background: var(--ground-deep); border-top: 1px solid rgba(255,255,255,.05); padding-block: var(--s8) var(--s6); text-align: center; }
.foot .brand { justify-content: center; }
.foot__about { max-width: 58ch; margin: var(--s5) auto 0; color: #d9dbee; font-size: var(--t-15); line-height: 1.7; }
.foot__social { display: flex; justify-content: center; gap: var(--s5); margin-top: var(--s6); }
.foot__social a { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: var(--stone); border: 1px solid var(--edge); color: var(--ink-dim); transition: color .2s, background .2s, transform .2s; }
.foot__social a:hover { color: #fff; background: var(--stone-hi); }
.foot__social a:hover { opacity: 1; transform: translateY(-2px); }
.foot__social .icon { width: 26px; height: 26px; }
.foot__links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s3) var(--s6); list-style: none; margin-top: var(--s6); }
.foot__links a { color: #fff; font-weight: 700; font-size: var(--t-17); text-decoration: none; }
.foot__links a:hover { color: var(--cta-hi); }
.foot__legal { margin-top: var(--s6); display: grid; gap: 6px; color: var(--ink-faint); font-size: var(--t-13); }
.foot__legal b { color: #d9dbee; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; font-size: var(--t-14); }

/* =========================================================================
   Motion
   ========================================================================= */

@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@keyframes kenburns { from { transform: scale(1.08); } to { transform: scale(1); } }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }
html:not(.js) .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
@media (max-width: 520px) { .util__social { display: none; } .util__brand { font-size: var(--t-13); } }
/* db.js writes bare text nodes into the result bar; flex would space each one out. */
.resultbar { display: block; }
.resultbar .label { float: right; }
.foot__legal a { color: var(--ink-dim); }
.foot__legal a:hover { color: #fff; }

/* =========================================================================
   Polish pass (2026-11-07): responsive fixes and layout refinements.
   ========================================================================= */

/* min-height + aspect-ratio made the carousel grow wider than the page at
   tablet widths; a definite width makes min-height grow the height instead. */
.slides { width: 100%; }

/* Small phones: keep the menu button on screen. */
.brand { min-width: 0; }
@media (max-width: 380px) {
  .navbar { gap: var(--s2); padding-inline: var(--s3); }
  .brand { gap: 8px; }
  .brand b { font-size: 1rem; }
  .brand__mark { width: 38px; height: 38px; }
  .menu-btn { width: 42px; height: 42px; flex: none; }
  .slide__copy { width: 90%; }
  .slide__copy p { font-size: var(--t-15); }
}
.promo__art, .panel, .status { min-width: 0; }
.status__head { flex-wrap: wrap; }

/* Class / path cards: two per row on phones instead of one very tall stack. */
@media (max-width: 440px) {
  .paths { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
  .pcard { aspect-ratio: 4 / 5; padding: var(--s3) var(--s2) var(--s4); }
  .pcard .emblem { width: 56px; height: 56px; --rim: 3px; border-radius: 11px; }
  .pcard .emblem::before, .pcard .emblem::after { border-radius: 8px; }
  .pcard h3 { font-size: 1.2rem; }
  .pcard .sub { font-size: var(--t-12); }
}
.pcard .emblem { transition: transform .25s ease; }
.pcard:hover .emblem { transform: translateY(-3px) scale(1.04); }

/* Stats: the long map-size value must fit its tile. */
.stats b.long { font-size: clamp(1.15rem, 1.8vw, 1.6rem); }

/* Gallery: a mosaic with two feature tiles, so the 14 shots fill every row. */
.gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; }
.shot { height: 100%; }
.shot img { height: 100%; }
.gallery > .shot:nth-child(1), .gallery > .shot:nth-child(8) { grid-column: span 2; grid-row: span 2; }
.gallery > .shot:nth-child(1) .cap b, .gallery > .shot:nth-child(8) .cap b { font-size: var(--t-20, 1.25rem); }
@media (max-width: 1100px) {
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery > .shot:nth-child(8) { grid-column: auto; grid-row: auto; }
  .gallery > .shot:nth-child(14) { grid-column: span 2; }
}
@media (max-width: 700px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery > .shot:nth-child(1) { grid-column: span 2; grid-row: auto; }
  .gallery > .shot:nth-child(14) { grid-column: auto; }
  .gallery > .shot:nth-child(2) ~ .shot:last-child:nth-child(even) { grid-column: span 2; }
}
@media (max-width: 440px) {
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .gallery > .shot:nth-child(n) { grid-column: auto; }
}
.banner__copy { min-width: 0; }
@media (max-width: 380px) { .banner__copy { padding-inline: 20px; } }

/* ---------------------------------------------------------------------------
   Design update 2026-11-14: static data tables, class cards, the hotbar
   --------------------------------------------------------------------------- */
table.data--static tbody tr { cursor: default; }
table.data--static tbody tr:hover { background: transparent; }
table.data--static tbody tr:nth-child(even):hover { background: rgba(255,255,255,.018); }
table.data--static th[scope="row"] { font-family: var(--display); color: var(--brass); white-space: nowrap; vertical-align: top; }
table.data--static td { vertical-align: top; color: var(--ink); line-height: 1.45; }
table.data--static td small { color: var(--ink-faint); font-size: var(--t-12); }
table.data--static td .tag-new { margin-left: 4px; vertical-align: 1px; }
.tablewrap { border: 1px solid var(--edge); border-radius: 6px; background: var(--stone); }
.feat--class { border-top: 2px solid var(--e); }
.feat--class h3 { font-family: var(--display); text-shadow: 2px 2px 0 #000; }
.hotbar { list-style: none; margin: 0; padding: 6px; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px;
  background: #1b1b1b; border: 2px solid #000; box-shadow: inset 0 0 0 2px #5a5a5a; border-radius: 3px; }
.hotbar li { aspect-ratio: 1; position: relative; display: grid; place-items: center; background: #8b8b8b;
  box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #fff; color: #fff; font-family: var(--display); }
.hotbar li b { position: absolute; top: 3px; left: 5px; font-size: var(--t-12); text-shadow: 1px 1px 0 #000; }
.hotbar li span { font-size: 10px; text-shadow: 1px 1px 0 #000; margin-top: 10px; }
.hotbar li:not(.hotbar__weapon):not(.hotbar__free) { background: #4d6bb3; box-shadow: inset 2px 2px 0 #2b3d66, inset -2px -2px 0 #8fa9e8; }
.hotbar__weapon { outline: 3px solid #fff; outline-offset: -1px; z-index: 1; }
.hotbar__caption { margin: var(--s2) 0 0; text-align: center; font-size: var(--t-12); color: #8fa9e8; letter-spacing: .04em; }
@media (max-width: 440px) { .hotbar li span { display: none; } }
table.data--static { table-layout: fixed; }
table.data--static thead th:first-child, table.data--static th[scope="row"] { width: 110px; }
@media (max-width: 600px) {
  table.data--roads thead { display: none; }
  table.data--roads, table.data--roads tbody, table.data--roads tr { display: block; width: 100%; }
  table.data--roads tr { padding: var(--s3) 0; }
  table.data--roads th[scope="row"] { display: block; width: auto; padding-bottom: 2px; }
  table.data--roads td { display: block; padding-top: 4px; padding-bottom: 4px; }
  table.data--roads td:empty { display: none; }
  table.data--roads td::before { content: attr(data-label); display: block; font-family: var(--display); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); }
}

/* ---------------------------------------------------------------------------
   Apply to play (2026-11-15): the whitelist form, confirmation, rules, privacy
   --------------------------------------------------------------------------- */
.apply { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s6); align-items: start; }
@media (max-width: 960px) { .apply { grid-template-columns: minmax(0, 1fr); } }
.apply__side { display: grid; gap: var(--s4); }
.apply__side .panel { padding: var(--s5); }
.apply__side .label { display: block; margin-bottom: var(--s4); }
.apply__form { padding: var(--s6); display: grid; gap: var(--s5); }
@media (max-width: 600px) { .apply__form { padding: var(--s5) var(--s4); } }
.apply__form .field { font-size: var(--t-17); padding: 11px 12px; min-height: 46px; }
.apply__form textarea.field { min-height: 140px; resize: vertical; line-height: 1.55; }
.apply__rest { display: grid; gap: var(--s5); }
.apply__rest[hidden] { display: none; }
.fld { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 6px; }
.fld > label, .fld > legend { color: #fff; font-weight: 600; font-size: var(--t-17); padding: 0; }
.fld > legend { margin-bottom: 6px; }
.req, .opt { margin-left: 6px; font-family: var(--display); font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; vertical-align: 2px; }
.req { color: var(--brass); }
.opt { color: var(--ink-faint); }
.hint { margin: 0; color: var(--ink-dim); font-size: var(--t-14); }
.err { margin: 0; color: #ff8a8a; font-size: var(--t-14); font-weight: 500; }
.err:empty { display: none; }
.field[aria-invalid="true"] { border-color: #ff6b6b; box-shadow: 0 0 0 1px #ff6b6b; }
.mc-row { display: flex; gap: var(--s3); align-items: center; }
.mc-row .field { flex: 1; max-width: 360px; }
.mc-head { width: 64px; height: 64px; image-rendering: pixelated; border: 2px solid #000; border-radius: 4px; background: #0b0c1d; box-shadow: inset 0 0 0 2px rgba(255,255,255,.12); flex: none; }
.mc-head--lg { width: 96px; height: 96px; margin: 0 auto var(--s4); display: block; }
.mc-head[hidden] { display: none; }
.status-line { margin: 0; min-height: 1.4em; font-size: var(--t-14); color: var(--ink-dim); }
.status-line.is-ok { color: var(--cta-hi); }
.status-line.is-bad { color: #ff8a8a; font-weight: 500; }
.counter { margin: 0; text-align: right; font-size: var(--t-13); color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.counter.is-ok { color: var(--cta-hi); }
.counter.is-bad { color: #ff8a8a; }
.choices { display: flex; flex-wrap: wrap; gap: var(--s2); }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; border: 1px solid var(--edge-strong); border-radius: 4px; background: #11122a; color: var(--ink); font-weight: 500; }
.choice:hover span { border-color: var(--ink-faint); }
.choice input:checked + span { background: rgba(31,184,79,.16); border-color: var(--cta); color: #fff; box-shadow: inset 0 0 0 1px var(--cta); }
.choice--alliance input:checked + span { background: rgba(59,93,201,.25); border-color: #6f8fff; box-shadow: inset 0 0 0 1px #6f8fff; }
.choice--horde input:checked + span { background: rgba(176,30,30,.25); border-color: #ff6b6b; box-shadow: inset 0 0 0 1px #ff6b6b; }
.choice input:focus-visible + span { outline: 2px solid var(--brass-lit); outline-offset: 2px; }
.apply__fun { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s5); padding: var(--s4); border: 1px dashed var(--edge-strong); border-radius: 6px; }
@media (max-width: 700px) { .apply__fun { grid-template-columns: minmax(0, 1fr); } }
.apply__fun .field { max-width: 320px; }
.check { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--s3); align-items: start; cursor: pointer; color: var(--ink-dim); font-size: var(--t-15); line-height: 1.6; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--cta); cursor: pointer; }
.check a { color: var(--cta-hi); }
.apply__young { margin-top: var(--s2); }
.apply__young[hidden] { display: none; }
.apply__young p, .notice p a { color: var(--ink); }
.apply__submit { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; }
.apply__submit button[disabled] { opacity: .65; cursor: progress; }
.apply__errors { padding: var(--s4) var(--s5); border: 2px solid #ff6b6b; border-radius: 6px; background: rgba(255,80,80,.08); }
.apply__errors[hidden] { display: none; }
.apply__errors b { color: #fff; font-size: var(--t-17); }
.apply__errors ul { margin: var(--s2) 0 0; padding-left: 1.2em; }
.apply__errors a { color: #ffb3b3; }
.received { max-width: 680px; margin: 0 auto; padding: var(--s7) var(--s6); text-align: center; display: grid; justify-items: center; gap: var(--s4); }
.received h1 { font-family: var(--display); font-size: clamp(2rem, 5vw, 2.8rem); color: #fff; text-shadow: 3px 3px 0 #000; margin: 0; }
.received .prose { margin-inline: auto; }
.received .btn { white-space: normal; text-align: center; }
.received__small { color: var(--ink-faint); font-size: var(--t-14); margin: 0; }
.received__small a { color: var(--cta-hi); }
.emblem[hidden] { display: none; }
.doc { max-width: 780px; }
.doc h1 { font-family: var(--display); font-size: clamp(2rem, 5vw, 2.8rem); color: #fff; text-shadow: 3px 3px 0 #000; margin: var(--s2) 0 var(--s5); }
.doc h2 { font-size: var(--t-21); color: #fff; margin: var(--s7) 0 var(--s3); }
.doc .prose a, .doc .checks a { color: var(--cta-hi); }
.doc .checks { margin-top: var(--s2); }
.received > * { max-width: 100%; }
.received h1 { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .received { padding: var(--s6) var(--s4); }
  .received .btn--lg { font-size: var(--t-15); padding-inline: var(--s4); min-height: 52px; }
}
