.analysis-stage-experience {
  position: fixed;
  inset: var(--pagebar-height) 0 0;
  z-index: 210;
  color: #eef7fb;
  pointer-events: none;
}

.analysis-stage-experience[hidden] {
  display: none !important;
}

.stage-import-target[hidden],
.stage-context[hidden] {
  display: none !important;
}

body.analysis-experience-enabled #controls {
  display: none;
}

body.analysis-experience-enabled.analysis-results-ready #controls,
body.analysis-experience-enabled.analysis-results-ready #visualToolDock,
body.analysis-experience-enabled.analysis-results-ready #flowStudioDock,
body.analysis-experience-enabled.analysis-results-ready #resultSourceBadge,
body.analysis-experience-enabled.analysis-results-ready #objectTreePanel {
  display: none !important;
}

body.analysis-setup-mode #settingsPanel,
body.analysis-setup-mode #objectTreePanel,
body.analysis-setup-mode #viewAnglePanel,
body.analysis-setup-mode #axisHelperCanvas,
body.analysis-setup-mode .label,
body.analysis-setup-mode #visualToolDock,
body.analysis-setup-mode #resultSourceBadge {
  display: none !important;
}

body.analysis-stage-orient canvas {
  cursor: grab;
}

body.analysis-stage-orient .analysis-stage-experience.is-rotating ~ canvas,
body.analysis-stage-orient canvas:active {
  cursor: grabbing;
}

.analysis-stage-head {
  position: absolute;
  top: 18px;
  left: 20px;
  right: 112px;
  z-index: 4;
  display: grid;
  grid-template-columns: 42px minmax(180px, auto) minmax(180px, 420px);
  align-items: center;
  gap: 13px;
  pointer-events: none;
}

.stage-viz-workspace {
  position: absolute;
  left: 18px;
  bottom: 14px;
  z-index: 12;
  display: none;
  grid-template-columns: minmax(0, 1.65fr) minmax(330px, 1fr);
  width: min(850px, calc(100vw - 36px));
  height: min(520px, calc(100vh - var(--pagebar-height) - 90px));
  border: 1px solid rgba(158, 197, 214, 0.26);
  border-radius: 8px;
  color: #eef8fc;
  background: rgba(7, 17, 25, 0.9);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.stage-result-inspector,
.stage-viz-browser {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.stage-viz-browser {
  display: grid;
  grid-template-columns: 190px minmax(230px, 1fr);
  grid-template-rows: 55px minmax(0, 1fr);
  border-right: 1px solid rgba(151, 194, 211, 0.16);
}

.analysis-stage-experience.is-results .stage-viz-workspace {
  display: grid;
}

.stage-viz-workspace.is-collapsed {
  display: none !important;
}

.stage-viz-workspace.is-collapsed .stage-viz-add,
.stage-viz-workspace.is-collapsed .stage-viz-layer-list,
.stage-viz-workspace.is-collapsed .stage-viz-geometry,
.stage-viz-workspace.is-collapsed .stage-result-content {
  display: none;
}

.stage-viz-workspace[data-panel-mode="create"] {
  grid-template-columns: 1fr;
  width: min(620px, calc(100vw - 36px));
  height: auto;
  max-height: min(520px, calc(100vh - var(--pagebar-height) - 90px));
}

.stage-viz-workspace[data-panel-mode="create"] .stage-viz-browser {
  grid-template-columns: 1fr;
  grid-template-rows: 55px auto;
  border-right: 0;
}

.stage-viz-workspace[data-panel-mode="create"] .stage-result-inspector,
.stage-viz-workspace[data-panel-mode="create"] .stage-viz-geometry { display: none; }

.stage-viz-workspace[data-panel-mode="edit"] {
  top: 18px;
  bottom: auto;
  left: 336px;
  width: min(850px, calc(100vw - 354px));
}

.stage-viz-workspace[data-panel-mode="edit"] .stage-viz-browser {
  grid-template-columns: 1fr;
  grid-template-rows: 55px minmax(0, 1fr);
}

.stage-viz-workspace[data-panel-mode="edit"] .stage-viz-add { display: none; }
.stage-viz-workspace[data-panel-mode="edit"] .stage-viz-guide { display: none !important; }
.stage-viz-workspace[data-panel-mode="edit"] .stage-viz-panel-close { display: none; }

.stage-viz-panel-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(151, 194, 211, 0.22);
  border-radius: 5px;
  color: #dcecf2;
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
  font-size: 21px;
  cursor: pointer;
}

.stage-viz-workspace[data-panel-mode="create"] .stage-viz-add {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 0;
  overflow: visible;
}

.stage-viz-workspace[data-panel-mode="create"] .stage-viz-add[hidden],
.stage-viz-guide[hidden] { display: none; }

.stage-viz-workspace[data-panel-mode="create"] .stage-viz-add > button {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 3px 8px;
  min-height: 76px;
  padding: 10px;
}

.stage-viz-workspace[data-panel-mode="create"] .stage-viz-add .stage-viz-icon { grid-row: 1 / 3; }
.stage-viz-workspace[data-panel-mode="create"] .stage-viz-add strong { font-size: 11px; }
.stage-viz-workspace[data-panel-mode="create"] .stage-viz-add small { color: rgba(205, 226, 235, 0.5); font-size: 8px; line-height: 1.3; }

.stage-viz-guide {
  display: grid;
  gap: 13px;
  padding: 14px;
}

.stage-viz-guide-progress { display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: center; gap: 6px; }
.stage-viz-guide-progress i { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid rgba(151,194,211,.24); border-radius: 50%; color: rgba(220,236,242,.5); font-size: 9px; font-style: normal; font-weight: 900; }
.stage-viz-guide-progress i.is-active { border-color: #76def7; color: #061820; background: #76def7; }
.stage-viz-guide-progress span { height: 1px; background: rgba(151,194,211,.2); }
.stage-viz-guide-copy { display: grid; gap: 3px; }
.stage-viz-guide-copy small { color: #78ddf7; font-size: 8px; font-weight: 900; }
.stage-viz-guide-copy strong { font-size: 15px; }
.stage-viz-guide-copy p { margin: 0; color: rgba(211,230,237,.58); font-size: 10px; }
.stage-viz-guide-step { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.stage-viz-guide-step[hidden] { display: none; }
.stage-viz-guide-step label { display: grid; gap: 5px; color: rgba(213,233,240,.65); font-size: 9px; font-weight: 800; }
.stage-viz-guide-step label:first-child:last-child { grid-column: 1 / -1; }
.stage-viz-guide-step select { min-height: 34px; padding: 6px 8px; border: 1px solid rgba(144,190,207,.24); border-radius: 5px; color: #eaf8fc; background: #111f29; font: inherit; font-size: 10px; }
.stage-viz-guide-step input[type="range"] { width: 100%; accent-color: #72daf3; }
.stage-viz-guide-actions { display: flex; justify-content: flex-end; gap: 7px; }
.stage-viz-guide-actions button { min-width: 82px; min-height: 33px; border: 1px solid rgba(151,194,211,.22); border-radius: 5px; color: #deedf2; background: rgba(255,255,255,.04); font: inherit; font-size: 10px; font-weight: 850; cursor: pointer; }
.stage-viz-guide-actions button.primary { border-color: rgba(111,221,247,.5); color: #061820; background: #76def7; }
.stage-viz-guide-actions button[hidden] { display: none; }

.stage-viz-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 55px;
  padding: 9px 13px;
  border-bottom: 1px solid rgba(151, 194, 211, 0.16);
  grid-column: 1 / -1;
}

.stage-viz-panel-head > span:first-child {
  display: grid;
  gap: 2px;
}

.stage-viz-panel-head small {
  color: #7adcf5;
  font-size: 9px;
  font-weight: 900;
}

.stage-viz-panel-head strong { font-size: 14px; }
.stage-viz-count {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  border: 1px solid rgba(137, 218, 241, 0.28);
  border-radius: 50%;
  color: #8be7ff;
  background: rgba(83, 199, 230, 0.1);
  font-size: 10px;
  font-weight: 900;
}

.stage-viz-add {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-bottom: 1px solid rgba(151, 194, 211, 0.14);
  align-content: start;
  overflow-y: auto;
  border-right: 1px solid rgba(151, 194, 211, 0.14);
  border-bottom: 0;
}

.stage-viz-add-label {
  margin: 0 2px 2px;
  color: rgba(207, 230, 239, 0.54);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.stage-viz-create-group,
.stage-viz-advanced,
.stage-viz-data-tools {
  min-width: 0;
  border: 1px solid rgba(151, 194, 211, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.stage-viz-create-group > summary,
.stage-viz-advanced > summary,
.stage-viz-data-tools > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.stage-viz-create-group > summary::-webkit-details-marker,
.stage-viz-advanced > summary::-webkit-details-marker,
.stage-viz-data-tools > summary::-webkit-details-marker { display: none; }

.stage-viz-create-group > summary {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 7px;
  min-height: 39px;
  padding: 5px 8px;
  color: rgba(235, 247, 251, 0.86);
}
.stage-viz-create-group > summary .stage-viz-icon { grid-column: 1; grid-row: 1 / 3; }
.stage-viz-create-group > summary strong { grid-column: 2; grid-row: 1; }
.stage-viz-create-group > summary small { grid-column: 2; grid-row: 2; }
.stage-viz-create-group > summary::after { grid-column: 3; grid-row: 1 / 3; align-self: center; }

.stage-viz-create-group > summary::after,
.stage-viz-advanced > summary::after,
.stage-viz-data-tools > summary::after {
  content: "+";
  color: #79def7;
  font-size: 15px;
  font-weight: 500;
}

.stage-viz-create-group[open] > summary::after,
.stage-viz-advanced[open] > summary::after,
.stage-viz-data-tools[open] > summary::after { content: "−"; }
.stage-viz-create-group > summary strong { font-size: 10px; }
.stage-viz-create-group > summary small { color: rgba(205, 226, 235, 0.48); font-size: 8px; }
.stage-viz-create-group > div { display: grid; gap: 3px; padding: 0 5px 5px; }
.stage-viz-create-group > div button {
  min-height: 31px;
  padding: 5px 8px;
  border: 0;
  border-radius: 4px;
  color: rgba(230, 244, 249, 0.76);
  background: rgba(91, 189, 215, 0.07);
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.stage-viz-create-group > div button:hover,
.stage-viz-create-group > div button:focus-visible { color: #fff; background: rgba(91, 201, 229, 0.18); outline: 0; }

.stage-viz-launcher,
.stage-object-manager,
.stage-result-metrics-overlay {
  display: none;
}

.analysis-stage-experience.is-results .stage-viz-launcher {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 11;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid rgba(153, 213, 232, 0.3);
  border-radius: 6px;
  color: #edfaff;
  background: rgba(8, 20, 29, 0.48);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px) saturate(1.2);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  pointer-events: auto;
}

.analysis-stage-experience.is-results .stage-viz-launcher[aria-expanded="true"] {
  opacity: 0;
  pointer-events: none;
}

body.analysis-results-ready #scalarLegend,
body.analysis-results-ready #scalarLegendRestoreBtn { display: none !important; }

.analysis-stage-experience.is-results .stage-object-manager {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 10;
  display: grid;
  grid-template-rows: 50px auto auto minmax(0, 1fr);
  width: min(306px, calc(100vw - 36px));
  max-height: min(64vh, 560px);
  overflow: hidden;
  border: 1px solid rgba(161, 205, 222, 0.2);
  border-radius: 7px;
  color: #eef8fc;
  background: rgba(7, 18, 27, 0.42);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(15px) saturate(1.2);
  pointer-events: auto;
}

.stage-object-manager .stage-viz-panel-head { min-height: 50px; }
.analysis-stage-experience.is-results .stage-case-tree { max-height: min(34vh, 300px); }
.stage-object-manager .stage-viz-layer-list { min-height: 76px; max-height: 180px; overflow-y: auto; border: 0; }

.analysis-stage-experience:not(.is-results) .stage-object-manager {
  position: absolute;
  top: 82px;
  left: 18px;
  z-index: 9;
  display: grid;
  grid-template-rows: 50px minmax(0, 1fr);
  width: min(306px, calc(100vw - 36px));
  max-height: min(56vh, 460px);
  overflow: hidden;
  border: 1px solid rgba(161, 205, 222, 0.18);
  border-radius: 7px;
  color: #eef8fc;
  background: rgba(7, 18, 27, 0.34);
  backdrop-filter: blur(15px) saturate(1.2);
  pointer-events: auto;
}

.analysis-stage-experience:not(.is-results) .stage-case-divider,
.analysis-stage-experience:not(.is-results) .stage-viz-layer-list { display: none; }

.stage-case-tree {
  display: grid;
  gap: 3px;
  padding: 7px;
  overflow-y: auto;
}

.stage-case-node {
  border: 1px solid rgba(151, 194, 211, 0.1);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.025);
}

.stage-case-node-main {
  display: grid;
  grid-template-columns: 8px minmax(72px, .8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 7px;
  min-height: 31px;
  padding: 5px 8px;
}

.stage-case-node-main i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7b8994;
}

.stage-case-node.is-ok .stage-case-node-main i { background: #66d8a0; }
.stage-case-node.is-warning .stage-case-node-main i { background: #f2c14e; }
.stage-case-node.is-error .stage-case-node-main i { background: #ff7373; }
.stage-case-node-main strong { font-size: 10px; color: rgba(239, 249, 252, .9); }
.stage-case-node-main span {
  overflow: hidden;
  color: rgba(213, 231, 238, .68);
  font-size: 9px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-case-children {
  display: grid;
  gap: 3px;
  padding: 0 8px 7px 23px;
}

.stage-case-children > div { display: flex; justify-content: space-between; gap: 8px; font-size: 8px; }
.stage-case-children span { color: rgba(191, 214, 223, .52); }
.stage-case-children strong { color: rgba(232, 244, 248, .74); font-weight: 700; text-align: right; }

.stage-case-divider {
  display: flex;
  justify-content: space-between;
  padding: 7px 10px 5px;
  border-top: 1px solid rgba(151, 194, 211, 0.12);
  color: rgba(190, 216, 226, .62);
  font-size: 8px;
  font-weight: 850;
  text-transform: uppercase;
}

.analysis-stage-experience.is-results .stage-result-metrics-overlay {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 10;
  display: block;
  width: min(330px, calc(100vw - 36px));
  color: #f4fbfe;
  background: rgba(7, 18, 27, 0.26);
  border: 1px solid rgba(161, 205, 222, 0.14);
  border-radius: 7px;
  backdrop-filter: blur(12px) saturate(1.15);
  pointer-events: none;
}

.stage-result-metrics-overlay .stage-result-metrics { border: 0; }

.stage-viz-add > button,
.stage-flow-menu-trigger,
.stage-flow-submenu button {
  min-width: 0;
  min-height: 36px;
  padding: 7px 8px;
  border: 1px solid rgba(151, 194, 211, 0.18);
  border-radius: 5px;
  color: rgba(230, 243, 248, 0.78);
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.stage-viz-add > button,
.stage-flow-menu-trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  text-align: left;
}

.stage-viz-add button:hover,
.stage-viz-add button:focus-visible {
  border-color: rgba(111, 221, 247, 0.66);
  color: #f7fdff;
  background: rgba(75, 196, 226, 0.14);
  outline: 0;
}

.stage-flow-menu { position: relative; }
.stage-flow-menu-trigger { width: 100%; }
.stage-flow-caret { margin-left: auto; font-size: 16px; }
.stage-flow-submenu {
  position: absolute;
  top: 0;
  left: calc(100% + 8px);
  z-index: 20;
  display: none;
  width: 126px;
  padding: 5px;
  border: 1px solid rgba(158, 204, 221, 0.28);
  border-radius: 6px;
  background: rgba(5, 15, 23, 0.97);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.4);
}

.stage-flow-submenu button { display: block; width: 100%; text-align: left; }
.stage-flow-submenu button + button { margin-top: 3px; }
.stage-flow-menu:hover .stage-flow-submenu,
.stage-flow-menu:focus-within .stage-flow-submenu,
.analysis-stage-experience.is-flow-menu-open .stage-flow-submenu { display: block; }

.stage-viz-icon {
  position: relative;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  box-sizing: border-box;
  color: #75dff8;
}
.stage-viz-icon-plane { border: 1px solid currentColor; transform: skewY(-18deg) scale(.82); }
.stage-viz-icon-flow::before,
.stage-viz-icon-flow::after { content: ""; position: absolute; left: 1px; width: 13px; height: 1px; background: currentColor; }
.stage-viz-icon-flow::before { top: 5px; transform: rotate(-12deg); }
.stage-viz-icon-flow::after { top: 11px; transform: rotate(12deg); }
.stage-viz-icon-iso { border: 1px solid currentColor; border-radius: 50%; transform: scale(.85, .62); }
.stage-viz-icon-surface { border-bottom: 2px solid currentColor; border-radius: 50%; transform: rotate(-12deg); }
.stage-viz-icon-mesh { border: 1px solid currentColor; background: linear-gradient(90deg, transparent 45%, currentColor 46% 54%, transparent 55%), linear-gradient(transparent 45%, currentColor 46% 54%, transparent 55%); opacity: .9; }
.stage-viz-icon-lic { border: 1px solid currentColor; background: repeating-linear-gradient(165deg, transparent 0 3px, currentColor 3px 4px, transparent 4px 7px); opacity: .9; }

.stage-viz-layer-list {
  display: grid;
  gap: 3px;
  max-height: none;
  padding: 8px;
  overflow-y: auto;
  border-right: 1px solid rgba(151, 194, 211, 0.14);
  border-bottom: 0;
}

.stage-viz-empty { margin: 8px; color: rgba(216, 233, 240, 0.55); font-size: 10px; line-height: 1.45; }
.stage-viz-layer {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) 28px 28px;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 4px 5px 4px 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
}
.stage-viz-layer:hover { background: rgba(255,255,255,.04); }
.stage-viz-layer.is-active { border-color: rgba(112, 220, 247, .5); background: rgba(66, 188, 219, .1); }
.stage-viz-layer.is-hidden { opacity: .48; }
.stage-viz-layer-mark { width: 6px; height: 6px; border-radius: 50%; background: #d7dde2; box-shadow: 0 0 0 3px rgba(215,221,226,.1); }
.stage-viz-layer-copy { display: grid; min-width: 0; gap: 2px; }
.stage-viz-layer-copy strong,
.stage-viz-layer-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage-viz-layer-copy strong { font-size: 11px; }
.stage-viz-layer-copy small { color: rgba(205,226,235,.52); font-size: 9px; }
.stage-viz-layer > button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  color: rgba(220,238,245,.65);
  background: transparent;
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}
.stage-viz-layer > button:hover { color: #8ce9ff; background: rgba(255,255,255,.07); }

.stage-viz-geometry { display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 8px; padding: 10px; overflow-y: auto; }
.stage-viz-layer-picker { display: grid; grid-column: 1 / -1; gap: 4px; }
.stage-viz-layer-picker span { color: rgba(204, 226, 235, 0.58); font-size: 8px; font-weight: 850; text-transform: uppercase; }
.stage-viz-layer-picker select {
  width: 100%;
  min-height: 32px;
  padding: 5px 28px 5px 8px;
  border: 1px solid rgba(134, 211, 235, 0.22);
  border-radius: 5px;
  color: #e9f8fc;
  background: rgba(78, 185, 215, 0.08);
  font: inherit;
  font-size: 10px;
  font-weight: 750;
}
.stage-viz-geometry > .stage-result-label { grid-column: 1 / -1; }
.stage-viz-geometry > .stage-viz-selection-name { grid-column: 1 / -1; }
.stage-viz-iso-controls { display: none; grid-column: 1 / -1; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; border: 1px solid rgba(126, 218, 241, .22); border-radius: 5px; background: rgba(79, 189, 217, .07); }
.stage-viz-geometry[data-mode="isosurface"] .stage-viz-iso-controls { display: grid; }
.stage-viz-iso-controls label { display: grid; gap: 4px; color: rgba(213,233,240,.65); font-size: 9px; font-weight: 800; }
.stage-viz-iso-controls select,
.stage-viz-iso-controls input { width: 100%; min-height: 30px; box-sizing: border-box; padding: 5px 7px; border: 1px solid rgba(144,190,207,.24); border-radius: 4px; color: #eaf8fc; background: #111f29; font: inherit; font-size: 10px; }
.stage-viz-iso-controls small { grid-column: 1 / -1; color: rgba(205,226,235,.56); font-size: 9px; }
.stage-viz-arbitrary-controls,
.stage-viz-filter-controls,
.stage-viz-stream-controls,
.stage-viz-lic-controls { grid-column: 1 / -1; }
.stage-viz-arbitrary-controls { display: none; grid-template-columns: auto repeat(3, 1fr); align-items: end; gap: 6px; padding: 8px; border: 1px solid rgba(126,218,241,.18); border-radius: 5px; }
.stage-viz-geometry:is([data-mode="cutplane"],[data-mode="lic"])[data-plane="arbitrary"] .stage-viz-arbitrary-controls { display: grid; }
.stage-viz-arbitrary-controls > span { align-self: center; color: rgba(213,233,240,.62); font-size: 9px; font-weight: 900; }
.stage-viz-arbitrary-controls input,
.stage-viz-filter-controls input[type="number"],
.stage-viz-filter-controls select,
.stage-viz-stream-controls input,
.stage-viz-stream-controls select { width: 100%; min-height: 29px; box-sizing: border-box; padding: 4px 6px; border: 1px solid rgba(144,190,207,.24); border-radius: 4px; color: #eaf8fc; background: #111f29; font: inherit; font-size: 10px; }
.stage-viz-filter-controls,
.stage-viz-stream-controls,
.stage-viz-lic-controls { min-width: 0; margin: 0; padding: 8px; border: 1px solid rgba(126,218,241,.18); border-radius: 5px; }
.stage-viz-filter-controls legend,
.stage-viz-stream-controls legend,
.stage-viz-lic-controls legend { padding: 0 5px; color: rgba(219,240,247,.76); font-size: 9px; font-weight: 900; }
.stage-viz-switch { display: flex !important; grid-template-columns: none !important; align-items: center; gap: 7px !important; margin-bottom: 7px; }
.stage-viz-switch input { accent-color: #72daf3; }
.stage-viz-six-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; }
.stage-viz-threshold-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 6px; }
.stage-viz-stream-controls { display: none; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.stage-viz-lic-controls { display: none; grid-template-columns: 1fr 1fr; gap: 7px; }
.stage-viz-lic-controls label { display: grid; gap: 4px; color: rgba(213,233,240,.62); font-size: 9px; font-weight: 800; }
.stage-viz-lic-controls input { width: 100%; accent-color: #72daf3; }
.stage-viz-stream-controls legend { grid-column: 1 / -1; }
.stage-viz-seed-place { grid-column: 1 / -1; min-height: 31px; border: 1px solid rgba(116,220,247,.38); border-radius: 4px; color: #dff8ff; background: rgba(70,190,221,.12); font: inherit; font-size: 10px; font-weight: 900; cursor: pointer; }
.stage-viz-auto-quality { display: grid; gap: 4px; min-width: 0; }
.stage-viz-auto-quality span { color: rgba(213,233,240,.58); font-size: 9px; font-weight: 800; }
.stage-viz-auto-quality strong { min-height: 29px; box-sizing: border-box; padding: 7px 8px; border: 1px solid rgba(116,220,247,.22); border-radius: 4px; color: #8fe9ff; background: rgba(60,177,207,.08); font-size: 10px; white-space: nowrap; }
.stage-viz-geometry[data-mode="streamlines"] .stage-viz-stream-controls { display: grid; }
.stage-viz-geometry[data-mode="lic"] .stage-viz-lic-controls { display: grid; }
.stage-viz-geometry:not([data-mode="cutplane"]):not([data-mode="lic"]) > .stage-viz-plane,
.stage-viz-geometry:not([data-mode="cutplane"]):not([data-mode="lic"]) > label:has(#stageVizPosition) { display: none; }
.stage-viz-geometry label,
.stage-viz-field,
.stage-viz-solid,
.stage-viz-range label { display: grid; gap: 4px; color: rgba(213,233,240,.58); font-size: 9px; font-weight: 800; }
.stage-viz-geometry input[type="range"] { width: 100%; margin: 5px 0 0; accent-color: #72daf3; }
.stage-viz-geometry select,
.stage-viz-field select,
.stage-viz-range input {
  width: 100%;
  min-height: 30px;
  box-sizing: border-box;
  padding: 5px 7px;
  border: 1px solid rgba(144,190,207,.24);
  border-radius: 4px;
  color: #eaf8fc;
  background: #111f29;
  font: inherit;
  font-size: 10px;
}
.stage-viz-update { grid-column: 1 / -1; min-height: 34px; border: 1px solid rgba(128,219,242,.32); border-radius: 5px; color: #dff7fc; background: rgba(65,184,214,.1); font: inherit; font-size: 10px; font-weight: 900; cursor: pointer; }
.stage-viz-advanced { grid-column: 1 / -1; }
.stage-viz-advanced > summary,
.stage-viz-data-tools > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 6px 9px;
  color: rgba(222, 239, 246, 0.7);
  font-size: 9px;
  font-weight: 900;
}
.stage-viz-advanced-body { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 8px 8px; }
.stage-viz-live-note { grid-column: 1 / -1; color: rgba(190, 218, 228, 0.42); font-size: 8px; text-align: right; }

.analysis-stage-experience.is-results .analysis-stage-head,
.analysis-stage-experience.is-results .stage-import-target,
.analysis-stage-experience.is-results .stage-scale-reference,
.analysis-stage-experience.is-results .stage-wind-orbit,
.analysis-stage-experience.is-results .stage-context,
.analysis-stage-experience.is-results .stage-drop-shield {
  display: none !important;
}

.stage-result-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  gap: 10px;
  min-height: 55px;
  padding: 9px 10px 9px 13px;
  border-bottom: 1px solid rgba(151, 194, 211, 0.16);
}

.stage-result-head > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.stage-result-head small,
.stage-result-label {
  color: #7adcf5;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.stage-result-head strong {
  overflow: hidden;
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-result-head button {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 1px solid rgba(162, 204, 221, 0.2);
  border-radius: 6px;
  color: #dff5fb;
  background: rgba(255, 255, 255, 0.05);
  font: inherit;
  font-size: 19px;
  cursor: pointer;
}

.stage-result-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-height: calc(100% - 55px);
  overflow-y: auto;
}

.stage-viz-data-tools {
  margin: 9px 10px 0;
  overflow: hidden;
}
.stage-viz-data-tools-body { display: grid; }
.stage-viz-data-tools .stage-result-section:last-child { border-bottom: 0; }

.stage-viz-workspace.is-collapsed .stage-result-content {
  display: none;
}

.stage-result-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid rgba(151, 194, 211, 0.14);
}

.stage-result-metrics > span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 12px 11px;
}

.stage-result-metrics > span + span {
  border-left: 1px solid rgba(151, 194, 211, 0.14);
}

.stage-result-metrics small {
  color: rgba(213, 233, 240, 0.58);
  font-size: 9px;
  font-weight: 800;
}

.stage-result-metrics strong {
  overflow: hidden;
  color: #f7fcff;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-result-section {
  display: grid;
  gap: 7px;
  padding: 12px;
  border-bottom: 1px solid rgba(151, 194, 211, 0.14);
}

.stage-viz-style { gap: 10px; }
.stage-viz-selection-name { overflow: hidden; color: #f4fbfe; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.stage-viz-color-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; border: 1px solid rgba(146,190,207,.2); border-radius: 6px; background: rgba(255,255,255,.035); }
.stage-viz-color-mode button { min-height: 31px; border: 0; border-radius: 4px; color: rgba(224,239,246,.62); background: transparent; font: inherit; font-size: 10px; font-weight: 900; cursor: pointer; }
.stage-viz-color-mode button.is-active { color: #061820; background: #78ddf7; }
.stage-viz-palette { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.stage-viz-palette button { min-height: 32px; padding: 4px; border: 1px solid rgba(151,194,211,.18); border-radius: 5px; background: rgba(255,255,255,.035); cursor: pointer; }
.stage-viz-palette button.is-active { border-color: #83e5fb; box-shadow: 0 0 0 1px rgba(131,229,251,.25); }
.stage-viz-palette i { display: block; height: 15px; border-radius: 3px; }
.palette-turbo { background: linear-gradient(90deg,#30123b,#466be3,#28c9a6,#f9e721,#e34a33); }
.palette-viridis { background: linear-gradient(90deg,#440154,#3b528b,#21918c,#5ec962,#fde725); }
.palette-coolwarm { background: linear-gradient(90deg,#3b4cc0,#f7f7f7,#b40426); }
.palette-magma { background: linear-gradient(90deg,#000004,#51127c,#b73779,#fc8961,#fcfdbf); }
.palette-grayscale { background: linear-gradient(90deg,#171a1d,#f2f4f5); }
.palette-custom { background: linear-gradient(90deg,#30123b,#28c9a6,#e34a33); }
.stage-viz-color-stops { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.stage-viz-color-stops label { display: grid; gap: 3px; color: rgba(213,233,240,.58); font-size: 8px; font-weight: 800; }
.stage-viz-color-stops input[type="color"] { width: 100%; height: 27px; padding: 2px; border: 1px solid rgba(151,194,211,.24); border-radius: 4px; background: transparent; }
.stage-viz-style:not([data-palette="custom"]) .stage-viz-color-stops { opacity: .35; pointer-events: none; }
.stage-viz-solid { grid-template-columns: 1fr auto; align-items: center; }
.stage-viz-style .stage-viz-solid input[type="color"] { width: 78px !important; height: 30px; padding: 2px; border: 1px solid rgba(151,194,211,.24); border-radius: 4px; background: transparent; }
.stage-viz-solid input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.stage-viz-solid input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 2px; }
.stage-viz-range { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.stage-viz-transfer { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.stage-viz-transfer > label { display: grid; gap: 4px; color: rgba(213,233,240,.58); font-size: 9px; font-weight: 800; }
.stage-viz-transfer > label:last-child { grid-column: 1 / -1; }
.stage-viz-transfer select { width: 100%; min-height: 30px; box-sizing: border-box; padding: 4px 6px; border: 1px solid rgba(151,194,211,.24); border-radius: 4px; color: #eaf8fc; background: #111f29; font: inherit; font-size: 10px; }
.stage-viz-transfer input[type="range"] { width: 100%; accent-color: #73dcf7; }
.stage-viz-opacity-curve { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; min-width: 0; margin: 0; padding: 8px; border: 1px solid rgba(151,194,211,.18); border-radius: 5px; }
.stage-viz-opacity-curve legend { padding: 0 5px; color: rgba(219,240,247,.72); font-size: 9px; font-weight: 900; }
.stage-viz-opacity-curve label { display: grid; gap: 4px; color: rgba(213,233,240,.58); font-size: 8px; font-weight: 800; }
.stage-viz-opacity-curve input { width: 100%; accent-color: #73dcf7; }
.stage-viz-transfer output,
.stage-viz-opacity-curve output,
.stage-viz-lic-controls output { float: right; color: #8be7ff; font-variant-numeric: tabular-nums; }
.stage-viz-apply { min-height: 39px; border: 1px solid #8be8ff; border-radius: 5px; color: #061820; background: #7edff7; font: inherit; font-size: 11px; font-weight: 950; cursor: pointer; }
.stage-viz-style[data-color-mode="solid"] .stage-viz-field,
.stage-viz-style[data-color-mode="solid"] .stage-viz-palette,
.stage-viz-style[data-color-mode="solid"] .stage-viz-color-stops,
.stage-viz-style[data-color-mode="solid"] .stage-viz-range,
.stage-viz-style[data-color-mode="solid"] .stage-viz-transfer > label:not(:last-child),
.stage-viz-style[data-color-mode="solid"] .stage-viz-opacity-curve { opacity: .35; pointer-events: none; }
.stage-viz-style[data-color-mode="contour"] .stage-viz-solid { opacity: .35; pointer-events: none; }

.stage-measurement { gap: 9px; }
.stage-measurement-modes { display: grid; grid-template-columns: repeat(5,1fr); gap: 3px; padding: 3px; border: 1px solid rgba(146,190,207,.2); border-radius: 6px; background: rgba(255,255,255,.035); }
.stage-measurement-modes button { min-height: 30px; border: 0; border-radius: 4px; color: rgba(224,239,246,.62); background: transparent; font: inherit; font-size: 10px; font-weight: 900; cursor: pointer; }
.stage-measurement-modes button.is-active { color: #061820; background: #78ddf7; }
.stage-measurement > label,
.stage-measure-grid label { display: grid; gap: 4px; color: rgba(213,233,240,.58); font-size: 9px; font-weight: 800; }
.stage-measurement select,
.stage-measurement input { width: 100%; min-height: 29px; box-sizing: border-box; padding: 4px 6px; border: 1px solid rgba(144,190,207,.24); border-radius: 4px; color: #eaf8fc; background: #111f29; font: inherit; font-size: 10px; }
.stage-measure-grid { display: none; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.stage-measurement[data-measurement-type="probe"] .stage-measure-probe,
.stage-measurement[data-measurement-type="line"] .stage-measure-line,
.stage-measurement[data-measurement-type="section"] .stage-measure-section,
.stage-measurement[data-measurement-type="area"] .stage-measure-section,
.stage-measurement[data-measurement-type="volume"] .stage-measure-volume { display: grid; }
.stage-measure-run { min-height: 34px; border: 1px solid rgba(128,219,242,.4); border-radius: 5px; color: #dff7fc; background: rgba(65,184,214,.12); font: inherit; font-size: 10px; font-weight: 900; cursor: pointer; }
.stage-measure-result { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px 8px; min-height: 34px; padding: 8px; border: 1px solid rgba(126,218,241,.16); border-radius: 5px; color: rgba(220,239,246,.72); background: rgba(3,12,18,.42); font-size: 9px; line-height: 1.35; }
.stage-measure-result strong { grid-column: 1 / -1; color: #8be7ff; font-size: 10px; }
.stage-measure-chart { display: none; width: 100%; height: 130px; border: 1px solid rgba(126,218,241,.16); border-radius: 5px; }
.stage-state-actions { grid-template-columns: 1fr 1fr; }
.stage-state-actions button { min-height: 34px; border: 1px solid rgba(151,194,211,.22); border-radius: 5px; color: rgba(229,243,248,.8); background: rgba(255,255,255,.04); font: inherit; font-size: 10px; font-weight: 850; cursor: pointer; }
.stage-calculator { gap: 7px; }
.stage-calculator label { display: grid; gap: 4px; color: rgba(213,233,240,.58); font-size: 9px; font-weight: 800; }
.stage-calculator input { width: 100%; min-height: 30px; box-sizing: border-box; padding: 5px 7px; border: 1px solid rgba(144,190,207,.24); border-radius: 4px; color: #eaf8fc; background: #111f29; font: inherit; font-size: 10px; }
.stage-calculator small { color: rgba(210,231,238,.5); font-size: 8px; line-height: 1.4; }
.stage-calculator button { min-height: 33px; border: 1px solid rgba(128,219,242,.38); border-radius: 5px; color: #dff7fc; background: rgba(65,184,214,.12); font: inherit; font-size: 10px; font-weight: 900; cursor: pointer; }

.stage-result-views {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.stage-result-views button {
  min-width: 0;
  min-height: 34px;
  padding: 6px 5px;
  border: 1px solid rgba(151, 194, 211, 0.18);
  border-radius: 5px;
  color: rgba(224, 239, 246, 0.68);
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.stage-result-views button:hover,
.stage-result-views button.is-active {
  border-color: rgba(111, 221, 247, 0.66);
  color: #061820;
  background: #78ddf7;
}

.stage-new-analysis {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  margin: 12px;
  padding: 8px 12px;
  border: 1px solid rgba(121, 226, 251, 0.7);
  border-radius: 6px;
  color: #061820;
  background: #7cdff7;
  font: inherit;
  cursor: pointer;
}

.stage-new-analysis span {
  font-size: 19px;
  line-height: 1;
}

.stage-new-analysis strong {
  font-size: 12px;
}

body.analysis-results-ready .distributed-participation-dock {
  top: auto;
  bottom: 354px;
  transform: none;
}

.stage-icon-button,
.stage-progress button,
.stage-context button,
.stage-import-target,
.stage-wind-handle,
.stage-exit-dialog button {
  font: inherit;
}

.stage-icon-button {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(186, 217, 234, 0.22);
  border-radius: 50%;
  color: #eaf8ff;
  background: rgba(6, 17, 26, 0.72);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  font-size: 28px;
  line-height: 1;
  pointer-events: auto;
  cursor: pointer;
}

.stage-icon-button:hover {
  border-color: rgba(103, 217, 255, 0.72);
  background: rgba(12, 38, 50, 0.9);
}

.stage-identity {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.44);
}

.stage-kicker,
.stage-panel-index {
  color: #79d9f4;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

.stage-identity strong {
  overflow: hidden;
  color: #f7fbfd;
  font-size: 18px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-progress {
  justify-self: end;
  display: grid;
  grid-template-columns: repeat(6, minmax(32px, 1fr));
  width: min(100%, 430px);
  pointer-events: auto;
}

.stage-progress button {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  color: rgba(227, 240, 246, 0.48);
  background: transparent;
  cursor: pointer;
}

.stage-progress button:disabled {
  cursor: default;
}

.stage-progress button span {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(180, 209, 223, 0.28);
  border-radius: 50%;
  background: rgba(7, 19, 29, 0.76);
  font-size: 10px;
  font-weight: 900;
}

.stage-progress button i {
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(143, 186, 205, 0.22);
}

.stage-progress button:first-child i { left: 50%; }
.stage-progress button:last-child i { right: 50%; }

.stage-progress button.is-current span,
.stage-progress button.is-complete span {
  border-color: #67d9ff;
  color: #04151c;
  background: #67d9ff;
  box-shadow: 0 0 0 4px rgba(103, 217, 255, 0.12);
}

.stage-progress button.is-complete i,
.stage-progress button.is-current i {
  background: rgba(103, 217, 255, 0.58);
}

.stage-import-target {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(460px, calc(100vw - 42px));
  min-height: 218px;
  padding: 28px;
  transform: translate(-50%, -48%);
  border: 1px solid rgba(132, 214, 239, 0.38);
  border-radius: 50%;
  color: #edfaff;
  background: rgba(5, 18, 27, 0.42);
  box-shadow: inset 0 0 0 10px rgba(63, 142, 168, 0.06), 0 28px 70px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
  cursor: pointer;
  pointer-events: auto;
  will-change: left, top;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.stage-import-target:hover,
.stage-import-target:focus-visible,
.stage-import-target:active {
  transform: translate(-50%, -48%);
}

.stage-import-target:hover,
.stage-import-target:focus-visible {
  border-color: rgba(103, 217, 255, 0.85);
  background: rgba(5, 24, 35, 0.58);
}

.stage-import-mark {
  position: relative;
  display: block;
  width: 44px;
  height: 44px;
  border: 2px solid #78def9;
  border-radius: 50%;
}

.stage-import-mark::before,
.stage-import-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: #78def9;
  transform: translate(-50%, -50%);
}

.stage-import-mark::before { width: 18px; height: 2px; }
.stage-import-mark::after { width: 2px; height: 18px; }

.stage-import-target strong { font-size: 22px; }
.stage-import-target > span:not(.stage-import-mark) { color: rgba(229, 244, 250, 0.76); font-size: 14px; }
.stage-import-target small { max-width: 310px; color: rgba(203, 224, 234, 0.58); font-size: 11px; line-height: 1.45; }

.stage-scale-reference {
  position: absolute;
  right: 130px;
  top: 50%;
  z-index: 3;
  display: none;
  align-items: center;
  gap: 8px;
  transform: translateY(-50%);
  color: rgba(232, 247, 252, 0.72);
  font-size: 11px;
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.analysis-stage-experience[data-stage="scale"] .stage-scale-reference,
.analysis-stage-experience[data-stage="orient"] .stage-scale-reference {
  display: flex;
}

.stage-scale-reference i {
  display: block;
  width: 1px;
  height: 82px;
  background: linear-gradient(180deg, transparent, #87dff6 15%, #87dff6 85%, transparent);
}

.stage-wind-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  display: none;
  width: min(58vw, 650px);
  aspect-ratio: 1;
  transform: translate(-50%, -53%) rotateX(58deg);
  border: 1px dashed rgba(109, 211, 241, 0.42);
  border-radius: 50%;
  box-shadow: 0 0 46px rgba(70, 189, 224, 0.08);
  pointer-events: none;
}

.stage-wind-orbit.is-visible { display: block; }

.stage-wind-axis {
  position: absolute;
  color: rgba(212, 237, 247, 0.48);
  font-size: 10px;
  font-weight: 900;
  transform: rotateX(-58deg);
}

.axis-x-positive { left: -24px; top: 50%; }
.axis-x-negative { right: -24px; top: 50%; }
.axis-z-positive { left: 50%; bottom: -17px; }
.axis-z-negative { left: 50%; top: -17px; }

.stage-wind-handle {
  position: absolute;
  width: 54px;
  height: 54px;
  padding: 0;
  transform: translate(-50%, -50%) rotateX(-58deg);
  border: 2px solid rgba(218, 249, 255, 0.96);
  border-radius: 50%;
  background: #42c6e4;
  box-shadow: 0 0 0 8px rgba(74, 202, 240, 0.14), 0 12px 28px rgba(0,0,0,0.34);
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
}

.stage-wind-handle:active { cursor: grabbing; }

.stage-wind-handle span {
  position: absolute;
  left: 11px;
  top: 25px;
  width: 25px;
  height: 2px;
  background: #08242e;
}

.stage-wind-handle i {
  position: absolute;
  right: 10px;
  top: 19px;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid #08242e;
}

.stage-wind-orbit.is-vertical .stage-wind-handle { opacity: 0.36; }

.stage-context {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 7;
  display: grid;
  width: min(840px, calc(100vw - 36px));
  min-height: 130px;
  transform: translateX(-50%);
  border: 1px solid rgba(151, 196, 214, 0.24);
  border-radius: 8px;
  background: rgba(6, 16, 24, 0.88);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
  pointer-events: auto;
  overflow: hidden;
}

.stage-panel {
  display: none;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-height: 78px;
  padding: 15px 18px 8px;
}

.stage-panel.is-active { display: grid; }

.stage-panel-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.stage-panel-copy strong {
  font-size: 16px;
  line-height: 1.25;
}

.stage-panel-copy small {
  overflow: hidden;
  color: rgba(215, 232, 240, 0.64);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(64px, 1fr);
  padding: 3px;
  border: 1px solid rgba(147, 192, 209, 0.22);
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
}

.stage-segmented button,
.stage-axis-directions button {
  min-height: 36px;
  padding: 6px 12px;
  border: 0;
  border-radius: 4px;
  color: rgba(224, 239, 246, 0.66);
  background: transparent;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.stage-segmented button.is-active,
.stage-axis-directions button.is-active {
  color: #061820;
  background: #78ddf7;
}

.stage-orient-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stage-ground-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  cursor: pointer;
}

.stage-ground-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.stage-ground-toggle > span {
  position: relative;
  width: 42px;
  height: 22px;
  border: 1px solid rgba(151, 190, 207, 0.34);
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
}

.stage-ground-toggle > span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #b5c8d0;
  transition: transform 180ms ease, background 180ms ease;
}

.stage-ground-toggle input:checked + span {
  border-color: #62d5f2;
  background: rgba(55, 190, 226, 0.34);
}

.stage-ground-toggle input:checked + span::after {
  transform: translateX(20px);
  background: #86e7ff;
}

.stage-ground-toggle b {
  font-size: 12px;
}

.stage-quiet-button {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid rgba(154, 194, 211, 0.24);
  border-radius: 5px;
  color: rgba(227, 240, 246, 0.8);
  background: rgba(255,255,255,0.04);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.stage-wind-panel {
  grid-template-columns: minmax(240px, 1fr) minmax(246px, auto) 92px 92px;
  gap: 12px;
}

.stage-axis-directions {
  display: grid;
  grid-template-columns: repeat(6, minmax(38px, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(146, 190, 207, 0.2);
  border-radius: 6px;
  background: rgba(255,255,255,0.035);
}

.stage-axis-directions button {
  min-width: 38px;
  padding-inline: 7px;
}

.stage-axis-directions button:focus-visible {
  outline: 2px solid #9cecff;
  outline-offset: 2px;
}

.stage-number-field {
  display: grid;
  gap: 4px;
  color: rgba(215, 234, 242, 0.64);
  font-size: 10px;
  font-weight: 800;
}

.stage-number-field > span:last-child {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stage-number-field input {
  width: 62px;
  min-height: 34px;
  box-sizing: border-box;
  padding: 5px 7px;
  border: 1px solid rgba(139, 190, 210, 0.28);
  border-radius: 4px;
  outline: 0;
  color: #effbff;
  background: rgba(255,255,255,0.06);
  font: inherit;
  font-size: 12px;
}

.stage-number-field b { color: rgba(221, 240, 247, 0.76); font-size: 10px; }

.stage-mesh-panel {
  grid-template-columns: minmax(220px, 0.88fr) minmax(310px, 1.12fr);
}

.stage-domain-panel {
  grid-template-columns: minmax(220px, 0.82fr) minmax(390px, 1.18fr);
}

.stage-domain-controls {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.stage-domain-mode { justify-self: end; }

.stage-domain-auto-note {
  color: rgba(215, 232, 240, 0.7);
  font-size: 10px;
  text-align: right;
}

.stage-domain-manual {
  display: grid;
  grid-template-columns: repeat(3, minmax(105px, 1fr));
  gap: 5px 10px;
}

.stage-domain-manual[hidden] { display: none; }

.stage-domain-manual label {
  display: grid;
  grid-template-columns: 22px minmax(48px, 1fr) 40px;
  align-items: center;
  gap: 5px;
  color: rgba(225, 240, 247, 0.84);
  font-size: 10px;
}

.stage-domain-manual input { width: 100%; accent-color: #78ddf7; }
.stage-domain-manual output { text-align: right; font-variant-numeric: tabular-nums; }

.stage-mesh-control {
  display: grid;
  gap: 5px;
}

.stage-mesh-readout,
.stage-range-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.stage-mesh-readout strong { color: #f2fbff; font-size: 14px; }
.stage-mesh-readout span {
  padding: 3px 7px;
  border: 1px solid rgba(131, 218, 244, 0.28);
  border-radius: 4px;
  color: #86e5ff;
  background: rgba(52, 176, 211, 0.1);
  font-size: 10px;
  font-weight: 900;
}
.stage-mesh-readout span.is-distributed { color: #ffd68d; border-color: rgba(255, 190, 87, 0.34); background: rgba(255, 166, 42, 0.1); }

#stageMeshRange {
  width: 100%;
  height: 20px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: ew-resize;
}

#stageMeshRange::-webkit-slider-runnable-track {
  height: 7px;
  border-radius: 4px;
  background: linear-gradient(90deg, #51cce9 0 var(--stage-range-progress, 21.2%), rgba(148, 186, 202, 0.2) var(--stage-range-progress, 21.2%) 100%);
}

#stageMeshRange::-webkit-slider-thumb {
  width: 19px;
  height: 19px;
  margin-top: -6px;
  appearance: none;
  border: 3px solid #071b24;
  border-radius: 50%;
  background: #8be9ff;
  box-shadow: 0 0 0 1px rgba(139, 233, 255, 0.8), 0 3px 9px rgba(0,0,0,0.32);
}

.stage-range-labels { color: rgba(205, 226, 235, 0.5); font-size: 9px; font-weight: 800; }

.stage-ready-panel {
  grid-template-columns: minmax(230px, 1fr) auto auto;
}

.stage-analysis-mode { grid-auto-columns: minmax(82px, 1fr); }

.stage-run-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 132px;
  min-height: 46px;
  padding: 8px 17px;
  border: 1px solid #91e9ff;
  border-radius: 6px;
  color: #031219;
  background: #79def7;
  box-shadow: 0 10px 26px rgba(62, 192, 226, 0.24);
  font-weight: 950;
  cursor: pointer;
}

.stage-run-button i {
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid #031219;
}

.stage-navigation {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 122px;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-top: 1px solid rgba(142, 185, 202, 0.15);
}

.stage-navigation > span {
  overflow: hidden;
  color: rgba(209, 229, 237, 0.56);
  font-size: 10px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-back-button,
.stage-confirm-button {
  min-height: 32px;
  border: 0;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.stage-back-button {
  justify-self: start;
  color: rgba(226, 240, 246, 0.72);
  background: transparent;
}

.stage-confirm-button {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 112px;
  color: #071820;
  background: #86e4fa;
}

.stage-confirm-button b {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #86e4fa;
  background: #0a2833;
  font-size: 11px;
}

.stage-drop-shield {
  position: absolute;
  inset: 18px;
  z-index: 20;
  display: none;
  place-content: center;
  justify-items: center;
  gap: 8px;
  border: 2px dashed rgba(123, 225, 255, 0.82);
  border-radius: 8px;
  color: #effcff;
  background: rgba(4, 21, 29, 0.88);
  backdrop-filter: blur(12px);
}

.analysis-stage-experience.is-file-over .stage-drop-shield { display: grid; }
.stage-drop-shield strong { font-size: 24px; }
.stage-drop-shield span { color: #7fe5ff; font-weight: 900; }

.stage-exit-dialog {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(1, 7, 11, 0.68);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

.stage-exit-dialog.is-open { display: grid; }

.stage-exit-dialog > div {
  width: min(440px, calc(100vw - 36px));
  box-sizing: border-box;
  padding: 24px;
  border: 1px solid rgba(150, 204, 224, 0.26);
  border-radius: 8px;
  background: #0b1821;
  box-shadow: 0 28px 80px rgba(0,0,0,0.44);
}

.stage-exit-dialog h2 { margin: 6px 0 8px; font-size: 22px; }
.stage-exit-dialog p { margin: 0; color: rgba(218,235,242,0.66); font-size: 13px; line-height: 1.5; }
.stage-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.stage-dialog-actions button { min-height: 36px; padding: 7px 12px; border: 1px solid rgba(146,190,207,0.24); border-radius: 5px; color: #dceff6; background: rgba(255,255,255,0.05); cursor: pointer; }
.stage-dialog-actions button.primary { border-color: #7ddff8; color: #061820; background: #7ddff8; font-weight: 900; }

.analysis-stage-experience.is-running .analysis-stage-head,
.analysis-stage-experience.is-running .stage-context,
.analysis-stage-experience.is-running .stage-wind-orbit,
.analysis-stage-experience.is-running .stage-scale-reference {
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

@media (max-width: 760px) {
  .analysis-stage-experience[data-stage="domain"] .stage-object-manager { display: none; }
  body.analysis-stage-domain .distributed-participation-dock {
    top: 116px;
    right: 6px;
    bottom: auto;
    transform: none;
  }

  .stage-viz-workspace {
    left: 8px;
    bottom: 8px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: calc(100vw - 16px);
    height: min(58vh, 472px);
  }

  .analysis-stage-experience.is-results .stage-object-manager { top: 8px; left: 8px; width: calc(50vw - 12px); max-height: 32vh; }
  .analysis-stage-experience.is-results .stage-result-metrics-overlay { top: 8px; right: 8px; width: calc(50vw - 12px); }
  .stage-result-metrics-overlay .stage-result-metrics > span { padding: 9px 6px; }
  .stage-result-metrics-overlay .stage-result-metrics strong { font-size: 11px; }
  .analysis-stage-experience.is-results .stage-viz-launcher { left: 8px; bottom: 8px; }

  .stage-viz-browser {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(72px, 1fr) auto;
    overflow-y: auto;
  }

  .stage-flow-submenu { top: calc(100% + 5px); left: 0; width: 100%; }
  .stage-viz-add { grid-template-columns: 1fr; overflow: visible; border-right: 0; border-bottom: 1px solid rgba(151, 194, 211, 0.14); }
  .stage-viz-add > button,
  .stage-flow-menu-trigger { min-height: 31px; }
  .stage-viz-layer-list { max-height: 104px; border-right: 0; border-bottom: 1px solid rgba(151, 194, 211, 0.14); }
  .stage-viz-geometry { grid-template-columns: 1fr 1fr; }
  .stage-viz-six-grid,
  .stage-viz-threshold-grid,
  .stage-viz-stream-controls { grid-template-columns: 1fr 1fr; }
  .stage-viz-geometry > .stage-result-label,
  .stage-viz-update { grid-column: 1 / -1; }
  .stage-viz-geometry label { min-width: 0; }
  .stage-result-content { max-height: calc(100% - 55px); }

  .stage-result-metrics > span {
    padding: 10px 8px;
  }

  .stage-result-section {
    padding: 10px;
  }

  body.analysis-results-ready .distributed-participation-dock {
    top: auto;
    right: 6px;
    bottom: calc(min(58vh, 472px) + 18px);
    transform: none;
    transform-origin: right bottom;
  }

  .analysis-stage-head {
    top: 10px;
    left: 10px;
    right: 92px;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 9px;
  }

  .stage-icon-button { width: 34px; height: 34px; font-size: 24px; }
  .stage-identity strong { font-size: 14px; }
  .stage-progress { grid-column: 1 / -1; justify-self: stretch; width: 100%; }
  .stage-progress button span { width: 20px; height: 20px; }
  .stage-progress button i { top: 10px; }
  .stage-import-target { min-height: 190px; padding: 22px; border-radius: 46%; }
  .stage-import-target strong { font-size: 18px; }
  .stage-context { bottom: 8px; width: calc(100vw - 16px); min-height: 176px; }
  .stage-panel,
  .stage-panel.is-active,
  .stage-wind-panel,
  .stage-mesh-panel,
  .stage-domain-panel,
  .stage-ready-panel {
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: 116px;
    padding: 12px 12px 8px;
  }
  .stage-panel-copy small { white-space: normal; }
  .stage-segmented { width: 100%; box-sizing: border-box; }
  .stage-orient-actions { justify-content: space-between; }
  .stage-wind-panel { grid-template-columns: 1fr 1fr; }
  .stage-wind-panel .stage-panel-copy { grid-column: 1 / -1; }
  .stage-axis-directions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    order: 2;
  }
  .stage-number-field { order: 3; }
  .stage-mesh-control { min-width: 0; }
  .stage-domain-mode { justify-self: stretch; }
  .stage-domain-auto-note { text-align: left; }
  .stage-domain-manual { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage-ready-panel { grid-template-columns: 1fr auto; }
  .stage-ready-panel .stage-panel-copy { grid-column: 1 / -1; }
  .stage-run-button { min-width: 128px; }
  .stage-navigation { grid-template-columns: 76px minmax(0, 1fr) 88px; padding: 0 7px; }
  .stage-navigation > span { display: none; }
  .stage-confirm-button { min-width: 82px; }
  .stage-confirm-button span { display: none; }
  .stage-wind-orbit { width: min(95vw, 520px); }
  .stage-scale-reference { right: 96px; top: 44%; }
  .distributed-participation-dock { right: 6px; top: 38%; transform: translateY(-50%) scale(0.9); transform-origin: right center; }
}

@media (max-height: 650px) {
  .stage-context { bottom: 6px; }
  .stage-panel { min-height: 66px; padding-top: 9px; }
  .stage-navigation { min-height: 36px; }
  .stage-import-target { top: 46%; min-height: 176px; }
}

@media (prefers-reduced-motion: reduce) {
  .analysis-stage-experience *,
  .analysis-stage-experience *::before,
  .analysis-stage-experience *::after { transition: none !important; animation: none !important; }
}

@media (max-width: 760px) {
  .stage-viz-workspace[data-panel-mode="create"],
  .stage-viz-workspace[data-panel-mode="edit"] {
    top: auto;
    left: 8px;
    right: auto;
    bottom: 8px;
    width: calc(100vw - 16px);
    height: auto;
    max-height: 68vh;
    overflow-y: auto;
  }

  .stage-viz-workspace[data-panel-mode="create"] { grid-template-columns: 1fr; }
  .stage-viz-workspace[data-panel-mode="create"] .stage-viz-add { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage-viz-workspace[data-panel-mode="edit"] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stage-viz-guide-step { grid-template-columns: 1fr; }
  .stage-viz-guide-step label { grid-column: 1; }
}
