/* AIVELI unified in-scene glass controls — real 3D toolbar kept in 2D. */
.shell.aiveli-plan-2d{grid-template-columns:minmax(0,1fr)!important}
.shell.aiveli-plan-2d>.rail,
.shell.aiveli-plan-2d>.library,
.shell.aiveli-plan-2d>.inspector{display:none!important}
.shell.aiveli-plan-2d>.viewport{grid-column:1/-1!important;min-width:0!important}
/* No 2D-specific toolbar skin. Use exactly the same live DOM and the same
   layout/visual tokens as the viewport's 3D/ISO .topbar from styles.css. */
#viewport.aiveli-blueprint-mode>.topbar{
 position:absolute!important;
 top:0!important;left:0!important;right:0!important;
 z-index:110!important;
 display:grid!important;
 grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;
 gap:8px!important;
 height:66px!important;min-height:66px!important;
 padding:0 12px!important;
 color:#fff!important;
 background:linear-gradient(180deg,rgba(46,40,35,.54),rgba(46,40,35,.10) 72%,transparent)!important;
 backdrop-filter:blur(2px)!important;
 -webkit-backdrop-filter:blur(2px)!important;
 border:0!important;
 border-bottom:1px solid rgba(255,255,255,.16)!important;
 border-radius:0!important;
 box-shadow:none!important;
 pointer-events:none!important;
}
#viewport.aiveli-blueprint-mode>.topbar>*{pointer-events:auto!important}
#viewport.aiveli-blueprint-mode>.topbar .modes{
 display:flex!important;
 padding:4px!important;
 border-radius:12px!important;
 background:rgba(255,255,255,.14)!important;
 backdrop-filter:blur(15px)!important;
 -webkit-backdrop-filter:blur(15px)!important;
}
#viewport.aiveli-blueprint-mode>.topbar .modes button{
 background:transparent!important;
 color:rgba(255,255,255,.75)!important;
 border-radius:9px!important;
}
#viewport.aiveli-blueprint-mode>.topbar .modes button.active{
 background:#fff!important;
 color:#24272f!important;
}

#aiveli-plan-sheet[data-concept-fidelity="2"]{
 inset:0!important;padding-top:0!important;--aps-topbar:0px!important;
 grid-template-columns:205px minmax(0,1fr) 252px!important;
 grid-template-rows:0 minmax(0,1fr) 56px!important;
 background:#f5f2ed!important;
}
#aiveli-plan-sheet[data-concept-fidelity="2"] .aps-info-bar{display:none!important}
#aiveli-plan-sheet[data-concept-fidelity="2"] .aps-board{
 grid-row:2!important;grid-column:2!important;min-height:0!important;
 background:#faf8f4!important;
}
#aiveli-plan-sheet[data-concept-fidelity="2"] .aps-bottom{
 grid-row:2!important;grid-column:1!important;
 padding:86px 10px 12px!important;
 background:rgba(251,250,247,.92)!important;backdrop-filter:blur(16px)!important;
 -webkit-backdrop-filter:blur(16px)!important;border-color:#dfdad1!important;
}
#aiveli-plan-sheet[data-concept-fidelity="2"] .aps-ref-inspector{
 grid-row:2!important;grid-column:3!important;
 padding:86px 10px 12px!important;
 background:rgba(251,250,247,.92)!important;
 backdrop-filter:blur(16px)!important;-webkit-backdrop-filter:blur(16px)!important;
 border-color:#dfdad1!important;
}
#aiveli-plan-sheet[data-concept-fidelity="2"] .aps-ref-commands{
 grid-row:3!important;grid-column:1/-1!important;
 background:rgba(255,255,255,.78)!important;
 border-top:1px solid rgba(180,171,159,.29)!important;
 backdrop-filter:blur(12px)!important;
}
/* Floating tools must start BELOW the shared glass header, never underneath
   the left project-history buttons where browser hit-testing would block them. */
#aiveli-plan-sheet .aps-floor-palette{top:84px!important;left:16px!important;z-index:20!important}
#aiveli-plan-sheet .aps-grid-minor{stroke:#e1ded7!important;stroke-width:.009px!important}
#aiveli-plan-sheet .aps-grid-major{stroke:#c9c2b7!important;stroke-width:.017px!important}
#aiveli-plan-sheet .aps-floor{fill:#e6dfd4}
#aiveli-plan-sheet .aps-wall{stroke:#4c4844!important}
#aiveli-plan-sheet .aps-draft-ruler path{
 fill:none;stroke:#2e657a;stroke-width:.018px;stroke-linecap:round;
 stroke-dasharray:.075 .040;
 vector-effect:non-scaling-stroke;
}
#aiveli-plan-sheet .aps-draft-ruler text{
 font-family:Inter,system-ui,-apple-system,sans-serif;font-size:.145px;
 font-weight:650;fill:#1b516b;paint-order:stroke;stroke:#faf8f4;stroke-width:.065px;
 letter-spacing:.01em;pointer-events:none;
}
#aiveli-plan-sheet .aps-draft-preview{opacity:.55}
#aiveli-plan-sheet .aps-stage-label{
 font-size:.12px;font-weight:600;fill:#a19689;letter-spacing:.11em;
 paint-order:stroke;stroke:#faf8f4;stroke-width:.06px;pointer-events:none;
}
#aiveli-plan-sheet .aps-wing-resize{
 fill:#fcf5e8!important;stroke:#ad774e!important;stroke-width:.048px!important;
 filter:drop-shadow(.005px .02px .034px #714a2a35);
}
#aiveli-plan-sheet .aps-wing-resize:hover{fill:#fff0d7!important}
#aiveli-plan-sheet .aps-f-sofa-cushion{
 stroke:#b9a69a;filter:drop-shadow(.018px .023px .028px #73655b24);
}
#aiveli-plan-sheet .aps-f-sofa-back{stroke:#9b8d80;filter:drop-shadow(.012px .016px .02px #4f463326)}
#aiveli-plan-sheet .aps-f-bed-cover{filter:drop-shadow(.012px .016px .022px #655b492a)}
#aiveli-plan-sheet .aps-f-table,#aiveli-plan-sheet .aps-f-cabinet{
 filter:drop-shadow(.015px .032px .033px #51433024);
}
#aiveli-plan-sheet [data-tool="measure"].active{background:#edf1ee!important;color:#274c5c!important}
#viewport.aiveli-blueprint-mode #measureOverlay{display:none!important}
@media(max-width:1120px){
 #aiveli-plan-sheet[data-concept-fidelity="2"]{grid-template-columns:180px minmax(0,1fr) 220px!important}
 #viewport.aiveli-blueprint-mode>.topbar{left:0!important;right:0!important}
}
@media(max-width:850px){
 #aiveli-plan-sheet[data-concept-fidelity="2"]{grid-template-columns:165px minmax(0,1fr)!important}
 #aiveli-plan-sheet[data-concept-fidelity="2"] .aps-ref-inspector{display:none!important}
}
@media(max-width:700px){
 #viewport.aiveli-blueprint-mode>.topbar{
  height:58px!important;min-height:58px!important;top:0!important;
  left:0!important;right:0!important;padding:8px!important;
  grid-template-columns:1fr auto!important;gap:4px!important;
  border-radius:0!important;
 }
 #viewport.aiveli-blueprint-mode>.topbar .project-btn{display:none!important}
 #viewport.aiveli-blueprint-mode>.topbar .modes{grid-column:1!important}
 #viewport.aiveli-blueprint-mode>.topbar .scene-actions{grid-column:2!important}
 #aiveli-plan-sheet[data-concept-fidelity="2"]{
  inset:0!important;grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:0 minmax(0,1fr) 52px!important;
 }
 #aiveli-plan-sheet[data-concept-fidelity="2"] .aps-board{grid-column:1!important}
 #aiveli-plan-sheet[data-concept-fidelity="2"] .aps-bottom{padding-top:68px!important}
 #aiveli-plan-sheet[data-concept-fidelity="2"] .aps-ref-commands{grid-row:3!important}
 #aiveli-plan-sheet .aps-floor-palette{top:68px!important;left:8px!important}
}

/* Middle-button panning mirrors desktop CAD without changing the selected tool. */
#aiveli-plan-sheet .aps-svg.aps-middle-panning{cursor:grabbing!important}
#aiveli-plan-sheet .aps-svg{overscroll-behavior:contain;touch-action:none}

/* Production safety net: the legacy 2D information bar must NEVER create
   another toolbar; the real 3D/ISO .topbar is reused in every view. */
#viewport.aiveli-blueprint-mode #aiveli-plan-sheet .aps-info-bar,
#aiveli-plan-sheet .aps-info-bar{display:none!important;visibility:hidden!important}
