.document-viewer{padding:0;border:1px solid #42483c;background:#141714;color:#f0f2e8;width:min(1120px,calc(100vw - 40px));height:calc(100dvh - 48px);max-height:960px;max-width:none;margin:auto;overflow:hidden}
.document-viewer[open]{display:flex;flex-direction:column}
.document-viewer::backdrop{background:rgb(0 0 0 / .8);backdrop-filter:blur(6px)}
.document-viewer header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 24px;border-bottom:1px solid #42483c;flex-shrink:0}
.document-viewer h2{font-size:20px;line-height:1.3;margin:0;letter-spacing:0}
.document-counter{display:block;color:#b7beac;font-size:12px;margin-top:5px}
.document-viewer button,.document-viewer footer a{min-height:44px;padding:9px 16px;background:transparent;border:1px solid #667058;color:inherit;font:inherit;font-size:14px;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
.document-viewer [data-close]{font-size:28px;flex-shrink:0}
.document-viewer button:disabled{opacity:.3;cursor:default}
.document-viewer button:focus-visible,.document-viewer a:focus-visible{outline:2px solid #d7ff62;outline-offset:3px}
.document-viewer button:hover:not(:disabled),.document-viewer footer a:hover{background:#303827}
.document-canvas{flex:1;min-height:0;overflow:auto;padding:20px;background:#242720;overscroll-behavior:contain}
.document-canvas img{display:block;width:100%;height:100%;object-fit:contain;margin:auto;max-width:none;max-height:none;aspect-ratio:auto}
.document-canvas.zoomed img{width:max(100%,1000px);height:auto;max-height:none;object-fit:contain;aspect-ratio:auto}
.document-viewer footer{display:flex;justify-content:center;gap:12px;padding:14px 20px;border-top:1px solid #42483c;flex-shrink:0}
@media(max-width:600px){.document-viewer{width:calc(100vw - 12px);height:calc(100dvh - 16px)}.document-viewer header{padding:12px;gap:10px}.document-viewer h2{font-size:16px}.document-canvas{padding:8px}.document-viewer footer{padding:10px 8px;gap:6px}.document-viewer button,.document-viewer footer a{padding:8px 10px;font-size:12px}}
