/*
 * MinecraftAlts. Deepslate dark with emerald and gold - the colours of a villager trade.
 * The 3D cape and player rules (.model, .player, .spinner-3d ...) are ender.bio's cape shop's,
 * kept as they are so app.js can build the same models.
 */
:root {
  --bg: #090D0B;
  --bg-2: #0C120F;
  --panel: #111915;
  --panel-2: #16211B;
  --panel-3: #1C2A22;
  --line: #22322A;
  --line-soft: #19251F;
  --text: #ECF7F0;
  --dim: #9BB3A6;
  --dimmer: #63806F;
  --accent: #2EE57E;
  --accent-2: #8DFFB9;
  --accent-deep: #0F9D4E;
  --ink: #03150A;
  --gold: #FFCF4A;
  --bad: #FF6B7A;
  --sans: 'Inter', system-ui, sans-serif;
  --display: 'Space Grotesk', var(--sans);
  --pixel: 'Pixelify Sans', var(--display);
  --radius: 14px;
  --nav-h: 68px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  /* Stepped, block-cut corners. */
  --notch: polygon(0 6px, 6px 6px, 6px 0, calc(100% - 6px) 0, calc(100% - 6px) 6px, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 6px calc(100% - 6px), 0 calc(100% - 6px));
  --notch-sm: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
/* A faint block grid, like looking down at deepslate. */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(var(--line-soft) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px) 0 0 / 48px 48px;
  opacity: .35;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
}
img, canvas { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; margin: 0; line-height: 1.1; }
p { margin: 0; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.wrap.narrow { width: min(820px, 100% - 32px); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border: 0; font-weight: 600; font-size: 15px; white-space: nowrap;
  background: var(--panel-3); color: var(--text); clip-path: var(--notch-sm);
  transition: transform .2s var(--ease-out), background .2s, box-shadow .2s, color .2s;
}
.btn:hover { background: #24362C; }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: var(--accent); color: var(--ink);
  box-shadow: inset 0 -4px 0 var(--accent-deep), inset 0 2px 0 var(--accent-2);
}
.btn.primary:hover { background: #4BF293; }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent-2); }
.btn.big { height: 52px; padding: 0 24px; font-size: 16px; clip-path: var(--notch); }
.btn.small { height: 36px; padding: 0 14px; font-size: 14px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.round {
  width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: var(--panel-3); color: var(--text); transition: background .2s, color .2s;
}
.round:hover { background: var(--accent); color: var(--ink); }
.link { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; }

/* ------------------------------------------------------------------ nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.nav.scrolled { border-color: var(--line); }
.nav-row { height: 100%; display: flex; align-items: center; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-gem {
  width: 28px; height: 28px; image-rendering: pixelated;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' shape-rendering='crispEdges'%3E%3Cpath fill='%2307361b' d='M2 0h4v1h1v1h1v4H7v1H6v1H2V7H1V6H0V2h1V1h1z'/%3E%3Cpath fill='%2317c964' d='M2 1h4v1h1v4H6v1H2V6H1V2h1z'/%3E%3Cpath fill='%237dffb2' d='M3 2h2v1H3zM2 3h1v1H2z'/%3E%3Cpath fill='%230f9d4e' d='M5 5h1v1H5zM4 6h2v0H4z'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--accent) 50%, transparent));
}
.logo-word { font: 700 22px/1 var(--pixel); letter-spacing: .01em; }
.logo-word b { color: var(--accent); font-weight: 700; }
.nav-links { display: flex; gap: 4px; margin-left: 12px; }
.nav-links a { padding: 8px 12px; color: var(--dim); font-weight: 500; font-size: 15px; border-radius: 8px; transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--text); background: var(--panel); }
.nav-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.basket-btn { position: relative; }
.count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center;
  background: var(--gold); color: #2B1E00; font: 700 12px/1 var(--sans);
}
.count.bump { animation: bump .4s var(--ease-spring); }
@keyframes bump { 35% { transform: scale(1.45); } }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; padding: calc(var(--nav-h) + 40px) 0 40px; isolation: isolate; overflow: hidden; }
.particles { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-glow {
  position: absolute; z-index: -2; top: -10%; right: -10%; width: 900px; height: 900px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
}
.hero-row { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; min-height: min(680px, 80vh); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px; margin-bottom: 22px;
  font: 600 13px/1 var(--sans); color: var(--accent-2); letter-spacing: .02em;
  background: color-mix(in srgb, var(--accent) 10%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); border-radius: 99px;
}
.dot { width: 8px; height: 8px; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: blink 2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
.hero h1 { font-size: clamp(42px, 6.4vw, 80px); font-weight: 700; line-height: 1; letter-spacing: -.035em; max-width: 12ch; }
.shine {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 35%, var(--gold) 55%, var(--accent) 80%) 0 0 / 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 8s linear infinite;
}
@keyframes shine { to { background-position: -220% 0; } }
.lede { margin-top: 22px; font-size: 18px; color: var(--dim); max-width: 50ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.promises { display: flex; flex-wrap: wrap; gap: 10px 24px; list-style: none; padding: 0; margin: 32px 0 0; color: var(--dim); font-size: 14px; }
.promises li { display: inline-flex; align-items: center; gap: 8px; }
.promises .ic { color: var(--accent); }

.showcase { position: relative; margin: 0; height: 560px; display: grid; place-items: center; perspective: 1000px; }
.showcase-stage { position: relative; display: grid; place-items: center; width: 100%; height: 100%; transition: opacity .35s, transform .35s var(--ease-out); }
.showcase-stage.swap { opacity: 0; transform: translateY(10px) scale(.97); }
.pedestal {
  position: absolute; left: 50%; bottom: 92px; width: 300px; height: 70px; transform: translateX(-50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--glow, var(--accent)) 45%, transparent), transparent);
  filter: blur(6px); animation: breathe 4s ease-in-out infinite; transition: background .6s;
}
@keyframes breathe { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }
.showcase-tag {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px; padding: 10px; min-width: 330px;
  background: color-mix(in srgb, var(--panel) 85%, transparent); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 18px;
}
.tag-text { flex: 1; display: grid; justify-items: center; gap: 4px; text-align: center; }
.tag-text strong { font: 600 18px/1.1 var(--display); }
.tag-text a { font-size: 13px; color: var(--accent); font-weight: 600; }
.tag-text a:hover { text-decoration: underline; }
.drag-hint { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dimmer); }
.showcase .drag-hint { position: absolute; top: 12px; right: 12px; }

/* ------------------------------------------------------------------ tier badge */
.tier-badge {
  --c: var(--dim);
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px;
  font: 700 12px/1 var(--pixel); letter-spacing: .06em; text-transform: uppercase; color: var(--c);
  background: color-mix(in srgb, var(--c) 13%, transparent); clip-path: var(--notch-sm);
}
.tier-badge::before { content: ''; width: 6px; height: 6px; background: var(--c); }
.tier-badge.mythic { background: linear-gradient(90deg, color-mix(in srgb, #FF5C7A 18%, transparent), color-mix(in srgb, #FFC94D 18%, transparent)); }

/* ------------------------------------------------------------------ ribbon */
.ribbon {
  padding: 26px 0; display: grid; gap: 14px; overflow: hidden; border-block: 1px solid var(--line-soft);
  background: var(--bg-2);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.ribbon-row { display: flex; gap: 14px; width: max-content; animation: drift 80s linear infinite; }
.ribbon-row.reverse { animation-direction: reverse; animation-duration: 95s; }
.ribbon:hover .ribbon-row { animation-play-state: paused; }
@keyframes drift { to { transform: translateX(-50%); } }
.rib-cape {
  display: grid; place-items: center; width: 64px; height: 92px; flex: none; border: 0; padding: 0;
  background: var(--panel); border-radius: 10px; transition: transform .25s var(--ease-spring), background .2s;
}
.rib-cape canvas { width: 40px; height: 64px; image-rendering: pixelated; filter: drop-shadow(0 6px 8px rgba(0,0,0,.5)); }
.rib-cape:hover { transform: translateY(-4px) scale(1.08); background: var(--panel-3); }

/* ------------------------------------------------------------------ sections */
.section { padding: 110px 0 0; }
.section:last-of-type { padding-bottom: 110px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head.center { justify-content: center; text-align: center; margin-bottom: 44px; }
.kicker { font: 700 14px/1 var(--pixel); color: var(--accent); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; }
.section h2 { font-size: clamp(30px, 4vw, 48px); font-weight: 700; }
.sub { color: var(--dim); margin-top: 10px; max-width: 56ch; }
.tools { display: flex; gap: 10px; flex-wrap: wrap; }
.search, .select {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; color: var(--dim);
  transition: border-color .2s;
}
.search:focus-within, .select:focus-within { border-color: var(--accent); }
.search input, .select select { background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 15px; }
.search input { width: 220px; }
.select select { cursor: pointer; padding-right: 4px; }
.select option { background: var(--panel); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
  --c: var(--accent);
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 99px; background: var(--panel); color: var(--dim);
  font-size: 14px; font-weight: 600; transition: all .2s;
}
.chip i { width: 8px; height: 8px; background: var(--c); }
.chip .n { color: var(--dimmer); font-weight: 500; }
.chip:hover { color: var(--text); border-color: color-mix(in srgb, var(--c) 50%, var(--line)); }
.chip.on { color: var(--text); border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--panel)); }
.chips.small .chip { height: 32px; font-size: 13px; padding: 0 12px; }

/* ------------------------------------------------------------------ account cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.card {
  --glow: var(--accent);
  position: relative; display: flex; flex-direction: column; text-align: left; padding: 0; border: 0;
  background: var(--panel); border-radius: var(--radius); overflow: hidden; isolation: isolate;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .35s var(--ease-out), box-shadow .35s;
  animation: rise .6s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 50ms);
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.card::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 30%), color-mix(in srgb, var(--glow) 14%, transparent), transparent 60%);
}
.card:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--glow) 55%, var(--line)), 0 24px 50px -20px color-mix(in srgb, var(--glow) 40%, transparent); }
.card:hover::before { opacity: 1; }
.card.mythic { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--glow) 35%, var(--line)); }
.card-stage {
  position: relative; height: 230px; display: grid; place-items: center; perspective: 700px; overflow: hidden; cursor: pointer;
  background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--glow) 18%, transparent), transparent 62%);
  border-bottom: 1px solid var(--line-soft);
}
.card-stage .tier-badge { position: absolute; top: 14px; left: 14px; }
.card-stage .since { position: absolute; top: 14px; right: 14px; font: 600 12px/22px var(--sans); color: var(--dimmer); }
.feat {
  position: absolute; bottom: 12px; left: 14px; font: 700 11px/1 var(--pixel); letter-spacing: .08em; text-transform: uppercase;
  color: var(--gold); display: inline-flex; gap: 6px; align-items: center;
}
.feat::before { content: ''; width: 6px; height: 6px; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.card-body { display: flex; flex-direction: column; gap: 12px; padding: 18px; flex: 1; }
.card h3 { font-size: 19px; font-weight: 600; cursor: pointer; }
.card h3:hover { color: var(--accent-2); }
.mini-capes { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mini { width: 22px; height: 34px; display: grid; place-items: center; background: var(--panel-2); border-radius: 5px; }
.mini canvas { width: 15px; height: 24px; image-rendering: pixelated; }
.mini-label { font-size: 13px; color: var(--dim); margin-left: 4px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 0; font-size: 13px; }
.facts div { display: grid; gap: 1px; }
.facts dt { color: var(--dimmer); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.facts dd { margin: 0; color: var(--text); font-weight: 500; }
.card-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px dashed var(--line); }
.price { font: 700 24px/1 var(--pixel); color: var(--gold); letter-spacing: .01em; }
.price.big { font-size: 34px; }
.card-foot .btn { height: 38px; }
.card-foot .btn.in { background: var(--panel-3); color: var(--accent); box-shadow: none; }
.empty { text-align: center; color: var(--dim); padding: 50px 0; }

/* ------------------------------------------------------------------ gallery */
.gal { display: grid; grid-template-columns: 1fr 1.05fr; gap: 20px; }
.gal-view {
  position: relative; display: flex; flex-direction: column; background: var(--panel); border-radius: 20px;
  box-shadow: inset 0 0 0 1px var(--line); overflow: hidden;
}
.gal-view::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--glow, var(--accent)) 16%, transparent), transparent 55%);
  transition: background .5s;
}
.gal-stage { position: relative; height: 470px; display: grid; place-items: center; perspective: 1100px; }
.gal-view .seg { position: absolute; top: 16px; left: 16px; }
.gal-info { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; border-top: 1px solid var(--line-soft); background: var(--panel-2); }
.gal-info h3 { font-size: 22px; margin-top: 8px; }
.gal-info .meta { color: var(--dim); font-size: 14px; margin-top: 4px; }
.gal-side { display: flex; flex-direction: column; min-width: 0; }
.gal-side .chips { margin-bottom: 14px; }
.gal-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 10px; align-content: start;
  max-height: 560px; overflow: auto; padding: 2px 6px 2px 2px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.gal-tile {
  --c: var(--dim);
  position: relative; display: grid; place-items: center; height: 108px; border: 0; border-radius: 12px; padding: 0;
  background: var(--panel); box-shadow: inset 0 0 0 1px var(--line-soft); transition: transform .2s var(--ease-out), box-shadow .2s, background .2s;
}
.gal-tile canvas { width: 45px; height: 72px; image-rendering: pixelated; filter: drop-shadow(0 8px 10px rgba(0,0,0,.5)); }
.gal-tile::after { content: ''; position: absolute; top: 8px; right: 8px; width: 6px; height: 6px; background: var(--c); }
.gal-tile:hover { transform: translateY(-2px); background: var(--panel-2); }
.gal-tile.on { box-shadow: inset 0 0 0 2px var(--c); background: color-mix(in srgb, var(--c) 10%, var(--panel)); }
.gal-tile .stock-dot { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); font: 700 10px/1 var(--pixel); color: var(--accent); white-space: nowrap; }

.seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--panel-2); border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); z-index: 2; }
.seg button { height: 30px; padding: 0 12px; border: 0; border-radius: 7px; background: none; color: var(--dim); font-size: 13px; font-weight: 600; transition: background .2s, color .2s; }
.seg button.on { background: var(--accent); color: var(--ink); }
.seg button[disabled] { opacity: .35; cursor: not-allowed; }

/* ------------------------------------------------------------------ how it works */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.steps li { position: relative; padding: 26px 22px; background: var(--panel); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); }
.steps li:not(:last-child)::after {
  content: ''; position: absolute; top: 46px; right: -12px; width: 8px; height: 8px; background: var(--accent);
  box-shadow: -10px 0 0 color-mix(in srgb, var(--accent) 50%, transparent); z-index: 1;
}
.step-n {
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px;
  font: 700 22px/1 var(--pixel); color: var(--ink); background: var(--accent); clip-path: var(--notch-sm);
  box-shadow: inset 0 -4px 0 var(--accent-deep), inset 0 2px 0 var(--accent-2);
}
.steps h3 { font-size: 19px; margin-bottom: 8px; }
.steps p { color: var(--dim); font-size: 15px; }
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.trust-card { padding: 24px 22px; border-radius: var(--radius); background: linear-gradient(160deg, var(--panel-2), var(--panel)); box-shadow: inset 0 0 0 1px var(--line); }
.trust-card .ic { width: 26px; height: 26px; color: var(--gold); margin-bottom: 14px; }
.trust-card h3 { font-size: 18px; margin-bottom: 6px; }
.trust-card p { color: var(--dim); font-size: 15px; }

/* ------------------------------------------------------------------ faq */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--panel); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s; }
.faq details[open] { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, var(--line)); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 22px; font: 600 17px/1.3 var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 700 22px/1 var(--pixel); color: var(--accent); transition: transform .25s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 22px 22px; color: var(--dim); }

/* ------------------------------------------------------------------ closing */
.cta {
  position: relative; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 30px; padding: 56px;
  border-radius: 24px; overflow: hidden; isolation: isolate;
  background: radial-gradient(circle at 85% 50%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 55%), linear-gradient(140deg, var(--panel-2), var(--panel));
  box-shadow: inset 0 0 0 1px var(--line);
}
.cta h2 { font-size: clamp(30px, 4vw, 46px); max-width: 16ch; }
.cta p { color: var(--dim); margin: 14px 0 28px; max-width: 46ch; }
.cta-capes { height: 260px; display: flex; align-items: center; justify-content: center; gap: 14px; perspective: 900px; }
.cta-capes .spinner-3d { animation-duration: 9s; }

/* ------------------------------------------------------------------ footer */
.footer { border-top: 1px solid var(--line-soft); padding: 40px 0; background: var(--bg-2); }
.foot-row { display: flex; justify-content: space-between; align-items: start; gap: 24px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; color: var(--dim); font-size: 15px; }
.foot-links a:hover { color: var(--accent); }
.fine { color: var(--dimmer); font-size: 13px; margin-top: 10px; }
.fine.center { text-align: center; }
.disclaimer { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line-soft); }

/* ------------------------------------------------------------------ viewer dialog */
dialog { color: var(--text); padding: 0; border: 0; }
dialog::backdrop { background: rgba(2, 6, 4, .72); backdrop-filter: blur(6px); }
.viewer {
  width: min(1000px, 100% - 24px); max-height: calc(100% - 24px); border-radius: 22px; background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line), 0 40px 120px -20px rgba(0,0,0,.8); overflow: auto;
}
.viewer[open] { animation: pop .35s var(--ease-out); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.viewer .close { position: absolute; top: 14px; right: 14px; z-index: 3; }
.viewer-row { display: grid; grid-template-columns: 1fr 1fr; }
.viewer-left {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 10px; padding: 18px;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--glow, var(--accent)) 20%, transparent), transparent 60%), var(--bg-2);
}
.viewer-left .seg { align-self: flex-start; }
.viewer-stage { flex: 1; width: 100%; min-height: 440px; display: grid; place-items: center; perspective: 1000px; overflow: hidden; }
.viewer-right { padding: 34px 32px 30px; display: flex; flex-direction: column; gap: 14px; }
.viewer-right h2 { font-size: 30px; padding-right: 40px; }
.viewer-right .tier-badge, .gal-info .tier-badge { align-self: flex-start; }
.v-note { color: var(--dim); }
.label { display: block; color: var(--dimmer); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.v-capes { display: flex; gap: 8px; flex-wrap: wrap; }
.v-cape {
  --c: var(--dim);
  display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border: 0; border-radius: 12px;
  background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 600; transition: box-shadow .2s, background .2s;
}
.v-cape .mini { background: var(--bg-2); }
.v-cape.on { box-shadow: inset 0 0 0 2px var(--c); background: color-mix(in srgb, var(--c) 10%, var(--panel-2)); }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 0; }
.specs div { padding: 12px 14px; background: var(--panel-2); border-radius: 12px; }
.specs dt { color: var(--dimmer); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.specs dd { margin: 2px 0 0; font-weight: 600; }
.included { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 14px; color: var(--dim); }
.included li { display: flex; gap: 8px; align-items: center; }
.included .ic { color: var(--accent); width: 16px; height: 16px; }
.v-buy { margin-top: auto; padding-top: 18px; border-top: 1px dashed var(--line); display: flex; align-items: end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.v-btns { display: flex; gap: 10px; }

/* ------------------------------------------------------------------ basket drawer */
.drawer {
  margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(440px, 100%); background: var(--panel);
  box-shadow: inset 1px 0 0 var(--line); display: none; flex-direction: column;
}
.drawer[open] { display: flex; animation: slide .35s var(--ease-out); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line-soft); }
.drawer-head h2 { font-size: 22px; }
.drawer-body { flex: 1; overflow: auto; padding: 14px 22px; display: grid; gap: 10px; align-content: start; }
.b-item { display: grid; grid-template-columns: 58px 1fr auto; gap: 14px; align-items: center; padding: 10px; background: var(--panel-2); border-radius: 14px; }
.b-thumb { width: 58px; height: 76px; display: grid; place-items: center; background: var(--bg-2); border-radius: 10px; }
.b-thumb canvas { width: 30px; height: 48px; image-rendering: pixelated; }
.b-item strong { display: block; font-family: var(--display); font-weight: 600; }
.b-item small { color: var(--dim); }
.b-item .price { font-size: 18px; display: block; margin-top: 4px; }
.b-item .round { width: 34px; height: 34px; background: transparent; color: var(--dimmer); }
.b-item .round:hover { background: color-mix(in srgb, var(--bad) 20%, transparent); color: var(--bad); }
.b-empty { text-align: center; color: var(--dim); padding: 50px 10px; display: grid; gap: 14px; justify-items: center; }
.drawer-foot { padding: 18px 22px 22px; border-top: 1px solid var(--line-soft); }
.total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.total-row strong { font: 700 28px/1 var(--pixel); color: var(--gold); }

/* ------------------------------------------------------------------ toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  padding: 12px 18px; border-radius: 12px; background: var(--panel-3); box-shadow: inset 0 0 0 1px var(--line), 0 16px 40px rgba(0,0,0,.5);
  font-weight: 600; font-size: 14px; transition: transform .3s var(--ease-out), opacity .3s; max-width: calc(100% - 32px);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ------------------------------------------------------------------ the 3D cape (from ender.bio's cape shop)
 * Built by app.js from the texture: six faces for the cape (10x16x1 texels) or two wings for the
 * elytra, each face a canvas cut from the texture exactly where the game reads it. */
.model { position: relative; transform-style: preserve-3d; }
.model canvas { position: absolute; left: 0; top: 0; image-rendering: pixelated; backface-visibility: hidden; }
.model .shade { filter: brightness(.72); }
.model .shade-2 { filter: brightness(.55); }
.spinner-3d { transform-style: preserve-3d; transition: transform .5s var(--ease-out); }
.sway { animation: sway 7s ease-in-out infinite; }
.twirl { animation: twirl 16s linear infinite; }
@keyframes sway {
  0%, 100% { transform: rotateX(-10deg) rotateY(-32deg); }
  50% { transform: rotateX(-4deg) rotateY(28deg); }
}
@keyframes twirl { from { transform: rotateX(-8deg) rotateY(0deg); } to { transform: rotateX(-8deg) rotateY(360deg); } }
.grabbable { cursor: grab; touch-action: pan-y; }
.grabbable.grabbing { cursor: grabbing; }

/* A player wearing the cape. Positions in texels times the size of one texel; .player-turn starts it
 * with its back to the viewer. */
.player { position: relative; transform-style: preserve-3d; }
.player-turn { transform-style: preserve-3d; transform: rotateY(180deg); }
.player .part, .player .box, .player .hang, .player .wings { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; }
.player canvas { position: absolute; image-rendering: pixelated; backface-visibility: hidden; }
.player .shade { filter: brightness(.72); }
.player .shade-2 { filter: brightness(.55); }
.player .model { position: absolute; }
.player .cape-hang { transform-origin: 50% 0; transform: rotateX(10deg); }
.player .wings { transform: rotateX(14deg); }
.player canvas.wing { backface-visibility: visible; }
.player .floor { position: absolute; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.6), transparent); }
.player.alive .p-head { animation: look 9s ease-in-out infinite; }
.player.alive .p-arm-r { animation: idle-r 3.6s ease-in-out infinite; }
.player.alive .p-arm-l { animation: idle-l 3.6s ease-in-out infinite; }
.player.alive .cape-hang { animation: flutter 3.6s ease-in-out infinite; }
@keyframes look { 0%, 100% { transform: rotateY(-12deg) rotateX(-3deg); } 50% { transform: rotateY(14deg) rotateX(2deg); } }
@keyframes idle-r { 0%, 100% { transform: rotateZ(1deg) rotateX(-3deg); } 50% { transform: rotateZ(5deg) rotateX(3deg); } }
@keyframes idle-l { 0%, 100% { transform: rotateZ(-1deg) rotateX(3deg); } 50% { transform: rotateZ(-5deg) rotateX(-3deg); } }
@keyframes flutter { 0%, 100% { transform: rotateX(7deg); } 50% { transform: rotateX(15deg); } }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 980px) {
  .hero-row, .gal, .cta, .viewer-row { grid-template-columns: 1fr; }
  .hero-row { min-height: 0; }
  .showcase { height: 500px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li::after { display: none; }
  .gal-grid { max-height: none; }
  .cta { padding: 36px 28px; }
  .cta-capes { height: 200px; }
  .viewer-stage { min-height: 360px; }
}
@media (max-width: 720px) {
  .nav-links, .hide-sm { display: none; }
  .hero { padding-top: calc(var(--nav-h) + 24px); }
  .showcase { height: 440px; }
  .showcase-tag { min-width: 0; width: calc(100% - 8px); }
  .steps, .trust { grid-template-columns: 1fr; }
  .tools, .search { width: 100%; }
  .search input { width: 100%; }
  .section { padding-top: 80px; }
  .gal-stage { height: 380px; }
  .gal-info { flex-direction: column; align-items: stretch; }
  .viewer-right { padding: 24px 20px; }
  .v-buy, .v-btns { width: 100%; }
  .v-btns .btn { flex: 1; }
  .cta-capes { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ------------------------------------------------------------------ cape codes */
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.code-card .card-stage { height: 190px; }
.code-card h3 { font-size: 18px; }
.code-note { color: var(--dim); font-size: 14px; line-height: 1.5; }
.code-card .price { font-size: 22px; }
.gal-tile .stock-dot.code { color: var(--gold); }

/* ------------------------------------------------------------------ crypto */
.coin-mark {
  --coin: var(--gold);
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; flex: none;
  font: 700 13px/1 var(--sans); color: #fff; background: var(--coin);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.25), 0 0 0 2px var(--bg);
}
.pay-strip { display: flex; align-items: center; gap: 12px; margin-top: 18px; color: var(--dimmer); font-size: 13px; font-weight: 600; }
.coin-row { display: flex; }
.coin-row .coin-mark + .coin-mark { margin-left: -4px; }
.coins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 14px; }
.coin {
  --coin: var(--gold);
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border: 0; border-radius: 10px;
  background: var(--panel-2); color: var(--dim); font-size: 13px; font-weight: 700; letter-spacing: .02em;
  box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .2s, color .2s, background .2s;
}
.coin .coin-mark { width: 20px; height: 20px; font-size: 12px; box-shadow: none; }
.coin:hover { color: var(--text); }
.coin.on { color: var(--text); background: color-mix(in srgb, var(--coin) 12%, var(--panel-2)); box-shadow: inset 0 0 0 2px var(--coin); }

/* ------------------------------------------------------------------ basket checkout fields */
.fee-row { display: flex; justify-content: space-between; color: var(--dim); font-size: 14px; margin-bottom: 6px; }
.field { display: grid; gap: 6px; margin: 4px 0 14px; }
.field input {
  height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2);
  color: var(--text); font: inherit; font-size: 15px; outline: 0; transition: border-color .2s;
}
.field input:focus { border-color: var(--accent); }
.field input.bad { border-color: var(--bad); }
.drawer-foot .total-row { margin: 8px 0 14px; padding-top: 10px; border-top: 1px dashed var(--line); }

/* ------------------------------------------------------------------ payment page */
.order-page main { padding: calc(var(--nav-h) + 40px) 0 100px; }
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; margin-top: 8px; }
.pay-status {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 36px 28px;
  background: var(--panel); border-radius: 22px; box-shadow: inset 0 0 0 1px var(--line);
}
.pay-status h1 { font-size: clamp(26px, 3vw, 34px); margin-top: 6px; }
.pay-lede { color: var(--dim); max-width: 42ch; }

.wheel { position: relative; width: 240px; height: 240px; --wc: var(--accent); }
.wheel svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.wheel circle { fill: none; stroke-width: 14; }
.wheel-track { stroke: var(--panel-3); }
.wheel-ticks { stroke: var(--bg); stroke-width: 16 !important; stroke-dasharray: 2 52.45; opacity: .55; }
.wheel-bar { stroke: var(--wc); stroke-linecap: butt; transition: stroke-dashoffset 1s linear, stroke .6s; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--wc) 60%, transparent)); }
.wheel-spin { stroke: var(--wc); stroke-dasharray: 120 534; opacity: 0; transform-origin: 120px 120px; filter: drop-shadow(0 0 12px var(--wc)); }
.wheel.mid { --wc: var(--gold); }
.wheel.low { --wc: var(--bad); }
.wheel.spinning .wheel-bar { opacity: .18; filter: none; }
.wheel.spinning .wheel-spin { opacity: 1; animation: wheel-spin 1.4s linear infinite; }
@keyframes wheel-spin { to { transform: rotate(360deg); } }
.wheel.done .wheel-bar { stroke-dashoffset: 0 !important; }
.wheel.done.held { --wc: var(--gold); }
.wheel.expired { --wc: var(--bad); }
.wheel.expired .wheel-track { stroke: color-mix(in srgb, var(--bad) 20%, var(--panel-3)); }
.wheel-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 2px; }
.wheel-time { font: 700 50px/1 var(--pixel); color: var(--text); letter-spacing: .02em; }
.wheel.done .wheel-time { color: var(--wc); font-size: 64px; }
.wheel-sub { color: var(--dim); font-size: 13px; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.wheel.low .wheel-time { animation: blink 1s steps(2) infinite; }

.pay-steps { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; width: 100%; max-width: 300px; text-align: left; }
.pay-steps li { display: flex; align-items: center; gap: 12px; color: var(--dimmer); font-size: 14px; font-weight: 600; }
.pay-steps i { width: 12px; height: 12px; flex: none; background: var(--panel-3); box-shadow: 0 0 0 3px var(--panel); outline: 1px solid var(--line); }
.pay-steps li.active { color: var(--text); }
.pay-steps li.active i { background: var(--gold); outline-color: var(--gold); animation: blink 1.2s ease-in-out infinite; }
.pay-steps li.done { color: var(--dim); }
.pay-steps li.done i { background: var(--accent); outline-color: var(--accent); }
.tx-link { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 14px; font-weight: 600; }
.tx-link:hover { text-decoration: underline; }

.pay-box { display: flex; flex-direction: column; gap: 12px; padding: 26px; background: var(--panel); border-radius: 22px; box-shadow: inset 0 0 0 1px var(--line); }
.pay-head { display: flex; gap: 14px; align-items: center; }
.coin-mark.big { width: 48px; height: 48px; font-size: 26px; }
.amount, .address {
  display: flex; align-items: center; gap: 10px; width: 100%; border: 0; text-align: left; background: none; padding: 0; color: var(--text);
}
.amount strong { font: 700 30px/1.15 var(--pixel); color: var(--gold); letter-spacing: .01em; word-break: break-all; }
.amount span { font: 700 18px/1 var(--pixel); color: var(--dim); }
.amount .ic, .address .ic { color: var(--dimmer); flex: none; transition: color .2s; }
.amount:hover .ic, .address:hover .ic { color: var(--accent); }
.usd { color: var(--dim); font-size: 14px; }
.qr-wrap { display: grid; justify-items: center; gap: 8px; padding: 6px 0; }
.qr { width: 220px; height: 220px; padding: 12px; background: #fff; border-radius: 16px; box-shadow: 0 0 0 4px var(--panel-3), 0 20px 50px -20px rgba(0,0,0,.8); }
.qr svg { width: 100%; height: 100%; display: block; }
.address { padding: 12px 14px; background: var(--bg-2); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.address code { flex: 1; font: 600 14px/1.5 ui-monospace, 'Cascadia Code', Consolas, monospace; word-break: break-all; color: var(--accent-2); }
.warn-box { padding: 12px 14px; border-radius: 12px; font-size: 13px; color: var(--dim); background: color-mix(in srgb, var(--gold) 8%, var(--panel-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 25%, var(--line)); }
.warn-box strong { display: block; color: var(--gold); margin-bottom: 2px; }
.pay-items { padding-top: 14px; border-top: 1px dashed var(--line); }
.pay-items ul { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; font-size: 14px; }
.pay-items li { display: flex; justify-content: space-between; gap: 12px; }
.pay-items li span:last-child { color: var(--dim); white-space: nowrap; }
.total-row.small { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.total-row.small strong { font-size: 22px; }
/* Once paid, the payment details step back. */
body[data-state="confirming"] .qr-wrap, body[data-state="paid"] .qr-wrap, body[data-state="delivered"] .qr-wrap, body[data-state="attention"] .qr-wrap,
body[data-state="delivered"] .warn-box, body[data-state="attention"] .warn-box,
body[data-state="delivered"] [data-wallet-link], body[data-state="attention"] [data-wallet-link],
body[data-state="confirming"] [data-wallet-link], body[data-state="paid"] [data-wallet-link] { display: none; }
body[data-state="expired"] .qr-wrap, body[data-state="expired"] [data-wallet-link] { opacity: .3; pointer-events: none; filter: grayscale(1); }
.pay-missing { text-align: center; padding: 80px 0; display: grid; gap: 14px; justify-items: center; }

/* ------------------------------------------------------------------ live support */
.sup-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; display: inline-flex; align-items: center; gap: 8px;
  height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: 26px; background: var(--accent); color: var(--ink);
  font-weight: 700; font-size: 15px; box-shadow: 0 14px 34px -10px color-mix(in srgb, var(--accent) 70%, transparent), inset 0 -3px 0 var(--accent-deep);
  transition: transform .25s var(--ease-spring);
}
.sup-fab:hover { transform: translateY(-2px); }
.sup-fab .ic { width: 20px; height: 20px; }
.sup-fab.on { background: var(--panel-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.sup-badge { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center; background: var(--bad); color: #fff; font-size: 12px; font-weight: 700; }
.sup-badge[hidden] { display: none; }
.sup-panel {
  position: fixed; right: 20px; bottom: 84px; z-index: 60; width: min(370px, calc(100% - 24px)); height: min(540px, calc(100% - 110px));
  display: flex; flex-direction: column; background: var(--panel); border-radius: 20px; overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line), 0 30px 80px -20px rgba(0,0,0,.85); animation: pop .3s var(--ease-out);
}
.sup-panel[hidden] { display: none; }
.sup-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 14px 14px 18px; background: var(--panel-2); border-bottom: 1px solid var(--line-soft); }
.sup-head strong { display: block; font-family: var(--display); font-size: 17px; }
.sup-online { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); font-size: 12px; }
.sup-online::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.sup-list { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.sup-msg { max-width: 82%; padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.sup-msg.staff { align-self: flex-start; background: var(--panel-3); border-bottom-left-radius: 4px; }
.sup-msg.me { align-self: flex-end; background: var(--accent); color: var(--ink); border-bottom-right-radius: 4px; font-weight: 500; }
.sup-msg.error { align-self: center; background: none; color: var(--bad); font-size: 13px; }
.sup-form { padding: 12px; border-top: 1px solid var(--line-soft); display: grid; gap: 8px; }
.sup-email, .sup-row textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); color: var(--text); font: inherit; font-size: 14px; outline: 0;
}
.sup-email { height: 38px; padding: 0 12px; }
.sup-email[hidden] { display: none; }
.sup-row { display: flex; gap: 8px; align-items: end; }
.sup-row textarea { resize: none; padding: 10px 12px; min-height: 42px; max-height: 120px; }
.sup-email:focus, .sup-row textarea:focus { border-color: var(--accent); }
.sup-row .btn { height: 42px; width: 46px; padding: 0; flex: none; }

@media (max-width: 860px) {
  .pay-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .sup-fab-label { display: none; }
  .sup-fab { padding: 0; width: 52px; justify-content: center; }
  .sup-panel { right: 12px; bottom: 80px; }
  .wheel { width: 210px; height: 210px; }
  .amount strong { font-size: 24px; }
}
