:root {
  --bg: #14111f;
  --card: #1f1a33;
  --line: #342d52;
  --text: #f3efe6;
  --muted: #b0a9c4;
  --accent: #ff5a36;
  --accent-text: #1a0f0a;
  --gold: #ffd23f;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pixel: "Press Start 2P", "Courier New", monospace;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.5; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.muted { color: var(--muted); }
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 5; }
.logo { font-family: var(--pixel); font-size: 12px; text-decoration: none; color: var(--gold); line-height: 1.6; }
.cart-btn { font: inherit; font-weight: 600; background: transparent; color: var(--text); border: 2px solid var(--line); border-radius: 10px; padding: 8px 14px; cursor: pointer; }
.cart-btn:focus-visible, button:focus-visible, a:focus-visible, select:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.count { display: inline-block; min-width: 1.4em; text-align: center; color: var(--accent); font-weight: 700; }
.hero { text-align: center; padding: 56px 20px 40px; max-width: 760px; margin: 0 auto; }
.hero h1 { font-family: var(--pixel); font-size: clamp(20px, 6vw, 36px); line-height: 1.5; margin: 0 0 16px; color: var(--gold); }
.hero p { font-size: 18px; color: var(--muted); margin: 0 0 24px; }
.primary { display: inline-block; font: inherit; font-weight: 700; background: var(--accent); color: var(--accent-text); border: 0; border-radius: 10px; padding: 12px 22px; text-decoration: none; cursor: pointer; }
.primary[disabled] { opacity: .5; cursor: not-allowed; }
.ghost { font: inherit; background: transparent; color: var(--text); border: 2px solid var(--line); border-radius: 10px; padding: 8px 14px; cursor: pointer; }
.link { font: inherit; background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 0; }
.shop, .product-page { max-width: 1100px; margin: 0 auto; padding: 0 20px 48px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 20px; }
.toolbar h2 { margin: 0; font-size: 24px; flex: 1 1 auto; }
.sort select { font: inherit; background: var(--card); color: var(--text); border: 2px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.tile { background: var(--card); border: 2px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.tile .media { aspect-ratio: 4 / 3; background: #2a2344; display: flex; align-items: center; justify-content: center; font-size: 56px; position: relative; text-decoration: none; }
.tile .media img { width: 100%; height: 100%; object-fit: cover; }
.ribbon { position: absolute; top: 10px; left: 10px; background: var(--gold); color: #251a00; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 6px; }
.tile .body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tile h3 { margin: 0; font-size: 17px; }
.tile h3 a { text-decoration: none; }
.price { font-weight: 800; font-size: 18px; }
.price s { color: var(--muted); font-weight: 400; margin-left: 6px; }
.tile .actions { margin-top: auto; display: flex; gap: 8px; }
.tile .actions .primary, .tile .actions .ghost { flex: 1; text-align: center; padding: 10px; }
.more { display: block; margin: 24px auto 0; }
.product-page .back { color: var(--muted); }
.detail { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 800px) { .detail { grid-template-columns: 1fr 1fr; } }
.detail .main-img { aspect-ratio: 4 / 3; background: #2a2344; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 96px; overflow: hidden; }
.detail .main-img img { width: 100%; height: 100%; object-fit: cover; }
.detail h1 { margin: 0 0 8px; font-size: 30px; }
.detail .price { font-size: 26px; margin-bottom: 16px; }
.desc p { margin: 0 0 8px; }
.info { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 12px; }
.info h2 { font-size: 16px; margin: 0 0 4px; }
.buy { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 20px 0 8px; }
.stepper { display: inline-flex; align-items: center; gap: 10px; }
.stepper button { width: 38px; height: 38px; font-size: 20px; border-radius: 8px; border: 2px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.stepper button[disabled] { opacity: .4; cursor: not-allowed; }
.alert { color: #ff9b86; }
.backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 20; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--bg); border-left: 2px solid var(--line); z-index: 21; display: flex; flex-direction: column; padding: calc(16px + env(safe-area-inset-top, 0px)) 18px calc(16px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; }
.drawer[hidden], .backdrop[hidden] { display: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.drawer-head h2 { margin: 0; font-size: 20px; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.thumb { width: 64px; height: 64px; background: #2a2344; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 28px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.line .name { margin: 0; font-weight: 600; }
.line .lp { text-align: right; font-weight: 700; }
.line .qty { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; }
.line .qty button { width: 28px; height: 28px; border-radius: 6px; border: 2px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.totals { margin-top: 16px; display: grid; gap: 6px; }
.totals .row { display: flex; justify-content: space-between; }
.totals .total { font-weight: 800; font-size: 18px; }
.totals .primary { width: 100%; margin-top: 10px; text-align: center; }
.site-foot { text-align: center; color: var(--muted); padding: 28px 20px; border-top: 1px solid var(--line); }