/* ============================================================
   Virtual LGS — Design System
   lgs.css v1.0
   Akihabara-inspired · CX palette · dark-only
   ============================================================ */

/* ── Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Zen+Kaku+Gothic+New:wght@400;500;700&display=swap');

/* ── Tokens ── */
:root {
  --bg:       oklch(0.13 0.003 270);
  --bg-1:     oklch(0.17 0.004 270);
  --bg-2:     oklch(0.22 0.005 270);
  --bg-3:     oklch(0.28 0.006 270);
  --line:     oklch(0.30 0.006 270);
  --line-hi:  oklch(0.42 0.008 270);
  --fg:       oklch(0.98 0.002 270);
  --fg-2:     oklch(0.78 0.004 270);
  --fg-3:     oklch(0.58 0.005 270);

  --neon-a:      oklch(0.80 0.16 78);
  --neon-a-soft: oklch(0.80 0.16 78 / 0.14);
  --neon-b:      oklch(0.72 0.16 240);
  --neon-b-soft: oklch(0.72 0.16 240 / 0.16);
  --neon-c:      oklch(0.78 0.13 175);
  --live:        var(--neon-a);

  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 8px;
  --pad:  16px;

  --f-sans: "Inter", system-ui, sans-serif;
  --f-disp: "Space Grotesk", "Inter", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
  --f-jp:   "Zen Kaku Gothic New", "Noto Sans JP", "Inter", sans-serif;
}

/* ── Reset ── */
.lgs * { box-sizing: border-box; }
.lgs {
  font-family: var(--f-sans);
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  min-height: 100vh;
}

/* ============================================================
   Topbar
   ============================================================ */
.lgs-topbar {
  position: sticky; top: 0; z-index: 60;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 10px 24px;
  /* Push content below the iOS notch / Dynamic Island without losing sticky. */
  padding-top: max(10px, env(safe-area-inset-top, 10px));
  padding-left: max(24px, env(safe-area-inset-left, 24px));
  padding-right: max(24px, env(safe-area-inset-right, 24px));
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.lgs-brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--f-disp);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  flex-shrink: 0;
}
.lgs-brand-mark {
  width: 32px; height: 32px;
  flex: 0 0 32px;
  display: grid; place-items: center;
  background: var(--neon-a);
  color: #1a1207;
  font-family: var(--f-disp);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
  border-radius: 6px;
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--neon-a) 50%, transparent);
}
.lgs-brand-word {
  font-size: 15px;
  display: flex; flex-direction: row; align-items: baseline;
  line-height: 1; gap: 1px;
  color: var(--fg);
  letter-spacing: -0.01em;
}
.lgs-brand-word .w1 { color: var(--fg); font-weight: 600; }
.lgs-brand-word .w2 { color: var(--neon-a); font-weight: 700; }
.lgs-brand-word .jp {
  font-family: var(--f-jp);
  font-size: 9px; font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--fg-3);
  text-transform: uppercase;
  margin-left: 10px; padding-left: 10px;
  border-left: 1px solid var(--line);
}

.lgs-nav {
  display: flex; gap: 2px; align-items: center;
  justify-self: center;
  overflow-x: auto;
}
.lgs-nav a {
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--fg-2);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  position: relative;
  white-space: nowrap;
}
.lgs-nav a:hover { color: var(--fg); background: var(--bg-2); }
.lgs-nav a.active { color: var(--fg); }
.lgs-nav a.active::after {
  content: ""; position: absolute;
  left: 12px; right: 12px; bottom: 2px; height: 2px;
  background: var(--neon-a);
}
.lgs-nav a.ext {
  color: var(--fg-3);
  font-size: 11px;
}
.lgs-nav a.ext:hover { color: var(--fg-2); }
.lgs-nav a.admin {
  color: var(--neon-a);
  border: 1px solid var(--neon-a);
  margin-left: 8px;
}
.lgs-nav a.admin:hover { background: color-mix(in oklch, var(--neon-a) 15%, transparent); }

/* Inline CX brand mark for nav links that cross-link to other CX apps
   (CX Exchange, CX Vault). Matches the small gold tile used on vault.html
   so the lockup feels consistent across apps. */
.lgs-nav a.brand-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--neon-a);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.lgs-nav a.brand-link:hover { color: var(--fg); background: transparent; }
.lgs-nav-cx {
  display: inline-grid; place-items: center;
  width: 20px; height: 20px;
  background: linear-gradient(135deg, var(--neon-a), color-mix(in oklch, var(--neon-a) 70%, white));
  color: #0a0a0a;
  font-family: var(--f-disp);
  font-weight: 900;
  font-size: 9px;
  letter-spacing: 0;
  border-radius: 4px;
}

.lgs-actions { display: flex; align-items: center; gap: 10px; }

/* ── Collector+ apps dropdown (self-contained, LGS-scoped) ──
   Lives in .lgs-actions next to KIRA / ORDERS / cart. Styling matches
   the gold accent used on the rest of the topbar. */
.lgs-cplus {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.lgs-cplus-trigger {
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.3);
  color: var(--neon-a);
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  /* Match .lgs-icon-btn height (34px) so the whole action row lines up. */
  height: 34px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
  box-sizing: border-box;
  transition: background 0.15s, border-color 0.15s;
}
.lgs-cplus-trigger:hover {
  background: rgba(201, 168, 76, 0.15);
  border-color: var(--neon-a);
}
.lgs-cplus-chevron {
  font-size: 9px;
  opacity: 0.7;
  transition: transform 0.15s;
}
.lgs-cplus.open .lgs-cplus-chevron { transform: rotate(180deg); }
.lgs-cplus-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #0d0d0d;
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 10px;
  padding: 6px;
  min-width: 220px;
  z-index: 2000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}
.lgs-cplus.open .lgs-cplus-menu { display: block; }
.lgs-cplus-menu a {
  display: block;
  padding: 10px 14px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 8px;
  transition: background 0.1s, color 0.1s;
}
.lgs-cplus-menu a:hover {
  background: rgba(201, 168, 76, 0.1);
  color: var(--fg);
}
.lgs-cplus-sep {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin: 4px 0;
}

.lgs-icon-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg-2);
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  cursor: pointer;
  font-family: var(--f-mono);
  font-size: 13px;
  position: relative;
}
.lgs-icon-btn:hover { border-color: var(--line-hi); color: var(--fg); }
.lgs-icon-btn[data-count]::after {
  content: attr(data-count);
  position: absolute; top: -6px; right: -6px;
  background: var(--neon-a); color: #1a1207;
  font-family: var(--f-mono); font-weight: 700;
  font-size: 10px; padding: 1px 5px; border-radius: 10px;
  min-width: 16px; text-align: center;
}

/* ============================================================
   Rail + Aisle sidebar
   ============================================================ */
.lgs-rail {
  display: grid;
  grid-template-columns: 72px 1fr;
  min-height: 100%;
}

.lgs-aisle {
  border-right: 1px solid var(--line);
  background: var(--bg);
  position: sticky; top: 53px;
  align-self: start;
  height: calc(100vh - 53px);
  display: flex; flex-direction: column;
  padding: 20px 0; gap: 4px;
}
.lgs-aisle-marker {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px;
  padding: 12px 8px;
  text-decoration: none;
  color: var(--fg-3);
  border-left: 2px solid transparent;
  cursor: pointer;
}
.lgs-aisle-marker:hover { color: var(--fg); background: var(--bg-1); }
.lgs-aisle-marker.active {
  color: var(--fg);
  border-left-color: var(--neon-a);
  background: var(--bg-1);
}
.lgs-aisle-marker .jp {
  font-family: var(--f-jp);
  font-size: 18px; font-weight: 700; line-height: 1;
}
.lgs-aisle-marker .abbr {
  font-family: var(--f-mono);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--fg-2);
}
.lgs-aisle-marker.active .abbr { color: var(--neon-a); }
.lgs-aisle-marker .num {
  font-family: var(--f-mono);
  font-size: 9px; letter-spacing: 0.1em;
}

.lgs-main { padding: 32px 32px 80px; }

/* ============================================================
   Hero / Featured Drop
   ============================================================ */
.lgs-hero {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-1), var(--bg));
  border-radius: var(--r-md);
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
}
.lgs-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.25;
  mask-image: radial-gradient(ellipse at 70% 50%, #000 30%, transparent 70%);
  pointer-events: none;
}
.lgs-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px;
  align-items: center;
}

.lgs-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-1);
}
.lgs-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 8px var(--live);
  animation: lgs-blink 1.2s infinite;
}
@keyframes lgs-blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0.2; } }

.lgs-hero h1 {
  font-family: var(--f-disp);
  font-size: 64px;
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin: 16px 0 8px;
  font-weight: 700;
  text-wrap: balance;
}
.lgs-hero h1 .jp {
  display: block;
  font-family: var(--f-jp);
  font-size: 16px; font-weight: 500;
  letter-spacing: 0.4em;
  color: var(--neon-a);
  margin-bottom: 14px;
}
.lgs-hero h1 .accent { color: var(--neon-a); }
.lgs-hero .sub {
  color: var(--fg-2);
  font-size: 15px;
  max-width: 46ch;
  margin: 0 0 24px;
  line-height: 1.5;
}
.lgs-hero-meta {
  display: flex; gap: 28px;
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
}
.lgs-hero-meta .cell .k {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
  display: block; margin-bottom: 4px;
}
.lgs-hero-meta .cell .v {
  font-family: var(--f-disp);
  font-size: 20px; font-weight: 600;
}
.lgs-hero-meta .cell .v.neon { color: var(--neon-b); }

/* Countdown */
.lgs-countdown {
  display: flex; gap: 8px;
  margin: 20px 0 28px;
}
.lgs-cd-cell {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  text-align: center;
  min-width: 72px;
  position: relative;
  overflow: hidden;
}
.lgs-cd-cell::before {
  content: ""; position: absolute; inset: 0 0 50% 0;
  background: color-mix(in oklab, var(--bg-1) 100%, transparent);
  pointer-events: none;
}
.lgs-cd-cell .n {
  position: relative;
  font-family: var(--f-mono);
  font-size: 30px; font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.lgs-cd-cell .l {
  position: relative;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--fg-3);
  margin-top: 6px; display: block;
}

/* Hero drop visual */
.lgs-drop-visual {
  position: relative;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line-hi);
  border-radius: var(--r-md);
  background:
    radial-gradient(ellipse at 50% 40%, color-mix(in oklab, var(--neon-b) 18%, var(--bg-2)) 0%, var(--bg-2) 60%),
    var(--bg-2);
  overflow: hidden;
  display: grid; place-items: center;
  transform: rotate(-2deg);
  box-shadow: 0 30px 60px -20px color-mix(in oklab, var(--neon-a) 40%, transparent);
}
.lgs-drop-visual::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    135deg,
    transparent 0 14px,
    color-mix(in oklab, var(--fg) 3%, transparent) 14px 15px
  );
  pointer-events: none; z-index: 1;
}
.lgs-drop-photo {
  position: relative; z-index: 2;
  width: 90%; height: 90%;
  object-fit: contain;
  filter: drop-shadow(0 20px 24px rgba(0,0,0,0.45));
}
.lgs-drop-visual .corner-tag {
  position: absolute; top: 12px; left: 12px; z-index: 4;
  background: var(--neon-a); color: #1a1207;
  font-family: var(--f-mono); font-size: 10px;
  font-weight: 700; letter-spacing: 0.1em;
  padding: 4px 8px; border-radius: var(--r-sm);
}
.lgs-drop-visual .numbered {
  position: absolute; bottom: 12px; right: 12px; z-index: 4;
  font-family: var(--f-mono); font-size: 11px;
  color: var(--fg-2);
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  padding: 3px 7px; border-radius: var(--r-sm);
  backdrop-filter: blur(4px);
}
.lgs-drop-visual .foil {
  position: absolute; inset: 0; z-index: 3;
  background: linear-gradient(
    120deg,
    transparent 40%,
    color-mix(in oklab, var(--neon-b) 30%, transparent) 50%,
    transparent 60%
  );
  mix-blend-mode: screen;
  animation: lgs-foil 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes lgs-foil {
  0%, 100% { transform: translateX(-30%); }
  50% { transform: translateX(30%); }
}
.lgs-drop-visual .label {
  position: relative;
  text-align: center;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--fg-3);
  text-transform: uppercase;
}
.lgs-drop-visual .label .big {
  display: block;
  font-family: var(--f-disp);
  font-size: 22px; color: var(--fg);
  letter-spacing: -0.01em;
  text-transform: none;
  margin-bottom: 8px;
}

/* ============================================================
   Buttons
   ============================================================ */
.lgs-cta-row { display: flex; gap: 10px; flex-wrap: wrap; }

.lgs-btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-sans);
  font-size: 13px; font-weight: 600;
  padding: 12px 18px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.lgs-btn:active { transform: translateY(1px); }
.lgs-btn-primary {
  background: var(--neon-a); color: #1a1207;
  box-shadow: 0 0 0 1px var(--neon-a);
}
.lgs-btn-primary:hover {
  background: color-mix(in oklab, var(--neon-a) 90%, #fff);
  box-shadow: 0 0 0 1px var(--neon-a), 0 0 32px var(--neon-a-soft);
}
.lgs-btn-primary:disabled {
  opacity: 0.4; cursor: default;
  box-shadow: none;
}
.lgs-btn-primary:disabled:hover { background: var(--neon-a); }
.lgs-btn-secondary {
  background: var(--bg-2); color: var(--fg);
  border-color: var(--line-hi);
}
.lgs-btn-secondary:hover { background: var(--bg-3); }
.lgs-btn-ghost {
  background: transparent; color: var(--fg-2);
  border-color: var(--line);
}
.lgs-btn-ghost:hover { color: var(--fg); border-color: var(--line-hi); }

/* Mini action buttons (card-level) */
.lgs-mini-btn {
  font-family: var(--f-mono);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.06em;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-hi);
  background: var(--bg-2);
  color: var(--fg);
  cursor: pointer;
  text-transform: uppercase;
  transition: background 0.12s ease, color 0.12s ease;
}
.lgs-mini-btn:hover { background: var(--neon-a); color: #1a1207; border-color: var(--neon-a); }
.lgs-mini-btn.ghost { background: transparent; }
.lgs-mini-btn.raffle { border-color: var(--neon-b); color: var(--neon-b); }
.lgs-mini-btn.raffle:hover { background: var(--neon-b); color: #06121a; }
.lgs-mini-btn.sold { background: transparent; color: var(--fg-3); border-color: var(--line); cursor: not-allowed; }
.lgs-mini-btn.sold:hover { background: transparent; color: var(--fg-3); border-color: var(--line); }

/* ============================================================
   Section headers
   ============================================================ */
.lgs-section { margin-top: 56px; }
.lgs-section-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 24px;
}
.lgs-section-title {
  display: flex; align-items: baseline; gap: 14px;
}
.lgs-section-title h2 {
  font-family: var(--f-disp);
  font-size: 28px; font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}
.lgs-section-title .jp {
  font-family: var(--f-jp);
  font-size: 13px;
  color: var(--neon-a);
  letter-spacing: 0.3em;
}
.lgs-section-title .count {
  font-family: var(--f-mono);
  font-size: 11px; color: var(--fg-3);
  letter-spacing: 0.1em; margin-left: 4px;
}
.lgs-section-head .head-right {
  display: flex; gap: 6px; align-items: center;
  font-family: var(--f-mono);
  font-size: 11px; color: var(--fg-3);
}

/* Filter chips */
.lgs-chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.lgs-chip {
  font-family: var(--f-mono);
  font-size: 11px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg-2);
  cursor: pointer;
  letter-spacing: 0.04em;
  background: transparent;
  transition: all 0.12s ease;
}
.lgs-chip:hover { color: var(--fg); border-color: var(--line-hi); }
.lgs-chip.active {
  color: var(--neon-a);
  border-color: var(--neon-a);
  background: var(--neon-a-soft);
}

/* ============================================================
   Product grid + cards
   ============================================================ */
.lgs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.lgs-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-1);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  display: flex; flex-direction: column;
  position: relative;
}
.lgs-card:hover {
  border-color: var(--line-hi);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -12px color-mix(in oklab, var(--neon-a) 25%, transparent);
}
.lgs-card.is-sold-out .lgs-card-media { opacity: 0.45; filter: grayscale(0.4); }
.lgs-card.is-sold-out .lgs-card-name { color: var(--fg-3); }
.lgs-card.is-sold-out:hover { transform: none; box-shadow: none; border-color: var(--line); }

.lgs-card-media {
  aspect-ratio: 4 / 5;
  position: relative;
  background: var(--bg-2);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.lgs-card-media::after {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0 12px,
    color-mix(in oklab, var(--fg) 5%, transparent) 12px 13px
  );
}
.lgs-card-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; z-index: 1;
}
.lgs-card-media .mono {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  text-align: center;
  text-transform: uppercase;
  padding: 16px;
}
.lgs-card-media .mono .t {
  display: block;
  font-family: var(--f-disp);
  font-size: 13px; color: var(--fg);
  text-transform: none;
  letter-spacing: -0.005em;
  margin-bottom: 6px;
}

.lgs-card-tags {
  position: absolute; top: 8px; left: 8px;
  display: flex; flex-direction: column; gap: 4px;
  z-index: 2;
}

.lgs-tag {
  font-family: var(--f-mono);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.08em;
  padding: 3px 7px;
  border-radius: var(--r-sm);
  text-transform: uppercase;
}
.lgs-tag.live   { background: var(--neon-a); color: #1a1207; }
.lgs-tag.soon   { background: var(--bg-3); color: var(--fg); border: 1px solid var(--line-hi); }
.lgs-tag.raffle { background: var(--neon-b); color: #06121a; }
.lgs-tag.sold   { background: var(--bg-3); color: var(--fg-3); border: 1px solid var(--line); }
.lgs-tag.grade  { background: var(--bg-2); color: var(--neon-c); border: 1px solid var(--neon-c); }
.lgs-tag.preorder { background: var(--neon-c); color: #06141a; }

.lgs-card-stock {
  position: absolute; top: 8px; right: 8px;
  background: color-mix(in oklab, var(--bg) 80%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 4px 7px;
  font-family: var(--f-mono);
  font-size: 10px;
  z-index: 2;
  color: var(--fg-2);
}
.lgs-card-stock .n { color: var(--fg); font-weight: 600; }
.lgs-card-stock.low .n { color: var(--neon-a); }

.lgs-card-body {
  padding: 12px 14px 14px;
  display: flex; flex-direction: column; gap: 6px;
  flex: 1;
}
.lgs-card-brand {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--fg-3);
  text-transform: uppercase;
}
.lgs-card-name {
  font-family: var(--f-disp);
  font-size: 14px; font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.25;
  color: var(--fg);
}
.lgs-card-foot {
  margin-top: auto;
  padding-top: 10px;
  display: flex; align-items: end; justify-content: space-between;
  gap: 8px;
}

.lgs-price {
  font-family: var(--f-mono);
  font-size: 14px; font-weight: 600;
  color: var(--fg);
  letter-spacing: -0.01em;
}
.lgs-price .cur { color: var(--fg-3); font-size: 10px; margin-right: 2px; }

/* Stock bar */
.lgs-stock-bar {
  height: 3px;
  background: var(--bg-2);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}
.lgs-stock-bar .fill {
  height: 100%;
  background: var(--neon-b);
  transition: width 0.4s ease;
}
.lgs-stock-bar.low .fill { background: var(--neon-a); }

/* ============================================================
   Modal (raffle)
   ============================================================ */
.lgs-modal-scrim {
  position: fixed; inset: 0; z-index: 100;
  background: color-mix(in oklab, #000 70%, transparent);
  backdrop-filter: blur(8px);
  display: grid; place-items: center;
  animation: lgs-fade 0.2s ease;
}
@keyframes lgs-fade { from { opacity: 0; } to { opacity: 1; } }

.lgs-modal {
  background: var(--bg);
  border: 1px solid var(--line-hi);
  border-radius: var(--r-md);
  width: 480px;
  max-width: calc(100vw - 48px);
  padding: 32px;
  position: relative;
  box-shadow: 0 40px 80px -20px color-mix(in oklab, var(--neon-a) 40%, transparent);
}
.lgs-modal .close {
  position: absolute; top: 16px; right: 16px;
  background: transparent; border: 1px solid var(--line);
  color: var(--fg-2); width: 28px; height: 28px;
  border-radius: var(--r-sm); cursor: pointer;
  font-family: var(--f-mono);
}
.lgs-modal h3 {
  font-family: var(--f-disp);
  font-size: 22px; margin: 0 0 4px;
}
.lgs-modal .jp-acc {
  font-family: var(--f-jp);
  font-size: 11px; color: var(--neon-a);
  letter-spacing: 0.3em; margin-bottom: 16px;
}
.lgs-modal p { color: var(--fg-2); font-size: 14px; line-height: 1.5; }

.lgs-modal-info {
  margin: 20px 0; padding: 16px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-family: var(--f-mono);
  font-size: 12px; color: var(--fg-2);
}
.lgs-modal-info-row {
  display: flex; justify-content: space-between;
  padding: 4px 0;
}
.lgs-modal-info-row .v { color: var(--fg); }
.lgs-modal-info-row .v.neon { color: var(--neon-b); }

.lgs-entry-picker {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 20px;
}
.lgs-entry-picker .label {
  font-family: var(--f-mono);
  font-size: 11px; color: var(--fg-3);
  letter-spacing: 0.1em;
}
.lgs-entry-picker .count {
  font-family: var(--f-mono);
  font-size: 16px; min-width: 24px;
  text-align: center;
}
.lgs-entry-picker .note {
  font-family: var(--f-mono);
  font-size: 10px; color: var(--fg-3);
  margin-left: 8px;
}

/* ============================================================
   Cart drawer
   ============================================================ */
.lgs-cart-scrim {
  position: fixed; inset: 0; z-index: 100;
  background: color-mix(in oklab, #000 40%, transparent);
  animation: lgs-fade 0.2s ease;
}

.lgs-cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 400px; max-width: 90vw;
  background: var(--bg);
  border-left: 1px solid var(--line-hi);
  z-index: 110;
  display: flex; flex-direction: column;
  animation: lgs-slide-in 0.25s ease;
}
@keyframes lgs-slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.lgs-cart-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
}
.lgs-cart-head h3 {
  font-family: var(--f-disp);
  font-size: 20px; margin: 0;
}
.lgs-cart-head .jp {
  font-family: var(--f-jp); color: var(--neon-a);
  font-size: 10px; letter-spacing: 0.3em;
  display: block; margin-top: 2px;
}

.lgs-cart-items { flex: 1; overflow-y: auto; padding: 16px 24px; }

.lgs-cart-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px; padding: 12px 0;
  border-bottom: 1px dashed var(--line);
  align-items: center;
}
.lgs-cart-item .thumb {
  width: 48px; height: 60px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.lgs-cart-item .thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.lgs-cart-item .n {
  font-family: var(--f-disp);
  font-size: 13px; font-weight: 600;
}
.lgs-cart-item .b {
  font-family: var(--f-mono); font-size: 10px;
  color: var(--fg-3); letter-spacing: 0.08em;
  text-transform: uppercase;
}
.lgs-cart-item .p {
  font-family: var(--f-mono); font-size: 13px; font-weight: 600;
}
.lgs-cart-item .qty {
  display: flex; align-items: center; gap: 6px;
  margin-top: 6px;
}
.lgs-cart-item .qty button {
  width: 24px; height: 24px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); color: var(--fg-2);
  cursor: pointer; font-family: var(--f-mono); font-size: 12px;
  display: grid; place-items: center;
}
.lgs-cart-item .qty button:hover { border-color: var(--line-hi); color: var(--fg); }
.lgs-cart-item .qty span {
  font-family: var(--f-mono); font-size: 12px;
  min-width: 20px; text-align: center;
}

.lgs-cart-foot {
  padding: 20px 24px;
  /* Clear the iOS home bar so the CHECKOUT button is always tappable. */
  padding-bottom: max(20px, env(safe-area-inset-bottom, 20px));
  border-top: 1px solid var(--line);
  background: var(--bg-1);
}
.lgs-cart-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 16px;
}
.lgs-cart-total .l {
  color: var(--fg-3); font-size: 12px;
  font-family: var(--f-mono);
  letter-spacing: 0.1em;
}
.lgs-cart-total .v {
  font-family: var(--f-mono);
  font-size: 22px; font-weight: 700;
}
.lgs-cart-shipping {
  text-align: center; margin-top: 10px;
  font-family: var(--f-mono);
  font-size: 10px; color: var(--fg-3);
  letter-spacing: 0.1em;
}

.lgs-empty-cart {
  text-align: center;
  padding: 48px 24px;
  color: var(--fg-3);
}
.lgs-empty-cart .jp {
  font-family: var(--f-jp);
  font-size: 28px; color: var(--line-hi);
  display: block; margin-bottom: 12px;
}
.lgs-empty-cart p { font-size: 13px; margin: 0; }

/* ============================================================
   Toast system
   ============================================================ */
.lgs-toast-wrap {
  position: fixed;
  /* Keep toasts above the iOS home bar so they're not cropped. */
  bottom: max(24px, env(safe-area-inset-bottom, 24px));
  right: max(24px, env(safe-area-inset-right, 24px));
  z-index: 120;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.lgs-toast {
  background: var(--bg-1);
  border: 1px solid var(--line-hi);
  border-left: 3px solid var(--neon-a);
  padding: 12px 16px;
  border-radius: var(--r-sm);
  min-width: 280px;
  font-size: 13px; color: var(--fg);
  animation: lgs-slide-in 0.25s ease;
  pointer-events: auto;
}
.lgs-toast.info    { border-left-color: var(--neon-b); }
.lgs-toast.warning { border-left-color: var(--neon-a); }
.lgs-toast.error   { border-left-color: oklch(0.65 0.22 25); }
.lgs-toast.success { border-left-color: var(--neon-c); }
.lgs-toast .k {
  font-family: var(--f-mono);
  font-size: 10px; letter-spacing: 0.12em;
  color: var(--fg-3);
  display: block; margin-bottom: 2px;
}

/* ============================================================
   Footer
   ============================================================ */
.lgs-footer {
  border-top: 1px solid var(--line);
  padding: 32px;
  margin-top: 80px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--fg-3);
  letter-spacing: 0.1em;
}
.lgs-footer a {
  color: var(--fg-3);
  text-decoration: none;
}
.lgs-footer a:hover { color: var(--fg-2); }

/* ============================================================
   Product detail page
   ============================================================ */
.lgs-product-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 32px 0;
}
.lgs-product-gallery {
  aspect-ratio: 4 / 5;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
}
.lgs-product-gallery img {
  width: 100%; height: 100%; object-fit: cover;
}
.lgs-product-info { display: flex; flex-direction: column; gap: 16px; }
.lgs-product-info .tcg {
  font-family: var(--f-mono);
  font-size: 11px; letter-spacing: 0.12em;
  color: var(--fg-3); text-transform: uppercase;
}
.lgs-product-info h1 {
  font-family: var(--f-disp);
  font-size: 32px; font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}
.lgs-product-info .price-block {
  font-family: var(--f-mono);
  font-size: 28px; font-weight: 700;
}
.lgs-product-info .price-block .cur {
  color: var(--fg-3); font-size: 16px;
}
.lgs-product-info .seller {
  font-family: var(--f-mono);
  font-size: 11px; color: var(--fg-3);
  letter-spacing: 0.08em;
}
.lgs-product-info .desc {
  color: var(--fg-2); font-size: 14px;
  line-height: 1.6;
}

/* ============================================================
   Orders page
   ============================================================ */
.lgs-orders-table {
  width: 100%;
  border-collapse: collapse;
}
.lgs-orders-table th {
  font-family: var(--f-mono);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.lgs-orders-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.lgs-orders-table tr:hover td { background: var(--bg-1); }

.lgs-status-badge {
  font-family: var(--f-mono);
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  text-transform: uppercase;
}
.lgs-status-badge.paid { background: var(--neon-b-soft); color: var(--neon-b); }
.lgs-status-badge.shipped { background: var(--neon-a-soft); color: var(--neon-a); }
.lgs-status-badge.delivered { background: oklch(0.78 0.13 175 / 0.14); color: var(--neon-c); }
.lgs-status-badge.cancelled { background: oklch(0.65 0.22 25 / 0.14); color: oklch(0.65 0.22 25); }
.lgs-status-badge.pending { background: var(--bg-3); color: var(--fg-3); }

/* ============================================================
   Calendar page
   ============================================================ */
.lgs-calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.lgs-cal-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-1);
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color 0.15s ease;
}
.lgs-cal-card:hover { border-color: var(--line-hi); }
.lgs-cal-card .date {
  font-family: var(--f-mono);
  font-size: 11px; color: var(--neon-a);
  letter-spacing: 0.1em;
}
.lgs-cal-card h3 {
  font-family: var(--f-disp);
  font-size: 16px; font-weight: 600;
  margin: 0;
}
.lgs-cal-card .tcg-label {
  font-family: var(--f-mono);
  font-size: 10px; letter-spacing: 0.1em;
  color: var(--fg-3); text-transform: uppercase;
}
.lgs-cal-card .actions {
  display: flex; gap: 8px; margin-top: auto; padding-top: 8px;
}

/* ============================================================
   Skeleton loading
   ============================================================ */
.lgs-skeleton {
  background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg-3) 50%, var(--bg-2) 75%);
  background-size: 200% 100%;
  animation: lgs-shimmer 1.5s ease infinite;
  border-radius: var(--r-sm);
}
@keyframes lgs-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   Empty state
   ============================================================ */
.lgs-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--fg-3);
}
.lgs-empty .jp {
  font-family: var(--f-jp);
  font-size: 36px; color: var(--line-hi);
  display: block; margin-bottom: 12px;
}
.lgs-empty .title {
  font-family: var(--f-disp);
  font-size: 18px; font-weight: 700;
  color: var(--fg); margin-bottom: 8px;
}
.lgs-empty p { font-size: 14px; margin: 0; }

/* ============================================================
   Utilities
   ============================================================ */
.lgs-hidden { display: none !important; }
.lgs-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--pad);
}
.lgs-mono { font-family: var(--f-mono); }
.lgs-disp { font-family: var(--f-disp); }

/* ============================================================
   Responsive
   ============================================================ */
/* Japanese brand accent is decorative — drop it at the first sign of squeeze */
@media (max-width: 1400px) {
  .lgs-brand-word .jp { display: none; }
}

@media (max-width: 1200px) {
  .lgs-hero h1 { font-size: 48px; }
  .lgs-hero-inner { grid-template-columns: 1fr 280px; gap: 32px; }
  .lgs-grid { grid-template-columns: repeat(3, 1fr); }
  .lgs-product-hero { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* Hide external cross-app links (CX Exchange / CX Vault) at the first
   squeeze — they're still reachable via the Collector+ apps dropdown and
   the mobile nav. Keeps the primary LGS nav visible on medium-wide screens. */
@media (max-width: 1400px) {
  .lgs-nav a.brand-link { display: none; }
}

/* Main-nav hamburger breakpoint.
   Content on the header at wider widths: CX mark + VirtualLGS brand + 6
   nav items + ⚙ Admin + Collector+ dropdown + KIRA · N + ORDERS +
   profile icon + cart icon. That needs ~1280px to fit without overlap. */
@media (max-width: 1280px) {
  .lgs-nav { display: none; }
  .lgs-mobile-nav-btn { display: grid; place-items: center; }
}

@media (max-width: 800px) {
  .lgs-aisle { display: none; }
  .lgs-rail { grid-template-columns: 1fr; }
  .lgs-main { padding: 20px; }
  .lgs-hero { padding: 20px; }
  .lgs-hero-inner { grid-template-columns: 1fr; }
  .lgs-hero h1 { font-size: 36px; }
  .lgs-drop-visual { max-width: 280px; margin: 0 auto; }
  .lgs-grid { grid-template-columns: repeat(2, 1fr); }
  .lgs-hero-meta { flex-wrap: wrap; gap: 16px; }
  .lgs-section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .lgs-product-hero { grid-template-columns: 1fr; gap: 24px; }
  .lgs-footer { grid-template-columns: 1fr; gap: 12px; text-align: center; }
  .lgs-topbar { gap: 12px; padding: 10px 16px; }
  /* Collapse the Collector+ dropdown into the hamburger on small screens
     so it doesn't push KIRA/ORDERS/cart off-screen on phones. */
  .lgs-actions .cx-tools-drop,
  .lgs-actions .lgs-cplus { display: none; }
}

@media (max-width: 480px) {
  .lgs-grid { grid-template-columns: 1fr; }
  .lgs-hero h1 { font-size: 28px; }
  .lgs-countdown { flex-wrap: wrap; }
  .lgs-cd-cell { min-width: 60px; }
  .lgs-hero-meta { flex-direction: column; gap: 12px; }
  /* On tiny screens, also shorten the brand lockup — CX mark + "LGS" only */
  .lgs-brand-word .w1 { display: none; }
  .lgs-product-info h1 { font-size: 24px; }
  .lgs-calendar-grid { grid-template-columns: 1fr; }
}

/* ── Mobile nav drawer ── */
.lgs-mobile-nav-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg-2);
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 18px;
}

.lgs-mobile-nav {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  padding: 24px;
  /* Respect iOS notch/home bar + allow long menus to scroll */
  padding-top: max(24px, env(safe-area-inset-top, 24px));
  padding-bottom: max(24px, env(safe-area-inset-bottom, 24px));
  display: flex; flex-direction: column; gap: 4px;
  overflow-y: auto;
  animation: lgs-fade 0.15s ease;
}
.lgs-mobile-nav-close {
  align-self: flex-end;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg-2);
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-family: var(--f-mono);
  margin-bottom: 16px;
}
.lgs-mobile-nav a {
  font-family: var(--f-disp);
  font-size: 18px; font-weight: 600;
  color: var(--fg-2);
  text-decoration: none;
  padding: 14px 16px;
  border-radius: var(--r-sm);
  border-bottom: 1px solid var(--line);
}
.lgs-mobile-nav a:hover { color: var(--fg); background: var(--bg-1); }
.lgs-mobile-nav a.active { color: var(--neon-a); }
.lgs-mobile-nav .ext {
  font-size: 14px;
  color: var(--fg-3);
}
