/* ================================================================
   MARLACOO v4 — Premium Server Store
   Typography: Bebas Neue (display) + Inter (body)
   Palette:    #080808 black · #f2f2f0 white · #c2ff00 acid green
   ================================================================ */

/* ========================= RESET & BASE ========================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* === Dark Cyan (default) === */
  --bg:            #060608;
  --bg-alt:        #0c0c10;
  --bg-raised:     #111116;
  --bg-surface:    #16161c;
  --bg-hover:      #1c1c24;
  --fg:            #f4f4f0;
  --fg-muted:      #8a8a90;
  --fg-mid:        #cfcfcf;
  --fg-soft:       #6a6a72;
  --accent:        #00d4ff;
  --accent-2:      #ffc400;
  --accent-3:      #e8a000;
  --accent-dim:    rgba(0, 212, 255, 0.08);
  --accent-hover:  rgba(0, 212, 255, 0.14);
  --accent-text:   #061018;
  --accent-border: rgba(0, 212, 255, 0.22);
  --accent-bloom:  rgba(0, 212, 255, 0.14);
  --line:          rgba(255, 255, 255, 0.06);
  --line-mid:      rgba(255, 255, 255, 0.11);
  --line-strong:   rgba(255, 255, 255, 0.22);
  --shadow-sm:     0 2px 16px rgba(0,0,0,0.45);
  --shadow-lg:     0 24px 80px rgba(0,0,0,0.6);
  --nav-bg:        rgba(6, 6, 8, 0.78);
  --bloom:         rgba(0, 212, 255, 0.06);
  --fg-ghost:      rgba(255, 255, 255, 0.04);
  --font-d:        'Bebas Neue', sans-serif;
  --font-b:        'Inter', sans-serif;
  --pad-h:         80px;
  --pad-v:         100px;
  --max-w:         1380px;
  --radius:        0px;  /* sharp = premium */
}

/* ========================= DARK ORANGE THEME ========================= */
html[data-theme="dark-orange"] {
  --accent:        #ff6b35;
  --accent-dim:    rgba(255, 107, 53, 0.07);
  --accent-hover:  rgba(255, 107, 53, 0.14);
  --accent-text:   #080808;
  --accent-border: rgba(255, 107, 53, 0.18);
  --accent-bloom:  rgba(255, 107, 53, 0.10);
  --bloom:         rgba(255, 107, 53, 0.07);
}

/* ========================= LIGHT THEME ========================= */
html[data-theme="light"] {
  --bg:            #f6f6f3;
  --bg-alt:        #ededea;
  --bg-raised:     #e4e4e1;
  --bg-surface:    #dadad6;
  --bg-hover:      #d0d0cc;
  --fg:            #0a0a0a;
  --fg-muted:      #6c6c6c;
  --fg-mid:        #3a3a3a;
  --fg-soft:       #909090;
  --accent:        #007aa8;
  --accent-2:      #c89a00;
  --accent-3:      #a87800;
  --accent-dim:    rgba(0, 122, 168, 0.10);
  --accent-hover:  rgba(0, 122, 168, 0.16);
  --accent-text:   #ffffff;
  --accent-border: rgba(0, 122, 168, 0.28);
  --accent-bloom:  rgba(0, 122, 168, 0.16);
  --line:          rgba(0, 0, 0, 0.08);
  --line-mid:      rgba(0, 0, 0, 0.16);
  --line-strong:   rgba(0, 0, 0, 0.28);
  --shadow-sm:     0 2px 16px rgba(0,0,0,0.07);
  --shadow-lg:     0 24px 80px rgba(0,0,0,0.14);
  --nav-bg:        rgba(246, 246, 243, 0.86);
  --bloom:         rgba(0, 122, 168, 0.07);
  --fg-ghost:      rgba(0, 0, 0, 0.04);
  scrollbar-color: #bbb #f6f6f3;
}
html[data-theme="light"]::-webkit-scrollbar-track { background: #f6f6f3; }
html[data-theme="light"]::-webkit-scrollbar-thumb { background: #bbb; }
html[data-theme="light"]::-webkit-scrollbar-thumb:hover { background: #999; }

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #2a2a2a #060608;
}
html::-webkit-scrollbar { width: 8px; }
html::-webkit-scrollbar-track { background: var(--bg); }
html::-webkit-scrollbar-thumb { background: #1f1f24; }
html::-webkit-scrollbar-thumb:hover { background: #2a2a30; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-b);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

::selection { background: var(--accent); color: var(--accent-text); }

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input { font: inherit; color: inherit; background: none; border: none; outline: none; }

/* Global focus ring for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}

/* ========================= TYPOGRAPHY ========================= */
.section-eyebrow {
  font-family: var(--font-b);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-eyebrow::before {
  content: '\25AA  ';
  opacity: 0.7;
}

.section-title {
  font-family: var(--font-d);
  font-size: clamp(42px, 5vw, 72px);
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--fg);
}

/* ========================= BUTTONS ========================= */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--accent-text);
  border: 1px solid var(--accent);
  box-shadow: 0 10px 32px var(--accent-bloom);
  font-family: var(--font-b);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 16px 34px;
  min-height: 48px;
  transition: transform 0.16s ease, background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.22s;
  white-space: nowrap;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 40px var(--accent-bloom); filter: brightness(1.06); }
.btn-primary:active { transform: translateY(0); opacity: 1; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--fg-mid);
  border: 1px solid var(--line-mid);
  font-family: var(--font-b);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 16px 34px;
  min-height: 48px;
  transition: border-color 0.18s, color 0.18s;
}
.btn-ghost:hover { border-color: var(--line-strong); color: var(--fg); }

.add-to-cart-btn.added {
  background: var(--bg-surface) !important;
  color: var(--accent) !important;
  border-color: var(--accent) !important;
}

/* Permanent locked state when item is in cart (1-per-cart items) */
.add-to-cart-btn.in-cart,
.add-to-cart-btn.in-cart:disabled {
  background: var(--bg-surface) !important;
  color: var(--accent) !important;
  border: 1px solid var(--accent-border) !important;
  opacity: 1 !important;
  cursor: default;
  pointer-events: none;
}
.add-to-cart-btn.in-cart:hover {
  transform: none !important;
  opacity: 1 !important;
}

/* Keep in-cart accent tied to the specific rank context (row/modal), not generic accent */
.ledger-row .add-to-cart-btn.in-cart,
.ledger-row .add-to-cart-btn.in-cart:disabled {
  color: var(--rank-color, var(--accent)) !important;
  border-color: var(--rank-color-border, var(--accent-border)) !important;
}

.rank-details-modal .add-to-cart-btn.in-cart,
.rank-details-modal .add-to-cart-btn.in-cart:disabled {
  color: var(--modal-rank-color, var(--accent)) !important;
  border-color: color-mix(in srgb, var(--modal-rank-color, var(--accent)) 45%, transparent) !important;
}

/* ========================= NAVIGATION ========================= */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--pad-h);
  height: 72px;
  background: var(--nav-bg);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, height 0.25s;
}
.site-nav.scrolled { border-bottom-color: var(--line-mid); height: 64px; }

.nav-brand {
  display: flex;
  align-items: center;
  grid-column: 1;
  justify-self: start;
}
.nav-logo {
  height: 52px;
  width: auto;
  max-width: clamp(90px, 18vw, 150px);
  display: block;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: opacity 0.18s ease, transform 0.22s ease;
  aspect-ratio: 840 / 620;
}
html[data-theme="dark-cyan"] .nav-logo,
html[data-theme="dark-orange"] .nav-logo {
  mix-blend-mode: screen;
  filter: brightness(1.08) contrast(1.03);
}
.nav-brand:hover .nav-logo { opacity: 0.82; transform: translateY(-1px); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  grid-column: 2;
  justify-self: center;
}
.nav-links .nav-link {
  font-family: var(--font-b);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
  transition: color 0.18s;
  position: relative;
}
.nav-links .nav-link::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.22s;
}
.nav-links .nav-link:hover,
.nav-links .nav-link.active { color: var(--fg); }
.nav-links .nav-link:hover::after,
.nav-links .nav-link.active::after { width: 100%; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  grid-column: 3;
  justify-self: end;
}

/* ========================= THEME TOGGLE ========================= */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--bg-raised);
  border: 1px solid var(--line-mid);
  color: var(--fg-mid);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-icon { display: none; }
html[data-theme="dark-cyan"] .theme-icon-moon,
html[data-theme="dark-orange"] .theme-icon-moon { display: block; }
html[data-theme="light"] .theme-icon-sun { display: block; }

.account-btn,
.account-profile {
  height: 44px;
  background: var(--bg-raised);
  border: 1px solid var(--line-mid);
}

.account-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: var(--fg);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.account-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.account-profile {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 0 8px;
}

.account-avatar,
.login-preview-avatar {
  width: 28px;
  height: 28px;
  image-rendering: pixelated;
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--line-mid);
}

.account-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fg);
}

.account-logout {
  padding: 0 8px;
  color: var(--fg-mid);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.account-logout:hover { color: var(--accent); }

.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--bg-raised);
  border: 1px solid var(--line-mid);
  color: var(--fg-mid);
  transition: border-color 0.2s, color 0.2s;
}
.cart-btn:hover { border-color: var(--accent); color: var(--fg); }

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.2s, transform 0.2s;
}
.cart-badge.visible { opacity: 1; transform: scale(1); }

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 32px;
  padding: 4px;
}
.mobile-menu-btn span {
  display: block;
  height: 1px;
  background: var(--fg-mid);
  transition: background 0.2s;
}
.mobile-menu-btn:hover span { background: var(--fg); }

/* ========================= HERO ========================= */
.hero-section {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 120px var(--pad-h) 0;
  position: relative;
  overflow: hidden;
}

/* Subtle animated accent bloom */
.hero-section::before {
  content: '';
  position: absolute;
  width: 900px;
  height: 700px;
  top: -200px;
  right: -200px;
  background: radial-gradient(ellipse, var(--bloom) 0%, transparent 70%);
  pointer-events: none;
}



/* ========================= HERO ISLAND SCENE ========================= */
.hero-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

/* Waves canvas */
.hero-waves-canvas {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 170px;
  z-index: 2;
}

/* Floating firefly / water-sparkle particles */
.hero-particles {
  position: absolute;
  inset: 0;
}

.hero-spark {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  animation: spark-float var(--dur, 5s) ease-in-out var(--delay, 0s) infinite;
}

@keyframes spark-float {
  0%   { opacity: 0;   transform: translate(0, 0) scale(0.5); }
  18%  { opacity: 0.9; }
  75%  { opacity: 0.3; }
  100% { opacity: 0;   transform: translate(var(--drift, 10px), var(--rise, -110px)) scale(0.15); }
}

/* Swaying tall grass */
.hero-grass {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
}

.grass-blade {
  position: absolute;
  bottom: 0;
  width: var(--gw, 2px);
  height: var(--gh, 44px);
  background: linear-gradient(to top, var(--accent), transparent);
  transform-origin: bottom center;
  border-radius: 1px 2px 0 0;
  opacity: var(--go, 0.4);
  animation: grass-sway var(--gs, 3s) ease-in-out var(--gd, 0s) infinite;
}

@keyframes grass-sway {
  0%, 100% { transform: rotate(var(--glean, -4deg)); }
  40%       { transform: rotate(calc(var(--glean, -4deg) + 10deg)) scaleX(0.9); }
  68%       { transform: rotate(calc(var(--glean, -4deg) - 3deg)) scaleX(1.04); }
}

/* Flying birds */
.hero-birds {
  position: absolute;
  inset: 0;
}

.hero-bird {
  position: absolute;
  top: var(--by, 18%);
  left: -80px;
  color: var(--fg-mid);
  animation: bird-cross var(--bd, 26s) linear var(--bdelay, 0s) infinite;
  opacity: 0.38;
}

@keyframes bird-cross {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(100vw + 160px)); }
}

/* Rain layer — falls from nav down to ocean surface */
.hero-rain {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 130px;
  overflow: hidden;
  pointer-events: none;
  padding-bottom: 220px;
}

.rain-drop {
  position: absolute;
  top: -24px;
  width: 1px;
  background: linear-gradient(to bottom, transparent 0%, rgba(180, 225, 255, 0.60) 100%);
  animation: rain-fall var(--rdur, 0.85s) linear var(--rdelay, 0s) infinite;
}

@keyframes rain-fall {
  from { transform: translateY(0) skewX(-4deg); }
  to   { transform: translateY(110vh) skewX(-4deg); }
}

/* Mini pixel island + palm tree (SVG block-art) */
.mini-island {
  --island-scale: 1;
  --island-bob: 8px;
  position: absolute;
  right: 10%;
  bottom: -20px;
  width: clamp(200px, 28vw, 320px);
  height: auto;
  aspect-ratio: 320 / 340;
  z-index: 1;
  pointer-events: auto;
  /* Entrance + bob animation */
  animation: island-enter 0.8s cubic-bezier(0.22, 1, 0.36, 1) both,
            island-bob 5.8s ease-in-out 0.8s infinite;
  will-change: transform;
}

.island-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

/* Steve hover overlay positioned over island */
.steve-peek-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.steve-peek-alt {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  display: none; /* hidden by default */
}

.mini-island.steve-visible .steve-peek-overlay {
  opacity: 1;
}

/* Entrance animation: rises from below + fades in */
@keyframes island-enter {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Bob: gentle vertical float */
@keyframes island-bob {
  0%, 100% { transform: translateY(0) scale(var(--island-scale)); }
  50%      { transform: translateY(calc(-1 * var(--island-bob))) scale(var(--island-scale)); }
}

.btn-steve-wrap {
  position: relative;
  display: inline-flex;
}

.btn-steve-popup {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
  z-index: 10;
}

.btn-steve-wrap:hover .btn-steve-popup {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Minecraft grass + dirt island rim at the shoreline */
.hero-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding-top: 68px;
  padding-bottom: clamp(170px, 20vh, 230px);
  position: relative;
  z-index: 1;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-b);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  background: var(--bg-raised);
  border: 1px solid var(--accent-border);
  padding: 6px 14px 6px 11px;
  width: fit-content;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.hero-label::before {
  content: '⚒';
  font-size: 1rem;
  line-height: 1;
  opacity: 0.9;
}

.hero-wordmark {
  margin-bottom: 28px;
  display: block;
  width: fit-content;
}
.hero-logo {
  display: block;
  /* v2 has minimal whitespace — smaller clamp = same perceived size */
  width: clamp(140px, 20vw, 300px);
  height: auto;
  object-fit: contain;
  aspect-ratio: 1 / 1;
  mix-blend-mode: multiply;
  /* Entrance: fades in and rises from below */
  animation:
    hero-logo-enter 0.9s cubic-bezier(0.22, 1, 0.36, 1) both,
    hero-logo-float 5s ease-in-out 0.9s infinite;
  transform-origin: center bottom;
  will-change: transform, opacity;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              filter 0.35s ease,
              opacity 0.35s ease;
}
.hero-logo:hover {
  transform: scale(1.04) translateY(-4px);
}
html[data-theme="dark-cyan"] .hero-logo,
html[data-theme="dark-orange"] .hero-logo {
  mix-blend-mode: screen;
  filter: brightness(1.08) contrast(1.03);
}

/* Entrance: slide up from 20px below + fade in */
@keyframes hero-logo-enter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Continuous float: gentle vertical bob */
@keyframes hero-logo-float {
  0%, 100% { transform: translateY(0);    }
  45%       { transform: translateY(-7px); }
  55%       { transform: translateY(-7px); }
}

.hero-wordmark-text {
  position: relative;
  z-index: 2;
}

/* Arrow: absolutely positioned, contains left SVG (nock+feathers) + right SVG (head).
   The wooden shaft is drawn via ::before stretching between the two SVGs. */
.hero-wordmark-arrow {
  position: absolute;
  left: -14%;
  right: -12%;
  top: var(--wordmark-arrow-y);
  height: 28px;
  z-index: 1;
  overflow: visible;
  transform: translateY(-50%);
  animation: hero-arrow-drift 3.6s ease-in-out infinite;
}

/* Wooden shaft strip between the two SVG ends */
.hero-wordmark-arrow::before {
  content: '';
  position: absolute;
  left: 30px;
  right: 44px;
  top: calc(50% - 3px);
  height: 6px;
  background: repeating-linear-gradient(90deg, #9B7040 0 10px, #7a5428 10px 12px);
  border-top: 1px solid #c4913e;
  border-bottom: 1px solid #5a3a12;
}

.arrow-svg-left {
  position: absolute;
  left: 0;
  top: -14px;
  width: 32px;
  height: 56px;
}

.arrow-svg-right {
  position: absolute;
  right: 0;
  top: 0;
  width: 46px;
  height: 28px;
}

/* Skeleton: single SVG fills the container — viewBox 0 0 20 34, rendered 2× = 40×68px */
.hero-wordmark-skeleton {
  position: absolute;
  left: var(--wordmark-skeleton-x);
  /* bottom:90% = skeleton bottom sits 10% into the h1 top, so feet touch letter crown
     and body/head poke above — works at every font size without px overrides */
  bottom: 90%;
  width: 40px;
  height: 68px;
  z-index: 3;
  transform: translateX(-50%);
  animation: hero-skeleton-bob 2.2s ease-in-out infinite;
}

/* Drop shadow beneath feet */
.hero-wordmark-skeleton::after {
  content: '';
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -5px;
  height: 4px;
  background: rgba(0, 0, 0, 0.22);
  filter: blur(2px);
}

@keyframes hero-arrow-drift {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(-50%) translateX(6px); }
}

@keyframes hero-skeleton-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-3px); }
}

.hero-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.hero-sub {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--fg-mid);
  max-width: 340px;
  margin-inline: auto;
  text-shadow: 0 1px 8px rgba(0,0,0,0.7);
}
.hero-sub-line { display: block; }

/* ========== COMMUNITY GOAL BAR ========== */
.community-goal-bar {
  width: 100%;
  max-width: 560px;
  margin: 0 auto 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.cg-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.cg-eyebrow {
  font-family: var(--font-b);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.cg-eyebrow::before { content: '▲  '; font-size: 0.5rem; opacity: 0.7; vertical-align: 1px; }

.cg-name {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--fg);
  min-height: 1.1em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.cg-amounts {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-family: var(--font-b);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--fg-muted);
  white-space: nowrap;
}

.cg-sep {
  opacity: 0.4;
  font-weight: 400;
}

.cg-track {
  width: 100%;
  height: 3px;
  background: var(--line-mid);
  position: relative;
  overflow: hidden;
}
.cg-track::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.04) 50%, transparent 100%);
  pointer-events: none;
}

.cg-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-bloom);
  transition: width 1.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cg-desc {
  font-size: 0.68rem;
  line-height: 1.5;
  color: var(--fg-muted);
  opacity: 0.75;
  margin: 0;
}

html[data-theme="light"] .cg-track { background: var(--line-mid); }
html[data-theme="light"] .cg-desc { opacity: 0.6; }

@media (max-width: 640px) {
  .community-goal-bar { max-width: 100%; }
}

.hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.server-ip-block {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-raised);
  border: 1px solid var(--line-mid);
  padding: 12px 18px;
  position: relative;
}

.ip-label {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.ip-copy {
  font-family: var(--font-b);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg);
  cursor: pointer;
  transition: color 0.2s;
  padding: 4px 0;
}
.ip-copy:hover { color: var(--accent); }

.ip-copied {
  position: absolute;
  right: 10px;
  top: -10px;
  transform: translateY(4px);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text);
  background: var(--accent);
  border: 1px solid var(--accent-border);
  padding: 4px 8px;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s, transform 0.22s, visibility 0.22s;
  pointer-events: none;
  white-space: nowrap;
  z-index: 2;
}
.ip-copied.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Hero banner tape below the ocean */
.hero-ticker {
  width: 100vw;
  margin-left: calc(-1 * var(--pad-h));
  border-top: 1px solid var(--line);
  overflow: hidden;
  padding: 14px 0;
  background: var(--bg-raised);
  position: relative;
  z-index: 1;
}

.hero-ticker-viewport {
  position: relative;
  width: 100%;
  height: 1.25em;
  overflow: hidden;
}

.ticker-message-track {
  position: absolute;
  left: 50%;
  top: 0;
  width: max-content;
  white-space: nowrap;
  transform: translate3d(118vw, 0, 0);
  opacity: 0;
  will-change: transform, opacity;
}

.ticker-message-text {
  display: inline-block;
  font-family: var(--font-b);
  font-size: clamp(0.6rem, 1.55vw, 0.72rem);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  transition: color 0.2s ease;
}

.ticker-message-track.is-enter {
  animation: ticker-enter 1.25s cubic-bezier(0.21, 0.87, 0.34, 1) forwards;
}

.ticker-message-track.is-exit {
  animation: ticker-exit 2.4s linear forwards;
}

.ticker-message-text.is-pop {
  color: var(--accent);
  animation: ticker-pop 0.42s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-shadow: 0 0 16px var(--accent-bloom), 0 0 30px var(--accent-bloom);
}

@keyframes ticker-enter {
  from {
    transform: translate3d(118vw, 0, 0);
    opacity: 0;
  }
  to {
    transform: translate3d(-50%, 0, 0);
    opacity: 1;
  }
}

@keyframes ticker-exit {
  from {
    transform: translate3d(-50%, 0, 0);
    opacity: 1;
  }
  to {
    transform: translate3d(calc(-50% - 145vw), 0, 0);
    opacity: 0;
  }
}

@keyframes ticker-pop {
  0% { transform: scale(1); }
  36% { transform: scale(1.14); }
  72% { transform: scale(0.98); }
  100% { transform: scale(1); }
}

/* ========================= STORE SECTION BASE ========================= */
.store-section {
  padding: var(--pad-v) var(--pad-h);
  border-top: 2px solid var(--accent-border);
  max-width: 100%;
  position: relative;
  transition: background 0.3s ease;
}

/* Alternating backgrounds — even sections get the alt tone */
.store-section:nth-child(odd) {
  background: var(--bg);
}
.store-section:nth-child(even) {
  background: var(--bg-alt);
}

/* Subtle accent glow at the top edge of each section */
.store-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, var(--accent-bloom), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.store-section:hover::before {
  opacity: 1;
}

.section-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 56px;
  position: relative;
  z-index: 1;
}

.section-meta {
  flex-shrink: 0;
}

.section-note {
  font-size: 0.88rem;
  color: var(--fg-muted);
  line-height: 1.75;
  text-align: right;
  max-width: 300px;
}

/* ========================= RANK LEDGER ========================= */
.rank-ledger {
  max-width: var(--max-w);
  margin: 0 auto;
  border: 1px solid var(--line-mid);
  position: relative;
  z-index: 1;
}

.ledger-head {
  display: grid;
  grid-template-columns: 64px 180px 1fr 110px 130px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-mid);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.ledger-row {
  display: grid;
  grid-template-columns: 64px 180px 1fr 110px 130px;
  align-items: center;
  padding: 28px 14px;
  border-bottom: 1px solid var(--line-mid);
  background: var(--bg-raised);
  box-shadow: inset 4px 0 0 var(--rank-color, var(--accent)), inset 0 1px 0 var(--rank-color-border, var(--accent-border));
  transition: background 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
}

/* ── Per-rank colour tokens ── */
[data-rank-key="ripple"] {
  --rank-color:        #22c55e;
  --rank-color-dim:    rgba(34, 197, 94, 0.11);
  --rank-color-hover:  rgba(34, 197, 94, 0.20);
  --rank-color-border: rgba(34, 197, 94, 0.28);
  --rank-text:         #080808;
}
[data-rank-key="drift"] {
  --rank-color:        var(--accent);
  --rank-color-dim:    var(--accent-dim);
  --rank-color-hover:  var(--accent-hover);
  --rank-color-border: var(--accent-border);
  --rank-text:         var(--accent-text);
}
[data-rank-key="surge"] {
  --rank-color:        #FFAA00;
  --rank-color-dim:    rgba(255, 170, 0, 0.11);
  --rank-color-hover:  rgba(255, 170, 0, 0.20);
  --rank-color-border: rgba(255, 170, 0, 0.28);
  --rank-text:         #080808;
}
[data-rank-key="apex"] {
  --rank-color:        #ef4444;
  --rank-color-dim:    rgba(239, 68, 68, 0.11);
  --rank-color-hover:  rgba(239, 68, 68, 0.20);
  --rank-color-border: rgba(239, 68, 68, 0.28);
  --rank-text:         #ffffff;
}

.ledger-row:hover {
  background: var(--bg-hover);
  box-shadow: inset 4px 0 0 var(--rank-color, var(--accent)), inset 0 1px 0 var(--rank-color-border, var(--accent-border));
}


.ledger-num {
  font-family: var(--font-d);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
}

.ledger-rank {
  font-family: var(--font-d);
  font-size: 2.2rem;
  letter-spacing: 0.05em;
  color: var(--rank-color, var(--fg));
  line-height: 1;
  text-shadow: 0 0 22px color-mix(in srgb, var(--rank-color, var(--accent)) 60%, transparent);
}

.ledger-desc {
  font-size: 0.84rem;
  color: var(--fg-mid);
  line-height: 1.5;
  padding-right: 32px;
}

.ledger-desc-button {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid var(--rank-color-border, var(--accent-border));
  padding: 14px 16px;
  text-align: left;
  color: var(--fg-mid);
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.ledger-desc-button:hover,
.ledger-desc-button:focus-visible {
  border-color: var(--rank-color, var(--accent));
  background: var(--rank-color-dim, var(--accent-dim));
  color: var(--fg);
  transform: translateY(-1px);
}

.ledger-desc-label {
  font-family: var(--font-b);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rank-color, var(--accent));
}

.ledger-desc-hint {
  font-size: 0.84rem;
  line-height: 1.55;
  color: inherit;
}

.ledger-price {
  font-family: var(--font-d);
  font-size: 1.8rem;
  letter-spacing: 0.03em;
  color: var(--rank-color, var(--accent));
  text-align: right;
  padding-right: 10px;
}

.ledger-add {
  justify-self: end;
  min-width: 108px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--rank-color, var(--accent));
  color: var(--rank-text, var(--accent-text));
  border: 1px solid var(--rank-color, var(--accent));
  font-family: var(--font-b);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 11px 24px;
  transition: all 0.18s ease;
}
.ledger-add:hover { opacity: 0.85; }

/* ========================= TAGS BILLBOARD ========================= */
.tags-section {
  background: var(--bg-raised) !important;
}

.tags-billboard {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  align-items: stretch;
}

.billboard-left {
  padding: 40px 48px 40px 0;
}

.billboard-right {
  padding: 40px 40px;
  display: flex;
  align-items: center;
}

/* Tag cache article sits as 2nd col — keep its own border */
.tags-billboard .tag-crate-col {
  margin: 0;
  max-width: none;
  border: 1px solid var(--line-mid);
  box-shadow: inset 0 2px 0 var(--accent);
}

/* Feature chips — inline row beneath the body text */
.tag-feature-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.tag-feature-strip .tag-item {
  flex: 1 1 auto;
  min-width: 160px;
  border: 1px solid var(--line-mid);
  background: var(--bg-raised);
  padding: 12px 16px;
  gap: 12px;
}

.billboard-heading {
  font-family: var(--font-d);
  font-size: clamp(64px, 8vw, 112px);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--fg);
  margin-bottom: 28px;
  margin-top: 16px;
}

.billboard-body {
  font-size: 0.94rem;
  color: var(--fg-muted);
  line-height: 1.8;
  margin-bottom: 32px;
  max-width: 400px;
}

.billboard-price-line {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 28px;
}

.big-price {
  font-family: var(--font-d);
  font-size: 3.4rem;
  color: var(--fg);
  letter-spacing: 0.03em;
}

.price-note {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* Tag showcase */
.tag-showcase {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tag-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--line-mid);
  background: var(--bg);
  transition: border-color 0.2s, background 0.2s, transform 0.18s;
  min-width: 0;
}
.tag-item:hover {
  border-color: var(--accent-border);
  background: var(--bg-surface);
  transform: translateX(4px);
}

.tag-chip {
  font-family: var(--font-b);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 10px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.05em;
}
.chip-accent { background: var(--accent); color: var(--accent-text); }
.chip-outline { border: 1px solid var(--line-strong); color: var(--fg); }
.chip-ghost   { border: 1px solid var(--accent); color: var(--accent); background: transparent; }
.chip-dim     { border: 1px solid var(--line); color: var(--fg-muted); background: transparent; }

.tag-label {
  font-size: 0.82rem;
  color: var(--fg-muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========================= CRATE COLUMNS ========================= */
.crate-columns {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line-mid);
}

.crate-col {
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 3.5vw, 40px) clamp(16px, 2.5vw, 32px) clamp(18px, 3vw, 36px);
  border-right: 1px solid var(--line-mid);
  position: relative;
  background: var(--bg);
  transition: background 0.2s, transform 0.2s;
  min-width: 0;
}
.crate-col:last-child { border-right: none; }
.crate-col:hover {
  background: var(--bg-hover);
  transform: translateY(-2px);
}

.crate-featured {
  background: var(--bg-raised);
  border-color: var(--accent-border);
  box-shadow: inset 0 2px 0 var(--accent);
}
.crate-featured:hover { background: var(--bg-surface); transform: translateY(-2px); }

.crate-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 10px;
}

.crate-index {
  font-family: var(--font-d);
  font-size: clamp(2.4rem, 4vw, 4.5rem);
  line-height: 1;
  color: rgba(255, 255, 255, 0.18);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
html[data-theme="light"] .crate-index { color: rgba(0, 0, 0, 0.12); }
.crate-featured .crate-index { color: var(--accent-bloom); }

.crate-content {
  flex: 1;
}

.crate-name {
  font-family: var(--font-d);
  font-size: clamp(1.5rem, 2vw, 2rem);
  letter-spacing: 0.06em;
  color: var(--fg);
  margin-bottom: 12px;
  line-height: 1;
}
.crate-featured .crate-name { color: var(--accent); }
[data-crate="basic"]    .crate-name { color: #22c55e;         text-shadow: 0 0 20px rgba(34, 197, 94, 0.55); }
[data-crate="enhanced"] .crate-name { color: var(--accent);   text-shadow: 0 0 20px color-mix(in srgb, var(--accent) 55%, transparent); }
[data-crate="premium"]  .crate-name { color: #FFAA00;         text-shadow: 0 0 20px rgba(255, 170, 0, 0.55); }
[data-crate="elite"]    .crate-name { color: #ef4444;         text-shadow: 0 0 20px rgba(239, 68, 68, 0.55); }

/* ── Per-tier tinted card backgrounds ─────────────────────────── */
.crate-col[data-crate="basic"]    { background: var(--bg-raised);  border-color: rgba(34, 197, 94, 0.22);  box-shadow: inset 4px 0 0 #22c55e, inset 0 2px 0 #22c55e; }
.crate-col[data-crate="enhanced"] { background: var(--bg-raised);  border-color: var(--accent-border);     box-shadow: inset 4px 0 0 var(--accent), inset 0 2px 0 var(--accent); }
.crate-col[data-crate="premium"]  { background: var(--bg-raised);  border-color: rgba(255, 176, 17, 0.30); box-shadow: inset 4px 0 0 #FFAA00, inset 0 2px 0 #FFAA00; }
.crate-col[data-crate="elite"]    { background: var(--bg-raised);  border-color: rgba(239, 68, 68, 0.22);  box-shadow: inset 4px 0 0 #ef4444, inset 0 2px 0 #ef4444; }

.crate-col[data-crate="basic"]:hover    { background: var(--bg-hover); }
.crate-col[data-crate="enhanced"]:hover { background: var(--bg-hover); }
.crate-col[data-crate="premium"]:hover  { background: var(--bg-hover); }
.crate-col[data-crate="elite"]:hover    { background: var(--bg-hover); }

.crate-col[data-crate],
.tag-crate-featured {
  --crate-accent: var(--accent);
  --crate-accent-dim: var(--accent-dim);
  --crate-accent-text: var(--accent-text);
}

.crate-col[data-crate="basic"] {
  --crate-accent: #22c55e;
  --crate-accent-dim: rgba(34, 197, 94, 0.14);
  --crate-accent-text: #07130b;
}

.crate-col[data-crate="enhanced"],
.tag-crate-featured {
  --crate-accent: var(--accent);
  --crate-accent-dim: var(--accent-dim);
  --crate-accent-text: var(--accent-text);
}

.crate-col[data-crate="premium"] {
  --crate-accent: #FFAA00;
  --crate-accent-dim: rgba(255, 170, 0, 0.16);
  --crate-accent-text: #1a1200;
}

.crate-col[data-crate="elite"] {
  --crate-accent: #ef4444;
  --crate-accent-dim: rgba(239, 68, 68, 0.16);
  --crate-accent-text: #170707;
}

/* ── Tinted col text: brighter on dark, darker on light ──────── */
.crate-col[data-crate] .crate-desc,
.tag-crate-featured    .crate-desc  { color: var(--fg-mid); }

html[data-theme="light"] .crate-col[data-crate] .crate-desc,
html[data-theme="light"] .tag-crate-featured    .crate-desc  { color: var(--fg); }

.crate-col[data-crate] .crate-index   { color: rgba(255, 255, 255, 0.38); }
html[data-theme="light"] .crate-col[data-crate] .crate-index { color: rgba(0, 0, 0, 0.28); }

.crate-desc {
  font-size: 0.86rem;
  color: var(--fg-muted);
  line-height: 1.7;
}

.crate-buy {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* ========================= QTY STEPPER ========================= */
.qty-stepper {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  margin-top: 16px;
  gap: 6px;
}

.qty-minus,
.qty-plus {
  width: 36px;
  flex-shrink: 0;
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid var(--line-mid);
  font-size: 1.1rem;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.qty-minus { border-right: none; margin-right: 0; }
.qty-plus  { border-left: none; }
.qty-minus:hover:not(:disabled),
.qty-plus:hover:not(:disabled) {
  border-color: var(--crate-accent, var(--accent));
  color: var(--crate-accent, var(--accent));
  background: var(--crate-accent-dim, var(--accent-dim));
}
.qty-minus:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

.qty-value {
  min-width: 36px;
  text-align: center;
  font-family: var(--font-b);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--fg);
  border: 1px solid var(--line-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  user-select: none;
}

.qty-add-btn {
  flex: 1 1 100%;
  margin-left: 0;
  background: transparent;
  color: var(--fg-mid);
  border: 1px solid var(--line-mid);
  font-family: var(--font-b);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0 14px;
  height: 38px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
}
.qty-add-btn:hover {
  background: var(--crate-accent, var(--accent));
  color: var(--crate-accent-text, var(--accent-text));
  border-color: var(--crate-accent, var(--accent));
}
.qty-add-btn.added {
  background: var(--bg-surface);
  color: var(--crate-accent, var(--accent));
  border-color: var(--crate-accent, var(--accent));
}

/* ========================= TAG CRATE COLUMNS ========================= */
.tag-crate-columns {
  max-width: 540px;
  margin: 0 auto;
  border: 1px solid var(--line-mid);
}

.tag-crate-col {
  display: flex;
  flex-direction: column;
  padding: 40px 40px 36px;
  position: relative;
  background: var(--bg-raised);
  transition: background 0.2s, transform 0.2s;
}
.tag-crate-col:hover {
  background: var(--bg-hover);
}

.tag-crate-featured {
  background: var(--bg-raised);
  border-color: var(--accent-border);
  box-shadow: inset 0 2px 0 var(--accent);
}
.tag-crate-featured:hover { background: var(--bg-hover); transform: translateY(-2px); }
.tag-crate-featured .crate-index { color: var(--accent-bloom); }
.tag-crate-featured .crate-name  { color: var(--accent); }
.tag-crate-featured .crate-key-icon {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 0 8px rgba(85,255,255,.45));
}

/* ========================= MEMBERSHIP STAGE ========================= */
.membership-stage {
  --stage-bg:   #0c0c0c;
  --stage-fg:   #f2f2f0;
  --stage-muted: rgba(242, 242, 240, 0.55);
  --stage-accent-bloom: rgba(255, 170, 0, 0.12);
  background: var(--stage-bg);
  border-top: none;
  padding: calc(var(--pad-v) * 1.2) var(--pad-h);
  text-align: center;
}
html[data-theme="light"] .membership-stage {
  --stage-bg:   #f2f2f0;
  --stage-fg:   #080808;
  --stage-muted: rgba(8, 8, 8, 0.55);
  --stage-accent-bloom: rgba(255, 170, 0, 0.16);
}

.membership-stage::before {
  background: linear-gradient(to bottom, var(--stage-accent-bloom), transparent);
}

.stage-inner {
  max-width: 760px;
  margin: 0 auto;
}

.eyebrow-dark {
  color: var(--stage-muted);
}
html[data-theme="light"] .eyebrow-dark {
  color: var(--stage-muted);
}

.stage-heading {
  font-family: var(--font-d);
  font-size: clamp(72px, 12vw, 160px);
  line-height: 0.88;
  letter-spacing: -0.01em;
  color: var(--stage-fg);
  margin: 20px 0 28px;
}

.stage-body {
  font-size: 1rem;
  color: var(--stage-fg);
  opacity: 0.65;
  line-height: 1.8;
  max-width: 500px;
  margin: 0 auto 32px;
}

.stage-pricing {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin-bottom: 32px;
}

.stage-price {
  font-family: var(--font-d);
  font-size: clamp(56px, 9vw, 100px);
  color: #FFAA00;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stage-per {
  font-size: 1rem;
  font-weight: 500;
  color: var(--stage-fg);
  opacity: 0.55;
}

.stage-cta {
  background: #FFAA00;
  color: #080808;
  font-family: var(--font-b);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 18px 48px;
  transition: opacity 0.18s;
}
.stage-cta:hover { opacity: 0.85; }

/* Keep membership CTA in-cart state on-brand (not global accent blue). */
.stage-cta.in-cart,
.stage-cta.in-cart:disabled,
.stage-cta.added {
  background: rgba(255, 170, 0, 0.16) !important;
  color: #FFAA00 !important;
  border: 1px solid rgba(255, 170, 0, 0.46) !important;
  opacity: 1 !important;
}

.stage-cta.in-cart:hover,
.stage-cta.in-cart:disabled:hover,
.stage-cta.added:hover {
  background: rgba(255, 170, 0, 0.16) !important;
  color: #FFAA00 !important;
  border-color: rgba(255, 170, 0, 0.46) !important;
  transform: none !important;
  opacity: 1 !important;
}

html[data-theme="light"] .stage-cta.in-cart,
html[data-theme="light"] .stage-cta.in-cart:disabled,
html[data-theme="light"] .stage-cta.added {
  background: rgba(255, 170, 0, 0.22) !important;
  color: #7a4a00 !important;
  border-color: rgba(122, 74, 0, 0.38) !important;
}

.stage-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.stage-benefits-btn {
  background: transparent;
  color: var(--stage-fg, var(--fg-mid));
  border: 1px solid rgba(255, 170, 0, 0.35);
  font-family: var(--font-b);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 18px 32px;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s;
  white-space: nowrap;
}
.stage-benefits-btn:hover {
  border-color: rgba(255, 170, 0, 0.75);
  color: #FFAA00;
}
html[data-theme="light"] .stage-benefits-btn {
  border-color: rgba(0,0,0,0.18);
  color: var(--fg-mid);
}
html[data-theme="light"] .stage-benefits-btn:hover {
  border-color: rgba(0,0,0,0.45);
  color: var(--fg);
}

.stage-footnote {
  margin-top: 20px;
  font-size: 0.72rem;
  color: var(--stage-fg);
  opacity: 0.4;
  letter-spacing: 0.08em;
}

/* ========================= FREE CATALOG ========================= */
.free-catalog {
  max-width: var(--max-w);
  margin: 0 auto;
  border: 1px solid var(--line-mid);
  padding: 0 16px;
  position: relative;
  z-index: 1;
}

.catalog-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 40px;
  padding: 36px 16px;
  border-bottom: 1px solid var(--line-mid);
  transition: background 0.2s, box-shadow 0.2s;
}
.catalog-item:hover {
  background: var(--accent-dim);
  box-shadow: inset 3px 0 0 var(--accent);
}

.catalog-name {
  font-family: var(--font-d);
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  color: var(--fg);
  margin-bottom: 6px;
  line-height: 1;
}

.catalog-desc {
  font-size: 0.88rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

.catalog-claim {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  font-family: var(--font-b);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 11px 24px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.18s ease;
}
.catalog-claim:hover {
  background: var(--accent);
  color: var(--accent-text);
}

/* ========================= SUPPORTERS ========================= */
.supporters-section--loading {
  display: none;
}

.supporters-stats {
  display: flex;
  align-items: flex-end;
  gap: 32px;
  flex-shrink: 0;
}

.supporters-stat-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.supporters-stat-num {
  font-family: var(--font-d);
  font-size: clamp(40px, 5vw, 64px);
  line-height: 0.9;
  color: var(--fg);
  letter-spacing: 0.02em;
}

.supporters-stat-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.supporters-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line-mid);
  position: relative;
  z-index: 1;
}

.supporters-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.supporters-page-btn {
  min-width: 112px;
  padding: 12px 16px;
  border: 1px solid var(--line-mid);
  background: var(--bg-raised);
  color: var(--fg);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s, opacity 0.18s;
}

.supporters-page-btn:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--accent);
}

.supporters-page-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.supporters-page-status {
  min-width: 108px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.supporter-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--bg-raised);
  transition: background 0.18s;
}
.supporter-card:hover { background: var(--bg-hover); }

.supporter-avatar {
  width: 36px;
  height: 36px;
  image-rendering: pixelated;
  flex-shrink: 0;
  border: 1px solid var(--line-mid);
  background: var(--bg-surface);
}

.supporter-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.supporter-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supporter-pkg {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supporter-amount {
  font-family: var(--font-b);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}

.supporters-empty {
  padding: 56px 24px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--fg-muted);
  background: var(--bg-raised);
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .supporters-feed {
    grid-template-columns: 1fr 1fr;
  }
  .supporters-pagination {
    justify-content: stretch;
  }
  .supporters-page-btn,
  .supporters-page-status {
    flex: 1;
  }
  .supporters-stat-block { align-items: flex-start; }
}

/* ========================= FOOTER ========================= */
.site-footer {
  border-top: 1px solid var(--line-mid);
  padding: 60px var(--pad-h);
  background: var(--bg-raised);
}

/* ============================= MC DECORATIONS ============================= */

/* Section title row — icon beside heading */
.section-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Generic pixel deco SVG */
.mc-deco {
  flex-shrink: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.mc-deco-stack {
  position: relative;
  display: inline-flex;
  width: 36px;
  height: 34px;
  flex-shrink: 0;
}

.mc-deco-stack-sword {
  align-items: center;
  justify-content: center;
}

.mc-deco-sword-back {
  position: absolute;
  bottom: 1px;
  left: 0;
  width: 30px;
  height: 30px;
  opacity: .92;
  z-index: 1;
  filter: drop-shadow(0 0 6px rgba(85,255,255,.32));
}

.mc-deco-crown {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 22px;
  height: 13px;
  opacity: .96;
  z-index: 2;
  filter: drop-shadow(0 0 5px rgba(255,170,0,.38));
}

.mc-deco-chest {
  width: 36px;
  height: 24px;
  opacity: .9;
  filter: drop-shadow(0 0 6px rgba(160,112,64,.5));
}

.mc-deco-gift {
  width: 32px;
  height: 28px;
  opacity: .9;
  filter: drop-shadow(0 0 6px rgba(91,155,213,.45));
}

.mc-deco-tag {
  width: 46px;
  height: 34px;
  opacity: .9;
  filter: drop-shadow(0 0 6px rgba(85,255,255,.45));
}

/* Minecraft chat preview (tags section) */
.mc-chat-preview {
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  line-height: 1.7;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 4px;
  padding: 10px 14px;
  margin: 16px 0 20px;
  max-width: 340px;
  backdrop-filter: blur(4px);
}
html[data-theme="light"] .mc-chat-preview {
  background: rgba(0,0,0,.08);
  border-color: rgba(0,0,0,.12);
  color: #1a1a1a;
}
.mc-chat-line { color: #eee; white-space: nowrap; }
html[data-theme="light"] .mc-chat-line { color: #222; }
.mc-chat-bracket { color: #aaa; }
.mc-chat-rank  { color: #55FFFF; font-weight: bold; }
.mc-chat-rank-2 { color: #FFAA00; font-weight: bold; }
.mc-chat-name  { color: #fff; font-weight: bold; }
html[data-theme="light"] .mc-chat-name { color: #111; }
.mc-chat-colon { color: #aaa; }
.mc-chat-msg   { color: #ccc; }
html[data-theme="light"] .mc-chat-msg { color: #444; }
.mc-chat-server { color: #55FF55; font-style: italic; }

/* Crown in membership section */
.mc-crown {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.mc-crown svg {
  width: 60px;
  height: 36px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 0 8px rgba(255,170,0,.55));
}

/* Crate key icons */
.crate-key-icon {
  width: 28px;
  height: 28px;
  margin-bottom: 4px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 0 5px rgba(0,0,0,.5));
}
.crate-key-icon svg {
  width: 100%;
  height: 100%;
}
.crate-featured .crate-key-icon {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 0 8px rgba(255,170,0,.55));
}

/* Catalog block icons (free section) */
.catalog-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border-radius: 4px;
  overflow: hidden;
}
.catalog-icon svg {
  width: 100%;
  height: 100%;
}

/* Footer creeper */
.footer-creeper {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}
.footer-creeper svg {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  opacity: .4;
  transition: opacity .2s;
}
.footer-creeper:hover svg {
  opacity: .85;
  filter: drop-shadow(0 0 6px rgba(58,138,58,.5));
}

/* Catalog-text needs flex for icon + text alignment */
.catalog-text {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
}

/* ========================= END MC DECORATIONS ========================= */

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.footer-brand {
  line-height: 0;
}
.footer-brand img.footer-logo {
  display: block;
  height: 48px;
  width: auto;
  opacity: 0.85;
}

.footer-nav {
  display: flex;
  gap: 32px;
}
.footer-nav a {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  transition: color 0.18s;
}
.footer-nav a:hover { color: var(--fg); }

.footer-legal {
  background: var(--bg-raised);
  border: 1px solid var(--line-mid);
  border-radius: 2px;
  padding: 20px 24px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 20px;
}

.footer-legal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.footer-legal-icon {
  width: 15px;
  height: 15px;
  color: var(--accent);
  opacity: 0.8;
  flex-shrink: 0;
}

.footer-legal-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  white-space: nowrap;
}

.footer-legal-divider {
  width: 1px;
  height: 22px;
  background: var(--line-mid);
  flex-shrink: 0;
}

.footer-legal nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.footer-legal nav a {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: transparent;
  transition: color 0.18s, border-color 0.22s, background 0.22s, box-shadow 0.22s;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.footer-legal nav a:hover {
  color: var(--fg);
  border-color: var(--accent-border);
  background: var(--accent-dim);
  box-shadow: 0 0 10px var(--accent-bloom);
}

.footer-legal nav a.footer-legal-email {
  border-color: rgba(0,212,255,0.25);
  color: var(--accent);
  font-weight: 600;
}

.footer-legal nav a.footer-legal-email:hover {
  background: var(--accent-dim);
  border-color: var(--accent-border);
  box-shadow: 0 0 14px var(--accent-bloom);
  color: var(--fg);
}

@media (max-width: 640px) {
  .footer-legal { flex-direction: column; align-items: flex-start; }
  .footer-legal-divider { display: none; }
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--fg-muted);
  gap: 20px;
}

.footer-credit {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ========================= CART SIDEBAR ========================= */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  background: var(--bg-raised);
  border-left: 1px solid var(--line-mid);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-lg);
}
.cart-sidebar.open { transform: translateX(0); }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid var(--line);
}
.cart-header-title {
  font-family: var(--font-d);
  font-size: 1.4rem;
  letter-spacing: 0.06em;
}
.cart-close-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-mid);
  color: var(--fg-muted);
  font-size: 0.8rem;
  transition: all 0.18s;
}
.cart-close-btn:hover { border-color: var(--fg-muted); color: var(--fg); }

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 28px;
  scrollbar-width: thin;
  scrollbar-color: #222 transparent;
}

.cart-items { display: flex; flex-direction: column; gap: 12px; }

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
}

.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-price {
  font-size: 0.84rem;
  color: var(--accent);
  font-weight: 600;
}

.cart-item-remove {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-muted);
  border: 1px solid var(--line);
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: all 0.18s;
}
.cart-item-remove:hover { border-color: #ff4444; color: #ff4444; background: rgba(255, 68, 68, 0.08); }

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 60px 20px;
  color: var(--fg-muted);
  text-align: center;
}
.cart-empty p { font-size: 0.85rem; }

.cart-footer {
  padding: 20px 28px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  font-size: 0.85rem;
  font-weight: 600;
}
#cartTotal { font-family: var(--font-d); font-size: 1.4rem; color: var(--accent); }

.cart-currency-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0 4px;
  border-bottom: 1px dashed var(--line);
}
.cart-currency-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.cart-currency-select-wrap {
  display: flex;
  align-items: center;
  gap: 0;
}
.cart-currency-select {
  background: var(--bg-raised);
  color: var(--text);
  border: 1px solid var(--line-mid);
  padding: 6px 28px 6px 10px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%),
                    linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  transition: border-color 0.15s, color 0.15s;
}
.cart-currency-select:hover,
.cart-currency-select:focus {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}
.cart-checkout, .cart-clear { width: 100%; justify-content: center; }
.cart-clear { margin-top: 2px; }

/* ========================= MODALS ========================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

/* Keep rank conflict warning above all other store modals (e.g. rank details). */
#rankWarningOverlay {
  z-index: 360;
}

#rankDetailsOverlay {
  z-index: 350;
}

.modal-box {
  background: var(--bg-raised);
  border: 1px solid var(--line-mid);
  padding: 40px;
  max-width: 460px;
  width: 100%;
  position: relative;
  transform: translateY(16px);
  transition: transform 0.25s;
  box-shadow: var(--shadow-lg);
}
.modal-overlay.open .modal-box { transform: translateY(0); }

.modal-title {
  font-family: var(--font-d);
  font-size: 2rem;
  letter-spacing: 0.04em;
  color: var(--fg);
  margin-bottom: 10px;
}
.modal-body {
  font-size: 0.9rem;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.modal-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--line-mid);
  color: var(--fg);
  padding: 14px 16px;
  font-size: 0.9rem;
  margin-bottom: 14px;
  transition: border-color 0.2s;
}
.modal-input:focus { border-color: var(--accent); }
.modal-input::placeholder { color: var(--fg-muted); }

.login-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--line-mid);
  padding: 14px;
  margin-bottom: 16px;
}

.login-preview-avatar {
  width: 48px;
  height: 48px;
}

.login-preview-copy {
  min-width: 0;
}

.login-preview-name {
  color: var(--fg);
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.login-preview-uuid {
  color: var(--fg-mid);
  font-size: 0.72rem;
  line-height: 1.45;
  word-break: break-all;
}

.login-submit-loading {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.btn-primary:disabled,
.btn-ghost:disabled,
.account-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.modal-error {
  font-size: 0.78rem;
  color: #ff4444;
  margin-bottom: 16px;
  min-height: 18px;
}

.modal-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.modal-actions .btn-primary,
.modal-actions .btn-ghost { flex: 1; min-width: 120px; }

.modal-list {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: var(--fg-muted);
  line-height: 1.8;
}

.vote-sites-list {
  list-style: none;
  padding-left: 0;
  display: grid;
  gap: 10px;
}

.vote-sites-list li {
  margin: 0;
}

.vote-sites-list a {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--line-mid);
  background: var(--bg-surface);
  color: var(--fg);
  font-size: 0.84rem;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.vote-sites-list a:hover {
  border-color: var(--accent-border);
  background: var(--bg-hover);
  color: var(--accent);
}

.modal-close-x {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  color: var(--fg-muted);
  font-size: 0.72rem;
  transition: all 0.18s;
}
.modal-close-x:hover { border-color: var(--fg-muted); color: var(--fg); }

.rank-details-modal {
  max-width: 520px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.rank-details-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-right: 40px;
}

.rank-details-tier {
  font-family: var(--font-b);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 8px;
}

.rank-details-title {
  color: var(--modal-rank-color, var(--accent));
  margin-bottom: 0;
}

.rank-details-price {
  font-family: var(--font-d);
  font-size: 2rem;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--fg);
  white-space: nowrap;
}

.rank-details-summary {
  margin-bottom: 0;
}

.rank-details-scroll {
  max-height: min(46vh, 360px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 8px;
}

.rank-details-section {
  background: var(--bg-surface);
  border: 1px solid var(--line-mid);
  padding: 18px;
}

.rank-details-section-label {
  font-family: var(--font-b);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 14px;
}

.rank-details-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.rank-details-list li {
  position: relative;
  padding-left: 18px;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--fg-mid);
}

.rank-details-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 7px;
  height: 7px;
  background: var(--modal-rank-color, var(--accent));
  box-shadow: 0 0 12px var(--modal-rank-bloom, var(--accent-bloom));
}

/* ── Membership-plus yellow + ── */
.membership-plus {
  color: #FFAA00;
}

/* ── Modal rank colour tokens ── */
.rank-details-modal[data-rank="membership"] {
  --modal-rank-color: #FFAA00;
  --modal-rank-bloom: rgba(255, 170, 0, 0.30);
  --modal-rank-dim:   rgba(255, 170, 0, 0.07);
  --modal-rank-text:  #080808;
}
.rank-details-modal[data-rank="ripple"] {
  --modal-rank-color: #22c55e;
  --modal-rank-bloom: rgba(34, 197, 94, 0.30);
  --modal-rank-dim:   rgba(34, 197, 94, 0.07);
  --modal-rank-text:  #080808;
}
.rank-details-modal[data-rank="drift"] {
  --modal-rank-color: var(--accent);
  --modal-rank-bloom: var(--accent-bloom);
  --modal-rank-dim:   var(--accent-dim);
  --modal-rank-text:  var(--accent-text);
}
.rank-details-modal[data-rank="surge"] {
  --modal-rank-color: #FFAA00;
  --modal-rank-bloom: rgba(255, 170, 0, 0.30);
  --modal-rank-dim:   rgba(255, 170, 0, 0.07);
  --modal-rank-text:  #080808;
}
.rank-details-modal[data-rank="apex"] {
  --modal-rank-color: #ef4444;
  --modal-rank-bloom: rgba(239, 68, 68, 0.30);
  --modal-rank-dim:   rgba(239, 68, 68, 0.07);
  --modal-rank-text:  #ffffff;
}

/* Apply modal rank colour to accent elements */
.rank-details-modal .btn-primary {
  background: var(--modal-rank-color, var(--accent));
  border-color: var(--modal-rank-color, var(--accent));
  color: var(--modal-rank-text, var(--accent-text));
}
.rank-details-modal .btn-primary:hover {
  opacity: 0.85;
}

.rank-details-actions {
  margin-top: 2px;
}

/* ========================= TOAST ========================= */
.cart-warning-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--bg-raised);
  border: 1px solid var(--line-mid);
  color: var(--fg);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 14px 24px;
  z-index: 400;
  opacity: 0;
  transition: opacity 0.22s, transform 0.22s;
  white-space: nowrap;
  pointer-events: none;
}
.cart-warning-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ========================= RESPONSIVE ========================= */
@media (prefers-reduced-motion: reduce) {
  .grass-blade, .hero-bird, .hero-spark, .rain-drop, .mini-island, .palm-sway-group { animation: none !important; }
  .hero-wordmark-arrow,
  .hero-wordmark-skeleton { animation: none !important; }
  .ticker-message-track,
  .ticker-message-text { animation: none !important; }
  .hero-logo {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (max-width: 1200px) {
  :root {
    --pad-h: 48px;
    --pad-v: 80px;
  }

  .ledger-head,
  .ledger-row {
    grid-template-columns: 52px 150px 1fr 100px 110px;
  }

}

@media (max-width: 1024px) {
  :root { --pad-h: 32px; }

  .mini-island {
    right: 10%;
    bottom: 12px;
    width: clamp(150px, 20vw, 260px);
    --island-scale: 0.9;
    --island-bob: 7px;
  }

  .ledger-head,
  .ledger-row {
    grid-template-columns: 48px 130px 1fr 90px 100px;
  }

  .tags-billboard {
    grid-template-columns: 1fr;
  }
  .billboard-left {
    grid-column: 1;
    padding: 40px 0;
    border-right: none;
    border-bottom: 1px solid var(--line-mid);
  }
  .tags-billboard .tag-crate-col {
    grid-column: 1;
    border-top: none;
    padding: 36px 0;
  }
  .billboard-heading { font-size: clamp(56px, 10vw, 88px); }
}

@media (max-width: 860px) {
  :root { --pad-h: 24px; --pad-v: 64px; }

  .site-nav { padding: 0 24px; grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; grid-column: unset; position: fixed; top: 68px; left: 0; right: 0; flex-direction: column; background: var(--bg-raised); border-bottom: 1px solid var(--line-mid); padding: 20px 24px; gap: 0; }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--line); }
  .nav-links .nav-link { display: block; padding: 14px 0; font-size: 0.8rem; }
  .nav-right { grid-column: 2; justify-self: end; }
  .mobile-menu-btn { display: flex; }

  .mini-island {
    right: 10%;
    bottom: 16px;
    width: clamp(130px, 22vw, 200px);
    --island-scale: 0.75;
    --island-bob: 6px;
  }

  .hero-wordmark {
    --wordmark-arrow-y: 54%;
    --wordmark-skeleton-x: 54%;
  }

  /* Arrow: pull ends in slightly, shrink height to fit the smaller wordmark */
  .hero-wordmark-arrow {
    left: -5%;
    right: -3%;
    height: 22px;
  }
  .hero-wordmark-arrow::before { left: 24px; right: 34px; top: calc(50% - 2px); height: 5px; }
  /* 32:56 ratio → 26×46px; top:-12px centres the shaft (SVG y=28) on container centre (11px) */
  .arrow-svg-left  { width: 26px; height: 46px; top: -12px; }
  .arrow-svg-right { width: 36px; height: 22px; }

  /* Skeleton: scale down the container — SVG scales automatically */
  .hero-wordmark-skeleton { width: 32px; height: 54px; }

  .hero-foot { flex-direction: column; align-items: center; gap: 28px; }
  .hero-body { padding-top: 68px; padding-bottom: clamp(150px, 18vh, 210px); }
  .account-name { max-width: 78px; }

  .ledger-head { display: none; }
  .ledger-row {
    grid-template-columns: 40px 1fr;
    grid-template-rows: auto auto auto;
    gap: 8px 16px;
    padding: 22px 12px;
  }
  .col-name { grid-column: 2; }
  .col-desc { grid-column: 1 / -1; padding-right: 0; padding-top: 4px; }
  .col-price {
    grid-column: 1;
    grid-row: 3;
    font-size: 1.4rem;
    text-align: left;
    padding-right: 0;
  }
  .col-action {
    grid-column: 2;
    grid-row: 3;
    justify-self: end;
    align-self: center;
  }
  .ledger-num { font-size: 0.9rem; }
  .ledger-desc-button { padding: 12px 14px; }
  .rank-details-modal { max-width: 500px; }

  .section-top { flex-direction: column; gap: 16px; }
  .section-note { text-align: left; max-width: 100%; }

  .crate-columns { grid-template-columns: 1fr; border: none; gap: 1px; background: var(--line-mid); }
  .crate-col { border-right: none !important; border-bottom: none; background: var(--bg); }
  .crate-col:not(:last-child) { border-bottom: none; }
  .crate-featured { background: var(--bg-raised); }

  .tags-billboard {
    grid-template-columns: 1fr;
  }
  .billboard-left {
    padding: 0 0 32px 0;
    border-bottom: 1px solid var(--line-mid);
  }
  .tags-billboard .tag-crate-col { padding: 32px 0; margin-top: 32px; }

  .mc-chat-preview { font-size: 11px; padding: 8px 10px; max-width: 100%; overflow-x: auto; }
  .mc-chat-line { white-space: normal; word-break: break-word; }

  .tag-showcase { gap: 10px; }
  .tag-item { padding: 12px 14px; }

  .footer-top { flex-direction: column; gap: 24px; align-items: flex-start; }
  .footer-nav { flex-wrap: wrap; gap: 16px 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; }

  .cart-sidebar { width: 100%; }
}

@media (max-width: 480px) {
  .tag-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
  }
  .tag-label { white-space: normal; }
}

@media (max-width: 560px) {
  :root { --pad-h: 16px; }

  .mini-island {
    right: 10%;
    bottom: 22px;
    width: clamp(100px, 22vw, 140px);
    --island-scale: 0.80;
    --island-bob: 4px;
  }

  .oak-canopy use { filter: none; }

  .account-btn {
    padding: 0 12px;
    font-size: 0.63rem;
    letter-spacing: 0.1em;
  }
  .account-profile { padding-right: 6px; }
  .account-name,
  .account-logout { display: none; }

  .hero-wordmark { font-size: clamp(72px, 20vw, 128px); }
  .hero-wordmark {
    --wordmark-arrow-y: 53%;
    --wordmark-skeleton-x: 53%;
  }

  /* Arrow: even tighter on smallest phones */
  .hero-wordmark-arrow {
    left: -2%;
    right: -1%;
    height: 18px;
  }
  .hero-wordmark-arrow::before { left: 20px; right: 28px; top: calc(50% - 2px); height: 4px; }
  /* 32:56 ratio → 22×38px; top:-10px centres shaft on container centre (9px) */
  .arrow-svg-left  { width: 22px; height: 38px; top: -10px; }
  .arrow-svg-right { width: 30px; height: 18px; }

  /* Skeleton: smallest size — SVG still internally detailed */
  .hero-wordmark-skeleton { width: 26px; height: 44px; }

  .hero-body { padding-top: 68px; padding-bottom: clamp(130px, 16vh, 190px); }
  .hero-ctas { flex-direction: column; align-items: center; }
  .server-ip-block { width: auto; }

  .hero-ticker { padding: 12px 0; }
  .hero-ticker-viewport { height: 1.3em; }
  .ticker-message-text {
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    font-weight: 700;
  }

  .ledger-row { padding: 20px 10px; }
  .ledger-add { min-width: 98px; padding: 10px 16px; }
  .col-price { font-size: 1.25rem; }

  .rank-details-modal {
    padding: 22px 18px;
    max-width: 100%;
  }
  .rank-details-head {
    flex-direction: column;
    gap: 10px;
    padding-right: 34px;
  }
  .rank-details-price { font-size: 1.7rem; }
  .rank-details-scroll { max-height: min(50vh, 320px); padding-right: 4px; }
  .rank-details-section { padding: 16px; }

  .stage-heading { font-size: clamp(64px, 16vw, 100px); }

  .modal-box { padding: 28px 20px; }
  .modal-actions { flex-direction: column; }
  .modal-actions .btn-primary,
  .modal-actions .btn-ghost { width: 100%; }

  .catalog-item { grid-template-columns: 1fr; gap: 16px; }
  .catalog-claim { width: 100%; }

  .qty-add-btn  { height: 40px; }
}

/* ========================= PAGE LOADER ========================= */
#pageLoader {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: var(--bg);
  transition: opacity 0.55s ease, visibility 0.55s ease;
}
#pageLoader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-logo {
  width: clamp(140px, 22vw, 220px);
  height: auto;
  animation: loaderPulseDark 1.1s ease-in-out infinite alternate;
}
@keyframes loaderPulseDark {
  from { filter: brightness(0.75) drop-shadow(0 0 18px rgba(0,212,255,0.18)); opacity: 0.65; }
  to   { filter: brightness(1.15) drop-shadow(0 0 48px rgba(0,212,255,0.55)); opacity: 1; }
}
html[data-theme="light"] .loader-logo {
  animation-name: loaderPulseLight;
}
@keyframes loaderPulseLight {
  from { filter: brightness(0.9) contrast(1.05) drop-shadow(0 0 10px rgba(0,0,0,0.12)); opacity: 0.72; }
  to   { filter: brightness(1.02) contrast(1.12) drop-shadow(0 0 22px rgba(0,0,0,0.2)); opacity: 1; }
}
.loader-bar-track {
  width: clamp(140px, 22vw, 220px);
  height: 2px;
  background: var(--line-mid);
  overflow: hidden;
}
.loader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #ffc400);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  .loader-logo { animation: none; }
  #pageLoader { transition: none; }
}

/* ========================= SCROLL REVEAL ========================= */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] {
    opacity: 0;
    transition: opacity 0.48s ease, transform 0.48s ease;
    will-change: opacity, transform;
  }
  [data-reveal="up"]    { transform: translateY(28px); }
  [data-reveal="left"]  { transform: translateX(-28px); }
  [data-reveal="right"] { transform: translateX(28px); }
  [data-reveal="scale"] { transform: scale(0.95); }
  [data-reveal="fade"]  { transform: none; }

  [data-reveal].is-revealed {
    opacity: 1;
    transform: none;
  }
}
