*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: Arial, sans-serif;
  background: #ede9e0;
}

/* ── Three-column layout ───────────────────────────────────────────────── */
#app {
  display: grid;
  grid-template-columns: 650px 1fr 260px;
  gap: 0;
  height: 100vh;
  overflow: hidden;
}

/* ── LEFT: Preview ─────────────────────────────────────────────────────── */
#preview-panel {
  background: #b0a898;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  height: 100vh;
  overflow: hidden;
}

#svg-overlay-container {
  position: relative;
  z-index: 1;
  width: 348px;
  height: 780px;
  background: #fff;
  overflow: hidden;
  /* Outer drop shadow — door stands off the preview wall */
  box-shadow:
    0 24px 64px rgba(0,0,0,0.65),
    0  6px 18px rgba(0,0,0,0.40),
    0  2px  6px rgba(0,0,0,0.25);
}

/* Inner perimeter shadow — door sits in a physical reveal/frame */
/* z-index here is relative to siblings INSIDE svg-overlay-container only */
#svg-overlay-container::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 300;
  box-shadow:
    inset  4px  0 24px rgba(0,0,0,0.35),   /* left edge */
    inset -4px  0 24px rgba(0,0,0,0.35),   /* right edge */
    inset  0  6px 32px rgba(0,0,0,0.45),   /* top edge (heavier — light from above) */
    inset  0 -4px 20px rgba(0,0,0,0.28);   /* bottom edge */
}
.svg-layer {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
}

.svg-layer svg {
  width: 100%;
  height: 100%;
}

/* ── CENTER: Configurator ──────────────────────────────────────────────── */
#config-panel {
  padding: 30px 40px;
  height: 100vh;
  overflow-y: auto;
}

.step {
  margin-bottom: 32px;
}

.step h3 {
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  color: #333;
}

.hidden {
  display: none !important;
}

/* Door type buttons */
.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.door-type-btn,
.toggle-btn {
  padding: 8px 20px;
  border: 2px solid #bbb;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: bold;
  transition: border-color 0.15s, background 0.15s;
}

.door-type-btn.active,
.toggle-btn.active {
  border-color: #c8a45a;
  background: #fdf6e7;
  color: #7a5a1a;
}

/* Color tab buttons */
.tab-row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.color-tab {
  padding: 5px 14px;
  border: 1px solid #bbb;
  background: #f5f5f5;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.15s;
}

.color-tab.active {
  background: #333;
  color: #fff;
  border-color: #333;
}

/* Swatch rows */
.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

/* Color swatches */
.color-swatch {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s, transform 0.1s;
  flex-shrink: 0;
}

.color-swatch:hover {
  transform: scale(1.1);
}
.color-swatch.selected {
  border-color: #333;
}

/* Design thumbnails */
.design-thumb {
  /* width: 52px; */
  height: 90px;
  border: 3px solid transparent;
  background: #fff;
  cursor: pointer;
  border-radius: 2px;
  overflow: hidden;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.design-thumb img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
}
.design-thumb svg {
  width: 100%;
  height: 100%;
  display: block;
}
.design-thumb.selected {
  border-color: #333;
  background: #fff;
}

.design-thumb-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 60px;       /* fixed width — all cells identical regardless of label */
}

.design-thumb-label {
  font-size: 10px;
  color: #555;
  text-align: center;
  line-height: 1.2;
  width: 100%;
  word-break: break-word;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Facade / entryway thumbnails */
.facade-thumb {
  width: 110px;
  height: 144px;
  background: #d0d8e0;
  border: 3px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  font-size: 12px;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative; /* needed for interior/facade layer stacking */
}

/* Interior background layer inside facade thumb */
.facade-thumb-interior {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}

/* Facade PNG layer on top of interior */
.facade-thumb-facade {
  position: relative;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
}

.facade-thumb.selected {
  border-color: #333;
}

/* Interior thumbnails */
.interior-thumb {
  width: 110px;
  height: 80px;
  background: #d0d8e0;
  border: 3px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  font-size: 12px;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.interior-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.interior-thumb.selected {
  border-color: #333;
}

/* Lockset thumbnails */
.lockset-thumb {
  width: 88px;
  height: 88px;
  background: #f0f0f0;
  border: 3px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  padding: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s;
}

.lockset-thumb img,
.lockset-thumb svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.lockset-thumb.selected {
  border-color: #c8a45a; background: #fdf6e7;
}
.lockset-thumb:hover:not(.selected) {
  border-color: #bbb;
}

/* Tint swatches */
.tint-swatch {
  padding: 8px 14px;
  border: 2px solid #bbb;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: border-color 0.15s;
}

.tint-swatch.selected {
  border-color: #333;
}

/* ── RIGHT: Summary ────────────────────────────────────────────────────── */
#summary-panel {
  background: #fff;
  border-left: 1px solid #ddd;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100vh;
  overflow-y: auto;
}

.summary-box {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 16px;
}

.summary-box h2 {
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1a2f6e;
  margin-bottom: 12px;
  text-align: center;
}

.summary-box p {
  font-size: 13px;
  color: #444;
  margin-bottom: 8px;
  text-align: center;
}

.summary-box .cta {
  font-size: 13px;
  font-weight: bold;
  color: #1a2f6e;
  text-align: center;
  margin-top: 12px;
  line-height: 1.5;
}

/* ── Custom color picker ─────────────────────────────────────────────────── */
.custom-picker-wrap {
  margin-top: 10px;
}

.not-seeing-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: #a06820;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.not-seeing-btn:hover {
  color: #7a4f10;
}

.custom-picker {
  margin-top: 10px;
  padding: 14px 14px 12px;
  border: 1px solid #e0d0b0;
  border-radius: 8px;
  background: #fdfaf4;
}

/* Color wheel + vertical slider side by side */
.picker-main-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.picker-wheel-wrap {
  flex-shrink: 0;
}

.picker-wheel {
  cursor: crosshair;
  display: block;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  width:  180px;
  height: 180px;
}

/* Vertical lightness column */
.picker-lgt-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 180px;       /* match wheel CSS height */
}

.picker-label {
  font-size: 10px;
  font-weight: bold;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}

/* Vertical range slider */
.picker-lgt {
  writing-mode: vertical-lr;
  direction: rtl;
  flex: 1;
  width: 14px;
  border-radius: 7px;
  outline: none;
  cursor: pointer;
  border: 1px solid #ccc;
  background: linear-gradient(to top, #000, #888, #fff);
}
.picker-lgt::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #777;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  cursor: pointer;
}
.picker-lgt::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #777;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  cursor: pointer;
}

/* Bottom row: swatch + hex */
.picker-bottom-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.picker-swatch {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid #ccc;
  flex-shrink: 0;
  background: #b84040;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}

.picker-hex-input {
  width: 90px;
  font-family: monospace;
  font-size: 14px;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Quote form ──────────────────────────────────────────────────────────── */
.quote-field {
  margin-bottom: 10px;
}

.quote-input {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 13px;
  font-family: Arial, sans-serif;
  outline: none;
  transition: border-color 0.15s;
}

.quote-input:focus { border-color: #1a2f6e; }
.quote-input::placeholder { color: #aaa; }

.quote-submit {
  width: 100%;
  padding: 10px;
  background: #1a2f6e;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background 0.15s;
  margin-top: 4px;
}

.quote-submit:hover:not(:disabled) {
  background: #253f94;
}
.quote-submit:disabled {
  background: #999; cursor: not-allowed;
}

.quote-status {
  margin-top: 10px;
  font-size: 12px;
  text-align: center;
  min-height: 18px;
}

.quote-status.success { color: #2a7a2a; }
.quote-status.error   { color: #b00; }

/* ── Quote modal ─────────────────────────────────────────────────────────── */
#quote-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

#quote-modal.open {
  display: flex;
}

#quote-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  cursor: pointer;
}

#quote-modal-box {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 8px;
  padding: 28px 28px 24px;
  width: min(420px, calc(100vw - 32px));
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

#quote-modal-box h2 {
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 0.08em;
  color: #1a2f6e;
  margin-bottom: 16px;
}

#quote-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #666;
  padding: 4px 6px;
}

#quote-modal-close:hover {
  color: #000;
}

/* ── Surface-noise dev bar ───────────────────────────────────────────────── */
#dev-bar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 18px;
  background: rgba(20,20,20,0.92);
  color: #eee;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  font-size: 12px;
  font-family: monospace;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

.dev-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dev-title {
  font-weight: bold;
  color: #f0c060;
  margin-right: 4px;
}

#dev-bar label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #aaa;
}

#dev-bar input[type=range] {
  width: 90px;
  accent-color: #f0c060;
  cursor: pointer;
}

#dev-bar button {
  padding: 5px 12px;
  background: #f0c060;
  color: #111;
  border: none;
  border-radius: 5px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  font-family: monospace;
}
#dev-bar button:hover { background: #ffd070; }

/* ── Mobile drawer wrapper — transparent on desktop/tablet ──────────────── */
#mobile-drawer { display: contents; }
#mobile-options-tab { display: none; }
#mobile-quote-bar { display: none; }
#mobile-close-btn { display: none; }
/* ══════════════════════════════════════════════════════════════════════════════
   TABLET  (≤ 1100px)
   Fixed door preview header | config + summary scroll below
══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {

  /* Tablet preview panel height: 539px door + 16px top + 16px bottom padding = 571px */
  :root { --preview-h: 571px; }

  html, body {
    height: auto;
    overflow: auto;
  }

  #app {
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
    /* push content below the fixed preview header */
    padding-top: var(--preview-h);
  }

  #preview-panel {
    grid-column: unset;
    grid-row: unset;
    align-self: unset;
    height: var(--preview-h);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 16px 12px;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
  }

  #svg-overlay-container {
    width: 240px;
    height: 539px; /* maintains 348:780 aspect ratio */
    box-shadow:
      0 16px 44px rgba(0,0,0,0.60),
      0  5px 14px rgba(0,0,0,0.35),
      0  1px  4px rgba(0,0,0,0.20);
  }

  #config-panel {
    grid-column: unset;
    grid-row: unset;
    height: auto;
    overflow: visible;
    padding: 24px 28px 80px;
  }

  #summary-panel {
    grid-column: unset;
    grid-row: unset;
    height: auto;
    overflow: visible;
    border-left: none;
    border-top: 2px solid #e0dbd4;
    padding: 20px 28px 80px;
  }

  /* Sticky bar already provides the CTA on touch devices — hide button and its containing box */
  #desktop-quote-btn,
  #desktop-quote-btn + *,
  #desktop-quote-btn:only-child {
    display: none !important;
  }
  .summary-box:has(#desktop-quote-btn) {
    display: none !important;
  }

  /* Summary is in the sticky footer — hide the panel on touch devices */
  #summary-panel { display: none !important; }

  /* Dev bar is a developer tool — hide on touch/tablet */
  #dev-bar { display: none !important; }

  /* Horizontal-scroll thumbnail rows */
  #entryway-options,
  #interior-options,
  #lockset-options {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 8px;
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
    mask-image:         linear-gradient(to right, black 85%, transparent 100%);
  }
  #entryway-options::-webkit-scrollbar,
  #interior-options::-webkit-scrollbar,
  #lockset-options::-webkit-scrollbar { display: none; }

  /* Design options: wrapping grid */
  #design-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, 60px);
    gap: 10px;
    flex-wrap: unset;
    overflow-x: unset;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .facade-thumb,
  .interior-thumb,
  .lockset-thumb,
  .design-thumb-wrapper { flex-shrink: 0; }

  .facade-thumb  { width: 130px; height: 170px; }
  .interior-thumb { width: 130px; height: 95px; }

  /* Touch targets */
  .door-type-btn,
  .toggle-btn {
    padding: 12px 20px;
    min-height: 44px;
  }

  .color-tab {
    padding: 8px 16px;
    min-height: 40px;
  }

  /* Fixed quote bar */
  #mobile-quote-bar {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: rgba(255,255,255,0.97);
    border-top: 1px solid #ddd;
    padding: 10px 16px 12px;
    backdrop-filter: blur(6px);
  }

  /* Summary box inside the bar: title left, items in a dot-separated row */
  #mobile-quote-bar .summary-box {
    border: none;
    padding: 0;
  }

  #mobile-quote-bar .summary-box h2 {
    text-align: start;
    margin-bottom: 6px;
  }

  #mobile-quote-bar .summary-box p {
    display: none; /* hidden — replaced by the flex row below */
  }

  /* Single-line dot-separated summary row */
  #mobile-quote-bar .summary-box::after {
    content: '';
    display: none; /* row built via JS span trick — see below */
  }

  #mobile-summary-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0;
    font-size: 13px;
    color: #444;
  }

  #mobile-summary-row span.summary-item {
    white-space: nowrap;
  }

  #mobile-summary-row span.summary-item + span.summary-item::before {
    content: ' · ';
    color: #aaa;
    padding: 0 4px;
  }

  /* Side-by-side buttons */
  #mobile-bar-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
  }

  #mobile-quote-btn {
    flex: 1;
    padding: 13px;
    background: #1a2f6e;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 0.03em;
  }

  #mobile-quote-btn:active {
    background: #253f94;
  }

  #mobile-close-btn {
    display: block;   /* override global display:none */
    flex: 1;
    padding: 13px;
    background: #8b1a1a;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 0.03em;
  }

  #mobile-close-btn:active { background: #a82020; }
}

/* ══════════════════════════════════════════════════════════════════════════════
   MOBILE  (≤ 600px)
   Fixed door preview header | steps scroll below | summary at bottom
══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {

  /* Mobile preview panel height: 359px door + 10px top + 10px bottom padding = 379px */
  :root { --preview-h: 379px; }

  html, body {
    height: 100%;
    /* overflow:hidden intentionally omitted — it kills scroll inside fixed children on iOS Safari.
       Body has nothing to scroll since all panels are position:fixed. */
  }

  #app {
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
    padding-top: var(--preview-h);
  }

  /* ── Options drawer (mobile only) ──────────────────────────────── */

  /* Drawer — slides in from right; tab is inside, sticking out left */
  #mobile-drawer {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 90vw);
    z-index: 250;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  #mobile-drawer.open {
    transform: translateX(0);
  }

  /* Tab — absolutely on the left edge of the drawer, vertically centered, sticks out */
  #mobile-options-tab {
    display: block;
    position: absolute;
    left: -32px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    width: 32px;
    padding: 20px 0;
    background: #1a2f6e;
    color: #fff;
    border: none;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    writing-mode: vertical-rl;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.12em;
  }

  #mobile-options-tab:active {
    background: #253f94;
  }

  #config-panel {
    position: absolute !important;
    inset: 0 !important;
    overflow-x: hidden !important;
    overflow-y: scroll !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    padding: 16px 14px 40px !important;
    background: #ede9e0;
    box-sizing: border-box;
    height: auto !important;
    grid-column: unset !important;
    grid-row: unset !important;
  }

  /* Backdrop when drawer is open */
  #mobile-drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 249;
    background: rgba(0,0,0,0.4);
  }

  #mobile-drawer-backdrop.visible {
    display: block;
  }

  /* ── Preview ── */
  #preview-panel {
    grid-column: unset;
    grid-row: unset;
    align-self: unset;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    height: var(--preview-h);
    padding: 10px 8px;
    background: #9a9088;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
  }

  #svg-overlay-container {
    width: 160px;
    height: 359px; /* maintains 348:780 aspect ratio */
    box-shadow:
      0 10px 30px rgba(0,0,0,0.55),
      0  3px  9px rgba(0,0,0,0.30),
      0  1px  3px rgba(0,0,0,0.18);
  }

  /* ── Config ── */
  #config-panel {
    grid-column: unset;
    grid-row: unset;
    height: auto;
    overflow: visible;
    padding: 16px 14px;
    /* add bottom padding so sticky quote bar doesn't obscure last step */
    padding-bottom: 80px;
  }

  #summary-panel {
    grid-column: unset;
    grid-row: unset;
    height: auto;
    overflow: visible;
    border-left: none;
    border-top: 2px solid #e0dbd4;
    padding: 16px 14px 80px;
  }

  /* ── Horizontal-scroll thumbnail rows ─────────────────────────────── */
  #entryway-options,
  #interior-options,
  #lockset-options {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 8px;
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
    mask-image:         linear-gradient(to right, black 85%, transparent 100%);
  }
  #entryway-options::-webkit-scrollbar,
  #interior-options::-webkit-scrollbar,
  #lockset-options::-webkit-scrollbar {
    display: none;
  }

  /* Design options: wrapping grid — consistent cell widths */
  #design-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, 60px);
    gap: 10px;
    flex-wrap: unset;
    overflow-x: unset;
    -webkit-mask-image: none;
    mask-image: none;
  }

  /* Prevent shrinking on scroll */
  .facade-thumb,
  .interior-thumb,
  .lockset-thumb {
    flex-shrink: 0;
  }

  .facade-thumb   {
    width: 120px;
    height: 157px;
  }
  .interior-thumb {
    width: 120px;
    height: 87px;
  }

  /* Color swatches — keep wrapping but scroll if needed */
  #frame-color-options,
  #design-color-options,
  #mesh-color-options {
    flex-wrap: wrap;
  }

  /* ── Touch targets ─────────────────────────────────────────────── */
  .door-type-btn,
  .toggle-btn {
    padding: 12px 18px;
    min-height: 44px;
    font-size: 14px;
  }

  .color-tab {
    padding: 8px 14px;
    min-height: 40px;
    font-size: 13px;
  }

  .color-swatch {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
  }

  .tint-swatch {
    padding: 10px 16px;
    min-height: 44px;
  }

  /* ── Prevent iOS auto-zoom on input focus ──────────────────────── */
  .quote-input  {
    font-size: 16px;
  }
  .picker-hex-input {
    font-size: 16px;
  }

  /* ── Step spacing ──────────────────────────────────────────────── */
  .step {
    margin-bottom: 24px;
  }
  .step h3 {
    font-size: 13px;
  }

  /* ── Summary panel ─────────────────────────────────────────────── */
  .summary-box {
    padding: 14px 12px;
  }
  .summary-box h2 {
    font-size: 12px;
  }

  /* ── Mobile bar: tighter padding on small screens ──────────────── */
  #mobile-quote-bar {
    padding: 8px 12px 10px;
  }
  #mobile-quote-btn,
  #mobile-close-btn {
    font-size: 14px;
    padding: 11px;
  }

  /* ── Summary row: two centered lines ───────────────────────────── */
  #mobile-summary-row {
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }

  /* Each line is its own flex row of dot-separated items */
  .summary-line {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 12px;
  }

  .summary-line .summary-item + .summary-item::before {
    content: ' · ';
    color: #aaa;
    padding: 0 4px;
  }
}
