/* Plug-board — Bot games (body[data-bot-games]) and leftover lab docks.
   TWO plug demos (toggle body[data-plug]=cart|pci): cart = thick game cartridges;
   pci = thinner video-card + gold-finger PCIe seats (~pb3). PNG art unchanged.
   Dock = motherboard. Locked hexes:
   llmlanes #0d9488 / #eef6f8, toklanes #d97706 / #faf6ef.
   Does not touch .runcard-table / .runcard-scroll.
   Floating carts spawn only on Bot games, not on redesign labs. */

body[data-redesign-lab] .yt-sidebar {
  /* Viewport-tall column: links scroll, motherboard stays in the gutter. */
  min-height: calc(100vh - 12.5rem);
  max-height: calc(100vh - 12.5rem);
  overflow: hidden;
}
body[data-redesign-lab] .yt-sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

/* Dir A sticky-bottom channel card would cover the gutter. Keep the dense
   CTA chrome; sit the card in flow so the dock occupies the space below it. */
body[data-redesign-lab][data-redesign="a"] .yt-channel-cta {
  position: relative;
  bottom: auto;
}

/* Keepers are interactive toys: above page content so L/R chrome matches,
   pull-forward / drop-on-blank / plug-in all work. Topnav stays above (z=40).
   Seated carts elevate further (z=85). Game modal is z=80. */
body[data-redesign-lab] .yt-main {
  position: relative;
  z-index: 1;
  background: var(--bg, #eef6f8);
}
body[data-redesign-lab] .yt-sidebar {
  z-index: 2;
}

.pci-dock {
  --pci: var(--accent, #0d9488);
  --pci-paper: var(--bg, #eef6f8);
  --pci-ink: #e8fffb;
  --pci-board: #10282c;
  margin: 0.35rem 0.15rem 0.25rem;
  flex: 0 0 auto;
  min-height: 248px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.theme-llmlanes .pci-dock {
  --pci: #0d9488;
  --pci-paper: #eef6f8;
  --pci-ink: #e7f7f5;
  --pci-board: #10282c;
}

.theme-toklanes .pci-dock {
  --pci: #d97706;
  --pci-paper: #faf6ef;
  --pci-ink: #fff7eb;
  --pci-board: #2c2116;
}

.pci-dock-label {
  margin: 0.15rem 0.35rem 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted, #6b8490);
}

.pci-board {
  position: relative;
  flex: 1 1 auto;
  min-height: 196px;
  border-radius: 12px;
  border: 2px solid color-mix(in srgb, var(--pci) 70%, #000);
  background:
    radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--pci) 28%, transparent), transparent 42%),
    linear-gradient(180deg, color-mix(in srgb, var(--pci-board) 88%, var(--pci)), var(--pci-board));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--pci-paper) 18%, transparent),
    0 8px 20px color-mix(in srgb, #000 18%, transparent);
  overflow: hidden;
  color: var(--pci-ink);
}

.pci-board svg.pci-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.pci-slots {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.55rem;
  height: 100%;
  padding: 1.55rem 0.4rem 0.45rem;
  box-sizing: border-box;
}

/* Cart bay mouth — thick rails matching cartridge thickness (not thin PCIe fingers). */
.pci-slot {
  --bay-h: 2.55rem;
  appearance: none;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.45rem;
  align-items: center;
  width: 100%;
  min-height: var(--bay-h);
  margin: 0;
  padding: 0.38rem 0.4rem 0.42rem 0.35rem;
  border-radius: 5px 5px 8px 8px;
  border: 2px solid color-mix(in srgb, var(--pci) 45%, #000);
  border-top-width: 3px;
  border-top-color: color-mix(in srgb, #000 55%, var(--pci-board));
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, #000 55%, var(--pci-board)) 0 7px,
      color-mix(in srgb, var(--pci-board) 70%, #000) 7px 100%
    );
  color: var(--pci-ink);
  text-align: left;
  cursor: copy;
  box-shadow:
    inset 0 10px 0 -6px color-mix(in srgb, #000 50%, transparent),
    inset 0 -2px 0 color-mix(in srgb, var(--pci) 35%, transparent),
    inset 3px 0 0 color-mix(in srgb, var(--pci) 40%, transparent),
    inset -3px 0 0 color-mix(in srgb, var(--pci) 40%, transparent),
    0 3px 0 color-mix(in srgb, #000 40%, transparent);
}

/* Side rails of the cart bay */
.pci-slot::before,
.pci-slot::after {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 4px;
  width: 5px;
  border-radius: 1px;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--pci) 55%, #fff),
      color-mix(in srgb, var(--pci) 35%, #000)
    );
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #000 35%, transparent);
  pointer-events: none;
}
.pci-slot::before { left: 3px; }
.pci-slot::after { right: 3px; }

.pci-slot:focus-visible {
  outline: 2px solid var(--pci-paper);
  outline-offset: 2px;
}

.pci-slot.is-hot {
  outline: 2px solid var(--pci-paper);
  outline-offset: 1px;
  filter: brightness(1.12);
  box-shadow:
    inset 0 10px 0 -6px color-mix(in srgb, #000 50%, transparent),
    inset 0 -2px 0 color-mix(in srgb, var(--pci) 55%, transparent),
    inset 3px 0 0 color-mix(in srgb, var(--pci) 55%, transparent),
    inset -3px 0 0 color-mix(in srgb, var(--pci) 55%, transparent),
    0 0 16px color-mix(in srgb, var(--pci) 45%, transparent);
}

.pci-slot.is-plugged {
  box-shadow:
    inset 0 10px 0 -6px color-mix(in srgb, #000 50%, transparent),
    inset 0 -2px 0 color-mix(in srgb, var(--pci) 55%, transparent),
    inset 3px 0 0 color-mix(in srgb, var(--pci) 50%, transparent),
    inset -3px 0 0 color-mix(in srgb, var(--pci) 50%, transparent),
    0 0 0 2px var(--pci-paper);
}

.pci-slot.is-plugging {
  outline: 2px solid var(--pci-paper);
  outline-offset: 1px;
  animation: pci-cart-bay-glow 560ms ease-out;
}

@keyframes pci-cart-bay-glow {
  0% {
    filter: brightness(1);
    box-shadow:
      inset 0 10px 0 -6px color-mix(in srgb, #000 50%, transparent),
      0 0 0 0 transparent;
  }
  35% {
    filter: brightness(1.4);
    box-shadow:
      inset 0 10px 0 -6px color-mix(in srgb, #000 40%, transparent),
      0 0 0 3px var(--pci-paper),
      0 0 32px color-mix(in srgb, var(--pci) 75%, transparent);
  }
  100% {
    filter: brightness(1.12);
    box-shadow:
      inset 0 10px 0 -6px color-mix(in srgb, #000 50%, transparent),
      0 0 0 2px var(--pci-paper),
      0 0 16px color-mix(in srgb, var(--pci) 45%, transparent);
  }
}

.pci-slot-name {
  grid-row: 1 / span 2;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.3rem;
  margin-left: 0.35rem;
  border-radius: 4px;
  background: color-mix(in srgb, var(--pci-board) 75%, #000);
  color: var(--pci-paper);
  z-index: 1;
}

.pci-slot-game {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.15;
  z-index: 1;
}

.pci-slot-sub {
  font-size: 0.58rem;
  opacity: 0.85;
  line-height: 1.15;
  z-index: 1;
}

.pci-dock-hint {
  margin: 0 0.35rem;
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--text-muted, #6b8490);
}

/* ===== Game cartridge chrome (same PNG art; thicker CSS shell) ===== */
.pb-float {
  --lct-accent: var(--accent, #0d9488);
  --pb-scale: 1;
  --pb-shell: #1a1c22;
  --pb-shell-hi: #2a2e38;
  --pb-shell-lo: #0c0d12;
  --pb-bevel: 7px;
  position: fixed;
  left: 0;
  top: 0;
  /* Above page chrome (interactive). Drag / pull-forward / placed stay forward. */
  z-index: 30;
  width: 118px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 8px 8px 10px 10px;
  background:
    linear-gradient(145deg, var(--pb-shell-hi) 0%, var(--pb-shell) 42%, var(--pb-shell-lo) 100%);
  /* Thickness: hard offset edge + soft drop — solid shell so L/R match (not washed). */
  box-shadow:
    5px 5px 0 0 color-mix(in srgb, #000 55%, var(--lct-accent) 12%),
    5px 5px 0 1px color-mix(in srgb, #000 70%, transparent),
    0 10px 22px color-mix(in srgb, #000 22%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 14%, transparent),
    inset 0 -2px 0 color-mix(in srgb, #000 35%, transparent);
  opacity: 1;
  filter: none;
  transform: translate(var(--pb-x, 24px), var(--pb-y, 24px)) rotate(var(--pb-rot, 0deg)) scale(var(--pb-scale, 1));
  transform-origin: center bottom;
  transition:
    transform 240ms cubic-bezier(0.2, 0.9, 0.2, 1),
    box-shadow 180ms ease,
    opacity 160ms ease,
    filter 160ms ease;
  cursor: grab;
  overflow: visible;
  touch-action: none;
  user-select: none;
}

.theme-llmlanes .pb-float { --lct-accent: #0d9488; }
.theme-toklanes .pb-float { --lct-accent: #d97706; }

.pb-float[data-shape="bust"] { width: 100px; }
.pb-float[data-shape="hero"] { width: 132px; }

/* Inner faceplate / cart body */
.pb-float .pb-cart-body {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: var(--pb-bevel) var(--pb-bevel) 0;
  border-radius: 7px 7px 0 0;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--lct-accent) 22%, var(--pb-shell-hi)),
      var(--pb-shell) 18%
    );
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #000 45%, transparent);
  overflow: hidden;
}

/* Top ridge / finger notch */
.pb-float .pb-cart-body::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 50%;
  width: 28%;
  height: 4px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: color-mix(in srgb, #000 55%, var(--pb-shell));
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 10%, transparent);
  pointer-events: none;
  z-index: 2;
}

/* Art sits in a recessed cart window (faceplate) */
.pb-float .pb-cart-window {
  position: relative;
  margin: 0.35rem 0 0;
  border-radius: 4px;
  overflow: hidden;
  background: #0a0a0e;
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, #000 60%, transparent),
    inset 0 3px 8px color-mix(in srgb, #000 45%, transparent),
    0 0 0 1px color-mix(in srgb, var(--lct-accent) 28%, transparent);
}

.pb-float img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 28%;
  pointer-events: none;
  background: #111;
}

.pb-float[data-shape="bust"] img {
  aspect-ratio: 1 / 1;
  object-position: center 20%;
}

.pb-float[data-shape="hero"] img {
  aspect-ratio: 16 / 9;
  object-position: center 35%;
}

/* Sticker-style label bar */
.pb-float .lct-card-label {
  display: block;
  margin: 0.28rem 0 0;
  padding: 0.32rem 0.3rem 0.36rem;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  color: #f8fafc;
  border-radius: 2px;
  border: 1px solid color-mix(in srgb, #fff 18%, transparent);
  background:
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 6px,
      color-mix(in srgb, #000 8%, transparent) 6px,
      color-mix(in srgb, #000 8%, transparent) 7px
    ),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--lct-accent) 82%, #fff),
      color-mix(in srgb, var(--lct-accent) 55%, #111)
    );
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 25%, transparent),
    0 1px 0 color-mix(in srgb, #000 35%, transparent);
  pointer-events: none;
}

/* Bottom connector ridge (cart edge that seats into the bay) */
.pb-float .pb-cart-edge {
  display: block;
  height: 11px;
  margin: 0.28rem var(--pb-bevel) 0;
  border-radius: 0 0 4px 4px;
  background:
    repeating-linear-gradient(
      90deg,
      color-mix(in srgb, var(--lct-accent) 70%, #fff) 0 3px,
      color-mix(in srgb, #000 70%, var(--pb-shell)) 3px 5px
    );
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 20%, transparent),
    0 2px 0 color-mix(in srgb, #000 50%, transparent);
  pointer-events: none;
}

.pb-float.is-active,
.pb-float.is-placed {
  /* Pulled forward / dropped on blank — stay above page content. */
  z-index: 55;
  opacity: 1;
  filter: none;
  box-shadow:
    5px 5px 0 0 color-mix(in srgb, #000 50%, var(--lct-accent) 18%),
    5px 5px 0 1px color-mix(in srgb, #000 65%, transparent),
    0 0 0 2px color-mix(in srgb, var(--lct-accent) 70%, transparent),
    0 12px 26px color-mix(in srgb, #000 22%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 14%, transparent);
}

.pb-float.is-dragging,
.pb-float.is-plugging,
.pb-float.is-aligning,
.pb-float.is-inserting {
  z-index: 70;
  opacity: 1;
  filter: none;
  box-shadow:
    6px 6px 0 0 color-mix(in srgb, #000 45%, var(--lct-accent) 22%),
    6px 6px 0 1px color-mix(in srgb, #000 60%, transparent),
    0 0 0 2px var(--lct-accent),
    0 18px 36px color-mix(in srgb, #000 30%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 16%, transparent);
}

.pb-float.is-dragging { cursor: grabbing; transition: none; }

/* Align above bay, then insert — video-game cart seat */
.pb-float.is-aligning {
  --pb-scale: 0.9;
  --pb-rot: 0deg;
  transform-origin: center bottom;
}

.pb-float.is-inserting {
  --pb-scale: 0.84;
  --pb-rot: 0deg;
  transition:
    transform 280ms cubic-bezier(0.15, 0.85, 0.25, 1.05),
    box-shadow 200ms ease;
}

.pb-float.is-seated {
  /* Above sidebar (4) + game dim (80) so the docked cart never vanishes. */
  z-index: 85;
  opacity: 1;
  filter: none;
  pointer-events: none;
  --pb-scale: 0.72;
  --pb-rot: 0deg;
  box-shadow:
    3px 3px 0 0 color-mix(in srgb, #000 50%, var(--lct-accent) 15%),
    0 0 0 2px var(--lct-accent),
    0 0 28px color-mix(in srgb, var(--lct-accent) 55%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 12%, transparent);
}

.pb-float:focus-visible {
  outline: 3px solid var(--lct-accent);
  outline-offset: 3px;
}

body.pb-game-open .pb-float { pointer-events: none; }
body.pb-game-open .pb-float.is-seated {
  z-index: 85;
  opacity: 1;
  visibility: visible;
}

/* In-bay docked face (inside slot bounds — survives board overflow:hidden) */
.pci-slot.has-docked {
  position: relative;
}
.pci-slot-docked {
  position: absolute;
  /* Sit in the bay mouth beside the x16/x8 label */
  left: 2.6rem;
  right: 0.35rem;
  top: 0.2rem;
  bottom: 0.2rem;
  z-index: 4;
  pointer-events: none;
  display: flex;
  align-items: stretch;
  gap: 0.25rem;
  border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--pci-paper) 35%, transparent);
  background: #0b0b10;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--pci) 40%, transparent),
    0 0 14px color-mix(in srgb, var(--pci) 45%, transparent);
  overflow: hidden;
}
.pci-slot-docked img {
  display: block;
  width: 42%;
  max-width: 72px;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  flex: 0 0 auto;
}
.pci-slot-docked-label {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  padding: 0 0.25rem;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #f8fafc;
  line-height: 1.15;
}

.pb-game {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  /* Dim the page but keep the sidebar dock readable; seated float is also z=85. */
  background: color-mix(in srgb, #0b1214 55%, transparent);
  pointer-events: auto;
}
@media (min-width: 861px) {
  .pb-game {
    /* Leave the sticky sidebar gutter undimmed so the seated cart/bay stay obvious. */
    background:
      linear-gradient(
        90deg,
        transparent 0,
        transparent min(260px, 28vw),
        color-mix(in srgb, #0b1214 55%, transparent) min(260px, 28vw)
      );
  }
}

.pb-game[hidden] { display: none; }

.pb-game-card {
  width: min(440px, 100%);
  max-height: min(86vh, 640px);
  overflow: auto;
  border-radius: 14px;
  border: 2px solid var(--accent, #0d9488);
  background: var(--bg-card, #fff);
  color: var(--text, #111);
  padding: 0.9rem 1rem 1rem;
  box-shadow: 0 18px 50px color-mix(in srgb, #000 35%, transparent);
}

.pb-game-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.pb-game-card p { margin: 0.35rem 0; font-size: 0.86rem; }

.pb-kicker {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent, #0d9488);
}

.pb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.pb-actions button,
.pb-mem-grid button,
.pb-chip,
.pb-seat {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--accent, #0d9488) 45%, transparent);
  background: var(--bg, #eef6f8);
  color: var(--text, #111);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.pb-actions button[data-pb-close] {
  margin-left: auto;
  background: transparent;
}

.pb-mem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.pb-mem-grid button {
  min-height: 5.2rem;
  text-align: left;
  line-height: 1.3;
  font-weight: 650;
  white-space: pre-line;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.pb-mem-grid button.is-down {
  color: var(--accent, #0d9488);
  font-size: 1.35rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.04em;
  background:
    repeating-linear-gradient(
      -45deg,
      color-mix(in srgb, var(--accent, #0d9488) 10%, var(--bg, #eef6f8)),
      color-mix(in srgb, var(--accent, #0d9488) 10%, var(--bg, #eef6f8)) 6px,
      color-mix(in srgb, var(--accent, #0d9488) 18%, var(--bg, #eef6f8)) 6px,
      color-mix(in srgb, var(--accent, #0d9488) 18%, var(--bg, #eef6f8)) 12px
    );
}
.pb-mem-grid button.is-up,
.pb-mem-grid button.is-locked {
  background: color-mix(in srgb, var(--accent, #0d9488) 16%, var(--bg-card, #fff));
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-line;
  font-size: 0.72rem;
}
.pb-mem-grid button.is-locked { cursor: default; }

.pb-run {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  word-break: break-all;
}

.pb-queue, .pb-seats {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.pb-chip.is-armed,
.pb-seat.is-hot {
  outline: 2px solid var(--accent, #0d9488);
}

.pb-chip.is-done,
.pb-seat.is-filled { opacity: 0.72; }

.pb-clock {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: var(--accent, #0d9488);
}

@media (max-width: 860px) {
  body[data-redesign-lab] .yt-sidebar {
    min-height: 0;
    max-height: none;
    overflow: visible;
  }
  body[data-redesign-lab] .yt-sidebar-scroll {
    overflow: visible;
  }
  .pci-dock { min-height: 260px; }
  .pb-float { width: 100px; }
  .pb-float[data-shape="bust"] { width: 88px; }
  .pb-float[data-shape="hero"] { width: 112px; }
}

@media (prefers-reduced-motion: reduce) {
  .pb-float { transition: none; }
  .pci-slot.is-plugging { animation: none; }
}


/* =====================================================================
   Plug mode: PCI / video-card (data-plug="pci") — retain pb3 thin-card path
   Cart mode (data-plug="cart", default) uses the cartridge chrome above.
   Both stay in code for later use on different site surfaces.
   ===================================================================== */
body[data-plug="pci"] .pci-dock { min-height: 228px; }
body[data-plug="pci"] .pci-board { min-height: 176px; }
body[data-plug="pci"] .pci-slots {
  gap: 0.4rem;
  padding: 1.7rem 0.45rem 0.4rem;
}

body[data-plug="pci"] .pci-slot {
  --bay-h: auto;
  min-height: 0;
  padding: 0.28rem 0.35rem 0.32rem;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--pci) 55%, #000);
  border-top-width: 1px;
  border-top-color: color-mix(in srgb, var(--pci) 55%, #000);
  background:
    repeating-linear-gradient(
      90deg,
      color-mix(in srgb, var(--pci) 78%, #fff) 0 3px,
      color-mix(in srgb, var(--pci-board) 70%, #000) 3px 5px
    );
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #000 35%, transparent);
}
body[data-plug="pci"] .pci-slot::before,
body[data-plug="pci"] .pci-slot::after {
  content: none;
  display: none;
}
body[data-plug="pci"] .pci-slot.is-hot {
  filter: brightness(1.12);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #000 35%, transparent);
}
body[data-plug="pci"] .pci-slot.is-plugged {
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, #000 35%, transparent),
    0 0 0 2px var(--pci-paper);
}
body[data-plug="pci"] .pci-slot.is-plugging {
  animation: pci-plug-glow 420ms ease-out;
}
body[data-plug="pci"] .pci-slot-name { margin-left: 0; padding: 0.15rem 0.28rem; }

@keyframes pci-plug-glow {
  0% {
    filter: brightness(1);
    box-shadow:
      inset 0 0 0 1px color-mix(in srgb, #000 35%, transparent),
      0 0 0 0 transparent;
  }
  45% {
    filter: brightness(1.35);
    box-shadow:
      inset 0 0 0 1px color-mix(in srgb, #000 35%, transparent),
      0 0 0 3px var(--pci-paper),
      0 0 28px color-mix(in srgb, var(--pci) 70%, transparent);
  }
  100% {
    filter: brightness(1.1);
    box-shadow:
      inset 0 0 0 1px color-mix(in srgb, #000 35%, transparent),
      0 0 0 2px var(--pci-paper),
      0 0 14px color-mix(in srgb, var(--pci) 40%, transparent);
  }
}

/* Thin video-card chrome — same PNG art, flat card shell (pb3 look) */
body[data-plug="pci"] .pb-float {
  width: 128px;
  border: 2px solid color-mix(in srgb, var(--lct-accent) 55%, #111 45%);
  border-radius: 10px;
  background: #0b0b10;
  box-shadow: 0 8px 20px color-mix(in srgb, #000 16%, transparent);
  overflow: hidden;
  transform-origin: center center;
}
body[data-plug="pci"] .pb-float[data-shape="bust"] { width: 96px; }
body[data-plug="pci"] .pb-float[data-shape="hero"] { width: 148px; }

body[data-plug="pci"] .pb-float .pb-cart-body {
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}
body[data-plug="pci"] .pb-float .pb-cart-body::before { display: none; }
body[data-plug="pci"] .pb-float .pb-cart-window {
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  background: #111;
}
body[data-plug="pci"] .pb-float img {
  object-position: center center;
}
body[data-plug="pci"] .pb-float .lct-card-label {
  margin: 0;
  padding: 0.28rem 0.35rem 0.35rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: none;
  border-radius: 0;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--lct-accent) 75%, #111),
    color-mix(in srgb, var(--lct-accent) 45%, #111)
  );
  box-shadow: none;
}
body[data-plug="pci"] .pb-float .pb-cart-edge { display: none; }

body[data-plug="pci"] .pb-float.is-active {
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--lct-accent) 55%, transparent),
    0 8px 20px color-mix(in srgb, #000 16%, transparent);
}
body[data-plug="pci"] .pb-float.is-dragging,
body[data-plug="pci"] .pb-float.is-plugging {
  box-shadow:
    0 0 0 2px var(--lct-accent),
    0 16px 36px color-mix(in srgb, #000 28%, transparent);
}
body[data-plug="pci"] .pb-float.is-plugging {
  --pb-scale: 0.86;
  --pb-rot: 0deg;
}
body[data-plug="pci"] .pb-float.is-aligning,
body[data-plug="pci"] .pb-float.is-inserting {
  /* PCI path uses single-stage is-plugging only */
  --pb-scale: 0.86;
}
body[data-plug="pci"] .pb-float.is-seated {
  opacity: 1;
  --pb-scale: 0.78;
  z-index: 85;
  box-shadow:
    0 0 0 2px var(--lct-accent),
    0 0 22px color-mix(in srgb, var(--lct-accent) 45%, transparent);
}

@media (max-width: 860px) {
  body[data-plug="pci"] .pci-dock { min-height: 240px; }
  body[data-plug="pci"] .pb-float { width: 104px; }
  body[data-plug="pci"] .pb-float[data-shape="hero"] { width: 120px; }
}

/* Plug-mode picker (lab chrome) */
.redesign-plug-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-left: 0.35rem;
  padding-left: 0.55rem;
  border-left: 1px solid color-mix(in srgb, var(--border, rgba(0,0,0,.15)) 80%, transparent);
  font-size: 0.75rem;
}
.redesign-plug-picker > span {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #6b8490);
  font-size: 0.68rem;
}
.redesign-plug-picker button {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--accent, #0d9488) 45%, transparent);
  background: var(--bg-card, #fff);
  color: var(--text, #111);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.redesign-plug-picker button[aria-current="true"] {
  background: var(--accent, #0d9488);
  color: #fff;
  border-color: transparent;
}

body[data-bot-games] .yt-main {
  position: relative;
  z-index: 1;
}
body[data-bot-games] .bot-games-stage {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 1.25rem;
  align-items: start;
  margin-top: 1rem;
}
body[data-bot-games] .redesign-plug-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
  align-items: center;
  margin: 0.75rem 0 0;
}
body[data-bot-games] .redesign-plug-picker button {
  font: inherit;
  cursor: pointer;
}
@media (max-width: 720px) {
  body[data-bot-games] .bot-games-stage { grid-template-columns: 1fr; }
}
