.document-viewer{overflow:hidden;background:var(--soft);color:var(--ink)}
.document-viewer[open]{display:flex;flex-direction:column}
.document-viewer header{flex:0 0 auto;min-width:0;background:var(--white);border-color:var(--line)}
.document-viewer header>div:first-child{min-width:0;flex:1}
.document-viewer header .dialog-actions{flex:0 0 auto;flex-wrap:nowrap}
.document-body{height:auto;flex:1 1 auto;min-height:0;overscroll-behavior:contain}
.document-body--pdf{padding:0;gap:0;overflow:hidden;align-items:stretch}
.document-body--pdf .pdf-host{flex:1 1 auto;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.document-body--pdf .pdf-controls{position:static;top:auto;gap:12px;padding:10px 16px;margin:0;border-bottom:1px solid var(--line);background:var(--white);color:var(--ink)}
.pdf-controls button{min-height:0;color:var(--ink);border-color:var(--line);background:var(--white)}
.pdf-controls [data-page]{min-width:56px;text-align:center;font-variant-numeric:tabular-nums}
.document-body--pdf .pdf-paper{min-width:0;min-height:0;overflow:auto;scrollbar-gutter:stable;padding:16px;background:var(--soft);overscroll-behavior:contain;touch-action:pan-x pan-y}
.document-body--pdf .pdf-text{max-height:24dvh;margin:0;padding:10px 16px;overflow:auto;border-top:1px solid var(--line);background:var(--white);color:var(--muted)}
.document-body--pdf .pdf-text p{margin:12px 0 0}
.document-fallback{color:var(--muted);overflow-wrap:anywhere}
.document-body--pdf .document-fallback{flex:0 0 auto;display:block;padding:10px 16px;background:var(--white);border-top:1px solid var(--line);font-size:.75rem}
.document-word-state{display:grid;justify-items:center;gap:16px;width:min(460px,100%);margin:auto;padding:30px 16px;text-align:center;color:var(--ink)}
.document-word-state .document-word-icon{display:grid;place-items:center;width:72px;height:82px;border:1px solid var(--line);border-radius:16px;background:var(--white);color:var(--red);font-size:2rem;font-weight:700}
.document-word-state h3{margin:0;font-size:1.4375rem}.document-word-state p{color:var(--muted);font-size:.9375rem;line-height:1.5}.document-word-state small{font-size:.75rem;color:var(--muted)}
@media(max-width:700px){.document-viewer header{padding:14px;gap:12px}.document-viewer .dialog-actions button{min-height:40px;padding:10px 12px}.document-body--pdf .pdf-controls{gap:8px;padding:10px 8px}.document-body--pdf .pdf-paper{padding:10px}.document-body--pdf .pdf-controls button{width:36px;height:36px}.document-viewer header .eyebrow{font-size:.75rem}.document-word-state{padding:24px 12px}}
