.player-tools{display:flex;flex-wrap:wrap;align-items:end;gap:6px;padding:8px;background:#0d1c2b;border-top:1px solid #294054}.player-tools label{font-size:11px;color:#9bb6cb;margin:0}.player-tools select{font-size:12px;padding:5px;max-width:180px;display:block}.player-tools button,.ptz-panel button{padding:6px 9px;font-size:12px}.zoom-stage{overflow:hidden;position:relative}.zoom-stage video{transition:transform .12s;object-fit:contain}.zoom-stage.zoomed{cursor:crosshair}.zoom-stage:fullscreen{width:100vw;height:100vh;background:#000;display:grid;place-items:center}.zoom-stage:fullscreen video{width:100%;height:100%;max-height:100vh}.ptz-panel{display:flex;flex-wrap:wrap;gap:8px;padding:10px;background:#11283a;font-size:12px}.ptz-panel span{flex-basis:100%;color:#a4c0d1}.wall-tile{min-width:0}.configuration-dialog{width:min(900px,96vw);max-width:900px}.config-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:20px 0}.config-readonly{padding:12px;background:#0b1724;border:1px solid #243a4b;border-radius:6px;overflow-wrap:anywhere}.config-readonly small{display:block;color:#8aabba;font-size:11px;margin-top:5px}@media(max-width:600px){.config-fields{grid-template-columns:1fr}.player-tools select{max-width:150px}}
/* A camera wall is one image surface; controls float above it. */
.wall-grid{gap:0!important;background:#000;border:1px solid #000}
.wall-grid .wall-tile,.wall-grid .wall-empty{border:1px solid #000;border-radius:0;background:#000;position:relative;overflow:hidden}
.wall-tile .wall-picture{position:absolute;inset:0;width:100%;height:100%;background:#000}
.wall-tile .wall-picture video{width:100%;height:100%;max-height:none}
.wall-tile>header{position:absolute;inset:0 0 auto;z-index:3;height:27px;background:linear-gradient(#000b,#0002);font-size:11px;pointer-events:none}
.wall-tile>header button{pointer-events:auto}
.wall-tile .player-tools{position:absolute;z-index:5;bottom:32px;left:0;right:0;max-height:65%;overflow:auto;padding:5px;gap:4px;background:#06101ee8;border:0;opacity:0;visibility:hidden;transition:opacity .15s}
.wall-tile:hover .player-tools,.wall-tile:focus-within .player-tools{opacity:1;visibility:visible}
.wall-tile .ptz-panel{position:absolute;z-index:6;inset:30px 4px auto;background:#06101ef0;max-height:65%;overflow:auto}
.wall-tile .wall-retry{position:absolute;z-index:7;bottom:35%;left:25%}
@media(hover:none){.wall-tile .player-tools{opacity:1;visibility:visible;max-height:40%}}
.schedule-row{display:grid;grid-template-columns:1fr 1fr 1fr 1.4fr 36px;gap:8px;margin:8px 0}.schedule-row input,.schedule-row select{min-width:0;width:100%}.schedule-confirm{display:block;margin:20px 0}@media(max-width:600px){.schedule-row{grid-template-columns:1fr 1fr}.schedule-row button{grid-column:2}}
.wall-tile .wall-picture video{object-fit:var(--wall-fit,contain)}
#schedule-form>label{display:flex;align-items:center;gap:10px;margin:14px 0}#schedule-form>label input[type=checkbox]{width:18px;height:18px;flex:none;margin:0}

/* Mobile-safe immersive wall; no stream is recreated when changing views. */
.player-immersive{position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;height:100dvh!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:#000!important;z-index:10000!important;overflow:hidden!important}
.wall-dialog.player-immersive>.dialog-head,.wall-dialog.player-immersive>.dialog-header,.player-immersive .wall-toolbar,.player-immersive .wall-picker{display:none!important}
.wall-dialog.player-immersive>.dialog-body{padding:0!important;width:100%;height:100%;overflow:hidden;flex:1}
.player-immersive .wall-layout{display:block;height:100%}
.player-immersive .wall-grid{width:100%;height:100%!important;grid-template-columns:repeat(var(--immersive-columns,2),minmax(0,1fr))!important;grid-template-rows:repeat(var(--immersive-rows,2),minmax(0,1fr));grid-auto-rows:minmax(0,1fr)!important;align-content:stretch;gap:0!important;border:0}
.player-immersive .wall-empty{display:none}
.player-immersive .wall-tile{min-height:0;border:.5px solid #000!important}
.player-immersive .wall-tile .player-tools,.player-immersive .wall-tile>header button{display:none!important}
.player-immersive.player-single .wall-grid{grid-template-columns:1fr!important;grid-template-rows:1fr!important}
.player-single .wall-tile:not(.player-focused){display:none!important}
.player-single .player-focused{grid-column:1!important}
.immersive-back{position:absolute;z-index:100;right:max(8px,env(safe-area-inset-right));top:max(8px,env(safe-area-inset-top));background:#071522d9;padding:8px 12px;min-height:40px}
.zoom-stage.player-immersive video{width:100%;height:100%;max-height:none!important;object-fit:contain}
.zoom-stage{touch-action:manipulation}
@media(hover:none){.wall-tile .player-tools{opacity:0;visibility:hidden}.wall-tile:focus-within .player-tools{opacity:1;visibility:visible}}
/* Edge-to-edge mosaic; a focused camera preserves the complete image. */
.player-immersive:not(.player-single) .wall-picture video{object-fit:cover}
.player-immersive.player-single .wall-picture video{object-fit:contain}
