:root {
  --bg: #09050d;
  --bg-2: #120817;
  --ink: #f8ebd6;
  --muted: #c1a9a6;
  --hot: #ff2f7d;
  --acid: #a8ff3e;
  --violet: #9d61ff;
  --storm: #33d6ff;
  --gold: #ffbf43;
  --blood: #d11034;
  --card: rgba(19, 12, 25, .78);
  --card-strong: rgba(35, 17, 45, .94);
  --line: rgba(248, 235, 214, .16);
  --shadow: 0 24px 80px rgba(0, 0, 0, .55);
  --radius: 28px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --display: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  --body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(157, 97, 255, .18), transparent 36%),
    radial-gradient(circle at 80% 4%, rgba(51, 214, 255, .16), transparent 32%),
    radial-gradient(circle at 62% 82%, rgba(255, 47, 125, .14), transparent 38%),
    linear-gradient(135deg, #060309 0%, #120817 48%, #050307 100%);
  overflow-x: hidden;
}
body.gate-open { overflow: auto; }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
::selection { background: var(--hot); color: #fff; }

.noise, .scanlines, #smokeCanvas, #sparkField {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.noise {
  opacity: .18;
  mix-blend-mode: overlay;
  background-image:
    repeating-radial-gradient(circle at 13% 17%, rgba(255,255,255,.14) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(115deg, transparent 0 9px, rgba(255,255,255,.06) 10px 11px);
  filter: contrast(160%);
}
.scanlines {
  opacity: .16;
  background: repeating-linear-gradient(180deg, transparent 0 4px, rgba(255,255,255,.05) 5px 6px);
}
#smokeCanvas { opacity: .33; }
#sparkField { overflow: hidden; }
.spark {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 999px;
  background: var(--storm);
  box-shadow: 0 0 14px var(--storm), 0 0 28px var(--violet);
  animation: spark-fall linear forwards;
}
@keyframes spark-fall {
  from { transform: translate3d(0, -5vh, 0) scale(1); opacity: 0; }
  12% { opacity: 1; }
  to { transform: translate3d(var(--drift), 105vh, 0) scale(.2); opacity: 0; }
}

.site-header, main, .toast, .detail-close, .boot-gate { position: relative; z-index: 3; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 14px clamp(16px, 4vw, 54px);
  background: rgba(6, 3, 9, .76);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 220px;
}
.brand-sigil {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  color: #120817;
  background: linear-gradient(135deg, var(--acid), var(--storm) 48%, var(--hot));
  box-shadow: 0 0 32px rgba(51, 214, 255, .25);
  transition: transform .25s ease, filter .25s ease;
}
.brand-sigil:hover { transform: rotate(18deg) scale(1.08); filter: saturate(1.5); }
.brand strong, .brand em { display: block; }
.brand strong { letter-spacing: .03em; text-transform: uppercase; }
.brand em { color: var(--muted); font-style: normal; font-size: .78rem; }
nav { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
nav a, .ghost-button {
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.045);
  padding: 10px 14px;
  border-radius: 999px;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
nav a:hover, .ghost-button:hover { transform: translateY(-2px); border-color: rgba(168,255,62,.45); background: rgba(168,255,62,.1); }

.boot-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at center, rgba(157, 97, 255, .28), transparent 30%),
    radial-gradient(circle at 70% 60%, rgba(255, 47, 125, .18), transparent 28%),
    #050307;
  transition: opacity .75s ease, transform .75s ease, visibility .75s ease;
}
.boot-gate.hidden { opacity: 0; transform: scale(1.05); visibility: hidden; }
.boot-runes {
  position: absolute;
  inset: auto auto 8% 50%;
  transform: translateX(-50%);
  color: rgba(248,235,214,.18);
  letter-spacing: 1.1rem;
  white-space: nowrap;
  animation: rune-drift 7s linear infinite;
}
@keyframes rune-drift { to { filter: hue-rotate(360deg); letter-spacing: 1.45rem; } }
.boot-card {
  width: min(760px, 100%);
  text-align: center;
  padding: clamp(28px, 8vw, 82px);
  border-radius: 38px;
  border: 1px solid rgba(248,235,214,.24);
  background: linear-gradient(145deg, rgba(21,10,29,.93), rgba(7,4,11,.92));
  box-shadow: var(--shadow), inset 0 0 80px rgba(157,97,255,.12);
  overflow: hidden;
}
.boot-card h1, .hero h2, .section-heading h2, .deck-detail h2 {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: .025em;
  line-height: .88;
}
.boot-card h1 {
  font-size: clamp(3.2rem, 12vw, 9rem);
  margin: 12px 0;
  text-shadow: 4px 4px 0 #000, -2px -2px 0 rgba(255,47,125,.75), 2px 2px 0 rgba(51,214,255,.65);
}
.boot-copy { color: var(--muted); font-size: 1.1rem; max-width: 56ch; margin: 0 auto 26px; }
.sigil-button {
  border: 0;
  border-radius: 999px;
  padding: 16px 24px 16px 28px;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  color: #100610;
  background: linear-gradient(135deg, var(--acid), var(--gold), var(--hot));
  box-shadow: 0 0 40px rgba(255,47,125,.38);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.sigil-button b { font-size: 1.5rem; animation: sigil-spin 3s linear infinite; }
@keyframes sigil-spin { to { transform: rotate(360deg); } }
.small-note { color: rgba(248,235,214,.58); font-size: .85rem; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--acid);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
}

.section-shell {
  width: min(1500px, calc(100% - clamp(28px, 7vw, 96px)));
  margin: 0 auto;
  padding: clamp(34px, 7vw, 86px) 0;
}
.hero {
  min-height: calc(100vh - 78px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  grid-template-areas: "copy art" "stats stats";
  gap: clamp(22px, 5vw, 70px);
  align-items: center;
}
.hero-copy { grid-area: copy; }
.hero-art { grid-area: art; min-height: 540px; display: grid; place-items: center; position: relative; perspective: 900px; }
.hero h2 { font-size: clamp(4rem, 12vw, 12rem); margin: 0; text-shadow: 5px 5px 0 #000, -2px -2px 0 var(--hot), 2px 2px 0 var(--storm); }
.lede { font-size: clamp(1.1rem, 2vw, 1.55rem); color: var(--muted); max-width: 58ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.primary-link, .secondary-link {
  border-radius: 999px;
  padding: 14px 18px;
  text-decoration: none;
  border: 1px solid var(--line);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.primary-link { color: #110712; background: var(--acid); border-color: transparent; }
.secondary-link { color: var(--ink); background: rgba(255,255,255,.06); }
.primary-link:hover, .secondary-link:hover { transform: translateY(-2px); }
.stat-ribbon {
  grid-area: stats;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.045);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.stat-ribbon div {
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
}
.stat-ribbon strong { display: block; font-size: clamp(1.8rem, 4vw, 3.6rem); line-height: .9; font-family: var(--display); }
.stat-ribbon span { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }

.summoning-ring {
  position: absolute;
  width: min(94%, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px dashed rgba(168,255,62,.45);
  box-shadow: inset 0 0 60px rgba(168,255,62,.08), 0 0 80px rgba(157,97,255,.18);
  animation: slow-spin 18s linear infinite;
}
.summoning-ring:before, .summoning-ring:after {
  content: "✶ ✸ ✦ ✧ ✹ ✶ ✸ ✦ ✧ ✹";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: rgba(248,235,214,.14);
  font-family: var(--mono);
  letter-spacing: .55em;
  animation: slow-spin 13s linear infinite reverse;
}
.summoning-ring:after { inset: 23%; border: 1px solid rgba(51,214,255,.25); content: ""; }
@keyframes slow-spin { to { transform: rotate(360deg); } }

.deckbox {
  --box-a: #251133;
  --box-b: #09050d;
  --box-c: #ff2f7d;
  width: 250px;
  height: 330px;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(8deg) rotateY(-16deg);
  filter: drop-shadow(0 34px 48px rgba(0,0,0,.65));
}
.deckbox:before {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  top: 55%;
  transform: translate(-50%, -50%) rotate(-8deg);
  z-index: 4;
  color: rgba(255,255,255,.84);
  font-family: var(--display);
  font-size: 1.6rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  width: 76%;
  text-align: center;
  text-shadow: 2px 2px 0 #000;
}
.deckbox-lid, .deckbox-face, .deckbox-mouth {
  position: absolute;
  left: 0;
  right: 0;
  margin: auto;
  border: 1px solid rgba(248,235,214,.18);
}
.deckbox-lid {
  width: 92%;
  height: 88px;
  top: 0;
  border-radius: 28px 28px 12px 12px;
  background: linear-gradient(135deg, var(--box-a), var(--box-b));
  background: linear-gradient(135deg, color-mix(in srgb, var(--box-a), white 14%), var(--box-b));
  transform: translateY(6px) rotateX(15deg);
  box-shadow: inset 0 0 32px rgba(255,255,255,.08), 0 10px 28px rgba(0,0,0,.4);
}
.deckbox-mouth {
  width: 84%;
  height: 34px;
  top: 76px;
  z-index: 5;
  border-radius: 999px;
  background: #020104;
  box-shadow: inset 0 0 18px var(--box-c), 0 0 26px rgba(255,255,255,.06);
}
.deckbox-face {
  width: 100%;
  height: 265px;
  bottom: 0;
  border-radius: 24px 24px 38px 38px;
  background:
    radial-gradient(circle at 24% 20%, color-mix(in srgb, var(--box-c), transparent 50%), transparent 30%),
    linear-gradient(145deg, var(--box-a), var(--box-b));
  box-shadow: inset 0 0 60px rgba(0,0,0,.45), inset 0 0 0 8px rgba(255,255,255,.04);
  overflow: hidden;
}
.deckbox-face:before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(248,235,214,.13);
  border-radius: 18px 18px 30px 30px;
  background: repeating-linear-gradient(135deg, transparent 0 12px, rgba(255,255,255,.035) 13px 14px);
}
.deckbox-face span {
  position: absolute;
  bottom: 20px;
  left: 20px;
  font-family: var(--mono);
  font-weight: 900;
  color: rgba(248,235,214,.34);
  letter-spacing: .18em;
}
.deck-stack-mini { position: absolute; left: 50%; top: 70px; width: 150px; height: 170px; transform: translateX(-50%); z-index: 2; }
.deck-stack-mini i {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(145deg, #211525, #08050b);
  border: 1px solid rgba(248,235,214,.16);
  transform: translateY(calc(var(--i, 1) * 6px)) rotate(calc(var(--i, 1) * -2deg));
}
.deck-stack-mini i:nth-child(1) { --i: 0; }
.deck-stack-mini i:nth-child(2) { --i: 1; }
.deck-stack-mini i:nth-child(3) { --i: 2; }
.deck-stack-mini i:nth-child(4) { --i: 3; }

.obsidian-altar { --box-a: #271137; --box-b: #050308; --box-c: #9d61ff; }
.bone-incubator { --box-a: #5f4428; --box-b: #19100b; --box-c: #ffbf43; }
.graffiti-feathers { --box-a: #24305d; --box-b: #100714; --box-c: #33d6ff; }
.blackout-curse { --box-a: #160a17; --box-b: #020103; --box-c: #d11034; }
.venom-neon { --box-a: #103529; --box-b: #050b07; --box-c: #a8ff3e; }
.warpaint-pack { --box-a: #4a1f12; --box-b: #100905; --box-c: #ff7a2f; }
.dragon-rust { --box-a: #531b16; --box-b: #110504; --box-c: #ff2f2f; }
.blue-sarcophagus { --box-a: #123561; --box-b: #040817; --box-c: #33d6ff; }
.grave-velvet { --box-a: #2a1020; --box-b: #070308; --box-c: #a0032f; }
.five-color-street { --box-a: #282828; --box-b: #070707; --box-c: #ffbf43; }
.boar-engine { --box-a: #5a180d; --box-b: #110603; --box-c: #ff5e2f; }
.glow-sticker { --box-a: #163b38; --box-b: #05110f; --box-c: #a8ff3e; }
.slag-temple { --box-a: #3b1010; --box-b: #060304; --box-c: #d11034; }
.hydra-nexus { --box-a: #102f30; --box-b: #040c10; --box-c: #4effb2; }
.casino-vault { --box-a: #3b2511; --box-b: #070504; --box-c: #ffbf43; }
.ash-archive { --box-a: #24202a; --box-b: #08070a; --box-c: #8a808c; }

.section-heading { margin-bottom: 24px; }
.section-heading h2 { margin: 0 0 10px; font-size: clamp(3rem, 8vw, 7rem); text-shadow: 4px 4px 0 #000; }
.section-heading p { color: var(--muted); max-width: 72ch; }
.split-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.filter-panel {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(130px, .5fr) minmax(150px, .5fr);
  gap: 10px;
  width: min(680px, 100%);
  padding: 12px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.045);
}
label { display: grid; gap: 6px; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
input, select {
  width: 100%;
  border: 1px solid rgba(248,235,214,.18);
  background: rgba(5,3,8,.76);
  color: var(--ink);
  border-radius: 14px;
  padding: 12px 13px;
  outline: none;
}
input:focus, select:focus { border-color: var(--acid); box-shadow: 0 0 0 3px rgba(168,255,62,.12); }
.layout-grid { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(360px, 520px); gap: 22px; align-items: start; }
.deck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.deck-card {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.025));
  padding: 18px;
  text-align: left;
  color: var(--ink);
  box-shadow: 0 14px 60px rgba(0,0,0,.28);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.deck-card:hover, .deck-card.active { transform: translateY(-5px) rotate(-.4deg); border-color: var(--deck-accent); border-color: color-mix(in srgb, var(--deck-accent), white 25%); box-shadow: 0 26px 80px rgba(0,0,0,.48); }
.deck-card:before {
  content: "";
  position: absolute;
  inset: -30% -20% auto auto;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--deck-accent), transparent 66%);
  opacity: .22;
}
.deck-card-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; position: relative; z-index: 1; }
.deck-mini-box { width: 72px; min-width: 72px; height: 94px; border-radius: 12px 12px 18px 18px; background-color: var(--mini-a); background-image: var(--mini-art, none), linear-gradient(145deg, var(--mini-a), var(--mini-b)); background-size: cover, 100% 100%; background-position: center, 0 0; background-repeat: no-repeat; border: 1px solid rgba(255,255,255,.18); box-shadow: inset 0 0 28px rgba(255,255,255,.06), 0 12px 24px rgba(0,0,0,.32); position: relative; overflow: hidden; }
.deck-mini-box[style*="--mini-art"]:after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, transparent 30%, transparent 70%, rgba(0,0,0,.55) 100%); pointer-events: none; }
.deck-mini-box:before { content: none; }
.deck-card h3 { margin: 14px 0 5px; font-size: 1.35rem; line-height: 1.08; text-transform: uppercase; letter-spacing: .02em; }
.deck-card .commander { color: var(--muted); min-height: 42px; }
.badges { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0; }
.badge {
  border: 1px solid rgba(248,235,214,.18);
  background: rgba(0,0,0,.22);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 9px;
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.badge.hot { color: #160610; background: var(--deck-accent); border-color: transparent; font-weight: 900; }
.color-pips { display: flex; gap: 5px; flex-wrap: wrap; }
.pip {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #10080a;
  font-weight: 900;
  font-size: .75rem;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
}
.pip.W { background: #f4e6b4; }
.pip.U { background: #69b7ff; }
.pip.B { background: #94859b; color: #08050a; }
.pip.R { background: #ff725a; }
.pip.G { background: #7ce085; }
.deck-card .vibe { position: relative; z-index: 1; color: rgba(248,235,214,.82); }
.card-footer { display: flex; justify-content: space-between; gap: 12px; align-items: end; margin-top: 18px; color: var(--muted); font-family: var(--mono); font-size: .82rem; }

.deck-detail {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding: 22px;
  border-radius: 30px;
  border: 1px solid rgba(248,235,214,.2);
  background: linear-gradient(160deg, rgba(23,12,31,.94), rgba(5,3,8,.86));
  box-shadow: var(--shadow), inset 0 0 80px rgba(255,255,255,.03);
}
.deck-detail.empty { display: grid; min-height: 520px; place-items: center; color: var(--muted); text-align: center; }
.detail-hero { display: grid; grid-template-columns: 150px 1fr; gap: 18px; align-items: center; }
.detail-deckbox { width: 135px; height: 178px; transform: rotateX(8deg) rotateY(-14deg) scale(.58); transform-origin: top left; margin-bottom: -105px; }
.deck-detail h2 { font-size: clamp(2.7rem, 4vw, 4.6rem); margin: 0; }
.detail-commander { color: var(--muted); margin: 8px 0 0; }
.detail-vibe { margin: 18px 0; padding: 14px; border-left: 3px solid var(--detail-accent); background: rgba(255,255,255,.045); border-radius: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0; }
.metric { padding: 12px; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.metric strong { display: block; font-size: 1.2rem; }
.metric span { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.table-read { color: rgba(248,235,214,.82); line-height: 1.55; }
.spell-tray-header { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 20px; }
.spell-tray-header h3 { margin: 0; text-transform: uppercase; letter-spacing: .08em; }
.mode-pill { color: #100610; background: var(--detail-accent); border-radius: 999px; padding: 6px 9px; font-size: .72rem; font-weight: 900; text-transform: uppercase; }
.spell-tray { display: grid; gap: 8px; margin-top: 12px; }
.spell-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.24);
  color: var(--ink);
  border-radius: 14px;
  padding: 11px 12px;
  text-align: left;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.spell-button:hover { transform: translateX(4px); border-color: var(--detail-accent); background: rgba(255,255,255,.07); }
.spell-button span:last-child { color: var(--muted); font-family: var(--mono); font-size: .75rem; }
.preview-panel { margin-top: 16px; display: grid; grid-template-columns: 180px 1fr; gap: 14px; align-items: start; }
.card-preview-frame {
  min-height: 250px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.2);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.card-preview-frame img { width: 100%; height: auto; display: block; border-radius: 12px; }
.card-fallback {
  width: 150px;
  aspect-ratio: 63/88;
  border-radius: 12px;
  padding: 14px;
  display: grid;
  align-content: space-between;
  background: linear-gradient(145deg, #26162d, #060309);
  border: 1px solid rgba(248,235,214,.22);
  box-shadow: inset 0 0 50px rgba(157,97,255,.14);
  text-align: center;
}
.card-fallback strong { font-family: var(--display); font-size: 1.4rem; text-transform: uppercase; line-height: .95; }
.card-fallback span { color: var(--muted); font-family: var(--mono); font-size: .72rem; }
.preview-copy h4 { margin: 0 0 8px; font-size: 1.35rem; }
.preview-copy p { color: var(--muted); line-height: 1.5; }
.scryfall-link { display: inline-flex; margin-top: 8px; color: var(--acid); text-decoration: none; font-weight: 900; }

.profile-grid { display: grid; grid-template-columns: 1.35fr .85fr .85fr; gap: 16px; }
.profile-card, .pipeline-card, .notes {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  box-shadow: 0 18px 60px rgba(0,0,0,.25);
}
.profile-card { padding: 24px; }
.profile-card h3, .pipeline-card h3 { margin: 0 0 12px; font-size: 1.55rem; text-transform: uppercase; line-height: 1; }
.profile-card p { color: rgba(248,235,214,.82); line-height: 1.55; }
.big-profile h3 { font-size: clamp(2rem, 4vw, 4rem); font-family: var(--display); }
.doctrine-list { display: grid; gap: 10px; margin-top: 18px; }
.doctrine-item { display: flex; gap: 10px; align-items: baseline; color: var(--muted); }
.doctrine-item b { color: var(--acid); }
.trait-bars { display: grid; gap: 14px; }
.trait-label { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .85rem; }
.trait-track { height: 10px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.trait-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--hot), var(--storm), var(--acid)); box-shadow: 0 0 22px rgba(51,214,255,.3); }
.pipeline-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pipeline-card { padding: 20px; position: relative; overflow: hidden; }
.pipeline-card:before { content: ""; position: absolute; width: 160px; height: 160px; right: -70px; top: -70px; border-radius: 50%; background: radial-gradient(circle, rgba(168,255,62,.22), transparent 70%); }
.pipeline-card p { color: var(--muted); line-height: 1.5; position: relative; }
.pipeline-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.data-warning { padding: 14px; border: 1px solid rgba(255,191,67,.28); border-radius: 18px; color: var(--gold) !important; background: rgba(255,191,67,.08); }
.notes { padding: 24px; }
.notes p { color: var(--muted); line-height: 1.6; max-width: 96ch; }
code { color: var(--acid); background: rgba(0,0,0,.3); padding: .1em .35em; border-radius: 6px; }

.cast-layer { position: fixed; inset: 0; pointer-events: none; z-index: 80; }
.card-lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 2, 12, .82);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
  cursor: zoom-out;
}
.card-lightbox.show { opacity: 1; pointer-events: auto; }
.card-lightbox figure {
  margin: 0;
  max-width: min(440px, 86vw);
  transform: scale(.86) rotate(-1.5deg);
  transition: transform .26s cubic-bezier(.2, .9, .2, 1);
  filter: drop-shadow(0 30px 70px rgba(0,0,0,.7));
}
.card-lightbox.show figure { transform: scale(1) rotate(0); }
.card-lightbox img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
}
.card-lightbox figcaption {
  margin-top: 14px;
  text-align: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .8rem;
  letter-spacing: .04em;
}
.commercial-mode .card-lightbox img { border-radius: 0; border: 4px solid #fff8b8; box-shadow: 10px 10px 0 #000; }
.commercial-mode .card-lightbox figcaption { color: #fff8b8; text-shadow: 2px 2px 0 #000; }
.cast-card {
  position: fixed;
  width: 170px;
  aspect-ratio: 63/88;
  border-radius: 13px;
  background: linear-gradient(145deg, #231329, #050307);
  border: 1px solid rgba(248,235,214,.32);
  display: grid;
  place-items: center;
  padding: 14px;
  text-align: center;
  color: var(--ink);
  font-family: var(--display);
  text-transform: uppercase;
  box-shadow: 0 18px 60px rgba(0,0,0,.55), 0 0 40px var(--cast-accent);
  animation: cast-out .85s cubic-bezier(.2, .9, .2, 1) forwards;
  overflow: hidden;
}
.cast-card img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
@keyframes cast-out {
  0% { transform: translate(var(--x0), var(--y0)) scale(.28) rotate(-18deg); opacity: 0; filter: blur(6px); }
  18% { opacity: 1; filter: blur(0); }
  100% { transform: translate(var(--x1), var(--y1)) scale(1) rotate(5deg); opacity: 0; }
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  max-width: min(560px, calc(100% - 32px));
  padding: 13px 16px;
  border-radius: 16px;
  background: rgba(5,3,8,.86);
  border: 1px solid rgba(168,255,62,.28);
  color: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.detail-close {
  display: none;
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(5,3,8,.86);
  color: var(--ink);
  font-size: 2rem;
  box-shadow: var(--shadow);
}

body.apex-mode {
  animation: apex-pulse 1.2s ease-in-out infinite alternate;
}
@keyframes apex-pulse {
  from { --hot: #ff2f7d; filter: saturate(1); }
  to { --hot: #ff004c; filter: saturate(1.25) contrast(1.04); }
}
body.robes-mode .hero h2:after {
  content: "  // concealed threat mode";
  display: block;
  font-family: var(--mono);
  color: var(--acid);
  font-size: clamp(.9rem, 1.3vw, 1.1rem);
  line-height: 1.2;
  text-shadow: none;
  margin-top: 12px;
}

@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; grid-template-areas: "copy" "art" "stats"; min-height: auto; }
  .hero-art { min-height: 430px; }
  .layout-grid { grid-template-columns: 1fr; }
  .deck-detail { position: relative; top: auto; max-height: none; }
  .profile-grid, .pipeline-grid { grid-template-columns: 1fr 1fr; }
  .split-heading { display: grid; }
}
@media (max-width: 760px) {
  .site-header { position: relative; align-items: start; flex-direction: column; }
  nav { justify-content: flex-start; }
  nav a, .ghost-button { padding: 8px 10px; font-size: .9rem; }
  .section-shell { width: min(100% - 28px, 1500px); }
  .hero h2 { font-size: clamp(3.4rem, 18vw, 6rem); }
  .stat-ribbon { grid-template-columns: 1fr 1fr; }
  .filter-panel { grid-template-columns: 1fr; }
  .profile-grid, .pipeline-grid { grid-template-columns: 1fr; }
  .detail-hero, .preview-panel { grid-template-columns: 1fr; }
  .detail-deckbox { display: none; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .boot-card h1 { font-size: clamp(3.2rem, 18vw, 6.2rem); }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  #smokeCanvas, #sparkField, .scanlines, .noise { display: none; }
}


/* === 1980s Wizard Infomercial Rewrite Pass ==============================
   Direction: earnest local-access product commercial, busted camcorder, 
   wizard cosplay budget of $14 and a coupon for dry ice.
========================================================================= */
body.commercial-mode {
  --bg: #130b52;
  --bg-2: #271070;
  --ink: #fff8b8;
  --muted: #ffd5f7;
  --hot: #ff2bbf;
  --acid: #f9ff1e;
  --violet: #7538ff;
  --storm: #16f4ff;
  --gold: #ffdb22;
  --blood: #f21d2f;
  --card: rgba(23, 14, 83, .86);
  --card-strong: rgba(40, 15, 112, .96);
  --line: rgba(255, 248, 184, .32);
  background:
    radial-gradient(circle at 13% 12%, rgba(255,255,255,.22) 0 1px, transparent 2px 100%),
    radial-gradient(circle at 80% 18%, rgba(255,43,191,.32), transparent 28%),
    radial-gradient(circle at 20% 74%, rgba(22,244,255,.27), transparent 34%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.035) 0 14px, rgba(0,0,0,.04) 14px 28px),
    linear-gradient(135deg, #110859 0%, #211073 45%, #061b65 100%);
}
body.commercial-mode:before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: .13;
  mix-blend-mode: screen;
  background:
    linear-gradient(90deg, rgba(255,0,0,.25), rgba(0,255,255,.18), rgba(255,255,0,.16)),
    repeating-linear-gradient(0deg, transparent 0 18px, rgba(255,255,255,.18) 19px 20px);
  animation: vhs-wobble 5.5s steps(7) infinite;
}
@keyframes vhs-wobble {
  0%, 100% { transform: translate(0); filter: hue-rotate(0); }
  14% { transform: translate(-2px, 1px); }
  31% { transform: translate(3px, -1px); }
  55% { transform: translate(-1px, 0); filter: hue-rotate(8deg); }
  72% { transform: translate(2px, 2px); }
}
.commercial-mode .noise {
  opacity: .30;
  mix-blend-mode: screen;
  background-image:
    repeating-radial-gradient(circle at 10% 10%, rgba(255,255,255,.23) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, transparent 0 13px, rgba(255,255,255,.08) 14px 15px);
  filter: contrast(210%) saturate(80%);
}
.commercial-mode .scanlines {
  opacity: .24;
  background:
    repeating-linear-gradient(180deg, rgba(0,0,0,.16) 0 2px, transparent 3px 6px),
    linear-gradient(180deg, transparent 0 43%, rgba(255,255,255,.2) 44%, transparent 45%);
  animation: tracking-roll 6s linear infinite;
}
@keyframes tracking-roll { to { background-position: 0 120px, 0 220px; } }
.commercial-mode #smokeCanvas { opacity: .18; filter: sepia(.8) saturate(1.7); }

.commercial-mode .site-header {
  background: linear-gradient(90deg, #150c70, #d819aa 46%, #ffec22 46% 51%, #120a5c 51%);
  border-bottom: 4px solid #fff8b8;
  box-shadow: 0 6px 0 #000, 0 16px 36px rgba(0,0,0,.35);
  backdrop-filter: none;
}
.commercial-mode .brand-sigil {
  color: #111;
  background: radial-gradient(circle, #fff 0 18%, var(--gold) 19% 55%, var(--hot) 56%);
  border-radius: 50%;
  box-shadow: 3px 3px 0 #000;
  animation: cheap-spin 2.9s steps(8) infinite;
}
@keyframes cheap-spin { 50% { transform: rotate(8deg) scale(1.06); } }
.commercial-mode .brand strong,
.commercial-mode nav a,
.commercial-mode .ghost-button {
  text-shadow: 2px 2px 0 #000;
}
.commercial-mode nav a,
.commercial-mode .ghost-button {
  border: 2px solid #fff8b8;
  border-radius: 0;
  color: #fff8b8;
  background: #2a0b82;
  box-shadow: 4px 4px 0 #000;
  transform: skew(-5deg);
}
.commercial-mode nav a:hover,
.commercial-mode .ghost-button:hover {
  background: #ff2bbf;
  border-color: #f9ff1e;
  transform: translateY(-2px) skew(-5deg);
}

.commercial-mode .boot-gate {
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, .33), transparent 13%),
    repeating-linear-gradient(135deg, #13085a 0 26px, #1d0b71 26px 52px),
    #12064f;
}
.commercial-mode .boot-card {
  width: min(820px, 100%);
  border-radius: 0;
  border: 5px solid #fff8b8;
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), transparent 34%),
    linear-gradient(135deg, #2b118b, #c60f9e 56%, #ffec22 56% 60%, #1b0a72 60%);
  box-shadow: 10px 10px 0 #000, inset 0 0 0 5px rgba(0,0,0,.25);
  transform: rotate(-.6deg);
}
.commercial-mode .boot-card:before {
  content: "AS SEEN ON TV";
  display: inline-block;
  padding: 7px 14px;
  margin-bottom: 10px;
  background: #f9ff1e;
  color: #111;
  border: 3px solid #111;
  box-shadow: 4px 4px 0 #111;
  font-family: var(--display);
  letter-spacing: .08em;
  transform: rotate(-4deg);
}
.commercial-mode .boot-runes { display: none; }
.commercial-mode .boot-card h1 {
  font-size: clamp(2rem, 6.2vw, 5.2rem);
  line-height: .92;
  max-width: 10ch;
  margin: 8px auto 14px;
  color: #fff8b8;
  text-shadow: 4px 4px 0 #000, 7px 7px 0 #ff2bbf, -3px -3px 0 #16f4ff;
}
.commercial-mode .boot-copy {
  display: inline-block;
  background: rgba(7, 3, 35, 0.72);
  padding: 14px 22px;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
  border: 2px solid #fff8b8;
  box-shadow: 4px 4px 0 #000;
  font-weight: 500;
  max-width: 56ch;
  margin: 0 auto 26px;
}
.commercial-mode .sigil-button,
.commercial-mode .primary-link,
.commercial-mode .secondary-link {
  border-radius: 0;
  border: 3px solid #111;
  color: #111;
  background: linear-gradient(180deg, #fff67a, #ffb000);
  box-shadow: 6px 6px 0 #000;
  transform: rotate(-1deg);
}
.commercial-mode .secondary-link { background: linear-gradient(180deg, #31f6ff, #ff56cf); }
.commercial-mode .sigil-button:hover,
.commercial-mode .primary-link:hover,
.commercial-mode .secondary-link:hover { transform: rotate(1deg) translateY(-2px); }

.commercial-mode .section-shell { width: min(1480px, calc(100% - clamp(22px, 6vw, 84px))); }
.commercial-mode .hero {
  min-height: calc(100vh - 84px);
  grid-template-columns: minmax(0, .95fr) minmax(280px, 500px);
  gap: clamp(20px, 4vw, 54px);
}
.commercial-mode .hero h2 {
  font-size: clamp(2.25rem, 5.6vw, 6.15rem);
  line-height: .94;
  max-width: 11ch;
  color: #fff8b8;
  text-shadow: 4px 4px 0 #000, 8px 8px 0 #ff2bbf, -3px -3px 0 #16f4ff;
  transform: rotate(-1deg);
}
.commercial-mode .lede {
  font-size: clamp(1.05rem, 1.45vw, 1.28rem);
  color: #fff;
  text-shadow: 2px 2px 0 #000;
  background: rgba(0,0,0,.22);
  padding: 12px;
  border-left: 6px solid #f9ff1e;
}
.commercial-mode .eyebrow {
  display: inline-block;
  padding: 5px 9px;
  color: #111;
  background: #f9ff1e;
  border: 2px solid #111;
  box-shadow: 3px 3px 0 #111;
  transform: rotate(-1deg);
}
.tv-sticker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 12px;
  align-items: center;
}
.burst-sticker,
.price-sticker,
.warning-sticker {
  display: inline-grid;
  place-items: center;
  min-height: 54px;
  padding: 9px 14px;
  color: #111;
  background: #f9ff1e;
  border: 3px solid #111;
  box-shadow: 5px 5px 0 #000;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: center;
}
.burst-sticker {
  width: 178px;
  aspect-ratio: 1.45;
  clip-path: polygon(50% 0%, 59% 26%, 86% 11%, 74% 38%, 100% 50%, 74% 61%, 87% 90%, 59% 73%, 50% 100%, 40% 73%, 13% 89%, 26% 62%, 0 50%, 26% 39%, 13% 10%, 40% 27%);
  background: #ff3ecf;
  color: #fff8b8;
  text-shadow: 2px 2px 0 #000;
  border: 0;
  font-size: 0.82rem;
  line-height: 1.05;
  padding: 0 24px;
  animation: sticker-throb 1.4s steps(2) infinite;
}
.price-sticker { background: #31f6ff; transform: rotate(2deg); }
.price-sticker b { font-size: .86em; }
.warning-sticker { background: #fff8b8; transform: rotate(-3deg); }
@keyframes sticker-throb { 50% { transform: scale(1.05) rotate(-2deg); } }
.infomercial-lower-third {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px;
  width: min(650px, 100%);
  margin: 14px 0 0;
  border: 3px solid #fff8b8;
  background: #081c7a;
  box-shadow: 6px 6px 0 #000;
  color: #fff;
  overflow: hidden;
}
.infomercial-lower-third strong {
  padding: 9px 12px;
  color: #111;
  background: #f9ff1e;
  font-family: var(--display);
  letter-spacing: .05em;
}
.infomercial-lower-third span {
  padding: 9px 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .82rem;
}
.commercial-marquee {
  grid-area: stats;
  display: flex;
  gap: 26px;
  overflow: hidden;
  white-space: nowrap;
  margin-bottom: -8px;
  padding: 8px 0;
  border-top: 3px solid #fff8b8;
  border-bottom: 3px solid #fff8b8;
  background: #ff2bbf;
  color: #fff8b8;
  box-shadow: 6px 6px 0 #000;
  font-family: var(--display);
  text-shadow: 2px 2px 0 #000;
}
.commercial-marquee span { animation: marquee-wobble 9s linear infinite; }
@keyframes marquee-wobble { to { transform: translateX(-180px); } }

.commercial-mode .tv-stage {
  min-height: 500px;
  border: 6px solid #1a1208;
  box-shadow: inset 0 0 0 8px #5a3a16, 10px 10px 0 #000;
  background:
    radial-gradient(circle at center, rgba(255,255,255,.19), transparent 38%),
    linear-gradient(160deg, #4720ad, #160b67 55%, #0b266c);
  overflow: hidden;
  transform: rotate(.6deg);
}
.commercial-mode .tv-stage:before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 4px solid rgba(255,248,184,.45);
  border-radius: 44% / 6%;
  pointer-events: none;
  box-shadow: inset 0 0 60px rgba(0,0,0,.55);
}
.commercial-mode .tracking-label {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 4;
  padding: 5px 10px;
  background: #000;
  color: #fff;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .06em;
  opacity: .9;
}
.commercial-mode .summoning-ring {
  border-style: solid;
  border-width: 8px;
  border-color: #f9ff1e #ff2bbf #16f4ff #fff8b8;
  box-shadow: 0 0 0 6px #000, 0 0 70px rgba(249,255,30,.28);
  animation: cheap-rotate 5s steps(12) infinite;
}
@keyframes cheap-rotate { to { transform: rotate(360deg); } }
.commercial-mode .summoning-ring:before {
  content: "REAL WIZARD ACTION • REAL WIZARD ACTION •";
  color: #fff8b8;
  text-shadow: 2px 2px 0 #000;
  opacity: .8;
}
.commercial-mode .deckbox {
  filter: drop-shadow(9px 12px 0 #000) drop-shadow(0 26px 28px rgba(0,0,0,.45));
  transform: rotateX(2deg) rotateY(-10deg) rotate(-1.5deg);
}
.commercial-mode .deckbox:before {
  color: #fff8b8;
  text-shadow: 3px 3px 0 #000, -2px -2px 0 #ff2bbf;
  background: rgba(255,43,191,.82);
  border: 2px solid #fff8b8;
  box-shadow: 4px 4px 0 #000;
  padding: 4px 6px;
}
.commercial-mode .deckbox-lid,
.commercial-mode .deckbox-face,
.commercial-mode .deckbox-mouth,
.commercial-mode .deck-card,
.commercial-mode .deck-detail,
.commercial-mode .profile-card,
.commercial-mode .pipeline-card,
.commercial-mode .notes,
.commercial-mode .filter-panel,
.commercial-mode .stat-ribbon {
  border-radius: 0;
  border-width: 3px;
  border-color: #fff8b8;
  box-shadow: 7px 7px 0 #000, var(--shadow);
}
.commercial-mode .deckbox-face:before {
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.08) 0 7px, transparent 8px 14px),
    repeating-linear-gradient(90deg, transparent 0 16px, rgba(255,255,255,.08) 17px 18px);
}
.commercial-mode .section-heading h2 {
  font-size: clamp(2.35rem, 5.6vw, 5.3rem);
  color: #fff8b8;
  text-shadow: 4px 4px 0 #000, 7px 7px 0 #ff2bbf;
}
.commercial-mode .deck-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.13), transparent 35%),
    linear-gradient(145deg, rgba(42,11,130,.92), rgba(8,28,122,.82));
  transition: transform .16s steps(2), box-shadow .16s steps(2), border-color .16s steps(2);
}
.commercial-mode .deck-card:nth-child(odd) { transform: rotate(-.45deg); }
.commercial-mode .deck-card:nth-child(even) { transform: rotate(.35deg); }
.commercial-mode .deck-card:hover,
.commercial-mode .deck-card.active {
  transform: translateY(-5px) rotate(-1.4deg);
  border-color: #f9ff1e;
  box-shadow: 10px 10px 0 #000, 0 26px 80px rgba(0,0,0,.5);
}
.commercial-mode .deck-card h3,
.commercial-mode .deck-detail h2,
.commercial-mode .profile-card h3,
.commercial-mode .pipeline-card h3 {
  color: #fff8b8;
  text-shadow: 3px 3px 0 #000;
}
.commercial-mode .badge,
.commercial-mode input,
.commercial-mode select,
.commercial-mode .mode-pill,
.commercial-mode .metric {
  border-radius: 0;
  border: 2px solid #fff8b8;
  box-shadow: 3px 3px 0 #000;
}
.commercial-mode .badge.hot,
.commercial-mode .mode-pill {
  color: #111;
  background: #f9ff1e;
}
.commercial-mode .stat-ribbon {
  background: linear-gradient(90deg, #ff2bbf, #241070, #16f4ff);
  border: 3px solid #fff8b8;
}
.commercial-mode .stat-ribbon strong { color: #f9ff1e; text-shadow: 3px 3px 0 #000; }
.commercial-mode .stat-ribbon span { color: #fff; text-shadow: 2px 2px 0 #000; }

/* Replaces rain/snow particle feel with occasional tacky commercial bursts. */
.commercial-mode .spark,
.commercial-mode .commercial-burst {
  position: absolute;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #111;
  font-family: var(--display);
  font-style: normal;
  font-weight: 900;
  letter-spacing: .03em;
  text-shadow: none;
  transform: translate(-50%, -50%) rotate(var(--rot)) scale(.2);
  animation: burst-pop steps(4) forwards;
  z-index: 2;
}
.commercial-mode .burst-word {
  padding: 8px 12px;
  min-width: 58px;
  text-align: center;
  background: #f9ff1e;
  border: 3px solid #111;
  box-shadow: 5px 5px 0 #000;
  color: #111;
}
.commercial-mode .burst-star {
  width: 86px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: #ff2bbf;
  color: #fff8b8;
  text-shadow: 2px 2px 0 #000;
  clip-path: polygon(50% 0%, 58% 30%, 85% 12%, 70% 40%, 100% 50%, 70% 60%, 85% 88%, 58% 70%, 50% 100%, 42% 70%, 15% 88%, 30% 60%, 0 50%, 30% 40%, 15% 12%, 42% 30%);
}
@keyframes burst-pop {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--rot)) scale(.1); }
  18% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--rot)) scale(calc(var(--burst-scale) * 1.12)); }
  76% { opacity: 1; transform: translate(-50%, -50%) rotate(calc(var(--rot) * -1)) scale(var(--burst-scale)); }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--rot)) scale(.2); }
}

.commercial-mode .toast {
  border-radius: 0;
  border: 3px solid #fff8b8;
  background: #081c7a;
  color: #fff8b8;
  box-shadow: 6px 6px 0 #000;
}
.commercial-mode .cast-card {
  border-radius: 0;
  box-shadow: 8px 8px 0 #000;
}

@media (max-width: 760px) {
  .commercial-mode .hero h2 { font-size: clamp(2.1rem, 12vw, 4.4rem); max-width: 12ch; }
  .commercial-mode .boot-card h1 { font-size: clamp(2rem, 12vw, 4.2rem); }
  .infomercial-lower-third { grid-template-columns: 1fr; }
  .commercial-mode .tv-stage { min-height: 390px; }
  .commercial-marquee { grid-area: auto; }
  .tv-sticker-row { align-items: stretch; }
}

/* Layout fix for the commercial ticker so it does not sit on top of the stats. */
.commercial-mode .hero {
  grid-template-areas: "copy art" "marquee marquee" "stats stats";
}
.commercial-mode .commercial-marquee { grid-area: marquee; }
@media (max-width: 1100px) {
  .commercial-mode .hero {
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "art" "marquee" "stats";
    min-height: auto;
  }
}
@media (max-width: 760px) {
  .commercial-mode .commercial-marquee { grid-area: marquee; }
}
