/* Native modal top layer keeps legacy app styles and players underneath. */
:is(#ppo-file-browser,#hq-current-work-pdf-viewer):is(#ppo-file-browser,#hq-current-work-pdf-viewer):is(#ppo-file-browser,#hq-current-work-pdf-viewer) {position:fixed!important;inset:0!important;width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;margin:0!important;padding:env(safe-area-inset-top,0) env(safe-area-inset-right,0) env(safe-area-inset-bottom,0) env(safe-area-inset-left,0)!important;border:0!important;border-radius:0!important;background:#fffaf2!important;color:#392f24!important;box-sizing:border-box!important;overflow:hidden!important;color-scheme:light!important;touch-action:auto!important;user-select:text!important;-webkit-user-select:text!important;cursor:default!important;}
:is(#ppo-file-browser,#hq-current-work-pdf-viewer):not([open]){display:none!important}
:is(#ppo-file-browser,#hq-current-work-pdf-viewer)[open]{display:flex!important;flex-direction:column!important}
:is(#ppo-file-browser,#hq-current-work-pdf-viewer)::backdrop{background:#15110ee6}
:is(#ppo-file-browser,#hq-current-work-pdf-viewer) *{box-sizing:border-box!important;font-family:system-ui,sans-serif!important;color:#392f24!important;text-shadow:none!important;-webkit-text-fill-color:currentColor!important}
:is(#ppo-file-browser,#hq-current-work-pdf-viewer) header,:is(#ppo-file-browser,#hq-current-work-pdf-viewer) nav{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:8px!important;padding:10px 12px!important;background:#f4eadb!important;flex-shrink:0!important}
:is(#ppo-file-browser,#hq-current-work-pdf-viewer) h2{flex:1!important;min-width:0!important;margin:0!important;font-size:18px!important;line-height:1.3!important;overflow-wrap:anywhere!important}
:is(#ppo-file-browser,#hq-current-work-pdf-viewer) button{font-size:16px!important;line-height:1.3!important;min-height:44px!important;padding:8px 12px!important;background:#fffaf2!important;border:1px solid #9b8260!important;border-radius:8px!important;cursor:pointer!important;white-space:normal!important}
:is(#ppo-file-browser,#hq-current-work-pdf-viewer) button[hidden]{display:none!important}
:is(#ppo-file-browser,#hq-current-work-pdf-viewer) button:disabled{opacity:.45!important}
:is(#ppo-file-browser,#hq-current-work-pdf-viewer) button:focus-visible,:is(#ppo-file-browser,#hq-current-work-pdf-viewer) .ppo-file-stage:focus-visible{outline:3px solid #795737!important;outline-offset:-3px!important}
:is(#ppo-file-browser,#hq-current-work-pdf-viewer)>p{font-size:14px!important;line-height:1.4!important;margin:0!important;padding:6px 12px!important;flex-shrink:0!important}
:is(#ppo-file-browser,#hq-current-work-pdf-viewer) .ppo-file-stage{flex:1!important;min-height:0!important;min-width:0!important;width:100%!important;overflow:auto!important;padding:16px!important;background:#e8e0d4!important;overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y pinch-zoom!important}
:is(#ppo-file-browser,#hq-current-work-pdf-viewer) .ppo-file-stage img,:is(#ppo-file-browser,#hq-current-work-pdf-viewer) canvas{display:block!important;max-width:none!important;max-height:none!important;margin:0 auto!important;object-fit:contain!important;background:white!important}
:is(#ppo-file-browser,#hq-current-work-pdf-viewer) .ppo-file-stage img{height:auto!important}
:is(#ppo-file-browser,#hq-current-work-pdf-viewer) .ppo-file-readable-text{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important}
@media(max-width:420px){:is(#ppo-file-browser,#hq-current-work-pdf-viewer) header,:is(#ppo-file-browser,#hq-current-work-pdf-viewer) nav{padding:6px 8px!important;gap:6px!important}:is(#ppo-file-browser,#hq-current-work-pdf-viewer) button{font-size:14px!important;padding:8px!important}:is(#ppo-file-browser,#hq-current-work-pdf-viewer) .ppo-file-stage{padding:8px!important}}
