/* IndoLinessa SMP — static site. Textures stay pixelated; type stays smooth. */

@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/outfit-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/outfit-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/outfit-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../assets/fonts/outfit-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Pixelify Sans";
  src: url("../assets/fonts/pixelify-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../assets/fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0d0e12;
  --ink: #f4f0e8;
  --muted: #c4bbad;
  --dim: #9a9184;
  --lime: #b6f27a;
  --xp: #80ff20;
  --gold: #ffd45c;
  --mc-yellow: #ffff55;
  --red: #ff6b6b;
  --warn: #ffb35c;
  --ok: #8fe05a;
  --display: "Pixelify Sans", "Outfit", system-ui, sans-serif;
  --font: "Outfit", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --wrap: 1180px;
  --topbar-h: 64px;
  --grass-h: clamp(40px, 4.5vw, 64px);
  --edge-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='32'%3E%3Cpath d='M0 32V20H16V12H32H48V24H64V16H80V4H96V12H112V20H128V28H144V16H160V8H176V20H192V4H208V12H224V24H240V16H256V32Z'/%3E%3C/svg%3E");

  /* Sky phase (day). Overridden by html[data-sky]. */
  --sky: linear-gradient(180deg, #3a74d6, #4b83dd 62%, #6596e2);
  --far: #7fa3d9;
  --far-cap: #93b3e2;
  --near: #3f7f2b;
  --near-cap: #5da83a;
  --trunk: #6a4b2a;
  --leaves: #2d6b1d;
  --leaves-hi: #3f8a28;
  --sun-y: 13%;
  --sun-core: #fff7cf;
  --sun-ring: rgba(255, 240, 180, 0.32);
  --sun-ring-2: rgba(255, 232, 150, 0.14);
  --sun-glow: rgba(255, 226, 140, 0.35);
  --sun-op: 1;
  --moon-op: 0;
  --stars-op: 0;
  --cloud-op: 0.92;
  --night: 1;
}

html[data-sky="dawn"] {
  --sky: linear-gradient(180deg, #333f7c, #4c5390 62%, #85698f);
  --far: #6f6c9c;
  --far-cap: #7f7bab;
  --near: #35612e;
  --near-cap: #4f8a3a;
  --trunk: #573d24;
  --leaves: #26541b;
  --leaves-hi: #336e25;
  --sun-y: 44%;
  --sun-core: #ffe2a8;
  --sun-ring: rgba(255, 196, 140, 0.32);
  --sun-ring-2: rgba(255, 170, 120, 0.14);
  --sun-glow: rgba(255, 160, 110, 0.4);
  --stars-op: 0.25;
  --cloud-op: 0.7;
  --night: 0.88;
}

html[data-sky="dusk"] {
  --sky: linear-gradient(180deg, #252a60, #3b3976 62%, #72527c);
  --far: #5f5585;
  --far-cap: #6d6295;
  --near: #2f582b;
  --near-cap: #477f37;
  --trunk: #4e3620;
  --leaves: #224d19;
  --leaves-hi: #2d6322;
  --sun-y: 48%;
  --sun-core: #ffcf8f;
  --sun-ring: rgba(255, 170, 110, 0.34);
  --sun-ring-2: rgba(255, 140, 90, 0.15);
  --sun-glow: rgba(255, 130, 80, 0.42);
  --stars-op: 0.35;
  --cloud-op: 0.6;
  --night: 0.82;
}

html[data-sky="night"] {
  --sky: linear-gradient(180deg, #060a19, #0a1230 65%, #101c3e);
  --far: #1a2846;
  --far-cap: #22335a;
  --near: #10261a;
  --near-cap: #173822;
  --trunk: #2a1d12;
  --leaves: #0e2a14;
  --leaves-hi: #143a1c;
  --sun-op: 0;
  --moon-op: 1;
  --stars-op: 1;
  --cloud-op: 0.2;
  --night: 0.6;
}

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

/* Author display rules would otherwise beat the hidden attribute. */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 1rem);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  image-rendering: pixelated;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
img.px { image-rendering: pixelated; image-rendering: crisp-edges; }
img.smooth { image-rendering: auto; }

button { font: inherit; color: inherit; }
a { color: inherit; }
p { overflow-wrap: break-word; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 5px;
}

::selection { background: #8fe05a; color: #142006; }

h1, h2, h3, h4 { text-wrap: balance; }

code {
  font-family: var(--mono);
  font-size: 0.92em;
  font-weight: 500;
  color: var(--lime);
}
.section code {
  padding: 0.05rem 0.35rem;
  background: rgba(0, 0, 0, 0.45);
  overflow-wrap: anywhere;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 90;
  padding: 0.7rem 1rem;
  background: #1a140f;
  color: var(--ink);
  border: 3px solid var(--gold);
}
.skip:focus { top: 0.75rem; }

.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;
}

.wrap {
  width: min(var(--wrap), calc(100% - 2rem));
  margin-inline: auto;
}

.no-js [data-js-only] { display: none !important; }

.ico { display: block; flex: 0 0 auto; }

/* ---------- Buttons (Minecraft GUI) ---------- */
.btn {
  --b: #6f6f6f;
  --b-hi: rgba(255, 255, 255, 0.3);
  --b-lo: rgba(0, 0, 0, 0.42);
  --edge: #000;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.7rem 1.2rem 0.8rem;
  border: 0;
  border-radius: 0;
  background: var(--b);
  color: #fff;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.42);
  cursor: pointer;
  box-shadow:
    inset 0 3px 0 var(--b-hi),
    inset 0 -4px 0 var(--b-lo),
    0 -3px 0 var(--edge), 0 3px 0 var(--edge), -3px 0 0 var(--edge), 3px 0 0 var(--edge);
  transition: filter 0.12s ease, transform 0.08s ease;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .btn:hover { --edge: #fff; filter: brightness(1.08); }
}
.btn:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 3px 0 var(--b-lo),
    0 -3px 0 var(--edge), 0 3px 0 var(--edge), -3px 0 0 var(--edge), 3px 0 0 var(--edge);
}
.btn:disabled { cursor: wait; opacity: 0.6; filter: none; --edge: #000; }
.btn img { width: 18px; height: 18px; flex: 0 0 auto; }
.btn img.px { width: 16px; height: 16px; }
.btn-sm { min-height: 44px; padding: 0.5rem 0.9rem 0.6rem; font-size: 0.98rem; }
.btn-lg { min-height: 56px; padding: 0.9rem 1.5rem 1rem; font-size: 1.15rem; }
.btn-block { width: 100%; }
.btn-stone { --b: #6f6f6f; }
.btn-green { --b: #3c8527; --b-hi: rgba(170, 255, 130, 0.35); --b-lo: rgba(0, 40, 0, 0.45); }
.btn-discord { --b: #5865f2; --b-hi: rgba(205, 210, 255, 0.38); --b-lo: rgba(10, 15, 80, 0.45); }
.btn.is-copied { --b: #2d6a1d; }

/* ---------- Inventory slot + enchant glint ---------- */
.slot {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  background: #8b8b8b;
  box-shadow: inset 3px 3px 0 #373737, inset -3px -3px 0 #fff;
}
.slot img { width: 32px; height: 32px; }
.slot-sm { width: 44px; height: 44px; }
.slot-sm img { width: 24px; height: 24px; }
.slot-lg { width: 76px; height: 76px; }
.slot-lg img { width: 46px; height: 46px; }

.glint { position: relative; display: inline-grid; place-items: center; }
.glint::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 32%, rgba(196, 120, 255, 0.95) 46%, rgba(255, 235, 255, 0.75) 50%, rgba(196, 120, 255, 0.95) 54%, transparent 68%) 150% 0 / 300% 100% no-repeat;
  -webkit-mask: var(--mask) center / 100% 100% no-repeat;
  mask: var(--mask) center / 100% 100% no-repeat;
  mix-blend-mode: screen;
  animation: glint 3.4s linear infinite;
  pointer-events: none;
}
.glint[data-glint="diamond"] { --mask: url("../assets/minecraft/diamond.png"); }
.glint[data-glint="sword"] { --mask: url("../assets/minecraft/diamond_sword.png"); }
.glint[data-glint="book"] { --mask: url("../assets/minecraft/book.png"); }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--topbar-h);
  padding: 0 max(1rem, env(safe-area-inset-right)) 0 max(1rem, env(safe-area-inset-left));
  background: rgba(12, 13, 17, 0.62);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  backdrop-filter: blur(12px) saturate(1.3);
  border-bottom: 3px solid rgba(0, 0, 0, 0.35);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
.topbar.is-scrolled {
  background: rgba(12, 13, 17, 0.94);
  border-bottom-color: #000;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.brand img { width: 32px; height: 32px; flex: 0 0 auto; }
/* Official logo (smooth art, not pixel texture): keep aspect, always centered. */
.brand img.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  object-position: center;
}
.brand-name { overflow: hidden; }
.brand-accent { color: #8fe05a; }

.topnav { display: none; }
.topnav ul {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.topnav a {
  position: relative;
  display: block;
  padding: 0.55rem 0.75rem;
  color: var(--muted);
  font-family: var(--display);
  font-size: 1.04rem;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.topnav a::after {
  content: "";
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.15rem;
  height: 3px;
  background: var(--xp);
  box-shadow: 0 0 10px rgba(128, 255, 32, 0.55);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}
.topnav a:hover,
.topnav a[aria-current] { color: #fff; }
.topnav a:hover::after,
.topnav a[aria-current]::after { transform: scaleX(1); }

.topbar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.8rem;
  margin-left: auto;
}
.topbar .btn { white-space: nowrap; }
.topbar-discord { width: 44px; padding: 0; }
.topbar-discord-label { display: none; }

/* ---------- Hero / overworld ---------- */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: min(100svh, 1000px);
  padding-top: calc(var(--topbar-h) + clamp(1.25rem, 5vh, 4rem));
  overflow: hidden;
  background: var(--sky);
}

.sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.stars {
  position: absolute;
  inset: 0 0 30%;
  opacity: var(--stars-op);
  background-image:
    conic-gradient(from 270deg at 2px 2px, #fff 25%, transparent 0),
    conic-gradient(from 270deg at 2px 2px, rgba(255, 255, 255, 0.7) 25%, transparent 0),
    conic-gradient(from 270deg at 3px 3px, rgba(210, 225, 255, 0.9) 25%, transparent 0);
  background-size: 113px 97px, 171px 139px, 263px 199px;
  background-position: 7px 11px, 61px 43px, 137px 89px;
  transition: opacity 1s ease;
}
.sun {
  position: absolute;
  top: var(--sun-y);
  right: clamp(1.25rem, 9vw, 9rem);
  width: clamp(48px, 6vw, 84px);
  aspect-ratio: 1;
  background: var(--sun-core);
  box-shadow:
    0 0 0 clamp(8px, 1vw, 12px) var(--sun-ring),
    0 0 0 clamp(16px, 2vw, 24px) var(--sun-ring-2),
    0 0 90px 30px var(--sun-glow);
  opacity: var(--sun-op);
  transition: opacity 1s ease;
}
.sun::after {
  content: "";
  position: absolute;
  inset: 20%;
  background: rgba(255, 255, 255, 0.55);
}
.moon {
  position: absolute;
  top: 12%;
  right: clamp(2rem, 14vw, 13rem);
  width: 1em;
  height: 1em;
  font-size: clamp(40px, 4.5vw, 64px);
  background: #e4eaf6;
  box-shadow: 0 0 0 0.16em rgba(200, 215, 255, 0.12), 0 0 1em 0.35em rgba(170, 190, 255, 0.22);
  opacity: var(--moon-op);
  transition: opacity 1s ease;
}
.moon::before {
  content: "";
  position: absolute;
  left: 0.2em;
  top: 0.22em;
  width: 0.2em;
  height: 0.2em;
  background: #bcc6db;
  box-shadow: 0.38em 0.18em 0 #c6cfe1, 0.12em 0.42em 0 #bcc6db, 0.44em 0.5em 0 #cdd5e5;
}
/* Rows 225–249 of vanilla clouds.png at 6x: a band with ~30% cover. */
.clouds {
  --cw: 1536px;
  position: absolute;
  left: 0;
  right: 0;
  top: 60%;
  height: calc(var(--cw) * 0.09375);
  overflow: hidden;
  opacity: var(--cloud-op);
}
.clouds::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: calc(100% + var(--cw));
  background: url("../assets/minecraft/clouds.png") 0 calc(var(--cw) * -0.87890625) / var(--cw) var(--cw) repeat-x;
  animation: drift 260s linear infinite;
  will-change: transform;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 1 0 auto;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.6rem;
  margin: 0;
  color: #fff;
  font-family: var(--display);
  font-size: 1rem;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}
.chip {
  padding: 0.25rem 0.55rem 0.28rem;
  background: rgba(0, 0, 0, 0.5);
  color: var(--lime);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-shadow: none;
  box-shadow: 0 -2px 0 rgba(0, 0, 0, 0.5), 0 2px 0 rgba(0, 0, 0, 0.5), -2px 0 0 rgba(0, 0, 0, 0.5), 2px 0 0 rgba(0, 0, 0, 0.5);
}

.logo-wrap {
  position: relative;
  margin-top: 0.8rem;
  padding-bottom: 0.4rem;
}
/* Official hero logo: centered, slightly large so the emblem stays readable. */
.hero-logo {
  display: block;
  width: clamp(240px, 34vw, 360px);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
  image-rendering: auto;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.45));
}
.logo {
  margin: 0;
  color: #f2f2f2;
  font-family: var(--display);
  font-size: clamp(2.9rem, 10.5vw, 6.4rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.005em;
  filter:
    drop-shadow(0 0.035em 0 #2b2b2e)
    drop-shadow(0 0.035em 0 #1c1c1f)
    drop-shadow(0 0.1em 0.16em rgba(0, 0, 0, 0.35));
}
.logo em { font-style: normal; color: #9be366; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .logo,
  .logo em {
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 0.03em #1d1d20;
  }
  .logo {
    background-image:
      linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.1) 70%),
      url("../assets/minecraft/stone.png");
    background-size: auto, 0.5em 0.5em;
  }
  .logo em {
    background-image:
      linear-gradient(180deg, rgba(210, 255, 150, 0.3), rgba(210, 255, 150, 0.04) 75%),
      url("../assets/minecraft/grass_block_top.png");
    background-size: auto, 0.5em 0.5em;
  }
}
.splash {
  position: absolute;
  right: -0.4rem;
  bottom: -0.55rem;
  margin: 0;
  color: var(--mc-yellow);
  font-family: var(--display);
  font-size: clamp(0.95rem, 2.2vw, 1.35rem);
  font-weight: 700;
  white-space: nowrap;
  text-shadow: 0.12em 0.12em 0 #3f3f15;
  transform: rotate(-14deg);
  transform-origin: center;
  animation: splash 0.75s ease-in-out infinite alternate;
  pointer-events: none;
}

.lede {
  max-width: 36rem;
  margin: 1.4rem 0 0;
  color: #fff;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.42), 0 0 24px rgba(0, 0, 0, 0.3);
}

.ip-card {
  width: min(100%, 31rem);
  margin-top: 1.5rem;
}
.ip-label {
  display: inline-block;
  margin: 0 0 0.6rem;
  padding: 0.2rem 0.55rem 0.25rem;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 -2px 0 rgba(0, 0, 0, 0.5), 0 2px 0 rgba(0, 0, 0, 0.5), -2px 0 0 rgba(0, 0, 0, 0.5), 2px 0 0 rgba(0, 0, 0, 0.5);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.ip-button {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 62px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #0a0a0c;
  color: var(--lime);
  text-align: left;
  cursor: copy;
  box-shadow:
    inset 0 0 0 3px #a0a0a0,
    0 -3px 0 #000, 0 3px 0 #000, -3px 0 0 #000, 3px 0 0 #000,
    0 12px 0 rgba(0, 0, 0, 0.22);
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .ip-button:hover {
    box-shadow:
      inset 0 0 0 3px #fff,
      0 -3px 0 #000, 0 3px 0 #000, -3px 0 0 #000, 3px 0 0 #000,
      0 12px 0 rgba(0, 0, 0, 0.22);
  }
  .ip-button:hover .ip-action { filter: brightness(1.1); }
}
.ip-text {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  padding: 0.6rem 1rem;
}
.ip-text code {
  font-size: clamp(1rem, 4.4vw, 1.55rem);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.ip-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 56px;
  margin: 3px;
  padding: 0 1.1rem;
  background: #3c8527;
  color: #fff;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 3px 0 rgba(170, 255, 130, 0.35), inset 0 -4px 0 rgba(0, 40, 0, 0.45);
}
.ip-button.is-copied .ip-action { background: #2d6a1d; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  width: min(100%, 31rem);
  margin-top: 1.6rem;
}
.hero-actions .btn { flex: 1 1 9.5rem; }

.hero-art {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  order: -1;
  padding: 0.25rem 0 0.75rem;
}
.cube-scene {
  position: relative;
  width: var(--s);
  height: var(--s);
  perspective: 1000px;
}
.cube-float {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  animation: bob 4.5s ease-in-out infinite;
}
.cube {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(-26deg) rotateY(-38deg);
  animation: spin 24s linear infinite;
}
.face {
  position: absolute;
  inset: 0;
  background: url("../assets/minecraft/grass_block_side.png") 0 0 / 100% 100%;
  filter: brightness(calc(var(--shade, 1) * var(--night, 1)));
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.face-front { --shade: 0.92; transform: translateZ(calc(var(--s) / 2)); }
.face-back { --shade: 0.92; transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.face-right { --shade: 0.74; transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.face-left { --shade: 0.74; transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.face-top {
  --shade: 1.06;
  background-image: url("../assets/minecraft/grass_block_top.png");
  transform: rotateX(90deg) translateZ(calc(var(--s) / 2));
}
.face-bottom {
  --shade: 0.5;
  background-image: url("../assets/minecraft/dirt.png");
  transform: rotateX(-90deg) translateZ(calc(var(--s) / 2));
}
.cube-shadow {
  position: absolute;
  left: 50%;
  bottom: calc(var(--s) * -0.42);
  width: 95%;
  height: calc(var(--s) * 0.12);
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.32), transparent);
  transform: translateX(-50%);
  animation: shadow 4.5s ease-in-out infinite;
}
.drop {
  position: absolute;
  display: none;
  width: 34px;
  height: 34px;
  animation: bob 3.6s ease-in-out infinite;
}
.drop img {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.2));
  animation: item-spin 4.5s linear infinite;
}
.drop-a { left: 6%; top: 10%; animation-delay: -1.2s; }
.drop-b { right: 4%; top: 46%; animation-delay: -2.4s; }
.drop-c { left: 8%; bottom: 30%; width: 28px; height: 28px; animation-delay: -0.6s; }

.terrain {
  --far-h: max(120px, 15vw);
  --near-h: max(70px, 10vw);
  position: relative;
  flex: 0 0 auto;
  height: calc(var(--far-h) + var(--grass-h));
  margin-top: calc(var(--far-h) * -0.5);
  pointer-events: none;
}
.hills {
  position: absolute;
  left: 0;
  display: block;
  width: 100%;
}
.hills-far { bottom: calc(var(--grass-h) + var(--near-h) * 0.35); height: var(--far-h); }
.hills-near { bottom: var(--grass-h); height: var(--near-h); }
.h-far { fill: var(--far); }
.h-far-cap { fill: var(--far-cap); }
.h-near { fill: var(--near); }
.h-near-cap { fill: var(--near-cap); }
.trunk { fill: var(--trunk); }
.leaves { fill: var(--leaves); }
.leaves-hi { fill: var(--leaves-hi); }
.grass-row {
  position: absolute;
  inset: auto 0 0;
  height: var(--grass-h);
  background: url("../assets/minecraft/grass_block_side.png") 0 0 / var(--grass-h) var(--grass-h) repeat-x;
  filter: brightness(var(--night));
}

/* ---------- Underground: status + features (dirt layer) ---------- */
.underground {
  position: relative;
  background:
    linear-gradient(180deg, rgba(20, 13, 8, 0.72), rgba(16, 10, 6, 0.9) 22rem),
    url("../assets/minecraft/dirt.png") 0 0 / var(--grass-h) var(--grass-h);
}

.status-wrap {
  position: relative;
  z-index: 2;
  padding-bottom: 0.5rem;
}
.server-card {
  position: relative;
  max-width: 62rem;
  margin: calc(var(--grass-h) * -0.55) auto 0;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 45%), rgba(13, 13, 16, 0.95);
  box-shadow:
    inset 3px 3px 0 rgba(255, 255, 255, 0.06),
    inset -3px -3px 0 rgba(0, 0, 0, 0.5),
    0 -3px 0 #000, 0 3px 0 #000, -3px 0 0 #000, 3px 0 0 #000,
    0 18px 0 rgba(0, 0, 0, 0.25);
}
.server-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}
.server-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}
.server-head-note {
  margin: 0;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.server-entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.65rem;
  background: #000;
  font-family: var(--display);
  box-shadow: inset 0 0 0 2px #7f7f7f;
}
.server-icon { width: 64px; height: 64px; }
.server-main p { margin: 0; line-height: 1.3; }
.server-name { color: #fff; font-size: 1.2rem; }
.server-address { color: #b5b5b5; font-size: 0.98rem; }
.server-main .server-motd {
  margin-top: 0.25rem;
  color: #aaa;
  font-size: 1rem;
  overflow-wrap: anywhere;
}
.server-card[data-state="error"] .server-motd,
.server-card[data-state="offline"] .server-motd { color: #ff5f5f; }
.server-side {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 0.6rem;
  color: #aaa;
  font-size: 1.02rem;
  white-space: nowrap;
}
.server-label { color: var(--gold); }
.server-card[data-state="online"] .server-label { color: var(--ok); }
.server-card[data-state="offline"] .server-label { color: var(--red); }
.server-card[data-state="error"] .server-label { color: var(--warn); }

.state-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 20px;
}
.state-icon > * { grid-area: 1 / 1; }
.signal {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 20px;
}
.signal i { display: block; width: 3px; background: #333; }
.signal i:nth-child(1) { height: 4px; }
.signal i:nth-child(2) { height: 8px; animation-delay: 0.12s; }
.signal i:nth-child(3) { height: 12px; animation-delay: 0.24s; }
.signal i:nth-child(4) { height: 16px; animation-delay: 0.36s; }
.signal i:nth-child(5) { height: 20px; animation-delay: 0.48s; }
.server-card[data-state="checking"] .signal { display: inline-flex; }
.server-card[data-state="checking"] .signal i { animation-name: ping; animation-duration: 1.2s; animation-iteration-count: infinite; animation-timing-function: steps(1, end); }
.no-conn {
  display: none;
  width: 3px;
  height: 3px;
  background: #ff3b3b;
  box-shadow: 12px 0 #ff3b3b, 3px 3px #ff3b3b, 9px 3px #ff3b3b, 6px 6px #ff3b3b, 3px 9px #ff3b3b, 9px 9px #ff3b3b, 0 12px #ff3b3b, 12px 12px #ff3b3b;
  transform: translate(-6px, -6px);
}
.server-card[data-state="error"] .no-conn,
.server-card[data-state="offline"] .no-conn { display: block; }
.lamp {
  display: none;
  width: 12px;
  height: 12px;
  background: var(--ok);
  box-shadow: 0 0 0 2px #000, 0 0 10px rgba(143, 224, 90, 0.7);
}
.server-card[data-state="online"] .lamp {
  display: block;
  animation: blink 1.6s steps(2, end) infinite;
}

.server-detail {
  margin: 0.9rem 0 0;
  color: var(--muted);
}
.server-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.9rem 0 0;
}
.server-meta div {
  padding: 0.6rem 0.8rem;
  background: #111;
  box-shadow: inset 0 0 0 2px #2a2a2a;
}
.server-meta dt {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.server-meta dd {
  margin: 0.1rem 0 0;
  font-family: var(--display);
  font-size: 1.15rem;
  overflow-wrap: anywhere;
}
.meter {
  height: 12px;
  margin-top: 0.85rem;
  background: #151515;
  box-shadow: 0 0 0 2px #000;
}
.meter-fill {
  width: 0;
  height: 100%;
  background: #80ff20;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), inset 0 -2px 0 rgba(0, 0, 0, 0.22);
}
.server-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1rem;
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 2px solid #24242a;
}
.server-foot .server-checked { flex: 1 1 14rem; margin: 0; }
.fine {
  margin: 0.7rem 0 0;
  color: var(--dim);
  font-size: 0.85rem;
}

/* ---------- Sections ---------- */
.section {
  position: relative;
  padding: clamp(3.75rem, 8vw, 6rem) 0;
}
.section-head {
  max-width: 46rem;
  margin: 0 auto clamp(2.25rem, 5vw, 3.5rem);
  text-align: center;
}
.section-head > p:not(.kicker),
.sub {
  margin: 1rem auto 0;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.08rem;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.42rem 0.75rem 0.44rem;
  background: rgba(0, 0, 0, 0.5);
  color: var(--lime);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 -2px 0 rgba(0, 0, 0, 0.55), 0 2px 0 rgba(0, 0, 0, 0.55), -2px 0 0 rgba(0, 0, 0, 0.55), 2px 0 0 rgba(0, 0, 0, 0.55);
}
.kicker img { width: 16px; height: 16px; }
.kicker-y {
  margin-left: 0.2rem;
  padding-left: 0.6rem;
  border-left: 2px solid rgba(255, 255, 255, 0.14);
  color: var(--dim);
  font-weight: 500;
  letter-spacing: 0.06em;
}
.section-head h2,
.community-copy h2,
.cta-copy h2 {
  margin: 0.9rem 0 0;
  font-family: var(--display);
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: 0.005em;
  text-shadow: 0 0.08em 0 rgba(0, 0, 0, 0.5);
}
.accent { color: var(--lime); }

.layer-stone {
  background:
    linear-gradient(rgba(16, 17, 20, 0.86), rgba(16, 17, 20, 0.9)),
    url("../assets/minecraft/stone.png") 0 0 / 64px 64px;
}
.layer-bricks {
  background:
    linear-gradient(rgba(14, 14, 17, 0.8), rgba(14, 14, 17, 0.9)),
    url("../assets/minecraft/stone_bricks.png") 0 0 / 64px 64px;
  box-shadow: inset 0 6px 0 #0a0a0c, inset 0 -6px 0 #0a0a0c;
}
.layer-deep {
  background:
    linear-gradient(rgba(10, 10, 13, 0.86), rgba(10, 10, 13, 0.92)),
    url("../assets/minecraft/deepslate.png") 0 0 / 64px 64px;
}
/* Jagged pixel boundary: the next layer's texture pokes up into the one above. */
.edge-top::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 32px;
  background: inherit;
  background-position: 0 32px;
  -webkit-mask: var(--edge-mask) 0 100% / 256px 32px repeat-x;
  mask: var(--edge-mask) 0 100% / 256px 32px repeat-x;
  pointer-events: none;
}

/* ---------- Features (bento) ---------- */
.bento {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 1.5rem;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 45%), rgba(19, 19, 23, 0.93);
  box-shadow:
    inset 3px 3px 0 rgba(255, 255, 255, 0.06),
    inset -3px -3px 0 rgba(0, 0, 0, 0.5),
    0 -3px 0 #000, 0 3px 0 #000, -3px 0 0 #000, 3px 0 0 #000;
}
.tile h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.4rem;
  line-height: 1.15;
}
.tile p { margin: 0; color: var(--muted); }
.tile-hero {
  justify-content: flex-end;
  min-height: 20rem;
  background:
    linear-gradient(180deg, rgba(12, 16, 10, 0.5), rgba(15, 15, 18, 0.94) 62%),
    url("../assets/minecraft/grass_block_top.png") 0 0 / 64px 64px;
}
.tile-hero h3 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.tile-hero p { max-width: 30rem; color: #e2dccf; font-size: 1.08rem; }
.tile-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: 100%;
}
.tile-row > div:first-child {
  display: grid;
  flex: 1 1 15rem;
  gap: 0.6rem;
}
.slots { display: flex; }
.craft {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem;
  background: #c6c6c6;
  box-shadow:
    inset 3px 3px 0 #fff,
    inset -3px -3px 0 #555,
    0 -3px 0 #000, 0 3px 0 #000, -3px 0 0 #000, 3px 0 0 #000;
}
.craft-grid {
  display: grid;
  grid-template-columns: repeat(3, 40px);
}
.craft .slot-sm { width: 40px; height: 40px; }
.craft-arrow {
  width: 30px;
  height: 22px;
  background: #8b8b8b;
  clip-path: polygon(0 34%, 52% 34%, 52% 0, 100% 50%, 52% 100%, 52% 66%, 0 66%);
}
.hearts {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  max-width: 200px;
}
.hearts img {
  width: 18px;
  height: 18px;
  animation: regen 2.6s steps(1, end) infinite;
}
.hearts img:nth-child(2) { animation-delay: 0.08s; }
.hearts img:nth-child(3) { animation-delay: 0.16s; }
.hearts img:nth-child(4) { animation-delay: 0.24s; }
.hearts img:nth-child(5) { animation-delay: 0.32s; }
.hearts img:nth-child(6) { animation-delay: 0.4s; }
.hearts img:nth-child(7) { animation-delay: 0.48s; }
.hearts img:nth-child(8) { animation-delay: 0.56s; }
.hearts img:nth-child(9) { animation-delay: 0.64s; }
.hearts img:nth-child(10) { animation-delay: 0.72s; }

/* ---------- Store (item tooltips) ---------- */
.ranks {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rank {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-top: 38px;
}
.rank-slot {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 2;
  width: 76px;
  height: 76px;
  transform: translateX(-50%);
}
.rank-slot img { width: 46px; height: 46px; }
.rank-slot::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: rgba(255, 255, 255, 0);
  transition: background-color 0.15s ease;
}
.rank:hover .rank-slot::after { background: rgba(255, 255, 255, 0.3); }
.rank-tip {
  --tip: rgba(16, 2, 20, 0.95);
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 54px 1.3rem 1.35rem;
  background: var(--tip);
  box-shadow:
    0 -3px 0 var(--tip), 0 3px 0 var(--tip), -3px 0 0 var(--tip), 3px 0 0 var(--tip),
    0 22px 34px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}
.rank-tip::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  border-image: linear-gradient(180deg, #5a12ff, #2a0a86) 1;
  pointer-events: none;
}
.rank:hover .rank-tip { transform: translateY(-4px); }
.rank-name {
  margin: 0;
  color: var(--rank);
  font-family: var(--display);
  font-size: 1.8rem;
  text-align: center;
  text-shadow: 0 0.1em 0 rgba(0, 0, 0, 0.6);
}
.rank-lore {
  margin: 0.2rem 0 1.1rem;
  color: #d885d8;
  font-family: var(--display);
  font-style: italic;
  text-align: center;
}
.rank-perks {
  display: grid;
  flex: 1;
  align-content: start;
  gap: 0.5rem;
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
  font-family: var(--display);
}
.rank-perks li {
  display: flex;
  gap: 0.55rem;
  color: #a7acff;
}
.rank-perks li::before { content: "+"; }
.rank .btn { width: 100%; }
.rank.is-featured .rank-tip {
  --tip: rgba(24, 4, 34, 0.97);
  box-shadow:
    0 -3px 0 var(--tip), 0 3px 0 var(--tip), -3px 0 0 var(--tip), 3px 0 0 var(--tip),
    0 0 0 6px rgba(255, 212, 92, 0.85),
    0 0 60px rgba(150, 80, 255, 0.4);
}
.ribbon {
  position: absolute;
  top: 48px;
  right: 12px;
  z-index: 3;
  padding: 0.25rem 0.55rem 0.3rem;
  background: var(--gold);
  color: #2b1d00;
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 -2px 0 #000, 0 2px 0 #000, -2px 0 0 #000, 2px 0 0 #000;
}
.note {
  max-width: 44rem;
  margin: 2.5rem auto 0;
  color: var(--dim);
  font-size: 0.92rem;
  text-align: center;
}

/* ---------- How to join ---------- */
.join { max-width: 70rem; margin: 0 auto; }
.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.no-js .tabs { display: none; }
.tab {
  --b: #3d3d3d;
  --b-hi: rgba(255, 255, 255, 0.18);
  --b-lo: rgba(0, 0, 0, 0.45);
  --edge: #000;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 50px;
  padding: 0.6rem 1.2rem 0.7rem;
  border: 0;
  background: var(--b);
  color: #cfcfcf;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow:
    inset 0 3px 0 var(--b-hi),
    inset 0 -4px 0 var(--b-lo),
    0 -3px 0 var(--edge), 0 3px 0 var(--edge), -3px 0 0 var(--edge), 3px 0 0 var(--edge);
}
.tab img { width: 20px; height: 20px; }
.tab[aria-selected="true"] {
  --b: #6f6f6f;
  --b-hi: rgba(255, 255, 255, 0.3);
  --edge: #fff;
  color: #fff;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}
@media (hover: hover) {
  .tab:hover { color: #fff; filter: brightness(1.1); }
}
.panel-title {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-size: 1.4rem;
}
.js .panel-title { display: none; }
.no-js .tab-panel + .tab-panel { margin-top: 3rem; }
.tab-panel:focus-visible { outline-offset: 8px; }

.join-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 2rem;
}
.steps {
  display: grid;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 45%), rgba(18, 18, 22, 0.93);
  box-shadow:
    inset 3px 3px 0 rgba(255, 255, 255, 0.06),
    inset -3px -3px 0 rgba(0, 0, 0, 0.5),
    0 -3px 0 #000, 0 3px 0 #000, -3px 0 0 #000, 3px 0 0 #000;
}
.step-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--lime);
  color: #1b2a0c;
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 700;
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.45),
    inset 0 -4px 0 rgba(0, 0, 0, 0.25),
    0 -3px 0 #000, 0 3px 0 #000, -3px 0 0 #000, 3px 0 0 #000;
}
.step h4 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.22rem;
}
.step p { margin: 0.3rem 0 0; color: var(--muted); }
.step strong { color: var(--ink); font-weight: 600; }

.mc-screen {
  margin: 0;
  padding: 1.5rem clamp(1rem, 3vw, 2rem) 1.25rem;
  background:
    linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url("../assets/minecraft/dirt.png") 0 0 / 64px 64px;
  color: #fff;
  font-family: var(--display);
  box-shadow:
    0 -3px 0 #000, 0 3px 0 #000, -3px 0 0 #000, 3px 0 0 #000,
    0 18px 0 rgba(0, 0, 0, 0.25);
}
.mc-title {
  margin: 0 0 1.25rem;
  font-size: 1.12rem;
  text-align: center;
  text-shadow: 0 2px 0 #3f3f3f;
}
.mc-group {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.mc-label {
  color: #a0a0a0;
  font-size: 0.95rem;
  text-shadow: 0 2px 0 #222;
}
.mc-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  min-height: 46px;
  padding: 0.45rem 0.75rem;
  border: 0;
  background: #000;
  color: #e0e0e0;
  font-family: var(--display);
  font-size: 1.05rem;
  text-align: left;
  box-shadow: inset 0 0 0 2px #a0a0a0;
}
button.mc-field {
  color: var(--lime);
  cursor: copy;
}
@media (hover: hover) {
  button.mc-field:hover { box-shadow: inset 0 0 0 2px #fff; }
}
button.mc-field.is-copied { box-shadow: inset 0 0 0 2px #8fe05a; }
.caret {
  color: #e0e0e0;
  animation: blink 1s steps(2, start) infinite;
}
.mc-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  margin-top: 1.25rem;
}
.mc-btn {
  display: grid;
  place-items: center;
  min-height: 40px;
  background: #6f6f6f;
  color: #fff;
  text-shadow: 0 2px 0 #3a3a3a;
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.3),
    inset 0 -4px 0 rgba(0, 0, 0, 0.4),
    0 -3px 0 #000, 0 3px 0 #000, -3px 0 0 #000, 3px 0 0 #000;
}
.mc-screen figcaption {
  margin-top: 1.1rem;
  color: #c4c4c4;
  font-family: var(--font);
  font-size: 0.85rem;
  text-align: center;
}
.mc-screen-bedrock { background: #313233; }
.mc-screen-bedrock .mc-title { text-shadow: none; }
.mc-screen-bedrock .mc-label { color: #d0d1d4; text-shadow: none; }
.mc-screen-bedrock .mc-field {
  background: #1e1e1f;
  box-shadow: inset 0 0 0 2px #5a5b5c, inset 0 -3px 0 #111;
}
.mc-screen-bedrock .mc-btn {
  background: #48494a;
  text-shadow: none;
  box-shadow: inset 0 -4px 0 #2b2c2d, 0 -2px 0 #000, 0 2px 0 #000, -2px 0 0 #000, 2px 0 0 #000;
}
.mc-screen-bedrock .mc-btn-go { background: #3c8527; box-shadow: inset 0 -4px 0 #1d4d10, 0 -2px 0 #000, 0 2px 0 #000, -2px 0 0 #000, 2px 0 0 #000; }

.join-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.25rem;
}

/* ---------- Rules (book & quill) ---------- */
.book {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 64rem;
  margin: 0 auto;
  padding: 12px;
  background: #6b3d1e;
  box-shadow:
    inset 0 0 0 3px #8a5329,
    inset 0 0 0 6px #4a2810,
    0 -3px 0 #000, 0 3px 0 #000, -3px 0 0 #000, 3px 0 0 #000,
    0 22px 0 rgba(0, 0, 0, 0.3);
}
.page {
  position: relative;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  background: #f4e8c8;
  color: #3b2d1d;
}
.page + .page { border-top: 3px dashed rgba(90, 55, 20, 0.3); }
.page-no {
  margin: 0 0 0.75rem;
  color: #7a6040;
  font-family: var(--display);
  font-size: 0.9rem;
  text-align: right;
}
.rules {
  margin: 0;
  padding: 0;
  list-style: none;
}
.rules li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 2px solid rgba(90, 55, 20, 0.16);
}
.rules li:last-child { border-bottom: 0; }
.rule-num {
  min-width: 1.4ch;
  color: #9a3d12;
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 700;
}
.rules p {
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
  line-height: 1.45;
}
.book-foot {
  margin: 1.1rem 0 0;
  padding-top: 1rem;
  border-top: 2px solid rgba(90, 55, 20, 0.2);
  color: #5b4630;
  font-size: 0.98rem;
}
.book-foot a { color: #3443c4; font-weight: 600; }

/* ---------- Community ---------- */
.community {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 3rem;
}
.community-copy .sub { margin-left: 0; }
.perk-list {
  display: grid;
  gap: 1.1rem 1.5rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}
.perk-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}
.perk-list h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.12rem;
}
.perk-list p {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.invite {
  justify-self: center;
  width: min(100%, 26rem);
  background: #2b2d31;
  box-shadow:
    0 -3px 0 #000, 0 3px 0 #000, -3px 0 0 #000, 3px 0 0 #000,
    0 24px 40px rgba(0, 0, 0, 0.4);
}
.invite-banner {
  height: 120px;
  background:
    linear-gradient(rgba(43, 45, 49, 0.35), rgba(43, 45, 49, 0.35)),
    url("../assets/minecraft/oak_leaves.png") 0 0 / 40px 40px,
    #2f6b1d;
}
.invite-body {
  position: relative;
  padding: 0 1.5rem 1.5rem;
}
.invite-icon {
  display: block;
  width: 80px;
  height: 80px;
  margin-top: -40px;
  background: #2b2d31;
  box-shadow: 0 0 0 6px #2b2d31;
}
.invite-kicker {
  margin: 0.9rem 0 0;
  color: #b5bac1;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.invite-name {
  margin: 0.15rem 0 0;
  color: #f2f3f5;
  font-family: var(--display);
  font-size: 1.6rem;
}
.invite-url { margin: 0; color: #a3aab4; font-size: 0.95rem; }
.invite-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.4rem;
  padding: 0;
  list-style: none;
}
.invite-tags li {
  padding: 0.2rem 0.6rem;
  background: #1e1f22;
  color: #dbdee1;
  font-size: 0.85rem;
}

/* ---------- CTA + nether portal ---------- */
.cta { padding-top: 0; }
.cta-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 2.5rem;
  padding: clamp(1.75rem, 5vw, 3.5rem);
  background:
    radial-gradient(circle at 85% 50%, rgba(140, 60, 255, 0.12), transparent 55%),
    rgba(12, 10, 18, 0.9);
  box-shadow:
    inset 3px 3px 0 rgba(255, 255, 255, 0.05),
    inset -3px -3px 0 rgba(0, 0, 0, 0.5),
    0 -3px 0 #000, 0 3px 0 #000, -3px 0 0 #000, 3px 0 0 #000;
}
.cta-copy .sub { margin-left: 0; }
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.75rem;
}
.portal {
  justify-self: center;
  padding: 24px;
  background: url("../assets/art/obsidian.png") 0 0 / 24px 24px;
  box-shadow:
    0 -3px 0 #000, 0 3px 0 #000, -3px 0 0 #000, 3px 0 0 #000,
    0 0 70px rgba(150, 70, 255, 0.38);
}
/* 32-frame 16x20 sprite; 103.2258% = 32/31 lands one frame past the end, which repeats frame 0. */
.portal-core {
  width: min(176px, 52vw);
  aspect-ratio: 4 / 5;
  background: url("../assets/art/portal.png") 0 0 / 100% auto repeat-y;
  box-shadow: inset 0 0 22px rgba(20, 0, 50, 0.55), 0 0 26px rgba(170, 90, 255, 0.45);
  animation: portal 2.4s steps(32) infinite;
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  padding: clamp(3rem, 6vw, 4.5rem) 0 calc(1.5rem + env(safe-area-inset-bottom));
  background:
    linear-gradient(rgba(6, 6, 8, 0.84), rgba(6, 6, 8, 0.84)),
    url("../assets/minecraft/bedrock.png") 0 0 / 48px 48px;
  color: var(--muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}
.footer h2 {
  margin: 0 0 0.8rem;
  color: var(--ink);
  font-family: var(--display);
  font-size: 0.92rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.footer ul {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer a:not(.btn):not(.brand) {
  color: var(--muted);
  text-decoration: none;
}
.footer a:not(.btn):not(.brand):hover { color: var(--lime); }
.footer-brand { font-size: 1.35rem; }
.footer-brand img { width: 28px; height: 28px; }
.footer-brand img.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  object-position: center;
}
.footer-about p { margin: 0.8rem 0 0; }
.footer-ip code { font-size: 1.1rem; user-select: all; }
.to-top { margin-top: 1.4rem; }
.legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
  margin-top: 2.5rem;
  padding-top: 1.1rem;
  border-top: 2px solid rgba(255, 255, 255, 0.07);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}
.legal p { margin: 0; }
.legal .depth { color: #77716a; }

/* ---------- Hotbar + XP bar ---------- */
.hotbar {
  position: fixed;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 45;
  width: min(calc(100% - 16px), 500px);
  transform: translateX(-50%);
}
.hotbar ul {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin: 0;
  padding: 3px;
  list-style: none;
  background: rgba(20, 20, 22, 0.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 -3px 0 #000, 0 3px 0 #000, -3px 0 0 #000, 3px 0 0 #000;
}
.hotbar li { min-width: 0; }
.hotbar a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 58px;
  padding: 4px 2px;
  background: rgba(120, 120, 120, 0.22);
  color: #d2d2d2;
  font-family: var(--display);
  font-size: 10.5px;
  line-height: 1;
  text-decoration: none;
  box-shadow: inset 0 0 0 2px rgba(160, 160, 160, 0.4);
  -webkit-tap-highlight-color: transparent;
}
.hotbar img { width: 24px; height: 24px; flex: 0 0 auto; }
.hotbar a span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hotbar a[aria-current] {
  z-index: 1;
  background: rgba(150, 150, 150, 0.32);
  color: #fff;
}
.hotbar a[aria-current]::after {
  content: "";
  position: absolute;
  inset: -4px;
  box-shadow: inset 0 0 0 3px #fff, 0 0 0 3px #000;
  pointer-events: none;
}
.hotbar a:focus-visible { outline-offset: 4px; }

.xp {
  position: fixed;
  left: 50%;
  bottom: calc(10px + 64px + 10px + env(safe-area-inset-bottom));
  z-index: 46;
  width: min(calc(100% - 16px), 500px);
  height: 8px;
  background: #151515;
  box-shadow: 0 0 0 2px #000;
  transform: translateX(-50%);
  pointer-events: none;
}
.xp-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: #80ff20;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4), inset 0 -2px 0 rgba(0, 0, 0, 0.22);
  transform: scaleX(var(--progress, 0));
  transform-origin: left center;
}
.xp::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 18 - 2px), rgba(0, 0, 0, 0.7) calc(100% / 18 - 2px) calc(100% / 18));
}

/* ---------- Advancement toast + particles ---------- */
.toast {
  position: fixed;
  top: calc(var(--topbar-h) + 12px);
  right: max(8px, env(safe-area-inset-right));
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: min(340px, calc(100% - 16px));
  padding: 0.65rem 0.9rem 0.65rem 0.65rem;
  background: #212121;
  color: #fff;
  font-family: var(--display);
  box-shadow:
    inset 0 0 0 3px #555,
    inset 0 0 0 5px #0e0e0e,
    0 -3px 0 #000, 0 3px 0 #000, -3px 0 0 #000, 3px 0 0 #000,
    0 14px 30px rgba(0, 0, 0, 0.45);
  visibility: hidden;
  transform: translateX(calc(100% + 24px));
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.25, 1.1), visibility 0s linear 0.35s;
}
.toast.is-on {
  visibility: visible;
  transform: none;
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.25, 1.1), visibility 0s;
}
.toast-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
}
.toast-icon img { width: 28px; height: 28px; }
.toast-copy { display: grid; gap: 0.1rem; min-width: 0; }
.toast-title { color: var(--mc-yellow); font-size: 0.98rem; }
.toast-text { color: #fff; font-size: 1rem; overflow-wrap: anywhere; }
.toast[data-kind="bad"] .toast-title { color: #ff8a8a; }

.particles {
  position: fixed;
  inset: 0;
  z-index: 80;
  overflow: hidden;
  pointer-events: none;
}
.particles span {
  position: absolute;
  display: block;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

/* ---------- Hero clock chip ---------- */
.chip-clock {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #fff;
}
.clock-icon {
  width: 8px;
  height: 8px;
  background: #ffd45c;
  box-shadow: 0 0 0 2px rgba(255, 212, 92, 0.28);
}
html[data-sky="night"] .clock-icon,
html[data-sky="dusk"] .clock-icon {
  background: #e4eaf6;
  box-shadow: inset -3px -1px 0 #9aa6c4, 0 0 0 2px rgba(200, 215, 255, 0.18);
}

/* ---------- Mining easter egg ---------- */
.mine {
  --s: clamp(92px, 15vw, 210px);
  position: relative;
  padding-bottom: calc(var(--s) * 0.5);
}
.cube-scene,
.cube-float,
.cube,
.loot-bob,
.loot-cube { display: block; }
.cube-btn {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: url("../assets/art/cursor-pickaxe.png") 4 4, pointer;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.cube-btn:focus-visible { outline-offset: 14px; }
.cube-btn.is-hit { animation: hit 0.14s steps(2, end); }
.cube-scene { transition: transform 0.4s cubic-bezier(0.3, 1.6, 0.5, 1), opacity 0.2s ease; }
.cube-scene.is-broken {
  opacity: 0;
  transform: scale(0.35);
  transition: transform 0.1s ease-in, opacity 0.1s ease-in;
}
/* Vanilla destroy stages, pre-converted from multiply blending to plain alpha. */
.face::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/art/crack.png") 0 calc(var(--stage, 0) * 100% / 9) / 100% 1000%;
  opacity: 0;
}
.cube.is-cracked .face::after { opacity: 1; }
.loot {
  --ls: clamp(26px, 3.4vw, 40px);
  position: absolute;
  left: 50%;
  bottom: calc(var(--s) * 0.2);
  width: var(--ls);
  height: var(--ls);
  margin-left: calc(var(--ls) / -2);
  perspective: 600px;
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1), opacity 0.15s ease;
}
.loot.is-dropped { opacity: 1; transform: none; }
.loot.is-picked { opacity: 0; transform: translateY(-36px) scale(0.2); }
.loot-bob { width: 100%; height: 100%; transform-style: preserve-3d; }
.loot-cube {
  --s: var(--ls);
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(-26deg) rotateY(-38deg);
}
.loot .face { background-image: url("../assets/minecraft/dirt.png"); }
.loot.is-dropped .loot-bob { animation: bob 1.6s ease-in-out infinite; }
.loot.is-dropped .loot-cube { animation: spin 3s linear infinite; }
.mine-hint {
  margin: 0.2rem 0 0;
  padding: 0.25rem 0.55rem 0.28rem;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 -2px 0 rgba(0, 0, 0, 0.5), 0 2px 0 rgba(0, 0, 0, 0.5), -2px 0 0 rgba(0, 0, 0, 0.5), 2px 0 0 rgba(0, 0, 0, 0.5);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- Fireflies (dusk & night, like the 1.21.5 firefly bush) ---------- */
.fireflies {
  position: absolute;
  inset: 0 0 var(--grass-h);
  display: none;
}
html[data-sky="night"] .fireflies,
html[data-sky="dusk"] .fireflies { display: block; }
.fireflies i {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #eaff7a;
  box-shadow: 0 0 6px 2px rgba(214, 255, 90, 0.5);
  opacity: 0;
  animation: firefly 6.4s ease-in-out infinite;
}
.fireflies i:nth-child(1) { left: 5%; top: 58%; animation-delay: -0.4s; }
.fireflies i:nth-child(2) { left: 12%; top: 74%; animation-delay: -2.2s; animation-duration: 7.6s; }
.fireflies i:nth-child(3) { left: 21%; top: 63%; animation-delay: -4.1s; }
.fireflies i:nth-child(4) { left: 29%; top: 80%; animation-delay: -1.3s; animation-duration: 5.8s; }
.fireflies i:nth-child(5) { left: 37%; top: 69%; animation-delay: -5.2s; animation-duration: 7.1s; }
.fireflies i:nth-child(6) { left: 46%; top: 78%; animation-delay: -3s; }
.fireflies i:nth-child(7) { left: 55%; top: 62%; animation-delay: -0.9s; animation-duration: 6.9s; }
.fireflies i:nth-child(8) { left: 63%; top: 75%; animation-delay: -4.6s; animation-duration: 5.6s; }
.fireflies i:nth-child(9) { left: 71%; top: 66%; animation-delay: -2.7s; }
.fireflies i:nth-child(10) { left: 79%; top: 81%; animation-delay: -5.9s; animation-duration: 7.3s; }
.fireflies i:nth-child(11) { left: 87%; top: 64%; animation-delay: -1.8s; animation-duration: 6.1s; }
.fireflies i:nth-child(12) { left: 94%; top: 76%; animation-delay: -3.6s; }

/* ---------- Team ---------- */
/* Minecraft chat colours: §6 §c §d §b §a §e */
.role-owner { --role: #ffaa00; }
.role-co { --role: #ff5555; }
.role-admin { --role: #ff55ff; }
.role-staff { --role: #55ffff; }
.role-helper { --role: #55ff55; }
.role-builder { --role: #ffff55; }
.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.3rem 0.55rem 0.32rem;
  background: var(--role, #8b8b8b);
  color: #15120a;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.4),
    inset 0 -2px 0 rgba(0, 0, 0, 0.2),
    0 -2px 0 #000, 0 2px 0 #000, -2px 0 0 #000, 2px 0 0 #000;
}
.crown { display: block; flex: 0 0 auto; }

.leaders {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  max-width: 50rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.leader {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 45%), #121216;
  box-shadow:
    inset 3px 3px 0 rgba(255, 255, 255, 0.06),
    inset -3px -3px 0 rgba(0, 0, 0, 0.5),
    0 -3px 0 #000, 0 3px 0 #000, -3px 0 0 #000, 3px 0 0 #000;
}
.leader-owner {
  box-shadow:
    inset 3px 3px 0 rgba(255, 255, 255, 0.06),
    inset -3px -3px 0 rgba(0, 0, 0, 0.5),
    0 -3px 0 #000, 0 3px 0 #000, -3px 0 0 #000, 3px 0 0 #000,
    0 0 0 6px rgba(255, 170, 0, 0.85);
}
.leader-stage {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: clamp(300px, 64vw, 380px);
  overflow: hidden;
  background:
    linear-gradient(rgba(11, 11, 14, 0.84), rgba(11, 11, 14, 0.84)),
    url("../assets/minecraft/stone_bricks.png") 0 0 / 48px 48px;
}
.leader-stage picture { display: contents; }
.leader-img {
  position: relative;
  z-index: 1;
  width: auto;
  height: calc(100% - 88px);
  margin-bottom: 34px;
}
.leader-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  background: url("../assets/minecraft/grass_block_side.png") 0 0 / 40px 40px repeat-x;
}
.nametag {
  position: absolute;
  top: 1rem;
  left: 50%;
  z-index: 2;
  margin: 0;
  padding: 0.18rem 0.5rem 0.24rem;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-family: var(--display);
  font-size: 1rem;
  line-height: 1.2;
  white-space: nowrap;
  transform: translateX(-50%);
}
.nametag-prefix { color: var(--role); }
/* Beacon beam behind each leader; the texture scrolls with transform only. */
.beam {
  position: absolute;
  top: 0;
  bottom: 34px;
  left: 50%;
  width: 32px;
  margin-left: -16px;
  pointer-events: none;
}
.beam::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -18px;
  right: -18px;
  background: var(--role);
  opacity: 0.16;
}
.beam-core {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.85;
}
.beam-core::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(100% + 64px);
  background: url("../assets/art/beam-gold.png") 0 0 / 100% 64px repeat-y;
  animation: beam 1.4s linear infinite;
  will-change: transform;
}
.beam-red .beam-core::before { background-image: url("../assets/art/beam-red.png"); }
.leader-info {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  padding: 1.15rem 1.25rem 1.4rem;
  border-top: 3px solid #000;
  text-align: center;
}
.leader-name {
  margin: 0.3rem 0 0;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.2vw, 2.2rem);
  line-height: 1;
}
.leader-alias {
  margin: 0;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.8rem;
}
@media (hover: hover) {
  .leader:hover .leader-img { animation: jump 0.55s ease-out 1; }
}

.crew {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.25rem 1rem;
  margin-top: clamp(3rem, 7vw, 4.5rem);
}
.crew-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.1rem;
  font-size: 1rem;
}
.crew-count {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
}
.crew-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ghost {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  padding: 1.1rem 0.5rem 0.9rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0) 45%), #111114;
  box-shadow:
    inset 0 3px 0 var(--role),
    0 -3px 0 #000, 0 3px 0 #000, -3px 0 0 #000, 3px 0 0 #000;
  text-align: center;
}
/* 6-frame sprite: frame 0 is the clean monochrome face, 1-5 are glitch frames. */
.ghost-avatar {
  display: block;
  width: 80px;
  height: 80px;
  background: #222 url("../assets/team/unknown-glitch.png") 0 0 / 600% 100%;
  box-shadow: 0 0 0 3px #2c2c30, 0 0 0 5px #000;
}
.ghost-name {
  margin-top: 0.35rem;
  color: #d8d8d8;
  font-family: var(--display);
  font-size: 1.12rem;
  line-height: 1.1;
}
.ghost-id {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}
.ghost.is-glitching .ghost-avatar { animation: glitch-frames 0.5s steps(1, end) 1; }
.ghost.is-glitching .ghost-name { animation: glitch-text 0.5s steps(1, end) 1; }

@media (min-width: 640px) {
  .leaders { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crew-list { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
/* Admin (2) + Staff (3) share one 5-column row; inner gaps match so cards line up. */
@media (min-width: 1024px) {
  .crew { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .crew-group { grid-column: 1 / -1; }
  .crew-group.role-admin { grid-column: span 2; }
  .crew-group.role-staff { grid-column: span 3; }
  .crew-group.role-admin .crew-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crew-group.role-staff .crew-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Performance ---------- */
/* All animations stay on at all times (site owner request): no offscreen
   pausing and no low-end cutbacks. */

/* ---------- Reveal on scroll ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--d, 0s);
}
.js .reveal.is-in { opacity: 1; transform: none; }
.bento > .reveal:nth-child(2),
.ranks > .reveal:nth-child(2) { --d: 0.07s; }
.bento > .reveal:nth-child(3),
.ranks > .reveal:nth-child(3) { --d: 0.14s; }
.bento > .reveal:nth-child(4),
.ranks > .reveal:nth-child(4) { --d: 0.21s; }
.bento > .reveal:nth-child(5) { --d: 0.1s; }
.bento > .reveal:nth-child(6) { --d: 0.17s; }

/* ---------- 404 ---------- */
.subpage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 2rem 1rem;
  overflow: hidden;
  background: var(--sky);
  text-align: center;
}
.subpage-card {
  position: relative;
  z-index: 1;
  width: min(100%, 34rem);
  padding: clamp(1.75rem, 5vw, 2.75rem);
  background: rgba(13, 13, 16, 0.92);
  box-shadow:
    inset 3px 3px 0 rgba(255, 255, 255, 0.06),
    inset -3px -3px 0 rgba(0, 0, 0, 0.5),
    0 -3px 0 #000, 0 3px 0 #000, -3px 0 0 #000, 3px 0 0 #000;
}
.subpage .logo { font-size: clamp(4.5rem, 20vw, 8rem); }
.subpage h1.title {
  margin: 0.75rem 0 0;
  font-family: var(--display);
  font-size: clamp(1.6rem, 5vw, 2.2rem);
}
.subpage p { color: var(--muted); }
.lost-compass { width: 56px; height: 56px; animation: lost 2.4s steps(12, end) infinite; }
.subpage .hero-actions { margin-inline: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 359px) {
  .topbar-discord { display: none; }
}

@media (max-width: 400px) {
  .ip-action { padding: 0 0.95rem; }
  .ip-action-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

@media (max-width: 479px) {
  .eyebrow > span:first-child { flex-basis: 100%; }
}

@media (max-width: 559px) {
  .server-entry { grid-template-columns: auto minmax(0, 1fr); }
  .server-side { grid-column: 1 / -1; justify-self: start; }
  .server-icon { width: 48px; height: 48px; }
  .server-foot { justify-content: space-between; }
  .server-foot .server-checked { order: 3; flex-basis: 100%; }
  .tabs { flex-wrap: nowrap; gap: 0.9rem; }
  .tab { flex: 1 1 0; min-width: 0; justify-content: center; padding-inline: 0.5rem; }
  .tab-suffix { display: none; }
  .clouds { --cw: 1024px; }
  .clouds::before { animation-name: drift-sm; }
}

/* Single-column hero: keep clouds up behind the cube, away from body text. */
@media (max-width: 959px) {
  .clouds { top: calc(var(--topbar-h) + 0.5rem); }
}

@media (min-width: 640px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-hero,
  .tile-wide { grid-column: span 2; }
  .ranks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .perk-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 800px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1.2fr; }
}

@media (min-width: 860px) {
  .book { grid-template-columns: 1fr 1fr; }
  .page + .page { border-top: 0; }
  .page-left { box-shadow: inset -24px 0 28px -22px rgba(90, 55, 20, 0.6); }
  .page-right { box-shadow: inset 24px 0 28px -22px rgba(90, 55, 20, 0.6); }
}

@media (min-width: 900px) {
  .join-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.75rem; }
  .cta-box { grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr); }
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    gap: 2.5rem;
  }
  .hero-copy {
    align-items: flex-start;
    text-align: left;
  }
  .hero-copy .hero-logo { width: clamp(280px, 26vw, 400px); }
  .eyebrow,
  .hero-actions { justify-content: flex-start; }
  .hero-art {
    order: 0;
    min-height: 360px;
    padding: 2.5rem 0 0;
  }
  .sun { top: 9%; right: clamp(1.25rem, 3vw, 3rem); }
  .drop { display: block; }
  .community { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 4rem; }
}

@media (min-width: 1024px) {
  .topnav { display: block; margin-left: auto; }
  .topbar-actions { margin-left: 0.5rem; }
  .topbar-discord { width: auto; padding: 0.5rem 0.9rem 0.6rem; }
  .topbar-discord-label { display: inline; }
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tile-hero { grid-row: span 2; min-height: 100%; }
  .hotbar { display: none; }
  .xp {
    top: var(--topbar-h);
    bottom: auto;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    box-shadow: none;
    transform: none;
  }
  .xp::after { display: none; }
}

@media (max-width: 1023px) {
  .footer { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .toast { right: 50%; transform: translate(50%, calc(-100% - var(--topbar-h) - 24px)); }
  .toast.is-on { transform: translate(50%, 0); }
}

@media (min-width: 1100px) {
  .ranks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Animations are always on (site owner request): no prefers-reduced-motion cutbacks. */

/* ---------- Keyframes ---------- */
@keyframes drift { to { transform: translate3d(-1536px, 0, 0); } }
@keyframes drift-sm { to { transform: translate3d(-1024px, 0, 0); } }
@keyframes spin {
  from { transform: rotateX(-26deg) rotateY(-38deg); }
  to { transform: rotateX(-26deg) rotateY(322deg); }
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes shadow {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; }
  50% { transform: translateX(-50%) scale(0.8); opacity: 0.65; }
}
@keyframes item-spin { to { transform: rotateY(360deg); } }
@keyframes splash {
  from { transform: rotate(-14deg) scale(1); }
  to { transform: rotate(-14deg) scale(1.09); }
}
@keyframes glint {
  from { background-position: 150% 0; }
  to { background-position: -50% 0; }
}
@keyframes ping {
  0% { background: #5cff5c; }
  45% { background: #333; }
}
@keyframes blink { 50% { opacity: 0.25; } }
@keyframes regen {
  0%, 88% { transform: none; }
  92% { transform: translateY(-3px); }
}
@keyframes portal { to { background-position: 0 103.2258%; } }
@keyframes lost {
  0% { transform: rotate(0deg); }
  30% { transform: rotate(140deg); }
  55% { transform: rotate(80deg); }
  80% { transform: rotate(300deg); }
  100% { transform: rotate(360deg); }
}
@keyframes hit { 50% { transform: translateY(3px) scale(0.97); } }
@keyframes beam { to { transform: translateY(-64px); } }
@keyframes firefly {
  0% { opacity: 0; transform: translate(0, 0); }
  20% { opacity: 1; }
  45% { opacity: 0.35; transform: translate(10px, -14px); }
  70% { opacity: 1; transform: translate(-6px, -24px); }
  100% { opacity: 0; transform: translate(4px, -36px); }
}
@keyframes jump {
  0%, 100% { transform: none; }
  35% { transform: translateY(-20px); }
  70% { transform: none; }
  82% { transform: translateY(-3px); }
}
@keyframes glitch-frames {
  0% { background-position: 20% 0; }
  14% { background-position: 60% 0; }
  28% { background-position: 40% 0; }
  42% { background-position: 100% 0; }
  56% { background-position: 20% 0; }
  70% { background-position: 80% 0; }
  84% { background-position: 0 0; }
  92% { background-position: 60% 0; }
  100% { background-position: 0 0; }
}
@keyframes glitch-text {
  0% { transform: translateX(-2px); text-shadow: 2px 0 #ff2a6d, -2px 0 #05d9e8; }
  20% { transform: translateX(3px) skewX(-10deg); text-shadow: -3px 0 #ff2a6d, 3px 0 #05d9e8; }
  40% { transform: none; text-shadow: 1px 0 #ff2a6d, -1px 0 #05d9e8; }
  60% { transform: translateX(-3px); text-shadow: 3px 0 #ff2a6d, -3px 0 #05d9e8; }
  80% { transform: translateX(1px); text-shadow: none; }
  100% { transform: none; text-shadow: none; }
}
