/* ==========================================================================
   VLG Brand Studio — Luxury SaaS Design System & Stylesheet
   Inspired by Linear, Figma & Vercel design systems
   Strict Brand Standards for Via Logistics Global (VLG)
   ========================================================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
  /* Official VLG Brand Palette */
  --vlg-purple: #93069E;
  --vlg-purple-light: #B23CC6;
  --vlg-purple-dark: #610B69;
  --vlg-purple-glow: rgba(147, 6, 158, 0.35);
  
  --vlg-slate-grey: #4A4E5A;
  --vlg-pure-white: #FFFFFF;
  --vlg-pitch-black: #0A0A0C;
  --vlg-charcoal: #1E2024;
  
  /* Studio UI Neutral Tones */
  --bg-app: #0B0C0E;
  --bg-sidebar: #111216;
  --bg-card: #16181E;
  --bg-card-hover: #1C1E26;
  --bg-stage: #14151B;
  
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-focus: var(--vlg-purple);
  
  --text-primary: #F0F2F6;
  --text-secondary: #9BA1B0;
  --text-muted: #656B7B;
  --text-inverse: #0B0C0E;
  
  /* Dynamic Customizer Active Values (Controlled via JS) */
  --artboard-bg: #FFFFFF;
  --wordmark-color: #4A4E5A;
  --tagline-color: #4A4E5A;
  --wordmark-scale-percent: 42%;
  --emblem-gap-px: 28px;
  --tagline-size-px: 14px;
  --tagline-tracking: 0.28em;
  --tagline-gap-px: 14px;
  
  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-tagline: 'Michroma', sans-serif;
  
  /* Transitions */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --trans-fast: 0.15s ease;
  --trans-smooth: 0.25s var(--ease-spring);
}

/* --- Bundled Brand Typeface (deterministic preview, canvas, SVG & PDF) --- */
@font-face {
  font-family: 'Michroma';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/michroma-latin.woff2') format('woff2');
}

/* --- Reset & Global Baseline --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select {
  font-family: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

button {
  cursor: pointer;
  user-select: none;
}

/* --- Top Navigation Bar (56px) --- */
.studio-header {
  height: 56px;
  background-color: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: relative;
  z-index: 100;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo-badge {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, rgba(147, 6, 158, 0.35) 0%, rgba(20, 10, 25, 0.85) 100%);
  border: 1px solid rgba(147, 6, 158, 0.55);
  box-shadow: 0 0 16px rgba(147, 6, 158, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: all var(--trans-fast);
  flex-shrink: 0;
}

.header-logo-badge:hover {
  border-color: rgba(178, 60, 198, 0.8);
  box-shadow: 0 0 20px rgba(147, 6, 158, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.nav-ribbon-icon {
  width: 27px;
  height: 27px;
  object-fit: contain;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.6));
}

.tab-label-short {
  display: none;
}

.tab-label-full {
  display: inline;
}

.header-title-wrap {
  display: flex;
  flex-direction: column;
}

.header-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}

.header-title .highlight {
  color: var(--vlg-purple-light);
  font-weight: 600;
}

.header-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Header Tabs */
.header-tabs {
  display: flex;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--trans-fast);
}

.nav-tab:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.04);
}

.nav-tab.active {
  background-color: var(--bg-card);
  color: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.nav-tab .tab-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--vlg-purple-light);
  opacity: 0.8;
}

.nav-tab.active .tab-num {
  opacity: 1;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Generic Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  border-radius: 8px;
  transition: all var(--trans-fast);
  white-space: nowrap;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-lg {
  padding: 12px 18px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

.btn-ghost {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.btn-primary {
  background: linear-gradient(135deg, #A814B5, #80048A);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 10px rgba(147, 6, 158, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #B921C7, #93069E);
  box-shadow: 0 4px 16px rgba(147, 6, 158, 0.5);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
  background-color: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.badge-accent {
  background-color: rgba(147, 6, 158, 0.25);
  color: #EB72F8;
  border: 1px solid rgba(147, 6, 158, 0.4);
}

/* --- Main Layout & View Panels --- */
.studio-main {
  height: calc(100vh - 56px);
  position: relative;
  overflow: hidden;
}

.view-panel {
  display: none;
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.view-panel.active {
  display: block;
}

/* ==========================================================================
   VIEW 1: STUDIO CUSTOMIZER LAYOUT (3-Column Desktop)
   ========================================================================== */
.customizer-layout {
  display: grid;
  grid-template-columns: 340px 1fr 320px;
  height: 100%;
  overflow: hidden;
}

/* Left & Right Panels */
.panel-left, .panel-right {
  height: 100%;
  overflow-y: auto;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-right {
  border-right: none;
  border-left: 1px solid var(--border-subtle);
}

/* Custom Scrollbars */
.panel-left::-webkit-scrollbar,
.panel-right::-webkit-scrollbar,
.guidelines-container::-webkit-scrollbar,
.mockups-container::-webkit-scrollbar {
  width: 6px;
}

.panel-left::-webkit-scrollbar-thumb,
.panel-right::-webkit-scrollbar-thumb,
.guidelines-container::-webkit-scrollbar-thumb,
.mockups-container::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}

/* Control Cards */
.control-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color var(--trans-fast);
}

.control-card:hover {
  border-color: var(--border-medium);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--vlg-purple-light);
  background-color: rgba(147, 6, 158, 0.15);
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  flex: 1;
}

.card-hint {
  font-size: 10px;
  color: var(--text-muted);
}

/* Section A: Preset Buttons Grid */
.preset-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preset-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  text-align: left;
  transition: all var(--trans-fast);
}

.preset-btn:hover {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: var(--border-medium);
}

.preset-btn.active {
  background-color: rgba(147, 6, 158, 0.14);
  border-color: rgba(147, 6, 158, 0.6);
  box-shadow: 0 0 12px rgba(147, 6, 158, 0.2);
}

.preset-swatch {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.swatch-light { background: #FFFFFF; }
.swatch-dark { background: #0A0A0C; }
.swatch-inverse { background: #93069E; }

.preset-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.preset-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.preset-desc {
  font-size: 10px;
  color: var(--text-muted);
}

.preset-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  background-color: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

.preset-btn.active .preset-tag {
  background-color: rgba(147, 6, 158, 0.3);
  color: #EB72F8;
}

/* Section B: Segmented Control */
.segmented-control {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.seg-btn {
  padding: 6px 2px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: all var(--trans-fast);
}

.seg-btn:hover {
  color: var(--text-primary);
}

.seg-btn.active {
  background-color: var(--bg-card);
  color: #FFFFFF;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Section C: Range Sliders */
.slider-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.slider-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.slider-values {
  display: flex;
  align-items: center;
  gap: 6px;
}

.approved-badge {
  font-size: 9px;
  font-weight: 700;
  color: #05DF72;
  background-color: rgba(5, 223, 114, 0.12);
  border: 1px solid rgba(5, 223, 114, 0.3);
  padding: 1px 5px;
  border-radius: 3px;
}

.slider-val {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: #FFFFFF;
  background-color: rgba(0, 0, 0, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

.studio-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.studio-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid var(--vlg-purple);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.studio-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.tick-approved {
  color: #05DF72;
  font-weight: 600;
}

.tick-approved-h {
  color: #00D1FF;
  font-weight: 600;
}

/* Color Swatches Row */
.color-picker-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.swatch-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-swatch-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background-color: var(--c);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all var(--trans-fast);
  position: relative;
}

.color-swatch-btn:hover {
  transform: scale(1.1);
}

.color-swatch-btn.active {
  box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px var(--vlg-purple-light);
}

.custom-hex-wrap {
  display: flex;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0 6px;
  height: 26px;
}

.hex-hash {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.hex-input {
  width: 58px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #FFFFFF;
  text-transform: uppercase;
  background: transparent;
}

.guardrail-warning {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 6px;
  background-color: rgba(255, 60, 60, 0.12);
  border: 1px solid rgba(255, 60, 60, 0.3);
  color: #FF7070;
  font-size: 10px;
}

/* Section D: Tagline Controller */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  transition: 0.2s;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--vlg-purple);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(16px);
}

.tagline-controls-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tagline-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.font-tag {
  color: var(--vlg-purple-light);
  font-family: var(--font-mono);
  font-size: 10px;
}

.text-input {
  width: 100%;
  height: 32px;
  background-color: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0 10px;
  color: #FFFFFF;
  font-size: 11px;
  letter-spacing: 0.05em;
  transition: border-color var(--trans-fast);
}

.text-input:focus {
  border-color: var(--vlg-purple);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.chip {
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  transition: all var(--trans-fast);
}

.chip:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.08);
}

.chip.active {
  background-color: rgba(147, 6, 158, 0.2);
  border-color: rgba(147, 6, 158, 0.4);
  color: #EB72F8;
}

/* ==========================================================================
   CENTER STAGE: LIVE ARTBOARD VIEWPORT
   ========================================================================== */
.panel-center {
  background-color: var(--bg-stage);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Floating Toolbar */
.artboard-toolbar {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(17, 18, 22, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  padding: 4px 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

.tb-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--trans-fast);
}

.tb-btn:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.06);
}

.tb-btn.active {
  background-color: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
}

.toolbar-divider {
  width: 1px;
  height: 16px;
  background-color: var(--border-subtle);
}

/* Zoom Controls */
.zoom-controls {
  display: flex;
  align-items: center;
  gap: 2px;
}

.zoom-btn {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.zoom-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.zoom-level {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-primary);
  padding: 0 4px;
  min-width: 36px;
  text-align: center;
}

.btn-zoom-fit {
  font-size: 10px;
  padding: 0 4px;
}

/* Artboard Outer (Zoom & Pan Container) */
.artboard-outer {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 40px;
  position: relative;
}

/* Artboard Inner Canvas */
.artboard {
  width: 760px;
  height: 520px;
  flex: 0 0 760px;
  position: relative;
  background-color: #FFFFFF;
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.15s ease;
  transform-origin: center center;
}

/* Transparent Alpha Checkerboard Pattern */
.artboard.transparent-bg {
  background-image: 
    linear-gradient(45deg, #E6E8ED 25%, transparent 25%), 
    linear-gradient(-45deg, #E6E8ED 25%, transparent 25%), 
    linear-gradient(45deg, transparent 75%, #E6E8ED 75%), 
    linear-gradient(-45deg, transparent 75%, #E6E8ED 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  background-color: #F8F9FA !important;
}

/* Blueprint Guides Overlay */
.blueprint-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 20;
}

.guide-axis-x {
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: repeating-linear-gradient(90deg, #00D1FF 0, #00D1FF 4px, transparent 4px, transparent 8px);
  opacity: 0.5;
}

.guide-axis-y {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 1px;
  background: repeating-linear-gradient(0deg, #00D1FF 0, #00D1FF 4px, transparent 4px, transparent 8px);
  opacity: 0.5;
}

.guide-box-clearspace {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border: 1px dashed rgba(5, 223, 114, 0.85);
  background-color: rgba(5, 223, 114, 0.05);
  box-shadow: 0 0 0 1px rgba(5, 223, 114, 0.15) inset;
  box-sizing: border-box;
  border-radius: 4px;
  pointer-events: none;
  transition: width 0.15s ease, height 0.15s ease;
}

.guide-tag {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
}

.tag-top {
  top: -20px;
  left: 0;
  background-color: #05DF72;
  color: #0A0A0C;
}

.tag-bottom {
  bottom: -22px;
  right: 0;
  background-color: #00D1FF;
  color: #0A0A0C;
}

/* ==========================================================================
   LIVE LOCKUP RENDERING ARCHITECTURE
   ========================================================================== */
.lockup-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  transition: all 0.2s var(--ease-spring);
}

/* Stacked / Vertical Mode (Default) */
.lockup-container.layout-stacked {
  flex-direction: column;
}

/* Horizontal Mode */
.lockup-container.layout-horizontal {
  flex-direction: row;
}

/* Emblem Wrap */
.lockup-emblem-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: auto;
  flex-shrink: 0;
}

.lockup-container.layout-stacked .lockup-emblem-wrap {
  width: var(--emblem-size-w, 280px);
  max-width: 100%;
  height: auto;
}

.lockup-container.layout-horizontal .lockup-emblem-wrap {
  width: var(--emblem-size-w, 170px);
  max-width: 100%;
  height: auto;
}

.ribbon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: filter 0.2s ease;
}

/* Dynamic Spacer */
.lockup-spacer {
  height: var(--emblem-spacer-h, var(--emblem-gap-px));
  width: 100%;
  flex-shrink: 0;
}

.lockup-container.layout-horizontal .lockup-spacer {
  width: var(--emblem-spacer-w, var(--emblem-gap-px));
  height: 100%;
}

/* Typography Wrap */
.lockup-type-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: var(--emblem-tuck-top, 0px);
  margin-left: var(--emblem-tuck-left, 0px);
  flex-shrink: 0;
  transition: margin 0.15s ease;
}

.lockup-container.layout-horizontal .lockup-type-wrap {
  align-items: flex-start;
}

/* Custom Bespoke Wordmark "VLG" */
.wordmark-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Wordmark dimensions are written by the shared JS layout model. */
.lockup-container.layout-stacked .wordmark-container,
.lockup-container.layout-wordmark .wordmark-container {
  max-width: 100%;
}

.lockup-container.layout-horizontal .wordmark-container {
  max-width: none;
}

.wordmark-img {
  width: 100%;
  height: 100%;
  aspect-ratio: 2400 / 449;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  transition: filter 0.15s ease;
}

/* Tagline Container */
.tagline-container {
  margin-top: var(--tagline-gap-px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-shrink: 0;
}

.lockup-container.layout-horizontal .tagline-container {
  justify-content: flex-start;
  text-align: left;
}

.tagline-text {
  font-family: var(--font-tagline);
  font-weight: 400;
  font-size: var(--tagline-size-px);
  letter-spacing: var(--tagline-tracking);
  color: var(--tagline-color);
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.2;
  transition: color 0.15s ease, font-size 0.15s ease, letter-spacing 0.15s ease;
}

/* Emblem Only / Wordmark Only Modes */
.lockup-container.layout-emblem .lockup-type-wrap,
.lockup-container.layout-emblem .lockup-spacer {
  display: none !important;
}

.lockup-container.layout-emblem .lockup-emblem-wrap {
  width: var(--emblem-size-w, 380px);
  max-width: 100%;
  height: auto;
}

.lockup-container.layout-wordmark .lockup-emblem-wrap,
.lockup-container.layout-wordmark .lockup-spacer {
  display: none !important;
}

/* Center Stage Footer */
.stage-footer {
  height: 40px;
  background-color: var(--bg-sidebar);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 11px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #05DF72;
  box-shadow: 0 0 8px rgba(5, 223, 114, 0.6);
}

.status-metrics {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.status-sep {
  opacity: 0.4;
}

/* ==========================================================================
   RIGHT PANEL: PRODUCTION EXPORT ENGINE & SPECS
   ========================================================================== */
.export-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.radio-card-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all var(--trans-fast);
}

.radio-card:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.radio-card input {
  margin-top: 2px;
  accent-color: var(--vlg-purple);
}

.radio-card.active,
.radio-card:has(input:checked) {
  border-color: rgba(147, 6, 158, 0.6);
  background-color: rgba(147, 6, 158, 0.1);
}

.radio-card-content {
  display: flex;
  flex-direction: column;
}

.radio-card-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
}

.radio-card-sub {
  font-size: 9px;
  color: var(--text-muted);
}

.studio-select {
  width: 100%;
  height: 36px;
  background-color: rgba(18, 19, 26, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0 10px;
  color: #FFFFFF;
  font-size: 11.5px;
}

/* ==========================================================================
   LUXURY CUSTOM DROPDOWN (Obsidian Glass Popover)
   ========================================================================== */
.custom-dropdown {
  position: relative;
  width: 100%;
  user-select: none;
}

.custom-dropdown-trigger {
  width: 100%;
  min-height: 40px;
  background: rgba(18, 19, 26, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-primary);
}

.custom-dropdown-trigger:hover {
  background: rgba(26, 27, 38, 0.85);
  border-color: rgba(147, 6, 158, 0.45);
  box-shadow: 0 2px 12px rgba(147, 6, 158, 0.15);
}

.custom-dropdown.open .custom-dropdown-trigger,
.custom-dropdown-trigger:focus-visible {
  border-color: #93069E;
  box-shadow: 0 0 0 2px rgba(147, 6, 158, 0.3), 0 4px 16px rgba(0, 0, 0, 0.4);
  outline: none;
  background: rgba(26, 27, 38, 0.95);
}

.dropdown-trigger-content {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.dropdown-trigger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(147, 6, 158, 0.2);
  color: #EB72F8;
  flex-shrink: 0;
}

.dropdown-trigger-text {
  font-size: 11.5px;
  font-weight: 500;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-chevron {
  color: var(--text-muted);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
  flex-shrink: 0;
}

.custom-dropdown.open .dropdown-chevron {
  transform: rotate(180deg);
  color: #EB72F8;
}

/* Dropdown Floating Menu */
.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(14, 15, 22, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(147, 6, 158, 0.25);
  border-radius: 10px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-dropdown.open .custom-dropdown-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.dropdown-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  position: relative;
  border: 1px solid transparent;
}

.dropdown-option:hover {
  background: rgba(255, 255, 255, 0.05);
}

.dropdown-option.active {
  background: rgba(147, 6, 158, 0.18);
  border-color: rgba(147, 6, 158, 0.4);
}

.option-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.dropdown-option:hover .option-icon-box {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}

.dropdown-option.active .option-icon-box {
  background: rgba(147, 6, 158, 0.3);
  border-color: rgba(147, 6, 158, 0.5);
  color: #EB72F8;
}

.option-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.option-title {
  font-size: 11.5px;
  font-weight: 600;
  color: #E2E4EB;
  line-height: 1.2;
}

.dropdown-option.active .option-title {
  color: #FFFFFF;
}

.option-desc {
  font-size: 9.5px;
  color: var(--text-muted);
  line-height: 1.25;
}

.option-check {
  color: #EB72F8;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.dropdown-option.active .option-check {
  opacity: 1;
  transform: scale(1);
}

/* ==========================================================================
   RESOLUTION SCALE SELECTOR
   ========================================================================== */
.res-button-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}
@media (max-width: 420px) {
  .res-button-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.res-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 7px;
  background-color: rgba(18, 19, 26, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.res-btn:hover {
  background-color: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.res-btn.active {
  background: linear-gradient(135deg, rgba(147, 6, 158, 0.28), rgba(147, 6, 158, 0.15));
  border-color: #93069E;
  box-shadow: 0 0 10px rgba(147, 6, 158, 0.35);
}

.res-factor {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #FFFFFF;
}

.res-desc {
  font-size: 8.5px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.15;
}

.res-btn.active .res-desc {
  color: #EB72F8;
}

/* ==========================================================================
   PRODUCTION DOWNLOAD ACTION SUITE (Flagship Buttons)
   ========================================================================== */
.export-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 6px;
}

.btn-export-suite {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 9px;
  cursor: pointer;
  text-align: left;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.btn-export-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
}

.btn-export-suite:hover .btn-export-icon-wrap {
  transform: translateY(-1px) scale(1.06);
}

.btn-export-suite:active {
  transform: scale(0.985);
}

.btn-export-text-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.btn-export-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.btn-export-title {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.btn-export-subtitle {
  font-size: 9.5px;
  line-height: 1.2;
}

.btn-format-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* 1. Primary: Download PNG (Master 4K / High-Res) */
.btn-export-primary {
  padding: 11px 14px;
  background: linear-gradient(135deg, #A814B5 0%, #93069E 45%, #76047F 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 18px rgba(147, 6, 158, 0.45), 0 1px 3px rgba(0, 0, 0, 0.4);
  color: #FFFFFF;
}

.btn-export-primary .btn-export-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.18), transparent 60%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.btn-export-primary:hover .btn-export-glow {
  opacity: 1;
}

.btn-export-primary:hover {
  background: linear-gradient(135deg, #BA19C8 0%, #A308AF 45%, #84058E 100%);
  box-shadow: 0 6px 24px rgba(147, 6, 158, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.35);
  transform: translateY(-1.5px);
}

.btn-export-primary .icon-primary {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-export-primary .btn-export-title {
  color: #FFFFFF;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.btn-export-primary .btn-export-subtitle {
  color: rgba(255, 255, 255, 0.82);
}

.btn-export-primary .tag-primary {
  background: rgba(0, 0, 0, 0.25);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 2. Secondary: Download Vector SVG */
.btn-export-secondary {
  padding: 10px 14px;
  background: rgba(20, 21, 29, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  color: var(--text-primary);
}

.btn-export-secondary:hover {
  background: rgba(30, 31, 44, 0.95);
  border-color: rgba(147, 6, 158, 0.55);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 12px rgba(147, 6, 158, 0.2);
  transform: translateY(-1px);
}

.btn-export-secondary .icon-secondary {
  width: 30px;
  height: 30px;
  background: rgba(147, 6, 158, 0.15);
  border: 1px solid rgba(147, 6, 158, 0.3);
  color: #EB72F8;
}

.btn-export-secondary:hover .icon-secondary {
  background: rgba(147, 6, 158, 0.25);
  color: #FFFFFF;
}

.btn-export-secondary .btn-export-title {
  color: #FFFFFF;
}

.btn-export-secondary .btn-export-subtitle {
  color: var(--text-muted);
}

.btn-export-secondary .tag-secondary {
  background: rgba(147, 6, 158, 0.2);
  color: #EB72F8;
  border: 1px solid rgba(147, 6, 158, 0.35);
}

/* 3. Tertiary: Print / Save as PDF */
.btn-export-tertiary {
  padding: 9px 14px;
  background: rgba(16, 17, 24, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  color: var(--text-secondary);
}

.btn-export-tertiary:hover {
  background: rgba(25, 26, 36, 0.85);
  border-color: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.btn-export-tertiary .icon-tertiary {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.btn-export-tertiary:hover .icon-tertiary {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.09);
}

.btn-export-tertiary .btn-export-title {
  color: #E2E4EB;
  font-size: 11.5px;
}

.btn-export-tertiary:hover .btn-export-title {
  color: #FFFFFF;
}

.btn-export-tertiary .btn-export-subtitle {
  color: var(--text-muted);
}

.btn-export-tertiary .tag-tertiary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Success Micro-Feedback on Export */
.btn-export-suite.btn-export-success {
  background: linear-gradient(135deg, #05DF72 0%, #039855 100%) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  box-shadow: 0 4px 20px rgba(5, 223, 114, 0.4) !important;
}

.btn-export-suite.btn-export-success .btn-export-title,
.btn-export-suite.btn-export-success .btn-export-subtitle {
  color: #FFFFFF !important;
}

.btn-export-suite.btn-export-success .icon-primary,
.btn-export-suite.btn-export-success .icon-secondary,
.btn-export-suite.btn-export-success .icon-tertiary {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #FFFFFF !important;
}

/* Live Spec Readout Card */
.spec-card {
  background-color: rgba(0, 0, 0, 0.35);
}

.btn-copy-sm {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: var(--vlg-purple-light);
  background-color: rgba(147, 6, 158, 0.15);
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid rgba(147, 6, 158, 0.3);
  transition: all var(--trans-fast);
}

.btn-copy-sm:hover {
  background-color: rgba(147, 6, 158, 0.3);
  color: #FFFFFF;
}

.spec-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 11px;
}

.spec-row:last-child {
  border-bottom: none;
}

.spec-label {
  color: var(--text-muted);
}

.spec-val {
  color: var(--text-primary);
  font-weight: 500;
}

.font-mono {
  font-family: var(--font-mono);
}

/* ==========================================================================
   VIEW 2: INTERACTIVE BRAND GUIDELINES SHEET
   ========================================================================== */
.guidelines-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.guidelines-hero {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 32px;
}

.hero-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--vlg-purple-light);
  letter-spacing: 0.1em;
}

.guidelines-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #FFFFFF;
}

.guidelines-lead {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 760px;
  line-height: 1.6;
}

.guide-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.section-num {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--vlg-purple-light);
  background-color: rgba(147, 6, 158, 0.15);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
}

.section-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* Color Cards Grid */
.color-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.guide-color-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all var(--trans-smooth);
}

.guide-color-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-medium);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.color-swatch-box {
  height: 90px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-hint {
  opacity: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  transition: opacity var(--trans-fast);
}

.copy-hint.dark-hint {
  background-color: rgba(255, 255, 255, 0.9);
  color: #0A0A0C;
}

.guide-color-card:hover .copy-hint {
  opacity: 1;
}

.color-details {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.color-name-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.color-name {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
}

.color-codes {
  font-size: 10px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.color-usage {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 4px;
}

/* Gradient Bar Visual */
.gradient-stops-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gradient-title {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
}

.gradient-bar-visual {
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(90deg, #46024B 0%, #72037B 25%, #93069E 50%, #B23CC6 75%, #EB72F8 90%, #FB92FB 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.gradient-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-stop {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 10px;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.chip-stop::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--c);
}

.chip-stop:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

/* Typography Grid */
.typography-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.typo-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.typo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.typo-role {
  font-size: 12px;
  font-weight: 700;
  color: #FFFFFF;
}

.typo-specimen-wordmark {
  background-color: #0A0A0C;
  border-radius: 6px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
}

.specimen-vlg-img {
  max-width: 140px;
  height: auto;
  filter: brightness(0) invert(1);
}

.typo-specimen-michroma {
  background-color: #0A0A0C;
  border-radius: 6px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  height: 80px;
}

.specimen-tagline {
  font-family: var(--font-tagline);
  font-size: 14px;
  color: #FFFFFF;
  letter-spacing: 0.28em;
}

.specimen-letters {
  font-family: var(--font-tagline);
  font-size: 8px;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.typo-specimen-body {
  background-color: #0A0A0C;
  border-radius: 6px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  height: 80px;
  font-size: 11px;
  color: var(--text-secondary);
}

.specimen-weights {
  font-size: 9px;
  color: var(--text-muted);
}

.typo-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Proportions Diagram */
.proportions-diagram-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.diagram-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.diagram-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.diagram-heading {
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
}

.diagram-visual {
  background-color: #0A0A0C;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  position: relative;
}

.horizontal-diagram {
  flex-direction: row;
  gap: 16px;
}

.diag-ribbon {
  width: 140px;
  height: auto;
}

.diag-ribbon-h {
  width: 90px;
  height: auto;
}

.diag-text {
  width: 60px;
  height: auto;
  filter: brightness(0) invert(1);
}

.diag-text-h {
  width: 80px;
  height: auto;
  filter: brightness(0) invert(1);
}

.diag-dim {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  color: #00D1FF;
  margin-top: 4px;
  text-align: center;
}

.diag-gap-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #05DF72;
  font-family: var(--font-mono);
  font-size: 9px;
  margin: 6px 0;
}

.diag-note {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.clearspace-rule-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 8px;
  background-color: rgba(5, 223, 114, 0.08);
  border: 1px solid rgba(5, 223, 114, 0.25);
}

.cs-icon {
  color: #05DF72;
  flex-shrink: 0;
}

.cs-title {
  font-size: 13px;
  font-weight: 700;
  color: #05DF72;
}

.cs-text {
  font-size: 12px;
  color: var(--text-primary);
  margin-top: 2px;
}

/* Guardrails Grid */
.guardrails-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.guard-card {
  background-color: var(--bg-card);
  border: 1px solid rgba(255, 60, 60, 0.2);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.badge-prohibited {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: #FF5A5A;
  background-color: rgba(255, 60, 60, 0.12);
  border: 1px solid rgba(255, 60, 60, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  width: fit-content;
}

.guard-title {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
}

.guard-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 8px;
  background-color: rgba(17, 18, 22, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 500;
  pointer-events: auto;
  animation: toastIn 0.3s var(--ease-spring);
  transition: all 0.2s ease;
}

.toast.toast-success {
  border-left: 3px solid #05DF72;
}

.toast.toast-error {
  border-left: 3px solid #FF5A5A;
}

.toast.toast-info {
  border-left: 3px solid var(--vlg-purple-light);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   PRINT / PDF VIEW STYLESHEET
   --------------------------------------------------------------------------
   The PDF button renders a dedicated, self-contained SVG print sheet using the
   same geometry as the PNG/SVG exports. The application UI is never printed.
   ========================================================================== */
#print-area {
  display: none;
}

@media print {
  html,
  body {
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #FFFFFF !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body > *:not(#print-area) {
    display: none !important;
  }

  #print-area {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #print-area svg {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
  }
}

/* ==========================================================================
   MOBILE WORKSPACE NAVIGATION & QUICK DOCK (Default Desktop State: Hidden)
   ========================================================================== */
.mobile-workspace-nav {
  display: none;
}

.mobile-live-dock {
  display: none;
}

/* ==========================================================================
   RESPONSIVE DESIGN SYSTEM & BREAKPOINT ARCHITECTURE
   ========================================================================== */

/* --- 1. Large Laptops & Standard Monitors (1025px - 1280px) --- */
@media (max-width: 1280px) {
  .customizer-layout {
    grid-template-columns: 310px 1fr 290px;
  }

  .header-subtitle {
    font-size: 10px;
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-tab {
    padding: 6px 10px;
    font-size: 11.5px;
  }
}

/* --- 2. Compact Laptops & Landscape Tablets (981px - 1080px) --- */
@media (max-width: 1080px) {
  .customizer-layout {
    grid-template-columns: 290px 1fr 280px;
  }

  .header-subtitle {
    display: none;
  }

  .tab-label-full {
    display: none;
  }

  .tab-label-short {
    display: inline;
  }

  .btn-sm {
    padding: 6px 10px;
    font-size: 11.5px;
  }
}

/* --- 3. Tablet & Mobile Workspace Architecture (<= 980px) --- */
@media (max-width: 980px) {
  /* Prevent horizontal scroll bleed on mobile viewports */
  html, body {
    overflow-x: hidden;
    position: relative;
  }

  .studio-main {
    height: calc(100vh - 56px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .view-panel {
    height: 100%;
    display: none;
    flex-direction: column;
    overflow: hidden;
  }

  .view-panel.active {
    display: flex;
  }

  /* Mobile Workspace Segmented Mode Switcher (Controls / Preview / Export) */
  .mobile-workspace-nav {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background-color: rgba(17, 18, 22, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-medium);
    padding: 6px 10px;
    gap: 6px;
    flex-shrink: 0;
    z-index: 60;
  }

  .m-ws-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 7px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-secondary);
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    transition: all var(--trans-fast);
    min-height: 36px;
  }

  .m-ws-btn svg {
    flex-shrink: 0;
  }

  .m-ws-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.06);
  }

  .m-ws-btn.active {
    color: #FFFFFF;
    background: linear-gradient(135deg, rgba(147, 6, 158, 0.35), rgba(97, 11, 105, 0.2));
    border-color: rgba(147, 6, 158, 0.6);
    box-shadow: 0 2px 8px rgba(147, 6, 158, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.15);
  }

  /* Mobile Layout Mode Visibility Switch */
  .customizer-layout {
    display: flex;
    flex: 1;
    height: 100%;
    overflow: hidden;
    position: relative;
  }

  /* Mobile Quick Live Dock (Pinned at top of Controls panel) */
  .mobile-live-dock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(22, 24, 30, 0.95), rgba(17, 18, 22, 0.98));
    border: 1px solid rgba(147, 6, 158, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.08);
    border-radius: 9px;
    padding: 8px 12px;
    margin-bottom: 12px;
    gap: 10px;
    flex-shrink: 0;
  }

  .m-dock-preview-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .m-dock-tag {
    font-size: 8.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--vlg-purple-light);
  }

  .m-dock-thumb {
    width: 48px;
    height: 32px;
    border-radius: 5px;
    background-color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  }

  .m-dock-emblem {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
  }

  .m-dock-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .m-dock-preset {
    font-size: 11.5px;
    font-weight: 700;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .m-dock-sub {
    font-size: 9.5px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .m-dock-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 600;
    color: #FFFFFF;
    background-color: rgba(147, 6, 158, 0.35);
    border: 1px solid rgba(147, 6, 158, 0.6);
    border-radius: 6px;
    padding: 5px 9px;
    white-space: nowrap;
    transition: all var(--trans-fast);
  }

  .m-dock-view-btn:hover {
    background-color: var(--vlg-purple);
  }

  /* Single-panel display switching in Mobile Customizer */
  .panel-left,
  .panel-center,
  .panel-right {
    display: none;
    width: 100%;
    height: 100%;
    flex: 1;
    border: none;
  }

  .customizer-layout.panel-left-active .panel-left {
    display: flex;
    overflow-y: auto;
    padding: 14px;
  }

  .customizer-layout.stage-active .panel-center {
    display: flex;
    height: 100%;
    min-height: 0;
  }

  .customizer-layout.panel-right-active .panel-right {
    display: flex;
    overflow-y: auto;
    padding: 14px;
  }

  /* Fallback if no specific active class is set (default to controls) */
  .customizer-layout:not(.panel-left-active):not(.stage-active):not(.panel-right-active) .panel-left {
    display: flex;
    overflow-y: auto;
    padding: 14px;
  }

  /* Artboard Stage on Mobile */
  .artboard-outer {
    padding: 20px 10px;
    align-items: center;
    justify-content: center;
  }

  .artboard-toolbar {
    top: 8px;
    right: 8px;
    padding: 3px 6px;
    gap: 4px;
  }

  .tb-btn {
    padding: 4px 6px;
    font-size: 10.5px;
  }

  .stage-footer {
    padding: 8px 12px;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 10.5px;
  }

  .status-metrics {
    flex-wrap: wrap;
    gap: 4px 8px;
  }

  /* Preset buttons grid on tablet */
  .preset-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }

  /* Guidelines sheet responsive adjustments */
  .guidelines-container {
    padding: 28px 18px;
    overflow-y: auto;
  }

  .color-cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
  }

  .typography-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .diagram-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .guardrails-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
  }
}

/* --- 4. Mobile Phones (<= 640px) --- */
@media (max-width: 640px) {
  .studio-header {
    height: 52px;
    padding: 0 10px;
    gap: 8px;
  }

  .header-brand {
    gap: 8px;
  }

  .header-logo-badge {
    width: 30px;
    height: 30px;
    border-radius: 7px;
  }

  .nav-ribbon-icon {
    width: 23px;
    height: 23px;
  }

  .header-title {
    font-size: 13.5px;
  }

  /* Compact navigation tabs */
  .header-tabs {
    padding: 2px;
    gap: 1px;
  }

  .nav-tab {
    padding: 5px 8px;
    font-size: 11px;
    gap: 5px;
  }

  .nav-tab .tab-num {
    font-size: 9px;
  }

  /* Header action buttons: Icon-first on mobile */
  .header-actions {
    gap: 5px;
  }

  .header-actions .btn {
    padding: 6px 8px;
  }

  .header-actions .btn-text {
    display: none;
  }

  .header-actions .btn-format-tag {
    margin-left: 2px;
  }

  /* Mobile Controls Touch Optimization */
  .control-card {
    padding: 12px;
    gap: 10px;
  }

  /* Touch-friendly sliders */
  .slider-group {
    gap: 8px;
  }

  .studio-slider {
    height: 8px;
    touch-action: manipulation;
  }

  .studio-slider::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  }

  /* Color Swatches Touch Hit Target */
  .swatch-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .color-swatch-btn {
    width: 36px;
    height: 36px;
  }

  .custom-hex-wrap {
    height: 36px;
  }

  /* Segmented Controls */
  .segmented-control {
    flex-wrap: wrap;
    gap: 3px;
  }

  .seg-btn {
    flex: 1 1 45%;
    min-height: 34px;
    font-size: 11px;
  }

  /* Resolution buttons grid */
  .res-button-grid {
    grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
    gap: 4px;
  }

  .res-btn {
    padding: 6px 4px;
    min-height: 44px;
  }

  .res-factor {
    font-size: 11px;
  }

  .res-desc {
    font-size: 8px;
  }

  /* Export action buttons */
  .btn-export-suite {
    padding: 10px 12px;
  }

  .btn-export-title {
    font-size: 12.5px;
  }

  .btn-export-subtitle {
    font-size: 10px;
  }

  /* Guidelines Hero */
  .guidelines-hero {
    padding: 24px 14px;
  }

  .hero-badge {
    font-size: 9px;
  }

  .guidelines-title {
    font-size: 20px;
  }

  .guidelines-lead {
    font-size: 12px;
  }

  /* Color code items */
  .color-details {
    padding: 12px;
  }

  .color-codes {
    font-size: 10px;
  }

  /* Specimen typography cards */
  .typo-specimen-wordmark,
  .typo-specimen-michroma,
  .typo-specimen-body {
    padding: 16px 12px;
  }

  .specimen-tagline {
    font-size: 16px;
    letter-spacing: 0.16em;
  }
}

/* --- 5. Small Mobile Phones (<= 380px) --- */
@media (max-width: 380px) {
  .header-title-wrap .highlight {
    display: none;
  }

  .nav-tab .tab-num {
    display: none;
  }

  .m-ws-btn span {
    font-size: 10px;
  }

  .preset-grid {
    grid-template-columns: 1fr;
  }

  .seg-btn {
    flex: 1 1 100%;
  }

  .artboard-toolbar {
    flex-wrap: wrap;
    max-width: 95%;
  }
}

/* --- 6. Accessibility & High Contrast Enhancements --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

