/* A single instrument dock: orientation first, then direct model actions.
   The segmented selection follows the existing native camera buttons. */
#anatomy-view .camera-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: fit-content;
  max-width: calc(100% - 1.5rem);
  margin: .45rem auto .25rem;
  padding: .35rem;
  border: 1px solid #526a59;
  border-radius: 9px;
  background: #21372a;
  box-shadow: 0 5px 18px #0b1a1226, inset 0 1px #ffffff0a;
}
#anatomy-view .camera-presets {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(4, minmax(44px, 1fr));
  flex: 0 0 auto;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: #14271c;
}
#anatomy-view .camera-presets::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 2px auto 2px 2px;
  width: calc(25% - 1px);
  border-radius: 4px;
  background: #3b5031;
  box-shadow: inset 0 -2px #f2cd00;
  opacity: 0;
  transform: translateX(0);
  transition: transform var(--ua-reader) var(--ua-move-ease), opacity var(--ua-fast) var(--ua-ease);
  pointer-events: none;
}
#anatomy-view .camera-presets:has([aria-pressed="true"])::before { opacity: 1; }
#anatomy-view .camera-presets:has([data-view="oblique"][aria-pressed="true"])::before { transform: translateX(100%); }
#anatomy-view .camera-presets:has([data-view="side"][aria-pressed="true"])::before { transform: translateX(200%); }
#anatomy-view .camera-presets:has([data-view="back"][aria-pressed="true"])::before { transform: translateX(300%); }
#anatomy-view .camera-bar button {
  min-height: 44px;
  min-width: 44px;
  padding: .45rem .6rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #edf1e8;
  font-size: .8125rem;
  white-space: nowrap;
}
#anatomy-view .camera-presets button[aria-pressed="true"] { color: #f2cd00; background: #3b5031; }
@supports selector(:has(*)) {
  #anatomy-view .camera-presets button[aria-pressed="true"] { background: transparent; }
}
#anatomy-view .camera-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .1rem;
  border-left: 1px solid #526a59;
  padding-left: .35rem;
}
#anatomy-view .camera-actions button[aria-pressed="true"] { color: #f2cd00; background: #3b502f; }
#anatomy-view .camera-actions #clear-selection { color: #edf1e8; border: 0; }
#anatomy-view .camera-actions #reset-button { opacity: 1; color: #becbbc; }
#anatomy-view.map-active .camera-bar { display: none; }
#anatomy-view .camera-bar button:focus-visible { outline: 2px solid #f2cd00; outline-offset: 3px; z-index: 1; }
#anatomy-view .camera-presets button[aria-pressed="true"]:focus-visible { outline-color: #edf1e8; }
#anatomy-view .viewer-tools > summary { display: flex; align-items: center; gap: .45rem; width: fit-content; border-color: transparent; }
#anatomy-view .viewer-tools > summary::before {
  content: '';
  width: 14px;
  height: 10px;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  box-shadow: inset 0 4px #21372a, inset 0 5px currentColor;
}
#anatomy-view .viewer-tools[open] { border-color: #526a59; border-radius: 6px; }
@media (hover: hover) and (pointer: fine) {
  #anatomy-view .camera-actions button:hover:not(:disabled),
  #anatomy-view .camera-presets button:not([aria-pressed="true"]):hover { background: #3b503d; color: #fff; }
  #anatomy-view .viewer-tools > summary:hover { background: #2b4232; }
}
@media (max-width: 1100px) {
  #anatomy-view .camera-bar { gap: .25rem; }
  #anatomy-view .camera-actions { border-left: 0; padding-left: 0; }
}
@media (max-width: 740px) {
  #anatomy-view .camera-bar { width: calc(100% - 1.5rem); max-width: 470px; padding: .4rem; }
  #anatomy-view .camera-presets { flex: 1 1 100%; }
  #anatomy-view .camera-actions { flex: 1 1 100%; justify-content: space-evenly; }
}
.keyboard-input #anatomy-view .camera-presets::before { transition: none; }
@media (prefers-reduced-motion: reduce) {
  #anatomy-view .camera-presets::before { transition: none; }
}
