#matterport-panel[hidden] { display: none }
#matterport-panel {
  position: fixed; inset: 0 0 0 calc(var(--ifc-split, 50%) + 4px);
  z-index: 1; display: flex; flex-direction: column; color: #eef3f7;
  background: #182129; overflow: hidden; box-shadow: 0 3px 16px #0007;
}
#matterport-panel .matterport-controls {
  position: absolute; z-index: 1; inset: 10px 10px auto; max-width: max-content;
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px 11px;
  background: #1c2229ed; border: 1px solid #38434f; border-radius: 12px;
  padding: 6px 8px 6px 12px; min-height: 28px;
}
#matterport-panel .matterport-controls label { display: inline-flex; align-items: center; gap: 5px }
#matterport-panel .matterport-controls button {
  margin-left: auto; padding: 3px 8px; border: 0; border-radius: 5px; background: transparent; color: inherit; cursor: pointer
}
#matterport-panel .matterport-controls button:is(:hover,:focus-visible) { background: #ffffff21 }
#matterport-status { flex: 1 1 100%; font-size: .78rem; color: #c3d3df }
#matterport-panel iframe { width: 100%; min-height: 0; flex: 1 1 auto; border: 0 }
.matterport-split header { right: calc(100% - var(--ifc-split, 50%) + 14px) }
.matterport-split header nav { flex-wrap: wrap; min-width: 0 }
.matterport-split .stage { right: calc(100% - var(--ifc-split, 50%) + 4px) }
.matterport-split #view-cube[data-dock="right"] { right: calc(100% - var(--ifc-split, 50%) + 16px) }
.matterport-split .tools { max-width: calc(100% - 24px) }
#matterport-toggle[aria-pressed="true"], #orbit-mode[aria-pressed="true"] { background: #40586f }
#matterport-divider {
  position: fixed; top: 0; bottom: 0; left: calc(var(--ifc-split, 50%) - 4px); width: 8px;
  z-index: 3; cursor: ew-resize; touch-action: none; background: #27333f;
}
#matterport-divider:is(:hover, :focus-visible, :active) { background: #71ceff }
#matterport-divider[hidden] { display: none }
@media (max-width: 760px) {
  #matterport-divider { display: none }
  .matterport-split .stage { right: 0; bottom: auto; height: 55dvh }
  .matterport-split #view-cube[data-dock="right"] { right: 12px }
  .matterport-split header { right: 10px }
  #matterport-panel { inset: 55dvh 0 0 }
}

#linked-view-mode:disabled { display: none }
#matterport-alignment summary { padding: 3px 6px }
.alignment-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; padding: 6px }
#matterport-alignment[open] { flex-basis: 100%; order: 1 }
.alignment-fields label { justify-content: space-between }
.alignment-fields input[type="number"] { width: 5rem; min-height: 29px }
.alignment-fields input[type="range"] { width: 5rem }
/* In overlay mode the iframe, IFC canvas and controls need separate layers. */
.matterport-overlay #matterport-panel:not([hidden]) { display: contents }
.matterport-overlay #matterport-panel iframe { position: fixed; inset: 0; height: 100%; z-index: 0 }
.matterport-overlay #matterport-panel .matterport-controls {
  position: fixed; z-index: 4; inset-inline: calc(50% + 6px) 10px;
  width: auto; max-width: none;
}
.matterport-overlay #matterport-divider { display: none }
.matterport-overlay .stage { inset: 0; height: 100dvh; z-index: 2; pointer-events: none }
.matterport-overlay .stage canvas { pointer-events: none; opacity: var(--ifc-overlay-opacity, .45) }
.matterport-overlay .cad-vector-layer, .matterport-overlay .stage #view-cube { visibility: hidden }
.matterport-overlay header { z-index: 4; right: calc(50% + 6px) }
@media(max-width:760px) {
  .matterport-overlay header { right: 10px }
  .matterport-overlay #matterport-panel .matterport-controls {
    inset: var(--mobile-menu-top,100px) 10px auto;
  }
  .matterport-overlay #matterport-panel .alignment-fields input[type="number"] { width: min(16vw, 5rem) }
}

/* Each pane owns its toolbar and keeps it within its visible bounds. */
.matterport-split:not(.matterport-overlay) {
  --ifc-left: 0px; --ifc-right: calc(100% - var(--ifc-split,50%) + 4px);
  --ifc-top: 0px; --ifc-bottom: 0px;
  --mp-left: calc(var(--ifc-split,50%) + 4px); --mp-right: 0px;
  --mp-top: 0px; --mp-bottom: 0px;
}
.matterport-split[data-split-axis="columns"][data-split-swapped="true"]:not(.matterport-overlay){
  --ifc-left: calc(var(--ifc-split,50%) + 4px); --ifc-right: 0px;
  --mp-left: 0px; --mp-right: calc(100% - var(--ifc-split,50%) + 4px);
}
.matterport-split[data-split-axis="rows"]:not(.matterport-overlay){
  --ifc-left: 0px; --ifc-right: 0px; --mp-left: 0px; --mp-right: 0px;
  --ifc-bottom: calc(100% - var(--ifc-split,50%) + 4px);
  --mp-top: calc(var(--ifc-split,50%) + 4px);
}
.matterport-split[data-split-axis="rows"][data-split-swapped="true"]:not(.matterport-overlay){
  --ifc-top: calc(var(--ifc-split,50%) + 4px); --ifc-bottom: 0px;
  --mp-top: 0px; --mp-bottom: calc(100% - var(--ifc-split,50%) + 4px);
}
.matterport-split:not(.matterport-overlay) .stage{
  inset:var(--ifc-top) var(--ifc-right) var(--ifc-bottom) var(--ifc-left);
  height:auto;
}
.matterport-split:not(.matterport-overlay) #matterport-panel{
  inset:var(--mp-top) var(--mp-right) var(--mp-bottom) var(--mp-left);
}
.matterport-split:not(.matterport-overlay) header{
  top:calc(var(--ifc-top) + 8px);
  left:calc(var(--ifc-left) + 8px);
  right:calc(var(--ifc-right) + 8px);
}
.matterport-split:not(.matterport-overlay) #view-cube[data-dock="right"]{
  right:calc(var(--ifc-right) + 12px + var(--cube-panel-inset,0px));
}
.matterport-split:not(.matterport-overlay) #view-cube[data-dock="left"]{
  left:calc(var(--ifc-left) + 12px + var(--cube-panel-inset,0px));
}
#matterport-panel .matterport-controls button:not(#matterport-close){margin-left:0}
.matterport-split:not(.matterport-overlay) #matterport-divider:not([hidden]){display:block}
.matterport-split[data-split-axis="rows"] #matterport-divider{
  inset:calc(var(--ifc-split,50%) - 4px) 0 auto;
  width:auto;height:8px;cursor:ns-resize;
}
@media(max-width:760px){
  .matterport-split:not(.matterport-overlay) aside:not([hidden]){
    left:calc(var(--ifc-left) + 6px)!important;right:calc(var(--ifc-right) + 6px)!important;
    bottom:calc(var(--ifc-bottom) + 56px)!important;
    max-height:max(0px,calc(100dvh - var(--ifc-bottom) - var(--mobile-menu-top,100px) - 62px))!important;
  }
  .matterport-split:not(.matterport-overlay) #model-visibility .model-choices,
  .matterport-split:not(.matterport-overlay) #header-search #results:not(:empty){
    left:calc(var(--ifc-left) + 10px);
    max-width:calc(100vw - var(--ifc-left) - var(--ifc-right) - 20px);
  }
}

.viewer-view-tools { display: inline-flex; gap: 2px }
.matterport-split .viewer-view-tools { display: inline-flex }
#linked-view-mode[hidden], #linked-view-mode[hidden] + .viewer-dropdown { display: none!important }
.viewer-view-tools button[aria-pressed="true"], #measure-toggle[aria-pressed="true"] { background: #e5f4ff; color: #15212d }
.viewer-guides { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; z-index:3; overflow:hidden }
.viewer-guides [data-axis] { pointer-events:all; cursor:grab; touch-action:none }
.viewer-guides [data-axis]:active { cursor:grabbing }
.viewer-measure-result { position:absolute; z-index:4; left:12px; bottom:68px; padding:.45rem .7rem; background:#182129; color:white; border-radius:6px; pointer-events:none }
#visual-alignment { grid-column:1 / -1; justify-self:start }

.viewer-measuring .stage canvas { cursor:crosshair; pointer-events:auto }
#measure-toggle, .viewer-view-tools button { align-self:stretch }

.matterport-split .tools {
  left: 8px; right: 8px; max-width: none;
  flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; pointer-events: auto;
}
.matterport-split .tools > * { flex: 0 0 auto }
.matterport-split .mode-note { left: 8px; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 50px) }
.matterport-overlay.viewer-aligning .stage #view-cube { visibility: visible; pointer-events: auto }
.viewer-view-tools button { height: 38px; min-height: 38px }

.matterport-split header { display:grid; grid-template-columns:minmax(0,1fr); gap:5px }
.matterport-split header nav {
  flex-wrap:nowrap; justify-content:flex-start; overflow-x:auto; overflow-y:hidden;
  scrollbar-width:none; overscroll-behavior-inline:contain; padding-block:1px 3px;
}
.matterport-split header nav > * { flex:0 0 auto }
.matterport-split header #header-search[data-open] { width:min(220px,45vw) }
.matterport-split header #model-visibility .model-choices,
.matterport-split header #header-search #results:not(:empty) {
  position:fixed; top:var(--mobile-menu-top,100px); left:calc(var(--ifc-left,0px) + 10px); right:auto;
  max-width:calc(100vw - var(--ifc-left,0px) - var(--ifc-right,0px) - 20px);
}
aside:not([hidden]), #mode-note, .viewer-measure-result, .matterport-opacity,
#matterport-panel .matterport-controls {
  background:rgba(27,34,42,.77); backdrop-filter:blur(14px);
}
#legend-toggle[hidden], #mode-note[hidden], #measure-result[hidden] { display:none }
#mode-note {
  pointer-events:auto; padding:.55rem .75rem;
  max-height:32%; overflow:auto; min-width:8rem; z-index:4;
}
#mode-note > .feed-key-entry, .feed-key-row { display:flex; flex-direction:column; align-items:flex-start }
#mode-note > .feed-key-entry { flex-direction:row; margin:.2rem 0; align-items:center }
.matterport-overlay .tools { bottom:calc(max(12px, env(safe-area-inset-bottom)) + 120px) }
.matterport-overlay #mode-note, .matterport-overlay .viewer-measure-result {
  bottom:calc(max(12px, env(safe-area-inset-bottom)) + 168px);
}
#matterport-panel .matterport-controls {
  right:auto; width:max-content; max-width:min(320px,calc(100% - 20px));
  gap:4px; padding:5px; max-height:calc(100% - 126px); overflow:auto;
}
.matterport-overlay #matterport-panel .matterport-controls { max-width:min(320px,calc(50% - 20px)) }
@media(max-width:760px) {
  .matterport-overlay #matterport-panel .matterport-controls { max-width:min(320px,calc(100% - 20px)) }
}
#matterport-panel .matterport-controls.collapsed > :not(#matterport-controls-toggle):not(#matterport-close) { display:none }
#matterport-panel .matterport-controls button, .matterport-controls .mp-icon {
  height:44px; min-height:44px; min-width:44px; justify-content:center;
  border-radius:6px; margin:0; padding:0 7px;
}
.matterport-controls .mp-icon { position:relative; display:inline-grid; place-items:center; cursor:pointer }
.mp-icon input { position:absolute; inset:0; width:100%; height:100%; opacity:0; margin:0; cursor:pointer }
.mp-icon svg { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.7; pointer-events:none }
.mp-icon:has(input:checked) { background:#40586f }
.mp-icon:has(input:disabled) { opacity:.45 }
.mp-icon:has(input:focus-visible) { outline:2px solid #71ceff }
.matterport-opacity {
  display:flex; align-items:center; gap:.5rem; position:absolute; z-index:2;
  bottom:calc(59px + env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%);
  padding:.27rem .65rem; border-radius:20px; white-space:nowrap; font-size:.82rem;
}
.matterport-opacity input { width:clamp(65px,16vw,132px) }
.matterport-overlay .matterport-opacity {
  position: fixed; z-index: 4;
  bottom:calc(max(12px, env(safe-area-inset-bottom)) + 168px);
}

#matterport-panel .matterport-controls {
  background:var(--viewer-panel-bg); backdrop-filter:var(--viewer-panel-blur);
  border:1px solid transparent; border-radius:12px;
  padding:.45rem .65rem;
}
#matterport-panel .matterport-controls button, #matterport-panel .matterport-controls .mp-icon {
  background:var(--viewer-button-bg); backdrop-filter:var(--viewer-button-blur);
  border-radius:8px; border:1px solid transparent;
}
#matterport-panel .matterport-controls :is(button:hover,.mp-icon:hover) {
  background:var(--viewer-button-hover);
}
#matterport-panel .matterport-controls :is(button:focus-visible,.mp-icon:has(input:focus-visible)) {
  outline:none; border-color:var(--viewer-button-focus);
}
#matterport-controls-toggle .chevron { transition:transform .16s ease }
#matterport-controls-toggle[aria-expanded="true"] .chevron {
  transform:translateY(.12rem) rotate(225deg);
}
@media (prefers-reduced-motion:reduce) {
  #matterport-controls-toggle .chevron { transition:none }
}
#matterport-panel .matterport-controls :is(button[aria-pressed="true"],.mp-icon:has(input:checked)) {
  background:#40586f;
}
.matterport-overlay header, .matterport-overlay #matterport-panel .matterport-controls { top:52px }
@media(max-width:760px) {
  .matterport-overlay #matterport-panel .matterport-controls { top:var(--mobile-menu-top,150px) }
}

/* The scan and the IFC canvas occupy the same rectangle between our control rows. */
#overlay-toolbar:not([hidden]) {
  position:fixed; inset:auto 0 0; z-index:5;
  display:flex; align-items:center; gap:6px; flex-wrap:wrap;
  padding:5px 8px max(5px,env(safe-area-inset-bottom));
  background:#1c2229ed; border-top:1px solid #38434f; backdrop-filter:blur(14px);
}
#overlay-toolbar .tools {
  position:static; flex:1 1 100%; min-width:0; padding:0;
}
#overlay-toolbar :is(.matterport-opacity,.mode-note,.viewer-measure-result) {
  position:static; inset:auto; transform:none; max-height:16dvh;
}
#overlay-toolbar .matterport-opacity { margin-inline:auto; }
#overlay-toolbar :is(.mode-note,.viewer-measure-result) { overflow:auto; }
.matterport-overlay { --overlay-side:0px; --overlay-left:0px; --overlay-right:0px; }
.matterport-overlay.viewer-aligning { --overlay-right:min(132px,28vw); }
.matterport-overlay.viewer-aligning:has(#view-cube[data-dock="left"]) {
  --overlay-left:min(132px,28vw); --overlay-right:0px;
}
.matterport-overlay .stage,
.matterport-overlay #matterport-panel iframe {
  inset:var(--overlay-top,120px) var(--overlay-right) var(--overlay-bottom,96px) var(--overlay-left);
  width:auto; height:auto; min-height:0;
}
.matterport-overlay #matterport-panel iframe {
  width:calc(100% - var(--overlay-left) - var(--overlay-right));
  height:calc(100% - var(--overlay-top,120px) - var(--overlay-bottom,96px));
}
.matterport-overlay header, .matterport-overlay #matterport-panel .matterport-controls { top:8px }
.matterport-overlay #matterport-panel .matterport-controls { max-height:min(29dvh,240px) }
.matterport-overlay.viewer-aligning .stage #view-cube[data-dock="right"] { right:6px }
.matterport-overlay.viewer-aligning .stage #view-cube[data-dock="left"] { left:6px }
#split-input-mode[hidden], .matterport-split #orbit-mode[hidden] { display:none }
#split-input-mode { width:38px; height:38px; flex:none }
#split-input-mode[aria-pressed="true"] { background:#40586f }
.matterport-overlay.overlay-ifc-input .stage canvas { pointer-events:auto }
#matterport-panel .matterport-controls button svg {
  width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.7;
  stroke-linecap:round; stroke-linejoin:round; pointer-events:none;
}
.matterport-split:not(.matterport-overlay) #matterport-panel .matterport-controls {
  position:relative; inset:auto; flex:0 0 auto; box-sizing:border-box;
  max-width:calc(100% - 16px); margin:8px; max-height:40%;
}
.matterport-split:not(.matterport-overlay) #matterport-panel .matterport-opacity { display:none }
.matterport-split #matterport-divider:not([hidden]) { z-index:2 }
#matterport-panel.split-resizing iframe { pointer-events:none }
.matterport-split aside:not([hidden]) { z-index:4 }
body.matterport-split > header { z-index:5 }
.matterport-split #matterport-divider::after {
  content:""; position:absolute; inset:0 -5px;
}
.matterport-split[data-split-axis="rows"] #matterport-divider::after { inset:-5px 0 }
.comparison-documents {
  width:min(1200px,calc(100vw - 24px)); height:min(900px,calc(100dvh - 24px));
  padding:0; color:#eef3f7; background:#1c2229ed; border:1px solid #44515d;
  border-radius:12px; backdrop-filter:blur(16px);
}
.comparison-documents[open] { display:flex; flex-direction:column }
.comparison-documents::backdrop { background:#0a1018aa; backdrop-filter:blur(4px) }
.comparison-documents .comparison-heading {
  position:static; padding:8px 12px; gap:8px; border:0; border-bottom:1px solid #44515d;
  border-radius:0; display:flex; flex-wrap:wrap; align-items:center;
}
.comparison-heading h2 { margin:0 auto 0 0; font-size:1rem }
.comparison-heading form { margin:0 }
.comparison-download { color:#b8e2ff; padding:8px }
.comparison-documents :is(a,button,select):focus-visible { outline:2px solid #71ceff }
.comparison-body { flex:1; min-height:0; display:flex; flex-direction:column; gap:8px; padding:8px }
.comparison-body iframe { flex:1; border:0; width:100% }
.comparison-body select { align-self:flex-start; max-width:100% }
.comparison-scroll { min-height:0; overflow:auto }
.comparison-pdf-sheet { position:relative; width:100%; max-width:980px; margin:auto }
.comparison-pdf-pages canvas { display:block; width:100%; height:auto; background:white }
.comparison-pdf-link { position:absolute; display:block; border:0; padding:0; min-height:0; background:transparent; border-radius:2px }
.comparison-pdf-link:is(:hover,:focus-visible) { outline:2px solid #71abd0; outline-offset:-1px; background:#52a1d222 }
.comparison-pdf-toolbar { display:flex; align-items:center; justify-content:center; gap:12px }
.comparison-scroll td { min-width:5rem; max-width:42rem; padding:5px 8px; overflow-wrap:anywhere }
.comparison-scroll tr:nth-child(even) { background:#ffffff0c }
@media(max-width:760px) {
  .matterport-overlay #matterport-panel .matterport-controls { top:var(--mobile-menu-top,100px) }
}

/* Keep the split controls aligned with the main toolbar. */
#matterport-panel .matterport-controls {
  --control-height:38px;
  gap:4px 6px;
  padding:7px;
}
#matterport-panel .matterport-controls > :is(button,.mp-icon),
#matterport-alignment:not([open]) > summary {
  box-sizing:border-box;
  height:var(--control-height);
  min-height:var(--control-height);
  min-width:var(--control-height);
  margin:0;
}
#matterport-alignment > summary {
  align-content:center;
  padding-inline:8px;
  border:1px solid transparent;
  border-radius:8px;
  background:var(--viewer-button-bg);
}
#matterport-alignment > summary:is(:hover,:focus-visible) { background:var(--viewer-button-hover) }
#matterport-alignment > summary:focus-visible { outline:none; border-color:var(--viewer-button-focus) }
.matterport-split:not(.matterport-overlay) #matterport-panel .matterport-controls {
  width:auto;
  border-radius:12px;
}
#matterport-status { padding-inline:3px }
.alignment-actions { grid-column:1/-1; display:flex; gap:6px }
.alignment-axis { display:flex; align-items:end; min-width:0; gap:4px }
#matterport-panel .alignment-axis label { display:grid; min-width:0; flex:1 }
#matterport-panel .alignment-axis input[type="number"] { box-sizing:border-box; min-width:0; width:100%; height:34px }
#matterport-panel .matterport-controls .alignment-axis button { min-width:34px; min-height:34px; height:34px }
#matterport-panel .matterport-controls { scrollbar-width:thin; scrollbar-color:#637789 transparent }
#matterport-alignment[open] > summary { min-height:30px }
#matterport-panel .alignment-fields { padding:4px 2px; gap:5px }
#matterport-panel .matterport-controls .alignment-actions button {
  height:34px; min-height:34px; min-width:34px;
}
.matterport-overlay #matterport-panel .matterport-controls:has(#matterport-alignment[open]) {
  max-height:min(36dvh,290px);
}

/* Keep the scan and IFC full bleed. Float our controls clear of Showcase chrome. */
.matterport-overlay .stage,
.matterport-overlay #matterport-panel iframe {
  inset:0; width:100%; height:100dvh;
}
.matterport-overlay header {
  top:max(76px,calc(env(safe-area-inset-top) + 62px));
}
.matterport-overlay #matterport-panel .matterport-controls {
  top:max(58px,calc(env(safe-area-inset-top) + 52px));
  background:var(--viewer-panel-bg);
  backdrop-filter:var(--viewer-panel-blur);
}
.matterport-overlay #overlay-toolbar:not([hidden]) {
  inset:auto 10px calc(122px + env(safe-area-inset-bottom)) 10px;
  width:max-content; max-width:calc(100% - 20px);
  border:0; border-radius:12px;
  background:var(--viewer-panel-bg);
  backdrop-filter:var(--viewer-panel-blur);
  gap:4px;
}
.matterport-overlay #overlay-toolbar .tools { flex:0 1 auto; max-width:100% }
.matterport-overlay #overlay-toolbar .matterport-opacity { margin-inline:0; padding-block:4px }
#matterport-panel .matterport-controls .alignment-actions #matterport-reset-alignment {
  width:34px; min-width:34px; padding:0;
}
@media(max-width:760px) {
  .matterport-overlay #matterport-panel .matterport-controls {
    top:calc(var(--mobile-menu-top,100px) + 64px);
  }
}
@media(min-width:761px) {
  .matterport-overlay #matterport-panel .matterport-controls {
    max-width:min(420px,calc(50% - 18px));
  }
}
.matterport-overlay header { top:max(88px,calc(env(safe-area-inset-top) + 74px)) }

.viewer-dropdown-menu,.model-choices,.model-menu,#results:not(:empty),aside:not([hidden]),.comparison-documents {
  background:var(--viewer-panel-bg);backdrop-filter:var(--viewer-panel-blur);
}
#cad-panel:not([hidden]) {
  position:fixed;z-index:8;display:grid;gap:8px;padding:10px;
  width:min(290px,calc(100vw - 16px));box-sizing:border-box;overflow:auto;
}
#cad-panel label {display:flex;align-items:center;gap:6px}
#cad-panel .cad-choices {display:grid;gap:5px}
#cad-panel input[type="range"] {width:100%}
#cad-feedback:empty {display:none}
#cad-settings .chevron {transition:transform .16s ease}
#cad-settings[aria-expanded="true"] .chevron {transform:translateY(.12rem) rotate(225deg)}
.matterport-split:not(.matterport-overlay) #matterport-panel iframe {
  position:absolute;inset:0;width:100%;height:100%;
}
.matterport-split:not(.matterport-overlay) #matterport-panel .matterport-controls {
  position:absolute;inset:88px 8px auto;
  margin:0;width:max-content;max-width:calc(100% - 16px);
  max-height:calc(100% - 146px);
}
.matterport-split:not(.matterport-overlay) #matterport-panel .matterport-controls.collapsed {
  inset:8px 8px auto auto;
}
.matterport-split:not(.matterport-overlay) #matterport-panel .matterport-controls:not(.collapsed) {
  inset:8px 8px auto;width:auto;min-height:var(--viewer-header-height,65px);
  max-height:calc(100% - 72px);align-content:center;
}
body:not(.matterport-overlay) .stage .tools {
  bottom:max(22px,env(safe-area-inset-bottom));
}
#cad-panel:not([hidden]) {grid-template-columns:minmax(0,1fr)}
#cad-panel input[type="range"] {
  box-sizing:border-box;min-width:0;max-width:100%;margin-inline:0;
}
#cad-panel > a {box-sizing:border-box;max-width:100%;white-space:normal}
#cad-panel > a[hidden] {display:none}
#cad-panel {--control-height:38px}
#cad-panel :is(button,a,input[type="number"],input[type="range"]) {
  min-height:var(--control-height);box-sizing:border-box;
}
#cad-panel > a {display:flex;align-items:center;padding-block:0}
#cad-panel > a[hidden] {display:none}
#cad-panel > .row {gap:8px;flex-wrap:wrap}
.viewer-view-tools {gap:6px}
#matterport-panel .matterport-controls > #matterport-controls-toggle {order:1;margin-left:auto}
#matterport-panel .matterport-controls > #matterport-close {order:2}
#matterport-panel .matterport-controls > #matterport-status {order:3}
#matterport-panel .matterport-controls > #matterport-alignment[open] {order:4}
.matterport-overlay #matterport-panel .matterport-controls {
  left:auto;right:8px;width:min(420px,calc(50% - 16px));
}
.matterport-overlay #matterport-panel .matterport-controls.collapsed {width:max-content}
@media(max-width:760px) {
  .matterport-overlay #matterport-panel .matterport-controls {width:min(420px,calc(100% - 16px));max-width:calc(100% - 16px)}
}
#scan-overlays button[hidden] {display:none}

/* Match the two viewer headers while retaining a full-window scan. */
@media(min-width:761px) {
  .matterport-overlay header {top:8px;left:8px;right:calc(50% + 8px)}
  .matterport-overlay #matterport-panel .matterport-controls:not(.collapsed) {
    top:8px;right:8px;width:calc(50% - 16px);max-width:none;
    min-height:var(--viewer-header-height,65px);align-content:center;
  }
}
.matterport-overlay #matterport-panel .matterport-controls.collapsed {top:8px}
.matterport-overlay #overlay-toolbar:not([hidden]) {bottom:calc(68px + env(safe-area-inset-bottom))}
.matterport-overlay #overlay-toolbar .viewer-view-tools {order:-1}
.matterport-overlay .stage #view-cube {visibility:visible;pointer-events:auto}
.matterport-overlay .stage #view-cube {top:calc(var(--viewer-header-height,65px) + 24px)}
