:root {
  --green: #3c8527;
  --green-bright: #6cc349;
  --green-hover: #2d6b1e;
  --green-light: #86d562;
  --header: #262423;
  --ink: #262423;
  --panel: #2b2a29;
  --bg: #111110;
  --bg-2: #1b1a19;
  --cream: #d0c6bc;
  --text: #f4f1ee;
  --muted: #b1aaa3;
  --line: rgba(255, 255, 255, 0.08);
  --header-h: 48px;
  --font: "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-ten: "MinecraftTenv2", "MinecraftTen", var(--font);
  --font-seven: "MinecraftSeven", var(--font);
  --dig: #e7d184;
  --dig-text: #3d2b1f;
}

@font-face {
  font-family: "MinecraftTenv2";
  src: url("/fonts/Minecraft-Tenv2.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MinecraftTen";
  src: url("/fonts/MinecraftTen.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "MinecraftSeven";
  src: url("/fonts/Minecraft-Seven_v2.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--green-bright);
  text-decoration: none;
}

a:hover {
  color: var(--green-light);
}

button,
input {
  font: inherit;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 80;
  background: var(--green);
  color: #fff;
  padding: 8px 12px;
  font-weight: 800;
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

.wrap {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  max-height: var(--header-h);
  overflow: hidden;
  background: var(--header);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header-inner {
  height: 100%;
  max-height: 100%;
  width: min(1440px, calc(100% - 32px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
}

.brand-cube {
  width: 30px;
  height: 30px;
  display: block;
  flex-shrink: 0;
  overflow: hidden;
}

.brand-cube-top {
  transform-box: view-box;
  transform-origin: 32px 27px; /* center of the green top face */
  animation: brand-cube-press 2.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes brand-cube-press {
  0%,
  14% {
    transform: translate(0, 0) scale(1);
  }
  26%,
  40% {
    /* nudge up slightly while shrinking into the green top */
    transform: translate(0, -2px) scale(0.84);
  }
  52% {
    transform: translate(0, 0.5px) scale(1.02);
  }
  60%,
  100% {
    transform: translate(0, 0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-cube-top {
    animation: none;
  }
}

.brand-footer .brand-cube {
  width: 36px;
  height: 36px;
}

.brand-word {
  font-family: "MinecraftTen", "MinecraftTenv2", var(--font);
  font-size: 24px;
  font-weight: normal;
  letter-spacing: 0.02em;
  line-height: 1;
}

.brand-start {
  color: #fff;
}

.brand-mc {
  color: var(--green-bright);
}

.primary-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.nav-trigger,
.nav-link {
  appearance: none;
  background: none;
  border: 0;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.nav-trigger:hover,
.nav-link:hover,
.nav-item.is-open .nav-trigger {
  color: var(--green-light);
}

.nav-new {
  display: inline-block;
  margin-left: 2px;
  padding: 0 5px 1px;
  background: var(--green);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.5;
  border: 2px solid #1b1b1b;
  box-shadow: inset 1px 1px 0 #8bc34a, inset -1px -1px 0 #2d5016;
  vertical-align: 1px;
}

.mc-picker {
  position: fixed;
  z-index: 80;
  width: 232px;
  padding: 12px;
  display: grid;
  gap: 10px;
  background: var(--panel);
  border: 3px solid #1b1b1b;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.45);
  image-rendering: pixelated;
}

.mc-picker[hidden] {
  display: none;
}

.mc-picker-sv-wrap,
.mc-picker-hue-wrap {
  position: relative;
  border: 3px solid #1b1b1b;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.35);
  cursor: crosshair;
  touch-action: none;
}

.mc-picker-sv-wrap {
  height: 176px;
}

.mc-picker-hue-wrap {
  height: 18px;
  cursor: pointer;
}

.mc-picker-sv,
.mc-picker-hue {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.mc-picker-sv-thumb,
.mc-picker-hue-thumb {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #1b1b1b;
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: transparent;
}

.mc-picker-hue-thumb {
  top: 50%;
  height: 16px;
  width: 10px;
  transform: translate(-50%, -50%);
}

.mc-picker-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.mc-picker-swatch {
  width: 28px;
  height: 28px;
  border: 3px solid #1b1b1b;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
}

.mc-picker-hex {
  appearance: none;
  width: 100%;
  min-height: 32px;
  padding: 4px 8px;
  border: 3px solid #1b1b1b;
  background: #1b1a19;
  color: var(--cream);
  font-family: var(--font-seven);
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mc-picker-hex:focus {
  outline: 2px solid var(--green-bright);
  outline-offset: -2px;
}

.mega-inner-links .nav-new {
  margin-left: 6px;
  vertical-align: 2px;
}

.chevron {
  width: 10px;
  height: 7px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mc-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 18px;
  background: #7c7c7c;
  color: #fff;
  font-family: var(--font-seven);
  font-size: 16px;
  font-weight: normal;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #3f3f3f;
  border: 3px solid #1b1b1b;
  box-shadow:
    inset 3px 3px 0 #c6c6c6,
    inset -3px -3px 0 #555;
  cursor: pointer;
  text-decoration: none;
  image-rendering: pixelated;
  transform: scale(1);
  transform-origin: center;
  transition:
    transform 0.14s cubic-bezier(0.34, 1.4, 0.64, 1),
    background 0.12s ease,
    box-shadow 0.12s ease,
    color 0.12s ease,
    text-shadow 0.12s ease;
}

.mc-btn:hover,
.mc-btn.is-on,
a.mc-btn:hover {
  background: #548c2a;
  color: #fff;
  text-shadow: 2px 2px 0 #2b4a14;
  box-shadow:
    inset 3px 3px 0 #8bc34a,
    inset -3px -3px 0 #2d5016;
  transform: scale(0.96);
}

.mc-btn:active {
  box-shadow:
    inset -3px -3px 0 #8bc34a,
    inset 3px 3px 0 #2d5016;
  transform: scale(0.92);
  transition-duration: 0.06s;
}

.mc-btn--green,
.mc-btn--green:hover,
a.mc-btn--green,
a.mc-btn--green:hover {
  background: var(--green);
  color: #fff;
  text-shadow: 2px 2px 0 #2b4a14;
  box-shadow:
    inset 3px 3px 0 #8bc34a,
    inset -3px -3px 0 #2d5016;
}

.mc-btn--green.mc-btn--sm,
.mc-btn--green.mc-btn--sm:hover {
  box-shadow:
    inset 2px 2px 0 #8bc34a,
    inset -2px -2px 0 #2d5016;
}

.mc-btn--green:hover {
  background: var(--green-hover);
}

.mc-btn--sm {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 13px;
  border-width: 2px;
  box-shadow:
    inset 2px 2px 0 #c6c6c6,
    inset -2px -2px 0 #555;
}

.mc-btn--sm:hover,
.mc-btn--sm.is-on {
  box-shadow:
    inset 2px 2px 0 #8bc34a,
    inset -2px -2px 0 #2d5016;
}

.mc-btn--lg {
  min-height: 52px;
  padding: 12px 28px;
  font-size: 20px;
  border-width: 4px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-btn svg {
  width: 22px;
  height: 22px;
}

.menu-toggle {
  display: none;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  margin: 3px 0;
}

.mega {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--header-h);
  z-index: 60;
  background: #1f1e1d;
  border-top: 1px solid var(--line);
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.35);
}

.mega-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 36px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
}

.mega-kicker {
  margin: 0 0 6px;
  color: var(--green-bright);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mega-copy h2 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.mega-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.mega-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.mega-tile {
  position: relative;
  min-height: 118px;
  overflow: hidden;
  color: #fff;
  background: #111;
}

.mega-tile img {
  width: 100%;
  height: 118px;
  object-fit: cover;
  filter: brightness(0.72);
}

.mega-tile span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mega-tile span img {
  width: 22px;
  height: 22px;
  filter: none;
  object-fit: contain;
}

.mega-tile:hover img:first-child {
  filter: brightness(0.9);
}

.mega-inner-list {
  grid-template-columns: 1fr;
  display: grid;
  gap: 12px;
}

.mega-inner-links {
  grid-template-columns: repeat(4, 1fr);
  display: grid;
  gap: 12px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 36px;
}

.mega-inner-links a {
  display: grid;
  gap: 6px;
  padding: 18px 16px;
  background: #161514;
  border: 2px solid #1b1b1b;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25);
  color: #fff;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}

.mega-inner-links a:hover {
  background: #1f1e1d;
  color: #fff;
  transform: scale(0.98);
}

.mega-inner-links strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.mega-inner-links span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.mega-inner-list a {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  align-items: center;
  color: #fff;
  background: #161514;
}

.mega-inner-list img {
  width: 160px;
  height: 90px;
  object-fit: cover;
}

.mega-inner-list strong {
  display: block;
  font-size: 16px;
}

.mega-inner-list span {
  color: var(--muted);
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

/* Prevent home flash before app.js routes (html[data-page] set in <head>). */
html[data-page="jars"] #hero,
html[data-page="jars"] #platform-band,
html[data-page="jars"] #how,
html[data-page="jars"] #skin-editor-page,
html[data-page="jars"] #block-gradients-page,
html[data-page="skin-editor"] #hero,
html[data-page="skin-editor"] #platform-band,
html[data-page="skin-editor"] #how,
html[data-page="skin-editor"] #jars-page,
html[data-page="skin-editor"] #block-gradients-page,
html[data-page="block-gradients"] #hero,
html[data-page="block-gradients"] #platform-band,
html[data-page="block-gradients"] #how,
html[data-page="block-gradients"] #jars-page,
html[data-page="block-gradients"] #skin-editor-page,
html[data-page="home"] #jars-page,
html[data-page="home"] #skin-editor-page,
html[data-page="home"] #block-gradients-page {
  display: none !important;
}

html[data-page="jars"] #jars-page {
  display: block !important;
}

html[data-page="skin-editor"] #skin-editor-page {
  display: flex !important;
}

html[data-page="block-gradients"] #block-gradients-page {
  display: block !important;
}

.mobile-panel {
  display: none;
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  background: var(--ink);
  padding: 16px 20px 24px;
  gap: 12px;
}

.mobile-panel a {
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(10, 10, 10, 0.86);
  padding: 100px 20px 40px;
}

.search-box {
  width: min(720px, 100%);
  margin: 0 auto 20px;
  display: flex;
  gap: 8px;
  background: var(--ink);
  border: 2px solid var(--green);
}

.search-box input {
  flex: 1;
  background: transparent;
  border: 0;
  color: #fff;
  padding: 16px 18px;
  outline: none;
}

.search-results {
  width: min(720px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 8px;
}

.search-hit {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--panel);
  color: #fff;
}

.search-hit img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

/* Hero */
.hero {
  position: relative;
  width: 100%;
  height: max(380px, calc(100vw * 1470 / 3440));
  overflow: hidden;
  background: #78b8e8;
}

.hero-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-scene picture {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: auto;
}

.hero-bg {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  object-fit: unset;
  object-position: 50% 0%;
}

.hero-scene::after {
  display: none;
}

.hero-center {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px 8vh;
}

.hero-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.header-actions .mc-btn--sm {
  min-height: 30px;
  padding: 4px 12px;
  font-size: 14px;
}

.hero-pixel {
  margin: 0 0 12px;
  color: #fff;
  font-family: var(--font-ten);
  font-size: clamp(36px, 5.4vw, 72px);
  font-weight: normal;
  letter-spacing: -0.015em;
  text-transform: none;
  text-shadow: rgb(93, 100, 122) 0 4px 0;
  line-height: 1;
  white-space: nowrap;
}

.hero-lead {
  margin: 0 0 28px;
  max-width: 28em;
  color: #fff;
  font-size: clamp(15px, 1.7vw, 18px);
  font-weight: 600;
  line-height: 1.4;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.hero-word {
  display: inline-block;
  margin-inline: 0.08em;
  animation: hero-bounce 0.75s cubic-bezier(0.34, 1.4, 0.64, 1) both;
  animation-delay: calc(var(--i) * 0.32s + 0.15s);
}

@keyframes hero-bounce {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.92);
  }
  55% {
    opacity: 1;
    transform: translateY(-10px) scale(1.04);
  }
  75% {
    transform: translateY(3px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.platform-band {
  padding: 40px 0 56px;
  background: var(--ink);
  border-top: 1px solid var(--line);
}

.platform-lead {
  max-width: 920px;
  margin: 0 0 24px;
  color: var(--cream);
  font-size: 15px;
  line-height: 1.65;
}

.platform-lead a {
  color: var(--green-light);
}

.platform-picker {
  display: grid;
  grid-template-columns: minmax(220px, 1.05fr) repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.platform-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  padding: 14px 18px;
  background: #3a3938;
  color: #fff;
  text-decoration: none;
  border: 2px solid #1b1b1b;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25);
  transition: background 0.15s ease, transform 0.15s ease;
}

.platform-tile:hover {
  background: #454443;
  color: #fff;
}

.platform-tile-main {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.platform-tile-main img {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  image-rendering: pixelated;
}

.platform-tile-label {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
}

.platform-tile-arrow {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--green-light);
}

.platform-tile--primary {
  grid-row: span 2;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 154px;
  background: var(--green);
  border-color: #1f3f12;
  box-shadow: inset 0 -4px 0 #2d5016;
}

.platform-tile--primary:hover {
  background: var(--green-hover);
}

.platform-tile--primary .platform-tile-main {
  flex-direction: column;
  gap: 16px;
}

.platform-tile--primary .platform-tile-icon {
  width: 56px;
  height: 56px;
  color: #fff;
}

.platform-tile--primary .platform-tile-label {
  font-size: 15px;
  letter-spacing: 0.06em;
}

.platform-tile--primary .platform-tile-arrow {
  display: none;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.band {
  padding: 40px 0 48px;
  background:
    url("/images/ui/particles.png") center top / 720px repeat,
    var(--bg-2);
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.game-card {
  color: #fff;
  background: transparent;
}

.game-card .art {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #000;
}

.game-card .art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.game-card:hover .art img {
  transform: scale(1.04);
}

.game-card .badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  width: 36px;
  height: 36px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.45);
  padding: 4px;
}

.game-card h3 {
  margin: 12px 0 4px;
  font-size: 20px;
  font-weight: 800;
}

.game-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.game-card .latest {
  display: block;
  margin-top: 8px;
  color: var(--green-light);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Jars page */
.jars-page {
  background: var(--bg);
  padding-bottom: 72px;
}

.jars-hero {
  padding: 40px 0 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}

.jars-hero h1 {
  margin: 0 0 12px;
  font-family: var(--font-ten);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: normal;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--jar-accent, #fff);
  text-shadow: 2px 2px 0 color-mix(in srgb, var(--jar-accent, var(--green)) 45%, #000);
}

.jars-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.jars-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  gap: 24px;
  align-items: start;
}

.jars-rail {
  display: grid;
  gap: 14px;
  position: sticky;
  top: calc(var(--header-h) + 16px);
}

.jars-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.jars-list {
  display: grid;
  gap: 8px;
}

.jar-chip {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 12px 14px;
  background: #3a3938;
  color: #fff;
  border: 2px solid #1b1b1b;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25);
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  transition: background 0.15s ease, transform 0.15s ease;
}

.jar-chip:hover {
  background: #454443;
}

.jar-chip.is-on {
  background: var(--jar-accent, var(--green));
  border-color: color-mix(in srgb, var(--jar-accent, var(--green)) 65%, #000);
  box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--jar-accent, var(--green)) 50%, #000);
}

.jar-chip img {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  image-rendering: pixelated;
}

.jar-chip strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.jar-chip em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.3;
}

.jar-chip.is-on em {
  color: rgba(255, 255, 255, 0.85);
}

.jars-main {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.jar-selected-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 22px;
  background: var(--panel);
  border: 2px solid #1b1b1b;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25);
}

.jar-selected-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  image-rendering: pixelated;
}

.jar-selected-copy {
  min-width: 0;
}

.jar-selected-copy h2 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.jar-selected-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.software-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 24px;
}

.tag {
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.software-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.versions-block {
  display: grid;
  gap: 16px;
}

.versions-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.versions-toolbar h2 {
  margin: 0;
  font-size: 22px;
}

.version-search input {
  background: var(--panel);
  border: 2px solid #1b1b1b;
  color: #fff;
  padding: 10px 12px;
  min-width: min(240px, 100%);
  outline: none;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25);
}

.version-search input:focus {
  border-color: var(--green);
}

.versions-subhead {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.version-featured {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 24px;
  background: var(--jar-accent, var(--green));
  color: #fff;
  border: 2px solid color-mix(in srgb, var(--jar-accent, var(--green)) 65%, #000);
  box-shadow: inset 0 -4px 0 color-mix(in srgb, var(--jar-accent, var(--green)) 50%, #000);
}

.version-featured-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  image-rendering: pixelated;
}

.version-featured-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.version-featured-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

.version-featured-ver {
  font-family: var(--font-ten);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: normal;
  letter-spacing: 0.02em;
  line-height: 1;
  text-shadow: 2px 2px 0 color-mix(in srgb, var(--jar-accent, var(--green)) 45%, #000);
}

.version-featured-meta {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
}

.version-featured-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  flex-shrink: 0;
}

.version-featured-actions .mc-btn {
  white-space: nowrap;
}

.version-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

#version-grid {
  transition: opacity 0.2s ease;
}

#version-grid.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

#version-grid.is-leaving .version-tile,
#version-grid.is-leaving .version-featured,
#version-grid.is-leaving .versions-subhead,
#version-grid.is-leaving .empty {
  animation: version-out 0.12s ease forwards;
}

#version-grid.is-entering .version-tile {
  animation: version-pop 0.28s cubic-bezier(0.34, 1.4, 0.64, 1) both;
  animation-delay: calc(var(--i, 0) * 0.025s);
}

#version-grid.is-entering .version-featured {
  animation: version-pop 0.32s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

#version-grid.is-entering .versions-subhead,
#version-grid.is-entering .empty {
  animation: version-fade 0.22s ease both;
}

@keyframes version-pop {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(6px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes version-out {
  from {
    opacity: 1;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(0.96) translateY(-4px);
  }
}

@keyframes version-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.version-tile {
  display: grid;
  gap: 10px;
  padding: 16px;
  background: #3a3938;
  color: #fff;
  text-decoration: none;
  border: 2px solid #1b1b1b;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25);
  transition: background 0.15s ease, transform 0.15s ease;
}

.version-tile:hover {
  background: #454443;
  color: #fff;
  transform: scale(0.98);
}

.version-tile-ver {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.version-tile-meta {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.version-tile-go {
  justify-self: end;
  color: var(--green-light);
  font-size: 18px;
  line-height: 1;
}

.empty {
  color: var(--muted);
  padding: 24px;
  margin: 0;
  background: var(--panel);
  border: 2px solid #1b1b1b;
}

/* How it works */
.how-band {
  padding: 48px 0 56px;
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.how-inner {
  width: 100%;
}

.how-title {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.how-sprite {
  grid-column: 1;
  grid-row: 1;
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 16px;
  row-gap: 0;
  width: 100%;
}

.how-step {
  grid-row: 2;
  display: flex;
  flex-direction: column;
  padding: 24px 22px 28px;
  background: var(--panel);
  border: 2px solid #1b1b1b;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25);
  color: #fff;
}

.how-step:nth-child(2) {
  grid-column: 1;
  margin-top: -8px;
}

.how-step:nth-child(3) {
  grid-column: 2;
}

.how-step:nth-child(4) {
  grid-column: 3;
}

.how-step p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.how-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  background: var(--green);
  border: 2px solid #1f3f12;
  box-shadow: inset 0 -2px 0 #2d5016;
  font-family: var(--font-seven);
  font-size: 18px;
  color: #fff;
  text-shadow: 1px 1px 0 #2b4a14;
}

.how-step h3 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* Leave-editor confirm (custom, for in-app page switches) */
.leave-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.leave-modal[hidden] {
  display: none !important;
}

.leave-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.72);
}

.leave-modal-dialog {
  position: relative;
  width: min(420px, 100%);
  padding: 22px 22px 18px;
  background: var(--panel);
  border: 2px solid #1b1b1b;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.25), 0 16px 40px rgba(0, 0, 0, 0.45);
}

.leave-modal-dialog h2 {
  margin: 0 0 10px;
  font-family: var(--font-ten);
  font-size: 22px;
  font-weight: normal;
  letter-spacing: 0.02em;
  color: var(--green-light);
  text-shadow: 2px 2px 0 #2b4a14;
}

.leave-modal-dialog p {
  margin: 0 0 18px;
  color: var(--cream);
  line-height: 1.45;
  font-size: 15px;
}

.leave-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* Footer */
.site-footer {
  background: var(--ink);
  border-top: 1px solid var(--line);
  padding: 40px 0 32px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
}

.footer-nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--green-light);
}

.footer-nav-divider {
  width: 1px;
  height: 16px;
  background: var(--line);
}

.footer-disclaimer {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  max-width: 56ch;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.powered {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  text-decoration: none;
}

.powered-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.powered img {
  height: 44px;
  width: auto;
  display: block;
}

.powered:hover .powered-label {
  color: #fff;
}

body.menu-open {
  overflow: hidden;
}

@media (max-width: 1100px) {
  .platform-picker {
    grid-template-columns: minmax(180px, 1fr) repeat(2, minmax(0, 1fr));
  }

  .game-grid,
  .mega-tiles {
    grid-template-columns: repeat(3, 1fr);
  }

  .mega-inner-links {
    grid-template-columns: repeat(2, 1fr);
  }

  .jars-layout {
    grid-template-columns: 1fr;
  }

  .jars-rail {
    position: static;
  }

  .version-featured {
    flex-direction: column;
    align-items: flex-start;
  }

  .version-featured-actions {
    width: 100%;
  }

  .version-featured-actions .mc-btn {
    width: 100%;
  }

  .version-tiles {
    grid-template-columns: repeat(2, 1fr);
  }

  .how-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1495px) {
  .hero {
    --scene-focus-x: 2050;
    --scene-focus-y: 660;
  }
}

@media (max-width: 860px) {
  .primary-nav {
    display: none;
  }

  .menu-toggle {
    display: grid;
  }

  .mobile-panel {
    display: grid;
  }

  .header-actions .mc-btn {
    display: none;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .hero {
    height: max(340px, calc(100vw * 1470 / 3440));
  }

  .hero-pixel {
    font-size: clamp(28px, 8vw, 44px);
    white-space: normal;
    text-align: center;
  }

  .platform-picker {
    grid-template-columns: 1fr 1fr;
  }

  .platform-tile--primary {
    grid-row: span 1;
    grid-column: span 2;
    min-height: 120px;
  }

  .game-grid,
  .how-steps {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    row-gap: 0;
  }

  .how-sprite {
    grid-column: 1;
    grid-row: 1;
  }

  .how-step:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }

  .how-step:nth-child(3) {
    grid-column: 1;
    grid-row: 3;
    margin-top: 16px;
  }

  .how-step:nth-child(4) {
    grid-column: 1;
    grid-row: 4;
    margin-top: 16px;
  }

  .mega-inner-list a,
  .mega-inner-list,
  .mega-inner,
  .mega-inner-links {
    grid-template-columns: 1fr;
  }

  .jar-selected-card {
    flex-direction: column;
  }

  .footer-primary {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .versions-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}
