:root {
  --night: #1A0933;
  --night-0: #12052a;
  --night-2: #241047;
  --night-3: #2f1660;
  --night-4: #3d1f7a;
  --gold: #FFD700;
  --gold-l: #fff6b0;
  --gold-d: #b89400;
  --cyan: #00E5FF;
  --cyan-l: #9ff6ff;
  --cyan-d: #0093a6;
  --ink: #f4ecff;
  --dim: #a99bc9;
  --red: #ff4f6d;
  --px: 4px;
  --gap: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: "VT323", monospace;
  font-size: 22px;
  line-height: 1.25;
  image-rendering: pixelated;
  overflow-x: hidden;
}
main, .panel, .stat, .card, .tcard { min-width: 0; }
.kicker { overflow-wrap: anywhere; }
a { color: var(--cyan); }
a:hover { color: var(--gold); }
code { font-family: "VT323", monospace; color: var(--gold); word-break: break-all; }
.hidden { display: none !important; }
.dim { color: var(--dim); }
.small { font-size: 18px; }
::selection { background: var(--gold); color: var(--night); }

#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; }
.scan {
  position: fixed; inset: 0; pointer-events: none; z-index: 50;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,.12) 2px 4px);
  mix-blend-mode: multiply;
}

/* ───── header ───── */
header.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 16px;
  background: rgba(26, 9, 51, .94);
  border-bottom: var(--px) solid var(--night-3);
  box-shadow: 0 var(--px) 0 #000;
}
header.bar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: calc(-2 * var(--px) - 2px); height: 2px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 8px, transparent 8px 16px, var(--cyan) 16px 24px, transparent 24px 32px);
  opacity: .5;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--gold); font-family: "Press Start 2P"; font-size: 13px; text-shadow: 2px 2px 0 #000; white-space: nowrap; }
.brand:hover { color: var(--gold-l); }
.brand canvas { width: 32px; height: 32px; }
nav { display: flex; gap: 4px; margin-left: auto; }
nav a {
  position: relative; color: var(--ink); text-decoration: none; font-family: "Press Start 2P"; font-size: 10px;
  padding: 8px 8px;
}
nav a::before { content: "▸"; position: absolute; left: -4px; color: var(--gold); opacity: 0; }
nav a:hover { color: var(--cyan); }
nav a:hover::before { opacity: 1; animation: nudge .6s steps(2) infinite; }
@keyframes nudge { 50% { transform: translateX(3px); } }

/* ───── buttons ───── */
.btn {
  position: relative;
  font-family: "Press Start 2P"; font-size: 10px; line-height: 1.3;
  color: var(--night); background: var(--cyan);
  border: 0; padding: 10px 14px; cursor: pointer; text-decoration: none; display: inline-block;
  box-shadow:
    inset calc(-1 * var(--px)) calc(-1 * var(--px)) 0 rgba(0,0,0,.35),
    inset var(--px) var(--px) 0 rgba(255,255,255,.35),
    0 var(--px) 0 #000;
  transition: transform .08s steps(2), filter .08s steps(2);
}
.btn:hover { color: var(--night); filter: brightness(1.12); transform: translateY(-2px); }
.btn:active { transform: translateY(var(--px)); box-shadow: inset calc(-1 * var(--px)) calc(-1 * var(--px)) 0 rgba(0,0,0,.35); filter: brightness(.95); }
.btn:focus-visible { outline: 2px dashed var(--ink); outline-offset: 4px; }
.btn:disabled { filter: grayscale(1) brightness(.7); cursor: not-allowed; transform: none; }
.btn.gold { background: var(--gold); }
.btn.cyan { background: var(--cyan); }
.btn.ghost { background: var(--night-3); color: var(--ink); }
.btn.ghost:hover { color: var(--gold); }
.btn.big { font-size: 12px; padding: 15px 22px; }
.btn.tiny { font-size: 8px; padding: 7px 9px; }
.btn.wide { width: 100%; }

main { max-width: 1100px; margin: 0 auto; padding: 0 16px 40px; }

/* ───── hero ───── */
.hero {
  position: relative; text-align: center;
  margin: 36px 0 8px; padding: 40px 24px 28px;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(0,229,255,.10), transparent 60%),
    rgba(18, 5, 42, .55);
  border: var(--px) solid var(--night-3);
  box-shadow: 0 0 0 var(--px) #000, inset 0 0 0 var(--px) rgba(0,0,0,.35);
}
/* pixel corner brackets */
.hero::before, .hero::after {
  content: ""; position: absolute; width: 28px; height: 28px; pointer-events: none;
  border: var(--px) solid var(--gold);
}
.hero::before { top: -10px; left: -10px; border-right: 0; border-bottom: 0; box-shadow: -4px -4px 0 #000; }
.hero::after { bottom: -10px; right: -10px; border-left: 0; border-top: 0; box-shadow: 4px 4px 0 #000; }
.kicker {
  display: inline-block; margin: 0; padding: 6px 10px;
  font-family: "Press Start 2P"; font-size: 9px; line-height: 1.7; color: var(--cyan); letter-spacing: 2px;
  background: rgba(0,229,255,.08); border: 2px solid rgba(0,229,255,.35);
}
.title { position: relative; margin: 22px 0 16px; font-family: "Press Start 2P"; font-weight: 400; line-height: 1.15; }
.title span { display: block; }
.title span:first-child { font-size: clamp(34px, 9vw, 76px); color: var(--cyan); text-shadow: var(--px) var(--px) 0 #000, 0 0 18px rgba(0,229,255,.45); }
.title span:last-child {
  font-size: clamp(24px, 7vw, 60px);
  background: linear-gradient(180deg, var(--gold-l) 0 30%, var(--gold) 30% 65%, var(--gold-d) 65%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(var(--px) var(--px) 0 #000);
  animation: shine 3.2s steps(8) infinite;
}
@keyframes shine { 0%, 100% { filter: drop-shadow(4px 4px 0 #000) brightness(1); } 50% { filter: drop-shadow(4px 4px 0 #000) brightness(1.25); } }
/* twinkling pixel sparkles around the title */
.title::before, .title::after {
  content: ""; position: absolute; width: 4px; height: 4px; pointer-events: none;
  background: var(--gold-l);
  box-shadow: 0 -8px 0 var(--gold), 0 8px 0 var(--gold), -8px 0 0 var(--gold), 8px 0 0 var(--gold), 0 -4px 0 #fff, 0 4px 0 #fff, -4px 0 0 #fff, 4px 0 0 #fff;
  animation: twinkle 2.4s steps(4) infinite;
}
.title::before { top: 6%; left: 14%; }
.title::after { bottom: 10%; right: 12%; animation-delay: -1.2s; background: var(--cyan-l); box-shadow: 0 -8px 0 var(--cyan), 0 8px 0 var(--cyan), -8px 0 0 var(--cyan), 8px 0 0 var(--cyan), 0 -4px 0 #fff, 0 4px 0 #fff, -4px 0 0 #fff, 4px 0 0 #fff; }
@keyframes twinkle { 0%, 60%, 100% { opacity: 0; transform: scale(.5); } 70%, 90% { opacity: 1; transform: scale(1); } }
.tag { font-size: 26px; color: var(--ink); max-width: 700px; margin: 0 auto 28px; text-shadow: 2px 2px 0 #000; }

.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin: 0 0 24px; }

.gate {
  position: relative; margin: 10px auto 24px; padding: 18px 20px; max-width: 620px;
  border: var(--px) dashed var(--gold); background: rgba(36,16,71,.78);
  box-shadow: 0 var(--px) 0 #000;
}
.gate p { margin: 6px 0; }
.blink { font-family: "Press Start 2P"; font-size: 14px; line-height: 1.5; color: var(--gold); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }

.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 14px 0 18px; }
.stat {
  position: relative; background: var(--night-2); padding: 18px 8px 12px;
  border: var(--px) solid var(--night-3);
  box-shadow: 0 var(--px) 0 #000, inset 0 calc(-1 * var(--px)) 0 rgba(0,0,0,.3);
}
.stat::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: var(--px);
  background: repeating-linear-gradient(90deg, var(--gold) 0 8px, var(--gold-d) 8px 16px);
}
.stat:nth-child(even)::before { background: repeating-linear-gradient(90deg, var(--cyan) 0 8px, var(--cyan-d) 8px 16px); }
.stat b { display: block; font-family: "Press Start 2P"; font-weight: 400; font-size: 14px; line-height: 1.4; color: var(--gold); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 2px 2px 0 #000; }
.stat i { font-style: normal; color: var(--dim); font-size: 18px; }
.ca { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; padding: 10px; background: rgba(18,5,42,.6); border: 2px solid var(--night-3); }
.ca span { font-family: "Press Start 2P"; font-size: 10px; color: var(--cyan); }
.ca code { min-width: 0; }

.chip { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; max-width: 100%; margin: 0 auto 16px; padding: 8px 14px; background: var(--night-2); border: var(--px) solid var(--night-3); box-shadow: 0 var(--px) 0 #000; }
.chip img { width: 40px; height: 40px; image-rendering: pixelated; border: 2px solid #000; object-fit: cover; }
.chip b { font-family: "Press Start 2P"; font-weight: 400; font-size: 11px; color: var(--gold); }
.chip i { font-style: normal; color: var(--cyan); }

/* ───── panels ───── */
.panel {
  position: relative; margin: 40px 0; padding: 24px 24px 28px;
  background: rgba(36, 16, 71, .9);
  border: var(--px) solid var(--night-3);
  box-shadow: 0 0 0 var(--px) #000, var(--px) calc(2 * var(--px)) 0 var(--px) #000;
}
.panel::before, .panel::after {
  content: ""; position: absolute; width: 12px; height: 12px; background: var(--gold); top: -8px;
  box-shadow: inset -4px -4px 0 var(--gold-d), 0 0 0 2px #000;
}
.panel::before { left: -8px; } .panel::after { right: -8px; }
h2 {
  display: flex; align-items: center; gap: 12px;
  font-family: "Press Start 2P"; font-weight: 400; font-size: 17px; line-height: 1.4; color: var(--gold);
  margin: 0 0 14px; text-shadow: 3px 3px 0 #000;
}
h2 .ico {
  flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px;
  color: var(--cyan); font-size: 16px; text-shadow: none;
  background: var(--night); border: var(--px) solid #000;
  box-shadow: inset 0 0 0 2px var(--night-4);
}
/* pixel divider trailing the header */
h2::after {
  content: ""; flex: 1; min-width: 20px; height: 8px;
  background:
    linear-gradient(var(--gold), var(--gold)) right center / 8px 8px no-repeat,
    repeating-linear-gradient(90deg, var(--night-4) 0 8px, transparent 8px 12px) left center / calc(100% - 14px) 4px no-repeat;
}
h3 {
  font-family: "Press Start 2P"; font-weight: 400; font-size: 11px; color: var(--cyan); margin: 26px 0 12px;
  padding-bottom: 8px; border-bottom: 2px dashed var(--night-4);
}
h3::before { content: "■ "; color: var(--gold); }
.sub { color: var(--dim); margin: 0 0 18px; max-width: 860px; }

/* ───── map ───── */
.map-wrap { position: relative; }
#mapc { width: 100%; height: 320px; display: block; background: var(--night-0); border: var(--px) solid #000; box-shadow: inset 0 0 0 2px var(--night-3); }
.tip {
  position: absolute; pointer-events: none; padding: 8px 10px; font-size: 18px;
  background: var(--night); border: var(--px) solid var(--gold); white-space: nowrap; z-index: 2;
  box-shadow: var(--px) var(--px) 0 #000;
}
.legend { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 14px; font-size: 19px; }
.sw { display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -1px; border: 2px solid #000; }
.sw.gold { background: var(--gold); } .sw.cyan { background: var(--cyan); } .sw.wall { background: rgba(0,229,255,.25); border-color: var(--cyan); }

/* ───── leaderboard ───── */
.table-wrap { overflow-x: auto; border: var(--px) solid #000; background: var(--night-0); }
table { width: 100%; border-collapse: collapse; font-size: 21px; }
th {
  font-family: "Press Start 2P"; font-weight: 400; font-size: 9px; color: var(--cyan); text-align: left;
  padding: 12px 10px; background: var(--night-2); border-bottom: var(--px) solid var(--night-3);
}
td { padding: 8px 10px; border-bottom: 2px solid rgba(255,255,255,.05); white-space: nowrap; }
tbody tr:nth-child(even) { background: rgba(255,255,255,.02); }
tbody tr:hover { background: rgba(255,215,0,.07); }
.rank { font-family: "Press Start 2P"; font-size: 11px; }
.r1 { color: var(--gold); text-shadow: 0 0 6px rgba(255,215,0,.5); } .r2 { color: #dfe7f3; } .r3 { color: #e09a5b; }
.pill { display: inline-block; font-family: "Press Start 2P"; font-size: 8px; line-height: 1.2; padding: 5px 7px; box-shadow: 2px 2px 0 #000; }
.pill.on { background: var(--cyan); color: var(--night); }
.pill.off { background: var(--night-3); color: var(--dim); }
.pill.dead { background: var(--red); color: var(--night); }

/* ───── warrior / position cards ───── */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 14px; }
.card {
  background: var(--night); border: var(--px) solid var(--night-3); padding: 14px;
  box-shadow: 0 var(--px) 0 #000;
  transition: border-color .12s steps(2);
}
.card:hover { border-color: var(--night-4); }
.card .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 3px 0; border-bottom: 2px dotted rgba(255,255,255,.06); }
.card .row:last-of-type { border-bottom: 0; }
.card .row > * { min-width: 0; }
.card .row span:first-child { color: var(--dim); flex: none; }
.card .row b { font-weight: 400; color: var(--ink); text-align: right; }
.card .acts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.card.empty { color: var(--dim); border-style: dashed; text-align: center; }

.toast { margin-top: 16px; padding: 10px 12px 10px 34px; position: relative; border: var(--px) solid var(--cyan); background: var(--night); box-shadow: 0 var(--px) 0 #000; overflow-wrap: anywhere; }
.toast::before { content: "!"; position: absolute; left: 10px; top: 9px; font-family: "Press Start 2P"; font-size: 12px; color: var(--cyan); }
.toast.err { border-color: var(--red); color: #ffd0d8; }
.toast.err::before { color: var(--red); }

/* ───── lore ───── */
.steps { padding: 0; margin: 0 0 18px; list-style: none; counter-reset: st; display: grid; gap: 12px; }
.steps li {
  counter-increment: st; position: relative; padding: 10px 12px 10px 58px;
  background: rgba(18,5,42,.55); border-left: var(--px) solid var(--night-4);
}
.steps li::before {
  content: counter(st); position: absolute; left: 10px; top: 10px;
  width: 32px; height: 32px; display: grid; place-items: center;
  font-family: "Press Start 2P"; font-size: 12px; color: var(--night);
  background: var(--gold); box-shadow: inset -3px -3px 0 var(--gold-d), 2px 2px 0 #000;
}
.steps b { color: var(--gold); font-weight: 400; }
.rules { padding: 12px 16px; border: 2px dashed var(--night-4); background: rgba(18,5,42,.4); }
.rules p { margin: 6px 0; color: var(--dim); }

.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; max-width: 1100px; margin: 0 auto;
  padding: 18px 16px 30px; font-size: 18px; border-top: 2px dashed var(--night-3);
}
.foot span { min-width: 0; overflow-wrap: anywhere; }

/* ───── arena cards ───── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 22px 16px; padding-top: 8px; }
.tcard {
  position: relative; display: block; text-decoration: none; color: var(--ink);
  background: linear-gradient(180deg, var(--night-2), var(--night) 60%);
  border: var(--px) solid var(--night-3); padding: 16px 12px 12px;
  box-shadow: 0 var(--px) 0 #000;
  transition: transform .12s steps(2), border-color .12s steps(2), box-shadow .12s steps(2);
}
a.tcard:hover { color: var(--ink); transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 calc(2 * var(--px)) 0 #000; }
a.tcard:active { transform: translateY(0); box-shadow: 0 0 0 #000; }
a.tcard:focus-visible { outline: 2px dashed var(--gold); outline-offset: 4px; }
.tcard.sel { border-color: var(--cyan); }
.tcard.sel::after {
  content: ""; position: absolute; inset: calc(-2 * var(--px)); pointer-events: none;
  border: 2px solid var(--cyan); box-shadow: 0 0 14px rgba(0,229,255,.45);
  animation: selpulse 1.6s steps(4) infinite;
}
@keyframes selpulse { 50% { opacity: .35; } }
.tcard .top { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; min-width: 0; }
.tcard .top > div { flex: 1; min-width: 0; }
.tcard img, .tcard canvas { flex: none; width: 54px; height: 54px; border: 2px solid #000; object-fit: cover; image-rendering: pixelated; background: var(--night-3); box-shadow: 2px 2px 0 #000, inset 0 0 0 2px var(--night-4); }
.tcard .nm { font-family: "Press Start 2P"; font-size: 10px; color: var(--gold); line-height: 1.6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tcard .sym { color: var(--cyan); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcard .row { display: flex; justify-content: space-between; gap: 8px; font-size: 19px; padding: 1px 0; }
.tcard .row span:first-child { color: var(--dim); }
.tcard .row b { font-weight: 400; color: var(--ink); white-space: nowrap; }
.tcard .bar {
  position: static; display: block; height: 8px; padding: 0; margin-top: 12px; gap: 0;
  background: var(--night-0); border: 0; box-shadow: 0 0 0 2px #000; overflow: hidden;
}
.tcard .bar i {
  display: block; height: 100%; min-width: 4px;
  background:
    repeating-linear-gradient(90deg, transparent 0 6px, rgba(0,0,0,.35) 6px 8px),
    linear-gradient(90deg, var(--cyan), var(--gold));
  background-size: 8px 100%, 100% 100%;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.35);
  animation: march 1.2s steps(4) infinite;
}
@keyframes march { from { background-position: 0 0, 0 0; } to { background-position: 8px 0, 0 0; } }
.tcard.demo { opacity: .82; border-style: dashed; cursor: default; }
.tcard.demo:hover { opacity: 1; }
.ribbon {
  position: absolute; top: -12px; right: 10px; z-index: 1;
  font-family: "Press Start 2P"; font-size: 7px; line-height: 1; padding: 5px 7px 4px;
  background: var(--dim); color: var(--night);
  box-shadow: 2px 2px 0 #000;
}
.ribbon.main { background: var(--gold); box-shadow: 2px 2px 0 #000, inset -2px -2px 0 var(--gold-d); }

/* ───── forge (crafting panel) ───── */
.forge {
  display: grid; grid-template-columns: 220px 1fr; gap: 22px;
  padding: 18px; background: rgba(18,5,42,.7);
  border: var(--px) solid #000; box-shadow: inset 0 0 0 2px var(--night-4);
}
.forge-art { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.forge-art::after {
  content: "INGREDIENT SLOT"; font-family: "Press Start 2P"; font-size: 7px; color: var(--dim); letter-spacing: 1px;
}
.drop {
  position: relative; display: flex; align-items: center; justify-content: center; text-align: center; cursor: pointer;
  width: 200px; height: 200px; padding: 24px;
  border: var(--px) solid #000; color: var(--dim);
  background:
    linear-gradient(45deg, rgba(255,255,255,.03) 25%, transparent 25% 75%, rgba(255,255,255,.03) 75%) 0 0 / 16px 16px,
    linear-gradient(45deg, rgba(255,255,255,.03) 25%, transparent 25% 75%, rgba(255,255,255,.03) 75%) 8px 8px / 16px 16px,
    var(--night);
  box-shadow: inset 0 0 0 var(--px) var(--night-3), inset 0 0 0 calc(2 * var(--px)) var(--night-0), 0 var(--px) 0 #000;
  font-family: "Press Start 2P"; font-size: 10px; line-height: 1.8; overflow: hidden;
  transition: color .12s steps(2);
}
.drop::before {
  content: ""; position: absolute; inset: 12px; pointer-events: none;
  border: 2px dashed var(--gold-d);
}
.drop:hover { color: var(--gold); }
.drop:hover::before { border-color: var(--gold); animation: blink 1s steps(2) infinite; }
.drop small { font-family: "VT323"; font-size: 16px; }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.forge-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; min-width: 0; }
.forge-fields label { display: flex; flex-direction: column; gap: 6px; color: var(--cyan); font-size: 19px; min-width: 0; }
.forge-fields label small { color: var(--dim); }
.forge-fields .wide { grid-column: 1 / -1; }
.forge-fields input, .forge-fields textarea {
  width: 100%; min-width: 0;
  font-family: "VT323"; font-size: 21px; color: var(--ink); background: var(--night-0);
  border: var(--px) solid var(--night-3); padding: 6px 10px; outline: none; resize: vertical;
  box-shadow: inset 2px 2px 0 #000;
  transition: border-color .1s steps(2);
}
.forge-fields input::placeholder, .forge-fields textarea::placeholder { color: #6a5a92; }
.forge-fields input:hover, .forge-fields textarea:hover { border-color: var(--night-4); }
.forge-fields input:focus, .forge-fields textarea:focus { border-color: var(--cyan); }
.cost {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-content: center; align-self: end;
  font-size: 19px; color: var(--dim);
  padding: 8px 10px; background: var(--night); border: 2px dashed var(--gold-d);
}
.cost b { font-weight: 400; color: var(--gold); text-align: right; }

/* ───── quest tracker ───── */
.quest {
  position: relative; margin: 20px 0 0; padding: 40px 14px 14px; list-style: none; display: grid; gap: 8px;
  counter-reset: q; background: rgba(18,5,42,.7); border: var(--px) solid #000; box-shadow: inset 0 0 0 2px var(--night-4);
}
.quest::before {
  content: "QUEST LOG"; position: absolute; top: 14px; left: 14px;
  font-family: "Press Start 2P"; font-size: 9px; color: var(--gold);
}
.quest li {
  counter-increment: q; position: relative; display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; background: var(--night); border-left: var(--px) solid var(--night-3); color: var(--dim);
}
.quest li::before {
  content: ""; flex: none; width: 16px; height: 16px; border: 2px solid var(--night-4); background: var(--night-0);
}
.quest li::after { content: "STEP " counter(q); margin-left: auto; flex: none; white-space: nowrap; font-family: "Press Start 2P"; font-size: 7px; color: #6a5a92; }
.quest li.now { border-color: var(--gold); color: var(--ink); background: linear-gradient(90deg, rgba(255,215,0,.12), var(--night) 70%); }
.quest li.now::before { border-color: var(--gold); background: var(--gold); animation: blink 1s steps(2) infinite; }
.quest li.now::after { content: "IN PROGRESS"; color: var(--gold); }
.quest li.ok { border-color: var(--cyan); color: var(--cyan); }
.quest li.ok::before {
  border-color: var(--cyan); background:
    linear-gradient(var(--cyan), var(--cyan)) 2px 6px / 4px 4px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) 5px 8px / 4px 2px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) 7px 2px / 3px 8px no-repeat,
    var(--night-0);
}
.quest li.ok::after { content: "DONE"; color: var(--cyan); }

/* ───── responsive ───── */
@media (max-width: 760px) {
  body { font-size: 20px; }
  nav { display: none; }
  header.bar { justify-content: space-between; padding: 10px 16px; }
  .brand { font-size: 11px; }
  .hero { margin: 24px 4px 8px; padding: 28px 14px 20px; }
  .kicker { font-size: 8px; letter-spacing: 1px; }
  .tag { font-size: 22px; }
  .tag br { display: none; }
  .drop small { font-size: 18px; }
  .hero-cta { gap: 12px; }
  .hero-cta .btn { flex: 1 1 100%; text-align: center; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stats .stat:first-child { grid-column: span 2; }
  .stat b { font-size: 12px; }
  .panel { margin: 32px 4px; padding: 18px 14px 20px; }
  h2 { font-size: 12px; gap: 10px; }
  h2 .ico { width: 28px; height: 28px; font-size: 13px; }
  .forge { grid-template-columns: 1fr; padding: 12px; }
  .drop { width: 100%; max-width: 260px; height: 180px; }
  .forge-fields { grid-template-columns: 1fr; }
  .steps li { padding-left: 52px; }
  .steps li::before { width: 28px; height: 28px; font-size: 10px; }
  .quest li::after { display: none; }
  .quest li.now::after, .quest li.ok::after { display: inline; }
}

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