/* FFI PACS v4.4.7 final responsive corrections.
   Loaded after style.css to override legacy compatibility layers. */

@media (max-width:720px){
  body:not(.viewer-page).app-current.shell-auto-hide,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide{
    overflow-x:hidden!important;
  }
  body:not(.viewer-page).app-current.shell-auto-hide .app-shell,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .app-shell{
    width:100dvw!important;
    max-width:100dvw!important;
    padding:0!important;
    margin:0!important;
    display:block!important;
  }
  body:not(.viewer-page).app-current.shell-auto-hide .content,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .content{
    width:100dvw!important;
    max-width:100dvw!important;
    min-height:100dvh!important;
    padding:6px 8px calc(76px + env(safe-area-inset-bottom))!important;
    margin:0!important;
  }
  body:not(.viewer-page).app-current.shell-auto-hide .content-layout,
  body:not(.viewer-page).app-current.shell-auto-hide .content-body,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .content-layout,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .content-body{
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
  }
  body:not(.viewer-page).app-current.shell-auto-hide .mobile-menu-button,
  body:not(.viewer-page).app-current.shell-auto-hide .mobile-backdrop,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .mobile-menu-button,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .mobile-backdrop{
    display:none!important;
    pointer-events:none!important;
  }
  body:not(.viewer-page).app-current.shell-auto-hide .sidebar,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .sidebar{
    position:fixed!important;
    left:0!important;
    top:0!important;
    width:min(78dvw,292px)!important;
    height:100dvh!important;
    transform:translateX(calc(-100% - 14px))!important;
    transition:transform .18s ease!important;
    z-index:25!important;
  }
  body:not(.viewer-page).app-current.shell-auto-hide.left-dock-open .sidebar,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide.left-dock-open .sidebar{
    transform:translateX(0)!important;
  }
  body:not(.viewer-page).app-current.shell-auto-hide .context-rail,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .context-rail{
    position:fixed!important;
    right:0!important;
    top:0!important;
    width:min(78dvw,320px)!important;
    min-width:0!important;
    height:100dvh!important;
    transform:translateX(calc(100% + 14px))!important;
    transition:transform .18s ease!important;
    z-index:25!important;
  }
  body:not(.viewer-page).app-current.shell-auto-hide.right-dock-open .context-rail,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide.right-dock-open .context-rail{
    transform:translateX(0)!important;
  }
  body:not(.viewer-page).app-current.shell-auto-hide #left-dock-handle,
  body:not(.viewer-page).app-current.shell-auto-hide #right-dock-handle,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide #left-dock-handle,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide #right-dock-handle{
    display:inline-flex!important;
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
    top:auto!important;
    bottom:calc(18px + env(safe-area-inset-bottom))!important;
    width:50px!important;
    height:50px!important;
    min-width:50px!important;
    min-height:50px!important;
    border-radius:16px!important;
  }
  body:not(.viewer-page).app-current.shell-auto-hide #left-dock-handle,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide #left-dock-handle{left:8px!important;right:auto!important}
  body:not(.viewer-page).app-current.shell-auto-hide #right-dock-handle,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide #right-dock-handle{right:8px!important;left:auto!important}
  body:not(.viewer-page).app-current.shell-auto-hide .dock-handle-label,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .dock-handle-label{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    overflow:hidden!important;
    clip:rect(0,0,0,0)!important;
  }
  body:not(.viewer-page).app-current.shell-auto-hide .page-head h1,
  body:not(.viewer-page).app-current.shell-auto-hide .dashboard-head h1,
  body:not(.viewer-page).app-current.shell-auto-hide .premium-dashboard-head h1,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .page-head h1,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .dashboard-head h1,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .premium-dashboard-head h1{
    font-size:clamp(24px,7vw,30px)!important;
    line-height:1.04!important;
    overflow-wrap:anywhere!important;
  }
}

/* 447L FINAL: camada vencedora para viewer mobile esticar ate a dock sem quebrar. */
@media(max-width:760px){
  body.viewer-page.app-current:not(.viewer-compare-reading-mode),
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .app-shell,
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .content{
    position:fixed!important;
    inset:0!important;
    width:100dvw!important;
    height:100dvh!important;
    min-width:0!important;
    min-height:0!important;
    padding:0!important;
    margin:0!important;
    overflow:hidden!important;
    background:#020617!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .viewer-head,
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-info{
    display:none!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewer,
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewer-pro,
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewport-wrap,
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewport-shell{
    position:fixed!important;
    inset:0!important;
    width:100dvw!important;
    height:100dvh!important;
    min-width:0!important;
    min-height:0!important;
    padding:0!important;
    margin:0!important;
    border-radius:0!important;
    overflow:hidden!important;
    background:#020617!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewer,
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewer-pro{
    display:grid!important;
    grid-template-columns:1fr!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewport,
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewport-pro{
    position:absolute!important;
    inset:0!important;
    width:100dvw!important;
    height:100dvh!important;
    min-width:0!important;
    min-height:0!important;
    padding:4px 4px calc(52px + env(safe-area-inset-bottom))!important;
    display:grid!important;
    justify-items:center!important;
    align-items:start!important;
    overflow:hidden!important;
    background:#000!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewport img,
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewport-pro img{
    max-width:calc(100dvw - 8px)!important;
    max-height:calc(100dvh - 58px - env(safe-area-inset-bottom))!important;
    object-fit:contain!important;
    transform-origin:top center!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .viewer-mobile-stack-nav{
    position:absolute!important;
    inset:0!important;
    pointer-events:none!important;
    z-index:118!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .viewer-mobile-nav-button{
    pointer-events:auto!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-toolbar-pro{
    position:fixed!important;
    left:50%!important;
    right:auto!important;
    top:auto!important;
    bottom:calc(4px + env(safe-area-inset-bottom))!important;
    width:auto!important;
    max-width:calc(100dvw - 12px)!important;
    min-width:0!important;
    display:block!important;
    padding:4px!important;
    border-radius:14px!important;
    transform:translateX(-50%)!important;
    overflow:hidden!important;
    z-index:150!important;
    background:rgba(8,13,23,.96)!important;
    border:1px solid rgba(148,163,184,.28)!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-toolbar-pro .viewer-stack-controls,
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-toolbar-pro .viewer-tool-sliders{
    display:none!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-toolbar-pro .viewer-smart-dock{
    display:grid!important;
    grid-template-columns:repeat(6,31px)!important;
    gap:3px!important;
    width:auto!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-toolbar-pro .viewer-dock-tool{
    width:31px!important;
    min-width:31px!important;
    max-width:31px!important;
    height:34px!important;
    min-height:34px!important;
    max-height:34px!important;
    display:grid!important;
    grid-template-rows:15px 9px!important;
    place-items:center!important;
    gap:1px!important;
    padding:2px 1px!important;
    border-radius:10px!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-toolbar-pro .viewer-dock-tool svg{
    width:13px!important;
    height:13px!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-toolbar-pro .viewer-dock-tool span::before{
    font-size:7px!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .viewer-context-panel{
    position:fixed!important;
    right:8px!important;
    left:auto!important;
    top:8px!important;
    width:min(330px,calc(100dvw - 16px))!important;
    max-height:calc(100dvh - 72px - env(safe-area-inset-bottom))!important;
    z-index:155!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode).viewer-thumbs-open .dicom-viewer-side{
    left:8px!important;
    right:8px!important;
    bottom:calc(48px + env(safe-area-inset-bottom))!important;
    max-height:30dvh!important;
    z-index:146!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewer{
    padding:4px 4px calc(50px + env(safe-area-inset-bottom))!important;
    gap:5px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools{
    bottom:calc(3px + env(safe-area-inset-bottom))!important;
  }
}

/* 447L: viewers mobile usam a area diagnostica ate a dock, com reserva adaptiva. */
@media(max-width:760px){
  body.viewer-page.app-current:not(.viewer-compare-reading-mode),
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .app-shell,
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .content{
    position:fixed!important;
    inset:0!important;
    width:100dvw!important;
    height:100dvh!important;
    min-width:0!important;
    min-height:0!important;
    padding:0!important;
    margin:0!important;
    overflow:hidden!important;
    background:#020617!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .viewer-head,
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-info{
    display:none!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewer,
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewer-pro{
    position:fixed!important;
    inset:0!important;
    width:100dvw!important;
    height:100dvh!important;
    min-width:0!important;
    min-height:0!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    padding:0!important;
    margin:0!important;
    overflow:hidden!important;
    background:#020617!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewport-wrap,
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewport-shell{
    position:fixed!important;
    inset:0!important;
    width:100dvw!important;
    height:100dvh!important;
    min-width:0!important;
    min-height:0!important;
    display:block!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    overflow:hidden!important;
    background:#020617!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewport,
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewport-pro{
    position:absolute!important;
    inset:0!important;
    width:100dvw!important;
    height:100dvh!important;
    min-width:0!important;
    min-height:0!important;
    padding:4px 4px calc(52px + env(safe-area-inset-bottom))!important;
    display:grid!important;
    justify-items:center!important;
    align-items:start!important;
    overflow:hidden!important;
    background:#000!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewport img,
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewport-pro img{
    max-width:calc(100dvw - 8px)!important;
    max-height:calc(100dvh - 58px - env(safe-area-inset-bottom))!important;
    object-fit:contain!important;
    transform-origin:top center!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .viewer-mobile-stack-nav{
    position:absolute!important;
    inset:0!important;
    pointer-events:none!important;
    z-index:118!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .viewer-mobile-nav-button{
    pointer-events:auto!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-toolbar-pro{
    position:fixed!important;
    left:50%!important;
    right:auto!important;
    top:auto!important;
    bottom:calc(4px + env(safe-area-inset-bottom))!important;
    width:auto!important;
    max-width:calc(100dvw - 12px)!important;
    min-width:0!important;
    display:block!important;
    padding:4px!important;
    border-radius:14px!important;
    transform:translateX(-50%)!important;
    overflow:hidden!important;
    z-index:150!important;
    background:rgba(8,13,23,.96)!important;
    border:1px solid rgba(148,163,184,.28)!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-toolbar-pro .viewer-stack-controls,
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-toolbar-pro .viewer-tool-sliders{
    display:none!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-toolbar-pro .viewer-smart-dock{
    display:grid!important;
    grid-template-columns:repeat(6,31px)!important;
    gap:3px!important;
    width:auto!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-toolbar-pro .viewer-dock-tool{
    width:31px!important;
    min-width:31px!important;
    max-width:31px!important;
    height:34px!important;
    min-height:34px!important;
    max-height:34px!important;
    display:grid!important;
    grid-template-rows:15px 9px!important;
    place-items:center!important;
    gap:1px!important;
    padding:2px 1px!important;
    border-radius:10px!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-toolbar-pro .viewer-dock-tool svg{
    width:13px!important;
    height:13px!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-toolbar-pro .viewer-dock-tool span::before{
    font-size:7px!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .viewer-context-panel{
    position:fixed!important;
    right:8px!important;
    left:auto!important;
    top:8px!important;
    width:min(330px,calc(100dvw - 16px))!important;
    max-height:calc(100dvh - 72px - env(safe-area-inset-bottom))!important;
    z-index:155!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode).viewer-thumbs-open .dicom-viewer-side{
    left:8px!important;
    right:8px!important;
    bottom:calc(48px + env(safe-area-inset-bottom))!important;
    max-height:30dvh!important;
    z-index:146!important;
  }
}

/* 447A: mobile docks are edge sheets; desktop compact remains untouched. */
@media(max-width:760px){
  html.shell-mobile-initial,
  html.shell-mobile-initial body:not(.viewer-page).app-current,
  body:not(.viewer-page).app-current.shell-auto-hide,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed{
    overflow-x:hidden!important;
    overflow-y:auto!important;
    height:auto!important;
    min-height:100dvh!important;
  }

  body:not(.viewer-page).app-current.shell-auto-hide .app-shell,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .app-shell,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .app-shell{
    display:block!important;
    width:100dvw!important;
    max-width:100dvw!important;
    height:auto!important;
    min-height:100dvh!important;
    overflow:visible!important;
    padding:0!important;
    margin:0!important;
  }

  body:not(.viewer-page).app-current.shell-auto-hide .content,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .content,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .content{
    width:100dvw!important;
    max-width:100dvw!important;
    height:auto!important;
    min-height:100dvh!important;
    overflow:visible!important;
    padding:4px 8px calc(74px + env(safe-area-inset-bottom))!important;
    margin:0!important;
  }

  body:not(.viewer-page).app-current.shell-auto-hide .content-layout,
  body:not(.viewer-page).app-current.shell-auto-hide .content-body,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .content-layout,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .content-body,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .content-layout,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .content-body{
    width:100%!important;
    max-width:100%!important;
    min-height:0!important;
    overflow:visible!important;
    margin:0!important;
  }

  body:not(.viewer-page).app-current.shell-auto-hide .mobile-menu-button,
  body:not(.viewer-page).app-current.shell-auto-hide .mobile-backdrop,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .mobile-menu-button,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .mobile-backdrop,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .mobile-menu-button,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .mobile-backdrop{
    display:none!important;
    pointer-events:none!important;
  }

  body:not(.viewer-page).app-current.shell-auto-hide .sidebar,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .sidebar,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .sidebar,
  body:not(.viewer-page).app-current.shell-auto-hide .context-rail,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .context-rail,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .context-rail{
    position:fixed!important;
    top:0!important;
    bottom:0!important;
    height:100dvh!important;
    max-height:100dvh!important;
    min-width:0!important;
    opacity:1!important;
    visibility:visible!important;
    transition:transform .12s ease!important;
    will-change:transform!important;
    z-index:80!important;
    box-sizing:border-box!important;
    contain:layout paint!important;
  }

  body:not(.viewer-page).app-current.shell-auto-hide .sidebar,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .sidebar{
    left:0!important;
    right:auto!important;
    width:min(72dvw,268px)!important;
    max-width:calc(100dvw - 48px)!important;
    padding:10px 8px!important;
    border-radius:0 18px 18px 0!important;
    transform:translate3d(calc(-100% - 10px),0,0)!important;
    overflow:auto!important;
  }

  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .sidebar{
    left:0!important;
    right:auto!important;
    width:min(58dvw,224px)!important;
    max-width:calc(100dvw - 72px)!important;
    padding:10px 8px!important;
    border-radius:0 18px 18px 0!important;
    transform:translate3d(calc(-100% - 10px),0,0)!important;
    overflow:auto!important;
  }

  body:not(.viewer-page).app-current.shell-auto-hide.left-dock-open .sidebar,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide.left-dock-open .sidebar,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.left-dock-open .sidebar{
    transform:translate3d(0,0,0)!important;
    box-shadow:14px 0 42px rgba(0,0,0,.34)!important;
  }

  body:not(.viewer-page).app-current.shell-auto-hide .context-rail,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .context-rail{
    right:0!important;
    left:auto!important;
    width:min(80dvw,304px)!important;
    max-width:calc(100dvw - 48px)!important;
    padding:8px 7px max(10px,env(safe-area-inset-bottom))!important;
    gap:8px!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto minmax(0,1fr) auto!important;
    border-radius:18px 0 0 18px!important;
    transform:translate3d(calc(100% + 10px),0,0)!important;
    overflow:hidden!important;
  }

  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .context-rail{
    right:0!important;
    left:auto!important;
    width:min(74dvw,286px)!important;
    max-width:calc(100dvw - 54px)!important;
    padding:8px 7px max(10px,env(safe-area-inset-bottom))!important;
    gap:8px!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto minmax(0,1fr) auto!important;
    border-radius:18px 0 0 18px!important;
    transform:translate3d(calc(100% + 10px),0,0)!important;
    overflow:hidden!important;
  }

  body:not(.viewer-page).app-current.shell-auto-hide.right-dock-open .context-rail,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide.right-dock-open .context-rail,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.right-dock-open .context-rail{
    transform:translate3d(0,0,0)!important;
    box-shadow:-14px 0 42px rgba(0,0,0,.34)!important;
  }

  body:not(.viewer-page).app-current.shell-auto-hide #left-dock-handle,
  body:not(.viewer-page).app-current.shell-auto-hide #right-dock-handle,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide #left-dock-handle,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide #right-dock-handle,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed #left-dock-handle,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed #right-dock-handle{
    display:grid!important;
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
    position:fixed!important;
    top:auto!important;
    bottom:calc(14px + env(safe-area-inset-bottom))!important;
    width:46px!important;
    height:46px!important;
    min-width:46px!important;
    min-height:46px!important;
    padding:0!important;
    border:1px solid rgba(96,165,250,.42)!important;
    border-radius:15px!important;
    background:rgba(15,54,118,.94)!important;
    box-shadow:0 14px 30px rgba(0,0,0,.30)!important;
    transform:none!important;
    z-index:110!important;
    place-items:center!important;
    touch-action:manipulation!important;
    -webkit-tap-highlight-color:transparent!important;
  }

  body:not(.viewer-page).app-current.shell-auto-hide #left-dock-handle,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide #left-dock-handle,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed #left-dock-handle{
    left:10px!important;
    right:auto!important;
  }

  body:not(.viewer-page).app-current.shell-auto-hide #right-dock-handle,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide #right-dock-handle,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed #right-dock-handle{
    right:10px!important;
    left:auto!important;
  }

  body:not(.viewer-page).app-current.shell-auto-hide .dock-handle-label,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .dock-handle-label,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .dock-handle-label{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    overflow:hidden!important;
    clip:rect(0,0,0,0)!important;
    white-space:nowrap!important;
  }

  body:not(.viewer-page).app-current.shell-auto-hide .dock-handle-icon,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .dock-handle-icon,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .dock-handle-icon{
    display:grid!important;
    place-items:center!important;
    width:30px!important;
    height:30px!important;
    min-width:30px!important;
    min-height:30px!important;
    border-radius:10px!important;
    color:#f8fafc!important;
    background:rgba(255,255,255,.08)!important;
    opacity:1!important;
  }

  body:not(.viewer-page).app-current.shell-auto-hide .dock-handle-icon svg,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .dock-handle-icon svg,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .dock-handle-icon svg{
    display:block!important;
    width:19px!important;
    height:19px!important;
    stroke:currentColor!important;
    fill:none!important;
  }

  body:not(.viewer-page).app-current.left-dock-open #left-dock-handle,
  body:not(.viewer-page).app-current.right-dock-open #right-dock-handle{
    border-color:rgba(240,198,103,.65)!important;
    background:rgba(30,41,59,.96)!important;
  }

  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.left-dock-open .sidebar .brand-meta,
  body:not(.viewer-page).app-current.shell-auto-hide.left-dock-open .sidebar .brand-meta,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide.left-dock-open .sidebar .brand-meta{
    display:none!important;
  }

  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.left-dock-open .sidebar .nav a,
  body:not(.viewer-page).app-current.shell-auto-hide.left-dock-open .sidebar .nav a,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide.left-dock-open .sidebar .nav a,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.left-dock-open .sidebar-about-link a,
  body:not(.viewer-page).app-current.shell-auto-hide.left-dock-open .sidebar-about-link a,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide.left-dock-open .sidebar-about-link a{
    min-height:40px!important;
    padding:7px 9px!important;
    border-radius:12px!important;
    gap:8px!important;
  }

  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.left-dock-open .sidebar .nav-label,
  body:not(.viewer-page).app-current.shell-auto-hide.left-dock-open .sidebar .nav-label,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide.left-dock-open .sidebar .nav-label{
    display:inline!important;
    font-size:10px!important;
    line-height:1.05!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }

  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed #activity-feed,
  body:not(.viewer-page).app-current.shell-auto-hide #activity-feed,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide #activity-feed{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    padding:10px!important;
    display:grid!important;
    grid-template-rows:auto minmax(0,1fr)!important;
    gap:8px!important;
    overflow:hidden!important;
  }

  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed #activity-feed::before{
    content:none!important;
    display:none!important;
  }

  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .sidebar{
    width:86px!important;
    min-width:86px!important;
    max-width:86px!important;
    padding:9px 0!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.left-dock-open .sidebar{
    width:86px!important;
    min-width:86px!important;
    max-width:86px!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.left-dock-open .sidebar .brand,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .sidebar:hover .brand,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .sidebar:focus-within .brand{
    justify-content:center!important;
    padding:8px 0 10px!important;
    margin:0!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.left-dock-open .sidebar .brand-logo,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .sidebar:hover .brand-logo,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .sidebar:focus-within .brand-logo{
    width:48px!important;
    height:48px!important;
    min-width:48px!important;
    font-size:19px!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.left-dock-open .sidebar .nav,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .sidebar:hover .nav,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .sidebar:focus-within .nav{
    align-items:center!important;
    padding:4px 0!important;
    gap:7px!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.left-dock-open .sidebar .nav a,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .sidebar:hover .nav a,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .sidebar:focus-within .nav a,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.left-dock-open .sidebar-about-link a,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .sidebar:hover .sidebar-about-link a,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .sidebar:focus-within .sidebar-about-link a{
    width:54px!important;
    min-width:54px!important;
    max-width:54px!important;
    height:54px!important;
    min-height:54px!important;
    padding:0!important;
    justify-content:center!important;
    gap:0!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.left-dock-open .sidebar .nav-label,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .sidebar:hover .nav-label,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .sidebar:focus-within .nav-label,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.left-dock-open .sidebar-about-link span,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .sidebar:hover .sidebar-about-link span,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .sidebar:focus-within .sidebar-about-link span{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    overflow:hidden!important;
    clip:rect(0,0,0,0)!important;
    white-space:nowrap!important;
  }

  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .context-rail{
    width:96px!important;
    min-width:96px!important;
    max-width:96px!important;
    padding:9px 6px calc(64px + env(safe-area-inset-bottom))!important;
    gap:7px!important;
    grid-template-rows:auto minmax(0,1fr) auto!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.right-dock-open .context-rail{
    width:96px!important;
    min-width:96px!important;
    max-width:96px!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .context-rail .context-card:not(#activity-feed):not(.shell-mode-form-right),
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .context-rail .license-fixed-alert{
    display:none!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed #activity-feed{
    width:84px!important;
    min-width:84px!important;
    max-width:84px!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    align-self:start!important;
    padding:7px!important;
    display:flex!important;
    flex-direction:column!important;
    gap:7px!important;
    border-radius:16px!important;
    overflow:visible!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed #activity-feed .activity-feed-head{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:7px!important;
    min-width:0!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed #activity-feed .activity-feed-head>strong{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    overflow:hidden!important;
    clip:rect(0,0,0,0)!important;
    white-space:nowrap!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed #activity-feed .activity-feed-filters{
    width:100%!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    gap:7px!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed #activity-feed .activity-filter-button{
    width:58px!important;
    min-width:58px!important;
    max-width:58px!important;
    height:48px!important;
    min-height:48px!important;
    padding:0!important;
    justify-content:center!important;
    gap:0!important;
    border-radius:15px!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed #activity-feed .activity-filter-dot{
    width:13px!important;
    height:13px!important;
    margin:0!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed #activity-feed .activity-filter-text,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed #activity-feed-live,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed #activity-feed-history{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    overflow:hidden!important;
    clip:rect(0,0,0,0)!important;
    white-space:nowrap!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .shell-mode-form-right{
    align-self:end!important;
    justify-self:center!important;
    width:58px!important;
    min-width:58px!important;
    max-width:58px!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .shell-mode-form-right .shell-mode-toggle{
    width:58px!important;
    min-width:58px!important;
    max-width:58px!important;
    height:48px!important;
    min-height:48px!important;
    padding:0!important;
  }
}

/* 447A: compare viewer mobile controls keep visible labels and non-overlapping filmstrips. */
@media(max-width:760px){
  body.viewer-page.app-current .compare-head [data-mobile-tool]::before,
  body.viewer-page.app-current .compare-panel-actions [data-mobile-tool]::before,
  body.viewer-page.app-current .compare-bottom-tools [data-mobile-tool]::before{
    content:attr(data-mobile-tool)!important;
    display:grid!important;
    place-items:center!important;
    width:100%!important;
    height:100%!important;
    font-size:11px!important;
    font-weight:950!important;
    line-height:1!important;
    color:currentColor!important;
    text-transform:uppercase!important;
  }
  body.viewer-page.app-current .compare-head [data-mobile-tool="fit"]::before{content:"FIT"!important}
  body.viewer-page.app-current .compare-head [data-mobile-tool="reset"]::before{content:"RST"!important}
  body.viewer-page.app-current .compare-head [data-mobile-tool="invert"]::before{content:"INV"!important}
  body.viewer-page.app-current .compare-head [data-mobile-tool="sync"]::before{content:"SYN"!important}
  body.viewer-page.app-current .compare-head [data-mobile-tool="thumbs"]::before{content:"IMG"!important}
  body.viewer-page.app-current .compare-panel-actions [data-mobile-tool="prev"]::before{content:"<"!important}
  body.viewer-page.app-current .compare-panel-actions [data-mobile-tool="next"]::before{content:">"!important}
  body.viewer-page.app-current .compare-bottom-tools [data-mobile-tool="prev-both"]::before{content:"<< "!important}
  body.viewer-page.app-current .compare-bottom-tools [data-mobile-tool="next-both"]::before{content:">>"!important}
  body.viewer-page.app-current .compare-bottom-tools [data-mobile-tool="left"]::before{content:"ESQ"!important}
  body.viewer-page.app-current .compare-bottom-tools [data-mobile-tool="both"]::before{content:"2X"!important}
  body.viewer-page.app-current .compare-bottom-tools [data-mobile-tool="right"]::before{content:"DIR"!important}

  body.viewer-page.app-current .compare-head .viewer-mobile-tool-icon,
  body.viewer-page.app-current .compare-panel-actions .viewer-mobile-tool-icon,
  body.viewer-page.app-current .compare-bottom-tools .viewer-mobile-tool-icon{
    display:none!important;
  }

  body.viewer-page.app-current .compare-viewer{
    padding-top:44px!important;
    gap:6px!important;
  }
  body.viewer-page.app-current .compare-panel{
    height:calc((100dvh - 56px) / 2)!important;
    min-height:0!important;
    overflow:hidden!important;
  }
  body.viewer-page.app-current .compare-viewport{
    height:calc(100% - 34px)!important;
    min-height:0!important;
  }
  body.viewer-page.app-current .compare-viewport img{
    max-width:100%!important;
    max-height:100%!important;
    object-fit:contain!important;
  }

  body.viewer-page.app-current .compare-bottom-tools{
    position:fixed!important;
    left:50%!important;
    right:auto!important;
    bottom:calc(8px + env(safe-area-inset-bottom))!important;
    z-index:98!important;
    width:min(94dvw,430px)!important;
    max-width:calc(100dvw - 12px)!important;
    height:42px!important;
    min-height:42px!important;
    transform:translateX(-50%)!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!important;
    padding:5px!important;
    border-radius:14px!important;
    border:1px solid rgba(148,163,184,.34)!important;
    background:rgba(7,16,31,.96)!important;
    box-shadow:0 -12px 34px rgba(0,0,0,.44)!important;
    overflow:hidden!important;
  }
  body.viewer-page.app-current .compare-bottom-tools .viewer-tool-group{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:4px!important;
    min-width:0!important;
  }
  body.viewer-page.app-current .compare-bottom-tools button,
  body.viewer-page.app-current .compare-head button,
  body.viewer-page.app-current .compare-panel-actions button{
    width:34px!important;
    min-width:34px!important;
    max-width:34px!important;
    height:32px!important;
    min-height:32px!important;
    padding:0!important;
    overflow:hidden!important;
    white-space:nowrap!important;
  }
  body.viewer-page.app-current .compare-bottom-tools .viewer-tool-sliders{
    display:none!important;
  }

  body.viewer-page.app-current .compare-filmstrip{
    display:none!important;
    position:fixed!important;
    bottom:0!important;
    z-index:96!important;
    width:50dvw!important;
    max-width:50dvw!important;
    height:34dvh!important;
    max-height:34dvh!important;
    overflow:auto!important;
    padding:28px 7px calc(10px + env(safe-area-inset-bottom))!important;
    border-radius:16px 16px 0 0!important;
    border:1px solid rgba(148,163,184,.32)!important;
    border-bottom:0!important;
    background:#07101f!important;
    box-shadow:0 -18px 46px rgba(0,0,0,.62)!important;
    gap:6px!important;
  }
  body.viewer-page.app-current.viewer-thumbs-open #compare-filmstrip-left{
    display:flex!important;
    left:0!important;
    right:auto!important;
  }
  body.viewer-page.app-current.viewer-thumbs-open #compare-filmstrip-right{
    display:flex!important;
    right:0!important;
    left:auto!important;
  }
  body.viewer-page.app-current #compare-filmstrip-left::before,
  body.viewer-page.app-current #compare-filmstrip-right::before{
    position:absolute!important;
    left:8px!important;
    top:7px!important;
    color:#e5e7eb!important;
    font-size:10px!important;
    font-weight:950!important;
    letter-spacing:0!important;
  }
  body.viewer-page.app-current #compare-filmstrip-left::before{content:"ESQ."!important}
  body.viewer-page.app-current #compare-filmstrip-right::before{content:"DIR."!important}
  body.viewer-page.app-current .compare-thumb{
    min-width:48px!important;
    width:48px!important;
    padding:4px!important;
  }
  body.viewer-page.app-current .compare-thumb img{
    width:44px!important;
    height:36px!important;
  }

  body.viewer-page.app-current .compare-study-tray{
    position:fixed!important;
    right:0!important;
    top:104px!important;
    z-index:97!important;
    width:44px!important;
    max-width:44px!important;
    overflow:visible!important;
  }
  body.viewer-page.app-current .compare-study-tray:focus-within,
  body.viewer-page.app-current .compare-study-tray:hover{
    width:min(86dvw,320px)!important;
    max-width:min(86dvw,320px)!important;
  }
}

/* 447B: diagnostic viewer smart dock and contextual panels. */
body.viewer-page.app-current .dicom-viewport-shell,
body.viewer-page.app-current .compare-viewer{
  position:relative!important;
}
body.viewer-page.app-current .dicom-toolbar-pro,
body.viewer-page.app-current .compare-bottom-tools{
  position:absolute!important;
  left:50%!important;
  right:auto!important;
  bottom:10px!important;
  top:auto!important;
  z-index:96!important;
  width:auto!important;
  max-width:min(94vw,980px)!important;
  transform:translateX(-50%)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  padding:7px!important;
  border:1px solid rgba(148,163,184,.30)!important;
  border-radius:18px!important;
  background:rgba(8,13,23,.82)!important;
  box-shadow:0 18px 46px rgba(0,0,0,.38)!important;
  backdrop-filter:blur(16px)!important;
  transition:opacity .16s ease,transform .16s ease,background .16s ease!important;
}
body.viewer-page.app-current .dicom-toolbar-pro:not(:hover):not(:focus-within),
body.viewer-page.app-current .compare-bottom-tools:not(:hover):not(:focus-within){
  opacity:.86!important;
}
body.viewer-page.app-current .dicom-toolbar-pro:hover,
body.viewer-page.app-current .dicom-toolbar-pro:focus-within,
body.viewer-page.app-current .compare-bottom-tools:hover,
body.viewer-page.app-current .compare-bottom-tools:focus-within{
  opacity:1!important;
  background:rgba(8,13,23,.94)!important;
}
body.viewer-page.app-current .dicom-toolbar-pro .viewer-tool-sliders,
body.viewer-page.app-current .compare-bottom-tools .viewer-tool-sliders{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
}
body.viewer-page.app-current .viewer-smart-dock{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  min-width:0!important;
}
body.viewer-page.app-current .viewer-dock-tool{
  position:relative!important;
  width:48px!important;
  min-width:48px!important;
  height:44px!important;
  min-height:44px!important;
  padding:0!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid rgba(148,163,184,.24)!important;
  border-radius:14px!important;
  color:#e5edf7!important;
  background:rgba(30,41,59,.78)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08)!important;
  cursor:pointer!important;
  transition:transform .12s ease,border-color .12s ease,background .12s ease,color .12s ease!important;
}
body.viewer-page.app-current .viewer-dock-tool svg{
  width:20px!important;
  height:20px!important;
  stroke:currentColor!important;
  fill:none!important;
  stroke-width:2!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
body.viewer-page.app-current .viewer-dock-tool span{
  position:absolute!important;
  left:50%!important;
  bottom:calc(100% + 8px)!important;
  transform:translateX(-50%) translateY(3px)!important;
  min-width:max-content!important;
  max-width:148px!important;
  padding:5px 8px!important;
  border-radius:9px!important;
  border:1px solid rgba(148,163,184,.25)!important;
  background:rgba(8,13,23,.96)!important;
  color:#f8fafc!important;
  font-size:10px!important;
  font-weight:900!important;
  line-height:1!important;
  opacity:0!important;
  pointer-events:none!important;
  transition:opacity .12s ease,transform .12s ease!important;
  white-space:nowrap!important;
}
body.viewer-page.app-current .viewer-dock-tool:hover,
body.viewer-page.app-current .viewer-dock-tool:focus-visible,
body.viewer-page.app-current .viewer-dock-tool.active,
body.viewer-page.app-current .viewer-dock-tool.is-active-feedback{
  color:#fff!important;
  border-color:rgba(96,165,250,.70)!important;
  background:linear-gradient(135deg,rgba(37,99,235,.92),rgba(29,78,216,.84))!important;
  transform:translateY(-1px)!important;
}
body.viewer-page.app-current .viewer-dock-tool:hover span,
body.viewer-page.app-current .viewer-dock-tool:focus-visible span,
body.viewer-page.app-current .viewer-dock-tool.active span{
  opacity:1!important;
  transform:translateX(-50%) translateY(0)!important;
}
body.viewer-page.app-current .viewer-stack-controls{
  display:flex!important;
  gap:5px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}
body.viewer-page.app-current .viewer-stack-controls button,
body.viewer-page.app-current .compare-target-tools button{
  height:36px!important;
  min-height:36px!important;
  padding:0 10px!important;
  border-radius:12px!important;
  font-size:10px!important;
  font-weight:950!important;
}
body.viewer-page.app-current .viewer-context-panel{
  position:absolute!important;
  right:14px!important;
  top:14px!important;
  z-index:97!important;
  width:min(360px,calc(100vw - 28px))!important;
  max-height:calc(100% - 92px)!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr)!important;
  gap:10px!important;
  padding:12px!important;
  border:1px solid rgba(148,163,184,.30)!important;
  border-radius:18px!important;
  background:rgba(8,13,23,.94)!important;
  color:#e5edf7!important;
  box-shadow:0 24px 70px rgba(0,0,0,.52)!important;
  backdrop-filter:blur(18px)!important;
  overflow:hidden!important;
}
body.viewer-page.app-current .viewer-context-panel[hidden],
body.viewer-page.app-current .viewer-panel-section[hidden]{
  display:none!important;
}
body.viewer-page.app-current .viewer-panel-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  padding-bottom:8px!important;
  border-bottom:1px solid rgba(148,163,184,.22)!important;
}
body.viewer-page.app-current .viewer-panel-head strong{
  font-size:13px!important;
  font-weight:950!important;
}
body.viewer-page.app-current .viewer-panel-section{
  min-height:0!important;
  overflow:auto!important;
  display:grid!important;
  gap:10px!important;
  padding-right:2px!important;
}
body.viewer-page.app-current .viewer-panel-section label{
  display:grid!important;
  gap:5px!important;
  font-size:11px!important;
  font-weight:900!important;
  color:#cbd5e1!important;
}
body.viewer-page.app-current .viewer-panel-section input[type=range]{
  width:100%!important;
  padding:0!important;
}
body.viewer-page.app-current .viewer-panel-actions,
body.viewer-page.app-current .viewer-layout-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important;
}
body.viewer-page.app-current .viewer-layout-grid button,
body.viewer-page.app-current .viewer-panel-actions button,
body.viewer-page.app-current .viewer-panel-actions a{
  min-width:0!important;
  height:36px!important;
  border-radius:11px!important;
  font-size:10px!important;
  font-weight:950!important;
}
body.viewer-page.app-current .viewer-layout-grid button.active,
body.viewer-page.app-current .viewer-panel-actions button.active{
  color:#fff!important;
  border-color:rgba(250,204,21,.65)!important;
  background:rgba(37,99,235,.72)!important;
}
body.viewer-page.app-current .viewer-panel-row{
  display:grid!important;
  gap:3px!important;
  width:100%!important;
  padding:9px!important;
  text-align:left!important;
  border:1px solid rgba(148,163,184,.22)!important;
  border-radius:12px!important;
  color:#e5edf7!important;
  background:rgba(15,23,42,.72)!important;
  text-decoration:none!important;
}
body.viewer-page.app-current .viewer-panel-row:hover,
body.viewer-page.app-current .viewer-panel-row:focus-visible{
  border-color:rgba(96,165,250,.62)!important;
  background:rgba(30,41,59,.92)!important;
}
body.viewer-page.app-current .viewer-panel-row strong{
  font-size:11px!important;
  font-weight:950!important;
}
body.viewer-page.app-current .viewer-panel-row span{
  color:#aebbd0!important;
  font-size:10px!important;
  line-height:1.25!important;
}
body.viewer-page.app-current .viewer-panel-columns{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
}
body.viewer-page.app-current .viewer-tool-toast{
  position:fixed!important;
  left:50%!important;
  bottom:86px!important;
  z-index:130!important;
  transform:translateX(-50%)!important;
  padding:8px 12px!important;
  border:1px solid rgba(96,165,250,.42)!important;
  border-radius:999px!important;
  background:rgba(8,13,23,.94)!important;
  color:#f8fafc!important;
  font-size:12px!important;
  font-weight:900!important;
  box-shadow:0 16px 42px rgba(0,0,0,.42)!important;
}
body.viewer-page.app-current .viewer-tool-toast[hidden]{
  display:none!important;
}
body.viewer-page.app-current[data-viewer-tool] .dicom-viewport,
body.viewer-page.app-current[data-viewer-tool] .compare-viewport{
  cursor:crosshair!important;
}
body.viewer-page.app-current.viewer-compare-reading-mode .content{
  padding:6px!important;
}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-head{
  position:fixed!important;
  left:8px!important;
  right:8px!important;
  top:6px!important;
  z-index:92!important;
  min-height:36px!important;
  margin:0!important;
  padding:4px 8px!important;
  opacity:.92!important;
  background:rgba(8,13,23,.68)!important;
  border-radius:12px!important;
  backdrop-filter:blur(14px)!important;
}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-head h1{
  font-size:14px!important;
}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-head p{
  font-size:10px!important;
}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewer{
  height:100vh!important;
  min-height:0!important;
  padding:48px 6px 70px!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important;
}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel{
  height:100%!important;
  min-height:0!important;
}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-head{
  min-height:34px!important;
  padding:5px 7px!important;
}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewport{
  height:calc(100% - 64px)!important;
}
@media(min-width:1900px){
  body.viewer-page.app-current .viewer-context-panel{width:390px!important}
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewer{gap:10px!important}
}
@media(max-width:760px){
  body.viewer-page.app-current .dicom-toolbar-pro,
  body.viewer-page.app-current .compare-bottom-tools{
    bottom:calc(7px + env(safe-area-inset-bottom))!important;
    max-width:calc(100vw - 12px)!important;
    gap:5px!important;
    padding:5px!important;
    border-radius:16px!important;
  }
  body.viewer-page.app-current .viewer-dock-tool{
    width:40px!important;
    min-width:40px!important;
    height:38px!important;
    min-height:38px!important;
    border-radius:12px!important;
  }
  body.viewer-page.app-current .viewer-dock-tool svg{
    width:18px!important;
    height:18px!important;
  }
  body.viewer-page.app-current .viewer-stack-controls button,
  body.viewer-page.app-current .compare-target-tools button{
    width:34px!important;
    min-width:34px!important;
    padding:0!important;
    font-size:9px!important;
  }
  body.viewer-page.app-current .viewer-context-panel{
    left:8px!important;
    right:8px!important;
    top:52px!important;
    width:auto!important;
    max-height:calc(100dvh - 124px)!important;
    border-radius:16px!important;
  }
  body.viewer-page.app-current .viewer-panel-columns{
    grid-template-columns:1fr!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewer{
    height:100dvh!important;
    grid-template-columns:1fr!important;
    grid-template-rows:repeat(2,minmax(0,1fr))!important;
    padding:42px 4px 58px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel{
    height:auto!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewport{
    height:calc(100% - 32px)!important;
  }
}

@media (max-width:720px){
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed{
    --left-rail:0px!important;
    --right-rail:0px!important;
    --shell-gap:0px!important;
    --shell-pad:0px!important;
    height:auto!important;
    min-height:100dvh!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
  }

  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .app-shell{
    display:block!important;
    width:100dvw!important;
    max-width:100dvw!important;
    height:auto!important;
    min-height:100dvh!important;
    overflow:visible!important;
    padding:0!important;
    margin:0!important;
  }

  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .content{
    width:100dvw!important;
    max-width:100dvw!important;
    height:auto!important;
    min-height:100dvh!important;
    overflow:visible!important;
    padding:6px 8px calc(78px + env(safe-area-inset-bottom))!important;
    margin:0!important;
  }

  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .content-layout,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .content-body{
    width:100%!important;
    max-width:100%!important;
    overflow:visible!important;
  }

  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .sidebar,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .context-rail{
    position:fixed!important;
    top:0!important;
    height:100dvh!important;
    max-height:100dvh!important;
    min-width:0!important;
    opacity:1!important;
    z-index:70!important;
    contain:layout paint!important;
  }

  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .sidebar{
    left:0!important;
    right:auto!important;
    width:min(72dvw,260px)!important;
    max-width:min(72dvw,260px)!important;
    transform:translate3d(calc(-100% - 18px),0,0)!important;
  }

  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .context-rail{
    right:0!important;
    left:auto!important;
    width:min(72dvw,268px)!important;
    max-width:min(72dvw,268px)!important;
    transform:translate3d(calc(100% + 18px),0,0)!important;
  }

  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.left-dock-open .sidebar,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.right-dock-open .context-rail{
    transform:translate3d(0,0,0)!important;
  }

  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed #left-dock-handle,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed #right-dock-handle,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .dock-handle{
    display:inline-grid!important;
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
    position:fixed!important;
    top:auto!important;
    bottom:calc(14px + env(safe-area-inset-bottom))!important;
    width:52px!important;
    height:52px!important;
    min-width:52px!important;
    min-height:52px!important;
    padding:0!important;
    place-items:center!important;
    border-radius:16px!important;
    transform:none!important;
    touch-action:manipulation!important;
    -webkit-tap-highlight-color:transparent!important;
    z-index:95!important;
  }

  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed #left-dock-handle{left:8px!important;right:auto!important}
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed #right-dock-handle{right:8px!important;left:auto!important}

  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .dock-handle-label{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    overflow:hidden!important;
    clip:rect(0,0,0,0)!important;
    white-space:nowrap!important;
  }

  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .mobile-menu-button,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .mobile-backdrop{
    display:none!important;
    pointer-events:none!important;
  }
}

@media (max-width:760px){
  body.viewer-page.app-current .content,
  body.viewer-page.app-current .app-shell{
    height:100dvh!important;
    min-height:100dvh!important;
    overflow:hidden!important;
    padding:4px!important;
  }
  body.viewer-page.app-current .dicom-viewer-side{
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
  }
  body.viewer-page.app-current.viewer-thumbs-open .dicom-viewer-side{
    position:fixed!important;
    left:0!important;
    right:0!important;
    bottom:0!important;
    top:auto!important;
    z-index:70!important;
    display:grid!important;
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
    max-height:34dvh!important;
    height:auto!important;
    overflow:auto!important;
    padding:10px 10px calc(12px + env(safe-area-inset-bottom))!important;
    border-radius:16px 16px 0 0!important;
    border:1px solid rgba(148,163,184,.34)!important;
    border-bottom:0!important;
    background:#07101f!important;
    box-shadow:0 -18px 46px rgba(0,0,0,.68)!important;
    backdrop-filter:none!important;
  }
  body.viewer-page.app-current .dicom-viewer,
  body.viewer-page.app-current .dicom-viewer-pro{
    height:100dvh!important;
    min-height:100dvh!important;
    padding-top:50px!important;
    grid-template-columns:1fr!important;
  }
  body.viewer-page.app-current .dicom-viewport-wrap,
  body.viewer-page.app-current .dicom-viewport-shell{
    height:calc(100dvh - 58px)!important;
    min-height:0!important;
    grid-template-rows:minmax(0,1fr)!important;
  }
  body.viewer-page.app-current .dicom-viewport{
    height:100%!important;
    min-height:0!important;
    padding:4px 6px 6px!important;
    display:grid!important;
    place-items:center!important;
    overflow:hidden!important;
  }
  body.viewer-page.app-current .dicom-viewport img,
  body.viewer-page.app-current .dicom-viewport-pro img{
    max-width:calc(100dvw - 18px)!important;
    max-height:calc(100dvh - 92px)!important;
    object-fit:contain!important;
  }
  body.viewer-page.app-current .dicom-toolbar,
  body.viewer-page.app-current .dicom-toolbar-pro{
    position:fixed!important;
    left:8px!important;
    right:auto!important;
    top:112px!important;
    z-index:62!important;
    display:grid!important;
    grid-template-columns:44px!important;
    grid-auto-rows:44px!important;
    gap:7px!important;
    width:58px!important;
    max-height:calc(100dvh - 126px)!important;
    overflow:auto!important;
    padding:7px!important;
    border:1px solid rgba(148,163,184,.26)!important;
    border-radius:16px!important;
    background:#060a12!important;
    box-shadow:0 18px 42px rgba(0,0,0,.42)!important;
    backdrop-filter:none!important;
  }
  body.viewer-page.app-current .viewer-head .actions,
  body.viewer-page.app-current .compare-head .actions{
    position:fixed!important;
    right:8px!important;
    top:62px!important;
    z-index:63!important;
    display:grid!important;
    grid-template-columns:44px!important;
    grid-auto-rows:44px!important;
    gap:7px!important;
    width:58px!important;
    max-height:calc(100dvh - 76px)!important;
    overflow:auto!important;
    padding:7px!important;
    border:1px solid rgba(148,163,184,.26)!important;
    border-radius:16px!important;
    background:#060a12!important;
    box-shadow:0 18px 42px rgba(0,0,0,.42)!important;
    backdrop-filter:none!important;
  }
  body.viewer-page.app-current .dicom-toolbar-pro .viewer-tool-sliders,
  body.viewer-page.app-current .dicom-toolbar .viewer-tool-sliders,
  body.viewer-page.app-current .viewer-session-links,
  body.viewer-page.app-current .viewer-head .pdf-menu,
  body.viewer-page.app-current .viewer-head .pdf-menu-panel{
    display:none!important;
  }
  body.viewer-page.app-current.viewer-thumbs-open .viewer-mobile-thumbs-toggle{
    border-color:rgba(240,198,103,.8)!important;
    background:#f0c667!important;
    color:#111827!important;
  }
}

body:not(.viewer-page).app-current .activity-filter-dot.now{background:#22c55e!important}
body:not(.viewer-page).app-current .activity-filter-dot.five{background:#f0c667!important}
body:not(.viewer-page).app-current .activity-filter-dot.eight{background:#60a5fa!important}
body:not(.viewer-page).app-current .context-rail .activity-feed-head{
  grid-template-columns:1fr!important;
  grid-template-areas:"title" "filters"!important;
}
body:not(.viewer-page).app-current .context-rail .activity-feed-filters{
  width:100%!important;
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:5px!important;
}
body:not(.viewer-page).app-current .context-rail .activity-filter-button{
  width:100%!important;
  min-width:0!important;
  height:28px!important;
  padding:0 5px!important;
  gap:4px!important;
}
body:not(.viewer-page).app-current .context-rail .activity-filter-text{
  position:static!important;
  width:auto!important;
  height:auto!important;
  overflow:visible!important;
  clip:auto!important;
  white-space:nowrap!important;
  font-size:8px!important;
  line-height:1!important;
}
body:not(.viewer-page).app-current .context-rail .activity-feed-toggle{
  display:none!important;
}

@media (min-width:861px){
  body.viewer-page.app-current .dicom-viewer.dicom-viewer-pro,
  body.viewer-page.app-current .dicom-viewer{
    grid-template-columns:minmax(220px,252px) minmax(0,1fr)!important;
  }
  body.viewer-page.app-current .viewer-series-card,
  body.viewer-page.app-current .viewer-stack-item,
  body.viewer-page.app-current .viewer-stack-thumb{
    grid-template-columns:46px minmax(0,1fr)!important;
  }
  body.viewer-page.app-current .viewer-series-card img,
  body.viewer-page.app-current .viewer-stack-item img,
  body.viewer-page.app-current .viewer-stack-thumb img{
    width:46px!important;
    height:38px!important;
    border-radius:7px!important;
  }
  body.viewer-page.app-current .viewer-head .action-btn,
  body.viewer-page.app-current .viewer-head .secondary,
  body.viewer-page.app-current .viewer-head .primary,
  body.viewer-page.app-current .dicom-toolbar button{
    height:28px!important;
    min-height:28px!important;
    padding:5px 8px!important;
    font-size:9px!important;
  }
}

@media (max-width:760px){
  body.viewer-page.app-current{
    background:#020617!important;
    overflow:hidden!important;
  }

  body.viewer-page.app-current .app-shell,
  body.viewer-page.app-current .content{
    width:100dvw!important;
    height:100dvh!important;
    min-height:100dvh!important;
    max-width:none!important;
    padding:0!important;
    margin:0!important;
    overflow:hidden!important;
    background:#020617!important;
  }

  body.viewer-page.app-current .viewer-head{
    position:fixed!important;
    left:0!important;
    right:0!important;
    top:0!important;
    z-index:90!important;
    height:44px!important;
    min-height:44px!important;
    margin:0!important;
    padding:6px 64px 6px 10px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:8px!important;
    background:rgba(2,6,23,.96)!important;
    border-bottom:1px solid rgba(148,163,184,.18)!important;
    box-shadow:0 10px 28px rgba(0,0,0,.32)!important;
  }

  body.viewer-page.app-current .viewer-head > div:first-child{
    min-width:0!important;
    display:block!important;
  }

  body.viewer-page.app-current .viewer-head h1{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    overflow:hidden!important;
    clip:rect(0,0,0,0)!important;
  }

  body.viewer-page.app-current .viewer-head p{
    margin:0!important;
    color:#dbeafe!important;
    font-size:11px!important;
    line-height:1.15!important;
    font-weight:800!important;
    max-width:calc(100dvw - 86px)!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  body.viewer-page.app-current .dicom-viewer,
  body.viewer-page.app-current .dicom-viewer-pro{
    display:block!important;
    width:100dvw!important;
    height:100dvh!important;
    min-height:100dvh!important;
    padding:44px 0 0!important;
    margin:0!important;
    overflow:hidden!important;
    background:#020617!important;
  }

  body.viewer-page.app-current .dicom-viewport-wrap,
  body.viewer-page.app-current .dicom-viewport-shell{
    width:100dvw!important;
    height:calc(100dvh - 44px)!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    background:#020617!important;
    display:block!important;
    overflow:hidden!important;
  }

  body.viewer-page.app-current .dicom-viewport,
  body.viewer-page.app-current .dicom-viewport-pro{
    position:relative!important;
    width:100dvw!important;
    height:calc(100dvh - 44px)!important;
    min-height:0!important;
    padding:0!important;
    margin:0!important;
    display:grid!important;
    place-items:center!important;
    overflow:hidden!important;
    background:radial-gradient(circle at 50% 44%,#101827 0,#050816 58%,#020617 100%)!important;
    touch-action:none!important;
  }

  body.viewer-page.app-current .dicom-viewport img,
  body.viewer-page.app-current .dicom-viewport-pro img{
    max-width:100dvw!important;
    max-height:calc(100dvh - 74px)!important;
    object-fit:contain!important;
    transform-origin:center center!important;
    box-shadow:none!important;
  }

  body.viewer-page.app-current .dicom-info{
    position:fixed!important;
    left:50%!important;
    bottom:calc(70px + env(safe-area-inset-bottom))!important;
    transform:translateX(-50%)!important;
    z-index:82!important;
    width:auto!important;
    max-width:calc(100dvw - 112px)!important;
    min-height:0!important;
    padding:5px 9px!important;
    border:1px solid rgba(148,163,184,.16)!important;
    border-radius:999px!important;
    background:rgba(2,6,23,.72)!important;
    color:#cbd5e1!important;
    font-size:10px!important;
    line-height:1.2!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    pointer-events:none!important;
  }

  body.viewer-page.app-current .dicom-overlay{
    pointer-events:none!important;
  }

  body.viewer-page.app-current .dicom-overlay .overlay-corner{
    display:none!important;
  }

  body.viewer-page.app-current .dicom-overlay .overlay-corner.right{
    display:grid!important;
    position:fixed!important;
    right:10px!important;
    top:9px!important;
    z-index:93!important;
    gap:0!important;
    padding:0!important;
    background:transparent!important;
    color:#e5e7eb!important;
    text-align:right!important;
  }

  body.viewer-page.app-current .dicom-overlay .overlay-corner.right strong{
    display:none!important;
  }

  body.viewer-page.app-current .dicom-overlay .overlay-corner.right span{
    font-size:11px!important;
    font-weight:900!important;
    color:#e5e7eb!important;
  }

  body.viewer-page.app-current .viewer-head .actions{
    position:fixed!important;
    right:8px!important;
    bottom:calc(12px + env(safe-area-inset-bottom))!important;
    top:auto!important;
    z-index:92!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    gap:8px!important;
    width:auto!important;
    max-width:calc(100dvw - 16px)!important;
    max-height:none!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    overflow:visible!important;
  }

  body.viewer-page.app-current .viewer-head .actions > *:not([data-mobile-tool]){
    display:none!important;
  }

  body.viewer-page.app-current .viewer-head .action-btn,
  body.viewer-page.app-current .viewer-head .secondary,
  body.viewer-page.app-current .viewer-head .primary,
  body.viewer-page.app-current .viewer-head .secondary.link,
  body.viewer-page.app-current .viewer-head .primary.link,
  body.viewer-page.app-current .dicom-toolbar button,
  body.viewer-page.app-current .dicom-toolbar-pro button,
  body.viewer-page.app-current .viewer-mobile-nav-button{
    width:46px!important;
    height:46px!important;
    min-width:46px!important;
    min-height:46px!important;
    padding:0!important;
    border-radius:15px!important;
    border:1px solid rgba(148,163,184,.24)!important;
    background:rgba(15,23,42,.92)!important;
    color:#f8fafc!important;
    box-shadow:0 14px 32px rgba(0,0,0,.34)!important;
    font-size:0!important;
    line-height:1!important;
    display:grid!important;
    place-items:center!important;
    touch-action:manipulation!important;
    -webkit-tap-highlight-color:transparent!important;
  }

  body.viewer-page.app-current [data-mobile-tool]::before,
  body.viewer-page.app-current .dicom-toolbar button::before,
  body.viewer-page.app-current .dicom-toolbar-pro button::before{
    font-size:13px!important;
    font-weight:950!important;
    line-height:1!important;
    color:currentColor!important;
  }

  body.viewer-page.app-current [data-mobile-tool="fit"]::before{content:"FIT"}
  body.viewer-page.app-current [data-mobile-tool="reset"]::before{content:"RST"}
  body.viewer-page.app-current [data-mobile-tool="invert"]::before{content:"INV"}
  body.viewer-page.app-current [data-mobile-tool="thumbs"]::before{content:"IMG"}
  body.viewer-page.app-current [data-mobile-tool="hud"]::before{content:"HUD"}
  body.viewer-page.app-current [data-mobile-tool="one"]::before{content:"1:1"}
  body.viewer-page.app-current [data-mobile-tool="prev"]::before{content:"PREV"}
  body.viewer-page.app-current [data-mobile-tool="next"]::before{content:"NEXT"}

  body.viewer-page.app-current .viewer-mobile-thumbs-toggle{
    position:fixed!important;
    left:50%!important;
    bottom:calc(12px + env(safe-area-inset-bottom))!important;
    transform:translateX(-50%)!important;
    z-index:94!important;
    background:#f0c667!important;
    color:#111827!important;
    border-color:rgba(240,198,103,.88)!important;
  }

  body.viewer-page.app-current .dicom-toolbar,
  body.viewer-page.app-current .dicom-toolbar-pro{
    position:fixed!important;
    left:8px!important;
    bottom:calc(12px + env(safe-area-inset-bottom))!important;
    top:auto!important;
    right:auto!important;
    z-index:92!important;
    display:flex!important;
    flex-direction:row!important;
    width:auto!important;
    max-width:calc(50dvw - 16px)!important;
    max-height:none!important;
    gap:8px!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    overflow:visible!important;
  }

  body.viewer-page.app-current .dicom-toolbar .viewer-tool-group,
  body.viewer-page.app-current .dicom-toolbar-pro .viewer-tool-group{
    display:flex!important;
    gap:8px!important;
  }

  body.viewer-page.app-current .dicom-toolbar .viewer-tool-group:first-child{
    display:none!important;
  }

  body.viewer-page.app-current .dicom-toolbar-pro .viewer-tool-sliders,
  body.viewer-page.app-current .dicom-toolbar .viewer-tool-sliders,
  body.viewer-page.app-current .viewer-session-links,
  body.viewer-page.app-current .viewer-head .pdf-menu,
  body.viewer-page.app-current .viewer-head .pdf-menu-panel{
    display:none!important;
  }

  body.viewer-page.app-current .viewer-mobile-stack-nav{
    position:absolute!important;
    inset:0!important;
    z-index:86!important;
    pointer-events:none!important;
  }

  body.viewer-page.app-current .viewer-mobile-nav-button{
    position:absolute!important;
    top:50%!important;
    transform:translateY(-50%)!important;
    pointer-events:auto!important;
    background:rgba(2,6,23,.68)!important;
    border-color:rgba(226,232,240,.22)!important;
  }

  body.viewer-page.app-current .viewer-mobile-nav-button svg{
    width:27px!important;
    height:27px!important;
    stroke:currentColor!important;
    stroke-width:2.5!important;
    fill:none!important;
    stroke-linecap:round!important;
    stroke-linejoin:round!important;
  }

  body.viewer-page.app-current .viewer-mobile-prev{left:8px!important}
  body.viewer-page.app-current .viewer-mobile-next{right:8px!important}

  body.viewer-page.app-current .dicom-viewer-side{
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
  }

  body.viewer-page.app-current.viewer-thumbs-open .dicom-viewer-side{
    position:fixed!important;
    left:0!important;
    right:0!important;
    top:auto!important;
    bottom:0!important;
    z-index:96!important;
    display:grid!important;
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
    max-height:42dvh!important;
    height:42dvh!important;
    overflow:auto!important;
    padding:12px 10px calc(12px + env(safe-area-inset-bottom))!important;
    border-radius:18px 18px 0 0!important;
    border:1px solid rgba(148,163,184,.32)!important;
    border-bottom:0!important;
    background:#07101f!important;
    box-shadow:0 -24px 58px rgba(0,0,0,.72)!important;
  }

  body.viewer-page.app-current.viewer-thumbs-open .dicom-viewer-side::before{
    content:"MINIATURAS - toque em uma imagem para abrir"!important;
    display:block!important;
    color:#e5e7eb!important;
    font-size:11px!important;
    font-weight:950!important;
    letter-spacing:0!important;
    padding:0 2px 8px!important;
  }

  body.viewer-page.app-current .viewer-patient,
  body.viewer-page.app-current .viewer-patient-pro{
    display:none!important;
  }

  body.viewer-page.app-current .viewer-side-head{
    min-height:32px!important;
    margin:0!important;
  }

  body.viewer-page.app-current .viewer-side-head h2{
    font-size:12px!important;
    margin:0!important;
  }

  body.viewer-page.app-current .viewer-series-grid,
  body.viewer-page.app-current .viewer-stack{
    display:grid!important;
    gap:8px!important;
  }

  body.viewer-page.app-current .viewer-series-card,
  body.viewer-page.app-current .viewer-stack-item,
  body.viewer-page.app-current .viewer-stack-thumb{
    min-height:54px!important;
    grid-template-columns:52px minmax(0,1fr)!important;
    padding:7px!important;
    border-radius:12px!important;
  }

  body.viewer-page.app-current .viewer-series-card img,
  body.viewer-page.app-current .viewer-stack-item img,
  body.viewer-page.app-current .viewer-stack-thumb img{
    width:52px!important;
    height:42px!important;
    object-fit:cover!important;
    border-radius:8px!important;
  }
}

/* Mobile shell hardening: prevent first-paint rail flash and keep compact mode as buttons only. */
@media (max-width:720px){
  html.shell-mobile-initial body:not(.viewer-page).app-current,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide,
  body:not(.viewer-page).app-current.shell-auto-hide{
    --left-rail:0px!important;
    --right-rail:0px!important;
    --shell-gap:0px!important;
    --shell-pad:0px!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    height:auto!important;
    min-height:100dvh!important;
  }

  html.shell-mobile-initial,
  html.shell-mobile-initial body:not(.viewer-page).app-current{
    overflow-y:auto!important;
  }

  html.shell-mobile-initial body:not(.viewer-page).app-current:not(.shell-ready) .sidebar,
  html.shell-mobile-initial body:not(.viewer-page).app-current:not(.shell-ready) .context-rail,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .sidebar,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .context-rail,
  body:not(.viewer-page).app-current.shell-auto-hide .sidebar,
  body:not(.viewer-page).app-current.shell-auto-hide .context-rail{
    position:fixed!important;
    top:0!important;
    height:100dvh!important;
    max-height:100dvh!important;
    min-width:0!important;
    opacity:1!important;
    will-change:transform!important;
    contain:layout paint!important;
    z-index:70!important;
  }

  html.shell-mobile-initial body:not(.viewer-page).app-current:not(.shell-ready) .sidebar,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .sidebar,
  body:not(.viewer-page).app-current.shell-auto-hide .sidebar{
    left:0!important;
    right:auto!important;
    width:min(72dvw,260px)!important;
    max-width:min(72dvw,260px)!important;
    transform:translate3d(calc(-100% - 18px),0,0)!important;
  }

  html.shell-mobile-initial body:not(.viewer-page).app-current:not(.shell-ready) .context-rail,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .context-rail,
  body:not(.viewer-page).app-current.shell-auto-hide .context-rail{
    right:0!important;
    left:auto!important;
    width:min(72dvw,268px)!important;
    max-width:min(72dvw,268px)!important;
    transform:translate3d(calc(100% + 18px),0,0)!important;
  }

  body:not(.viewer-page).app-current.shell-mobile-auto-hide.left-dock-open .sidebar,
  body:not(.viewer-page).app-current.shell-auto-hide.left-dock-open .sidebar{
    transform:translate3d(0,0,0)!important;
  }

  body:not(.viewer-page).app-current.shell-mobile-auto-hide.right-dock-open .context-rail,
  body:not(.viewer-page).app-current.shell-auto-hide.right-dock-open .context-rail{
    transform:translate3d(0,0,0)!important;
  }

  html.shell-mobile-initial body:not(.viewer-page).app-current:not(.shell-ready) .sidebar,
  html.shell-mobile-initial body:not(.viewer-page).app-current:not(.shell-ready) .context-rail,
  body:not(.viewer-page).app-current:not(.shell-ready) .sidebar,
  body:not(.viewer-page).app-current:not(.shell-ready) .context-rail,
  body:not(.viewer-page).app-current:not(.shell-ready) .dock-handle{
    transition:none!important;
    animation:none!important;
  }

  html.shell-mobile-initial body:not(.viewer-page).app-current .app-shell,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .app-shell,
  body:not(.viewer-page).app-current.shell-auto-hide .app-shell{
    display:block!important;
    width:100dvw!important;
    max-width:100dvw!important;
    height:auto!important;
    min-height:100dvh!important;
    overflow:visible!important;
    padding:0!important;
    margin:0!important;
  }

  html.shell-mobile-initial body:not(.viewer-page).app-current .content,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .content,
  body:not(.viewer-page).app-current.shell-auto-hide .content{
    width:100dvw!important;
    max-width:100dvw!important;
    min-height:100dvh!important;
    height:auto!important;
    overflow:visible!important;
    padding:6px 8px calc(78px + env(safe-area-inset-bottom))!important;
    margin:0!important;
  }

  body:not(.viewer-page).app-current.shell-mobile-auto-hide .content-layout,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .content-body,
  body:not(.viewer-page).app-current.shell-auto-hide .content-layout,
  body:not(.viewer-page).app-current.shell-auto-hide .content-body{
    overflow:visible!important;
    min-height:0!important;
  }

  html.shell-mobile-initial body:not(.viewer-page).app-current .mobile-menu-button,
  html.shell-mobile-initial body:not(.viewer-page).app-current .mobile-backdrop,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .mobile-menu-button,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .mobile-backdrop,
  body:not(.viewer-page).app-current.shell-auto-hide .mobile-menu-button,
  body:not(.viewer-page).app-current.shell-auto-hide .mobile-backdrop{
    display:none!important;
    pointer-events:none!important;
  }

  html.shell-mobile-initial body:not(.viewer-page).app-current #left-dock-handle,
  html.shell-mobile-initial body:not(.viewer-page).app-current #right-dock-handle,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide #left-dock-handle,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide #right-dock-handle,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .dock-handle,
  body:not(.viewer-page).app-current.shell-auto-hide #left-dock-handle,
  body:not(.viewer-page).app-current.shell-auto-hide #right-dock-handle,
  body:not(.viewer-page).app-current.shell-auto-hide .dock-handle{
    display:inline-grid!important;
    visibility:visible!important;
    opacity:1!important;
    pointer-events:auto!important;
    position:fixed!important;
    top:auto!important;
    bottom:calc(14px + env(safe-area-inset-bottom))!important;
    width:52px!important;
    height:52px!important;
    min-width:52px!important;
    min-height:52px!important;
    padding:0!important;
    place-items:center!important;
    border-radius:16px!important;
    transform:none!important;
    transition:box-shadow .16s ease,border-color .16s ease,background .16s ease!important;
    touch-action:manipulation!important;
    -webkit-tap-highlight-color:transparent!important;
    z-index:95!important;
  }

  html.shell-mobile-initial body:not(.viewer-page).app-current #left-dock-handle,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide #left-dock-handle,
  body:not(.viewer-page).app-current.shell-auto-hide #left-dock-handle{
    left:8px!important;
    right:auto!important;
  }

  html.shell-mobile-initial body:not(.viewer-page).app-current #right-dock-handle,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide #right-dock-handle,
  body:not(.viewer-page).app-current.shell-auto-hide #right-dock-handle{
    right:8px!important;
    left:auto!important;
  }

  html.shell-mobile-initial body:not(.viewer-page).app-current .dock-handle-label,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .dock-handle-label,
  body:not(.viewer-page).app-current.shell-auto-hide .dock-handle-label{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    overflow:hidden!important;
    clip:rect(0,0,0,0)!important;
    white-space:nowrap!important;
  }

  html.shell-mobile-initial body:not(.viewer-page).app-current .dock-handle-icon,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .dock-handle-icon,
  body:not(.viewer-page).app-current.shell-auto-hide .dock-handle-icon{
    width:30px!important;
    height:30px!important;
    display:grid!important;
    place-items:center!important;
    border-radius:10px!important;
  }

  body:not(.viewer-page).app-current.shell-mobile-auto-hide .activity-feed-items,
  body:not(.viewer-page).app-current.shell-auto-hide .activity-feed-items{
    animation:none!important;
    transform:none!important;
    will-change:auto!important;
  }

  body:not(.viewer-page).app-current.shell-mobile-auto-hide.left-dock-open .sidebar,
  body:not(.viewer-page).app-current.shell-auto-hide.left-dock-open .sidebar,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide.right-dock-open .context-rail,
  body:not(.viewer-page).app-current.shell-auto-hide.right-dock-open .context-rail{
    box-shadow:0 22px 52px rgba(0,0,0,.34)!important;
  }

  body:not(.viewer-page).app-current.shell-mobile-auto-hide.left-dock-open .sidebar .brand-meta,
  body:not(.viewer-page).app-current.shell-auto-hide.left-dock-open .sidebar .brand-meta{
    display:none!important;
  }

  body:not(.viewer-page).app-current.shell-mobile-auto-hide.left-dock-open .sidebar .nav a,
  body:not(.viewer-page).app-current.shell-auto-hide.left-dock-open .sidebar .nav a,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide.left-dock-open .sidebar-about-link a,
  body:not(.viewer-page).app-current.shell-auto-hide.left-dock-open .sidebar-about-link a{
    min-height:42px!important;
    padding:8px 10px!important;
    gap:9px!important;
    border-radius:12px!important;
  }

  body:not(.viewer-page).app-current.shell-mobile-auto-hide.left-dock-open .sidebar .nav-label,
  body:not(.viewer-page).app-current.shell-auto-hide.left-dock-open .sidebar .nav-label{
    font-size:10px!important;
    line-height:1.05!important;
    white-space:normal!important;
  }

  body:not(.viewer-page).app-current.shell-mobile-auto-hide.right-dock-open .context-card,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide.right-dock-open .activity-feed,
  body:not(.viewer-page).app-current.shell-auto-hide.right-dock-open .context-card,
  body:not(.viewer-page).app-current.shell-auto-hide.right-dock-open .activity-feed{
    padding:10px!important;
    border-radius:12px!important;
  }

  body:not(.viewer-page).app-current.shell-mobile-auto-hide.left-dock-open .sidebar,
  body:not(.viewer-page).app-current.shell-auto-hide.left-dock-open .sidebar{
    transform:translate3d(0,0,0)!important;
  }

  body:not(.viewer-page).app-current.shell-mobile-auto-hide.right-dock-open .context-rail,
  body:not(.viewer-page).app-current.shell-auto-hide.right-dock-open .context-rail{
    transform:translate3d(0,0,0)!important;
  }
}

/* 446V: final mobile compact, readable notification feed and icon viewer controls. */
@media(max-width:760px){
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed{
    --left-rail:0px!important;
    --right-rail:0px!important;
    --shell-gap:0px!important;
    --shell-pad:0px!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    height:auto!important;
    min-height:100dvh!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .app-shell,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .content{
    width:100dvw!important;
    max-width:100dvw!important;
    height:auto!important;
    min-height:100dvh!important;
    overflow:visible!important;
    padding-left:8px!important;
    padding-right:8px!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed #left-dock-handle,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed #right-dock-handle,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .dock-handle{
    position:fixed!important;
    top:50%!important;
    bottom:auto!important;
    width:44px!important;
    height:44px!important;
    min-width:44px!important;
    min-height:44px!important;
    padding:0!important;
    display:grid!important;
    place-items:center!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    transform:translate3d(0,-50%,0)!important;
    z-index:94!important;
    touch-action:manipulation!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed #left-dock-handle{left:0!important;right:auto!important}
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed #right-dock-handle{right:0!important;left:auto!important}
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .dock-handle-label{display:none!important}
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .dock-handle-icon{
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    min-height:38px!important;
    border-radius:13px!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .sidebar,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .context-rail{
    position:fixed!important;
    top:0!important;
    bottom:0!important;
    height:100dvh!important;
    max-height:100dvh!important;
    min-width:0!important;
    opacity:1!important;
    z-index:70!important;
    transition:none!important;
    contain:layout paint!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .sidebar{
    left:0!important;
    right:auto!important;
    width:min(278px,82dvw)!important;
    max-width:calc(100dvw - 44px)!important;
    transform:translate3d(calc(-100% - 8px),0,0)!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.left-dock-open .sidebar{
    transform:translate3d(0,0,0)!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .context-rail{
    right:0!important;
    left:auto!important;
    width:min(286px,82dvw)!important;
    max-width:calc(100dvw - 44px)!important;
    padding:8px 6px max(10px,env(safe-area-inset-bottom))!important;
    gap:8px!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto minmax(0,1fr) 40px!important;
    align-content:stretch!important;
    justify-items:stretch!important;
    border-radius:18px 0 0 18px!important;
    transform:translate3d(calc(100% + 8px),0,0)!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.right-dock-open .context-rail{
    transform:translate3d(0,0,0)!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .context-rail > *,
  body:not(.viewer-page).app-current.shell-auto-hide .context-rail > *,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .context-rail > *{
    grid-column:1 / -1!important;
    justify-self:stretch!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    box-sizing:border-box!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed #activity-feed,
  body:not(.viewer-page).app-current.shell-auto-hide #activity-feed,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide #activity-feed{
    display:grid!important;
    grid-template-rows:auto minmax(0,1fr)!important;
    height:100%!important;
    min-height:0!important;
    overflow:hidden!important;
    gap:8px!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .activity-feed-live,
  body:not(.viewer-page).app-current.shell-auto-hide .activity-feed-live,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .activity-feed-live{
    height:100%!important;
    min-height:0!important;
    overflow:auto!important;
    padding-right:3px!important;
    scrollbar-gutter:stable!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .activity-feed-history,
  body:not(.viewer-page).app-current.shell-auto-hide .activity-feed-history,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .activity-feed-history{
    display:none!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .activity-feed-items,
  body:not(.viewer-page).app-current.shell-auto-hide .activity-feed-items,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .activity-feed-items{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:8px!important;
    align-content:start!important;
    transform:none!important;
    animation:none!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .activity-card,
  body:not(.viewer-page).app-current.shell-auto-hide .activity-card,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .activity-card{
    width:100%!important;
    min-width:0!important;
    min-height:64px!important;
    padding:10px 11px!important;
    border-radius:12px!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:4px!important;
    overflow:visible!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .activity-card strong,
  body:not(.viewer-page).app-current.shell-auto-hide .activity-card strong,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .activity-card strong,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .activity-card span,
  body:not(.viewer-page).app-current.shell-auto-hide .activity-card span,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .activity-card span,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .activity-card small,
  body:not(.viewer-page).app-current.shell-auto-hide .activity-card small,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .activity-card small{
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
    display:block!important;
    -webkit-line-clamp:unset!important;
    overflow-wrap:anywhere!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .activity-card strong,
  body:not(.viewer-page).app-current.shell-auto-hide .activity-card strong,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .activity-card strong{font-size:11px!important;line-height:1.22!important}
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .activity-card span,
  body:not(.viewer-page).app-current.shell-auto-hide .activity-card span,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .activity-card span{font-size:10px!important;line-height:1.25!important}
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .activity-card small,
  body:not(.viewer-page).app-current.shell-auto-hide .activity-card small,
  body:not(.viewer-page).app-current.shell-mobile-auto-hide .activity-card small{font-size:9px!important;line-height:1.25!important}
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed .context-rail .shell-mode-form-right{
    position:static!important;
    grid-row:3!important;
    align-self:end!important;
    justify-self:center!important;
    display:grid!important;
    place-items:center!important;
    width:100%!important;
    height:40px!important;
    margin:0!important;
    padding:0!important;
  }
  body.viewer-page.app-current .viewer-mobile-tool-icon{
    display:grid!important;
    place-items:center!important;
    width:22px!important;
    height:22px!important;
  }
  body.viewer-page.app-current .viewer-mobile-tool-icon svg{
    width:22px!important;
    height:22px!important;
    stroke:currentColor!important;
    stroke-width:2!important;
    fill:none!important;
    stroke-linecap:round!important;
    stroke-linejoin:round!important;
  }
  body.viewer-page.app-current .viewer-tool-label{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    overflow:hidden!important;
    clip:rect(0,0,0,0)!important;
    white-space:nowrap!important;
  }
  body.viewer-page.app-current [data-mobile-tool]::before,
  body.viewer-page.app-current .dicom-toolbar button::before,
  body.viewer-page.app-current .dicom-toolbar-pro button::before{
    content:none!important;
  }
}

@media(max-width:760px){
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.right-dock-open .context-rail > #activity-feed,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.right-dock-open #activity-feed{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    padding:10px!important;
    display:grid!important;
    place-items:stretch!important;
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto minmax(0,1fr)!important;
    gap:8px!important;
    border-radius:12px!important;
    overflow:hidden!important;
    cursor:auto!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.right-dock-open #activity-feed::before{
    content:none!important;
    display:none!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.right-dock-open #activity-feed > *,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.right-dock-open #activity-feed .activity-feed-head,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.right-dock-open #activity-feed .activity-feed-live,
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.right-dock-open #activity-feed .activity-feed-items{
    display:grid!important;
    visibility:visible!important;
    opacity:1!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.right-dock-open #activity-feed .activity-feed-live{
    height:100%!important;
    min-height:0!important;
    overflow:auto!important;
  }
  body:not(.viewer-page).app-current.shell-compact.shell-compact-fixed.right-dock-open #activity-feed .activity-card{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:auto!important;
    min-height:64px!important;
    max-height:none!important;
    padding:10px 11px!important;
    display:grid!important;
    place-items:stretch!important;
  }
}

.activity-card-link{
  color:inherit!important;
  text-decoration:none!important;
}
.activity-card-link:hover{
  border-color:rgba(240,198,103,.55)!important;
  transform:translateY(-1px);
}
.notification-report-panel{
  display:grid;
  gap:12px;
}
.notification-report-list{
  display:grid;
  gap:10px;
}
.notification-report-card{
  display:grid;
  gap:5px;
  padding:12px 13px;
  border:1px solid rgba(148,163,184,.22);
  border-radius:12px;
  background:rgba(15,23,42,.06);
  color:inherit;
  text-decoration:none;
}
.notification-report-card:hover{
  border-color:rgba(240,198,103,.5);
  background:rgba(240,198,103,.08);
}
.notification-report-card strong{
  font-size:13px;
  line-height:1.25;
}
.notification-report-card span,
.notification-report-card em,
.notification-report-card small{
  font-size:11px;
  line-height:1.3;
  overflow-wrap:anywhere;
}
.notification-report-card em{
  color:var(--muted);
  font-style:normal;
}
.notification-report-tone{
  width:max-content;
  padding:3px 7px;
  border-radius:999px;
  background:rgba(37,99,235,.14);
  color:#93c5fd;
  font-weight:900;
}
.notification-report-card.error .notification-report-tone{
  background:rgba(239,68,68,.14);
  color:#fca5a5;
}
.notification-report-card.warning .notification-report-tone{
  background:rgba(245,158,11,.16);
  color:#facc15;
}
.notification-detail-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.notification-detail-card{
  display:grid;
  gap:10px;
}
.detail-list{
  display:grid;
  gap:8px;
  margin:0;
}
.detail-list div{
  display:grid;
  grid-template-columns:120px minmax(0,1fr);
  gap:10px;
  padding:8px 0;
  border-bottom:1px solid rgba(148,163,184,.14);
}
.detail-list dt{
  color:var(--muted);
  font-size:10px;
  font-weight:900;
  text-transform:uppercase;
}
.detail-list dd{
  margin:0;
  min-width:0;
  overflow-wrap:anywhere;
  font-size:12px;
  font-weight:800;
}
@media(max-width:760px){
  .notification-detail-grid{
    grid-template-columns:1fr;
  }
  .notification-report-card{
    padding:11px;
    border-radius:11px;
  }
  .detail-list div{
    grid-template-columns:1fr;
    gap:3px;
  }
}

/* 447C: final viewer precedence guard. */
body.viewer-page.app-current .viewer-smart-dock{display:flex!important;align-items:center!important;justify-content:center!important;gap:6px!important}
body.viewer-page.app-current .dicom-toolbar-pro,
body.viewer-page.app-current .compare-bottom-tools{
  position:absolute!important;left:50%!important;right:auto!important;top:auto!important;bottom:10px!important;z-index:120!important;
  width:auto!important;max-width:min(94vw,980px)!important;transform:translateX(-50%)!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;
  padding:7px!important;border:1px solid rgba(148,163,184,.30)!important;border-radius:18px!important;background:rgba(8,13,23,.90)!important;box-shadow:0 18px 46px rgba(0,0,0,.38)!important;backdrop-filter:blur(16px)!important;overflow:visible!important;
}
body.viewer-page.app-current .dicom-toolbar-pro .viewer-tool-sliders,
body.viewer-page.app-current .compare-bottom-tools .viewer-tool-sliders{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important}
body.viewer-page.app-current .viewer-dock-tool{
  position:relative!important;width:48px!important;min-width:48px!important;height:44px!important;min-height:44px!important;padding:0!important;display:grid!important;place-items:center!important;
  border:1px solid rgba(148,163,184,.24)!important;border-radius:14px!important;color:#e5edf7!important;background:rgba(30,41,59,.78)!important;cursor:pointer!important;transition:transform .12s ease,border-color .12s ease,background .12s ease!important;
}
body.viewer-page.app-current .viewer-dock-tool svg{width:20px!important;height:20px!important;stroke:currentColor!important;fill:none!important;stroke-width:2!important;stroke-linecap:round!important;stroke-linejoin:round!important}
body.viewer-page.app-current .viewer-dock-tool span{position:absolute!important;left:50%!important;bottom:calc(100% + 8px)!important;transform:translateX(-50%) translateY(3px)!important;padding:5px 8px!important;border-radius:9px!important;background:rgba(8,13,23,.96)!important;color:#f8fafc!important;font-size:10px!important;font-weight:900!important;line-height:1!important;opacity:0!important;pointer-events:none!important;white-space:nowrap!important;transition:opacity .12s ease,transform .12s ease!important}
body.viewer-page.app-current .viewer-dock-tool:hover,
body.viewer-page.app-current .viewer-dock-tool:focus-visible,
body.viewer-page.app-current .viewer-dock-tool.active,
body.viewer-page.app-current .viewer-dock-tool.is-active-feedback{color:#fff!important;border-color:rgba(96,165,250,.70)!important;background:linear-gradient(135deg,rgba(37,99,235,.92),rgba(29,78,216,.84))!important;transform:translateY(-1px)!important}
body.viewer-page.app-current .viewer-dock-tool:hover span,
body.viewer-page.app-current .viewer-dock-tool:focus-visible span,
body.viewer-page.app-current .viewer-dock-tool.active span{opacity:1!important;transform:translateX(-50%) translateY(0)!important}
body.viewer-page.app-current .viewer-context-panel{position:absolute!important;right:14px!important;top:14px!important;z-index:121!important;width:min(360px,calc(100vw - 28px))!important;max-height:calc(100% - 92px)!important;display:grid!important;grid-template-rows:auto minmax(0,1fr)!important;gap:10px!important;padding:12px!important;border:1px solid rgba(148,163,184,.30)!important;border-radius:18px!important;background:rgba(8,13,23,.94)!important;color:#e5edf7!important;box-shadow:0 24px 70px rgba(0,0,0,.52)!important;backdrop-filter:blur(18px)!important;overflow:hidden!important}
body.viewer-page.app-current .viewer-context-panel[hidden],
body.viewer-page.app-current .viewer-panel-section[hidden],
body.viewer-page.app-current .viewer-tool-toast[hidden]{display:none!important}
body.viewer-page.app-current .viewer-panel-section{min-height:0!important;overflow:auto!important;display:grid!important;gap:10px!important}
body.viewer-page.app-current .viewer-panel-actions,
body.viewer-page.app-current .viewer-layout-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewer{height:100vh!important;min-height:0!important;padding:48px 6px 70px!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel{height:100%!important;min-height:0!important}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewport{height:calc(100% - 64px)!important}
@media(max-width:760px){
  body.viewer-page.app-current .dicom-toolbar-pro,body.viewer-page.app-current .compare-bottom-tools{bottom:calc(7px + env(safe-area-inset-bottom))!important;max-width:calc(100vw - 12px)!important;gap:5px!important;padding:5px!important}
  body.viewer-page.app-current .viewer-dock-tool{width:40px!important;min-width:40px!important;height:38px!important;min-height:38px!important}
  body.viewer-page.app-current .viewer-context-panel{left:8px!important;right:8px!important;top:52px!important;width:auto!important;max-height:calc(100dvh - 124px)!important}
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewer{height:100dvh!important;grid-template-columns:1fr!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;padding:42px 4px 58px!important}
}

/* 447D: normal viewer dock line separation and thumb close guard. */
body.viewer-page.app-current .dicom-toolbar-pro{
  display:grid!important;
  grid-template-columns:1fr!important;
  grid-template-rows:auto auto!important;
  justify-items:center!important;
  align-items:center!important;
  row-gap:6px!important;
  width:max-content!important;
  min-width:0!important;
  max-width:min(94vw,640px)!important;
}
body.viewer-page.app-current .dicom-toolbar-pro .viewer-stack-controls{
  grid-row:1!important;
  width:100%!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(92px,1fr))!important;
  gap:6px!important;
}
body.viewer-page.app-current .dicom-toolbar-pro .viewer-stack-controls button{
  width:100%!important;
  min-width:0!important;
  height:34px!important;
  padding:0 10px!important;
}
body.viewer-page.app-current .dicom-toolbar-pro .viewer-smart-dock{
  grid-row:2!important;
  width:100%!important;
  display:grid!important;
  grid-template-columns:repeat(6,48px)!important;
  justify-content:center!important;
  gap:6px!important;
}
body.viewer-page.app-current .dicom-toolbar-pro .viewer-dock-tool{
  position:relative!important;
  z-index:1!important;
}
@media(max-width:760px){
  body.viewer-page.app-current .dicom-toolbar-pro{
    max-width:calc(100vw - 12px)!important;
    row-gap:5px!important;
  }
  body.viewer-page.app-current .dicom-toolbar-pro .viewer-stack-controls{
    grid-template-columns:repeat(2,minmax(78px,1fr))!important;
  }
  body.viewer-page.app-current .dicom-toolbar-pro .viewer-stack-controls button{
    height:32px!important;
    font-size:9px!important;
  }
  body.viewer-page.app-current .dicom-toolbar-pro .viewer-smart-dock{
    grid-template-columns:repeat(6,40px)!important;
    gap:5px!important;
  }
}

/* 447E: compare viewer mobile landscape-first and icon-only controls. */
body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools{
  display:grid!important;
  grid-template-columns:auto auto!important;
  grid-template-rows:auto auto!important;
  align-items:center!important;
  justify-items:center!important;
  gap:6px!important;
  width:max-content!important;
  max-width:min(94vw,720px)!important;
}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .viewer-stack-controls{
  grid-column:1!important;
  grid-row:1!important;
  display:grid!important;
  grid-template-columns:repeat(2,42px)!important;
  gap:5px!important;
}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .compare-target-tools{
  grid-column:2!important;
  grid-row:1!important;
  display:grid!important;
  grid-template-columns:repeat(3,42px)!important;
  gap:5px!important;
}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .compare-smart-dock{
  grid-column:1 / -1!important;
  grid-row:2!important;
  display:grid!important;
  grid-template-columns:repeat(6,44px)!important;
  gap:6px!important;
}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools button{
  overflow:hidden!important;
  white-space:nowrap!important;
  text-indent:-999px!important;
  font-size:0!important;
}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools button::before{
  text-indent:0!important;
  font-size:11px!important;
  font-weight:950!important;
}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .viewer-dock-tool{
  text-indent:0!important;
}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .viewer-dock-tool::before{
  content:none!important;
}
@media(max-width:760px){
  body.viewer-page.app-current.viewer-compare-reading-mode{
    background:#020617!important;
    overflow:hidden!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-head{
    left:6px!important;
    right:6px!important;
    top:5px!important;
    height:32px!important;
    min-height:32px!important;
    overflow:hidden!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-head .actions > *:not(:first-child){
    display:none!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-head .actions{
    display:flex!important;
    justify-content:flex-end!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-head .actions .primary.link{
    height:28px!important;
    min-height:28px!important;
    padding:0 9px!important;
    font-size:10px!important;
    border-radius:10px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-actions button{
    width:32px!important;
    min-width:32px!important;
    max-width:32px!important;
    height:30px!important;
    min-height:30px!important;
    padding:0!important;
    overflow:hidden!important;
    white-space:nowrap!important;
    text-indent:-999px!important;
    font-size:0!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-actions [data-mobile-tool]::before{
    text-indent:0!important;
    font-size:14px!important;
    font-weight:950!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools{
    grid-template-columns:auto!important;
    grid-template-rows:auto!important;
    width:max-content!important;
    max-width:calc(100dvw - 10px)!important;
    padding:5px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .viewer-stack-controls,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .compare-target-tools{
    display:none!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .compare-smart-dock{
    grid-column:1!important;
    grid-row:1!important;
    grid-template-columns:repeat(6,38px)!important;
    gap:5px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .viewer-dock-tool{
    width:38px!important;
    min-width:38px!important;
    height:36px!important;
    min-height:36px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .viewer-dock-tool svg{
    width:17px!important;
    height:17px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-context-panel{
    top:44px!important;
    bottom:auto!important;
    max-height:calc(100dvh - 104px)!important;
  }
}
@media(max-width:760px) and (orientation:portrait){
  body.viewer-page.app-current.viewer-compare-reading-mode .content{
    position:fixed!important;
    inset:0!important;
    width:100dvw!important;
    height:100dvh!important;
    padding:0!important;
    overflow:hidden!important;
    background:#020617!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-head,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewer,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-context-panel,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-study-tray{
    transform-origin:top left!important;
    transform:rotate(90deg) translateY(-100dvw)!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-head{
    position:fixed!important;
    left:6px!important;
    top:6px!important;
    width:calc(100dvh - 12px)!important;
    right:auto!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewer{
    position:fixed!important;
    left:0!important;
    top:0!important;
    width:100dvh!important;
    height:100dvw!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-rows:1fr!important;
    padding:42px 5px 54px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools{
    position:fixed!important;
    left:50dvh!important;
    bottom:auto!important;
    top:calc(100dvw - 47px)!important;
    width:max-content!important;
    max-width:calc(100dvh - 12px)!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-context-panel{
    position:fixed!important;
    left:8px!important;
    top:44px!important;
    width:min(330px,calc(100dvh - 16px))!important;
    max-height:calc(100dvw - 98px)!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-study-tray{
    display:none!important;
  }
}

/* 447I: mobile landscape phones keep the same compact identified dock. */
@media(max-width:900px) and (max-height:520px){
  html,
  body.viewer-page.app-current{
    width:100vw!important;
    height:100dvh!important;
    overflow:hidden!important;
    background:#020617!important;
  }
  body.viewer-page.app-current .mobile-menu-button,
  body.viewer-page.app-current .viewer-head:not(.compare-head) .actions,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-head .actions,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-study-tray{
    display:none!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewer{
    position:fixed!important;
    inset:0!important;
    width:100dvw!important;
    height:100dvh!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-rows:1fr!important;
    gap:6px!important;
    padding:44px 6px 62px!important;
    overflow:hidden!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-head{
    position:fixed!important;
    left:6px!important;
    right:6px!important;
    top:6px!important;
    height:32px!important;
    min-height:32px!important;
    padding:5px 9px!important;
    overflow:hidden!important;
    z-index:90!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel{
    height:100%!important;
    min-height:0!important;
    overflow:hidden!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-head{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    min-height:34px!important;
    padding:6px 7px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewport{
    height:calc(100% - 34px)!important;
    min-height:0!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-info,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-filmstrip,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .viewer-stack-controls,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .compare-target-tools,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .viewer-tool-sliders{
    display:none!important;
  }
  body.viewer-page.app-current .dicom-toolbar-pro,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools{
    position:fixed!important;
    left:50%!important;
    right:auto!important;
    top:auto!important;
    bottom:calc(8px + env(safe-area-inset-bottom))!important;
    z-index:130!important;
    width:max-content!important;
    max-width:calc(100dvw - 14px)!important;
    padding:6px!important;
    transform:translateX(-50%)!important;
    overflow:visible!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .compare-smart-dock,
  body.viewer-page.app-current .dicom-toolbar-pro .viewer-smart-dock{
    display:grid!important;
    grid-template-columns:repeat(6,42px)!important;
    gap:5px!important;
  }
  body.viewer-page.app-current .viewer-dock-tool{
    width:42px!important;
    min-width:42px!important;
    max-width:42px!important;
    height:42px!important;
    min-height:42px!important;
    max-height:42px!important;
    display:grid!important;
    grid-template-rows:18px 10px!important;
    place-items:center!important;
    align-content:center!important;
    gap:2px!important;
    padding:4px 2px!important;
    text-indent:0!important;
    overflow:hidden!important;
  }
  body.viewer-page.app-current .viewer-dock-tool svg{
    width:16px!important;
    height:16px!important;
  }
  body.viewer-page.app-current .viewer-dock-tool[data-viewer-panel-trigger] span{
    position:static!important;
    display:block!important;
    padding:0!important;
    background:transparent!important;
    color:currentColor!important;
    opacity:.92!important;
    transform:none!important;
    font-size:0!important;
    line-height:1!important;
    text-align:center!important;
  }
  body.viewer-page.app-current .viewer-dock-tool[data-viewer-panel-trigger] span::before{
    display:block!important;
    font-size:7px!important;
    font-weight:950!important;
  }
  body.viewer-page.app-current .viewer-dock-tool[data-viewer-panel-trigger="image"] span::before{content:"IMG"!important}
  body.viewer-page.app-current .viewer-dock-tool[data-viewer-panel-trigger="zoom"] span::before{content:"ZOOM"!important}
  body.viewer-page.app-current .viewer-dock-tool[data-viewer-panel-trigger="thumbs"] span::before{content:"SER"!important}
  body.viewer-page.app-current .viewer-dock-tool[data-viewer-panel-trigger="layout"] span::before{content:"LAY"!important}
  body.viewer-page.app-current .viewer-dock-tool[data-viewer-panel-trigger="tools"] span::before{content:"MED"!important}
  body.viewer-page.app-current .viewer-dock-tool[data-viewer-panel-trigger="compare"] span::before{content:"CMP"!important}
  body.viewer-page.app-current.viewer-compare-reading-mode .viewer-dock-tool[data-viewer-panel-trigger="compare"] span::before{content:"HIST"!important}
}

/* 447G: mobile viewer/comparator cleanup after real-device captures. */
@media(max-width:760px){
  body.viewer-page.app-current .mobile-menu-button{
    display:none!important;
  }
  body.viewer-page.app-current .viewer-head:not(.compare-head) .actions{
    display:none!important;
  }
  body.viewer-page.app-current .viewer-head{
    margin:0!important;
    min-height:38px!important;
    padding:8px 10px!important;
    border-radius:0 0 14px 14px!important;
  }
  body.viewer-page.app-current .viewer-head h1{
    font-size:15px!important;
    line-height:1.05!important;
  }
  body.viewer-page.app-current .viewer-head p{
    font-size:10px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.viewer-page.app-current .dicom-viewer,
  body.viewer-page.app-current .dicom-viewer-pro{
    height:100dvh!important;
    min-height:0!important;
    padding-top:44px!important;
  }
  body.viewer-page.app-current .dicom-viewport-wrap,
  body.viewer-page.app-current .dicom-viewport-shell{
    height:calc(100dvh - 44px)!important;
    border-radius:0!important;
  }
  body.viewer-page.app-current .dicom-toolbar-pro{
    bottom:calc(8px + env(safe-area-inset-bottom))!important;
    width:max-content!important;
    max-width:calc(100dvw - 14px)!important;
    padding:6px!important;
    row-gap:5px!important;
    overflow:visible!important;
  }
  body.viewer-page.app-current .dicom-toolbar-pro .viewer-stack-controls{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(82px,1fr))!important;
    gap:6px!important;
    width:100%!important;
  }
  body.viewer-page.app-current .dicom-toolbar-pro .viewer-stack-controls button{
    height:38px!important;
    min-height:38px!important;
    padding:0 8px!important;
    font-size:10px!important;
    border-radius:12px!important;
  }
  body.viewer-page.app-current .dicom-toolbar-pro .viewer-smart-dock{
    display:grid!important;
    grid-template-columns:repeat(6,38px)!important;
    gap:5px!important;
  }
  body.viewer-page.app-current .dicom-toolbar-pro .viewer-dock-tool{
    width:38px!important;
    min-width:38px!important;
    height:36px!important;
    min-height:36px!important;
    border-radius:13px!important;
  }
  body.viewer-page.app-current .viewer-context-panel{
    position:fixed!important;
    left:auto!important;
    right:8px!important;
    top:54px!important;
    bottom:auto!important;
    width:min(330px,calc(100dvw - 18px))!important;
    max-height:calc(100dvh - 132px)!important;
    padding:11px!important;
    border-radius:16px!important;
    z-index:140!important;
  }
  body.viewer-page.app-current .viewer-panel-actions,
  body.viewer-page.app-current .viewer-layout-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body.viewer-page.app-current.viewer-thumbs-open .dicom-viewer-side{
    left:8px!important;
    right:8px!important;
    bottom:calc(58px + env(safe-area-inset-bottom))!important;
    max-height:30dvh!important;
    border-radius:16px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-study-tray{
    display:none!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-head{
    position:fixed!important;
    left:6px!important;
    right:6px!important;
    top:6px!important;
    z-index:90!important;
    height:34px!important;
    min-height:34px!important;
    padding:6px 9px!important;
    overflow:hidden!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-head .actions{
    display:none!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-head h1{
    font-size:13px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewer{
    position:fixed!important;
    left:0!important;
    top:0!important;
    width:100dvw!important;
    height:100dvh!important;
    min-height:0!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-rows:1fr!important;
    gap:6px!important;
    padding:46px 6px 58px!important;
    overflow:hidden!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel{
    min-width:0!important;
    min-height:0!important;
    height:100%!important;
    overflow:hidden!important;
    border-radius:14px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-head{
    min-height:34px!important;
    padding:6px 7px!important;
    gap:5px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-head strong{
    font-size:12px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-head span,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-head small{
    font-size:9px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-actions{
    display:grid!important;
    grid-template-columns:repeat(2,32px)!important;
    gap:5px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-actions button{
    width:32px!important;
    min-width:32px!important;
    max-width:32px!important;
    height:30px!important;
    min-height:30px!important;
    border-radius:11px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewport{
    height:calc(100% - 34px)!important;
    min-height:0!important;
    border-radius:12px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-info{
    display:none!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-filmstrip{
    display:none!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode.viewer-thumbs-open .compare-filmstrip{
    position:fixed!important;
    left:8px!important;
    right:8px!important;
    bottom:calc(58px + env(safe-area-inset-bottom))!important;
    z-index:125!important;
    display:flex!important;
    flex-wrap:nowrap!important;
    gap:7px!important;
    max-height:92px!important;
    overflow:auto!important;
    padding:8px!important;
    border:1px solid rgba(148,163,184,.30)!important;
    border-radius:15px!important;
    background:rgba(8,13,23,.94)!important;
    box-shadow:0 -18px 42px rgba(0,0,0,.46)!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools{
    position:fixed!important;
    left:50%!important;
    right:auto!important;
    bottom:calc(8px + env(safe-area-inset-bottom))!important;
    top:auto!important;
    z-index:130!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    width:max-content!important;
    max-width:calc(100dvw - 14px)!important;
    padding:6px!important;
    transform:translateX(-50%)!important;
    overflow:visible!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .viewer-stack-controls,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .compare-target-tools,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .viewer-tool-sliders{
    display:none!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .compare-smart-dock{
    display:grid!important;
    grid-template-columns:repeat(6,38px)!important;
    gap:5px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .viewer-dock-tool{
    width:38px!important;
    min-width:38px!important;
    height:36px!important;
    min-height:36px!important;
    border-radius:13px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-context-panel{
    position:fixed!important;
    right:8px!important;
    left:auto!important;
    top:48px!important;
    width:min(330px,calc(100dvw - 18px))!important;
    max-height:calc(100dvh - 118px)!important;
    z-index:140!important;
  }
}
@media(max-width:760px) and (orientation:portrait){
  body.viewer-page.app-current.viewer-compare-reading-mode .app-shell,
  body.viewer-page.app-current.viewer-compare-reading-mode .content,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-head,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewer,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-context-panel,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-study-tray{
    transform:none!important;
    transform-origin:initial!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .app-shell,
  body.viewer-page.app-current.viewer-compare-reading-mode .content{
    position:fixed!important;
    inset:0!important;
    width:100dvw!important;
    height:100dvh!important;
    min-width:0!important;
    min-height:0!important;
    padding:0!important;
    margin:0!important;
    overflow:hidden!important;
    background:#020617!important;
  }
}

/* 447F: polished viewer controls for both viewers. */
body.viewer-page.app-current .viewer-dock-tool,
body.viewer-page.app-current .viewer-stack-controls button,
body.viewer-page.app-current .compare-target-tools button,
body.viewer-page.app-current .compare-panel-actions button{
  box-sizing:border-box!important;
  display:grid!important;
  place-items:center!important;
  text-align:center!important;
  line-height:1!important;
}
body.viewer-page.app-current .viewer-dock-tool:focus-visible,
body.viewer-page.app-current .viewer-stack-controls button:focus-visible,
body.viewer-page.app-current .compare-target-tools button:focus-visible,
body.viewer-page.app-current .compare-panel-actions button:focus-visible{
  outline:2px solid rgba(96,165,250,.85)!important;
  outline-offset:2px!important;
}
body.viewer-page.app-current .dicom-toolbar-pro{
  border-radius:20px!important;
  overflow:visible!important;
}
body.viewer-page.app-current .compare-bottom-tools{
  border-radius:20px!important;
  overflow:hidden!important;
}
body.viewer-page.app-current .compare-panel-actions button,
body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .viewer-stack-controls button,
body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .compare-target-tools button{
  width:38px!important;
  min-width:38px!important;
  max-width:38px!important;
  height:34px!important;
  min-height:34px!important;
  padding:0!important;
  overflow:hidden!important;
  white-space:nowrap!important;
  text-indent:-999px!important;
  font-size:0!important;
}
body.viewer-page.app-current .compare-panel-actions button::before,
body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .viewer-stack-controls button::before,
body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .compare-target-tools button::before{
  display:grid!important;
  place-items:center!important;
  width:100%!important;
  height:100%!important;
  text-indent:0!important;
  font-size:12px!important;
  font-weight:950!important;
  line-height:1!important;
  color:currentColor!important;
}
body.viewer-page.app-current .compare-panel-actions [data-mobile-tool="prev"]::before{content:"<"!important}
body.viewer-page.app-current .compare-panel-actions [data-mobile-tool="next"]::before{content:">"!important}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools [data-mobile-tool="prev-both"]::before{content:"<< "!important}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools [data-mobile-tool="next-both"]::before{content:">>"!important}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools [data-mobile-tool="left"]::before{content:"E"!important}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools [data-mobile-tool="both"]::before{content:"2"!important}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools [data-mobile-tool="right"]::before{content:"D"!important}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .viewer-dock-tool{
  text-indent:0!important;
  overflow:visible!important;
}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .viewer-dock-tool::before{
  content:none!important;
}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-head > div:first-child,
body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-head span,
body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-head strong,
body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-head small{
  min-width:0!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
@media(max-width:760px){
  body.viewer-page.app-current .dicom-toolbar-pro{
    width:max-content!important;
    max-width:calc(100dvw - 10px)!important;
    grid-template-columns:1fr!important;
    grid-template-rows:auto auto!important;
    padding:6px!important;
  }
  body.viewer-page.app-current .dicom-toolbar-pro .viewer-stack-controls{
    grid-template-columns:repeat(2,minmax(76px,1fr))!important;
    width:100%!important;
  }
  body.viewer-page.app-current .dicom-toolbar-pro .viewer-smart-dock{
    grid-template-columns:repeat(6,38px)!important;
    gap:5px!important;
  }
  body.viewer-page.app-current .dicom-toolbar-pro .viewer-dock-tool{
    width:38px!important;
    min-width:38px!important;
    height:36px!important;
    min-height:36px!important;
  }
  body.viewer-page.app-current .viewer-dock-tool span{
    display:none!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools{
    width:max-content!important;
    max-width:calc(100dvw - 10px)!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-rows:auto!important;
    padding:6px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .viewer-stack-controls,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .compare-target-tools{
    display:none!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .compare-smart-dock{
    display:grid!important;
    grid-template-columns:repeat(6,38px)!important;
    gap:5px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .viewer-dock-tool{
    width:38px!important;
    min-width:38px!important;
    height:36px!important;
    min-height:36px!important;
  }
}
@media(max-width:760px) and (orientation:portrait){
  html,
  body.viewer-page.app-current{
    width:100vw!important;
    height:100dvh!important;
    overflow:hidden!important;
    background:#020617!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .app-shell,
  body.viewer-page.app-current.viewer-compare-reading-mode .content{
    position:fixed!important;
    left:0!important;
    top:0!important;
    width:100dvh!important;
    height:100dvw!important;
    min-width:100dvh!important;
    min-height:100dvw!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    transform:translateX(100dvw) rotate(90deg)!important;
    transform-origin:top left!important;
    background:#020617!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-head,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewer,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-context-panel{
    transform:none!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-head{
    position:fixed!important;
    left:6px!important;
    top:6px!important;
    width:calc(100dvh - 12px)!important;
    right:auto!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewer{
    position:fixed!important;
    left:0!important;
    top:0!important;
    width:100dvh!important;
    height:100dvw!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-rows:1fr!important;
    padding:42px 6px 56px!important;
    gap:6px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel{
    height:auto!important;
    min-height:0!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewport{
    height:calc(100% - 34px)!important;
    min-height:0!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-info{
    display:none!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools{
    position:fixed!important;
    left:50%!important;
    right:auto!important;
    bottom:calc(6px + env(safe-area-inset-bottom))!important;
    top:auto!important;
    width:auto!important;
    max-width:calc(100dvh - 12px)!important;
    transform:translateX(-50%)!important;
  }
}

/* 447L: final mobile viewer labels and compare portrait strategy. */
@media(max-width:760px){
  body.viewer-page.app-current .mobile-menu-button,
  body.viewer-page.app-current .viewer-head:not(.compare-head) .actions,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-head .actions,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-study-tray{
    display:none!important;
  }
  body.viewer-page.app-current .viewer-head{
    margin:0!important;
    min-height:38px!important;
    padding:8px 10px!important;
    border-radius:0 0 14px 14px!important;
    overflow:hidden!important;
  }
  body.viewer-page.app-current .viewer-head h1{
    font-size:15px!important;
    line-height:1.05!important;
  }
  body.viewer-page.app-current .viewer-head p{
    font-size:10px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.viewer-page.app-current .dicom-viewer,
  body.viewer-page.app-current .dicom-viewer-pro{
    height:100dvh!important;
    min-height:0!important;
    padding-top:44px!important;
  }
  body.viewer-page.app-current .dicom-viewport-wrap,
  body.viewer-page.app-current .dicom-viewport-shell{
    height:calc(100dvh - 44px)!important;
    border-radius:0!important;
  }
  body.viewer-page.app-current .dicom-toolbar-pro,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools{
    position:fixed!important;
    left:50%!important;
    right:auto!important;
    top:auto!important;
    bottom:calc(8px + env(safe-area-inset-bottom))!important;
    z-index:130!important;
    width:max-content!important;
    max-width:calc(100dvw - 14px)!important;
    padding:6px!important;
    border-radius:18px!important;
    transform:translateX(-50%)!important;
    overflow:visible!important;
  }
  body.viewer-page.app-current .dicom-toolbar-pro{
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-rows:auto auto!important;
    row-gap:5px!important;
  }
  body.viewer-page.app-current .dicom-toolbar-pro .viewer-stack-controls{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(82px,1fr))!important;
    gap:6px!important;
    width:100%!important;
  }
  body.viewer-page.app-current .dicom-toolbar-pro .viewer-stack-controls button{
    height:34px!important;
    min-height:34px!important;
    padding:0 8px!important;
    font-size:10px!important;
    border-radius:12px!important;
  }
  body.viewer-page.app-current .dicom-toolbar-pro .viewer-smart-dock,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .compare-smart-dock{
    display:grid!important;
    grid-template-columns:repeat(6,42px)!important;
    gap:5px!important;
  }
  body.viewer-page.app-current .viewer-dock-tool{
    width:42px!important;
    min-width:42px!important;
    max-width:42px!important;
    height:42px!important;
    min-height:42px!important;
    max-height:42px!important;
    display:grid!important;
    grid-template-rows:18px 10px!important;
    place-items:center!important;
    align-content:center!important;
    gap:2px!important;
    padding:4px 2px!important;
    border-radius:13px!important;
    text-indent:0!important;
    overflow:hidden!important;
  }
  body.viewer-page.app-current .viewer-dock-tool svg{
    width:16px!important;
    height:16px!important;
  }
  body.viewer-page.app-current .viewer-dock-tool span{
    position:static!important;
    display:block!important;
    max-width:100%!important;
    padding:0!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    color:currentColor!important;
    opacity:.92!important;
    transform:none!important;
    pointer-events:none!important;
    font-size:7px!important;
    font-weight:950!important;
    line-height:1!important;
    letter-spacing:0!important;
    text-align:center!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:clip!important;
  }
  body.viewer-page.app-current .viewer-dock-tool[data-viewer-panel-trigger="image"] span::before{content:"IMG"!important}
  body.viewer-page.app-current .viewer-dock-tool[data-viewer-panel-trigger="zoom"] span::before{content:"ZOOM"!important}
  body.viewer-page.app-current .viewer-dock-tool[data-viewer-panel-trigger="thumbs"] span::before{content:"SER"!important}
  body.viewer-page.app-current .viewer-dock-tool[data-viewer-panel-trigger="layout"] span::before{content:"LAY"!important}
  body.viewer-page.app-current .viewer-dock-tool[data-viewer-panel-trigger="tools"] span::before{content:"MED"!important}
  body.viewer-page.app-current .viewer-dock-tool[data-viewer-panel-trigger="compare"] span::before{content:"CMP"!important}
  body.viewer-page.app-current .viewer-dock-tool[data-viewer-panel-trigger] span{
    font-size:0!important;
  }
  body.viewer-page.app-current .viewer-dock-tool[data-viewer-panel-trigger] span::before{
    display:block!important;
    font-size:7px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .viewer-dock-tool[data-viewer-panel-trigger="compare"] span::before{content:"HIST"!important}
  body.viewer-page.app-current .viewer-context-panel{
    position:fixed!important;
    left:auto!important;
    right:8px!important;
    top:54px!important;
    bottom:auto!important;
    width:min(330px,calc(100dvw - 18px))!important;
    max-height:calc(100dvh - 132px)!important;
    padding:11px!important;
    border-radius:16px!important;
    z-index:140!important;
  }
  body.viewer-page.app-current.viewer-thumbs-open .dicom-viewer-side{
    left:8px!important;
    right:8px!important;
    bottom:calc(64px + env(safe-area-inset-bottom))!important;
    max-height:30dvh!important;
    border-radius:16px!important;
    z-index:125!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-head{
    position:fixed!important;
    left:6px!important;
    right:6px!important;
    top:6px!important;
    z-index:90!important;
    height:34px!important;
    min-height:34px!important;
    padding:6px 9px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-head h1{
    font-size:13px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewer{
    position:fixed!important;
    left:0!important;
    top:0!important;
    width:100dvw!important;
    height:100dvh!important;
    min-height:0!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-rows:1fr!important;
    gap:6px!important;
    padding:46px 6px 62px!important;
    overflow:hidden!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel{
    min-width:0!important;
    min-height:0!important;
    height:100%!important;
    overflow:hidden!important;
    border-radius:14px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-head{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:start!important;
    min-height:34px!important;
    padding:6px 7px!important;
    gap:5px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-head strong{
    font-size:12px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-head span,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-head small{
    font-size:9px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-actions{
    display:grid!important;
    grid-template-columns:repeat(2,32px)!important;
    gap:5px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-actions button{
    width:32px!important;
    min-width:32px!important;
    max-width:32px!important;
    height:30px!important;
    min-height:30px!important;
    border-radius:11px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewport{
    height:calc(100% - 34px)!important;
    min-height:0!important;
    border-radius:12px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-info,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-filmstrip,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .viewer-stack-controls,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .compare-target-tools,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .viewer-tool-sliders{
    display:none!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode.viewer-thumbs-open .compare-filmstrip{
    position:fixed!important;
    left:8px!important;
    right:8px!important;
    bottom:calc(64px + env(safe-area-inset-bottom))!important;
    z-index:125!important;
    display:flex!important;
    flex-wrap:nowrap!important;
    gap:7px!important;
    max-height:92px!important;
    overflow:auto!important;
    padding:8px!important;
    border:1px solid rgba(148,163,184,.30)!important;
    border-radius:15px!important;
    background:rgba(8,13,23,.94)!important;
    box-shadow:0 -18px 42px rgba(0,0,0,.46)!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-context-panel{
    position:fixed!important;
    right:8px!important;
    left:auto!important;
    top:48px!important;
    width:min(330px,calc(100dvw - 18px))!important;
    max-height:calc(100dvh - 118px)!important;
    z-index:140!important;
  }
}
@media(max-width:760px) and (orientation:portrait){
  html,
  body.viewer-page.app-current{
    width:100vw!important;
    height:100dvh!important;
    overflow:hidden!important;
    background:#020617!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .app-shell,
  body.viewer-page.app-current.viewer-compare-reading-mode .content{
    position:fixed!important;
    left:0!important;
    top:0!important;
    width:100dvh!important;
    height:100dvw!important;
    min-width:100dvh!important;
    min-height:100dvw!important;
    padding:0!important;
    margin:0!important;
    overflow:hidden!important;
    transform:rotate(90deg) translateY(-100%)!important;
    transform-origin:top left!important;
    background:#020617!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-head,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewer,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-context-panel,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-study-tray{
    transform:none!important;
    transform-origin:initial!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-head{
    width:calc(100dvh - 12px)!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewer{
    width:100dvh!important;
    height:100dvw!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools{
    max-width:calc(100dvh - 14px)!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-context-panel{
    width:min(330px,calc(100dvh - 18px))!important;
    max-height:calc(100dvw - 118px)!important;
  }
}

/* 447L: comparador mobile portrait-first, sem landscape virtual e sem corte diagnostico. */
body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewport{
  overflow:hidden!important;
}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-image-frame{
  display:block!important;
  overflow:hidden!important;
  background:#000!important;
  will-change:transform!important;
}
body.viewer-page.app-current.viewer-compare-reading-mode .compare-image-frame img{
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:fill!important;
  display:block!important;
}
/* Viewers sao superficies diagnosticas: permanecem escuros em qualquer tema do usuario. */
html[data-theme="light"] body.viewer-page,
html[data-theme="light"] body.viewer-page.app-current,
html[data-theme="light"] body.viewer-page.app-current .content,
html[data-theme="light"] body.viewer-page.app-current .dicom-viewer,
html[data-theme="light"] body.viewer-page.app-current .dicom-viewport-wrap,
html[data-theme="light"] body.viewer-page.app-current .dicom-viewport-shell,
html[data-theme="light"] body.viewer-page.app-current .dicom-viewport,
html[data-theme="light"] body.viewer-page.app-current .dicom-viewport-pro,
html[data-theme="light"] body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewer,
html[data-theme="light"] body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewport{
  background:#020617!important;
  color:#e5edf7!important;
}
html[data-theme="light"] body.viewer-page.app-current .dicom-viewer-side,
html[data-theme="light"] body.viewer-page.app-current .dicom-toolbar-pro,
html[data-theme="light"] body.viewer-page.app-current .viewer-context-panel,
html[data-theme="light"] body.viewer-page.app-current .dicom-toolbar,
html[data-theme="light"] body.viewer-page.app-current.viewer-compare-reading-mode .compare-head,
html[data-theme="light"] body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel,
html[data-theme="light"] body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools,
html[data-theme="light"] body.viewer-page.app-current.viewer-compare-reading-mode .compare-filmstrip{
  background:rgba(8,13,23,.96)!important;
  border-color:rgba(148,163,184,.24)!important;
  color:#e5edf7!important;
}
html[data-theme="light"] body.viewer-page.app-current .dicom-viewport img,
html[data-theme="light"] body.viewer-page.app-current .dicom-viewport-pro img,
html[data-theme="light"] body.viewer-page.app-current.viewer-compare-reading-mode .compare-image-frame img{
  background:#000!important;
}
@media(max-width:760px) and (orientation:portrait){
  html,
  body.viewer-page.app-current{
    width:100dvw!important;
    height:100dvh!important;
    min-width:0!important;
    min-height:0!important;
    overflow:hidden!important;
    background:#020617!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .app-shell,
  body.viewer-page.app-current.viewer-compare-reading-mode .content{
    position:fixed!important;
    inset:0!important;
    width:100dvw!important;
    height:100dvh!important;
    min-width:0!important;
    min-height:0!important;
    padding:0!important;
    margin:0!important;
    overflow:hidden!important;
    transform:none!important;
    transform-origin:center!important;
    background:#020617!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-head,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewer,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-context-panel,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-study-tray,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-filmstrip{
    transform:none!important;
    transform-origin:center!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-head{
    display:none!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-head h1{
    max-width:100%!important;
    font-size:12px!important;
    line-height:1!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-head p,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-head .actions{
    display:none!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewer{
    position:fixed!important;
    inset:0!important;
    width:100dvw!important;
    height:100dvh!important;
    min-width:0!important;
    min-height:0!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-rows:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
    padding:5px 5px calc(54px + env(safe-area-inset-bottom))!important;
    overflow:hidden!important;
    background:#020617!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel{
    min-width:0!important;
    min-height:0!important;
    height:auto!important;
    overflow:hidden!important;
    border-radius:11px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-head{
    min-height:24px!important;
    height:24px!important;
    padding:3px 5px!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:5px!important;
    align-items:center!important;
    overflow:hidden!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-head > div:first-child,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-head span,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-head strong,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-head small{
    min-width:0!important;
    max-width:100%!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-head strong{font-size:10px!important}
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-head span,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-head small{font-size:7px!important}
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-actions{
    display:grid!important;
    grid-template-columns:repeat(2,28px)!important;
    gap:3px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-actions button{
    width:28px!important;
    min-width:28px!important;
    max-width:28px!important;
    height:22px!important;
    min-height:22px!important;
    padding:0!important;
    border-radius:8px!important;
    font-size:0!important;
    display:grid!important;
    place-items:center!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-actions [data-mobile-tool="prev"]::before{content:"ANT"!important;font-size:7px!important}
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-panel-actions [data-mobile-tool="next"]::before{content:"PROX"!important;font-size:7px!important}
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewport{
    height:calc(100% - 24px)!important;
    min-height:0!important;
    border-radius:9px!important;
    background:#000!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-info,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-study-tray,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .viewer-stack-controls,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .compare-target-tools,
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .viewer-tool-sliders{
    display:none!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools{
    position:fixed!important;
    left:50%!important;
    right:auto!important;
    bottom:calc(4px + env(safe-area-inset-bottom))!important;
    width:auto!important;
    max-width:calc(100dvw - 12px)!important;
    padding:4px!important;
    border-radius:14px!important;
    transform:translateX(-50%)!important;
    z-index:150!important;
    overflow:hidden!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .compare-smart-dock{
    display:grid!important;
    grid-template-columns:repeat(6,31px)!important;
    gap:3px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .viewer-dock-tool{
    width:31px!important;
    min-width:31px!important;
    max-width:31px!important;
    height:34px!important;
    min-height:34px!important;
    max-height:34px!important;
    grid-template-rows:15px 9px!important;
    padding:2px 1px!important;
    border-radius:10px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .viewer-dock-tool svg{
    width:13px!important;
    height:13px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools .viewer-dock-tool span::before{
    font-size:7px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-filmstrip{
    display:none!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode.viewer-thumbs-open .compare-filmstrip{
    position:fixed!important;
    left:8px!important;
    right:8px!important;
    bottom:calc(58px + env(safe-area-inset-bottom))!important;
    z-index:146!important;
    display:flex!important;
    gap:7px!important;
    max-height:96px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    padding:8px!important;
    border:1px solid rgba(148,163,184,.30)!important;
    border-radius:15px!important;
    background:rgba(8,13,23,.96)!important;
    box-shadow:0 -18px 42px rgba(0,0,0,.46)!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-context-panel{
    position:fixed!important;
    left:auto!important;
    right:8px!important;
    top:48px!important;
    bottom:auto!important;
    width:min(330px,calc(100dvw - 18px))!important;
    max-height:calc(100dvh - 118px)!important;
    z-index:155!important;
    border-radius:16px!important;
    overflow:auto!important;
  }
}

/* 447L EOF: camada vencedora para viewer mobile esticar ate a dock sem quebrar. */
@media(max-width:760px){
  body.viewer-page.app-current:not(.viewer-compare-reading-mode),
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .app-shell,
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .content{
    position:fixed!important;
    inset:0!important;
    width:100dvw!important;
    height:100dvh!important;
    min-width:0!important;
    min-height:0!important;
    padding:0!important;
    margin:0!important;
    overflow:hidden!important;
    background:#020617!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .viewer-head,
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-info{
    display:none!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewer,
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewer-pro,
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewport-wrap,
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewport-shell{
    position:fixed!important;
    inset:0!important;
    width:100dvw!important;
    height:100dvh!important;
    min-width:0!important;
    min-height:0!important;
    padding:0!important;
    margin:0!important;
    border-radius:0!important;
    overflow:hidden!important;
    background:#020617!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewer,
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewer-pro{
    display:grid!important;
    grid-template-columns:1fr!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewport,
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewport-pro{
    position:absolute!important;
    inset:0!important;
    width:100dvw!important;
    height:100dvh!important;
    min-width:0!important;
    min-height:0!important;
    padding:4px 4px calc(52px + env(safe-area-inset-bottom))!important;
    display:grid!important;
    justify-items:center!important;
    align-items:start!important;
    overflow:hidden!important;
    background:#000!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewport img,
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-viewport-pro img{
    max-width:calc(100dvw - 8px)!important;
    max-height:calc(100dvh - 58px - env(safe-area-inset-bottom))!important;
    object-fit:contain!important;
    transform-origin:top center!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .viewer-mobile-stack-nav{
    position:absolute!important;
    inset:0!important;
    pointer-events:none!important;
    z-index:118!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .viewer-mobile-nav-button{
    pointer-events:auto!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-toolbar-pro{
    position:fixed!important;
    left:50%!important;
    right:auto!important;
    top:auto!important;
    bottom:calc(4px + env(safe-area-inset-bottom))!important;
    width:auto!important;
    max-width:calc(100dvw - 12px)!important;
    min-width:0!important;
    display:block!important;
    padding:4px!important;
    border-radius:14px!important;
    transform:translateX(-50%)!important;
    overflow:hidden!important;
    z-index:150!important;
    background:rgba(8,13,23,.96)!important;
    border:1px solid rgba(148,163,184,.28)!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-toolbar-pro .viewer-stack-controls,
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-toolbar-pro .viewer-tool-sliders{
    display:none!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-toolbar-pro .viewer-smart-dock{
    display:grid!important;
    grid-template-columns:repeat(6,31px)!important;
    gap:3px!important;
    width:auto!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-toolbar-pro .viewer-dock-tool{
    width:31px!important;
    min-width:31px!important;
    max-width:31px!important;
    height:34px!important;
    min-height:34px!important;
    max-height:34px!important;
    display:grid!important;
    grid-template-rows:15px 9px!important;
    place-items:center!important;
    gap:1px!important;
    padding:2px 1px!important;
    border-radius:10px!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-toolbar-pro .viewer-dock-tool svg{
    width:13px!important;
    height:13px!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .dicom-toolbar-pro .viewer-dock-tool span::before{
    font-size:7px!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode) .viewer-context-panel{
    position:fixed!important;
    right:8px!important;
    left:auto!important;
    top:8px!important;
    width:min(330px,calc(100dvw - 16px))!important;
    max-height:calc(100dvh - 72px - env(safe-area-inset-bottom))!important;
    z-index:155!important;
  }
  body.viewer-page.app-current:not(.viewer-compare-reading-mode).viewer-thumbs-open .dicom-viewer-side{
    left:8px!important;
    right:8px!important;
    bottom:calc(48px + env(safe-area-inset-bottom))!important;
    max-height:30dvh!important;
    z-index:146!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-viewer{
    padding:4px 4px calc(50px + env(safe-area-inset-bottom))!important;
    gap:5px!important;
  }
  body.viewer-page.app-current.viewer-compare-reading-mode .compare-bottom-tools{
    bottom:calc(3px + env(safe-area-inset-bottom))!important;
  }
}
