/* ============================================================
   LCS Bar Top Configurator — Premium Dark Industrial UI
   ============================================================ */

:root {
  --bg: #07070a;
  --bg-elev: #0c0c10;
  --bg-card: #131317;
  --bg-card-hi: #1a1a20;
  --ink: #f5f3ee;
  --ink-warm: #ebe5d7;
  --ink-dim: rgba(245, 243, 238, 0.66);
  --ink-faint: rgba(245, 243, 238, 0.34);
  --ink-ghost: rgba(245, 243, 238, 0.12);
  --gold: #c8922a;
  --gold-bright: #e3aa3c;
  --gold-glow: rgba(200, 146, 42, 0.22);
  --line: rgba(245, 243, 238, 0.07);
  --line-bright: rgba(245, 243, 238, 0.16);
  --panel-bg: rgba(9, 9, 12, 0.78);
  --panel-blur: blur(18px) saturate(140%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; }
body {
  background: #000;
  color: var(--ink);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--gold); color: var(--bg); }
button { font-family: inherit; cursor: pointer; }

/* ============ LOADER ============ */
.loader {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: #000;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { text-align: center; max-width: 320px; padding: 0 24px; }
.loader-mark {
  width: 56px; height: 56px;
  border: 1px solid var(--gold);
  display: grid; place-items: center;
  margin: 0 auto 22px;
  font-family: 'Fraunces', serif;
  font-style: italic; font-weight: 300;
  font-size: 28px;
  color: var(--gold);
}
.loader-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px; letter-spacing: 0.28em;
  color: var(--ink);
  margin-bottom: 32px;
}
.loader-name span { color: var(--gold); margin: 0 4px; }
.loader-bar {
  width: 100%; height: 1px;
  background: var(--line);
  margin-bottom: 14px;
  overflow: hidden;
}
.loader-bar-fill {
  height: 100%;
  background: var(--gold);
  width: 0%;
  transition: width 0.3s ease;
}
.loader-status {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--ink-dim);
  text-transform: uppercase;
}

/* ============ TOP NAV ============ */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px 32px;
  background: linear-gradient(180deg, rgba(7,7,10,0.85) 0%, rgba(7,7,10,0) 100%);
}
.topnav-logo {
  display: flex; align-items: center; gap: 14px;
}
.logo-img {
  height: 46px; width: auto; display: block;
  /* the lockup is a full colour chrome mark on transparent bg — reads on dark nav as-is */
}
.logo-mark {
  width: 30px; height: 30px;
  border: 1px solid var(--gold);
  display: grid; place-items: center;
  font-family: 'Fraunces', serif;
  font-style: italic; font-weight: 300;
  font-size: 15px; color: var(--gold);
}
.logo-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 19px;
  letter-spacing: 0.2em;
  color: var(--ink);
}
.logo-name i { color: var(--gold); font-style: normal; margin: 0 3px; }

.topnav-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--ink-dim);
  text-transform: uppercase;
  display: flex; gap: 22px;
}
.topnav-meta i { color: var(--gold); font-style: normal; }

.topnav-cta {
  justify-self: end;
  display: flex; align-items: center; gap: 28px;
}
.topnav-link {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  position: relative;
  transition: color 0.3s;
}
.topnav-link:hover { color: var(--ink); }
.btn-quote-top {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600; font-size: 12px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--bg); background: var(--gold);
  padding: 11px 22px;
  border: 1px solid var(--gold);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.btn-quote-top:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  transform: translateY(-1px);
}

/* ============ VIEWPORT ============ */
#viewport {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  display: block;
  z-index: 1;
}

/* ============ SECTION TITLE (top-left under nav) ============ */
.section-title {
  position: fixed;
  top: 110px; left: 32px;
  z-index: 5;
  max-width: 460px;
  pointer-events: none;
}
.section-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.42em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px;
}
.section-tag::before {
  content: ''; width: 32px; height: 1px; background: var(--gold);
}
.section-h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(40px, 4.8vw, 72px);
  line-height: 0.86;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin-bottom: 16px;
  text-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}
.section-h1 i {
  font-family: 'Fraunces', serif;
  font-style: italic; font-weight: 300;
  color: var(--gold);
  font-size: 0.86em;
  letter-spacing: -0.02em;
}
.section-lede {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 300;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink-warm);
  line-height: 1.55;
  max-width: 380px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

/* ============ CONTROL PANEL (right side) ============ */
.controls {
  position: fixed;
  top: 110px; right: 32px;
  bottom: 32px;
  width: 380px;
  z-index: 10;
  background: var(--panel-bg);
  backdrop-filter: var(--panel-blur);
  -webkit-backdrop-filter: var(--panel-blur);
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}
/* Gold corner brackets */
.controls::before, .controls::after {
  content: ''; position: absolute;
  width: 24px; height: 24px;
  border-color: var(--gold); border-style: solid;
  pointer-events: none;
}
.controls::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.controls::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

.controls::-webkit-scrollbar { width: 4px; }
.controls::-webkit-scrollbar-track { background: transparent; }
.controls::-webkit-scrollbar-thumb { background: var(--gold); }

/* Bottom-sheet handle — mobile only (see 980px breakpoint below). Sits at
   the top of .controls' own scroll box so it stays put as the sole visible
   strip when collapsed, and as a sticky "tap to close" bar when expanded. */
.controls-handle {
  display: none;
  position: sticky; top: 0; z-index: 2;
  width: 100%; flex-shrink: 0;
  align-items: center; justify-content: space-between;
  padding: 20px 24px;
  background: var(--bg-elev);
  border: none; border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-align: left;
}
.controls-handle-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}
.controls-handle-chevron {
  color: var(--ink-dim);
  font-size: 10px;
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.controls.expanded .controls-handle-chevron { transform: rotate(180deg); }

.ctrl-section {
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}
.ctrl-section:last-child { border-bottom: none; }

.ctrl-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}
.ctrl-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  color: var(--gold);
  font-weight: 500;
}
.ctrl-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.ctrl-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--gold);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

/* ============ FINISH GRID (2-col, 12 chips) ============ */
.finish-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}
.finish-grid::-webkit-scrollbar { width: 3px; }
.finish-grid::-webkit-scrollbar-thumb { background: var(--gold); }
.finish-chip {
  position: relative;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 0;
  text-align: left;
  color: var(--ink);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.finish-chip:hover { border-color: var(--line-bright); transform: translateY(-1px); }
.finish-chip.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 8px 22px -8px var(--gold-glow);
}
.finish-chip.active::after {
  content: ''; position: absolute;
  top: 6px; right: 6px;
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--gold);
}
.finish-swatch {
  width: 100%; height: 56px;
  position: relative;
  overflow: hidden;
}
.finish-swatch::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.20) 50%, transparent 65%);
  pointer-events: none;
}
.finish-body { padding: 8px 10px 10px; }
.finish-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink);
  display: block;
  line-height: 1.2;
}
.finish-spec {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  margin-top: 4px;
  text-transform: uppercase;
}

/* ---------- Material-first selection (metal → subcategory → finish) ---------- */
.metal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 12px;
}
.metal-chip {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 8px 10px;
  text-align: left;
  color: var(--ink);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.metal-chip:hover { border-color: var(--line-bright); transform: translateY(-1px); }
.metal-chip.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 8px 22px -8px var(--gold-glow);
}
.metal-name {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600; font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink); line-height: 1.2;
}
.metal-blurb {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8px; letter-spacing: 0.02em; line-height: 1.32;
  color: var(--ink-faint); margin-top: 3px;
}
.subcat-block { margin-bottom: 14px; }
.subcat-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.subcat-chip {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-faint);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 5px 9px;
  transition: all 0.2s ease;
}
.subcat-chip:hover { border-color: var(--line-bright); color: var(--ink); }
.subcat-chip.active { border-color: var(--gold); color: var(--gold); }
.subcat-desc {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px; line-height: 1.55; letter-spacing: 0.01em;
  color: var(--ink-faint); margin: 9px 0 0;
}
.subcat-thick {
  display: block; margin-top: 5px;
  color: var(--gold); opacity: 0.72; letter-spacing: 0.06em;
}
.ctrl-head-sub { margin-top: 4px; }

/* Photoreal CSS swatches that hint at the finish (real material rendered in WebGL) */
.sw-brushed-304 {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.10) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(90deg, rgba(0,0,0,0.06) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, #d4d4d4 0%, #a8a8a8 50%, #c8c8c8 100%);
}
.sw-m5 {
  background:
    radial-gradient(circle at 18% 28%, rgba(255,255,255,0.20) 4%, transparent 7%),
    radial-gradient(circle at 58% 48%, rgba(0,0,0,0.12) 4%, transparent 7%),
    radial-gradient(circle at 28% 68%, rgba(255,255,255,0.16) 4%, transparent 7%),
    radial-gradient(circle at 78% 22%, rgba(0,0,0,0.10) 4%, transparent 7%),
    radial-gradient(circle at 73% 78%, rgba(255,255,255,0.14) 4%, transparent 7%),
    linear-gradient(180deg, #cecece 0%, #adadad 50%, #c4c4c4 100%);
}
.sw-polished {
  background:
    radial-gradient(ellipse at 30% 25%, rgba(255,255,255,0.5), transparent 55%),
    linear-gradient(180deg, #f0f0f0 0%, #b0b0b0 50%, #d8d8d8 100%);
}
.sw-hammered-copper {
  background:
    radial-gradient(circle at 20% 30%, rgba(255,220,180,0.4) 6%, transparent 9%),
    radial-gradient(circle at 50% 50%, rgba(180,80,40,0.35) 5%, transparent 8%),
    radial-gradient(circle at 80% 30%, rgba(255,220,180,0.35) 5%, transparent 8%),
    radial-gradient(circle at 30% 70%, rgba(180,80,40,0.3) 5%, transparent 8%),
    radial-gradient(circle at 70% 75%, rgba(255,200,140,0.3) 6%, transparent 9%),
    linear-gradient(180deg, #c87838 0%, #8a4520 50%, #b06a30 100%);
}
.sw-pvd-black {
  background:
    radial-gradient(ellipse at 30% 25%, rgba(110,110,110,0.20), transparent 50%),
    linear-gradient(180deg, #2a2a2e 0%, #08080a 55%, #1a1a1e 100%);
}
.sw-brass-bronze {
  background:
    radial-gradient(ellipse at 30% 30%, rgba(255,220,140,0.35), transparent 50%),
    linear-gradient(180deg, #d8a850 0%, #8a6315 50%, #c4922a 100%);
}
.sw-brushed-316 {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.10) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(90deg, rgba(0,0,0,0.06) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, #c8ccd0 0%, #9aa0a6 50%, #b8bdc2 100%);
}
.sw-brushed-copper {
  background:
    repeating-linear-gradient(90deg, rgba(255,200,150,0.18) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(90deg, rgba(80,30,15,0.14) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, #d2783a 0%, #8e4520 50%, #be6c30 100%);
}
.sw-pvd-gold {
  background:
    radial-gradient(ellipse at 30% 25%, rgba(255,235,170,0.45), transparent 55%),
    linear-gradient(180deg, #e5b65a 0%, #9a7522 50%, #d4a440 100%);
}
.sw-pvd-bronze {
  background:
    radial-gradient(ellipse at 30% 25%, rgba(180,120,70,0.30), transparent 55%),
    linear-gradient(180deg, #8a5530 0%, #4a2a16 50%, #6e4124 100%);
}
.sw-zinc {
  background:
    radial-gradient(circle at 25% 30%, rgba(160,170,180,0.30) 5%, transparent 12%),
    radial-gradient(circle at 70% 60%, rgba(110,120,130,0.30) 5%, transparent 12%),
    radial-gradient(circle at 50% 80%, rgba(180,185,190,0.25) 5%, transparent 12%),
    linear-gradient(180deg, #a4aab0 0%, #6e747a 50%, #94999e 100%);
}
.sw-pewter {
  background:
    radial-gradient(ellipse at 35% 25%, rgba(180,180,185,0.20), transparent 55%),
    linear-gradient(180deg, #7c7e82 0%, #4e5054 50%, #686a6e 100%);
}
.sw-bead-blasted {
  background:
    radial-gradient(circle at 22% 32%, rgba(255,255,255,0.10) 3%, transparent 6%),
    radial-gradient(circle at 62% 58%, rgba(0,0,0,0.10) 3%, transparent 6%),
    radial-gradient(circle at 78% 28%, rgba(255,255,255,0.08) 3%, transparent 6%),
    linear-gradient(180deg, #c2c5c8 0%, #9da0a3 50%, #b4b7ba 100%);
}
.sw-pvd-rose {
  background:
    radial-gradient(ellipse at 30% 25%, rgba(255,210,195,0.45), transparent 55%),
    linear-gradient(180deg, #d6a48c 0%, #9a6750 50%, #c68f77 100%);
}
.sw-pvd-iridescent {
  background:
    linear-gradient(125deg, #6ad0c4 0%, #8f7ce0 28%, #d76fb0 52%, #6fa8e0 74%, #7ee0b0 100%),
    linear-gradient(180deg, rgba(255,255,255,0.25), rgba(0,0,0,0.25));
  background-blend-mode: screen, normal;
}
.sw-blackened {
  background:
    radial-gradient(circle at 28% 30%, rgba(120,110,100,0.20) 6%, transparent 14%),
    radial-gradient(circle at 70% 65%, rgba(60,55,50,0.30) 6%, transparent 16%),
    linear-gradient(180deg, #3a3835 0%, #1d1c1a 55%, #2b2a28 100%);
}

/* ============ EDGE GRID (3-col, 9 profiles) ============ */
.edge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.edge-chip {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 8px 4px 6px;
  text-align: center;
  display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  color: var(--ink-dim);
  transition: all 0.3s;
}
.edge-chip:hover { border-color: var(--line-bright); }
.edge-chip.active {
  border-color: var(--gold);
  background: rgba(200, 146, 42, 0.06);
  color: var(--ink);
}
.edge-chip svg {
  width: 100%; height: 28px;
  color: currentColor;
}
.edge-chip span {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500;
  font-size: 9.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  line-height: 1.2;
}

/* ============ LAYOUT / BREAKS ============ */
.layout-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 12px;
}
.layout-chip {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 9px 3px 6px;
  display: flex; flex-direction: column;
  align-items: center; gap: 5px;
  color: var(--ink-dim);
  transition: all 0.3s;
}
.layout-chip:hover { border-color: var(--line-bright); }
.layout-chip.active {
  border-color: var(--gold);
  background: rgba(200, 146, 42, 0.06);
  color: var(--ink);
}
.layout-chip svg { width: 26px; height: 22px; color: currentColor; }
.layout-chip span {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.1;
  text-align: center;
}

.corner-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.corner-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--ink-dim);
  text-transform: uppercase;
  flex: 0 0 auto;
}
.seg-toggle {
  display: flex; flex: 1;
  border: 1px solid var(--line);
  overflow: hidden;
}
.seg-btn {
  flex: 1;
  cursor: pointer;
  background: var(--bg);
  border: none;
  color: var(--ink-dim);
  padding: 7px 4px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all 0.25s;
}
.seg-btn + .seg-btn { border-left: 1px solid var(--line); }
.seg-btn:hover { color: var(--ink); }
.seg-btn.active { background: rgba(200, 146, 42, 0.10); color: var(--gold); }

/* ============ PRODUCT / METAL SHOP ============ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.product-chip {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 9px 4px;
  color: var(--ink-dim);
  transition: all 0.3s;
}
.product-chip:hover { border-color: var(--line-bright); color: var(--ink); }
.product-chip.active { border-color: var(--gold); background: rgba(200, 146, 42, 0.08); color: var(--gold); }
.product-chip span {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600; font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
}

/* ============ MILLWORK / BASE ============ */
.millwork-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.millwork-chip {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 5px 3px 6px;
  display: flex; flex-direction: column;
  align-items: center; gap: 5px;
  color: var(--ink-dim);
  transition: all 0.3s;
}
.millwork-chip:hover { border-color: var(--line-bright); }
.millwork-chip.active { border-color: var(--gold); background: rgba(200, 146, 42, 0.06); color: var(--ink); }
.millwork-swatch {
  width: 100%; height: 26px;
  border: 1px solid var(--line);
}
.millwork-chip span {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500; font-size: 8.5px;
  letter-spacing: 0.06em; text-transform: uppercase;
  line-height: 1.05; text-align: center;
}

/* ============ FABRICATION NOTES ============ */
.fab-notes { display: flex; flex-direction: column; gap: 5px; margin: 12px 0 6px; }
.fab-note {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px; line-height: 1.35; letter-spacing: 0.01em;
  padding: 6px 9px; border-left: 2px solid var(--line-bright);
  color: var(--ink-dim); background: rgba(245, 243, 238, 0.02);
}
.fab-note.fab-spec { border-left-color: var(--ink-faint); }
.fab-note.fab-info { border-left-color: var(--gold); }
.fab-note.fab-warn { border-left-color: #c97a3a; color: var(--ink-warm); background: rgba(201, 122, 58, 0.07); }

/* ============ SHARE BUTTON ============ */
.btn-share {
  width: 100%;
  margin-top: 8px;
  background: transparent;
  border: 1px solid var(--line-bright);
  color: var(--ink-dim);
  padding: 9px 12px;
  cursor: pointer;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  transition: all 0.25s;
}
.btn-share:hover { border-color: var(--gold); color: var(--gold); }

/* ============ TOOL BUTTON + UNDERBAR PLANNER ============ */
.btn-tool {
  width: 100%;
  background: transparent;
  border: 1px solid var(--line-bright);
  color: var(--ink-dim);
  padding: 11px 12px;
  cursor: pointer;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600; font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase;
  transition: all 0.25s;
}
.btn-tool:hover { border-color: var(--gold); color: var(--gold); }

.ub-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(4, 4, 6, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 32px;
}
.ub-overlay[hidden] { display: none; }
.ub-modal {
  width: min(1180px, 96vw); max-height: 92vh; overflow-y: auto;
  background: var(--panel-bg);
  border: 1px solid var(--line-bright);
  padding: 26px 30px 30px;
}
.ub-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.ub-tag {
  font-family: 'IBM Plex Mono', monospace; font-size: 10px;
  letter-spacing: 0.3em; color: var(--gold); text-transform: uppercase;
}
.ub-title { font-family: 'Bebas Neue', sans-serif; font-size: 34px; letter-spacing: 0.02em; color: var(--ink); margin-top: 4px; }
.ub-close {
  background: transparent; border: 1px solid var(--line-bright); color: var(--ink-dim);
  padding: 7px 14px; cursor: pointer; font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 0.1em; text-transform: uppercase; font-size: 11px;
}
.ub-close:hover { border-color: var(--gold); color: var(--gold); }

.ub-palette { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.ub-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--bg); border: 1px solid var(--line); color: var(--ink);
  padding: 7px 11px; cursor: pointer; transition: all 0.2s;
  font-family: 'Barlow Condensed', sans-serif; font-size: 12px; letter-spacing: 0.04em;
}
.ub-chip:hover { border-color: var(--gold); transform: translateY(-1px); }
.ub-chip i { font-style: normal; color: var(--ink-faint); font-family: 'IBM Plex Mono', monospace; font-size: 10px; }
.ub-sw { display: inline-block; width: 11px; height: 11px; border-radius: 2px; }

.ub-strip-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); background: rgba(0,0,0,0.25); }
.ub-strip { width: 100%; height: 96px; display: block; }

.ub-meta {
  display: flex; gap: 26px; margin: 14px 0 4px;
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: 0.05em; color: var(--ink-dim);
}
.ub-meta b { color: var(--ink); }
.ub-over { color: #e0843a; }

.ub-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-family: 'Barlow Condensed', sans-serif; }
.ub-table th, .ub-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.ub-table th { color: var(--ink-faint); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; }
.ub-table td:first-child { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.ub-table tfoot td { color: var(--gold); font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.1em; border-bottom: none; }
.ub-empty { color: var(--ink-dim); font-family: 'Barlow Condensed', sans-serif; margin-top: 16px; line-height: 1.5; }

.ub-actions { display: flex; gap: 10px; margin-top: 22px; }
.ub-btn {
  background: transparent; border: 1px solid var(--line-bright); color: var(--ink-dim);
  padding: 11px 20px; cursor: pointer; font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 0.12em; text-transform: uppercase; font-size: 12px; transition: all 0.2s;
}
.ub-btn:hover { border-color: var(--ink); color: var(--ink); }
.ub-btn-gold { background: var(--gold); border-color: var(--gold); color: var(--bg); font-weight: 600; }
.ub-btn-gold:hover { background: var(--gold-bright); border-color: var(--gold-bright); color: var(--bg); }

/* ============ DIMENSION SLIDERS ============ */
.dim-row { margin-bottom: 16px; }
.dim-row:last-child { margin-bottom: 0; }
.dim-head {
  display: flex; justify-content: space-between;
  align-items: baseline;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--ink-dim);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.dim-value {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--gold);
}
.dim-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%; height: 2px;
  background: var(--line);
  outline: none; margin: 0;
  cursor: pointer;
}
.dim-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px; height: 14px;
  background: var(--gold);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--bg-card);
  box-shadow: 0 0 0 1px var(--gold), 0 0 14px var(--gold-glow);
  transition: transform 0.2s;
}
.dim-slider::-webkit-slider-thumb:hover { transform: scale(1.18); }
.dim-slider::-moz-range-thumb {
  width: 14px; height: 14px;
  background: var(--gold);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid var(--bg-card);
}
.dim-marks {
  margin-top: 4px;
  display: flex; justify-content: space-between;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  color: var(--ink-faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ============ CTA / SPECS ============ */
.ctrl-cta {
  background: linear-gradient(180deg, transparent 0%, rgba(200,146,42,0.04) 100%);
  position: relative;
}
.ctrl-cta::before {
  content: ''; position: absolute;
  top: 0; left: 0;
  width: 60px; height: 2px;
  background: var(--gold);
}
.spec-row {
  display: flex; justify-content: space-between;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding: 6px 0;
}
.spec-row span:last-child {
  color: var(--ink);
}
.btn-quote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin-top: 18px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 0.22em;
  color: var(--bg);
  background: var(--gold);
  padding: 16px;
  border: 1px solid var(--gold);
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.btn-quote:hover {
  background: var(--gold-bright);
  border-color: var(--gold-bright);
  transform: translateY(-1px);
}
.btn-quote svg { transition: transform 0.3s; }
.btn-quote:hover svg { transform: translateX(4px); }
.ctrl-disc {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1.5;
  margin-top: 12px;
}

/* ============ HINT (drag/zoom) ============ */
.hint {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  background: var(--panel-bg);
  backdrop-filter: var(--panel-blur);
  -webkit-backdrop-filter: var(--panel-blur);
  border: 1px solid var(--line);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  transition: opacity 0.6s ease;
}
.hint.fade { opacity: 0.3; }
.hint strong {
  color: var(--gold);
  font-weight: 500;
}
.hint-reset {
  background: transparent;
  border: 1px solid var(--line-bright);
  color: var(--ink);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 6px 12px;
  transition: border-color 0.3s, background 0.3s;
}
.hint-reset:hover {
  border-color: var(--gold);
  background: rgba(200, 146, 42, 0.1);
  color: var(--gold);
}

/* ============ BOTTOM-LEFT STATUS ============ */
.status {
  position: fixed;
  bottom: 32px; left: 32px;
  z-index: 5;
  display: flex; align-items: center; gap: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.status-dot {
  width: 8px; height: 8px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--gold);
  animation: pulse-dot 1.8s ease-in-out infinite;
}
@keyframes pulse-dot {
  50% { opacity: 0.4; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1280px) {
  .controls { width: 340px; }
  .section-title { max-width: 380px; }
}

@media (max-width: 980px) {
  .topnav { grid-template-columns: 1fr auto; padding: 14px 20px; }
  .topnav-meta { display: none; }
  .topnav-link { display: none; }
  .section-title {
    top: 84px; left: 16px;
    max-width: calc(100% - 32px);
  }
  .section-h1 { font-size: 30px; }
  /* The long marketing copy is the single biggest space thief on a phone —
     it sits on top of the only clean patch of canvas above the control
     sheet. Cut it so the 3D view actually has room to breathe. */
  .section-lede { display: none; }

  /* Control panel becomes a COLLAPSIBLE bottom sheet, collapsed by default
     (just the handle bar) so the 3D view gets the full screen until the
     user actually wants to change something — was previously pinned open
     at 50vh at all times, which is most of "why does a huge menu block
     everything" on a phone. */
  .controls {
    top: auto; right: 0; left: 0;
    bottom: 0; width: 100%;
    max-height: 60px;         /* collapsed: just the handle shows */
    overflow: hidden;
    border-left: none;
    border-top: 1px solid var(--line-bright);
    transition: max-height 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .controls.expanded {
    max-height: 78vh;
    overflow-y: auto;
  }
  .controls::before, .controls::after { display: none; }

  .controls-handle {
    display: flex;
  }

  .hint { bottom: 76px; font-size: 9px; padding: 8px 14px; }
  .status { display: none; }
}
