/* The Ember Depths website: the game's pixel language (docs/ARCHITECTURE.md "Visual language") for the open web.
   Stepped borders instead of rounded cards, integer-crisp art, stepped motion, the ember/purple palette. */
@font-face { font-family: "Jersey"; src: url("/fonts/jersey-15-400-latin.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Pixelify"; src: url("/fonts/pixelify-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --bg: #14101c; --bg2: #1a1324; --bg3: #211830;
  --panel: #231a2e; --panel2: #2b2038;
  --line: #4a3a5c; --line2: #6b5580;
  --text: #efe3c8; --muted: #b8a9c6; --dim: #8e7fa0;
  --gold: #f5c542; --ember: #ff7a2c; --ember-hi: #ffb070; --ember-lo: #b3471c; --blood: #d9423a; --mana: #4a8cff; --violet: #9b7bff;
  --ink: #3a0e06;
  --display: "Jersey", "Pixelify", ui-monospace, monospace;
  --ui: "Pixelify", ui-sans-serif, system-ui, sans-serif;
  --wrap: 1180px;
  --gutter: 16px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --px: steps(3, end);
  color-scheme: dark;
}
@media (min-width: 700px) { :root { --gutter: 24px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--ui); overflow-x: hidden; }
img, video { max-width: 100%; display: block; }
img { image-rendering: auto; }
a { color: var(--gold); text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { color: #ffe08a; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; line-height: 1.05; margin: 0 0 var(--s3); letter-spacing: .5px; }
h2 { font-size: clamp(34px, 5vw, 54px); }
h3 { font-size: clamp(28px, 3.4vw, 38px); color: #fff3d6; }
h4 { font-size: 24px; color: #fff3d6; margin-bottom: var(--s1); }
p { margin: 0 0 var(--s4); }
strong, b { color: #fff3d6; font-weight: 600; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--gold); color: #1b1200; padding: 8px 14px; font-weight: 700; }
.skip:focus { top: 8px; }

/* Pixel frame: stepped double border like the game's panels. */
.frame { background: var(--panel); box-shadow: 0 0 0 2px var(--line), 0 0 0 4px var(--bg), 0 0 0 6px #0b0810, inset 0 2px 0 rgba(255,255,255,.06), 0 14px 30px rgba(0,0,0,.45); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; font: 400 24px/1 var(--display); letter-spacing: .5px; color: var(--text); text-decoration: none;
  background: var(--panel2); border: 0; cursor: pointer; box-shadow: 0 0 0 2px var(--line2), 0 4px 0 2px #0b0810, inset 0 2px 0 rgba(255,255,255,.08); transition: transform .12s var(--px); }
.btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 0 0 2px var(--gold), 0 6px 0 2px #0b0810, inset 0 2px 0 rgba(255,255,255,.1); }
.btn:active { transform: translateY(2px); box-shadow: 0 0 0 2px var(--gold), 0 1px 0 2px #0b0810; }
.btn-play { color: #fff8ec; background: linear-gradient(180deg, #ff9a45 0%, #ef6a22 55%, #d9531a 100%); text-shadow: 0 2px 0 var(--ink);
  box-shadow: 0 0 0 3px var(--ink), 0 5px 0 3px var(--ink), inset 0 3px 0 var(--ember-hi), inset 0 -4px 0 var(--ember-lo); }
.btn-play:hover { color: #fff; box-shadow: 0 0 0 3px var(--ink), 0 7px 0 3px var(--ink), inset 0 3px 0 #ffd2a0, inset 0 -4px 0 var(--ember-lo), 0 0 28px rgba(255,122,44,.55); }
.btn-play:active { box-shadow: 0 0 0 3px var(--ink), 0 1px 0 3px var(--ink), inset 0 3px 0 var(--ember-hi), inset 0 -2px 0 var(--ember-lo); }
.btn-xl { font-size: clamp(26px, 3.4vw, 34px); min-height: 64px; padding: 14px 30px; }
.btn-sm { font-size: 22px; min-height: 44px; padding: 8px 16px; }
.btn-ghost { background: rgba(20,16,28,.72); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(15,11,21,.92); backdrop-filter: blur(6px); box-shadow: 0 2px 0 var(--line), 0 4px 0 #0b0810; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 400 28px/1 var(--display); letter-spacing: 1px; }
.brand:hover { color: #fff; }
.brand img { image-rendering: pixelated; }
.site-nav { display: flex; align-items: center; gap: var(--s5); }
.site-nav ul { display: flex; gap: var(--s4); list-style: none; margin: 0; padding: 0; }
.site-nav ul a { display: inline-block; padding: 10px 2px; color: var(--muted); text-decoration: none; font-size: 16px; }
.site-nav ul a:hover, .site-nav ul a[aria-current="page"] { color: var(--gold); box-shadow: inset 0 -3px 0 var(--gold); }
.nav-toggle { display: none; width: 48px; height: 48px; background: var(--panel2); border: 0; box-shadow: 0 0 0 2px var(--line2); cursor: pointer; }
.nav-toggle i, .nav-toggle i::before, .nav-toggle i::after { display: block; width: 22px; height: 3px; background: var(--text); margin: 0 auto; position: relative; content: ""; }
.nav-toggle i::before { position: absolute; top: -7px; } .nav-toggle i::after { position: absolute; top: 7px; }
@media (max-width: 899px) {
  .js .nav-toggle { display: block; }
  .js .site-nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: var(--s3); padding: var(--s4) var(--gutter) var(--s5); background: #0f0b15; box-shadow: 0 2px 0 var(--line), 0 12px 24px rgba(0,0,0,.6); }
  .js .site-nav:not(.open) { display: none; }
  .js .site-nav ul { flex-direction: column; gap: 0; }
  .js .site-nav ul a { display: block; padding: 12px 4px; font-size: 18px; border-bottom: 2px solid #231a2e; }
  .site-nav ul { flex-wrap: wrap; gap: 4px 14px; }
  .header-row { flex-wrap: wrap; }
  html:not(.js) .site-nav { width: 100%; flex-wrap: wrap; padding-bottom: 8px; }
}

/* Hero */
.hero { position: relative; overflow: hidden; isolation: isolate; padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 7vw, 96px); min-height: min(88vh, 860px); display: flex; align-items: center; }
.hero-art { position: absolute; inset: 0; z-index: -2; }
/* The title scene's left third is the in-game menu + logo: overscan the art to the left so only the gate and heroes show. */
.hero-art img, .hero-art .shot-missing { position: absolute; top: 0; right: 0; width: 150%; max-width: none; height: 100%; object-fit: cover; object-position: 100% 50%; }
.hero-art::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(14,10,20,.94) 0%, rgba(14,10,20,.82) 38%, rgba(14,10,20,.35) 70%, rgba(14,10,20,.55) 100%),
  linear-gradient(0deg, var(--bg) 0%, rgba(20,16,28,0) 28%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.wordmark { margin: 0 0 var(--s2); line-height: .86; }
.wordmark .the { display: block; font-size: clamp(26px, 3vw, 40px); letter-spacing: .5em; text-transform: uppercase; color: #ffcf7a; text-shadow: 0 3px 0 var(--ink); }
.wordmark .word { display: block; font-size: clamp(64px, 10vw, 132px); letter-spacing: .02em;
  background: linear-gradient(180deg, #fff3c0 0%, #ffc850 35%, #ff7a2c 70%, #c83a1a 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 0 var(--ink)) drop-shadow(0 0 20px rgba(255,110,40,.5)); }
.tagline { font: 400 clamp(20px, 2.2vw, 26px)/1.2 var(--display); letter-spacing: .25em; text-transform: uppercase; color: #e6d6ff; margin-bottom: var(--s4); }
.lead { font-size: clamp(17px, 1.6vw, 20px); max-width: 38em; color: #f4ead6; }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; margin: var(--s5) 0 var(--s3); }
.cta-row.center { justify-content: center; }
.cta-note { color: var(--muted); font-size: 15px; }
.hero-trailer { margin: 0; padding: 6px; }
.hero-trailer video, .hero-trailer .trailer-missing { width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }
.trailer-missing { display: grid; place-items: center; font: 28px var(--display); }
.hero-trailer figcaption { padding: 8px 6px 2px; color: var(--muted); font-size: 14px; }
.embers { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.embers i { position: absolute; bottom: -10px; width: 4px; height: 4px; background: #ffb050; box-shadow: 0 0 6px 2px rgba(255,120,40,.6); opacity: 0; animation: rise 9s steps(36) infinite; }
.embers i:nth-child(1) { left: 6%; animation-delay: -1s; } .embers i:nth-child(2) { left: 14%; animation-delay: -4s; animation-duration: 11s; }
.embers i:nth-child(3) { left: 23%; animation-delay: -7s; } .embers i:nth-child(4) { left: 31%; animation-delay: -2s; animation-duration: 13s; width: 6px; height: 6px; }
.embers i:nth-child(5) { left: 42%; animation-delay: -5s; } .embers i:nth-child(6) { left: 51%; animation-delay: -8s; animation-duration: 10s; }
.embers i:nth-child(7) { left: 60%; animation-delay: -3s; } .embers i:nth-child(8) { left: 68%; animation-delay: -6s; animation-duration: 12s; width: 6px; height: 6px; }
.embers i:nth-child(9) { left: 77%; animation-delay: -9s; } .embers i:nth-child(10) { left: 85%; animation-delay: -1.5s; animation-duration: 14s; }
.embers i:nth-child(11) { left: 92%; animation-delay: -6.5s; } .embers i:nth-child(12) { left: 97%; animation-delay: -3.5s; animation-duration: 10s; }
@keyframes rise { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: .9; } 80% { opacity: .5; } 100% { transform: translate(24px, -90vh); opacity: 0; } }

/* By the numbers */
.numbers { background: linear-gradient(180deg, #1c1427, #150f1e); box-shadow: 0 -2px 0 var(--line), 0 2px 0 var(--line); }
.numbers-row { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: var(--s2); padding-top: var(--s5); padding-bottom: var(--s5); text-align: center; }
.numbers-row b { display: block; font: 400 clamp(34px, 4vw, 48px)/1 var(--display); color: var(--gold); text-shadow: 0 3px 0 var(--ink); }
.numbers-row span { color: var(--muted); font-size: 14px; text-transform: uppercase; letter-spacing: .12em; }

/* Sections */
section { position: relative; }
.features, .classes, .story, .hall, .media, .faq, .about, .stats, .boards { padding: clamp(56px, 8vw, 104px) 0; }
.classes, .hall { background: linear-gradient(180deg, var(--bg2), var(--bg)); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto clamp(32px, 5vw, 56px); }
.section-head.left { text-align: left; margin-left: 0; }
.kicker { font: 400 20px/1 var(--display); letter-spacing: .22em; text-transform: uppercase; color: var(--ember); margin-bottom: var(--s3); }
.section-lead { color: var(--muted); font-size: 18px; }
.section-title { font-size: clamp(30px, 4vw, 44px); margin-bottom: var(--s5); }

/* Features */
.feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; margin-bottom: clamp(56px, 8vw, 96px); }
.feature:last-child { margin-bottom: 0; }
.feature.flip .feature-media { order: 2; }
.feature-media { padding: 6px; }
.feature-media img, .classes-media img, .story-media img, .shot-missing { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.feature-copy p { color: #e9dcc2; }
.shot-missing { background: repeating-linear-gradient(45deg, #231a2e 0 12px, #1d1627 12px 24px); }
.chips { list-style: none; margin: var(--s4) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.chips li { background: var(--bg3); box-shadow: 0 0 0 2px var(--line); padding: 6px 12px; font-size: 15px; }
.boss-chips li { display: flex; flex-direction: column; line-height: 1.25; }
.boss-chips li span { color: var(--muted); font-size: 13px; }
.mini-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3) var(--s4); }
.mini-list h4 { font-size: 21px; margin: 0; color: var(--gold); }
.mini-list p { font-size: 14px; color: var(--muted); margin: 0; }

/* Classes */
.classes-grid { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: clamp(24px, 3vw, 40px); align-items: start; }
.classes-media { padding: 6px; position: sticky; top: 88px; }
.class-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.class-card { background: var(--panel); box-shadow: 0 0 0 2px var(--line), inset 0 2px 0 rgba(255,255,255,.05); padding: var(--s4); }
.class-card h4 { color: var(--gold); }
.class-card p { font-size: 15px; margin: 0 0 var(--s2); color: #e2d5bd; }
.class-card .sub { font-size: 13px; color: var(--violet); margin: 0; }
.races-line { text-align: center; margin: var(--s6) 0 var(--s2); color: var(--muted); text-transform: uppercase; letter-spacing: .2em; font-size: 14px; }
.race-chips { justify-content: center; margin-top: 0; }

/* Story */
.story-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.story-media { padding: 6px; position: sticky; top: 88px; }
.acts { list-style: none; margin: var(--s5) 0 0; padding: 0; display: grid; gap: var(--s4); }
.acts li { padding: var(--s3) var(--s4); background: linear-gradient(90deg, rgba(255,122,44,.08), rgba(35,26,46,.6)); box-shadow: inset 4px 0 0 var(--ember); }
.acts h4 { font-size: 26px; }
.acts p { margin: 0; color: var(--muted); font-size: 15px; }
.act-n { font: 400 16px/1 var(--display); letter-spacing: .2em; color: var(--ember); text-transform: uppercase; }

/* Hall of heroes / counters */
.counters { list-style: none; margin: 0 0 var(--s6); padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); text-align: center; }
.counters li { background: var(--panel); box-shadow: 0 0 0 2px var(--line), inset 0 2px 0 rgba(255,255,255,.05); padding: var(--s4) var(--s2); }
.counters b { display: block; font: 400 clamp(32px, 4vw, 46px)/1 var(--display); color: var(--gold); text-shadow: 0 3px 0 var(--ink); }
.counters span { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.hall-boards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); margin-bottom: var(--s5); }
.board-mini { padding: var(--s4); }
.board-mini h3 { font-size: 26px; color: var(--gold); }
.board-mini ol, .mini-board { list-style: none; margin: 0; padding: 0; }
.board-mini li, .mini-board li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: var(--s2); align-items: baseline; padding: 6px 0; border-bottom: 2px solid #2d2239; font-size: 15px; }
.board-mini li:last-child, .mini-board li:last-child { border-bottom: 0; }
.board-mini li.muted, .mini-board li.muted { display: block; }
.rank-n { font: 400 20px/1 var(--display); color: var(--dim); }
.rank-1 .rank-n { color: var(--gold); } .rank-2 .rank-n { color: #d8d8e8; } .rank-3 .rank-n { color: #e09a5a; }
.who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who b { font-weight: 600; }
.who small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.val { font: 400 20px/1 var(--display); color: #fff3d6; }
.hall-status:empty { display: none; }

/* Gallery + lightbox */
.gallery-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.gallery-item { display: block; padding: 5px; background: var(--panel); box-shadow: 0 0 0 2px var(--line), 0 0 0 4px var(--bg); transition: transform .12s var(--px); }
.gallery-item:hover { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--gold), 0 0 0 4px var(--bg), 0 0 24px rgba(255,122,44,.35); }
.gallery-item img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.lightbox { width: min(96vw, 1600px); max-width: none; max-height: 96vh; padding: 0; border: 0; background: #0b0810; color: var(--text); box-shadow: 0 0 0 2px var(--line2), 0 30px 80px rgba(0,0,0,.8); }
.lightbox::backdrop { background: rgba(6,4,10,.88); }
.lb-bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 6px 14px; }
.lb-count { color: var(--muted); font-size: 14px; }
.lb-close, .lb-prev, .lb-next { min-width: 48px; min-height: 48px; background: var(--panel2); color: var(--text); border: 0; box-shadow: 0 0 0 2px var(--line2); font: 400 34px/1 var(--display); cursor: pointer; }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { box-shadow: 0 0 0 2px var(--gold); }
.lb-img { width: 100%; height: auto; max-height: calc(96vh - 120px); object-fit: contain; background: #000; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 10px; } .lb-next { right: 10px; }
.lb-cap { padding: 8px 14px 12px; margin: 0; color: var(--muted); font-size: 15px; }

/* CTA band */
.cta-band { padding: clamp(56px, 8vw, 96px) 0; background:
  radial-gradient(90% 120% at 50% 120%, rgba(255,110,40,.4) 0%, rgba(217,66,58,.18) 35%, rgba(20,16,28,0) 70%), var(--bg2);
  box-shadow: 0 -2px 0 var(--line), 0 2px 0 var(--line); }
.cta-band p { color: var(--muted); font-size: 18px; }

/* FAQ */
.faq details { background: var(--panel); box-shadow: 0 0 0 2px var(--line); margin-bottom: var(--s4); }
.faq summary { cursor: pointer; list-style: none; padding: var(--s4) var(--s5) var(--s4) 48px; font: 400 24px/1.15 var(--display); color: #fff3d6; position: relative; min-height: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; position: absolute; left: 18px; top: 14px; color: var(--ember); font-size: 28px; }
.faq details[open] summary::before { content: "−"; }
.faq summary:hover { color: var(--gold); }
.faq details p { padding: 0 var(--s5) var(--s4) 48px; margin: 0; color: #e2d5bd; }

/* About */
.about-box { padding: clamp(24px, 4vw, 40px); text-align: center; }
.about-box p { color: #e2d5bd; }

/* Footer */
.site-footer { padding: var(--s7) 0 var(--s6); background: #0f0b15; box-shadow: 0 -2px 0 var(--line); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: var(--s5); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-footer ul a { display: inline-block; padding: 6px 0; color: var(--muted); text-decoration: none; }
.site-footer ul a:hover { color: var(--gold); }
.credits p { margin-bottom: var(--s2); }

/* Leaderboards page */
.page-hero { padding: clamp(40px, 6vw, 72px) 0 0; }
.page-hero h1 { font-size: clamp(48px, 7vw, 84px); color: #fff3d6; text-shadow: 0 4px 0 var(--ink); }
.notice { background: rgba(217,66,58,.14); box-shadow: 0 0 0 2px var(--blood); padding: var(--s3) var(--s4); }
.page-boards .stats { padding-bottom: 0; }
.counters.big { margin-bottom: var(--s5); }
.stat-table-wrap { padding: var(--s2) var(--s4); margin-bottom: var(--s6); overflow-x: auto; }
.stat-table, .board-table { width: 100%; border-collapse: collapse; }
.stat-table th, .stat-table td, .board-table th, .board-table td { padding: 10px 8px; text-align: left; border-bottom: 2px solid #2d2239; }
.stat-table thead th, .board-table thead th { font: 400 18px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--ember); }
.stat-table td, .board-table td.num, .board-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.stat-table tbody th { font-weight: 400; color: #e2d5bd; }
.stat-table td { font: 400 22px/1 var(--display); color: #fff3d6; }
.stat-table tr:last-child th, .stat-table tr:last-child td { border-bottom: 0; }
.stat-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); }
.stat-card { padding: var(--s4); }
.stat-card.wide { grid-column: span 2; }
.stat-card h3 { font-size: 26px; color: var(--gold); }
.deep-card { display: grid; gap: 4px; }
.deep-card .depth { font: 400 64px/1 var(--display); color: var(--ember); text-shadow: 0 4px 0 var(--ink); }
.arena-line { font-size: 15px; color: var(--muted); }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bars li { display: grid; grid-template-columns: 110px minmax(0, 1fr) 44px; gap: var(--s2); align-items: center; font-size: 14px; }
.bars li.muted { display: block; }
.bar { height: 14px; background: #2d2239; box-shadow: inset 0 0 0 2px #1a1324; }
.bar i { display: block; height: 100%; background: linear-gradient(180deg, #ffb070, #ef6a22); box-shadow: inset 0 -3px 0 var(--ember-lo); }
.bars .n { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.spark { width: 100%; height: 120px; }
.spark svg { width: 100%; height: 100%; display: block; }
.search { padding: var(--s4); margin-bottom: var(--s5); }
.search label { display: block; font: 400 24px/1 var(--display); color: #fff3d6; margin-bottom: var(--s2); }
.search-row { display: flex; gap: var(--s3); }
.search input { flex: 1; min-width: 0; min-height: 48px; padding: 8px 12px; font: 400 18px var(--ui); color: var(--text); background: #120d19; border: 0; box-shadow: 0 0 0 2px var(--line2); }
.search input:focus { outline: 3px solid var(--gold); outline-offset: 2px; }
.search p { margin: var(--s2) 0 0; }
.search-results:empty { display: none; }
.search-results { margin-top: var(--s4); display: grid; gap: var(--s4); }
.pcard { background: var(--bg3); box-shadow: 0 0 0 2px var(--line); padding: var(--s4); }
.pcard h3 { font-size: 30px; margin-bottom: 2px; }
.pcard .hero-line { color: var(--muted); margin-bottom: var(--s3); }
.pcard dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s2) var(--s4); margin: 0; }
.pcard dt { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.pcard dd { margin: 0; font: 400 22px/1.1 var(--display); color: #fff3d6; }
.pcard dd small { font: 400 14px var(--ui); color: var(--gold); }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 0; }
.tab { min-height: 44px; padding: 8px 14px; font: 400 20px/1 var(--display); color: var(--muted); background: var(--bg3); border: 0; box-shadow: 0 0 0 2px var(--line); cursor: pointer; }
.tab:hover { color: #fff; }
.tab[aria-selected="true"] { color: #1b1200; background: var(--gold); box-shadow: 0 0 0 2px var(--gold), 0 4px 0 2px #6b4d0a; }
.board-panel { padding: var(--s2) var(--s4); margin: var(--s4) 0 var(--s4); overflow-x: auto; }
.board-table td.rank, .board-table th.rank { width: 48px; }
.board-table td.rank { font: 400 24px/1 var(--display); color: var(--dim); }
.board-table tr.r1 td.rank { color: var(--gold); } .board-table tr.r2 td.rank { color: #d8d8e8; } .board-table tr.r3 td.rank { color: #e09a5a; }
.board-table td.num { font: 400 22px/1 var(--display); color: #fff3d6; }
.board-table .handle { font-weight: 600; color: #fff3d6; }
.board-table .title { color: var(--violet); font-size: 13px; margin-left: 6px; }
.board-table tbody tr:hover { background: rgba(255,255,255,.03); }
.lost { padding: 18vh var(--gutter); }
.lost h1 { font-size: clamp(44px, 7vw, 72px); }

/* Responsive */
@media (max-width: 1099px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .numbers-row { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: var(--s4); }
  .classes-grid { grid-template-columns: minmax(0, 1fr); }
  .classes-media { position: static; max-width: 640px; margin: 0 auto; }
  .class-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card.wide { grid-column: span 2; }
}
@media (max-width: 899px) {
  .hero { min-height: 0; }
  .hero-grid, .feature, .story-grid { grid-template-columns: minmax(0, 1fr); }
  .feature.flip .feature-media { order: 0; }
  .story-media { position: static; }
  .hero-art::after { background: linear-gradient(180deg, rgba(14,10,20,.72) 0%, rgba(14,10,20,.88) 55%, var(--bg) 100%); }
  .class-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hall-boards { grid-template-columns: minmax(0, 1fr); }
  .counters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid .credits { grid-column: span 2; }
}
@media (max-width: 599px) {
  body { font-size: 16px; }
  .tagline { letter-spacing: .12em; font-size: 19px; }
  .gallery-grid, .class-cards, .mini-list, .stat-cards { grid-template-columns: minmax(0, 1fr); }
  .stat-card.wide { grid-column: auto; }
  .numbers-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-row .btn { width: 100%; }
  .hide-sm { display: none; }
  .bars li { grid-template-columns: 92px minmax(0, 1fr) 40px; }
  .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; }
}
/* Landscape phones: keep the hero compact so the CTA stays on screen. */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { min-height: 0; padding: 28px 0 40px; }
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .wordmark .word { font-size: 64px; }
  .lead { font-size: 15px; margin-bottom: 8px; }
  .cta-row { margin: 12px 0 6px; }
  .btn-xl { min-height: 52px; font-size: 24px; }
  .hero-art::after { background: linear-gradient(90deg, rgba(14,10,20,.94) 0%, rgba(14,10,20,.8) 45%, rgba(14,10,20,.4) 100%); }
}

/* Act-boss cards: the HD boss models (img/bosses/*.png, crisp pixels) on an ember glow. */
.boss-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s3); }
.boss-chips li.has-art { align-items: center; text-align: center; padding: 12px 10px 12px;
  background: radial-gradient(ellipse at 50% 70%, rgba(255, 110, 40, 0.28), transparent 65%), var(--bg3); }
.boss-chips li img { width: 100%; height: 140px; object-fit: contain; image-rendering: pixelated; margin-bottom: 8px;
  filter: drop-shadow(0 6px 0 rgba(0,0,0,0.45)) drop-shadow(0 0 14px rgba(255, 110, 40, 0.35)); transition: transform .2s steps(3); }
.boss-chips li.has-art:hover img { transform: translateY(-4px) scale(1.04); }
