:root {
  --bg: #0a0a0a;
  --bg-2: #111;
  --surface: #181818;
  --rule: #272727;
  --text: #f6f6f6;
  --muted: #9a9a9a;
  --faint: #5f5f5f;
  --accent: #e60012;
  --accent-hot: #ff2a3e;
  --gold: #c9a661;

  --display: "Archivo Black", Impact, sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(20px, 4vw, 56px);
  --ease-power: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body { line-height: 1.55; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; cursor: pointer; }
button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
ul, ol { list-style: none; }

.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.accent { color: var(--accent); }
.gold { color: var(--gold); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* ==========================================================
   3D SPACE — CSS3D + WebGL stacked root
   ========================================================== */

.scene-canvas {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  z-index: 1;
  pointer-events: none;
  display: block;
}

.css3d-root {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  z-index: 2;
  perspective: 1200px;
  transform-style: preserve-3d;
  overflow: hidden;
  pointer-events: none;
}
.css3d-root > div {
  pointer-events: auto;
}

/* Invisible scroll length driver */
.scroll-track {
  height: 800vh;
  width: 1px;
  pointer-events: none;
  position: relative;
  z-index: -1;
}

/* ==========================================================
   NAV / HUD / STATIONS UI
   ========================================================== */

.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 80;
  padding: 18px var(--gutter);
  background: linear-gradient(180deg, rgba(10,10,10,0.9), rgba(10,10,10,0.15));
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(39,39,39,0.6);
}
.nav__inner {
  max-width: 1600px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
}
.nav__logo {
  font-family: var(--display);
  font-size: 16px; letter-spacing: 0.02em;
  display: flex; gap: 4px;
}
.nav__logo span { color: var(--accent); }
.nav__menu {
  display: flex; gap: 26px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
}
.nav__menu a {
  color: var(--muted);
  transition: color 0.2s var(--ease-power);
}
.nav__menu a:hover { color: var(--accent); }
.nav__cta {
  font-family: var(--display);
  font-size: 12px; letter-spacing: 0.06em;
  padding: 11px 18px; background: var(--accent); color: var(--bg);
  transition: background 0.2s var(--ease-power);
}
.nav__cta:hover { background: var(--accent-hot); }

.badge-3d {
  position: fixed; top: 22px; right: calc(var(--gutter) + 200px);
  z-index: 81;
  padding: 6px 12px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 10px; letter-spacing: 0.22em;
  background: rgba(10,10,10,0.7);
  backdrop-filter: blur(8px);
  animation: badgePulse 2.4s var(--ease-power) infinite;
  pointer-events: none;
}
@keyframes badgePulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(230,0,18,0.5); }
  50% { box-shadow: 0 0 0 8px rgba(230,0,18,0); }
}

/* HUD */
.hud {
  position: fixed;
  top: 50%; transform: translateY(-50%);
  left: var(--gutter);
  z-index: 70;
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px;
  background: rgba(10,10,10,0.6);
  border: 1px solid var(--rule);
  backdrop-filter: blur(8px);
  font-size: 10px;
  pointer-events: none;
  min-width: 168px;
}
.hud__row { display: flex; justify-content: space-between; gap: 14px; }
.hud__k { color: var(--faint); letter-spacing: 0.22em; }
.hud__v { color: var(--accent); font-weight: 500; }

/* Station list */
.stations {
  position: fixed;
  right: var(--gutter);
  top: 50%; transform: translateY(-50%);
  z-index: 70;
  display: flex; flex-direction: column; gap: 6px;
  pointer-events: auto;
}
.stations button {
  font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.18em;
  color: var(--faint);
  padding: 6px 10px 6px 28px;
  position: relative;
  display: block;
  text-align: right;
  min-width: 140px;
  transition: color 0.25s var(--ease-power);
}
.stations button::before {
  content: "";
  position: absolute; left: 8px; top: 50%;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--rule);
  transform: translateY(-50%);
  transition: background 0.25s var(--ease-power), box-shadow 0.25s var(--ease-power);
}
.stations button span {
  display: inline-block;
  margin-right: 8px;
  color: var(--faint);
}
.stations button:hover,
.stations button.on {
  color: var(--text);
}
.stations button:hover::before,
.stations button.on::before {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(230,0,18,0.15);
}
.stations button.on span { color: var(--accent); }

/* ==========================================================
   STATIONS (CSS3D children)
   Each station is absolutely positioned by Three.CSS3DObject —
   we just size and style them here.
   ========================================================== */

.station,
.modelcard {
  /* default panel — CSS3DRenderer positions this element via matrix3d.
     We make it a zero-anchor and let an inner wrapper carry the visible box
     so the content stays centered on the renderer's anchor point. */
  position: absolute;
  left: 0; top: 0;
  width: 0; height: 0;
  overflow: visible;
  color: var(--text);
}
/* Visible card body for non-modelcard stations — centered on the anchor */
.station > .station__wrap,
.modelcard > .modelcard__inner {
  position: absolute;
  left: 0; top: 0;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  width: min(1200px, 92vw);
  background: linear-gradient(180deg, rgba(20,20,20,0.85), rgba(8,8,8,0.88));
  border: 1px solid var(--rule);
  backdrop-filter: blur(6px);
  box-shadow:
    0 30px 80px -30px rgba(0,0,0,0.8),
    inset 0 1px 0 rgba(255,255,255,0.04);
  padding: clamp(28px, 4vw, 60px);
  border-radius: 2px;
  pointer-events: auto;
}
.modelcard > .modelcard__inner {
  width: min(360px, 82vw);
  padding: 0;
  overflow: hidden;
  background: var(--surface);
}

/* --- HERO station overrides (full-bleed, no card chrome) --- */
.station--hero > .station__wrap {
  width: min(1400px, 94vw);
  background:
    radial-gradient(60% 55% at 30% 50%, rgba(230,0,18,0.22), transparent 70%),
    linear-gradient(180deg, rgba(15,15,15,0.85), rgba(5,5,5,0.92));
  display: flex; flex-direction: column; gap: 36px;
  padding: clamp(32px, 5vw, 90px);
}

.hero__marker {
  display: flex; align-items: center; gap: 18px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.22em;
  color: var(--accent); text-transform: uppercase;
}
.hero__rule { flex: 0 0 120px; height: 1px; background: var(--accent); opacity: 0.6; }

.hero__title {
  font-family: var(--display);
  font-size: clamp(68px, 12vw, 200px);
  line-height: 0.88;
  letter-spacing: -0.04em;
  color: #fff;
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line span { display: inline-block; will-change: transform; }
.hero__title .accent { color: var(--accent); }

.hero__lede {
  max-width: 640px;
  font-size: clamp(14px, 1vw, 16px);
  color: var(--muted);
  line-height: 1.65;
}

.hero__specbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  border-top: 1px solid var(--rule);
  padding-top: 22px;
}
.spec { display: flex; flex-direction: column; gap: 4px; }
.spec .mono { color: var(--faint); }
.spec strong {
  font-family: var(--display);
  font-size: clamp(24px, 2.6vw, 34px);
  letter-spacing: -0.02em; line-height: 1;
}
.spec em {
  font-style: normal;
  font-family: var(--mono); font-size: 0.42em; letter-spacing: 0.1em;
  color: var(--muted); margin-left: 4px;
}
.spec--price strong { color: var(--accent); }

.hero__hint {
  display: flex; align-items: center; gap: 14px;
  color: var(--faint);
}
.hero__hint .mono { color: var(--faint); }
.hero__hint-line {
  display: inline-block; width: 60px; height: 1px;
  background: var(--faint);
  position: relative; overflow: hidden;
}
.hero__hint-line::after {
  content: ""; position: absolute; inset: 0;
  background: var(--accent);
  animation: slideRight 2.2s infinite cubic-bezier(0.65,0,0.35,1);
}
@keyframes slideRight {
  0% { transform: translateX(-100%); }
  60%,100% { transform: translateX(100%); }
}

/* --- station head --- */
.station__head {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}
.station__head .mono { color: var(--accent); }
.station__sub { color: var(--muted); max-width: 620px; font-size: 14px; }
.models__title,
.heritage__title,
.specs__title,
.gallery__title,
.events__title,
.dealers__title {
  font-family: var(--display);
  font-size: clamp(40px, 7vw, 110px);
  line-height: 0.92; letter-spacing: -0.03em;
}
.models__title span,
.heritage__title span,
.specs__title span,
.gallery__title span,
.events__title span,
.dealers__title span {
  display: inline-block;
}
.events__title .gold { color: var(--gold); }

/* --- MODEL CARDS (rendered as individual 3D cards) --- */
.modelcard {
  width: min(360px, 82vw);
  padding: 0;
  overflow: hidden;
  background: var(--surface);
}
.modelcard__num {
  position: absolute; top: 14px; left: 16px; z-index: 2;
  font-family: var(--display); font-size: 18px; color: var(--accent);
}
.modelcard__img {
  aspect-ratio: 4/3; overflow: hidden; background: #000;
}
.modelcard__img img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.9) contrast(1.06) brightness(0.92);
}
.modelcard__body {
  padding: 18px 20px 22px;
  display: flex; flex-direction: column; gap: 8px;
}
.modelcard__body .mono { color: var(--faint); }
.modelcard__body h3 {
  font-family: var(--display);
  font-size: 42px;
  line-height: 1; letter-spacing: -0.02em;
}
.modelcard__chips {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px;
}
.modelcard__chips li span {
  display: inline-flex; padding: 5px 9px;
  border: 1px solid var(--rule); border-radius: 999px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; color: var(--muted);
}
.modelcard__chips li em { font-style: normal; margin-left: 3px; color: var(--faint); }

/* --- HERITAGE --- */
.station--heritage > .station__wrap {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.heritage__photo {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 92% 100%, 0 100%);
  border: 1px solid var(--rule);
}
.heritage__photo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.85) contrast(1.08);
}
.heritage__stamp {
  position: absolute; bottom: 16px; left: 16px;
  background: rgba(10,10,10,0.85);
  padding: 10px 14px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; line-height: 1.6;
}
.heritage__copy { max-width: 540px; }
.heritage__copy .mono { margin-bottom: 14px; }
.heritage__title { margin-bottom: 24px; }
.heritage__text {
  font-size: 15px; line-height: 1.7; color: var(--text);
  margin-bottom: 14px;
}
.heritage__text.muted { color: var(--muted); font-size: 13px; }

/* --- SPECS --- */
.specs__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.spec-head, .spec-row, .spec-cell {
  padding: 14px 18px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
  transition: background-color 0.3s var(--ease-power), color 0.3s var(--ease-power);
}
.spec-head {
  font-family: var(--display); font-size: 16px; letter-spacing: 0.02em;
  background: var(--surface);
  text-transform: uppercase;
}
.spec-row {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
  background: var(--surface);
}
.spec-cell {
  font-family: var(--display); font-size: 15px; letter-spacing: -0.01em;
}
.spec-cell.accent { color: var(--accent); }
.specs__grid.col-0 .spec-head[data-col="0"],
.specs__grid.col-0 .spec-cell[data-col="0"],
.specs__grid.col-1 .spec-head[data-col="1"],
.specs__grid.col-1 .spec-cell[data-col="1"],
.specs__grid.col-2 .spec-head[data-col="2"],
.specs__grid.col-2 .spec-cell[data-col="2"] {
  background: rgba(230,0,18,0.08);
  color: var(--accent);
}

/* --- GALLERY --- */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 160px;
  gap: 10px;
}
.gitem {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: var(--surface);
}
.gitem--tall { grid-row: span 2; }
.gitem--wide { grid-column: span 2; }
.gitem img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.9) contrast(1.05);
  transition: transform 0.8s var(--ease-power);
}
.gitem:hover img { transform: scale(1.05); }
.gitem figcaption {
  position: absolute; left: 10px; bottom: 10px; right: 10px;
  display: flex; align-items: baseline; gap: 8px;
  color: #fff;
  font-family: var(--display);
  font-size: 12px; letter-spacing: 0.02em;
  mix-blend-mode: difference;
}
.gitem figcaption .mono { color: var(--accent); mix-blend-mode: normal; font-size: 10px; }

/* --- EVENTS --- */
.timeline {
  position: relative;
  padding-left: 60px;
  max-width: 900px;
}
.timeline::before {
  content: "";
  position: absolute; top: 14px; bottom: 14px; left: 26px;
  width: 2px; background: var(--gold); opacity: 0.35;
}
.tl {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 24px;
  margin-left: -60px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.tl:last-child { border-bottom: none; }
.tl__date {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding-top: 4px;
}
.tl__date::before {
  content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px var(--bg);
  z-index: 1;
}
.tl__date .mono { color: var(--gold); margin-top: 22px; font-size: 11px; }
.tl__date strong {
  font-family: var(--display); font-size: 28px; letter-spacing: -0.02em; line-height: 1;
}
.tl__body .mono { color: var(--accent); margin-bottom: 6px; }
.tl__body h3 {
  font-family: var(--display); font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.05; letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.tl__body p { color: var(--muted); line-height: 1.6; font-size: 14px; }

/* --- DEALERS --- */
.dealers__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 40px;
}
.dealers__list li {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: 18px 16px;
  display: flex; flex-direction: column; gap: 4px;
  transition: border-color 0.3s var(--ease-power), transform 0.3s var(--ease-power);
}
.dealers__list li:hover { border-color: var(--accent); transform: translateY(-2px); }
.dealers__list li .mono { color: var(--accent); }
.dealers__list li strong {
  font-family: var(--display); font-size: 22px; letter-spacing: -0.01em;
  margin: 6px 0 8px;
}
.dealers__list li p { color: var(--muted); font-size: 12px; line-height: 1.5; }
.dealers__list li p.mono { color: var(--faint); margin-top: 6px; }

.finale {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.finale__mark {
  display: block;
  font-family: var(--display);
  font-size: clamp(48px, 10vw, 140px);
  line-height: 0.9; letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 14px;
}
.finale__mark em { font-style: normal; color: var(--accent); }

/* ==========================================================
   INTRO SHIELD
   ========================================================== */

body.intro-lock { overflow: hidden; height: 100vh; }

.intro-shield {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #050505;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 40px;
  color: var(--text);
  will-change: opacity;
}
.intro-shield__title {
  font-family: var(--display);
  font-size: clamp(56px, 12vw, 180px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  text-align: center;
}
.intro-shield__title span { color: var(--accent); }
.intro-shield__tag {
  color: var(--faint);
  letter-spacing: 0.28em;
}
.intro-shield__bar {
  width: min(380px, 70vw); height: 2px;
  background: rgba(255,255,255,0.08);
  position: relative; overflow: hidden;
}
.intro-shield__fill {
  position: absolute; inset: 0 auto 0 0;
  width: 0%; background: var(--accent);
  transition: width 0.2s linear;
}
.intro-shield__meta {
  display: flex; justify-content: space-between;
  width: min(380px, 70vw);
  font-size: 11px; letter-spacing: 0.22em; color: var(--faint);
}
.intro-shield__skip {
  position: absolute; bottom: 32px; right: 32px;
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.2em; color: var(--muted);
  padding: 10px 14px; border: 1px solid var(--rule);
  transition: color 0.2s, border-color 0.2s;
}
.intro-shield__skip:hover { color: var(--accent); border-color: var(--accent); }

/* ==========================================================
   FALLBACK (mobile / reduced-motion / no 3D)
   ========================================================== */

body.no-3d .scene-canvas,
body.no-3d .css3d-root,
body.no-3d .stations,
body.no-3d .hud,
body.no-3d .badge-3d { display: none; }
body.no-3d {
  overflow: auto !important;
  height: auto !important;
}
body.no-3d .intro-shield { display: none; }
body.no-3d::before {
  content: "3D navigation requires desktop. Here's the flat version ↓";
  display: block;
  padding: 80px 20px 40px;
  text-align: center;
  color: var(--muted);
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em;
  background: var(--bg);
}

.fallback {
  padding: 100px 20px;
  text-align: center;
  color: var(--muted);
  font-family: var(--mono);
}

@media (max-width: 900px) {
  .nav__menu { display: none; }
  .badge-3d { display: none; }
  .hud { display: none; }
  .stations { display: none; }
}

/* ==========================================================
   MOUSE-REACTIVE MODEL CARDS
   CSS3DRenderer owns the .modelcard inline transform (matrix3d).
   All hover/float effects live on .modelcard__inner — never on .modelcard.
   ========================================================== */
.modelcard {
  transition: box-shadow 0.45s ease, border-color 0.45s ease;
  cursor: pointer;
  transform-style: preserve-3d;
  overflow: visible;
}
.modelcard__inner {
  position: relative;
  display: block;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  background: inherit;
  border-radius: inherit;
}
/* Restore the visual chrome onto the inner wrapper so the card looks right */
.modelcard > .modelcard__inner {
  background: var(--surface);
  overflow: hidden;
}
.modelcard::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    320px circle at var(--mx, 50%) var(--my, 50%),
    rgba(230, 0, 18, 0.22),
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 3;
  mix-blend-mode: screen;
}
.modelcard::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, rgba(230,0,18,0), rgba(230,0,18,0.6), rgba(230,0,18,0)) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
  z-index: 4;
  border-radius: inherit;
}
.modelcard:hover {
  box-shadow:
    0 50px 120px -30px rgba(230, 0, 18, 0.55),
    0 20px 60px -20px rgba(0, 0, 0, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  border-color: rgba(230, 0, 18, 0.45);
}
.modelcard:hover::before,
.modelcard:hover::after {
  opacity: 1;
}
.modelcard:hover .modelcard__img img {
  transform: scale(1.08);
  filter: saturate(1.2) contrast(1.12) brightness(1);
}
.modelcard__img img {
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1), filter 0.45s ease;
}
.modelcard:hover .modelcard__num {
  color: #fff;
  text-shadow: 0 0 20px rgba(230, 0, 18, 0.8);
}
.modelcard__num {
  transition: color 0.35s ease, text-shadow 0.35s ease;
}
.modelcard:hover .modelcard__chips li span {
  border-color: rgba(230, 0, 18, 0.5);
  color: #fff;
}
.modelcard__chips li span {
  transition: border-color 0.3s ease, color 0.3s ease;
}

/* Idle float is driven by JS on .modelcard__inner (see script.js).
   Never apply an `animation: transform …` to .modelcard itself —
   CSS3DRenderer sets its matrix3d() inline and an animation would override it. */

/* ==========================================================
   AMBIENT CURSOR GLOW
   ========================================================== */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 600px; height: 600px;
  margin: -300px 0 0 -300px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(230, 0, 18, 0.12) 0%,
    rgba(230, 0, 18, 0.04) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.6s ease;
  will-change: transform;
}
.cursor-glow.is-active {
  opacity: 1;
}

/* ==========================================================
   NOTIFICATION TOASTS
   ========================================================== */
.toast-stack {
  position: fixed;
  top: 84px;
  right: 22px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  position: relative;
  padding: 14px 18px 14px 48px;
  background: linear-gradient(180deg, rgba(20,20,20,0.96), rgba(8,8,8,0.98));
  border: 1px solid var(--rule);
  border-left: 2px solid var(--accent);
  color: var(--text);
  font-family: var(--sans, 'Inter', system-ui, sans-serif);
  font-size: 13px;
  line-height: 1.45;
  backdrop-filter: blur(10px);
  box-shadow:
    0 20px 60px -20px rgba(0, 0, 0, 0.9),
    0 0 40px -10px rgba(230, 0, 18, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transform: translateX(120%) scale(0.95);
  opacity: 0;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
  overflow: hidden;
  border-radius: 2px;
}
.toast.is-visible {
  transform: translateX(0) scale(1);
  opacity: 1;
}
.toast.is-leaving {
  transform: translateX(120%) scale(0.95);
  opacity: 0;
}
.toast::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  background: var(--accent);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  animation: toastPing 1.8s ease-out infinite;
}
.toast::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(230,0,18,0.2));
  animation: toastProgress 4s linear forwards;
}
.toast__label {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 3px;
  text-transform: uppercase;
}
.toast__text {
  color: var(--text);
  display: block;
}
.toast--gold {
  border-left-color: var(--gold);
}
.toast--gold::before { background: var(--gold); }
.toast--gold::after { background: linear-gradient(90deg, var(--gold), rgba(212,175,55,0.2)); }
.toast--gold .toast__label { color: var(--gold); }

.toast--info {
  border-left-color: #4ea8ff;
}
.toast--info::before { background: #4ea8ff; }
.toast--info::after { background: linear-gradient(90deg, #4ea8ff, rgba(78,168,255,0.2)); }
.toast--info .toast__label { color: #4ea8ff; }

@keyframes toastPing {
  0%, 40% { transform: scale(1); opacity: 1; }
  70% { transform: scale(1.3); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes toastProgress {
  from { width: 100%; }
  to { width: 0%; }
}

@media (max-width: 900px) {
  .toast-stack { left: 12px; right: 12px; top: 70px; max-width: none; }
  .cursor-glow { display: none; }
}
