
*{box-sizing:border-box}
body.stream-workspace{margin:0;min-height:100%;background:#eef0ec;color:#171a1f;font-family:"Segoe UI",Arial,sans-serif}
body.stream-workspace{min-height:100vh;overflow:hidden}
.container{position:relative;width:100%;height:100vh;min-height:0;padding:0;background:#eef0ec;overflow:hidden}
.grid{position:relative;width:100%;height:100%;min-height:0;background:#f7f8f5;box-shadow:inset 0 0 0 1px #d1d5cc;overflow:hidden}
.empty{position:absolute;left:50%;top:50%;z-index:0;width:min(720px,calc(100% - 48px));padding:34px;transform:translate(-50%,-50%);text-align:center;color:#747b70;border:1px dashed #b8beb3;border-radius:12px;background:#fff}
.client{position:absolute;display:flex;flex-direction:column;width:720px;height:500px;min-width:300px;min-height:230px;background:#fff;border:1px solid #bfc5b9;border-radius:10px;overflow:hidden;box-shadow:0 9px 28px rgba(38,46,28,.18);touch-action:none}
.client.active-window{border-color:#8ba833;box-shadow:0 12px 34px rgba(72,88,29,.25)}
.header{height:42px;flex:0 0 42px;display:flex;align-items:center;gap:9px;padding:0 9px 0 13px;background:#f4f5f2;border-bottom:1px solid #d8dbd4;color:#171a1f;font-size:14px;font-weight:650;cursor:move;user-select:none}
.live-dot{width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:#53a621;box-shadow:0 0 0 3px rgba(83,166,33,.13)}
.client-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.window-controls{display:flex;gap:5px;margin-left:auto}
.layer-button{width:29px;height:29px;padding:0;border:1px solid #bfc5b9;border-radius:6px;background:#fff;color:#59624f;font-size:16px;font-weight:700;line-height:1;cursor:pointer}
.layer-button:hover{border-color:#8ba833;background:#eef4dd;color:#637824}
.video-wrap{position:relative;flex:1 1 auto;min-height:0;width:100%;background:#000;overflow:hidden}
.screen{display:block;width:100%;height:100%;object-fit:contain;background:#000}
.actions{display:flex;gap:8px;flex:0 0 45px;padding:7px 10px;background:#fff;border-top:1px solid #d8dbd4}
.fullscreen-button{flex:1 1 auto;min-width:0;height:30px;padding:0 8px;border:1px solid #bfc5b9;border-radius:6px;background:#f4f5f2;color:#242821;font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;transition:.14s}
.fullscreen-button:hover{background:#e9eedf;border-color:#8ba833}
.pip-button{flex:0 0 auto}
.viewer-button{flex:0 0 auto}
.pip-button[aria-pressed="true"]{background:#e9eedf;border-color:#8ba833}
.pip-button:disabled{opacity:.6;cursor:wait}
.action-status{position:absolute;left:10px;right:10px;bottom:50px;z-index:40;padding:9px 12px;border-radius:6px;background:rgba(17,19,23,.9);color:#fff;font-size:13px;pointer-events:none}
.resize-handle{position:absolute;z-index:30}
.resize-n,.resize-s{left:12px;right:12px;height:8px;cursor:ns-resize}.resize-n{top:0}.resize-s{bottom:0}
.resize-e,.resize-w{top:12px;bottom:12px;width:8px;cursor:ew-resize}.resize-e{right:0}.resize-w{left:0}
.resize-ne,.resize-nw,.resize-se,.resize-sw{width:16px;height:16px}.resize-ne{right:0;top:0;cursor:nesw-resize}.resize-nw{left:0;top:0;cursor:nwse-resize}.resize-se{right:0;bottom:0;cursor:nwse-resize}.resize-sw{left:0;bottom:0;cursor:nesw-resize}
.resize-se:after{content:"";position:absolute;right:3px;bottom:3px;width:7px;height:7px;border-right:2px solid #8ba833;border-bottom:2px solid #8ba833}
.client:fullscreen{position:fixed!important;inset:0!important;width:100vw!important;height:100vh!important;border:0;border-radius:0;background:#000;transform:none!important}
.client:fullscreen .header,.client:fullscreen .actions,.client:fullscreen .resize-handle{display:none!important}
.client:fullscreen .video-wrap{width:100vw;height:100vh;display:flex;align-items:center;justify-content:center;background:#000}
.client:fullscreen .screen{width:100vw;height:100vh;aspect-ratio:auto;object-fit:contain}
.client:-webkit-full-screen{width:100vw!important;height:100vh!important;border:0;border-radius:0;background:#000}
.client:-webkit-full-screen .header,.client:-webkit-full-screen .actions,.client:-webkit-full-screen .resize-handle{display:none!important}
.client:-webkit-full-screen .video-wrap,.client:-webkit-full-screen .screen{width:100vw;height:100vh;object-fit:contain;background:#000}
.mobile-fullscreen-exit{display:none;position:absolute;right:12px;top:12px;z-index:50;width:44px;height:44px;border:1px solid rgba(255,255,255,.55);border-radius:9px;background:rgba(17,19,23,.72);color:#fff;font-size:28px;line-height:1;cursor:pointer}
.client.mobile-fullscreen{position:fixed!important;inset:0!important;z-index:5000!important;width:100vw!important;height:100vh!important;height:100dvh!important;border:0;border-radius:0;background:#000;transform:none!important}
.client.mobile-fullscreen .header,.client.mobile-fullscreen .actions,.client.mobile-fullscreen .resize-handle{display:none!important}
.client.mobile-fullscreen .video-wrap{width:100vw;height:100vh;height:100dvh;display:flex;align-items:center;justify-content:center;background:#000}
.client.mobile-fullscreen .screen{width:100vw;height:100vh;height:100dvh;aspect-ratio:auto;object-fit:contain}
.client.mobile-fullscreen .mobile-fullscreen-exit{display:block}
body.mobile-fullscreen-open{overflow:hidden!important}
@media(max-width:650px){
  body.stream-workspace{height:auto;min-height:100%;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch}
  body.stream-workspace{min-height:100vh;min-height:100dvh}
  .container{height:auto;min-height:100vh;min-height:100dvh;overflow:visible}
  .grid{display:flex;flex-direction:column;gap:12px;width:100%;height:auto;min-height:100vh;min-height:100dvh;padding:0;overflow:visible}
  .empty{position:static;width:100%;margin:auto;transform:none}
  .client{position:relative!important;left:auto!important;top:auto!important;width:100%!important;height:auto!important;min-width:0;min-height:0;flex:0 0 auto;touch-action:auto}
  .client .header{cursor:default}
  .client .video-wrap{flex:none;width:100%;height:auto;aspect-ratio:16/9}
  .client .screen{width:100%;height:100%;aspect-ratio:auto}
  .client .resize-handle,.client .window-controls{display:none}
}

body.stream-workspace{height:100dvh;min-height:0;overflow:hidden}
.stream-workspace .grid{height:100%;min-height:0;background:transparent;box-shadow:none;isolation:isolate}
@media(min-width:651px){.stream-workspace .client{min-width:min(300px,100%);min-height:min(230px,100%)}}
@media(max-width:650px){.stream-workspace .grid{overflow-x:hidden;overflow-y:auto}}
.stream-workspace .stream-stage{width:100%}
.stream-error{position:fixed;bottom:12px;left:12px;z-index:10;max-width:calc(100% - 24px);padding:10px 14px;border-radius:8px;background:#fff0ee;color:#ab3636;font-size:13px}
