.academia-file-viewer {
	box-sizing: border-box; width: min(1200px, 96vw); height: 92dvh;
	max-width: 100vw; max-height: 100dvh; padding: 0; border: 0; border-radius: 10px;
	color: #243447; background: #fff; overflow: hidden;
}
.academia-file-viewer[open] { display: flex; flex-direction: column; }
.academia-file-viewer::backdrop { background: rgb(0 0 0 / 65%); }
.academia-file-viewer header, .academia-file-viewer footer, .afp-toolbar {
	display: flex; align-items: center; gap: 8px; padding: 10px 16px; flex-wrap: wrap; flex-shrink: 0;
}
.academia-file-viewer header { justify-content: space-between; }
.academia-file-viewer header strong { overflow-wrap: anywhere; flex: 1; font-weight: 500; }
.academia-file-viewer button, .academia-file-viewer footer a {
	font: inherit; font-size: 14px; color: #243447; background: #f3f5f7;
	border: 1px solid #ccd3db; border-radius: 5px; padding: 8px 10px; cursor: pointer;
}
.academia-file-viewer button:disabled { opacity: .45; cursor: default; }
.academia-file-viewer :focus-visible { outline: 2px solid #2463b4; outline-offset: 2px; }
.academia-file-viewer [hidden] { display: none !important; }
.afp-message { margin: 0; padding: 0 16px 8px; flex-shrink: 0; }
.afp-message:empty { display: none; }
.afp-viewport { flex: 1; min-height: 0; overflow: auto; padding: 16px; background: #e6e9ed; overscroll-behavior: contain; cursor: grab; }
.afp-viewport:active { cursor: grabbing; }
.afp-stage { position: relative; margin: auto; flex-shrink: 0; background: white; }
.afp-stage img { position: absolute; left: 50%; top: 50%; max-width: none !important; max-height: none !important; }
.afp-stage canvas { display: block; max-width: none; }
@media (max-width: 767px) {
	.academia-file-viewer { width: 100vw; height: 100dvh; border-radius: 0; margin: 0; }
	.afp-toolbar { gap: 5px; padding: 8px; }
	.academia-file-viewer button { min-height: 44px; }
}
