/* 2026-10-22 – Infinite Canvas palette refresh and live minimap.
 * Loaded last; scoped to the actual editor so boards landing page is intact.
 * Preserve the established one-layer liquid glass materials.
 */
html body:has(#editorView:not([hidden])) #editorView .palette .tool-svg{
  width:22px!important;height:22px!important;flex:none!important;display:block!important;
}
html body:has(#editorView:not([hidden])) #editorView .palette .canvas-guide-icon{
  width:22px;height:22px;line-height:22px;font-size:19px;font-weight:700;
  text-align:center;border:1.7px solid currentColor;border-radius:50%;
}
html body:has(#editorView:not([hidden])) #editorView #canvasGridBtn.is-active{
  color:var(--accent)!important;
}
html body:has(#editorView:not([hidden])) #canvasViewport.canvas-grid-hidden{
  background-image:none!important;
}
html body:has(#editorView:not([hidden])) #canvasViewport.canvas-grid-hidden::before,
html body:has(#editorView:not([hidden])) #canvasViewport.canvas-grid-hidden::after{
  background-image:none!important;
}

/* Mini-map is a true OVERLAY at the bottom left of the scene; it never
 * consumes flex/grid space. Backing canvas is twice CSS size for fine lines.
 * Node boxes & connectors use a single scene-to-miniature scale. */
html body:has(#editorView:not([hidden])) #editorView > #canvasShell > #canvasMinimap.canvas-minimap{
  position:absolute!important;
  z-index:8!important;
  top:auto!important;right:auto!important;bottom:20px!important;left:22px!important;
  width:232px!important;height:146px!important;
  min-width:0!important;max-width:calc(100% - 44px)!important;
  padding:0!important;margin:0!important;
  border:1px solid var(--edge)!important;
  border-radius:14px!important;
  background:var(--glass)!important;
  overflow:hidden!important;
  display:block!important;
  box-shadow:0 9px 28px var(--light-shadow)!important;
}
html body:has(#editorView:not([hidden])) #canvasMinimapSurface{
  display:block!important;
  position:relative!important;
  width:100%!important;height:100%!important;
  border:0!important;padding:0!important;margin:0!important;
  background:transparent!important;
  cursor:crosshair!important;
  touch-action:none!important;
  border-radius:inherit!important;
}
html body:has(#editorView:not([hidden])) .canvas-hint{
  left:270px!important;bottom:25px!important;
  max-width:calc(100% - 580px);
}
/* Keep map out of the main right-panel / lower zoom controls. */
@media(max-width:800px){
  html body:has(#editorView:not([hidden])) #editorView > #canvasShell > #canvasMinimap.canvas-minimap{
    left:10px!important;bottom:12px!important;
    width:170px!important;height:107px!important;
  }
  html body:has(#editorView:not([hidden])) .canvas-hint{display:none!important}
}
@media(max-height:590px){
  html body:has(#editorView:not([hidden])) #editorView > #canvasShell > #canvasMinimap.canvas-minimap{
    height:98px!important;width:160px!important;
  }
}

/* Asset library now shares the ORIGINAL right inspector's single glass sheet.
 * No backdrop, second glass panel, popup or header duplicate. */
html body #canvasAssetsPanel[hidden],
html body #inspectorBody[hidden],
html body #inspectorBottom[hidden],
html body #inspectorBackToProps[hidden]{
  display:none!important;
}
html body:has(#editorView:not([hidden])) #editorView > #inspector #canvasAssetsPanel:not([hidden]){
  display:flex!important;
  flex:1 1 auto!important;
  flex-direction:column!important;
  width:100%!important;
  min-width:0!important;
  min-height:0!important;
  max-height:100%!important;
  height:auto!important;
  margin:0!important;
  padding:12px!important;
  gap:12px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  overflow:hidden!important;
}
html body:has(#editorView:not([hidden])) #editorView #inspectorBackToProps{
  flex:0 0 auto!important;
  margin-left:auto!important;
  padding:5px 8px!important;
  border:1px solid var(--edge)!important;
  border-radius:8px!important;
  background:transparent!important;
  color:var(--muted)!important;
  font-size:11px!important;
  white-space:nowrap!important;
}
html body:has(#editorView:not([hidden])) #editorView #inspectorBackToProps:hover{
  color:var(--accent)!important;
  border-color:var(--accent)!important;
}
html body:has(#editorView:not([hidden])) #editorView #canvasAssetsBtn.is-active{
  color:var(--accent)!important;
}
html body:has(#editorView:not([hidden])) #editorView #canvasAssetsPanel .canvas-assets-desc{
  margin:0!important;
  color:var(--muted)!important;
  font-size:11px!important;
  line-height:1.6!important;
}
html body:has(#editorView:not([hidden])) #editorView #canvasAssetsPanel .canvas-assets-filters{
  display:flex!important;
  flex:0 0 auto!important;
  flex-wrap:wrap!important;
  gap:6px!important;
}
html body:has(#editorView:not([hidden])) #editorView #canvasAssetsPanel .canvas-assets-filters button{
  min-width:0!important;
  padding:6px 10px!important;
  border-radius:999px!important;
  background:var(--hair)!important;
  border:1px solid var(--edge)!important;
  font-size:11px!important;
}
html body:has(#editorView:not([hidden])) #editorView #canvasAssetsPanel .canvas-assets-filters button[aria-pressed="true"]{
  border-color:var(--accent)!important;
  color:var(--accent)!important;
}
html body:has(#editorView:not([hidden])) #editorView #canvasAssetsPanel .canvas-assets-list{
  flex:1 1 0!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
  align-content:start!important;
  min-width:0!important;
  min-height:0!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
}
html body:has(#editorView:not([hidden])) #editorView #canvasAssetsPanel .canvas-asset-item{
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
  gap:6px!important;
  padding:7px!important;
  border:1px solid var(--edge)!important;
  border-radius:11px!important;
  background:var(--hair)!important;
  text-align:left!important;
  overflow:hidden!important;
}
html body:has(#editorView:not([hidden])) #editorView #canvasAssetsPanel .canvas-asset-item:hover,
html body:has(#editorView:not([hidden])) #editorView #canvasAssetsPanel .canvas-asset-item:focus-visible{
  border-color:var(--accent)!important;
}
html body:has(#editorView:not([hidden])) #editorView #canvasAssetsPanel .canvas-asset-preview{
  width:100%!important;
  height:76px!important;
  border-radius:7px!important;
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
  color:var(--accent)!important;
  font-size:25px!important;
  background:rgba(90,95,105,.16)!important;
}
html body:has(#editorView:not([hidden])) #editorView #canvasAssetsPanel .canvas-asset-preview img{
  display:block!important;
  width:100%!important;height:100%!important;
  object-fit:cover!important;
}
html body:has(#editorView:not([hidden])) #editorView #canvasAssetsPanel .canvas-asset-name{
  font-size:10px!important;
  line-height:1.45!important;
  max-width:100%!important;
  overflow:hidden!important;
  word-break:break-all!important;
  display:-webkit-box!important;
  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;
}
html body:has(#editorView:not([hidden])) #editorView #canvasAssetsPanel .canvas-asset-item small{
  font-size:9px!important;
  color:var(--muted)!important;
}
html body:has(#editorView:not([hidden])) #editorView #canvasAssetsPanel .canvas-assets-empty{
  grid-column:1/-1!important;
  margin:0!important;
  padding:18px 5px!important;
  font-size:11px!important;
  color:var(--muted)!important;
  line-height:1.7!important;
}
