/* =============================================================================
   viralWright Studio OS v8.0 — Phase 1: Physical Cinema Console Hardware Layer
   Non-destructive modular hardware stylesheet layered cleanly over studio.css.
   Brushed Titanium, Anodized Gunmetal, 35mm Kodak Filmstrip LUTs, SSL Rack,
   NLE Filmstrip Timeline & Rotary Jog Wheel, Live WYSIWYG iPhone Monitor,
   24-Segment Stereo LED VU Meter, Optical Before/After Wipe & 3D Keycaps.
   ============================================================================= */

:root {
  --v8-gunmetal: linear-gradient(180deg, #1b2233 0%, #101522 52%, #0a0d16 100%);
  --v8-aluminum: linear-gradient(135deg, #d4d8e2 0%, #8b93a6 28%, #eef1f7 52%, #6d7588 78%, #b8bfce 100%);
  --v8-recess: linear-gradient(180deg, #03050a 0%, #070b14 100%);
  --v8-bolt-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Ccircle cx='6' cy='6' r='5' fill='%231e2638' stroke='%2364748b' stroke-width='0.9'/%3E%3Cpath d='M3.8 4.8L6 3.5L8.2 4.8V7.2L6 8.5L3.8 7.2Z' fill='%23090d16'/%3E%3C/svg%3E");
}

/* Shared Brushed Hardware Faceplate Chrome */
.v8-hardware-deck {
  position: relative;
  border-radius: 14px;
  padding: 0.78rem 0.85rem;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0px, rgba(255, 255, 255, 0.012) 1px, transparent 1px, transparent 3px),
    var(--v8-gunmetal);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -2px 0 rgba(0, 0, 0, 0.65),
    0 14px 34px rgba(0, 0, 0, 0.65);
  max-width: 100%;
  box-sizing: border-box;
}

.v8-hardware-deck::before,
.v8-hardware-deck::after {
  content: '';
  position: absolute;
  top: 7px;
  width: 9px;
  height: 9px;
  background-image: var(--v8-bolt-svg);
  background-size: contain;
  opacity: 0.75;
  pointer-events: none;
}
.v8-hardware-deck::before { left: 7px; }
.v8-hardware-deck::after { right: 7px; }

.v8-deck-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding: 0 0.9rem 0.5rem;
  margin-bottom: 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.v8-silk-label {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Realistic Glowing Hardware LEDs */
.v8-led {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #334155;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.9);
  transition: all 0.2s ease;
}

.v8-led.cyan {
  background: radial-gradient(circle at 35% 35%, #cffafe 0%, #22d3ee 55%, #0284c7 100%);
  box-shadow: 0 0 8px #22d3ee, 0 0 16px rgba(34, 211, 238, 0.55);
}

.v8-led.red {
  background: radial-gradient(circle at 35% 35%, #fecaca 0%, #ef4444 55%, #b91c1c 100%);
  box-shadow: 0 0 9px #ef4444, 0 0 18px rgba(239, 68, 68, 0.65);
  animation: v8TallyPulse 1.6s ease-in-out infinite;
}

.v8-led.amber {
  background: radial-gradient(circle at 35% 35%, #fef08a 0%, #f59e0b 55%, #b45309 100%);
  box-shadow: 0 0 8px #f59e0b, 0 0 16px rgba(245, 158, 11, 0.55);
}

.v8-led.green {
  background: radial-gradient(circle at 35% 35%, #d1fae5 0%, #10b981 55%, #047857 100%);
  box-shadow: 0 0 8px #10b981, 0 0 16px rgba(16, 185, 129, 0.55);
}

@keyframes v8TallyPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.62; transform: scale(0.92); }
}

/* =============================================================================
   1. LANDING OPTICAL BEFORE/AFTER WIPE MONITOR, TALLY LAMP & ALUMINUM CRADLE
   ============================================================================= */
.v8-tally-badge-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.v8-iphone-cradle {
  width: 196px;
  height: 15px;
  margin: -3px auto 6px;
  border-radius: 4px 4px 14px 14px;
  background: linear-gradient(180deg, #4b5568 0%, #1e2433 48%, #0b0f18 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-top-color: rgba(34, 211, 238, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 10px 26px rgba(0, 0, 0, 0.9),
    0 2px 16px rgba(34, 211, 238, 0.22);
  position: relative;
}

.v8-iphone-cradle::after {
  content: 'TITANIUM DOCK';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: rgba(203, 213, 225, 0.72);
}

.v8-compare-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  border-radius: inherit;
  overflow: hidden;
  --v8-split: 36%;
}

.v8-compare-layer[hidden] {
  display: none !important;
}

.v8-compare-raw {
  position: absolute;
  inset: 0;
  background: #03050a;
  clip-path: inset(0 calc(100% - var(--v8-split, 36%)) 0 0);
  display: flex;
  align-items: center;
  justify-content: center;
}

.v8-compare-raw-inner {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  background: #000;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.v8-compare-raw-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.75) brightness(0.84) contrast(0.95);
  display: block;
}

.v8-compare-tag-left,
.v8-compare-tag-right {
  position: absolute;
  bottom: 16px;
  font-family: var(--mono);
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 5px;
  pointer-events: none;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.v8-compare-tag-left {
  left: 8px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(248, 113, 113, 0.55);
  color: #fca5a5;
}

.v8-compare-tag-right {
  right: 8px;
  background: rgba(6, 78, 99, 0.86);
  border: 1px solid rgba(34, 211, 238, 0.65);
  color: #cffafe;
}

.v8-compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--v8-split, 36%);
  width: 2px;
  transform: translateX(-1px);
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.2), #22d3ee 30%, #a855f7 70%, rgba(168, 85, 247, 0.2));
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.85);
  z-index: 7;
  pointer-events: none;
}

.v8-compare-handle {
  position: absolute;
  top: 50%;
  left: var(--v8-split, 36%);
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--v8-aluminum);
  border: 2px solid #22d3ee;
  color: #020617;
  font-size: 0.72rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.85), 0 0 14px rgba(34, 211, 238, 0.65);
  cursor: ew-resize;
  pointer-events: auto;
  touch-action: none;
  z-index: 8;
  user-select: none;
}

.v8-compare-toggle-btn {
  width: 100%;
  max-width: 280px;
  margin: 0.15rem auto 0;
  padding: 0.34rem 0.6rem;
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(16, 22, 38, 0.94) 0%, rgba(7, 10, 19, 0.96) 100%);
  border: 1px solid rgba(34, 211, 238, 0.38);
  color: #e0f2fe;
  font-family: var(--mono);
  font-size: 0.67rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.16s ease;
}

.v8-compare-toggle-btn.active {
  border-color: #22d3ee;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.24), rgba(168, 85, 247, 0.22));
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* =============================================================================
   2. NLE FILMSTRIP TIMELINE & MILLED ALUMINUM JOG WHEEL (STEP 2)
   ============================================================================= */
.v8-timeline-deck {
  margin: 0.75rem 0 0.95rem;
}

.v8-oled-tc {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #22d3ee;
  background: #020409;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 7px;
  padding: 0.22rem 0.55rem;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.92), 0 0 10px rgba(34, 211, 238, 0.14);
}

.v8-timeline-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 154px;
  gap: 0.85rem;
  align-items: center;
}

.v8-strip-stage {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  min-width: 0;
}

.v8-filmstrip-track {
  position: relative;
  height: 62px;
  border-radius: 10px;
  background: #03060c;
  border: 1px solid rgba(255, 255, 255, 0.13);
  overflow: hidden;
  cursor: pointer;
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.95);
  user-select: none;
}

.v8-filmstrip-frames {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  opacity: 0.62;
  pointer-events: none;
}

.v8-filmstrip-frames img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-right: 1px solid rgba(0, 0, 0, 0.65);
}

.v8-waveform-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2px;
  padding: 0 5px;
  pointer-events: none;
  opacity: 0.72;
}

.v8-waveform-bar {
  flex: 1;
  background: linear-gradient(180deg, #38bdf8, #818cf8);
  border-radius: 2px 2px 0 0;
  min-height: 3px;
}

.v8-clip-window {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 12%;
  width: 30%;
  min-width: 24px;
  border-radius: 7px;
  border: 2px solid #22d3ee;
  background: rgba(34, 211, 238, 0.16);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.42), inset 0 0 12px rgba(34, 211, 238, 0.16);
  cursor: grab;
  touch-action: none;
}

.v8-clip-window:active { cursor: grabbing; }

.v8-trim-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12px;
  cursor: ew-resize;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
}
.v8-trim-handle.left { left: -1px; }
.v8-trim-handle.right { right: -1px; }
.v8-trim-handle::after {
  content: '';
  width: 4px;
  height: 24px;
  border-radius: 99px;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(34, 211, 238, 0.8);
  transition: transform 0.12s ease, background 0.12s ease;
}
.v8-trim-handle:hover::after {
  background: #facc15;
  transform: scaleX(1.3);
}

.v8-clip-window-tag {
  position: absolute;
  top: 4px;
  left: 13px;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 800;
  color: #ecfeff;
  background: rgba(2, 6, 23, 0.9);
  border: 1px solid rgba(34, 211, 238, 0.35);
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
}

.v8-peak-pins {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.v8-peak-pin {
  background: rgba(168, 85, 247, 0.16);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #e9d5ff;
  font-family: var(--mono);
  font-size: 0.63rem;
  font-weight: 700;
  padding: 0.18rem 0.48rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.v8-peak-pin:hover {
  background: rgba(34, 211, 238, 0.2);
  border-color: #22d3ee;
  color: #ffffff;
}

/* Milled Aluminum Jog Wheel */
.v8-jog-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.42rem;
  padding: 0.5rem 0.45rem;
  border-radius: 12px;
  background: var(--v8-recess);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.v8-jog-dial {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, #9ca3af 0deg, #374151 60deg, #e5e7eb 120deg, #4b5563 190deg, #d1d5db 270deg, #1f2937 330deg, #9ca3af 360deg);
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.9),
    0 0 0 3px #090d16,
    inset 0 2px 4px rgba(255, 255, 255, 0.45);
  position: relative;
  cursor: ew-resize;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.v8-jog-inner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #475569 0%, #1e293b 52%, #0f172a 100%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  position: relative;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.85);
}

.v8-jog-dimple {
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #22d3ee, #0369a1);
  box-shadow: 0 0 6px #22d3ee, inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

.v8-transport-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.24rem;
  width: 100%;
}

.v8-transport-btn {
  background: linear-gradient(180deg, #1e2638 0%, #0f1422 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.24rem 0;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 2px 4px rgba(0, 0, 0, 0.5);
}

.v8-transport-btn:hover {
  border-color: #22d3ee;
  color: #22d3ee;
}

/* =============================================================================
   3. 35MM PERFORATED KODAK CINEMA FILMSTRIP LUT PICKER
   ============================================================================= */
.v8-lut-wrap {
  margin-bottom: 0.5rem;
}

.v8-lut-strip {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 13px 0.5rem 13px;
  border-radius: 10px;
  background-color: #06070b;
  background-image:
    repeating-linear-gradient(90deg, transparent 0px, transparent 6px, rgba(226, 232, 240, 0.26) 6px, rgba(226, 232, 240, 0.26) 13px, transparent 13px, transparent 19px),
    repeating-linear-gradient(90deg, transparent 0px, transparent 6px, rgba(226, 232, 240, 0.26) 6px, rgba(226, 232, 240, 0.26) 13px, transparent 13px, transparent 19px);
  background-size: 100% 6px, 100% 6px;
  background-position: 0 3px, 0 calc(100% - 3px);
  background-repeat: no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 3px 12px rgba(0, 0, 0, 0.95);
  scrollbar-width: thin;
  max-width: 100%;
}

.v8-film-frame {
  flex: 0 0 82px;
  border-radius: 6px;
  background: #0d111a;
  border: 1.5px solid rgba(148, 163, 184, 0.25);
  padding: 3px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  text-align: center;
}

.v8-film-frame:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 211, 238, 0.55);
}

.v8-film-frame.active {
  border-color: #22d3ee;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.48), inset 0 0 8px rgba(34, 211, 238, 0.2);
}

.v8-film-thumb {
  width: 100%;
  height: 44px;
  border-radius: 4px;
  overflow: hidden;
  background: #02040a;
  position: relative;
}

.v8-film-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.v8-film-name {
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 800;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v8-film-frame.active .v8-film-name {
  color: #22d3ee;
}

/* Real Cinema LUT Filters (used on 35mm frames + Live iPhone Monitor) */
.v8-lut-none { filter: none; }
.v8-lut-golden_hour { filter: sepia(0.28) saturate(1.42) brightness(1.04) contrast(1.06) hue-rotate(-8deg); }
.v8-lut-teal_orange { filter: contrast(1.16) saturate(1.28) hue-rotate(-6deg); }
.v8-lut-vibrant_tropical { filter: saturate(1.55) contrast(1.12) brightness(1.05); }
.v8-lut-moody_film { filter: contrast(1.24) saturate(0.76) brightness(0.92); }
.v8-lut-cyber_neon { filter: saturate(1.5) contrast(1.2) hue-rotate(18deg); }
.v8-lut-crisp_sharpen { filter: contrast(1.14) saturate(1.12) brightness(1.03); }
.v8-lut-bw_dramatic { filter: grayscale(1) contrast(1.36) brightness(0.96); }
.v8-lut-night_boost { filter: brightness(1.22) contrast(1.14) saturate(1.15); }

/* =============================================================================
   4. SSL BRUSHED-STEEL AUDIO MASTERING RACK
   ============================================================================= */
.v8-audio-rack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.36rem;
  margin-bottom: 0.45rem;
  padding: 0.45rem;
  border-radius: 11px;
  background: var(--v8-recess);
  border: 1px solid rgba(255, 255, 255, 0.11);
}

.v8-rack-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.22rem;
  padding: 0.4rem 0.48rem;
  border-radius: 8px;
  background: linear-gradient(180deg, #1b2234 0%, #0d111b 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  cursor: pointer;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 3px 6px rgba(0, 0, 0, 0.55);
  transition: all 0.15s ease;
  min-width: 0;
}

.v8-rack-btn:hover {
  border-color: rgba(34, 211, 238, 0.45);
}

.v8-rack-btn.active {
  border-color: #22d3ee;
  background: linear-gradient(180deg, rgba(14, 116, 144, 0.36) 0%, rgba(15, 23, 42, 0.96) 100%);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 0 12px rgba(34, 211, 238, 0.28);
}

.v8-rack-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.25rem;
}

.v8-rack-title {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* =============================================================================
   5. LIVE WYSIWYG 9:16 TITANIUM IPHONE MONITOR + SOCIAL CHROME + 24-LED VU METER
   ============================================================================= */
#clip-empty.v8-has-live-monitor {
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  text-align: left !important;
}

.v8-live-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  max-width: 296px;
  margin: 0 auto 0.45rem;
}

.v8-live-pill {
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #34d399;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.v8-preview-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  background: #020409;
  overflow: hidden;
  user-select: none;
}

.v8-pv-bg-blur {
  position: absolute;
  inset: -12px;
  background-size: cover;
  background-position: center;
  filter: blur(18px) brightness(0.55) saturate(1.2);
  transform: scale(1.1);
}

.v8-pv-video-box {
  position: relative;
  overflow: hidden;
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.v8-pv-video-box img,
.v8-pv-video-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}
.v8-pv-video-box [hidden] {
  display: none !important;
}

/* 8 Live Compositor Layout States inside Titanium iPhone */
.v8-preview-canvas[data-layout="blur_stack"] .v8-pv-video-box {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  aspect-ratio: 16 / 9;
}

.v8-preview-canvas[data-layout="cinema_zoom"] .v8-pv-video-box {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 58%;
}

.v8-preview-canvas[data-layout="center_crop"] .v8-pv-video-box,
.v8-preview-canvas[data-layout="pip_reactor"] .v8-pv-video-box,
.v8-preview-canvas[data-layout="hyperframe_only"] .v8-pv-video-box {
  position: absolute;
  inset: 0;
}

.v8-preview-canvas[data-layout="split_screen"] .v8-pv-video-box {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 50%;
  border-bottom: 2px solid #22d3ee;
}

.v8-pv-split-bottom {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 50%;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 45%, #0f172a 100%);
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 800;
  color: #c4b5fd;
  letter-spacing: 0.05em;
}
.v8-preview-canvas[data-layout="split_screen"] .v8-pv-split-bottom { display: flex; }

.v8-pv-pip-box {
  display: none;
  position: absolute;
  top: 52px;
  right: 10px;
  width: 78px;
  height: 104px;
  border-radius: 10px;
  border: 2px solid #22d3ee;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.3), rgba(168, 85, 247, 0.35));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.75);
  z-index: 3;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.52rem;
  font-weight: 800;
  color: #ffffff;
  text-align: center;
}
.v8-preview-canvas[data-layout="pip_reactor"] .v8-pv-pip-box { display: flex; }

.v8-preview-canvas[data-layout="floating_card"] .v8-pv-video-box,
.v8-preview-canvas[data-layout="hyperframe_deck"] .v8-pv-video-box {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 96px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  border: 1.5px solid rgba(34, 211, 238, 0.75);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.85), 0 0 22px rgba(34, 211, 238, 0.32);
}

.v8-preview-canvas[data-layout="hyperframe_only"] .v8-pv-video-box::after {
  content: '';
  position: absolute;
  inset: 38px 8px 54px;
  border-radius: 14px;
  border: 1.5px solid rgba(34, 211, 238, 0.75);
  box-shadow: inset 0 0 22px rgba(168, 85, 247, 0.3);
  pointer-events: none;
}

.v8-pv-top-hook {
  position: absolute;
  top: 42px;
  left: 12px;
  right: 12px;
  z-index: 4;
  text-align: center;
  font-weight: 900;
  font-size: 0.72rem;
  line-height: 1.18;
  text-transform: uppercase;
  padding: 0.28rem 0.45rem;
  border-radius: 6px;
  background: rgba(2, 6, 23, 0.86);
  border: 1px solid rgba(250, 204, 21, 0.55);
  color: #fde047;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
  word-break: break-word;
}

.v8-pv-badges {
  position: absolute;
  top: 82px;
  left: 12px;
  right: 12px;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  gap: 0.25rem;
  pointer-events: none;
}

.v8-pv-pill {
  font-family: var(--mono);
  font-size: 0.52rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid rgba(34, 211, 238, 0.55);
  color: #e0f2fe;
}

.v8-pv-captions {
  position: absolute;
  left: 14px;
  right: 54px;
  bottom: 84px;
  z-index: 4;
  text-align: center;
  font-weight: 900;
  font-size: 0.76rem;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
}
.v8-pv-captions mark {
  background: #facc15;
  color: #020617;
  padding: 1px 5px;
  border-radius: 4px;
}

.v8-pv-bottom-banner {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 24px;
  z-index: 4;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  padding: 0.24rem 0.5rem;
  border-radius: 6px;
  background: linear-gradient(90deg, #06b6d4, #3b82f6);
  color: #020617;
  box-shadow: 0 4px 14px rgba(34, 211, 238, 0.45);
}

/* Social App UI Chrome Overlay (TikTok / Reels / Shorts) */
.v8-social-chrome {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.v8-social-rail {
  position: absolute;
  right: 7px;
  bottom: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.48rem;
  color: #ffffff;
  font-size: 0.56rem;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.v8-social-ico {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
}

.v8-social-meta {
  position: absolute;
  left: 10px;
  right: 46px;
  bottom: 52px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.58rem;
  line-height: 1.25;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
}

.v8-pv-transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  max-width: 286px;
  margin: 0.45rem auto 0;
}
.v8-pv-transport[hidden] {
  display: none !important;
}
.v8-pv-ctl-btn {
  flex: 1 1 0;
  background: rgba(3, 6, 13, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #cbd5e1;
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 800;
  padding: 0.34rem 0.45rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.v8-pv-ctl-btn:hover {
  border-color: rgba(34, 211, 238, 0.55);
  color: #ffffff;
}
.v8-pv-ctl-btn.active {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(168, 85, 247, 0.2));
  border-color: rgba(34, 211, 238, 0.55);
  color: #67e8f9;
}

.v8-chrome-switcher {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.28rem;
  max-width: 286px;
  margin: 0.35rem auto 0;
  padding: 0.24rem;
  border-radius: 10px;
  background: rgba(3, 6, 13, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.v8-chrome-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #94a3b8;
  font-family: var(--mono);
  font-size: 0.61rem;
  font-weight: 800;
  padding: 0.26rem 0.2rem;
  cursor: pointer;
}

.v8-chrome-btn.active {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(168, 85, 247, 0.2));
  border-color: rgba(34, 211, 238, 0.52);
  color: #ffffff;
}

/* 24-Segment Stereo LED Audio VU Meter */
.v8-vu-rack {
  margin: 0.65rem auto 0;
  max-width: 310px;
  padding: 0.58rem 0.68rem 0.52rem;
}

.v8-vu-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  gap: 0.42rem;
  margin-bottom: 0.28rem;
}

.v8-vu-ch {
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 800;
  color: #94a3b8;
}

.v8-vu-bar {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 2px;
  padding: 3px 4px;
  border-radius: 5px;
  background: #020307;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.95);
}

.v8-vu-seg {
  height: 8px;
  border-radius: 1.5px;
  background: #172030;
  transition: background 0.06s ease, box-shadow 0.06s ease;
}

.v8-vu-seg.green.lit {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.85);
}
.v8-vu-seg.amber.lit {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.85);
}
.v8-vu-seg.red.lit {
  background: #ef4444;
  box-shadow: 0 0 7px rgba(239, 68, 68, 0.9);
}

.v8-vu-scale {
  display: flex;
  justify-content: space-between;
  padding-left: 18px;
  font-family: var(--mono);
  font-size: 0.52rem;
  font-weight: 700;
  color: #64748b;
}

/* =============================================================================
   6. OLED LAYOUT REFLECTION + SAPPHIRE FORGE BEZEL + 3D PLATFORM KEYCAPS
   ============================================================================= */
.layout-card::before {
  background-blend-mode: normal;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 0 10px rgba(0, 0, 0, 0.9), 0 4px 12px rgba(0, 0, 0, 0.65) !important;
}

.v8-forge-housing {
  position: relative;
  border-radius: 16px;
  padding: 0.55rem 0.58rem 0.62rem;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.012) 0px, rgba(255, 255, 255, 0.012) 1px, transparent 1px, transparent 3px),
    var(--v8-gunmetal);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 16px 38px rgba(0, 0, 0, 0.72);
  margin-bottom: 0.6rem;
}

.v8-forge-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0 0.25rem 0.45rem;
}

/* Light-Pipe Glass Progress Track */
.progress-track {
  background: #02040a !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.95) !important;
}

.progress-fill {
  background: linear-gradient(90deg, #06b6d4 0%, #22d3ee 45%, #818cf8 78%, #f59e0b 100%) !important;
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.65) !important;
}

/* 3D Sculpted Mechanical Platform Keycaps */
#platform-tabs .plat-btn {
  border-radius: 10px !important;
  background: linear-gradient(180deg, #1b2234 0%, #0e1320 75%, #090d16 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 3px 0 #05070c,
    0 6px 12px rgba(0, 0, 0, 0.6) !important;
  transition: transform 0.1s ease, box-shadow 0.15s ease, border-color 0.15s ease !important;
}

#platform-tabs .plat-btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 1px 0 #05070c !important;
}

#platform-tabs .plat-btn[data-plat="tiktok"].active { border-color: #22d3ee !important; box-shadow: 0 0 16px rgba(34, 211, 238, 0.35), inset 0 -2px 0 #f43f5e !important; }
#platform-tabs .plat-btn[data-plat="instagram"].active { border-color: #f472b6 !important; box-shadow: 0 0 16px rgba(244, 114, 182, 0.35), inset 0 -2px 0 #f59e0b !important; }
#platform-tabs .plat-btn[data-plat="youtube"].active { border-color: #ef4444 !important; box-shadow: 0 0 16px rgba(239, 68, 68, 0.35), inset 0 -2px 0 #ef4444 !important; }
#platform-tabs .plat-btn[data-plat="x"].active { border-color: #e2e8f0 !important; box-shadow: 0 0 14px rgba(226, 232, 240, 0.3), inset 0 -2px 0 #e2e8f0 !important; }
#platform-tabs .plat-btn[data-plat="kick"].active { border-color: #4ade80 !important; box-shadow: 0 0 16px rgba(74, 222, 128, 0.35), inset 0 -2px 0 #4ade80 !important; }
#platform-tabs .plat-btn[data-plat="facebook"].active { border-color: #60a5fa !important; box-shadow: 0 0 16px rgba(96, 165, 250, 0.35), inset 0 -2px 0 #3b82f6 !important; }
#platform-tabs .plat-btn[data-plat="threads"].active { border-color: #c084fc !important; box-shadow: 0 0 16px rgba(192, 132, 252, 0.35), inset 0 -2px 0 #a855f7 !important; }
#platform-tabs .plat-btn[data-plat="snapchat"].active { border-color: #facc15 !important; box-shadow: 0 0 16px rgba(250, 204, 21, 0.35), inset 0 -2px 0 #facc15 !important; }
#platform-tabs .plat-btn[data-plat="pinterest"].active { border-color: #fb7185 !important; box-shadow: 0 0 16px rgba(251, 113, 133, 0.35), inset 0 -2px 0 #e11d48 !important; }
#platform-tabs .plat-btn[data-plat="linkedin"].active { border-color: #38bdf8 !important; box-shadow: 0 0 16px rgba(56, 189, 248, 0.35), inset 0 -2px 0 #0284c7 !important; }

/* =============================================================================
   MOBILE (375x812 & 390x844) ZERO OVERFLOW HARDWARE ADAPTATION
   ============================================================================= */
@media (max-width: 768px) {
  .v8-timeline-grid {
    grid-template-columns: 1fr !important;
  }

  .v8-jog-wrap {
    flex-direction: row !important;
    justify-content: space-between !important;
    padding: 0.45rem 0.6rem !important;
  }

  .v8-jog-dial {
    width: 58px !important;
    height: 58px !important;
    flex-shrink: 0;
  }

  .v8-jog-inner {
    width: 42px !important;
    height: 42px !important;
  }

  .v8-transport-row {
    flex: 1;
    min-width: 0;
  }

  .v8-audio-rack {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .v8-iphone-cradle {
    width: 170px !important;
  }

  .v8-forge-housing {
    padding: 0.45rem !important;
  }

  .v8-plan-strip {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
}

/* =============================================================================
   ACTIVE PLAN STRIP & FLEXIBLE (>90s-300s) CUSTOM DURATION BAR
   ============================================================================= */
.v8-plan-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(15, 22, 36, 0.92), rgba(9, 13, 24, 0.96));
  border: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 20px rgba(0, 0, 0, 0.35);
}

.v8-plan-strip-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  min-width: 0;
}

.v8-plan-strip-meta {
  font-size: 0.74rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.v8-custom-dur-wrap {
  margin-top: 0.45rem;
  padding: 0.5rem 0.6rem;
  border-radius: 9px;
  background: rgba(9, 14, 26, 0.92);
  border: 1px solid rgba(34, 211, 238, 0.28);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.v8-custom-dur-wrap[hidden] {
  display: none !important;
}

.v8-custom-dur-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.v8-custom-dur-row .form-input {
  width: 96px;
  padding: 0.3rem 0.5rem !important;
  font-size: 0.8rem !important;
  font-family: var(--mono);
}

.v8-dur-credit-hint {
  font-size: 0.68rem;
  color: #94a3b8;
  line-height: 1.35;
}
