/* ==========================================================================
   Origin Financial : Style Reference & Midnight Gallery Design System
   Aesthetic: Midnight Gallery of Quiet Wealth (DESIGN.md)
   Three-Voice Typography: Serif Display + Neo-grotesque Sans + Roboto Mono
   Surfaces: Obsidian (#0f1011), Abyss (#090a0b), Graphite (#1a1b1e), Silver (#cacaca)
   Decision Rationale (R-31):
   - Palette: Obsidian base + Iris/Cyan accents for high readability without visual fatigue.
   - Typography: Serif display for quiet authority, Sans for legible UI, Mono for telemetry.
   - Elevation: Flat surface stepping (#0f1011 -> #1a1b1e -> #cacaca) instead of floating shadows.
   - Radii: 8px controls, 16px cards, 9999px status pills for structured hierarchy.
   ========================================================================== */

:root {
  /* Colors : Origin Palette */
  --color-iris-gleam: #847dff;
  --color-cyan-signal: #00b3dd;
  --color-pale-iris: #d1c9ff;
  --color-deep-iris: #4b49aa;
  --color-orchid-bloom: #dd90d8;
  --color-periwinkle: #90b8f0;
  
  --color-obsidian: #0f1011;
  --color-abyss: #090a0b;
  --color-graphite: #1a1b1e;
  --color-graphite-light: #24252a;
  --color-graphite-hover: #26282e;
  --color-steel: #3f4041;
  --color-silver: #cacaca;
  --color-silver-light: #e5e5e7;
  --color-fog: #76777a;
  --color-ash: #a3a3a6;
  --color-cloud: #f5f5f7;
  --color-pure: #ffffff;
  --color-void: #000000;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-focus: rgba(255, 255, 255, 0.4);

  /* Typography : Font Families (All Unified to Plus Jakarta Sans) */
  --font-serif-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-headline: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Roboto Mono", monospace;

  /* Typography : Scale */
  --text-mono-label: 11px;
  --leading-mono-label: 1.7;
  --text-body-sm: 14px;
  --leading-body-sm: 1.6;
  --text-body: 16px;
  --leading-body: 1.5;
  --text-subheading: 17px;
  --leading-subheading: 1.6;
  --text-heading-lg: 32px;
  --leading-heading-lg: 1.1;
  --text-display-sm: 44px;
  --leading-display-sm: 1.05;
  --text-display: 56px;
  --leading-display: 0.98;

  /* Typography : Weights */
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;

  /* Spacing Scale (4px base) */
  --spacing-4: 4px;
  --spacing-8: 8px;
  --spacing-12: 12px;
  --spacing-16: 16px;
  --spacing-20: 20px;
  --spacing-24: 24px;
  --spacing-32: 32px;
  --spacing-40: 40px;
  --spacing-48: 48px;
  --spacing-60: 60px;
  --spacing-80: 80px;

  /* Border Radius (Strict Token Hierarchy) */
  --radius-buttons: 8px;
  --radius-inputs: 8px;
  --radius-navitems: 8px;
  --radius-cards: 16px;
  --radius-statblocks: 16px;
  --radius-pill: 9999px;

  /* Gradients (Subtle & Structural Only) */
  --gradient-dark-chrome: linear-gradient(135deg, rgb(38, 38, 40), rgb(18, 18, 20));
  --gradient-sky-atmosphere: radial-gradient(circle at 50% -10%, rgba(26, 71, 136, 0.16) 0%, rgba(15, 16, 17, 0.96) 70%, #0f1011 100%);
}

/* Base Reset & Accessibility Standards */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

button, input, select, textarea {
  font-family: inherit;
}

/* Global Minimalist Scrollbar Reset (Hide scrollbars completely while preserving full scrollability) */
*, *::before, *::after {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

*::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  min-height: -webkit-fill-available;
  background-color: var(--color-obsidian);
  color: var(--color-pure);
  font-family: var(--font-sans);
  font-size: var(--text-body-sm);
  line-height: var(--leading-body-sm);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* High-Contrast Keyboard Focus Indicators (R-32) */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-iris-gleam);
  outline-offset: 2px;
}

/* Dedicated Single-Ring Controls (Anti-Slop R-32 & C-1): Exclude from global outer outline to prevent double rings */
.builder-props-panel input:focus-visible,
.builder-props-panel select:focus-visible,
.builder-props-panel textarea:focus-visible,
.builder-props-panel button:focus-visible,
.props-search-input:focus-visible,
.props-input:focus-visible,
.props-select:focus-visible,
.props-textarea:focus-visible,
.props-category-pill:focus-visible,
.props-segment-btn:focus-visible,
.props-btn-icon-toggle:focus-visible,
.btn-props-header:focus-visible,
.btn-props-footer:focus-visible,
.builder-text-input:focus-visible,
.auth-input:focus-visible,
#user-input:focus-visible {
  outline: none !important;
}

/* App Container Layout */
.app-layout {
  display: flex;
  width: 100vw;
  height: 100%;
  height: 100dvh;
  min-height: -webkit-fill-available;
  position: relative;
  background-color: var(--color-obsidian);
  background-image: var(--gradient-sky-atmosphere);
  overflow: hidden;
}

/* Mobile Drawer Backdrop Overlay */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 45;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity;
}

.sidebar-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ==========================================================================
   SIDEBAR (Obsidian / Graphite Gallery Drawer)
   ========================================================================== */
.sidebar {
  width: 320px;
  min-width: 320px;
  max-width: 320px;
  height: 100%;
  background-color: var(--color-abyss);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 50;
  flex-shrink: 0;
  position: relative;
  margin-left: 0;
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0);
  transition: margin-left 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.45s ease;
  will-change: margin-left, transform, opacity;
}

.sidebar.collapsed {
  margin-left: -320px;
  transform: translate3d(-40px, 0, 0);
  opacity: 0;
  border-color: transparent;
  pointer-events: none;
}

.sidebar-header {
  height: 64px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: none;
  background: var(--color-abyss);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translate3d(0, 0, 0);
  opacity: 1;
  will-change: transform, opacity;
}

.sidebar.collapsed .sidebar-header {
  transform: translate3d(-30px, 0, 0);
  opacity: 0;
}

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

.brand-logo-standalone {
  width: 20px;
  height: 23px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand:hover .brand-logo-standalone {
  transform: scale(1.06);
}

.brand-icon {
  display: none !important;
}

.brand-text h2 {
  font-family: var(--font-headline);
  font-size: 19px;
  font-weight: 700;
  color: var(--color-pure);
  display: flex;
  align-items: baseline;
  gap: 6px;
  letter-spacing: -0.03em;
  line-height: 1;
}

/* Mirrorit Brand Wordmark: "Mirror" in bold pure white, "it" in distinct ash gray italic */
.brand-word {
  display: inline-flex;
  align-items: baseline;
  font-family: var(--font-headline);
  font-weight: 700;
  color: var(--color-pure);
}

.brand-word em,
.brand-text h2 em,
.header-brand-mobile h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--color-ash, #a3a3a6) !important;
  margin-left: 0.5px;
}

.badge-studio {
  display: none !important;
}

.sidebar-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Icon-only New button: precise 34px square */
.btn-icon-new {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--color-pure);
  border-radius: var(--radius-buttons);
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.btn-icon-new:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--color-pure);
  background: rgba(255, 255, 255, 0.12);
}

.btn-icon-new:active {
  transform: scale(0.96);
}

.btn-icon-new svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.2;
}

.btn-close-drawer {
  display: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--color-pure);
  width: 36px;
  height: 36px;
  min-height: 36px;
  border-radius: var(--radius-buttons);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-close-drawer:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--border-medium);
}

/* Sidebar Segmented Tabs & Filter Controls */
.sidebar-tabs-container {
  padding: var(--spacing-16) var(--spacing-20) 8px;
  flex-shrink: 0;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

.sidebar.collapsed .sidebar-tabs-container {
  transform: translate3d(-45px, 0, 0);
  opacity: 0;
}

.sidebar-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
}

.tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 8px;
  background: transparent;
  border: none;
  border-radius: var(--radius-pill);
  color: var(--color-fog);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  user-select: none;
}

.tab-btn:hover {
  color: var(--color-pure);
  background: rgba(255, 255, 255, 0.06);
}

.tab-btn.active {
  color: var(--color-pure);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-fog);
  transition: all 0.2s ease;
}

.tab-btn.active .tab-badge {
  background: rgba(255, 255, 255, 0.18);
  color: var(--color-pure);
}

.tab-btn[data-tab="active"].active .tab-badge {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.sidebar-section {
  flex: 1;
  overflow-y: auto;
  padding: 8px var(--spacing-20) var(--spacing-20);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-16);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translate3d(0, 0, 0);
  opacity: 1;
  will-change: transform, opacity;
}

.sidebar.collapsed .sidebar-section {
  transform: translate3d(-45px, 0, 0);
  opacity: 0;
}

.sidebar-section::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2px;
  text-transform: none;
  color: var(--color-fog);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.count-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--color-ash);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-pill);
  padding: 1px 8px;
}

.clones-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-12);
  padding-top: 2px;
  padding-bottom: 4px;
}

.empty-state-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-cards);
  margin-top: 4px;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.empty-state-sidebar:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.015) 100%);
  border-color: rgba(255, 255, 255, 0.1);
}

.empty-state-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--color-fog);
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.empty-state-sidebar:hover .empty-state-icon-badge {
  color: var(--color-pure);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.empty-state-sidebar .empty-title {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-pure);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.empty-state-sidebar .empty-subtext {
  font-family: var(--font-sans);
  font-size: 11.5px;
  color: var(--color-fog);
  line-height: 1.45;
  max-width: 210px;
  margin-bottom: 14px;
}

.empty-action-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--color-pure);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.empty-action-pill svg {
  color: var(--color-fog);
  transition: transform 0.2s ease, color 0.2s ease;
}

.empty-action-pill:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.empty-action-pill:hover svg {
  color: var(--color-pure);
  transform: translateX(2px);
}

.empty-action-pill:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.06);
}

/* Sidebar Mini Clone Card - Compact & Refined */
.clone-card-mini {
  background: #131417;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-cards);
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.clone-card-mini:hover {
  background: #18191e;
  border-color: rgba(255, 255, 255, 0.13);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.clone-card-mini.active-selection {
  border-color: var(--color-iris-gleam);
  background: rgba(132, 125, 255, 0.06);
  box-shadow: 0 0 0 1px rgba(132, 125, 255, 0.25);
}

.clone-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.clone-domain {
  font-size: 12.5px;
  font-weight: var(--font-weight-medium);
  color: var(--color-pure);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
  letter-spacing: -0.1px;
}

.clone-header-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.port-copy-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(132, 125, 255, 0.08);
  border: 1px solid rgba(132, 125, 255, 0.2);
  color: var(--color-pale-iris);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.4;
}

.port-copy-pill:hover {
  background: var(--color-iris-gleam);
  border-color: var(--color-iris-gleam);
  color: #fff;
}

.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-cyan-signal);
  letter-spacing: 0.5px;
}

.live-dot {
  width: 5px;
  height: 5px;
  background-color: var(--color-cyan-signal);
  border-radius: 50%;
  display: inline-block;
}

.offline-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  color: var(--color-fog);
  letter-spacing: 0.5px;
}

/* Cloning Live Indicator - Restrained, Human Craftsmanship (ANTI_AI_SLOP.md) */
.cloning-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-iris-gleam);
  letter-spacing: 0.5px;
}

.cloning-dot {
  width: 5px;
  height: 5px;
  background-color: var(--color-iris-gleam);
  border-radius: 50%;
  display: inline-block;
}

.clone-card-mini.card-cloning-active {
  border-color: rgba(132, 125, 255, 0.28);
  background: #131417;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.clone-card-mini.card-cloning-active:hover {
  border-color: rgba(132, 125, 255, 0.5);
  background: #17181c;
  transform: translateY(-1px);
}

.clone-card-status-subrow {
  display: flex;
  align-items: center;
  margin-top: 4px;
}

.cloning-status-text {
  color: var(--color-pale-iris);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.2px;
  line-height: 1.2;
}

.cloning-progress-bar {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 1px;
  overflow: hidden;
  position: relative;
  margin-top: 5px;
}

.cloning-progress-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: var(--color-iris-gleam);
  border-radius: 1px;
  animation: progressPulse 1.8s infinite ease-in-out;
}

@keyframes progressPulse {
  0%, 100% { opacity: 0.65; transform: scaleX(0.96); }
  50% { opacity: 1; transform: scaleX(1); }
}

.clone-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-ash);
  line-height: 1;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.port-tag {
  color: var(--color-pale-iris);
}

/* 1-Row Compact Action Bar */
.clone-card-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 2px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  width: 100%;
}

.btn-action-sm {
  min-height: 26px;
  height: 26px;
  padding: 0 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--color-cloud);
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: var(--font-weight-medium);
  border-radius: 4px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  white-space: nowrap;
}

.btn-action-sm:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-pure);
}

.btn-action-sm.btn-open:hover {
  background: var(--color-pure);
  color: var(--color-void);
  border-color: var(--color-pure);
}

.btn-action-sm.btn-start {
  color: var(--color-cyan-signal);
}

.btn-action-sm.btn-start:hover {
  background: rgba(0, 179, 221, 0.15);
  border-color: var(--color-cyan-signal);
  color: var(--color-pure);
}

.btn-action-sm.btn-stop {
  color: var(--color-ash);
}

.btn-action-sm.btn-stop:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

.btn-action-sm.btn-delete:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

.sidebar-footer {
  height: 60px;
  padding: 0 var(--spacing-20);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-abyss);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translate3d(0, 0, 0);
  opacity: 1;
  will-change: transform, opacity;
}

.sidebar.collapsed .sidebar-footer {
  transform: translate3d(-60px, 0, 0);
  opacity: 0;
}

.btn-sidebar-terms {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--color-fog);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  padding: 6px 10px;
  margin-left: -6px;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.15s ease;
  user-select: none;
}

.btn-sidebar-terms:hover {
  color: var(--color-pure);
  background: rgba(255, 255, 255, 0.06);
}

.btn-sidebar-terms:active {
  transform: scale(0.97);
}

.btn-sidebar-terms .terms-icon-svg {
  color: var(--color-fog);
  opacity: 0.8;
  transition: color 0.2s ease, opacity 0.2s ease;
  flex-shrink: 0;
}

.btn-sidebar-terms:hover .terms-icon-svg {
  color: var(--color-pure);
  opacity: 1;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--color-pure);
  width: 36px;
  height: 36px;
  min-height: 36px;
  border-radius: var(--radius-buttons);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.btn-toggle-sidebar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: var(--radius-buttons);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--color-ash);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-toggle-sidebar:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-medium);
  color: var(--color-pure);
}

.btn-toggle-sidebar:active {
  transform: scale(0.95);
}

.header-desktop-context {
  display: none !important;
}

.header-desktop-context .pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--color-iris-gleam);
  border-radius: 50%;
}

.header-brand-mobile {
  display: none;
  align-items: center;
  gap: 8px;
}

.header-brand-mobile .brand-logo-standalone {
  width: 18px;
  height: 21px;
}

.app-layout.sidebar-collapsed .header-brand-mobile {
  display: flex;
}

.header-brand-mobile h2 {
  font-family: var(--font-headline);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-pure);
  display: flex;
  align-items: baseline;
  gap: 0;
  margin: 0;
  padding: 0;
  letter-spacing: -0.02em;
  line-height: 1;
}

.header-brand-mobile h2 em,
.header-brand-mobile .brand-word em {
  font-style: italic !important;
  font-weight: 400 !important;
  color: var(--color-ash, #a3a3a6) !important;
  margin-left: 0.5px;
}

.btn-close-drawer {
  display: none !important;
}

/* ==========================================================================
   MAIN CONTENT AREA (Obsidian Canvas)
   ========================================================================== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: row;
  height: 100%;
  height: 100dvh;
  background-color: var(--color-obsidian);
  position: relative;
  overflow: hidden;
  z-index: 10;
}

/* Header inside Chat Column - Seamless Base Obsidian Canvas */
.top-nav {
  height: 64px;
  min-height: 64px;
  padding: 0 var(--spacing-24);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: none;
  background: var(--color-obsidian);
  z-index: 30;
  flex-shrink: 0;
  width: 100%;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: var(--spacing-16);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.model-select-wrapper {
  display: none !important;
}

.model-icon-svg {
  color: var(--color-fog);
  flex-shrink: 0;
}

.model-select {
  background: transparent;
  border: none;
  color: var(--color-pure);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: var(--font-weight-medium);
  outline: none;
  cursor: pointer;
}

.model-select option {
  background: var(--color-graphite);
  color: var(--color-pure);
}

.pill-badge {
  display: none !important;
}

.pill-dot {
  width: 6px;
  height: 6px;
  background: var(--color-cyan-signal);
  border-radius: 50%;
}

/* ==========================================================================
   CHAT VIEWPORT & HERO SECTION (Origin Nocturnal Gallery Greeting)
   ========================================================================== */
.chat-viewport {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-32);
  display: flex;
  flex-direction: column;
  position: relative;
  scroll-behavior: smooth;
}

.chat-viewport::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* ==========================================================================
   HERO / CENTERED STATE (Gemini Style Mode)
   ========================================================================== */
.main-content.state-hero .chat-viewport {
  flex: 0 0 auto;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 var(--spacing-32) var(--spacing-32);
  margin-bottom: var(--spacing-24);
  overflow: visible;
}

.main-content.state-hero .welcome-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: auto;
  margin: 0 auto;
  max-width: 780px;
  width: 100%;
  text-align: center;
  position: relative;
  padding: 0;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.main-content.state-hero .welcome-greeting-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  margin-bottom: var(--spacing-16);
  position: relative;
  z-index: 2;
  animation: elegantFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.main-content.state-hero .messages-list {
  display: none;
}

/* ==========================================================================
   ACTIVE CHAT STATE (Bottom Sticky Dock)
   ========================================================================== */
.main-content.state-chat .chat-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  overflow-y: auto;
  padding: var(--spacing-24) var(--spacing-24) var(--spacing-16);
  width: 100%;
}

.main-content.state-chat .welcome-container {
  display: none !important;
  opacity: 0;
  transform: translateY(-12px);
}

.main-content.state-chat .messages-list {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
}

/* Welcome Container Base */
.welcome-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto;
  max-width: 820px;
  width: 100%;
  text-align: center;
  position: relative;
}

.welcome-greeting-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--spacing-20);
  position: relative;
  z-index: 2;
  animation: elegantFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.welcome-hero-logo-standalone {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.welcome-hero-logo-standalone:hover {
  transform: translateY(-2px) scale(1.04);
}

.welcome-hero-logo {
  width: 46px;
  height: 54px;
  object-fit: contain;
  display: block;
}

@keyframes elegantFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Promo Eyebrow Badge */
.promo-eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  padding: 5px 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--font-weight-regular);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-fog);
}

.promo-eyebrow-badge svg {
  color: var(--color-ash);
}

/* Display Headline in Plus Jakarta Sans */
.greeting-headline {
  font-family: var(--font-headline);
  font-size: var(--text-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--color-cloud);
  max-width: 780px;
  text-wrap: balance;
}

@media (max-width: 768px) {
  .greeting-headline {
    font-size: 34px;
    line-height: 1.2;
    letter-spacing: -0.025em;
  }
}

.greeting-headline em {
  font-style: italic;
  font-family: var(--font-headline);
  color: var(--color-pure);
  font-weight: 500;
}

.greeting-subtitle {
  font-family: var(--font-sans);
  font-size: var(--text-subheading);
  font-weight: var(--font-weight-light);
  line-height: var(--leading-subheading);
  color: var(--color-ash);
  max-width: 620px;
}

/* Preset Suggestion Chips */
.preset-suggestions-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: var(--spacing-8);
}

.preset-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--color-fog);
  text-transform: uppercase;
}

.preset-chips {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.preset-chip {
  min-height: 30px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-buttons);
  color: var(--color-ash);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
}

.preset-chip:hover {
  border-color: var(--border-medium);
  color: var(--color-cloud);
  background: rgba(255, 255, 255, 0.04);
}

/* Precision Monospace System Metadata Readout */
.greeting-telemetry {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-16);
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 1.1px;
  color: var(--color-fog);
  text-transform: uppercase;
  margin-top: var(--spacing-8);
  padding: 6px var(--spacing-16);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-pill);
}

.telemetry-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.telemetry-dot {
  width: 5px;
  height: 5px;
  background: var(--color-cyan-signal);
  border-radius: 50%;
  display: inline-block;
}

.telemetry-sep {
  opacity: 0.3;
}

/* ==========================================================================
   CHAT MESSAGES & BUBBLES
   ========================================================================== */
.messages-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-20);
  max-width: 840px;
  width: 100%;
  margin: 0 auto;
  padding: 0 4px;
}

.message-row {
  display: flex;
  width: 100%;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.message-row.user-row {
  justify-content: flex-end;
}

.message-row.ai-row {
  justify-content: flex-start;
}

.message-bubble {
  font-size: var(--text-body-sm);
  line-height: var(--leading-body-sm);
  border-radius: var(--radius-cards);
  word-break: break-word;
}

.user-bubble {
  max-width: 80%;
  background: var(--color-graphite);
  border: 1px solid var(--border-medium);
  color: var(--color-pure);
  border-radius: 20px;
  padding: 12px 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.ai-bubble {
  width: 100%;
  max-width: 100%;
  background: var(--color-abyss);
  border: 1px solid var(--border-subtle);
  color: var(--color-cloud);
  border-radius: var(--radius-cards);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-16);
  padding: 16px 20px;
}

.ai-reply-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-cloud);
}

.ai-reply-text code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--color-pale-iris);
}

/* ==========================================================================
   TERMINAL CARD (Precision Monospace Console)
   ========================================================================== */
.terminal-card {
  background: var(--color-graphite);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-cards);
  margin-top: var(--spacing-12);
  width: 100%;
  overflow: hidden;
}

.terminal-header {
  padding: var(--spacing-12) var(--spacing-16);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
}

.terminal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--color-pure);
}

.spinner {
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--color-cyan-signal);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.status-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.8px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}

.status-running {
  color: var(--color-cyan-signal);
  background: rgba(0, 179, 221, 0.12);
  border: 1px solid rgba(0, 179, 221, 0.25);
}

.status-success {
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-error {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.terminal-body {
  padding: var(--spacing-16);
  min-height: 100px;
  max-height: 280px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.65;
  background: var(--color-abyss);
  border-top: 1px solid var(--border-subtle);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.terminal-body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.terminal-body.hidden {
  display: none;
}

.terminal-line {
  color: var(--color-ash);
  white-space: pre-wrap;
  word-break: break-all;
}

.terminal-line.success { color: #10b981; }
.terminal-line.info { color: var(--color-cyan-signal); }
.terminal-line.warn { color: #f59e0b; }
.terminal-line.error { color: #ef4444; }

/* ==========================================================================
   RESULT & COMPLETION CARDS (Elevated Gallery Cards)
   ========================================================================== */
.result-card, .edit-card {
  background: var(--color-graphite);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-cards);
  padding: var(--spacing-20);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-16);
  margin-top: var(--spacing-12);
}

.result-header, .edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--spacing-12);
  border-bottom: 1px solid var(--border-subtle);
}

.result-title, .edit-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-badge, .badge-model {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--font-weight-medium);
  background: rgba(132, 125, 255, 0.12);
  border: 1px solid rgba(132, 125, 255, 0.25);
  color: var(--color-pale-iris);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.result-header h3, .edit-title-group strong {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: var(--font-weight-medium);
  color: var(--color-cloud);
  letter-spacing: -0.1px;
}

.url-grid {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-12);
}

.url-box {
  background: var(--color-abyss);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-inputs);
  padding: var(--spacing-12) var(--spacing-16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-16);
}

.url-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.url-label {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-fog);
}

.url-link {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--color-cyan-signal);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.url-link:hover {
  text-decoration: underline;
}

.btn-copy {
  min-height: 32px;
  padding: 0 var(--spacing-16);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--color-pure);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-buttons);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.btn-copy:hover {
  background: var(--color-pure);
  color: var(--color-void);
}

.result-actions {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-8);
  padding-top: var(--spacing-12);
  border-top: 1px solid var(--border-subtle);
  width: 100%;
}

/* Primary CTA Button: White Fill, Black Text, 8px radius with right arrow (21:1 AAA) */
.btn-primary-action {
  width: 100%;
  min-height: 40px;
  padding: 0 var(--spacing-16);
  background: var(--color-pure);
  border: 1px solid var(--color-pure);
  color: var(--color-void);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-buttons);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-primary-action:hover {
  background: var(--color-cloud);
}

.result-actions-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-8);
  width: 100%;
}

.btn-secondary-action {
  width: 100%;
  min-height: 38px;
  padding: 0 var(--spacing-12);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--color-pure);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-buttons);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-secondary-action:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-medium);
}

.btn-revert {
  min-height: 40px;
  padding: 0 var(--spacing-16);
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-buttons);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-revert:hover {
  background: rgba(239, 68, 68, 0.16);
  border-color: #ef4444;
}

/* Changes summary list */
.changes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--color-abyss);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-inputs);
  padding: var(--spacing-16);
}

.change-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--color-cloud);
}

.change-icon-svg {
  color: var(--color-iris-gleam);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ==========================================================================
   LIVE PREVIEW IFRAME CONTAINER (Product Framing)
   ========================================================================== */
.preview-container {
  border: 1px solid var(--border-medium);
  background: var(--color-abyss);
  border-radius: var(--radius-cards);
  display: flex;
  flex-direction: column;
  margin: var(--spacing-12) 0;
  overflow: hidden;
}

.preview-toolbar {
  height: 46px;
  padding: 0 var(--spacing-16);
  background: var(--color-graphite);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-url-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-fog);
}

.preview-url-bar strong {
  color: var(--color-cloud);
}

.preview-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-view-toggle {
  min-height: 28px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--color-ash);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-view-toggle.active, .btn-view-toggle:hover {
  border-color: var(--border-medium);
  color: var(--color-pure);
  background: rgba(255, 255, 255, 0.12);
}

.preview-frame-wrapper {
  width: 100%;
  height: 460px;
  background: #ffffff;
  display: flex;
  justify-content: center;
  margin: 0 auto;
}

.preview-frame-wrapper.mobile-view {
  width: 375px;
  border-left: 1px solid var(--border-medium);
  border-right: 1px solid var(--border-medium);
}

.preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ==========================================================================
   AI PROMPT INPUT BAR & CONTROLS (R-10 Dose Cap: 2 of 2)
   ========================================================================== */
.chat-input-wrapper {
  padding: var(--spacing-16) var(--spacing-32) var(--spacing-20);
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-top: none;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-12);
  width: 100%;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.main-content.state-hero .chat-input-wrapper {
  flex: 0 0 auto;
  margin-bottom: auto;
  max-width: 780px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-top: none;
  padding: 0 var(--spacing-24) var(--spacing-32);
  gap: 16px;
}

.main-content.state-hero .input-controls-bar {
  justify-content: center;
}

.main-content.state-hero .input-box {
  background: #18191b;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  padding: 8px 10px 8px 22px;
  box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.main-content.state-hero .input-box.is-multiline {
  border-radius: 20px;
  padding: 12px 12px 10px 20px;
  align-items: flex-end;
}

.main-content.state-hero .input-box:focus-within {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 24px 52px -10px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.main-content.state-chat .chat-input-wrapper {
  margin-bottom: 0;
  max-width: 820px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-top: none;
  padding: var(--spacing-12) var(--spacing-24) max(var(--spacing-32), env(safe-area-inset-bottom, 32px));
  gap: 16px;
  position: relative;
  z-index: 30;
}

.main-content.state-chat .input-controls-bar {
  justify-content: flex-start;
}

.main-content.state-chat .input-box {
  background: #18191b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  padding: 8px 10px 8px 22px;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.7);
  transition: all 0.2s ease;
}

.main-content.state-chat .input-box.is-multiline {
  border-radius: 20px;
  padding: 12px 12px 10px 20px;
  align-items: flex-end;
}

.main-content.state-chat .input-box:focus-within {
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 20px 44px -8px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.input-controls-bar {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 8px;
  min-height: 30px;
}

.target-controls-group {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  gap: 8px;
}

.clone-options-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
}

.control-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  height: 32px;
  padding: 6px 12px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--color-ash);
  user-select: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.control-chip:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: var(--color-pure);
}

.chip-label {
  color: var(--color-fog);
  font-weight: var(--font-weight-medium);
  font-size: 11px;
  letter-spacing: 0.6px;
}

/* Numeric Stepper Pill */
.chip-numeric {
  cursor: default;
}

.chip-input-wrap {
  display: inline-flex;
  align-items: center;
}

.chip-input {
  -moz-appearance: textfield;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  color: var(--color-pure);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--font-weight-medium);
  width: 44px;
  height: 20px;
  padding: 0 3px;
  outline: none;
  text-align: center;
  transition: all 0.2s ease;
}

.chip-input::-webkit-outer-spin-button,
.chip-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.chip-input:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.chip-input:focus {
  border-color: var(--color-iris-gleam);
}

/* Micro Toggle Switches */
.chip-toggle {
  cursor: pointer;
  position: relative;
}

.chip-toggle .toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.toggle-switch {
  width: 24px;
  height: 13px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.12);
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.toggle-knob {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-ash);
  position: absolute;
  left: 1px;
  transition: all 0.2s ease;
}

.chip-toggle .toggle-input:checked + .toggle-switch {
  background: var(--color-iris-gleam);
  border-color: var(--color-iris-gleam);
}

.chip-toggle .toggle-input:checked + .toggle-switch .toggle-knob {
  transform: translateX(11px);
  background: #ffffff;
}

.chip-toggle:has(.toggle-input:checked) {
  background: rgba(132, 125, 255, 0.08);
  border-color: rgba(132, 125, 255, 0.3);
  color: var(--color-pure);
}

.chip-toggle:has(.toggle-input:checked) .toggle-label {
  color: var(--color-pure);
}

.toggle-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--color-ash);
}

/* Minimalist Info Trigger & Floating Tooltip */
.chip-info-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  color: var(--color-fog);
  cursor: pointer;
  margin-left: 2px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

/* Touch hit target padding for mobile devices */
.chip-info-trigger::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  pointer-events: auto;
}

.chip-info-trigger .info-icon {
  width: 12px;
  height: 12px;
  display: block;
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

/* Focus-visible and Active States (All Devices) */
.chip-info-trigger:focus-visible,
.chip-info-trigger.is-active {
  color: var(--color-pure);
}

.chip-info-trigger:focus-visible .info-icon,
.chip-info-trigger.is-active .info-icon {
  transform: scale(1.15);
  color: var(--color-iris-gleam);
}

/* Elevate chip stacking context so active tooltip stays above neighboring chips */
.control-chip:has(.chip-info-trigger:focus-visible),
.control-chip:has(.chip-info-trigger.is-active),
.control-chip.has-active-tooltip {
  position: relative;
  z-index: 120 !important;
}

/* Desktop Hover Only (prevents sticky hover bug on touch/mobile screens) */
@media (hover: hover) and (pointer: fine) {
  .chip-info-trigger:hover {
    color: var(--color-pure);
  }

  .chip-info-trigger:hover .info-icon {
    transform: scale(1.15);
    color: var(--color-iris-gleam);
  }

  .control-chip:has(.chip-info-trigger:hover) {
    position: relative;
    z-index: 120 !important;
  }

  .chip-info-trigger:hover .chip-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }
}

.chip-tooltip {
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  min-width: 180px;
  max-width: 240px;
  padding: 8px 11px;
  background: rgba(15, 17, 26, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 7px;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.6), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.1px;
  text-transform: none;
  color: #e2e4ec;
  text-align: left;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.2s;
  user-select: text;
}

/* Arrow indicator pointing down */
.chip-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px 5px 0 5px;
  border-style: solid;
  border-color: rgba(15, 17, 26, 0.96) transparent transparent transparent;
}

.chip-tooltip::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.13) transparent transparent transparent;
}

/* Trigger Focus & Active States */
.chip-info-trigger:focus-visible .chip-tooltip,
.chip-info-trigger.is-active .chip-tooltip {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* MUTUAL EXCLUSIVITY: When any chip is active, suppress all other tooltips */
.clone-options-group:has(.chip-info-trigger.is-active) .chip-info-trigger:not(.is-active) .chip-tooltip {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.clone-options-group:has(.chip-info-trigger.is-active) .chip-info-trigger:not(.is-active) {
  color: var(--color-fog) !important;
}

.clone-options-group:has(.chip-info-trigger.is-active) .chip-info-trigger:not(.is-active) .info-icon {
  transform: none !important;
  color: inherit !important;
}

/* Active Target Chip */
.active-target-chip {
  border-color: rgba(132, 125, 255, 0.35);
  background: rgba(132, 125, 255, 0.08);
  max-width: calc(100% - 90px);
  min-width: 0;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  box-sizing: border-box;
}

.target-domain-text {
  color: var(--color-pale-iris);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
  min-width: 0;
  flex: 1 1 auto;
}

.target-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-iris-gleam);
  flex-shrink: 0;
}

.btn-clear-target {
  background: transparent;
  border: none;
  color: var(--color-fog);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-left: 2px;
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.btn-clear-target:hover {
  color: var(--color-pure);
}


/* AI Prompt Input Form */
.chat-form {
  width: 100%;
}

.input-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #18191b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  padding: 8px 10px 8px 22px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-box.is-multiline {
  border-radius: 20px;
  align-items: flex-end;
  padding: 12px 12px 10px 20px;
}

.input-box:focus-within {
  background: #1a1b1d;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 20px 44px -8px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

#user-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fafafa;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: var(--font-weight-regular);
  resize: none;
  outline: none;
  min-height: 24px;
  max-height: 180px;
  line-height: 1.55;
  padding: 6px 4px 6px 0;
  word-break: break-word;
}

#user-input:focus,
#user-input:focus-visible {
  outline: none !important;
}

#user-input::-webkit-scrollbar {
  width: 5px;
}

#user-input::-webkit-scrollbar-track {
  background: transparent;
}

#user-input::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

#user-input::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

#user-input::placeholder {
  color: var(--color-fog);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.btn-send {
  width: 40px;
  height: 40px;
  min-height: 40px;
  min-width: 40px;
  background: rgba(255, 255, 255, 0.16);
  border: none;
  border-radius: 50% !important;
  color: var(--color-pure);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  align-self: center;
}

.input-box.is-multiline .btn-send {
  align-self: flex-end;
  margin-bottom: 2px;
}

.btn-send:hover:not(:disabled) {
  background: var(--color-pure);
  color: var(--color-void);
  transform: scale(1.06);
}

.btn-send svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.2;
}

.btn-send:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

/* Toast Notification (Pill Bar) */
.toast {
  position: fixed;
  top: 80px;
  right: var(--spacing-32);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-width: min(480px, calc(100vw - 48px));
  background: rgba(22, 23, 28, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 12px 8px 16px;
  color: var(--color-pure);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.1px;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1), transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 2147483647 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.toast-message {
  display: inline-block;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
}

.toast-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-fog);
  cursor: pointer;
  padding: 0;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.18);
  color: var(--color-pure);
}

.toast-close:active {
  transform: scale(0.9);
}

/* ==========================================================================
   Confirmation Modal : Ultra-Minimalist Midnight Gallery Dialog
   Adheres to DESIGN.md (Quiet Restraint, Ash/Cloud/Pure) & ANTI_AI_SLOP.md
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 10, 11, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: var(--spacing-16);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  width: 100%;
  max-width: 380px;
  background: #121316;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  transform: scale(0.96) translateY(4px);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-backdrop.show .modal-dialog {
  transform: scale(1) translateY(0);
}

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

.modal-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--color-cloud);
  letter-spacing: -0.01em;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--color-fog);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  color: var(--color-pure);
  background: rgba(255, 255, 255, 0.06);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-description {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-ash);
}

.modal-target-highlight {
  color: var(--color-pure);
  font-weight: 500;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.modal-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-fog);
  flex-wrap: nowrap;
  overflow: hidden;
}

#modal-delete-dir {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

/* Folder name truncates, dots and counts stay fixed */
.modal-meta-row span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.modal-meta-row .meta-dot,
.modal-meta-row span:not(:first-child) {
  flex-shrink: 0;
  white-space: nowrap;
}

.modal-meta-row .meta-dot {
  color: var(--color-steel);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  padding: 0 14px;
  white-space: nowrap;
}

.modal-btn-cancel {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--color-silver);
  font-weight: 400;
}

.modal-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--color-pure);
}

.modal-btn-cancel:focus-visible {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.modal-btn-danger {
  background: #991b1b;
  border-color: rgba(239, 68, 68, 0.25);
  color: #ffffff;
  font-weight: 500;
}

.modal-btn-danger:hover {
  background: #b91c1c;
  border-color: rgba(239, 68, 68, 0.4);
}

.modal-btn-danger:active {
  transform: scale(0.98);
}

.modal-btn-danger:focus-visible {
  outline: none;
  border-color: #f87171;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3);
}

@media (max-width: 480px) {
  .modal-dialog {
    padding: 16px;
  }
  .modal-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* Terms & Conditions Modal (Midnight Gallery Elegance) */
.terms-modal-dialog {
  max-width: 560px;
  max-height: 85vh;
  background: var(--color-abyss);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.terms-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.terms-subtitle {
  font-family: var(--font-sans);
  font-size: 11.5px;
  color: var(--color-fog);
}

.terms-modal-body {
  overflow-y: auto;
  max-height: calc(85vh - 150px);
  padding-right: 6px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.terms-modal-body::-webkit-scrollbar {
  width: 5px;
}

.terms-modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.terms-section-title {
  margin: 0 0 6px 0;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-cloud);
  letter-spacing: -0.01em;
}

.terms-text {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.6;
  color: var(--color-ash);
}

.terms-text strong {
  color: var(--color-pure);
  font-weight: 600;
}

.terms-list {
  margin: 6px 0 0 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.terms-list li {
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.6;
  color: var(--color-ash);
}

.terms-modal-footer {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}

.modal-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--color-pure);
  font-weight: 500;
}

.modal-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}


/* Network UI Row on Active Site Cards */
.clone-network-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(132, 125, 255, 0.05);
  border: 1px solid rgba(132, 125, 255, 0.16);
  border-radius: var(--radius-buttons);
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  margin: 2px 0;
  transition: all 0.2s ease;
}

.clone-network-row:hover {
  background: rgba(132, 125, 255, 0.1);
  border-color: rgba(132, 125, 255, 0.3);
}

.clone-network-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.clone-network-label {
  font-size: 9px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-cyan-signal);
  background: rgba(0, 179, 221, 0.1);
  padding: 1px 4px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.clone-network-url {
  color: var(--color-pale-iris);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clone-network-url:hover {
  color: var(--color-pure);
  text-decoration: underline;
}

.clone-network-copy-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--color-fog);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-family: var(--font-sans);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.clone-network-copy-btn:hover {
  background: var(--color-iris-gleam);
  color: #fff;
  border-color: var(--color-iris-gleam);
}

/* ==========================================================================
   RESPONSIVE DESIGN & MOBILE TOUCH ERGONOMICS (R-03 / Craftsmanship C-4)
   ========================================================================== */

/* Tablet & Mobile Screens (<= 768px) */
/* Tablet & Mobile Screens (<= 768px) */
@media (max-width: 768px) {
  .app-layout {
    display: flex;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .sidebar-backdrop.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* Off-Canvas Mobile Drawer */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(88vw, 320px);
    min-width: 0;
    max-width: 320px;
    margin-left: 0;
    transform: translate3d(0, 0, 0);
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.95);
    z-index: 100;
    opacity: 1;
    visibility: visible;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    border-right: 1px solid var(--border-medium);
    background: var(--color-abyss);
    touch-action: pan-y;
  }

  .sidebar.collapsed {
    transform: translate3d(-105%, 0, 0);
    margin-left: 0;
    opacity: 1;
    visibility: hidden;
    pointer-events: none;
    touch-action: none;
  }

  .sidebar .sidebar-header,
  .sidebar .sidebar-section,
  .sidebar .sidebar-footer {
    width: 100%;
    min-width: 0;
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }

  .sidebar.collapsed .sidebar-header,
  .sidebar.collapsed .sidebar-section,
  .sidebar.collapsed .sidebar-footer {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }

  .sidebar-header {
    height: 56px;
    padding: 0 var(--spacing-16);
  }

  .sidebar-section {
    padding: var(--spacing-16);
    gap: var(--spacing-12);
  }

  .sidebar-footer {
    height: 56px;
    padding: 0 var(--spacing-16);
  }

  .btn-close-drawer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-height: 36px;
    min-width: 36px;
    border-radius: var(--radius-buttons);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-medium);
    color: var(--color-pure);
  }

  .btn-close-drawer:hover {
    background: rgba(255, 255, 255, 0.16);
  }

  /* Compact Top Navigation */
  .top-nav {
    padding: 0 var(--spacing-16);
    height: 56px;
    gap: 12px;
  }

  .nav-left {
    gap: 10px;
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
  }

  .header-desktop-context {
    display: none !important;
  }

  .header-brand-mobile {
    display: flex;
    align-items: center;
    min-width: 0;
    overflow: hidden;
  }

  .header-brand-mobile h2 {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    color: var(--color-cloud);
    display: flex;
    align-items: baseline;
    gap: 4px;
    white-space: nowrap;
    letter-spacing: -0.1px;
    line-height: 1;
  }

  .header-brand-mobile h2 em {
    font-style: italic !important;
    font-weight: 400 !important;
    color: var(--color-ash, #a3a3a6) !important;
  }

  .header-brand-mobile .badge-studio {
    font-family: var(--font-mono);
    font-size: 7.5px;
    font-weight: var(--font-weight-regular);
    background: none;
    color: var(--color-fog);
    border: none;
    padding: 0 0 0 6px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    align-self: center;
  }

  .btn-toggle-sidebar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-buttons);
    color: var(--color-pure);
    flex-shrink: 0;
  }

  .nav-right {
    gap: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
  }

  /* Live Preview disabled and removed from mobile view */
  .btn-toggle-preview {
    display: none !important;
  }

  .view-tab-switcher {
    display: none !important;
  }

  .pill-badge {
    display: none !important;
  }

  .preview-column {
    display: none !important;
  }

  .studio-stage {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    grid-template-columns: 1fr !important;
  }

  .chat-column {
    display: flex !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
    border-right: none !important;
  }

  .model-select-wrapper {
    padding: 4px 8px;
    min-height: 36px;
    height: 36px;
    max-width: 155px;
    gap: 6px;
  }

  .model-select {
    font-size: 11px;
    max-width: 120px;
    text-overflow: ellipsis;
  }

  /* Chat Viewport & Touch Spacing */
  .chat-viewport {
    padding: var(--spacing-12);
  }

  .main-content.state-hero .chat-viewport {
    flex: 0 0 auto;
    margin-top: auto;
    padding: var(--spacing-20) var(--spacing-16) var(--spacing-24);
    margin-bottom: 28px;
    justify-content: center;
  }

  .main-content.state-hero .welcome-container {
    padding: 0;
    min-height: auto;
    max-width: 100%;
    margin: 0 auto;
  }

  .main-content.state-hero .welcome-greeting-card {
    gap: 0;
    max-width: 100%;
    width: 100%;
    margin-bottom: 16px;
  }

  .main-content.state-hero .greeting-headline {
    font-size: clamp(22px, 6vw, 28px);
    line-height: 1.35;
    letter-spacing: -0.2px;
    word-break: break-word;
    text-align: center;
    margin-bottom: 18px;
  }

  .main-content.state-hero .chat-input-wrapper {
    flex: 0 0 auto;
    margin-bottom: auto;
    padding: 0 20px max(var(--spacing-28), env(safe-area-inset-bottom, 28px));
    max-width: 100%;
    gap: 16px;
    background: transparent;
    border-top: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .main-content.state-hero .input-controls-bar {
    justify-content: flex-start;
    overflow: visible !important;
    padding: 0 4px;
  }

  .main-content.state-chat .chat-viewport {
    padding: var(--spacing-16) 18px var(--spacing-12);
  }

  .main-content.state-chat .chat-input-wrapper {
    padding: 8px 18px max(var(--spacing-28), env(safe-area-inset-bottom, 28px));
    gap: 14px;
    background: transparent;
    border-top: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    max-width: 100%;
  }

  /* Chat Message Bubbles */
  .messages-list {
    gap: 16px;
    padding: 0;
  }

  .message-row {
    width: 100%;
  }

  .message-bubble {
    font-size: 13.5px;
  }

  .user-bubble {
    max-width: 88%;
    padding: 10px 15px;
    border-radius: 18px;
  }

  .ai-bubble {
    width: 100%;
    max-width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
  }

  /* Input Controls Bar: Horizontal Swipe Navigation */
  .chat-input-wrapper {
    padding: 8px var(--spacing-12) max(var(--spacing-12), env(safe-area-inset-bottom, 12px)) var(--spacing-12);
    gap: 12px;
  }

  .input-controls-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    overflow: visible !important;
    padding-bottom: 2px;
    width: 100%;
  }

  .clone-options-group {
    overflow: visible !important;
    flex-wrap: wrap;
    row-gap: 8px;
    column-gap: 8px;
    width: 100%;
  }

  /* Mobile Tooltip Optimization */
  .chip-tooltip {
    max-width: min(230px, calc(100vw - 28px));
    width: max-content;
    white-space: normal;
    word-break: break-word;
  }

  /* Right-align the rightmost chip tooltip (YT DOWNLOAD) on mobile to prevent clipping off the right viewport edge */
  #chip-yt-download-toggle .chip-tooltip {
    left: auto;
    right: -6px;
    transform: translateY(5px);
  }

  #chip-yt-download-toggle .chip-info-trigger:hover .chip-tooltip,
  #chip-yt-download-toggle .chip-info-trigger:focus-visible .chip-tooltip,
  #chip-yt-download-toggle .chip-info-trigger.is-active .chip-tooltip {
    transform: translateY(0);
  }

  #chip-yt-download-toggle .chip-tooltip::after,
  #chip-yt-download-toggle .chip-tooltip::before {
    left: auto;
    right: 12px;
    transform: none;
  }

  .control-chip {
    flex-shrink: 0;
    min-height: 34px;
    padding: 6px 12px;
    font-size: 11px;
  }

  .chip-input {
    width: 44px;
    height: 24px;
    font-size: 16px; /* Prevents iOS Safari input auto-zoom */
  }

  /* Chat Textarea & Ergonomic Send Trigger */
  .input-box {
    padding: 7px 8px 7px 18px;
    gap: 12px;
    border-radius: 26px;
  }

  .input-box.is-multiline {
    border-radius: 18px;
    padding: 10px 10px 8px 16px;
  }

  #user-input {
    font-size: 15px;
    min-height: 28px;
    line-height: 1.45;
    padding: 5px 2px 5px 0;
  }

  .btn-send {
    width: 38px;
    height: 38px;
    min-height: 38px;
    min-width: 38px;
    border-radius: 50% !important;
  }

  /* Touch Targets (Minimum 44px for primary interactive elements) */
  .btn-icon, #toggle-sidebar, #btn-refresh-sites {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
  }

  .btn-icon-new {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .btn-icon-new svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2.2;
  }

  .clone-card-mini {
    padding: 10px 12px;
    gap: 6px;
  }

  .clone-domain {
    max-width: 150px;
    font-size: 12.5px;
  }

  .clone-card-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    width: 100%;
  }

  .btn-action-sm {
    min-height: 28px;
    height: 28px;
    padding: 0 4px;
    font-size: 10.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  .btn-copy {
    width: 100%;
    min-height: 40px;
    font-size: 12.5px;
  }

  .btn-primary-action, .btn-secondary-action, .btn-revert {
    width: 100%;
    min-height: 44px;
    font-size: 13.5px;
  }

  /* Active Touch Feedback */
  button:active, a:active, .preset-chip:active, .clone-card-mini:active {
    transform: scale(0.97);
    transition: transform 0.08s ease;
  }

  /* Result & AI Edit Cards Adaptation */
  .result-card, .edit-card {
    padding: var(--spacing-16);
    gap: var(--spacing-12);
  }

  .url-grid {
    gap: 8px;
  }

  .url-box {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px;
  }

  .url-info {
    width: 100%;
  }

  .url-link {
    font-size: 12px;
    white-space: normal;
    word-break: break-all;
    overflow-wrap: anywhere;
  }

  .result-actions {
    flex-direction: column;
    gap: 8px;
  }

  /* Live Preview Iframe Frame */
  .preview-frame-wrapper {
    height: clamp(260px, 45vh, 380px);
    width: 100%;
  }

  .preview-frame-wrapper.mobile-view {
    width: 100%;
  }

  .preview-toolbar {
    padding: 8px 12px;
  }

  .preview-url-bar {
    font-size: 11px;
  }

  .btn-view-toggle {
    min-height: 34px;
    padding: 0 10px;
    font-size: 11px;
  }

  /* Terminal stream mobile scrolling */
  .terminal-card {
    margin-top: 8px;
  }

  .terminal-header {
    padding: 10px 12px;
  }

  .terminal-body {
    padding: 12px;
    max-height: 220px;
    font-size: 10px;
    line-height: 1.55;
  }

  /* Mobile Toast positioning - Sleek Floating Dynamic Capsule with Clean X Button */
  .toast {
    top: 64px;
    bottom: auto;
    left: 50%;
    right: auto;
    transform: translate3d(-50%, -10px, 0);
    width: auto;
    max-width: min(390px, calc(100vw - 28px));
    padding: 7px 8px 7px 14px;
    border-radius: var(--radius-pill);
    text-align: left;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75), 0 2px 8px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    box-sizing: border-box;
    z-index: 2147483647 !important;
  }

  .toast.show {
    transform: translate3d(-50%, 0, 0);
  }

  .toast .toast-message {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.35;
  }

  /* Mobile Toast X Button: Elegant, touch-friendly circular dismiss pill */
  .toast .toast-close {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--color-fog);
    flex-shrink: 0;
    margin-left: 4px;
    border: none;
    padding: 0;
    transition: all 0.15s ease;
  }

  .toast .toast-close:hover,
  .toast .toast-close:active {
    background: rgba(255, 255, 255, 0.18);
    color: var(--color-pure);
    transform: scale(0.92);
  }

  .active-target-chip {
    max-width: 140px;
  }

  .target-domain-text {
    max-width: 80px;
  }
}

/* Small Smartphones (<= 480px) */
@media (max-width: 480px) {
  .top-nav {
    padding: 0 12px;
    height: 52px;
    gap: 8px;
  }

  .nav-left {
    gap: 8px;
  }

  .btn-toggle-sidebar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  .header-brand-mobile h2 {
    font-size: 13px;
    gap: 3px;
  }

  .header-brand-mobile .badge-studio {
    display: none;
  }

  .nav-right {
    gap: 6px;
  }

  .model-select-wrapper {
    padding: 3px 6px;
    height: 34px;
    min-height: 34px;
    max-width: 135px;
    gap: 4px;
  }

  .model-select {
    font-size: 10.5px;
    max-width: 100px;
  }

  .main-content.state-hero .chat-viewport {
    padding: var(--spacing-16) 16px var(--spacing-20);
    margin-bottom: 24px;
  }

  .greeting-headline {
    font-size: 24px;
    line-height: 1.35;
    margin-bottom: 20px;
  }

  .main-content.state-hero .chat-input-wrapper {
    padding: 0 16px max(var(--spacing-24), env(safe-area-inset-bottom, 24px));
    gap: 14px;
  }

  .main-content.state-chat .chat-viewport {
    padding: 14px 16px 8px;
  }

  .user-bubble {
    max-width: 90%;
    padding: 9px 14px;
    font-size: 13px;
    border-radius: 16px;
  }

  .ai-bubble {
    padding: 12px 14px;
    font-size: 13px;
  }

  .main-content.state-chat .chat-input-wrapper {
    padding: 8px 16px max(var(--spacing-24), env(safe-area-inset-bottom, 24px));
    gap: 12px;
  }

  .input-box {
    padding: 6px 6px 6px 16px;
    border-radius: 24px;
  }

  .input-box.is-multiline {
    border-radius: 16px;
    padding: 8px 8px 8px 14px;
  }

  .btn-send {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50% !important;
  }

  .greeting-subtitle {
    font-size: 12.5px;
  }

  .preset-chips {
    gap: 6px;
  }

  .preset-chip {
    min-height: 40px;
    font-size: 12px;
  }

  .greeting-telemetry {
    font-size: 8.5px;
    gap: 4px;
    border-radius: var(--radius-buttons);
  }

  .telemetry-sep {
    display: none;
  }

  .model-select {
    max-width: 100px;
    font-size: 10.5px;
  }
}

/* ==========================================================================
   STUDIO STAGE : SIDE-BY-SIDE SPLIT ARCHITECTURE (FLUID SPLIT ENGINE)
   ========================================================================== */
.studio-stage {
  display: flex;
  flex-direction: row;
  height: 100%;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  position: relative;
  background-color: var(--color-obsidian);
}

.studio-stage.is-resizing {
  user-select: none !important;
}

.studio-stage.is-resizing * {
  user-select: none !important;
}

/* LEFT COLUMN : CHAT & AGENT STREAMER */
.chat-column {
  min-width: 360px;
  width: var(--chat-column-width, 480px);
  flex-shrink: 0;
  flex-grow: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  border-right: none;
  background: var(--color-obsidian);
  position: relative;
  z-index: 15;
  overflow: hidden;
  transition: border-color 0.44s ease;
  will-change: width;
}

.studio-stage.is-resizing .chat-column {
  transition: none !important;
  will-change: auto;
}

.chat-column .chat-viewport {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-20);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

.chat-column .chat-input-wrapper {
  padding: var(--spacing-16) var(--spacing-20) max(var(--spacing-20), env(safe-area-inset-bottom, 20px));
  width: 100%;
  max-width: 100%;
  border-top: none;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Toggle Live Preview Button in Navbar - matches .btn-toggle-sidebar colors & behavior */
.btn-toggle-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  min-height: 36px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-buttons);
  color: var(--color-ash);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-toggle-preview:hover,
.btn-toggle-preview.active:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-medium);
  color: var(--color-pure);
  transform: none;
}

.btn-toggle-preview:active {
  transform: scale(0.95);
}

/* Identical calm treatment to .btn-toggle-sidebar: no color change when active */
.btn-toggle-preview.active {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-subtle);
  color: var(--color-ash);
  box-shadow: none;
  transform: none;
}

.btn-toggle-preview .preview-toggle-icon {
  opacity: 0.8;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.btn-toggle-preview:hover .preview-toggle-icon,
.btn-toggle-preview.active:hover .preview-toggle-icon {
  opacity: 1;
}

/* ==========================================================================
   USER PROFILE NAVBAR DROPDOWN & MENU
   ========================================================================== */
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-profile-wrapper {
  position: relative;
  display: inline-flex;
}

.btn-user-menu {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  min-height: 36px;
  padding: 0 10px 0 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  color: var(--color-silver);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-user-menu:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-medium);
  color: var(--color-pure);
}

.btn-user-menu:active {
  transform: scale(0.97);
}

.user-avatar-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #e4e4e7;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

.user-nav-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-chevron-svg {
  opacity: 0.6;
  transition: transform 0.2s ease;
}

.user-dropdown-card {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: #18191c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 1px rgba(255, 255, 255, 0.15);
  padding: 8px;
  z-index: 1000;
  animation: dropdownFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.user-dropdown-info {
  padding: 8px 10px;
}

.user-dropdown-name {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-email {
  font-size: 11.5px;
  color: #8e8f94;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.user-dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 6px 0;
}

.user-dropdown-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #cacaca;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.user-dropdown-btn:hover {
  background: rgba(255, 68, 68, 0.12);
  color: #ff6b6b;
}

/* ==========================================================================
   DRAGGABLE STAGE RESIZER / SPLITTER HANDLE
   ========================================================================== */
.stage-resizer {
  position: relative;
  width: 4px;
  flex-shrink: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.06);
  cursor: col-resize;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.28s ease,
              background 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.2s ease;
  touch-action: none;
  outline: none;
}

/* Invisible hit area expansion to 16px for comfortable grab */
.stage-resizer::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -6px;
  right: -6px;
  cursor: col-resize;
  z-index: 1;
}

.stage-resizer:hover,
.stage-resizer.is-active,
body.is-resizing-stage .stage-resizer {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: none;
}

.resizer-handle-pill {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 4px;
  height: 32px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.18);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.stage-resizer:hover .resizer-handle-pill,
.stage-resizer.is-active .resizer-handle-pill,
body.is-resizing-stage .resizer-handle-pill {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  height: 40px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

body.is-resizing-stage {
  cursor: col-resize !important;
  user-select: none !important;
}

body.is-resizing-stage iframe {
  pointer-events: none !important;
}

/* RIGHT COLUMN : LIVE PREVIEW PANEL (100% Full Height like Sidebar) */
.preview-column {
  flex: 1 1 0%;
  min-width: 0;
  height: 100%;
  height: 100dvh;
  background: var(--color-obsidian);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  opacity: 1;
  transform: translate3d(0, 0, 0);
  border-left: 1px solid var(--border-subtle);
  transition: transform 0.44s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-left-color 0.3s ease;
  will-change: transform, opacity;
  container-type: inline-size;
  container-name: preview-col;
}

.preview-column > * {
  min-width: 0;
}

/* COMPLETE HIDE MODE (Ultra-Smooth Fluid Collapse & Slide Out) */
.studio-stage.preview-hidden .stage-resizer {
  width: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.studio-stage.preview-hidden .chat-column {
  border-right-color: transparent !important;
  align-items: stretch;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

.studio-stage.preview-hidden .chat-column .chat-viewport {
  width: 100% !important;
  max-width: 100% !important;
  align-self: stretch;
}

.studio-stage.preview-hidden .chat-column .chat-input-wrapper {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

.studio-stage.preview-hidden .preview-column {
  opacity: 0 !important;
  transform: translate3d(48px, 0, 0) !important;
  pointer-events: none !important;
  border-left-color: transparent !important;
}

.preview-top-toolbar {
  height: 64px;
  min-height: 64px;
  min-width: 0;
  padding: 0 var(--spacing-20);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: none;
  background: var(--color-obsidian);
  z-index: 20;
  flex-shrink: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.preview-top-toolbar::-webkit-scrollbar {
  display: none;
}

.preview-site-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.live-dot-pulse {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  flex-shrink: 0;
}

.site-meta-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.preview-site-name {
  font-size: 12.5px;
  font-weight: var(--font-weight-medium);
  color: var(--color-pure);
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.preview-site-port {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--color-cyan-signal);
  background: rgba(0, 179, 221, 0.08);
  border: 1px solid rgba(0, 179, 221, 0.2);
  border-radius: var(--radius-pill);
  padding: 1px 7px;
  flex-shrink: 0;
}

/* Device Switcher */
.preview-device-switch {
  display: flex;
  align-items: center;
  gap: 3px;
  background: var(--color-graphite);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-buttons);
  padding: 3px;
  flex-shrink: 0;
}

.device-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: var(--font-weight-medium);
  color: var(--color-ash);
  background: transparent;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.device-btn:hover {
  color: var(--color-pure);
  background: rgba(255, 255, 255, 0.06);
}

.device-btn.active {
  color: var(--color-pure);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.preview-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-preview-tool {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-buttons);
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-ash);
  cursor: pointer;
  transition: all 0.18s ease;
  text-decoration: none;
}

.btn-preview-tool:hover {
  border-color: var(--border-medium);
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-pure);
}

/* Container queries: Responsive toolbar collapse for narrow split preview */
@container preview-col (max-width: 620px) {
  .preview-top-toolbar {
    padding: 0 12px;
    gap: 8px;
  }
  .preview-device-switch .device-btn span {
    display: none !important;
  }
  .preview-device-switch .device-btn {
    padding: 5px 6px !important;
    gap: 0 !important;
  }
  .preview-actions .btn-builder-toggle .builder-toggle-text,
  .preview-actions .btn-seo-audit .seo-toggle-text {
    display: none !important;
  }
  .preview-actions .btn-builder-toggle,
  .preview-actions .btn-seo-audit {
    width: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    gap: 0 !important;
    justify-content: center !important;
  }
  .preview-site-name {
    max-width: 85px !important;
  }
}

@container preview-col (max-width: 480px) {
  .preview-top-toolbar {
    padding: 0 8px;
    gap: 6px;
  }
  .preview-site-indicator .site-meta-wrap {
    display: none !important;
  }
  .preview-actions {
    gap: 4px !important;
  }
}

/* Viewport Area */
.preview-viewport-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: var(--spacing-16);
  position: relative;
  background: var(--color-obsidian);
}

.preview-frame-device-wrapper {
  transition: border-radius 0.3s ease,
              border-width 0.3s ease;
  background: #ffffff;
  display: flex;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  transform: translateZ(0);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
  isolation: isolate;
}

.preview-frame-device-wrapper.device-desktop {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-cards);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

.preview-frame-device-wrapper.device-desktop .live-preview-iframe {
  border-radius: calc(var(--radius-cards) - 1px);
}

.preview-frame-device-wrapper.device-tablet {
  width: 768px;
  max-width: 100%;
  height: 100%;
  max-height: 1024px;
  border-radius: 28px;
  border: 12px solid #1c1d22;
  box-shadow: 
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 24px 60px -12px rgba(0, 0, 0, 0.8),
    0 0 0 2px #0f1013;
}

.preview-frame-device-wrapper.device-tablet .live-preview-iframe {
  border-radius: 16px;
}

.preview-frame-device-wrapper.device-mobile {
  width: 380px;
  max-width: 100%;
  height: 100%;
  max-height: 820px;
  border-radius: 46px;
  border: 10px solid #1c1d22;
  box-shadow: 
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 24px 60px -10px rgba(0, 0, 0, 0.85),
    0 0 0 2px #0f1013;
}

.preview-frame-device-wrapper.device-mobile .live-preview-iframe {
  border-radius: 36px;
}

.live-preview-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #000000;
  display: block;
}

/* Empty State (Ultra-Minimalist Dark Studio Canvas) */
.preview-empty-state {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-32);
  background: var(--color-obsidian);
  z-index: 10;
}

.preview-empty-state.show {
  display: flex;
}

.empty-state-minimal {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 320px;
}

.empty-minimal-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--color-cloud);
  letter-spacing: -0.2px;
}

.empty-minimal-title em {
  font-style: italic;
  color: var(--color-pure);
}

.empty-minimal-hint {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-fog);
  letter-spacing: 0.3px;
}

/* Quick Prompts Grid */
.quick-prompts-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 480px;
  margin-top: var(--spacing-20);
}

.quick-prompt-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--color-graphite);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-buttons);
  color: var(--color-cloud);
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
}

.quick-prompt-chip:hover {
  background: var(--color-graphite-hover);
  border-color: var(--border-medium);
  color: var(--color-pure);
  transform: translateY(-1px);
}

.greeting-subtext {
  font-size: 13.5px;
  color: var(--color-ash);
  line-height: 1.55;
  margin-top: 8px;
  max-width: 480px;
}

/* Real-Time Agent Tool Streaming Cards */
.agent-stream-card {
  background: var(--color-graphite);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-cards);
  overflow: hidden;
  margin-top: 10px;
  animation: fadeIn 0.25s ease;
  width: 100%;
}

.agent-stream-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
}

.agent-stream-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--color-cloud);
  font-weight: var(--font-weight-medium);
}

.tool-steps-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tool-steps-container::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.tool-step-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font-size: 12px;
  animation: fadeIn 0.2s ease;
}

.tool-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tool-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--color-pale-iris);
  background: rgba(132, 125, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.tool-arg-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-ash);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.tool-status-icon {
  font-size: 12px;
  flex-shrink: 0;
}

.tool-result-preview {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--color-fog);
  white-space: pre-wrap;
  word-break: break-word;
  padding-top: 4px;
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
}


/* Tablet & Mobile Screens (<= 1024px) */
@media (max-width: 1024px) {
  .btn-toggle-preview {
    display: none !important;
  }

  .stage-resizer {
    display: none !important;
  }

  .preview-column {
    display: none !important;
  }

  .studio-stage {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
    height: 100dvh !important;
    grid-template-columns: 1fr !important;
  }

  .chat-column {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    border-right: none !important;
    display: flex !important;
    flex: 1 1 auto !important;
  }
}

/* ============================================================================= */
/* BUILDER MODE & VISUAL INSPECTOR */
/* ============================================================================= */

.btn-builder-toggle {
  width: auto !important;
  padding: 0 10px !important;
  gap: 6px !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  color: var(--color-ash) !important;
  border: 1px solid var(--border-subtle) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-builder-toggle:hover {
  border-color: rgba(255, 255, 255, 0.25) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--color-pure) !important;
}

.btn-builder-toggle.active {
  border-color: rgba(255, 255, 255, 0.3) !important;
  background: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

.btn-builder-toggle.active svg {
  stroke: #ffffff !important;
  filter: none !important;
}

.builder-toggle-text {
  letter-spacing: 0.2px;
}

/* Preview Toolbar SEO Audit Button */
.btn-preview-tool.btn-seo-audit {
  width: auto !important;
  min-width: unset !important;
  height: 32px !important;
  padding: 0 10px !important;
  gap: 6px !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  color: var(--color-ash) !important;
  border: 1px solid var(--border-subtle) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border-radius: var(--radius-buttons) !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-preview-tool.btn-seo-audit:hover {
  border-color: rgba(16, 185, 129, 0.35) !important;
  background: rgba(16, 185, 129, 0.08) !important;
  color: #34d399 !important;
  transform: translateY(-1px);
}

.btn-preview-tool.btn-seo-audit svg {
  flex-shrink: 0 !important;
  display: block !important;
  stroke: #10b981 !important;
  transition: transform 0.18s ease, stroke 0.18s ease !important;
}

.btn-preview-tool.btn-seo-audit:hover svg {
  stroke: #34d399 !important;
  transform: scale(1.08);
}

.btn-preview-tool.btn-seo-audit .seo-toggle-text {
  letter-spacing: 0.3px;
  font-weight: 600;
  font-size: 11px;
}

/* Floating Builder Control Bar (Ultra-Compact & Minimalist) */
.builder-floating-bar {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  background: rgba(15, 17, 21, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9999px;
  padding: 4px 6px 4px 10px;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
  animation: builderBarSlideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
  user-select: none;
  touch-action: none;
  cursor: grab;
}

.builder-floating-bar.is-dragged {
  animation: none !important;
  transform: none !important;
}

.builder-floating-bar.is-dragging {
  cursor: grabbing !important;
  user-select: none !important;
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.65), 0 4px 12px rgba(0, 0, 0, 0.4) !important;
  opacity: 0.96;
  transition: none !important;
}

.builder-drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 24px;
  color: #71717a;
  cursor: grab;
  padding: 0 1px;
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.builder-floating-bar:hover .builder-drag-handle {
  color: #a1a1aa;
}

.builder-floating-bar.is-dragging .builder-drag-handle {
  cursor: grabbing !important;
  color: #00c896 !important;
}

@keyframes builderBarSlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.builder-status-badge {
  display: flex;
  align-items: center;
  gap: 7px;
}

.builder-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00c896;
  flex-shrink: 0;
}

.builder-status-title {
  font-size: 11.5px;
  font-weight: 500;
  color: #e4e4e7;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.builder-kbd-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-family: inherit;
  font-weight: 500;
  color: #71717a;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 1px 4px;
  line-height: 1.2;
}

.builder-bar-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.09);
  margin: 0 2px;
  flex-shrink: 0;
}

.builder-floating-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Mode Switch: Selector vs Spectator */
.builder-mode-toggle {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  padding: 3px 4px;
  gap: 2px;
}

.btn-builder-mode-opt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
  color: #a1a1aa;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.btn-builder-mode-opt:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-builder-mode-opt.active {
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.btn-builder-mode-opt#btn-mode-selector.active {
  background: rgba(0, 200, 150, 0.2);
  color: #00c896;
  border-color: rgba(0, 200, 150, 0.38);
}

.btn-builder-mode-opt#btn-mode-spectator.active {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.38);
}

.btn-builder-bar {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-builder-undo,
.btn-builder-redo {
  background: transparent;
  color: #a1a1aa;
  border: 1px solid transparent;
}

.btn-builder-undo:hover:not(:disabled),
.btn-builder-redo:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-builder-undo:active:not(:disabled),
.btn-builder-redo:active:not(:disabled) {
  transform: scale(0.97);
}

.btn-builder-undo:disabled,
.btn-builder-redo:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  color: #52525b;
}

.btn-builder-undo:focus-visible,
.btn-builder-redo:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 1.5px #00c896 !important;
}

.btn-builder-done {
  background: #f4f4f5;
  color: #090a0d;
  font-weight: 600;
  padding: 0 11px;
}

.btn-builder-done:hover {
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.btn-builder-done:active {
  transform: scale(0.97);
}

/* Builder Modal Specifics */
.builder-modal-backdrop {
  background: rgba(8, 9, 11, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1050;
}

.builder-modal-dialog {
  max-width: 520px;
  background: #16171a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.builder-modal-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.builder-modal-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e4e4e7;
  flex-shrink: 0;
}

.builder-modal-subtitle {
  font-size: 11.5px;
  color: var(--color-fog, #71737a);
  display: block;
  margin-top: 2px;
}

.builder-modal-body {
  padding: 18px 24px;
}

/* Image Preview Card in Modal */
.builder-image-preview-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.builder-preview-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-ash, #9a9ca1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.builder-img-box {
  width: 100%;
  max-height: 140px;
  min-height: 80px;
  background: #0d0e10;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px dashed rgba(255, 255, 255, 0.08);
}

.builder-img-box img {
  max-width: 100%;
  max-height: 130px;
  object-fit: contain;
  display: block;
}

.builder-img-meta {
  font-size: 11px;
  color: var(--color-fog, #71737a);
  word-break: break-all;
  font-family: ui-monospace, monospace;
}

/* Segmented Tabs */
.builder-tabs {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 14px;
}

.builder-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--color-ash);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
}

.builder-tab:hover {
  color: var(--color-pure);
}

.builder-tab.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Dropzone */
.builder-dropzone {
  border: 1.5px dashed rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.builder-dropzone:hover,
.builder-dropzone.dragover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.dropzone-icon {
  color: #e4e4e7;
  margin-bottom: 2px;
}

.dropzone-text {
  font-size: 12.5px;
  color: #e2e4e9;
}

.dropzone-text strong {
  color: #ffffff;
}

.dropzone-hint {
  font-size: 12px;
  color: var(--color-fog);
}

.upload-file-status {
  font-size: 12px;
  color: #00b3dd;
  font-weight: 500;
  margin-top: 4px;
}

/* Inputs */
.builder-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.builder-input-group label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--color-ash);
}

.builder-text-input {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #ffffff;
  font-size: 12.5px;
  outline: none;
  transition: all 0.18s ease;
}

.builder-text-input:focus {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.builder-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #e2e4e9;
  cursor: pointer;
}

.builder-checkbox-label code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 11px;
  color: #e4e4e7;
}

.modal-btn-save-builder {
  background: #f4f4f5 !important;
  color: #090a0d !important;
  border: 1px solid #ffffff !important;
  font-weight: 550 !important;
  padding: 8px 18px !important;
  border-radius: 8px !important;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.modal-btn-save-builder:hover {
  background: #ffffff !important;
  border-color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* =============================================================================
   BUILDER PROPERTIES PANEL (Inspector, Live CSS & Asset Editor)
   ============================================================================= */

/* Iframe and Container Transition on Panel Open */
.preview-column {
  position: relative;
}

.preview-viewport-container {
  box-sizing: border-box;
}

.preview-column.panel-open .preview-viewport-container {
  margin-right: 340px;
}

/* Panel Root */
.builder-props-panel {
  position: absolute;
  top: 64px;
  right: 0;
  bottom: 0;
  width: 340px;
  background: #111318;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease;
  z-index: 50;
  box-shadow: none;
  overflow: hidden;
  font-family: var(--font-sans);
}

.builder-props-panel.visible {
  transform: translateX(0);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.55);
}

/* Header */
.props-panel-header {
  padding: 10px 12px;
  background: #13151c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.props-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.props-element-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  overflow: hidden;
}

.props-tag-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(0, 200, 150, 0.12);
  color: #00e0a8;
  border: 1px solid rgba(0, 200, 150, 0.22);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.props-element-meta {
  font-size: 11px;
  color: #a1a1aa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.props-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-props-header {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d4d4d8;
  border-radius: 4px;
  padding: 3px 7px;
  height: 26px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-props-header:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-props-close {
  padding: 3px 6px;
}

/* Breadcrumb */
.props-breadcrumb-wrap {
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.props-breadcrumb-wrap::-webkit-scrollbar {
  display: none;
}

.props-breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-family: var(--font-mono);
}

.props-crumb-item {
  color: #71717a;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 3px;
  transition: all 0.15s ease;
  user-select: none;
}

.props-crumb-item:hover {
  color: #00c896;
  background: rgba(0, 200, 150, 0.1);
}

.props-crumb-item.active {
  color: #00c896;
  font-weight: 700;
  background: rgba(0, 200, 150, 0.12);
}

.props-crumb-sep {
  color: rgba(255, 255, 255, 0.2);
  font-size: 9px;
  user-select: none;
}

/* Tabs */
.props-nav-tabs {
  display: flex;
  background: #13151c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0 8px;
  flex-shrink: 0;
}

.props-nav-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 6px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #828599;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.15s ease;
}

.props-nav-tab:hover {
  color: #f4f4f5;
}

.props-nav-tab.active {
  color: #00c896;
  border-bottom-color: #00c896;
  font-weight: 600;
}

.props-nav-tab:focus,
.props-nav-tab:focus-visible {
  outline: none !important;
  color: #ffffff;
}

/* Body & Cards */
.props-panel-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
}

.props-tab-pane {
  display: none;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.props-tab-pane.active {
  display: flex;
}

.props-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.props-card:hover {
  border-color: rgba(255, 255, 255, 0.08);
}

.props-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 22px;
}

.props-card-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
}

.props-card-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #a1a1aa;
  font-family: monospace;
}

.props-card-header-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.props-card-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  color: #a1a1aa;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 2px 7px;
  height: 22px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.props-card-action-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.props-card-action-btn svg {
  color: #847dff;
  flex-shrink: 0;
}

/* Container Elements Navigator */
.props-container-notice {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 11px;
  line-height: 1.45;
  color: #94a3b8;
  background: rgba(0, 200, 150, 0.04);
  border: 1px solid rgba(0, 200, 150, 0.14);
  border-radius: 6px;
  padding: 8px 10px;
}

.props-container-notice .props-notice-icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: #00c896;
}

.props-child-chips-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 190px;
  overflow-y: auto;
  padding-right: 2px;
}

.props-child-chips-wrap::-webkit-scrollbar {
  width: 4px;
}

.props-child-chips-wrap::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
}

.props-child-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  width: 100%;
}

.props-child-chip:hover {
  background: rgba(0, 200, 150, 0.08);
  border-color: rgba(0, 200, 150, 0.35);
  transform: translateX(2px);
}

.props-child-chip-tag {
  font-family: monospace;
  font-size: 10px;
  font-weight: 600;
  color: #00c896;
  background: rgba(0, 200, 150, 0.12);
  border: 1px solid rgba(0, 200, 150, 0.22);
  padding: 1px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.props-child-chip-text {
  font-size: 11px;
  color: #e2e8f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.props-child-chip-arrow {
  color: #64748b;
  font-size: 11px;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.props-child-chip:hover .props-child-chip-arrow {
  color: #00c896;
}

.props-container-empty-hint {
  font-size: 11px;
  color: #64748b;
  font-style: italic;
  padding: 4px 2px;
}

.props-container-actions {
  margin-top: 4px;
}

.props-btn-switch-style {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 500;
  color: #00c896;
  background: rgba(0, 200, 150, 0.08);
  border: 1px solid rgba(0, 200, 150, 0.2);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.props-btn-switch-style:hover {
  background: rgba(0, 200, 150, 0.16);
  border-color: rgba(0, 200, 150, 0.4);
}

/* Fields & Inputs */
.props-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.props-field label {
  font-size: 11px;
  color: #828599;
  font-weight: 500;
}

.props-input {
  width: 100%;
  height: 30px;
  background: #0d0f15;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 5px;
  color: #f4f4f5;
  font-size: 12px;
  font-family: var(--font-sans);
  padding: 0 9px;
  outline: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-sizing: border-box;
}

.props-input:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: #0f1118;
}

.props-input:focus,
.props-input:focus-visible {
  outline: none !important;
  border-color: #00c896 !important;
  box-shadow: 0 0 0 2px rgba(0, 200, 150, 0.15) !important;
  background: #0d0f15;
}

.props-textarea {
  width: 100%;
  background: #0d0f15;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 5px;
  color: #f4f4f5;
  font-size: 12px;
  font-family: var(--font-sans);
  padding: 6px 9px;
  outline: none !important;
  resize: vertical;
  line-height: 1.45;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-sizing: border-box;
}

.props-textarea:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: #0f1118;
}

.props-textarea:focus,
.props-textarea:focus-visible {
  outline: none !important;
  border-color: #00c896 !important;
  box-shadow: 0 0 0 2px rgba(0, 200, 150, 0.15) !important;
  background: #0d0f15;
}

.props-code-font {
  font-family: var(--font-mono);
  font-size: 11px;
}

.props-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.props-select {
  width: 100%;
  height: 30px;
  background: #0d0f15;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 5px;
  color: #f4f4f5;
  font-size: 12px;
  padding: 0 8px;
  outline: none !important;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.props-select:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: #0f1118;
}

.props-select:focus,
.props-select:focus-visible {
  outline: none !important;
  border-color: #00c896 !important;
  box-shadow: 0 0 0 2px rgba(0, 200, 150, 0.15) !important;
}

.props-select:focus,
.props-select:focus-visible {
  outline: none !important;
  border-color: #00c896 !important;
  box-shadow: 0 0 0 1px #00c896 !important;
}

/* Color Picker */
.props-color-picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.props-native-color {
  -webkit-appearance: none;
  appearance: none;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.props-native-color::-webkit-color-swatch-wrapper {
  padding: 0;
}

.props-native-color::-webkit-color-swatch {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
}

.props-color-hex {
  flex: 1;
  font-family: var(--font-mono);
}

/* Studio Inspector: Advanced Gradient Controller (Impeccable Craft) */
.props-gradient-card {
  position: relative;
  overflow: visible;
}

.props-gradient-bar-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.props-gradient-bar {
  flex: 1;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.2);
  background-size: cover;
  transition: background 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.props-btn-gradient-swap {
  width: 28px;
  height: 26px;
  background: #181920;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #a1a1aa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  flex-shrink: 0;
}

.props-btn-gradient-swap:hover {
  background: rgba(0, 200, 150, 0.14);
  color: #00c896;
  border-color: rgba(0, 200, 150, 0.4);
  transform: rotate(180deg);
}

.props-mini-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 6px;
  border-radius: 9999px;
  background: rgba(0, 200, 150, 0.1);
  border: 1px solid rgba(0, 200, 150, 0.25);
  color: #00c896;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.props-btn-text-action {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: #a1a1aa;
  font-size: 9px;
  font-weight: 500;
  padding: 1px 5px;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.props-btn-text-action:hover {
  background: rgba(0, 200, 150, 0.1);
  border-color: rgba(0, 200, 150, 0.35);
  color: #00c896;
}

/* Theme Colors / Site Palette Card Styles */
.props-palette-card {
  position: relative;
}

.props-btn-icon-subtle {
  background: none;
  border: none;
  color: #71717a;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}

.props-btn-icon-subtle:hover {
  color: #e4e4e7;
  background: rgba(255, 255, 255, 0.05);
}

.props-palette-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 120px;
  overflow-y: auto;
  padding-right: 2px;
}

.props-palette-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  border-radius: 5px;
  background: #14151a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  color: #d4d4d8;
}

.props-palette-chip:hover {
  border-color: rgba(0, 200, 150, 0.4);
  background: rgba(0, 200, 150, 0.06);
  transform: translateY(-1px);
}

.props-palette-chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.props-palette-chip-count {
  font-size: 9px;
  color: #71717a;
}

.props-palette-replace-panel {
  background: #121318;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 8px;
}

.props-btn-close-mini {
  background: none;
  border: none;
  color: #71717a;
  font-size: 10px;
  cursor: pointer;
  padding: 0;
}

.props-btn-close-mini:hover {
  color: #e4e4e7;
}

.props-btn-apply-global {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  color: #e4e4e7;
  font-weight: 600;
  font-size: 11px;
  border-radius: 5px;
  padding: 6px 10px;
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  box-shadow: none;
  transition: background 0.15s ease, transform 0.12s ease;
}

.props-btn-apply-global:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.props-gradient-presets {
  display: flex;
  align-items: center;
  gap: 6px;
}

.props-gradient-preset-chip {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.15s ease, box-shadow 0.15s ease;
  padding: 0;
}

.props-gradient-preset-chip:hover {
  transform: scale(1.25);
  border-color: #ffffff;
  box-shadow: 0 0 8px rgba(0, 200, 150, 0.45);
}

/* Compact Integrated Color Input */
.props-compact-color-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.props-compact-color-field label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #71717a;
}

.props-color-input-combo {
  position: relative;
  display: flex;
  align-items: center;
}

.props-color-swatch-btn {
  position: absolute;
  left: 6px;
  width: 17px;
  height: 17px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 1;
}

.props-color-input-combo .props-native-color {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 22px;
  height: 22px;
  opacity: 0;
  cursor: pointer;
  z-index: 3;
}

.props-color-input-combo .props-input {
  padding-left: 28px !important;
  font-family: var(--font-mono, monospace) !important;
  font-size: 11px !important;
  height: 30px !important;
  letter-spacing: 0.02em;
}


/* Input With Unit Dropdown */
.props-input-with-unit {
  position: relative;
  display: flex;
  align-items: center;
}

.props-input-with-unit .props-input {
  padding-right: 50px;
}

.props-unit-select {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 46px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0 5px 5px 0;
  color: #a1a1aa;
  font-size: 11px;
  text-align: center;
  outline: none !important;
  cursor: pointer;
  transition: color 0.15s ease;
}

.props-unit-select:focus,
.props-unit-select:focus-visible {
  outline: none !important;
  color: #00c896;
}

/* Box Model Spacing Grid */
.props-box-model-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.props-box-input-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.props-box-label {
  font-size: 11px;
  text-transform: uppercase;
  color: #71717a;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.props-box-input {
  text-align: center;
  padding: 0 4px;
  height: 30px;
  font-size: 11px;
}

.props-btn-icon-toggle {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #71717a;
  border-radius: 4px;
  padding: 3px 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: all 0.15s ease;
}

.props-btn-icon-toggle.active {
  color: #00c896;
  border-color: rgba(0, 200, 150, 0.3);
  background: rgba(0, 200, 150, 0.08);
}

/* Segmented Control */
.props-segmented-control {
  display: flex;
  background: #0b0c10;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.props-segment-btn {
  flex: 1;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 4px;
  color: #828599;
  cursor: pointer;
  transition: all 0.15s ease;
}

.props-segment-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.props-segment-btn.active {
  color: #00c896;
  background: rgba(0, 200, 150, 0.14);
}

.props-segment-btn:focus,
.props-segment-btn:focus-visible {
  outline: none !important;
  box-shadow: inset 0 0 0 1.5px #00c896 !important;
}

/* Action Buttons */
.btn-props-action {
  width: 100%;
  height: 34px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.btn-props-primary {
  background: #00c896;
  color: #04140e;
}

.btn-props-primary:hover {
  background: #00e0a8;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-props-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: #e4e4e7;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-props-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.btn-props-text-action {
  background: none;
  border: none;
  color: #00c896;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 3px;
  transition: background 0.15s ease;
}

.btn-props-text-action:hover {
  background: rgba(0, 200, 150, 0.1);
}

.props-button-group {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.props-button-group .btn-props-action {
  margin-top: 0;
  flex: 1;
}

/* Visibility Switch */
.props-card-visibility {
  padding: 8px 12px;
}

.props-visibility-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.props-visibility-info {
  display: flex;
  align-items: center;
  gap: 7px;
}

.props-visibility-icon {
  color: #00c896;
  flex-shrink: 0;
}

.props-visibility-status {
  font-size: 12px;
  font-weight: 500;
  color: #e4e4e7;
  display: block;
}

.props-visibility-desc {
  font-size: 12px;
  color: #71717a;
  display: block;
}

.props-switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
  flex-shrink: 0;
}

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

.props-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #27272a;
  transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 18px;
}

.props-slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
  background: white;
  transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
}

.props-switch input:checked + .props-slider {
  background: #00c896;
}

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

/* Image Controls */
.props-img-preview-box {
  width: 100%;
  height: 110px;
  background: #0b0c10;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 8px;
  box-sizing: border-box;
}

.props-img-preview-box img {
  max-width: 100%;
  max-height: 70px;
  object-fit: contain;
  border-radius: 4px;
}

.props-img-meta-label {
  position: absolute;
  bottom: 4px;
  left: 6px;
  right: 6px;
  font-size: 11px;
  color: #828599;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: monospace;
}

.props-subtabs {
  display: flex;
  gap: 4px;
  background: #0b0c10;
  padding: 3px;
  border-radius: 6px;
}

.props-subtab {
  flex: 1;
  padding: 5px;
  font-size: 11px;
  background: none;
  border: none;
  border-radius: 4px;
  color: #828599;
  cursor: pointer;
  transition: all 0.15s ease;
}

.props-subtab.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 600;
}

.props-dropzone {
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  padding: 18px 12px;
  text-align: center;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.2);
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.props-dropzone:hover {
  border-color: #00c896;
  background: rgba(0, 200, 150, 0.04);
}

.props-dropzone-icon {
  color: #828599;
  margin-bottom: 2px;
}

.props-dropzone-title {
  font-size: 12px;
  color: #d4d4d8;
}

.props-dropzone-hint {
  font-size: 12px;
  color: #71717a;
}

.props-upload-status {
  font-size: 12px;
  color: #00c896;
  margin-top: 4px;
}

/* Link Checkbox */
.props-field-checkbox {
  margin-top: 4px;
}

.props-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #d4d4d8;
  cursor: pointer;
}

.props-checkbox-label code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 4px;
  border-radius: 3px;
  color: #a1a1aa;
}

/* Advanced Tab: Selector & Classes */
.props-selector-box {
  background: #0b0c10;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #a1a1aa;
  word-break: break-all;
  user-select: all;
}

.props-class-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 26px;
}

.props-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: #e4e4e7;
}

.props-chip-remove {
  cursor: pointer;
  color: #71717a;
  font-size: 12px;
  line-height: 1;
  transition: color 0.15s ease;
}

.props-chip-remove:hover {
  color: #f87171;
}

.props-add-class-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.props-add-class-row .props-input {
  flex: 1;
}

.props-add-class-row .btn-props-action {
  width: auto;
  padding: 0 12px;
  margin-top: 0;
  flex-shrink: 0;
}

/* Parent Link Banner (when child inside <a> is selected) */
.props-parent-link-banner {
  background: rgba(0, 200, 150, 0.04);
  border: 1px solid rgba(0, 200, 150, 0.15);
  border-radius: 7px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.props-parent-link-info {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #00c896;
}

.props-parent-link-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.props-parent-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #00c896;
}

.props-parent-href {
  font-size: 11px;
  color: #828599;
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.btn-props-parent-jump {
  background: rgba(0, 200, 150, 0.1);
  border: 1px solid rgba(0, 200, 150, 0.22);
  color: #00e0a8;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-mono);
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.btn-props-parent-jump:hover {
  background: rgba(0, 200, 150, 0.18);
  color: #ffffff;
  border-color: rgba(0, 200, 150, 0.35);
}

.btn-props-parent-jump:hover {
  background: rgba(0, 200, 150, 0.25);
  border-color: #00c896;
  color: #ffffff;
}

/* Style Search Bar & Category Quick-Pills */
.props-style-search-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #141720;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px;
}

.props-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.props-search-icon {
  position: absolute;
  left: 9px;
  color: #71717a;
  pointer-events: none;
}

.props-search-input {
  width: 100%;
  height: 32px;
  background: #0b0c10;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #f4f4f5;
  font-size: 11.5px;
  font-family: var(--font-sans);
  padding: 0 28px 0 28px;
  outline: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.props-search-input:focus,
.props-search-input:focus-visible {
  outline: none !important;
  border-color: #00c896 !important;
  box-shadow: 0 0 0 1px #00c896 !important;
}

.props-search-clear {
  position: absolute;
  right: 7px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #a1a1aa;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  outline: none !important;
  transition: all 0.15s ease;
}

.props-search-clear:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.props-search-clear:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 1.5px #00c896 !important;
}

/* Category Quick-Pills: 3-column symmetrical grid, eliminates horizontal scrolling & clipped pills */
.props-category-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 2px;
  overflow: visible;
}

.props-category-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 5px 6px;
  font-size: 11px;
  font-weight: 500;
  color: #828599;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font-sans);
  outline: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.props-category-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: #f4f4f5;
}

.props-category-pill.active {
  background: rgba(0, 200, 150, 0.14);
  border-color: rgba(0, 200, 150, 0.45);
  color: #00e0a8;
  font-weight: 600;
}

.props-category-pill:focus,
.props-category-pill:focus-visible {
  outline: none !important;
  border-color: #00c896 !important;
  box-shadow: 0 0 0 1.5px #00c896 !important;
}

/* Flexbox Controls Container */
.props-flex-controls {
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  padding-top: 4px;
}

/* Range Sliders & Value Labels */
.props-field-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.props-field-val {
  font-size: 11px;
  font-family: var(--font-mono);
  color: #00c896;
}

.props-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 4px;
  background: #27272a;
  outline: none !important;
  cursor: pointer;
  margin: 6px 0;
}

.props-range:focus,
.props-range:focus-visible {
  outline: none !important;
}

.props-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #00c896;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.props-range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 2px #101217, 0 0 0 4px #00c896;
}

.props-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* Search Highlighting */
.props-search-highlight {
  border-color: #00c896 !important;
  box-shadow: 0 0 0 1px rgba(0, 200, 150, 0.35) !important;
}

/* Sticky Inspector Footer */
.props-panel-footer {
  position: sticky;
  bottom: 0;
  background: #13151c;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  z-index: 30;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.props-footer-status {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.props-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #71717a;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.props-status-dot.ready {
  background: #71717a;
}

.props-status-dot.modified {
  background: #f59e0b;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.props-status-dot.applied {
  background: #00c896;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.props-save-indicator {
  font-size: 11px;
  color: #828599;
  font-family: var(--font-sans);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90px;
}

.props-footer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-props-footer {
  height: 28px;
  padding: 0 11px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 500;
  font-family: var(--font-sans);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.btn-props-footer-revert {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #a1a1aa;
}

.btn-props-footer-revert:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.16);
}

.btn-props-footer-apply {
  background: #00c896;
  color: #03140e;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.btn-props-footer-apply:hover {
  background: #00e0a8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.btn-props-footer-apply:active {
  transform: translateY(1px);
}

/* ============================================================================= */
/* PREVIEW MAXIMIZED & BUILDER FULLSCREEN MODE (IMMERSIVE FULL-WIDTH CANVAS)      */
/* ============================================================================= */

.studio-stage.builder-fullscreen,
.studio-stage.preview-maximized {
  width: 100% !important;
  max-width: 100% !important;
}

.studio-stage.builder-fullscreen .chat-column,
.studio-stage.preview-maximized .chat-column {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  flex: 0 0 0% !important;
  opacity: 0 !important;
  pointer-events: none !important;
  border-right: none !important;
  overflow: hidden !important;
  visibility: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  transition: opacity 0.25s ease !important;
}

.studio-stage.builder-fullscreen .stage-resizer,
.studio-stage.preview-maximized .stage-resizer {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

.studio-stage.builder-fullscreen .preview-column,
.studio-stage.preview-maximized .preview-column {
  display: flex !important;
  flex: 1 1 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  height: 100dvh !important;
  border-left: none !important;
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
  transition: opacity 0.25s ease !important;
}

.app-layout.builder-fullscreen .sidebar,
.app-layout.preview-maximized .sidebar {
  margin-left: -320px !important;
  transform: translate3d(-40px, 0, 0) !important;
  opacity: 0 !important;
  border-color: transparent !important;
  pointer-events: none !important;
}

.studio-stage.builder-fullscreen .preview-top-toolbar,
.studio-stage.preview-maximized .preview-top-toolbar {
  background: #0e1015;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.studio-stage.builder-fullscreen .preview-viewport-container,
.studio-stage.preview-maximized .preview-viewport-container {
  background: #08090b;
}

/* Edge-to-edge immersive canvas for desktop mode in preview-maximized / fullscreen */
.studio-stage.preview-maximized .preview-viewport-container:has(.device-desktop),
:fullscreen .studio-stage .preview-viewport-container:has(.device-desktop),
:-webkit-full-screen .studio-stage .preview-viewport-container:has(.device-desktop) {
  padding: 0 !important;
}

.studio-stage.preview-maximized .preview-frame-device-wrapper.device-desktop,
:fullscreen .preview-frame-device-wrapper.device-desktop,
:-webkit-full-screen .preview-frame-device-wrapper.device-desktop {
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  width: 100% !important;
  height: 100% !important;
}

.studio-stage.preview-maximized .preview-frame-device-wrapper.device-desktop .live-preview-iframe,
:fullscreen .preview-frame-device-wrapper.device-desktop .live-preview-iframe,
:-webkit-full-screen .preview-frame-device-wrapper.device-desktop .live-preview-iframe {
  border-radius: 0 !important;
}

.btn-preview-tool.btn-preview-fullscreen {
  transition: all 0.2s ease;
}

.btn-preview-tool.btn-preview-fullscreen.active {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  background: rgba(255, 255, 255, 0.14) !important;
}

/* =============================================================================
   SIDEBAR CLONE CUSTOM NAME & INLINE RENAME
   ============================================================================= */
.clone-domain-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.clone-title {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.clone-subdomain {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.clone-header-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.btn-rename-clone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #64748b;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.clone-card-mini:hover .btn-rename-clone {
  opacity: 1;
}

.btn-rename-clone:hover {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.25);
}

.clone-rename-input {
  width: 100%;
  font-size: 12px;
  font-weight: 600;
  color: #f8fafc;
  background: #0f172a;
  border: 1px solid #38bdf8;
  border-radius: 5px;
  padding: 2px 6px;
  outline: none;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

/* =============================================================================
   TOP HEADER LANGUAGE SWITCHER
   ============================================================================= */
.lang-switch-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.btn-lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-lang-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.lang-flag {
  font-size: 14px;
  line-height: 1;
}

.lang-code {
  letter-spacing: 0.04em;
}

.lang-chevron {
  color: #94a3b8;
  transition: transform 0.2s ease;
}

.lang-switch-wrap.open .lang-chevron {
  transform: rotate(180deg);
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 170px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
  z-index: 99999;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.lang-option:hover {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
}

.lang-option.active {
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  font-weight: 600;
}

.lang-option .lang-check {
  margin-left: auto;
  font-size: 11px;
  color: #38bdf8;
}

/* =============================================================================
   BUILDER ASSET DOWNLOADER & ASSETS MANAGER MODAL
   ============================================================================= */
.btn-inspector-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 32px;
  margin-top: 8px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 6px;
  color: #38bdf8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-inspector-download:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #ffffff;
}

.btn-builder-assets {
  color: #a78bfa !important;
}

.btn-builder-assets:hover {
  background: rgba(167, 139, 250, 0.15) !important;
  color: #ffffff !important;
}

/* Modal Asset Manager */
.asset-modal-dialog {
  max-width: 860px;
  width: 90%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.asset-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
}

.asset-filter-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
}

.asset-tab-pill {
  padding: 5px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.asset-tab-pill:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.05);
}

.asset-tab-pill.active {
  background: rgba(167, 139, 250, 0.14);
  border-color: rgba(167, 139, 250, 0.35);
  color: #c4b5fd;
  font-weight: 600;
}

.asset-search-input {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  color: #f8fafc;
  outline: none;
  width: 180px;
  transition: border-color 0.2s ease;
}

.asset-search-input:focus {
  border-color: #a78bfa;
}

.asset-selection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.01);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 12px;
  color: #94a3b8;
}

.asset-select-all-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  padding: 18px;
  overflow-y: auto;
  max-height: 480px;
}

.asset-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.asset-card:hover {
  border-color: rgba(167, 139, 250, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.4);
}

.asset-card.selected {
  border-color: #a78bfa;
  background: rgba(167, 139, 250, 0.08);
  box-shadow: 0 0 0 1px #a78bfa;
}

.asset-card-thumb {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  overflow: hidden;
  position: relative;
}

.asset-card-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.asset-card-thumb .asset-icon-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #94a3b8;
}

.asset-card-thumb .asset-icon-box svg {
  width: 28px;
  height: 28px;
}

.asset-card-thumb .asset-ext-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 4px;
  border-radius: 3px;
}

.asset-card-checkbox {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 18px;
  height: 18px;
  accent-color: #8b5cf6;
  cursor: pointer;
  z-index: 2;
}

.asset-card-info {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(15, 23, 42, 0.9);
}

.asset-card-name {
  font-size: 11px;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: #64748b;
}

.asset-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 10px;
}

.asset-footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #94a3b8;
}

.asset-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-download-selected {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  background: #7c3aed;
  border: 1px solid #8b5cf6;
  border-radius: 6px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-download-selected:hover:not(:disabled) {
  background: #6d28d9;
}

.btn-download-selected:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-download-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-download-all:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* =============================================================================
   Inspector Asset Download Button Group
   ============================================================================= */
.props-asset-download-wrapper {
  width: 100%;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  box-sizing: border-box;
}

.props-asset-download-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}

.props-asset-download-header .props-field-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #94a3b8;
}

.props-asset-download-group {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

.props-asset-download-group .btn-inspector-download {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  padding: 0 8px;
  background: rgba(132, 125, 255, 0.1);
  border: 1px solid rgba(132, 125, 255, 0.25);
  border-radius: 6px;
  color: #c7d2fe;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
  box-sizing: border-box;
}

.props-asset-download-group .btn-inspector-download svg {
  flex-shrink: 0;
}

.props-asset-download-group .btn-inspector-download span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.props-asset-download-group .btn-inspector-download:hover {
  background: rgba(132, 125, 255, 0.22);
  border-color: #847dff;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.props-asset-download-group .btn-inspector-download:active {
  transform: translateY(0);
}

.props-asset-download-group .btn-inspector-download.btn-download-orig {
  flex: 1 1 0;
  min-width: 0;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
}

.props-asset-download-group .btn-inspector-download.btn-download-orig:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

.props-asset-download-group .btn-inspector-download.btn-download-svg {
  flex: 1 1 0;
  min-width: 0;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.25);
  color: #fcd34d;
}

.props-asset-download-group .btn-inspector-download.btn-download-svg:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* =============================================================================
   Builder Element Context Menu (Right-Click Inside Preview)
   ============================================================================= */
.builder-context-menu {
  position: fixed;
  z-index: 2147483647;
  min-width: 220px;
  max-width: 320px;
  background: rgba(15, 17, 26, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(132, 125, 255, 0.2);
  color: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 12px;
  user-select: none;
  animation: bcmAppear 0.12s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

@keyframes bcmAppear {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.bcm-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 8px 8px;
}

.bcm-thumb {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 16px;
  flex-shrink: 0;
}

.bcm-thumb img,
.bcm-thumb svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bcm-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.bcm-title {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bcm-subtitle {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bcm-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 2px;
}

.bcm-actions {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bcm-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 10px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.12s ease;
}

.bcm-item svg {
  flex-shrink: 0;
  color: #847dff;
  transition: transform 0.15s ease;
}

.bcm-item:hover {
  background: rgba(132, 125, 255, 0.15);
  color: #ffffff;
}

.bcm-item:hover svg {
  transform: scale(1.1);
  color: #a5b4fc;
}

.bcm-item:active {
  transform: scale(0.98);
}

/* ==========================================================================
   EXPORT TO FIGMA (HTML TO FIGMA) COMPONENT STYLES
   ========================================================================== */

/* Preview Toolbar Figma Export Button - Minimalist Square Icon Button */
.btn-figma-export {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-buttons);
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.btn-figma-export:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.btn-figma-export svg {
  display: block;
}

/* Clone Card Action Figma Button */
.btn-figma-badge {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #9f9fa0 !important;
  font-weight: 500 !important;
  transition: all 0.15s ease !important;
}

.btn-figma-badge:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* ==========================================================================
   EXPORT TO FIGMA (HTML TO FIGMA) : MINIMALIST EDITORIAL DESIGN
   Tokens: Origin Financial (DESIGN.md) + Anti-Slop (ANTI_AI_SLOP.md)
   ========================================================================== */

/* Backdrop: Dark Obsidian with restrained blur */
/* ==========================================================================
   EXPORT TO FIGMA MODAL — Minimalist Redesign
   ========================================================================== */
.modal-figma-backdrop {
  background: rgba(9, 10, 11, 0.82) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-figma-dialog {
  position: relative;
  max-width: 620px !important;
  width: 92% !important;
  background: #0f1011 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.85) !important;
  padding: 0 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ---------- HEADER: Icon + Title + Close ---------- */
.modal-figma-header {
  padding: 16px 20px !important;
  background: #0f1011 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-figma-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.figma-brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: #18191c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.figma-brand-icon svg {
  display: block;
}

.modal-figma-brand .modal-title {
  font-family: var(--font-headline, sans-serif);
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  letter-spacing: -0.01em;
  margin: 0 !important;
  line-height: 1;
}

/* Legacy elements — hidden after cleanup */
.figma-title-group,
.figma-meta-header-line,
.figma-eyebrow-label,
.figma-meta-sep,
.figma-meta-domain,
.figma-meta-file,
.source-status-dot,
.modal-figma-brand .modal-subtitle {
  display: none !important;
}

.modal-figma-close-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #9f9fa0;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.modal-figma-close-btn:hover {
  background: #18191c;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
}

/* ---------- BODY ---------- */
.modal-figma-body {
  padding: 20px !important;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(82vh - 100px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.modal-figma-body::-webkit-scrollbar { width: 3px; }
.modal-figma-body::-webkit-scrollbar-track { background: transparent; }
.modal-figma-body::-webkit-scrollbar-thumb { background: #2e2e2e; border-radius: 4px; }

/* ---------- VIEWPORT SELECTOR ---------- */
.figma-viewport-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.figma-section-title {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6a6b6b;
}

.figma-section-hint {
  font-size: 12px;
  color: #6a6b6b;
}

.figma-dock-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 3px;
  background: #090a0b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.figma-dock-item {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #9f9fa0;
  cursor: pointer;
  transition: all 0.15s ease;
}

.figma-dock-item svg { color: #6a6b6b; transition: color 0.15s ease; }
.figma-dock-item:hover { color: #ffffff; }
.figma-dock-item:hover svg { color: #ffffff; }
.figma-dock-item.active { background: #18191c; border-color: rgba(255, 255, 255, 0.1); color: #ffffff; }
.figma-dock-item.active svg { color: #847dff; }

.dock-label { font-size: 11px; font-weight: 500; line-height: 1; }
.dock-res { font-family: var(--font-mono, monospace); font-size: 9px; color: #6a6b6b; line-height: 1; }
.figma-dock-item.active .dock-res { color: #9f9fa0; }

/* ---------- HERO CARD: MIRRORIT PLUGIN ---------- */
.figma-hero-card {
  background: #131418;
  border: 1px solid rgba(132, 125, 255, 0.22);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s ease;
}

.figma-hero-card:hover { border-color: rgba(132, 125, 255, 0.35); }

.hero-top-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.hero-tag-group { display: flex; align-items: center; gap: 7px; }

.hero-rec-badge {
  font-family: var(--font-mono, monospace);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #c4b5fd;
  background: rgba(132, 125, 255, 0.14);
  border: 1px solid rgba(132, 125, 255, 0.3);
  border-radius: 9999px;
  padding: 1.5px 7px;
  line-height: 1.2;
}

.hero-subtag { font-family: var(--font-mono, monospace); font-size: 10px; color: #8c8d91; }

.hero-download-plugin-link {
  display: inline-flex;
  align-items: center;
  gap: 4.5px;
  font-size: 11px;
  font-weight: 500;
  color: #a5b4fc;
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.hero-download-plugin-link:hover { color: #ffffff; background: rgba(132, 125, 255, 0.12); }

.hero-body-content { display: flex; flex-direction: column; gap: 10px; }
.hero-title-wrap { display: flex; flex-direction: column; gap: 4px; }
.hero-title-badge-row { display: flex; align-items: center; gap: 8px; }
.hero-plugin-logo-standalone {
  width: 16px;
  height: 19px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
.hero-title { font-size: 14px; font-weight: 600; color: #ffffff; letter-spacing: -0.01em; margin: 0; line-height: 1.25; }
.hero-desc { font-size: 12.5px; color: #9f9fa0; line-height: 1.45; margin: 0; }

.hero-cta-group { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.btn-figma-hero-primary,
.btn-figma-hero-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  box-sizing: border-box;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn-figma-hero-primary {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.95);
  color: #0b0c0e;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.btn-figma-hero-primary:hover { background: #f1f1f4; box-shadow: 0 2px 8px rgba(255, 255, 255, 0.22); transform: translateY(-0.5px); }
.btn-figma-hero-primary:active { background: #e2e2e6; transform: translateY(0); }

.btn-figma-hero-secondary {
  background: #1b1c22;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ededed;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-figma-hero-secondary:hover { background: #23252e; border-color: rgba(255, 255, 255, 0.22); color: #ffffff; transform: translateY(-0.5px); }
.btn-figma-hero-secondary:active { background: #16171b; transform: translateY(0); }

/* ---------- SECONDARY OPTIONS (2-col) ---------- */
.figma-secondary-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.figma-subcard {
  background: #101114;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 0;
  overflow: hidden;
}

.figma-subcard:hover { background: #15161b; border-color: rgba(255, 255, 255, 0.12); }

.subcard-info { display: flex; flex-direction: column; min-width: 0; }

.subcard-title {
  font-size: 11.5px;
  font-weight: 550;
  color: #e5e5e7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subcard-desc {
  font-size: 12px;
  color: #78797d;
  margin: 1px 0 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-figma-subaction {
  background: #18191e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #c4c5c8;
  font-size: 11px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.btn-figma-subaction:hover { background: #21232b; color: #ffffff; border-color: rgba(255, 255, 255, 0.2); transform: translateY(-0.5px); }
.btn-figma-subaction:active { transform: translateY(0); }

/* ---------- HOW TO IMPORT (GUIDE BOX) ---------- */
.figma-guide-box {
  background: #090a0b;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 12px 16px;
}

.guide-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.guide-header-title {
  font-family: var(--font-mono, monospace);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #6a6b6b;
  user-select: none;
}

.guide-tabs-group {
  display: flex;
  align-items: center;
  gap: 2px;
  background: #131417;
  padding: 3px 4px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.guide-tab-item {
  background: transparent;
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  font-family: var(--font-sans, -apple-system, sans-serif);
  font-size: 11px;
  font-weight: 500;
  color: #9f9fa0;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.guide-tab-item:hover { color: #ffffff; background: rgba(255, 255, 255, 0.04); }
.guide-tab-item.active { background: #25262c; color: #ffffff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.guide-tab-item:focus-visible { outline: 2px solid #847dff; outline-offset: 1px; }

/* Ordered-list steps (replaces old 3-col grid) */
.guide-steps-list {
  list-style: none;
  counter-reset: figma-step;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.guide-steps-list li {
  counter-increment: figma-step;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 12px;
  color: #c8c8ca;
  line-height: 1.55;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.guide-steps-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.guide-steps-list li:first-child {
  padding-top: 0;
}

.guide-steps-list li::before {
  content: counter(figma-step);
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  font-weight: 600;
  color: #847dff;
  background: rgba(132, 125, 255, 0.08);
  border: 1px solid rgba(132, 125, 255, 0.2);
  border-radius: 3px;
  padding: 1px 5px;
  line-height: 1;
  flex-shrink: 0;
  position: relative;
  top: -1px;
}

.guide-steps-list kbd,
.guide-steps-list code {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  padding: 0.5px 4px;
  color: #d1c9ff;
}

.guide-steps-list a {
  color: #00b3dd;
  text-decoration: none;
  font-weight: 500;
}

.guide-steps-list a:hover {
  text-decoration: underline;
  color: #38c8ea;
}

/* Legacy grid steps — keep for backward compatibility */
.guide-steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.guide-step-item {
  background: #0e0f12;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 7px;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 3px;
  min-width: 0;
}

.guide-step-head { display: flex; align-items: center; gap: 6px; margin-bottom: 1px; }

.step-index {
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  font-weight: 600;
  color: #847dff;
  background: rgba(132, 125, 255, 0.08);
  border: 1px solid rgba(132, 125, 255, 0.2);
  border-radius: 3px;
  padding: 1px 4px;
  line-height: 1;
  flex-shrink: 0;
}

.step-title {
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.step-desc {
  font-size: 12px;
  color: #8f9094;
  line-height: 1.35;
  margin: 0;
  flex: 1;
}

.step-desc a { color: #00b3dd; text-decoration: none; font-weight: 500; }
.step-desc a:hover { text-decoration: underline; color: #38c8ea; }

.step-desc kbd,
.step-desc code {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  padding: 0.5px 3.5px;
  color: #d1c9ff;
  vertical-align: baseline;
}

/* ---------- FOOTER ---------- */
.modal-figma-footer {
  padding: 12px 20px !important;
  background: #090a0b !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  display: flex;
  align-items: center;
  justify-content: space-between !important;
}

.footer-keyboard-hint {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  color: #6a6b6b;
}

.footer-keyboard-hint kbd {
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #9f9fa0;
}

.btn-figma-dismiss {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #9f9fa0;
  font-size: 11px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-figma-dismiss:hover { background: #18191c; color: #ffffff; border-color: rgba(255, 255, 255, 0.15); }

/* ---------- MOBILE ---------- */
@media (max-width: 640px) {
  .modal-figma-dialog { width: 96% !important; }
  .modal-figma-header,
  .modal-figma-body,
  .modal-figma-footer { padding-left: 14px !important; padding-right: 14px !important; }
  .figma-secondary-row { grid-template-columns: 1fr; }
  .hero-cta-group { grid-template-columns: 1fr; }
  .guide-steps-row { grid-template-columns: 1fr; }
}

/* =============================================================================
   DESIGN SYSTEM & TAILWIND CONFIG EXTRACTOR MODAL STYLES
   ============================================================================= */

.btn-design-system-export {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-buttons);
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.btn-design-system-export:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

.btn-design-system-export svg {
  display: block;
}

/* Sidebar Clone Card Action Tokens Button */
.btn-ds-badge {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #9f9fa0 !important;
  font-weight: 500 !important;
  transition: all 0.15s ease !important;
}

.btn-ds-badge:hover {
  background: rgba(56, 189, 248, 0.08) !important;
  border-color: rgba(56, 189, 248, 0.25) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

.btn-seo-badge {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #9f9fa0 !important;
  font-weight: 500 !important;
  transition: all 0.15s ease !important;
}

.btn-seo-badge:hover {
  background: rgba(16, 185, 129, 0.08) !important;
  border-color: rgba(16, 185, 129, 0.25) !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* ==========================================================================
   DESIGN SYSTEM & TAILWIND EXTRACTOR MODAL (MINIMALIST & MONOCHROME)
   ========================================================================== */

.modal-ds-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 3, 5, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: dsBackdropFadeIn 0.2s ease-out;
}

@keyframes dsBackdropFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-ds-dialog {
  background: #090a0f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  width: 1040px;
  max-width: 96vw;
  height: 88vh;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 32px 64px -16px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  padding: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
  animation: dsModalScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dsModalScaleIn {
  from { opacity: 0; transform: scale(0.97) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Modal Header - Fixed Top, Edge-to-Edge */
.modal-ds-header {
  padding: 16px 24px;
  background: #090a0f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  margin: 0;
}

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

.ds-brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #181920;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f4f4f5;
}

.ds-brand-text .modal-title {
  font-size: 15px;
  font-weight: 600;
  color: #f4f4f5;
  letter-spacing: -0.015em;
  margin: 0;
}

.ds-brand-text .modal-subtitle {
  font-size: 11px;
  color: #71717a;
  margin-top: 2px;
  display: block;
}

.modal-ds-close-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #71717a;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-ds-close-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
}

/* Modal Body - Fixed Dock, Scrollable Content */
.modal-ds-body {
  padding: 16px 24px 0 24px;
  background: #090a0f;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 12px;
  min-height: 0;
  margin: 0;
}

/* Controls Bar - Fixed */
.ds-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #111217;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 7px 12px;
  flex-shrink: 0;
}

.ds-viewport-dock {
  display: flex;
  gap: 4px;
  background: #090a0f;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 3px;
}

.ds-dock-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: #71717a;
  padding: 5px 11px;
  border-radius: 5px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ds-dock-item:hover {
  color: #e4e4e7;
  background: rgba(255, 255, 255, 0.04);
}

.ds-dock-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-weight: 600;
}

/* Custom Minimalist Toggle */
.ds-toggle-control {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
}

.ds-toggle-control input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.ds-toggle-track {
  width: 32px;
  height: 18px;
  background: #27272a;
  border-radius: 20px;
  position: relative;
  transition: background 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ds-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ds-toggle-control input:checked + .ds-toggle-track {
  background: #ffffff;
  border-color: #ffffff;
}

.ds-toggle-control input:checked + .ds-toggle-track .ds-toggle-thumb {
  transform: translateX(14px);
  background: #09090b;
}

.ds-toggle-label {
  font-size: 11px;
  color: #a1a1aa;
  font-weight: 500;
}

/* Extraction Status / Loader */
.ds-status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  color: #e4e4e7;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 7px 12px;
  border-radius: 7px;
  flex-shrink: 0;
}

.ds-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: dsSpin 0.7s linear infinite;
}

@keyframes dsSpin { to { transform: rotate(360deg); } }

/* Tabs Bar - Fixed */
.ds-tabs-bar {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding-bottom: 8px;
  overflow-x: auto;
  flex-shrink: 0;
}

.ds-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: #71717a;
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.ds-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.ds-tab-btn.active {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-weight: 600;
}

.ds-tab-count {
  background: rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 9999px;
  color: #a1a1aa;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.ds-tab-btn.active .ds-tab-count {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Panel Lead */
.ds-panel-lead {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ds-panel-title {
  font-size: 13px;
  font-weight: 600;
  color: #f4f4f5;
  letter-spacing: -0.01em;
}

.ds-panel-desc {
  font-size: 11.5px;
  color: #71717a;
}

/* Tab Content - ONLY SCROLLABLE AREA */
.ds-tab-content {
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
  padding-bottom: 24px;
  min-height: 0;
}

.ds-tab-content::-webkit-scrollbar { width: 5px; }
.ds-tab-content::-webkit-scrollbar-thumb { background: #27272a; border-radius: 5px; }
.ds-tab-content::-webkit-scrollbar-thumb:hover { background: #3f3f46; }

.ds-panel {
  animation: dsPanelFade 0.15s ease-out;
}

@keyframes dsPanelFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   ROLES GRID & SWATCH CARDS (MONOCHROME FRAME)
   ========================================== */

.ds-roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.ds-role-card {
  background: #111217;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.18s ease;
}

.ds-role-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.6);
}

.ds-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.ds-role-badge-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Clean Monochrome Role Badges */
.ds-role-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  width: fit-content;
  background: rgba(255, 255, 255, 0.07);
  color: #f4f4f5;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ds-role-meaning {
  font-size: 11px;
  color: #71717a;
  line-height: 1.3;
}

/* Contrast Score Pill */
.ds-contrast-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 9999px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.05);
  color: #a1a1aa;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ds-contrast-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.ds-contrast-pill.rating-aaa {
  color: #f4f4f5;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.ds-contrast-pill.rating-aa {
  color: #d4d4d8;
}

.ds-contrast-pill.rating-fail {
  color: #71717a;
  border-color: rgba(255, 255, 255, 0.06);
}

/* Swatch Canvas */
.ds-swatch-canvas-wrap {
  width: 100%;
}

.ds-swatch-canvas {
  height: 64px;
  width: 100%;
  border-radius: 7px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), inset 0 2px 4px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}

.ds-swatch-canvas:hover {
  transform: scale(1.01);
}

.ds-swatch-action-hint {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.ds-swatch-canvas:hover .ds-swatch-action-hint {
  opacity: 1;
}

/* Token Meta Block */
.ds-token-meta-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ds-hex-headline {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  width: fit-content;
}

.ds-hex-text {
  font-family: var(--font-mono, monospace);
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.ds-hex-copy-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #71717a;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ds-hex-headline:hover .ds-hex-copy-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.ds-color-format-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.ds-fmt-chip {
  background: #090a0f;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  padding: 2px 7px;
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  color: #a1a1aa;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ds-fmt-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
}

/* Interactive Shades Ribbon */
.ds-shades-wrapper {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 2px;
}

.ds-shades-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 9.5px;
  color: #71717a;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.ds-shade-dynamic-label {
  color: #a1a1aa;
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  transition: color 0.15s;
}

.ds-shade-dynamic-label.highlight {
  color: #ffffff;
  font-weight: 600;
}

.ds-shades-ramp {
  display: flex;
  height: 20px;
  gap: 2px;
  width: 100%;
}

.ds-shade-slice {
  flex: 1;
  height: 100%;
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.ds-shade-slice:hover {
  transform: scaleY(1.25) scaleX(1.1);
  z-index: 3;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.35);
}

/* ==========================================
   CLUSTERED SPECTRUM PALETTE GRID
   ========================================== */

.ds-palette-section {
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.ds-palette-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ds-subheading {
  font-size: 12px;
  font-weight: 600;
  color: #f4f4f5;
  letter-spacing: -0.01em;
  margin: 0;
}

.ds-subheading-meta {
  font-size: 11px;
  color: #71717a;
  margin-top: 2px;
  display: block;
}

.ds-subheading-count {
  font-size: 11px;
  font-family: var(--font-mono, monospace);
  color: #a1a1aa;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 5px;
}

.ds-spectrum-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 8px;
}

.ds-spectrum-tile-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #111217;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 7px;
  padding: 6px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ds-spectrum-tile-card:hover {
  background: #181920;
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.ds-spectrum-swatch {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.ds-spectrum-details {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ds-spectrum-hex {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 600;
  color: #f4f4f5;
}

.ds-spectrum-freq {
  font-size: 9.5px;
  color: #71717a;
}

/* ==========================================
   TYPOGRAPHY PANEL (MINIMALIST)
   ========================================== */

.ds-font-sources {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.ds-font-family-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #111217;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
}

.ds-family-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: #181920;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f4f4f5;
}

.ds-family-info {
  flex: 1;
  min-width: 0;
}

.ds-family-name {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ds-family-provider {
  font-size: 10.5px;
  color: #71717a;
}

.ds-family-copy-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #d4d4d8;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ds-family-copy-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.ds-type-table-wrap {
  border: none;
  background: transparent;
  padding: 0;
  overflow: hidden;
}

.ds-table {
  width: 100%;
  border-collapse: collapse;
  background: #111217;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

.ds-table th {
  text-align: left;
  padding: 9px 14px;
  font-size: 11px;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #090a0f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ds-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.ds-type-role-pill {
  display: inline-block;
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 7px;
  border-radius: 4px;
  color: #e4e4e7;
}

.ds-type-metric-primary {
  font-family: var(--font-mono, monospace);
  font-size: 12.5px;
  font-weight: 600;
  color: #f4f4f5;
}

.ds-type-metric-sub {
  font-size: 11px;
  color: #71717a;
  font-weight: 400;
}

.ds-type-metric-leading {
  font-size: 10.5px;
  color: #a1a1aa;
}

.ds-weight-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  color: #a1a1aa;
  background: rgba(255, 255, 255, 0.04);
  padding: 2px 7px;
  border-radius: 4px;
}

.ds-tw-copy-chip {
  background: #090a0f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #e4e4e7;
  transition: all 0.15s ease;
}

.ds-tw-copy-chip code {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
}

.ds-tw-copy-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.ds-specimen-cell {
  max-width: 380px;
}

.ds-specimen-text-render {
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================
   SPACING & SCALE PANEL (MINIMALIST)
   ========================================== */

.ds-spacing-summary {
  background: #111217;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.ds-summary-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: #f4f4f5;
}

.ds-summary-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
}

.ds-summary-desc {
  font-size: 11.5px;
  color: #71717a;
  margin: 0;
  line-height: 1.4;
}

.ds-spacing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.ds-spacing-card {
  background: #111217;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease;
}

.ds-spacing-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.ds-spacing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ds-spacing-val-group {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.ds-spacing-px {
  font-family: var(--font-mono, monospace);
  font-size: 15px;
  font-weight: 700;
  color: #f4f4f5;
}

.ds-spacing-rem {
  font-size: 11px;
  color: #71717a;
  font-family: var(--font-mono, monospace);
}

.ds-spacing-tw-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #d4d4d8;
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ds-spacing-tw-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.ds-spacing-visual-bar-track {
  width: 100%;
  height: 6px;
  background: #090a0f;
  border-radius: 9999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ds-spacing-visual-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #71717a, #e4e4e7);
  border-radius: 9999px;
}

.ds-spacing-card-footer {
  display: flex;
  justify-content: flex-end;
}

.ds-spacing-count {
  font-size: 10px;
  color: #71717a;
}

/* ==========================================
   MEDIA & ICONS PANEL (MINIMALIST)
   ========================================== */

.ds-iconfonts-alert {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e4e4e7;
  padding: 10px 14px;
  border-radius: 7px;
  font-size: 11.5px;
  line-height: 1.4;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.ds-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.ds-media-card {
  background: #111217;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.15s ease;
}

.ds-media-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.ds-media-preview-canvas {
  height: 68px;
  border-radius: 6px;
  background-color: #0b0c12;
  background-image:
    linear-gradient(45deg, #13141b 25%, transparent 25%),
    linear-gradient(-45deg, #13141b 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #13141b 75%),
    linear-gradient(-45deg, transparent 75%, #13141b 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ds-media-inner-symbol {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.ds-media-inner-symbol svg,
.ds-media-inner-symbol img {
  max-width: 32px;
  max-height: 32px;
  width: auto;
  height: auto;
}

.ds-media-copy-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.ds-media-preview-canvas:hover .ds-media-copy-overlay {
  opacity: 1;
}

.ds-media-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.ds-media-name {
  font-size: 10px;
  color: #a1a1aa;
  font-family: var(--font-mono, monospace);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ds-media-badge {
  font-size: 9px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  padding: 1px 4px;
  border-radius: 3px;
}

.ds-media-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 10px;
  color: #71717a;
  font-size: 12px;
}

/* ==========================================
   CODE PREVIEW PANEL (MINIMALIST)
   ========================================== */

.ds-code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ds-code-tabs {
  display: flex;
  gap: 6px;
}

.ds-code-tab-btn {
  background: #111217;
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #71717a;
  padding: 5px 12px;
  border-radius: 5px;
  font-size: 11px;
  font-family: var(--font-mono, monospace);
  cursor: pointer;
  transition: all 0.15s ease;
}

.ds-code-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.ds-code-tab-btn.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-weight: 600;
}

.btn-ds-copycode {
  font-family: var(--font-mono, monospace);
}

.ds-code-block {
  background: #08090d;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 16px;
  overflow: auto;
  max-height: 400px;
  font-family: var(--font-mono, monospace);
  font-size: 11.5px;
  line-height: 1.6;
  color: #e4e4e7;
}

.ds-code-block::-webkit-scrollbar { width: 5px; height: 5px; }
.ds-code-block::-webkit-scrollbar-thumb { background: #27272a; border-radius: 5px; }

/* ==========================================
   MODAL FOOTER (MINIMALIST & MONOCHROME)
   ========================================== */

.modal-ds-footer {
  padding: 14px 24px !important;
  background: #090a0f !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  margin: 0 !important;
}

.ds-footer-left {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-ds-subaction {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #a1a1aa;
  padding: 7px 13px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-ds-subaction:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
}

/* Crisp Monochrome Primary Button */
.btn-ds-primary {
  background: #ffffff;
  color: #09090b;
  border: 1px solid #ffffff;
  padding: 8px 18px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: all 0.15s ease;
}

.btn-ds-primary svg {
  stroke: #09090b;
  stroke-width: 2.2;
}

.btn-ds-primary:hover {
  background: #ececef;
  color: #000000;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.12);
}

.btn-ds-primary:active {
  background: #d4d4d8;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .modal-ds-dialog {
    width: 100vw;
    height: 96vh;
    max-height: 96vh;
    border-radius: 12px;
  }
  .modal-ds-header {
    padding: 12px 16px;
  }
  .modal-ds-body {
    padding: 12px 16px 0 16px;
  }
  .modal-ds-footer {
    padding: 12px 16px !important;
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 10px;
  }
  .ds-footer-left {
    justify-content: center;
  }
  .btn-ds-primary {
    justify-content: center;
    width: 100%;
  }
}

/* =============================================================================
   SEO AUDIT & CORE WEB VITALS ENGINE — PREMIUM UTILITARIAN MINIMALISM MODAL
   ============================================================================= */

.modal-seo-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 9, 10, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-seo-dialog {
  width: 1000px;
  max-width: 95vw;
  max-height: 90vh;
  background: #0e0f12;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  color: #f4f4f6;
  font-family: 'SF Pro Display', 'Geist Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.modal-seo-header {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #121316;
}

.modal-seo-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.seo-brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.seo-eyebrow {
  display: block;
  font-family: 'Geist Mono', 'SF Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #71717a;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.seo-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
}

.seo-subtitle {
  display: block;
  font-size: 12px;
  color: #8e8f94;
  margin-top: 2px;
}

.seo-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-seo-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  background: #ffffff;
  color: #0e0f12;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 1px solid #ffffff;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-seo-primary:hover {
  background: #e4e4e7;
  border-color: #e4e4e7;
}

.btn-seo-primary:active {
  transform: scale(0.98);
}

.btn-seo-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.modal-seo-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: #8e8f94;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-seo-close-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.modal-seo-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Status Bar & Scanning Animation */
.seo-status-bar {
  padding: 12px 16px;
  background: #141619;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.seo-status-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #d4d4d8;
}

.seo-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.seo-progress-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.seo-progress-fill {
  height: 100%;
  background: #3b82f6;
  border-radius: 3px;
}

/* Bento Box Grid */
.seo-bento-grid {
  display: grid;
  grid-template-columns: 260px 1fr 240px;
  gap: 12px;
}

.seo-card {
  background: #131417;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.seo-card:hover {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.12);
}

.seo-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.seo-card-tag {
  font-family: 'Geist Mono', 'SF Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #71717a;
  text-transform: uppercase;
  flex-shrink: 0;
  white-space: nowrap;
}

.seo-card-subtag {
  font-family: 'Geist Mono', 'SF Mono', monospace;
  font-size: 10px;
  color: #71717a;
}

.seo-score-display {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 4px 0 8px 0;
}

.seo-score-num {
  font-family: 'Instrument Serif', 'Newsreader', 'Playfair Display', Georgia, serif;
  font-size: 56px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.seo-score-denom {
  font-size: 14px;
  font-weight: 500;
  color: #71717a;
}

.seo-score-footer {
  font-size: 11px;
  color: #8e8f94;
  line-height: 1.4;
}

.seo-status-badge {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 9999px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Score card header: stack label above badge in narrow column */
.seo-card-score .seo-card-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.badge-neutral {
  background: rgba(255, 255, 255, 0.06);
  color: #a1a1aa;
}

.badge-good {
  background: #132516;
  border: 1px solid rgba(74, 222, 128, 0.25);
  color: #86efac;
}

.badge-warning {
  background: #292110;
  border: 1px solid rgba(251, 191, 36, 0.25);
  color: #fde68a;
}

.badge-error {
  background: #2d1517;
  border: 1px solid rgba(248, 113, 113, 0.25);
  color: #fca5a5;
}

/* Core Web Vitals Row */
.cwv-metrics-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 10px 0;
}

.cwv-metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  flex: 1;
}

.cwv-metric-label {
  font-family: 'Geist Mono', 'SF Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: #71717a;
}

.cwv-metric-val {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  color: #ffffff;
  line-height: 1.1;
}

.cwv-pill {
  font-family: 'Geist Mono', 'SF Mono', monospace;
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.pill-neutral {
  background: rgba(255, 255, 255, 0.05);
  color: #8e8f94;
}

.pill-good {
  background: #132516;
  color: #86efac;
}

.pill-needs-improvement {
  background: #292110;
  color: #fde68a;
}

.pill-poor {
  background: #2d1517;
  color: #fca5a5;
}

.cwv-metric-divider {
  width: 1px;
  height: 38px;
  background: rgba(255, 255, 255, 0.08);
}

.cwv-footer-note {
  font-size: 11px;
  color: #71717a;
  text-align: center;
}

/* Overview Card */
.seo-stats-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.seo-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.stat-name {
  color: #8e8f94;
}

.stat-val {
  color: #f4f4f6;
  font-weight: 600;
}

.text-green {
  color: #4ade80 !important;
}

.seo-time-label {
  font-size: 10px;
  color: #71717a;
}

/* Toolbar & Filters */
.seo-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
}

.seo-filter-dock {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #141619;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 3px;
}

.seo-dock-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 4px;
  background: transparent;
  border: none;
  font-size: 11.5px;
  font-weight: 500;
  color: #8e8f94;
  cursor: pointer;
  transition: all 0.12s ease;
}

.seo-dock-tab:hover {
  color: #ffffff;
}

.seo-dock-tab.active {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.tab-badge {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #a1a1aa;
}

.badge-err {
  background: rgba(248, 113, 113, 0.15);
  color: #fca5a5;
}

.badge-warn {
  background: rgba(251, 191, 36, 0.15);
  color: #fde68a;
}

.badge-info {
  background: rgba(96, 165, 250, 0.15);
  color: #93c5fd;
}

.badge-fixed {
  background: rgba(74, 222, 128, 0.15);
  color: #86efac;
}

.btn-seo-batch-fix {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f4f4f6;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-seo-batch-fix:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-seo-batch-fix:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-seo-batch-fix:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Issues Viewport & List */
.seo-issues-viewport {
  max-height: 290px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #111215;
  padding: 4px;
}

.seo-issues-list {
  display: flex;
  flex-direction: column;
}

.seo-empty-state {
  padding: 42px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #71717a;
}

.seo-empty-state .empty-icon {
  margin-bottom: 4px;
  color: #52525b;
}

.seo-empty-state h4 {
  font-size: 14px;
  font-weight: 600;
  color: #e4e4e7;
}

.seo-empty-state p {
  font-size: 12px;
  max-width: 440px;
  line-height: 1.5;
  color: #8e8f94;
}

.seo-issue-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.12s ease;
}

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

.seo-issue-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.seo-issue-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.seo-issue-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.seo-page-pill {
  font-family: 'Geist Mono', 'SF Mono', monospace;
  font-size: 10px;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: #d4d4d8;
}

.seo-severity-pill {
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.seo-pill-error {
  background: #2d1517;
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.seo-pill-warning {
  background: #292110;
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.seo-pill-info {
  background: #122130;
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.2);
}

.seo-pill-fixed {
  background: #132516;
  color: #86efac;
  border: 1px solid rgba(74, 222, 128, 0.2);
}

.seo-issue-msg {
  font-size: 12.5px;
  color: #e4e4e7;
  line-height: 1.4;
}

.seo-issue-selector {
  font-family: 'Geist Mono', 'SF Mono', monospace;
  font-size: 11px;
  color: #8e8f94;
  background: rgba(255, 255, 255, 0.03);
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-block;
  max-width: 480px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seo-cat-pill {
  font-family: 'Geist Mono', 'SF Mono', monospace;
  font-size: 9.5px;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.seo-issue-recom {
  font-size: 11.5px;
  color: #a1a1aa;
  line-height: 1.4;
}

.seo-manual-tag {
  font-size: 10px;
  color: #71717a;
  font-family: 'Geist Mono', 'SF Mono', monospace;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.seo-score-num.text-green {
  color: #34d399;
}

.seo-score-num.text-yellow {
  color: #fbbf24;
}

.seo-score-num.text-red {
  color: #f87171;
}

.seo-issue-action {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-issue-fix {
  padding: 4px 10px;
  background: #ffffff;
  color: #0e0f12;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid #ffffff;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-issue-fix:hover {
  background: #e4e4e7;
}

.btn-issue-fix:active {
  transform: scale(0.97);
}

.btn-issue-undo {
  padding: 4px 10px;
  background: transparent;
  color: #a1a1aa;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-issue-undo:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

/* Collapsible Terminal Drawer */
.seo-terminal-container {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: #0a0b0d;
  overflow: hidden;
}

.seo-terminal-header {
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  background: #0f1012;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.terminal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
}

.terminal-title {
  font-family: 'Geist Mono', 'SF Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: #a1a1aa;
  letter-spacing: 0.05em;
}

.terminal-lines {
  font-size: 10px;
  color: #636468;
}

.icon-terminal-chevron {
  color: #71717a;
  transition: transform 0.2s ease;
}

.seo-terminal-container.expanded .icon-terminal-chevron {
  transform: rotate(180deg);
}

.seo-terminal-body {
  padding: 10px 14px;
  max-height: 140px;
  overflow-y: auto;
}

.seo-terminal-pre {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: #a1a1aa;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Modal Footer */
.modal-seo-footer {
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #111215;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.seo-footnote {
  font-size: 12px;
  color: #71717a;
}

.btn-seo-dismiss {
  padding: 6px 14px;
  background: transparent;
  color: #a1a1aa;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-seo-dismiss:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

@media (max-width: 820px) {
  .seo-bento-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================================================
   ADVANCED BUILDER SUITE: HUD, AI MAGIC WAND, ADD DRAWER & DOM LAYERS
   ============================================================================= */

/* 1. In-Canvas Floating Element Action HUD */
.builder-element-hud {
  position: absolute;
  z-index: 300;
  display: flex;
  align-items: center;
  pointer-events: auto;
  user-select: none;
  animation: hudPopIn 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes hudPopIn {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hud-inner {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(11, 13, 19, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  padding: 3px 5px;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.hud-tag-pill {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  font-weight: 600;
  color: #d4d4d8;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 7px;
  border-radius: 9999px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hud-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 1px;
}

.hud-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.btn-hud-action {
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #a1a1aa;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.12s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.btn-hud-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.12);
}

.btn-hud-action:active {
  transform: scale(0.92);
}

.btn-hud-action.btn-hud-parent:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-hud-action.btn-hud-add:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-hud-action.btn-hud-duplicate:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-hud-action.btn-hud-delete:hover {
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.25);
}

.btn-hud-action.btn-hud-close {
  color: #71717a;
}

.btn-hud-action.btn-hud-close:hover {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.25);
}

/* 2. Floating Bar Add & Layers buttons */
.btn-builder-bar.btn-builder-add {
  background: rgba(255, 255, 255, 0.08);
  color: #e4e4e7;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-builder-bar.btn-builder-add:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.btn-builder-bar.btn-builder-layers {
  background: transparent;
  color: #a1a1aa;
}

.btn-builder-bar.btn-builder-layers:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* Props Panel Header Actions */
.btn-props-header.btn-props-add {
  color: #00c896;
  background: rgba(0, 200, 150, 0.12);
  border-color: rgba(0, 200, 150, 0.28);
  font-weight: 600;
}

.btn-props-header.btn-props-add:hover {
  background: rgba(0, 200, 150, 0.22);
  color: #ffffff;
  border-color: rgba(0, 200, 150, 0.45);
}

.btn-props-header.btn-props-duplicate {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.25);
  font-weight: 500;
}

.btn-props-header.btn-props-duplicate:hover {
  background: rgba(59, 130, 246, 0.22);
  color: #ffffff;
  border-color: rgba(59, 130, 246, 0.4);
}

.btn-props-header.btn-props-ai {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.25);
}

.btn-props-header.btn-props-ai:hover {
  background: rgba(139, 92, 246, 0.22);
  color: #ede9fe;
  border-color: rgba(139, 92, 246, 0.4);
}

.btn-props-header.btn-props-delete:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.25);
}

/* 3. Modal: Builder AI Element Magic Wand */
.builder-ai-modal-backdrop {
  background: rgba(6, 8, 12, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.builder-ai-dialog {
  background: #0f1218;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  width: 90%;
  max-width: 580px;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(139, 92, 246, 0.2);
  animation: modalScaleUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

@keyframes modalScaleUp {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.builder-ai-header {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.builder-ai-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.builder-ai-icon-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 16px;
}

.builder-ai-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #f4f4f5;
  letter-spacing: -0.01em;
}

.builder-ai-subtitle {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  color: #a1a1aa;
}

.builder-ai-body {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.builder-ai-preview-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 10px 14px;
}

.builder-ai-preview-label {
  font-size: 10.5px;
  font-weight: 600;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}

.builder-ai-preview-code {
  font-family: var(--font-mono, monospace);
  font-size: 11.5px;
  line-height: 1.5;
  color: #93c5fd;
  word-break: break-all;
  white-space: pre-wrap;
  max-height: 80px;
  overflow-y: auto;
}

.builder-ai-prompt-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.builder-ai-label {
  font-size: 12px;
  font-weight: 600;
  color: #e4e4e7;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.builder-ai-kbd {
  font-size: 10px;
  color: #71717a;
  font-weight: 400;
}

.builder-ai-textarea {
  width: 100%;
  background: rgba(18, 22, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 12px 14px;
  color: #ffffff;
  font-size: 13px;
  line-height: 1.5;
  outline: none;
  resize: vertical;
  min-height: 76px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.builder-ai-textarea:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.builder-ai-presets-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.builder-ai-presets-title {
  font-size: 11px;
  font-weight: 600;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.builder-ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-chip {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 500;
  color: #d4d4d8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.ai-chip:hover {
  background: rgba(139, 92, 246, 0.16);
  border-color: rgba(139, 92, 246, 0.35);
  color: #ede9fe;
}

.builder-ai-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  font-size: 12px;
  font-weight: 500;
}

.builder-ai-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(196, 181, 253, 0.2);
  border-top-color: #c4b5fd;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.builder-ai-footer {
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.btn-builder-modal-cancel {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #a1a1aa;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-builder-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.btn-builder-ai-run {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #e4e4e7;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: none;
}

.btn-builder-ai-run:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-builder-ai-run:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* 4. Drawers: Add Element Library & DOM Layers Panel */
.builder-drawer-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 360px;
  max-width: 90vw;
  background: rgba(12, 14, 18, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1040;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.75);
  animation: drawerSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.builder-add-drawer {
  left: 0;
  width: 390px;
  max-width: 92vw;
  border-left: none;
}

.builder-layers-drawer {
  right: 0;
  width: 390px;
  max-width: 95vw;
  border-right: none;
}

@keyframes drawerSlideIn {
  from {
    transform: translateX(-16px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.drawer-header {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.drawer-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #f4f4f5;
  letter-spacing: -0.01em;
}

.drawer-close-btn,
.btn-drawer-tool {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #71717a;
  cursor: pointer;
  transition: color 0.12s ease, background-color 0.12s ease;
}

.drawer-close-btn:hover,
.btn-drawer-tool:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.drawer-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Target & Placement Context Strip (Clear, Unclipped, Ergonomic) */
.drawer-target-bar {
  padding: 10px 14px 10px;
  background: rgba(18, 20, 26, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.target-info-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.target-badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.target-bar-title {
  font-size: 11px;
  font-weight: 700;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.target-bar-tag {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 600;
  color: #00c896;
  background: rgba(0, 200, 150, 0.1);
  padding: 1.5px 7px;
  border-radius: 4px;
  border: 1px solid rgba(0, 200, 150, 0.25);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.3;
}

.target-bar-desc {
  font-size: 11.5px;
  color: #a1a1aa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
  width: 100%;
}

.target-position-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 7px;
  padding: 3px;
  width: 100%;
  box-sizing: border-box;
}

.btn-pos-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 4px;
  font-size: 11px;
  font-weight: 500;
  color: #8e8f96;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
  transition: color 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
  white-space: nowrap;
  user-select: none;
}

.btn-pos-option svg {
  flex-shrink: 0;
  opacity: 0.75;
}

.btn-pos-option:hover:not(.disabled) {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.btn-pos-option.active {
  color: #00e5a3;
  background: rgba(0, 229, 163, 0.14);
  border-color: rgba(0, 229, 163, 0.3);
  font-weight: 600;
}

.btn-pos-option.active svg {
  opacity: 1;
  stroke: #00e5a3;
}

.btn-pos-option.disabled {
  opacity: 0.28;
  pointer-events: none;
}

/* In-Canvas Insertion Guide / Dropzone */
.mirrorit-insert-guide-bar {
  position: absolute;
  height: 3px;
  background: #00c896;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  z-index: 2147483640;
  pointer-events: none;
  border-radius: 2px;
  transition: top 0.15s cubic-bezier(0.16, 1, 0.3, 1), left 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.mirrorit-insert-guide-bar::before,
.mirrorit-insert-guide-bar::after {
  content: '';
  position: absolute;
  top: -3px;
  width: 9px;
  height: 9px;
  background: #00c896;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.mirrorit-insert-guide-bar::before {
  left: 0;
}

.mirrorit-insert-guide-bar::after {
  right: 0;
}

.mirrorit-insert-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #00c896;
  color: #0b0d10;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 3px 10px;
  border-radius: 9999px;
  white-space: nowrap;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

/* Container Inside Highlight */
[data-mirrorit-insert-container="true"] {
  outline: 2px dashed #00c896 !important;
  outline-offset: -2px !important;
  background-color: rgba(0, 200, 150, 0.05) !important;
}

.btn-hud-action.btn-hud-add {
  color: #a1a1aa;
}

.btn-hud-action.btn-hud-add:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.drawer-search-bar {
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.drawer-search-bar .drawer-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.drawer-search-bar .drawer-search-input-wrap .search-icon {
  position: absolute;
  left: 9px;
  color: #71717a;
  pointer-events: none;
}

.drawer-search-bar .drawer-search-input {
  width: 100%;
  padding: 6px 10px 6px 28px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  color: #ffffff;
  font-size: 12px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.drawer-search-bar .drawer-search-input:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(0, 200, 150, 0.45);
}

.drawer-category-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 6px 14px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  scrollbar-width: none;
}

.drawer-category-tabs::-webkit-scrollbar {
  display: none;
}

.drawer-tab-pill {
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 500;
  color: #71717a;
  background: transparent;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.12s ease, background-color 0.12s ease;
}

.drawer-tab-pill:hover {
  color: #e4e4e7;
  background: rgba(255, 255, 255, 0.04);
}

.drawer-tab-pill.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 600;
}

.drawer-cards-grid {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.comp-category-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 2px 2px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #71717a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  margin-bottom: 2px;
}

.comp-category-header:first-child {
  padding-top: 2px;
}

.comp-cat-count {
  font-size: 11px;
  font-family: var(--font-mono, monospace);
  color: #52525b;
}

.drawer-comp-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  min-width: 0;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.drawer-comp-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
}

.comp-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: #a1a1aa;
  flex-shrink: 0;
  transition: color 0.12s ease, background-color 0.12s ease;
}

.drawer-comp-card:hover .comp-card-icon {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
}

.comp-card-name {
  font-size: 12px;
  font-weight: 500;
  color: #e4e4e7;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comp-card-plus {
  font-size: 13px;
  font-weight: 500;
  color: #71717a;
  opacity: 0;
  transition: opacity 0.12s ease, color 0.12s ease;
  flex-shrink: 0;
}

.drawer-comp-card:hover .comp-card-plus {
  opacity: 1;
  color: #ffffff;
}

/* Full-width cards for page sections */
.drawer-comp-card.comp-card-span-full {
  grid-column: 1 / -1;
  padding: 8px 10px;
}

.drawer-comp-card.comp-card-span-full .comp-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.drawer-comp-card.comp-card-span-full .comp-card-desc {
  font-size: 11px;
  color: #71717a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Custom Component Cards & Actions */
.drawer-comp-card.custom-comp-card {
  border-color: rgba(255, 255, 255, 0.12);
}

.custom-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-card-action.btn-card-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a1a1aa;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.btn-card-action.btn-card-delete:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.btn-props-header.btn-props-save-comp {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  transition: all 0.15s ease;
}

.btn-props-header.btn-props-save-comp:hover {
  background: #ffffff;
  color: #09090b;
}

/* 5. DOM Layers Outliner Tree */
.layers-search-section {
  padding: 10px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

.drawer-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.drawer-search-input-wrap .search-icon {
  position: absolute;
  left: 9px;
  color: #71717a;
  pointer-events: none;
}

.drawer-search-input-wrap .drawer-search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  padding: 6px 26px 6px 28px;
  font-size: 11.5px;
  color: #e4e4e7;
  outline: none;
  transition: all 0.15s ease;
  font-family: inherit;
}

.drawer-search-input-wrap .drawer-search-input:focus {
  border-color: rgba(0, 200, 150, 0.5);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 2px rgba(0, 200, 150, 0.15);
}

.btn-search-clear {
  position: absolute;
  right: 6px;
  background: transparent;
  border: none;
  color: #71717a;
  cursor: pointer;
  font-size: 11px;
  padding: 2px 5px;
  border-radius: 4px;
}
.btn-search-clear:hover {
  color: #e4e4e7;
}

.layers-filter-pills {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.layers-filter-pills::-webkit-scrollbar {
  display: none;
}

.layer-filter-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #a1a1aa;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.12s ease;
}
.layer-filter-chip:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
}
.layer-filter-chip.active {
  background: rgba(0, 200, 150, 0.15);
  border-color: rgba(0, 200, 150, 0.45);
  color: #00c896;
  font-weight: 600;
}

.layers-tree-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 0;
}

.layer-node-item {
  display: flex;
  flex-direction: column;
  width: 100%;
  position: relative;
}

.layer-node-item.collapsed > .layer-children {
  display: none !important;
}

.layer-children {
  position: relative;
}

/* Subtle tree guideline */
.layer-children::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 4px;
  left: var(--guide-left, 16px);
  width: 1px;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.layer-node-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 4px;
  padding-bottom: 4px;
  padding-right: 8px;
  cursor: pointer;
  transition: background 0.1s ease, border-color 0.1s ease;
  user-select: none;
  width: 100%;
  box-sizing: border-box;
  border-left: 2px solid transparent;
  min-height: 28px;
}

.layer-node-row:hover {
  background: rgba(255, 255, 255, 0.045);
}

.layer-node-item.selected > .layer-node-row {
  background: rgba(0, 200, 150, 0.12);
  border-left-color: #00c896;
}

.layer-chevron {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #71717a;
  cursor: pointer;
  transition: color 0.12s ease;
  flex-shrink: 0;
  border-radius: 4px;
}

.layer-chevron svg {
  width: 8.5px;
  height: 8.5px;
  stroke: currentColor;
  stroke-width: 2.5;
  display: block;
  transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  transform: rotate(90deg); /* Expanded: points DOWN */
}

.layer-node-item.collapsed > .layer-node-row .layer-chevron svg {
  transform: rotate(0deg); /* Collapsed: points RIGHT */
}

.layer-chevron:hover {
  color: #e4e4e7;
  background: rgba(255, 255, 255, 0.08);
}

.layer-chevron-spacer {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: inline-block;
}

.layer-tag-pill {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  color: #a1a1aa;
  background: rgba(255, 255, 255, 0.06);
  padding: 1.5px 5px;
  border-radius: 4px;
  letter-spacing: 0.2px;
  flex-shrink: 0;
}

.layer-tag-pill.tag-layout {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
}
.layer-tag-pill.tag-heading {
  color: #c084fc;
  background: rgba(192, 132, 252, 0.14);
}
.layer-tag-pill.tag-interactive {
  color: #00c896;
  background: rgba(0, 200, 150, 0.14);
}
.layer-tag-pill.tag-media {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.14);
}
.layer-tag-pill.tag-form {
  color: #fb7185;
  background: rgba(251, 113, 133, 0.14);
}

.layer-meta-label {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  color: #71717a;
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 95px;
}

.layer-text-preview {
  font-size: 11px;
  color: #e4e4e7;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  margin-left: 2px;
  opacity: 0.85;
}

.layer-node-actions {
  display: none;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  flex-shrink: 0;
}

.layer-node-row:hover .layer-node-actions,
.layer-node-item.selected > .layer-node-row .layer-node-actions {
  display: flex;
}

.btn-layer-action {
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  cursor: pointer;
  color: #94a3b8;
  transition: all 0.12s ease;
}

.btn-layer-action svg {
  width: 11.5px;
  height: 11.5px;
  stroke: currentColor;
  stroke-width: 1.8;
  display: block;
  pointer-events: none;
  transition: transform 0.12s ease, stroke 0.12s ease;
}

.btn-layer-action:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.btn-layer-action.btn-layer-locate:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.btn-layer-action.btn-layer-locate:hover svg {
  transform: scale(1.1);
}

.btn-layer-action.btn-layer-vis:hover {
  background: rgba(0, 200, 150, 0.18);
  border-color: rgba(0, 200, 150, 0.35);
  color: #00c896;
}

.btn-layer-action.btn-layer-vis:hover svg {
  transform: scale(1.1);
}

.btn-layer-action.btn-layer-del:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.35);
  color: #f87171;
}

.btn-layer-action.btn-layer-del:hover svg {
  transform: scale(1.1);
}

/* Dimmed visual styling for hidden elements */
.layer-node-item.is-hidden > .layer-node-row {
  opacity: 0.52;
}

.layer-node-item.is-hidden:hover > .layer-node-row,
.layer-node-item.is-hidden.selected > .layer-node-row {
  opacity: 0.88;
}

/* In hidden items, keep the eye-closed button subtly visible even when not hovered */
.layer-node-item.is-hidden > .layer-node-row .layer-node-actions {
  display: flex !important;
}

.layer-node-item.is-hidden:not(:hover):not(.selected) > .layer-node-row .layer-node-actions .btn-layer-action:not(.btn-layer-vis) {
  display: none !important;
}

.layer-node-item.is-hidden > .layer-node-row .btn-layer-vis {
  color: #fb7185;
  border-color: rgba(251, 113, 133, 0.3);
  background: rgba(251, 113, 133, 0.1);
}

.layers-footer-bar {
  padding: 7px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px;
  color: #71717a;
  background: rgba(0, 0, 0, 0.25);
}

.layers-hint {
  font-size: 12px;
  color: #71717a;
}

/* =============================================================================
   [AI FEATURE HOLD] Fitur AI Edit Builder di-hold sementara sesuai permintaan user.
   Tampilan di-hide (bukan dihapus) sampai setup LLM paling optimal siap.
   ============================================================================= */
.btn-hud-ai,
.btn-props-ai,
.bcm-item-ai,
#builder-ai-modal {
  display: none !important;
}

/* =============================================================================
   Import Project (.zip) Modal - High Quality Dark Design (Frontend Design Skill)
   ============================================================================= */
#modal-import-project .modal-dialog {
  width: 100%;
  max-width: 480px;
  background: #141417;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  gap: 0;
}

#modal-import-project .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#modal-import-project .import-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

#modal-import-project .import-header-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--color-pure);
  display: flex;
  align-items: center;
  justify-content: center;
}

#modal-import-project .modal-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-pure);
}

#modal-import-project .modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#modal-import-project .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#modal-import-project .form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-ash);
}

#modal-import-project .form-input {
  width: 100%;
  box-sizing: border-box;
  background: #1a1b1f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 10px 14px;
  color: var(--color-pure);
  font-size: 13.5px;
  font-family: var(--font-sans);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#modal-import-project .form-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}

#modal-import-project .import-dropzone {
  border: 1px dashed rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#modal-import-project .import-dropzone:hover {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.04);
}

#modal-import-project .import-dropzone-icon {
  color: var(--color-cloud);
  margin-bottom: 10px;
}

#modal-import-project .import-dropzone-title {
  font-weight: 500;
  font-size: 14px;
  color: var(--color-pure);
  margin-bottom: 4px;
}

#modal-import-project .import-dropzone-sub {
  font-size: 12px;
  color: var(--color-fog);
}

#modal-import-project .import-file-info {
  margin-top: 12px;
  font-weight: 600;
  color: var(--color-pure);
  font-size: 12.5px;
  font-family: var(--font-mono);
}

#modal-import-project .import-note {
  font-size: 12px;
  color: var(--color-ash);
  line-height: 1.45;
}

#modal-import-project .modal-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: rgba(0, 0, 0, 0.15);
}

#modal-import-project .btn-cancel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--color-cloud);
  height: 36px;
  padding: 0 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

#modal-import-project .btn-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-pure);
  border-color: rgba(255, 255, 255, 0.2);
}

#modal-import-project .btn-primary-import {
  background: #d4d4d8;
  color: #121316;
  border: 1px solid #d4d4d8;
  height: 36px;
  padding: 0 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

#modal-import-project .btn-primary-import:hover:not(:disabled) {
  background: #ffffff;
  border-color: #ffffff;
}

#modal-import-project .btn-primary-import:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==========================================
   MINIMALIST MONOCHROME LEGAL SUITE STYLES
   ========================================== */
.legal-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  animation: legalFadeIn 0.15s ease-out;
}

@keyframes legalFadeIn {
  from { opacity: 0; transform: scale(0.99); }
  to { opacity: 1; transform: scale(1); }
}

.legal-modal-dialog {
  width: 100%;
  max-width: 960px;
  max-height: 88vh;
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #f4f4f5;
  font-family: var(--font-sans, "Plus Jakarta Sans", -apple-system, sans-serif);
}

.legal-modal-header {
  padding: 20px 24px 16px 24px;
  background: #09090b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.legal-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.legal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.legal-app-title {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin: 0;
}

.legal-badge-tag {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #a1a1aa;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.01em;
}

.legal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}



.legal-close-btn {
  background: transparent;
  border: none;
  color: #71717a;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.legal-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.legal-header-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.legal-nav-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #18181b;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-tab-btn {
  background: transparent;
  border: none;
  color: #a1a1aa;
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.legal-tab-btn:hover {
  color: #ffffff;
}

.legal-tab-btn.active {
  background: #ffffff;
  color: #09090b;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.legal-search-wrapper {
  position: relative;
  min-width: 240px;
}

.legal-search-input {
  width: 100%;
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 6px 12px 6px 30px;
  font-size: 12px;
  color: #ffffff;
  outline: none;
  transition: all 0.15s ease;
}

.legal-search-input:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: #27272a;
}

.legal-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #71717a;
  pointer-events: none;
}

.legal-modal-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  background: #09090b;
}

.legal-sidebar {
  width: 230px;
  background: #09090b;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legal-sidebar-title {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #71717a;
  margin-bottom: 4px;
}

.legal-index-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.legal-index-link {
  display: block;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: #a1a1aa;
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.15s ease;
}

.legal-index-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.legal-index-link.active {
  color: #ffffff;
  background: #18181b;
  font-weight: 500;
}

.legal-content-area {
  flex: 1;
  padding: 24px 32px;
  overflow-y: auto;
  max-height: calc(88vh - 160px);
}

.legal-tab-panel {
  display: none;
  line-height: 1.65;
}

.legal-tab-panel.active {
  display: block;
}

.legal-tab-panel h2 {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin: 28px 0 12px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  letter-spacing: -0.01em;
}

.legal-tab-panel h2:first-child {
  margin-top: 0;
}

.legal-tab-panel h3 {
  font-size: 14px;
  font-weight: 600;
  color: #f4f4f5;
  margin: 20px 0 8px 0;
}

.legal-tab-panel p {
  font-size: 13px;
  color: #a1a1aa;
  margin-bottom: 12px;
}

.legal-tab-panel p strong {
  color: #ffffff;
}

.legal-tab-panel ul, .legal-tab-panel ol {
  padding-left: 20px;
  margin-bottom: 14px;
}

.legal-tab-panel li {
  font-size: 13px;
  color: #a1a1aa;
  margin-bottom: 6px;
}

.legal-tab-panel li strong {
  color: #ffffff;
}

.legal-alert, .legal-alert-warning {
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 3px solid #ffffff;
  border-radius: 6px;
  padding: 14px 18px;
  margin: 18px 0;
}

.legal-alert p, .legal-alert-warning p {
  margin: 0;
  color: #e4e4e7;
  font-size: 12.5px;
}

.legal-modal-footer {
  padding: 12px 24px;
  background: #09090b;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.legal-footer-contact {
  font-size: 12px;
  color: #71717a;
}

.legal-footer-contact a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-footer-contact a:hover {
  color: #d4d4d8;
}

.btn-legal-close-footer {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-legal-close-footer:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Auth Checkbox Styles (Monochrome) */
.legal-checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 6px 0;
  text-align: left;
}

.legal-checkbox-input {
  appearance: none;
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
  cursor: pointer;
  margin-top: 2px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.legal-checkbox-input:checked {
  background: #ffffff;
  border-color: #ffffff;
}

.legal-checkbox-input:checked::after {
  content: "";
  width: 4px;
  height: 7px;
  border: solid #09090b;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.legal-checkbox-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.legal-checkbox-label {
  font-size: 12px;
  color: #a1a1aa;
  line-height: 1.45;
  cursor: pointer;
  user-select: none;
}

.legal-link-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-link-btn:hover {
  color: #d4d4d8;
}

@media (max-width: 768px) {
  .legal-modal-dialog {
    max-height: 95vh;
  }
  .legal-sidebar {
    display: none;
  }
  .legal-content-area {
    padding: 16px;
  }
  .legal-header-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==========================================================================
   CSS STUDIO (FULL STYLESHEET CODE EDITOR & LIVE INTERVENTION)
   ========================================================================== */

.modal-css-studio-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 9, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10005;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-css-studio-backdrop.show {
  opacity: 1 !important;
  visibility: visible !important;
  display: flex !important;
}

.modal-css-studio-dialog {
  width: 94vw;
  max-width: 1440px;
  height: 88vh;
  max-height: 920px;
  background: #0c0e14;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-css-studio-dialog.fullscreen {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
  border: none;
}

/* Header */
.css-studio-header {
  height: 52px;
  background: #11141c;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.css-studio-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.css-studio-badge-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a1a1aa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.css-studio-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.css-studio-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #f4f4f5;
  letter-spacing: -0.01em;
}

.css-studio-file-picker-wrap {
  position: relative;
}

.css-studio-select {
  background: #181c26;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #e4e4e7;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 9px;
  outline: none;
  cursor: pointer;
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 0.15s ease;
}

.css-studio-select:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.css-studio-select:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

/* Search Bar */
.css-studio-search-wrap {
  flex: 1;
  max-width: 440px;
  min-width: 220px;
}

.css-studio-search-inner {
  display: flex;
  align-items: center;
  background: #161922;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0 8px;
  height: 32px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.css-studio-search-inner:focus-within {
  border-color: #06b6d4;
  box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
  background: #1a1e2a;
}

.css-studio-search-ico {
  color: #71717a;
  margin-right: 6px;
  flex-shrink: 0;
}

.css-studio-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f4f4f5;
  font-size: 12px;
  padding: 4px 0;
  font-family: inherit;
}

.css-studio-search-input::placeholder {
  color: #52525b;
}

.css-studio-search-count {
  font-size: 11px;
  font-weight: 500;
  color: #a1a1aa;
  margin: 0 8px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.css-studio-search-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-left: 6px;
}

.btn-css-nav {
  background: transparent;
  border: none;
  color: #a1a1aa;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.12s ease;
}

.btn-css-nav:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* Header Actions */
.css-studio-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-css-action {
  background: #181c26;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #d4d4d8;
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-css-action:hover {
  background: #212634;
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.btn-css-icon-only {
  padding: 6px 8px;
}

.btn-css-close {
  background: transparent;
  border: none;
  color: #71717a;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-css-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Code Editor Body */
.css-studio-body {
  flex: 1;
  min-height: 0;
  display: flex;
  position: relative;
  background: #080a0f;
  overflow: hidden;
}

.css-studio-editor-viewport {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
}

.css-studio-gutter {
  width: 58px;
  flex-shrink: 0;
  background: #07080c;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  color: #3f4756;
  font-family: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 20px;
  text-align: right;
  padding: 14px 10px 14px 4px;
  user-select: none;
  overflow: hidden;
  white-space: pre;
  box-sizing: border-box;
}

.css-studio-editor-wrap {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.css-studio-highlight {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 14px 18px;
  font-family: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 20px;
  tab-size: 2;
  white-space: pre;
  overflow: hidden;
  color: #d4d4d8;
  pointer-events: none;
  box-sizing: border-box;
  z-index: 0;
}

.css-studio-highlight code {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  tab-size: inherit;
  white-space: inherit;
}

.css-studio-textarea {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: #e4e4e7;
  font-family: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 20px;
  padding: 14px 18px;
  tab-size: 2;
  box-sizing: border-box;
  overflow: auto;
  white-space: pre;
}

.css-studio-editor-wrap.word-wrap .css-studio-textarea,
.css-studio-editor-wrap.word-wrap .css-studio-highlight {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: hidden;
}

/* Token colors — restrained dark IDE palette */
.css-tok-comment { color: #6b7280; font-style: italic; }
.css-tok-selector { color: #93c5fd; }
.css-tok-class { color: #93c5fd; }
.css-tok-id { color: #fde047; }
.css-tok-pseudo { color: #c084fc; }
.css-tok-property { color: #e4e4e7; }
.css-tok-variable { color: #38bdf8; }
.css-tok-value { color: #cbd5e1; }
.css-tok-number { color: #c4b5fd; }
.css-tok-unit { color: #a78bfa; }
.css-tok-color-hex { color: #fbbf24; }
.css-tok-string { color: #86efac; }
.css-tok-important { color: #f87171; font-weight: 600; }
.css-tok-atrule { color: #c084fc; font-weight: 500; }
.css-tok-brace { color: #71717a; }
.css-tok-colon { color: #71717a; }
.css-tok-semicolon { color: #71717a; }
.css-tok-paren { color: #71717a; }
.css-tok-function { color: #67e8f9; }

.css-studio-textarea::selection {
  background: rgba(139, 92, 246, 0.28);
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.css-studio-textarea::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.css-studio-textarea::-webkit-scrollbar-track {
  background: #0a0c10;
}

.css-studio-textarea::-webkit-scrollbar-thumb {
  background: #27272a;
  border-radius: 5px;
  border: 2px solid #0a0c10;
}

.css-studio-textarea::-webkit-scrollbar-thumb:hover {
  background: #3f3f46;
}

/* Footer Status Bar — Distilled IDE Chrome */
.css-studio-footer {
  height: 30px;
  background: #080a0f;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  font-family: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  user-select: none;
}

.css-studio-footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.css-studio-status-dirty {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  transition: color 0.15s ease;
}

.css-studio-status-dirty::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.css-studio-status-dirty.saved {
  color: #71717a;
}

.css-studio-status-dirty.saved::before {
  background: #10b981;
  opacity: 0.7;
}

.css-studio-status-dirty.dirty {
  color: #fbbf24;
  font-weight: 600;
}

.css-studio-status-dirty.dirty::before {
  background: #f59e0b;
  opacity: 1;
  box-shadow: 0 0 5px rgba(245, 158, 11, 0.5);
}

.css-studio-meta-path {
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.css-studio-stat-divider {
  width: 1px;
  height: 11px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0 2px;
}

.css-studio-footer-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.css-studio-footer-telemetry {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #71717a;
}

.css-studio-stat-item {
  color: #a1a1aa;
  white-space: nowrap;
}

.css-studio-stat-badge {
  color: #64748b;
  font-size: 10px;
  font-weight: 500;
}

.css-studio-footer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-css-footer-revert {
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #71717a;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
}

.btn-css-footer-revert:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: #e4e4e7;
}

.btn-css-footer-revert:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  border-color: transparent;
}

.btn-css-footer-save {
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #a1a1aa;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.btn-css-footer-save:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: #f4f4f5;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-css-footer-save.has-changes {
  background: #3b82f6;
  border-color: #60a5fa;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(59, 130, 246, 0.35);
}

.btn-css-footer-save.has-changes:hover:not(:disabled) {
  background: #2563eb;
  border-color: #93c5fd;
}

.btn-css-footer-save:disabled {
  opacity: 0.6;
  cursor: wait;
}

.css-studio-kbd {
  display: inline-block;
  font-size: 9px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: inherit;
  opacity: 0.85;
}

.btn-css-footer-save:not(.has-changes) .css-studio-kbd {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
  opacity: 0.6;
}

.anim-spin {
  animation: spinAround 0.8s linear infinite;
}

@keyframes spinAround {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Builder Floating Toolbar CSS Button Styling */
.btn-builder-css {
  color: #a78bfa;
}

.btn-builder-css:hover {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.15);
}
