/* ==========================================================================
   VEP (Virtual Electronic Poem) - Fullscreen Design System
   CIRMA - Università degli Studi di Torino
   Unified Modern Futura Aesthetic: Seamless Canvas, Multilevel Sidebar, Prominent Actions
   ========================================================================== */

/* 1. Self-hosted Futura Geometric WebFont (Jost - authentic digital revival of Paul Renner's 1927 Futura) */
/* Guarantees 100% identical Futura typography on iPhone, iPad, Android, macOS, and Windows */
@font-face {
  font-family: 'FuturaCustom';
  src: local('Futura'), local('Futura-Medium'), url('../fonts/jost-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'FuturaCustom';
  src: local('Futura-Medium'), url('../fonts/jost-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'FuturaCustom';
  src: local('Futura-Bold'), url('../fonts/jost-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'FuturaCustom';
  src: local('Futura-Italic'), url('../fonts/jost-italic-400.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'FuturaWeb';
  src: local('Futura'), local('Futura-Medium'), url('../fonts/jost-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'FuturaWeb';
  src: local('Futura-Bold'), url('../fonts/jost-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: #000000;
  color: #ffffff;
  font-family: 'FuturaCustom', 'FuturaWeb', 'Futura', 'Futura-Medium', 'Century Gothic', 'Tw Cen MT', AppleGothic, sans-serif;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

/* ==========================================================================
   Fullscreen App Layout
   ========================================================================== */
.vep-app {
  display: flex;
  width: 100vw;
  height: 100vh;
  background-color: #000000;
  overflow: hidden;
}

/* Main Content Area (Viewport + Fascia + Bottom Strip) */
.vep-content-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: #000000;
  overflow: hidden;
}

/* Viewport Area - Unified Modern Exhibition Canvas */
.vep-stage-viewport {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-color: #121212;
}

/* Unified background classes: museum exhibition canvas */
.bg-pavilioncg,
.bg-chronicle,
.bg-installation,
.bg-poeme,
.bg-poemer,
.bg-hwsw,
.bg-spatialization,
.bg-dark,
.bg-vfx,
.bg-gallery,
.bg-table {
  background: #121212 !important;
}

/* Fascia Area (fascia.png with transparency overlay) */
.vep-stage-fascia {
  flex-shrink: 0;
  height: 105px;
  min-height: 105px;
  max-height: 105px;
  box-sizing: border-box;
  background: url('../immagini/fascia.png') repeat rgba(138, 138, 138, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  border-top: 1px solid #3a3a3a;
  z-index: 10;
}

.vep-fascia-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: #111111;
  width: 100%;
  text-align: left;
  height: 80px;
  max-height: 80px;
  overflow-y: auto;
  padding-right: 14px;
}
.vep-fascia-text b, .vep-fascia-text strong {
  color: #000000;
  font-weight: bold;
}
/* Description hyperlinks: high-contrast pure white accent against the grey fascia */
.vep-fascia-text a {
  color: #ffffff !important;
  font-weight: bold;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1.5px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  transition: color 0.15s ease, background-color 0.15s ease, text-decoration 0.15s ease;
  padding: 0 2px;
  border-radius: 2px;
}
.vep-fascia-text a:hover {
  color: #000000 !important;
  background-color: #ffffff;
  text-decoration: none;
  text-shadow: none;
}
.vep-fascia-text::-webkit-scrollbar {
  width: 6px;
}
.vep-fascia-text::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.45);
  border-radius: 3px;
}
.vep-fascia-text::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.7);
}
.vep-fascia-text::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 3px;
}

/* Bottom Strip under fascia to match sidebar home section */
.vep-stage-bottom-strip {
  flex-shrink: 0;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  box-sizing: border-box;
  background-color: #000000;
  border-top: 1px solid #1a1a1a;
}

/* ==========================================================================
   Authentic Vertical Sidebar & Transversal Button
   Modernized standards with comfortable dimensions:
   - Sidebar width: 240px
   - Button width: 190px
   - Button height: 36px (sub: 32px)
   - Transversal slot: 105px with fascia.png transparency overlay
   - Home section: 38px black footer strip with pure white underlined link
   ========================================================================== */
.vep-sidebar {
  width: 240px;
  flex-shrink: 0;
  background-color: #000000;
  border-left: 1px solid #222222;
  display: flex;
  flex-direction: column;
  height: 100vh;
  box-sizing: border-box;
  overflow: hidden;
  z-index: 100;
}

.vep-sidebar-top {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 16px 20px 14px 20px;
  box-sizing: border-box;
}
.vep-sidebar-top::-webkit-scrollbar {
  width: 5px;
}
.vep-sidebar-top::-webkit-scrollbar-thumb {
  background: #333333;
  border-radius: 3px;
}

.vep-sidebar-logo {
  display: block;
  width: 150px;
  height: 110px;
  margin-bottom: 16px;
  border: 0;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.vep-sidebar-logo:hover {
  transform: scale(1.02);
}
.vep-sidebar-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border: 0;
}

.vep-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 190px;
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  width: 190px;
  gap: 4px;
}

/* Primary Section Button (190px x 36px solid rectangular block) */
.sidebar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 190px;
  height: 36px;
  background-color: #8c8c8c;
  color: #ffffff !important;
  font-family: 'FuturaCustom', Futura, "Century Gothic", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-decoration: none !important;
  border-radius: 0;
  box-sizing: border-box;
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.35, 1);
  user-select: none;
}
.sidebar-btn:hover {
  background-color: #9e9e9e;
  color: #ffffff !important;
  transform: translateX(4px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
.sidebar-btn:active {
  transform: translateX(2px) scale(0.98);
}
.sidebar-btn.active {
  background-color: #d4d4d4;
  color: #000000 !important;
  font-weight: bold;
}
.sidebar-btn.active:hover {
  background-color: #dedede;
  color: #000000 !important;
  transform: translateX(2px);
}

/* Sub-buttons under active section (190px x 32px solid darker block) */
.sidebar-sub-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
  width: 190px;
}

.sidebar-sub-btn {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 14px;
  width: 190px;
  height: 32px;
  background-color: #585858;
  color: #ffffff !important;
  font-family: 'FuturaCustom', Futura, "Century Gothic", sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-decoration: none !important;
  border-radius: 0;
  box-sizing: border-box;
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.35, 1);
}
.sidebar-sub-btn:hover {
  background-color: #6e6e6e;
  color: #ffffff !important;
  transform: translateX(4px);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.45);
}
.sidebar-sub-btn:active {
  transform: translateX(2px) scale(0.98);
}
.sidebar-sub-btn.active {
  background-color: #d4d4d4;
  color: #000000 !important;
  font-weight: bold;
}
.sidebar-sub-btn.active:hover {
  background-color: #dedede;
  color: #000000 !important;
  transform: translateX(2px);
}

/* Level 3 Indented Text Links */
.sidebar-sub2-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 0;
  width: 190px;
}

.sidebar-sub2-link {
  display: block;
  font-family: 'FuturaCustom', Futura, sans-serif;
  font-size: 12px;
  color: #cccccc !important;
  text-align: right;
  padding-right: 14px;
  text-decoration: none !important;
  line-height: 1.5;
  transition: color 0.15s ease;
}
.sidebar-sub2-link:hover {
  color: #ffffff !important;
  text-decoration: underline !important;
}
.sidebar-sub2-link.active {
  color: #ffffff !important;
  font-weight: bold;
  text-decoration: underline !important;
}

/* Level 4 Indented Text Links (e.g. inside VFX) */
.sidebar-sub3-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 3px 0 4px 0;
  width: 190px;
}

.sidebar-sub3-link {
  display: block;
  font-family: 'FuturaCustom', Futura, sans-serif;
  font-size: 11.5px;
  color: #aaaaaa !important;
  text-align: right;
  padding-right: 22px;
  text-decoration: none !important;
  line-height: 1.4;
}
.sidebar-sub3-link:hover, .sidebar-sub3-link.active {
  color: #ffffff !important;
  text-decoration: underline !important;
}

/* Lower Meta Links (credits, contact) */
.sidebar-meta-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 190px;
  margin-top: 20px;
  margin-bottom: 12px;
  gap: 6px;
}

.sidebar-text-link {
  display: block;
  color: #ffffff !important;
  font-family: 'FuturaCustom', Futura, sans-serif;
  font-size: 13.5px;
  text-decoration: none !important;
  text-align: right;
  padding-right: 6px;
  transition: color 0.15s ease;
}
.sidebar-text-link:hover {
  color: #d4d4d4 !important;
  text-decoration: underline !important;
}
.sidebar-text-link.active {
  color: #ffffff !important;
  font-weight: bold;
  text-decoration: underline !important;
}

/* Transversal Slot inside Sidebar (continues grey fascia band with transparency) */
.vep-sidebar-transversal-slot {
  flex-shrink: 0;
  height: 105px;
  min-height: 105px;
  max-height: 105px;
  width: 100%;
  box-sizing: border-box;
  background: url('../immagini/fascia.png') repeat rgba(138, 138, 138, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid #3a3a3a;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  z-index: 10;
}

/* Authentic Black Transversal Button (uniform to other sidebar buttons) */
.sidebar-trans-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 190px;
  height: 36px;
  background-color: #0c0c0c;
  color: #ffffff !important;
  font-family: 'FuturaCustom', Futura, "Century Gothic", sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-decoration: none !important;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  border-radius: 0;
  box-sizing: border-box;
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.35, 1);
  user-select: none;
}
.sidebar-trans-btn:hover {
  background-color: #222222;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.75);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
}
.sidebar-trans-btn:active {
  transform: translateY(0) scale(0.98);
}
.sidebar-trans-btn .trans-arrow {
  font-size: 14px;
  line-height: 1;
}

/* Bottom Sidebar Home Section & Link (strictly pure white, zero blue) */
.sidebar-home-section {
  flex-shrink: 0;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  width: 100%;
  box-sizing: border-box;
  background-color: #000000;
  border-top: 1px solid #1a1a1a;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sidebar-home-link {
  display: inline-block;
  color: #ffffff !important;
  font-family: 'FuturaCustom', Futura, "Century Gothic", sans-serif;
  font-size: 13px;
  letter-spacing: 0.3px;
  text-decoration: underline !important;
  text-underline-offset: 2px;
  text-align: center;
  transition: color 0.15s ease;
}
.sidebar-home-link:hover {
  color: #b5b5b5 !important;
}


/* ==========================================================================
   Clickable Central Diagram Component
   ========================================================================== */
.vep-diagram-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 16px;
  box-sizing: border-box;
  overflow: hidden;
}

.vep-diagram-container img {
  display: block;
  width: min(calc(100vw - 280px), calc((100vh - 170px) * 2.054));
  height: auto;
  max-width: 96%;
  max-height: 94%;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8);
  transition: width 0.12s ease, height 0.12s ease;
}

/* Interactive Diagram Hotspots (Reconstruction Canvas) */
.vep-diagram-wrapper {
  position: relative;
  display: inline-block;
  line-height: 0;
  max-width: 100%;
  max-height: 100%;
}

.vep-diagram-wrapper img {
  display: block;
  width: min(calc(100vw - 280px), calc((100vh - 170px) * 2.054));
  height: auto;
  max-width: 96%;
  max-height: 94%;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8);
  transition: width 0.12s ease, height 0.12s ease;
}

.vep-hotspot-btn {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 14, 14, 0.76);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff !important;
  font-family: 'FuturaCustom', 'FuturaWeb', Futura, 'Century Gothic', sans-serif;
  font-size: clamp(11.5px, 1.22vw, 15px);
  font-weight: 500;
  letter-spacing: 0.3px;
  text-decoration: none !important;
  padding: clamp(5px, 0.55vw, 8px) clamp(10px, 1.1vw, 16px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.75);
  transform: translate(-50%, -50%);
  white-space: nowrap;
  user-select: none;
  line-height: 1.2;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.35, 1);
}

.vep-hotspot-btn:hover {
  background: #ffffff !important;
  color: #000000 !important;
  border-color: #ffffff;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.55), 0 8px 24px rgba(0, 0, 0, 0.9);
  transform: translate(-50%, -50%) scale(1.05);
}

.vep-hotspot-btn:active {
  transform: translate(-50%, -50%) scale(0.97);
}

/* Coordinates matching original diagram labels */
.hotspot-poeme {
  left: 70.6%;
  top: 16.9%;
}

.hotspot-pavilion {
  left: 22.8%;
  top: 87.3%;
}

area {
  cursor: pointer;
  outline: none;
}

/* ==========================================================================
   3D CoverFlow Component (Smooth pure CSS3 + JS)
   ========================================================================== */
.cf-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  user-select: none;
  -webkit-user-select: none;
  background-color: transparent;
}

.cf-stage {
  position: relative;
  width: 100%;
  flex: 1;
  perspective: 1200px;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;

  /* Modern prominent CoverFlow dimensions */
  --cf-w: min(560px, 46vw);
  --cf-h: min(390px, 48vh);
  --cf-spacing: 105px;
  --cf-offset: 340px;
}

.cf-stage:active,
.cf-stage.is-dragging {
  cursor: grabbing !important;
}

.cf-stage.is-dragging .cf-slide {
  cursor: grabbing !important;
}

.cf-tray {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.cf-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--cf-w);
  height: var(--cf-h);
  margin-left: calc(var(--cf-w) * -0.5);
  margin-top: calc(var(--cf-h) * -0.58);
  transform-style: preserve-3d;
  transition: transform 0.38s cubic-bezier(0.2, 0.9, 0.35, 1), opacity 0.38s ease;
  cursor: pointer;
  -webkit-box-reflect: below 3px linear-gradient(transparent 70%, rgba(0, 0, 0, 0.38));
  user-select: none;
  -webkit-user-select: none;
}

.cf-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #111111;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.78);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Widescreen / 1080p and higher (>= 1440px) */
@media (min-width: 1440px) {
  .cf-stage {
    --cf-w: min(650px, 50vw);
    --cf-h: min(450px, 52vh);
    --cf-spacing: 120px;
    --cf-offset: 390px;
  }
  .cf-controls {
    max-width: 780px;
  }
}

/* Ultrawide / 4K / Large Screens (>= 1920px) */
@media (min-width: 1920px) {
  .cf-stage {
    --cf-w: min(740px, 54vw);
    --cf-h: min(510px, 56vh);
    --cf-spacing: 135px;
    --cf-offset: 440px;
  }
  .cf-controls {
    max-width: 880px;
  }
}

/* Tablet landscape / medium desktop (860px - 1439px) */
@media (max-width: 1439px) and (min-width: 860px) {
  .cf-stage {
    --cf-w: min(500px, 48vw);
    --cf-h: min(350px, 46vh);
    --cf-spacing: 95px;
    --cf-offset: 300px;
  }
}

/* Tablet portrait (600px - 859px) */
@media (max-width: 859px) and (min-width: 600px) {
  .cf-stage {
    --cf-w: 360px;
    --cf-h: 250px;
    --cf-spacing: 70px;
    --cf-offset: 210px;
  }
}

/* Mobile (< 600px) */
@media (max-width: 599px) {
  .cf-stage {
    --cf-w: 240px;
    --cf-h: 170px;
    --cf-spacing: 45px;
    --cf-offset: 135px;
  }
}

.cf-bottom-bar {
  background: rgba(0, 0, 0, 0.88);
  padding: 6px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border-top: 1px solid #333333;
  z-index: 200;
}

.cf-caption {
  color: #ffffff;
  font-size: 13.5px;
  font-weight: bold;
  text-align: center;
  height: 18px;
  line-height: 18px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90%;
}

.cf-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 650px;
}

.cf-btn {
  background: #222222;
  color: #ffffff;
  border: 1px solid #555555;
  border-radius: 2px;
  padding: 3px 9px;
  font-size: 11px;
  cursor: pointer;
  line-height: 1.2;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.35, 1);
}
.cf-btn:hover {
  background: #383838;
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}
.cf-btn:active {
  transform: translateY(1px) scale(0.95);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.cf-track {
  flex: 1;
  height: 10px;
  background: #333333;
  border-radius: 5px;
  position: relative;
  cursor: pointer;
  border: 1px solid #222222;
  touch-action: none;
}
.cf-knob {
  position: absolute;
  top: -1px;
  height: 10px;
  width: 22px;
  background: #e0e0e0;
  border-radius: 5px;
  cursor: grab;
  transform: translateX(-50%);
  box-shadow: 0 1px 3px rgba(0,0,0,0.5);
  touch-action: none;
}

.cf-counter {
  color: #aaaaaa;
  font-size: 11px;
  min-width: 50px;
  text-align: right;
  font-family: monospace;
}

/* ==========================================================================
   Table & Grid Gallery in Viewport
   ========================================================================== */
.vep-gallery-container {
  width: 100%;
  height: 100%;
  padding: 28px 24px;
  overflow-y: auto;
  box-sizing: border-box;
}

.vep-gallery-container::-webkit-scrollbar {
  width: 8px;
}
.vep-gallery-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}
.vep-gallery-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.45);
}
.vep-gallery-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}

.vep-gallery-table {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: flex-start;
  max-width: 960px;
  margin: 0 auto;
  padding-bottom: 28px;
}

.vep-gallery-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.45);
  padding: 8px;
  border: 1px solid #555555;
  border-radius: 2px;
  transition: transform 0.2s, border-color 0.2s;
}
.vep-gallery-card:hover {
  transform: translateY(-2px);
  border-color: #ffffff;
  text-decoration: none;
}
.vep-gallery-card img {
  max-height: 180px;
  max-width: 240px;
  object-fit: contain;
  display: block;
}
.vep-gallery-card span {
  font-size: 11px;
  color: #ffffff;
  margin-top: 6px;
  text-align: center;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Featured Compact Galleries (1-2 and 3-4 items: centered and prominent)
   When there are few items, they are centered both horizontally and vertically
   and scale up to occupy generous exhibition space.
   ========================================================================== */
.vep-gallery-container.gallery-duo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 24px 32px;
  box-sizing: border-box;
  overflow-y: auto;
}
.vep-gallery-container.gallery-duo .vep-gallery-table {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 36px;
  max-width: 1200px;
  width: 100%;
  margin: auto;
  padding-bottom: 0;
}
.vep-gallery-container.gallery-duo .vep-gallery-card {
  flex: 0 1 auto;
  padding: 14px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid #555555;
  border-radius: 4px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.8);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.vep-gallery-container.gallery-duo .vep-gallery-card:hover {
  transform: translateY(-4px) scale(1.015);
  border-color: #ffffff;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.95);
}
.vep-gallery-container.gallery-duo .vep-gallery-card img {
  max-height: min(60vh, 500px);
  max-width: min(520px, 42vw);
  min-height: 250px;
  object-fit: contain;
  display: block;
  background-color: #111111;
}
.vep-gallery-container.gallery-duo .vep-gallery-card span {
  font-size: 13.5px;
  font-weight: 500;
  color: #ffffff;
  margin-top: 10px;
  max-width: 480px;
  white-space: normal;
  text-align: center;
}

/* 3 items gallery: perfectly centered single row */
.vep-gallery-container.gallery-trio {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 18px 24px;
  box-sizing: border-box;
  overflow: hidden;
}
.vep-gallery-container.gallery-trio .vep-gallery-table {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 24px;
  max-width: 1240px;
  width: 100%;
  margin: auto;
  padding-bottom: 0;
}
.vep-gallery-container.gallery-trio .vep-gallery-card {
  flex: 0 1 320px;
  max-width: 330px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid #555555;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  transition: transform 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.vep-gallery-container.gallery-trio .vep-gallery-card:hover {
  transform: translateY(-3px) scale(1.015);
  border-color: #ffffff;
}
.vep-gallery-container.gallery-trio .vep-gallery-card img {
  max-height: min(48vh, 360px);
  max-width: min(320px, 26vw);
  min-height: 180px;
  object-fit: contain;
  display: block;
  background-color: #111111;
}
.vep-gallery-container.gallery-trio .vep-gallery-card span {
  font-size: 12.5px;
  font-weight: 500;
  color: #ffffff;
  margin-top: 8px;
  max-width: 310px;
  white-space: normal;
  text-align: center;
}

/* 4 items gallery (gallery-quartet): organized and reduced so all 4 fit on screen neatly without vertical overflow */
.vep-gallery-container.gallery-quartet {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 14px 20px;
  box-sizing: border-box;
  overflow: hidden;
}
.vep-gallery-container.gallery-quartet .vep-gallery-table {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 18px;
  max-width: 1260px;
  width: 100%;
  margin: auto;
  padding-bottom: 0;
}
.vep-gallery-container.gallery-quartet .vep-gallery-card {
  flex: 0 1 245px;
  max-width: 255px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid #555555;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.vep-gallery-container.gallery-quartet .vep-gallery-card:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: #ffffff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.9);
}
.vep-gallery-container.gallery-quartet .vep-gallery-card img {
  max-height: min(44vh, 290px);
  max-width: min(235px, 21vw);
  object-fit: contain;
  display: block;
  background-color: #111111;
}
.vep-gallery-container.gallery-quartet .vep-gallery-card span {
  font-size: 12px;
  font-weight: 500;
  color: #ffffff;
  margin-top: 6px;
  max-width: 230px;
  white-space: normal;
  text-align: center;
}

/* Medium screen 2x2 grid for 4 items when width is constrained */
@media (max-width: 1050px) and (min-width: 680px) {
  .vep-gallery-container.gallery-quartet .vep-gallery-table {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 240px));
    gap: 14px;
    justify-content: center;
    align-content: center;
  }
  .vep-gallery-container.gallery-quartet .vep-gallery-card {
    max-width: 240px;
  }
  .vep-gallery-container.gallery-quartet .vep-gallery-card img {
    max-height: min(22vh, 160px);
    max-width: 100%;
  }
}

/* ==========================================================================
   Reconstructed Spatialization Tables (spatializationr.html)
   ========================================================================== */
.spat-tables-container {
  width: 100%;
  height: 100%;
  padding: 24px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: center;
  box-sizing: border-box;
}
.spat-tables-container::-webkit-scrollbar {
  width: 8px;
}
.spat-tables-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}
.spat-tables-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.45);
}
.spat-tables-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.spat-section-box {
  width: 100%;
  max-width: 900px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid #333333;
  border-radius: 4px;
  padding: 16px;
}
.spat-section-header {
  font-family: 'FuturaCustom', Futura, sans-serif;
  font-size: 13.5px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #ffffff;
  text-align: center;
  margin-bottom: 14px;
  border-bottom: 1px solid #333333;
  padding-bottom: 8px;
}
.spat-section-header a {
  color: #ffffff;
  text-decoration: none;
}
.spat-section-header a:hover {
  text-decoration: underline;
  color: #ffffff;
}
.spat-cs-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: stretch;
}
.spat-cs-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 110px;
  background: #181818;
  border: 1px solid #3a3a3a;
  border-radius: 3px;
  padding: 6px;
  gap: 8px;
}
.spat-cs-banner img {
  width: 100%;
  height: auto;
  display: block;
}
.spat-cs-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  gap: 4px;
}
.spat-cs-thumb img {
  width: 95px;
  height: auto;
  border: 1px solid #555555;
  transition: transform 0.2s, border-color 0.2s;
}
.spat-cs-thumb:hover img {
  transform: scale(1.04);
  border-color: #ffffff;
}
.spat-cs-thumb span {
  font-size: 10.5px;
  color: #aaaaaa;
}
.spat-cs-thumb:hover span {
  color: #ffffff;
}
.spat-routes-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.spat-route-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  background: #181818;
  padding: 6px 10px;
  border: 1px solid #3a3a3a;
  border-radius: 3px;
  transition: all 0.2s ease;
}
.spat-route-card:hover {
  border-color: #ffffff;
  transform: translateY(-2px);
}
.spat-route-card img {
  height: 38px;
  width: auto;
  display: block;
}
.spat-route-card span {
  font-size: 11px;
  color: #ffffff;
  margin-top: 5px;
}

/* ==========================================================================
   Reconstructed Film Sectioned Table (filmr.html)
   ========================================================================== */
.filmr-container {
  width: 100%;
  height: 100%;
  padding: 24px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  box-sizing: border-box;
}
.filmr-container::-webkit-scrollbar {
  width: 8px;
}
.filmr-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
}
.filmr-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.45);
}
.filmr-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.filmr-section-row {
  width: 100%;
  max-width: 920px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid #333333;
  border-radius: 4px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.filmr-section-banner img {
  max-height: 36px;
  width: auto;
  display: block;
}
.filmr-frames-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.filmr-frame-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  background: #161616;
  padding: 5px;
  border: 1px solid #444444;
  border-radius: 2px;
  transition: transform 0.2s, border-color 0.2s;
}
.filmr-frame-card:hover {
  transform: translateY(-2px);
  border-color: #ffffff;
}
.filmr-frame-card img {
  height: 52px;
  width: auto;
  display: block;
}
.filmr-frame-card span {
  display: none;
}

/* ==========================================================================
   Reconstructed Minutage Score Section (minutager.html)
   Authentic 7-Section Table reproduced as responsive interactive cards
   ========================================================================== */
.vep-minutager-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 24px;
  overflow: auto;
  box-sizing: border-box;
}
.vep-minutager-container::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}
.vep-minutager-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 3px;
}
.vep-minutager-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.vep-minutager-grid {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: stretch;
  gap: 12px;
  max-width: 960px;
  width: 100%;
}
.vep-minutage-card {
  flex: 1;
  min-width: 105px;
  max-width: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid #333333;
  border-radius: 3px;
  padding: 10px 8px;
  box-sizing: border-box;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.vep-minutage-card:hover {
  transform: translateY(-3px);
  border-color: #777777;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7);
}
.vep-minutage-header {
  width: 100%;
  text-align: center;
}
.vep-minutage-header img {
  width: 100%;
  height: auto;
  display: block;
}
.vep-minutage-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none !important;
  width: 100%;
  gap: 6px;
}
.vep-minutage-thumb img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #444444;
  border-radius: 2px;
  background: #ffffff;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.vep-minutage-thumb:hover img {
  border-color: #ffffff;
  transform: scale(1.03);
}
.vep-pdf-badge {
  display: inline-block;
  padding: 3px 6px;
  background: #252525;
  color: #ffffff !important;
  font-family: 'FuturaCustom', Futura, sans-serif;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 2px;
  border: 1px solid #555555;
  transition: background 0.15s ease, color 0.15s ease;
}
.vep-minutage-card:hover .vep-pdf-badge {
  background: #ffffff;
  color: #000000 !important;
  border-color: #ffffff;
}

/* Video Player in Viewport */
.vep-video-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  padding: 15px;
}
.vep-video-player {
  width: 100%;
  height: 100%;
  max-width: 900px;
  max-height: 85vh;
  background: #000000;
  outline: none;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

/* ==========================================================================
   Unity WebGL 3D Application Player (www_setup)
   ========================================================================== */
.vep-unity-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 16px;
  box-sizing: border-box;
  background-color: #0d0d0d;
}

.vep-unity-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
  border-radius: 4px;
  border: 1px solid #444444;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85);
  background: #000000;
  overflow: hidden;
}

.vep-unity-iframe {
  width: min(calc(100vw - 320px), calc((100vh - 180px) * 1.777));
  height: min(calc((100vw - 320px) / 1.777), calc(100vh - 180px));
  max-width: 100%;
  max-height: 100%;
  border: none;
  display: block;
  background-color: #000000;
}

.vep-unity-fs-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  border: 1px solid #666666;
  border-radius: 3px;
  padding: 5px 10px;
  font-family: inherit;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  z-index: 100;
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.35, 1);
  backdrop-filter: blur(4px);
}
.vep-unity-fs-btn:hover {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  transform: scale(1.05);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.35);
}
.vep-unity-fs-btn:active {
  transform: scale(0.96);
}

/* --------------------------------------------------------------------------
   Godot / WebGL 3D Tour Navigation Toolbar & Dynamic Fascia
   -------------------------------------------------------------------------- */
.vep-tour-bar {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 14, 14, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  padding: 4px 12px;
  z-index: 100;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
  user-select: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.vep-tour-btn {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  padding: 0;
  line-height: 1;
}
.vep-tour-btn:hover {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  transform: scale(1.08);
}
.vep-tour-btn:active {
  transform: scale(0.94);
}

.vep-tour-pills {
  display: flex;
  align-items: center;
  gap: 5px;
}

.vep-tour-pill {
  background: rgba(255, 255, 255, 0.12);
  color: #e0e0e0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  padding: 3px 9px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  line-height: 1.2;
}
.vep-tour-pill:hover {
  background: rgba(255, 255, 255, 0.32);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
}
.vep-tour-pill.active {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
}

.vep-tour-badge {
  font-size: 11px;
  color: #999999;
  letter-spacing: 0.5px;
  margin-left: 2px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Dynamic Fascia Point Details Card */
.vep-point-card {
  margin-top: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.5);
  border-left: 3px solid #000000;
  border-radius: 2px;
  line-height: 1.45;
  transition: opacity 0.2s ease;
}
.vep-point-tag {
  display: inline-block;
  background: #000000;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: bold;
  letter-spacing: 0.6px;
  padding: 1px 6px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}
.vep-point-name {
  color: #000000;
  font-size: 13.5px;
}
.vep-point-desc {
  color: #1a1a1a;
  font-size: 13px;
}


/* ==========================================================================
   Rendering of Interiors Stage (rendering_int.html)
   Turntable Video + 3 Column Perspective Thumbs Layout
   ========================================================================== */
.vep-rendering-int-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 24px;
  box-sizing: border-box;
  overflow-y: auto;
}

.rendering-int-video-box {
  flex: 0 1 540px;
  max-width: 540px;
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid #444444;
  border-radius: 4px;
  padding: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rendering-video-header {
  font-family: 'FuturaCustom', Futura, sans-serif;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #cccccc;
  text-align: center;
}

.rendering-int-video {
  width: 100%;
  height: auto;
  max-height: 52vh;
  background: #000000;
  border-radius: 3px;
  outline: none;
  display: block;
}

.rendering-int-thumbs-col {
  flex: 0 1 240px;
  max-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rendering-thumb-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none !important;
  background: rgba(0, 0, 0, 0.6);
  padding: 6px;
  border: 1px solid #444444;
  border-radius: 3px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.rendering-thumb-card:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.85);
}
.rendering-thumb-card img {
  width: 100%;
  height: 95px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}
.rendering-thumb-card span {
  font-size: 10.5px;
  color: #cccccc;
  margin-top: 5px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
  line-height: 1.2;
}
.rendering-thumb-card:hover span {
  color: #ffffff;
}

/* Audio Player in Viewport */
.vep-audio-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 25px;
  width: 100%;
  max-width: 520px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid #444444;
  border-radius: 4px;
}
.vep-audio-container h2 {
  font-size: 16px;
  color: #ffffff;
  text-align: center;
}
.vep-audio-player {
  width: 100%;
}

/* ==========================================================================
   Home Page (#indexsfondo layout in Fullscreen)
   ========================================================================== */
.vep-home-fullscreen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000000;
  position: relative;
  overflow: hidden;
}

.vep-home-stage {
  position: relative;
  width: 920px;
  height: 500px;
  background: #000000 url('../immagini/indexsfondo.png') no-repeat center center;
  background-size: 920px 500px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.vep-home-stage .doc-preview {
  position: absolute;
  left: 305px;
  top: 180px;
  width: 120px;
  height: 90px;
  border: 1px solid #555555;
}
.vep-home-stage .doc-btn {
  position: absolute;
  left: 315px;
  top: 275px;
  width: 100px;
  height: 30px;
}

.vep-home-stage .logo-vep {
  position: absolute;
  left: 430px;
  top: 70px;
  width: 410px;
  height: 40px;
}
.vep-home-stage .logo-vr {
  position: absolute;
  left: 430px;
  top: 110px;
  width: 410px;
  height: 20px;
}

.vep-home-stage .btn-chronicle {
  position: absolute;
  left: 615px;
  top: 260px;
  width: 100px;
  height: 30px;
}
.vep-home-stage .btn-reconstruction {
  position: absolute;
  left: 530px;
  top: 315px;
  width: 155px;
  height: 30px;
}
.vep-home-stage .btn-installation {
  position: absolute;
  left: 485px;
  top: 370px;
  width: 120px;
  height: 30px;
}

.vep-home-stage .btn-credits {
  position: absolute;
  left: 770px;
  top: 465px;
  width: 50px;
  height: 20px;
}
.vep-home-stage .btn-contact {
  position: absolute;
  left: 830px;
  top: 465px;
  width: 55px;
  height: 20px;
}

.vep-home-stage .ext-refs {
  position: absolute;
  left: 30px;
  top: 165px;
  width: 220px;
  text-align: left;
  color: #ffffff;
  font-size: 13px;
}
.vep-home-stage .ext-refs-title {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 25px;
  color: #ffffff;
}
.vep-home-stage .ext-refs a {
  color: #ffffff; /* Crisp white accent against pitch black */
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2.5px;
  display: block;
  margin-bottom: 12px;
  font-size: 12.5px;
  transition: color 0.15s ease;
}
.vep-home-stage .ext-refs a:hover {
  color: #cccccc;
}

/* ==========================================================================
   Modern Modal Lightbox
   ========================================================================== */
.vep-lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
}
.vep-lightbox-modal.open {
  display: flex;
}
.vep-lightbox-content {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.vep-lightbox-content img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border: 1px solid #555555;
  box-shadow: 0 10px 40px rgba(0,0,0,0.85);
}
.vep-lightbox-caption {
  color: #ffffff;
  font-size: 14px;
  margin-top: 10px;
  text-align: center;
}
.vep-lightbox-close {
  position: absolute;
  top: -35px;
  right: -5px;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.35, 1);
}
.vep-lightbox-close:hover {
  transform: scale(1.15);
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}
.vep-lightbox-close:active {
  transform: scale(0.92);
}

/* Mobile Header Bar & Sidebar Drawer Toggle (Hidden on Desktop) */
.vep-mobile-header {
  display: none;
}

.vep-mobile-menu-btn {
  display: none;
  background: rgba(0, 0, 0, 0.85);
  color: #ffffff;
  border: 1px solid #666;
  border-radius: 3px;
  padding: 6px 10px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.35, 1);
}
.vep-mobile-menu-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.vep-mobile-menu-btn:active {
  transform: scale(0.94);
}

/* ==========================================================================
   Responsive Media Queries for Mobile / Tablet
   ========================================================================== */

/* ==========================================================================
   Widescreen Space Optimization (>= 1440px and >= 1920px)
   Eliminates empty void on large monitors across all gallery & setup pages
   ========================================================================== */
@media (min-width: 1440px) {
  .vep-gallery-container.gallery-quartet .vep-gallery-table {
    max-width: 1560px;
    gap: 28px;
  }
  .vep-gallery-container.gallery-quartet .vep-gallery-card {
    flex: 0 1 330px;
    max-width: 350px;
    padding: 12px 14px;
  }
  .vep-gallery-container.gallery-quartet .vep-gallery-card img {
    max-height: min(52vh, 380px);
    max-width: min(325px, 22vw);
  }
  .vep-gallery-container.gallery-quartet .vep-gallery-card span {
    font-size: 13.5px;
    max-width: 320px;
  }

  .vep-gallery-container.gallery-trio .vep-gallery-table {
    max-width: 1560px;
    gap: 36px;
  }
  .vep-gallery-container.gallery-trio .vep-gallery-card {
    flex: 0 1 430px;
    max-width: 450px;
    padding: 14px 16px;
  }
  .vep-gallery-container.gallery-trio .vep-gallery-card img {
    max-height: min(58vh, 460px);
    max-width: min(430px, 29vw);
  }
  .vep-gallery-container.gallery-trio .vep-gallery-card span {
    font-size: 14px;
    max-width: 420px;
  }

  .vep-gallery-container.gallery-duo .vep-gallery-table {
    max-width: 1560px;
    gap: 52px;
  }
  .vep-gallery-container.gallery-duo .vep-gallery-card {
    padding: 18px;
  }
  .vep-gallery-container.gallery-duo .vep-gallery-card img {
    max-height: min(65vh, 580px);
    max-width: min(620px, 42vw);
  }
  .vep-gallery-container.gallery-duo .vep-gallery-card span {
    font-size: 15px;
    max-width: 560px;
  }

  .vep-gallery-table {
    max-width: 1480px;
    gap: 22px;
  }
  .vep-gallery-card img {
    max-height: 220px;
    max-width: 300px;
  }

  .setup-single-top-row {
    max-width: 1100px;
    gap: 32px;
  }
  .setup-single-top-row .vep-gallery-card img {
    max-height: min(38vh, 290px);
  }
  .setup-single-bottom-row {
    max-width: 1180px;
    gap: 20px;
  }
  .setup-video-card video {
    max-height: min(22vh, 170px);
  }

  .vep-stage-setup-multichannel {
    max-width: 1380px;
    gap: 36px;
  }
  .mc-schema-card img {
    max-height: min(65vh, 520px) !important;
  }
  .mc-photos-grid .vep-gallery-card img {
    max-height: min(30vh, 240px);
  }
}

@media (max-width: 860px) {
  .vep-app {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
  }
  .vep-content-area {
    height: auto;
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Responsive content viewport: naturally flows without artificial 42vh clipping */
  .vep-stage-viewport {
    height: auto;
    min-height: auto;
    max-height: none;
    flex: none;
    overflow: visible;
    padding: 16px 12px;
    box-sizing: border-box;
  }

  /* Dedicated CoverFlow canvas for 3D galleries (expo, views_exteriors, views_interiors, event, visual_render) */
  .vep-stage-viewport.bg-gallery,
  .vep-stage-viewport:has(.cf-container) {
    height: 54vh;
    min-height: 330px;
    max-height: 430px;
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
  }

  .cf-container {
    height: 100% !important;
    width: 100% !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  .cf-stage {
    flex: 1 !important;
    width: 100% !important;
    min-height: 230px !important;
    perspective: 850px !important;
    --cf-w: min(270px, 74vw);
    --cf-h: min(190px, 29vh);
    --cf-spacing: 42px;
    --cf-offset: 125px;
  }

  .cf-slide {
    -webkit-box-reflect: none !important;
  }

  .cf-bottom-bar {
    flex-shrink: 0 !important;
    width: 100% !important;
    z-index: 50 !important;
    padding: 8px 12px !important;
    background: rgba(8, 8, 8, 0.95) !important;
  }

  /* Description fascia extends smoothly to bottom of screen (eliminates black void) */
  .vep-stage-fascia {
    flex: 1 0 auto;
    height: auto;
    min-height: 140px;
    max-height: none;
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
    padding: 20px 18px 36px;
    background: rgba(138, 138, 138, 0.95);
    border-top: 1px solid #333333;
    box-sizing: border-box;
  }

  /* Central Architectural & Technical Diagrams on Mobile (reconstruction, chronicle, pavilion, poeme, etc.) */
  .vep-diagram-container {
    width: 100% !important;
    height: auto !important;
    padding: 12px 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
  }
  .vep-diagram-container img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 48vh !important;
    object-fit: contain !important;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  }

  .vep-diagram-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    position: relative !important;
  }
  .vep-diagram-wrapper img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 48vh !important;
    object-fit: contain !important;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  }
  .vep-hotspot-btn {
    font-size: clamp(10.5px, 2.7vw, 13px) !important;
    padding: 4px 10px !important;
    background: rgba(10, 10, 10, 0.85);
    border-color: rgba(255, 255, 255, 0.45);
  }

  /* Single Video Viewport on Mobile */
  .vep-video-container {
    width: 100% !important;
    height: auto !important;
    padding: 8px 4px !important;
  }
  .vep-video-player {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 44vh !important;
  }

  /* Unity WebGL Player on Mobile */
  .vep-unity-container {
    width: 100% !important;
    height: 52vh !important;
    min-height: 320px !important;
    max-height: 480px !important;
    padding: 8px 4px !important;
  }
  .vep-unity-wrapper {
    width: 100% !important;
    height: 100% !important;
  }
  .vep-unity-iframe {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
  }

  .vep-tour-bar {
    bottom: 8px;
    padding: 3px 8px;
    gap: 5px;
  }
  .vep-tour-btn {
    width: 25px;
    height: 25px;
    font-size: 10px;
  }
  .vep-tour-pill {
    padding: 2px 7px;
    font-size: 10px;
  }

  .vep-fascia-text {
    height: auto;
    max-height: none;
    overflow: visible;
    font-size: 14px;
    line-height: 1.55;
  }
  .vep-transversal {
    align-self: flex-start;
  }
  
  /* Mobile Header Bar (Sticky Top Bar on Mobile) */
  .vep-mobile-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    padding: 0 16px;
    background: rgba(8, 8, 8, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid #222222;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    box-sizing: border-box;
    width: 100%;
    flex-shrink: 0;
  }

  .vep-mobile-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    color: #ffffff;
    user-select: none;
  }
  .vep-brand-tag {
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
    color: #ffffff;
    background: #1c1c1c;
    border: 1px solid #383838;
    padding: 2px 7px;
    border-radius: 3px;
  }
  .vep-brand-sub {
    font-size: 12.5px;
    letter-spacing: 0.5px;
    color: #aaaaaa;
    text-transform: uppercase;
  }

  .vep-mobile-menu-btn {
    display: flex !important;
    position: static !important;
    top: auto !important;
    right: auto !important;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
    background: #161616;
    color: #ffffff;
    border: 1px solid #383838;
    border-radius: 4px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    transition: all 0.2s cubic-bezier(0.2, 0.9, 0.35, 1);
  }
  .vep-mobile-menu-btn:hover {
    background: #242424;
    border-color: #555555;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  }
  .vep-mobile-menu-btn:active {
    background: #2a2a2a;
    border-color: #666666;
    transform: scale(0.94);
  }

  /* Off-canvas mobile drawer with enlarged buttons */
  .vep-sidebar {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    padding: 0;
    transition: right 0.3s ease;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.85);
    background: #000000;
    display: flex;
    flex-direction: column;
    z-index: 10000;
  }
  .vep-sidebar.open {
    right: 0;
  }
  .vep-sidebar-transversal-slot {
    height: 80px;
    min-height: 80px;
    max-height: 80px;
  }
  .sidebar-home-section {
    height: 44px;
    min-height: 44px;
    max-height: 44px;
  }
  .vep-stage-bottom-strip {
    display: none;
  }

  /* Table Galleries on mobile: clean vertical flow without cutoffs */
  .vep-gallery-container {
    height: auto !important;
    min-height: auto !important;
    overflow: visible !important;
    padding: 10px 4px !important;
  }
  .vep-gallery-container.gallery-duo,
  .vep-gallery-container.gallery-trio,
  .vep-gallery-container.gallery-quartet {
    height: auto !important;
    overflow: visible !important;
    padding: 10px 4px !important;
  }
  .vep-gallery-container.gallery-duo .vep-gallery-table,
  .vep-gallery-container.gallery-trio .vep-gallery-table,
  .vep-gallery-container.gallery-quartet .vep-gallery-table {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .vep-gallery-container.gallery-duo .vep-gallery-card,
  .vep-gallery-container.gallery-trio .vep-gallery-card,
  .vep-gallery-container.gallery-quartet .vep-gallery-card {
    width: 100% !important;
    max-width: min(340px, 92vw) !important;
    margin: 0 auto !important;
    flex: none !important;
  }
  .vep-gallery-container.gallery-duo .vep-gallery-card img,
  .vep-gallery-container.gallery-trio .vep-gallery-card img,
  .vep-gallery-container.gallery-quartet .vep-gallery-card img {
    max-height: 220px !important;
    max-width: 100% !important;
    width: auto !important;
    margin: 0 auto !important;
  }

  /* Multi-card grid galleries (e.g. matching_exteriors, matching_interiors, ambiances) */
  .vep-gallery-table {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px 8px !important;
    width: 100% !important;
    padding: 8px 4px !important;
    box-sizing: border-box;
  }
  .vep-gallery-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: #0d0d0d;
    border: 1px solid #282828;
    border-radius: 4px;
    padding: 6px 4px !important;
    box-sizing: border-box;
    max-width: 100% !important;
  }
  .vep-gallery-card img {
    max-height: 120px !important;
    max-width: 100% !important;
    width: auto !important;
    object-fit: contain !important;
    border-radius: 2px;
  }
  .vep-gallery-card span {
    font-size: 11px;
    color: #cccccc;
    margin-top: 4px;
    text-align: center;
  }

  /* Single setup layout on mobile */
  .vep-stage-setup-single {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 10px 4px !important;
    gap: 14px !important;
  }
  .setup-single-top-row {
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
  }
  .setup-single-top-row .vep-gallery-card {
    max-height: none !important;
    width: 100% !important;
    max-width: 340px !important;
    margin: 0 auto !important;
  }
  .setup-single-top-row .vep-gallery-card img {
    max-height: 180px !important;
    max-width: 100% !important;
  }
  .setup-single-bottom-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .setup-video-card {
    padding: 4px !important;
  }
  .setup-video-card video {
    max-height: 120px !important;
    width: 100% !important;
  }

  /* Multichannel setup on mobile */
  .vep-stage-setup-multichannel {
    flex-direction: column !important;
    height: auto !important;
    max-height: none !important;
    padding: 10px 4px !important;
    gap: 14px !important;
  }
  .mc-schema-col {
    width: 100% !important;
  }
  .mc-schema-card img {
    max-height: 240px !important;
    width: 100% !important;
  }
  .mc-photos-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .mc-photos-grid .vep-gallery-card img {
    max-height: 120px !important;
  }

  /* Minutager grid on mobile */
  .vep-minutager-container {
    padding: 12px 6px;
    align-items: flex-start;
    height: auto !important;
    max-height: none !important;
  }
  .vep-minutager-grid {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
  .vep-minutage-card {
    min-width: 90px;
    max-width: 105px;
    padding: 6px 4px;
    gap: 6px;
  }

  /* Rendering of Interiors on mobile */
  .vep-rendering-int-stage {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 14px 10px;
    height: auto !important;
    max-height: none !important;
  }
  .rendering-int-video-box {
    max-width: 100%;
  }
  .rendering-int-video {
    max-height: 28vh;
  }
  .rendering-int-thumbs-col {
    flex-direction: row;
    max-width: 100%;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }
  .rendering-thumb-card {
    flex: 1 1 95px;
    max-width: 120px;
  }

  /* Responsive Home Page on Mobile (restored authentic vertical mobile layout) */
  .vep-home-fullscreen {
    padding: 30px 16px;
    height: auto;
    min-height: 100vh;
    align-items: flex-start;
    justify-content: center;
  }
  .vep-home-stage {
    position: static;
    width: 100%;
    max-width: 440px;
    height: auto;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: none;
    transform: none !important;
  }
  .vep-home-stage .logo-vep,
  .vep-home-stage .logo-vr,
  .vep-home-stage .doc-preview,
  .vep-home-stage .doc-btn,
  .vep-home-stage .btn-chronicle,
  .vep-home-stage .btn-reconstruction,
  .vep-home-stage .btn-installation,
  .vep-home-stage .btn-credits,
  .vep-home-stage .btn-contact,
  .vep-home-stage .ext-refs {
    position: static;
    width: auto;
    height: auto;
    text-align: center;
  }
  .vep-home-stage .logo-vep img,
  .vep-home-stage .logo-vr img {
    max-width: 90vw;
    height: auto;
  }
  .vep-home-stage .doc-preview img {
    width: 130px;
    height: auto;
    border: 1px solid #555555;
    border-radius: 4px;
  }
  .vep-home-stage .btn-chronicle img,
  .vep-home-stage .btn-reconstruction img,
  .vep-home-stage .btn-installation img {
    height: 38px;
    width: auto;
  }
  .vep-home-stage .ext-refs {
    margin-top: 15px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid #333333;
    width: 100%;
    max-width: 320px;
  }
  .vep-home-stage .ext-refs-title {
    margin-bottom: 12px;
  }
  .vep-home-stage .btn-credits,
  .vep-home-stage .btn-contact {
    display: inline-block;
    margin: 4px 6px;
  }

}

@media (max-width: 600px) {
  .cf-slide {
    width: var(--cf-w);
    height: var(--cf-h);
    margin-left: calc(var(--cf-w) * -0.5);
    margin-top: calc(var(--cf-h) * -0.58);
  }
  .cf-controls {
    gap: 8px;
  }
  .cf-btn {
    padding: 6px 12px;
    font-size: 13px;
    min-height: 32px;
    min-width: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .cf-track {
    height: 14px;
    border-radius: 7px;
  }
  .cf-knob {
    width: 28px;
    height: 14px;
    border-radius: 7px;
  }
}

/* ==========================================================================
   Restored Authentic Stage Layouts: Setup Single, Multi-Channel, Music, MusicR, Cmp
   Strict monochrome palette (#000, #141414, #222, #333, #fff), zero blue
   ========================================================================== */

/* 1. Single User Setup (.vep-stage-setup-single) */
.vep-stage-setup-single {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 120px);
  gap: 16px;
  padding: 12px 20px;
  box-sizing: border-box;
}

.setup-single-top-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 900px;
}

.setup-single-top-row .vep-gallery-card {
  max-height: min(32vh, 230px);
  padding: 6px;
}

.setup-single-top-row .vep-gallery-card img {
  max-height: min(28vh, 190px);
  width: auto;
  object-fit: contain;
}

.setup-single-bottom-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 960px;
  justify-content: center;
}

.setup-video-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #141414;
  border: 1px solid #2e2e2e;
  border-radius: 4px;
  padding: 6px;
  box-sizing: border-box;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.setup-video-card:hover {
  border-color: #666;
  transform: translateY(-2px);
}

.setup-video-card video {
  width: 100%;
  height: auto;
  max-height: min(18vh, 130px);
  background: #000;
  border-radius: 2px;
  display: block;
}

.setup-video-card .video-card-title {
  color: #bbb;
  font-size: 11px;
  margin-top: 6px;
  text-align: center;
  text-transform: lowercase;
  font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, sans-serif;
  letter-spacing: 0.3px;
}

/* 2. Multi-Channel Setup (.vep-stage-setup-multichannel) */
.vep-stage-setup-multichannel {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 28px;
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 120px);
  padding: 16px;
  box-sizing: border-box;
  max-width: 1120px;
  margin: 0 auto;
}

.mc-schema-col {
  flex: 1.15;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mc-schema-card {
  max-height: min(58vh, 440px) !important;
  padding: 8px !important;
}

.mc-schema-card img {
  max-height: min(52vh, 400px) !important;
  width: auto;
  object-fit: contain;
}

.mc-photos-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.mc-photos-grid .vep-gallery-card {
  max-height: min(27vh, 200px);
  padding: 5px;
}

.mc-photos-grid .vep-gallery-card img {
  max-height: min(22vh, 160px);
  width: auto;
  object-fit: contain;
}

/* 3. Music Stage (.vep-stage-music) */
.vep-stage-music {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 120px);
  padding: 12px 20px;
  box-sizing: border-box;
}

.music-sketches-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 900px;
}

.music-sketches-row .vep-gallery-card {
  max-height: min(36vh, 260px);
  padding: 6px;
}

.music-sketches-row .vep-gallery-card img {
  max-height: min(32vh, 220px);
  width: auto;
  object-fit: contain;
}

.music-audio-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 720px;
  background: rgba(18, 18, 18, 0.9);
  border: 1px solid #333;
  border-radius: 4px;
  padding: 14px 20px;
  box-sizing: border-box;
}

.music-audio-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
}

.music-audio-info {
  color: #ddd;
  font-size: 13px;
  line-height: 1.35;
  font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, sans-serif;
}

.music-audio-info b {
  color: #fff;
}

.music-audio-info span {
  color: #aaa;
  font-size: 12px;
}

.music-audio-item audio {
  height: 32px;
  width: 280px;
  outline: none;
}

/* 4. Music Reconstruction Stage (.vep-stage-musicr) */
.vep-stage-musicr {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 120px);
  padding: 12px 20px;
  box-sizing: border-box;
}

.musicr-diagram-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 820px;
  background: #141414;
  border: 1px solid #2e2e2e;
  border-radius: 4px;
  padding: 8px;
  box-sizing: border-box;
}

.musicr-diagram-wrapper img {
  max-height: min(34vh, 240px);
  max-width: 100%;
  height: auto;
  display: block;
}

.musicr-audio-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 760px;
  background: rgba(18, 18, 18, 0.9);
  border: 1px solid #333;
  border-radius: 4px;
  padding: 12px 20px;
  box-sizing: border-box;
}

.musicr-audio-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 0;
}

.musicr-audio-title {
  color: #ddd;
  font-size: 12.5px;
  font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, sans-serif;
}

.musicr-audio-title i {
  color: #fff;
}

.musicr-audio-item audio {
  height: 30px;
  width: 260px;
  outline: none;
}

/* 5. Comparison Stage (.vep-stage-cmp) */
.vep-stage-cmp {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 120px);
  padding: 12px 20px;
  box-sizing: border-box;
}

.cmp-images-row {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 900px;
}

.cmp-images-row .vep-gallery-card {
  max-height: min(38vh, 270px);
  padding: 6px;
}

.cmp-images-row .vep-gallery-card img {
  max-height: min(34vh, 230px);
  width: auto;
  object-fit: contain;
}

.cmp-audio-box {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 600px;
  background: rgba(18, 18, 18, 0.9);
  border: 1px solid #333;
  border-radius: 4px;
  padding: 12px 20px;
  box-sizing: border-box;
}

.cmp-audio-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cmp-audio-title {
  color: #ddd;
  font-size: 13px;
  font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, sans-serif;
}

.cmp-audio-item audio {
  height: 32px;
  width: 260px;
  outline: none;
}

/* Responsive adjustments for layouts */
@media (max-width: 900px) {
  .vep-stage-setup-single {
    max-height: none;
    overflow-y: auto;
  }
  .setup-single-bottom-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .vep-stage-setup-multichannel {
    flex-direction: column;
    max-height: none;
    overflow-y: auto;
  }
  .music-audio-item,
  .musicr-audio-item,
  .cmp-audio-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .music-audio-item audio,
  .musicr-audio-item audio,
  .cmp-audio-item audio {
    width: 100%;
  }
}
