:root {
  --bg-void: #0a0b0d;
  --glass-bg: rgba(14, 15, 18, 0.78);
  --glass-bg-strong: rgba(12, 13, 16, 0.90);
  --glass-border: rgba(255, 255, 255, 0.09);
  --glass-border-hover: rgba(255, 255, 255, 0.20);
  --text-primary: #f5f4f0;
  --text-secondary: rgba(245, 244, 240, 0.68);
  --text-muted: rgba(245, 244, 240, 0.44);
  --accent-amber: #ffaa33;
  --accent-amber-soft: rgba(255, 170, 51, 0.16);
  --accent-cyan: #38bdf8;
  --accent-cyan-soft: rgba(56, 189, 248, 0.16);
  --accent-green: #38d864;
  --font-display: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

[hidden] {
  display: none !important;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

.canvas-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  cursor: grab;
}
.canvas-container:active {
  cursor: grabbing;
}

/* Loading Screen */
.loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: radial-gradient(circle at 50% 42%, #17191e 0%, #090a0c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.55s;
}
.loader-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-card {
  width: min(360px, 88vw);
  text-align: center;
  padding: 32px 28px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
}
.loader-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.14em;
  margin-bottom: 4px;
}
.loader-brand span {
  font-size: 0.8rem;
  vertical-align: super;
  color: var(--accent-amber);
}
.loader-title {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.loader-progress-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 10px;
}
.loader-progress-bar {
  width: 18%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-amber), #38bdf8);
  border-radius: 99px;
  transition: width 0.25s ease;
}
.loader-status {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Drag & Drop Overlay */
.dropzone-overlay {
  position: fixed;
  inset: 0;
  z-index: 180;
  background: rgba(8, 12, 18, 0.82);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.dropzone-overlay[hidden] {
  display: none !important;
}
.dropzone-modal {
  padding: 40px 48px;
  border-radius: 24px;
  border: 2px dashed var(--accent-cyan);
  background: rgba(14, 22, 34, 0.90);
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
}
.dropzone-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--accent-cyan-soft);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dropzone-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.dropzone-title code {
  color: var(--accent-cyan);
}
.dropzone-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Interactive 3D Inline Cord Switch Hotspot */
.hotspot-pill {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 15;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(14, 16, 20, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  color: var(--text-primary);
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  transform: translate(-50%, -100%);
  transition: opacity 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.42);
}
.hotspot-pill:hover {
  border-color: var(--accent-amber);
}
.hotspot-pill.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.hotspot-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}
.hotspot-pill.is-off .hotspot-dot {
  background: rgba(255, 255, 255, 0.35);
  box-shadow: none;
}

/* Live 3D Surface Lux Probe Tooltip */
.lux-probe-badge {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 30;
  pointer-events: none;
  padding: 7px 11px;
  border-radius: 10px;
  background: rgba(10, 12, 16, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.42);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.48);
  transform: translate(16px, -50%);
  transition: opacity 0.12s ease;
}
.lux-probe-badge[hidden] {
  display: none !important;
}
.probe-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.probe-lux {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffd166;
}
.probe-surface {
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
}
.probe-meta {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* False-Color Heatmap Scale Bar */
.heatmap-legend {
  position: fixed;
  left: 20px;
  bottom: 138px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px);
  width: 220px;
}
.heatmap-legend[hidden] {
  display: none !important;
}
.hm-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.hm-bar {
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, #102552 0%, #168aad 25%, #38b000 50%, #ffbe0b 76%, #fb5607 92%, #ff0054 100%);
  margin-bottom: 5px;
}
.hm-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
}

/* UI Chrome Visibility */
.ui-chrome {
  transition: opacity 0.3s ease, transform 0.3s ease;
}
body.ui-hidden .ui-chrome {
  opacity: 0;
  pointer-events: none;
}
body.ui-hidden #btn-toggle-ui {
  opacity: 1;
  pointer-events: auto;
}

/* Top Bar */
.top-bar {
  position: fixed;
  top: 16px;
  left: 20px;
  right: 20px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.brand-pill,
.top-actions {
  pointer-events: auto;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 15px;
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.back-config-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 500;
  transition: color 0.18s;
}
.back-config-link:hover {
  color: #fff;
}

.brand-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.12em;
}
.brand-logo span {
  font-size: 0.65rem;
  vertical-align: super;
  color: var(--accent-amber);
}
.brand-sep {
  width: 1px;
  height: 13px;
  background: rgba(255, 255, 255, 0.14);
}
.brand-product {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.84rem;
}
.brand-meta {
  font-size: 0.74rem;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(255, 170, 51, 0.15);
  border: 1px solid rgba(255, 170, 51, 0.32);
  color: #ffd089;
  font-weight: 500;
}
.brand-sku {
  font-family: var(--font-mono);
  font-size: 0.71rem;
  color: var(--text-muted);
}

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

.action-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}
.action-pill:hover {
  border-color: var(--glass-border-hover);
  background: rgba(24, 26, 32, 0.88);
}
.action-pill.icon-only {
  padding: 8px 10px;
}

.upload-cta-pill {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.38);
  color: #bae6fd;
}
.upload-cta-pill:hover {
  background: rgba(56, 189, 248, 0.24);
  border-color: rgba(56, 189, 248, 0.62);
}
.upload-cta-pill code,
.export-cta-pill code {
  font-family: var(--font-mono);
  font-weight: 600;
  color: #fff;
}

.export-cta-pill {
  background: rgba(255, 170, 51, 0.15);
  border-color: rgba(255, 170, 51, 0.42);
  color: #ffd089;
}
.export-cta-pill:hover {
  background: rgba(255, 170, 51, 0.26);
  border-color: rgba(255, 170, 51, 0.68);
}

.ldt-trigger-btn.is-open {
  border-color: rgba(255, 170, 51, 0.45);
  background: rgba(24, 22, 18, 0.90);
}
.pulse-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}
.pulse-indicator.is-off {
  background: #ef4444;
  box-shadow: none;
}
.ldt-live-readout {
  font-family: var(--font-mono);
  font-size: 0.74rem;
}
.dot-sep {
  margin: 0 3px;
  color: var(--text-muted);
}
.ldt-badge-tag {
  font-size: 0.66rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(255, 170, 51, 0.18);
  color: #ffc266;
}
.ldt-badge-tag.is-custom {
  background: rgba(56, 189, 248, 0.22);
  color: #7dd3fc;
}

/* Photometric Estimation & Light-Flow Designer Panel */
.ldt-popover {
  position: fixed;
  top: 60px;
  right: 20px;
  z-index: 25;
  width: 332px;
  max-height: calc(100vh - 155px);
  overflow-y: auto;
  scrollbar-width: thin;
  padding: 13px;
  border-radius: 18px;
  background: var(--glass-bg-strong);
  border: 1px solid rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(26px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.ldt-popover[hidden] {
  display: none !important;
}

.ldt-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.telemetry-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}
.ldt-tag-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

/* Mode Switcher Tabs */
.ldt-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.ldt-tab-btn {
  padding: 5px 8px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.71rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ldt-tab-btn:hover {
  color: #fff;
}
.ldt-tab-btn.is-active {
  background: rgba(255, 170, 51, 0.20);
  color: #ffd180;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.ldt-tab-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ldt-tab-panel[hidden] {
  display: none !important;
}

/* Optical Archetype Pills */
.flow-optic-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.optic-pill {
  padding: 5px 4px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 0.64rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.optic-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.optic-pill.is-active {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.48);
  color: #e0f2fe;
}

/* Parametric Light-Flow Sliders Grid */
.flow-sliders-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px 10px;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.flow-slider-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.flow-slider-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-muted);
}
.flow-slider-head span {
  color: #ffd166;
  font-weight: 600;
  font-size: 0.63rem;
}

/* Client Upload Box inside Library Tab */
.ldt-upload-box {
  padding: 9px 11px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.10), rgba(255, 170, 51, 0.06));
  border: 1px dashed rgba(56, 189, 248, 0.36);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ldt-upload-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.upload-title {
  font-size: 0.74rem;
  font-weight: 600;
  color: #e0f2fe;
}
.upload-title code,
.upload-hint code {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}
.upload-hint {
  font-size: 0.65rem;
  color: var(--text-secondary);
}
.ldt-upload-actions {
  display: flex;
  gap: 6px;
}
.upload-btn-primary {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.22);
  border: 1px solid rgba(56, 189, 248, 0.48);
  color: #f0f9ff;
  font-size: 0.71rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}
.upload-btn-primary:hover {
  background: rgba(56, 189, 248, 0.34);
}

/* Preset LDT Selector Grid */
.ldt-preset-section {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.section-micro-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.59rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.sym-tag {
  color: var(--text-secondary);
}
.ldt-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.ldt-preset-pill {
  padding: 5px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text-secondary);
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 1px;
  transition: all 0.15s ease;
}
.ldt-preset-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}
.ldt-preset-pill.is-active {
  background: rgba(255, 170, 51, 0.15);
  border-color: rgba(255, 170, 51, 0.45);
  color: #fff;
}
.ldt-preset-pill .p-name {
  font-size: 0.67rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ldt-preset-pill .p-sub {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-muted);
}
.ldt-preset-pill.is-active .p-sub {
  color: #ffd089;
}

/* Polar Canvas Box */
.ldt-polar-box {
  background: rgba(0, 0, 0, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 7px 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.polar-canvas-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--text-muted);
}
.polar-drag-hint {
  color: var(--accent-cyan);
  font-size: 0.57rem;
}
#ldt-polar-canvas {
  width: 100%;
  height: auto;
  display: block;
  cursor: crosshair;
}
.ldt-polar-meta {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-family: var(--font-mono);
  font-size: 0.60rem;
  color: var(--text-muted);
  text-align: center;
}
#ldt-file-label {
  color: var(--text-secondary);
  font-weight: 500;
  word-break: break-all;
}

/* Estimation Metrics Grid */
.ldt-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}
.ldt-metric {
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.ldt-metric.highlight {
  background: rgba(255, 170, 51, 0.09);
  border-color: rgba(255, 170, 51, 0.24);
}
.m-label {
  font-size: 0.59rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.m-val {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-primary);
}
.ldt-metric.highlight .m-val {
  color: #ffd166;
}

/* Export Footer & EN 12464-1 Compliance Bar */
.ldt-export-footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.en-compliance-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(56, 216, 100, 0.10);
  border: 1px solid rgba(56, 216, 100, 0.28);
  font-size: 0.65rem;
  color: #bbf7d0;
}
.en-compliance-bar.is-ambient {
  background: rgba(255, 170, 51, 0.10);
  border-color: rgba(255, 170, 51, 0.28);
  color: #fde68a;
}
.en-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38d864;
  flex-shrink: 0;
}
.en-compliance-bar.is-ambient .en-dot {
  background: #ffaa33;
}

.export-ldt-full-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 9px;
  background: linear-gradient(90deg, rgba(255, 170, 51, 0.22), rgba(56, 189, 248, 0.20));
  border: 1px solid rgba(255, 170, 51, 0.45);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}
.export-ldt-full-btn:hover {
  background: linear-gradient(90deg, rgba(255, 170, 51, 0.34), rgba(56, 189, 248, 0.30));
  border-color: rgba(255, 170, 51, 0.72);
}
.export-ldt-full-btn code {
  font-family: var(--font-mono);
  color: #ffd166;
}

/* Bottom Floating Control Dock */
.bottom-dock {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 96vw;
}

.secondary-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.38);
  flex-wrap: wrap;
  justify-content: center;
}

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

.bar-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-right: 4px;
}

.bar-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 4px;
}

.view-pill,
.ambience-pill,
.overlay-pill {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.16s ease;
}
.view-pill:hover,
.ambience-pill:hover,
.overlay-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}
.view-pill.is-active,
.ambience-pill.is-active {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.overlay-pill .pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}
.overlay-pill.is-active {
  background: rgba(255, 170, 51, 0.15);
  border-color: rgba(255, 170, 51, 0.38);
  color: #ffd180;
}
.overlay-pill.is-active .pill-dot {
  background: var(--accent-amber);
  box-shadow: 0 0 6px var(--accent-amber);
}

/* Primary Configurator Bar */
.main-dock {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  border-radius: 20px;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(24px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.52);
}

.dock-section {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.power-section {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.sliders-section {
  flex-direction: row;
  align-items: center;
  gap: 14px;
}

.dock-divider {
  width: 1px;
  height: 36px;
  background: rgba(255, 255, 255, 0.10);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.60rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.power-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 170, 51, 0.38);
  background: rgba(255, 170, 51, 0.14);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}
.power-btn.is-on .power-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-amber);
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}
.power-btn:not(.is-on) {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}
.power-btn:not(.is-on) .power-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dimmer-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 112px;
}
.dimmer-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  color: var(--text-secondary);
}
.dimmer-head span {
  color: #fff;
  font-weight: 600;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent-amber);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

/* Mounting Pills */
.mount-pills {
  display: flex;
  gap: 5px;
}
.mount-pill {
  padding: 5px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: all 0.16s ease;
}
.mount-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.mount-pill.is-active {
  background: #f5f4f0;
  border-color: #ffffff;
  color: #111215;
}
.mount-pill .m-title {
  font-size: 0.73rem;
  font-weight: 600;
}
.mount-pill .m-meta {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  opacity: 0.72;
}

/* Finish Swatches */
.swatch-group {
  display: flex;
  align-items: center;
  gap: 7px;
}
.swatch-only-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  padding: 2px;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: all 0.16s ease;
}
.swatch-only-btn.is-active {
  border-color: var(--accent-amber);
  transform: scale(1.08);
}
.swatch-dot {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

@media (max-width: 1024px) {
  .hide-mobile {
    display: none !important;
  }
  .ldt-popover {
    width: 300px;
  }
  .main-dock {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Morning-to-Night Continuum Ambience Slider */
.ambience-slider-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tod-end-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.71rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease;
  white-space: nowrap;
}

.tod-end-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

#btn-tod-morning svg {
  color: #ffd166;
}

#btn-tod-night svg {
  color: #93c5fd;
}

.tod-slider-wrap {
  display: inline-flex;
  align-items: center;
  width: 96px;
}

input[type="range"].tod-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffd166 0%, #f59e42 42%, #4a5a80 74%, #0f1422 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  outline: none;
  cursor: pointer;
}

input[type="range"].tod-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid rgba(15, 20, 34, 0.75);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.48);
  cursor: grab;
  transition: transform 0.12s ease;
}

.tod-slider::-webkit-slider-thumb:hover {
  transform: scale(1.14);
}

.tod-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid rgba(15, 20, 34, 0.75);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.48);
  cursor: grab;
}

.tod-badge {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  font-weight: 600;
  color: #ffe299;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.10);
  padding: 2px 7px;
  border-radius: 999px;
  min-width: 56px;
  text-align: center;
}
