* { box-sizing: border-box; }
html { height: 100%; background: #fff; color: #252525; font-family: Arial, sans-serif; }
body { height: 100%; height: 100dvh; margin: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.viewer-header { padding: 12px 16px; border-bottom: 1px solid #ddd; }
.viewer-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; }
h1 { margin: 0; font-size: clamp(18px, 2.5vw, 25px); line-height: 1.3; }
a { color: #09449e; }
.viewer-heading a { font-size: 13px; }
.viewer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.viewer-actions button, .viewer-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border: 1px solid #09449e; border-radius: 0; background: #fff; color: #09449e; font: 14px/1.3 Arial, sans-serif; text-decoration: none; cursor: pointer; }
.viewer-actions [aria-pressed="true"] { background: #09449e; color: #fff; }
.viewer-actions :disabled, .viewer-actions [aria-disabled="true"] { opacity: .55; cursor: wait; }
.viewer-actions [aria-disabled="true"] { pointer-events: none; }
[data-viewer-status] { min-height: 18px; margin: 8px 0 0; font-size: 12px; line-height: 1.5; }
.viewer-viewport { min-height: 0; min-width: 0; overflow: auto; display: flex; align-items: center; justify-content: center; background: #fff; }
.viewer-viewport img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; opacity: 1; filter: none; transform: none; }
.viewer-viewport.is-actual { display: block; }
.viewer-viewport.is-actual img { max-width: none; max-height: none; width: auto; height: auto; }
:focus-visible { outline: 3px solid #09449e; outline-offset: 3px; }
.viewer-viewport:focus-visible { outline-offset: -3px; }
[hidden] { display: none !important; }
