.menu {
  min-width: min(160px, calc(100vw - 16px));
  padding: 3px;
  border-radius: 6px;
  overscroll-behavior: contain;
}
.menu.submenu { min-width: min(160px, calc(100vw - 16px)); }
.menu button {
  min-height: 26px;
  padding: 3px 8px;
  gap: 7px;
  font-size: 13px;
  line-height: 1.25;
  border-radius: 4px;
}
.menu button:focus-visible { outline: 1px solid var(--accent, currentColor); outline-offset: -1px; }
.menu .sep { margin: 3px 2px; }
.menu .menu-label { padding: 4px 8px 2px; font-size: 10px; letter-spacing: .05em; }
.menu kbd { flex: none; color: var(--muted); font: inherit; font-size: 11px; white-space: nowrap; }
.viewport-hover-outline { pointer-events: none; }
.viewport-hover-outline .anno-selection { stroke: #ffbf2e; stroke-width: 1.5; }
.viewport-hover-outline path.anno-selection { fill: none; }
.viewport-hover-outline text.anno-selection { fill: #ffbf2e; stroke-width: .35; }
.snap-centerline { fill: none; stroke: #9663e8; stroke-width: 1.25; stroke-dasharray: 6 4; }
.cad-line-sample { display: block; width: 68px; height: 16px; flex: none; }
.menu:has(.cad-pattern-sample) { max-width: min(400px, calc(100vw - 16px)); }
.menu .cad-pattern-sample { width: 92px; }
.menu button:has(.cad-pattern-sample) > span:first-of-type { white-space: normal; }
.cad-sample-button { display: flex; align-items: center; gap: 6px; text-align: left; min-width: 0; }
.cad-sample-button span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
@media (pointer: coarse) {
  .menu button { min-height: 36px; padding-inline: 10px; }
}
