.brand-series-filter:not([hidden]) { display: flex; align-items: center; gap: .85rem; margin: .8rem 0; }
.brand-series-filter select { width: auto; min-width: 9rem; }
.brand-series-filter[hidden] { display: none; }

/* The attribute and machine headers share the same column grid at every viewport. */
#atlasFullSpecifications .atlas-table {
  --attribute-width: 10rem;
  --machine-width: 14rem;
  min-width: calc(var(--attribute-width) + var(--machine-count) * var(--machine-width));
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}
#atlasFullSpecifications .attribute-column { width: var(--attribute-width); }
#atlasFullSpecifications .atlas-table :is(th, td),
#atlasFullSpecifications .atlas-table th:first-child,
#atlasFullSpecifications .atlas-table thead th:not(:first-child),
#atlasFullSpecifications .atlas-table tbody th[scope="row"] {
  width: auto;
  min-width: 0;
  max-width: none;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}
#atlasFullSpecifications .atlas-table tr > :first-child {
  border-right: 1px solid #444743;
  background-clip: padding-box;
}
#atlasFullSpecifications .atlas-table td + td { border-left: 1px solid #323632; }
#atlasFullSpecifications .atlas-table .missing { font-style: normal; color: #abaea9; }
#atlasFullSpecifications .comparison-cell-note { margin-top: .35rem; }
#atlasFullSpecifications .comparison-scroll { overscroll-behavior-x: contain; }
#compareTray[hidden], #compareTrayContents[hidden], #compareTrayPill[hidden] { display: none; }
#compareTrayContents { display: contents; }
#compareTray:not([hidden])[data-compact="true"] {
  width: auto; display: block; left: auto; right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom)); transform: none;
  padding: 0; border: 0; border-radius: 99px; background: transparent;
}
.tray-pill {
  min-height: 44px; border-radius: 99px; border: 1px solid #767e70;
  padding: 8px 17px; background: #232723; color: #f6f4ef; font-weight: 700;
}
.tray-pill::after { content: "▴"; color: #c0c7b9; padding-left: 9px; }
.tray-minimize {
  align-self: start; background: transparent; border: 0; padding: 2px 0;
  min-height: 26px; color: #ced4c9; font: inherit; font-size: 12px;
}
.tray-minimize span { padding-left: 3px; }
.directory-verification {
  margin: .4rem 0 1rem; padding: .8rem 1rem; border: 1px solid #3e443f;
  border-left: 3px solid #879684; background: #1b201c; color: #dbdfd7; line-height: 1.55;
}
.directory-verification strong { display: block; font-size: .9rem; }
.directory-verification p { margin: .2rem 0 0; font-size: .86rem; color: #bbc3b8; }

#spaceDialog { color-scheme: dark; }
#spaceDialog .viewer-wrap:has(#equipmentFallback:not([hidden])) .viewer-label {
  color: #ebeee9; background: #28332d; padding: .25rem .45rem; border-radius: 2px;
}
#spaceDialog .space-dimensions { color: #d5d9d1; font-size: .9rem; letter-spacing: .02em; margin: .4rem 0 0; }
#spaceDialog .space-dimensions:empty { display: none; }
#modelDetails { margin: .15rem 0 1.1rem; color: #d1d7cd; font-size: .86rem; }
#modelDetails > summary, .phone-compatibility > summary { cursor: pointer; width: fit-content; }
#modelDetails ul { padding-left: 1.3rem; line-height: 1.6; }
.space-model-panel .phone-help { display: flex; flex-direction: column; gap: .8rem; }
.phone-handoff { order: -1; display: flex; align-items: center; gap: 1rem; }
.phone-handoff > div { min-width: 0; }
.phone-handoff strong { color: #f6f4ef; font-size: 1rem; }
.phone-handoff p { margin: .3rem 0 .7rem; font-size: .86rem; line-height: 1.45; }
.phone-handoff #spaceQR { color: #111; display: block; width: 124px; flex: 0 0 124px; background: white; border-radius: 4px; }
.phone-handoff #spaceQR[hidden] { display: none; }
.phone-handoff #spaceQR svg { display: block; width: 100%; height: auto; shape-rendering: crispEdges; }
#spaceLinkStatus { display: block; margin-top: .3rem; overflow-wrap: anywhere; }
.phone-compatibility { color: #bbc3b9; border-top: 1px solid #3b403a; padding-top: .65rem; }
#floorPlan { width: 100%; height: auto; display: block; background: #161918; }
#floorPlan text { text-anchor: middle; dominant-baseline: middle; font-family: inherit; }
#floorPlan .plan-note { font-size: 14px; fill: #cbd2c9; }
#floorPlan .plan-wall { fill: #232825; stroke: #929a90; stroke-width: 1.25; }
#floorPlan .plan-operating { fill: #ffbc6b0e; stroke: #e0ae69; stroke-width: 1.4; stroke-dasharray: 6 4; }
#floorPlan .plan-machine { fill: #562e29; stroke: #ef7964; stroke-width: 2; }
#floorPlan .plan-size { fill: #fff5ec; font-size: 14px; }
#floorPlan .plan-direction path { stroke: #f7c7b8; stroke-width: 2; fill: #f7c7b8; }
#floorPlan .plan-direction text, #floorPlan .plan-loading-gap text {
  fill: #f4e3db; font-size: 13px; font-weight: 650;
  paint-order: stroke; stroke: #242422; stroke-width: 2.5; stroke-linejoin: round;
}
#floorPlan .plan-loading-gap path { stroke: #b2cfa7; stroke-width: 1.6; stroke-dasharray: 4 3; fill: none; }
#floorPlan .plan-loading-gap circle { fill: #bfdaae; }
#floorPlan .plan-loading-gap text { fill: #dce8cd; }
#floorPlan .plan-loading-gap.overhang path { stroke: #ff927e; }
.wall-gaps { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); margin: .8rem 0; gap: .7rem; }
.wall-gaps div { border-top: 1px solid #535347; padding-top: .35rem; }
.wall-gaps dt { font-size: .76rem; color: #d0cfc3; }
.wall-gaps dd { margin: .1rem 0; color: #faf7ed; font-size: 1rem; font-weight: 650; font-variant-numeric: tabular-nums; }

@media (max-width: 700px) {
  #atlasFullSpecifications .atlas-table { --attribute-width: 7.2rem; --machine-width: 12rem; }
  .tray-minimize { align-self: center; min-height: 40px; }
  .phone-handoff { gap: .7rem; }
  .phone-handoff #spaceQR { width: 101px; flex-basis: 101px; }
  #spaceDialog .space-view-tabs button { min-width: 0; }
}
@media print {
  #compareTray { display: none; }
  #atlasFullSpecifications .atlas-table { min-width: 0; }
}

.collection-shortcuts { display:flex; flex-wrap:wrap; gap:.5rem; margin:.8rem 0; }
.collection-shortcuts .lifecycle-shortcut { margin:0; min-height:40px; }
#modelViews { display:flex; align-items:center; flex-wrap:wrap; gap:.38rem; padding:.65rem 0 .3rem; }
#modelViews[hidden], #modelPoseField[hidden], #spaceDialog .phone-compatibility[hidden] { display:none; }
#modelViews > span { color:#b9c0ba; font-size:.8rem; margin-right:.3rem; }
#modelViews button { min-height:40px; padding:.32rem .72rem; font:inherit; font-size:.83rem; background:#181a19; color:#cbd1cb; border:1px solid #414640; border-radius:4px; }
#modelViews button:hover, #modelViews button:focus-visible { border-color:#e5533d; color:white; }
#modelViews button[aria-pressed="true"] { color:#fff; background:#2c302d; border-color:#9ba79b; }
#modelPoseField { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem .8rem; margin-top:.8rem; }
#modelPoseField label { font-weight:600; font-size:.85rem; }
#modelPoseField select { width:auto; max-width:100%; margin:0; }
#poseFit { font-size:.8rem; margin:0; }
@media (max-width:600px) {
  #modelViews button, .collection-shortcuts button, #modelPoseField :is(button,select) { min-height:44px; }
  #modelViews > span { flex-basis:100%; }
}

#spaceDialog :is(.space-model-panel,#spaceFitPanel) { margin:0; padding:0; border:0; }
#spaceDialog .space-model-panel { --model-height:clamp(290px,46dvh,485px); min-width:0; }
#spaceDialog .space-model-panel .viewer-wrap { min-height:var(--model-height); }
#spaceDialog .space-model-panel model-viewer { height:var(--model-height); }

#spaceDialog .model-selectors {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
  align-items: end; gap: .6rem 1rem;
}
#spaceDialog .model-selectors > div { min-width: 0; }
#spaceDialog .model-selectors select { width: 100%; max-width: 100%; min-height: 44px; margin-bottom: 0; }
#spaceDialog .model-selectors select:focus-visible { outline: 2px solid #e5533d; outline-offset: 2px; }
#modelPartField[hidden] { display: none; }
@media (max-width: 650px) {
  #spaceDialog .model-selectors { grid-template-columns: minmax(0, 1fr); }
}

#atlasFullSpecifications .atlas-table .comparison-section-title th {
  background: #212521;
  color: #d0d6cb;
  padding: .55rem .9rem;
  font-size: .875rem;
  font-weight: 600;
  text-align: left;
}
#atlasFullSpecifications .atlas-table .missing { font-size: .875rem; }

#atlasFullSpecifications .comparison-machine-actions,.comparison-edit-choices{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem .9rem;margin-top:.65rem}
#atlasFullSpecifications .comparison-machine-actions :is(a,button){font:inherit;font-size:.875rem;font-weight:500;text-decoration:underline;text-underline-offset:3px;color:inherit;background:transparent;border:0;padding:.35rem 0;cursor:pointer}


/* Browsing a 3D collection gives the model and its source priority. */
.model-collection-filters {
  display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: end;
  margin-block: 1.25rem .75rem; padding: 1rem 1.25rem;
  background: #1c211e; border: 1px solid #424a42; border-radius: .5rem;
}
.model-collection-filters[hidden], .model-evidence[hidden] { display: none; }
.model-collection-filters h3 { margin: 0; font-size: 1.25rem; color: #f3f4ee; }
.model-collection-filters > div { margin: auto auto auto 0; }
.model-collection-filters label { display: grid; gap: .25rem; color: #d5dbd2; font-size: .875rem; }
.model-collection-filters select { min-height: 44px; width: 100%; margin: 0; }
.model-collection-grid .model-card {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  border: 1px solid #414841; border-radius: .55rem; background: #1b1f1c;
}
.model-card-photo {
  position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 0;
  background: #f1f2ee; color: white; cursor: pointer; aspect-ratio: 8/5; overflow: hidden;
}
.model-card-photo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.model-card-photo span {
  position: absolute; right: .75rem; bottom: .75rem; background: #252c27; color: #fff;
  padding: .38rem .7rem; border-radius: 1rem; font-size: .875rem; line-height: 1.25;
}
.model-card-photo:hover span, .model-card-photo:focus-visible span { background: #882f20; }
.model-card-photo:focus-visible { outline: 3px solid #df6550; outline-offset: -3px; }
.model-card-body { display: flex; flex: 1; flex-direction: column; padding: 1rem; gap: .45rem; }
.model-card-body > small { font-size: .875rem; color: #bbc8bc; }
.model-card-body h3 { font-size: 1.125rem; line-height: 1.3; margin: 0; }
.model-card-body h3 a { color: #f2f3ed; text-decoration: none; }
.model-card-body h3 a:hover { text-decoration: underline; }
.model-card-actions { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; padding-top: .65rem; }
.model-card-actions span { font-size: .875rem; color: #c6cfc6; }
.model-card-actions button { min-height: 44px; white-space: nowrap; }
.model-evidence { margin: .5rem 0 1rem; padding: .65rem .9rem; border: 1px solid #464e47; border-radius: .4rem; }
.model-evidence summary { cursor: pointer; color: #e9eee6; font-size: .95rem; font-weight: 600; }
.model-evidence table { width: 100%; margin: .75rem 0 .25rem; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.model-evidence :is(th,td) { padding: .4rem .25rem; border-bottom: 1px solid #3b433d; text-align: right; }
.model-evidence :is(th,td):first-child { text-align: left; }
.model-evidence p { margin: .5rem 0; font-size: .875rem; }
#modelTransfer { position: absolute; inset: auto 0 0; width: 100%; height: 4px; border: 0; accent-color: #e8563d; }
#modelTransfer[hidden] { display: none; }
@media (max-width: 650px) {
  .model-collection-filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; padding: .85rem; }
  .model-collection-filters > div { grid-column: 1/-1; }
  .model-collection-filters label { min-width: 0; }
}

/* Comparison headers remain fully opaque and flush against the viewport while scrolling. */
#atlasFullSpecifications .atlas-table thead th { position: sticky; top: 0; z-index: 20; background: #0B0B0C; background-clip: padding-box; }
#atlasFullSpecifications .atlas-table thead th:first-child { z-index: 21; }
