/* EmeraldsMC SMP: one stylesheet, mobile first.
   Look: the EmeraldsMC join art. Night-time builds, pixel type,
   black panels with emerald pixel borders, a green block for the IP. */
:root {
  --bg: #07090d;
  --bg-2: #0d1117;
  --panel: #0b0e13;
  --panel-2: #121821;
  --line: #222b36;
  --text: #eef3f0;
  --muted: #a3b1aa;
  --em: #4ade5f;
  --em-2: #2fbf4a;
  --em-3: #1f8f35;
  --em-dark: #0f3d1d;
  --gold: #ffe14d;
  --red: #ff6b6b;
  --px: 3px;
  --pixel: "Tiny5", "Silkscreen", ui-monospace, monospace;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; font-synthesis: none; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1; }
a { color: var(--em); text-underline-offset: 3px; }
a:hover { color: #9cf5a8; }
img, svg { max-width: 100%; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }

/* pixel panel: black fill, emerald border, hard dark outline, bevel */
.panel, .card, .cmds > div, .table-wrap, .msg, .rank, .note {
  background: var(--panel);
  border: var(--px) solid var(--em-3);
  border-radius: 0;
  box-shadow: 0 0 0 var(--px) #000, inset 0 calc(var(--px) * -2) 0 rgba(0,0,0,.45), inset 0 var(--px) 0 rgba(255,255,255,.04);
}

/* header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(7,9,13,.92); backdrop-filter: blur(8px); border-bottom: var(--px) solid #000; box-shadow: 0 var(--px) 0 var(--em-dark); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 700 22px/1 var(--pixel); letter-spacing: .02em; white-space: nowrap; text-shadow: 2px 2px 0 #000; }
.brand img { width: 34px; height: 34px; flex: none; image-rendering: auto; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.8)); }
.brand small { color: var(--em); font-size: 22px; }
.brand:hover { color: #fff; }
.nav { display: flex; gap: 6px; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; font: 600 17px/1 var(--pixel); border: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; border-color: var(--line); background: var(--panel-2); }
.nav a.cta { color: #041a09; background: var(--em); border-color: #000; box-shadow: inset -3px -3px 0 var(--em-3), inset 3px 3px 0 #9cf5a8; text-shadow: none; }
.nav a.cta:hover { background: #7ff08f; }
/* 5 tabs: shrink step by step on phones; below 480px the logo shows only the gem */
@media (max-width: 680px) {
  .brand span.full { display: none; }
  .nav { gap: 3px; }
  .nav a { padding: 8px 8px; font-size: 16px; }
}
@media (max-width: 480px) {
  .top .wrap { gap: 8px; }
  .brand > span { display: none; }
  .brand img { width: 30px; height: 30px; }
  .nav a { padding: 7px 6px; font-size: 15px; }
}
@media (max-width: 370px) {
  .nav { gap: 1px; }
  .nav a { padding: 7px 4px; font-size: 13px; }
  .brand img { width: 26px; height: 26px; }
}

/* type */
h1, h2, h3, .pixel { font-family: var(--pixel); font-weight: 700; line-height: 1.12; letter-spacing: .01em; margin: 0 0 .5em; }
h1 { font-size: clamp(32px, 7.5vw, 56px); text-shadow: 3px 3px 0 #000; }
h2 { font-size: clamp(24px, 4.8vw, 34px); margin-top: 1.4em; text-shadow: 2px 2px 0 #000; }
h3 { font-size: 21px; margin-top: 1.2em; }
.g { color: var(--em); }
p { margin: 0 0 1em; }
.lead { font-size: 18px; color: #c9d4ce; }
.eyebrow { display: inline-block; font: 600 16px/1.2 var(--pixel); text-transform: uppercase; letter-spacing: .08em; color: var(--em); margin-bottom: 10px; text-shadow: 2px 2px 0 #000; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
code, kbd, .cmd {
  font-family: var(--mono); font-size: .9em;
  background: #000; border: 1px solid #2c3a2f;
  padding: 1px 6px; color: #9cf5a8; white-space: nowrap;
}

/* ---------- home hero ---------- */
.hero-art {
  position: relative; isolation: isolate;
  min-height: min(92vh, 760px);
  display: grid; place-items: center; text-align: center;
  padding: 56px 0 72px;
  background: #05070a url("/smp/assets/img/hero-spawn-sm.jpg") 55% 70% / cover no-repeat;
}
@media (min-width: 900px) { .hero-art { background-image: url("/smp/assets/img/hero-spawn.jpg"); } }
.hero-art::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(5,7,10,.55), rgba(5,7,10,.2) 75%),
    linear-gradient(180deg, rgba(7,9,13,.55) 0%, rgba(7,9,13,.1) 35%, rgba(7,9,13,.25) 75%, var(--bg) 100%);
}
.hero-art .wrap { display: flex; flex-direction: column; align-items: center; }
.logo-row { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 2.5vw, 22px); }
/* hero emerald: bobs and turns like a dropped Minecraft item. Stacked copies give it thickness. */
.gem-spin { --gs: clamp(64px, 15vw, 128px); display: block; flex: none; width: var(--gs); height: var(--gs); perspective: 700px;
  filter: drop-shadow(4px 4px 0 rgba(0,0,0,.7)); animation: bob 4s ease-in-out infinite; }
.gem-turn { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; animation: gem-spin 6.3s linear infinite; }
.gem-turn img, .gem-turn .in { position: absolute; inset: 0; width: 100%; height: 100%; transform: translateZ(calc(var(--z) * var(--gs) / 64)); }
/* inner layers: one flat green in the gem's shape, so the side reads as a smooth solid edge */
.gem-turn .in { display: block; background: #2a6e1c;
  -webkit-mask: url("/smp/assets/img/gem-256.png") center / 100% 100% no-repeat; mask: url("/smp/assets/img/gem-256.png") center / 100% 100% no-repeat; }
.gem-turn img.back { transform: translateZ(calc(var(--z) * var(--gs) / 64)) rotateY(180deg); }
@keyframes gem-spin { to { transform: rotateY(360deg); } }
.logo-row h1 { margin: 0; font-size: clamp(30px, 10.5vw, 96px); letter-spacing: .03em; text-shadow: 4px 4px 0 #000, 0 0 30px rgba(0,0,0,.6); }
.tagline { font: 700 clamp(16px, 3.6vw, 28px)/1.2 var(--pixel); color: var(--em); text-transform: uppercase; letter-spacing: .1em; margin: 14px 0 6px; text-shadow: 2px 2px 0 #000; }
.hero-sub { max-width: 620px; color: #dfe8e3; font-size: 17px; text-shadow: 0 2px 8px #000; margin: 6px 0 26px; }
@keyframes bob { 50% { transform: translateY(-6px); } }

/* big green IP block with a splash */
.ip-wrap { position: relative; display: inline-block; margin: 6px 0 18px; }
.ip-block {
  display: inline-flex; align-items: center; gap: 12px;
  font: 700 clamp(19px, 5vw, 32px)/1 var(--pixel); color: #fff; text-shadow: 3px 3px 0 #0b3d17;
  padding: 18px clamp(18px, 4vw, 34px); cursor: pointer;
  background:
    linear-gradient(45deg, rgba(255,255,255,.07) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.07) 75%) 0 0 / 12px 12px,
    linear-gradient(45deg, rgba(0,0,0,.08) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.08) 75%) 6px 6px / 12px 12px,
    var(--em-2);
  border: var(--px) solid #000;
  box-shadow: inset -5px -5px 0 var(--em-3), inset 5px 5px 0 #7ff08f, 0 8px 0 rgba(0,0,0,.5);
  transition: transform .08s;
}
.ip-block:hover { filter: brightness(1.08); }
.ip-block:active { transform: translateY(3px); box-shadow: inset -5px -5px 0 var(--em-3), inset 5px 5px 0 #7ff08f, 0 5px 0 rgba(0,0,0,.5); }
.ip-block .hint { font-size: .5em; color: #d9ffe0; text-shadow: 2px 2px 0 #0b3d17; border-left: 3px solid rgba(0,0,0,.25); padding-left: 12px; }
.ip-block.copied { color: #fff !important; }
.splash {
  position: absolute; right: -10px; top: -24px; pointer-events: none;
  font: 700 clamp(17px, 3.8vw, 26px)/1 var(--pixel); color: var(--gold); text-shadow: 3px 3px 0 #3f3800;
  transform: rotate(-14deg); animation: splash .9s ease-in-out infinite alternate; white-space: nowrap;
}
@keyframes splash { to { transform: rotate(-14deg) scale(1.1); } }

.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 14px; justify-content: center; align-items: center; margin-bottom: 22px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; background: rgba(0,0,0,.72); border: 2px solid #000; box-shadow: 0 0 0 2px var(--em-dark); font: 600 16px/1 var(--pixel); color: #fff; }
.pill .muted { color: var(--muted); }

/* ---------- inner page banners ---------- */
.banner {
  position: relative; isolation: isolate; padding: 54px 0 34px;
  background: #05070a center / cover no-repeat;
  border-bottom: var(--px) solid #000; box-shadow: 0 var(--px) 0 var(--em-dark);
  margin-bottom: 8px;
}
.banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7,9,13,.92) 0%, rgba(7,9,13,.7) 55%, rgba(7,9,13,.35) 100%), linear-gradient(180deg, transparent 60%, rgba(7,9,13,.8)); }
.banner.guide-b { background-image: url("/smp/assets/img/banner-guide.jpg"); }
.banner.store-b { background-image: url("/smp/assets/img/banner-store.jpg"); }
.banner.lost-b { background-image: url("/smp/assets/img/build-2.jpg"); }
.banner .lead { max-width: 640px; margin-bottom: 0; }
.banner h1 { margin-bottom: .35em; }
.banner .note { max-width: 640px; margin: 18px 3px 0; }
.banner .btns { margin-top: 18px; }

/* sections */
.hero { padding-top: 40px; padding-bottom: 8px; }
.section { padding-top: 28px; padding-bottom: 28px; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.sec-head h2 { margin: 0; }
.grid { display: grid; gap: 18px; }
@media (min-width: 640px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px) and (max-width: 899px) { .grid.three { grid-template-columns: 1fr 1fr; } }
.card { padding: 18px; }
.card h3 { margin-top: 0; }
a.card { display: flex; gap: 14px; align-items: flex-start; color: var(--text); text-decoration: none; transition: border-color .12s, transform .12s; }
a.card:hover { border-color: var(--em); transform: translateY(-3px); }
a.card p { color: var(--muted); margin: 0; font-size: 15px; }
a.card h3 { font-size: 20px; margin-bottom: 4px; }
/* inventory-slot icons */
.ico {
  flex: none; display: grid; place-items: center; width: 48px; height: 48px; font-size: 26px; line-height: 1;
  background: #8b8b8b; border: 2px solid #000;
  box-shadow: inset 3px 3px 0 #373737, inset -3px -3px 0 #ffffff;
}
.ico.dark { background: #1a222c; box-shadow: inset 3px 3px 0 #000, inset -3px -3px 0 #2f3b48; }

/* features (from the join art) */
.features { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .features { grid-template-columns: repeat(4, 1fr); } }
.feature { text-align: center; padding: 20px 16px; }
.feature .ft { font: 700 24px/1.1 var(--pixel); text-transform: uppercase; margin: 0 0 12px; padding-bottom: 12px; border-bottom: 3px solid var(--line); text-shadow: 2px 2px 0 #000; }
.feature .ft span { display: block; color: var(--em); }
.feature p { color: var(--muted); margin: 0; font-size: 15px; }

/* gallery of real builds */
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 6px 14px; margin: 0 -6px; -webkit-overflow-scrolling: touch; }
.gallery figure { margin: 0; scroll-snap-align: start; position: relative; border: var(--px) solid #000; box-shadow: 0 0 0 var(--px) var(--em-3); background: #000; }
.gallery img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.gallery figcaption { position: absolute; left: 0; bottom: 0; padding: 6px 10px; background: rgba(0,0,0,.75); font: 600 15px/1.2 var(--pixel); color: #fff; }
@media (min-width: 760px) {
  .gallery { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); grid-auto-columns: auto; overflow: visible; }
  .gallery figure:first-child { grid-column: span 2; grid-row: span 2; }
  .gallery figure:first-child img { height: 100%; aspect-ratio: auto; }
}

/* join box */
.join { display: grid; gap: 18px; }
@media (min-width: 700px) { .join { grid-template-columns: 1fr 1fr; } }
.addr { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.addr .ip { font: 600 18px/1.3 var(--mono); color: #9cf5a8; word-break: break-all; }
.tag { display: inline-block; font: 600 14px/1.2 var(--pixel); padding: 4px 8px; background: #000; border: 2px solid var(--em-dark); color: var(--em); }
.card .tag + h3 { margin-top: 12px; }

/* buttons: block style */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 18px; border: 2px solid #000; border-radius: 0;
  background: #6f6f6f; color: #fff; font: 600 18px/1 var(--pixel); text-shadow: 2px 2px 0 #3a3a3a;
  box-shadow: inset 3px 3px 0 #a8a8a8, inset -3px -3px 0 #4a4a4a;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: #7f8a99; color: #fff; box-shadow: inset 3px 3px 0 #b9c4d4, inset -3px -3px 0 #4f5866; }
.btn.primary { background: var(--em-2); text-shadow: 2px 2px 0 #0b3d17; box-shadow: inset 3px 3px 0 #7ff08f, inset -3px -3px 0 var(--em-3); }
.btn.primary:hover { background: #3fd45b; }
.btn:active { transform: translateY(1px); }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: inherit; }
.hero-art .btns { justify-content: center; }

/* status */
.status { display: flex; align-items: center; gap: 10px; font: 700 20px/1.2 var(--pixel); }
.dot { width: 12px; height: 12px; background: var(--muted); flex: none; box-shadow: 0 0 0 2px #000; }
.dot.on { background: var(--em); box-shadow: 0 0 0 2px #000, 0 0 10px rgba(74,222,95,.8); animation: pulse 1.6s steps(2) infinite; }
.dot.off { background: var(--red); }
@keyframes pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) {
  .dot.on, .splash, .gem-spin, .gem-turn { animation: none; }
  .gem-turn .in, .gem-turn img.back { display: none; }
  a.card:hover { transform: none; }
}
.players { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding: 0; list-style: none; }
.players li { display: flex; align-items: center; gap: 6px; background: #000; border: 2px solid var(--line); padding: 4px 10px 4px 4px; font-size: 14px; }
.players img { width: 24px; height: 24px; image-rendering: pixelated; background: var(--line); }

/* call to action strip */
.cta-strip { display: grid; gap: 16px; align-items: center; padding: 22px; }
@media (min-width: 760px) { .cta-strip { grid-template-columns: auto 1fr auto; } }
.cta-strip img { width: 72px; height: 72px; }
.cta-strip h2 { margin: 0 0 4px; }
.cta-strip p { margin: 0; color: var(--muted); }

/* guide */
.crumbs { font: 600 16px/1.2 var(--pixel); color: var(--muted); margin: 28px 0 10px; }
.crumbs a { color: var(--em); }
.guide h1 { font-size: clamp(30px, 6.5vw, 46px); }
.guide h2 { border-top: var(--px) solid var(--line); padding-top: .9em; color: #fff; }
.guide h2::before { content: "▸ "; color: var(--em); }
.guide ul { padding-left: 1.2em; }
.guide li { margin: .35em 0; }
.guide li::marker { color: var(--em); }
.cmds { display: grid; gap: 10px; margin: 12px 0 18px; padding: 0 3px; }
.cmds > div { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 12px; align-items: baseline; padding: 10px 12px; border-width: 2px; border-color: var(--line); box-shadow: 0 0 0 2px #000; }
.cmds > div code { justify-self: start; }
.cmds > div > * { min-width: 0; overflow-wrap: anywhere; }
.cmds > div code { white-space: normal; max-width: 100%; }
@media (max-width: 480px) { .cmds > div { grid-template-columns: 1fr; gap: 4px; } }
.note { padding: 12px 14px; margin: 18px 3px; border-color: var(--em-3); border-left-width: 8px; }
.note.warn { border-color: #b39a1a; }
.note.bad { border-color: #b33a3a; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin: 36px 0 8px; flex-wrap: wrap; }
.new-badge { font: 700 13px/1 var(--pixel); color: #2b2600; background: var(--gold); border: 2px solid #000; padding: 2px 6px; vertical-align: middle; margin-left: 6px; text-shadow: none; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 2px solid var(--line); }
th { color: var(--em); font: 600 15px/1.2 var(--pixel); text-transform: uppercase; letter-spacing: .05em; background: #000; }
tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 3px; }

/* store */
.steps { counter-reset: s; }
.step-h { display: flex; align-items: center; gap: 12px; }
.step-h::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; background: var(--em-2); border: 2px solid #000; box-shadow: inset 2px 2px 0 #7ff08f, inset -2px -2px 0 var(--em-3); color: #fff; font: 700 18px/1 var(--pixel); text-shadow: 2px 2px 0 #0b3d17; flex: none; }
.field { display: flex; gap: 10px; flex-wrap: wrap; }
.field input {
  flex: 1 1 200px; min-height: 48px; padding: 10px 14px; font: 500 17px/1.2 var(--mono);
  color: #fff; background: #000; border: 2px solid #5a5a5a; border-radius: 0;
  box-shadow: inset 2px 2px 0 #000;
}
.field input:focus { outline: 0; border-color: var(--em); }
.toggle { display: inline-flex; background: #000; border: 2px solid var(--line); padding: 4px; gap: 4px; }
.toggle button { min-height: 42px; padding: 8px 16px; border: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted); font: 600 18px/1 var(--pixel); cursor: pointer; }
.toggle button[aria-pressed="true"] { background: var(--em-2); border-color: #000; color: #fff; text-shadow: 2px 2px 0 #0b3d17; box-shadow: inset 2px 2px 0 #7ff08f, inset -2px -2px 0 var(--em-3); }
.ranks { display: grid; gap: 18px; grid-template-columns: 1fr; padding: 0 3px; }
@media (min-width: 560px) { .ranks { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .ranks { grid-template-columns: repeat(3, 1fr); } }
.rank { position: relative; padding: 18px 16px 16px; cursor: pointer; text-align: left; color: var(--text); font: inherit; width: 100%; border-color: var(--line); }
.rank::after { content: ""; position: absolute; right: 12px; top: 12px; width: 26px; height: 26px; background: url("/smp/assets/img/gem-64.png") center / contain no-repeat; opacity: .35; }
.rank:hover:not([disabled]) { border-color: var(--em-2); }
.rank[aria-checked="true"] { border-color: var(--em); background: #0d1f12; box-shadow: 0 0 0 var(--px) #000, 0 0 22px rgba(74,222,95,.25); }
.rank[aria-checked="true"]::after { opacity: 1; }
.rank[disabled] { opacity: .45; cursor: not-allowed; }
.rank .rname { font: 700 24px/1.1 var(--pixel); text-shadow: 2px 2px 0 #000; padding-right: 30px; }
.rank .price { font: 700 30px/1 var(--pixel); margin: 12px 0 2px; color: #fff; }
.rank .price small { font-size: 15px; color: var(--muted); }
.rank .was { text-decoration: line-through; color: var(--muted); font-size: 16px; margin-left: 6px; }
.rank ul { margin: 12px 0 0; padding-left: 1.1em; color: var(--muted); font-size: 14px; }
.rank li::marker { color: var(--em); }
.rank .why { color: var(--gold); font-size: 13px; margin-top: 8px; }
.msg { padding: 12px 14px; border-color: var(--line); border-width: 2px; box-shadow: 0 0 0 2px #000; }
.msg.ok { border-color: var(--em); }
.msg.err { border-color: var(--red); }
.hidden { display: none !important; }
#paypal-area { max-width: 420px; }
.steps > .card, .steps > .toggle { margin-left: 3px; margin-right: 3px; }

/* footer */
.foot { border-top: var(--px) solid #000; box-shadow: 0 calc(var(--px) * -1) 0 var(--em-dark); margin-top: 56px; padding: 26px 0 34px; color: var(--muted); font-size: 14px; background: #040507; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between; align-items: center; }
.foot .fbrand { display: flex; align-items: center; gap: 8px; font: 700 18px/1 var(--pixel); color: #fff; }
.foot .fbrand img { width: 24px; height: 24px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--em); }
.foot .small { flex-basis: 100%; }
.copied { color: var(--em) !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* guide search */
.gsearch { margin: 18px 3px 0; max-width: 640px; }
.gsearch.mini { margin: 0 3px 18px; max-width: none; }
.gs-label { display: block; font: 600 16px/1.2 var(--pixel); color: var(--em); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; text-shadow: 2px 2px 0 #000; }
.gsearch.mini .gs-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.gs-row { display: flex; gap: 8px; }
.gs-row input {
  flex: 1 1 auto; min-width: 0; min-height: 48px; padding: 10px 14px; font: 500 17px/1.2 var(--body);
  color: #fff; background: #000; border: 2px solid #5a5a5a; border-radius: 0; box-shadow: inset 2px 2px 0 #000;
  -webkit-appearance: none; appearance: none;
}
.gs-row input:focus { outline: 0; border-color: var(--em); }
.gs-row .btn { flex: none; }
.gs-results { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.gs-results:empty { display: none; }
.gs-results a { display: block; padding: 10px 12px; background: var(--panel); border: 2px solid var(--line); box-shadow: 0 0 0 2px #000; color: var(--text); text-decoration: none; }
.gs-results a:hover, .gs-results a:focus, .gs-results a[aria-selected="true"] { border-color: var(--em); outline: 0; }
.gs-results strong { color: #fff; }
.gs-page { display: inline-block; margin-left: 8px; font: 600 13px/1.4 var(--pixel); color: var(--em); text-transform: uppercase; letter-spacing: .04em; }
.gs-snip { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.gs-empty { padding: 10px 12px; color: var(--muted); border: 2px dashed var(--line); }
.quick { list-style: none; padding: 0 3px; margin: 12px 0 0; display: grid; gap: 6px 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .quick { grid-template-columns: 1fr 1fr; } }
.quick li { padding: 6px 0; border-bottom: 2px solid var(--line); }
.quick a { font-weight: 600; }
.quick span { display: block; color: var(--muted); font-size: 13px; }

/* guide pictures: real screenshots and drawn diagrams */
.shot { margin: 18px 0 22px; }
.shot img, .shot svg { display: block; width: 100%; height: auto; border: var(--px) solid #000; box-shadow: 0 0 0 var(--px) var(--em-3); background: #000; }
.shot svg { background: var(--panel-2); max-width: 560px; }
.shot img.art { max-width: 960px; }
.shot figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); line-height: 1.45; }
.shot figcaption strong { color: var(--text); }

/* crate-opening animations (12-frame strips, see assets/js/crates.js) */
.crate { display: grid; grid-template-columns: 1fr; gap: 4px 20px; margin: 22px 0 8px; }
.crate-info > h3 { margin-top: 6px; }
.crate-anim { display: block; width: 144px; max-width: 100%; aspect-ratio: 1; padding: 0; cursor: pointer; border: var(--px) solid #000; box-shadow: 0 0 0 var(--px) var(--em-3); background: #000 0 0 / 1200% 100% no-repeat; }
.crate-anim img { display: block; width: 100%; height: 100%; }
.crate-anim.ready { background-position: 100% 0; }
.crate-anim.ready img { visibility: hidden; }
.crate-anim.play { animation: crate-open 1.5s steps(12, jump-none) both; }
.crate-anim:focus-visible { outline: 3px solid var(--em-2); outline-offset: 3px; }
@keyframes crate-open { from { background-position: 0 0; } to { background-position: 100% 0; } }
@media (min-width: 640px) {
  .crate { grid-template-columns: 168px minmax(0, 1fr); align-items: start; }
  .crate-anim { width: 168px; }
  .crate-info > h3 { margin-top: 0; }
}

/* crate odds: every reward + % chance. Inline <details> everywhere; on desktop crates.js
   also shows the same list as a Minecraft-tooltip popover while you hover the crate. */
.odds { margin: -6px 3px 18px; }
.odds > summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; padding: 8px 12px; background: var(--panel-2); border: 2px solid #000; box-shadow: 0 0 0 2px var(--em-dark); font: 600 16px/1 var(--pixel); color: var(--em); user-select: none; }
.odds > summary::-webkit-details-marker { display: none; }
.odds > summary::before { content: "▸"; color: var(--muted); transition: transform .12s; }
.odds[open] > summary::before { transform: rotate(90deg); }
.odds > summary:hover { color: #fff; }
.odds > summary:focus-visible { outline: 3px solid var(--em-2); outline-offset: 3px; }
.odds-n { color: var(--muted); }
.odds-body { margin-top: 10px; padding: 12px 14px; background: rgba(16, 0, 16, .94); border: 2px solid #100010; box-shadow: inset 0 0 0 2px #3d0f86, 0 0 0 2px #000; }
.odds-title { margin: 0 0 8px; font: 700 18px/1.1 var(--pixel); color: #fff; text-shadow: 2px 2px 0 #000; }
.odds-list { list-style: none; margin: 0; padding: 0; font-size: 15px; line-height: 1.3; }
.odds-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 3px 0 3px 10px; border-left: 2px solid var(--rar, var(--line)); }
.odds-list li.o-group { margin-top: 10px; padding: 4px 0 4px 8px; border-left-width: 4px; background: rgba(255,255,255,.04); font: 700 15px/1 var(--pixel); text-transform: uppercase; letter-spacing: .04em; }
.odds-list li.o-group:first-child { margin-top: 0; }
.o-group .o-name, .o-group .o-pct { color: var(--rar, #fff); }
.o-name { color: var(--text); overflow-wrap: anywhere; }
.o-pct { font: 600 14px/1 var(--mono); color: #fff; text-align: right; min-width: 4.5ch; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.r-common { --rar: #d8d8d8; }
.r-uncommon { --rar: #55ff55; }
.r-rare { --rar: #55ffff; }
.r-epic { --rar: #ff77ff; }
.r-legendary { --rar: #ffaa00; }
.r-exclusive { --rar: #ff5555; }
.odds-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
/* the desktop hover popover (built by crates.js from the list above) */
.crate { position: relative; }
.odds-pop { position: absolute; z-index: 15; left: 188px; top: 0; width: min(400px, calc(100% - 188px)); max-height: min(640px, calc(100vh - 120px)); overflow: auto; overscroll-behavior: contain; margin: 0; background: #120212; box-shadow: inset 0 0 0 2px #3d0f86, 0 0 0 2px #000, 0 12px 28px rgba(0,0,0,.7); opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity .12s, transform .12s, visibility 0s .12s; pointer-events: none; }
.odds-pop.show { opacity: 1; visibility: visible; transform: none; transition: opacity .12s, transform .12s; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .odds-pop, .odds-pop.show { transition: none; transform: none; } }
.dg-t { font-family: var(--pixel); fill: #fff; }
.dg-s { font-family: var(--body); fill: var(--muted); }
/* vote page */
.banner.vote-b { background-image: url("/smp/assets/img/build-1.jpg"); }
.vote-steps { display: grid; gap: 22px; }
.vh { margin: 0 0 8px; font-size: clamp(21px, 4.4vw, 26px); }
.vote-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.vote-count { font: 600 17px/1 var(--pixel); color: var(--em); }
.vote-bar { height: 12px; background: #000; border: 2px solid var(--em-dark); margin: 6px 0 14px; }
.vote-bar span { display: block; height: 100%; width: 0; background: var(--em); box-shadow: inset 0 -3px 0 var(--em-3); transition: width .25s steps(5); }
.vote-sites { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.vote-sites a { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 12px; background: var(--panel-2); border: 2px solid var(--line); box-shadow: 0 0 0 2px #000; color: var(--text); text-decoration: none; }
.vote-sites a:hover { border-color: var(--em); color: #fff; }
.vs-n { display: grid; place-items: center; width: 34px; height: 34px; flex: none; background: #000; border: 2px solid var(--em-3); font: 700 18px/1 var(--pixel); color: var(--em); }
.vs-name { flex: 1; font-weight: 600; min-width: 0; }
.vs-go { flex: none; padding: 8px 14px; font: 600 16px/1 var(--pixel); color: #fff; background: var(--em-2); text-shadow: 2px 2px 0 #0b3d17; box-shadow: inset 3px 3px 0 #7ff08f, inset -3px -3px 0 var(--em-3); }
.vote-sites a.done { opacity: .72; }
.vote-steps > *, .vote-sites a { min-width: 0; }
.vote-sites a { overflow-wrap: anywhere; }
.vote-sites a.done .vs-n { background: var(--em-2); color: #fff; border-color: #000; }
.vote-sites a.done .vs-go { background: transparent; box-shadow: none; text-shadow: none; color: var(--em); padding-right: 2px; }
.vote-done { margin-top: 14px; padding: 12px 14px; border: 3px solid var(--em); background: var(--em-dark); font: 600 17px/1.3 var(--pixel); color: #fff; }
.vote-foot { margin: 14px 0 0; }
.linkish { background: none; border: 0; padding: 0; color: var(--em); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: end; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 6px 12px; text-align: center; background: var(--panel); border: var(--px) solid var(--em-3); box-shadow: 0 0 0 var(--px) #000; min-width: 0; }
.pod img { height: 120px; width: auto; image-rendering: pixelated; filter: drop-shadow(3px 3px 0 rgba(0,0,0,.6)); }
.pod-1 { order: 2; padding-top: 22px; border-color: var(--gold); }
.pod-1 img { height: 150px; }
.pod-2 { order: 1; }
.pod-3 { order: 3; }
.pod-place { font: 700 22px/1 var(--pixel); color: var(--em); text-shadow: 2px 2px 0 #000; }
.pod-1 .pod-place { color: var(--gold); font-size: 26px; }
.pod-name { font-weight: 700; max-width: 100%; overflow-wrap: anywhere; line-height: 1.25; }
.pod-votes { color: var(--muted); font-size: 14px; }
.lb-list { list-style: none; counter-reset: lb 3; margin: 16px 0 0; padding: 0; display: grid; gap: 6px; }
.lb-list li { counter-increment: lb; display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--panel); border: 2px solid var(--line); }
.lb-list li::before { content: "#" counter(lb); font: 700 17px/1 var(--pixel); color: var(--muted); width: 34px; flex: none; }
.lb-name { flex: 1; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.lb-votes { color: var(--muted); font-size: 14px; flex: none; }
.lb-empty { text-align: center; padding: 26px 18px; }
.lb-empty .pixel { font-size: 22px; color: var(--em); margin-bottom: 8px; }
@media (max-width: 420px) { .pod img { height: 96px; } .pod-1 img { height: 120px; } .pod-name { font-size: 14px; } }
.lb-note { margin-top: 14px; }

/* ---------- videos ---------- */
.banner.videos-b { background-image: url("/smp/assets/img/build-3.jpg"); }
.vbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.vcats, .vsort { display: flex; flex-wrap: wrap; gap: 8px; }
.vcats button, .vsort button {
  font: 600 16px/1 var(--pixel); color: #fff; cursor: pointer; padding: 9px 12px; min-height: 40px;
  background: #6f6f6f; border: 2px solid #000; text-shadow: 2px 2px 0 #3a3a3a;
  box-shadow: inset 3px 3px 0 #a8a8a8, inset -3px -3px 0 #4a4a4a;
}
.vcats button:hover, .vsort button:hover { background: #7f8a99; }
.vcats button[aria-pressed="true"], .vsort button[aria-pressed="true"] {
  background: var(--em-2); text-shadow: 2px 2px 0 #0b3d17; box-shadow: inset 3px 3px 0 #7ff08f, inset -3px -3px 0 var(--em-3);
}
.vc-n { display: inline-block; min-width: 1.6em; padding: 2px 4px; margin-left: 2px; background: rgba(0,0,0,.35); text-shadow: none; font-size: 13px; }
.vsort button { font-size: 14px; padding: 8px 10px; min-height: 36px; }

/* swipeable row of cards */
.vrail-wrap { position: relative; }
.vrail {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(64vw, 236px); gap: 16px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding: 0 6px;
  list-style: none; margin: 0 -6px; padding: 8px 6px 18px; -webkit-overflow-scrolling: touch;
  scrollbar-color: var(--em-3) #000;
}
.vrail li { scroll-snap-align: start; display: flex; }
.vnav {
  position: absolute; top: calc(50% - 30px); z-index: 2; width: 44px; height: 56px; display: none;
  font: 700 18px/1 var(--pixel); color: #fff; cursor: pointer; background: #6f6f6f; border: 2px solid #000;
  box-shadow: inset 3px 3px 0 #a8a8a8, inset -3px -3px 0 #4a4a4a, 0 4px 0 rgba(0,0,0,.6);
}
.vnav.prev { left: -14px; } .vnav.next { right: -14px; }
.vnav:hover { background: #7f8a99; }
.vnav:disabled { opacity: 0; pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .vnav:not([hidden]) { display: block; } }
.vnote { margin: 4px 0 0; }

/* the card: a Minecraft inventory window with the thumbnail in a slot */
.vcard {
  display: flex; flex-direction: column; width: 100%; padding: 9px 9px 10px; gap: 8px;
  background: #c6c6c6; border: 3px solid #000; color: #3f3f3f; text-decoration: none;
  box-shadow: inset 3px 3px 0 #fff, inset -3px -3px 0 #555, 0 6px 0 rgba(0,0,0,.45);
  transition: transform .12s;
}
.vcard:hover, .vcard:focus-visible { color: #3f3f3f; transform: translateY(-4px); }
.vcard:focus-visible { outline: 3px solid var(--em); outline-offset: 3px; }
.vthumb {
  position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden; background: #8b8b8b;
  border: 3px solid; border-color: #373737 #fff #fff #373737;
}
.vthumb img { display: block; width: 100%; height: 100%; object-fit: cover; background: #222; }
.vthumb::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,0); transition: background .12s; }
.vcard:hover .vthumb::after { background: rgba(255,255,255,.18); }
.vplay {
  position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; z-index: 1;
  background: rgba(0,0,0,.72); border: 3px solid #000; box-shadow: inset 0 0 0 3px var(--em-3);
}
.vplay::before { content: ""; position: absolute; left: 19px; top: 13px; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff; }
.vcard:hover .vplay { box-shadow: inset 0 0 0 3px var(--em); }
.vbadge, .vnew {
  position: absolute; top: 8px; z-index: 1; padding: 4px 7px; font: 600 14px/1 var(--pixel);
  background: rgba(16,0,16,.92); box-shadow: inset 0 0 0 2px #2b0a5c; text-shadow: 2px 2px 0 #3f3f00;
}
.vbadge { left: 8px; color: var(--gold); }
.vnew { right: 8px; color: #55ff55; text-shadow: 2px 2px 0 #153f15; }
.vtitle {
  font: 600 16px/1.2 var(--pixel); color: #3f3f3f; min-height: 2.4em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vmeta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; font: 600 13px/1.2 var(--pixel); color: #555; }
.vcat { color: #1e6b2a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vmeta time { flex: none; }

/* player */
html.vp-lock { overflow: hidden; }
.vplayer {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 10px 12px;
  border: 0; background: rgba(5,7,10,.97); color: var(--text); overscroll-behavior: contain;
}
.vplayer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; }
.vplayer::backdrop { background: rgba(0,0,0,.75); }
.vp-top { display: flex; align-items: center; gap: 12px; max-width: 760px; width: 100%; margin: 0 auto; }
.vp-count { font: 600 16px/1 var(--pixel); color: var(--muted); }
.vp-yt { margin-left: auto; font: 600 15px/1 var(--pixel); }
.vp-x, .vp-nav {
  flex: none; width: 46px; height: 46px; font: 700 18px/1 var(--pixel); color: #fff; cursor: pointer;
  background: #6f6f6f; border: 2px solid #000; box-shadow: inset 3px 3px 0 #a8a8a8, inset -3px -3px 0 #4a4a4a;
}
.vp-x:hover, .vp-nav:hover { background: #7f8a99; }
.vp-nav:disabled { opacity: .35; cursor: default; }
.vp-stage { display: grid; place-items: center; min-height: 0; }
.vp-frame {
  width: min(100%, calc((100dvh - 150px) * 9 / 16)); aspect-ratio: 9 / 16; background: #000;
  border: 3px solid #000; box-shadow: 0 0 0 3px var(--em-3), 0 12px 40px rgba(0,0,0,.7);
}
.vp-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.vp-bot { display: flex; align-items: center; gap: 12px; max-width: 760px; width: 100%; margin: 0 auto; }
.vp-title { flex: 1; margin: 0; text-align: center; font: 600 16px/1.25 var(--pixel); color: #fff; }
@media (max-width: 480px) { .vp-title { font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { .vcard, .vcard .vthumb::after { transition: none; } .vcard:hover { transform: none; } }
