#docxViewerTool .viewer-stage {
    background: #ececec;
    border: 1px solid #d8d8d8;
    border-radius: 0.5rem;
    height: min(78vh, 980px);
    overflow: auto;
    padding: 1rem;
}

#docxViewerTool .viewer-canvas {
    margin: 0 auto;
    transform-origin: top center;
    transition: transform 0.15s ease-out;
}

#docxViewerTool .viewer-canvas .docx-wrapper {
    background: transparent;
    padding: 0;
}

#docxViewerTool .viewer-canvas section,
#docxViewerTool .viewer-canvas .docx {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    margin: 0 auto 1rem auto;
}

#docxViewerTool .meta-key {
    color: #6c757d;
    font-size: 0.9rem;
}

#docxViewerTool .meta-value {
    font-weight: 600;
    word-break: break-word;
}

#docxViewerTool mark.search-hit {
    background: #ffef8a;
    color: #212529;
    padding: 0;
}

#docxViewerTool mark.search-hit.active {
    background: #f8d347;
    outline: 1px solid #be8f00;
}

#docxViewerTool .toolbar-grid {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: center;
}

#docxViewerTool .toolbar-grid .zoom-group {
    grid-column: span 4;
}

#docxViewerTool .toolbar-grid .page-group {
    grid-column: span 3;
}

#docxViewerTool .toolbar-grid .search-group {
    grid-column: span 5;
}

@media (max-width: 991.98px) {
    #docxViewerTool .viewer-stage {
        height: min(68vh, 760px);
        padding: 0.6rem;
    }

    #docxViewerTool .toolbar-grid {
        grid-template-columns: 1fr;
    }

    #docxViewerTool .toolbar-grid .zoom-group,
    #docxViewerTool .toolbar-grid .page-group,
    #docxViewerTool .toolbar-grid .search-group {
        grid-column: auto;
    }
}
