/* ── CONFIGURATOR PAGE STYLES ──────────────────────────────────────── */

/* ── Market Selector Overlay ────────────────────────────────────────── */
.market-selector-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: linear-gradient(135deg, #1B2B3C 0%, #0f1e2c 60%, #162a3e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.4s ease-out;
}
.market-selector-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.market-selector-content {
  max-width: 600px;
  width: 90%;
  text-align: center;
  color: #fff;
}
.market-logo {
  max-height: 60px;
  width: auto;
  margin-bottom: 24px;
}
.market-selector-content h2 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: 8px;
  color: #fff;
}
.market-selector-content > p {
  font-size: var(--text-base);
  color: rgba(255,255,255,0.6);
  margin-bottom: 32px;
}
.market-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.market-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 16px;
  background: rgba(255,255,255,0.06);
  border: 2px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  color: #fff;
  cursor: pointer;
  transition: all 0.25s ease;
  min-height: 140px;
}
.market-card:hover {
  border-color: var(--color-accent);
  background: rgba(200,146,42,0.1);
  transform: translateY(-2px);
}
.market-card.active {
  border-color: var(--color-accent);
  background: rgba(200,146,42,0.15);
  box-shadow: 0 0 0 2px rgba(200,146,42,0.3);
}
.market-card svg {
  color: var(--color-accent);
  flex-shrink: 0;
}
.market-card-title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}
.market-card-desc {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.5);
  line-height: 1.4;
}
.market-skip {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: var(--text-sm);
  cursor: pointer;
  text-decoration: underline;
  padding: 8px 16px;
  transition: color 0.2s;
}
.market-skip:hover { color: rgba(255,255,255,0.7); }

/* ── Market Divider + Quick Quote Button ── */
.market-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0 8px; color: rgba(255,255,255,0.35); font-size: 13px;
}
.market-divider::before, .market-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.15);
}
.market-quick-quote {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18);
  color: #fff; font-size: 15px; font-weight: 600; padding: 12px 28px;
  border-radius: 8px; cursor: pointer; transition: all 0.2s;
}
.market-quick-quote:hover {
  background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.3);
}

/* ── Quick Quote Overlay ── */
.quick-quote-overlay {
  position: fixed; inset: 0; z-index: 10001;
  background: rgba(10,18,30,0.92); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  overflow-y: auto; padding: 20px;
}
.quick-quote-content {
  background: #fff; border-radius: 12px; padding: 32px 28px;
  max-width: 480px; width: 100%; position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.quick-quote-content h2 {
  font-size: 22px; font-weight: 700; color: var(--color-navy);
  margin: 0 0 4px;
}
.quick-quote-subtitle {
  font-size: 14px; color: #6b7280; margin: 0 0 20px;
}
.quick-quote-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; font-size: 24px;
  color: #9ca3af; cursor: pointer; line-height: 1;
}
.quick-quote-close:hover { color: #374151; }
.quick-quote-row {
  margin-bottom: 14px;
}
.quick-quote-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--color-navy); margin-bottom: 4px;
}
.quick-quote-input, .quick-quote-select {
  width: 100%; padding: 10px 12px; border: 1px solid #d1d5db;
  border-radius: 6px; font-size: 14px; color: #1f2937;
  background: #f9fafb; transition: border-color 0.2s;
  font-family: inherit;
}
.quick-quote-input:focus, .quick-quote-select:focus {
  outline: none; border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(200,146,42,0.15);
}
.quick-quote-dims {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px;
}
.quick-quote-footer {
  text-align: center; font-size: 13px; color: #9ca3af; margin: 16px 0 0;
}
.quick-quote-footer a {
  color: var(--color-accent); text-decoration: underline; cursor: pointer;
}

@media (max-width: 640px) {
  .quick-quote-content { padding: 24px 20px; }
  .quick-quote-dims { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .market-cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .market-card {
    flex-direction: row;
    text-align: left;
    padding: 16px 20px;
    min-height: auto;
  }
  .market-card svg { width: 28px; height: 28px; }
  .market-card-title { font-size: var(--text-sm); }
  .market-card-desc { font-size: 12px; }
  .market-selector-content h2 { font-size: var(--text-xl); }
}

/* ── Mode Toggle ──────────────────────────────────────────────────── */
.mode-toggle {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: var(--space-8);
  background: var(--color-bg-light);
  border-radius: 999px;
  padding: 4px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}
.mode-tab {
  padding: var(--space-3) var(--space-6);
  border: none;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  cursor: pointer;
  transition: all 0.25s ease;
  background: transparent;
  color: var(--color-muted);
  flex: 1;
  text-align: center;
}
.mode-tab:hover {
  color: var(--color-accent);
}
.mode-tab.active {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(200,146,42,0.3);
}
.mode-panel { display: none; }
.mode-panel.active { display: block; }

/* ── Progress Checklist ──────────────────────────────────────────── */
.dm-progress-checklist {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto var(--space-8);
}
.checklist-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  flex-shrink: 0;
}
.step-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--font-weight-bold);
  color: var(--color-muted);
  background: var(--color-bg-white);
  transition: all 0.3s ease;
}
.checklist-step.active .step-circle {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #fff;
}
.checklist-step.completed .step-circle {
  border-color: var(--color-success);
  background: var(--color-success);
  color: #fff;
}
.step-label {
  font-size: 12px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-muted);
  white-space: nowrap;
  transition: color 0.3s ease;
}
.checklist-step.active .step-label { color: var(--color-accent); }
.checklist-step.completed .step-label { color: var(--color-success); }
.step-line {
  flex: 1;
  height: 2px;
  background: var(--color-border);
  margin: 0 var(--space-2);
  margin-bottom: var(--space-4);
  transition: background 0.3s ease;
  min-width: 40px;
}
.step-line.completed { background: var(--color-success); }

/* ── Viewport Sticky Wrapper ──────────────────────────────────────── */
.viewport-sticky-wrap {
  position: sticky;
  top: 0;
  z-index: var(--z-raised);
  background: var(--color-bg-white);
  padding-bottom: var(--space-3);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* ── 3D Viewport ──────────────────────────────────────────────────── */
.viewport-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  width: 100%;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.viewport-wrap canvas,
#configurator-canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  touch-action: none;
}
.viewport-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  background: linear-gradient(160deg, rgba(15,26,38,0.95), rgba(27,43,60,0.95));
  z-index: 5;
  backdrop-filter: blur(4px);
}
.viewport-loading.hidden {
  opacity: 0;
  pointer-events: none;
}
.viewport-loading-spinner {
  width: 48px;
  height: 48px;
  border: 2px solid rgba(200,146,42,0.15);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  position: relative;
}
.viewport-loading-spinner::after {
  content: '';
  position: absolute;
  inset: 6px;
  border: 2px solid rgba(200,146,42,0.08);
  border-bottom-color: rgba(200,146,42,0.4);
  border-radius: 50%;
  animation: spin 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }
.viewport-loading-bar {
  width: 200px;
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  box-shadow: 0 0 10px rgba(200,146,42,0.1);
}
.viewport-loading-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-accent), #e0b04a);
  border-radius: var(--radius-full);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(200,146,42,0.4);
}
.viewport-loading-text {
  color: rgba(255,255,255,0.5);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.5px;
}

.viewport-toolbar {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  display: flex;
  gap: var(--space-2);
  z-index: 3;
}
.viewport-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
.viewport-btn:hover { background: rgba(0,0,0,0.7); }
.viewport-btn:focus-visible { outline: 2px solid #C8922A; outline-offset: 2px; }
.viewport-btn.active { background: rgba(200,146,42,0.7); border-color: rgba(200,146,42,0.8); }
.viewport-btn svg { width: 18px; height: 18px; }

/* ── Fullscreen mode ─────────────────────────────────────────────── */
.viewport-wrap.fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: var(--z-overlay) !important;
  border-radius: 0 !important;
  aspect-ratio: auto !important;
  width: 100vw !important;
  height: 100vh !important; /* fallback for older browsers */
  height: 100dvh !important; /* dynamic viewport height — accounts for iOS Safari address bar */
}
.viewport-wrap.fullscreen .viewport-toolbar {
  top: var(--space-4);
  right: var(--space-4);
}

/* ── Active zone badge ────────────────────────────────────────────── */
.viewport-zone-badge {
  position: absolute;
  bottom: var(--space-3);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  padding: 4px 12px;
  border-radius: var(--radius-full, 999px);
  border: 1px solid rgba(200,146,42,0.5);
  pointer-events: none;
  z-index: 3;
  transition: opacity 0.25s;
}
.viewport-zone-badge em {
  color: var(--color-accent-light, #e8ad4a);
  font-style: normal;
}

/* ── Control Panel (vertical card flow) ──────────────────────────── */
.config-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  max-height: none;
  overflow-y: visible;
  position: static;
  padding-top: var(--space-4);
}
.config-section {
  padding: var(--space-4) var(--space-5);
  border-bottom: none;
}
.config-card + .config-card {
  margin-top: 0; /* gap handled by flex parent */
}
.config-section:last-child { border-bottom: none; }
.config-panel-handle { display: none; }

/* ── Config Card ─────────────────────────────────────────────────── */
.config-card {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.config-section-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: var(--font-weight-bold);
  text-transform: none;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-accent);
  border-bottom-width: 0;
  background-image: linear-gradient(var(--color-accent), var(--color-accent));
  background-size: 40px 1px;
  background-position: left bottom;
  background-repeat: no-repeat;
}

/* ── Building Type Cards ──────────────────────────────────────────── */
.building-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
.building-card {
  padding: var(--space-3) var(--space-3);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  background: var(--color-bg-white);
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.building-card:hover {
  border-color: var(--color-accent-light);
}
.building-card.active {
  border-color: var(--color-accent);
  background: rgba(200,146,42,0.06);
}
.building-card svg {
  display: block;
  margin: 0 auto var(--space-2);
  width: 36px;
  height: 36px;
  color: var(--color-primary);
}
.building-card.active svg { color: var(--color-accent); }
.building-card-name {
  font-size: 12px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-body);
}

/* ── Zone Selector ────────────────────────────────────────────────── */
.zone-selector {
  display: flex;
  gap: var(--space-2);
}
.zone-btn {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  min-height: 44px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  background: var(--color-bg-white);
  color: var(--color-body);
}
.zone-btn:hover { border-color: var(--color-accent-light); }
/* ── Size Toggle ──────────────────────────────────────────────────── */
.size-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}
.size-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-3) var(--space-2);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-white);
  color: var(--color-body);
  font-family: var(--font-heading);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.size-btn:hover { border-color: var(--color-accent-light); transform: translateY(-1px); }
.size-btn.active {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #fff;
  animation: zonePulse 0.4s ease-out;
}
.size-btn-label { font-size: var(--text-sm); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.size-btn-dims { font-size: 11px; opacity: 0.75; }
[data-theme="dark"] .size-btn { background: #1a1a2e; border-color: #4a5568; color: #d0d0d0; }
[data-theme="dark"] .size-btn.active { background: var(--color-accent); color: #fff; }

.zone-btn.active {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #fff;
  animation: zonePulse 0.4s ease-out;
}
@keyframes zonePulse {
  0% { box-shadow: 0 0 0 0 rgba(200,146,42,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(200,146,42,0); }
  100% { box-shadow: none; }
}
.zone-btn-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5);
  margin-left: 6px;
  vertical-align: middle;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
  transition: background 0.3s ease;
}

/* ── Panel Dropdown ───────────────────────────────────────────────── */
.config-select {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-body);
  background: var(--color-bg-white);
  cursor: pointer;
  transition: border-color 0.2s;
}
.config-select:focus {
  outline: none;
  border-color: var(--color-accent);
}

/* ── Color Collection Accordion ───────────────────────────────────── */
.config-color-tabs { display: none; } /* hidden — replaced by accordion */
.color-collection-section {
  margin-bottom: var(--space-3);
}
.color-collection-header {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-heading);
  transition: background 0.2s, border-color 0.2s;
  gap: var(--space-2);
}
.color-collection-header:hover {
  border-color: var(--color-accent);
  border-left-color: var(--color-accent);
  background: var(--color-bg-white);
}
.collection-name {
  flex: 1;
  text-align: left;
  font-size: 14px;
}
.collection-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-muted);
  background: var(--color-bg-white);
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: none;
  letter-spacing: normal;
}
.collection-chevron {
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.color-collection-header.collapsed .collection-chevron {
  transform: rotate(-90deg);
}
.color-collection-grid {
  padding-top: var(--space-2);
}

/* ── Color Swatches Grid (circular premium layout) ───────────────── */
.config-swatches-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 8px;
  padding: 4px 0;
}
.config-swatch {
  cursor: pointer;
  width: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
  background: none;
  border: none;
  transition: transform 0.15s;
}
.config-swatch:hover {
  transform: translateY(-3px) scale(1.08);
}
.config-swatch:hover .config-swatch-name {
  color: var(--color-accent);
}
.config-swatch.active .config-swatch-ring {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(200,146,42,0.3), 0 2px 8px rgba(200,146,42,0.2);
}
.config-swatch:active {
  transform: translateY(0) scale(0.95);
  transition-duration: 0.05s;
}
.config-swatch-ring {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}
.config-swatch:hover .config-swatch-ring {
  border-color: var(--color-accent-light);
}
.config-swatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: auto;
  border-radius: 50%;
}
.config-swatch-name {
  font-size: 9px;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--color-muted);
  max-width: 48px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s;
}

/* ── Selection Summary ────────────────────────────────────────────── */
.selection-summary {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.selection-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-bg-light);
  border-radius: var(--radius-sm);
  min-height: 44px;
}
.selection-swatch-thumb {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}
.selection-zone-label {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  color: var(--color-primary);
  min-width: 48px;
}
.selection-color-name {
  font-size: var(--text-sm);
  color: var(--color-body);
  flex: 1;
}

/* ── Action Buttons ───────────────────────────────────────────────── */
.config-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.config-actions .btn { width: 100%; text-align: center; }

/* ── 2D Model View ───────────────────────────────────────────────── */
.model-2d-wrap {
  position: relative;
  background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-border);
  max-width: 900px;
  margin: 0 auto;
}
.model-2d-wrap canvas {
  width: 100%;
  height: auto;
  display: block;
  cursor: crosshair;
}

/* ── Photo Visualizer ─────────────────────────────────────────────── */
.photo-canvas-stack {
  position: relative;
  background: var(--color-bg-mid);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 450px;
  border: 2px dashed var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-canvas-stack.has-photo {
  border-style: solid;
  border-color: var(--color-border);
}
.photo-canvas-stack canvas {
  position: absolute;
  top: 0;
  left: 0;
  max-width: 100%;
}
.photo-canvas-stack canvas:last-child {
  touch-action: none; /* draw canvas — prevent scroll while drawing polygons */
}
.photo-toolbar {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-bg-light);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}
.photo-tool-btn {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all 0.2s;
  background: var(--color-bg-white);
  color: var(--color-body);
  display: flex;
  align-items: center;
  gap: 6px;
}
.photo-tool-btn:hover { border-color: var(--color-accent); }
.photo-tool-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.photo-tool-btn svg { width: 14px; height: 14px; }

/* ── Photo Tools Toggle & Advanced ───────────────────────────────── */
.photo-tools-toggle {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  padding: var(--space-2) var(--space-3);
  transition: color 0.2s;
}
.photo-tools-toggle:hover { color: var(--color-accent); }
.photo-tools-toggle.expanded { color: var(--color-accent); }
.photo-tools-advanced {
  display: none;
  gap: var(--space-2);
  flex-wrap: wrap;
  width: 100%;
  padding-top: var(--space-2);
}
.photo-tools-advanced.expanded {
  display: flex;
}

/* ── Upload Prompt (larger) ──────────────────────────────────────── */
.upload-prompt {
  text-align: center;
  padding: var(--space-12) var(--space-8);
  color: var(--color-muted);
  z-index: 2;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.upload-prompt.hidden { display: none; }
.upload-prompt svg {
  display: block;
  margin: 0 auto var(--space-4);
  color: var(--color-border);
}
.upload-prompt h3 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}
.upload-prompt p {
  font-size: var(--text-base);
  margin-bottom: var(--space-4);
}
.upload-prompt-cta {
  width: 100%;
  max-width: 280px;
}

/* ── Photo Library Grid ──────────────────────────────────────────── */
.photo-library-section {
  margin-top: 20px;
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
}
.photo-library-heading {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-muted);
  margin-bottom: 12px;
}
.photo-library-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  justify-items: center;
}
.photo-library-thumb {
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.2s, transform 0.15s;
  width: 100%;
}
.photo-library-thumb:hover {
  border-color: var(--color-accent);
  transform: scale(1.03);
}
.photo-library-thumb img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  display: block;
}
.photo-library-label {
  font-size: 11px;
  text-align: center;
  padding: 4px 0;
  color: var(--color-muted);
  font-weight: 600;
}

/* ── Photo Picker "One Page" Layout ─────────────────────────────── */
.photo-picker-card {
  padding: 0 !important;
  overflow: hidden;
}

/* Zone tabs with inline color preview */
.photo-zone-tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
}
.photo-zone-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border: none;
  background: var(--color-bg-light);
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  position: relative;
}
.photo-zone-tab:hover { color: var(--color-body); background: var(--color-bg-white); }
.photo-zone-tab.active {
  color: var(--color-accent);
  background: var(--color-bg-white);
  border-bottom-color: var(--color-accent);
}
.photo-zone-tab-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: repeating-conic-gradient(#ccc 0% 25%, #fff 0% 50%) 50%/8px 8px;
  flex-shrink: 0;
  transition: border-color 0.2s;
  overflow: hidden;
}
.photo-zone-tab-swatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-zone-tab.active .photo-zone-tab-swatch {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px rgba(200,146,42,0.3);
}

/* Panel strip (horizontal scroll) */
.photo-panel-strip {
  padding: 8px 12px;
  border-bottom: 1px solid var(--color-border);
}
.photo-panel-strip-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  margin-bottom: 6px;
}
.photo-panel-strip-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 4px;
}
.photo-panel-strip .panel-card {
  min-width: 72px;
  max-width: 72px;
  padding: 4px;
  border-radius: 6px;
  flex-shrink: 0;
}
.photo-panel-strip .panel-card-thumb {
  width: 100%;
  height: 36px;
  border-radius: 4px;
}
.photo-panel-strip .panel-card-name {
  font-size: 9px;
  padding: 2px 0 0;
  line-height: 1.2;
  text-align: center;
}

/* Color picker section */
.photo-color-picker {
  padding: 8px 12px;
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.photo-color-picker .color-search {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 8px;
  background: var(--color-bg-white);
  color: var(--color-body);
  box-sizing: border-box;
}
.photo-color-picker .color-collection-header {
  padding: 6px 8px;
  font-size: 11px;
}
.photo-color-picker .config-swatches-grid {
  padding: 4px 0 8px;
}

/* Compact opacity row */
.photo-opacity-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--color-border);
  font-size: 12px;
  color: var(--color-muted);
}
.photo-opacity-row label {
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.photo-opacity-row input[type="range"] {
  flex: 1;
  height: 4px;
}

/* ── Photo Email Card ───────────────────────────────────────────── */
.photo-email-card {
  border: 1px solid rgba(200,146,42,0.25);
  background: linear-gradient(135deg, rgba(200,146,42,0.04), transparent);
}
.photo-email-desc {
  font-size: 12px;
  color: var(--color-muted);
  margin: 2px 0 10px;
  line-height: 1.4;
}
.photo-email-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.photo-email-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--color-bg-white);
  color: var(--color-body);
  box-sizing: border-box;
}
.photo-email-input:focus {
  border-color: var(--color-accent);
  outline: none;
  box-shadow: 0 0 0 2px rgba(200,146,42,0.15);
}
.photo-email-input::placeholder { color: var(--color-muted); }
.photo-email-privacy {
  font-size: 10px;
  color: var(--color-muted);
  margin: 6px 0 0;
  line-height: 1.4;
  text-align: center;
}

/* ── Dark mode additions for photo picker ───────────────────────── */
[data-theme="dark"] .photo-zone-tab { background: #16213e; color: #9ca3af; }
[data-theme="dark"] .photo-zone-tab:hover { background: #1a1a2e; color: #d0d0d0; }
[data-theme="dark"] .photo-zone-tab.active { background: #1a1a2e; color: var(--color-accent); }
[data-theme="dark"] .photo-zone-tab-swatch { border-color: #4a5568; }
[data-theme="dark"] .photo-panel-strip { border-color: #4a5568; }
[data-theme="dark"] .photo-opacity-row { border-color: #4a5568; }
[data-theme="dark"] .photo-color-picker .color-search { background: #1a1a2e; color: #d0d0d0; border-color: #4a5568; }
[data-theme="dark"] .photo-email-card { background: linear-gradient(135deg, rgba(200,146,42,0.08), rgba(200,146,42,0.02)); border-color: rgba(200,146,42,0.3); }
[data-theme="dark"] .photo-email-input { background: #1a1a2e; color: #d0d0d0; border-color: #4a5568; }

/* ── Drag-over visual ────────────────────────────────────────────── */
.photo-canvas-stack.drag-over {
  border-color: var(--color-accent) !important;
  border-style: dashed !important;
  background: rgba(200,146,42,0.04);
}

@media (max-width: 640px) {
  .upload-prompt { min-height: 300px; padding: var(--space-6) var(--space-4); }
  .upload-prompt h3 { font-size: var(--text-lg); }
  .photo-library-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-library-thumb img { height: 64px; }
  .photo-canvas-stack { min-height: 320px; }
}

/* ── Before/After Comparison Slider ───────────────────────────────── */
.ba-slider {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}
.ba-slider-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-accent);
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 4px rgba(0,0,0,0.3);
}
.ba-slider-grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
  pointer-events: auto;
  touch-action: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 6;
}
.ba-slider-grip svg { color: #fff; }
.ba-label {
  position: absolute;
  top: var(--space-3);
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: #fff;
  background: rgba(0,0,0,0.5);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}
.ba-label-before { left: var(--space-3); }
.ba-label-after { right: var(--space-3); }

/* ── Photo Loading Overlay ────────────────────────────────────────── */
.photo-loading-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.65);
  z-index: var(--z-raised);
  gap: var(--space-3);
  backdrop-filter: blur(4px);
}
.photo-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: dm-spin 0.8s linear infinite;
}
@keyframes dm-spin {
  to { transform: rotate(360deg); }
}
.photo-loading-text {
  color: #fff;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  text-align: center;
  max-width: 280px;
}
.photo-loading-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  color: #fff;
  text-align: center;
}
.photo-loading-error svg {
  color: #f87171;
}
.photo-retry-btn,
.photo-fallback-btn {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  cursor: pointer;
  border: none;
  transition: background 0.2s, opacity 0.2s;
}
.photo-retry-btn {
  background: var(--color-accent);
  color: #fff;
}
.photo-retry-btn:hover { opacity: 0.85; }
.photo-fallback-btn {
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.3);
}
.photo-fallback-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* ── AI Photorealistic Render ─────────────────────────────────────── */
.btn-ai-generate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: 14px var(--space-4);
  background: linear-gradient(135deg, var(--color-accent), #D4A02A);
  color: var(--color-primary);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--tracking-wide);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(200, 146, 42, 0.3);
}
.btn-ai-generate:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(200, 146, 42, 0.4);
}
.btn-ai-generate:active {
  transform: translateY(0);
}
.btn-ai-generate svg {
  flex-shrink: 0;
}
.ai-render-hint {
  font-size: var(--text-xs);
  color: var(--color-muted);
  text-align: center;
  margin-top: var(--space-2);
  line-height: 1.4;
}
.ai-render-card {
  border: 1px solid rgba(200, 146, 42, 0.2);
  background: linear-gradient(180deg, rgba(200, 146, 42, 0.04) 0%, transparent 100%);
}

/* AI Render result image (overlays canvas stack) */
.ai-render-result {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 5;
  pointer-events: none;
}

/* AI Loading Overlay (inside canvas stack) */
#ai-loading-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(27, 43, 60, 0.88);
  backdrop-filter: blur(8px);
  z-index: 20;
  border-radius: var(--radius);
}
.ai-loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6);
  max-width: 300px;
  text-align: center;
}
.ai-loading-logo img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  opacity: 0.9;
}
.ai-loading-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(200, 146, 42, 0.2);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: dm-spin 0.9s linear infinite;
}
.ai-loading-message {
  color: #fff;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--tracking-wide);
}
.ai-loading-submessage {
  color: rgba(255, 255, 255, 0.5);
  font-size: var(--text-xs);
}
.ai-loading-progress {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-top: var(--space-2);
}
.ai-loading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-accent), #D4A02A);
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* Download AI button */
.btn-accent {
  background: var(--color-accent);
  color: var(--color-primary);
  border: none;
  font-weight: var(--font-weight-bold);
}
.btn-accent:hover {
  opacity: 0.9;
}

/* Dark mode overrides */
[data-theme="dark"] .btn-ai-generate {
  color: #1B2B3C;
}
[data-theme="dark"] .ai-render-card {
  border-color: rgba(200, 146, 42, 0.15);
  background: linear-gradient(180deg, rgba(200, 146, 42, 0.06) 0%, transparent 100%);
}
[data-theme="dark"] #ai-loading-overlay {
  background: rgba(10, 15, 25, 0.92);
}

/* ── Opacity Slider ───────────────────────────────────────────────── */
.opacity-control {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.opacity-control label {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  color: var(--color-primary);
  white-space: nowrap;
}
.opacity-control input[type="range"] {
  flex: 1;
  accent-color: var(--color-accent);
}
.opacity-value {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  color: var(--color-accent);
  min-width: 32px;
  text-align: right;
}

/* ── Unified Adaptive Quote Form ─────────────────────────────────── */
.config-card-quote {
  background: linear-gradient(135deg, rgba(200,146,42,0.06), rgba(200,146,42,0.02));
  border: 1px solid rgba(200,146,42,0.2);
}
.quote-config-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.quote-config-summary:empty { display: none; }
.quote-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-body);
}
.quote-summary-chip .chip-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1);
  flex-shrink: 0;
}
.quote-summary-chip .chip-label {
  color: var(--color-muted);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.03em;
}
.quote-adaptive-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quote-adaptive-fields input,
.quote-adaptive-fields textarea {
  width: 100%;
  height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-body);
  background: var(--color-bg-white);
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.quote-adaptive-fields textarea {
  height: auto;
  padding: var(--space-3) var(--space-4);
  resize: vertical;
  min-height: 60px;
}
.quote-adaptive-fields input:focus,
.quote-adaptive-fields textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}
.quote-field[data-markets] {
  display: none;
}
.quote-field.visible {
  display: block;
}
.quote-inline-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.quote-inline-actions .btn {
  flex: 1;
}
/* ── Quote Confirmation Screen ───────────────────────────────────── */
.quote-confirmation {
  text-align: center;
  padding: 20px 0 8px;
}
.quote-confirm-icon { margin-bottom: 12px; }
.quote-confirm-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-heading);
  margin: 0 0 6px;
}
.quote-confirm-msg {
  color: #059669;
  font-weight: 600;
  font-size: var(--text-sm);
  margin: 0 0 4px;
}
.quote-confirm-email {
  color: var(--color-muted);
  font-size: var(--text-xs);
  margin: 0 0 20px;
}
.quote-confirm-summary {
  text-align: left;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 4px;
}
.quote-confirm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--color-border);
  min-height: 44px;
}
.quote-confirm-row:last-child { border-bottom: none; }
.quote-confirm-row:nth-child(odd) { background: rgba(0,0,0,0.02); }
.quote-confirm-label {
  color: var(--color-muted);
  font-weight: 600;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.quote-confirm-color {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
[data-theme="dark"] .quote-confirm-row:nth-child(odd) { background: rgba(255,255,255,0.03); }
[data-theme="dark"] .quote-confirm-summary { border-color: #4a5568; }
[data-theme="dark"] .quote-confirm-row { border-color: #4a5568; }
/* Dealer SKU summary above form */
.quote-dealer-skus {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: rgba(37,99,235,0.04);
  border: 1px solid rgba(37,99,235,0.15);
  border-radius: var(--radius-sm);
  font-size: 12px;
}
.quote-dealer-skus .sku-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
}
.quote-dealer-skus .sku-id {
  font-family: monospace;
  color: var(--color-muted);
}
.quote-dealer-skus .sku-name {
  font-weight: 600;
  flex: 1;
  margin: 0 8px;
}
/* Contractor coverage summary */
.quote-coverage-summary {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: rgba(200,146,42,0.04);
  border: 1px solid rgba(200,146,42,0.15);
  border-radius: var(--radius-sm);
  font-size: 12px;
}
.quote-coverage-row {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
}
.quote-coverage-label { color: var(--color-muted); }
.quote-coverage-value { font-weight: 600; }

/* ── Legacy Quote Section (kept for form group styling) ───────────── */
.form-group label {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: var(--space-3);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-body);
  transition: border-color 0.2s;
  background: var(--color-bg-white);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}
.form-group textarea { resize: vertical; min-height: 100px; }

.config-summary-card {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-bottom: var(--space-6);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.config-summary-card h4 {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

/* ── Environment Selector ─────────────────────────────────────────── */
.env-selector {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}
.env-btn {
  flex: 1;
  min-width: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: var(--space-2) var(--space-1);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg-white);
  color: var(--color-muted);
  cursor: pointer;
  transition: all 150ms ease;
  font-size: 11px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.env-btn:hover {
  border-color: var(--color-accent-light);
  color: var(--color-accent);
}
.env-btn.active {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #fff;
}
.env-btn svg { flex-shrink: 0; }

/* ── Panel Profile Grid ───────────────────────────────────────────── */
.panel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
}
.panel-card {
  cursor: pointer;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s ease;
  background: var(--color-bg-white);
}
.panel-card:hover {
  border-color: var(--color-accent-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.panel-card.active {
  border-color: var(--color-accent);
  border-width: 3px;
  box-shadow: 0 0 0 3px rgba(200,146,42,0.3), 0 6px 16px rgba(200,146,42,0.15);
  transform: translateY(-3px);
}
.panel-card-thumb {
  display: block;
  width: 100%;
  height: 56px;
  object-fit: cover;
  image-rendering: auto;
}
.panel-card-name {
  font-size: 11px;
  font-weight: var(--font-weight-bold);
  text-align: center;
  padding: 5px 4px;
  background: var(--color-bg-light);
  color: var(--color-body);
  line-height: 1.2;
  min-height: 2.4em;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Advanced Link (2D mode toggle) ──────────────────────────────── */
.advanced-link {
  color: var(--color-muted);
  font-size: 13px;
  text-decoration: underline;
  transition: color 0.2s;
  cursor: pointer;
}
.advanced-link:hover {
  color: var(--color-accent);
}

/* ── Real Project Photos Gallery ──────────────────────────────────── */
.real-project-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.gallery-thumb {
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}
.gallery-thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.gallery-thumb img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}
.gallery-thumb-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px 6px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
}
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.gallery-lightbox.visible { opacity: 1; }
.gallery-lightbox-inner {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
}
.gallery-lightbox-inner img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: var(--radius);
  display: block;
}
.gallery-lightbox-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.gallery-lightbox-caption {
  text-align: center;
  color: #fff;
  padding: 12px 0 0;
}
.gallery-lightbox-caption strong { font-size: 16px; }
.gallery-lightbox-caption p { font-size: 13px; color: rgba(255,255,255,0.7); margin: 4px 0 0; }
[data-theme="dark"] .gallery-thumb-label { background: rgba(0,0,0,0.75); }

/* ── Journey Animations & Transitions ────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200,146,42,0.3); }
  50%      { box-shadow: 0 0 0 6px rgba(200,146,42,0); }
}

/* ── Splash screen (premium) ────────────────────────────────────── */
#app-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(160deg, #0F1A26 0%, #1B2B3C 40%, #162232 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
  cursor: pointer;
  overflow: hidden;
}
#app-splash::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(200,146,42,0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: splashPulse 3s ease-in-out infinite;
}
@keyframes splashPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
}
.splash-logo-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid rgba(200,146,42,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.splash-logo-ring::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #C8922A;
  animation: spin 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.splash-brand {
  position: relative;
  z-index: 1;
  color: #fff;
  font-family: Montserrat, sans-serif;
  font-weight: 700;
  font-size: 20px;
  margin-top: 20px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.splash-tagline {
  position: relative;
  z-index: 1;
  color: #C8922A;
  font-family: Montserrat, sans-serif;
  font-weight: 400;
  font-size: 11px;
  margin-top: 6px;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.7;
}
.splash-status {
  position: relative;
  z-index: 1;
  color: rgba(255,255,255,0.4);
  font-size: 12px;
  margin-top: 24px;
  animation: fadeSlideUp 0.5s ease both;
}
.splash-progress {
  position: relative;
  z-index: 1;
  width: 120px;
  height: 2px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  margin-top: 16px;
  overflow: hidden;
}
.splash-progress-fill {
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, transparent, #C8922A, transparent);
  border-radius: 2px;
  animation: splashBar 2s ease-in-out infinite;
}
@keyframes splashBar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

/* ── Camera preset buttons ──────────────────────────────────────── */
.cam-preset {
  min-height: 36px;
  min-width: 40px;
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

/* Animate step transitions */
.checklist-step.active .step-circle {
  animation: pulseGlow 2s ease-in-out infinite;
}
.checklist-step.completed .step-circle {
  animation: scaleIn 0.35s ease-out;
}

/* Mode panel: opacity-only fade (transform breaks position:sticky) */
.mode-panel {
  animation: fadeIn 0.3s ease-out;
}

/* Building card selection feedback */
.building-card.active {
  animation: scaleIn 0.25s ease-out;
}

/* Color swatch selection ripple */
.config-swatch.active {
  animation: scaleIn 0.2s ease-out;
}

/* Smooth viewport loading fade */
.viewport-loading {
  transition: opacity 0.6s ease;
}

/* Config card stagger animation on load */
.config-card {
  animation: fadeSlideUp 0.4s ease-out both;
}
.config-card:nth-child(2) { animation-delay: 0.05s; }
.config-card:nth-child(3) { animation-delay: 0.1s; }
.config-card:nth-child(4) { animation-delay: 0.15s; }
.config-card:nth-child(5) { animation-delay: 0.2s; }
.config-card:nth-child(6) { animation-delay: 0.25s; }
.config-card:nth-child(7) { animation-delay: 0.3s; }

/* Zone badge transitions */
.viewport-zone-badge {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Panel card hover micro-interaction (defined in .panel-card above) */

/* Step line animated fill */
.step-line {
  transition: background 0.5s ease;
}
.step-line.completed {
  background: linear-gradient(90deg, var(--color-success) 0%, var(--color-success) 100%);
}

/* Header subtle entrance */
.dm-header {
  animation: fadeSlideUp 0.5s ease-out;
}
.dm-header .container { position: relative; }
.profile-switcher {
  position: absolute;
  top: 50%;
  right: 48px;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  min-width: 44px;
  transition: background 0.2s, border-color 0.2s;
}
.profile-switcher:hover {
  background: rgba(255,255,255,0.2);
  border-color: var(--color-accent);
  color: #fff;
}
.profile-switcher svg { flex-shrink: 0; }

/* Theme toggle button */
.theme-toggle {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  transition: background 0.2s, border-color 0.2s;
}
.theme-toggle:hover {
  background: rgba(255,255,255,0.2);
  border-color: var(--color-accent);
  color: #fff;
}
/* Light mode: show moon (click to go dark), hide sun */
.theme-icon-sun { display: none; }
.theme-icon-moon { display: inline; }

/* ── Responsive ───────────────────────────────────────────────────── */

/* ── Large desktop (min-width: 1440px) ───────────────────────────── */
@media (min-width: 1440px) {
  .viewport-wrap { max-height: 650px; }
  .config-swatches-grid {
    gap: 12px 10px;
  }
  .config-swatch { width: 50px; }
  .config-swatch-ring { width: 40px; height: 40px; }
  .config-swatch-name { font-size: 10px; max-width: 54px; }
  .panel-card-thumb { height: 68px; }
}

/* ── Tablet (max-width: 1024px) ────────────────────────────────── */
@media (max-width: 1024px) {
  .viewport-wrap { max-height: 420px; }
  .config-swatches-grid {
    gap: 10px 8px;
  }
  .config-section { padding: var(--space-4) var(--space-5); }
}

/* ── Small tablet / large phone (max-width: 768px) ─────────────── */
@media (max-width: 768px) {
  .viewport-wrap { max-height: 350px; }
  .viewport-sticky-wrap { padding-bottom: var(--space-2); }
  .quote-form-grid {
    grid-template-columns: 1fr;
  }
  .quote-form-grid .form-group.full-width {
    grid-column: 1;
  }
  .quote-section {
    padding: var(--space-6) var(--space-4);
  }
  .mode-toggle {
    flex-direction: row;
    max-width: 100%;
  }
  .mode-tab {
    text-align: center;
    padding: var(--space-2) var(--space-3);
    font-size: 11px;
  }
  .config-swatches-grid {
    gap: 8px 6px;
  }
  .dm-progress-checklist { max-width: 100%; padding: 0 var(--space-2); }
  .step-label { font-size: 10px; }
  .config-panel { gap: var(--space-3); }
  .config-section { padding: var(--space-4); }
  .model-2d-wrap { max-width: none; }
}

/* ── Mobile (max-width: 640px) ─────────────────────────────────── */
@media (max-width: 640px) {
  /* Viewport — compact on mobile, still sticky */
  .viewport-wrap {
    max-height: 280px;
    border-radius: var(--radius);
  }
  .viewport-sticky-wrap {
    padding-bottom: var(--space-1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }

  /* Swatches: 3 per row at 88px */
  .config-swatches-grid {
    gap: 8px 6px;
  }

  /* Building cards: horizontal scroll */
  .building-cards {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: var(--space-2);
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: var(--space-2);
    scrollbar-width: none; /* Firefox */
    overscroll-behavior-x: contain; /* prevent accidental page navigation on swipe */
  }
  .building-cards::-webkit-scrollbar { display: none; } /* Chrome/Safari */
  .building-card {
    flex: 0 0 auto;
    min-width: 80px;
    min-height: 44px;
    padding: var(--space-2);
    scroll-snap-align: start;
  }
  .building-card svg { width: 24px; height: 24px; }
  .building-card-name { font-size: 9px; }

  /* Viewport toolbar — wrap to 2 rows, 44px touch targets */
  .viewport-toolbar { flex-wrap: wrap; max-width: 230px; justify-content: flex-end; }
  .viewport-btn { width: 40px; height: 40px; min-width: 40px; min-height: 40px; }
  .viewport-btn svg { width: 16px; height: 16px; }
  .viewport-cam-presets { display: none !important; } /* hide tiny camera presets on mobile */

  /* Checklist: hide step labels, just show circles */
  .step-label { display: none; }
  .step-line { min-width: 24px; margin-bottom: 0; }
  .checklist-step { gap: 0; }

  /* Zone selector stacks vertically */
  .zone-selector { flex-direction: column; }

  /* 44px minimum tap targets for all interactive elements */
  .zone-btn { min-height: 44px; }
  .config-swatch { min-height: 44px; min-width: 44px; }
  .env-btn { min-width: 44px; min-height: 44px; padding: var(--space-2); }
  .env-btn span { display: none; }
  .env-btn svg { width: 20px; height: 20px; }
  .tod-btn { min-height: 44px; }
  .tod-btn svg { width: 18px; height: 18px; }
  .weather-btn { min-height: 44px; }
  .weather-btn svg { width: 18px; height: 18px; }
  .photo-tool-btn { min-height: 44px; }
  .mode-tab { min-height: 44px; }
  .color-collection-header { min-height: 44px; }
  .recent-color { width: 44px; height: 44px; }
  .profile-switcher-label { display: none; }
  .quote-adaptive-fields input,
  .quote-adaptive-fields textarea { height: 44px; font-size: var(--text-sm); }

  /* Camera preset / toolbar items smaller */
  .viewport-toolbar { gap: var(--space-1); }

  /* Panel profile grid — 3 columns on mobile */
  .panel-grid { grid-template-columns: repeat(3, 1fr); }
  .panel-card-thumb { height: 48px; }
  .panel-card-name { font-size: 10px; padding: 4px 3px; }

  /* Photo canvas */
  .photo-canvas-stack { min-height: 280px; }

  /* Config cards tighter */
  .config-panel { gap: var(--space-3); }
  .config-section { padding: var(--space-4); }
  .config-card { border-radius: var(--radius); }
  .config-section-title { font-size: 13px; }

  /* Selectors stack */
  .tod-selector { flex-direction: column; gap: var(--space-1); }
  .weather-selector { flex-direction: column; gap: var(--space-1); }
  .dim-sliders { gap: var(--space-2); }

  /* Header larger on mobile */
  .dm-header h1 { font-size: 24px; }

  /* Hide desktop-only helper text */
  .desktop-only { display: none; }
  .viewport-help-text { font-size: 10px; }
  .viewport-hint { display: none !important; } /* Hide "Ctrl+Z" on mobile */

  /* Building cards scroll hint fades */
  .building-cards {
    mask-image: linear-gradient(to right, transparent 0, black 8px, black calc(100% - 20px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, black 8px, black calc(100% - 20px), transparent 100%);
  }

  /* Advanced link */
  .advanced-link { font-size: 12px; }
}

/* ── Very small mobile (max-width: 400px) ─────────────────────── */
@media (max-width: 400px) {
  .viewport-wrap { max-height: 200px; }
  .config-swatches-grid {
    gap: 6px 4px;
  }
  .config-section { padding: var(--space-2) var(--space-3); }
  .config-section-title { font-size: 11px; }
  .building-card { min-width: 68px; }
  .panel-grid { grid-template-columns: repeat(3, 1fr); }
  .photo-canvas-stack { min-height: 220px; }
}

/* ── Landscape phone (max-height: 500px) and (orientation: landscape) ── */
@media (max-height: 500px) and (orientation: landscape) {
  .viewport-wrap { max-height: 200px; }
  .viewport-sticky-wrap {
    padding-bottom: 2px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  }
  .dm-header { padding: var(--space-2) 0; }
  .dm-header h1 { font-size: var(--text-lg); }
  .dm-header p { display: none; }
  .dm-progress-checklist { margin-bottom: var(--space-3); }
}

/* ── Time of Day selector ─────────────────────────────── */
.tod-selector {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.tod-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg-white);
  cursor: pointer;
  transition: all 150ms ease;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-muted);
  flex: 1;
  min-width: 0;
}
.tod-btn:hover { border-color: var(--color-accent); color: var(--color-accent); }
.tod-btn.active {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #fff;
}

/* ── Dimension sliders ────────────────────────────────── */
.dim-sliders {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.dim-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.dim-row label {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-muted);
  min-width: 52px;
}
.dim-row input[type="range"] {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--color-border);
  border-radius: 2px;
  outline: none;
}
.dim-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-accent);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.dim-value {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-dark);
  min-width: 48px;
  text-align: right;
}

/* ── Price estimator ──────────────────────────────────── */
.price-estimator {
  background: linear-gradient(135deg, rgba(200,146,42,0.06), rgba(200,146,42,0.02));
  border: 1px solid rgba(200,146,42,0.2);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  text-align: center;
}
.price-range {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}
.price-low, .price-high {
  font-size: var(--text-2xl);
  font-weight: 800;
  font-family: var(--font-heading);
  color: var(--color-accent);
}
.price-sep {
  font-size: var(--text-lg);
  color: var(--color-muted);
  font-weight: 300;
}
.price-note {
  font-size: 12px;
  color: var(--color-muted);
  margin-top: var(--space-2);
  line-height: 1.4;
}

/* ── Contractor Panel Spec Tool ───────────────────────── */
.spec-tool .config-section-title { display: flex; align-items: center; gap: 8px; }
.spec-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--color-accent); color: #fff; padding: 2px 8px; border-radius: 10px;
}
.spec-zones { display: flex; flex-direction: column; gap: var(--space-3); }
.spec-zone-card {
  background: var(--color-bg-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); padding: var(--space-3);
}
.spec-zone-card-title {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.03em; color: var(--color-accent); margin-bottom: var(--space-2);
}
.spec-zone-card-name { font-size: 14px; font-weight: 600; margin-bottom: var(--space-2); }
.spec-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4px 12px; font-size: 12px;
}
.spec-grid dt { color: var(--color-muted); }
.spec-grid dd { font-weight: 600; margin: 0; text-align: right; }
.spec-calc {
  margin-top: var(--space-4); padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}
.spec-calc-title {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.03em; color: var(--color-body); margin-bottom: var(--space-3);
}
.spec-calc-grid { display: flex; flex-direction: column; gap: 6px; }
.spec-calc-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; padding: 4px 0;
}
.spec-calc-row.spec-calc-total {
  border-top: 1px solid var(--color-border); padding-top: 8px; margin-top: 4px;
  font-weight: 700;
}
.spec-calc-label { color: var(--color-muted); }
.spec-calc-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.spec-calc-note {
  font-size: 11px; color: var(--color-muted); margin-top: var(--space-2);
  line-height: 1.4; font-style: italic;
}

/* Print spec sheet styles */
@media print {
  body > *:not(#spec-print-sheet) { display: none !important; }
  #spec-print-sheet {
    display: block !important; position: fixed; top: 0; left: 0;
    width: 100%; background: #fff; color: #000; font-family: Arial, sans-serif;
    padding: 24px; font-size: 12px; z-index: 99999;
  }
  #spec-print-sheet h1 { font-size: 20px; margin: 0 0 4px; }
  #spec-print-sheet h2 { font-size: 14px; margin: 16px 0 8px; border-bottom: 1px solid #ccc; padding-bottom: 4px; }
  #spec-print-sheet table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
  #spec-print-sheet th, #spec-print-sheet td {
    border: 1px solid #ccc; padding: 6px 10px; text-align: left; font-size: 12px;
  }
  #spec-print-sheet th { background: #f0f0f0; font-weight: 700; }
  #spec-print-sheet .print-footer { margin-top: 24px; font-size: 10px; color: #666; text-align: center; }
}

/* ── Dealer Quick Order ───────────────────────────────── */
.dealer-order .config-section-title { display: flex; align-items: center; gap: 8px; }
.dealer-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  background: #2563EB; color: #fff; padding: 2px 8px; border-radius: 10px;
}
.dealer-lines { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.dealer-line {
  display: grid; grid-template-columns: 1fr auto auto;
  gap: 8px; align-items: center; padding: var(--space-2) var(--space-3);
  background: var(--color-bg-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); font-size: 13px;
}
.dealer-line-info { display: flex; flex-direction: column; gap: 2px; }
.dealer-line-sku { font-family: monospace; font-size: 11px; color: var(--color-muted); }
.dealer-line-name { font-weight: 600; }
.dealer-line-panel { font-size: 11px; color: var(--color-muted); }
.dealer-line-qty {
  display: flex; align-items: center; gap: 4px;
}
.dealer-line-qty input {
  width: 60px; text-align: center; padding: 4px; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  background: var(--color-bg-white); color: var(--color-body);
}
.dealer-line-qty label { font-size: 11px; color: var(--color-muted); }
.dealer-line-area { font-size: 11px; color: var(--color-muted); }
.dealer-line-price { text-align: right; white-space: nowrap; }
.dealer-line-retail { font-size: 11px; color: var(--color-muted); text-decoration: line-through; }
.dealer-line-dealer { font-weight: 700; font-size: 14px; color: #2563EB; }
.dealer-line-total {
  background: rgba(37,99,235,0.04); border-color: #2563EB;
  font-size: 14px; padding: var(--space-3);
}
.dealer-tier {
  padding: var(--space-3); background: rgba(37,99,235,0.06);
  border: 1px solid rgba(37,99,235,0.2); border-radius: var(--radius-sm);
  margin-bottom: var(--space-4);
}
.dealer-tier-label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #2563EB; }
.dealer-tier-value { font-size: 16px; font-weight: 700; margin: 4px 0; }
.dealer-tier-note { font-size: 11px; color: var(--color-muted); line-height: 1.4; }
.dealer-po-form { display: flex; flex-direction: column; gap: var(--space-2); }
.dealer-po-title {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.03em; margin-bottom: var(--space-1);
}
.dealer-input {
  width: 100%; padding: 8px 12px; border: 1px solid var(--color-border);
  border-radius: var(--radius-sm); font-size: 13px;
  background: var(--color-bg-white); color: var(--color-body);
  box-sizing: border-box;
}
.dealer-input:focus { border-color: #2563EB; outline: none; box-shadow: 0 0 0 2px rgba(37,99,235,0.15); }
.dealer-input::placeholder { color: var(--color-muted); }

/* ── Weather selector ─────────────────────────────────── */
.weather-selector {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.weather-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg-white);
  cursor: pointer;
  transition: all 150ms ease;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-muted);
  flex: 1;
}
.weather-btn:hover { border-color: var(--color-accent); color: var(--color-accent); }
.weather-btn.active {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #fff;
}

/* ── Tour overlay ─────────────────────────────────────── */
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(0,0,0,0.4);
  animation: fadeIn 0.3s ease;
}
.tour-tooltip {
  position: fixed;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  max-width: 300px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  z-index: calc(var(--z-modal) + 1);
  border-top: 3px solid var(--color-accent);
}
@media (max-width: 768px) {
  .tour-tooltip {
    left: 10px !important;
    right: 10px;
    max-width: calc(100vw - 20px);
    bottom: 80px !important;
    top: auto !important;
  }
  .tour-next, .tour-prev {
    min-height: 44px;
    padding: 10px 18px;
    font-size: 13px;
  }
  .tour-skip {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
  }
  #compare-badge {
    top: auto !important;
    bottom: 50px !important;
    right: 8px;
    left: 8px;
    text-align: center;
  }
}
@media (max-height: 500px) and (orientation: landscape) {
  .tour-tooltip {
    bottom: 10px !important;
    top: auto !important;
    max-height: calc(100vh - 20px);
    overflow-y: auto;
  }
}
.tour-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-dark);
  margin-bottom: var(--space-2);
}
.tour-text {
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.5;
  margin-bottom: var(--space-4);
}
.tour-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.tour-counter {
  font-size: 11px;
  color: var(--color-muted);
  margin-right: auto;
  white-space: nowrap;
  flex-shrink: 0;
}
.tour-next, .tour-prev {
  padding: 6px 14px;
  min-height: 36px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}
.tour-next {
  background: var(--color-accent);
  color: #fff;
}
.tour-next:hover { background: var(--color-accent-dark); }
.tour-prev {
  background: var(--color-bg-light);
  color: var(--color-dark);
}
.tour-skip {
  font-size: 11px;
  color: var(--color-muted);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px 8px;
}
.tour-next:focus-visible, .tour-prev:focus-visible, .tour-skip:focus-visible {
  outline: 2px solid #C8922A;
  outline-offset: 2px;
}

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

/* ── HDRI loading indicator ────────────────────────────────────────── */
.env-loading-indicator {
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-3);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(0,0,0,0.55);
  border-radius: var(--radius-full, 999px);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.env-loading-indicator.visible { opacity: 1; }
.env-loading-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--color-accent);
  animation: spin 0.6s linear infinite;
}

/* ── Skeleton swatch placeholder ──────────────────────────────────── */
.swatch-skeleton {
  background: linear-gradient(90deg, var(--color-bg-light) 25%, var(--color-bg-mid, #e8e8e8) 50%, var(--color-bg-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
  aspect-ratio: 1;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── GPU hints for hover animations (set transiently to avoid layer bloat) ── */
.building-card:hover, .config-swatch:hover, .panel-card:hover { will-change: transform; }
.viewport-loading { will-change: opacity; }

/* ── Print styles ──────────────────────────────────────────────── */
@media print {
  .dm-header, .mode-toggle, .dm-progress-checklist,
  .viewport-toolbar, .config-actions, .photo-toolbar,
  .config-panel-handle, .weather-selector, .tod-selector,
  .env-selector, .dim-sliders, #app-splash, #market-selector,
  .zone-selector, .config-color-tabs, [id^="color-panels"],
  .panel-grid, .price-estimator, .skip-link,
  .advanced-link, .config-card-quote, .quote-inline-actions { display: none !important; }

  .viewport-sticky-wrap {
    position: static !important;
  }
  .config-panel {
    position: static !important;
    max-height: none !important;
    transform: none !important;
    box-shadow: none !important;
  }
  .config-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    page-break-inside: avoid;
  }
  .viewport-wrap { height: auto; aspect-ratio: 16/10; box-shadow: none !important; }
  .selection-summary { display: flex !important; }
  .quote-section { box-shadow: none !important; border: 1px solid #ccc; }
  body { background: #fff !important; color: #000 !important; }

  /* Show selection summary in print */
  .config-section:has(.selection-summary) { display: block !important; }
  .config-section-title { color: #000 !important; }
  .selection-zone-label { color: #000 !important; }
  .selection-color-name { color: #333 !important; }
}

/* ── Swatch tooltips ─────────────────────────────────────────── */
.config-swatch[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: var(--z-raised);
}
.config-swatch[data-tooltip]:hover::after {
  opacity: 1;
}

/* ── Recently used colors ────────────────────────────────────── */
.recent-colors {
  display: flex;
  gap: 8px;
  padding: 6px 0 4px;
  margin-bottom: var(--space-2);
  align-items: center;
}
.recent-color {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--color-border);
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  flex-shrink: 0;
}
.recent-color:hover {
  border-color: var(--color-accent);
  transform: scale(1.15);
  box-shadow: 0 0 0 2px rgba(200,146,42,0.2);
}
.recent-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  font-weight: 600;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.recent-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* ── Accessibility ──────────────────────────────────────────────── */

/* Focus indicators */
.building-card:focus-visible,
.zone-btn:focus-visible,
.config-swatch:focus-visible,
.viewport-btn:focus-visible,
.panel-card:focus-visible,
.env-btn:focus-visible,
.tod-btn:focus-visible,
.weather-btn:focus-visible,
.mode-tab:focus-visible,
.photo-tool-btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-accent);
  color: #fff;
  padding: 8px 16px;
  font-weight: 700;
  z-index: var(--z-toast);
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .viewport-loading-spinner { animation: none; }
  .checklist-step.active .step-circle { animation: none; }
}

/* ── Dark Mode (toggled via data-theme attribute) ─────────────────── */
/* ═══════════════════════════════════════════════════════════════
   SPLIT LAYOUT: Viewport left, controls right (desktop only)
   ═══════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
  /* Full-width split: override container max-width */
  .split-layout {
    display: flex;
    gap: 0;
    min-height: calc(100vh - 80px);
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    width: 100vw !important;
  }
  .split-viewport {
    flex: 0 0 65%;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
  }
  .split-viewport .viewport-sticky-wrap {
    position: relative;
    height: 100%;
  }
  .split-viewport .viewport-wrap {
    height: calc(100vh - 40px);
    max-height: none;
    aspect-ratio: auto;
  }
  .split-viewport .viewport-help-text {
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    margin: 0;
  }
  .split-controls {
    flex: 0 0 35%;
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding: var(--space-4) var(--space-4) var(--space-8);
    scrollbar-width: thin;
    scrollbar-color: rgba(200,146,42,0.3) transparent;
  }
  .split-controls::-webkit-scrollbar { width: 6px; }
  .split-controls::-webkit-scrollbar-track { background: transparent; }
  .split-controls::-webkit-scrollbar-thumb { background: rgba(200,146,42,0.25); border-radius: 3px; }
  .split-controls::-webkit-scrollbar-thumb:hover { background: rgba(200,146,42,0.5); }

  /* Remove the max-width container constraint inside split */
  .split-controls .config-panel { max-width: none; padding: 0; }
  .split-controls .config-card { margin-bottom: var(--space-3); }

  /* Building type grid: 2 columns in narrow panel */
  .split-controls .building-type-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Panel grid: 2 columns */
  .split-controls .panel-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Tablet: slightly narrower split */
@media (min-width: 1024px) and (max-width: 1280px) {
  .split-viewport { flex: 0 0 58%; }
  .split-controls { flex: 0 0 42%; }
}

/* Mobile: stacked (default, no split) */
@media (max-width: 1023px) {
  .split-layout { display: block; }
  .split-viewport { position: relative; }
  .split-controls { padding: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   FLOATING ACTION BUTTONS (Get Quote + Your Photo)
   ═══════════════════════════════════════════════════════════════ */
.fab-group {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}
.fab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.fab:hover { transform: translateY(-2px); }
.fab:active { transform: translateY(0) scale(0.97); }
.fab svg { flex-shrink: 0; }
.fab-primary {
  background: linear-gradient(135deg, #C8922A, #A07520);
  color: #fff;
  box-shadow: 0 4px 24px rgba(200,146,42,0.4);
}
.fab-primary:hover { box-shadow: 0 8px 32px rgba(200,146,42,0.55); }
.fab-secondary {
  background: rgba(14,14,14,0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.85);
}
.fab-secondary:hover { background: rgba(200,146,42,0.15); border-color: rgba(200,146,42,0.3); }
.fab-label { white-space: nowrap; }
@media (max-width: 640px) {
  .fab-group { bottom: 16px; right: 16px; }
  .fab { padding: 10px 16px; font-size: 12px; }
  .fab-label { display: none; }
  .fab { border-radius: 50%; padding: 14px; }
}

/* ═══════════════════════════════════════════════════════════════
   QUOTE DRAWER (slide from right on FAB click)
   ═══════════════════════════════════════════════════════════════ */
.quote-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.quote-drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.quote-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 960;
  width: 420px;
  max-width: 92vw;
  background: rgba(14,14,14,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid rgba(255,255,255,0.06);
  box-shadow: -8px 0 40px rgba(0,0,0,0.5);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
  padding: 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(200,146,42,0.3) transparent;
}
.quote-drawer.open { transform: translateX(0); }
.quote-drawer-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.quote-drawer-close:hover { background: rgba(200,146,42,0.15); color: #fff; }
.quote-drawer .config-section-title { margin-bottom: 16px; }
.quote-drawer .config-card-quote { background: transparent; border: none; box-shadow: none; backdrop-filter: none; padding: 0; }
@media (max-width: 640px) {
  .quote-drawer { width: 100vw; max-width: 100vw; }
}

/* ═══════════════════════════════════════════════════════════════
   LARGER COLOR SWATCHES (48px on desktop, 44px mobile)
   ═══════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
  .config-swatch { width: 52px; }
  .config-swatch-ring { width: 44px; height: 44px; }
  .config-swatch-name { font-size: 10px; max-width: 56px; }
  .config-swatches-grid { gap: 12px 10px; }
}

/* ═══════════════════════════════════════════════════════════════
   TRUST SIGNALS
   ═══════════════════════════════════════════════════════════════ */
.trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 12px 16px;
  margin-bottom: var(--space-3);
  border-radius: 10px;
  background: rgba(200,146,42,0.06);
  border: 1px solid rgba(200,146,42,0.12);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
  white-space: nowrap;
}
.trust-item svg { width: 14px; height: 14px; color: #C8922A; flex-shrink: 0; }
@media (max-width: 640px) {
  .trust-bar { flex-wrap: wrap; gap: 12px; }
  .trust-item { font-size: 10px; }
}

/* ═══════════════════════════════════════════════════════════════
   COLOR SWATCH TOOLTIP CARD
   ═══════════════════════════════════════════════════════════════ */
.config-swatch[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: rgba(14,14,14,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  color: #e0e0e0;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 50;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.config-swatch[data-tooltip]::after {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(14,14,14,0.92);
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 50;
  pointer-events: none;
}
.config-swatch[data-tooltip]:hover::before,
.config-swatch[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
.config-swatch[data-tooltip]:hover::before {
  transform: translateX(-50%) scale(1);
}

/* ═══════════════════════════════════════════════════════════════
   ONBOARDING TOOLTIPS (first-time users)
   ═══════════════════════════════════════════════════════════════ */
.onboard-tooltip {
  position: fixed;
  z-index: 800;
  background: linear-gradient(135deg, #C8922A, #A07520);
  color: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 8px 32px rgba(200,146,42,0.4);
  max-width: 280px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
}
.onboard-tooltip.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.onboard-tooltip::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: #C8922A;
  transform: rotate(45deg);
}
.onboard-tooltip.arrow-top::after { top: -5px; left: 24px; }
.onboard-tooltip.arrow-left::after { left: -5px; top: 16px; }
.onboard-step { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.7; margin-bottom: 4px; }
.onboard-dismiss {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 12px;
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.onboard-dismiss:hover { background: rgba(255,255,255,0.3); }

/* ═══════════════════════════════════════════════════════════════
   LOADING SKELETON SHIMMER
   ═══════════════════════════════════════════════════════════════ */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 8px;
}
.skeleton-viewport { width: 100%; aspect-ratio: 16/10; border-radius: 12px; }
.skeleton-card { height: 80px; margin-bottom: 12px; border-radius: 12px; }
.skeleton-text { height: 14px; width: 60%; margin-bottom: 8px; border-radius: 4px; }

/* ═══════════════════════════════════════════════════════════════
   ZONE PULSE on color change
   ═══════════════════════════════════════════════════════════════ */
@keyframes colorAppliedPulse {
  0% { box-shadow: inset 0 0 0 0 rgba(200,146,42,0.4); }
  50% { box-shadow: inset 0 0 30px 10px rgba(200,146,42,0.15); }
  100% { box-shadow: inset 0 0 0 0 rgba(200,146,42,0); }
}
.viewport-wrap.color-pulse {
  animation: colorAppliedPulse 0.6s ease-out;
}

/* ═══════════════════════════════════════════════════════════════
   LOOKBOOK GLASSMORPHISM THEME (always-dark, premium aesthetic)
   Matches gallery_print/lookbook.html design system
   ═══════════════════════════════════════════════════════════════ */

/* ── Base ── */
[data-theme="dark"] {
  --color-bg-white: #0a0a0a;
  --color-bg-light: #141414;
  --color-bg-mid: #1E1E1E;
  --color-dark: #f0f0f0;
  --color-heading: #f0f0f0;
  --color-body: #d0d0d0;
  --color-muted: #9A9590;
  --color-border: rgba(255,255,255,0.08);
}
[data-theme="dark"] body { background-color: #0a0a0a; color: #d0d0d0; }

/* ── Header ── */
[data-theme="dark"] .dm-header { background: rgba(10,10,10,0.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid rgba(255,255,255,0.04); }

/* ── Welcome modal: hide (auto-skipped via sessionStorage) ── */
#market-selector { display: none !important; }
/* Hide theme toggle (always dark now) */
[data-theme="dark"] .theme-toggle { display: none; }

/* ── Config panels: glassmorphism ── */
[data-theme="dark"] .config-panel { background: transparent; border: none; }
[data-theme="dark"] .config-card {
  background: rgba(14,14,14,0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
[data-theme="dark"] .config-section-title { color: #e8e8e8; font-weight: 700; letter-spacing: 0.01em; }

/* ── Viewport ── */
[data-theme="dark"] .viewport-sticky-wrap { background: #0a0a0a; box-shadow: 0 4px 20px rgba(0,0,0,0.5); }

/* ── Mode toggle pill ── */
[data-theme="dark"] .mode-toggle { background: rgba(14,14,14,0.6); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.06); }
[data-theme="dark"] .mode-tab { background: transparent; color: rgba(255,255,255,0.45); }
[data-theme="dark"] .mode-tab:hover { color: rgba(255,255,255,0.8); }
[data-theme="dark"] .mode-tab.active { background: linear-gradient(135deg, #C8922A, #A07520); color: #fff; box-shadow: 0 2px 12px rgba(200,146,42,0.3); }

/* ── Progress checklist ── */
[data-theme="dark"] .step-circle { background: rgba(14,14,14,0.6); border-color: rgba(255,255,255,0.1); color: rgba(255,255,255,0.4); }
[data-theme="dark"] .checklist-step.active .step-circle { border-color: #C8922A; background: #C8922A; color: #fff; }
[data-theme="dark"] .step-label { color: rgba(255,255,255,0.35); }
[data-theme="dark"] .checklist-step.active .step-label { color: #D4A84B; }
[data-theme="dark"] .step-line { background: rgba(255,255,255,0.06); }

/* ── Building cards ── */
[data-theme="dark"] .building-card {
  background: rgba(20,20,20,0.5);
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.8);
  backdrop-filter: blur(8px);
}
[data-theme="dark"] .building-card:hover { border-color: rgba(200,146,42,0.3); background: rgba(200,146,42,0.06); }
[data-theme="dark"] .building-card.active { border-color: #C8922A; background: rgba(200,146,42,0.1); box-shadow: 0 0 0 1px rgba(200,146,42,0.25); }
[data-theme="dark"] .building-card svg { color: rgba(255,255,255,0.5); }
[data-theme="dark"] .building-card.active svg { color: #C8922A; }
[data-theme="dark"] .building-card-name { color: rgba(255,255,255,0.75); }

/* ── Size toggle ── */
[data-theme="dark"] .size-btn { background: rgba(20,20,20,0.5); border: 1px solid rgba(255,255,255,0.06); color: rgba(255,255,255,0.8); }
[data-theme="dark"] .size-btn.active { background: linear-gradient(135deg, #C8922A, #A07520); border-color: #C8922A; color: #fff; }

/* ── Zone buttons ── */
[data-theme="dark"] .zone-btn {
  background: rgba(20,20,20,0.5);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.65);
}
[data-theme="dark"] .zone-btn:hover { border-color: rgba(200,146,42,0.35); color: #fff; }
[data-theme="dark"] .zone-btn.active {
  background: linear-gradient(135deg, #C8922A, #A07520);
  border-color: #C8922A;
  color: #fff;
  box-shadow: 0 4px 20px rgba(200,146,42,0.25);
}

/* ── Panel profile cards ── */
[data-theme="dark"] .panel-card { background: rgba(20,20,20,0.5); border: 1px solid rgba(255,255,255,0.06); }
[data-theme="dark"] .panel-card-name { background: rgba(10,10,10,0.6); color: rgba(255,255,255,0.75); }
[data-theme="dark"] .panel-card:hover { border-color: rgba(200,146,42,0.3); }
[data-theme="dark"] .panel-card.active { border-color: #C8922A; box-shadow: 0 0 0 2px rgba(200,146,42,0.25), 0 6px 16px rgba(200,146,42,0.12); }

/* ── Color accordion ── */
[data-theme="dark"] .color-collection-header {
  background: rgba(20,20,20,0.5);
  border: 1px solid rgba(255,255,255,0.06);
  border-left: 4px solid #C8922A;
  color: #e0e0e0;
}
[data-theme="dark"] .collection-count { background: rgba(255,255,255,0.05); color: #9A9590; }
[data-theme="dark"] .config-swatch-ring { border-color: rgba(255,255,255,0.1); }
[data-theme="dark"] .config-swatch-name { color: rgba(255,255,255,0.45); }
[data-theme="dark"] .config-swatch:hover .config-swatch-name { color: #D4A84B; }
[data-theme="dark"] .config-swatch.active .config-swatch-ring {
  border-color: #C8922A;
  box-shadow: 0 0 0 2px rgba(200,146,42,0.3), 0 2px 8px rgba(200,146,42,0.2);
}
[data-theme="dark"] .recent-color { border-color: rgba(255,255,255,0.1); }

/* ── Environment / Time / Weather buttons ── */
[data-theme="dark"] .env-btn,
[data-theme="dark"] .tod-btn,
[data-theme="dark"] .weather-btn {
  background: rgba(20,20,20,0.5);
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.65);
}
[data-theme="dark"] .env-btn.active,
[data-theme="dark"] .tod-btn.active,
[data-theme="dark"] .weather-btn.active {
  background: linear-gradient(135deg, #C8922A, #A07520);
  border-color: #C8922A;
  color: #fff;
}

/* ── Quote form ── */
[data-theme="dark"] .config-card-quote {
  background: linear-gradient(135deg, rgba(200,146,42,0.06), rgba(14,14,14,0.65));
  border: 1px solid rgba(200,146,42,0.15);
  backdrop-filter: blur(20px);
}
[data-theme="dark"] .quote-adaptive-fields input,
[data-theme="dark"] .quote-adaptive-fields textarea,
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea {
  background: rgba(10,10,10,0.5);
  color: #d0d0d0;
  border: 1px solid rgba(255,255,255,0.08);
}
[data-theme="dark"] .quote-adaptive-fields input:focus,
[data-theme="dark"] .quote-adaptive-fields textarea:focus,
[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group select:focus,
[data-theme="dark"] .form-group textarea:focus {
  border-color: #C8922A;
  box-shadow: 0 0 0 3px rgba(200,146,42,0.12);
  outline: none;
}
[data-theme="dark"] .quote-summary-chip { background: rgba(20,20,20,0.5); border: 1px solid rgba(255,255,255,0.06); color: rgba(255,255,255,0.8); }
[data-theme="dark"] .quote-dealer-skus { background: rgba(200,146,42,0.06); border-color: rgba(200,146,42,0.15); }

/* ── Price estimator ── */
[data-theme="dark"] .price-estimator {
  background: linear-gradient(135deg, rgba(200,146,42,0.08), rgba(14,14,14,0.5));
  border: 1px solid rgba(200,146,42,0.2);
}

/* ── Selection summary ── */
[data-theme="dark"] .selection-row { background: rgba(20,20,20,0.4); border-radius: 8px; }
[data-theme="dark"] .selection-zone-label { color: #D4A84B; }
[data-theme="dark"] .selection-color-name { color: rgba(255,255,255,0.8); }
[data-theme="dark"] .config-summary-card { background: rgba(14,14,14,0.65); border: 1px solid rgba(255,255,255,0.06); }

/* ── Config select ── */
[data-theme="dark"] .config-select { background: rgba(10,10,10,0.5); color: #d0d0d0; border-color: rgba(255,255,255,0.08); }

/* ── Misc ── */
[data-theme="dark"] .advanced-link { color: #9A9590; }
[data-theme="dark"] .advanced-link:hover { color: #D4A84B; }
[data-theme="dark"] .model-2d-wrap { background: linear-gradient(135deg, #0a0a0a 0%, #141414 100%); border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .photo-toolbar { background: rgba(14,14,14,0.65); border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .photo-tools-toggle { border-color: rgba(255,255,255,0.06); color: #9A9590; }
[data-theme="dark"] .photo-library-label { color: #9A9590; }
[data-theme="dark"] .photo-library-section { border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .photo-tool-btn { background: rgba(20,20,20,0.5); color: #d0d0d0; border: 1px solid rgba(255,255,255,0.06); }

/* ── Primary button: gold gradient (lookbook CTA style) ── */
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .quote-submit,
[data-theme="dark"] .market-quick-quote {
  background: linear-gradient(135deg, #C8922A, #A07520) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 4px 20px rgba(200,146,42,0.3);
}
[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] .quote-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(200,146,42,0.45);
}

/* ── Splash screen ── */
#app-splash { background: linear-gradient(160deg, #0a0a0a 0%, #141414 40%, #0a0a0a 100%) !important; }

/* ── Color search input ── */
[data-theme="dark"] .color-search {
  background: rgba(10,10,10,0.5) !important;
  color: #d0d0d0 !important;
  border-color: rgba(255,255,255,0.08) !important;
}
[data-theme="dark"] .color-search:focus {
  border-color: #C8922A !important;
  box-shadow: 0 0 0 3px rgba(200,146,42,0.12);
}
