html:has(#modal[open] #remote-screen-panel) { overflow: hidden; }
#modal:has(#remote-screen-panel) { width: min(1600px, calc(100% - 16px)); max-width: calc(100% - 16px); height: calc(100vh - 16px); height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); overflow: hidden; }
#modal:has(#remote-screen-panel)[open] { display: flex; flex-direction: column; }
#modal:has(#remote-screen-panel) .modal-top { flex: 0 0 auto; padding: 12px 18px; }
#modal-body:has(#remote-screen-panel) { display: flex; flex: 1 1 0; min-height: 0; min-width: 0; padding: 10px 14px; overflow: auto; }
#remote-screen-panel { display: flex; flex-direction: column; flex: 1 1 0; gap: 6px; min-height: 0; min-width: 0; }
#remote-screen-panel > :not(.remote-screen-view) { flex-shrink: 0; overflow-wrap: anywhere; }
#remote-screen-panel p { margin: 0; font-size: 13px; }
#remote-screen-panel label { display: flex; align-items: center; gap: 12px; font-size: 13px; }
#remote-screen-quality { width: auto; min-width: 0; max-width: 100%; margin: 0; padding: 6px 10px; }
#remote-screen-panel .form-actions { flex: 0 0 auto; flex-wrap: wrap; margin: 0; gap: 8px; }
#remote-screen-panel .button { padding: 8px 12px; }
#remote-screen-panel details { font-size: 12px; flex: 0 0 auto; }
#remote-screen-panel summary { cursor: pointer; }
.remote-screen-view { position: relative; flex: 1 1 0; min-height: 64px; min-width: 0; overflow: hidden; background: #162823; border-radius: 8px; }
#remote-screen-image { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; touch-action: none; user-select: none; cursor: default; }
#remote-screen-image:not([src]) { display: none; }
@media(max-width:600px) { #modal-body:has(#remote-screen-panel) { padding: 8px; } #remote-screen-panel label { flex-wrap: wrap; gap: 4px; } }
@media(max-height:600px) { #modal:has(#remote-screen-panel) .modal-top { padding: 5px 10px; } #modal:has(#remote-screen-panel) .modal-top h2 { font-size: 16px; } #modal-body:has(#remote-screen-panel) { padding: 6px 8px; } #remote-screen-panel { gap: 4px; } #remote-screen-panel .button { padding: 5px 8px; } }
