/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
  --bg:        #08070b;
  --bg2:       #0e0c13;
  --panel:     #13111a;
  --panel2:    #1a1722;
  --line:      #2a2534;
  --line2:     #3a3346;
  --text:      #ece8f1;
  --text2:     #b7b0c4;
  --muted:     #8a829a;
  --ember:     #ff7a1a;
  --ember2:    #ffb04a;
  --corrupt:   #b56cff;
  --cyan:      #35f2e0;
  --danger:    #ff4a4a;
  --ok:        #5fe36a;
  --radius:    12px;
  --maxw:      1180px;
  --font:      'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display:   'Chakra Petch', 'Inter', system-ui, sans-serif;
  --mono:      'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background:
    radial-gradient(ellipse 70% 45% at 50% -5%, rgba(255,122,26,.13), transparent 70%),
    radial-gradient(ellipse 50% 40% at 100% 30%, rgba(181,108,255,.07), transparent 70%),
    var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  min-height: 100vh;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--ember2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; letter-spacing: .01em; }
p { margin: 0 0 .75em; }
p:last-child { margin-bottom: 0; }
code, kbd { font-family: var(--mono); font-size: .88em; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ember); color: #000; padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 8px; }

.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 60;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.018) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.tiny  { font-size: .72rem; }
.warn  { color: var(--danger); }
.eyebrow {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ember2); margin: 0 0 .5rem;
}

/* ── Glitch ──────────────────────────────────────────────────────────────── */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0; pointer-events: none;
}
.glitch::before { color: var(--cyan);    transform: translate(-2px, 0); opacity: .55; clip-path: inset(0 0 100% 0); animation: gl1 5s infinite steps(1); }
.glitch::after  { color: var(--corrupt); transform: translate(2px, 0);  opacity: .55; clip-path: inset(0 0 100% 0); animation: gl2 5s infinite steps(1); }
@keyframes gl1 { 0%, 90%, 100% { clip-path: inset(0 0 100% 0); } 91% { clip-path: inset(15% 0 60% 0); transform: translate(-4px, 1px); } 94% { clip-path: inset(60% 0 12% 0); transform: translate(3px, 0); } 97% { clip-path: inset(40% 0 45% 0); } }
@keyframes gl2 { 0%, 92%, 100% { clip-path: inset(0 0 100% 0); } 93% { clip-path: inset(50% 0 30% 0); transform: translate(4px, -1px); } 96% { clip-path: inset(8% 0 78% 0); transform: translate(-3px, 0); } }

.glitch-text { position: relative; display: inline-block; color: #ff9cf0; text-shadow: -1px 0 var(--cyan), 1px 0 var(--corrupt); animation: jitter 3s infinite steps(1); }
@keyframes jitter { 0%, 96%, 100% { transform: none; } 97% { transform: translate(1px, -1px) skewX(-6deg); } 98% { transform: translate(-1px, 1px); } }

.redact { background: repeating-linear-gradient(90deg, #2a2233 0 6px, #1b1622 6px 8px); color: transparent; border-radius: 2px; user-select: none; letter-spacing: -.1em; }
.redact-text { font-family: var(--mono); color: #ff9cf0; letter-spacing: .06em; }
.redacted-block { font-family: var(--mono); font-size: .85rem; color: #d9b9ff; background: repeating-linear-gradient(0deg, rgba(181,108,255,.06) 0 2px, transparent 2px 4px); border: 1px dashed rgba(181,108,255,.4); border-radius: 8px; padding: .8rem 1rem; }
.redact-lines { color: #3a2e4a; letter-spacing: -.05em; }
.is-glitch { border-color: rgba(255,79,216,.35) !important; background: linear-gradient(160deg, rgba(255,79,216,.07), transparent 50%), var(--panel) !important; }

/* ── Top bar ─────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem clamp(16px, 3vw, 32px);
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}
/* blur lives on a pseudo-element: backdrop-filter on .topbar itself would trap the fixed mobile nav */
.topbar::before { content: ''; position: absolute; inset: 0; z-index: -1; background: rgba(8,7,11,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; fill: var(--ember); filter: drop-shadow(0 0 8px rgba(255,122,26,.6)); }
.brand-text { font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: .12em; }

.nav { display: flex; gap: .15rem; margin-left: auto; align-items: center; }
.nav a {
  color: var(--text2); font-size: .9rem; font-weight: 500; padding: .45rem .7rem; border-radius: 8px;
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text); background: var(--panel2); text-decoration: none; }
.nav a.on { color: var(--ember2); background: rgba(255,122,26,.1); }
.nav-discord { display: none !important; }
.top-actions { display: flex; align-items: center; gap: .5rem; }
.lang-btn {
  display: flex; background: var(--panel); border: 1px solid var(--line2); border-radius: 8px; padding: 3px; cursor: pointer;
  font: 600 .75rem var(--mono); color: var(--muted);
}
.lang-btn span { padding: .25rem .45rem; border-radius: 5px; }
.lang-btn span.on { background: var(--ember); color: #1a0c00; }
.menu-btn { display: none; width: 40px; height: 40px; background: var(--panel); border: 1px solid var(--line2); border-radius: 8px; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.menu-btn span { width: 18px; height: 2px; background: var(--text); transition: transform .2s, opacity .2s; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Layout ──────────────────────────────────────────────────────────────── */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px) 4rem; outline: none; }
.page { animation: pageIn .35s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-head { padding: 3.2rem 0 1.2rem; max-width: 820px; }
.page-head h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); text-transform: uppercase; letter-spacing: .04em; }
.lead { font-size: 1.1rem; color: var(--text2); margin-top: 1rem; }

.block { padding: 2.2rem 0 .4rem; }
.block > h2 { font-size: 1.45rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 1.1rem; }
.h-mark { color: var(--ember); font-family: var(--mono); margin-right: .2rem; }
.block > p { color: var(--text2); max-width: 820px; }
.sub { font-size: 1.05rem; margin: 1.6rem 0 .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text2); }

.grid { display: grid; gap: 1rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid + .grid, .grid + p, .block > .card + .card, .card + .grid, .grid + .card { margin-top: 1rem; }

.card {
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent 40%), var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.25rem;
  position: relative;
}
.card h3 { font-size: 1.08rem; margin-bottom: .5rem; }
.card p { color: var(--text2); font-size: .95rem; }
.card-link { color: inherit; display: block; transition: border-color .2s, transform .2s, box-shadow .2s; }
.card-link:hover { text-decoration: none; border-color: rgba(255,122,26,.55); transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,.4), 0 0 0 1px rgba(255,122,26,.15); }

.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding-left: 1.3rem; margin-bottom: .45rem; color: var(--text2); font-size: .95rem; }
.ticks li::before { content: '▸'; position: absolute; left: 0; color: var(--ember); }
.ticks b { color: var(--text); }

.note { font-size: .88rem; color: var(--text2); background: var(--panel); border-left: 3px solid var(--corrupt); padding: .7rem 1rem; border-radius: 0 8px 8px 0; margin: 1rem 0; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 600 .95rem var(--font); padding: .8rem 1.3rem; border-radius: 10px; cursor: pointer;
  border: 1px solid transparent; transition: transform .15s, box-shadow .2s, background .2s, border-color .2s; text-decoration: none !important;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary { background: linear-gradient(180deg, var(--ember2), var(--ember)); color: #1a0c00; box-shadow: 0 6px 22px rgba(255,122,26,.3); }
.btn-primary:hover { box-shadow: 0 8px 30px rgba(255,122,26,.5); transform: translateY(-1px); }
.btn-ghost { background: var(--panel); color: var(--text); border-color: var(--line2); }
.btn-ghost:hover { border-color: var(--ember); }
.btn-sm { padding: .5rem .9rem; font-size: .85rem; }
.i-discord { width: 1.15em; height: 1.15em; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero { position: relative; padding: clamp(3.5rem, 10vw, 7rem) 0 2rem; text-align: center; }
.hero-title {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(3.2rem, 13vw, 8rem); letter-spacing: .06em; line-height: .95;
  background: linear-gradient(180deg, #fff 10%, var(--ember2) 55%, var(--ember) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 30px rgba(255,122,26,.35));
}
.hero-title::before, .hero-title::after { -webkit-text-fill-color: currentColor; }
.tagline { font-family: var(--mono); color: var(--cyan); letter-spacing: .08em; margin: 1rem 0 .6rem; font-size: clamp(.9rem, 2.4vw, 1.05rem); }
.hero-intro { color: var(--text2); max-width: 620px; margin: 0 auto 2rem; }
.hero-row { display: flex; gap: 1rem; justify-content: center; align-items: stretch; flex-wrap: wrap; }
.hero-cta { display: flex; flex-direction: column; gap: .6rem; justify-content: center; }
.since { margin-top: 1.8rem; color: var(--muted); font-size: .9rem; display: inline-flex; align-items: center; gap: .5rem; }
.since b { color: var(--text); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(95,227,106,.6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(95,227,106,0); } 100% { box-shadow: 0 0 0 0 rgba(95,227,106,0); } }

.embers { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.embers i {
  position: absolute; bottom: -10px; left: calc(var(--i) * 5.6%);
  width: 3px; height: 3px; border-radius: 50%; background: var(--ember2); box-shadow: 0 0 6px var(--ember);
  animation: rise calc(6s + var(--i) * .37s) linear infinite; animation-delay: calc(var(--i) * -.9s); opacity: 0;
}
@keyframes rise { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: .9; } 100% { transform: translate(calc((var(--i) - 9) * 4px), -520px); opacity: 0; } }

.ip-card { background: var(--panel); border: 1px solid var(--line2); border-radius: var(--radius); padding: 1rem 1.2rem; min-width: 280px; text-align: left; }
.ip-label { font-family: var(--mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.ip-value { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; margin: .35rem 0; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; color: var(--text); font: 600 1.05rem var(--mono); cursor: pointer; }
.ip-value:hover { border-color: var(--ember); text-decoration: none; }
.ip-copy { font: 600 .72rem var(--font); color: var(--ember2); text-transform: uppercase; letter-spacing: .1em; }
.ip-link { font-family: var(--font); font-size: 1rem; }
.ip-meta { font-size: .82rem; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: .35rem; }
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.status.on .dot { background: var(--ok); box-shadow: 0 0 8px var(--ok); }

/* Pillars / steps / news */
.pillar-icon { font-size: 1.8rem; margin-bottom: .6rem; }
/* an odd one out on the last row spans the row instead of sitting alone */
.pillar:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.steps li { display: flex; gap: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.step-n { font: 700 1.6rem var(--mono); color: var(--ember); line-height: 1; }
.steps h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.steps p { color: var(--text2); font-size: .93rem; }
.news { display: grid; gap: 1rem; }
.news-item time { font-family: var(--mono); font-size: .78rem; color: var(--cyan); letter-spacing: .06em; }
.news-item h3 { margin: .3rem 0 .5rem; }

/* ── Races ───────────────────────────────────────────────────────────────── */
.odds-bar { display: flex; height: 18px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line2); }
.odds-bar span { flex: var(--w) 0 0; background: var(--c); box-shadow: inset 0 -4px 8px rgba(0,0,0,.25); }
.odds-bar span:last-child { background: linear-gradient(90deg, #ff4fd8, #35f2e0, #ffd84a); }
.odds-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .5rem 1.5rem; margin: 1rem 0 1.4rem; }
.odds-row { display: grid; grid-template-columns: 12px 1fr auto auto; align-items: center; gap: .6rem; padding: .35rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.swatch { width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.odds-name { font-weight: 600; }
.odds-pct { font-family: var(--mono); color: var(--text); }
.odds-in { font-family: var(--mono); font-size: .78rem; color: var(--muted); min-width: 72px; text-align: right; }

.roller { display: grid; gap: 1rem; justify-items: center; text-align: center; background: radial-gradient(ellipse at center, rgba(255,122,26,.06), transparent 70%), var(--panel); }
.roller-head { display: flex; flex-direction: column; gap: .2rem; }
.roller-head h3 { margin: 0; }
.roller-window { width: min(100%, 420px); height: 110px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg2); display: grid; place-items: center; overflow: hidden; position: relative; }
.roller-window::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg2), transparent 25%, transparent 75%, var(--bg2)); pointer-events: none; }
.roller-result { --c: var(--muted); font: 700 2.2rem var(--display); color: var(--muted); display: flex; flex-direction: column; align-items: center; }
.roller-result .rr-icon { font-size: 1.6rem; line-height: 1; }
.roller-result .rr-name { font-size: 1.5rem; color: var(--c); }
.roller-result .rr-rar { font: 600 .72rem var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--c); opacity: .8; }
.roller-result.final { animation: pop .35s cubic-bezier(.3,1.6,.5,1); }
.roller-result.locked .rr-name { text-shadow: 0 0 18px var(--c); }
@keyframes pop { from { transform: scale(.7); } to { transform: none; } }
.roller-pips { display: flex; gap: .5rem; }
.roller-pips i { width: 34px; height: 6px; border-radius: 3px; background: var(--line2); }
.roller-pips i.used { background: var(--ember); }
.roller-pips i.skip { background: var(--line); opacity: .5; }
.roller-btns { display: flex; gap: .6rem; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.chip { --c: var(--ember2); background: var(--panel); color: var(--text2); border: 1px solid var(--line2); border-radius: 999px; padding: .4rem .9rem; font: 600 .82rem var(--font); cursor: pointer; }
.chip:hover { border-color: var(--c); }
.chip.on { background: color-mix(in srgb, var(--c) 18%, var(--panel)); border-color: var(--c); color: var(--text); }

.race { border-top: 3px solid var(--c); }
.race-top, .weapon-top { display: flex; align-items: center; gap: .9rem; margin-bottom: .9rem; }
.race-top h3, .weapon-top h3 { margin-bottom: .25rem; font-size: 1.2rem; }
.race-icon { width: 48px; height: 48px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; font-size: 1.5rem; background: color-mix(in srgb, var(--c) 14%, var(--bg2)); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
.rarity { font: 600 .7rem var(--mono); letter-spacing: .12em; text-transform: uppercase; padding: .15rem .5rem; border-radius: 5px; border: 1px solid currentColor; }
.r-common { color: #b9b9c2; } .r-uncommon { color: #5fe36a; } .r-rare { color: #4aa6ff; } .r-epic { color: #b56cff; }
.r-legendary { color: #ff9a2e; } .r-divine { color: #ffd84a; } .r-singularity { color: #ff4fd8; }
.race-meta { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1rem; margin: 1rem 0 0; padding-top: .9rem; border-top: 1px solid var(--line); }
.race-meta div { min-width: 0; }
.race-meta dt { font: 600 .68rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.race-meta dd { margin: .1rem 0 0; font-size: .9rem; color: var(--text); }

/* ── Weapons ─────────────────────────────────────────────────────────────── */
.rule-cards .rule { border-left: 3px solid var(--line2); }
.rule-cards .rule.good { border-left-color: var(--ok); }
.controls { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin: 1rem 0; }
.controls div { display: flex; align-items: center; gap: .6rem; font-size: .92rem; color: var(--text2); }
kbd { background: var(--panel2); border: 1px solid var(--line2); border-bottom-width: 3px; border-radius: 6px; padding: .15rem .5rem; color: var(--text); white-space: nowrap; }
.weapon-grid { margin-top: 1.2rem; }
.weapon { border-top: 3px solid var(--c); }
.dmg-num { margin-left: auto; font: 700 1.6rem var(--mono); color: var(--c); text-align: right; line-height: 1; }
.ap { display: block; font-size: .8rem; margin-top: .2rem; }
.dmg-bar { height: 4px; background: var(--bg2); border-radius: 2px; margin-bottom: 1rem; overflow: hidden; }
.dmg-bar span { display: block; height: 100%; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 40%, transparent), var(--c)); }
.abilities { margin: 0; display: grid; gap: .7rem; }
.abilities dt { font: 600 .72rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.abilities dt kbd { font-size: .68rem; letter-spacing: 0; text-transform: none; }
.abilities dt em { font-style: normal; color: var(--c); letter-spacing: .04em; text-transform: none; font-family: var(--font); }
.abilities dd { margin: .15rem 0 0; color: var(--text2); font-size: .93rem; }
.w-live { display: flex; align-items: center; flex-wrap: wrap; gap: .2rem 1rem; margin: 1rem 0 0; font-size: .88rem; color: var(--text2); }
.w-live > span { display: inline-flex; align-items: center; gap: .45rem; }
.w-live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.w-status { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .5rem; margin: 0 0 1rem; padding: .5rem .75rem;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg2); font-size: .9rem; color: var(--text2); }
.w-status b { color: var(--text); }
.w-status .ws-sub { color: var(--muted); font-size: .8rem; }
.w-status.held { border-color: color-mix(in srgb, var(--c) 55%, var(--line)); background: color-mix(in srgb, var(--c) 9%, var(--bg2)); color: var(--text); }
.w-status.destroyed { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }

/* ── Rift ────────────────────────────────────────────────────────────────── */
.shapeless { display: flex; align-items: center; gap: .35rem; margin-top: .8rem; flex-wrap: wrap; }
.shapeless span { width: 38px; height: 38px; display: grid; place-items: center; background: var(--bg2); border: 1px solid var(--line2); border-radius: 6px; }
.shapeless b { color: var(--muted); padding: 0 .2rem; }

.kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.kind { border-top: 3px solid var(--c); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 8%, transparent), transparent 45%), var(--panel); }
.kind h3 { color: var(--c); }
.kind-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin: .7rem 0 .9rem; }
.kind-stats div { background: var(--bg2); border-radius: 8px; padding: .45rem .5rem; text-align: center; }
.kind-stats span { display: block; font: 600 .62rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.kind-stats b { font-family: var(--mono); font-size: .95rem; }
.nights { margin-top: 1rem; }
.night-rising { font: 700 .72rem var(--mono); letter-spacing: .14em; color: var(--c); opacity: .85; margin-top: .15rem; }
.night .ticks li::before { color: var(--c); }

.tiers { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; margin-top: 1rem; }
.tier { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: .9rem; position: relative; overflow: hidden; }
.tier::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--n) * 12%); background: linear-gradient(0deg, rgba(255,122,26,.14), transparent); pointer-events: none; }
.tier-n { font: 700 1.4rem var(--mono); color: var(--ember2); }
.tier-score { font: 600 .75rem var(--mono); color: var(--muted); margin-bottom: .4rem; }
.tier-text { font-size: .86rem; color: var(--text2); position: relative; }

.room-icon, .item-icon { font-size: 1.7rem; margin-bottom: .4rem; }
.stat { text-align: left; }
.stat-big { font: 700 2rem var(--mono); color: var(--cyan); margin-bottom: .3rem; }
.challenge { border-top: 3px solid var(--line2); }
.challenge.c-easy { border-top-color: var(--ok); }
.challenge.c-medium { border-top-color: #ffd84a; }
.challenge.c-hard { border-top-color: var(--danger); }
.ch-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .6rem; }
.ch-head h3 { margin: 0; }
.ch-bonus { font: 700 .85rem var(--mono); color: var(--cyan); }
.boss-card h3 { font-size: 1.3rem; margin-bottom: .8rem; }
.relic { border-top: 3px solid var(--c); }
.relic .eyebrow { color: var(--c); }
.relic-item { display: flex; flex-direction: column; padding: .55rem 0; border-top: 1px solid var(--line); }
.relic-item b { font-family: var(--display); }
.relic-item span { color: var(--text2); font-size: .9rem; }

.keyvis { display: grid; grid-template-columns: auto 1fr; gap: 2rem; margin-top: 1.2rem; align-items: start; }
.craft { display: flex; align-items: center; gap: 8px; margin: .8rem 0; }
.craft-3 { display: grid; grid-template-columns: repeat(3, 58px); grid-auto-rows: 58px; gap: 4px; }
.slot { width: 58px; height: 58px; --c: var(--ember); display: grid; place-items: center; font-size: 1.6rem; background: #2b2733; border: 2px solid; border-color: #1a1720 #4a4456 #4a4456 #1a1720; border-radius: 3px; }
.slot.centre { background: color-mix(in srgb, var(--c) 22%, #2b2733); box-shadow: 0 0 16px color-mix(in srgb, var(--c) 45%, transparent); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 26px color-mix(in srgb, var(--c) 70%, transparent); } }
.craft-arrow { color: var(--muted); font-size: 1.3rem; }
.craft-legend { display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; color: var(--muted); }
.key-races { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1rem; }
.key-race { --c: var(--ember); width: 42px; height: 42px; font-size: 1.2rem; border-radius: 10px; cursor: pointer; background: var(--bg2); border: 1px solid var(--line2); }
.key-race:hover { border-color: var(--c); }
.key-race.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 20%, var(--bg2)); box-shadow: 0 0 12px color-mix(in srgb, var(--c) 40%, transparent); }
#key-info h3 { font-size: 1.4rem; margin-bottom: .6rem; }

.cmd-table { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cmd-table > div { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1rem; background: var(--panel); padding: .65rem 1rem; align-items: center; }
.cmd-table code { color: var(--cyan); word-break: break-word; }
.cmd-table span { color: var(--text2); font-size: .9rem; }

/* ── Forge ───────────────────────────────────────────────────────────────── */
.grades { display: grid; gap: .5rem; }
.grade { display: grid; grid-template-columns: 64px 1fr; gap: .8rem; align-items: center; padding: .6rem .7rem; border-radius: 8px; background: color-mix(in srgb, var(--c) 8%, var(--bg2)); border-left: 3px solid var(--c); }
.grade-pts { font: 700 1rem var(--mono); color: var(--c); }
.grade.no-pts { grid-template-columns: 1fr; }
.grade b { color: var(--c); }
.grade p { font-size: .86rem; margin: 0; }

.forge-demo { display: grid; gap: 1rem; justify-items: center; text-align: center; background: radial-gradient(ellipse 60% 80% at 50% 100%, rgba(255,90,20,.14), transparent 70%), var(--panel); transition: box-shadow .4s; }
.forge-demo.flawless { box-shadow: 0 0 0 1px #c07bff, 0 0 40px rgba(192,123,255,.35); }
.forge-demo.botched { box-shadow: 0 0 0 1px var(--danger); }
.fd-track { position: relative; display: grid; grid-template-columns: repeat(15, 1fr); gap: 4px; width: min(100%, 640px); padding-top: 2.2rem; cursor: pointer; user-select: none; touch-action: manipulation; }
.fd-track.shake { animation: thud .18s ease; }
@keyframes thud { 50% { transform: translateY(3px); } }
.fd-slot { height: 38px; border-radius: 4px; background: #2a2330; border: 1px solid #3b3244; transition: background .15s; }
.fd-slot.yellow { background: #7a6420; border-color: #ffd84a; }
.fd-slot.green { background: #1f6b2c; border-color: var(--ok); box-shadow: 0 0 12px rgba(95,227,106,.5); }
.fd-slot.hit { animation: hit .3s ease; }
@keyframes hit { 0% { background: #fff; } }
.fd-hammer { position: absolute; top: 0; font-size: 1.6rem; line-height: 1; filter: drop-shadow(0 4px 6px rgba(0,0,0,.6)); pointer-events: none; }
.fd-status { display: flex; gap: 1.2rem; font: 600 .85rem var(--mono); color: var(--text2); flex-wrap: wrap; justify-content: center; }
.fd-timer { color: var(--ember2); min-width: 3.5em; }
.fd-strikes { display: flex; gap: 6px; }
.fd-strikes i { width: 22px; height: 22px; border-radius: 50%; background: var(--bg2); border: 1px solid var(--line2); }
.fd-strikes i.full { background: var(--ok); border-color: var(--ok); }
.fd-strikes i.half { background: #ffd84a; border-color: #ffd84a; }
.fd-strikes i.miss { background: var(--danger); border-color: var(--danger); }
.fd-result { min-height: 1.6em; color: var(--text2); font-size: .95rem; }
.fd-grade { font: 700 1.25rem var(--display); color: var(--c); text-transform: uppercase; letter-spacing: .06em; margin-right: .3rem; }

.heat label { font-size: .92rem; color: var(--text2); }
.heat input[type=range] { width: 100%; margin: .8rem 0; accent-color: var(--ember); }
.heat-bar { height: 12px; border-radius: 6px; background: var(--bg2); overflow: hidden; }
.heat-bar span { --h: 1; display: block; height: 100%; width: 100%; border-radius: 6px; background: linear-gradient(90deg, #7a1c00, #ff5a14 50%, #ffe7b0); filter: saturate(calc(.4 + var(--h) * .6)); transition: width .15s; }
.heat-out { margin-top: .7rem; }
.heat-out b { font: 700 1.3rem var(--mono); color: var(--ember2); }

.tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin: 1rem 0 .8rem; }
.tab { background: var(--panel); border: 1px solid var(--line2); color: var(--text2); padding: .5rem .9rem; border-radius: 8px; cursor: pointer; font: 600 .88rem var(--font); }
.tab.on { border-color: var(--ember); color: var(--text); background: rgba(255,122,26,.12); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; background: var(--panel); font-size: .92rem; }
.table th, .table td { padding: .65rem .9rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { font: 600 .7rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: var(--bg2); }
.table tr:last-child td { border-bottom: 0; }
.buffs td:nth-child(n+3) { font-family: var(--mono); }
.table .c-okay { color: #ffd84a; } .table .c-good { color: var(--ok); } .table .c-flaw { color: #c07bff; }
.table td.flaw { color: #d7b0ff; font-weight: 600; }
.cold { border-color: rgba(74,166,255,.4); background: linear-gradient(160deg, rgba(74,166,255,.1), transparent 55%), var(--panel); }

/* ── Bosses ──────────────────────────────────────────────────────────────── */
.boss { border-top: 3px solid var(--c); overflow: hidden; }
.boss-sigil { position: absolute; right: -8px; top: -14px; font-size: 5rem; opacity: .07; pointer-events: none; }
.boss .eyebrow { color: var(--c); }
.boss h3 { font-size: 1.45rem; margin-bottom: .1rem; }
.boss-title { font-style: italic; color: var(--text) !important; margin-bottom: .6rem; }

/* ── PvP ─────────────────────────────────────────────────────────────────── */
.perks { display: grid; gap: .6rem; }
.perk { display: flex; gap: .9rem; padding: .9rem 1rem; }
.perk-icon { font-size: 1.4rem; }
.perk h3 { font-size: .98rem; margin-bottom: .2rem; }
.perk p { font-size: .88rem; }
.sky { border-left: 3px solid var(--danger); }
.mode-tag { display: inline-block; font: 700 1.05rem var(--mono); color: var(--ember2); margin-bottom: .5rem; }
.prize-list { list-style: none; margin: 0 0 .6rem; padding: 0; display: grid; gap: .25rem; font-size: .92rem; }
.empty { text-align: center; color: var(--muted); border-style: dashed; }

/* ── Items / Join ────────────────────────────────────────────────────────── */
.item h3 { font-size: 1.02rem; }
.join-top { margin-top: .5rem; }
.join-top .ip-card { min-width: 0; }
.discord-card { display: flex; align-items: center; gap: 1rem; background: linear-gradient(135deg, rgba(88,101,242,.22), transparent 70%), var(--panel); border-color: rgba(88,101,242,.45); }
.discord-card .i-discord { width: 40px; height: 40px; color: #8c97ff; flex-shrink: 0; }
.discord-card .arrow { margin-left: auto; color: var(--muted); font-size: 1.2rem; }
.faq { display: grid; gap: .6rem; }
.faq details { padding: 0; }
.faq summary { cursor: pointer; padding: 1rem 1.2rem; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--ember); font-family: var(--mono); }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding: 0 1.2rem 1rem; }

.notfound { text-align: center; padding: 6rem 0; }
.notfound h1 { font-size: 7rem; color: var(--corrupt); }
.notfound p { color: var(--text2); margin: 1rem 0 1.5rem; }

/* ── Rules ───────────────────────────────────────────────────────────────── */
.end-count { margin-top: .6rem; font: 600 .9rem var(--mono); color: #c9b3ff; }
.end-count b { color: var(--text); }
.dim-top { display: flex; align-items: center; gap: .7rem; margin-bottom: .4rem; }
.dim-top .item-icon { margin: 0; }
.dim-top h3 { margin: 0; }
.dim-nether { border-top: 3px solid #ff5a2e; }
.dim-end { border-top: 3px solid #c9b3ff; }
.dim-state { font-family: var(--mono); color: var(--text2); }
.dim-state b { color: var(--text); }
.dim-open { color: var(--ok); font-weight: 600; }
.combat { border-left: 3px solid var(--danger); }
.rules-list { margin: 0; padding: 0; list-style: none; counter-reset: r; display: grid; gap: .5rem; }
.rules-list li { counter-increment: r; position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem .8rem 3.2rem; color: var(--text2); }
.rules-list li::before { content: counter(r, decimal-leading-zero); position: absolute; left: 1rem; top: .8rem; font: 700 .95rem var(--mono); color: var(--ember); }
.rules-list b { color: var(--text); }

/* ── Footer / toast ──────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); background: var(--bg2); margin-top: 2rem; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 2.2rem clamp(16px, 3vw, 32px); display: grid; grid-template-columns: 1.2fr 1.5fr 1fr; gap: 2rem; }
.footer-brand .glitch { font: 700 1.3rem var(--display); letter-spacing: .12em; }
.footer-nav { display: grid; grid-template-columns: repeat(3, auto); gap: .4rem 1.2rem; align-content: start; }
.footer-nav a { color: var(--text2); font-size: .9rem; }
.footer-meta { display: grid; gap: .5rem; justify-items: start; align-content: start; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--panel2); border: 1px solid var(--ember); color: var(--text); padding: .6rem 1.1rem; border-radius: 10px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 80; font-size: .9rem; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .menu-btn { display: flex; }
  .nav {
    position: fixed; top: 61px; left: 0; right: 0; bottom: 0; z-index: 49;
    flex-direction: column; align-items: stretch; gap: .2rem; padding: 1rem;
    background: rgba(8,7,11,.97); backdrop-filter: blur(10px);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility .2s; overflow-y: auto;
  }
  .menu-open .nav { opacity: 1; visibility: visible; transform: none; }
  .nav a { font-size: 1.05rem; padding: .8rem 1rem; }
  .nav-discord { display: flex !important; align-items: center; gap: .5rem; margin-top: .5rem; border: 1px solid rgba(88,101,242,.5); }
  .top-actions { margin-left: auto; }
  .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .tiers { grid-template-columns: 1fr; }
  .tier { display: grid; grid-template-columns: 44px 44px 1fr; align-items: center; gap: .6rem; }
  .tier::before { top: 0; bottom: 0; height: auto; width: calc(var(--n) * 20%); right: auto; background: linear-gradient(90deg, rgba(255,122,26,.12), transparent); }
  .tier-score { margin: 0; }
  .keyvis { grid-template-columns: 1fr; gap: 1rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .cmd-table > div { grid-template-columns: 1fr; gap: .2rem; }
}
@media (max-width: 560px) {
  body { font-size: 15px; }
  .brand-text { font-size: 1rem; }
  .g4, .g5 { grid-template-columns: minmax(0, 1fr); }
  .race-meta { grid-template-columns: 1fr; }
  .hero-row { flex-direction: column; align-items: stretch; }
  .ip-card { min-width: 0; }
  .hero-cta .btn { width: 100%; }
  .craft-3 { grid-template-columns: repeat(3, 48px); grid-auto-rows: 48px; }
  .slot { width: 48px; height: 48px; font-size: 1.3rem; }
  .fd-track { gap: 2px; }
  .fd-slot { height: 32px; }
}

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