﻿/* ==========================================================================
   AivonStore - dark store theme
   ========================================================================== */

:root {
  --bg: #0b0e14;
  --bg-raised: #121724;
  --bg-card: #151b2b;
  --bg-hover: #1a2136;
  --border: #232c44;
  --border-light: #2e3a5c;
  --text: #e8ecf4;
  --text-dim: #9aa5bd;
  --text-faint: #626e8a;
  --accent: #17b8c9;
  --accent-hot: #4ee0ef;
  --accent-glow: rgba(23, 184, 201, 0.35);
  --green: #3ddc84;
  /* Solid fill for confirmed states - dark enough for white label text. */
  --green-solid: #0f7a40;
  --red: #ff5c6c;
  --steam: #1b2838;
  /* CS2-style sharp UI: no rounded corners anywhere. */
  --radius: 0;
  --radius-sm: 0;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  /* Shared card lift: one soft ambient layer + a tight contact shadow, so
     hovered cards read as raised without glowing. */
  --shadow-hover: 0 10px 22px rgba(0, 0, 0, 0.38), 0 2px 6px rgba(0, 0, 0, 0.28);
  --font-display: "Chakra Petch", "Inter", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Classes below set display:flex/grid, which would otherwise override the
   browser default for the hidden attribute - keep hidden authoritative. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Site-wide backdrop: a barely-there grid plus a soft teal glow at the
   top. Deliberately much fainter than the hero's own grid overlay - at
   full strength everywhere it was hard on the eyes; below the hero it
   should only stop sections reading as flat empty space. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(154, 165, 189, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(154, 165, 189, 0.018) 1px, transparent 1px),
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(23, 184, 201, 0.05), transparent 60%);
  background-size: 56px 56px, 56px 56px, auto;
}

main { flex: 1; position: relative; }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; }
h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; }

a { color: var(--accent-hot); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent); }

img { max-width: 100%; }

.container { width: min(1600px, 93%); margin: 0 auto; }
.narrow { width: min(560px, 92%); }
.narrow-wide { width: min(900px, 92%); }
/* Storefront shell: the pack grid drowns in the near-full-width
   container, so pack pages cap at a 4-card-comfortable width. */
.container.tight { width: min(1260px, 94%); }
.center { text-align: center; }
.muted { color: var(--text-dim); }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, "Cascadia Mono", monospace; font-size: 0.9em; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.3rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease,
    border-color 0.2s ease, color 0.2s ease;
  text-decoration: none;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #0e94ab);
  color: #fff;
  box-shadow: 0 2px 14px rgba(23, 184, 201, 0.25);
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.35) 50%, transparent 60%);
  transform: translateX(-120%);
  transition: transform 0.5s ease;
}
.btn-primary:hover { box-shadow: 0 4px 24px var(--accent-glow); transform: translateY(-1px); color: #fff; }
.btn-primary:hover::after { transform: translateX(120%); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-light);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-hot); background: rgba(23, 184, 201, 0.06); }

.btn-danger { background: transparent; border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: rgba(255, 92, 108, 0.12); }

.btn-steam { background: var(--steam); color: #dfe8f2; border-color: #2e4257; }
.btn-steam:hover { background: #24364b; color: #fff; border-color: #3d5a78; transform: translateY(-1px); }

.btn-lg { padding: 0.8rem 1.8rem; font-size: 1rem; }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ----------------------------------------------------------------- navbar */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(11, 14, 20, 0.82);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 1.6rem; height: 64px; }

.brand { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
/* Height-driven: the intrinsic width/height attributes reserve the right
   box before the file loads, so the navbar does not jump. */
.brand-logo {
  height: 26px;
  width: auto;
  display: block;
}
.brand-logo-compact { display: none; height: 30px; }
.brand-logo-footer {
  height: 42px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

/* Text fallback, kept for anywhere the image is not used. */
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
}
.brand-name b { color: var(--accent); font-weight: inherit; }

.game-tabs {
  display: flex;
  gap: 0.15rem;
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 3px;
  /* Never let "DOTA 2" squash onto two lines; the search bar shrinks instead */
  flex-shrink: 0;
}
.game-tab {
  padding: 0.32rem 0.8rem;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: background 0.15s, color 0.15s;
}
.game-tab:hover { color: var(--text); background: var(--bg-hover); }
.game-tab.active { background: var(--accent); color: #fff; }

/* Tablet/phone game switcher bar - counterpart of the navbar tabs, which
   drop out under 1000px. Hidden on desktop. */
.game-bar {
  display: none;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
}
@media (max-width: 1000px) {
  .game-bar { display: flex; }
  .game-bar .game-tab {
    flex: 1;
    text-align: center;
    padding: 0.55rem 0.5rem;
    border-bottom: 2px solid transparent;
  }
  .game-bar .game-tab.active {
    background: transparent;
    color: var(--accent-hot);
    border-bottom-color: var(--accent);
  }
}

.nav-zone-left { flex: 1 1 0; min-width: max-content; display: flex; align-items: center; }

.nav-search {
  flex: 0 1 640px;
  min-width: 110px;
  /* Flex items default to min-width:auto, which pins this to the width of
     its placeholder and forces the bar to overflow on mid-size screens. */
  min-width: 0;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 0.85rem;
  background: var(--bg);
  /* Border stays invisible until the field is hovered or focused. */
  border: 1px solid transparent;
  color: var(--text-faint);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.nav-search:hover { border-color: var(--border-light); }
.nav-search:focus-within {
  border-color: var(--accent);
  background: var(--bg-raised);
  box-shadow: 0 0 0 3px rgba(23, 184, 201, 0.15);
}
.nav-search svg { flex-shrink: 0; }
.nav-search input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem;
  padding: 0.55rem 0;
}
.nav-search input::-webkit-search-cancel-button { filter: invert(0.6); }
.nav-search input::placeholder { overflow: hidden; text-overflow: ellipsis; }

.nav-links { display: flex; gap: 0.4rem; }
.nav-link {
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-weight: 500;
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.2rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { transform: scaleX(1); }

.nav-actions { flex: 1 1 0; min-width: max-content; display: flex; align-items: center; justify-content: flex-end; gap: 0.7rem; }
.nav-actions .btn { flex-shrink: 0; white-space: nowrap; }

/* ------------------------------------------------------------ pack store */

/* One accent per bundle category: the card's top bar, price, fog behind
   the skin art and hover glow all follow --cat. Guns keep the site teal. */
.pack-cat-guns { --cat: #17b8c9; }
.pack-cat-pistols { --cat: #f08a3c; }
.pack-cat-rifles { --cat: #e8505f; }
.pack-cat-smgs { --cat: #8f6ff2; }
.pack-cat-heavy { --cat: #e3b341; }
.pack-cat-charms { --cat: #ee6fb4; }
.pack-cat-graffiti { --cat: #7ed957; }
.pack-cat-stickers { --cat: #4b8cff; }
.pack-section .market-row-head h2::before,
.pack-cat-guns .page-head h1::before,
.pack-cat-pistols .page-head h1::before,
.pack-cat-rifles .page-head h1::before,
.pack-cat-smgs .page-head h1::before,
.pack-cat-heavy .page-head h1::before,
.pack-cat-charms .page-head h1::before,
.pack-cat-graffiti .page-head h1::before,
.pack-cat-stickers .page-head h1::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 0.6rem;
  vertical-align: middle;
  background: var(--cat, var(--accent));
  box-shadow: 0 0 10px color-mix(in srgb, var(--cat, var(--accent)) 70%, transparent);
}

/* Copy on the left, floating showcase skins on the right. */
.hero-packs { min-height: 0; padding: 3.8rem 0 3.4rem; }
.hero-packs .hero-xl-inner { justify-content: space-between; }
.hero-packs .hero-copy { flex: 0 1 640px; max-width: 640px; }
.hero-floats {
  position: relative;
  flex: 0 1 460px;
  min-height: 340px;
  align-self: stretch;
}
.hero-float {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  animation: heroFloat 6s ease-in-out infinite;
}
.hero-float img {
  width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.6));
}
.hero-float span {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.hero-float-1 { width: 240px; left: 18%; top: 6%; z-index: 2; }
.hero-float-2 { width: 170px; left: 0; bottom: 4%; animation-delay: 1.6s; }
.hero-float-3 { width: 170px; right: 0; bottom: 14%; animation-delay: 3.1s; }
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@media (max-width: 1000px) {
  .hero-floats { display: none; }
}

/* Search results: one row per matched skin. */
.search-results { display: flex; flex-direction: column; gap: 0.9rem; }
.search-hit { display: flex; align-items: center; gap: 1.2rem; }
.search-hit > img {
  width: 110px;
  height: 74px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
}
.search-hit-info { min-width: 0; }
.search-hit-info h2 { font-size: 1.05rem; margin: 0 0 0.15rem; }
.search-hit-bundles { font-size: 0.88rem; }
.search-hit-cta {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .search-hit { flex-wrap: wrap; }
  .search-hit-cta { margin-left: 0; flex-direction: row; }
}

.hero-tiers {
  display: flex;
  gap: 0.9rem;
  margin-top: 2.2rem;
  flex-wrap: wrap;
  animation: riseIn 0.5s 0.3s ease both;
}
.hero-tier {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  min-width: 92px;
  padding: 0.7rem 1.1rem;
  border: 1px solid var(--border);
  background: rgba(23, 184, 201, 0.05);
  transition: border-color 0.15s, transform 0.15s;
}
.hero-tier:hover { border-color: var(--accent); transform: translateY(-2px); }
.hero-tier b {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent-hot);
}
.hero-tier span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.nav-links { display: flex; gap: 1.4rem; margin-left: 1.6rem; }
.nav-links .nav-link {
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.4rem 0;
}
.nav-links .nav-link:hover { color: var(--accent-hot); }

.pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 1.4rem;
}
.pack-section { margin-bottom: 3rem; }
.pack-section:last-child { margin-bottom: 0; }
.pack-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.5rem 1.5rem 1.3rem;
  background:
    radial-gradient(ellipse 90% 45% at 50% 0%, color-mix(in srgb, var(--cat, var(--accent)) 10%, transparent), transparent 70%),
    var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--cat, var(--accent));
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.pack-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--cat, var(--accent)) 70%, var(--border));
  box-shadow: 0 10px 34px color-mix(in srgb, var(--cat, var(--accent)) 14%, transparent);
}
.pack-card-out { border-top-color: var(--border); opacity: 0.7; }
.pack-card-out:hover { transform: none; border-color: var(--border); box-shadow: none; }
.pack-card-head { display: flex; justify-content: space-between; align-items: baseline; }
.pack-price { font-family: var(--font-display); font-size: 2.3rem; font-weight: 700; color: var(--cat, var(--accent-hot)); line-height: 1; }
.pack-stock {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green);
}
.pack-stock-out { color: var(--text-faint); }
.pack-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0.3rem 0 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pack-tagline { font-size: 0.88rem; margin: 0; }
.pack-count { color: var(--text-dim); font-size: 0.85rem; margin: 0; }
/* One big skin at a time; arrows page through the bundle. */
.pack-viewer {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0.8rem 0 1rem;
  min-height: 190px;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, color-mix(in srgb, var(--cat, var(--accent)) 16%, transparent), transparent 75%),
    rgba(10, 13, 20, 0.55);
  border: 1px solid var(--border);
  overflow: hidden;
}
.pack-slide {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2.6rem 0.9rem;
  min-width: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}
.pack-slide.active { opacity: 1; pointer-events: auto; }
.pack-slide img {
  width: 100%;
  max-width: 200px;
  height: 118px;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px color-mix(in srgb, var(--cat, var(--accent)) 35%, rgba(0, 0, 0, 0.6)));
}
.pack-slide-name {
  width: 100%;
  min-width: 0;
  font-size: 0.8rem;
  line-height: 1.25;
  min-height: 2.5em;
  color: var(--text-dim);
  text-align: center;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}
.pack-viewer-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 44px;
  display: grid;
  place-items: center;
  background: rgba(13, 17, 26, 0.85);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  z-index: 2;
}
.pack-viewer-btn:hover { color: var(--cat, var(--accent-hot)); border-color: var(--cat, var(--accent)); }
.pack-viewer-prev { left: 8px; }
.pack-viewer-next { right: 8px; }
.pack-viewer-count {
  position: absolute;
  right: 10px;
  top: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}
.pack-card .btn-block { margin-top: auto; }
/* The buy button follows the card's category colour too. */
.pack-card .btn-primary {
  background: linear-gradient(135deg, var(--cat, var(--accent)),
    color-mix(in srgb, var(--cat, var(--accent)) 72%, #000));
  box-shadow: 0 2px 14px color-mix(in srgb, var(--cat, var(--accent)) 28%, transparent);
}
.pack-card .btn-primary:hover {
  box-shadow: 0 4px 24px color-mix(in srgb, var(--cat, var(--accent)) 40%, transparent);
}

.pack-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-start;
  margin-bottom: 1.6rem;
  flex-wrap: wrap;
}
.pack-detail-buy {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-end;
  text-align: right;
  max-width: 340px;
}
/* Solid panel: the list sits on the page's grid backdrop otherwise and the
   small text fights with the lines. */
.pack-contents {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}
.pack-content-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.pack-content-row:nth-child(even) { background: rgba(255, 255, 255, 0.018); }
.pack-content-row:hover { background: rgba(23, 184, 201, 0.06); }
.pack-content-row:last-child { border-bottom: 0; }
.pack-content-row img {
  width: 72px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
  padding: 3px;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(23, 184, 201, 0.12), transparent 75%), rgba(10, 13, 20, 0.6);
  border: 1px solid var(--border);
}
.pack-content-info { display: flex; flex-direction: column; min-width: 0; }
.pack-content-name { font-weight: 600; font-size: 0.95rem; }
.pack-content-qty { color: var(--accent-hot); font-weight: 700; }
.pack-content-price { margin-left: auto; }
.pack-content-rarity {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pack-contents-compact { max-height: 320px; overflow-y: auto; margin: 1rem 0; }

.custom-form { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.4rem; }
.custom-form-row { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.custom-amount {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  padding: 0 0.4rem 0 0.9rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-hot);
}
.custom-amount .input { border: 0; width: 130px; font-size: 1.1rem; }
.custom-preview { display: flex; flex-direction: column; gap: 1rem; }
.custom-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}
.checkout-pack-head { display: flex; flex-direction: column; gap: 0.15rem; margin-bottom: 0.9rem; }

.pack-admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1.8rem; }
.pack-admin-settings { display: flex; flex-direction: column; gap: 0.3rem; }
.input-sm { padding: 0.3rem 0.5rem; font-size: 0.85rem; }
.input-qty { width: 90px; }
.stock-row-empty td { opacity: 0.5; }

@media (max-width: 1000px) {
  .nav-links { display: none; }
  .pack-admin-grid { grid-template-columns: minmax(0, 1fr); }
  .pack-detail-head { flex-direction: column; }
  .pack-detail-buy { align-items: flex-start; text-align: left; }
}

/* Sell-to-us coming-soon page */
.sell-soon { text-align: center; }
.sell-soon-icon { color: var(--accent); display: grid; place-items: center; margin-bottom: 0.6rem; }
.sell-soon-tag {
  display: inline-block;
  margin: 0.4rem auto 1rem;
  padding: 0.2rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid currentColor;
}
.sell-soon .checkout-actions { justify-content: center; }

.cart-link {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--text-dim);
  border: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.cart-link:hover { color: var(--accent-hot); border-color: var(--border); background: var(--bg-hover); }
.cart-link svg { display: block; }
.cart-count {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.user-menu { position: relative; }
.user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.6rem;
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.92rem;
  transition: background 0.15s, border-color 0.15s;
}
.user-btn:hover { background: var(--bg-hover); border-color: var(--border); }

.avatar { width: 30px; height: 30px; max-width: none; flex-shrink: 0; border-radius: 50%; object-fit: cover; }
.avatar-fallback {
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, #3a4a72, #232c44);
  color: var(--text);
  font-weight: 700;
  font-size: 0.85rem;
}
.avatar-lg { width: 64px; height: 64px; font-size: 1.6rem; }

.dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 0.4rem;
  display: none;
  flex-direction: column;
  animation: dropIn 0.15s ease;
}
.dropdown.open { display: flex; }
.dropdown a, .dropdown-signout {
  padding: 0.5rem 0.8rem;
  border-radius: 0;
  color: var(--text-dim);
  font-size: 0.92rem;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  font-family: var(--font-body);
  transition: background 0.12s, color 0.12s;
}
.dropdown a:hover, .dropdown-signout:hover { background: var(--bg-hover); color: var(--text); }
.dropdown-signout { color: var(--red); }
.dropdown-signout:hover { color: var(--red); }

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------------ flash */

.flash-stack {
  position: fixed;
  top: 76px;
  right: 1rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 380px;
}
.flash {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--accent);
  box-shadow: var(--shadow);
  animation: flashIn 0.25s ease;
  font-size: 0.92rem;
}
.flash-success { border-left-color: var(--green); }
.flash-error { border-left-color: var(--red); }
.flash-info { border-left-color: #5e98d9; }
.flash-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}
.flash-close:hover { color: var(--text); }
.flash.hide { opacity: 0; transform: translateX(20px); transition: 0.3s; }

@keyframes flashIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ------------------------------------------------------------------- hero */

.hero { position: relative; overflow: hidden; padding: 5.5rem 0 4rem; }

/* Large homepage hero with layered backdrop + featured item render */
.hero-xl {
  padding: 4.5rem 0 3.8rem;
  min-height: 460px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}
.hero-xl .hero-bg {
  background:
    radial-gradient(ellipse 55% 65% at 78% 40%, color-mix(in srgb, var(--rarity, #17b8c9) 20%, transparent), transparent 70%),
    radial-gradient(ellipse 45% 55% at 15% 85%, rgba(75, 105, 255, 0.12), transparent 70%),
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(23, 184, 201, 0.07), transparent),
    linear-gradient(180deg, #0d1119 0%, var(--bg) 100%);
}
.hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(154, 165, 189, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(154, 165, 189, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 75% 80% at 60% 40%, #000 30%, transparent 75%);
  pointer-events: none;
}
/* Copy left, featured item right. Packed from the left with a fixed copy
   column so the item sits a consistent distance from the headline rather
   than being flung to the right edge. */
.hero-xl-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(2rem, 4vw, 4rem);
}
.hero-copy { flex: 0 1 720px; max-width: 720px; }
.hero-kicker {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-hot);
  border: 1px solid rgba(23, 184, 201, 0.4);
  background: rgba(23, 184, 201, 0.08);
  padding: 0.3rem 0.8rem;
  margin-bottom: 1.1rem;
  animation: riseIn 0.5s ease both;
}

/* One featured item at a time, stacked in a single grid cell so the slides
   crossfade in place. */
.hero-art {
  position: relative;
  flex: 0 1 450px;
  /* Keeps a little air on the right at narrow widths, where the copy and
     art together would otherwise fill the row edge to edge. */
  margin-right: clamp(0rem, 2vw, 3rem);
  display: grid;
  place-items: center;
  min-height: 340px;
  animation: riseIn 0.6s 0.15s ease both;
}
.hero-slide {
  grid-area: 1 / 1;
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.hero-slide.active { opacity: 1; transform: scale(1); pointer-events: auto; }

.hero-art-glow {
  position: absolute;
  inset: 8%;
  background: radial-gradient(ellipse 60% 55% at 50% 50%, color-mix(in srgb, var(--rarity, #17b8c9) 30%, transparent), transparent 70%);
  filter: blur(6px);
}
.hero-art img {
  position: relative;
  width: 100%;
  max-width: 430px;
  transform: rotate(-8deg);
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.65));
  animation: floatIdle 6s ease-in-out infinite;
  transition: transform 0.3s ease;
}
.hero-slide:hover img { transform: rotate(-5deg) scale(1.03); }

.hero-art-caption {
  position: absolute;
  bottom: -4px;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  background: rgba(11, 14, 20, 0.85);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--rarity, var(--accent));
  padding: 0.6rem 0.9rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  max-width: 88%;
}
.hero-art-caption b {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.9rem;
  text-align: right;
}
.hero-art-price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.hero-art-price s { color: var(--text-faint); font-size: 0.78rem; font-weight: 400; margin-left: 0.3rem; }

.hot-tag {
  font-style: normal;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--red);
  padding: 0.12rem 0.45rem;
}

.hero-dots {
  position: absolute;
  bottom: -26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 5;
}
.hero-dot {
  width: 22px;
  height: 4px;
  border: none;
  background: var(--border-light);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}
.hero-dot:hover { background: var(--text-faint); }
.hero-dot.active { background: var(--accent); }

.hero-slim { padding: 3rem 0 2.4rem; border-bottom: 1px solid var(--border); }
.hero-slim-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.hero-slim .hero-title { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.hero-slim .hero-sub { font-size: 0.98rem; margin-top: 0.7rem; }
.hero-slim .hero-cta { margin-top: 1.3rem; }
.hero-stats-side {
  margin-top: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 1rem 2rem;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 20%, rgba(23, 184, 201, 0.14), transparent),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(75, 105, 255, 0.1), transparent);
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  animation: riseIn 0.5s ease both;
}
.accent {
  background: linear-gradient(90deg, var(--accent), var(--accent-hot));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  margin-top: 1rem;
  max-width: 520px;
  color: var(--text-dim);
  font-size: 1.08rem;
  animation: riseIn 0.5s 0.08s ease both;
}
.hero-cta { display: flex; gap: 0.8rem; margin-top: 1.8rem; animation: riseIn 0.5s 0.16s ease both; }

.hero-stats {
  display: flex;
  gap: 4rem;
  margin-top: 3rem;
  flex-wrap: wrap;
  animation: riseIn 0.5s 0.24s ease both;
}
.stat { display: flex; flex-direction: column; }
/* Two stats since the Traders/Items-sold cuts: larger type fills the row. */
.stat-num { font-family: var(--font-display); font-size: 2.7rem; font-weight: 700; color: var(--accent-hot); font-variant-numeric: tabular-nums; }
.stat-label { color: var(--text-faint); font-size: 0.98rem; }

@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------- category strip */

.cat-strip {
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
}
.cat-strip-inner {
  display: flex;
  gap: 0.2rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-strip-inner::-webkit-scrollbar { display: none; }
/* Scoped to the strip's own row: the hover panel is a child of .cat-strip,
   so a bare `.cat-strip a` outranks .cat-mini and restyles the panel cards. */
.cat-strip-inner > a {
  padding: 0.55rem 0.9rem;
  color: var(--text-dim);
  font-size: 0.84rem;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.cat-strip-inner > a:hover { color: var(--accent-hot); border-bottom-color: var(--accent); }
.cat-strip-inner > a.active { color: var(--accent-hot); border-bottom-color: var(--accent); }
.cat-caret { font-size: 0.6rem; opacity: 0.55; margin-left: 0.15rem; }

/* Category hover panel (Skinport-style mega-row) */
.cat-strip { position: relative; }
.cat-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--bg-raised);
  border-bottom: 2px solid var(--accent);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  padding: 1rem 0 1.2rem;
  animation: panelIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes miniIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.cat-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}
.cat-panel-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cat-panel-row {
  display: flex;
  gap: 0.7rem;
  /* No scrolling here: JS hides any card that would be cropped at the
     right edge, so the row always ends on a whole card. */
  overflow: hidden;
  padding: 6px 2px 2px;
  margin-top: -6px;
}
.cat-mini {
  position: relative;
  flex: 0 0 148px;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* backwards fill keeps cards invisible through their JS-set stagger delay */
  animation: miniIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  gap: 0.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.8rem 0.6rem 2rem;
  text-align: center;
  color: var(--text);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.cat-mini:hover {
  border-color: var(--border-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  color: var(--text);
}
.cat-mini img { height: 72px; max-width: 100%; object-fit: contain; margin-bottom: 0.3rem; }
.cat-mini-sub {
  font-size: 0.66rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat-mini-name {
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.3;
  max-width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.cat-mini-price { font-size: 0.74rem; color: var(--text-dim); }
/* Extra action revealed on hover, like "VIEW 41.6K OFFERS" */
.cat-mini-btn {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.32rem 0;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.15s, transform 0.15s;
}
.cat-mini:hover .cat-mini-btn { opacity: 1; transform: translateY(0); }
.cat-mini-empty { color: var(--text-faint); font-size: 0.85rem; padding: 0.6rem 0; }

/* ------------------------------------------------------------ market rows */

.market-row { padding: 1.6rem 0 0.6rem; }
.market-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.9rem; }
.market-row-head h2 { display: flex; align-items: center; gap: 0.55rem; font-size: 1.15rem; text-transform: uppercase; letter-spacing: 0.05em; }
.row-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 0;
  background: rgba(23, 184, 201, 0.14);
  border: 1px solid rgba(23, 184, 201, 0.35);
  color: var(--accent-hot);
  flex-shrink: 0;
}
/* svg is inline by default and sits on the text baseline, which pushed the
   icons off-center - block display lets the grid truly center them. */
.row-icon svg { display: block; }
.market-row-head .link-arrow { font-size: 0.85rem; color: var(--text-dim); white-space: nowrap; }
.market-row-head .link-arrow:hover { color: var(--accent-hot); }

.row-scroll-wrap { position: relative; }
.row-scroll {
  display: flex;
  gap: 0.8rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  /* Headroom so cards lifting on hover are not clipped by the scroll box;
     the negative margin keeps the visual layout unchanged. */
  padding: 8px 2px 0.6rem;
  margin-top: -8px;
  scrollbar-width: none;
}
.row-scroll::-webkit-scrollbar { display: none; }
.row-scroll .skin-card { flex: 0 0 218px; scroll-snap-align: start; }

/* Full-height edge paddles, marketplace-style: click pages a whole row. */
.row-arrow {
  position: absolute;
  top: 8px;
  bottom: 0.6rem;
  z-index: 5;
  width: 42px;
  border: none;
  border-radius: 0;
  color: var(--text-dim);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 0.15s;
}
.row-arrow:hover { color: var(--accent-hot); }
.row-arrow-left {
  left: 0;
  background: linear-gradient(270deg, transparent, rgba(11, 14, 20, 0.92) 55%);
}
.row-arrow-right {
  right: 0;
  background: linear-gradient(90deg, transparent, rgba(11, 14, 20, 0.92) 55%);
}

/* ----------------------------------------------------------- game sections */

.game-section { padding-top: 1.6rem; }
.game-section + .game-section { margin-top: 1.4rem; border-top: 1px solid var(--border); }
.game-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.game-section-title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.45rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.game-section-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent-hot);
  border: 1px solid rgba(23, 184, 201, 0.4);
  background: rgba(23, 184, 201, 0.08);
  padding: 0.22rem 0.6rem;
}
.game-section-head .link-arrow { font-size: 0.85rem; color: var(--text-dim); }
.game-section-head .link-arrow:hover { color: var(--accent-hot); }

/* -------------------------------------------------------------- seo block */

.seo-block {
  position: relative;
  background:
    radial-gradient(ellipse 60% 70% at 50% 0%, rgba(23, 184, 201, 0.06), transparent 70%),
    var(--bg-raised);
  border-top: 1px solid var(--border);
  margin-top: 2.4rem;
  padding: 3.2rem 0 2.6rem;
}
.seo-head { text-align: center; max-width: 640px; margin: 0 auto 2.2rem; }
.seo-head h2 { margin: 0.9rem 0 0.7rem; font-size: 1.6rem; text-transform: uppercase; letter-spacing: 0.04em; }
.seo-lead { color: var(--text-dim); }

.seo-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.seo-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1.5rem 1.3rem 1.4rem;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.seo-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 70%);
  opacity: 0;
  transition: opacity 0.2s;
}
.seo-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-light);
  box-shadow: var(--shadow-hover);
}
.seo-card:hover::before { opacity: 1; }
.seo-card-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: rgba(23, 184, 201, 0.12);
  border: 1px solid rgba(23, 184, 201, 0.35);
  color: var(--accent-hot);
  margin-bottom: 0.9rem;
}
.seo-card-icon svg { display: block; }
.seo-card h3 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.45rem; }
.seo-card p { color: var(--text-dim); font-size: 0.88rem; }

.tag-cloud { display: flex; align-items: center; justify-content: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 2.2rem; }
.tag-cloud-label { color: var(--text-faint); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; margin-right: 0.4rem; }
.tag-chip {
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border-light);
  border-radius: 0;
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 600;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.tag-chip:hover { border-color: var(--accent); color: var(--accent-hot); background: rgba(23, 184, 201, 0.06); }

/* ---------------------------------------------------------------- layout */

.section { padding: 2.6rem 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.4rem; }
.page-head { margin-bottom: 1.6rem; }
.link-arrow { font-weight: 600; }
.empty-note { color: var(--text-dim); padding: 2rem 0; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
}
.card-title { margin-bottom: 1rem; }

.notice {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  font-size: 0.9rem;
  color: var(--text-dim);
}
.notice svg { flex-shrink: 0; margin-top: 2px; color: var(--accent-hot); }
.notice strong { color: var(--text); }
.notice-warn { border-left-color: #d9a441; }
.notice-warn svg { color: #d9a441; }

/* ------------------------------------------------------------- skin cards */

.skin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}

.skin-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

/* Slide-up add-to-cart action on card hover */
.card-cart-btn {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.5rem 0;
  border: none;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.15s;
}
.card-cart-btn:hover { background: #22c9db; }
/* Beats .card-cart-btn:hover, which would otherwise repaint the confirmed
   button teal while the pointer is still on the card. */
.card-cart-btn.card-cart-btn-done { background: var(--green-solid); color: #fff; }
.skin-card:hover .card-cart-btn,
.card-cart-btn:focus-visible,
.card-cart-btn[data-busy] {
  opacity: 1;
  transform: translateY(0);
}
.skin-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--rarity) 55%, var(--border));
  box-shadow: var(--shadow-hover),
    0 0 18px color-mix(in srgb, var(--rarity) 12%, transparent);
  color: var(--text);
}
.skin-card-img {
  position: relative;
  display: grid;
  place-items: center;
  /* Narrow side padding: the render is 4:3, so the wider this box is the
     taller the artwork draws before it hits the height cap. */
  padding: 0.9rem 0.55rem 0.4rem;
  background: radial-gradient(ellipse 70% 60% at 50% 45%, color-mix(in srgb, var(--rarity) 12%, transparent), transparent);
}
.skin-card-img img {
  height: 165px;
  width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
  transition: transform 0.25s ease;
}
.skin-card:hover .skin-card-img img { transform: scale(1.07) rotate(-1.5deg); }

.discount-badge {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: rgba(255, 92, 108, 0.16);
  border: 1px solid rgba(255, 92, 108, 0.45);
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 0;
  font-variant-numeric: tabular-nums;
}

/* flex:1 + margin-top:auto on the float row pins the wear bar to the bottom
   of every card, so a name/meta line that wraps can't shift it out of line
   with its neighbours. */
.skin-card-body { padding: 0.5rem 0.85rem 0.8rem; display: flex; flex-direction: column; gap: 0.05rem; flex: 1; }
.price { font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; color: var(--text); font-variant-numeric: tabular-nums; }
.ref-price { color: var(--text-faint); font-size: 0.72rem; margin-bottom: 0.35rem; }
.skin-card-weapon { color: var(--text-dim); font-size: 0.78rem; display: flex; gap: 0.35rem; align-items: center; margin-top: 0.1rem; }
.rarity-square { width: 8px; height: 8px; border-radius: 2px; background: var(--rarity); box-shadow: 0 0 6px color-mix(in srgb, var(--rarity) 60%, transparent); flex-shrink: 0; }
.skin-card-name { font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; }
/* One line: a wrapping condition label was adding ~19px to every card. */
.skin-card-meta {
  font-size: 0.74rem;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-float { display: flex; align-items: center; gap: 0.55rem; margin-top: auto; padding-top: 0.55rem; }
.card-float-num { font-size: 0.72rem; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.card-float .wear-bar { flex: 1; }
.wear-bar-sm { height: 4px; }
.wear-bar-sm .wear-bar-marker { top: -3px; height: 10px; width: 2px; }

.tag-st {
  background: rgba(207, 106, 50, 0.18);
  border: 1px solid rgba(207, 106, 50, 0.5);
  color: #f0a06a;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.05rem 0.35rem;
  border-radius: 0;
  letter-spacing: 0.03em;
}

/* ---------------------------------------------------- market page layout */

.sr-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.market-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 1.2rem;
  width: min(1840px, 97%);
  margin: 0 auto;
  padding: 1.4rem 0 2.6rem;
  align-items: start;
}

.filter-panel {
  position: sticky;
  top: 76px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
}
.filter-panel form { display: flex; flex-direction: column; }
.filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 2;
}
.filter-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-hot);
}
.filter-clear { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; }

.filter-group { border-bottom: 1px solid var(--border); }
.filter-group > summary {
  padding: 0.7rem 1rem;
  cursor: pointer;
  list-style: none;
  position: relative;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
  transition: color 0.15s;
}
.filter-group > summary::-webkit-details-marker { display: none; }
.filter-group > summary::after {
  content: "+";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 1rem;
}
.filter-group[open] > summary::after { content: "-"; }
.filter-group > summary:hover { color: var(--accent-hot); }
.filter-body { padding: 0.2rem 1rem 0.9rem; display: flex; flex-direction: column; gap: 0.1rem; }
.filter-scroll { max-height: 260px; overflow-y: auto; scrollbar-width: thin; }

.filter-opt {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.28rem 0;
  font-size: 0.85rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.12s;
}
.filter-opt:hover { color: var(--text); }
.filter-opt input { accent-color: var(--accent); width: 15px; height: 15px; flex-shrink: 0; }
.filter-opt span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filter-count { font-style: normal; font-size: 0.74rem; color: var(--text-faint); font-variant-numeric: tabular-nums; }

.price-inputs { display: flex; align-items: center; gap: 0.45rem; }
.price-inputs .input { padding: 0.45rem 0.55rem; font-size: 0.85rem; }
.price-sep { color: var(--text-faint); }

.filter-panel .btn-primary { margin: 0.9rem 1rem 1.1rem; width: calc(100% - 2rem); }

.market-main { min-width: 0; }
.market-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.market-heading { display: flex; align-items: baseline; gap: 0.8rem; flex-wrap: wrap; }
.market-heading h1 { font-size: 1.4rem; text-transform: uppercase; letter-spacing: 0.04em; }
.market-grid { grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); }
.filter-toggle { display: none; }

@media (max-width: 1000px) {
  .market-shell { grid-template-columns: minmax(0, 1fr); }
  .filter-panel { position: static; max-height: none; display: none; }
  .filter-panel.open { display: block; }
  .filter-toggle { display: inline-flex; }
}

/* --------------------------------------------------------------- inputs */

.select, .input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.6rem 0.8rem;
  font-size: 0.93rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.select:focus, .input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(23, 184, 201, 0.15); }
.input { width: 100%; }

.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 2rem; }
.pager-info { color: var(--text-faint); font-size: 0.9rem; }

/* ----------------------------------------------------------- detail page */

.breadcrumb { display: flex; gap: 0.5rem; color: var(--text-faint); font-size: 0.88rem; margin-bottom: 1.4rem; }
.breadcrumb-caps {
  text-transform: uppercase;
  font-family: var(--font-display);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}
.breadcrumb-caps a { color: var(--text-dim); }
.breadcrumb-caps a:hover { color: var(--accent-hot); }

.detail-left { display: flex; flex-direction: column; }
.detail-under {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0.9rem 0 1.1rem;
}
.detail-under-float { flex: 1 1 260px; display: flex; align-items: center; gap: 0.8rem; }
.detail-under-float .wear-bar { flex: 1; }
.detail-links { display: flex; gap: 1.2rem; font-size: 0.82rem; text-transform: uppercase; font-family: var(--font-display); letter-spacing: 0.05em; }

.chart-card { padding: 1.1rem 0 0.2rem; border-top: 1px solid var(--border); }
.chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.6rem; }
.chart-head h2 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; }
.chart-head .muted { font-size: 0.78rem; }
.chart-change { font-style: normal; font-weight: 700; margin-left: 0.35rem; }
.chart-change.up { color: var(--green); }
.chart-change.down { color: var(--red); }

.chart-wrap { position: relative; }
.price-chart { width: 100%; height: 190px; display: block; overflow: visible; }
.chart-grid-line { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; }
.chart-cursor { stroke: var(--accent-hot); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; opacity: 0.8; }

.chart-axis {
  position: absolute;
  left: 0;
  font-size: 0.72rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  background: var(--bg-card);
  padding: 0 0.3rem;
  pointer-events: none;
  z-index: 2;
}
.chart-axis-high { top: 0; transform: translateY(-50%); }
.chart-axis-low { bottom: 0; transform: translateY(50%); }

.chart-dot {
  position: absolute;
  width: 9px;
  height: 9px;
  background: var(--accent-hot);
  border: 2px solid var(--bg-card);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.chart-tip {
  position: absolute;
  transform: translate(-50%, -130%);
  background: var(--bg-raised);
  border: 1px solid var(--border-light);
  padding: 0.35rem 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: var(--shadow);
  z-index: 4;
}
.chart-tip b { font-family: var(--font-display); font-size: 0.92rem; color: var(--text); font-variant-numeric: tabular-nums; }
.chart-tip span { font-size: 0.72rem; color: var(--text-faint); }

.chart-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; color: var(--text-faint); font-size: 0.74rem; margin-top: 0.5rem; }
.chart-source { color: var(--green); }
.chart-empty {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: var(--text-dim);
  font-size: 0.88rem;
  padding: 1.4rem 0.2rem 0.6rem;
}
.chart-empty svg { color: var(--text-faint); flex-shrink: 0; margin-top: 1px; }

/* Sits between the item name and the buy block, so it is clamped to keep
   the price and CTA above the fold; the toggle appears only when the text
   is actually cut off. */
.item-description {
  margin: 0 0 1.2rem;
  padding-left: 0.8rem;
  border-left: 2px solid var(--border-light);
}
.item-description p {
  color: var(--text-dim);
  font-size: 0.9rem;
  white-space: pre-line;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.item-description.expanded p { -webkit-line-clamp: unset; overflow: visible; }
.desc-toggle {
  margin-top: 0.35rem;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--accent-hot);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.desc-toggle:hover { color: var(--accent); }

.detail-kicker {
  color: var(--text-dim);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  margin-bottom: 0.2rem;
}
.detail-condition { margin-top: 0.15rem; margin-bottom: 1.1rem; }

.seller-row { display: flex; align-items: center; gap: 0.7rem; margin: 1.1rem 0 1.4rem; }
.seller-row > div { display: flex; flex-direction: column; line-height: 1.3; }
.seller-name { font-weight: 600; }
.seller-sub { font-size: 0.78rem; }

.summary-head { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.6rem; }

.detail-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1.3rem; }
.item-tag {
  display: inline-block;
  padding: 0.28rem 0.7rem;
  background: var(--bg-hover);
  border: 1px solid var(--border-light);
  color: var(--text-dim);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  transition: border-color 0.15s, color 0.15s;
}
a.item-tag:hover { border-color: var(--accent); color: var(--accent-hot); }

.detail-row-head { margin-top: 2.6rem; }

/* One panel with internal dividers rather than a stack of separate cards,
   so the sections read as parts of the same product view. */
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.detail-left { padding: 1.4rem; gap: 0; }
.detail-info { padding: 1.6rem 1.5rem; border-left: 1px solid var(--border); }

.detail-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 360px;
  overflow: hidden;
}
.detail-visual-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 65% 55% at 50% 50%, color-mix(in srgb, var(--rarity) 16%, transparent), transparent);
}
.detail-visual img {
  position: relative;
  width: 78%;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6));
  animation: floatIdle 5s ease-in-out infinite;
}
@keyframes floatIdle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.rarity-pill {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--rarity);
  background: color-mix(in srgb, var(--rarity) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--rarity) 45%, transparent);
  margin-bottom: 0.7rem;
}
.detail-title { font-size: 1.7rem; display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }

.detail-wear { margin: 1.4rem 0; }
.detail-wear-head { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--text-dim); margin-bottom: 0.45rem; }

.wear-bar { position: relative; height: 8px; }
.wear-bar-track {
  height: 100%;
  border-radius: 0;
  background: linear-gradient(90deg, #3ddc84 0%, #a8d951 7%, #f5d442 15%, #f5a142 38%, #f56f42 45%, #ff5c6c 100%);
  opacity: 0.9;
}
.wear-bar-marker {
  position: absolute;
  top: -4px;
  width: 3px;
  height: 16px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
  transform: translateX(-50%);
}

.detail-buy { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 1.4rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--border); }
.detail-price { font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 0.7rem; }
.detail-discount { position: static; font-size: 0.85rem; }
.detail-buy .ref-price { font-size: 0.85rem; margin-top: -0.6rem; }
.btn-buy { animation: buyPulse 2.6s ease-in-out infinite; }

/* Buy now + Add to cart side by side on the product page */
.detail-buy-row { display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: stretch; }
.detail-cart-btn { display: inline-flex; align-items: center; gap: 0.5rem; }
.detail-cart-btn.card-cart-btn-done {
  background: var(--green-solid);
  border-color: var(--green-solid);
  color: #fff;
}
@keyframes buyPulse {
  0%, 100% { box-shadow: 0 2px 14px rgba(23, 184, 201, 0.25); }
  50% { box-shadow: 0 2px 28px rgba(23, 184, 201, 0.5); }
}
.fee-note { font-size: 0.82rem; color: var(--text-faint); }
.sold-badge {
  align-self: flex-start;
  padding: 0.3rem 0.9rem;
  border-radius: 0;
  background: rgba(255, 92, 108, 0.12);
  border: 1px solid rgba(255, 92, 108, 0.4);
  color: var(--red);
  font-weight: 600;
  font-size: 0.9rem;
}

.detail-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem 1.5rem; }
.detail-facts div { display: flex; flex-direction: column; }
.detail-facts dt { color: var(--text-faint); font-size: 0.8rem; }
.detail-facts dd { font-weight: 600; }

/* --------------------------------------------------------------- checkout */

.checkout-card { display: flex; flex-direction: column; gap: 1.2rem; padding: 2rem; }
.checkout-item { display: flex; gap: 1.1rem; align-items: center; }
.checkout-item img { width: 110px; }
.checkout-name { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.checkout-summary { display: flex; flex-direction: column; gap: 0.5rem; border-top: 1px solid var(--border); padding-top: 1.1rem; }
.checkout-summary > div { display: flex; justify-content: space-between; }
.checkout-summary dt { color: var(--text-dim); }
.checkout-summary dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.checkout-total { border-top: 1px solid var(--border); padding-top: 0.6rem; font-size: 1.05rem; }
.checkout-total dd { color: var(--green); }
.checkout-actions { display: flex; gap: 0.8rem; justify-content: flex-end; }
.pay-now { margin: 1rem 0 0.5rem; }
.pay-now .btn { width: 100%; }
.checkout-form { display: flex; flex-direction: column; gap: 1.1rem; }
.billing-fields { display: flex; flex-direction: column; gap: 0.5rem; border-top: 1px solid var(--border); padding-top: 1.1rem; }
.billing-fields .form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.billing-summary { border-top: 1px solid var(--border); padding-top: 1.1rem; }
.billing-summary a { color: var(--accent); margin-left: 0.35rem; }
.receipt-check { color: var(--green); display: grid; place-items: center; animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes popIn {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.receipt h1 { text-align: center; }

/* ------------------------------------------------------------------- sell */

.sell-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 1.4rem;
  align-items: start;
}
.skin-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.7rem;
  max-height: 560px;
  overflow-y: auto;
  padding: 0.2rem;
  margin-top: 0.8rem;
}
.picker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.8rem 0.6rem;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.picker-item:hover {
  transform: translateY(-2px);
  border-color: var(--border-light);
  box-shadow: var(--shadow-hover);
}
.picker-item input { position: absolute; opacity: 0; pointer-events: none; }
.picker-item img { height: 62px; object-fit: contain; }
.picker-name { font-size: 0.78rem; font-weight: 600; line-height: 1.3; }
.picker-rarity { font-size: 0.7rem; color: var(--rarity); }
.picker-item:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(23, 184, 201, 0.35), 0 0 18px rgba(23, 184, 201, 0.15);
}
.picker-item.hidden { display: none; }

.sell-side .card { display: flex; flex-direction: column; gap: 0.5rem; position: sticky; top: 84px; }
.sell-preview {
  display: grid;
  place-items: center;
  min-height: 120px;
  background: var(--bg);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}
.sell-preview img { height: 100px; object-fit: contain; }
.field-label { font-weight: 600; font-size: 0.88rem; margin-top: 0.7rem; }
.field-hint { font-size: 0.8rem; color: var(--text-faint); }
.checkbox { display: flex; align-items: center; gap: 0.5rem; font-size: 0.92rem; color: var(--text-dim); margin: 0.5rem 0; cursor: pointer; }
.checkbox input { accent-color: var(--accent); width: 16px; height: 16px; }

/* ------------------------------------------------------------- tables */

.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th {
  text-align: left;
  color: var(--text-faint);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
}
.table th.right { text-align: right; }
.table td { padding: 0.6rem; border-bottom: 1px solid var(--border); }
.table tr:hover td { background: rgba(255, 255, 255, 0.015); }
.amount-pos { color: var(--green); font-weight: 600; font-variant-numeric: tabular-nums; }
.amount-neg { color: var(--red); font-weight: 600; font-variant-numeric: tabular-nums; }
.amount-muted { color: var(--text-faint); font-variant-numeric: tabular-nums; }

.status-badge {
  display: inline-block;
  padding: 0.14rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid;
}
.status-completed { color: var(--green); border-color: rgba(84, 214, 122, 0.35); background: rgba(84, 214, 122, 0.08); }
.status-pending { color: #e4ae39; border-color: rgba(228, 174, 57, 0.35); background: rgba(228, 174, 57, 0.08); }
.status-cancelled { color: var(--red); border-color: rgba(230, 88, 88, 0.35); background: rgba(230, 88, 88, 0.08); }

.invoice-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}
.invoice-link:hover { color: var(--accent-hot); text-decoration: underline; }

.admin-stack { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 1.2rem; }
.admin-actions { display: inline-flex; gap: 0.4rem; }
.check-label { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text-dim); cursor: pointer; }
.check-label input { accent-color: var(--accent); }

/* -------------------------------------------------------------------- blog */

.blog-wrap { max-width: 980px; }
.blog-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-top: 1.4rem; }
.blog-list-row { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.blog-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.3rem 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.15s, transform 0.15s;
}
.blog-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.blog-card h2, .blog-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
}
.blog-card p { color: var(--text-dim); font-size: 0.92rem; }
.blog-date { color: var(--text-faint); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
.blog-read { color: var(--accent); font-size: 0.85rem; font-weight: 600; margin-top: auto; }
.blog-card:hover .blog-read { color: var(--accent-hot); }

.blog-article { max-width: 760px; }
.blog-back { color: var(--text-dim); font-size: 0.88rem; display: inline-block; margin-bottom: 1rem; }
.blog-back:hover { color: var(--accent-hot); }
.blog-article h1 { margin-bottom: 0.3rem; }
.blog-article-date { margin-bottom: 1.6rem; }
.blog-body { color: var(--text-dim); line-height: 1.75; }
.blog-body p { margin-bottom: 1.1rem; }
.blog-body h2 {
  font-family: var(--font-display);
  color: var(--text);
  font-size: 1.25rem;
  margin: 1.8rem 0 0.7rem;
}
.blog-body a { color: var(--accent); }
.blog-body a:hover { color: var(--accent-hot); text-decoration: underline; }
.blog-body strong { color: var(--text); }

.blog-editor { resize: vertical; min-height: 220px; font-family: inherit; line-height: 1.6; }
/* The footer's 48px margin-top provides the bottom gap, so the strip's own
   bottom padding would double it; .section's 2.6rem top padding matches. */
.home-blog { padding-bottom: 0; }

/* Fixed 3-up grid for the /blog index (auto-fit would over-column on the
   near-full-width container). */
.blog-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .blog-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .blog-grid-3 { grid-template-columns: minmax(0, 1fr); }
}

/* Cover thumbnails bleed to the card edges (offset the card padding). */
.blog-card-img {
  width: calc(100% + 2.8rem);
  margin: -1.3rem -1.4rem 0.5rem;
  max-width: none;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}
.blog-article-img {
  width: 100%;
  margin-bottom: 1.6rem;
  border: 1px solid var(--border);
}
.blog-body img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  margin: 0.4rem 0;
}
.blog-cover-preview {
  display: block;
  width: 180px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
}
.blog-image-library {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}
.blog-image-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--border);
  margin-bottom: 0.35rem;
}
.blog-image-item .input { font-size: 0.75rem; padding: 0.35rem 0.5rem; }

.checkout-method-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--bg);
}

/* --------------------------------------------------------------- settings */

/* Stacked on ordinary screens; profile and billing sit side by side once
   there is room for two full-width forms. */
.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  max-width: 1500px;
}
.settings-card { max-width: 720px; }
.settings-card > .fee-note { margin-bottom: 0.9rem; }
@media (min-width: 1200px) {
  .settings-grid { grid-template-columns: 1fr 1fr; }
  .settings-card { max-width: none; }
}
.settings-form { display: flex; flex-direction: column; gap: 1.1rem; }
.settings-form .btn { align-self: flex-start; }
.settings-form .input:disabled { opacity: 0.55; cursor: not-allowed; }
.settings-avatar-row { display: flex; align-items: center; gap: 1.1rem; }
.settings-avatar-meta { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.file-input { font-size: 0.85rem; color: var(--text-dim); max-width: 100%; }
.file-input::file-selector-button {
  margin-right: 0.7rem;
  padding: 0.45rem 0.9rem;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.file-input::file-selector-button:hover { border-color: var(--accent); color: var(--accent-hot); }

/* ---------------------------------------------------------------- profile */

.profile-head { display: flex; align-items: center; gap: 1.1rem; }
.steam-linked { color: #66c0f4; }

/* Attach-email row on settings (Steam sign-ups without an address) */
.add-email-row { display: flex; gap: 0.5rem; }
.add-email-row .input { flex: 1; min-width: 0; }
.add-email-row .btn { white-space: nowrap; }

/* Account section switcher: Inventory / Purchases / Settings */
.account-nav {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--border);
}
.account-nav-link {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.1rem;
  margin-bottom: -1px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.account-nav-link:hover { color: var(--text); }
.account-nav-link.active { color: var(--accent-hot); border-bottom-color: var(--accent); }
.account-nav-count {
  font-style: normal;
  font-size: 0.7rem;
  padding: 0.05rem 0.4rem;
  background: var(--bg-hover);
  border: 1px solid var(--border-light);
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.dropdown-count {
  font-style: normal;
  font-size: 0.68rem;
  padding: 0 0.35rem;
  background: var(--accent);
  color: #fff;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ trades */

.trade-item { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--text); }
.trade-item:hover span { color: var(--accent-hot); }
.trade-thumb { width: 44px; height: 32px; object-fit: contain; flex-shrink: 0; }

.offer-box { margin-top: 0.7rem; }
.offer-box > summary {
  cursor: pointer;
  color: var(--text-dim);
  font-size: 0.88rem;
  list-style: none;
}
.offer-box > summary::-webkit-details-marker { display: none; }
.offer-box > summary::before { content: "+ "; color: var(--accent); }
.offer-box[open] > summary::before { content: "− "; }
.offer-box > summary:hover { color: var(--accent-hot); }
.offer-form { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.offer-form .input { flex: 1; min-width: 0; }

.cart-offer { display: flex; gap: 0.4rem; }
.cart-offer .input { width: 110px; padding: 0.35rem 0.5rem; font-size: 0.85rem; }

/* -------------------------------------------------------------- inventory */

.section-intro { margin-bottom: 1.4rem; max-width: 720px; }

.inv-steam-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  margin-bottom: 1.2rem;
  background: rgba(102, 192, 244, 0.07);
  border: 1px solid rgba(102, 192, 244, 0.3);
  border-left: 3px solid #66c0f4;
  color: var(--text-dim);
  font-size: 0.88rem;
}
.inv-steam-note svg { color: #66c0f4; flex-shrink: 0; }

.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.inv-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.inv-card:hover { border-color: var(--border-light); box-shadow: var(--shadow-hover); }
.inv-card-img {
  position: relative;
  display: grid;
  place-items: center;
  padding: 1.2rem 1rem 0.4rem;
  background: radial-gradient(ellipse 70% 60% at 50% 45%, color-mix(in srgb, var(--rarity) 12%, transparent), transparent);
}
.inv-card-img img { height: 118px; max-width: 100%; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5)); }
.inv-status {
  position: absolute;
  top: 0.6rem;
  left: 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
}
.inv-status-withdraw { background: rgba(228, 174, 57, 0.12); border: 1px solid rgba(228, 174, 57, 0.45); color: #e4ae39; }

.inv-card-body { display: flex; flex-direction: column; gap: 0.12rem; padding: 0.6rem 1rem 0.8rem; }
.inv-acquired { font-size: 0.76rem; color: var(--text-faint); margin-top: 0.35rem; }
.inv-acquired b { color: var(--text-dim); }
/* Bundle card: the whole card links to its contents page. */
a.inv-bundle { color: inherit; display: flex; flex-direction: column; }
a.inv-bundle:hover { border-color: var(--accent); }
.inv-bundle .inv-card-img { --rarity: var(--accent); }
.inv-bundle-thumbs {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.inv-bundle-thumbs img {
  height: 96px;
  min-width: 0;
  flex: 0 1 33%;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
}
.inv-bundle-thumbs img:not(:first-child) { margin-left: -14px; }
.inv-status-sent { background: rgba(61, 220, 151, 0.12); border: 1px solid rgba(61, 220, 151, 0.45); color: var(--green); }
.inv-bundle-view { margin-top: 0.6rem; align-self: stretch; width: 100%; }
.delivery-skins summary { cursor: pointer; color: var(--text-dim); font-size: 0.82rem; }
.delivery-skins ul { margin: 0.3rem 0 0 1rem; font-size: 0.82rem; color: var(--text-dim); }

.inv-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.8rem 1rem 1rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.inv-list-form { display: flex; gap: 0.5rem; }
.inv-list-form .input { flex: 1; min-width: 0; padding: 0.4rem 0.6rem; font-size: 0.88rem; }
.inv-pending-note { font-size: 0.78rem; color: var(--text-faint); }

.steam-panel {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  margin-bottom: 1.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--steam-accent, #66c0f4);
}
.steam-panel-icon { color: #66c0f4; display: grid; place-items: center; flex-shrink: 0; }
.steam-panel-body { flex: 1; min-width: 0; }
.steam-panel-body h2 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.2rem; }
.steam-panel-body .muted { font-size: 0.86rem; }
.steam-panel-action { flex-shrink: 0; }

.tabs { display: flex; gap: 0.4rem; border-bottom: 1px solid var(--border); margin-bottom: 1.4rem; }
.tab {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent-hot); border-bottom-color: var(--accent); }

/* ------------------------------------------------------------------- auth */

.auth-wrap { display: grid; place-items: center; padding: 3.5rem 1rem; }
.auth-card { width: min(440px, 100%); display: flex; flex-direction: column; gap: 0.9rem; padding: 2rem; animation: riseIn 0.4s ease both; }
.divider { display: flex; align-items: center; gap: 0.8rem; color: var(--text-faint); font-size: 0.82rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-alt { text-align: center; font-size: 0.92rem; color: var(--text-dim); }
.auth-card form { display: flex; flex-direction: column; gap: 0.35rem; }
.auth-card .btn-block { margin-top: 0.9rem; }

/* ------------------------------------------------------------------ steps */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 2rem; }
.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.step:hover {
  transform: translateY(-3px);
  border-color: var(--border-light);
  box-shadow: var(--shadow-hover);
}
.step-num {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: rgba(23, 184, 201, 0.14);
  border: 1px solid rgba(23, 184, 201, 0.35);
  color: var(--accent-hot);
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 0.9rem;
}
.step h3 { margin-bottom: 0.4rem; font-size: 1.05rem; }
.step p { color: var(--text-dim); font-size: 0.92rem; }

/* ------------------------------------------------------------------ legal */

.legal { max-width: 760px; }
.legal h1 { margin-bottom: 0.3rem; }
.legal h2 { margin: 1.8rem 0 0.5rem; font-size: 1.15rem; }
.legal p, .legal li { color: var(--text-dim); }
.legal ul, .legal ol { padding-left: 1.4rem; margin: 0.5rem 0; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  margin-top: 0.8rem;
  overflow: hidden;
}
.faq-item summary {
  padding: 1rem 1.2rem;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  list-style: none;
  position: relative;
  transition: background 0.15s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1.2rem;
  color: var(--accent);
  font-size: 1.2rem;
  transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
/* When JS animates the accordion, the caret follows the animated state
   instead of [open] (which stays set during the collapse animation). */
.faq-item.js-anim summary::after { transform: none; }
.faq-item.js-anim.expanded summary::after { transform: rotate(45deg); }
.faq-item summary:hover { background: var(--bg-hover); }
.faq-item p { padding: 0 1.2rem 1rem; color: var(--text-dim); }

.faq-drop {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.faq-item.expanded .faq-drop { grid-template-rows: 1fr; }
.faq-drop-inner { overflow: hidden; min-height: 0; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin: 1.4rem 0; }
/* margin-top:0 is load-bearing: the legal-page `h2 { margin: 1.8rem 0 }`
   rule would otherwise push a gap above every card heading. */
.contact-card h2 { font-size: 1.05rem; margin: 0 0 0.6rem; }
.contact-address { font-style: normal; color: var(--text-dim); line-height: 1.6; margin-bottom: 0.7rem; }
.contact-address strong { color: var(--text); }

/* Wider than the legal pages (which cap at 760px for readability) but not
   full bleed - a form stretched to 1600px is unusable. */
.contact-page { max-width: 1240px; margin: 0 auto; }

.contact-hero { text-align: center; max-width: 620px; margin: 0 auto 1.8rem; }
.contact-hero h1 { margin: 0.9rem 0 0.6rem; font-size: 2.3rem; }
.contact-hero-sub { color: var(--text-dim); }


/* Default grid stretch keeps the three cards the same height even when
   their content lengths differ - no align-items: start here. */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.contact-meta { display: flex; flex-direction: column; gap: 0.35rem; margin: 0.8rem 0; }
.contact-meta div { display: flex; flex-direction: column; }
.contact-meta dt {
  font-size: 0.72rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.contact-meta dd { color: var(--text); font-weight: 600; font-size: 0.9rem; }

/* Live chat call to action */
.live-chat-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 1.8rem;
  margin-bottom: 2rem;
  background:
    radial-gradient(ellipse 60% 140% at 12% 50%, rgba(23, 184, 201, 0.14), transparent 70%),
    var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
}
.live-chat-copy { display: flex; align-items: center; gap: 1.1rem; min-width: 0; flex: 1; }
.live-chat-band > .btn { flex-shrink: 0; }
.live-chat-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  background: rgba(23, 184, 201, 0.14);
  border: 1px solid rgba(23, 184, 201, 0.4);
  color: var(--accent-hot);
}
.live-chat-icon svg { display: block; }
.live-chat-band h2 {
  font-size: 1.15rem;
  margin: 0 0 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.live-chat-band p { color: var(--text-dim); font-size: 0.9rem; margin: 0; }

.contact-card-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 0.8rem;
  background: rgba(23, 184, 201, 0.12);
  border: 1px solid rgba(23, 184, 201, 0.35);
  color: var(--accent-hot);
}
.contact-card-icon svg { display: block; }

.contact-prefooter {
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
}
.contact-prefooter h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 0.5rem; }
.contact-prefooter p { color: var(--text-dim); }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.textarea { resize: vertical; min-height: 130px; font-family: var(--font-body); }
.contact-form .h-captcha { margin-top: 0.8rem; }
.contact-side { display: flex; flex-direction: column; gap: 1.2rem; }
.contact-side .social-row { margin-top: 0.2rem; }

/* ------------------------------------------------------------------- cart */

.cart-list { display: flex; flex-direction: column; gap: 0.7rem; margin-bottom: 1.2rem; }
.cart-row {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0.9rem 1.1rem;
}
.cart-row-img img { width: 96px; object-fit: contain; }
.cart-row-info { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.cart-row-name { font-family: var(--font-display); font-weight: 600; color: var(--text); }
.cart-row-name:hover { color: var(--accent-hot); }
.cart-row-info .muted { font-size: 0.82rem; }
.cart-row-side { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 0.45rem; }
.cart-summary { padding: 1.4rem; display: flex; flex-direction: column; gap: 1rem; }
.checkout-item-price { margin-left: auto; }

/* Checkout payment-method picker */
.pay-methods { display: flex; flex-direction: column; gap: 0.7rem; margin: 1.2rem 0; }
.pay-method {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.pay-method:hover { border-color: var(--border-light); background: var(--bg-hover); }
.pay-method:has(input:checked) { border-color: var(--accent); background: var(--bg-hover); }
.pay-method input { accent-color: var(--accent); }
.pay-method-icon { color: var(--text-dim); display: grid; place-items: center; }
.pay-method:has(input:checked) .pay-method-icon { color: var(--accent); }
.pay-method-body { display: flex; flex-direction: column; gap: 0.1rem; }
.pay-method-body b { font-size: 0.95rem; }
.pay-method-body .muted { font-size: 0.8rem; }

.checkout-billing { margin: 1.2rem 0; border-top: 1px solid var(--border); padding-top: 1.1rem; }
.checkout-billing .form-2col { margin-top: 0.8rem; }

.pay-instructions { margin: 1.2rem 0 0; border-top: 1px solid var(--border); padding-top: 1.1rem; }
.pay-instructions .detail-facts { margin-top: 0.8rem; }

/* Purchase history cards */
.order-card { display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-start; }
.order-card-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; width: 100%; }
.order-ref { font-weight: 700; font-family: var(--mono, monospace); }
.order-total { margin-left: auto; }
.order-card-items { font-size: 0.88rem; }

/* ----------------------------------------------------------------- footer */

.footer { border-top: 1px solid var(--border); background: var(--bg-raised); margin-top: 3rem; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr 1.2fr;
  gap: 2rem;
  padding: 2.8rem 0 1.8rem;
}
.footer-col { display: flex; flex-direction: column; gap: 0.45rem; align-items: flex-start; }
.footer-col h4 { color: var(--text); margin-bottom: 0.3rem; font-size: 0.95rem; }
.footer-col a { color: var(--text-dim); font-size: 0.9rem; }
.footer-col a:hover { color: var(--accent-hot); }
.footer-about p { color: var(--text-dim); font-size: 0.9rem; margin-top: 0.6rem; }
.footer-legal-id {
  color: var(--text-faint) !important;
  font-size: 0.82rem !important;
  font-style: normal;
  line-height: 1.55;
  margin-top: 0.8rem !important;
}
.footer-legal-id strong { color: var(--text-dim); }
.footer-muted { color: var(--text-faint); font-size: 0.85rem; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.1rem 0 1.6rem;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 0.82rem;
}

.social-row { display: flex; align-items: center; gap: 0.7rem; margin-top: 0.9rem; }
.social-link {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 0;
  border: 1px solid var(--border-light);
  color: var(--text-dim);
  transition: border-color 0.15s, color 0.15s, transform 0.15s;
}
.social-link:hover { border-color: var(--accent); color: var(--accent-hot); transform: translateY(-2px); }

.pay-logos { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.9rem; align-items: center; }
.pay-logo {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  background: #fff;
  border-radius: 0;
  padding: 0.25rem 0.6rem;
  font-weight: 800;
  font-size: 0.78rem;
  font-style: italic;
}
.pay-visa { color: #1a1f71; letter-spacing: 0.02em; }
.pay-mc { gap: 0; font-style: normal; background: #f7f7f7; }
.pay-mc i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.pay-mc i:first-child { background: #eb001b; }
.pay-mc i:nth-child(2) { background: #f79e1b; margin-left: -6px; opacity: 0.9; }
.pay-mc b { color: #333; font-size: 0.7rem; font-weight: 600; margin-left: 4px; }
.pay-bank {
  color: #333;
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: #f7f7f7;
}

/* ------------------------------------------------------- maintenance page */

.maintenance-body { justify-content: center; }
.maintenance {
  display: grid;
  /* Explicit column: with only `place-items: center` the column is sized to
     max-content, so the unbreakable support e-mail made the card wider than
     the viewport on small screens. */
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  min-height: 100vh;
  padding: 2rem 1rem;
  text-align: center;
}
.maintenance-card { width: min(620px, 100%); min-width: 0; }
/* display:block is load-bearing: an img is inline by default, so the badge
   below would share its line box and sit alongside it instead of under. */
.maintenance-logo {
  display: block;
  width: min(340px, 80%);
  height: auto;
  margin: 0 auto 1.6rem;
}
.maintenance-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1.4rem;
  background: rgba(228, 174, 57, 0.1);
  border: 1px solid rgba(228, 174, 57, 0.4);
  color: #e4ae39;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.maintenance-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e4ae39;
  animation: hotPulse 2s ease-out infinite;
}
@keyframes hotPulse {
  70% { box-shadow: 0 0 0 7px rgba(228, 174, 57, 0); }
  100% { box-shadow: 0 0 0 0 rgba(228, 174, 57, 0); }
}
.maintenance h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  margin-bottom: 0.8rem;
}
.maintenance-lead { color: var(--text-dim); margin: 0 auto 2.2rem; max-width: 460px; }
.maintenance-contact {
  padding: 1.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.maintenance-contact > p { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 0.9rem; }
/* The e-mail has no natural break points; let it wrap on narrow phones. */
.maintenance-contact .btn { max-width: 100%; overflow-wrap: anywhere; }
.maintenance-hours { color: var(--text-faint); font-size: 0.8rem; margin-top: 0.9rem; }
.maintenance-social { display: flex; justify-content: center; gap: 0.7rem; margin-top: 1.6rem; }
.maintenance-legal {
  margin-top: 2rem;
  color: var(--text-faint);
  font-size: 0.78rem;
  line-height: 1.6;
}

/* ---------------------------------------------------------- cookie banner */

.cookie-banner {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  width: min(680px, 94%);
  background: var(--bg-raised);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.9rem 1.2rem;
  font-size: 0.88rem;
  /* Center via the animation's fill state: a generic translateY keyframe
     here would overwrite translateX(-50%) and push the banner off-center. */
  transform: translateX(-50%);
  animation: bannerIn 0.4s ease both;
}
.cookie-banner p { color: var(--text-dim); }
.cookie-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

@keyframes bannerIn {
  from { opacity: 0; transform: translate(-50%, 16px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ------------------------------------------------------------- responsive */

@media (max-width: 900px) {
  /* minmax(0, 1fr), not 1fr: lets wide children (tables) shrink the track
     instead of pushing the card past the viewport on phones */
  .detail-grid, .sell-grid, .form-2col { grid-template-columns: minmax(0, 1fr); }
  .contact-cards { grid-template-columns: 1fr; }
  .live-chat-band { flex-direction: column; align-items: flex-start; }
  .live-chat-band .btn { width: 100%; }
  .seo-cards { grid-template-columns: 1fr 1fr; }
  .hero-xl-inner { flex-direction: column-reverse; gap: 2.6rem; }
  .hero-art { min-height: 240px; flex-basis: auto; width: min(360px, 82%); }
  .hero-copy { flex-basis: auto; }
  .cart-row { flex-wrap: wrap; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .sell-side .card { position: static; }
  .row-arrow-left { left: 4px; }
  .row-arrow-right { right: 4px; }
  .cookie-banner { flex-direction: column; align-items: stretch; text-align: center; }
  .cookie-actions { justify-content: center; }
}

/* Navbar fits: brand + game tabs + search + actions is ~1010px of content,
   so pieces drop out as the bar narrows rather than overflowing. */
@media (max-width: 1150px) {
  .brand-logo-wide { height: 22px; }
}
@media (max-width: 1150px) and (min-width: 901px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr 1fr; }
}
@media (max-width: 1150px) {
  .footer-grid > .footer-col:first-child { grid-column: 1 / -1; max-width: 420px; }
}
@media (max-width: 1000px) {
  .game-tabs { display: none; }
}
@media (max-width: 880px) {
  /* Swap the wordmark for the square mark: saves ~180px of bar. */
  .brand-logo-wide { display: none; }
  .brand-logo-compact { display: block; }
  .nav-inner { gap: 0.9rem; }
}

@media (max-width: 620px) {
  /* Keep the search usable on phones: the primary CTA folds away and the
     sign-in link stays. */
  .nav-actions .btn-primary { display: none; }
}
@media (max-width: 560px) {
  /* display:block turns the table into a scroll container so wide history
     rows pan inside the card instead of stretching the page */
  .table { display: block; overflow-x: auto; }
  .nav-inner { gap: 0.55rem; height: 52px; }
  .nav-actions { gap: 0.4rem; }
  .nav-actions .btn { padding: 0.35rem 0.6rem; font-size: 0.72rem; letter-spacing: 0.03em; }
  .brand-logo-compact { height: 24px; }
  .cart-link { width: 32px; height: 32px; }
  .cat-strip a { padding: 0.45rem 0.7rem; font-size: 0.78rem; }
  /* Hero CTAs read as slabs on a phone; back to normal button height. */
  .hero-cta { flex-wrap: wrap; gap: 0.6rem; }
  .hero-cta .btn-lg { padding: 0.6rem 1.1rem; font-size: 0.85rem; }
  .hero-xl { padding: 2.6rem 0 2.2rem; min-height: 0; }
  .hero-title { font-size: 1.65rem; }
  .hero-sub { font-size: 0.92rem; }
  .hero-stats { gap: 2rem; }
  .stat-num { font-size: 1.9rem; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .user-name { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero { padding: 3.5rem 0 2.5rem; }
  .hero-stats { gap: 1.5rem; }
  .seo-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .checkout-actions { flex-direction: column-reverse; }
  .checkout-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* --------------------------------------------- mobile hero + cat strip */
/* Under 900px the hero stacks: no skin art (it crowded the small
   screen), everything centred, and the headline carries the section. */
@media (max-width: 900px) {
  .hero-packs .hero-copy { text-align: center; margin: 0 auto; }
  .hero-packs .hero-cta { justify-content: center; }
  .hero-packs .hero-tiers { justify-content: center; flex-wrap: wrap; }
  .hero-packs .hero-floats { display: none; }
  .hero-packs .hero-title { font-size: 3.1rem; line-height: 1.06; }
  .hero-packs .hero-sub { margin-left: auto; margin-right: auto; }
}
@media (max-width: 560px) {
  /* Outranks the generic 1.65rem phone hero rule - this hero has no art,
     so the headline is the visual. */
  .hero-packs .hero-title { font-size: 2.6rem; }
}
/* The category strip scrolls sideways on phones; the fade shows there is
   more to the right. */
@media (max-width: 880px) {
  .cat-strip::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 44px;
    background: linear-gradient(90deg, transparent, var(--bg-raised));
    pointer-events: none;
  }
}
