/* Contextual reference cards, inherited FC appearance and native scroll surface. */
.fc-space-reference-toggle{margin:8px 0;min-height:44px;width:100%;text-align:left;padding:12px 14px;border-radius:14px;font:inherit;}
.fc-space-reference-card{border:1px solid currentColor;border-color:color-mix(in srgb,currentColor 24%,transparent);border-radius:16px;padding:14px;margin:0 0 12px;min-width:0;}
.fc-space-reference-card h3{font-size:1rem;margin:0 0 10px;line-height:1.4;overflow-wrap:anywhere;}
.fc-space-reference-card p,.fc-space-reference-card summary,.fc-space-reference-diagnostics{font-size:.88rem;line-height:1.45;overflow-wrap:anywhere;}
.fc-space-reference-name{opacity:.82;}.fc-space-reference-provenance{font-weight:600;}
.fc-space-reference-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px;}
.fc-space-reference-actions button{min-height:44px;min-width:44px;font:inherit;flex:1 1 130px;padding:10px;border-radius:12px;}
.fc-space-reference-actions .fc-space-browser-row{margin:0;}
.fc-space-reference-diagnostics{padding:12px;border-radius:12px;}.fc-space-reference-diagnostics>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;}

/* A reference view is a flex column: its document list owns the remaining space.
   Explicitly retain hidden semantics; no grid row can consume the list's track. */
.fc-space-browser.fc-space-reference-mode:not([hidden]){display:flex!important;flex-direction:column!important;min-height:0;overflow:hidden;}
.fc-space-browser.fc-space-reference-mode[hidden]{display:none!important;}
.fc-space-browser.fc-space-reference-mode>header,.fc-space-browser.fc-space-reference-mode>h2,.fc-space-browser.fc-space-reference-mode>input,.fc-space-browser.fc-space-reference-mode>.fc-space-browser-state,.fc-space-browser.fc-space-reference-mode>.fc-space-reference-toggle{flex:0 0 auto;}
.fc-space-browser.fc-space-reference-mode>.fc-space-browser-list{flex:1 1 0!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden;overscroll-behavior:contain;}
.fc-space-browser.fc-space-reference-mode>.fc-space-browser-subtitle,.fc-space-browser.fc-space-reference-mode>footer{display:none;}
.fc-space-browser.fc-space-reference-mode>.fc-space-reference-toggle{width:auto;margin:4px 0 10px;}
.fc-space-browser.fc-space-reference-mode .fc-space-reference-card{padding:12px;margin-bottom:10px;}
.fc-space-browser.fc-space-reference-mode .fc-space-reference-card h3{font-size:.96rem;margin-bottom:8px;}
.fc-space-browser.fc-space-reference-mode .fc-space-reference-provenance{font-size:.82rem;margin:6px 0;}
@media(max-width:760px){
 .fc-space-browser.fc-space-reference-mode:not([hidden]){inset:168px 12px 108px!important;height:auto!important;max-height:none!important;min-height:0!important;transform:none!important;margin:0!important;}
 .fc-space-browser.fc-space-reference-mode>h2{font-size:1rem;line-height:1.25;margin:8px 0;}
 .fc-space-browser.fc-space-reference-mode .fc-space-browser-state{font-size:.82rem;line-height:1.3;margin:6px 0;}
 .fc-space-browser.fc-space-reference-mode .fc-space-browser-path{font-size:.75rem;line-height:1.3;}
 .fc-space-browser.fc-space-reference-mode>.fc-space-reference-toggle{min-height:44px;padding:8px 10px;font-size:.84rem;}
}

/* Root88 R4: the inherited top+bottom and left+right stretched the camera bar
   across the whole drawing. Keep it compact only while the archive is open.
   Model/CAD tools and their positioning are outside this selector. */
:root[data-fc-theme] #fc-universe.fc-space-active.fc-space-webgl:not(.fc-space-model-active) .fc-space.fc-space-browser-open > .fc-space-controls {
  top:auto!important;right:auto!important;bottom:112px!important;left:24px!important;
  width:max-content!important;height:max-content!important;max-width:calc(100% - 48px);
}
@media(max-width:760px){
 :root[data-fc-theme] #fc-universe.fc-space-active.fc-space-webgl:not(.fc-space-model-active) .fc-space.fc-space-browser-open > .fc-space-controls {display:none!important}
}
