:root {
  --night: #0d1026;
  --cave: #141418;
  --cave-2: #1c1c22;
  --text: #ffffff;
  --muted: #bdbdc7;
  --dim: #8a8a96;
  --shadow-text: #3f3f3f;
  --grass: #5fa83a;
  --grass-hi: #8be05a;
  --grass-lo: #2f6b1a;
  --emerald: #17dd62;
  --xp: #80ff20;
  --gold: #fcdb05;
  --diamond: #4aedd9;
  --redstone: #ff3a2f;
  --lapis: #3c63d6;
  --amethyst: #a46bff;
  --yellow: #ffff55;
  --display: "Pixelify Sans", system-ui, sans-serif;
  --pixel: "Silkscreen", "Pixelify Sans", monospace;
  --mono: "VT323", ui-monospace, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --tx: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0; color: var(--text); font-family: var(--display); font-size: 18px; line-height: 1.5;
  background-color: var(--cave);
  background-image: linear-gradient(rgba(16,16,20,.9), rgba(16,16,20,.9)), var(--tex-deepslate);
  background-size: auto, var(--tx) var(--tx);
  image-rendering: pixelated;
  -webkit-font-smoothing: none; overflow-x: clip;
}
body.loading { overflow: hidden; }
img, video { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1; font-weight: 700; }
p { margin: 0; }
button { font: inherit; color: inherit; }
::selection { background: var(--grass); color: #fff; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.px { image-rendering: pixelated; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 28px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* ============ LOGO (stone, extruded) ============ */
.logo {
  display: inline-block; font-family: var(--pixel); font-weight: 700; letter-spacing: .02em; line-height: 1;
  color: #cfcfcf;
  background: linear-gradient(180deg, rgba(255,255,255,.25), rgba(0,0,0,.15)), var(--tex-stone);
  background-size: auto, 32px 32px;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 #6a6a6a) drop-shadow(0 1px 0 #555) drop-shadow(0 1px 0 #444) drop-shadow(0 1px 0 #333) drop-shadow(0 4px 0 #111);
}
.logo-sm { font-size: 24px; }
.logo-md { font-size: 40px; }
.logo-lg { font-size: clamp(48px, 9vw, 112px); }
.logo-xl { font-size: clamp(56px, 12vw, 168px); }

.splash {
  position: absolute; font-family: var(--pixel); font-weight: 700; color: var(--yellow);
  text-shadow: 2px 2px 0 #3f3f00; white-space: nowrap; transform: rotate(-16deg);
  animation: splash .5s ease-in-out infinite alternate; pointer-events: none;
}
@keyframes splash { to { transform: rotate(-16deg) scale(1.08); } }

/* ============ BUTTONS (stone GUI buttons) ============ */
.mcb {
  --bg: var(--tex-stone); --tint: rgba(110,110,110,.55);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 24px; cursor: pointer; white-space: nowrap;
  font-family: var(--pixel); font-size: 17px; color: #fff; text-shadow: 2px 2px 0 var(--shadow-text);
  background: linear-gradient(var(--tint), var(--tint)), var(--bg); background-size: auto, 48px 48px;
  border: 3px solid #000;
  box-shadow: inset 3px 3px 0 rgba(255,255,255,.42), inset -3px -4px 0 rgba(0,0,0,.45);
  transition: transform .12s steps(2), filter .12s;
}
.mcb i { font-size: 20px; }
.mcb:hover { filter: brightness(1.15); box-shadow: inset 0 0 0 3px #fff, inset 5px 5px 0 rgba(255,255,255,.35), inset -5px -6px 0 rgba(0,0,0,.4); transform: translateY(-2px); }
.mcb:active { transform: translateY(2px); box-shadow: inset -3px -3px 0 rgba(255,255,255,.3), inset 3px 4px 0 rgba(0,0,0,.5); }
.mcb-green { --bg: var(--tex-grass-top); --tint: rgba(60,140,30,.45); }
.mcb-gold { --bg: var(--tex-stone); --tint: rgba(220,170,20,.6); color: #fff; }
.mcb-dark { --bg: var(--tex-deepslate); --tint: rgba(20,20,26,.55); }
.mcb-sm { height: 42px; padding: 0 14px; font-size: 13px; }
.mcb-sm i { font-size: 16px; }
.mcb-lg { height: 62px; padding: 0 30px; font-size: 20px; }
.mcb[disabled] { filter: grayscale(1) brightness(.6); cursor: not-allowed; pointer-events: none; color: #a0a0a0; }

/* ============ PANELS ============ */
.mcp {
  background: linear-gradient(rgba(24,24,30,.86), rgba(24,24,30,.9)), var(--tex-deepslate); background-size: auto, 64px 64px;
  border: 3px solid #000;
  box-shadow: inset 3px 3px 0 rgba(255,255,255,.12), inset -3px -3px 0 rgba(0,0,0,.55), 0 10px 0 rgba(0,0,0,.35);
}
.inv {
  background: #c6c6c6; color: #3f3f3f; border: 3px solid #000;
  box-shadow: inset 4px 4px 0 #fff, inset -4px -4px 0 #555, 0 10px 0 rgba(0,0,0,.35);
}
.slotbox { background: #8b8b8b; box-shadow: inset 3px 3px 0 #373737, inset -3px -3px 0 #fff; }

/* ============ LOADER (dirt screen) ============ */
#loader { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,.55)), var(--tex-dirt); background-size: auto, 64px 64px; }
#loader.gone { display: none; }
.ld-center { display: grid; justify-items: center; gap: 26px; text-align: center; padding: 0 20px; }
.ld-text { font-family: var(--pixel); font-size: 20px; color: #fff; text-shadow: 2px 2px 0 var(--shadow-text); }
.ld-bar { width: 300px; max-width: 80vw; height: 12px; background: #808080; border: 2px solid #000; }
.ld-bar i { display: block; height: 100%; width: 100%; background: var(--xp); box-shadow: inset 0 -3px 0 #3f8a10; transform-origin: left; transform: scaleX(0); }

/* ============ NAV ============ */
.nav { position: fixed; top: 12px; left: 0; right: 0; z-index: 60; padding: 0 14px; pointer-events: none; transition: transform .4s var(--ease); }
.nav.hide { transform: translateY(-130%); }
.nav-inner { pointer-events: auto; max-width: 1200px; margin: 0 auto; height: 66px; padding: 0 10px 0 14px; display: flex; align-items: center; gap: 26px;
  background: rgba(14,14,18,.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 3px solid #000; box-shadow: inset 3px 3px 0 rgba(255,255,255,.1), inset -3px -3px 0 rgba(0,0,0,.5), 0 8px 0 rgba(0,0,0,.3); }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-block { width: 34px; height: 34px; image-rendering: pixelated; transition: transform .5s var(--spring); }
.brand:hover .brand-block { transform: rotate(-12deg) scale(1.1); }
.nav-links { display: flex; gap: 4px; }
.nav-links a { padding: 8px 12px; font-family: var(--pixel); font-size: 14px; color: var(--muted); text-shadow: 2px 2px 0 #000; transition: color .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--yellow); }
.nav-cta { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.nav-burger { display: none; width: 44px; height: 42px; border: 3px solid #000; background: #6f6f6f; color: #fff; font-size: 20px; cursor: pointer; box-shadow: inset 3px 3px 0 rgba(255,255,255,.4), inset -3px -3px 0 rgba(0,0,0,.4); }
.mobile-menu { pointer-events: auto; max-width: 1200px; margin: 8px auto 0; padding: 8px; display: grid; background: rgba(14,14,18,.95); border: 3px solid #000; }
.mobile-menu a { padding: 14px 12px; font-family: var(--pixel); font-size: 18px; }
@media (max-width: 900px) { .nav-links { display: none; } .nav-burger { display: grid; place-items: center; } }
@media (min-width: 901px) { .mobile-menu { display: none !important; } }
@media (max-width: 480px) { .nav-cta .mcb-sm .lbl { display: none; } .nav-inner { gap: 10px; } .logo-sm { font-size: 18px; } }

/* ============ HERO ============ */
.hero { position: relative; min-height: 100dvh; display: flex; align-items: center; overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(180deg, #070a1f 0%, #121a4a 45%, #3d2a6a 75%, #a4507a 100%); }
.stars { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.stars i { position: absolute; width: 4px; height: 4px; background: #fff; animation: twinkle 2.4s steps(2) infinite; }
@keyframes twinkle { 50% { opacity: .25; } }
.moon { position: absolute; top: 14%; right: 9%; width: 64px; height: 64px; background: #f4f1d0; box-shadow: inset -12px -12px 0 #d9d4a8, 0 0 0 8px rgba(244,241,208,.08), 0 0 60px rgba(244,241,208,.35); z-index: -2; }
.hero-canvas { position: absolute; inset: 0; z-index: -1; }
.hero-canvas canvas { width: 100% !important; height: 100% !important; display: block; }
.hero-canvas.no-webgl { background: center / cover no-repeat; }
.hero-content { position: relative; width: 100%; padding-top: 110px; padding-bottom: 80px; }
.hero-copy { position: relative; max-width: 640px; }
.hero-tag { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px; font-family: var(--pixel); font-size: 13px; color: #fff; background: rgba(0,0,0,.5); border: 2px solid rgba(255,255,255,.25); }
.hero-tag b { color: var(--xp); font-weight: 400; }
.hero h1 { position: relative; margin-top: 22px; font-family: var(--display); font-weight: 700; font-size: clamp(44px, 6.4vw, 96px); line-height: .95; text-shadow: 4px 4px 0 #000; }
.hero h1 .line { display: block; overflow: hidden; padding: 0 8px .12em 0; }
.hero h1 .ch { display: inline-block; will-change: transform; }
.hero h1 .accent { color: var(--grass-hi); }
.hero .splash { left: 40%; right: auto; top: -34px; font-size: clamp(16px, 1.8vw, 24px); }
.hero-sub { margin-top: 22px; font-size: 21px; color: #e3e3ea; max-width: 30ch; text-shadow: 2px 2px 0 #000; }
.hero-ctas { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; }

.chip { position: absolute; right: 28px; bottom: 70px; width: 340px; z-index: 2; padding: 14px 16px; font-family: var(--mono); font-size: 20px; line-height: 1.15;
  background: rgba(0,0,0,.62); border: 3px solid #000; box-shadow: inset 2px 2px 0 rgba(255,255,255,.12); }
.chip-top { display: flex; justify-content: space-between; color: var(--dim); font-size: 18px; }
.chip-top b { color: var(--yellow); font-weight: 400; }
.chip-name { margin-top: 6px; font-family: var(--pixel); font-size: 18px; color: #fff; text-shadow: 2px 2px 0 #000; }
.chip-prompt { margin-top: 6px; color: #a8ff8a; min-height: 44px; }
.xpbar { position: relative; height: 12px; margin-top: 10px; background: #2a2a2a; border: 2px solid #000; }
.xpbar i { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, var(--xp) 0 18px, #4ea81a 18px 20px); box-shadow: inset 0 -3px 0 rgba(0,0,0,.25); transform-origin: left; transform: scaleX(0); transition: transform .2s; }
.chip-foot { margin-top: 6px; display: flex; justify-content: space-between; color: var(--dim); font-size: 18px; }
@media (max-width: 900px) {
  .hero { align-items: flex-start; }
  .hero-content { padding-top: 110px; padding-bottom: 58vh; }
  .hero-canvas { top: auto; height: 60vh; }
  .chip { left: 16px; right: 16px; width: auto; bottom: 36px; }
  .hero .splash { left: auto; right: 0; top: -26px; }
  .moon { top: 12%; right: 6%; width: 44px; height: 44px; }
}

/* ============ DIRT BAND (marquee) ============ */
.band { position: relative; z-index: 2; overflow: hidden; border-top: 3px solid #000; border-bottom: 3px solid #000;
  background: linear-gradient(rgba(0,0,0,.25), rgba(0,0,0,.25)), var(--tex-dirt); background-size: auto, 56px 56px; }
.band::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 18px; background: var(--tex-grass-top); background-size: 56px 56px; box-shadow: 0 3px 0 rgba(0,0,0,.25); z-index: 1; }
.band-track { display: flex; width: max-content; padding: 38px 0 22px; will-change: transform; }
.band-item { display: inline-flex; align-items: center; gap: 30px; padding-right: 30px; font-family: var(--pixel); font-size: clamp(24px, 3vw, 40px); color: #fff; text-shadow: 3px 3px 0 #2a1a0c; white-space: nowrap; }
.gem-i { width: 22px; height: 22px; background: var(--emerald); clip-path: polygon(50% 0, 100% 35%, 80% 100%, 20% 100%, 0 35%); box-shadow: inset -4px -4px 0 #0a8a3a; }

/* ============ SECTIONS ============ */
.section { position: relative; padding-top: 130px; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-family: var(--pixel); font-size: 14px; color: var(--yellow); text-shadow: 2px 2px 0 #3f3f00; }
.h2 { margin-top: 14px; font-family: var(--display); font-weight: 700; font-size: clamp(38px, 5.6vw, 80px); line-height: .95; text-shadow: 4px 4px 0 #000; }
.h2 .g { color: var(--grass-hi); }
.h2 .d { color: var(--diamond); }
.h2 .y { color: var(--gold); }
.lead { margin-top: 18px; color: var(--muted); font-size: 20px; max-width: 52ch; }
.split-words .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding: 0 4px .1em 0; }
.split-words .w > span { display: inline-block; }

/* ============ SERVER LIST ============ */
.browser-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 34px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fchip { font-family: var(--pixel); font-size: 13px; padding: 9px 14px; cursor: pointer; color: #ddd; background: #3a3a3a; border: 3px solid #000; box-shadow: inset 2px 2px 0 rgba(255,255,255,.25), inset -2px -3px 0 rgba(0,0,0,.4); text-shadow: 2px 2px 0 #000; }
.fchip.active { background: var(--grass); color: #fff; }
.search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; min-width: 250px; background: #000; border: 3px solid #a0a0a0; color: #a0a0a0; }
.search:focus-within { border-color: #fff; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #fff; font: 22px var(--mono); }
.search input::placeholder { color: #707070; }
@media (max-width: 640px) { .search { min-width: 0; width: 100%; } }

.grid-servers { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 26px; }
.grid-servers:has(> .scard:only-child) { grid-template-columns: minmax(0, 720px); }
@media (max-width: 440px) { .grid-servers { grid-template-columns: 1fr; } }
.scard { display: block; perspective: 900px; }
.scard-in { position: relative; transform-style: preserve-3d; transition: transform .45s var(--ease); }
.scard:hover .scard-in { outline: 3px solid #fff; outline-offset: -3px; }
.scard-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; border-bottom: 3px solid #000; }
.scard-media img, .scard-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), opacity .4s; }
.scard-media video { opacity: 0; }
.scard:hover .scard-media video.ready { opacity: 1; }
.scard:hover .scard-media img { transform: scale(1.07); }
.live-tag { position: absolute; top: 12px; left: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; font-family: var(--pixel); font-size: 12px; color: var(--xp); background: rgba(0,0,0,.7); border: 2px solid #000; text-shadow: 2px 2px 0 #000; }
.live-tag::before { content: ""; width: 8px; height: 8px; background: var(--xp); animation: twinkle 1s steps(2) infinite; }
.srow { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 16px 18px 6px; }
.sicon { width: 72px; height: 72px; border: 3px solid #000; background: #222; overflow: hidden; }
.sicon img { width: 100%; height: 100%; object-fit: cover; }
.sname { font-family: var(--pixel); font-size: 20px; text-shadow: 2px 2px 0 #000; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.tick { font-family: var(--mono); font-size: 22px; color: var(--yellow); }
.motd { margin-top: 4px; font-family: var(--mono); font-size: 21px; line-height: 1.05; color: #aaa; }
.motd .a { color: #55ff55; } .motd .b { color: #55ffff; } .motd .e { color: #ffff55; } .motd .c { color: #ff5555; } .motd .d { color: #ff55ff; } .motd .f { color: #fff; }
.ping { display: flex; align-items: flex-end; gap: 2px; height: 22px; }
.ping i { width: 4px; background: #55ff55; box-shadow: 1px 1px 0 #000; }
.ping i:nth-child(1) { height: 5px; } .ping i:nth-child(2) { height: 9px; } .ping i:nth-child(3) { height: 13px; } .ping i:nth-child(4) { height: 17px; } .ping i:nth-child(5) { height: 21px; }
.scard-body { padding: 8px 18px 18px; }
.slots { margin-top: 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.slots > div { padding: 8px 10px; }
.lbl-s { display: block; font-family: var(--pixel); font-size: 10px; color: #3f3f3f; }
.val { font-family: var(--mono); font-size: 26px; line-height: 1; color: #fff; text-shadow: 2px 2px 0 #3f3f3f; }
.val.up { color: #55ff55; } .val.down { color: #ff5555; }
.xp { margin-top: 14px; }
.xp-row { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--mono); font-size: 20px; color: var(--muted); margin-bottom: 4px; }
.xp-row b { color: var(--xp); font-weight: 400; text-shadow: 2px 2px 0 #000; font-size: 22px; }
.skel { color: transparent !important; text-shadow: none !important; background: linear-gradient(90deg, #6f6f6f 0%, #9a9a9a 50%, #6f6f6f 100%); background-size: 200% 100%; animation: shimmer 1.2s steps(8) infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* empty state */
.empty { position: relative; display: grid; grid-template-columns: 1fr 1fr; min-height: 420px; overflow: hidden; }
.empty-copy { padding: 44px; display: flex; flex-direction: column; justify-content: center; z-index: 1; }
.empty h3 { font-family: var(--display); font-size: clamp(30px, 3.2vw, 46px); text-shadow: 3px 3px 0 #000; }
.empty p { margin-top: 14px; color: var(--muted); max-width: 42ch; }
.empty .mcb { margin-top: 26px; align-self: flex-start; }
.queue { margin-top: 20px; display: flex; gap: 10px; align-items: center; font-family: var(--mono); font-size: 22px; color: var(--muted); }
.queue i { width: 14px; height: 14px; background: var(--gold); box-shadow: inset -3px -3px 0 #a87a00; animation: twinkle 1.2s steps(2) infinite; }
.queue i:nth-child(2) { animation-delay: .3s; }
.mslots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 30px; align-content: center; }
.mslots span { aspect-ratio: 1; background: #8b8b8b; box-shadow: inset 3px 3px 0 #373737, inset -3px -3px 0 #fff; }
.mslots span.scan { background: #a6d47a; animation: twinkle 1.8s steps(2) infinite; }
.empty-art { position: absolute; right: 4%; bottom: 0; width: 48%; max-width: 440px; pointer-events: none; filter: drop-shadow(0 20px 0 rgba(0,0,0,.35)); }
@media (max-width: 860px) { .empty { grid-template-columns: 1fr; } .mslots { display: none; } .empty-art { position: relative; right: auto; width: 72%; margin: 0 auto; } .empty-copy { padding: 30px 22px 0; } }

/* ============ HOW (pinned) ============ */
.how { position: relative; margin-top: 130px; }
.how-pin { position: relative; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.how-head { padding-top: 90px; }
.how-progress { margin-top: 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; max-width: 360px; height: 14px; background: #2a2a2a; border: 2px solid #000; padding: 1px; }
.how-progress i { display: block; height: 100%; background: var(--xp); transform-origin: left; transform: scaleX(0); }
.how-track { display: flex; gap: 28px; padding: 34px 28px 40px max(28px, calc((100vw - 1280px) / 2 + 28px)); width: max-content; will-change: transform; }
.step { position: relative; width: min(78vw, 860px); height: min(58vh, 520px); flex: none; overflow: hidden; display: grid; grid-template-columns: 1fr 1.1fr; }
.step-copy { padding: 36px; display: flex; flex-direction: column; justify-content: space-between; z-index: 1; }
.step-slot { width: 72px; height: 72px; display: grid; place-items: center; font-size: 34px; }
.step-slot i { color: #fff; filter: drop-shadow(2px 2px 0 #000); }
.step:nth-child(1) .step-slot i { color: #ffff55; } .step:nth-child(2) .step-slot i { color: var(--emerald); } .step:nth-child(3) .step-slot i { color: #ff8a3d; } .step:nth-child(4) .step-slot i { color: var(--diamond); }
.step-verb { font-family: var(--display); font-size: clamp(30px, 3.4vw, 50px); line-height: .95; text-shadow: 3px 3px 0 #000; }
.step-copy p { margin-top: 14px; color: var(--muted); font-size: 19px; max-width: 32ch; }
.step-art { position: relative; overflow: hidden; border-left: 3px solid #000; background: linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.35)), var(--tex-stone); background-size: auto, 64px 64px; }
.step:nth-child(2) .step-art { background: linear-gradient(rgba(0,0,0,.4), rgba(0,0,0,.4)), var(--tex-planks); background-size: auto, 64px 64px; }
.step:nth-child(3) .step-art { background: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.45)), var(--tex-cobble); background-size: auto, 64px 64px; }
.chat { position: absolute; left: 24px; right: 24px; bottom: 28px; font-family: var(--mono); font-size: 24px; line-height: 1.15; }
.chat div { padding: 3px 8px; background: rgba(0,0,0,.55); color: #fff; text-shadow: 2px 2px 0 #3f3f3f; }
.chat .n { color: #ffff55; } .chat .s { color: #55ff55; } .chat .g { color: #aaa; }
.chat .input { margin-top: 6px; background: rgba(0,0,0,.7); }
.caret { display: inline-block; width: 12px; height: 4px; background: #fff; margin-left: 2px; vertical-align: 0; animation: twinkle 1s steps(2) infinite; }
.coin-stage { position: absolute; inset: 0; display: grid; place-items: center; perspective: 800px; }
.coin { position: relative; width: 200px; height: 200px; transform-style: preserve-3d; animation: coinspin 3.6s steps(24) infinite; }
.coin-face { position: absolute; inset: 0; display: grid; place-items: center; backface-visibility: hidden;
  background: linear-gradient(135deg, #8dffb5 0 18%, #17dd62 18% 60%, #0a8a3a 60%); clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
  font-family: var(--pixel); font-size: 34px; color: #fff; text-shadow: 3px 3px 0 #064d20; }
.coin-face.back { transform: rotateY(180deg); }
.coin-face img { width: 74%; height: 74%; object-fit: contain; }
@keyframes coinspin { to { transform: rotateY(360deg); } }
.tank-stage { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; }
.tank-stage img { height: 92%; width: auto; object-fit: contain; filter: drop-shadow(0 14px 0 rgba(0,0,0,.4)); }
.drops { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.drops i { position: absolute; top: -20px; width: 14px; height: 14px; background: var(--emerald); clip-path: polygon(50% 0, 100% 35%, 80% 100%, 20% 100%, 0 35%); animation: drop 2.4s steps(20) infinite; }
@keyframes drop { to { transform: translateY(620px); } }
.step-art video, .step-art .vimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.step-art .rec { position: absolute; top: 14px; right: 14px; left: auto; z-index: 1; }
@media (max-width: 900px) {
  .how-pin { height: auto; }
  .how-track { flex-direction: column; width: auto; padding: 26px 16px 0; }
  .step { width: 100%; height: auto; grid-template-columns: 1fr; }
  .step-art { min-height: 300px; order: -1; border-left: 0; border-bottom: 3px solid #000; }
  .step-copy { padding: 24px; gap: 16px; }
}

/* ============ FEES (inventory) ============ */
.fees { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.invpanel { padding: 18px; }
.invpanel h4 { font-family: var(--pixel); font-weight: 400; font-size: 16px; color: #3f3f3f; margin: 2px 4px 12px; }
.invgrid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.invgrid span { aspect-ratio: 1; display: grid; place-items: center; background: #8b8b8b; box-shadow: inset 2px 2px 0 #373737, inset -2px -2px 0 #fff; }
.item { width: 62%; height: 62%; }
.item.e { background: var(--emerald); clip-path: polygon(50% 0, 100% 35%, 80% 100%, 20% 100%, 0 35%); box-shadow: inset -5px -5px 0 #0a8a3a, inset 4px 4px 0 #8dffb5; }
.item.g { background: var(--gold); clip-path: polygon(15% 30%, 85% 30%, 100% 75%, 0 75%); box-shadow: inset -5px -5px 0 #c08a00, inset 4px 4px 0 #fff59a; }
.item.d { background: var(--diamond); clip-path: polygon(50% 0, 100% 40%, 50% 100%, 0 40%); box-shadow: inset -5px -5px 0 #1f9e94, inset 4px 4px 0 #c8fff8; }
.legend { margin-top: 32px; display: grid; gap: 12px; }
.leg { display: grid; grid-template-columns: 56px 110px 1fr; gap: 16px; align-items: center; padding: 14px 16px; }
.leg .slotbox { width: 56px; height: 56px; display: grid; place-items: center; }
.leg b { font-family: var(--mono); font-size: 52px; font-weight: 400; line-height: 1; text-shadow: 3px 3px 0 #000; }
.leg:nth-child(1) b { color: var(--emerald); } .leg:nth-child(2) b { color: var(--gold); } .leg:nth-child(3) b { color: var(--diamond); }
.leg h4 { font-family: var(--pixel); font-weight: 400; font-size: 16px; }
.leg p { color: var(--muted); font-size: 16px; margin-top: 4px; }
@media (max-width: 960px) { .fees { grid-template-columns: 1fr; gap: 36px; } }
@media (max-width: 520px) { .leg { grid-template-columns: 48px 1fr; } .leg > div:last-child { grid-column: 1 / -1; } }

/* ============ DIG (milestones) ============ */
.dig { position: relative; margin-top: 50px; border: 3px solid #000; overflow: hidden; }
.layer { position: relative; height: 130px; display: grid; grid-template-columns: 1fr 160px 1fr; align-items: center; background-size: 64px 64px; border-bottom: 3px solid rgba(0,0,0,.4); }
.layer:nth-child(1) { background-image: var(--tex-grass-side), var(--tex-dirt); background-repeat: repeat-x, repeat; background-position: 0 0, 0 64px; }
.layer:nth-child(2) { background-image: var(--tex-stone); }
.layer:nth-child(3) { background-image: var(--tex-iron-ore); }
.layer:nth-child(4) { background-image: var(--tex-gold-ore); }
.layer:nth-child(5) { background-image: var(--tex-diamond-ore); }
.layer .info { align-self: stretch; display: flex; flex-direction: column; justify-content: center; padding: 0 26px; background: linear-gradient(90deg, rgba(0,0,0,.72), rgba(0,0,0,.25) 70%, rgba(0,0,0,0)); }
.layer .info.right { background: linear-gradient(270deg, rgba(0,0,0,.72), rgba(0,0,0,.25) 70%, rgba(0,0,0,0)); }
.layer .info b { display: block; font-family: var(--mono); font-weight: 400; font-size: 40px; line-height: 1; color: #fff; text-shadow: 3px 3px 0 #000; }
.layer .info span { display: block; font-family: var(--pixel); font-size: 15px; color: var(--yellow); text-shadow: 2px 2px 0 #000; margin-top: 4px; }
.layer .info small { display: block; font-size: 16px; color: #f0f0f0; text-shadow: 2px 2px 0 #000; margin-top: 2px; max-width: 34ch; }
.layer .info.right { text-align: right; align-items: flex-end; }
.layer.reached .info b { color: var(--xp); }
.shaft { position: absolute; left: 50%; top: 0; bottom: 0; width: 160px; transform: translateX(-50%); background: rgba(0,0,0,.25); box-shadow: inset 6px 0 0 rgba(0,0,0,.35), inset -6px 0 0 rgba(0,0,0,.35); }
.shaft i { position: absolute; left: 0; right: 0; top: 0; height: 0%; background: linear-gradient(rgba(10,10,14,.85), rgba(10,10,14,.92)); box-shadow: inset 6px 0 0 #000, inset -6px 0 0 #000; }
.digger { position: absolute; left: 50%; top: 0; width: 120px; height: 120px; transform: translateX(-50%); z-index: 2; pointer-events: none; filter: drop-shadow(4px 6px 0 rgba(0,0,0,.5)); }
.digger img { width: 100%; height: 100%; object-fit: contain; }
.bedrock-row { height: 40px; background: var(--tex-bedrock); background-size: 40px 40px; }
@media (max-width: 760px) {
  .layer { grid-template-columns: 1fr; height: auto; padding: 18px 0; }
  .layer .info.right { display: none; }
  .shaft, .digger { display: none; }
}

/* ============ FAQ ============ */
.faq { margin-top: 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.faq-item.open { outline: 3px solid var(--grass-hi); outline-offset: -3px; }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 22px; background: none; border: 0; cursor: pointer; text-align: left; font-family: var(--pixel); font-size: 16px; line-height: 1.3; text-shadow: 2px 2px 0 #000; }
.faq-q .pm { flex: none; width: 34px; height: 34px; display: grid; place-items: center; background: #6f6f6f; border: 2px solid #000; box-shadow: inset 2px 2px 0 rgba(255,255,255,.4), inset -2px -2px 0 rgba(0,0,0,.4); transition: transform .3s var(--spring); }
.faq-item.open .pm { transform: rotate(45deg); background: var(--grass); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }
.faq-a p { padding: 0 22px 20px; color: var(--muted); }
@media (max-width: 800px) { .faq { grid-template-columns: 1fr; } }

/* ============ FINAL ============ */
.final { position: relative; margin-top: 150px; overflow: hidden; min-height: 520px; display: grid; place-items: center; text-align: center; isolation: isolate; border: 3px solid #000; }
.final video, .final .final-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.final::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 80% at 50% 50%, rgba(8,8,12,.45), rgba(8,8,12,.88)); }
.final-in { position: relative; padding: 40px 20px; }
.final .splash { right: 5%; top: 70px; font-size: clamp(16px, 1.8vw, 24px); }
.final p { margin: 18px auto 0; color: #f0f0f0; font-size: 21px; max-width: 40ch; text-shadow: 2px 2px 0 #000; }

/* ============ FOOTER ============ */
.footer { position: relative; margin-top: 140px; background: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.55)), var(--tex-dirt); background-size: auto, 64px 64px; border-top: 3px solid #000; }
.grass-edge { height: 22px; background: var(--tex-grass-top); background-size: 64px 64px; border-bottom: 3px solid rgba(0,0,0,.35); }
.footer-top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding: 40px 0 46px; }
.footer-note { margin-top: 14px; color: #d8d0c8; font-size: 15px; max-width: 64ch; text-shadow: 2px 2px 0 #000; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; font-family: var(--pixel); font-size: 14px; }
.footer-links a { display: inline-flex; gap: 6px; align-items: center; text-shadow: 2px 2px 0 #000; }
.footer-links a:hover { color: var(--yellow); }
.bedrock { height: 48px; background: var(--tex-bedrock); background-size: 48px 48px; border-top: 3px solid #000; }

/* ============ SERVER PAGE ============ */
.page { padding-top: 110px; }
.back { display: inline-flex; align-items: center; gap: 8px; font-family: var(--pixel); font-size: 14px; color: var(--muted); margin-bottom: 16px; text-shadow: 2px 2px 0 #000; }
.back:hover { color: var(--yellow); }
.srv-hero { position: relative; overflow: hidden; aspect-ratio: 21 / 8; background: #000; border: 3px solid #000; }
.srv-hero .srv-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.srv-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,8,12,.92) 0%, rgba(8,8,12,.45) 50%, transparent 75%), linear-gradient(0deg, rgba(8,8,12,.7), transparent 40%); }
.srv-hero-copy { position: absolute; left: 36px; bottom: 32px; right: 40%; z-index: 1; }
.srv-hero-copy h1 { margin-top: 12px; font-family: var(--display); font-size: clamp(32px, 4.6vw, 66px); line-height: .95; text-shadow: 4px 4px 0 #000; }
.srv-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-family: var(--mono); font-size: 22px; color: #eee; }
.srv-agent { position: absolute; right: 2%; bottom: 0; z-index: 1; height: 88%; width: auto; filter: drop-shadow(6px 8px 0 rgba(0,0,0,.45)); }
.srv-actions { margin-top: 20px; display: flex; gap: 12px; flex-wrap: wrap; }
.pill-draft { display: inline-flex; padding: 4px 10px; font-family: var(--pixel); font-size: 12px; color: #ddd; background: rgba(0,0,0,.6); border: 2px solid #000; }
@media (max-width: 900px) {
  .srv-hero { aspect-ratio: auto; min-height: 540px; }
  .srv-hero::after { background: linear-gradient(0deg, rgba(8,8,12,.95) 35%, rgba(8,8,12,.2) 80%); }
  .srv-hero-copy { left: 18px; right: 18px; bottom: 20px; }
  .srv-agent { height: 44%; top: 4%; bottom: auto; right: 4%; }
}
.srv-grid { margin-top: 24px; display: grid; grid-template-columns: 1.55fr 1fr; gap: 22px; align-items: start; }
.srv-grid > * { min-width: 0; }
.panel { padding: 22px; }
.panel + .panel { margin-top: 22px; }
.panel h2 { font-family: var(--pixel); font-weight: 400; font-size: 18px; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; text-shadow: 2px 2px 0 #000; }
.panel h2 i { color: var(--grass-hi); font-size: 22px; }
.big-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.big-stats > div { padding: 10px 12px; }
.big-stats .val { font-size: 30px; }
.ca-box { margin-top: 14px; display: flex; align-items: center; gap: 10px; background: #000; border: 3px solid #a0a0a0; padding: 6px 6px 6px 12px; font-family: var(--mono); font-size: 21px; color: #ddd; }
.ca-box span { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; flex: none; color: #fff; background: #6f6f6f; border: 2px solid #000; box-shadow: inset 2px 2px 0 rgba(255,255,255,.4), inset -2px -2px 0 rgba(0,0,0,.4); }
.icon-btn:hover { background: var(--grass); }
.chart { margin-top: 14px; width: 100%; height: 400px; border: 3px solid #000; background: #000; }
.chart-empty { margin-top: 14px; height: 220px; display: grid; place-items: center; text-align: center; color: var(--muted); background: rgba(0,0,0,.5); border: 3px dashed #555; padding: 20px; }
.desc { color: #e6e6ea; font-size: 19px; }
.specs { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.spec { padding: 12px 14px; }
.spec b { display: block; font-family: var(--mono); font-weight: 400; font-size: 24px; color: #fff; text-shadow: 2px 2px 0 #3f3f3f; }
.prompt-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; color: var(--muted); font-size: 16px; }
.prompt-code { margin: 0; font-family: var(--mono); font-size: 21px; line-height: 1.25; background: rgba(0,0,0,.7); border: 3px solid #000; padding: 18px; white-space: pre-wrap; color: #e8e8e8; max-height: 500px; overflow: auto; }
.prompt-code .k { color: var(--yellow); }
.console { font-family: var(--mono); font-size: 20px; line-height: 1.15; background: rgba(0,0,0,.7); border: 3px solid #000; padding: 12px; height: 330px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; }
.console div { color: #ddd; animation: lineIn .3s steps(3) both; }
.console .t { color: #888; margin-right: 8px; }
.console .ok { color: #55ff55; } .console .wait { color: #ffff55; }
@keyframes lineIn { from { opacity: 0; transform: translateY(8px); } }
.ms-list { display: grid; gap: 6px; }
.ms-li { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; background: rgba(0,0,0,.4); border: 2px solid #000; }
.ms-li i { font-size: 20px; color: #777; }
.ms-li.done i { color: #55ff55; }
.ms-li small { font-family: var(--mono); font-size: 20px; color: var(--muted); }
@media (max-width: 960px) { .srv-grid { grid-template-columns: 1fr; } .big-stats { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .chart { height: 320px; } .specs { grid-template-columns: 1fr; } }

/* ============ FORMS ============ */
.page-head { padding: 18px 0 32px; }
.page-head h1 { font-family: var(--display); font-size: clamp(42px, 6vw, 84px); line-height: .95; text-shadow: 4px 4px 0 #000; }
.page-head p { margin-top: 16px; color: var(--muted); font-size: 20px; max-width: 54ch; }
.form-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; align-items: start; }
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field > label, .field > .flabel { font-family: var(--pixel); font-size: 14px; color: #e0e0e0; text-shadow: 2px 2px 0 #000; }
.help { color: var(--dim); font-size: 15px; }
.input, .textarea { width: 100%; background: #000; color: #fff; font: 23px var(--mono); border: 3px solid #a0a0a0; padding: 8px 12px; outline: 0; }
.input::placeholder, .textarea::placeholder { color: #6a6a6a; }
.input:focus, .textarea:focus { border-color: #fff; }
.textarea { min-height: 230px; resize: vertical; line-height: 1.2; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.genres { display: flex; flex-wrap: wrap; gap: 8px; }
.genre { font-family: var(--pixel); font-size: 13px; padding: 9px 14px; cursor: pointer; color: #ddd; background: #3a3a3a; border: 3px solid #000; box-shadow: inset 2px 2px 0 rgba(255,255,255,.25), inset -2px -3px 0 rgba(0,0,0,.4); text-shadow: 2px 2px 0 #000; }
.genre.active { background: var(--grass); color: #fff; }
.upload { display: grid; place-items: center; gap: 6px; height: 140px; cursor: pointer; text-align: center; color: #3f3f3f; font-family: var(--pixel); font-size: 13px; padding: 10px; }
.upload i { font-size: 30px; }
.upload:hover { filter: brightness(1.08); }
.counter { text-align: right; color: var(--dim); font-family: var(--mono); font-size: 18px; }
.summary-list { display: grid; gap: 10px; margin-bottom: 16px; font-family: var(--mono); font-size: 22px; }
.summary-list div { display: flex; justify-content: space-between; color: var(--muted); }
.summary-list b { color: #fff; font-weight: 400; }
@media (max-width: 900px) { .form-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }

.admin-gate { max-width: 460px; margin: 0 auto; }
.admin-row { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 18px; }
.admin-row + .admin-row { margin-top: 16px; }
.admin-row img { width: 110px; height: 110px; object-fit: cover; border: 3px solid #000; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-top h3 { font-family: var(--pixel); font-size: 20px; text-shadow: 2px 2px 0 #000; }
.admin-ca { margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.admin-ca .input { flex: 1; min-width: 220px; font-size: 20px; }
.admin-note { margin-top: 10px; color: var(--dim); font-size: 15px; }
.admin-note code { font-family: var(--mono); font-size: 18px; color: var(--muted); }
@media (max-width: 560px) { .admin-row { grid-template-columns: 1fr; } }

/* toast (advancement style) */
.toast { position: fixed; right: 20px; top: 92px; z-index: 95; transform: translateX(120%); pointer-events: none; display: flex; gap: 12px; align-items: center; padding: 12px 16px; max-width: calc(100% - 40px);
  background: #212121; border: 3px solid #000; box-shadow: inset 2px 2px 0 #555, inset -2px -2px 0 #111; transition: transform .45s var(--spring), visibility 0s .45s; visibility: hidden; }
.toast.show { transform: none; visibility: visible; transition: transform .45s var(--spring); }
.toast i { font-size: 26px; color: var(--yellow); }
.toast b { display: block; font-family: var(--pixel); font-weight: 400; font-size: 13px; color: var(--yellow); }
.toast span { font-family: var(--mono); font-size: 21px; color: #fff; }

.rv { opacity: 0; transform: translateY(40px); }
.no-motion .rv, .no-gsap .rv { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; }
}
