/* Blox Shop storefront. Accent, rarity (--r) and game (--g) colours come from /theme.css.
   Style: solid colours and chunky "toy block" edges (hard bottom shadows) instead of glows. */
:root {
  --accent: #ff3d5a;
  --accent-dark: color-mix(in srgb, var(--accent) 62%, #000);
  --bg: #111216;
  --bg-2: #0c0d10;
  --surface: #191b21;
  --surface-2: #21242c;
  --surface-3: #2a2e38;
  --line: #2c303a;
  --line-2: #3a3f4c;
  --edge: #07080a;
  --text: #f5f6f8;
  --text-2: #c2c6d0;
  --muted: #8a909e;
  --ok: #3ddc84;
  --warn: #ffbe3d;
  --info: #4ea8ff;
  --blue: #3d8bff;
  --yellow: #ffc23d;
  --green: #3ddc84;
  --pink: #ff52d9;
  --radius: 14px;
  --radius-sm: 10px;
  --font-display: 'Lilita One', 'Inter', system-ui, sans-serif;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 50%, transparent);
  --r: #9aa4b2;
  --g: var(--accent);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}
main { flex: 1; }
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.1; margin: 0 0 .5em; }
h1, h2 { font-family: var(--font-display); font-weight: 400; letter-spacing: .005em; }
h1 { font-size: clamp(34px, 5vw, 58px); }
h2 { font-size: clamp(23px, 2.6vw, 30px); }
h3 { font: 800 17px/1.25 var(--font); letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.wrap { width: min(1220px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(640px, 100% - 32px); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.ok { color: var(--ok); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--accent) 45%, transparent); }

/* Falling blocks behind the page (drawn by store.js). */
.fx-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.game-bar, main, .site-footer, .announce, .closed-bar { position: relative; z-index: 1; }

/* ---------- live dot ---------- */
.rec-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); vertical-align: middle; margin-right: 8px; animation: blink 1.6s steps(2, start) infinite; }
@keyframes blink { to { opacity: .25; } }

/* ---------- buttons ----------
   Every button sits on a hard "ledge" (a solid bottom shadow) like a toy block:
   hover raises it a little, pressing pushes it down onto the ledge. */
.btn {
  --ledge: var(--edge);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: var(--radius-sm);
  border: 2px solid var(--line-2); background: var(--surface-2); color: var(--text);
  font: 800 14.5px/1 var(--font); text-decoration: none; cursor: pointer;
  box-shadow: 0 4px 0 var(--ledge);
  transform: translateY(0);
  -webkit-tap-highlight-color: transparent; user-select: none;
  transition: transform .1s ease, box-shadow .1s ease, background-color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--ledge); border-color: #4c5262; background-color: var(--surface-3); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ledge); transition-duration: .04s; }
.btn:disabled, .btn.is-disabled { opacity: .55; cursor: not-allowed; pointer-events: none; transform: none; }
.btn-icon { flex-shrink: 0; }

.btn-primary { --ledge: var(--accent-dark); background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); border-color: color-mix(in srgb, var(--accent) 88%, #fff); }
.btn-primary:active { background: color-mix(in srgb, var(--accent) 92%, #000); }

/* Secondary: dark block with a light outline, clearly not the main action. */
.btn-ghost { background: transparent; border-color: #545b6b; color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); border-color: #727a8c; }

.btn-soldout { color: var(--muted); background: var(--surface); border-style: dashed; box-shadow: none; }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 16.5px; border-radius: 12px; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 13px; box-shadow: 0 3px 0 var(--ledge); }
.btn-block { width: 100%; }
.grow { flex: 1; }
.icon-btn { background: var(--surface-2); border: 2px solid var(--line-2); color: var(--text-2); font-size: 15px; cursor: pointer; width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 3px 0 var(--edge); transition: transform .1s, box-shadow .1s; }
.icon-btn:hover { color: var(--text); }
.icon-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--edge); }
.link-arrow { color: var(--accent); text-decoration: none; font-weight: 800; font-size: 14px; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- header ---------- */
.announce { background: var(--accent); color: #fff; text-align: center; font-size: 13px; font-weight: 700; padding: 8px 16px; }
.announce .rec-dot { background: #fff; }
.closed-bar { background: #2a2414; border-bottom: 2px solid #5a4a1c; color: var(--warn); text-align: center; padding: 10px 16px; font-size: 14px; font-weight: 600; }
.site-header { position: sticky; top: 0; z-index: 40; background: var(--bg-2); border-bottom: 2px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand-mark { display: block; width: 36px; height: 36px; transition: transform .2s ease; }
.brand:hover .brand-mark { transform: rotate(-8deg); }
.brand-sm .brand-mark { width: 26px; height: 26px; }
.brand-logo { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.brand-name { font: 900 21px/1 var(--font); letter-spacing: -.01em; text-transform: uppercase; color: var(--text); }
.brand-accent { color: var(--accent); }
.brand-sm .brand-name { font-size: 16px; }
.main-nav { display: flex; gap: 2px; }
.main-nav a { text-decoration: none; color: var(--text-2); font-weight: 700; font-size: 14px; padding: 8px 12px; border-radius: 8px; }
.main-nav a:hover { color: var(--text); background: var(--surface); }
.main-nav a.active { color: var(--text); background: var(--surface-2); box-shadow: inset 0 -3px 0 var(--accent); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.header-search input { width: 210px; height: 42px; background: var(--surface); border: 2px solid var(--line); border-radius: 10px; color: var(--text); padding: 0 12px; font: inherit; font-size: 14px; }
.header-search input:focus { border-color: var(--accent); outline: none; }
.cart-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 10px;
  background: var(--surface-2); border: 2px solid var(--line-2); color: var(--text); font: 800 14px var(--font); cursor: pointer;
  box-shadow: 0 3px 0 var(--edge); transition: transform .1s, box-shadow .1s;
}
.cart-btn:hover { border-color: #4c5262; }
.cart-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--edge); }
.cart-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 900; display: inline-grid; place-items: center; }
.cart-count.bump { animation: bump .3s ease; }
@keyframes bump { 40% { transform: scale(1.3) rotate(-6deg); } }
.menu-btn { display: none; width: 42px; height: 42px; border-radius: 10px; background: var(--surface-2); border: 2px solid var(--line-2); cursor: pointer; padding: 12px 10px; flex-direction: column; justify-content: space-between; box-shadow: 0 3px 0 var(--edge); }
.menu-btn span:not(.sr-only) { display: block; height: 2px; background: var(--text); border-radius: 2px; }

/* ---------- game selector ---------- */
.game-bar { background: var(--surface); border-bottom: 2px solid var(--line); }
.game-row { display: flex; align-items: center; gap: 12px; min-height: 54px; }
.game-label { font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); flex-shrink: 0; }
.game-pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 6px 2px 9px; }
.game-pills::-webkit-scrollbar { display: none; }
.game-pill {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; height: 34px; padding: 0 14px; border-radius: 9px;
  text-decoration: none; font-weight: 800; font-size: 13.5px; color: var(--text-2);
  border: 2px solid var(--line-2); background: var(--surface-2); box-shadow: 0 3px 0 var(--edge);
  transition: transform .1s, box-shadow .1s;
}
.game-pill:hover { color: var(--text); }
.game-pill:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--edge); }
.game-pill.active { color: #fff; background: var(--g); border-color: var(--g); box-shadow: 0 3px 0 color-mix(in srgb, var(--g) 60%, #000); }
.game-dot { width: 9px; height: 9px; border-radius: 2px; background: var(--g); flex-shrink: 0; }
.game-pill.active .game-dot { background: #fff; }
.game-full { font-size: 13px; margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- hero ---------- */
.hero { padding: 60px 0 28px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.eyebrow { margin-bottom: 16px; }
.eyebrow-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 8px; font-weight: 800; font-size: 12.5px; color: var(--text); background: var(--surface-2); border: 2px solid var(--line-2); }
.lead { color: var(--text-2); font-size: 17px; max-width: 56ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-panel { position: relative; background: var(--surface); border: 2px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: 0 6px 0 var(--edge); }
.hud-top { display: flex; justify-content: space-between; font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 16px; }
.rec { color: var(--accent); }
.hud-dim { color: var(--muted); }
.hud-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.hud-stat { border-radius: 12px; padding: 14px 16px; background: var(--bg-2); border: 2px solid var(--line); }
.hud-stat strong { display: block; font: 400 38px/1 var(--font-display); }
.hud-a strong { color: var(--accent); }
.hud-b strong { color: var(--ok); }
.hud-stat span { color: var(--muted); font-size: 13px; font-weight: 600; }
.hud-label { font-weight: 800; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.chip-row, .rarity-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rarity-chips { margin: 14px 0 0; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 8px; text-decoration: none;
  font-size: 13px; font-weight: 800; color: var(--text);
  border: 2px solid color-mix(in srgb, var(--r) 55%, var(--line)); background: color-mix(in srgb, var(--r) 10%, var(--surface));
  transition: background .12s, transform .1s;
}
.chip:hover { background: color-mix(in srgb, var(--r) 22%, var(--surface)); }
.chip:active { transform: translateY(1px); }
.chip.active { color: #111216; background: var(--r); border-color: var(--r); }
.chip.active .chip-dot { background: #111216; }
.chip-all { --r: #8a909e; }
.chip-dot { width: 9px; height: 9px; border-radius: 2px; background: var(--r); }

/* ---------- sections ---------- */
.section { padding: 32px 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 18px; }
.section-head h2 { margin: 0; }
.page-head { padding: 40px 0 18px; }
.page-head h1 { margin-bottom: 8px; }

/* ---------- rarity tiles ---------- */
.rarity-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.rarity-tile {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 2px; min-height: 116px; padding: 16px 18px; border-radius: var(--radius); text-decoration: none;
  background: var(--r); color: #111216;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--r) 55%, #000);
  transition: transform .1s ease, box-shadow .1s ease;
}
/* A little stack of blocks in the corner, the shop's motif. */
.rarity-tile::after {
  content: ''; position: absolute; right: 14px; bottom: 14px; width: 62px; height: 40px; opacity: .22;
  background:
    linear-gradient(#111216, #111216) 0 100% / 18px 18px no-repeat,
    linear-gradient(#111216, #111216) 22px 100% / 18px 18px no-repeat,
    linear-gradient(#111216, #111216) 44px 100% / 18px 18px no-repeat,
    linear-gradient(#111216, #111216) 22px 0 / 18px 18px no-repeat;
}
.rarity-tile:hover { transform: translateY(-2px); box-shadow: 0 7px 0 color-mix(in srgb, var(--r) 55%, #000); }
.rarity-tile:active { transform: translateY(3px); box-shadow: 0 2px 0 color-mix(in srgb, var(--r) 55%, #000); }
.rarity-tile-name { font: 400 25px/1.05 var(--font-display); }
.rarity-tile-count { font-size: 13px; font-weight: 800; opacity: .75; }
.rarity-tile-go { margin-top: auto; font-weight: 900; font-size: 18px; }

/* ---------- product grid & cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 18px; }
.card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 2px solid var(--line);
  box-shadow: 0 5px 0 var(--edge);
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--r) 70%, var(--line)); }
.card.is-out { opacity: .55; }
.card.is-out:hover { transform: none; border-color: var(--line); }
.card-link { display: block; }
.thumb {
  position: relative; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden;
  background: color-mix(in srgb, var(--r) 16%, var(--bg-2));
  border-bottom: 4px solid var(--r);
}
/* Soft checkerboard of blocks behind the item. */
.thumb::before {
  content: ''; position: absolute; inset: 0; opacity: .5;
  background: conic-gradient(color-mix(in srgb, var(--r) 9%, transparent) 25%, transparent 0 50%, color-mix(in srgb, var(--r) 9%, transparent) 0 75%, transparent 0) 0 0 / 36px 36px;
}
.thumb-glow { display: none; }
.thumb img { position: relative; width: 80%; height: 80%; object-fit: contain; filter: drop-shadow(0 8px 0 rgba(0, 0, 0, .3)); transition: transform .2s ease; }
.card:hover .thumb img { transform: translateY(-4px); }
.thumb-ph { position: relative; font: 400 56px/1 var(--font-display); color: var(--r); }
.card-tags { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; gap: 6px; z-index: 3; pointer-events: none; }
.card-tags.static { position: static; justify-content: flex-start; flex-wrap: wrap; margin-bottom: 14px; }
.rarity {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 6px;
  font: 900 10.5px/1.5 var(--font); letter-spacing: .06em; text-transform: uppercase;
  color: #111216; background: var(--r); box-shadow: 0 2px 0 color-mix(in srgb, var(--r) 50%, #000);
}
.tag, .tag-sample { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 6px; font-size: 11.5px; font-weight: 800; background: var(--surface-2); border: 2px solid var(--line-2); color: var(--text-2); }
.tag-game { border-color: var(--g); color: var(--text); }
.tag-sample { border-style: dashed; color: var(--warn); background: var(--bg-2); }
.card-body { padding: 13px 15px 16px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.card-title { margin: 0; font-size: 16px; }
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; text-decoration-color: var(--r); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.card-cat { margin: 0; font-size: 12px; color: var(--muted); font-weight: 600; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: auto 0 12px; padding-top: 10px; }
/* Prices sit on a little price tag, like the logo. */
.price {
  position: relative; display: inline-flex; align-items: center; height: 30px; padding: 0 11px 0 20px;
  font: 400 18px/1 var(--font-display); color: #111216; background: var(--yellow);
  clip-path: polygon(11px 0, 100% 0, 100% 100%, 11px 100%, 0 50%);
  border-radius: 0 6px 6px 0;
}
.price::before { content: ''; position: absolute; left: 9px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--surface); }
.price-lg { height: 46px; font-size: 30px; padding: 0 16px 0 30px; clip-path: polygon(16px 0, 100% 0, 100% 100%, 16px 100%, 0 50%); border-radius: 0 10px 10px 0; }
.price-lg::before { left: 13px; width: 7px; height: 7px; margin-top: -3.5px; background: var(--bg); }
.stock { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.stock-dot { width: 8px; height: 8px; border-radius: 2px; background: currentColor; }
.stock-in { color: var(--ok); }
.stock-low { color: var(--warn); }
.stock-out { color: var(--muted); }

/* ---------- categories (each tile takes the next colour in the palette) ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.cat-tile {
  --c: var(--accent);
  position: relative; display: flex; flex-direction: column; gap: 6px; padding: 20px 20px 20px 24px; border-radius: var(--radius); text-decoration: none;
  background: var(--surface); border: 2px solid var(--line); box-shadow: 0 5px 0 var(--edge);
  transition: transform .12s ease, border-color .12s;
  overflow: hidden;
}
.cat-tile:nth-child(5n+2) { --c: var(--blue); }
.cat-tile:nth-child(5n+3) { --c: var(--green); }
.cat-tile:nth-child(5n+4) { --c: var(--yellow); }
.cat-tile:nth-child(5n+5) { --c: var(--pink); }
.cat-tile::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 6px; background: var(--c); }
.cat-tile:hover { transform: translateY(-2px); border-color: var(--c); }
.cat-name { font: 400 24px var(--font-display); color: var(--c); }
.cat-desc { color: var(--text-2); font-size: 14px; }
.cat-count { font-size: 13px; color: var(--muted); margin-top: 4px; font-weight: 700; }

/* ---------- steps ---------- */
.steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.steps li { --c: var(--accent); background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: 0 5px 0 var(--edge); }
.steps li:nth-child(2) { --c: var(--blue); }
.steps li:nth-child(3) { --c: var(--green); }
.steps p { color: var(--text-2); margin: 0; font-size: 14px; }
.step-n {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; margin-bottom: 14px;
  font: 400 22px var(--font-display); color: #111216; background: var(--c);
  box-shadow: 0 4px 0 color-mix(in srgb, var(--c) 55%, #000);
}
.note-box { position: relative; overflow: hidden; border: 2px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: 16px 18px 16px 24px; }
.note-box::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--yellow); }
.note-box p { color: var(--text-2); margin: 6px 0; font-size: 14px; }
.note-box a { color: var(--accent); font-weight: 800; font-size: 14px; text-decoration: none; }
.note-box.compact { margin: 6px 0 16px; }

/* ---------- shop toolbar ---------- */
.shop-layout { padding-bottom: 40px; }
.cat-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin-bottom: 12px; scrollbar-width: thin; }
.cat-tabs a { flex-shrink: 0; text-decoration: none; padding: 8px 15px; border-radius: 9px; border: 2px solid var(--line-2); background: var(--surface); font-size: 14px; font-weight: 800; color: var(--text-2); box-shadow: 0 3px 0 var(--edge); }
.cat-tabs a span { color: var(--muted); font-weight: 700; font-size: 12px; margin-left: 4px; }
.cat-tabs a:hover { color: var(--text); }
.cat-tabs a.active { color: #fff; background: var(--accent); border-color: var(--accent); box-shadow: 0 3px 0 var(--accent-dark); }
.cat-tabs a.active span { color: rgba(255, 255, 255, .8); }
.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; padding: 14px; border: 2px solid var(--line); background: var(--surface); border-radius: var(--radius); }
.toolbar .field { margin: 0; }
.toolbar .field-search { flex: 1 1 220px; }
.toolbar.js .js-hide { display: none; }
.results-bar { display: flex; justify-content: space-between; align-items: center; margin: 16px 0 12px; }
.results-bar p { margin: 0; font-weight: 700; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field-label { font-size: 13px; font-weight: 800; color: var(--text-2); }
.field-label em { font-style: normal; color: var(--accent); font-weight: 700; font-size: 12px; margin-left: 4px; }
.field-help { font-size: 12.5px; color: var(--muted); }
.field-error { font-size: 13px; color: #ff7b8e; font-weight: 700; }
.field-error:empty { display: none; }
input[type=text], input[type=search], input[type=email], input[type=number], input:not([type]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px 13px; border-radius: var(--radius-sm);
  border: 2px solid var(--line-2); background: var(--bg-2); color: var(--text); font: inherit; font-size: 15px;
}
textarea { resize: vertical; }
select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
fieldset { border: 0; padding: 0; margin: 0 0 20px; }
legend { font: 400 22px var(--font-display); margin-bottom: 14px; }
.toggle { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 800; color: var(--text-2); cursor: pointer; min-height: 46px; }
.toggle input { position: absolute; opacity: 0; }
.toggle-ui { width: 42px; height: 24px; border-radius: 7px; background: var(--line-2); position: relative; transition: background .15s ease; }
.toggle-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 5px; background: #fff; transition: transform .15s ease; }
.toggle input:checked + .toggle-ui { background: var(--accent); }
.toggle input:checked + .toggle-ui::after { transform: translateX(18px); }
.toggle input:focus-visible + .toggle-ui { outline: 3px solid var(--yellow); outline-offset: 2px; }
.radio-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 2px solid var(--line-2); border-radius: var(--radius-sm); margin-bottom: 10px; cursor: pointer; background: var(--bg-2); }
.radio-card:hover { border-color: #4c5262; }
.radio-card:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--bg-2)); }
.radio-card span { display: flex; flex-direction: column; gap: 3px; }
.radio-card input { margin-top: 4px; accent-color: var(--accent); width: 17px; height: 17px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); margin-bottom: 6px; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--accent); width: 17px; height: 17px; }
.check a { color: var(--accent); }
.checkout-form .btn-block { margin-top: 16px; }

/* ---------- panels / layout ---------- */
.panel { position: relative; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.panel > h2:first-child { font-size: 24px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; padding-bottom: 40px; }
.summary { position: sticky; top: 90px; box-shadow: 0 5px 0 var(--edge); }
.total-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-top: 2px solid var(--line); margin-top: 8px; font-size: 15px; font-weight: 700; }
.total-row strong { font: 400 28px var(--font-display); }
.summary .btn { margin-top: 12px; }

.alert { padding: 13px 15px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; border: 2px solid; }
.alert-ok { border-color: #1f6b45; background: #12261c; }
.alert-warn { border-color: #6b5420; background: #262012; }
.alert-info { border-color: #23527f; background: #121f2c; }
.badge { display: inline-flex; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 800; border: 2px solid; white-space: nowrap; }
.badge-ok { color: var(--ok); border-color: #1f6b45; background: #12261c; }
.badge-warn { color: var(--warn); border-color: #6b5420; background: #262012; }
.badge-info { color: var(--info); border-color: #23527f; background: #121f2c; }
.badge-muted { color: var(--muted); border-color: var(--line-2); }

/* ---------- cart lines ---------- */
.lines, .summary-lines { list-style: none; margin: 0; padding: 0; }
.line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 2px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line-thumb { width: 54px; height: 54px; flex-shrink: 0; border-radius: 10px; background: var(--bg-2); border: 2px solid var(--line); display: grid; place-items: center; font: 400 18px var(--font-display); color: var(--text-2); overflow: hidden; }
.line-thumb img { width: 90%; height: 90%; object-fit: contain; }
.line-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.line-name { font-weight: 800; text-decoration: none; flex: 1; }
a.line-name:hover { color: var(--accent); }
.line-problem { font-size: 12.5px; color: var(--warn); font-weight: 800; }
.line-total { font-weight: 900; min-width: 72px; text-align: right; }
.line-qty-ro { color: var(--muted); font-size: 14px; }
.line-remove { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; width: 32px; height: 32px; border-radius: 8px; }
.line-remove:hover { color: #ff7b8e; background: var(--surface-2); }
.cart-empty { text-align: center; padding: 30px 0; }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--line-2); border-radius: var(--radius-sm); background: var(--bg-2); overflow: hidden; }
.qty button { width: 44px; height: 52px; background: none; border: 0; color: var(--text); font-size: 20px; font-weight: 800; cursor: pointer; }
.qty button:hover:not(:disabled) { background: var(--surface-2); }
.qty button:active:not(:disabled) { background: var(--surface-3); }
.qty button:disabled { opacity: .35; cursor: not-allowed; }
.qty input { width: 50px; min-height: 0; height: 52px; border: 0; border-radius: 0; text-align: center; background: transparent; -moz-appearance: textfield; padding: 0; font-weight: 900; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty-sm button { width: 32px; height: 32px; font-size: 16px; }
.qty-val { min-width: 24px; text-align: center; font-weight: 900; font-size: 14px; }

/* ---------- drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 60; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--surface); border-left: 2px solid var(--line-2); z-index: 61; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .22s ease; visibility: hidden; }
.drawer.open { transform: none; visibility: visible; }
.drawer:focus { outline: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 2px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 26px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 4px 20px; }
.drawer-foot { padding: 16px 20px 22px; border-top: 2px solid var(--line); display: grid; gap: 12px; }
.drawer-foot .total-row { border: 0; padding: 0 0 4px; margin: 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--surface-2); border: 2px solid var(--line-2); border-left: 6px solid var(--ok); padding: 12px 18px; border-radius: 10px; z-index: 70; font-size: 14px; font-weight: 800; box-shadow: 0 5px 0 var(--edge); transition: opacity .2s ease, transform .2s ease; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- product page ---------- */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); padding: 22px 0 14px; }
.crumbs a { text-decoration: none; color: var(--text-2); font-weight: 700; }
.crumbs a:hover { color: var(--accent); }
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; padding-bottom: 20px; }
.product-media .thumb { border-radius: 18px; border: 2px solid var(--line); border-bottom: 6px solid var(--r); box-shadow: 0 6px 0 var(--edge); }
.product-media .thumb-ph { font-size: 120px; }
.product h1 { margin-bottom: 14px; }
.product-price-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 6px 0 18px; }
.product-desc { color: var(--text-2); }
.buy-row { display: flex; gap: 12px; margin: 24px 0 10px; }
.info-list { margin-top: 26px; display: grid; gap: 12px; }
.info-list div { position: relative; overflow: hidden; border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px 14px 22px; background: var(--surface); }
.info-list div::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--blue); }
.info-list div:nth-child(2)::before { background: var(--green); }
.info-list div:nth-child(3)::before { background: var(--yellow); }
.info-list h2 { font: 800 15px var(--font); margin-bottom: 4px; }
.info-list p { color: var(--text-2); font-size: 14px; margin: 0; }
.info-list a { color: var(--accent); }

/* ---------- order ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 0 0 16px 20px; border-left: 2px solid var(--line-2); position: relative; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 3px; background: var(--line-2); }
.timeline li:first-child::before { background: var(--accent); }
.timeline p { margin: 6px 0 2px; color: var(--text-2); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 800; word-break: break-word; }

/* ---------- prose / misc ---------- */
.prose h2 { font-size: 24px; margin-top: 1.3em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-2); }
.prose a { color: var(--accent); }
.prose ul { padding-left: 20px; }
.empty { text-align: center; padding: 60px 20px; border: 2px dashed var(--line-2); border-radius: var(--radius); margin: 30px 0; background: var(--surface); }

/* ---------- footer ---------- */
.site-footer { background: var(--bg-2); border-top: 2px solid var(--line); padding: 40px 0 24px; margin-top: 44px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.footer-grid h3 { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.footer-grid a { display: block; text-decoration: none; color: var(--text-2); font-size: 14px; padding: 3px 0; }
.footer-grid a:hover { color: var(--accent); }
.footer-grid .brand { display: inline-flex; margin-bottom: 10px; }
.disclaimer { border-top: 2px solid var(--line); margin-top: 28px; padding-top: 18px; font-size: 12.5px; color: var(--muted); }
.disclaimer p { margin: 0 0 6px; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .header-search { display: none; }
}
@media (max-width: 900px) {
  .hero-grid, .product, .two-col { grid-template-columns: 1fr; }
  .hero { padding-top: 38px; }
  .summary { position: static; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .menu-btn { display: inline-flex; }
  .main-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; padding: 10px 16px 16px; background: var(--bg-2); border-bottom: 2px solid var(--line); }
  .menu-open .main-nav { display: flex; }
  .main-nav a { padding: 12px; font-size: 16px; }
  .main-nav a.active { box-shadow: inset 4px 0 0 var(--accent); }
  .two-col .summary { order: -1; }
  [data-checkout] + .summary, .two-col:has([data-checkout]) .summary { order: 0; }
  .game-full { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 14.5px; }
  .header-row { gap: 12px; height: 62px; }
  .main-nav { top: 62px; }
  .cart-label { display: none; }
  .brand-name { font-size: 17px; }
  .hero { padding: 28px 0 12px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-body { padding: 10px 11px 12px; }
  .card-title { font-size: 14px; }
  .price { font-size: 16px; height: 27px; padding: 0 9px 0 18px; }
  .price-lg { font-size: 26px; height: 42px; padding: 0 14px 0 27px; }
  .card-meta { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 10px; }
  .card-tags { top: 8px; left: 8px; right: 8px; }
  .rarity { font-size: 9px; padding: 2px 6px; }
  .tag-sample { font-size: 9.5px; padding: 2px 6px; }
  .thumb-ph { font-size: 40px; }
  .btn-add { min-height: 42px; font-size: 13.5px; padding: 0 10px; }
  .btn-add .btn-icon { display: none; }
  .toolbar { padding: 12px; }
  .toolbar .field:not(.field-search) { flex: 1 1 calc(50% - 6px); }
  .panel { padding: 16px; }
  .hud-stat strong { font-size: 30px; }
  .rarity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .rarity-tile { min-height: 100px; padding: 13px 14px; }
  .rarity-tile-name { font-size: 21px; }
  .line-total { min-width: 60px; }
  .game-row { min-height: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.cancel-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: -4px 0 18px; }
[hidden] { display: none !important; }
.card-link, .product-media { text-decoration: none; }
.drawer .line { flex-wrap: wrap; }
.drawer .line-info { flex: 1 1 calc(100% - 66px); }
.drawer .qty-sm { margin-left: 66px; }
.drawer .line-total { margin-left: auto; }

/* order chat */
.chat-log { max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px 12px; }
.msg { max-width: 82%; padding: 9px 13px; border-radius: 12px; background: var(--surface-2); border: 2px solid var(--line); }
.msg-mine { align-self: flex-end; background: color-mix(in srgb, var(--accent) 18%, var(--surface-2)); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); border-bottom-right-radius: 4px; }
.msg-theirs { align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-who { display: block; font-size: 12px; font-weight: 800; color: var(--text-2); }
.msg-body { margin: 2px 0 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-time { display: block; font-size: 11px; color: var(--muted); }
.chat-empty { margin: 8px 0; }
.chat-form { display: flex; gap: 10px; align-items: flex-end; border-top: 2px solid var(--line); padding-top: 12px; }
.chat-form textarea { flex: 1; resize: vertical; min-height: 46px; }
.chat-error { color: var(--warn); font-size: 13px; margin: 8px 0 0; }
.chat-closed { margin: 0; }

/* analytics consent */
.consent { position: fixed; left: 16px; bottom: 16px; z-index: 60; max-width: 420px; background: var(--surface-2); border: 2px solid var(--line-2); border-radius: var(--radius); padding: 16px 18px; box-shadow: 0 5px 0 var(--edge); }
.consent p { margin: 0 0 12px; font-size: 13.5px; color: var(--text-2); }
.consent-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.consent-actions a { color: var(--muted); margin-left: auto; }
@media (max-width: 560px) { .consent { left: 10px; right: 10px; bottom: 10px; max-width: none; } }
