html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    /* The neutral page-tray gray that Chrome/Edge use behind an opened
       PDF, so the page reads like a native PDF viewer rather than a
       website. */
    background-color: #525659;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.pdf-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.pdf-toolbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 48px;
    padding: 0 1rem;
    background: #fafafa;
    border-bottom: 1px solid #d4d4d4;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.pdf-toolbar__title {
    font-size: 0.85rem;
    color: #3c4043;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pdf-toolbar__controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    margin-left: auto;
}

.pdf-toolbar__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #5f6368;
    cursor: pointer;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.pdf-toolbar__btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

.pdf-toolbar__btn svg {
    width: 18px;
    height: 18px;
}

.pdf-toolbar__zoom,
.pdf-toolbar__pages {
    font-size: 0.8rem;
    color: #5f6368;
    min-width: 2.6rem;
    text-align: center;
    user-select: none;
}

.pdf-toolbar__divider {
    width: 1px;
    height: 22px;
    background: #dcdcdc;
}

.pdf-viewer {
    flex: 1;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px 12px 40px;
    box-sizing: border-box;
    overflow-x: auto;
}

.pdf-page {
    display: block;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.pdf-fallback {
    margin: 3rem auto;
    padding: 1.5rem 2rem;
    max-width: 28rem;
    text-align: center;
    background: #fff;
    border-radius: 8px;
    color: #333;
}

.pdf-fallback a {
    color: #00274C;
}

@media (max-width: 480px) {
    .pdf-toolbar__title {
        display: none;
    }

    .pdf-toolbar__controls {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
    }
}
