/* ==========================================================================
   FriendsSMP — styles
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #070912;
  --bg-2: #0b0f1d;
  --panel: rgba(14, 19, 36, 0.72);
  --panel-solid: #10162a;
  --panel-hi: rgba(28, 36, 64, 0.78);
  --line: rgba(255, 255, 255, 0.09);
  --line-hi: rgba(255, 255, 255, 0.18);
  --text: #eef2ff;
  --muted: #a2acd0;
  --dim: #6c7598;
  --green: #3ee07a;
  --green-d: #1f9e4f;
  --grass: #5fa83b;
  --gold: #ffcc33;
  --silver: #d8dee9;
  --bronze: #e08a4a;
  --diamond: #5fe3dd;
  --purple: #a77bff;
  --red: #ff5e7a;
  --discord: #5865f2;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7), 0 2px 0 rgba(255, 255, 255, 0.04) inset;
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --pixel: 'Press Start 2P', ui-monospace, monospace;
  --mc: 'Pixelify Sans', 'Press Start 2P', ui-monospace, monospace;
  --hud-h: 92px;
  --nav-h: 68px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: var(--hud-h);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input { font: inherit; color: inherit; }
code { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; }
.pixel { font-family: var(--pixel); letter-spacing: 0.04em; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }

::selection { background: var(--green); color: #04130a; }

/* ---------- 3D world background ---------- */

#world {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -3;
  display: block;
}
#world-fallback {
  position: fixed;
  inset: 0;
  z-index: -4;
  background: linear-gradient(180deg, #3f86e6, #bfe3ff 60%, #8fb8e6);
}
#world-fallback.show { background: url('../assets/gallery/spawn-overview.jpg') center/cover no-repeat, #3f86e6; z-index: -3; }
.world-vignette {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, transparent 40%, rgba(4, 6, 14, 0.55) 100%);
}

/* ---------- Loader ---------- */

#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 26px;
  background: radial-gradient(circle at 50% 45%, #14203d, #05060c 70%);
  transition: opacity 0.7s ease, visibility 0.7s;
}
#loader.done { opacity: 0; visibility: hidden; }
#loader p { margin: 0; font-size: 12px; color: var(--muted); }
#loader .dots::after { content: ''; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.loader-bar { width: 220px; height: 10px; border: 2px solid #000; background: #3a3a3a; box-shadow: 0 0 0 2px #7d7d7d; }
.loader-bar span { display: block; height: 100%; width: 0; background: linear-gradient(#7cdc57, #3f9d2a); animation: load 1.6s ease-in-out infinite; }
@keyframes load { 0% { width: 0; } 70% { width: 100%; } 100% { width: 100%; } }

/* ---------- CSS 3D cube ---------- */

.cube {
  --s: 64px;
  position: relative;
  display: inline-block;
  width: var(--s);
  height: var(--s);
  transform-style: preserve-3d;
  transform: rotateX(-24deg) rotateY(45deg);
  flex: none;
}
.cube.spin { animation: cube-spin 9s linear infinite; }
.cube .f {
  position: absolute;
  inset: 0;
  background-size: 100% 100%;
  image-rendering: pixelated;
  backface-visibility: hidden;
}
.cube .f.top { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.cube .f.bottom { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); filter: brightness(0.45); }
.cube .f.front { transform: translateZ(calc(var(--s) / 2)); filter: brightness(0.82); }
.cube .f.back { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); filter: brightness(0.7); }
.cube .f.left { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); filter: brightness(0.62); }
.cube .f.right { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); filter: brightness(0.92); }
@keyframes cube-spin {
  from { transform: rotateX(-24deg) rotateY(0deg); }
  to { transform: rotateX(-24deg) rotateY(360deg); }
}
.cube-stage { perspective: 600px; display: grid; place-items: center; }
.loader-cube { animation: cube-spin 2.4s linear infinite, bob 1.2s ease-in-out infinite alternate; }
@keyframes bob { to { translate: 0 -8px; } }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 12px;
  left: 50%;
  translate: -50% 0;
  width: min(1200px, 100% - 24px);
  height: var(--nav-h);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 14px 0 18px;
  border-radius: 18px;
  background: rgba(10, 14, 28, 0.55);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  transition: background 0.3s, box-shadow 0.3s;
}
.nav.scrolled { background: rgba(8, 11, 22, 0.85); box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.6); }
.brand { display: flex; align-items: center; gap: 14px; font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }
.nav-actions { display: flex; gap: 8px; align-items: center; }
.cart-btn { position: relative; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); transition: background 0.2s; }
.cart-btn:hover { background: rgba(255, 255, 255, 0.12); }
.cart-count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--green); color: #04130a; font-size: 12px; font-weight: 800; display: grid; place-items: center; transform: scale(0); transition: transform 0.25s cubic-bezier(.34, 1.56, .64, 1); }
.cart-count.has { transform: scale(1); }
.cart-btn.bump { animation: bump 0.4s ease; }
@keyframes bump { 40% { transform: scale(1.18) rotate(-6deg); } }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 26px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, filter 0.2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(2px); }
.btn-primary { background: var(--green); color: #04130a; box-shadow: 0 6px 0 var(--green-d), 0 12px 30px -8px rgba(62, 224, 122, 0.6); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { box-shadow: 0 2px 0 var(--green-d); }
/* Minecraft-style stone button */
.btn-mc {
  font-family: var(--pixel);
  font-size: 13px;
  border-radius: 4px;
  color: #fff;
  text-shadow: 2px 2px 0 #3a3a3a;
  background: linear-gradient(#8f8f8f, #6d6d6d);
  border: 2px solid #1a1a1a;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.35), inset -2px -4px 0 rgba(0, 0, 0, 0.35), 0 10px 26px -10px rgba(0, 0, 0, 0.8);
}
.btn-mc:hover { background: linear-gradient(#7d9f6f, #5d8a4e); color: #ffffa0; }
.btn-discord { background: var(--discord); color: #fff; box-shadow: 0 6px 0 #3c45b0, 0 12px 30px -8px rgba(88, 101, 242, 0.6); }
.btn-discord:hover { filter: brightness(1.1); }
.btn-ghost { background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line-hi); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.15); }
.btn-block { width: 100%; }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; border-radius: 11px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); font-size: 16px; transition: background 0.2s; }
.icon-btn:hover { background: rgba(255, 255, 255, 0.14); }

/* ---------- Hero ---------- */

.hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  position: relative;
  padding: calc(var(--nav-h) + 40px) 16px 90px;
  text-align: center;
}
.hero-inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 22px; max-width: 900px; }
.hero-inner::before { content: ''; position: absolute; inset: -12% -18%; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(4, 8, 20, 0.42), transparent); }
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 99px;
  background: rgba(6, 10, 22, 0.55);
  border: 1px solid var(--line-hi);
  backdrop-filter: blur(10px);
  font-weight: 600;
  font-size: 14px;
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dim); box-shadow: 0 0 0 0 currentColor; }
.online .dot { background: var(--green); color: rgba(62, 224, 122, 0.6); animation: pulse 1.8s infinite; }
.offline .dot { background: var(--red); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* Server logo, floating gently in 3D */
.hero-logo { margin: 0; line-height: 0; perspective: 900px; }
.hero-logo img {
  width: clamp(250px, 36vw, 480px);
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.35)) drop-shadow(0 22px 26px rgba(0, 0, 0, 0.55));
  animation: logo-float 6s ease-in-out infinite;
  user-select: none;
  -webkit-user-drag: none;
}
@keyframes logo-float {
  0%, 100% { transform: rotateX(10deg) rotateY(-5deg) translateY(0); }
  50% { transform: rotateX(6deg) rotateY(5deg) translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) { .hero-logo img { animation: none; } }
.tagline { margin: 6px 0 0; font-size: clamp(17px, 2.4vw, 22px); color: #f2f5ff; font-weight: 600; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7), 0 2px 18px rgba(0, 0, 0, 0.7); }

.ip-box {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 10px 10px 22px;
  border-radius: 20px;
  background: rgba(6, 10, 22, 0.62);
  border: 1px solid var(--line-hi);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}
.ip-main { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.ip-label { font-size: 9px; color: var(--green); }
.ip-value { font-size: clamp(17px, 2.6vw, 24px); font-weight: 800; letter-spacing: 0.01em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.hero-mini { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.hero-mini div { min-width: 120px; padding: 10px 18px; border-radius: 14px; background: rgba(6, 10, 22, 0.5); border: 1px solid var(--line); backdrop-filter: blur(10px); display: flex; flex-direction: column; }
.hero-mini b { font-size: 20px; font-weight: 800; }
.hero-mini span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.scroll-hint { position: absolute; bottom: 26px; left: 50%; translate: -50% 0; width: 28px; height: 44px; border: 2px solid rgba(255, 255, 255, 0.6); border-radius: 16px; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: wheel 1.6s infinite; }
@keyframes wheel { to { transform: translateY(14px); opacity: 0; } }

/* ---------- Sections ---------- */

.section {
  position: relative;
  padding: 110px 0;
  background: linear-gradient(180deg, rgba(7, 9, 18, 0.32), rgba(7, 9, 18, 0.6) 22%, rgba(7, 9, 18, 0.6) 78%, rgba(7, 9, 18, 0.32));
}
.section:nth-of-type(odd) { background: linear-gradient(180deg, rgba(7, 9, 18, 0.36), rgba(10, 13, 26, 0.68) 22%, rgba(10, 13, 26, 0.68) 78%, rgba(7, 9, 18, 0.36)); }
.sec-head h2, .sec-head p { text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6), 0 4px 30px rgba(0, 0, 0, 0.5); }
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 54px; }
.eyebrow { display: inline-block; font-size: 10px; color: var(--green); padding: 8px 12px; border-radius: 8px; background: rgba(62, 224, 122, 0.1); border: 1px solid rgba(62, 224, 122, 0.25); }
.sec-head h2 { margin: 18px 0 10px; font-size: clamp(32px, 5vw, 54px); line-height: 1.05; letter-spacing: -0.02em; font-weight: 900; text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5); }
.sec-head p { margin: 0; color: var(--muted); font-size: 18px; }
.sub-head { margin: 80px 0 26px; font-size: 28px; font-weight: 800; text-align: center; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
}

/* Tilt cards */
[data-tilt] {
  transform-style: preserve-3d;
  transition: transform 0.35s cubic-bezier(.2, .8, .2, 1), box-shadow 0.35s;
  will-change: transform;
  position: relative;
}
[data-tilt].tilting { transition: transform 0.08s linear, box-shadow 0.35s; }
[data-tilt]::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(500px circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.12), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s;
}
[data-tilt].tilting::after { opacity: 1; }

/* Reveal */
.reveal { transition: opacity 0.8s ease, transform 0.8s cubic-bezier(.2, .8, .2, 1); }
.js-reveal .reveal:not(.in) { opacity: 0; transform: translateY(34px) scale(0.98); }
@media (prefers-reduced-motion: reduce) { .js-reveal .reveal:not(.in) { opacity: 1; transform: none; } }

/* ---------- Stats ---------- */

.stats-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; }
.stat-hero { padding: 26px; display: flex; flex-direction: column; gap: 22px; }
.server-card { display: flex; gap: 18px; align-items: center; }
.server-icon { width: 64px; height: 64px; border-radius: 12px; image-rendering: pixelated; background: #000; border: 2px solid var(--line-hi); }
.server-name { font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.badge { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); text-transform: uppercase; letter-spacing: 0.06em; }
.badge.on { background: rgba(62, 224, 122, 0.16); color: var(--green); }
.badge.off { background: rgba(255, 94, 122, 0.16); color: var(--red); }
.motd { color: var(--muted); font-size: 15px; white-space: pre-line; margin-top: 2px; }
.server-ip-small code { font-size: 13px; color: var(--dim); }
.meter-top { display: flex; justify-content: space-between; color: var(--muted); font-size: 15px; margin-bottom: 10px; }
.meter-top b { color: var(--text); font-size: 18px; }
.meter { height: 14px; border-radius: 8px; background: rgba(255, 255, 255, 0.06); overflow: hidden; border: 1px solid var(--line); }
.meter span { display: block; height: 100%; width: 0; border-radius: 8px; background: linear-gradient(90deg, #2bbf62, #7cf29f); box-shadow: 0 0 18px rgba(62, 224, 122, 0.6); transition: width 1s cubic-bezier(.2, .8, .2, 1); }
#player-graph { width: 100%; height: 110px; display: block; }
.graph-caption { display: flex; justify-content: space-between; font-size: 13px; color: var(--dim); margin-top: -12px; }

.stat-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tile { padding: 20px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-height: 112px; }
.tile-k { font-size: 13px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); }
.tile-v { font-size: 24px; font-weight: 800; line-height: 1.15; word-break: break-word; }
.tile-v.good { color: var(--green); }
.tile-v.bad { color: var(--red); }

.players-panel { margin-top: 20px; padding: 24px; }
.players-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.players-head h3 { margin: 0; font-size: 22px; display: flex; align-items: center; gap: 10px; }
.count-pill { font-size: 14px; padding: 2px 10px; border-radius: 99px; background: rgba(62, 224, 122, 0.15); color: var(--green); }
input[type='search'], .field input, .field textarea {
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-hi);
  background: rgba(0, 0, 0, 0.3);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-width: 0;
}
input[type='search']:focus, .field input:focus, .field textarea:focus, .co-send textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(62, 224, 122, 0.2); }
.players-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.player {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  transition: transform 0.2s, background 0.2s;
  animation: pop 0.4s cubic-bezier(.34, 1.56, .64, 1) both;
}
.player:hover { transform: translateY(-3px); background: rgba(255, 255, 255, 0.08); }
.player { width: 100%; text-align: left; cursor: pointer; }
.player img { width: 38px; height: 38px; border-radius: 6px; image-rendering: pixelated; background: #222; flex: none; }
.player-text { display: grid; min-width: 0; gap: 2px; }
.player-name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.player-text small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes pop { from { opacity: 0; transform: scale(0.85); } }
.empty { color: var(--muted); text-align: center; padding: 24px 12px; grid-column: 1 / -1; }

/* ---------- Features ---------- */

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.feature .cube-stage { width: 70px; height: 70px; place-items: start; }
.feature:hover .cube { animation: cube-spin 2s linear infinite; }
.feature h3 { margin: 6px 0 0; font-size: 21px; }
.feature p { margin: 0; color: var(--muted); }

/* ---------- Gallery ---------- */

.gallery-filters, .store-tabs, .lb-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 30px; }
.chip {
  padding: 10px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-weight: 600;
  color: var(--muted);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.chip:hover { color: var(--text); background: rgba(255, 255, 255, 0.1); }
.chip[aria-selected='true'] { background: var(--green); color: #04130a; border-color: transparent; box-shadow: 0 8px 22px -8px rgba(62, 224, 122, 0.7); }
.chip svg { width: 16px; height: 16px; }


.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: rgba(3, 5, 10, 0.92);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: 14px; transform: scale(0.94) rotateX(8deg); transition: transform 0.4s cubic-bezier(.2, .8, .2, 1); }
.lightbox.open figure { transform: none; }
.lightbox img { max-height: 78vh; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7); }
.lightbox figcaption { font-weight: 700; font-size: 18px; }
.lb-close { position: absolute; top: 20px; right: 20px; }

/* ---------- Store ---------- */

.chip-n { margin-left: 8px; padding: 1px 7px; border-radius: 99px; font-size: 12px; font-weight: 800; background: rgba(255, 255, 255, 0.12); }
.chip[aria-selected='true'] .chip-n { background: rgba(4, 19, 10, 0.18); }

.store-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; perspective: 1200px; }
.item { --rc: #fff; padding: 12px 12px 16px; display: flex; flex-direction: column; gap: 10px; animation: pop 0.45s cubic-bezier(.34, 1.56, .64, 1) both; }
.item:hover { border-color: color-mix(in srgb, var(--rc) 40%, transparent); }
.item.rarity-legendary { box-shadow: 0 0 0 1px rgba(255, 170, 0, 0.35), var(--shadow); }
.item.rarity-epic { box-shadow: 0 0 0 1px rgba(255, 85, 255, 0.25), var(--shadow); }

/* Screenshot: shown whole, over a blurred copy of itself so every card lines up */
.item-shot {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 11 / 5;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  cursor: zoom-in;
  background: #0d0f1c;
  box-shadow: 0 16px 30px -16px rgba(0, 0, 0, 0.8);
  transform: translateZ(30px);
}
.item-shot::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 35%, transparent); pointer-events: none; }
.item-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: transform 0.5s cubic-bezier(.2, .8, .2, 1); }
.item-shot .shot-bg { object-fit: cover; filter: blur(14px) brightness(0.45) saturate(1.3); transform: scale(1.25); }
.item-shot:hover img:not(.shot-bg) { transform: scale(1.04); }
.item-shot .cube-stage { position: absolute; inset: 0; display: grid; place-items: center; }
.item-shot .zoom { position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 15px; opacity: 0; transition: opacity 0.2s; }
.item-shot:hover .zoom, .item-shot:focus-visible .zoom { opacity: 1; }
@media (hover: none) { .item-shot .zoom { opacity: 0.85; } }

.item-title { display: grid; gap: 2px; padding: 0 4px; transform: translateZ(20px); }
.item h3 { margin: 0; font-size: 21px; font-weight: 600; color: var(--rc); text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45), 0 0 18px color-mix(in srgb, var(--rc) 35%, transparent); }
.item .rarity { font-size: 13px; color: var(--muted); }
.item p { margin: 0; padding: 0 4px; color: var(--muted); font-size: 14px; }
.item-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding: 4px 4px 0; transform: translateZ(25px); }
.price { font-size: 24px; font-weight: 900; }
.price small { font-size: 13px; font-weight: 600; color: var(--muted); }
/* Quantity items: price + picker on one row, the add button below */
.qty-buy { flex-wrap: wrap; row-gap: 10px; }
.qty-buy .btn { flex: 1 0 100%; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: rgba(0, 0, 0, 0.25); }
.stepper button { width: 34px; height: 34px; border: 0; background: rgba(255, 255, 255, 0.06); color: var(--text); font-size: 18px; font-weight: 700; cursor: pointer; }
.stepper button:hover { background: rgba(255, 255, 255, 0.14); }
.stepper output { min-width: 36px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.price s { font-size: 15px; color: var(--dim); font-weight: 500; margin-right: 6px; }

/* Enchantments / kit contents, drawn like an in-game item tooltip */
.lore {
  padding: 8px 11px 9px;
  font-size: 15px;
  line-height: 1.35;
  color: #fff;
  text-shadow: 2px 2px 0 #3f3f3f;
  background: rgba(16, 0, 16, 0.88);
  border: 2px solid transparent;
  border-image: linear-gradient(#5000ff90, #28007f90) 1;
  box-shadow: 0 0 0 1px #100010;
  transform: translateZ(14px);
}
.lore-head { display: block; color: #aaa; }
.lore ul { list-style: none; margin: 0; padding: 0 0 0 10px; }
.lore.ench li { color: #ffaa00; }
.lore.plain ul { padding-left: 0; }
.lore-extra { display: block; margin-top: 3px; color: #55ff55; }

.tag { position: absolute; top: 20px; left: 20px; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 8px; background: var(--gold); color: #1a1200; text-transform: uppercase; letter-spacing: 0.06em; z-index: 2; transform: translateZ(40px); }
.tag.Sale { background: var(--red); color: #fff; }
.tag.New { background: var(--diamond); color: #031a19; }
.tag.Best-value { background: var(--green); color: #04130a; }

/* Item close-up (opens in the modal) */
.item-view { display: grid; gap: 20px; }
.item-view-shot { display: grid; place-items: center; min-height: 160px; padding: 10px; border-radius: 14px; background: #0d0f1c; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 35%, transparent), 0 20px 50px -20px rgba(0, 0, 0, 0.8); }
.item-view-shot img { display: block; max-width: 100%; height: auto; border-radius: 6px; }
.item-view-info { display: grid; grid-template-columns: 1fr minmax(0, 1fr); grid-template-areas: 'kind lore' 'name lore' 'desc lore' 'foot lore'; column-gap: 22px; row-gap: 6px; align-content: start; }
.item-view-info .rarity { grid-area: kind; color: var(--muted); font-size: 14px; }
.item-view-info h3 { grid-area: name; margin: 0; font-size: 28px; color: var(--rc); }
.item-view-info p { grid-area: desc; margin: 0; }
.item-view-info .lore { grid-area: lore; align-self: start; transform: none; }
.item-view-info .item-foot { grid-area: foot; margin-top: 10px; padding: 0; transform: none; justify-content: flex-start; gap: 18px; }

/* ---------- Custom orders (Discord tickets) ---------- */

.custom-order { margin-top: 28px; padding: 28px; display: grid; grid-template-columns: 1fr 1.25fr; gap: 32px; align-items: start; }
.custom-order [hidden] { display: none !important; }
.co-intro h3 { margin: 12px 0 8px; font-size: 26px; }
.co-intro > p { margin: 0; color: var(--muted); }
.co-steps { list-style: none; counter-reset: step; margin: 22px 0 0; padding: 0; display: grid; gap: 12px; }
.co-steps li { counter-increment: step; display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; color: var(--muted); font-size: 14px; }
.co-steps li::before { content: counter(step); grid-row: span 2; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(62, 224, 122, 0.14); color: var(--green); font-family: var(--pixel); font-size: 12px; }
.co-steps b { display: block; color: var(--text); }
.co-form { display: grid; gap: 14px; }
.field textarea { height: auto; min-height: 84px; padding: 11px 14px; resize: vertical; font: inherit; color: inherit; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.co-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(255, 85, 85, 0.12); border: 1px solid rgba(255, 85, 85, 0.35); color: #ffb8b8; font-size: 14px; }
.co-chat { display: grid; gap: 12px; }
.co-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.co-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.co-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.co-tabs .chip { padding: 6px 12px; font-size: 13px; }
.co-back { justify-self: start; padding: 0; border: 0; background: none; color: var(--green); font: inherit; font-weight: 700; cursor: pointer; }
.co-order .wide { grid-column: 1 / -1; }
.co-head b { margin-right: 10px; font-size: 19px; }
.co-status { padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); background: rgba(62, 224, 122, 0.14); border: 1px solid rgba(62, 224, 122, 0.35); }
.co-status.closed { color: var(--muted); background: rgba(255, 255, 255, 0.06); border-color: var(--line); }
.co-order { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.co-order div { min-width: 0; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.co-order span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.co-order b { display: block; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.co-pay { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 14px; border-radius: 14px; background: linear-gradient(135deg, rgba(62, 224, 122, 0.1), rgba(95, 227, 221, 0.06)); border: 1px solid rgba(62, 224, 122, 0.3); }
.co-qr { width: 128px; height: 128px; }
.co-qr.qr-img { padding: 10px; }
.co-pay-info { display: grid; gap: 8px; justify-items: start; min-width: 0; }
.co-pay-info b { font-size: 16px; }
.co-pay-info p { margin: 0; font-size: 13.5px; color: var(--muted); }
.co-pay-info .upi-id code { overflow-wrap: anywhere; }
.co-msgs { display: flex; flex-direction: column; gap: 10px; height: 300px; padding: 14px; overflow-y: auto; overscroll-behavior: contain; border-radius: 14px; background: rgba(0, 0, 0, 0.28); border: 1px solid var(--line); }
.co-note { margin: 0 0 4px; text-align: center; color: var(--dim); font-size: 13px; }
.co-msg { max-width: 82%; padding: 9px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.07); animation: pop 0.3s ease-out both; }
.co-msg.me { align-self: flex-end; background: rgba(62, 224, 122, 0.16); border-bottom-right-radius: 4px; }
.co-msg.them { align-self: flex-start; background: rgba(88, 101, 242, 0.2); border-bottom-left-radius: 4px; }
.co-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; font-size: 12px; color: var(--muted); }
.co-meta b { font-size: 13px; color: var(--text); }
.co-meta time { margin-left: auto; padding-left: 10px; }
.co-tag { padding: 1px 6px; border-radius: 6px; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; background: var(--discord); }
.co-msg p { margin: 0; font-size: 14.5px; overflow-wrap: anywhere; }
.co-msg a { color: var(--diamond); }
.co-send { display: flex; align-items: flex-end; gap: 8px; }
.co-send textarea { flex: 1; min-height: 44px; max-height: 120px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-hi); background: rgba(0, 0, 0, 0.3); color: inherit; font: inherit; resize: none; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.co-send .btn { height: 44px; }
.co-closed { margin: 0; text-align: center; color: var(--muted); font-size: 14px; }
.co-off { display: grid; justify-items: start; gap: 12px; color: var(--muted); }
.co-off p { margin: 0; }
/* Checkout: pay by UPI, then open a store-order ticket */
.pay { display: grid; gap: 14px; }
.pay .eyebrow { justify-self: start; }
.modal .pay h3 { margin: 2px 0 0; font-size: 30px; }
.pay > p { margin: 0; }
.pay-lines { display: grid; gap: 6px; max-height: 170px; margin: 0; padding: 10px 12px; overflow-y: auto; list-style: none; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); font-size: 14px; }
.pay-lines li { display: flex; justify-content: space-between; gap: 12px; }
.pay-lines b { font-variant-numeric: tabular-nums; }
.modal .pay .row { margin-top: 0; }
@media (max-width: 900px) { .custom-order { grid-template-columns: 1fr; gap: 22px; } }
@media (max-width: 640px) { .custom-order { padding: 18px; } .co-msgs { height: 260px; } .co-msg { max-width: 92%; } .co-pay { grid-template-columns: 1fr; justify-items: center; text-align: center; } .co-pay-info { justify-items: center; } }

/* ---------- Leaderboards ---------- */

.lb-body { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: end; }
.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: end; gap: 10px; perspective: 900px; min-height: 420px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 8px; animation: rise 0.7s cubic-bezier(.2, .8, .2, 1) both; }
.pod:nth-child(1) { animation-delay: 0.1s; }
.pod:nth-child(3) { animation-delay: 0.2s; }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } }
.pod img { height: 150px; width: auto; filter: drop-shadow(0 14px 12px rgba(0, 0, 0, 0.6)); transition: transform 0.3s; image-rendering: pixelated; }
.pod.first img { height: 190px; }
.pod:hover img { transform: translateY(-8px) rotate(-2deg); }
.pod-name { font-weight: 800; font-size: 16px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-val { font-size: 13px; color: var(--muted); }
.pod-block {
  --c: var(--silver);
  width: 100%;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(18deg);
  display: grid;
  place-items: center;
  font-family: var(--pixel);
  font-size: 22px;
  color: #1a1a1a;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 100%, white 10%), color-mix(in srgb, var(--c) 70%, black));
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.5), 0 24px 40px -14px rgba(0, 0, 0, 0.7);
}
.pod-block::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 22px;
  transform-origin: bottom;
  transform: rotateX(80deg);
  background: color-mix(in srgb, var(--c) 100%, white 25%);
  border-radius: 4px;
}
.pod.first .pod-block { --c: var(--gold); height: 150px; }
.pod.second .pod-block { --c: var(--silver); height: 110px; }
.pod.third .pod-block { --c: var(--bronze); height: 80px; }
.crown { width: 34px; height: 26px; margin-bottom: -6px; filter: drop-shadow(0 0 12px rgba(255, 204, 51, 0.8)); animation: bob 1.4s ease-in-out infinite alternate; }

.lb-list-wrap { padding: 10px; }
.lb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lb-row {
  display: grid;
  grid-template-columns: 38px 36px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  animation: slide 0.45s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes slide { from { opacity: 0; transform: translateX(24px); } }
.lb-row:hover { background: rgba(255, 255, 255, 0.05); }
.lb-row .bar { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(62, 224, 122, 0.14), rgba(62, 224, 122, 0.02)); z-index: -1; border-radius: 12px; transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.lb-row .pos { font-family: var(--pixel); font-size: 12px; color: var(--muted); text-align: center; }
.lb-row img { width: 36px; height: 36px; border-radius: 6px; image-rendering: pixelated; }
.lb-row .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 8px; min-width: 0; }
.lb-hit { position: absolute; inset: 0; z-index: 1; border-radius: 12px; cursor: pointer; }
.lb-hit:focus-visible { outline: 2px solid var(--green); }
.lb-row .face, .lb-row img { position: relative; }
.lb-row .vl { font-weight: 800; font-variant-numeric: tabular-nums; }
.lb-row.top1 .pos { color: var(--gold); }
.lb-row.top2 .pos { color: var(--silver); }
.lb-row.top3 .pos { color: var(--bronze); }
.lb-foot { font-size: 12px; color: var(--dim); padding: 10px 12px 4px; text-align: right; }

/* ---------- Donate ---------- */

.donate-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.donate-card, .donators-card { padding: 28px; }
.donate-form { display: grid; gap: 18px; }
.field-label { font-weight: 700; }
.amounts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.amount {
  height: 54px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-hi);
  font-weight: 800;
  font-size: 17px;
  transition: all 0.2s;
}
.amount:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.1); }
.amount.sel { background: rgba(62, 224, 122, 0.15); border-color: var(--green); color: var(--green); box-shadow: 0 0 0 3px rgba(62, 224, 122, 0.15); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 6px; }
.field span { font-size: 13px; color: var(--muted); font-weight: 600; }
.methods { display: flex; gap: 8px; flex-wrap: wrap; }
.methods[hidden] { display: none; }
.method-body { padding: 18px; border-radius: 14px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line); display: grid; gap: 14px; }
.upi { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.qr { width: 150px; height: 150px; padding: 8px; background: #fff; border-radius: 12px; display: grid; place-items: center; }
.qr svg, .qr img { display: block; width: 100%; height: 100%; }
.qr.qr-img { padding: 12px; }
.upi-info { display: grid; gap: 10px; }
.upi-id { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.upi-id code { padding: 6px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.07); }
.fine { font-size: 13px; color: var(--dim); margin: 0; }

.donators-card h3 { margin: 0 0 18px; font-size: 22px; }
.donor-podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; perspective: 800px; }
.donor-podium .pod img { height: 110px; }
.donor-podium .pod.first img { height: 140px; }
.donor-podium .pod.first .pod-block { height: 90px; }
.donor-podium .pod.second .pod-block { height: 64px; }
.donor-podium .pod.third .pod-block { height: 46px; }
.donor-podium .pod-block { font-size: 16px; }
.donor-empty { display: grid; justify-items: center; gap: 10px; padding: 48px 12px 36px; text-align: center; }
.donor-empty[hidden] { display: none; }
.donor-empty b { font-size: 19px; }
.donor-empty p { margin: 0; max-width: 300px; color: var(--muted); }
.donor-list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 6px; counter-reset: d 3; }
.donor-list li { counter-increment: d; display: grid; grid-template-columns: 30px 32px 1fr auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.03); }
.donor-list li::before { content: '#' counter(d); font-size: 13px; color: var(--dim); font-weight: 700; }
.donor-list img { width: 32px; height: 32px; border-radius: 6px; image-rendering: pixelated; }
.donor-list b { color: var(--gold); }

.ticker { margin-top: 20px; overflow: hidden; padding: 14px 0; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker-track { display: flex; gap: 40px; width: max-content; animation: marquee 40s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: flex; align-items: center; gap: 10px; white-space: nowrap; color: var(--muted); }
.ticker-item img { width: 24px; height: 24px; border-radius: 4px; image-rendering: pixelated; }
.ticker-item b { color: var(--text); }
.ticker-item em { color: var(--gold); font-style: normal; font-weight: 800; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Join ---------- */

.join-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; perspective: 1200px; }
.join-card { padding: 30px; display: flex; flex-direction: column; gap: 14px; }
.join-card .cube { transform: rotateX(-24deg) rotateY(45deg) translateZ(30px); margin: 8px 0 6px 10px; }
.join-card h3 { margin: 0; font-size: 22px; }
.join-card ol { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: 6px; flex: 1; }
.join-card ol b { color: var(--text); }
.join-card p { margin: 0; color: var(--muted); flex: 1; }
.ip-pill { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.35); border: 1px dashed var(--line-hi); transition: border-color 0.2s, background 0.2s; text-align: left; }
.ip-pill:hover { border-color: var(--green); background: rgba(62, 224, 122, 0.08); }
.ip-pill code { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.ip-pill span { font-size: 13px; font-weight: 700; color: var(--green); }
.vote-links { display: grid; gap: 8px; }
.vote-links a { display: flex; justify-content: space-between; padding: 10px 14px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); font-weight: 600; font-size: 14px; transition: all 0.2s; }
.vote-links a:hover { background: rgba(62, 224, 122, 0.1); border-color: rgba(62, 224, 122, 0.4); }

/* ---------- Community ---------- */

.socials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; perspective: 1200px; }
.social {
  --c: #fff;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  overflow: hidden;
}
.social::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 22%, transparent), transparent 60%); pointer-events: none; border-radius: inherit; }
.social .ico { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: var(--c); flex: none; transform: translateZ(40px); box-shadow: 0 14px 26px -10px var(--c); }
.social .ico svg { width: 30px; height: 30px; fill: #fff; }
.social.dark-ico .ico { background: #111; border: 1px solid var(--line-hi); box-shadow: 0 14px 26px -10px #000; }
.social div { transform: translateZ(24px); min-width: 0; }
.social b { display: block; font-size: 18px; }
.social span { color: var(--muted); font-size: 14px; }
.social .arrow { margin-left: auto; font-size: 22px; color: var(--muted); transition: transform 0.2s, color 0.2s; }
.social:hover .arrow { transform: translateX(4px); color: var(--text); }

.staff { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; perspective: 1000px; }
.staffer { flex: 0 1 200px; padding: 20px 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.staffer-skin { display: grid; place-items: center; height: 124px; transform: translateZ(40px); transition: transform 0.3s; }
.staffer:hover .staffer-skin { transform: translateZ(50px) translateY(-6px); }
.staffer-skin img { height: 120px; width: auto; filter: drop-shadow(0 12px 10px rgba(0, 0, 0, 0.6)); }

/* CSS 3D player (see figureHTML) */
.fig { --p: 3.7px; position: relative; display: block; width: calc(16 * var(--p)); height: calc(32 * var(--p)); transform-style: preserve-3d; filter: drop-shadow(0 12px 10px rgba(0, 0, 0, 0.55)); }
.fig-rot { position: absolute; left: 50%; top: calc(50% - 2 * var(--p)); transform-style: preserve-3d; transform: rotateX(-14deg) rotateY(-30deg); animation: fig-sway 6s ease-in-out infinite alternate; }
.fig-part { position: absolute; left: 0; top: 0; transform-style: preserve-3d; }
.fig-f { position: absolute; left: 0; top: 0; background-image: var(--skin); background-repeat: no-repeat; background-size: calc(64 * var(--p)) auto; image-rendering: pixelated; backface-visibility: hidden; }
@keyframes fig-sway { from { transform: rotateX(-14deg) rotateY(-38deg); } to { transform: rotateX(-14deg) rotateY(26deg); } }
@media (prefers-reduced-motion: reduce) { .fig-rot { animation: none; } }
.staffer b { font-size: 16px; transform: translateZ(20px); }
.role { font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 99px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }

.faq { display: grid; gap: 10px; max-width: 820px; margin: 0 auto; }
.faq details { padding: 0; overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 700; font-size: 17px; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 22px; color: var(--green); transition: transform 0.25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 22px 20px; color: var(--muted); }

/* ---------- Footer ---------- */

.footer { padding: 50px 0 36px; background: rgba(4, 5, 10, 0.92); border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 18px; }
.footer-logo { height: 60px; width: auto; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5)); }
.footer-brand p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.legal { width: 100%; margin: 6px 0 0; font-size: 12px; color: var(--dim); text-align: center; }

/* ---------- Drawer / modal / toast ---------- */

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  z-index: 80;
  background: var(--panel-solid);
  border-left: 1px solid var(--line-hi);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(.2, .8, .2, 1);
  box-shadow: -30px 0 60px rgba(0, 0, 0, 0.5);
}
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; font-size: 22px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 22px; display: grid; gap: 10px; align-content: start; }
.drawer-foot { padding: 18px 22px 22px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.cart-thumb { display: grid; place-items: center; width: 64px; height: 42px; border-radius: 8px; overflow: hidden; background: #0d0f1c; box-shadow: inset 0 0 0 1px var(--line); }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-thumb .cube-stage { width: 46px; height: 46px; }
.cart-item b { display: block; font-size: 15px; }
.cart-item small { color: var(--muted); }
.qty { display: flex; align-items: center; gap: 6px; }
.qty button { width: 28px; height: 28px; border-radius: 8px; background: rgba(255, 255, 255, 0.08); font-weight: 800; }
.qty button:hover { background: rgba(255, 255, 255, 0.16); }
.qty button:disabled { opacity: 0.35; cursor: not-allowed; }
.cart-total { display: flex; justify-content: space-between; font-size: 18px; }
.cart-total b { font-size: 24px; }
.scrim { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, 0.55); opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; }
.scrim.show { opacity: 1; visibility: visible; }

.modal { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px; background: rgba(3, 5, 10, 0.75); opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; }
.modal.open { opacity: 1; visibility: visible; }
.modal-card { position: relative; width: min(520px, 100%); padding: 30px; background: var(--panel-solid); transform: translateY(20px) scale(0.97); transition: transform 0.35s cubic-bezier(.2, .8, .2, 1); max-height: 90vh; overflow-y: auto; }
.modal-card.wide { width: min(760px, 100%); }
.modal.open .modal-card { transform: none; }
.modal-close { position: absolute; top: 16px; right: 16px; }
.modal h3 { margin: 0 0 10px; font-size: 24px; }
.modal p { color: var(--muted); }
.modal pre { white-space: pre-wrap; padding: 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); font-size: 14px; }
.modal .row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }



/* ==========================================================================
   Minecraft-native UI layer
   ========================================================================== */

.mc-text { font-family: var(--mc); letter-spacing: 0.01em; text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.45); }

/* ---------- Loading screen (dirt background, like the game) ---------- */

#loader { background: #1b120b; }
#loader::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--tex-dirt, #3b2a1d) 0 0 / 64px 64px;
  image-rendering: pixelated;
  filter: brightness(0.32);
}
.loader-inner { position: relative; display: grid; justify-items: center; gap: 22px; }
.loader-logo { width: 240px; height: auto; image-rendering: pixelated; filter: drop-shadow(0 16px 22px rgba(0, 0, 0, 0.6)); animation: bob 1.2s ease-in-out infinite alternate; }
.brand-logo { display: block; height: 46px; width: auto; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45)); transition: transform 0.25s cubic-bezier(.34, 1.56, .64, 1); }
.brand:hover .brand-logo { transform: scale(1.06) rotate(-2deg); }
.loader-title { margin: 0; font-size: 22px; color: #fff; }
.loader-tip { margin: 0; font-size: 15px; color: #a8a8a8; min-height: 1.2em; }
.loader-bar { width: 260px; height: 12px; border: 2px solid #000; background: #3a3a3a; box-shadow: 0 0 0 2px #8b8b8b; }

/* ---------- Top bar ---------- */

.nav { justify-content: space-between; }
.nav-ip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 7px 14px 7px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line-hi);
  color: var(--muted);
  transition: background 0.2s, border-color 0.2s, opacity 0.3s, transform 0.3s;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}
.nav.scrolled .nav-ip { opacity: 1; transform: none; pointer-events: auto; }
.nav-ip:hover { background: rgba(62, 224, 122, 0.1); border-color: rgba(62, 224, 122, 0.5); color: var(--text); }
.nav-ip-text { display: grid; text-align: left; line-height: 1.15; }
.nav-ip-text b { color: var(--text); font-size: 14px; }
.nav-ip-text small { font-size: 12px; }
.nav-ip.online .dot { background: var(--green); color: rgba(62, 224, 122, 0.6); animation: pulse 1.8s infinite; }
.nav-ip.offline .dot { background: var(--red); }

/* ---------- HUD: hotbar + XP bar ---------- */

.hud {
  position: fixed;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  translate: -50% 0;
  z-index: 45;
  display: grid;
  justify-items: center;
  gap: 4px;
  pointer-events: none;
  transition: opacity 0.6s 0.4s, transform 0.6s 0.4s cubic-bezier(.2, .8, .2, 1);
}
.js-reveal body:not(.ready) .hud { opacity: 0; transform: translateY(20px); }
.hud > * { pointer-events: auto; }
.hud-label {
  font-size: 17px;
  color: #fff;
  padding: 2px 8px;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  white-space: nowrap;
}
.hud-label.show { opacity: 1; }
.xp { position: relative; width: 100%; height: 14px; display: grid; align-items: end; }
.xp-bar { position: relative; height: 7px; background: #1d1d1d; border: 1px solid #000; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12); overflow: hidden; }
.xp-bar::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 18 - 1px), rgba(0, 0, 0, 0.6) calc(100% / 18 - 1px) calc(100% / 18)); }
.xp-bar span { display: block; height: 100%; width: 0; background: linear-gradient(#c8ff6a, #80ff20 40%, #4fb515); box-shadow: 0 0 10px rgba(128, 255, 32, 0.6); transition: width 0.25s linear; }
.xp-level {
  position: absolute;
  left: 50%;
  top: -14px;
  translate: -50% 0;
  font-size: 18px;
  font-weight: 700;
  color: #80ff20;
  text-shadow: 2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000;
}
.xp-level.up { animation: lvl 0.6s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes lvl { 40% { scale: 1.5; color: #fff; } }
.hotbar {
  display: flex;
  padding: 3px;
  gap: 0;
  background: rgba(30, 30, 30, 0.82);
  border: 2px solid #111;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12), 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
}
.slot {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.08);
  background: rgba(139, 139, 139, 0.18);
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.35);
  transition: background 0.15s;
}
.slot:hover { background: rgba(255, 255, 255, 0.18); }
.slot .cube { transform: rotateX(-30deg) rotateY(45deg); transition: transform 0.3s; }
.slot:hover .cube { transform: rotateX(-30deg) rotateY(135deg) translateY(-2px); }
.slot.sel { z-index: 1; outline: 3px solid #fff; outline-offset: -1px; box-shadow: 0 0 0 2px #000, 0 0 18px rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.1); }
.slot.sel .cube { animation: cube-spin 4s linear infinite; }
.slot-key { position: absolute; left: 3px; top: 1px; font-family: var(--mc); font-size: 11px; color: rgba(255, 255, 255, 0.55); text-shadow: 1px 1px 0 #000; }
.slot:focus-visible { outline: 3px solid var(--green); }

/* ---------- Hero additions ---------- */

.hero { cursor: grab; }
.hero.dragging { cursor: grabbing; }
.hero-inner { cursor: auto; }
.hero-inner > * { transition: opacity 0.9s cubic-bezier(.2, .8, .2, 1), transform 0.9s cubic-bezier(.2, .8, .2, 1); }
.js-reveal body:not(.ready) .hero-inner > * { opacity: 0; transform: translateY(18px); }
body.ready .hero-inner > *:nth-child(1) { transition-delay: 1.6s; }
body.ready .hero-inner > *:nth-child(2) { transition-delay: 1.9s; }
body.ready .hero-inner > *:nth-child(3) { transition-delay: 2.3s; }
body.ready .hero-inner > *:nth-child(4) { transition-delay: 2.5s; }
body.ready .hero-inner > *:nth-child(5) { transition-delay: 2.7s; }
body.ready .hero-inner > *:nth-child(6) { transition-delay: 2.9s; }
@media (prefers-reduced-motion: reduce) { .hero-inner > * { opacity: 1; transform: none; transition: none; } }
.logo-wrap { position: relative; }
.splash {
  --fs: 18px;
  position: absolute;
  right: -6%;
  bottom: 20%;
  z-index: 2;
  max-width: 240px;
  padding: 0;
  color: #ffff55;
  font-size: var(--fs);
  font-weight: 600;
  text-shadow: 2px 2px 0 #3f3f15;
  rotate: -20deg;
  transform-origin: center;
  animation: splash 0.55s ease-in-out infinite alternate;
  white-space: nowrap;
  cursor: pointer;
}
@keyframes splash { from { scale: 0.92; } to { scale: 1.06; } }
@media (prefers-reduced-motion: reduce) { .splash { animation: none; } }
.drag-hint {
  position: absolute;
  bottom: calc(var(--hud-h) - 40px);
  left: 50%;
  translate: -50% 0;
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  pointer-events: none;
  transition: opacity 1s 3.6s;
}
.js-reveal body:not(.ready) .drag-hint { opacity: 0; }
.scroll-hint { display: none; }

/* Real spawn loaded: the in-world sign is the logo, hero content sits below it */
.has-spawn .hero { align-items: end; padding-bottom: calc(var(--hud-h) + 34px); }
.has-spawn .hero-logo { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.has-spawn .hero-inner { gap: 18px; }
.has-spawn .hero-inner::before { inset: -10% -24% -6%; background: radial-gradient(closest-side, rgba(4, 8, 20, 0.5), transparent); }
.splash-3d .splash { position: fixed; left: -999px; top: 0; right: auto; bottom: auto; translate: -50% -50%; transition: opacity 0.4s; z-index: 1; }
.has-spawn .drag-hint { display: none; }

/* ---------- Server list entry (Multiplayer screen) ---------- */

.mp-title { margin: 0; text-align: center; font-size: 17px; color: #fff; }
.mp-entry {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid #8b8b8b;
  box-shadow: inset 0 0 0 1px #000;
}
.mp-entry .server-icon { width: 64px; height: 64px; border-radius: 0; border: 0; image-rendering: pixelated; }
.mp-main { min-width: 0; display: grid; align-content: start; gap: 2px; }
.mp-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mp-name { color: #fff; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-right { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.mp-count { color: #aaaaaa; font-size: 16px; }
.motd { font-size: 16px; line-height: 1.35; color: #aaaaaa; white-space: normal; margin: 0; overflow-wrap: anywhere; }
.signal { display: inline-flex; align-items: flex-end; gap: 1px; height: 16px; }
.signal i { width: 3px; background: #333; box-shadow: 1px 1px 0 #000; }
.signal i:nth-child(1) { height: 4px; }
.signal i:nth-child(2) { height: 6px; }
.signal i:nth-child(3) { height: 9px; }
.signal i:nth-child(4) { height: 12px; }
.signal i:nth-child(5) { height: 15px; }
.signal.on i { background: #3ee03e; }
.signal.off i { background: #5a1a1a; }
.signal.off i:nth-child(1) { background: #ff3b3b; }
.signal.wait i { animation: ping 1.2s infinite; }
.signal.wait i:nth-child(2) { animation-delay: 0.15s; }
.signal.wait i:nth-child(3) { animation-delay: 0.3s; }
.signal.wait i:nth-child(4) { animation-delay: 0.45s; }
.signal.wait i:nth-child(5) { animation-delay: 0.6s; }
@keyframes ping { 0%, 100% { background: #333; } 30% { background: #9a9a9a; } }
.tile-ip { font-size: 17px !important; font-family: ui-monospace, Menlo, monospace; font-weight: 600 !important; }

/* ---------- 3D ring gallery ---------- */

.ring-stage {
  --radius: 500px;
  position: relative;
  height: 440px;
  perspective: 1500px;
  perspective-origin: 50% 35%;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.ring-stage:active { cursor: grabbing; }
.ring { position: absolute; left: 50%; top: 30px; width: 0; height: 0; transform-style: preserve-3d; will-change: transform; }
.ring-card {
  --f: 1;
  position: absolute;
  left: -210px;
  top: 0;
  width: 420px;
  height: 260px;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.16);
  background: #0b0f1d;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
  backface-visibility: hidden;
  filter: brightness(calc(0.35 + 0.65 * max(var(--f), 0)));
  transition: border-color 0.3s, box-shadow 0.3s;
  -webkit-box-reflect: below 10px linear-gradient(transparent 60%, rgba(255, 255, 255, 0.16));
}
.ring-card.front { border-color: var(--green); box-shadow: 0 0 0 1px var(--green), 0 30px 70px -14px rgba(62, 224, 122, 0.45); }
.ring-card img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ring-info { position: absolute; inset: auto 0 0 0; display: grid; text-align: left; padding: 40px 16px 14px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.82)); }
.ring-info span { font-size: 11px; font-weight: 800; color: var(--green); text-transform: uppercase; letter-spacing: 0.12em; }
.ring-info b { font-size: 18px; }
.ring-controls { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 10px; }
.ring-controls span { min-width: 180px; text-align: center; font-size: 19px; color: #fff; }

/* ---------- Spinning blocks ---------- */

.cube-stage { position: relative; }
.item .cube-stage .cube { animation: cube-spin 9s linear infinite, float 3s ease-in-out infinite alternate; }
@keyframes float { from { translate: 0 2px; } to { translate: 0 -8px; } }

/* ---------- Advancement toasts ---------- */

.advancements { position: fixed; top: calc(var(--nav-h) + 24px); right: 16px; z-index: 120; display: grid; gap: 8px; pointer-events: none; }
.adv {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 10px;
  width: min(320px, calc(100vw - 32px));
  padding: 8px 14px 8px 10px;
  background: #212121;
  border: 2px solid #000;
  border-radius: 4px;
  box-shadow: inset 0 0 0 2px #555, inset 0 0 0 4px #212121, 0 12px 30px rgba(0, 0, 0, 0.5);
  transform: translateX(120%);
  transition: transform 0.45s cubic-bezier(.2, .8, .2, 1);
}
.adv.show { transform: none; }
.adv-icon { display: grid; place-items: center; perspective: 300px; }
.adv-icon .cube { animation: cube-spin 4s linear infinite; }
.adv-logo { width: 44px; height: auto; }
.adv-img { width: 40px; height: 28px; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 1px #000; }
.adv-text { display: grid; gap: 2px; min-width: 0; }
.adv-text b { color: #ffff55; font-size: 15px; font-weight: 600; }
.adv-goal .adv-text b { color: #55ff55; }
.adv-warn .adv-text b { color: #ff5555; }
.adv-msg .adv-text b { color: #55ffff; }
.adv-text span { color: #fff; font-size: 15px; line-height: 1.25; }

/* ---------- XP orbs ---------- */

.xp-orb {
  position: fixed;
  left: -6px;
  top: -6px;
  z-index: 140;
  width: 12px;
  height: 12px;
  pointer-events: none;
  background: radial-gradient(circle at 35% 35%, #fbff8a, #a6ff2e 45%, #3fa30d 75%);
  box-shadow: 0 0 12px 3px rgba(166, 255, 46, 0.7);
  image-rendering: pixelated;
  clip-path: polygon(25% 0, 75% 0, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0 75%, 0 25%);
}

/* ---------- 3D podiums ---------- */

.podium-wrap { position: relative; }
.podium-canvas { display: none; width: 100%; height: 400px; }
.pod-labels { display: none; }
.podium-wrap.is-3d .podium-canvas { display: block; }
.podium-wrap.is-3d .pod-labels { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: -8px; }
.podium-wrap.is-3d .podium, .podium-wrap.is-3d .donor-podium { display: none; }
.podium-wrap.small .podium-canvas { height: 300px; }
.pl { display: grid; justify-items: center; text-align: center; gap: 2px; min-width: 0; padding: 10px 6px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); cursor: pointer; transition: background 0.2s, transform 0.2s; }
.pl:hover { background: rgba(255, 255, 255, 0.09); transform: translateY(-2px); }
.pod[data-profile] { cursor: pointer; }
.pl b { font-size: 16px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl span:last-child { font-size: 13px; color: var(--muted); }
.pl-rank { font-size: 15px; }
.pl-1 { border-color: rgba(255, 204, 51, 0.5); background: rgba(255, 204, 51, 0.08); }
.pl-1 .pl-rank { color: var(--gold); }
.pl-2 .pl-rank { color: var(--silver); }
.pl-3 .pl-rank { color: var(--bronze); }

/* ---------- Footer grass edge ---------- */

.footer { position: relative; }
.grass-edge {
  position: absolute;
  left: 0;
  right: 0;
  top: -24px;
  height: 24px;
  background: var(--tex-grass-side, #5fa83b) 0 0 / 48px 48px repeat-x;
  image-rendering: pixelated;
  filter: brightness(0.85);
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .store-grid { grid-template-columns: repeat(3, 1fr); }
  .splash { right: -2%; }
}

@media (max-width: 920px) {
  .stats-grid, .lb-body, .donate-grid { grid-template-columns: 1fr; }
  .features, .join-grid, .socials { grid-template-columns: 1fr 1fr; }
  .podium { min-height: 360px; }
  .ring-stage { height: 360px; }
  .ring-card { width: 320px; height: 200px; left: -160px; }
  .nav-discord { display: none; }
}

@media (max-width: 640px) {
  :root { --nav-h: 60px; --hud-h: 78px; }
  .section { padding: 80px 0; }
  .sec-head { margin-bottom: 36px; }
  .store-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .features, .join-grid, .socials { grid-template-columns: 1fr; }
  .staffer { flex-basis: calc(50% - 8px); }
  .stat-tiles { gap: 12px; }
  .tile-v { font-size: 19px; }
  .ip-box { flex-direction: column; align-items: stretch; padding: 16px; width: 100%; }
  .ip-main { align-items: center; }
  .hero-cta { width: 100%; }
  .hero-cta .btn { flex: 1 1 100%; }
  .hero-mini { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .hero-mini div { min-width: 0; padding: 10px 6px; }
  .hero-mini b { font-size: 17px; }
  .hero-mini span { font-size: 10px; letter-spacing: 0.04em; }
  .splash { right: 0; bottom: -8%; max-width: 200px; }
  .drag-hint { display: none; }
  .amounts { grid-template-columns: repeat(3, 1fr); }
  .field-row { grid-template-columns: 1fr; }
  .upi { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .upi-id { justify-content: center; }
  .pod img { height: 110px; }
  .pod.first img { height: 140px; }
  .pod.first .pod-block { height: 110px; }
  .pod.second .pod-block { height: 80px; }
  .pod.third .pod-block { height: 60px; }
  .podium { min-height: 300px; }
  .lightbox { grid-template-columns: 1fr; padding: 60px 12px; }
  .lb-prev, .lb-next { display: none; }
  .item { padding: 10px 10px 14px; }
  .item h3 { font-size: 18px; }
  .lore { font-size: 14px; padding: 7px 9px; }
  .item .price { font-size: 20px; }
  .item-view-info { grid-template-columns: 1fr; grid-template-areas: 'kind' 'name' 'desc' 'lore' 'foot'; }
  .ring-stage { height: 280px; perspective: 1000px; }
  .ring-card { width: 240px; height: 150px; left: -120px; }
  .slot { width: 36px; height: 36px; }
  .slot .cube { --s: 17px !important; }
  .slot-key { display: none; }
  .hud-label { font-size: 15px; }
  .nav-ip { padding: 6px 10px; gap: 8px; }
  .nav-ip svg { display: none; }
  .nav-ip-text b { font-size: 12px; }
  .nav-ip-text small { font-size: 11px; }
  .brand-logo { height: 40px; }
  .nav { gap: 10px; }
  .podium-canvas { height: 320px; }
  .advancements { top: calc(var(--nav-h) + 20px); }
}

@media (max-width: 640px) {
  .has-spawn .hero { padding-bottom: calc(var(--hud-h) + 18px); }
  .has-spawn .hero-inner { gap: 12px; }
  .has-spawn .tagline { font-size: 15px; margin: 0; }
  .has-spawn .ip-box { flex-direction: row; align-items: center; padding: 8px 8px 8px 14px; }
  .has-spawn .ip-main { align-items: flex-start; min-width: 0; }
  .has-spawn .ip-value { font-size: 16px; }
  .has-spawn .copy-ip { height: 44px; padding: 0 14px; font-size: 14px; }
  .has-spawn .hero-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .has-spawn .hero-cta .btn { height: 46px; font-size: 14px; padding: 0 10px; }
  .has-spawn .hero-cta .btn-mc { font-size: 10px; }
  .has-spawn .hero-cta .btn-ghost { grid-column: 1 / -1; }
  .has-spawn .hero-mini div { padding: 8px 6px; }
}

@media (max-width: 400px) {
  .store-grid { grid-template-columns: 1fr; }
  .brand-logo { height: 36px; }
  .slot { width: 33px; height: 33px; }
}

/* ==========================================================================
   Live player stats
   ========================================================================== */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Face cropped from a skin texture: hat layer over the face (64×64 skin layout) */
.face {
  --fs: 36px;
  display: inline-block;
  flex: none;
  width: var(--fs);
  height: var(--fs);
  border-radius: 6px;
  background-color: #222;
  background-repeat: no-repeat;
  background-size: calc(var(--fs) * 8) auto, calc(var(--fs) * 8) auto, 100% 100%;
  background-position: calc(var(--fs) * -5) calc(var(--fs) * -1), calc(var(--fs) * -1) calc(var(--fs) * -1), 0 0;
  image-rendering: pixelated;
}

.rank-tag {
  --rc: #9aa4c7;
  display: inline-flex;
  align-items: center;
  flex: none;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rc);
  background: color-mix(in srgb, var(--rc) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--rc) 45%, transparent);
}
.team-tag { display: inline-flex; padding: 1px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; color: #cfe3ff; background: rgba(90, 140, 255, 0.14); border: 1px solid rgba(90, 140, 255, 0.35); }

.lookup { display: flex; gap: 10px; max-width: 520px; margin: -20px auto 24px; }
.lookup input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-hi); background: rgba(0, 0, 0, 0.3); outline: none; }
.lookup input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(62, 224, 122, 0.2); }
.lookup .btn { height: 44px; }

.lb-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); color: rgba(62, 224, 122, 0.6); animation: pulse 1.8s infinite; }

.teams-wrap .sub-head { margin-top: 64px; }
.teams { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.team-card { padding: 18px; display: grid; gap: 14px; }
.team-top { display: flex; align-items: baseline; gap: 10px; }
.team-top b { font-size: 19px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-pos { color: var(--gold); font-size: 16px; }
.team-count { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.team-faces { display: flex; gap: 6px; flex-wrap: wrap; }
.face-btn { padding: 0; border-radius: 7px; line-height: 0; transition: transform 0.2s; }
.face-btn:hover { transform: translateY(-3px) scale(1.08); }
.face-btn img { width: 30px; height: 30px; border-radius: 6px; image-rendering: pixelated; }
.team-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.team-stats div, .profile-stats div { padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); min-width: 0; }
.team-stats dt, .profile-stats dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.team-stats dd, .profile-stats dd { margin: 2px 0 0; font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }

/* Profile pop-up */
.profile { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: center; }
.profile-model { position: relative; height: 320px; border-radius: 16px; background: radial-gradient(circle at 50% 40%, rgba(90, 140, 255, 0.22), transparent 70%), rgba(0, 0, 0, 0.25); border: 1px solid var(--line); display: grid; place-items: center; }
.profile-model canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
.profile-model canvas:active { cursor: grabbing; }
.profile-model > span { position: absolute; bottom: 8px; left: 0; right: 0; text-align: center; font-size: 13px; color: var(--dim); pointer-events: none; }
.profile-body { max-height: 280px; width: auto; }
.profile-info { display: grid; gap: 14px; min-width: 0; }
.profile-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.profile-head h3 { margin: 0 0 4px; font-size: 26px; overflow-wrap: anywhere; }
.profile-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.status-on, .status-off { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.status-on { color: var(--green); }
.status-on i { width: 9px; height: 9px; border-radius: 50%; background: var(--green); color: rgba(62, 224, 122, 0.6); animation: pulse 1.8s infinite; }
.status-off { color: var(--muted); }
.profile-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0; }
.profile-stats .wide { grid-column: 1 / -1; }
.profile-empty { margin: 0; color: var(--muted); }

@media (max-width: 920px) {
  .teams { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .teams { grid-template-columns: 1fr; }
  .profile { grid-template-columns: 1fr; }
  .profile-model { height: 240px; }
  .lookup { margin-top: -8px; }
}
