/* The shared compact inspector position and surface, for every layout. */
html[data-centerline="visible"] body[data-step="2"]:is([data-mode="tiles"], [data-mode="planks"]) #centerline-layer {
  display: inline;
}
body[data-step="2"]:is([data-mode="tiles"], [data-mode="planks"]) #centerline-mode-btn.step2-only {
  display: unset !important;
}
#reference-lines-toolbar.floating-panel {
  position: absolute; top: 8px; left: 8px; right: auto; bottom: auto; transform: none;
  display: flex; align-items: center; justify-content: flex-start; gap: 2px; width: 180px; max-width: calc(100% - 16px);
  height: 42px; min-height: 0; box-sizing: border-box; padding: 2px 6px 2px 0;
  background: #ededed; border: 0; border-radius: 14px;
  box-shadow: 0 1px 7px #00000020; z-index: 10000; overflow: visible;
}
#reference-lines-toolbar[hidden] { display: none; }
#reference-lines-toolbar[data-grid="true"] { width: 244px; }
#reference-lines-toolbar button {
  display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 32px;
  padding: 0; margin: 0; border: 0; border-radius: 10px; background: transparent; cursor: pointer;
}
#reference-lines-toolbar button img { width: 20px; height: 20px; pointer-events: none; }
#reference-lines-toolbar :is([data-reference-less], [data-reference-more]) img { opacity: .55; }
#reference-lines-toolbar button[hidden] { display: none; }
#reference-lines-toolbar [data-reference-family] {
  flex-basis: 32px; width: 32px; height: 32px; border: 1px solid transparent;
  background: var(--ak-vertex-fill, #2d2d2d); border-radius: 9px;
}
#reference-lines-toolbar [data-reference-family] img { width: 26px; height: 26px; filter: brightness(0) invert(1); }
#reference-lines-toolbar [data-reference-family][aria-pressed="true"] {
  border-color: var(--ak-shape-accenta, #2ac6c1); background: transparent;
}
#reference-lines-toolbar [data-reference-family][aria-pressed="true"] img { filter: none; }
#reference-lines-toolbar [data-reference-move] { flex-basis: 28px; width: 28px; cursor: grab; touch-action: none; }
#reference-lines-toolbar [data-reference-move]:active { cursor: grabbing; }
#reference-lines-toolbar [data-reference-move] img { width: 16px; height: 16px; }
#reference-lines-toolbar button:disabled { opacity: .35; cursor: default; }
#reference-lines-toolbar button:not(:disabled):not([data-reference-family]):hover { background: #2ac6c126; }
#reference-lines-toolbar [data-reference-family]:hover { box-shadow: inset 0 0 0 1px var(--ak-shape-accenta, #2ac6c1); }
#reference-lines-toolbar button:focus-visible { outline: 2px solid #2ac6c1; outline-offset: -3px; }
#reference-lines-toolbar svg {
  position: static; inset: auto; transform: none; flex: 1 1 auto;
  width: 88px; min-width: 0; height: 32px; pointer-events: none;
}
#reference-lines-toolbar svg line { stroke-width: 3.25; stroke: #123451; }
#reference-lines-toolbar svg .reference-center { stroke: #2ac6c1; }
#reference-lines-toolbar svg .reference-skipped { stroke: #bcbcbc; stroke-width: 1.5; stroke-dasharray: 3 3; }
@media print { #reference-lines-toolbar { display: none !important; } }

@media (max-width: 820px) {
  #reference-lines-toolbar.floating-panel { position: absolute !important; width: 208px; height: 48px; }
  #reference-lines-toolbar[data-grid="true"] { width: 284px; }
  #reference-lines-toolbar button { flex-basis: 36px; width: 36px; height: 44px; }
  /* Keep the entire legend inside the canvas, clear of the right drawer. */
  #cutreuse-legend {
    bottom: 8px; right: calc(var(--mobile-tool-drawer-width, 56px) + 8px);
    max-width: calc(100% - var(--mobile-tool-drawer-width, 56px) - 16px); box-sizing: border-box;
  }
  #cutreuse-legend .cutreuse-legend__label { white-space: normal; }
}
