/* SADBOT Stage 2 — one canonical visual layer; all selectors LIVE-only. */
html body.in-live-room #lov-studio-v2{--s2-accent:linear-gradient(135deg,#00D2FF,#10B981)}
html body.in-live-room #lov-studio-v2 :is(#lov-membership-pills,#room-advanced,#room-requests,#room-analytics,#room-stats,.lov-side-actions,#lov-multi-spotlight){display:none!important}
html body.in-live-room #lov-studio-v2 #lov-main-stage{overflow:hidden;isolation:isolate}
html body.in-live-room #lov-studio-v2 #speaker-grid>.room-tile .lov-live-pause-detail{
 position:absolute;inset:0;z-index:16;display:grid;place-content:center;
 padding:10px;background:rgba(5,17,31,.9);text-align:center;font-size:clamp(11px,2vw,18px);
 color:#dbf9ff;font-weight:700;pointer-events:none;
}
html body.in-live-room #lov-studio-v2 #speaker-grid>.room-tile .lov-live-pause-detail[hidden]{display:none!important}
html body.in-live-room #lov-studio-v2 .lov-stage2-youtube-results{display:flex;flex-direction:column;gap:4px;max-height:145px;overflow:auto}
html body.in-live-room #lov-studio-v2 .lov-stage2-youtube-result{
 padding:7px 10px;text-align:left;border:1px solid #3b8999;background:#0c2538;color:#e6faff;border-radius:9px;font-size:12px
}
html body.in-live-room #lov-studio-v2 .lov-stage2-youtube-result:hover{border-color:#00D2FF}
html body.in-live-room #lov-studio-v2 #lov-stage2-combo{
 position:absolute;z-index:65;left:50%;bottom:25%;transform:translateX(-50%);
 max-width:min(92%,420px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
 border:1px solid #00d2ffb5;border-radius:999px;padding:8px 16px;
 background:linear-gradient(135deg,#0c293eea,#112c2eeb);color:#f3ffff;
 box-shadow:0 0 15px #00d2ff27;font-weight:700;pointer-events:none
}
html body.in-live-room #lov-studio-v2.lov-stage2-clean-view #lov-mobile-overlay :is(.lov-mo-top,.lov-mo-bottom,.lov-side-actions){opacity:0!important;visibility:hidden!important;pointer-events:none!important}
html body.in-live-room #lov-studio-v2.lov-stage2-clean-view #lov-chat{opacity:0!important;visibility:hidden!important;pointer-events:none!important}
#modal-root .lov-stage2-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
#modal-root .lov-stage2-summary>div{display:grid;gap:6px;text-align:center;padding:14px 5px;border:1px solid #367a8a;border-radius:12px;background:#102739}
#modal-root .lov-stage2-summary b{font-size:23px;color:#91efff;font-variant-numeric:tabular-nums}
#modal-root .lov-stage2-summary small{font-size:11px;color:#c6e3ea}
#modal-root .lov-stage2-tabs,#modal-root .lov-stage2-guest-tabs{display:flex;flex-wrap:wrap;gap:7px;margin:8px 0}
#modal-root :is([data-stage2-rank-panel],[data-stage2-guest-panel])[hidden]{display:none!important}
@media(max-width:767px){
 html body.in-live-room #lov-studio-v2[data-scene-mode="youtube"] #lov-main-stage{
  display:flex!important;flex-direction:column!important;min-height:0!important
 }
 html body.in-live-room #lov-studio-v2[data-scene-mode="youtube"] #lov-main-stage #lov-watch-party:not([hidden]){
  position:relative!important;inset:auto!important;width:100%!important;height:auto!important;flex:0 0 min(31dvh,56.25vw)!important;
  max-height:31dvh!important;aspect-ratio:16/9!important;order:0!important;z-index:3!important
 }
 html body.in-live-room #lov-studio-v2[data-scene-mode="youtube"] #lov-main-stage #lov-scene-tiles{
  position:relative!important;inset:auto!important;top:auto!important;bottom:auto!important;
  order:1!important;flex:1!important;min-height:0!important;height:auto!important;width:100%!important;
  display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;gap:2px!important
 }
 html body.in-live-room #lov-studio-v2[data-scene-mode="youtube"] #lov-main-stage :is(#lov-seats-slot,#lov-seats-slot>.card,#room-tiles,#speaker-grid){display:contents!important}
 html body.in-live-room #lov-studio-v2[data-scene-mode="youtube"] #speaker-grid>:is(.room-tile,.lov-mode-vacancy){
  position:relative!important;grid-column:var(--lov-slot-col)!important;grid-row:var(--lov-slot-row)!important;
  order:var(--lov-slot-order)!important;min-width:0!important;min-height:0!important;aspect-ratio:auto!important;overflow:hidden!important
 }
 html body.in-live-room #lov-studio-v2[data-scene-mode="multiguest"][data-guest-layout="fixed-panel"] #lov-main-stage #speaker-grid{grid-template-columns:2fr repeat(4,1fr)!important;grid-template-rows:repeat(2,minmax(0,1fr))!important}
 html body.in-live-room #lov-studio-v2[data-scene-mode="multiguest"][data-guest-layout="fixed-panel"] #speaker-grid>.room-tile:first-child{grid-column:1!important;grid-row:1/span 2!important}
 html body.in-live-room #lov-studio-v2[data-scene-mode="multiguest"][data-guest-layout="side-by-side"] #speaker-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(min-width:768px){
 html body.in-live-room #lov-studio-v2[data-scene-mode="youtube"] #lov-main-stage{
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,3fr) minmax(0,2fr)!important;gap:6px!important
 }
 html body.in-live-room #lov-studio-v2[data-scene-mode="youtube"] #lov-main-stage #lov-watch-party:not([hidden]){
  position:relative!important;inset:auto!important;grid-area:1/1!important;width:100%!important;height:100%!important;min-height:0!important
 }
 html body.in-live-room #lov-studio-v2[data-scene-mode="youtube"] #lov-main-stage #lov-scene-tiles{
  position:relative!important;inset:auto!important;grid-area:2/1!important;width:100%!important;height:100%!important;
  min-height:0!important;display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;gap:5px!important
 }
 html body.in-live-room #lov-studio-v2[data-scene-mode="youtube"] #lov-main-stage :is(#lov-seats-slot,#lov-seats-slot>.card,#room-tiles,#speaker-grid){display:contents!important}
 html body.in-live-room #lov-studio-v2[data-scene-mode="youtube"] #speaker-grid>:is(.room-tile,.lov-mode-vacancy){
  grid-column:var(--lov-slot-col)!important;grid-row:var(--lov-slot-row)!important;order:var(--lov-slot-order)!important;
  min-height:0!important;height:100%!important;aspect-ratio:auto!important;min-width:0!important;overflow:hidden!important
 }
}

/* Stage 3 LIVE-only overlays — original cyan/emerald theme retained. */
html body.in-live-room #lov-studio-v2 #lov-stage3-room-hud{position:absolute;z-index:35;left:10px;top:10px;max-width:calc(100% - 20px);display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:5px 9px;border:1px solid #00d2ff80;border-radius:999px;background:#071521dc;color:#e6fcff;font-size:clamp(10px,1.2vw,13px);pointer-events:auto}
html body.in-live-room #lov-studio-v2 #lov-stage3-room-hud img,html body.in-live-room #lov-studio-v2 .lov-stage3-host-tile-hud img{width:25px;height:25px;border-radius:50%;object-fit:cover}
html body.in-live-room #lov-studio-v2 .lov-stage3-host-tile-hud{position:absolute;z-index:14;top:48px;left:8px;display:flex;gap:5px;align-items:center;flex-wrap:wrap;max-width:calc(100% - 16px);background:#081925d9;padding:4px 6px;border-radius:12px;font-size:11px;color:#e7ffff}
html body.in-live-room #lov-studio-v2 .lov-stage3-guest-hud{position:absolute;z-index:18;bottom:38px;left:6px;max-width:calc(100% - 12px);display:flex;gap:5px;align-items:center;flex-wrap:wrap;padding:3px 6px;background:#081925d9;border:1px solid #00d2ff55;border-radius:9px;font-size:11px;color:#e6fcff}
html body.in-live-room #lov-studio-v2 .lov-stage3-speaking .lov-stage3-guest-hud{border-color:#10b981;animation:lov-stage3-speaking 850ms ease-in-out infinite alternate}
@keyframes lov-stage3-speaking{from{box-shadow:0 0 2px #10b98122}to{box-shadow:0 0 13px #10b98199}}
html body.in-live-room #lov-studio-v2 .lov-stage3-top-donor{display:flex;flex-direction:column;align-items:center;gap:1px;padding:2px;background:#081925cd;border-radius:9px;font-size:9px;color:#ecfeff}
html body.in-live-room #lov-studio-v2 .lov-stage3-top-donor img{width:24px;height:24px;border-radius:50%;object-fit:cover;border:1px solid #00d2ff}
html body.in-live-room #lov-studio-v2 .lov-slot-tools{z-index:50!important}
/* Sniper 5.3: keep the admitted GUEST's own media controls above local video.
   Move this tile's buttons below the top-room HUD and mobile viewer capsule;
   do not alter the HOST or moderator control geometry. */
html body.in-live-room #lov-studio-v2 #speaker-grid>.room-tile.local:has([data-action="lov-guest-mic-toggle"])>video.lov-local-mirror{
 pointer-events:none;
}
html body.in-live-room #lov-studio-v2 #speaker-grid>.room-tile.local>.lov-slot-tools:has([data-action="lov-guest-mic-toggle"]){
 position:absolute!important;
 top:54px!important;right:8px!important;
 display:flex!important;align-items:center;justify-content:flex-end;gap:6px;
 z-index:100!important;pointer-events:auto!important;
}
html body.in-live-room #lov-studio-v2 #speaker-grid>.room-tile.local>.lov-slot-tools:has([data-action="lov-guest-mic-toggle"])>button{
 position:relative;z-index:1;pointer-events:auto!important;
 min-width:36px;min-height:36px;
}
@media(max-width:767px){
 html body.in-live-room #lov-studio-v2 #speaker-grid>.room-tile.local>.lov-slot-tools:has([data-action="lov-guest-mic-toggle"]){
  /* SHOP occupies the upper-right 79–115px touch area at 390x844.
     Keep Guest media controls below that action rather than masking SHOP. */
  top:128px!important;
 }
 /* Keep the HOST's existing SOLO controls below the mobile header and SHOP. */
 html body.in-live-room #lov-studio-v2 #lov-main-stage[data-layout="solo"] #speaker-grid>.lov-host-tile.local>.lov-slot-tools{
  position:absolute!important;top:calc(128px + env(safe-area-inset-top,0px));bottom:auto;right:8px;
 }
}
html body.in-live-room #lov-studio-v2 .lov-stage3-pause-button{background:linear-gradient(135deg,#00d2ff,#10b981);color:#071521;border-radius:9px;border:0;padding:6px 9px;font-weight:700;font-size:11px;white-space:nowrap}
html body.in-live-room #lov-studio-v2 #lov-stage3-room-pause:not([hidden]){position:absolute;z-index:40;inset:0;background:#05121de8;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;text-align:center;padding:22px;color:#eaffff;font-size:clamp(14px,2vw,22px)}
html body.in-live-room #lov-studio-v2 #lov-stage3-room-pause[hidden]{display:none!important}
html body.in-live-room #lov-studio-v2 #lov-stage3-room-pause>span{font-size:48px}
@media(max-width:767px){html body.in-live-room #lov-studio-v2 #lov-stage3-room-hud{top:6px;left:6px;max-width:calc(100% - 12px);border-radius:12px;font-size:10px;padding:4px 6px}html body.in-live-room #lov-studio-v2 .lov-stage3-host-tile-hud{top:75px;font-size:9px}html body.in-live-room #lov-studio-v2 .lov-stage3-guest-hud{font-size:9px;bottom:32px}html body.in-live-room #lov-studio-v2 .lov-stage3-pause-button{font-size:10px;padding:6px}}

/* Cross-room PK overlays a second video without remounting the local SOLO track. */
html body.in-live-room #lov-studio-v2 #lov-main-stage[data-pk-opponent="true"] #lov-scene-tiles {
 width:50%!important;
 right:50%!important;
}
html body.in-live-room #lov-studio-v2 #lov-main-stage #lov-pk1v1-opponent {
 position:absolute;
 inset:0 0 0 50%;
 width:50%;
 height:100%;
 object-fit:cover;
 background:#09090d;
 pointer-events:none;
}

/* Show only the HUD for the active LIVE layout. */
html body.in-live-room #lov-studio-v2 :is(#lov-stage3-room-hud,.lov-stage3-host-tile-hud)[hidden]{display:none!important}
