/* Standalone PDF shell: does not affect the public layout or other viewers. */
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }
.pdf-viewer {
    display: flex; flex-direction: column; height: 100vh; height: 100dvh;
    color: #f8eeef; background: #161014;
    font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
}
.pdf-toolbar {
    flex: 0 0 auto; display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    align-items: center; gap: 12px; padding: 8px 14px;
    padding-top: max(8px, env(safe-area-inset-top));
    border-bottom: 1px solid rgba(255,255,255,.16);
}
.pdf-toolbar a, .pdf-fallback a {
    color: #f8eeef; text-decoration: none; border-radius: 6px;
    display: inline-flex; align-items: center; min-height: 44px;
    box-sizing: border-box; padding: 6px 10px;
}
.pdf-toolbar a:hover, .pdf-fallback a:hover { background: rgba(255,255,255,.08); }
.pdf-toolbar a:focus-visible, .pdf-fallback a:focus-visible { outline: 2px solid #e88a3c; outline-offset: 2px; }
.pdf-toolbar .pdf-brand { color: #e88a3c; font-weight: 700; white-space: nowrap; }
.pdf-title {
    margin: 0; font-size: 16px; font-weight: 500; min-width: 0;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.pdf-canvas { position: relative; flex: 1 1 0; min-height: 0; min-width: 0; overflow: hidden; }
.pdf-document { display: block; width: 100%; height: 100%; border: 0; }
.pdf-fallback { box-sizing: border-box; height: 100%; overflow: auto; padding: 24px; text-align: center; }
.pdf-fallback a { color: #e88a3c; border: 1px solid currentColor; }
@media (max-width: 600px) {
    .pdf-toolbar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 0 6px; padding: 4px 8px; }
    .pdf-toolbar .pdf-brand { justify-self: center; font-size: 13px; padding-inline: 2px; }
    .pdf-title { grid-row: 2; grid-column: 1 / -1; font-size: 14px; padding: 2px 4px 6px; }
    .pdf-download { grid-column: 3; grid-row: 1; }
}

.pdf-fallback[hidden] { display: none; }
.pdf-canvas > .pdf-fallback {
    position: absolute; inset: auto 12px 12px; height: auto; max-height: 45%;
    background: #161014; border: 1px solid #e88a3c; border-radius: 8px; padding: 12px;
}
