/* ==========================================================================
   2NE1.COM // PROTOTYPE B1: WINE-CRATE EURORACK PATCHBAY & MAKER'S WORKBENCH
   Self-Healing Green Cutting Mat (#12261e) + Pine/Birch Wine Crate Skiff
   ========================================================================== */

:root {
  /* Self-Healing Cutting Mat Palette */
  --mat-bg: #12261e;
  --mat-bg-deep: #0b1813;
  --mat-grid-major: rgba(142, 228, 175, 0.14);
  --mat-grid-minor: rgba(142, 228, 175, 0.055);
  --mat-ink: rgba(167, 243, 208, 0.42);
  --mat-ink-bright: rgba(167, 243, 208, 0.78);

  /* Wooden Wine-Crate Skiff & Rails */
  --wood-light: #c89658;
  --wood-mid: #a47138;
  --wood-dark: #6d471e;
  --wood-edge: #3e250d;
  --rail-alu: #2b3036;
  --rail-highlight: #49515a;

  /* Eurorack Faceplates */
  --panel-dark-alu: #171a1f;
  --panel-dark-alu-2: #1f242b;
  --panel-fr4-black: #0f1215;
  --panel-synth-alu: #1c2026;
  --panel-eink-cream: #dedad0;
  --panel-border: rgba(255, 255, 255, 0.11);

  /* Hardware Gold ENIG & Copper Traces */
  --enig-gold: #e6b84c;
  --enig-gold-bright: #ffd978;
  --enig-gold-dim: #8c6a1f;
  --copper-trace: rgba(230, 184, 76, 0.22);

  /* LED & Phosphor Displays */
  --led-red: #ff3333;
  --led-red-glow: rgba(255, 51, 51, 0.45);
  --led-amber: #f59e0b;
  --led-green: #10b981;
  --led-cyan: #38bdf8;
  --led-magenta: #ec4899;
  --crt-bg: #070b0a;
  --crt-border: #283330;

  /* Typography */
  --text-light: #f1f5f9;
  --text-Mid: #cbd5e1;
  --text-muted: #94a3b8;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

  /* Shadows */
  --shadow-skiff: 0 22px 48px rgba(0, 0, 0, 0.65), 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 10px 24px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.35);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--mat-bg);
  color: var(--text-light);
  font-family: var(--font-sans);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  /* Self-Healing Maker's Cutting Mat 10mm & 50mm Grid + Protractor Overlay */
  background-image:
    radial-gradient(circle at 50% 18%, rgba(56, 189, 248, 0.05), transparent 55%),
    linear-gradient(to right, var(--mat-grid-major) 1px, transparent 1px),
    linear-gradient(to bottom, var(--mat-grid-major) 1px, transparent 1px),
    linear-gradient(to right, var(--mat-grid-minor) 1px, transparent 1px),
    linear-gradient(to bottom, var(--mat-grid-minor) 1px, transparent 1px);
  background-size:
    100% 100%,
    80px 80px,
    80px 80px,
    16px 16px,
    16px 16px;
  background-position: 0 0, 24px 24px, 24px 24px, 24px 24px, 24px 24px;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* ==========================================================================
   1. TOP PROTOTYPE SWITCHER BAR
   ========================================================================== */
.proto-switcher {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(8, 15, 12, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(230, 184, 76, 0.25);
  font-family: var(--font-mono);
  font-size: 0.73rem;
  padding: 0.42rem 1rem;
}

.proto-switcher__inner {
  max-width: 1560px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.proto-switcher__label {
  color: var(--enig-gold);
  font-weight: 600;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.proto-switcher__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.proto-link {
  padding: 0.22rem 0.58rem;
  border-radius: 4px;
  color: var(--text-Mid);
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.proto-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.15);
}

.proto-link--active {
  color: #0b1813;
  background: var(--enig-gold);
  font-weight: 700;
  border-color: var(--enig-gold-bright);
  box-shadow: 0 0 12px rgba(230, 184, 76, 0.35);
}

.proto-link--root {
  color: var(--led-cyan);
  border-color: rgba(56, 189, 248, 0.3);
  margin-left: 0.25rem;
}

/* ==========================================================================
   2. BENCH POWER BUS & HEADER BAR
   ========================================================================== */
.bench-header {
  max-width: 1560px;
  margin: 0.85rem auto 0.5rem;
  padding: 0 1.25rem;
}

.power-bus {
  background: linear-gradient(180deg, #1b2026 0%, #111519 100%);
  border: 1px solid #353d47;
  border-top: 2px solid var(--enig-gold-dim);
  border-radius: 8px;
  padding: 0.65rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  position: relative;
}

.power-bus__left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.pwr-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  border-radius: 4px;
  background: #0b0d10;
  border: 1px solid #333b44;
  color: var(--led-green);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.8);
}

.pwr-switch[aria-pressed="false"] {
  color: var(--led-red);
}

.pwr-led {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--led-green);
  box-shadow: 0 0 8px var(--led-green), 0 0 14px var(--led-green);
  transition: all 0.2s ease;
}

.pwr-switch[aria-pressed="false"] .pwr-led {
  background: #551111;
  box-shadow: none;
}

.brand-Identity {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-mono);
  font-size: clamp(0.88rem, 1.3vw, 1.08rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
}

.brand-title .thats-right {
  color: var(--enig-gold);
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 0.71rem;
  color: var(--mat-ink-bright);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.patch-status-pill {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
  padding: 0.08rem 0.45rem;
  border-radius: 3px;
  font-weight: 600;
}

.power-bus__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.bus-btn {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.42rem 0.78rem;
  border-radius: 5px;
  background: linear-gradient(180deg, #28303a 0%, #1b2128 100%);
  border: 1px solid #45505e;
  color: var(--text-light);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.1s ease, border-color 0.15s ease, background 0.15s ease;
}

.bus-btn:hover {
  border-color: var(--enig-gold);
  background: linear-gradient(180deg, #323c48 0%, #222932 100%);
}

.bus-btn:active {
  transform: translateY(1px);
}

.bus-btn--gold {
  background: linear-gradient(180deg, #d9a53d 0%, #a8791d 100%);
  border-color: #f7cf73;
  color: #0d1117;
  font-weight: 700;
}

.bus-btn--gold:hover {
  background: linear-gradient(180deg, #e7b54c 0%, #b98724 100%);
  border-color: #fff;
}

.bus-btn--audio[aria-pressed="true"] {
  background: linear-gradient(180deg, #059669 0%, #047857 100%);
  border-color: #34d399;
  color: #fff;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.4);
}

.bus-btn--bom {
  border-color: rgba(56, 189, 248, 0.5);
  color: var(--led-cyan);
}

/* ==========================================================================
   3. WOODEN WINE-CRATE EURORACK SKIFF & PATCH CABLE OVERLAY
   ========================================================================== */
.workbench-stage {
  max-width: 1560px;
  margin: 0 auto;
  padding: 0.35rem 1.25rem 3rem;
  position: relative;
}

.wine-crate-skiff {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  background: #080a0c;
  border-radius: 10px;
  box-shadow: var(--shadow-skiff);
  border: 2px solid var(--wood-edge);
  margin-bottom: 1.75rem;
  user-select: none;
}

/* Pine / Birch Wine-Crate Wooden Side Cheeks */
.skiff-cheek {
  background:
    repeating-linear-gradient(
      90deg,
      rgba(62, 37, 13, 0.16) 0px,
      rgba(62, 37, 13, 0.16) 2px,
      transparent 2px,
      transparent 7px
    ),
    linear-gradient(180deg, var(--wood-light) 0%, var(--wood-mid) 50%, var(--wood-dark) 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.45);
}

.skiff-cheek--left {
  border-radius: 8px 0 0 8px;
  border-right: 3px solid #472c11;
}

.skiff-cheek--right {
  border-radius: 0 8px 8px 0;
  border-left: 3px solid #472c11;
}

.wood-dovetail {
  width: 22px;
  height: 14px;
  background: rgba(71, 44, 17, 0.55);
  border: 1px solid rgba(40, 22, 6, 0.6);
  border-radius: 2px;
}

.crate-brand-stamp {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: rgba(45, 24, 6, 0.78);
  text-transform: uppercase;
  padding: 0.4rem 0;
}

/* Skiff Interior: Rails + Modules Grid */
.skiff-bay {
  display: flex;
  flex-direction: column;
  background: #07090b;
  position: relative;
  min-width: 0;
}

.z-rail {
  height: 15px;
  background: linear-gradient(180deg, #3c434c 0%, #20252b 60%, #14181c 100%);
  border-top: 1px solid #57606b;
  border-bottom: 1px solid #0d1013;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: rgba(255, 255, 255, 0.38);
  letter-spacing: 0.12em;
}

.modules-rack {
  display: grid;
  grid-template-columns: 1.05fr 2.15fr 1.95fr 1.95fr 1.55fr;
  gap: 3px;
  background: #050608;
  padding: 2px 3px;
  position: relative;
}

/* Interactive SVG Patch Cable Layer */
#patch-cables {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 40;
  overflow: visible;
}

#patch-cables .cable-hit {
  pointer-events: stroke;
  cursor: pointer;
}

#patch-cables .cable-hit:hover + .cable-core {
  filter: brightness(1.35) drop-shadow(0 0 8px rgba(255,255,255,0.6));
}

@keyframes cableDashFlow {
  to {
    stroke-dashoffset: -48;
  }
}

.cable-pulse {
  animation: cableDashFlow 0.75s linear infinite;
}

/* ==========================================================================
   4. INDIVIDUAL EURORACK MODULE STYLING
   ========================================================================== */
.euro-module {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 11px 10px;
  min-height: 455px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(0, 0, 0, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: box-shadow 0.2s ease;
}

.euro-module.is-modulated {
  box-shadow: inset 0 0 22px rgba(230, 184, 76, 0.12);
}

/* Faceplate Finishes */
.euro-module--fr4 {
  background:
    radial-gradient(circle at 80% 15%, rgba(230, 184, 76, 0.05), transparent 45%),
    linear-gradient(180deg, #101317 0%, #0b0e11 100%);
}

.euro-module--alu-dark {
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.012) 0px,
      rgba(255, 255, 255, 0.012) 1px,
      transparent 1px,
      transparent 3px
    ),
    linear-gradient(180deg, #1c2026 0%, #14171c 100%);
}

.euro-module--synth {
  background:
    linear-gradient(180deg, #21262d 0%, #161a20 100%);
}

.euro-module--eink {
  background:
    linear-gradient(180deg, #1d2220 0%, #131716 100%);
}

/* Hex Mounting Screws */
.module-screws {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.module-screws--bottom {
  margin-top: 6px;
  margin-bottom: 0;
}

.hex-screw {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #9aa3ad, #495057 70%, #212529 100%);
  border: 1px solid #1a1d20;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  position: relative;
}

.hex-screw::after {
  content: '';
  position: absolute;
  inset: 2.5px;
  background: #2b3035;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.module-hp-tag {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--enig-gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

.module-header {
  text-align: center;
  border-bottom: 1px solid rgba(230, 184, 76, 0.22);
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.module-kicker {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--enig-gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
}

.module-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin-top: 2px;
}

/* 7-Segment Red LED Readout */
.led-7seg-box {
  background: #140303;
  border: 1px solid #3d0f0f;
  border-radius: 4px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--led-red);
  text-shadow: 0 0 8px var(--led-red-glow), 0 0 3px var(--led-red);
  letter-spacing: 0.12em;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.led-7seg-box--green {
  background: #03140c;
  border-color: #0e3f28;
  color: #34d399;
  text-shadow: 0 0 8px rgba(52, 211, 153, 0.45);
}

.led-7seg-box--amber {
  background: #170e02;
  border-color: #472c08;
  color: #fbbf24;
  text-shadow: 0 0 8px rgba(251, 191, 36, 0.45);
}

/* ==========================================================================
   MODULE 00: TURING / LFO MASTER CLOCK (12HP)
   ========================================================================== */
.clock-display-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 8px;
}

.turing-register {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 3px;
  background: #07090b;
  padding: 5px;
  border-radius: 4px;
  border: 1px solid #262c34;
  margin-bottom: 8px;
}

.turing-bit {
  height: 12px;
  border-radius: 2px;
  background: #1f242b;
  transition: background 0.08s ease, box-shadow 0.08s ease;
}

.turing-bit.is-high {
  background: var(--led-amber);
  box-shadow: 0 0 6px var(--led-amber);
}

.knob-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 6px 0;
}

.synth-knob {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3d444d, #191d22 75%);
  border: 2px solid var(--enig-gold-dim);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.65), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  position: relative;
  cursor: ns-resize;
  transition: border-color 0.15s ease;
}

.synth-knob:hover {
  border-color: var(--enig-gold-bright);
}

.synth-knob__wiper {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 3px;
  height: 15px;
  margin-left: -1.5px;
  background: var(--enig-gold-bright);
  border-radius: 2px;
  transform-origin: 50% 19px;
}

.knob-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-Mid);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rate-slider {
  width: 100%;
  accent-color: var(--enig-gold);
  cursor: pointer;
  height: 4px;
}

.trig-push-btn {
  width: 100%;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  background: linear-gradient(180deg, #991b1b 0%, #7f1d1d 100%);
  border: 1px solid #f87171;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
  margin-bottom: 6px;
}

.trig-push-btn:active,
.trig-push-btn.is-pulsing {
  background: #ef4444;
  box-shadow: 0 0 12px #ef4444;
  transform: translateY(1px);
}

/* ==========================================================================
   MODULE 01: EVOLUTION & FOUNDATION (MUTATOR-200)
   ========================================================================== */
.crt-viewport {
  position: relative;
  background: var(--crt-bg);
  border: 2px solid #2e3836;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.9);
  margin-bottom: 7px;
}

.crt-viewport img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.18s ease, transform 0.25s ease;
}

.crt-viewport.is-mutating img {
  filter: brightness(1.3) contrast(1.2) hue-rotate(25deg);
}

.crt-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.18) 0px,
    rgba(0, 0, 0, 0.18) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
}

.crt-overlay-bar {
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.crt-badge {
  background: rgba(7, 11, 10, 0.84);
  border: 1px solid rgba(230, 184, 76, 0.45);
  color: var(--enig-gold-bright);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 2px 6px;
  border-radius: 3px;
}

.evo-encoder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 6px;
}

.evo-gen-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.evo-pill {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 2px 5px;
  border-radius: 3px;
  background: #11151a;
  border: 1px solid #303842;
  color: var(--text-muted);
  transition: all 0.12s ease;
}

.evo-pill:hover {
  color: #fff;
  border-color: var(--enig-gold);
}

.evo-pill[aria-pressed="true"] {
  background: var(--enig-gold);
  color: #0b0e11;
  font-weight: 700;
  border-color: var(--enig-gold-bright);
}

.gemini-rationale-lcd {
  background: #08120e;
  border: 1px solid #1d3b2e;
  border-radius: 4px;
  padding: 5px 7px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: #a7f3d0;
  line-height: 1.35;
  min-height: 3.6em;
  margin-bottom: 7px;
}

/* ==========================================================================
   MODULE 02: LUX AUTOMATA 635K VOXEL MATRIX
   ========================================================================== */
.lux-canvas-wrap {
  position: relative;
  background: #05080b;
  border: 2px solid #25333d;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  margin-bottom: 7px;
  cursor: crosshair;
}

#lux-rack-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.lux-telemetry-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 6px;
}

.lux-stat {
  background: #0a0e12;
  border: 1px solid #222a34;
  border-radius: 4px;
  padding: 3px 5px;
  text-align: center;
}

.lux-stat__lbl {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.54rem;
  color: var(--text-muted);
}

.lux-stat__val {
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 700;
  color: var(--led-cyan);
}

.lux-rule-btns {
  display: flex;
  gap: 4px;
  margin-bottom: 7px;
}

.lux-rule-btn {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  padding: 3px 4px;
  border-radius: 3px;
  background: #13181f;
  border: 1px solid #2c3542;
  color: var(--text-Mid);
}

.lux-rule-btn[aria-pressed="true"] {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--led-cyan);
  color: #fff;
  font-weight: 600;
}

/* ==========================================================================
   MODULE 03: KORG PHASE 8 & 100-DSP REVERB SYNTH
   ========================================================================== */
.phase8-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 7px;
}

.tongue-bank {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  background: #0c0f13;
  border: 1px solid #2c3440;
  border-radius: 5px;
  padding: 7px 5px;
  margin-bottom: 7px;
}

.steel-tongue {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 78px;
  background: linear-gradient(180deg, #525b66 0%, #2b3138 65%, #1d2228 100%);
  border: 1px solid #6c757d;
  border-top: 3px solid var(--enig-gold);
  border-radius: 3px 3px 8px 8px;
  padding-bottom: 5px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  color: #e2e8f0;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
  transition: transform 0.08s ease, border-color 0.1s ease, box-shadow 0.1s ease;
  position: relative;
}

.steel-tongue:nth-child(1) { height: 84px; }
.steel-tongue:nth-child(2) { height: 80px; }
.steel-tongue:nth-child(3) { height: 76px; }
.steel-tongue:nth-child(4) { height: 72px; }
.steel-tongue:nth-child(5) { height: 68px; }
.steel-tongue:nth-child(6) { height: 64px; }
.steel-tongue:nth-child(7) { height: 60px; }
.steel-tongue:nth-child(8) { height: 56px; }

.steel-tongue:hover {
  border-color: var(--enig-gold-bright);
  background: linear-gradient(180deg, #646f7c 0%, #343b44 65%, #232930 100%);
}

.steel-tongue.is-plucked {
  transform: translateY(3px) scaleY(0.96);
  border-color: var(--led-cyan);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.75);
  color: #fff;
}

.synth-params-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #101419;
  border: 1px solid #262e38;
  border-radius: 4px;
  padding: 5px 7px;
  margin-bottom: 7px;
}

.synth-param {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.synth-param label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* ==========================================================================
   MODULE 04: PAPERPIAI & VIS PLASTICA (BISTABLE E-INK)
   ========================================================================== */
.eink-frame-bezel {
  background: var(--panel-eink-cream);
  color: #18181b;
  padding: 7px;
  border-radius: 5px;
  border: 2px solid #b5b0a4;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.35);
  margin-bottom: 7px;
  position: relative;
}

.eink-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid #8c877c;
  background: #e5e2dc;
}

.eink-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.08) saturate(0.88);
  transition: filter 0.12s steps(2);
}

@keyframes einkBistableFlash {
  0% { filter: invert(1) grayscale(1) contrast(3); }
  35% { filter: invert(0) grayscale(1) contrast(2.5); }
  70% { filter: invert(1) contrast(1.8); }
  100% { filter: contrast(1.08) saturate(0.88); }
}

.eink-screen.is-flashing img {
  animation: einkBistableFlash 0.55s steps(2) forwards;
}

.eink-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  color: #27272a;
  margin-top: 4px;
}

.module-mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.mod-chip {
  font-family: var(--font-mono);
  font-size: 0.61rem;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-Mid);
  transition: all 0.15s ease;
}

.mod-chip:hover {
  border-color: var(--enig-gold);
  color: #fff;
  background: rgba(230, 184, 76, 0.15);
}

.mod-chip--primary {
  background: rgba(230, 184, 76, 0.16);
  border-color: rgba(230, 184, 76, 0.5);
  color: var(--enig-gold-bright);
  font-weight: 600;
}

/* ==========================================================================
   5. 3.5MM EURORACK GOLD ENIG PATCH JACKS BAY
   ========================================================================== */
.patch-bay-strip {
  margin-top: auto;
  background: #0a0c0f;
  border: 1px solid #262c34;
  border-top: 2px solid var(--enig-gold-dim);
  border-radius: 5px;
  padding: 6px 5px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 4px;
}

.patch-jack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 3px 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
  position: relative;
}

.patch-jack:hover {
  background: rgba(230, 184, 76, 0.12);
  transform: scale(1.06);
}

.patch-jack.is-selected {
  background: rgba(56, 189, 248, 0.22);
  outline: 1px dashed var(--led-cyan);
}

/* Outer Hex Nut & Gold ENIG Barrel */
.jack-socket {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle, #050505 0%, #050505 36%, var(--enig-gold-bright) 39%, var(--enig-gold) 58%, #6e5011 75%, #2b3036 100%);
  border: 1.5px solid var(--enig-gold);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.8), inset 0 0 3px rgba(0, 0, 0, 0.9);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.patch-jack[data-jack-dir="out"] .jack-socket {
  border-color: var(--enig-gold-bright);
  box-shadow: 0 0 8px rgba(230, 184, 76, 0.28), 0 2px 5px rgba(0, 0, 0, 0.8);
}

.patch-jack[data-jack-dir="in"] .jack-socket {
  border-color: #94a3b8;
  background: radial-gradient(circle, #050505 0%, #050505 36%, #e2e8f0 39%, #94a3b8 58%, #475569 75%, #1e293b 100%);
}

.patch-jack.is-patched .jack-socket {
  box-shadow: 0 0 12px var(--led-cyan);
}

.jack-label {
  font-family: var(--font-mono);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.patch-jack[data-jack-dir="out"] .jack-label {
  color: var(--enig-gold-bright);
  background: rgba(230, 184, 76, 0.14);
  padding: 0 3px;
  border-radius: 2px;
}

.patch-jack[data-jack-dir="in"] .jack-label {
  color: #cbd5e1;
}

/* ==========================================================================
   6. LOWER CUTTING MAT: RULERS, CARTRIDGES, SALVAGED TRAY & NOTEBOOK BINDER
   ========================================================================== */
.mat-ruler-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--mat-ink);
  border-bottom: 1px solid rgba(167, 243, 208, 0.2);
  padding: 0.35rem 0.75rem;
  margin-bottom: 1.35rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--mat-ink-bright);
  background:
    repeating-linear-gradient(
      90deg,
      var(--mat-ink) 0px,
      var(--mat-ink) 1px,
      transparent 1px,
      transparent 16px
    );
  background-size: 100% 5px;
  background-repeat: no-repeat;
  background-position: top left;
}

/* Section Headers on the Cutting Mat */
.mat-zone-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  border-left: 3px solid var(--enig-gold);
  padding-left: 0.75rem;
}

.mat-zone-kicker {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--enig-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mat-zone-title {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 700;
  color: #fff;
}

.mat-zone-hint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--mat-ink-bright);
}

/* ZONE A: ROM CARTRIDGES & BENCH DATA MONITOR */
.rom-bench-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2.2rem;
}

.rom-cartridge-tray {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 0.7rem;
  align-content: start;
}

.rom-cartridge {
  position: relative;
  text-align: left;
  background: linear-gradient(180deg, #1e242b 0%, #14181d 88%, #0d1014 100%);
  border: 1px solid #38424e;
  border-top: 3px solid var(--enig-gold-dim);
  border-radius: 7px 7px 4px 4px;
  padding: 0.7rem 0.75rem 1.05rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

/* Grip Ridges & Gold Edge Connector Pins at Bottom of ROM Cartridge */
.rom-cartridge::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--enig-gold) 0px,
    var(--enig-gold) 4px,
    #111519 4px,
    #111519 7px
  );
  border-top: 1px solid #090b0d;
  opacity: 0.85;
}

.rom-cartridge:hover {
  transform: translateY(-3px);
  border-color: var(--enig-gold);
}

.rom-cartridge[aria-selected="true"] {
  background: linear-gradient(180deg, #27313d 0%, #182028 90%);
  border-color: var(--led-cyan);
  border-top-color: var(--led-cyan);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.3), var(--shadow-card);
}

.rom-cartridge__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--enig-gold);
}

.rom-cartridge__title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

.rom-cartridge__sub {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Bench Data Monitor (Active ROM Deck) */
.bench-data-monitor {
  background: linear-gradient(180deg, #161b20 0%, #0e1216 100%);
  border: 2px solid #35414d;
  border-radius: 9px;
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.monitor-screen {
  background: #06100c;
  border: 1.5px solid #1e4635;
  border-radius: 6px;
  padding: 0.95rem 1.05rem;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.85);
  color: #d1fae5;
}

.monitor-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px dashed rgba(52, 211, 153, 0.3);
  padding-bottom: 0.5rem;
  margin-bottom: 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #34d399;
}

.monitor-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.45rem;
}

.monitor-body {
  font-size: 0.84rem;
  color: #a7f3d0;
  line-height: 1.55;
}

.monitor-body p + p {
  margin-top: 0.5rem;
}

.monitor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

/* ==========================================================================
   ZONE B: SALVAGED OPTICS & HARDWARE BENCH TRAY
   ========================================================================== */
.salvaged-bench-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(335px, 1fr));
  gap: 1.1rem;
  margin-bottom: 2.2rem;
}

.bench-cutout-card {
  background: rgba(14, 24, 20, 0.88);
  border: 1.5px dashed rgba(167, 243, 208, 0.35);
  border-radius: 8px;
  padding: 0.95rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.7rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.bench-cutout-card:hover {
  border-color: var(--enig-gold);
  background: rgba(18, 32, 26, 0.95);
}

.cutout-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--enig-gold);
}

.cutout-media {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  aspect-ratio: 16 / 10;
  background: #070a09;
}

.cutout-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Interactive CCTV Swirly Bokeh Preview Overlay */
.bokeh-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 6px;
  box-shadow: inset 0 0 38px rgba(0, 0, 0, 0.78);
  transition: backdrop-filter 0.15s ease, box-shadow 0.15s ease;
}

.cutout-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.cutout-desc {
  font-size: 0.8rem;
  color: var(--text-Mid);
  line-height: 1.45;
}

.interactive-widget-bar {
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(230, 184, 76, 0.28);
  border-radius: 5px;
  padding: 0.45rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.67rem;
}

/* Interactive HDD Platter Turntable Widget */
.hdd-turntable-stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem;
  background: radial-gradient(circle at 35% 50%, #1e252d, #0c1014);
  height: 100%;
}

.hdd-platter {
  width: 126px;
  height: 126px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #e6b84c 0%, #e6b84c 10%, #1c1f24 12%, #111317 32%, #20242b 34%, #0f1115 65%, #2b3038 67%, #12151a 100%);
  border: 2px solid #64748b;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.75);
  position: relative;
  cursor: grab;
  flex-shrink: 0;
  transition: transform 0.08s linear;
}

.hdd-platter::after {
  content: '45 RPM // 7"';
  position: absolute;
  top: 22%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.46rem;
  color: var(--enig-gold);
  letter-spacing: 0.08em;
}

.hdd-paper-cone {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-Mid);
}

/* Drawdio Graphite Strip */
.graphite-pad {
  height: 26px;
  border-radius: 4px;
  background: repeating-linear-gradient(
    45deg,
    #27272a 0px,
    #27272a 4px,
    #3f3f46 4px,
    #3f3f46 8px
  );
  border: 1px solid #71717a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  color: #e4e4e7;
  cursor: ew-resize;
  user-select: none;
  margin-top: 4px;
}

.graphite-pad:hover {
  border-color: var(--enig-gold);
  color: var(--enig-gold-bright);
}

/* ==========================================================================
   ZONE C: IPAD PATCH NOTEBOOK RING-BINDER & DIY STRIPBOARD SCHEMATICS
   ========================================================================== */
.notebook-binder {
  background: linear-gradient(90deg, #1b2228 0%, #141a1f 48%, #2a323b 50%, #151b20 52%, #192026 100%);
  border: 2px solid #3c4652;
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: var(--shadow-skiff);
  display: grid;
  grid-template-columns: 1.25fr 28px 1fr;
  gap: 1rem;
  align-items: stretch;
}

.binder-rings {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  padding: 1.5rem 0;
}

.binder-ring {
  width: 26px;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(180deg, #cbd5e1 0%, #64748b 50%, #334155 100%);
  border: 1px solid #0f172a;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

.binder-sheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.patch-sheet-card {
  background: #f8f5ec;
  color: #1c1917;
  border: 1px solid #d6d0c4;
  border-left: 4px solid #d97706;
  border-radius: 5px;
  padding: 0.55rem 0.7rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.35rem;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.12s ease;
}

.patch-sheet-card:hover {
  transform: translateY(-2px);
}

.patch-sheet-card__head {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: #78716c;
  font-weight: 600;
}

.patch-sheet-card__title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
}

.patch-sheet-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.sheet-btn {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  background: #e7e2d5;
  color: #1c1917;
  border: 1px solid #c7bfb0;
}

.sheet-btn:hover {
  background: #d97706;
  color: #fff;
  border-color: #b45309;
}

.sheet-btn--preset {
  background: #1e293b;
  color: var(--enig-gold-bright);
  border-color: #0f172a;
}

/* ==========================================================================
   7. NATIVE <DIALOG> SLIDE-OVER BLUEPRINT / DOSSIER & BOM DRAWER
   ========================================================================== */
.blueprint-dialog {
  margin: 0 0 0 auto;
  height: 100dvh;
  max-height: 100dvh;
  width: min(680px, 94vw);
  background: #0d1613;
  color: var(--text-light);
  border: none;
  border-left: 2px solid var(--enig-gold);
  padding: 0;
  box-shadow: -16px 0 48px rgba(0, 0, 0, 0.8);
}

.blueprint-dialog::backdrop {
  background: rgba(4, 10, 8, 0.72);
  backdrop-filter: blur(4px);
}

.blueprint-dialog__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blueprint-dialog__header {
  padding: 1.1rem 1.35rem;
  background: #12211b;
  border-bottom: 1px solid rgba(230, 184, 76, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.blueprint-dialog__body {
  padding: 1.35rem;
  overflow-y: auto;
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.6;
}

.blueprint-dialog__body p + p {
  margin-top: 0.75rem;
}

.blueprint-dialog__body ul {
  margin: 0.75rem 0 0.75rem 1.25rem;
  display: grid;
  gap: 0.4rem;
}

.blueprint-dialog__footer {
  padding: 0.85rem 1.35rem;
  background: #09110e;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ==========================================================================
   8. FOOTER & RESPONSIVE BREAKPOINTS
   ========================================================================== */
.bench-footer {
  max-width: 1560px;
  margin: 2rem auto 0;
  padding: 1.25rem;
  border-top: 1px solid var(--mat-grid-major);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--mat-ink-bright);
}

@media (max-width: 1280px) {
  .modules-rack {
    grid-template-columns: repeat(3, 1fr);
  }
  .rom-bench-grid {
    grid-template-columns: 1fr;
  }
  .notebook-binder {
    grid-template-columns: 1fr;
  }
  .binder-rings {
    flex-direction: row;
    padding: 0.25rem 0;
  }
}

@media (max-width: 780px) {
  .modules-rack {
    grid-template-columns: 1fr;
  }
  .wine-crate-skiff {
    grid-template-columns: 16px 1fr 16px;
  }
  .crate-brand-stamp {
    display: none;
  }
}
