:root {
  --bg: #343841;
  --panel: rgba(65, 71, 82, 0.9);
  --panel-soft: rgba(255, 255, 255, 0.03);
  --line: rgba(255, 255, 255, 0.815);
  --line-strong: rgba(252, 252, 252, 0.22);
  --text: #edf1f7;
  --muted: #a7b0bd;
  --accent: #c2cad6;
  --accent-2: #9ba6b4;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
  --radius: 18px;
  --panel-blur: blur(18px);
  --studio-bg: #171a20;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #23272f 0%, #171a20 100%);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
}
body[data-ui-theme="blue-studio"] {
  --panel: rgba(9, 18, 33, 0.88);
  --panel-soft: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(148, 197, 255, 0.25);
  --text: #ecf4ff;
  --muted: #95a7c8;
  --accent: #63a7ff;
  --accent-2: #6af1ff;
}
body[data-ui-theme="light-gray"] {
  --panel: rgba(248, 250, 252, 0.94);
  --panel-soft: rgba(15, 23, 42, 0.04);
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(71, 85, 105, 0.22);
  --text: #111827;
  --muted: #667085;
  --accent: #475569;
  --accent-2: #64748b;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}
body[data-ui-theme="light-gray"] {
  background: linear-gradient(180deg, #f7f8fb 0%, #edf0f4 100%);
}
body[data-ui-theme="dark-gray"] {
  --panel: rgba(31, 35, 42, 0.9);
  --panel-soft: rgba(255, 255, 255, 0.03);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(180, 190, 205, 0.22);
  --text: #edf1f7;
  --muted: #a7b0bd;
  --accent: #c2cad6;
  --accent-2: #9ba6b4;
}
body[data-ui-theme="dark-gray"] {
  background: linear-gradient(180deg, #23272f 0%, #171a20 100%);
}
body[data-ui-theme="midnight-gray"] {
  --panel: rgba(18, 22, 29, 0.92);
  --panel-soft: rgba(255, 255, 255, 0.035);
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(166, 178, 196, 0.2);
  --text: #f2f4f8;
  --muted: #98a2b3;
  --accent: #bfc7d4;
  --accent-2: #e2e8f0;
}
body[data-ui-theme="midnight-gray"] {
  background: radial-gradient(circle at top, #2b3340 0%, #151922 46%, #0d1016 100%);
}
button, input, select { font: inherit; }
button {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  color: var(--text);
  padding: 10px 12px;
  cursor: pointer;
  transition: 160ms ease;
}
button:hover { border-color: var(--line-strong); background: rgba(255,255,255,0.1); transform: translateY(-1px); }
button.primary { background: linear-gradient(135deg, rgba(82,139,255,0.95), rgba(87,211,255,0.85)); color: white; border-color: transparent; }
button.primary:hover { filter: brightness(1.06); }
button.ghost { background: rgba(255,255,255,0.03); }
button.small { padding: 8px 10px; font-size: 12px; }
button.full { width: 100%; }
select, input[type="text"], input[type="number"], input[type="file"], input[type="color"] {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.11);
  background: rgba(7, 13, 25, 0.96);
  color: var(--text);
  padding: 10px 12px;
}
select option { background: #08111f; color: var(--text); }
input[type="color"] { padding: 4px; height: 42px; }
summary { cursor: pointer; }
code { font-family: "IBM Plex Mono", monospace; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.wizard-shell {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

.top-navigator {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(180deg, rgba(6, 14, 28, 0.98), rgba(9, 14, 24, 0.92));
  border-bottom: 1px solid rgba(255,255,255,0.06);
  backdrop-filter: blur(18px);
}
.top-brand { min-width: 180px; }
.brand-title { font-weight: 800; letter-spacing: -0.03em; font-size: 20px; }
.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-2);
  margin-bottom: 6px;
}
.step-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.mode-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  padding: 10px 9px;
  min-height: 44px;
}
.mode-tab .step-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 11px;
  line-height: 1;
  color: var(--text);
  flex: 0 0 auto;
}
.mode-tab .step-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mode-tab.active {
  border-color: rgba(111, 189, 255, 0.5);
  background: linear-gradient(135deg, rgba(98, 143, 255, 0.22), rgba(72, 198, 255, 0.14));
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 11px;
  line-height: 1;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(290px, 360px) 1fr minmax(310px, 380px);
  min-height: 0;
  height: calc(100vh - var(--topbar-h, 88px));
  overflow: hidden;
}
.wizard-rail {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(6, 14, 28, 0.94), rgba(8, 13, 24, 0.92));
  border-right: 1px solid rgba(255,255,255,0.06);
  position: relative;
  z-index: 5;
}
.right-rail { border-right: none; border-left: 1px solid rgba(255,255,255,0.06); }
.rail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 8px;
}
.rail-title { font-weight: 700; }
.rail-subtitle { font-size: 12px; color: var(--); }
.wizard-rail.collapsed {
  width: 60px;
  min-width: 60px;
}
.wizard-rail.collapsed .rail-header { padding-inline: 8px; }
.wizard-rail.collapsed .rail-title,
.wizard-rail.collapsed .rail-subtitle,
.wizard-rail.collapsed .wizard-panel { display: none; }
.wizard-rail.collapsed button { writing-mode: vertical-rl; transform: rotate(180deg); min-height: 120px; }

.workspace.left-collapsed { grid-template-columns: 60px 1fr minmax(310px, 380px); }
.workspace.right-collapsed { grid-template-columns: minmax(290px, 360px) 1fr 60px; }
.workspace.left-collapsed.right-collapsed { grid-template-columns: 60px 1fr 60px; }

.wizard-panel {
  display: none;
  overflow-y: auto;
  padding: 0 14px 16px;
}
.wizard-panel.active { display: block; }

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.panel-head h2 { margin: 0; font-size: 18px; }
.chip {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(99, 167, 255, 0.14);
  border: 1px solid rgba(99, 167, 255, 0.22);
  color: #cce5ff;
  font-size: 11px;
  white-space: nowrap;
}
.control-block,
.hud,
.progress-card,
.reference-card,
.method-detail,
.method-card,
#statusBar,
.wizard-hero,
.compare-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: var(--panel-blur);
}
.control-block {
  margin-bottom: 12px;
  overflow: hidden;
}
.control-block summary {
  list-style: none;
  padding: 12px 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.control-block summary::-webkit-details-marker { display: none; }
.control-block summary::after { content: '▾'; color: #b8d7ff; }
.control-block[open] summary::after { content: '▴'; }
.block-body { padding: 0 13px 13px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: grid; gap: 6px; margin-bottom: 10px; }
.field > span { font-size: 12px; color: #c8d7ef; }
.checkbox { display: flex; align-items: center; gap: 8px; color: #d4e2fa; margin-bottom: 10px; }
.checkbox input { width: auto; }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-actions > * { flex: 1 1 120px; }
.inline-actions.triple > * { flex: 1 1 90px; }
.top-gap { margin-top: 10px; }
.split-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.divider { height: 1px; background: rgba(255,255,255,0.1); flex: 1; }
.centered { justify-content: center; }
.hint-block,
.info-block {
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: #d5e7ff;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.55;
}
.info-block.small { font-size: 11px; }
.info-stack { display: grid; gap: 10px; }
.hint-list {
  margin: 8px 0 0 16px;
  padding: 0;
  display: grid;
  gap: 6px;
}
.hint-list li {
  margin: 0;
  color: #d5e7ff;
}

#viewportStage {
  position: relative;
  min-height: 0;
  height: 100%;
  background: radial-gradient(circle at top, rgba(48,88,158,0.22), transparent 30%), var(--studio-bg);
  overflow: hidden;
}
#viewport {
  width: 100%;
  height: 100%;
  display: block;
}
#labelsLayer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.label-item {
  position: absolute;
  transform: translate(-50%, -115%);
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(4, 9, 18, 0.36);
  white-space: nowrap;
  font-size: 12px;
}

.wizard-hero {
  position: absolute;
  left: 18px;
  top: 18px;
  width: min(520px, calc(100% - 36px));
  padding: 16px 18px;
  z-index: 6;
}
.wizard-hero h1 {
  margin: 0;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}
.wizard-hero p {
  margin: 10px 0 0;
  color: #d3def1;
  font-size: 13px;
  line-height: 1.5;
  max-width: 60ch;
}

.hud {
  position: absolute;
  z-index: 4;
  padding: 12px 13px;
  min-width: 220px;
}
.hud-title { font-weight: 700; margin-bottom: 8px; }
.hud-content { color: #d8e4f8; font-size: 12px; line-height: 1.55; }
.hud.top-left { left: 18px; top: 178px; max-width: 300px; }
.hud.top-right { right: 18px; top: 18px; max-width: 300px; }
.hud.bottom-left { left: 18px; bottom: 92px; max-width: 300px; }
.hud.bottom-left.wide { max-width: 360px; }
.hud.bottom-right { right: 18px; bottom: 92px; max-width: 260px; }

.wizard-footer {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(760px, calc(100% - 36px));
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(6, 13, 25, 0.76);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
  z-index: 6;
}
.wizard-flow-caption { color: #d0def7; font-size: 12px; }
.wizard-nav-buttons { display: flex; gap: 8px; }

#statusBar {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  z-index: 5;
  font-size: 12px;
}

.method-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.method-card {
  padding: 10px;
  cursor: pointer;
  background: rgba(255,255,255,0.03);
}
.method-card.active {
  border-color: rgba(109, 180, 255, 0.48);
  background: linear-gradient(135deg, rgba(99, 167, 255, 0.16), rgba(106, 241, 255, 0.08));
}
.method-card-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.method-family, .method-status, .method-badge, .reference-year {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #d7e8ff;
  font-size: 10px;
  line-height: 1;
}
.method-name { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.method-detail { padding: 12px; }
.method-detail-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.method-detail h3 { margin: 0; font-size: 20px; }
.method-detail p { margin: 0 0 10px; color: #d5e7ff; font-size: 13px; line-height: 1.55; }
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.method-grid strong { display: block; margin-bottom: 5px; font-size: 12px; }
.method-grid p { margin: 0; font-size: 12px; }
.method-ref-list { display: grid; gap: 8px; margin-top: 10px; }
.ref-pill {
  padding: 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
}
.ref-pill-title { font-weight: 600; font-size: 12px; }
.ref-pill-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.method-param.hidden { display: none; }

.reference-drawer { display: grid; gap: 10px; }
.reference-card { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 12px; }
.reference-body h3 { margin: 0 0 6px; font-size: 14px; }
.reference-body p { margin: 6px 0; color: #d5e7ff; font-size: 12px; line-height: 1.5; }
.reference-body a { color: #9bd6ff; text-decoration: none; }

.compare-board { display: grid; gap: 10px; margin-top: 8px; }
.compare-card { padding: 12px; }
.compare-card-head { display: flex; justify-content: space-between; align-items: start; gap: 10px; margin-bottom: 10px; }
.compare-card h3 { margin: 0; font-size: 16px; }
.compare-card img { width: 100%; border-radius: 14px; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03); }
.compare-metrics { display: grid; gap: 4px; margin-top: 10px; font-size: 12px; color: #d5e7ff; }

.selection-block { display: grid; gap: 4px; }
.kv-grid { display: grid; gap: 4px; }
.kv-grid > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 11px;
  padding: 5px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
}
.kv-key { color: #b8cbea; }
.kv-value { text-align: right; color: #e7f1ff; }

.tooltip {
  position: fixed;
  z-index: 30;
  pointer-events: none;
  border-radius: 10px;
  background: rgba(7, 12, 22, 0.94);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 8px 10px;
  font-size: 12px;
  color: #eef5ff;
  box-shadow: var(--shadow);
}

#progressOverlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(4, 8, 16, 0.46);
  z-index: 25;
}
.progress-card { width: min(380px, calc(100% - 40px)); padding: 18px; }
#progressTitle { font-weight: 700; margin-bottom: 12px; }
#progressBar { width: 100%; }
#progressValue { margin-top: 8px; color: #d5e7ff; }

@media (max-width: 1500px) {
  .workspace { grid-template-columns: minmax(270px, 320px) 1fr minmax(290px, 340px); }
  .workspace.left-collapsed { grid-template-columns: 60px 1fr minmax(290px, 340px); }
  .workspace.right-collapsed { grid-template-columns: minmax(270px, 320px) 1fr 60px; }
}

@media (max-width: 1200px) {
  .top-navigator {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .top-actions { justify-content: flex-start; }
  .step-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .workspace,
  .workspace.left-collapsed,
  .workspace.right-collapsed,
  .workspace.left-collapsed.right-collapsed {
    grid-template-columns: 1fr;
    position: relative;
  }
  #viewportStage,
  .left-rail,
  .right-rail {
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
  }
  .left-rail,
  .right-rail {
    width: min(320px, 42vw);
    max-height: 100%;
    border-top: none;
  }
  .left-rail { justify-self: start; z-index: 18; }
  .right-rail { justify-self: end; z-index: 18; }
  .wizard-rail.collapsed { width: 60px; min-width: 60px; }
  .wizard-rail.collapsed .rail-title,
  .wizard-rail.collapsed .rail-subtitle,
  .wizard-rail.collapsed .wizard-panel { display: none; }
  .wizard-rail.collapsed button { writing-mode: vertical-rl; transform: rotate(180deg); min-height: 120px; }
  .wizard-footer { bottom: 72px; }
}

@media (max-width: 760px) {
  .step-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: 1fr; }
  .wizard-hero { width: min(360px, calc(100% - 24px)); left: 12px; top: 12px; }
  .wizard-hero h1 { font-size: 18px; }
  .left-rail,
  .right-rail { width: min(270px, 72vw); }
  .wizard-footer {
    left: 12px;
    right: 12px;
    width: auto;
    transform: none;
    flex-direction: column;
    align-items: stretch;
  }
  #statusBar {
    left: 12px;
    right: 12px;
    flex-direction: row;
    align-items: center;
    bottom: 12px;
    font-size: 11px;
  }
  .footer-search-dock {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    transform: none;
  }
  .footer-search-panel {
    padding: 10px;
  }
  .scene-toolbar {
    top: auto;
    right: 12px;
    bottom: 124px;
    transform: none;
    width: min(224px, calc(100vw - 24px));
  }
}

@media (max-width: 760px) {
  .workspace.mobile-compact .wizard-rail {
    position: absolute;
    top: 12px;
    bottom: 12px;
    width: min(320px, 86vw);
    max-width: calc(100% - 24px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    box-shadow: var(--shadow);
    z-index: 22;
    backdrop-filter: blur(18px);
    background: linear-gradient(180deg, rgba(23, 26, 32, 0.96), rgba(31, 35, 42, 0.94));
  }
  .workspace.mobile-compact .left-rail { left: 12px; }
  .workspace.mobile-compact .right-rail { right: 12px; }
  .workspace.mobile-compact .wizard-rail.collapsed {
    width: auto;
    min-width: 0;
    max-width: none;
    height: auto;
    bottom: auto;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    overflow: visible;
  }
  .workspace.mobile-compact .left-rail.collapsed { left: 12px; top: 12px; }
  .workspace.mobile-compact .right-rail.collapsed { right: 12px; top: 12px; }
  .workspace.mobile-compact .wizard-rail.collapsed .rail-header {
    padding: 0;
    border: none;
    background: transparent;
  }
  .workspace.mobile-compact .wizard-rail.collapsed .ghost.small {
    writing-mode: horizontal-tb;
    transform: none;
    min-height: 42px;
    min-width: 58px;
    height: 42px;
    padding: 0 12px;
    border-radius: 14px;
    background: rgba(7, 15, 28, 0.9);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 14px 28px rgba(0,0,0,0.26);
    backdrop-filter: blur(16px);
  }
  .workspace.mobile-compact .wizard-rail.collapsed .wizard-panel,
  .workspace.mobile-compact .wizard-rail.collapsed .rail-title,
  .workspace.mobile-compact .wizard-rail.collapsed .rail-subtitle { display: none; }
  .workspace.mobile-compact .wizard-hero {
    width: min(250px, calc(100% - 120px));
    left: 12px;
    top: 64px;
  }
  .workspace.mobile-compact .left-workflow-toolbox {
    left: calc(100% + 8px);
    width: min(300px, calc(100vw - 96px));
    max-height: calc(100vh - 160px);
  }
  .workspace.mobile-compact .scene-toolbar {
    top: auto;
    bottom: 178px;
    right: 12px;
    transform: none;
    width: min(212px, calc(100vw - 24px));
  }
  .workspace.mobile-compact .scene-tools {
    right: 12px;
    bottom: 166px;
    width: 214px;
    max-height: calc(100% - 176px);
  }
  .workspace.mobile-compact .scene-tools.collapsed { width: 156px; }
  .workspace.mobile-compact #selectionCard {
    right: 12px;
    bottom: 120px;
    width: 176px;
    max-width: calc(100% - 24px);
  }
  .workspace.mobile-compact .stage-nav {
    width: 42px;
    height: 72px;
  }
}

/* Revision: floating scene tools, HUD toggles, side navigation, and stronger compare board */
#viewportStage { position: relative; overflow: hidden; }

.wizard-footer { pointer-events: none; }
.wizard-flow-caption {
  position: absolute;
  left: 50%;
  bottom: 56px;
  transform: translateX(-50%);
  z-index: 16;
  background: rgba(7, 14, 26, 0.78);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 10px 14px;
  backdrop-filter: blur(12px);
  color: var(--muted);
  font-size: 12px;
}

.stage-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 26;
  width: 54px;
  height: 96px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.1);
  background: linear-gradient(180deg, rgba(7, 15, 28, 0.92), rgba(11, 20, 35, 0.88));
  box-shadow: 0 18px 32px rgba(0,0,0,0.26);
  font-size: 28px;
  font-weight: 700;
  backdrop-filter: blur(16px);
}
.stage-nav-left { left: 14px; }
.stage-nav-right { right: 14px; }
.stage-nav:disabled { opacity: 0.35; cursor: default; transform: translateY(-50%); }

.viewport-fab {
  position: absolute;
  right: 18px;
  bottom: 68px;
  z-index: 24;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.viewport-fab-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(7, 15, 28, 0.9);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 32px rgba(0,0,0,0.26);
  backdrop-filter: blur(16px);
  font-size: 18px;
  line-height: 1;
}
.viewport-fab-btn:hover { transform: translateY(-1px); }
.viewport-fab-btn.active {
  border-color: rgba(111, 189, 255, 0.5);
  background: linear-gradient(135deg, rgba(98, 143, 255, 0.22), rgba(72, 198, 255, 0.14));
}

.scene-dock {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.scene-dock-btn {
  min-width: 110px;
  justify-content: flex-start;
  background: rgba(7, 15, 28, 0.84);
  backdrop-filter: blur(14px);
}

.hud {
  position: absolute;
  z-index: 18;
  width: min(360px, calc(100% - 120px));
  max-height: min(42vh, 380px);
  overflow: auto;
  background: rgba(7, 15, 28, 0.86);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.32);
  backdrop-filter: blur(18px);
}
.hud.hidden { display: none !important; }
.hud-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 0;
}
.hud-title { font-weight: 700; }
.hud-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 10px;
  font-size: 18px;
  line-height: 1;
}
.hud-content { padding: 12px 14px 14px; }
#overviewCard { top: 20px; left: 20px; }
#selectionCard { top: 20px; right: 20px; }
#bundleMetricsCard { left: 20px; bottom: 112px; width: min(420px, calc(100% - 120px)); }
#layerCard { right: 20px; bottom: 112px; }
#sceneToolsCard { right: 20px; top: 104px; width: min(380px, calc(100% - 120px)); }

.scene-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.footer-search-dock {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(300px, calc(100% - 180px));
  z-index: 10;
  pointer-events: auto;
}
.footer-search-panel {
  display: grid;
  gap: 4px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
}
.footer-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  gap: 6px;
  align-items: center;
  min-height: 28px;
  padding: 0 0 2px;
  border-radius: 0;
  background: transparent;
  border-bottom: 1px solid rgba(210, 225, 255, 0.28);
}
.footer-search-row input {
  min-width: 0;
  padding: 0;
  height: 22px;
  border: none;
  background: transparent;
  font-size: 11px;
  color: #dbe8ff;
}
.footer-search-row input::placeholder {
  color: rgba(219, 232, 255, 0.5);
}
.footer-search-row input:focus {
  outline: none;
}
.footer-search-icon-btn {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  color: #c8d9f8;
}
.footer-search-icon-btn:hover {
  background: transparent;
  color: #eef4ff;
  transform: none;
}
.footer-search-icon-btn svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.footer-search-status {
  min-height: 12px;
  padding: 0;
  font-size: 10px;
  line-height: 1.2;
}
.footer-search-status[data-state="error"] {
  color: #f0a8a8;
}
.footer-search-status[data-state="success"] {
  color: #b9d8ff;
}
.footer-search-matches {
  display: grid;
  gap: 4px;
  max-height: 172px;
  overflow: auto;
}
.footer-search-match {
  width: 100%;
  padding: 7px 8px;
  border-radius: 10px;
  text-align: left;
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.04);
}
.footer-search-match:hover {
  background: rgba(255,255,255,0.07);
  transform: none;
}
.footer-search-match-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.footer-search-match-title {
  font-size: 11px;
  font-weight: 600;
  color: #eef4ff;
}
.footer-search-match-meta {
  font-size: 9px;
  color: #7f92b1;
}
.footer-search-match-note {
  margin-top: 3px;
  font-size: 10px;
  color: #9cacbf;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.field.compact span,
.checkbox.compact span { font-size: 12px; }
.field-help {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.layer-availability {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.layer-chip {
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}
.layer-chip.active {
  background: linear-gradient(135deg, rgba(82,139,255,0.92), rgba(87,211,255,0.8));
  border-color: transparent;
}
.layer-chip.disabled {
  opacity: 0.45;
}

.compare-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.compare-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}
.compare-card img {
  width: 100%;
  min-height: 180px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
}
.compare-metrics {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
}

@media (max-width: 1100px) {
  .compare-board { grid-template-columns: 1fr; }
  .scene-tools-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .stage-nav { width: 46px; height: 82px; }
  .wizard-flow-caption { display: none; }
  #sceneToolsCard, #selectionCard, #overviewCard, #bundleMetricsCard, #layerCard {
    width: min(320px, calc(100% - 86px));
  }
}

/* v3 UX: right toolbar + tool box */
.scene-toolbar {
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  width: min(188px, calc(100vw - 36px));
  z-index: 24;
}
.scene-control-panel {
  width: 100%;
  background: rgba(7, 15, 28, 0.9);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.24);
  backdrop-filter: blur(18px);
  overflow: hidden;
}
.scene-control-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px 7px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.scene-control-panel.collapsed .scene-control-panel-head {
  border-bottom-color: transparent;
}
.scene-control-panel-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.scene-control-panel-subtitle {
  margin-top: 1px;
  font-size: 9px;
  color: var(--muted);
}
.scene-control-panel-toggle {
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 6px;
  font-size: 11px;
}
.scene-control-panel-body {
  display: grid;
  gap: 5px;
  padding: 7px;
}
.scene-control-label-row {
  display: grid;
  grid-template-columns: minmax(0, 76px) minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}
.scene-control-label-row .field.compact,
.scene-control-label-row .checkbox.compact {
  margin-bottom: 0;
}
.scene-control-label-row .checkbox.compact {
  display: flex;
  align-items: center;
  justify-self: start;
  min-height: 28px;
  line-height: 1;
}
.scene-control-label-row .checkbox.compact input {
  margin-top: 0;
  align-self: center;
}
.scene-control-label-row .checkbox.compact span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  line-height: 1;
}
.scene-control-grid {
  display: grid;
  gap: 5px;
}
.scene-control-grid .field.compact,
.scene-control-grid .checkbox.compact {
  margin-bottom: 0;
}
.scene-control-grid .checkbox.compact {
  display: grid;
  align-items: center;
}
.scene-control-panel .field.compact,
.scene-control-panel .checkbox.compact {
  font-size: 10px;
}
.scene-control-panel .field.compact > span,
.scene-control-panel .checkbox.compact span {
  font-size: 10px;
  line-height: 1.1;
}
.scene-control-panel .field.compact {
  gap: 4px;
}
.scene-control-panel .field.compact select,
.scene-control-panel .field.compact input[type="number"],
.scene-control-panel .field.compact input[type="text"] {
  min-height: 28px;
  padding: 5px 7px;
  border-radius: 8px;
  font-size: 10px;
}
.scene-control-panel .checkbox.compact input {
  transform: scale(0.92);
  transform-origin: center;
}
.scene-control-panel .field.compact:has(#quickBackgroundColor) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}
.scene-control-panel .field.compact:has(#quickBackgroundColor) > span {
  margin: 0;
}
.scene-control-panel .field.compact #quickBackgroundColor {
  width: 22px;
  min-width: 22px;
  height: 18px;
  padding: 0;
  border-radius: 999px;
  justify-self: end;
}
.scene-control-panel .field.compact:has(#quickEdgeOpacity),
.scene-control-panel .field.compact:has(#labelCount),
.scene-control-panel .field.compact:has(#labelScale) {
  grid-template-columns: minmax(0, 1fr) 52px;
  align-items: center;
  gap: 6px;
}
.scene-control-panel .field.compact:has(#quickEdgeOpacity) > span,
.scene-control-panel .field.compact:has(#labelCount) > span,
.scene-control-panel .field.compact:has(#labelScale) > span {
  margin: 0;
}
.scene-control-panel .field.compact:has(#quickEdgeOpacity) input,
.scene-control-panel .field.compact:has(#labelCount) input,
.scene-control-panel .field.compact:has(#labelScale) input {
  text-align: center;
  padding-inline: 4px;
}
.left-workflow-panel #labelCount {
  display: none;
}
.scene-tool-panel-copy {
  font-size: 9px;
  line-height: 1.35;
  color: #abc0e2;
}

.left-workflow-toolbar {
  overflow: visible;
  align-items: center;
  justify-content: center;
}
.left-workflow-toolbar .rail-footer {
  display: none;
}
.left-workflow-toolbar-rail {
  display: grid;
  gap: 6px;
  padding: 10px 6px;
  justify-items: center;
}
.left-workflow-toolbar-btn {
  width: 50px;
  min-height: 50px;
  padding: 6px 4px;
  border-radius: 12px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  background: rgba(255,255,255,0.03);
}
.left-workflow-toolbar-btn:hover {
  transform: none;
  background: rgba(255,255,255,0.08);
}
.left-workflow-toolbar-btn.active {
  background: linear-gradient(180deg, rgba(61, 104, 186, 0.92), rgba(33, 59, 112, 0.94));
  border-color: rgba(145, 191, 255, 0.34);
}
.left-workflow-toolbar-glyph {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
}
.left-workflow-toolbar-glyph svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.left-workflow-toolbar-label {
  font-size: 8.5px;
  color: #d7e5fd;
  line-height: 1;
}
.left-workflow-toolbox {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  width: min(340px, calc(100vw - 180px));
  max-height: calc(100vh - 150px);
  overflow: hidden;
  background: rgba(7, 15, 28, 0.9);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.32);
  backdrop-filter: blur(18px);
}
.left-workflow-toolbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.left-workflow-toolbox-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.left-workflow-toolbox-close {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 10px;
  font-size: 11px;
}
.left-workflow-toolbox-body {
  overflow: auto;
  max-height: calc(100vh - 220px);
}
.left-workflow-panel {
  padding: 0 14px 16px;
}
.left-workflow-panel .panel-head {
  display: none;
}
.left-workflow-toolbar.wizard-rail.collapsed button {
  writing-mode: horizontal-tb;
  transform: none;
  min-height: unset;
}
.left-workflow-toolbar.wizard-rail.collapsed .wizard-panel {
  display: none;
}
.left-workflow-toolbar .left-workflow-toolbox .wizard-panel.active {
  display: block;
}

/* v3 UX: always-on scene tools + bottom details drawer */
.scene-tools {
  position: absolute;
  bottom: 164px;
  right: 18px;
  z-index: 24;
  width: 278px;
  max-width: calc(100% - 36px);
  max-height: calc(100% - 160px);
  background: rgba(7, 15, 28, 0.86);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.32);
  backdrop-filter: blur(18px);
  overflow: auto;
}
.scene-tools.collapsed { width: 168px; }
.scene-tools-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px 10px;
}
.scene-tools-title { font-weight: 800; font-size: 13px; }
.scene-tools-subtitle { font-size: 11px; color: var(--muted); margin-top: 2px; }
.scene-tools-collapse {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  padding: 0;
}
.scene-tools-body { padding: 0 10px 10px; }
.scene-tools.collapsed .scene-tools-subtitle { display: none; }
.scene-tools.collapsed .scene-tools-body { display: none; }

.details-toggle {
  position: absolute;
  right: 252px;
  bottom: 66px;
  z-index: 24;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(7, 15, 28, 0.9);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 32px rgba(0,0,0,0.26);
}
.details-toggle-icon { font-weight: 900; }
.details-toggle-label { white-space: nowrap; font-size: 12px; }

.details-drawer {
  position: absolute;
  right: 252px;
  bottom: 114px;
  z-index: 22;
  width: min(430px, calc(100% - 290px));
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(7, 15, 28, 0.94);
  box-shadow: 0 18px 40px rgba(0,0,0,0.38);
  backdrop-filter: blur(18px);
  overflow: hidden;
  opacity: 1;
  max-height: 50vh;
  transition: opacity 180ms ease, transform 180ms ease, max-height 180ms ease;
}
.details-drawer.collapsed {
  opacity: 0;
  pointer-events: none;
  max-height: 0;
  transform: translateY(14px);
}
.details-drawer-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.details-drawer-title { font-weight: 800; font-size: 14px; }
.details-drawer-hint { color: var(--muted); font-size: 11px; }
.details-drawer-body {
  padding: 10px 12px 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  overflow: auto;
  max-height: calc(50vh - 50px);
}

/* Normalize HUD cards: relative by default (embedded), floating only when explicitly positioned */
.hud {
  position: relative;
  width: 100%;
  max-height: none;
  overflow: visible;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  box-shadow: none;
  backdrop-filter: none;
}
.hud-head { padding: 12px 14px 0; }
.hud-content { padding: 10px 14px 14px; }
#selectionCard {
  position: absolute;
  right: 18px;
  bottom: 144px;
  width: 214px;
  max-width: calc(100% - 120px);
  max-height: min(18vh, 136px);
  overflow: auto;
  z-index: 24;
  background: rgba(7, 15, 28, 0.9);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 18px 40px rgba(0,0,0,0.32);
  backdrop-filter: blur(18px);
}
#selectionCard .hud-head { padding: 8px 10px 0; }
#selectionCard .hud-content { padding: 8px 10px 10px; font-size: 11px; line-height: 1.45; }
#selectionCard .hud-title { font-size: 12px; }

@media (max-width: 1120px) {
  .details-toggle { right: 18px; bottom: 210px; }
  .details-drawer { right: 18px; width: min(420px, calc(100% - 36px)); }
  .scene-tools { width: 280px; }
}
@media (max-width: 760px) {
  .scene-tools { right: 12px; bottom: 160px; width: 246px; max-height: calc(100% - 172px); }
  #selectionCard {
    right: 12px;
    bottom: 136px;
    width: 200px;
    max-width: calc(100% - 24px);
  }
  .details-toggle { right: 12px; bottom: 196px; }
  .details-drawer {
    right: 12px;
    width: min(380px, calc(100% - 24px));
    bottom: 244px;
  }
}


/* Final UI tightening for publish build */
.wizard-panel[data-mode-panel="bundle"],
.wizard-panel[data-mode-panel="export"] {
  padding: 0 10px 12px;
}
.wizard-panel[data-mode-panel="bundle"] .panel-head,
.wizard-panel[data-mode-panel="export"] .panel-head {
  margin-bottom: 8px;
}
.wizard-panel[data-mode-panel="bundle"] .control-block,
.wizard-panel[data-mode-panel="export"] .control-block {
  margin-bottom: 8px;
}
.wizard-panel[data-mode-panel="bundle"] .control-block summary,
.wizard-panel[data-mode-panel="export"] .control-block summary {
  padding: 9px 11px;
  font-size: 13px;
}
.wizard-panel[data-mode-panel="bundle"] .block-body,
.wizard-panel[data-mode-panel="export"] .block-body {
  padding: 0 11px 11px;
}
.wizard-panel[data-mode-panel="bundle"] .field,
.wizard-panel[data-mode-panel="export"] .field,
.wizard-panel[data-mode-panel="bundle"] .checkbox,
.wizard-panel[data-mode-panel="export"] .checkbox {
  margin-bottom: 8px;
}
.wizard-panel[data-mode-panel="bundle"] .inline-actions > *,
.wizard-panel[data-mode-panel="export"] .inline-actions > * {
  min-height: 38px;
}
.wizard-panel[data-mode-panel="bundle"] .grid2,
.wizard-panel[data-mode-panel="export"] .grid2 {
  gap: 8px;
}
.method-cards {
  gap: 6px;
  margin-bottom: 8px;
}
.method-card {
  padding: 8px;
  border-radius: 14px;
}
.method-name { font-size: 12px; margin-bottom: 4px; }
.method-family, .method-status, .method-badge, .reference-year {
  padding: 3px 6px;
  font-size: 9px;
}
.selection-block { gap: 3px; }
.kv-grid { gap: 3px; }
.kv-grid > div {
  gap: 6px;
  font-size: 10px;
  padding: 4px 6px;
  border-radius: 8px;
}
.scene-tools-grid { gap: 8px; }
.scene-tools .field.compact,
.scene-tools .checkbox.compact { margin-bottom: 6px; }
.scene-tools .field.compact span,
.scene-tools .checkbox.compact span { font-size: 11px; }
.layer-chip {
  padding: 6px 8px;
  font-size: 11px;
}

/* Network details modal (opened from Step 7 Export) */
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal.hidden { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
}
.modal-card {
  position: relative;
  width: min(820px, calc(100% - 36px));
  max-height: min(78vh, 820px);
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(7, 15, 28, 0.96);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.modal-title { font-weight: 800; }
.modal-body {
  padding: 12px 14px 16px;
  overflow: auto;
  max-height: calc(min(78vh, 820px) - 52px);
}
.modal-section { margin-bottom: 12px; }
.modal-section-title { font-weight: 700; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.modal-content {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 10px 12px;
}

.startup-modal-card {
  width: min(760px, calc(100% - 36px));
  max-height: min(82vh, 860px);
}
.startup-modal-body {
  display: grid;
  gap: 14px;
}
.startup-intro {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 62ch;
}
.startup-modal-content {
  display: grid;
  gap: 10px;
}
.startup-load-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
}
.startup-load-grid button {
  min-width: 140px;
}
.startup-csv-guide {
  line-height: 1.5;
}
.startup-samples {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.startup-sample-card {
  display: grid;
  gap: 8px;
  text-align: left;
  min-height: 132px;
  padding: 14px;
  border-radius: 14px;
}
.startup-sample-card strong {
  font-size: 13px;
}
.startup-sample-card span {
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
}


/* ─── Brand row (title + tour trigger) ──────────────────────────────────── */
.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.theme-toggle-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.theme-toggle-icon {
  position: absolute;
  font-size: 14px;
  line-height: 1;
  transition: opacity 160ms ease, transform 160ms ease;
}
.theme-toggle-btn[data-theme="dark-gray"] .theme-toggle-sun {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.theme-toggle-btn[data-theme="dark-gray"] .theme-toggle-moon {
  opacity: 0;
  transform: translateY(6px) scale(0.8);
}
.theme-toggle-btn[data-theme="light-gray"] .theme-toggle-sun {
  opacity: 0;
  transform: translateY(-6px) scale(0.8);
}
.theme-toggle-btn[data-theme="light-gray"] .theme-toggle-moon {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.tour-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: 160ms ease;
  white-space: nowrap;
}
.tour-trigger:hover {
  background: rgba(99, 167, 255, 0.14);
  border-color: rgba(99, 167, 255, 0.35);
  color: #a8ccff;
  transform: none;
}

/* ─── Guided tour card ───────────────────────────────────────────────────── */
.tour-card {
  position: fixed;
  z-index: 2000;
  width: 340px;
  max-width: calc(100vw - 20px);
  background: rgba(6, 13, 26, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255,255,255,0.04);
  backdrop-filter: blur(24px);
  overflow: hidden;
  transition: top 200ms ease, left 200ms ease;
}
.tour-progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.07);
}
.tour-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4b9eff, #67e8f9);
  transition: width 220ms ease;
  border-radius: 0 2px 2px 0;
}
.tour-inner {
  padding: 16px 18px 14px;
}
.tour-count {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #5b8fcc;
  margin-bottom: 7px;
}
.tour-title {
  font-weight: 800;
  font-size: 16px;
  line-height: 1.15;
  margin-bottom: 10px;
  color: #edf4ff;
}
.tour-body {
  font-size: 13px;
  color: #b8ccec;
  line-height: 1.65;
  margin-bottom: 16px;
}
.tour-nav {
  display: flex;
  align-items: center;
  gap: 7px;
}

/* Tour target highlight — pulsing ring */
@keyframes tourPulse {
  0%   { box-shadow: 0 0 0 0   rgba(99,167,255,0.55), inset 0 0 0 2px rgba(99,167,255,0.4); }
  60%  { box-shadow: 0 0 0 8px rgba(99,167,255,0),    inset 0 0 0 2px rgba(99,167,255,0.6); }
  100% { box-shadow: 0 0 0 0   rgba(99,167,255,0),    inset 0 0 0 2px rgba(99,167,255,0.4); }
}
.tour-target-highlight {
  animation: tourPulse 1.5s ease-out infinite;
  outline: 2px solid rgba(99, 167, 255, 0.7);
  outline-offset: 3px;
  border-radius: 14px;
  position: relative;
  z-index: 50;
}

/* ─── Per-step color system ──────────────────────────────────────────────── */

/* Active tab: each step gets its own accent */
button[data-mode="load2d"].active    { border-color: rgba(75,158,255,.55);  background: linear-gradient(135deg,rgba(75,158,255,.2),rgba(75,158,255,.07)); }
button[data-mode="map3d"].active     { border-color: rgba(167,139,250,.55); background: linear-gradient(135deg,rgba(167,139,250,.2),rgba(167,139,250,.07)); }
button[data-mode="bundle"].active    { border-color: rgba(251,146,60,.55);  background: linear-gradient(135deg,rgba(251,146,60,.2),rgba(251,146,60,.07)); }
button[data-mode="compare"].active   { border-color: rgba(52,211,153,.55);  background: linear-gradient(135deg,rgba(52,211,153,.2),rgba(52,211,153,.07)); }
button[data-mode="fabricate"].active { border-color: rgba(248,113,113,.55); background: linear-gradient(135deg,rgba(248,113,113,.2),rgba(248,113,113,.07)); }
button[data-mode="style"].active     { border-color: rgba(244,114,182,.55); background: linear-gradient(135deg,rgba(244,114,182,.2),rgba(244,114,182,.07)); }
button[data-mode="export"].active    { border-color: rgba(34,211,238,.55);  background: linear-gradient(135deg,rgba(34,211,238,.2),rgba(34,211,238,.07)); }

/* Step number badges: per-step tint */
button[data-mode="load2d"]    .step-num { background: rgba(75,158,255,.18);  border-color: rgba(75,158,255,.4);  color: #7db8ff; }
button[data-mode="map3d"]     .step-num { background: rgba(167,139,250,.18); border-color: rgba(167,139,250,.4); color: #c4b5fd; }
button[data-mode="bundle"]    .step-num { background: rgba(251,146,60,.18);  border-color: rgba(251,146,60,.4);  color: #fdba74; }
button[data-mode="compare"]   .step-num { background: rgba(52,211,153,.18);  border-color: rgba(52,211,153,.4);  color: #6ee7b7; }
button[data-mode="fabricate"] .step-num { background: rgba(248,113,113,.18); border-color: rgba(248,113,113,.4); color: #fca5a5; }
button[data-mode="style"]     .step-num { background: rgba(244,114,182,.18); border-color: rgba(244,114,182,.4); color: #f9a8d4; }
button[data-mode="export"]    .step-num { background: rgba(34,211,238,.18);  border-color: rgba(34,211,238,.4);  color: #67e8f9; }

/* Control block left accent border: per step */
[data-mode-panel="load2d"]    .control-block { border-left: 3px solid rgba(75,158,255,.5); }
[data-mode-panel="map3d"]     .control-block { border-left: 3px solid rgba(167,139,250,.5); }
[data-mode-panel="bundle"]    .control-block { border-left: 3px solid rgba(251,146,60,.5); }
[data-mode-panel="compare"]   .control-block { border-left: 3px solid rgba(52,211,153,.5); }
[data-mode-panel="fabricate"] .control-block { border-left: 3px solid rgba(248,113,113,.5); }
[data-mode-panel="style"]     .control-block { border-left: 3px solid rgba(244,114,182,.5); }
[data-mode-panel="export"]    .control-block { border-left: 3px solid rgba(34,211,238,.5); }

/* Summary expand/collapse arrow: per-step color */
[data-mode-panel="load2d"]    .control-block summary::after { color: #7db8ff; }
[data-mode-panel="map3d"]     .control-block summary::after { color: #c4b5fd; }
[data-mode-panel="bundle"]    .control-block summary::after { color: #fdba74; }
[data-mode-panel="compare"]   .control-block summary::after { color: #6ee7b7; }
[data-mode-panel="fabricate"] .control-block summary::after { color: #fca5a5; }
[data-mode-panel="style"]     .control-block summary::after { color: #f9a8d4; }
[data-mode-panel="export"]    .control-block summary::after { color: #67e8f9; }

/* Chip badges: per-step color */
[data-mode-panel="load2d"]    .chip { background: rgba(75,158,255,.14);  border-color: rgba(75,158,255,.3);  color: #bdd9ff; }
[data-mode-panel="map3d"]     .chip { background: rgba(167,139,250,.14); border-color: rgba(167,139,250,.3); color: #ddd6fe; }
[data-mode-panel="bundle"]    .chip { background: rgba(251,146,60,.14);  border-color: rgba(251,146,60,.3);  color: #fed7aa; }
[data-mode-panel="compare"]   .chip { background: rgba(52,211,153,.14);  border-color: rgba(52,211,153,.3);  color: #a7f3d0; }
[data-mode-panel="fabricate"] .chip { background: rgba(248,113,113,.14); border-color: rgba(248,113,113,.3); color: #fecaca; }
[data-mode-panel="style"]     .chip { background: rgba(244,114,182,.14); border-color: rgba(244,114,182,.3); color: #fbcfe8; }
[data-mode-panel="export"]    .chip { background: rgba(34,211,238,.14);  border-color: rgba(34,211,238,.3);  color: #a5f3fc; }

/* ════════════════════════════════════════════════════════════════════════════
   MINIMAL PROFESSIONAL REDESIGN
   Solid surfaces · No glassmorphism · Clean grid · Purposeful color
   All backdrop-filter removed. Heavy shadows replaced with crisp borders.
   Step colors used only where they add navigational meaning.
════════════════════════════════════════════════════════════════════════════ */

/* 0 — Kill all blur / glassmorphism globally */
*, *::before, *::after {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* 1 — Design tokens */
:root {
  --bg:          #171717;
  --panel:       #1e1e1e;
  --panel-soft:  #242424;
  --line:        #2c2c2c;
  --line-strong: #3c3c3c;
  --text:        #f0f0f0;
  --muted:       #7a7a7a;
  --accent:      #9a9a9a;
  --accent-2:    #505050;
  --shadow:      0 2px 8px rgba(0,0,0,0.5);
  --radius:      8px;
  --studio-bg:   #252525;
}
body,
body[data-ui-theme="dark-gray"]  { background: #171717; }
body[data-ui-theme="midnight-gray"] { background: #111111; }
body[data-ui-theme="light-gray"] { background: #f5f5f5; }
body[data-ui-theme="blue-studio"] { background: #0d1420; }

/* 2 — Top navigator: clean solid bar */
.top-navigator {
  background: #111111;
  border-bottom: 1px solid #272727;
  padding: 0 18px;
  gap: 24px;
  min-height: 58px;
}
.top-brand { min-width: 170px; padding: 12px 0; }
.brand-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #e8e8e8;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 0.22em;
  color: #fdfdfd;
  margin-bottom: 4px;
  text-transform: uppercase;
}

/* 3 — Step tabs: minimal underline-style */
.step-tabs {
  gap: 2px;
  align-items: stretch;
}
.top-nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}
.top-nav-actions .step-tabs {
  flex: 1 1 auto;
  min-width: 0;
}
.top-nav-actions .theme-toggle-btn {
  flex: 0 0 auto;
}
.mode-tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #484848;
  padding: 8px 8px;
  min-height: 40px;
  gap: 5px;
  letter-spacing: 0.01em;
  position: relative;
}
.mode-tab::after {
  content: '';
  position: absolute;
  bottom: 0; left: 8px; right: 8px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: transparent;
  transition: background 160ms ease;
}
.mode-tab:hover {
  background: #1c1c1c;
  border-color: #272727;
  color: #7a7a7a;
  transform: none;
}
.mode-tab.active {
  background: #1c1c1c;
  border-color: #2e2e2e;
  color: #e8e8e8;
}
.step-num {
  width: 18px; height: 18px;
  border-radius: 4px;
  background: #1e1e1e;
  border: 1px solid #333333;
  font-size: 10px;
  font-weight: 700;
}
.mode-tab .step-icon {
  background: transparent;
  border: none;
  font-size: 13px;
  color: inherit;
  opacity: 0.7;
}

/* 4 — Rails: flat sidebar */
.wizard-rail {
  background: #161616;
  border-right: 1px solid #242424;
}
.right-rail { border-right: none; border-left: 1px solid #242424; }
.rail-header {
  padding: 12px 14px 10px;
  border-bottom: 1px solid #222222;
  background: #141414;
  flex-shrink: 0;
}
.rail-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #444444;
}
.rail-subtitle { font-size: 10px; color: #c5c5c5; margin-top: 2px; }
.wizard-rail.collapsed button { background: #1e1e1e; border-color: #2a2a2a; }

/* Rail footer: persistent help anchor */
.rail-footer {
  border-top: 1px solid #222222;
  padding: 10px 14px;
  background: #141414;
  flex-shrink: 0;
}
.tour-help-btn {
  width: 100%;
  background: transparent !important;
  border: 1px solid #272727 !important;
  border-radius: 6px !important;
  color: #444444 !important;
  font-size: 11px !important;
  font-weight: 600;
  padding: 7px 10px !important;
  letter-spacing: 0.03em;
  text-align: left;
}
.tour-help-btn:hover {
  background: #1e1e1e !important;
  border-color: #333333 !important;
  color: #888888 !important;
  transform: none !important;
}

/* 5 — Wizard panels */
.wizard-panel { padding: 0 10px 16px; }
.panel-head {
  margin: 12px 0 8px;
  padding: 0 2px;
}
.panel-head h2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #c8c8c8;
  margin: 0;
}
.chip {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 4px;
  background: #222222;
  border: 1px solid #2e2e2e;
  color: #484848;
}

/* 6 — Control blocks: flat solid cards */
.control-block,
.hud,
.progress-card,
.reference-card,
.method-card,
#statusBar,
.wizard-hero,
.compare-card {
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  box-shadow: none;
}
.control-block { margin-bottom: 5px; overflow: hidden; }
.control-block summary {
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #606060;
  display: flex;
  align-items: center;
  gap: 7px;
}
.control-block summary::before {
  content: attr(data-icon);
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.7;
  line-height: 1;
  flex-shrink: 0;
}
.control-block summary:hover { background: rgba(255,255,255,0.02); }
.control-block summary::after { color: #333333; font-size: 10px; }
.control-block[open] > summary {
  color: #909090;
  border-bottom: 1px solid #252525;
}
.control-block[open] > summary::after { color: #444444; }
.block-body { padding: 10px 12px 12px; }

/* 7 — Buttons */
button {
  border: 1px solid #2d2d2d;
  border-radius: 6px;
  background: #222222;
  color: #c8c8c8;
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 500;
  transition: 120ms ease;
}
button:hover {
  border-color: #3a3a3a;
  background: #292929;
  transform: none;
}
button.primary {
  background: #1a3f88;
  border-color: #2050a8;
  color: #c8dcff;
  font-weight: 600;
}
button.primary:hover {
  background: #1e4999;
  border-color: #2860c0;
  filter: none;
}
button.ghost {
  background: transparent;
  border-color: #242424;
  color: #585858;
}
button.ghost:hover {
  background: #1c1c1c;
  border-color: #333333;
  color: #888888;
}
button.small { padding: 6px 9px; font-size: 11px; border-radius: 5px; }

/* 8 — Inputs & selects */
select,
input[type="text"],
input[type="number"],
input[type="file"],
input[type="color"] {
  background: #161616;
  border: 1px solid #2d2d2d;
  border-radius: 5px;
  color: #d8d8d8;
  padding: 7px 10px;
  font-size: 12px;
}
select option { background: #1a1a1a; }
input[type="color"] { padding: 3px; height: 34px; }
.field { margin-bottom: 8px; gap: 4px; }
.field > span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #484848;
}
.checkbox { color: #808080; margin-bottom: 8px; font-size: 12px; }

/* 9 — Info / hint blocks */
.info-block, .hint-block {
  background: #1a1a1a;
  border: 1px solid #252525;
  border-radius: 6px;
  color: #606060;
  font-size: 12px;
  line-height: 1.6;
}
.info-block strong, .hint-block strong { color: #a0a0a0; display: block; margin-bottom: 4px; }
.hint-list li { color: #585858; }
.info-stack { gap: 6px; }

/* 10 — Scene viewport */
#viewportStage { background: var(--studio-bg); }

/* 11 — Scene tools panel */
.scene-tools {
  background: #181818;
  border: 1px solid #272727;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}
.scene-tools-head {
  border-bottom: 1px solid #222222;
  padding: 10px 12px 8px;
}
.scene-tools-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #484848;
}
.scene-tools-subtitle { font-size: 10px; color: #303030; margin-top: 2px; }
.scene-tools-collapse {
  width: 28px; height: 28px;
  border-radius: 5px;
  font-size: 12px;
  background: #222222;
  border-color: #2d2d2d;
}
.scene-tools-collapse:hover { background: #2a2a2a; }

/* 12 — HUD / selection card */
.hud {
  background: #1a1a1a;
  border: 1px solid #262626;
  border-radius: 8px;
  box-shadow: none;
}
#selectionCard {
  background: #181818;
  border: 1px solid #272727;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.hud-title { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #505050; }
.hud-content { color: #606060; font-size: 11px; }

/* 13 — Stage navigation arrows */
.stage-nav {
  background: #181818;
  border: 1px solid #272727;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  font-size: 20px;
  color: #484848;
}
.stage-nav:hover { background: #202020; color: #888888; }

/* 14 — Floating viewport FAB */
.viewport-fab-btn {
  background: #181818;
  border: 1px solid #272727;
  border-radius: 7px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  font-size: 15px;
  color: #505050;
  width: 38px; height: 38px;
}
.viewport-fab-btn:hover { background: #222222; color: #888888; transform: none; }
.viewport-fab-btn.active { background: #0f2450; border-color: #1a3d80; color: #7aabff; }

/* 15 — Status bar */
#statusBar {
  background: #141414;
  border: 1px solid #222222;
  border-radius: 6px;
  color: #404040;
  font-size: 11px;
}

/* 16 — Progress overlay */
.progress-card {
  background: #1e1e1e;
  border: 1px solid #2d2d2d;
  border-radius: 10px;
  box-shadow: 0 12px 50px rgba(0,0,0,0.6);
}
#progressTitle { color: #d0d0d0; font-size: 14px; font-weight: 700; }
#progressValue { color: #606060; }

/* 17 — Method cards (bundle step) */
.method-card {
  background: #1c1c1c;
  border: 1px solid #272727;
  border-radius: 6px;
  box-shadow: none;
}
.method-card:hover { border-color: #363636; background: #202020; }
.method-card.active { background: #0d1d38; border-color: #1a3d80; }
.method-family, .method-status, .method-badge, .reference-year {
  background: #232323;
  border: 1px solid #2d2d2d;
  color: #585858;
  font-size: 9px;
}
.method-name { color: #c8c8c8; font-size: 12px; }
.method-detail {
  background: #1c1c1c;
  border: 1px solid #272727;
  border-radius: 6px;
  box-shadow: none;
}
.method-detail p { color: #686868; }
.method-detail h3 { color: #d0d0d0; font-size: 17px; }
.ref-pill { background: #181818; border: 1px solid #252525; border-radius: 8px; }
.ref-pill-title { color: #b0b0b0; }
.ref-pill-meta { color: #484848; }

/* 18 — Reference cards (export panel right rail) */
.reference-card { background: #1c1c1c; border: 1px solid #272727; border-radius: 6px; box-shadow: none; }
.reference-body h3 { color: #c8c8c8; font-size: 13px; }
.reference-body p { color: #606060; }
.reference-body a { color: #4b9eff; text-decoration: none; }
.reference-year { color: #444444; }

/* 19 — Compare cards (right rail) */
.compare-card { background: #1c1c1c; border: 1px solid #272727; border-radius: 8px; box-shadow: none; }
.compare-card h3 { color: #d0d0d0; }
.compare-metrics { color: #545454; }

/* 20 — Wizard hero (viewport overlay) */
.wizard-hero {
  background: rgba(20, 20, 20, 0.96);
  border: 1px solid #272727;
  border-radius: 10px;
  box-shadow: none;
}
.wizard-hero h1 { color: #e8e8e8; }
.wizard-hero p { color: #5a5a5a; }
.wizard-hero .eyebrow { color: #383838; }

/* 21 — Footer flow caption */
.wizard-flow-caption {
  background: rgba(18, 18, 18, 0.96);
  border: 1px solid #242424;
  color: #343434;
}

/* 22 — Details drawer */
.details-drawer {
  background: #181818;
  border: 1px solid #272727;
  border-radius: 10px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.details-drawer-head { border-bottom: 1px solid #222222; }
.details-drawer-title { color: #c8c8c8; }
.details-drawer-hint { color: #404040; }
.details-toggle {
  background: rgba(18, 18, 18, 0.96);
  border: 1px solid #242424;
  color: #484848;
}

/* 23 — KV inspection grid */
.kv-grid > div { background: #1c1c1c; }
.kv-key { color: #4a4a4a; }
.kv-value { color: #c0c0c0; }

/* 24 — Demo graph box */
.demo-graph-box { background: #1a1a1a; border: 1px solid #272727; border-radius: 6px; }
.demo-graph-head { color: #686868; font-size: 11px; }

/* 25 — Layer chips */
.layer-chip { background: #1e1e1e; border: 1px solid #2a2a2a; color: #545454; font-size: 11px; }
.layer-chip.active { background: #0f2450; border-color: #1a3d80; color: #7aabff; }
.layer-chip.disabled { opacity: 0.28; }

/* 26 — Modal */
.modal-backdrop { background: rgba(0,0,0,0.78); }
.modal-card { background: #181818; border: 1px solid #2c2c2c; border-radius: 12px; box-shadow: 0 24px 80px rgba(0,0,0,0.7); }
.modal-head { border-bottom: 1px solid #222222; }
.modal-title { color: #e0e0e0; font-size: 14px; }
.modal-content { background: #1c1c1c; border: 1px solid #262626; border-radius: 8px; }
.modal-section-title { color: #484848; text-transform: uppercase; letter-spacing: 0.08em; font-size: 10px; }
.startup-sample-card {
  background: #1d1d1d;
  border-color: #2d2d2d;
}
.startup-sample-card:hover {
  background: #232323;
  border-color: #3a3a3a;
  transform: none;
}
.startup-sample-card span {
  color: #767676;
}

/* 27 — Tooltip */
.tooltip { background: #232323; border: 1px solid #333333; color: #c8c8c8; border-radius: 7px; }

/* 28 — Dividers */
.divider { background: #252525; }
.split-row .muted { color: #3a3a3a; font-size: 11px; }

/* 29 — Tour card (refresh) */
.tour-card { background: #141414; border: 1px solid #2d2d2d; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.7); }
.tour-count { color: #2e5faa; }
.tour-title { color: #eeeeee; }
.tour-body { color: #7a7a7a; }

/* 30 — Tour trigger (refresh) */
.tour-trigger { background: transparent; border-color: #242424; color: #a7f3b5; }
.tour-trigger:hover { background: #1c1c1c; border-color: #333333; color: #c4f9cd; transform: none; }

/* 31 — Pulse animation for tour-triggered button */
@keyframes tourBtnPulse {
  0%   { box-shadow: 0 0 0 0   rgba(75,158,255,0.5); }
  60%  { box-shadow: 0 0 0 6px rgba(75,158,255,0); }
  100% { box-shadow: 0 0 0 0   rgba(75,158,255,0); }
}
.tour-hint-pulse { animation: tourBtnPulse 1.2s ease 3; }

/* 32 — Skeleton stats */
#skeletonStats { background: #1a1a1a; border: 1px solid #252525; color: #585858; border-radius: 6px; }

/* 33 — Comparison board in right rail (re-reset) */
.compare-board { margin-top: 6px; gap: 8px; }

/* 34 — Step-color left border on control blocks (per-step system) */
/* Override the earlier step-color system so it integrates with new design */
[data-mode-panel="load2d"]    .control-block { border-left: 2px solid rgba(75,158,255,.3); }
[data-mode-panel="map3d"]     .control-block { border-left: 2px solid rgba(167,139,250,.3); }
[data-mode-panel="bundle"]    .control-block { border-left: 2px solid rgba(251,146,60,.3); }
[data-mode-panel="compare"]   .control-block { border-left: 2px solid rgba(52,211,153,.3); }
[data-mode-panel="fabricate"] .control-block { border-left: 2px solid rgba(248,113,113,.3); }
[data-mode-panel="style"]     .control-block { border-left: 2px solid rgba(244,114,182,.3); }
[data-mode-panel="export"]    .control-block { border-left: 2px solid rgba(34,211,238,.3); }

/* 35 — Step 1 demo graph chooser */
.demo-graph-box {
  margin-top: 8px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
}
.demo-graph-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
  color: #d9e7ff;
  font-weight: 600;
}
.demo-graph-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}
.demo-graph-row .grow { min-width: 0; }

/* Make step hero smaller to maximize network space */
.wizard-hero {
  left: clamp(280px, 30vw, 420px);
  right: 248px;
  top: 12px;
  width: auto;
  max-width: min(520px, calc(100vw - 560px));
  padding: 7px 10px;
}
.wizard-hero h1 {
  font-size: clamp(13px, 1.05vw, 15px);
  line-height: 1.04;
}
.wizard-hero p {
  margin-top: 3px;
  font-size: 9px;
  line-height: 1.18;
  max-width: 58ch;
}
.wizard-hero .eyebrow { margin-bottom: 1px; font-size: 7px; }

/* Further tighten bundle and export panels */
.wizard-panel[data-mode-panel="bundle"] .panel-head h2,
.wizard-panel[data-mode-panel="export"] .panel-head h2 {
  font-size: 15px;
  line-height: 1.15;
}
.wizard-panel[data-mode-panel="bundle"] .chip,
.wizard-panel[data-mode-panel="export"] .chip {
  padding: 4px 7px;
  font-size: 10px;
}
.wizard-panel[data-mode-panel="bundle"] .method-card {
  padding: 7px;
}
.wizard-panel[data-mode-panel="bundle"] .method-card p,
.wizard-panel[data-mode-panel="bundle"] .method-caption,
.wizard-panel[data-mode-panel="export"] .field > span,
.wizard-panel[data-mode-panel="bundle"] .field > span {
  font-size: 11px;
}
@media (max-width: 900px) {
  .demo-graph-row {
    grid-template-columns: 1fr;
  }
  .startup-samples {
    grid-template-columns: 1fr;
  }
  .startup-load-grid {
    grid-template-columns: 1fr;
  }
  .startup-load-grid button {
    min-width: 0;
  }
}


body[data-ui-theme="light-gray"] .top-navigator,
body[data-ui-theme="light-gray"] .wizard-rail,
body[data-ui-theme="light-gray"] .wizard-footer,
body[data-ui-theme="light-gray"] #statusBar,
body[data-ui-theme="light-gray"] .scene-tools,
body[data-ui-theme="light-gray"] #selectionCard,
body[data-ui-theme="light-gray"] .modal-card,
body[data-ui-theme="light-gray"] .viewport-fab-btn {
  background: rgba(255,255,255,0.9);
  color: var(--text);
}
body[data-ui-theme="light-gray"] button,
body[data-ui-theme="light-gray"] select,
body[data-ui-theme="light-gray"] input[type="text"],
body[data-ui-theme="light-gray"] input[type="number"],
body[data-ui-theme="light-gray"] input[type="file"],
body[data-ui-theme="light-gray"] input[type="color"] {
  background: rgba(255,255,255,0.96);
  color: var(--text);
  border-color: rgba(15, 23, 42, 0.12);
}
body[data-ui-theme="light-gray"] .eyebrow,
body[data-ui-theme="light-gray"] .chip,
body[data-ui-theme="light-gray"] .mode-tab.active .step-icon {
  color: #334155;
}
body[data-ui-theme="light-gray"] .info-block,
body[data-ui-theme="light-gray"] .hint-block,
body[data-ui-theme="light-gray"] .method-card,
body[data-ui-theme="light-gray"] .modal-content,
body[data-ui-theme="light-gray"] .compare-card,
body[data-ui-theme="light-gray"] .demo-graph-box {
  background: rgba(15, 23, 42, 0.03);
  color: var(--text);
}
body[data-ui-theme="light-gray"] #viewportStage {
  background: radial-gradient(circle at top, rgba(148,163,184,0.16), transparent 32%), var(--studio-bg);
}
@media (max-width: 760px) {
  .viewport-fab { right: 12px; bottom: 62px; }
}

.color-swatch { display:inline-block; width:10px; height:10px; border-radius:999px; margin-right:6px; vertical-align:middle; border:1px solid rgba(255,255,255,0.2); }


#studioShell:fullscreen {
  width: 100vw;
  height: 100vh;
  background: linear-gradient(180deg, #23272f 0%, #171a20 100%);
}
#studioShell:fullscreen .workspace {
  position: relative;
  grid-template-columns: 1fr !important;
  height: calc(100vh - var(--topbar-h, 88px));
}
#studioShell:fullscreen #viewportStage {
  grid-column: 1;
  grid-row: 1;
}
#studioShell:fullscreen .right-rail {
  display: none;
}
#studioShell:fullscreen .left-rail {
  position: absolute;
  left: 14px;
  top: 14px;
  bottom: 14px;
  width: min(340px, calc(100vw - 120px));
  max-width: 340px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  box-shadow: var(--shadow);
  z-index: 20;
  background: linear-gradient(180deg, rgba(23, 26, 32, 0.96), rgba(31, 35, 42, 0.94));
  backdrop-filter: blur(18px);
}
#studioShell:fullscreen .left-rail.collapsed {
  width: 60px;
  min-width: 60px;
}
#studioShell:fullscreen .wizard-footer,
#studioShell:fullscreen #statusBar {
  left: 18px;
  right: 18px;
  width: auto;
  transform: none;
}
#studioShell:fullscreen .wizard-footer {
  justify-content: center;
}
#studioShell:fullscreen .wizard-flow-caption {
  text-align: center;
}
#studioShell:fullscreen .wizard-hero {
  left: calc(min(340px, calc(100vw - 120px)) + 28px);
  right: 248px;
  top: 14px;
  width: auto;
  max-width: min(520px, calc(100vw - min(340px, calc(100vw - 120px)) - 300px));
}
#studioShell:fullscreen.fs-left-collapsed .wizard-hero {
  left: 86px;
  right: 248px;
  width: auto;
  max-width: min(520px, calc(100vw - 352px));
}

/* ════════════════════════════════════════════════════════════════════════════
   BRIGHTNESS & CLARITY PASS
   Removes the two shadow boxes at the bottom of the viewport.
   Lifts the entire surface stack so panels, rails, and borders are distinct.
════════════════════════════════════════════════════════════════════════════ */

/* ── 1. Remove the wizard flow caption entirely ── */
.wizard-flow-caption { display: none !important; }
.wizard-footer        { display: none !important; }

/* ── 2. Status bar → flat borderless text strip, no box ── */
#statusBar {
  background: transparent !important;
  border: none !important;
  border-top: 1px solid #202020 !important;
  border-radius: 0 !important;
  left: 0 !important; right: 0 !important; bottom: 0 !important;
  padding: 5px 16px !important;
  color: #767676 !important;
  font-size: 10px !important;
  letter-spacing: 0.04em;
  z-index: 6;
}
#statusText  { color: #7a7a7a; }
#statusStats { color: #666666; }

/* ── 3. Rail brightness lift ── */
.wizard-rail   { background: #1c1c1c; border-color: #282828; }
.right-rail    { border-color: #282828; }
.rail-header   { background: #191919; border-bottom-color: #272727; }
.rail-footer   { background: #191919; border-top-color: #272727; }
.rail-title    { color: #b8b8b8; }
.rail-subtitle { color: #8e8e8e; }

/* ── 4. Control blocks: lifted surface + stronger border ── */
.control-block { background: #252525; border-color: #333333; }
.control-block summary            { color: #989898; }
.control-block summary::after     { color: #404040; }
.control-block[open] > summary    { color: #b8b8b8; border-bottom-color: #2d2d2d; }
.control-block[open] > summary::after { color: #555555; }
.control-block summary:hover      { background: rgba(255,255,255,0.025); }

/* ── 5. Form elements: lifted ── */
select,
input[type="text"],
input[type="number"],
input[type="file"] {
  background: #1d1d1d !important;
  border-color: #343434 !important;
  color: #e0e0e0 !important;
}
input[type="color"] { background: #1d1d1d !important; border-color: #343434 !important; }
.field > span  { color: #888888; }
.checkbox      { color: #a2a2a2; }

/* ── 6. Buttons: lifted ── */
button                { background: #282828; border-color: #363636; color: #cccccc; }
button:hover          { background: #313131; border-color: #424242; color: #e0e0e0; }
button.ghost          { background: transparent; border-color: #2a2a2a; color: #646464; }
button.ghost:hover    { background: #232323; border-color: #383838; color: #909090; }
button.primary        { background: #1b4299; border-color: #2355c0; color: #ccdcff; }
button.primary:hover  { background: #204daf; border-color: #2c65d8; }

/* ── 7. Top navigator: slightly lifted ── */
.top-navigator   { background: #141414; border-bottom-color: #272727; }
.mode-tab        { color: #8f8f8f; }
.mode-tab:hover  { background: #1f1f1f; border-color: #2e2e2e; color: #b0b0b0; }
.mode-tab.active { background: #232323; border-color: #363636; color: #e8e8e8; }
.step-num        { background: #232323; border-color: #363636; }

/* ── 8. Scene tools: floats ABOVE the viewport (lighter than --studio-bg #252525) ── */
.scene-control-panel {
  background: #2e2e2e;
  border-color: #3d3d3d;
}
.scene-control-panel-head {
  border-bottom-color: #363636;
}
.scene-control-panel-title {
  color: #9a9a9a;
}
.scene-control-panel-subtitle {
  color: #737373;
}
.left-workflow-toolbar-label,
.left-workflow-toolbox-title {
  color: #9a9a9a;
}
.scene-tool-panel-copy {
  color: #787878;
}
.left-workflow-toolbar-glyph {
  background: #363636;
  color: #a0a0a0;
}
.left-workflow-toolbar-btn {
  background: #262626;
  border-color: #383838;
}
.left-workflow-toolbar-btn.active {
  background: #0f2450;
  border-color: #1a3d80;
}
.left-workflow-toolbox {
  background: #2e2e2e;
  border-color: #3d3d3d;
}
.left-workflow-toolbox-head {
  border-bottom-color: #363636;
}
.left-workflow-toolbox-close {
  background: #363636;
  border-color: #424242;
  color: #888888;
}
.scene-control-panel-toggle {
  background: #363636;
  border-color: #424242;
  color: #888888;
}
.scene-control-panel .field > span {
  color: #8c8c8c;
}
.scene-control-panel select,
.scene-control-panel input {
  background: #262626;
  border-color: #383838;
}
.scene-control-panel .checkbox {
  color: #a6a6a6;
}

/* ── 9. Floating panels: all lighter than viewport bg ── */
#selectionCard   { background: #2d2d2d; border-color: #3a3a3a; }
.hud             { background: #2a2a2a; border-color: #383838; }
.hud-title       { color: #808080; }
.hud-content     { color: #787878; }

/* ── 10. Stage nav arrows: lifted above viewport ── */
.stage-nav       { background: #2c2c2c; border-color: #3a3a3a; color: #787878; }
.stage-nav:hover { background: #343434; color: #b0b0b0; }

/* ── 11. Viewport FAB: lifted above viewport ── */
.viewport-fab-btn       { background: #2c2c2c; border-color: #3a3a3a; color: #787878; }
.viewport-fab-btn:hover { background: #363636; color: #c0c0c0; }

/* ── 12. Wizard hero overlay: floats above viewport ── */
.wizard-hero          { background: #2e2e2e; border-color: #3c3c3c; }
.wizard-hero h1       { color: #e8e8e8; }
.wizard-hero p        { color: #787878; }
.wizard-hero .eyebrow { color: #585858; }

/* ── 13. Info and hint blocks: lifted ── */
.info-block, .hint-block {
  background: #212121;
  border-color: #2e2e2e;
  color: #7a7a7a;
}
.info-block strong { color: #b4b4b4; }
.hint-list li      { color: #696969; }

/* ── 14. Chip badges: slightly brighter ── */
.chip { background: #252525; border-color: #353535; color: #505050; }

/* ── 15. Method cards: lifted ── */
.method-card        { background: #202020; border-color: #303030; }
.method-card:hover  { background: #272727; border-color: #3a3a3a; }
.method-card.active { background: #0e1f3d; border-color: #1d4088; }
.method-name        { color: #d0d0d0; }
.method-family, .method-status, .method-badge, .reference-year {
  background: #282828; border-color: #353535; color: #606060;
}
.method-detail    { background: #1e1e1e; border-color: #2e2e2e; }
.method-detail h3 { color: #d8d8d8; }
.method-detail p  { color: #707070; }
.ref-pill         { background: #1c1c1c; border-color: #2a2a2a; }
.ref-pill-title   { color: #b8b8b8; }
.ref-pill-meta    { color: #505050; }

/* ── 16. Compare board ── */
.compare-card   { background: #202020; border-color: #303030; }
.compare-card h3 { color: #d0d0d0; }
.compare-metrics { color: #585858; }

/* ── 17. Demo graph box ── */
.demo-graph-box  { background: #202020; border-color: #303030; }
.demo-graph-head { color: #707070; }

/* ── 18. Layer chips ── */
.layer-chip        { background: #202020; border-color: #303030; color: #606060; }
.layer-chip.active { background: #0e2454; border-color: #1a3d80; color: #7aabff; }

/* ── 19. Tour card: lifted ── */
.tour-card  { background: #181818; border-color: #303030; }
.tour-body  { color: #848484; }
.tour-title { color: #f0f0f0; }

/* ── 20. Tour help button ── */
.tour-help-btn {
  color: #505050 !important;
  border-color: #2d2d2d !important;
}
.tour-help-btn:hover { color: #909090 !important; border-color: #3a3a3a !important; }

/* ── 21. KV grid ── */
.kv-grid > div { background: #202020; }
.kv-key        { color: #555555; }
.kv-value      { color: #c8c8c8; }

/* ── 22. Adjust FAB / scene tools spacing now status bar is flat ── */
.viewport-fab { bottom: 52px; }
#selectionCard { bottom: 52px; }
.scene-tools   { max-height: calc(100% - 160px); }

/* ── 23. Step color left-border: slightly brighter accent ── */
[data-mode-panel="load2d"]    .control-block { border-left: 2px solid rgba(75,158,255,.4); }
[data-mode-panel="map3d"]     .control-block { border-left: 2px solid rgba(167,139,250,.4); }
[data-mode-panel="bundle"]    .control-block { border-left: 2px solid rgba(251,146,60,.4); }
[data-mode-panel="compare"]   .control-block { border-left: 2px solid rgba(52,211,153,.4); }
[data-mode-panel="fabricate"] .control-block { border-left: 2px solid rgba(248,113,113,.4); }
[data-mode-panel="style"]     .control-block { border-left: 2px solid rgba(244,114,182,.4); }
[data-mode-panel="export"]    .control-block { border-left: 2px solid rgba(34,211,238,.4); }

@media (max-width: 760px) {
  html, body {
    height: auto;
    min-height: 100%;
  }

  body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .wizard-shell {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .top-navigator {
    position: sticky;
    top: 0;
    padding: 10px 12px;
    gap: 10px;
  }

  .top-brand {
    min-width: 0;
  }

  .brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .brand-title {
    font-size: 18px;
  }

  .step-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .step-tabs::-webkit-scrollbar {
    display: none;
  }

  .mode-tab {
    flex: 0 0 auto;
    min-width: 54px;
    padding: 10px;
  }

  .mode-tab .step-label {
    display: none;
  }

  .workspace,
  .workspace.left-collapsed,
  .workspace.right-collapsed,
  .workspace.left-collapsed.right-collapsed,
  .workspace.mobile-compact,
  .workspace.mobile-compact.left-collapsed,
  .workspace.mobile-compact.right-collapsed,
  .workspace.mobile-compact.left-collapsed.right-collapsed {
    display: grid;
    grid-template-columns: 1fr !important;
    grid-template-rows: minmax(64dvh, 70dvh) auto;
    gap: 10px;
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: 0 0 18px;
    position: static;
  }

  #viewportStage,
  .left-rail,
  .right-rail {
    grid-column: auto;
    grid-row: auto;
    width: auto;
    min-height: 0;
  }

  #viewportStage {
    height: clamp(420px, 66dvh, 760px);
    min-height: 64dvh;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .wizard-hero {
    left: 12px;
    right: 12px;
    top: 12px;
    width: auto;
    max-width: min(320px, calc(100% - 112px));
    padding: 10px 12px;
  }

  .wizard-hero h1 {
    font-size: 15px;
    line-height: 1.12;
  }

  .wizard-hero p {
    display: none;
  }

  .left-rail,
  .workspace.mobile-compact .left-rail,
  .workspace.mobile-compact .wizard-rail,
  .workspace.mobile-compact .wizard-rail.collapsed {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: none;
    height: auto;
    max-height: none;
    overflow: visible;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    border-radius: 0;
  }

  .right-rail,
  .workspace.mobile-compact .right-rail {
    display: none;
  }

  .left-rail .rail-header {
    padding: 0 12px;
    align-items: center;
    min-height: 24px;
  }

  .left-rail .rail-title {
    font-size: 13px;
  }

  .left-rail .rail-subtitle {
    display: none;
  }

  #toggleLeftRailBtn,
  #toggleRightRailBtn {
    display: none;
  }

  .wizard-panel {
    overflow: hidden;
    padding: 0 12px 10px;
  }

  .wizard-panel.active {
    max-height: 28dvh;
    overflow-y: auto;
    background: rgba(22, 24, 30, 0.9);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding-top: 10px;
    box-shadow: 0 14px 32px rgba(0,0,0,0.22);
    backdrop-filter: blur(16px);
  }

  .panel-head {
    align-items: center;
    margin-bottom: 8px;
  }

  .panel-head h2 {
    font-size: 14px;
  }

  .chip {
    padding: 4px 7px;
    font-size: 10px;
  }

  .control-block {
    margin-bottom: 8px;
    border-radius: 14px;
  }

  .control-block summary {
    padding: 10px 12px;
    font-size: 12px;
  }

  .block-body {
    padding: 0 12px 10px;
  }

  .field,
  .checkbox {
    margin-bottom: 8px;
  }

  .field > span,
  .checkbox span {
    font-size: 11px;
  }

  select,
  input[type="text"],
  input[type="number"],
  input[type="file"],
  input[type="color"] {
    padding: 9px 11px;
  }

  .scene-tools,
  .workspace.mobile-compact .scene-tools {
    right: 12px;
    bottom: 12px;
    width: 168px;
    max-width: calc(100% - 24px);
    max-height: none;
    background: rgba(10, 14, 22, 0.92);
  }

  .scene-tools-head {
    padding: 8px 10px;
  }

  .scene-tools-title {
    font-size: 12px;
  }

  .scene-tools-subtitle {
    display: none;
  }

  .scene-tools.collapsed,
  .workspace.mobile-compact .scene-tools.collapsed {
    width: 168px;
  }

  .scene-tools-body {
    padding: 0 10px 10px;
  }

  .scene-tools-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .scene-tools-grid > label:has(#quickBackgroundColor),
  .scene-tools-grid > label:has(#quickShowGeometry),
  .scene-tools-body > .top-gap {
    display: none;
  }

  .viewport-fab {
    right: 12px;
    bottom: 62px;
    gap: 8px;
  }

  .viewport-fab-btn {
    width: 42px;
    height: 42px;
  }

  #selectionCard,
  .workspace.mobile-compact #selectionCard {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-width: min(280px, calc(100% - 192px));
  }

  #statusBar {
    left: 12px;
    right: 12px;
    bottom: 122px;
    padding: 8px 10px;
    font-size: 11px;
    display: grid;
    gap: 2px;
    justify-content: start;
    max-width: 190px;
    background: rgba(12, 15, 20, 0.82);
  }

  #statusStats {
    display: none;
  }
}

body[data-ui-theme="light-gray"] {
  color: #111827;
}
body[data-ui-theme="light-gray"] .brand-title {
  color: #0f172a;
}
body[data-ui-theme="light-gray"] .theme-toggle-btn {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.12);
  color: #334155;
}
body[data-ui-theme="light-gray"] .theme-toggle-btn:hover {
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.18);
  color: #0f172a;
}
body[data-ui-theme="light-gray"] .top-navigator {
  background: rgba(255,255,255,0.96);
  border-bottom-color: rgba(15, 23, 42, 0.08);
}
body[data-ui-theme="light-gray"] .mode-tab {
  color: #64748b;
}
body[data-ui-theme="light-gray"] .mode-tab:hover {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(148, 163, 184, 0.22);
  color: #334155;
}
body[data-ui-theme="light-gray"] .mode-tab.active {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(219, 234, 254, 0.98));
  border-color: rgba(96, 165, 250, 0.42);
  color: #0f172a;
}
body[data-ui-theme="light-gray"] .mode-tab.active .step-label,
body[data-ui-theme="light-gray"] .mode-tab.active .step-icon {
  color: #0f172a;
}
body[data-ui-theme="light-gray"] .step-num {
  background: rgba(255,255,255,0.92);
  border-color: rgba(148, 163, 184, 0.28);
  color: #334155;
}
body[data-ui-theme="light-gray"] .wizard-rail,
body[data-ui-theme="light-gray"] .rail-header,
body[data-ui-theme="light-gray"] .rail-footer {
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.24);
}
body[data-ui-theme="light-gray"] .rail-title {
  color: #0f172a;
}
body[data-ui-theme="light-gray"] .rail-subtitle {
  color: #64748b;
}
body[data-ui-theme="light-gray"] #toggleRightRailBtn,
body[data-ui-theme="light-gray"] #toggleLeftRailBtn,
body[data-ui-theme="light-gray"] .tour-trigger {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(148, 163, 184, 0.24);
  color: #475569;
}
body[data-ui-theme="light-gray"] #toggleRightRailBtn:hover,
body[data-ui-theme="light-gray"] #toggleLeftRailBtn:hover,
body[data-ui-theme="light-gray"] .tour-trigger:hover {
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(148, 163, 184, 0.34);
  color: #0f172a;
}
body[data-ui-theme="light-gray"] .control-block {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.28);
}
body[data-ui-theme="light-gray"] .control-block summary {
  color: #334155;
}
body[data-ui-theme="light-gray"] .control-block summary::after {
  color: #94a3b8;
}
body[data-ui-theme="light-gray"] .control-block[open] > summary {
  color: #0f172a;
  border-bottom-color: rgba(148, 163, 184, 0.22);
}
body[data-ui-theme="light-gray"] .info-block,
body[data-ui-theme="light-gray"] .hint-block,
body[data-ui-theme="light-gray"] .compare-card,
body[data-ui-theme="light-gray"] .method-detail,
body[data-ui-theme="light-gray"] .ref-pill,
body[data-ui-theme="light-gray"] .startup-sample-card,
body[data-ui-theme="light-gray"] .modal-content {
  background: rgba(248, 250, 252, 0.96);
  border-color: rgba(148, 163, 184, 0.22);
  color: #334155;
}
body[data-ui-theme="light-gray"] .info-block strong,
body[data-ui-theme="light-gray"] .ref-pill-title,
body[data-ui-theme="light-gray"] .method-detail h3 {
  color: #0f172a;
}
body[data-ui-theme="light-gray"] .hint-list li,
body[data-ui-theme="light-gray"] .ref-pill-meta,
body[data-ui-theme="light-gray"] .method-detail p {
  color: #64748b;
}
body[data-ui-theme="light-gray"] .scene-control-panel,
body[data-ui-theme="light-gray"] .left-workflow-toolbox,
body[data-ui-theme="light-gray"] #selectionCard,
body[data-ui-theme="light-gray"] .wizard-hero,
body[data-ui-theme="light-gray"] .modal-card,
body[data-ui-theme="light-gray"] .hud,
body[data-ui-theme="light-gray"] .viewport-fab-btn {
  background: rgba(255,255,255,0.96);
  border-color: rgba(148, 163, 184, 0.24);
  color: #0f172a;
}
body[data-ui-theme="light-gray"] .scene-control-panel-head,
body[data-ui-theme="light-gray"] .left-workflow-toolbox-head,
body[data-ui-theme="light-gray"] .modal-head {
  border-bottom-color: rgba(148, 163, 184, 0.22);
}
body[data-ui-theme="light-gray"] .scene-control-panel-title,
body[data-ui-theme="light-gray"] .left-workflow-toolbox-title,
body[data-ui-theme="light-gray"] .hud-title,
body[data-ui-theme="light-gray"] .wizard-hero h1,
body[data-ui-theme="light-gray"] .modal-title {
  color: #0f172a;
}
body[data-ui-theme="light-gray"] .scene-control-panel-subtitle,
body[data-ui-theme="light-gray"] .scene-tool-panel-copy,
body[data-ui-theme="light-gray"] .wizard-hero p,
body[data-ui-theme="light-gray"] .hud-content,
body[data-ui-theme="light-gray"] .left-workflow-toolbar-label {
  color: #64748b;
}
body[data-ui-theme="light-gray"] .wizard-hero .eyebrow {
  color: #475569;
}
body[data-ui-theme="light-gray"] .scene-control-panel-toggle,
body[data-ui-theme="light-gray"] .left-workflow-toolbox-close {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(148, 163, 184, 0.24);
  color: #475569;
}
body[data-ui-theme="light-gray"] .left-workflow-toolbar-btn {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(148, 163, 184, 0.22);
}
body[data-ui-theme="light-gray"] .left-workflow-toolbar-btn:hover {
  background: rgba(15, 23, 42, 0.06);
}
body[data-ui-theme="light-gray"] .left-workflow-toolbar-btn.active {
  background: linear-gradient(180deg, rgba(219, 234, 254, 0.96), rgba(191, 219, 254, 0.96));
  border-color: rgba(96, 165, 250, 0.45);
}
body[data-ui-theme="light-gray"] .left-workflow-toolbar-glyph {
  background: rgba(255,255,255,0.9);
  color: #334155;
  border: 1px solid rgba(148, 163, 184, 0.2);
}
body[data-ui-theme="light-gray"] .left-workflow-toolbar-btn.active .left-workflow-toolbar-glyph {
  background: rgba(255,255,255,0.98);
  color: #1d4ed8;
}
body[data-ui-theme="light-gray"] .left-workflow-toolbar-label,
body[data-ui-theme="light-gray"] .left-workflow-toolbox .field > span,
body[data-ui-theme="light-gray"] .scene-control-panel .field > span,
body[data-ui-theme="light-gray"] .scene-control-panel .checkbox,
body[data-ui-theme="light-gray"] .left-workflow-toolbox .checkbox {
  color: #475569;
}
body[data-ui-theme="light-gray"] .scene-control-panel select,
body[data-ui-theme="light-gray"] .scene-control-panel input,
body[data-ui-theme="light-gray"] .left-workflow-toolbox select,
body[data-ui-theme="light-gray"] .left-workflow-toolbox input,
body[data-ui-theme="light-gray"] select,
body[data-ui-theme="light-gray"] input[type="text"],
body[data-ui-theme="light-gray"] input[type="number"],
body[data-ui-theme="light-gray"] input[type="file"],
body[data-ui-theme="light-gray"] input[type="color"] {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
}
body[data-ui-theme="light-gray"] .footer-search-row {
  border-bottom-color: rgba(148, 163, 184, 0.55);
}
body[data-ui-theme="light-gray"] .footer-search-row input {
  color: #0f172a;
}
body[data-ui-theme="light-gray"] .footer-search-row input::placeholder {
  color: #94a3b8;
}
body[data-ui-theme="light-gray"] .footer-search-icon-btn {
  color: #64748b;
}
body[data-ui-theme="light-gray"] .footer-search-icon-btn:hover {
  color: #0f172a;
}
body[data-ui-theme="light-gray"] .footer-search-status {
  color: #64748b;
}
body[data-ui-theme="light-gray"] .footer-search-status[data-state="error"] {
  color: #b91c1c;
}
body[data-ui-theme="light-gray"] .footer-search-status[data-state="success"] {
  color: #1d4ed8;
}
body[data-ui-theme="light-gray"] .footer-search-match {
  background: rgba(255,255,255,0.95);
  border-color: rgba(148, 163, 184, 0.22);
}
body[data-ui-theme="light-gray"] .footer-search-match:hover {
  background: rgba(239, 246, 255, 0.98);
}
body[data-ui-theme="light-gray"] .footer-search-match-title {
  color: #0f172a;
}
body[data-ui-theme="light-gray"] .footer-search-match-meta,
body[data-ui-theme="light-gray"] .footer-search-match-note {
  color: #64748b;
}
body[data-ui-theme="light-gray"] #viewportStage {
  background: #ffffff;
}
body[data-ui-theme="light-gray"] #studioShell:fullscreen {
  background: #f8fafc;
}
body[data-ui-theme="light-gray"] #studioShell:fullscreen .left-rail {
  background: rgba(255,255,255,0.96);
  border-color: rgba(148, 163, 184, 0.24);
}
