/* ================================================================
   CoreLink 3D Studio — Stylesheet (Compact & Ultra-Responsive)
   Aesthetic: Premium Glassmorphism Dark Dashboard
   Accents: Neon Blue (#00f2fe) & Cyan (#4facfe)
   ================================================================ */

:root {
  --bg-dark:          #080a0f;
  --bg-panel:         rgba(16, 20, 29, 0.88);
  --bg-card:          rgba(24, 30, 43, 0.75);
  --bg-card-hover:    rgba(30, 38, 54, 0.85);
  --bg-input:         #0c1017;
  
  --border-subtle:    rgba(255, 255, 255, 0.07);
  --border-glass:     rgba(255, 255, 255, 0.12);
  --border-active:    #00f2fe;
  
  --accent-cyan:      #00f2fe;
  --accent-blue:      #4facfe;
  --accent-glow:      rgba(0, 242, 254, 0.25);
  --accent-glow-strong: rgba(0, 242, 254, 0.5);
  
  --text-main:        #f8fafc;
  --text-muted:       #cbd5e1;
  --text-ghost:       #94a3b8;
  
  --success:          #10b981;
  --warning:          #f59e0b;
  --danger:           #ef4444;
  
  --font-sans:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:        'Roboto Mono', monospace;
  
  --header-h:         46px;
  --left-panel-w:     320px;
  --right-panel-w:    370px;
  --radius-sm:        4px;
  --radius-md:        6px;
  --radius-lg:        10px;
  
  --ease:             cubic-bezier(0.16, 1, 0.3, 1);
  --transition:       all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── RESET & BASE ───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

/* ── HEADER ─────────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(10, 13, 20, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 500;
}

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

.logo-icon {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  box-shadow: 0 0 8px var(--accent-glow);
}

.logo-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo-text {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  background: linear-gradient(90deg, #ffffff, var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
}

.logo-badge {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(0, 242, 254, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.3);
  letter-spacing: 0.08em;
}

.header-center {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-label {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-ghost);
  letter-spacing: 0.08em;
}

.session-id {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--accent-blue);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.status-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-ghost);
  transition: var(--transition);
}

.status-dot.online  { background: var(--success); box-shadow: 0 0 6px var(--success); }
.status-dot.offline { background: var(--danger); }
.status-dot.loading { background: var(--warning); animation: pulse 1.2s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.status-label {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.status-model {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-ghost);
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  border: 1px solid var(--border-subtle);
}

.backend-badge {
  display: flex;
  background: var(--bg-input);
  border-radius: 3px;
  padding: 1px;
  border: 1px solid rgba(0, 242, 254, 0.2);
}

.backend-btn {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  padding: 2px 7px;
  border: none;
  background: transparent;
  color: var(--text-ghost);
  border-radius: 2px;
  cursor: default;
  transition: var(--transition);
  letter-spacing: 0.06em;
}

.backend-btn.active {
  background: var(--accent-cyan);
  color: #000;
}

/* ── STUDIO LAYOUT GRID ─────────────────────────────────────── */
.studio-layout {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0; bottom: 0;
  display: grid;
  grid-template-columns: var(--left-panel-w) 1fr var(--right-panel-w);
  gap: 0;
  overflow: hidden;
}

/* ── PANELS ─────────────────────────────────────────────────── */
.panel {
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  z-index: 100;
}

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

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

.panel-header {
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.panel-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  text-transform: uppercase;
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Custom Scrollbar */
.panel-content::-webkit-scrollbar,
.mesh-tree-list::-webkit-scrollbar,
.textures-list::-webkit-scrollbar,
.inspector-content::-webkit-scrollbar,
.ai-content::-webkit-scrollbar,
.json-code-block::-webkit-scrollbar {
  width: 5px;
}
.panel-content::-webkit-scrollbar-track,
.mesh-tree-list::-webkit-scrollbar-track,
.textures-list::-webkit-scrollbar-track,
.inspector-content::-webkit-scrollbar-track,
.ai-content::-webkit-scrollbar-track,
.json-code-block::-webkit-scrollbar-track {
  background: transparent;
}
.panel-content::-webkit-scrollbar-thumb,
.mesh-tree-list::-webkit-scrollbar-thumb,
.textures-list::-webkit-scrollbar-thumb,
.inspector-content::-webkit-scrollbar-thumb,
.ai-content::-webkit-scrollbar-thumb,
.json-code-block::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: 3px;
}

/* ── CARDS & COLLAPSIBLE ACCORDIONS ────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: visible;
  transition: var(--transition);
  flex-shrink: 0;
}

.card.flex-grow-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

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

.card-header {
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--border-subtle);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.card-header:hover {
  background: rgba(0, 242, 254, 0.08);
}

.card-icon {
  font-size: 13px;
}

.card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.01em;
  flex: 1;
}

.card-chevron {
  font-size: 10px;
  color: var(--accent-cyan);
  transition: transform 0.2s ease;
}

.card.collapsed .card-chevron {
  transform: rotate(-90deg);
}

.card.collapsed .card-body {
  display: none !important;
}

.card-body {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-body.card-body-flex {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ── COMPACT FORM ELEMENTS ──────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group.inline-row {
  display: grid;
  grid-template-columns: 75px 1fr;
  align-items: center;
  gap: 8px;
}

.form-group.slider-row {
  display: grid;
  grid-template-columns: 75px 1fr 34px;
  align-items: center;
  gap: 8px;
}

.form-group.emissive-row {
  display: grid;
  grid-template-columns: 75px minmax(0, 1fr);
  align-items: center;
  row-gap: 7px;
}

.emissive-color-line {
  display: flex;
  align-items: center;
  gap: 8px;
}
.emissive-value-line {
  grid-column: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 34px;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.emissive-value-line .color-hex-text { width: 72px; min-width: 0; }

.form-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.val-display {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-cyan);
  font-weight: 600;
  text-align: right;
}

.select-field,
.text-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 5px 8px;
  font-family: var(--font-sans);
  font-size: 12px;
  outline: none;
  transition: var(--transition);
}

.select-field:focus,
.text-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-glow);
}

.color-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.color-input {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 24px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: transparent;
  border: none;
  flex-shrink: 0;
}
.color-input::-webkit-color-swatch-wrapper { padding: 0; }
.color-input::-webkit-color-swatch { border: 1px solid var(--border-glass); border-radius: var(--radius-sm); }
.color-action-label { color: var(--text-muted); font-size: 10px; white-space: nowrap; }

.color-picker-wrapper { position: relative; }

.light-controls,
.environment-controls,
.shader-effects { display: flex; flex-direction: column; gap: 8px; }
.light-control-row {
  display: grid;
  grid-template-columns: 72px 18px 48px 1fr 34px;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  font-size: 10px;
}
.light-control-row input[type="range"] { min-width: 0; }
.light-color-input { width: 48px; padding: 4px; color: var(--text-main); background: var(--bg-input); border: 1px solid var(--border-glass); border-radius: 4px; font: 9px var(--font-mono); text-transform: uppercase; }
.light-control-row span { color: var(--accent-cyan); font-family: var(--font-mono); text-align: right; }
.environment-controls > .text-input { font-size: 10px; padding: 6px; }
.environment-file-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 4px 6px;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-muted);
  font-size: 10px;
  overflow: hidden;
}
.choose-file-button {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  transition: background var(--transition-fast);
}
.choose-file-button:hover {
  background: #ffffff;
}
.environment-file-picker span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.btn-remove-environment {
  flex: 0 0 auto;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 4px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-remove-environment:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.6);
  color: #ffffff;
  transform: scale(1.05);
}
.environment-file-hint { color: var(--text-ghost); font-family: var(--font-mono); font-size: 9px; line-height: 1.35; }
.environment-controls .slider-row { grid-template-columns: 75px 1fr 34px; }

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

.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--bg-input);
  outline: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
  cursor: pointer;
  transition: transform 0.1s ease;
}

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

.button-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.btn-toggle {
  padding: 6px 8px;
  min-height: 30px;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-toggle:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-toggle.active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.2), rgba(79, 172, 254, 0.2));
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-glow);
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.preset-btn {
  padding: 6px 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.preset-btn:hover {
  border-color: var(--accent-blue);
  color: var(--text-main);
}

.preset-btn.active {
  background: var(--accent-blue);
  color: #000;
  border-color: var(--accent-blue);
  font-weight: 700;
  box-shadow: 0 0 6px rgba(79, 172, 254, 0.4);
}
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.preset-btn:hover {
  border-color: var(--accent-blue);
  color: var(--text-main);
}

.preset-btn.active {
  background: var(--accent-blue);
  color: #000;
  border-color: var(--accent-blue);
  font-weight: 700;
  box-shadow: 0 0 6px rgba(79, 172, 254, 0.4);
}

.toggle-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding-top: 2px;
}

/* Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 26px;
  height: 14px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--bg-input);
  border: 1px solid var(--border-glass);
  transition: .2s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 8px;
  width: 8px;
  left: 2px;
  bottom: 2px;
  background-color: var(--text-ghost);
  transition: .2s;
}
.slider.round { border-radius: 14px; }
.slider.round:before { border-radius: 50%; }
input:checked + .slider { background-color: rgba(0, 242, 254, 0.2); border-color: var(--accent-cyan); }
input:checked + .slider:before { transform: translateX(12px); background-color: var(--accent-cyan); }

/* ── HEADER DONATE BUTTON ─────────────────────────────────── */
.btn-donate-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  padding: 6px 10px;
  border: 1px solid rgba(0, 242, 254, 0.35);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.16), rgba(79, 172, 254, 0.18));
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
}

.btn-donate-header:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.donate-icon {
  font-size: 12px;
}

/* ── HEADER ACTION BUTTONS (Contact, About) ─────────────────── */
.btn-header-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: transparent;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
}

.btn-header-action:hover {
  transform: translateY(-1px);
  background: rgba(0, 242, 254, 0.08);
  border-color: rgba(0, 242, 254, 0.4);
}

.contact-icon,
.about-icon {
  font-size: 12px;
}

/* ── MODALS ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 5, 10, 0.72);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  width: min(92vw, 480px);
  background: rgba(11, 16, 26, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header h3 {
  font-size: 15px;
  font-weight: 700;
}

.modal-close {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  cursor: pointer;
}

.modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.donate-warning,
.trash-desc {
  font-size: 12px;
  line-height: 1.5;
  color: #facc15;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 10px 12px;
  border-radius: 8px;
}

.btn-secondary,
.btn-danger-outline,
.btn-restore,
.btn-delete {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: var(--transition);
}

.donate-network-note {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

.btn-secondary,
.btn-restore {
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.btn-danger-outline,
.btn-delete {
  padding: 7px 10px;
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

.direct-payment-card {
  border: 1px solid rgba(0, 242, 254, 0.28);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(0, 242, 254, 0.08), rgba(255, 255, 255, 0.025));
  overflow: hidden;
}

.direct-payment-network {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  font-size: 12px;
  font-weight: 700;
}

.network-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
}

.network-token {
  margin-left: auto;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
}

.direct-payment-content {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 12px;
}

.direct-payment-address-group {
  min-width: 0;
  flex: 1;
}

.direct-payment-address-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.direct-payment-address-row code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.5;
}

.btn-copy-address {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid rgba(0, 242, 254, 0.4);
  border-radius: 7px;
  background: rgba(0, 242, 254, 0.1);
  color: var(--text-main);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  transition: var(--transition);
}

.btn-copy-address:hover,
.btn-copy-address.copied {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.14);
  color: #86efac;
}

.copy-feedback {
  display: block;
  min-height: 15px;
  margin-top: 5px;
  color: var(--success);
  font-family: var(--font-mono);
  font-size: 10px;
}

.donate-qr-wrap {
  display: flex;
  flex: 0 0 144px;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
}

.donate-qr-wrap img {
  display: block;
  width: 144px;
  height: 144px;
  padding: 5px;
  border-radius: 6px;
  background: #fff;
}

/* ── CONTACT MODAL ──────────────────────────────────────────── */
.contact-modal {
  width: min(92vw, 500px);
}

.contact-description {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-main);
}

.contact-card {
  border: 1px solid rgba(0, 242, 254, 0.28);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(0, 242, 254, 0.08), rgba(255, 255, 255, 0.025));
  padding: 14px;
}

.email-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.email-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

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

.email-link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 12px;
  word-break: break-all;
  transition: var(--transition);
}

.email-link:hover {
  text-decoration: underline;
  opacity: 0.8;
}

.btn-copy-email {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid rgba(0, 242, 254, 0.4);
  border-radius: 7px;
  background: rgba(0, 242, 254, 0.1);
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
}

.btn-copy-email:hover {
  background: rgba(0, 242, 254, 0.2);
  border-color: rgba(0, 242, 254, 0.6);
}

.btn-copy-email.copied {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.6);
  color: var(--success);
}

/* ── ABOUT MODAL ────────────────────────────────────────────── */
.about-modal {
  width: min(92vw, 540px);
  max-height: 80vh;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-intro {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-main);
}

.about-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.about-subtitle {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
}

.about-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
}

.about-list li {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-main);
  padding-left: 16px;
  position: relative;
}

.about-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
}

.about-list strong {
  color: var(--accent-cyan);
}

@media (max-width: 560px) {
  .direct-payment-content { align-items: stretch; flex-direction: column; }
  .donate-qr-wrap { align-self: center; }
  .network-token { font-size: 8px; }
}

/* ── UPLOADER & FILE LIST ───────────────────────────────────── */
.upload-dropzone {
  border: 1px dashed var(--border-glass);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.05);
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

.upload-icon { font-size: 18px; }
.upload-text { font-weight: 600; font-size: 12px; color: var(--text-main); }
.upload-sub  { font-size: 10px; color: var(--text-ghost); }

.upload-status {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-ghost);
  text-align: center;
  word-break: break-all;
}
.upload-status.success { color: var(--success); }
.upload-status.loading { color: var(--warning); }
.upload-status.error   { color: var(--danger); }

.file-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.file-item:hover,
.file-item.active {
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.06);
}

.file-icon { font-size: 13px; }
.file-name {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-ghost);
}

.file-remove {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
  border-radius: 50%;
  cursor: pointer;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.file-remove:hover {
  background: rgba(239, 68, 68, 0.18);
}

.trash-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}

.trash-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.trash-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.trash-name {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trash-type {
  font-size: 10px;
  color: var(--text-ghost);
}

.trash-actions {
  display: flex;
  gap: 6px;
}

.trash-empty {
  color: var(--text-ghost);
  font-size: 11px;
  padding: 8px 0;
}

.asset-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.btn-trash-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-mono);
  font-size: 11px;
}

.btn-trash-open:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.16);
}

.trash-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.btn-editor-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0, 242, 254, 0.35);
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.12), rgba(168, 85, 247, 0.14));
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

.btn-editor-open:hover {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.22), rgba(168, 85, 247, 0.26));
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.25);
  transform: translateY(-1px);
}

.badge-webgpu {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 242, 254, 0.18);
  border: 1px solid rgba(0, 242, 254, 0.4);
  color: var(--accent-cyan);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* DEDICATED MODEL EXPORT PANEL IN ASSET LIBRARY */
.export-section {
  margin-top: 10px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.export-icon {
  font-size: 14px;
}

.export-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.04em;
}

.export-desc {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.35;
}

.export-form-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 2px;
}

.export-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.btn-export-primary {
  padding: 6px 12px;
  min-height: 32px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  border: none;
  border-radius: var(--radius-sm);
  color: #000;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: var(--transition);
  box-shadow: 0 0 6px var(--accent-glow);
}

.btn-export-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 10px var(--accent-glow-strong);
}

.btn-export-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ── CENTER CANVAS ─────────────────────────────────────────── */
.canvas-container {
  position: relative;
  background: #040508;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.viewport-header {
  height: 36px;
  background: rgba(12, 16, 24, 0.92);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 10;
  flex-shrink: 0;
}

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

/* macOS Window Action Buttons (Red/Yellow/Green Dots) */
.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: none;
  outline: none;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
  display: inline-block;
  padding: 0;
}

.dot:hover {
  transform: scale(1.2);
  filter: brightness(1.2);
}

.dot:active {
  transform: scale(0.95);
}

.dot.red    { background: #ff5f56; box-shadow: 0 0 4px rgba(255, 95, 86, 0.4); }
.dot.yellow { background: #ffbd2e; box-shadow: 0 0 4px rgba(255, 189, 46, 0.4); }
.dot.green  { background: #27c93f; box-shadow: 0 0 4px rgba(39, 201, 63, 0.4); }

.dot.active-dot {
  box-shadow: 0 0 8px #ff5f56;
}

.viewport-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 6px;
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewport-quick-tools {
  display: flex;
  align-items: center;
  gap: 5px;
}

.tool-btn {
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.tool-btn:hover,
.tool-btn.active {
  background: var(--accent-cyan);
  color: #000;
  border-color: var(--accent-cyan);
  font-weight: 600;
}

.tool-btn.accent-btn {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.25), rgba(79, 172, 254, 0.25));
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 600;
}

.tool-btn.accent-btn:hover {
  background: var(--accent-cyan);
  color: #000;
  box-shadow: 0 0 8px var(--accent-glow);
}

#viewport3d {
  width: 100%;
  height: 100%;
  flex: 1;
  display: block;
  cursor: grab;
}
#viewport3d:active { cursor: grabbing; }

.canvas-drop-overlay {
  position: absolute;
  inset: 36px 0 0 0;
  background: rgba(4, 5, 8, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 20;
}

.canvas-drop-overlay.active {
  opacity: 1;
}

.drop-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  border: 2px dashed var(--accent-cyan);
  border-radius: var(--radius-lg);
  background: rgba(0, 242, 254, 0.05);
}

.drop-icon { font-size: 28px; }
.drop-main {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-cyan);
}

.viewport-hud {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
  pointer-events: none;
  z-index: 10;
}

.hud-badge {
  padding: 3px 8px;
  background: rgba(12, 16, 24, 0.88);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  backdrop-filter: blur(6px);
}

.hud-badge.accent {
  border-color: rgba(0, 242, 254, 0.4);
}

.hud-label { color: var(--text-ghost); }
.hud-val   { color: var(--accent-cyan); font-weight: 600; }

/* ── RIGHT PANEL: INSPECTOR & AI ────────────────────────────── */
.inspector-section {
  flex: 0 0 auto;
  max-height: 44%;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border-glass);
  overflow-y: auto;
  overflow-x: hidden;
}

.inspector-content {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.stat-box {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--text-ghost);
  text-transform: uppercase;
}

.stat-val {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-tree-container,
.textures-list-container {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.tree-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.tree-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-cyan);
}

.mesh-tree-list {
  max-height: 100px;
  overflow-y: auto;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tree-node-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
}

.tree-node-item:hover {
  background: rgba(0, 242, 254, 0.08);
}

.tree-node-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-node-verts { color: var(--text-ghost); font-size: 10px; margin-right: 6px; }

.textures-list {
  max-height: 85px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.texture-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px;
}

.tex-type { color: var(--accent-blue); font-weight: 600; }
.tex-info { color: var(--text-ghost); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }

/* ── AI SECTION & EXPANDED JSON CONSOLE ───────────────────────── */
.ai-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(8, 11, 18, 0.5);
  min-height: 0;
}

.ai-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 8px;
  overflow: hidden;
}

.ai-input-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

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

.ai-label {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-transform: uppercase;
}

.ai-status-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.ai-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-main);
  padding: 6px 8px;
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 1.4;
  resize: none;
  outline: none;
  transition: var(--transition);
}

.ai-textarea:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-glow);
}

.btn-ai-submit {
  width: 100%;
  padding: 8px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  border: none;
  border-radius: var(--radius-sm);
  color: #000;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition);
  box-shadow: 0 0 8px var(--accent-glow);
}

.btn-ai-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 12px var(--accent-glow-strong);
}

.btn-ai-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.chip-btn {
  padding: 3px 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  color: var(--text-ghost);
  font-family: var(--font-mono);
  font-size: 10px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.chip-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* AI Output JSON Block (EXPANDED TO FILL EMPTY SPACE) */
.ai-output-box {
  flex: 1;
  background: #06080d;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 140px;
}

.output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.output-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.06em;
}

.output-sub {
  font-size: 10px;
  color: var(--text-ghost);
}

.json-code-block {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: #38bdf8;
  background: rgba(0, 0, 0, 0.3);
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.webgl-fallback {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--text-muted);
  text-align: center;
  font-family: var(--font-mono);
}

@media (max-width: 900px) {
  html, body {
    min-height: 100%;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .header {
    position: sticky;
    height: auto;
    min-height: var(--header-h);
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 6px 10px;
  }

  .header-logo { min-width: 0; }
  .logo-badge, .session-label, .status-model { display: none; }
  .header-center { margin-left: auto; }
  .header-status { width: 100%; justify-content: space-between; }

  .studio-layout {
    position: relative;
    top: auto;
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  .canvas-container {
    order: -1;
    height: min(62vh, 560px);
    min-height: 320px;
    flex: none;
  }

  .panel {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .panel-content {
    max-height: none;
    overflow: visible;
  }

  .panel-left, .panel-right { border: 0; }
  .inspector-section, .ai-section { max-height: none; overflow: visible; }
  .inspector-content, .ai-content { overflow: visible; }
  .viewport-quick-tools { flex-wrap: wrap; }
}

@media (max-width: 560px) {
  .header-logo { flex: 1; }
  .header-center { max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .logo-text { font-size: 14px; }
  .canvas-container { height: 52vh; min-height: 280px; }
  .viewport-title { font-size: 10px; }
  .viewport-quick-tools .tool-btn { padding: 4px 6px; font-size: 10px; }
  .btn-donate-header, .btn-header-action { display: none; }
  .btn-mobile-menu { display: inline-flex; }
}

/* ── MOBILE MENU STYLES ────────────────────────────────── */
.btn-mobile-menu {
  display: none;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  margin-left: 8px;
}

.btn-mobile-menu:hover {
  background: rgba(0, 242, 254, 0.08);
  border-color: rgba(0, 242, 254, 0.3);
}

.mobile-menu-drawer {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: rgba(11, 16, 26, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateY(-100%);
  opacity: 0;
  transition: var(--transition);
  z-index: 999;
  pointer-events: none;
}

.mobile-menu-drawer.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-content {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 8px;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 4px;
}

.mobile-menu-item:hover {
  background: rgba(0, 242, 254, 0.08);
  border-color: rgba(0, 242, 254, 0.3);
}

.mobile-menu-item.mobile-menu-donate {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.14), rgba(79, 172, 254, 0.16));
  border-color: rgba(0, 242, 254, 0.35);
  color: var(--text-main);
  font-weight: 700;
}

.mobile-menu-item.mobile-menu-donate:hover {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.22), rgba(79, 172, 254, 0.26));
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
}

.mobile-menu-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--accent-cyan);
}

.execution-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px solid var(--border-subtle);
}

.exec-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
}

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

/* ================================================================
   CoreLink 3D — Contrast & Legibility Enhancements
   Added: panel labels, tree nodes, HUD, inspector, output clarity
   ================================================================ */

/* Panel section headings — crisper contrast */
.section-title,
.panel-section-title,
.inspector-group-label,
.ai-section .panel-section-title {
  color: var(--text-main) !important;
  font-weight: 700 !important;
  letter-spacing: 0.07em;
}

/* GLB scene tree nodes */
.tree-node-name {
  color: var(--text-main) !important;
  font-weight: 500;
}
.tree-node-type {
  color: var(--accent-cyan);
  opacity: 0.85;
}
.tree-node-verts {
  color: var(--text-ghost);
  font-size: 10px;
}

/* Property row labels in inspector */
.inspector-prop-label,
.prop-label,
.form-label {
  color: var(--text-muted);
  font-weight: 600;
}

/* HUD value badges */
.hud-label {
  color: var(--text-ghost);
  font-size: 10px;
}
.hud-value {
  color: var(--text-main);
  font-weight: 600;
}

/* Output subheader */
.output-sub {
  color: var(--text-muted);
}

/* AI input placeholder */
.ai-prompt::placeholder,
textarea::placeholder {
  color: rgba(148, 163, 184, 0.55);
}

/* Metadata / secondary labels across dark panels */
.asset-meta,
.scene-meta,
.upload-sub,
.item-sub,
.format-sub {
  color: var(--text-muted) !important;
}

/* Panel environment hints */
.environment-file-hint {
  color: var(--text-muted);
}

/* QR Code styling in donate modal */
.donate-qr-wrap img#donateQrCode {
  background: #fff;
  border-radius: 6px;
  padding: 6px;
  display: block;
  image-rendering: pixelated;
}

/* Mobile menu backdrop overlay */
.mobile-menu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--header-h);
  background: rgba(0, 0, 0, 0.55);
  z-index: 998;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.mobile-menu-backdrop.visible {
  display: block;
}


/* Backend badge (Ollama-only indicator) */
.backend-badge {
  pointer-events: none;
}

/* Smooth status dot animation */
.status-dot {
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* ── END ENHANCEMENTS ─────────────────────────────────────────── */

/* ═══════════════════════════════════════════════════════════════
   WEBGPU BABYLON.JS STUDIO — DARK 3D WORKSPACE
   ═══════════════════════════════════════════════════════════════ */

.webgpu-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  flex-direction: column;
  background: #090c14;
  color: #e2e8f0;
  font-family: var(--font-main);
  user-select: none;
  overflow: hidden;
}

.webgpu-editor-overlay.open {
  display: flex;
}

.studio-icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.studio-icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

/* ── Studio Header ─────────────────────────────────────────── */
.editor-header {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 46px;
  padding: 0 16px;
  background: #0f1422;
  border-bottom: 1px solid #1c263d;
  flex-shrink: 0;
  z-index: 10;
}

.editor-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
}

.editor-logo-icon {
  width: 21px;
  height: 21px;
  color: #22d3ee;
  stroke-width: 1.7;
}

.editor-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.editor-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.editor-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  width: fit-content;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.2), rgba(168, 85, 247, 0.2));
  border: 1px solid rgba(0, 242, 254, 0.45);
  color: #00f2fe;
}

.editor-badge .studio-icon {
  width: 11px;
  height: 11px;
}

.editor-badge.webgpu-active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.25), rgba(168, 85, 247, 0.25));
  border-color: rgba(0, 242, 254, 0.6);
  color: #00f2fe;
}

.editor-badge.webgl-active {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.45);
  color: #fbbf24;
}

.editor-header-center {
  flex: 1;
  text-align: center;
}

.editor-model-info {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #94a3b8;
  letter-spacing: 0.03em;
}

.editor-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 240px;
  justify-content: flex-end;
}

.editor-export-menu {
  position: relative;
}

.editor-export-chevron {
  width: 13px;
  height: 13px;
  transition: transform 0.15s ease;
}

.btn-editor-action[aria-expanded="true"] .editor-export-chevron {
  transform: rotate(180deg);
}

.editor-export-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  right: 0;
  width: 220px;
  padding: 5px;
  border: 1px solid #30405f;
  border-radius: 7px;
  background: #111a2a;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.44);
}

.editor-export-popover[hidden] { display: none; }

.editor-export-popover button {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #d8e2f0;
  font: 600 11px var(--font-mono);
  text-align: left;
  cursor: pointer;
}

.editor-export-popover button:hover,
.editor-export-popover button:focus-visible {
  background: rgba(0, 242, 254, 0.12);
  color: #00f2fe;
  outline: none;
}

.editor-export-popover small {
  color: #8291aa;
  font-size: 10px;
}

.export-format-check {
  width: 14px;
  color: #00f2fe;
  font-weight: 700;
  visibility: hidden;
}

.editor-export-popover button.is-active .export-format-check { visibility: visible; }

.btn-editor-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #232f48;
  background: #151c2e;
  color: #cbd5e1;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: var(--transition);
}

.btn-editor-action:hover {
  background: rgba(0, 242, 254, 0.12);
  border-color: rgba(0, 242, 254, 0.45);
  color: #00f2fe;
}

.btn-editor-action.active {
  background: rgba(0, 242, 254, 0.18);
  border-color: #00f2fe;
  color: #00f2fe;
}

.btn-editor-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  cursor: pointer;
  transition: var(--transition);
}

.btn-editor-close:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fff;
}

/* ── Workspace 3-Column Layout ─────────────────────────────── */
.editor-workspace-layout {
  display: grid;
  grid-template-columns: 260px 1fr 310px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

@media (max-width: 1024px) {
  .editor-workspace-layout {
    grid-template-columns: 220px 1fr 260px;
  }
}

@media (max-width: 768px) {
  .editor-workspace-layout {
    grid-template-columns: 1fr;
  }
  .editor-sidebar-left, .editor-sidebar-right {
    display: none;
  }
}

/* ── Studio Panels (Left & Right) ──────────────────────────── */
.editor-panel {
  background: #0d111c;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 5;
}

.editor-sidebar-left {
  border-right: 1px solid #1a2338;
}

.editor-sidebar-right {
  border-left: 1px solid #1a2338;
}

.editor-panel-header {
  height: 36px;
  padding: 0 12px;
  background: #111726;
  border-bottom: 1px solid #1a2338;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.panel-heading {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.panel-node-count, .panel-selected-type {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #64748b;
}

.editor-search-box {
  padding: 8px 10px;
  background: #0d111c;
  border-bottom: 1px solid #1a2338;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 6;
}

.editor-search-box input {
  flex: 1;
  background: #080b12;
  border: 1px solid #1f2a42;
  border-radius: 4px;
  color: #cbd5e1;
  font-family: var(--font-main);
  font-size: 11px;
  padding: 4px 8px;
  outline: none;
}

.editor-search-box input:focus {
  border-color: #00f2fe;
}

/* ── Scene Graph Tree ──────────────────────────────────────── */
.editor-tree-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.scene-tree-group {
  display: flex;
  flex-direction: column;
  border: 1px solid transparent;
  border-radius: 5px;
  overflow: hidden;
}

.scene-group-header {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 5px;
  color: #aab8cc;
  background: #101725;
  border-bottom: 1px solid #1a2338;
}

.scene-group-toggle,
.scene-group-delete {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #70809a;
  cursor: pointer;
}

.scene-group-toggle .studio-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}

.scene-tree-group.collapsed .scene-group-toggle .studio-icon { transform: rotate(-90deg); }
.scene-group-toggle:hover { color: #00f2fe; background: rgba(0, 242, 254, 0.1); }
.scene-group-delete:hover { color: #fca5a5; background: rgba(239, 68, 68, 0.12); }

.scene-group-icon { width: 13px; height: 13px; color: #67d5ff; }
.scene-group-label { flex: 1; font: 700 10px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.scene-group-count { min-width: 18px; padding: 1px 4px; border-radius: 8px; background: #1c2940; color: #8ea0bb; font: 600 10px var(--font-mono); text-align: center; }

.scene-group-items { display: flex; flex-direction: column; gap: 2px; padding: 3px 0; }
.scene-tree-group.collapsed .scene-group-items { display: none; }
.scene-tree-group.collapsed.has-search-result .scene-group-items { display: flex; }

.tree-node {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 550;
  color: #d8e2f0;
  transition: background 0.15s, color 0.15s;
}

.tree-node:hover {
  background: rgba(0, 242, 254, 0.08);
  color: #00f2fe;
}

.tree-node.selected {
  background: rgba(0, 242, 254, 0.18);
  color: #00f2fe;
  font-weight: 600;
}

.tree-node-icon {
  width: 14px;
  height: 14px;
  color: #7dd3fc;
  opacity: 0.95;
}

.tree-node-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-node-actions {
  display: flex;
  gap: 4px;
  opacity: 0.3;
  transition: opacity 0.15s;
}

.tree-node:hover .tree-node-actions {
  opacity: 1;
}

.tree-btn {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.tree-btn:hover {
  color: #fff;
}

/* ── Center Area: Viewport + Bottom Dock ───────────────────── */
.editor-center-area {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  position: relative;
  background: #060810;
}

/* ── Viewport HUD Toolbar ──────────────────────────────────── */
.viewport-hud-toolbar {
  height: 36px;
  background: #111726;
  border-bottom: 1px solid #1a2338;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  flex-shrink: 0;
  z-index: 4;
}

.hud-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hud-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  margin-right: 4px;
}

.hud-separator {
  width: 1px;
  height: 18px;
  background: #232e48;
  margin: 0 4px;
}

.hud-tool-btn {
  height: 26px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #151c2e;
  border: 1px solid #232f48;
  border-radius: 4px;
  color: #94a3b8;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  transition: var(--transition);
}

.hud-tool-btn:hover {
  background: #1f2a44;
  color: #00f2fe;
}

.hud-tool-btn.active {
  background: rgba(0, 242, 254, 0.2);
  border-color: #00f2fe;
  color: #00f2fe;
}

.hud-select {
  height: 26px;
  background: #151c2e;
  border: 1px solid #232f48;
  border-radius: 4px;
  color: #cbd5e1;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 0 8px;
  outline: none;
}

.hud-select:focus {
  border-color: #00f2fe;
}

.coord-label {
  font-size: 10px;
  font-weight: 600;
}

/* ── Viewport Canvas Container ─────────────────────────────── */
.editor-viewport-container {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  background: #060810;
}

.editor-viewport-container.drag-over::after {
  content: 'Drop GLB, glTF, CL3D, HDR or EXR to import';
  position: absolute;
  inset: 10px;
  z-index: 18;
  display: grid;
  place-items: center;
  border: 2px dashed #00f2fe;
  border-radius: 8px;
  background: rgba(0, 242, 254, 0.1);
  color: #dffcff;
  font: 700 13px var(--font-mono);
  pointer-events: none;
}

.webgpu-canvas {
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
  touch-action: none;
}

/* ── Loader Overlay ────────────────────────────────────────── */
.editor-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(9, 12, 20, 0.92);
  backdrop-filter: blur(8px);
  z-index: 20;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #94a3b8;
  letter-spacing: 0.04em;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(0, 242, 254, 0.15);
  border-top-color: #00f2fe;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

/* ── Bottom Dock (Assets / Console) ────────────────────────── */
.editor-bottom-dock {
  height: 150px;
  background: #0d111c;
  border-top: 1px solid #1a2338;
  display: flex;
  flex-direction: column;
  transition: height 0.2s ease;
  z-index: 4;
}

.editor-bottom-dock.collapsed {
  height: 32px;
}

.dock-header {
  height: 32px;
  background: #111726;
  border-bottom: 1px solid #1a2338;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  flex-shrink: 0;
}

.dock-tabs {
  display: flex;
  gap: 4px;
}

.dock-tab {
  height: 24px;
  padding: 0 10px;
  background: none;
  border: none;
  color: #64748b;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 4px;
  transition: var(--transition);
}

.dock-tab:hover {
  color: #cbd5e1;
}

.dock-tab.active {
  background: #182033;
  color: #00f2fe;
}

.dock-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dock-fps {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #10b981;
  font-weight: 700;
}

.dock-btn-min {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
}

.dock-btn-min:hover {
  background: #182033;
  color: #fff;
}

.dock-content {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
}

.dock-tab-pane {
  display: none;
  width: 100%;
  height: 100%;
}

.dock-tab-pane.active {
  display: flex;
  flex-direction: column;
}

.primitive-grid {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  align-items: center;
  flex: 1;
}

.primitive-card {
  min-width: 75px;
  height: 70px;
  background: #131826;
  border: 1px solid #202b42;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  color: #d8e2f0;
  transition: var(--transition);
  flex-shrink: 0;
}

.primitive-card:hover {
  background: rgba(0, 242, 254, 0.12);
  border-color: #00f2fe;
  color: #00f2fe;
  transform: translateY(-2px);
}

.primitive-icon {
  width: 22px;
  height: 22px;
  color: #7dd3fc;
  stroke-width: 1.65;
}

.primitive-name {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.015em;
}

.console-telemetry-bar {
  height: 26px;
  background: #090c14;
  border-bottom: 1px solid #161e30;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #64748b;
  flex-shrink: 0;
}

.telem-item strong {
  color: #cbd5e1;
}

.btn-console-clear {
  margin-left: auto;
  background: #151c2e;
  border: 1px solid #232f48;
  border-radius: 3px;
  color: #94a3b8;
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 2px 6px;
  cursor: pointer;
}

.btn-console-clear:hover {
  color: #fff;
  border-color: #00f2fe;
}

.console-output {
  flex: 1;
  overflow-y: auto;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.console-log.info { color: #38bdf8; }
.console-log.warn { color: #fbbf24; }
.console-log.error { color: #f87171; }

/* ── Right Inspector Panel ─────────────────────────────────── */
.editor-inspector-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.inspector-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 16px;
  color: #64748b;
  gap: 12px;
}

.empty-icon {
  font-size: 28px;
  opacity: 0.6;
}

.inspector-empty-state p {
  font-size: 11px;
  line-height: 1.5;
}

.insp-section {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #1a2338;
}

.insp-section-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #00f2fe;
  margin-bottom: 8px;
}

.insp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}

.insp-label {
  font-size: 12px;
  font-weight: 600;
  color: #aebcd0;
}

.insp-input {
  background: #080b12;
  border: 1px solid #1f2a42;
  border-radius: 4px;
  color: #cbd5e1;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 8px;
  outline: none;
  flex: 1;
  max-width: 170px;
}

.insp-input:focus {
  border-color: #00f2fe;
}

.insp-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  background: #182033;
  border: 1px solid #24314c;
  border-radius: 4px;
  color: #38bdf8;
}

.insp-toggle-row {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
  font-size: 11px;
  color: #cbd5e1;
}

.insp-toggle-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.insp-transform-group {
  margin-bottom: 8px;
}

.insp-sub-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: #8fa1bb;
  margin-bottom: 4px;
}

.axis-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
}

.axis-field {
  display: flex;
  align-items: center;
  background: #080b12;
  border: 1px solid #1f2a42;
  border-radius: 4px;
  overflow: hidden;
}

.axis-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
}

.axis-tag.x { background: #ef4444; color: #fff; }
.axis-tag.y { background: #22c55e; color: #fff; }
.axis-tag.z { background: #3b82f6; color: #fff; }

.axis-field input {
  width: 100%;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px;
  outline: none;
}

.color-picker-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.color-picker-wrap input[type="color"] {
  width: 26px;
  height: 26px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
}

.hex-input {
  width: 80px;
}

.insp-slider-row {
  margin-bottom: 10px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.slider-val {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #00f2fe;
}

.insp-slider-row input[type="range"] {
  width: 100%;
  accent-color: #00f2fe;
  cursor: pointer;
}


/* ── Babylon Native Inspector Support ──────────────────────── */
#scene-explorer-host,
#inspector-host {
  z-index: 100;
  position: relative;
  flex-shrink: 0;
}
