/* Isolated r230 candidate: annotation chrome only; never transforms the image or canvas. */
body.student-page #imageViewer .annotation-control-icon {
  display: inline-block;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  background: currentColor;
  mask: var(--annotation-icon) center / contain no-repeat;
  -webkit-mask: var(--annotation-icon) center / contain no-repeat;
  pointer-events: none;
}
body.student-page #imageViewer .annotation-fab {
  display: inline-flex;
  min-height: 44px !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
body.student-page #imageViewer .annotation-fab::before { content: none !important; }
body.student-page #imageViewer .annotation-back,
body.student-page #imageViewer .annotation-session-controls { display: none; }

body.student-page #imageViewer.is-annotating .image-viewer-toolbar {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 24;
  display: flex !important;
  box-sizing: border-box;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  padding: calc(6px + var(--wf-safe-top, env(safe-area-inset-top, 0px))) max(8px, env(safe-area-inset-right, 0px)) 6px max(8px, env(safe-area-inset-left, 0px)) !important;
  background: var(--annotation-ivory) !important;
  color: var(--annotation-ink) !important;
  text-shadow: none !important;
}
body.student-page #imageViewer.is-annotating #imageViewerCaption,
body.student-page #imageViewer.is-annotating #imageViewerZoom,
body.student-page #imageViewer.is-annotating #imageViewerReset { display: none !important; }
body.student-page #imageViewer.is-annotating .annotation-session-controls,
body.student-page #imageViewer.is-annotating .image-viewer-toolbar-actions { display: contents !important; }
body.student-page #imageViewer.is-annotating .annotation-session-control {
  display: flex;
  box-sizing: border-box;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 2px !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: transparent !important;
  color: var(--annotation-ink) !important;
  box-shadow: none !important;
  font-size: 11px !important;
  font-weight: 400 !important;
  line-height: 1.15;
  cursor: pointer;
  touch-action: manipulation;
}
body.student-page #imageViewer .annotation-session-control:disabled { opacity: .35; }
/* Old undo/redo Unicode pseudo-icons must not stack with the explicit SVG icon. */
body.student-page #imageViewer .annotation-session-control::before,
body.student-page #imageViewer .annotation-session-control::after { content: none !important; display: none !important; }
body.student-page #imageViewer .annotation-session-control > span { font-weight: inherit; flex-shrink: 0; }
body.student-page #imageViewer .annotation-session-control:focus-visible,
body.student-page #imageViewer #annotationWorkbench :is(button, select, input):focus-visible {
  outline: 2px solid var(--annotation-amber);
  outline-offset: 1px;
}
body.student-page #imageViewer.is-annotating #imageViewerClose {
  flex: 0 0 44px;
  width: 44px !important;
  height: 44px !important;
  min-height: 44px;
}
body.student-page #imageViewer.is-annotating #imageViewerClose::before,
body.student-page #imageViewer.is-annotating #imageViewerClose::after { background: var(--annotation-ink) !important; }
body.student-page #imageViewer .annotation-session-menu { position: relative; flex: 0 0 44px; }
body.student-page #imageViewer .annotation-session-menu summary { list-style: none; }
body.student-page #imageViewer .annotation-session-menu summary::-webkit-details-marker { display: none; }
body.student-page #imageViewer .annotation-session-menu summary > span:first-child { height: 20px; font-size: 22px; line-height: 14px; }
body.student-page #imageViewer .annotation-session-menu-items {
  position: absolute;
  z-index: 1;
  top: calc(100% + 6px);
  right: 0;
  width: 132px;
  padding: 4px;
  border: 1px solid var(--annotation-line);
  border-radius: 6px;
  background: var(--annotation-ivory);
  box-shadow: 0 5px 18px #0003;
}
body.student-page #imageViewer .annotation-session-menu-items button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--annotation-ink);
  font: inherit;
  font-size: 13px;
  text-align: left;
  touch-action: manipulation;
}
body.student-page #imageViewer .annotation-session-menu-items button::before { content: none !important; }

body.student-page #imageViewer #annotationWorkbench.annotation-two-row {
  position: fixed;
  top: calc(62px + var(--wf-safe-top, env(safe-area-inset-top, 0px)));
  right: max(8px, env(safe-area-inset-right, 0px));
  bottom: auto;
  left: max(8px, env(safe-area-inset-left, 0px));
  z-index: 16;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: 48px auto !important;
  box-sizing: border-box;
  width: auto !important;
  max-width: 640px !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  align-items: stretch !important;
  gap: 0 !important;
  padding: 0 !important;
  margin-inline: auto;
  overflow: visible !important;
  border: 1px solid var(--annotation-line);
  border-radius: 6px;
  background: var(--annotation-ivory);
  touch-action: auto !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body.student-page #imageViewer #annotationWorkbench.annotation-two-row:is(.hidden, .is-collapsed) { display: none !important; }
body.student-page #imageViewer #annotationWorkbench.annotation-two-row > .annotation-tool-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  grid-row: 1 !important;
  grid-column: 1 !important;
  order: 0 !important;
  align-items: stretch;
  gap: 2px;
  min-width: 0;
  padding: 2px 4px !important;
  border-bottom: 1px solid var(--annotation-line);
}
body.student-page #imageViewer #annotationWorkbench.annotation-two-row .annotation-tool-grid button {
  box-sizing: border-box;
  width: auto !important;
  min-width: 0 !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  order: 0 !important;
  margin: 0;
  padding: 2px !important;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--annotation-ink);
  font-size: 11px;
  line-height: 1.1;
  touch-action: manipulation;
}
body.student-page #imageViewer #annotationWorkbench.annotation-two-row .annotation-tool-grid button::before {
  content: "" !important;
  display: block;
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0 auto 3px;
  background: currentColor;
  mask: var(--annotation-icon) center / contain no-repeat;
  -webkit-mask: var(--annotation-icon) center / contain no-repeat;
}
body.student-page #imageViewer .annotation-tool-grid [data-annotation-tool="pen"] { --annotation-icon: url('/assets/museum/r210/icons/pencil.svg'); }
body.student-page #imageViewer .annotation-tool-grid [data-annotation-tool="eraser"] { --annotation-icon: url('/assets/museum/r210/icons/eraser.svg'); }
body.student-page #imageViewer .annotation-tool-grid [data-annotation-tool="text"] { --annotation-icon: url('/assets/museum/r210/icons/typography.svg'); }
body.student-page #imageViewer .annotation-tool-grid [data-annotation-context="notes"] { --annotation-icon: url('/assets/museum/r210/icons/notebook.svg'); }
body.student-page #imageViewer .annotation-tool-grid [data-annotation-tool="select"] { --annotation-icon: url('/assets/museum/r210/icons/select-all.svg'); }
body.student-page #imageViewer #annotationWorkbench.annotation-two-row .annotation-tool-grid button.active {
  background: var(--annotation-amber-soft);
  color: var(--annotation-ink);
  box-shadow: inset 0 -2px var(--annotation-amber) !important;
}
body.student-page #imageViewer #annotationWorkbench.annotation-two-row .annotation-tab-panel {
  display: flex !important;
  grid-row: 2 !important;
  grid-column: 1 !important;
  order: 0 !important;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  min-height: 54px !important;
  height: auto !important;
  max-height: none !important;
  align-items: center;
  gap: 6px;
  padding: 5px 6px !important;
  overflow: visible;
}
body.student-page #imageViewer #annotationWorkbench.annotation-two-row .annotation-tab-panel.hidden { display: none !important; }
body.student-page #imageViewer #annotationWorkbench.annotation-two-row .annotation-context-hint {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: var(--annotation-muted);
  font-size: 11px;
  line-height: 1.5;
}
body.student-page #imageViewer #annotationWorkbench.annotation-two-row .annotation-select-control { flex: 0 1 86px; min-width: 0; }
body.student-page #imageViewer #annotationWorkbench.annotation-two-row select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 5px 3px;
  border: 1px solid var(--annotation-line) !important;
  border-radius: 4px !important;
  background: var(--annotation-ivory) !important;
  color: var(--annotation-ink) !important;
  font-size: 12px;
}
body.student-page #imageViewer #annotationWorkbench.annotation-two-row .annotation-width-control {
  display: grid;
  flex: 1 1 110px;
  grid-template-columns: minmax(36px, 1fr) 33px;
  gap: 3px;
  min-width: 80px;
  width: auto;
  padding: 0;
  font-size: 10px;
}
body.student-page #imageViewer #annotationWorkbench.annotation-two-row .annotation-width-control input { min-width: 0; height: 44px; margin: 0; }
body.student-page #imageViewer #annotationWorkbench.annotation-two-row .annotation-width-control output { min-width: 0; }
body.student-page #imageViewer #annotationWorkbench.annotation-two-row .annotation-tab-panel button {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: auto;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 5px 8px;
  border: 1px solid var(--annotation-line) !important;
  border-radius: 4px !important;
  background: transparent !important;
  color: var(--annotation-ink) !important;
  font-size: 12px;
  touch-action: manipulation;
}
body.student-page #imageViewer #annotationWorkbench.annotation-two-row .annotation-tab-panel button::before { content: none !important; }
body.student-page #imageViewer #annotationWorkbench.annotation-two-row.is-loading { opacity: .6; pointer-events: none; }
body.student-page #imageViewer .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
