/* Interaction-specific navigation and image reader styles. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.screen-dialog {
  width: min(1440px, calc(100vw - 24px));
  height: min(960px, calc(100dvh - 24px));
  max-width: none;
  max-height: none;
  padding: 12px;
  border: 1px solid #c8d6bc;
  border-radius: 12px;
  background: #f4f3e9;
  color: #173d32;
  overflow: hidden;
}
.screen-dialog[open] {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: 10px;
}
.screen-dialog::backdrop { background: #102b22bc; backdrop-filter: blur(5px); }
.screen-dialog .dialog-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0; min-width: 0; }
.screen-dialog .dialog-bar p { font-size: 14px; line-height: 1.4; margin: 0; font-weight: 600; }
.screen-dialog button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  flex-shrink: 0;
  padding: 8px 12px;
  border: 1px solid #a9b99a;
  border-radius: 5px;
  background: #e2ead8;
  color: #173d32;
  font: inherit;
  font-size: 16px;
  line-height: 1.2;
}
.screen-dialog .dialog-close { font-size: 14px; gap: 10px; }
.screen-dialog .dialog-close span { font-size: 24px; }
.screen-dialog button[aria-disabled="true"] { color: #53624a; background: #e8ecdf; cursor: default; }
.viewer-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.zoom-status { margin-left: auto; font-size: 14px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.viewer-viewport {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #b8c7a9;
  border-radius: 4px;
  background: #dde6d6;
  scrollbar-gutter: stable;
  cursor: grab;
  user-select: none;
}
.viewer-viewport.is-dragging { cursor: grabbing; }
.screen-dialog .dialog-image { display: block; max-width: none; max-height: none; object-fit: initial; margin: 0 auto; }
.screen-dialog .viewer-help,
.screen-dialog .dialog-caption { margin: 0; color: #41563a; font-size: 14px; line-height: 1.45; }
.screen-dialog :focus-visible { outline: 3px solid #173d32; outline-offset: 2px; }
@media (hover: hover) {
  .screen-dialog button:not([aria-disabled="true"]):hover { background: #d5e7a3; }
}
@media (hover: none) {
  .screen-expand .expand-hint { opacity: 1; transform: none; }
}
@media (max-width: 640px) {
  .hero .menu-toggle { width: 44px; height: 44px; flex-shrink: 0; }
  .hero .links a { min-height: 44px; display: flex; align-items: center; font-size: 16px; }
}
