.pwa-file-viewer { position: fixed; inset: 0; z-index: 4000; background: #f1f4f7; color: #263442; display: flex; flex-direction: column; height: 100dvh; padding-top: env(safe-area-inset-top, 0px); box-sizing: border-box; }
.pwa-file-viewer > header { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: white; border-bottom: 1px solid #d5dde5; }
.pwa-file-viewer > header strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.pwa-file-viewer button, .pwa-file-viewer a, .pwa-file-viewer select { font: inherit; font-size: 14px; min-height: 44px; box-sizing: border-box; padding: 10px 12px; border: 1px solid #cdd6df; border-radius: 6px; background: white; color: #17618b; cursor: pointer; }
.pwa-file-viewer button:disabled { opacity: .4; cursor: default; }
.pwa-file-viewer a { display: inline-flex; align-items: center; text-decoration: none; }
.pwa-file-viewer [hidden] { display: none !important; }
.pwa-file-tools { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; font-size: 13px; }
.pwa-file-tools:empty { display: none; }
.pwa-file-tools select { max-width: 100%; }
.pwa-file-content { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
.pwa-file-content canvas { display: block; margin: 0 auto; background: white; box-shadow: 0 2px 10px #0002; }
.pwa-file-content img, .pwa-file-content video { display: block; max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; }
.pwa-file-content pre { white-space: pre-wrap; overflow-wrap: anywhere; background: white; padding: 16px; font-size: 15px; }
.pwa-file-content table { border-collapse: collapse; background: white; min-width: 100%; }
.pwa-file-content td { border: 1px solid #d5dde5; padding: 8px; font-size: 14px; white-space: pre-wrap; min-width: 80px; }
.pwa-file-content input { min-height: 44px; font-size: 16px; }
.pwa-file-content > p { font-size: 16px; }
.pwa-file-content > a, .pwa-file-content > button { margin: 4px; }
