/* The layout engine owns tile geometry at every viewport width. */
body #streams.streams {position:relative;display:block!important;overflow:auto!important;padding:0!important;min-width:0;min-height:0;scrollbar-gutter:stable}
body #streams.streams .stream-card {position:absolute!important;aspect-ratio:auto!important;margin:0!important;min-width:0!important;grid-column:auto!important;grid-row:auto!important;transition:none;container-type:inline-size}
body #streams.streams .stream-frame-wrap {border-radius:inherit}
.ms-player-viewport {position:absolute;left:0;top:0;width:780px;height:440px;transform-origin:top left}
body #streams .ms-player-viewport iframe {position:absolute!important;left:0!important;top:0!important;width:780px!important;height:440px!important;max-width:none!important;border:0!important;transform:none!important}
body #streams .stream-actions {top:50%;left:8px;right:auto!important;transform:translateY(-50%)!important;width:auto;max-width:calc(100% - 16px);max-height:calc(100% - 12px);overflow-y:auto;overscroll-behavior:contain;gap:5px;z-index:12;padding:6px;background:rgba(9,13,20,.9);border:1px solid rgba(255,255,255,.16);border-radius:12px;box-shadow:0 6px 24px #0006;pointer-events:none}
body #streams .stream-card:hover .stream-actions,body #streams .stream-card:focus-within .stream-actions,body #streams .stream-card.controls-open .stream-actions,body #streams .stream-card.is-dragging .stream-actions {opacity:1;pointer-events:auto}
body #streams .stream-actions .stream-label {pointer-events:none;cursor:default;min-height:25px!important;padding:3px 7px!important;font-size:11px!important;border:0!important;background:transparent!important;max-width:220px}
.stream-controls-row {display:flex;flex-direction:column;align-items:stretch;gap:4px;flex-wrap:nowrap;flex-shrink:0}
body #streams .stream-action-btn {width:100%;height:28px!important;min-height:28px!important;padding:4px 7px;font-size:11px;border-radius:7px;font-weight:650;box-shadow:none}
body #streams .stream-action-btn[aria-pressed="true"] {background:var(--accent)!important;border-color:var(--accent)!important;color:#071007!important}
body #streams .stream-action-btn:focus-visible,body #streams .stream-label:focus-visible {outline:2px solid #fff;outline-offset:2px}
.stream-controls-toggle {display:none;position:absolute;left:7px;top:50%;transform:translateY(-50%);z-index:13;width:30px;height:32px;border:1px solid #ffffff50;border-radius:8px;color:white;background:#0b101ae6;font-size:18px}
.stream-audio-unlock {position:absolute;bottom:10px;left:50%;transform:translateX(-50%);z-index:14;border:1px solid #ffffff70;border-radius:8px;padding:7px 10px;color:white;background:#0b101aeb;font-weight:650;cursor:pointer;white-space:nowrap}
@container(max-width:260px){
  .stream-actions .stream-action-label {display:none}
  body #streams .stream-actions .stream-action-btn {flex:0 0 22px;width:22px;min-width:22px;height:22px!important;min-height:22px!important;padding:0!important;display:inline-flex;align-items:center;justify-content:center}
  .stream-controls-row {gap:3px}
  body #streams .stream-actions {padding:4px}
  body #streams .stream-actions .stream-label {display:none!important}
}
@media(hover:none),(pointer:coarse){
  body #streams .stream-controls-toggle {display:block}
  body #streams .stream-actions {opacity:0;left:42px;max-width:calc(100% - 50px)}
  body #streams .stream-card.controls-open .stream-actions {opacity:1;pointer-events:auto}
}

/* Keep the same toolbar available when its chat panel is closed. */
.floating-toolbar{display:none;position:fixed;top:12px;right:12px;z-index:80}
body.chat-panel-hidden:not(.builder-view) .floating-toolbar{display:block}
.floating-toolbar .chat-title-row{margin:0;padding:6px;border:1px solid #ffffff26;border-radius:12px;background:#090d14e6;box-shadow:0 6px 24px #0006}
body.builder-view .floating-toolbar,body.managed-event .floating-toolbar{display:none!important}
#playerToolbar,body #streams .stream-actions,body #streams .stream-controls-toggle{transition:opacity .25s ease}
body.chat-panel-hidden:not(.builder-view):not(.player-controls-visible) #playerToolbar,
body:not(.player-controls-visible) #streams .stream-actions,
body:not(.player-controls-visible) #streams .stream-controls-toggle{opacity:0!important;pointer-events:none!important}
body.player-controls-keyboard #playerToolbar:focus-within,
body.player-controls-keyboard #streams .stream-card:focus-within .stream-actions{opacity:1!important;pointer-events:auto!important}
@media(prefers-reduced-motion:reduce){#playerToolbar,body #streams .stream-actions,body #streams .stream-controls-toggle{transition:none}}
