:root {
  --bg: #141614;
  --card: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.2);
  --blue: #5aaefd;
  --blue-2: #7cc0ff;
  --ink: #f2f4f1;
  --muted: rgba(242, 244, 241, 0.62);
  --green: #4ade80;
  --nav: 96px;
  --wrap: 1180px;
  --nav-chip: rgba(255, 255, 255, 0.08);
  --nav-chip-border: rgba(255, 255, 255, 0.16);
  --footer-bg: #101210;
  --nav-shell: rgba(20, 22, 20, 0.92);
  --nav-links-bg: rgba(0, 0, 0, 0.45);
  --nav-link: rgba(255, 255, 255, 0.72);
  --nav-link-active: #fff;
}

html[data-theme="light"] {
  --bg: #eef1f4;
  --card: rgba(255, 255, 255, 0.82);
  --line: rgba(15, 23, 32, 0.1);
  --line-strong: rgba(15, 23, 32, 0.18);
  --ink: #12161c;
  --muted: rgba(18, 22, 28, 0.62);
  --nav-chip: rgba(18, 22, 28, 0.06);
  --nav-chip-border: rgba(18, 22, 28, 0.12);
  --footer-bg: #ffffff;
  --nav-shell: rgba(255, 255, 255, 0.94);
  --nav-links-bg: rgba(255, 255, 255, 0.78);
  --nav-link: rgba(18, 22, 28, 0.72);
  --nav-link-active: #12161c;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: Figtree, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }

.wrap {
  width: min(var(--wrap), calc(100% - 48px));
  margin: 0 auto;
}

.kicker {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2, .amount strong, .price, .total strong, .connect-copy h2 {
  font-family: "Space Grotesk", Figtree, sans-serif;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary,
.btn-blue {
  background: #fff;
  color: #06233d;
  box-shadow: none;
}
.btn-primary:hover,
.btn-blue:hover {
  transform: translateY(-1px);
  background: #f3f7fb;
  box-shadow: none;
}

.btn-secondary,
.btn-ghost {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line-strong);
  color: #fff;
}
.btn-secondary:hover,
.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
  transform: translateY(-1px);
}
.btn-block { width: 100%; }

/* promo */
.promo {
  position: relative;
  z-index: 30;
  background: var(--bg);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.promo-inner {
  width: min(var(--wrap), calc(100% - 48px));
  margin: 0 auto;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 600;
}

.promo-tag {
  flex: none;
  background: rgba(74, 222, 128, 0.14);
  color: var(--green);
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.promo p { font-size: 0.88rem; color: var(--ink); }
.promo-divider {
  width: 1px;
  height: 14px;
  background: var(--line-strong);
}
.promo a {
  flex: none;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.88rem;
  border-bottom: 0;
  color: var(--ink);
}
.promo a:hover { color: var(--blue); }

/* nav: open above hero, pill after scroll */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  padding: calc(14px + 38px) 16px 0;
  pointer-events: none;
  transition: padding 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

body:has(.promo) .nav { padding-top: calc(14px + 38px); }
.nav.is-scrolled { padding-top: 12px; }

.nav-shell {
  position: relative;
  pointer-events: auto;
  width: min(1180px, 100%);
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 8px 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  transition:
    width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
    height 0.35s ease,
    padding 0.35s ease,
    background 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    gap 0.35s ease;
}

.nav.is-scrolled .nav-shell {
  width: auto;
  max-width: calc(100% - 24px);
  height: 56px;
  gap: 18px;
  padding: 0 10px 0 14px;
  background: var(--nav-shell);
  border-color: var(--nav-chip-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.35);
}

.brand { flex: none; display: flex; align-items: center; }
.brand img {
  height: 46px;
  width: auto;
  transition: height 0.35s ease;
}
.nav.is-scrolled .brand img { height: 34px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: var(--nav-links-bg);
  border: 1px solid var(--nav-chip-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.35s ease, border-color 0.35s ease, padding 0.35s ease;
}

.nav.is-scrolled .nav-links {
  background: transparent;
  border-color: transparent;
  padding: 0;
  backdrop-filter: none;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  color: var(--nav-link);
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-links a.is-active {
  color: var(--nav-link-active);
  background: var(--nav-chip);
}
.nav-links a:hover { color: var(--nav-link-active); }

.nav-actions {
  margin-left: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-login,
.nav-discord {
  height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--nav-chip-border);
  border-radius: 999px;
  background: var(--nav-chip);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ink);
}
.nav-login:hover,
.nav-discord:hover {
  background: var(--nav-chip);
  border-color: var(--line-strong);
  color: var(--ink);
}

.cart-btn, .menu-btn, .theme-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--nav-chip-border);
  border-radius: 999px;
  background: var(--nav-chip);
  position: relative;
  color: var(--ink);
}
.nav.is-scrolled .cart-btn,
.nav.is-scrolled .menu-btn,
.nav.is-scrolled .theme-btn,
.nav.is-scrolled .nav-login,
.nav.is-scrolled .nav-discord {
  background: var(--nav-chip);
}
.cart-btn svg, .menu-btn svg, .theme-btn svg { width: 20px; height: 20px; }
.cart-btn:hover, .menu-btn:hover, .theme-btn:hover { border-color: var(--line-strong); }
.theme-btn { color: #fff; }
html[data-theme="light"] .theme-btn { color: var(--ink); }
.cart-btn span {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: #fff;
  color: #06233d;
  font-size: 0.7rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.menu-btn { display: none; }

/* home hero with video - poster stays visible until video has a frame */
.home-hero {
  position: relative;
  min-height: min(100vh, 980px);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #0a1018 url("../images/heerlen-hero.png") center center / cover no-repeat;
  border-bottom: 1px solid var(--line);
}

.hero-video,
.hero-fallback {
  position: absolute;
  top: 50%;
  left: 50%;
  /* oversized so letterbox bars inside the mp4 get cropped away */
  width: 177.78%; /* 16/9 of height */
  height: 177.78%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
  transform: translate(-50%, -50%);
}

.hero-video {
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s ease;
  background: transparent;
}
.hero-fallback {
  z-index: 2;
  opacity: 1;
  transition: opacity 0.55s ease 0.2s;
}
.home-hero.is-playing .hero-video {
  opacity: 1;
  visibility: visible;
}
.home-hero.is-playing .hero-fallback {
  opacity: 0;
  pointer-events: none;
  /* poster blijft onder video tot fade klaar is */
  transition-delay: 0.35s;
}

.home-hero .hero-shade {
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(180deg, rgba(12, 14, 16, 0.55) 0%, rgba(12, 14, 16, 0.28) 42%, rgba(12, 14, 16, 0.78) 100%);
}

.home-hero-inner {
  position: relative;
  z-index: 4;
  text-align: center;
  padding: 150px 0 100px;
  max-width: 820px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-hero h1 {
  font-size: clamp(3.2rem, 7.5vw, 5.6rem);
  text-shadow: none;
  margin-bottom: 18px;
  color: #fff;
  letter-spacing: -0.04em;
  line-height: 1.02;
  font-weight: 700;
}

.home-lead {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-weight: 500;
  max-width: 560px;
  margin: 0 auto 28px;
  letter-spacing: -0.01em;
  line-height: 1.55;
}

.home-lead code {
  color: #fff;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 7px;
  border-radius: 6px;
  font-family: inherit;
}

.home-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.home-actions .btn {
  height: 48px;
  padding: 0 22px;
  font-size: 0.98rem;
  font-weight: 600;
}

.home-actions .btn-secondary {
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.players {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
}

.players .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

.buy-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  width: min(420px, calc(100% - 32px));
  display: none;
  align-items: center;
  gap: 16px;
  padding: 16px 16px 16px 18px;
  border-radius: 18px;
  background: rgba(12, 12, 14, 0.96);
  border: 1px solid var(--line);
  box-shadow: 0 22px 48px -18px rgba(0, 0, 0, 0.85);
  transform: translateY(16px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.buy-toast.is-on {
  display: flex;
  opacity: 1;
  transform: none;
}

.buy-toast[hidden] {
  display: none !important;
}

.buy-avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
  font-size: 1.35rem;
  flex: none;
  overflow: hidden;
}
.buy-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.buy-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  font-size: 1.05rem;
  color: var(--muted);
}

.buy-body strong { color: #fff; font-weight: 800; font-size: 1.08rem; }
.buy-close {
  margin-left: auto;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.buy-close svg { width: 18px; height: 18px; }
.buy-close:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }

/* store */
.store { padding: 54px 0 80px; }

.store-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 28px;
}

.store-head h2 { font-size: clamp(3.4rem, 6vw, 5.4rem); margin-top: 8px; }
.store-note { max-width: 340px; color: var(--muted); font-size: 0.95rem; padding-bottom: 8px; }

.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: calc(var(--nav) + 16px); }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}

.panel h3 {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
  font-weight: 700;
}

.cats { display: flex; flex-direction: column; gap: 6px; }
.cats button {
  height: 48px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--muted);
  text-align: left;
}
.cats button em {
  font-style: normal;
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: 99px;
}
.cats button.is-on {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.12);
}
.cats button.is-on em { background: rgba(255, 255, 255, 0.12); color: #fff; }
.cats button:not(.is-on):hover { border-color: var(--line); color: #fff; }

.person, .pays li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pays { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.pays li { align-items: center; }
.pays small, .person small { display: block; color: var(--muted); font-size: 0.8rem; }
.pays time { margin-left: auto; color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.pays-empty { color: var(--muted); }
.pays-empty strong { color: #fff; }
.avatar {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 800;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.search svg { width: 18px; height: 18px; color: var(--muted); }
.search input {
  width: 100%;
  background: none;
  border: 0;
  outline: none;
  color: var(--ink);
}
.search input::placeholder { color: var(--muted); }
.search:focus-within { border-color: var(--line-strong); }

.count { color: var(--muted); font-weight: 600; font-size: 0.9rem; white-space: nowrap; }

.sort { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.sort select {
  height: 48px;
  padding: 0 36px 0 14px;
  background: #161816;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 600;
  color: #fff;
  color-scheme: dark;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #fff 50%),
    linear-gradient(135deg, #fff 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
.sort select:focus {
  border-color: var(--blue);
}
.sort select option {
  background: #ffffff;
  color: #12161c;
  font-weight: 600;
}
html[data-theme="light"] .sort select {
  background-color: #ffffff;
  color: #12161c;
  color-scheme: light;
  border-color: var(--line);
  background-image:
    linear-gradient(45deg, transparent 50%, #12161c 50%),
    linear-gradient(135deg, #12161c 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}
html[data-theme="light"] .sort select option {
  background: #ffffff;
  color: #12161c;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
  box-shadow: none;
  background: rgba(255, 255, 255, 0.06);
}

.art {
  position: relative;
  display: block;
  height: 210px;
  background: #e8ecef;
  overflow: hidden;
  color: #0c1220;
  text-decoration: none;
}

.art-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.9), transparent 55%),
    linear-gradient(160deg, #eef2f6, #cfd6df);
}
.art-face.has-photo {
  background: #e8ecef;
  padding: 0;
}
.art-face.has-photo img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
}
.art-face img {
  width: min(168px, 58%);
  height: auto;
  max-height: 168px;
  object-fit: contain;
}

.art strong {
  font-family: "Space Grotesk", Figtree, sans-serif;
  font-size: 3.4rem;
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-weight: 700;
  color: inherit;
}
.art span.unit {
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: inherit;
  opacity: 0.55;
  text-transform: uppercase;
}

.bonus,
.badge-pop {
  position: absolute;
  z-index: 2;
  left: 14px;
  top: 14px;
  background: rgba(20, 22, 20, 0.88);
  color: var(--green);
  border: 0;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0;
  padding: 5px 10px;
  border-radius: 999px;
}
.badge-pop {
  left: auto;
  right: 14px;
  color: #fff;
  background: rgba(90, 174, 253, 0.95);
}
.art .bonus { left: 14px; right: auto; }

.card-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em; }
.card-body h3 a:hover { color: var(--blue); }
.card-body p { color: var(--muted); font-size: 0.92rem; flex: 1; }
.read-more {
  color: var(--blue);
  font-weight: 600;
  font-size: 0.9rem;
}
.read-more:hover { text-decoration: underline; }

.card-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.price-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.price { font-size: 1.35rem; }
.bonus-inline {
  background: rgba(74, 222, 128, 0.14);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
}
.cart-round {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  flex: none;
}
.cart-round svg { width: 18px; height: 18px; }
.cart-round:hover { background: #fff; color: #06233d; }
.buy {
  height: 42px;
  padding: 0 16px;
  background: #fff;
  color: #06233d;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  font-size: 0.88rem;
}
.buy:hover { background: #f3f7fb; }
.buy.is-in { background: rgba(255, 255, 255, 0.12); color: #fff; border: 1px solid rgba(255, 255, 255, 0.18); }

.empty, .soon {
  margin-top: 8px;
  padding: 36px 28px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}
.soon h3 { font-size: 2.4rem; margin: 8px 0 12px; letter-spacing: -0.04em; }
.soon p { color: var(--muted); max-width: 460px; margin-bottom: 18px; }

.connect-cta {
  padding: 28px 0 72px;
}
.connect-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  min-height: 168px;
}
.connect-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  transform: scale(1.4);
  filter: saturate(0.85) brightness(0.72);
}
.connect-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 12, 14, 0.78) 0%, rgba(10, 12, 14, 0.42) 55%, rgba(10, 12, 14, 0.62) 100%);
}
.connect-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 34px 36px;
}
.connect-copy h2 {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  margin-bottom: 8px;
}
.connect-copy p {
  color: rgba(242, 244, 241, 0.72);
  font-size: 1.02rem;
}
.connect-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.connect-discord {
  gap: 10px;
}
.connect-discord svg {
  width: 18px;
  height: 18px;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 28px;
  background: var(--footer-bg);
  color: var(--ink);
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 36px 28px;
  margin-bottom: 42px;
}
.foot-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 340px;
}
.foot-brand a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
}
.foot-brand img {
  height: 36px;
  width: auto;
}
.foot-brand p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}
.foot-col h4 {
  font-family: Figtree, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  margin-bottom: 14px;
  color: var(--ink);
}
.foot-col nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.foot-col a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.foot-col a:hover { color: var(--ink); }
.foot-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.shade {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  z-index: 50;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 60;
  width: min(440px, 100%);
  height: 100%;
  background: #121412;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transform: translateX(104%);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: -24px 0 60px -28px rgba(0, 0, 0, 0.75);
}
html[data-theme="light"] .drawer {
  background: #f7f8fa;
  box-shadow: -24px 0 60px -28px rgba(15, 23, 32, 0.28);
}
.drawer.is-open { transform: none; }
.drawer > header,
.drawer > footer { padding: 22px 22px 18px; }
.drawer > header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
}
.drawer h2 {
  font-size: 1.7rem;
  letter-spacing: -0.04em;
}
.drawer header p,
.pay-note,
.cart-who {
  color: var(--muted);
  font-size: 0.9rem;
}
.drawer header button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: grid;
  place-items: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.drawer header button:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}
.drawer header button svg { width: 18px; height: 18px; }
.drawer-body {
  flex: 1;
  overflow: auto;
  padding: 8px 22px 22px;
}
.drawer > footer {
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(0, 0, 0, 0.18);
}
html[data-theme="light"] .drawer > footer {
  background: rgba(255, 255, 255, 0.55);
}
.total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.total span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.total strong { font-size: 1.85rem; }
.cart-who {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
}
.cart-who strong { color: var(--ink); font-weight: 800; }
.payer { display: flex; flex-direction: column; gap: 6px; }
.payer span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.payer input {
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
}
html[data-theme="light"] .payer input {
  background: rgba(255, 255, 255, 0.9);
}
.payer input:focus { outline: none; border-color: rgba(90, 174, 253, 0.55); }
.payer input[readonly] { opacity: 0.85; }
.pay-note {
  line-height: 1.45;
  font-size: 0.84rem;
}
.pay-note code {
  font-size: 0.78rem;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.cart-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 10px;
}
.cart-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
}
.cart-thumb {
  grid-row: 1 / span 2;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  aspect-ratio: 16 / 9;
}
.cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.cart-info strong {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 1rem;
}
.cart-unit {
  color: var(--muted);
  font-size: 0.82rem;
}
.cart-row {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.cart-price {
  font-weight: 800;
  margin-right: auto;
}
.qty { display: flex; align-items: center; gap: 8px; }
.qty span { min-width: 1.1em; text-align: center; font-weight: 700; }
.qty button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.2);
}
.qty button:hover { border-color: rgba(255, 255, 255, 0.28); }
.drop {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  margin-left: auto;
}
.drop:hover { color: var(--ink); }
.cart-empty {
  color: var(--muted);
  padding: 36px 8px;
  text-align: center;
  line-height: 1.5;
}
.cart-empty span { display: block; margin-top: 6px; font-size: 0.9rem; }

.toast {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 70;
  background: #fff;
  color: #06233d;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 14px 18px;
  border-radius: 999px;
  box-shadow: 0 12px 30px -16px rgba(0, 0, 0, 0.6);
  transform: translateY(10px);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.toast.is-on {
  opacity: 1;
  transform: none;
}
.toast[hidden] { display: none !important; }
body.cart-open { overflow: hidden; }

body.nav-open .nav-links {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 10px);
  left: 12px;
  right: 12px;
  background: rgba(8, 8, 10, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 10px;
  z-index: 40;
  backdrop-filter: blur(14px);
}

@media (max-width: 980px) {
  .layout, .store-head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }
  .foot-brand { grid-column: 1 / -1; max-width: none; }
  .foot-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .connect-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 22px;
  }
  .connect-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .side, .maincol, .soon, .search, .sort, .sort select { width: 100%; }
  .side { position: static; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav { padding-left: 10px; padding-right: 10px; }
  .nav-shell {
    width: 100%;
    height: 64px;
    padding: 0 10px 0 12px;
  }
  .nav.is-scrolled .nav-shell { width: 100%; }
  .nav-links { display: none; }
  .menu-btn { display: grid; }
  .nav-login,
  .nav-discord { display: none; }
  .brand img { height: 40px; }
  .nav.is-scrolled .brand img { height: 32px; }
  .promo p { display: none; }
  .home-hero { min-height: 100svh; }
  .home-hero-inner { padding: 120px 0 72px; }
  .home-hero h1 { font-size: 3.2rem; }
}

@media (max-width: 640px) {
  .grid, .toolbar { grid-template-columns: 1fr; display: flex; flex-direction: column; align-items: stretch; }
  .count { display: none; }
  .brand img { height: 40px; }
  .home-hero h1 { font-size: 3rem; text-shadow: none; }
  .home-lead { font-size: 1.1rem; }
  .home-actions { flex-direction: column; align-items: stretch; }
  .art strong { font-size: 3rem; }
  .buy-toast { right: 12px; left: 12px; width: auto; bottom: 12px; }
  .hero-video,
  .hero-fallback {
    width: 210%;
    height: 210%;
  }
}

/* homepage popular */
.popular {
  padding: 64px 0 72px;
  border-top: 1px solid var(--line);
}
.popular-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.popular-head h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 8px;
}
.popular-head p { color: var(--muted); max-width: 420px; }
.popular-all {
  flex: none;
  font-weight: 600;
  color: #fff;
}
.popular-all:hover { color: var(--blue); }
.popular-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.popular-card .art,
.shop-card .art {
  height: 220px;
}

/* store page */
.page-store { padding-top: calc(var(--nav) + 12px); }
.store-hero {
  padding: 28px 0 8px;
}
.store-hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin-bottom: 10px;
}
.store-hero p {
  color: var(--muted);
  max-width: 560px;
  font-size: 1.05rem;
}
.store-layout { margin-top: 18px; }
.store-head-inline { margin-bottom: 18px; }
.store-head-inline h2 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 8px; }
.store-legal {
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 62ch;
}
.shop-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* product page */
.product-wrap { padding: 28px 0 64px; }
.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 28px;
  align-items: start;
}
.product-media .art {
  height: min(420px, 52vw);
  border-radius: 20px;
  overflow: hidden;
}
.product-media .art strong { font-size: clamp(4rem, 10vw, 6rem); }
.product-copy .kicker a { color: var(--blue); }
.product-copy h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 8px 0 12px;
}
.product-lead { color: var(--muted); font-size: 1.05rem; margin-bottom: 22px; }
.product-buy {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.product-buy .price { font-size: 2rem; }
.product-extra,
.product-more {
  margin-top: 42px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.product-extra h2,
.product-more h2 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}
.product-extra p { color: var(--muted); max-width: 62ch; }
.product-extra code {
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 6px;
}

/* Cfx.re / Discord account */
.auth-wrap { position: relative; }
.auth-login-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.auth-login.is-discord {
  padding: 0 12px;
  gap: 6px;
  background: rgba(88, 101, 242, 0.18);
  border-color: rgba(88, 101, 242, 0.45);
}
.auth-login.is-discord svg { width: 16px; height: 16px; }
.auth-login,
.auth-user {
  height: 44px;
  padding: 0 14px 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--nav-chip-border);
  border-radius: 999px;
  background: var(--nav-chip);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
}
.auth-login svg { width: 18px; height: 18px; }
.auth-login:hover,
.auth-user:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.12);
}
.auth-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
  flex: none;
}
.auth-avatar.lg { width: 44px; height: 44px; }
.auth-user span {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auth-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 90;
  width: min(280px, calc(100vw - 24px));
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(18, 18, 20, 0.98);
  box-shadow: 0 22px 48px -18px rgba(0, 0, 0, 0.85);
}
.auth-menu-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 14px;
  border-bottom: 1px solid var(--line);
}
.auth-menu-head strong {
  display: block;
  font-size: 0.98rem;
}
.auth-menu-head small {
  color: var(--muted);
  font-size: 0.8rem;
}
.auth-menu-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 8px;
}
.auth-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 10px;
  border-radius: 10px;
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  text-align: left;
}
.auth-link svg { width: 18px; height: 18px; flex: none; }
.auth-link:hover { background: rgba(255, 255, 255, 0.06); }
.auth-link.is-muted { color: var(--muted); font-weight: 600; }

.auth-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 120;
  transform: translateX(-50%) translateY(12px);
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(16, 16, 18, 0.96);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.auth-toast.is-on {
  opacity: 1;
  transform: translateX(-50%);
}

.purchases-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100;
  width: min(420px, 100%);
  height: 100%;
  background: #121214;
  border-left: 1px solid var(--line);
  transform: translateX(104%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
}
.purchases-drawer.is-open { transform: none; }
.purchases-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 20px 16px;
  border-bottom: 1px solid var(--line);
}
.purchases-head h2 { font-size: 1.6rem; margin-top: 2px; }
.purchases-body {
  padding: 16px 20px 28px;
  overflow: auto;
}
.purchases-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.purchases-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}
.purchases-list strong { display: block; }
.purchases-list small { color: var(--muted); }
.purchases-list span { font-weight: 800; color: var(--blue); }

html[data-theme="light"] .auth-login,
html[data-theme="light"] .auth-user,
html[data-theme="light"] .auth-link { color: var(--ink); }
html[data-theme="light"] .auth-menu,
html[data-theme="light"] .auth-toast,
html[data-theme="light"] .purchases-drawer {
  background: #fff;
  color: var(--ink);
}

@media (max-width: 1100px) {
  .popular-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .product-layout { grid-template-columns: 1fr; }
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .popular-grid,
  .shop-grid { grid-template-columns: 1fr; }
  .popular-head { flex-direction: column; align-items: flex-start; }
  .foot-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
