/* Canonical LIVE geometry. Normal declarations use explicit room, viewport and component selectors. Only hidden-state invariants retain priority. */
html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport] {
 box-sizing:border-box;min-width:0;min-height:0;
}
#lov-live-sidebar[hidden]{display:none!important}
html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport="desktop"]{
 position:fixed;inset:var(--live-gap);margin:0;
 width:auto;height:auto;max-width:none;
 max-height:calc(var(--lov-viewport-height,100dvh) - 2 * var(--live-gap));
 aspect-ratio:auto;display:grid;
 grid-template-columns:minmax(0,1fr) clamp(280px,29vw,380px);
 grid-template-rows:minmax(0,1fr);gap:var(--live-gap);
 padding:0;background:var(--live-background);border:0;border-radius:var(--space-4);
 overflow:hidden;
}
html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport="desktop"] #lov-main-stage{
 position:relative;inset:auto;grid-column:1;grid-row:1;
 width:100%;height:100%;min-width:0;min-height:0;
 max-width:none;max-height:none;aspect-ratio:auto;
 display:block;margin:0;border-radius:var(--space-4);overflow:hidden;
}
#lov-live-sidebar{
 grid-column:2;grid-row:1;min-width:0;min-height:0;position:relative;overflow:hidden;
 background:var(--live-sidebar-background);border:1px solid var(--live-sidebar-border);border-radius:var(--space-4);
}
html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport="desktop"] #lov-live-sidebar #lov-mobile-overlay{
 position:relative;inset:auto;width:100%;height:100%;
 display:grid;grid-template-columns:minmax(0,1fr);
 grid-template-rows:auto minmax(0,1fr) auto;gap:var(--space-3);
 padding:var(--space-4);box-sizing:border-box;pointer-events:auto;overflow:hidden;
}
html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport="desktop"] #lov-live-sidebar .lov-mo-top{
 position:static;inset:auto;width:100%;max-width:none;
 display:flex;flex-wrap:wrap;gap:var(--space-3);padding:0;
}
html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport="desktop"] #lov-live-sidebar :is(.lov-mo-host-stack,.lov-mo-right){max-width:100%;flex-wrap:wrap}
html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport="desktop"] #lov-live-sidebar #lov-chat{
 position:relative;inset:auto;grid-column:1;grid-row:2;
 width:100%;height:100%;min-height:0;max-height:none;max-width:none;
 display:flex;flex-direction:column;padding:0;margin:0;
 opacity:1;visibility:visible;pointer-events:auto;overflow:hidden;
 background:transparent;mask-image:none;-webkit-mask-image:none;
}
html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport="desktop"] #lov-live-sidebar :is(#lov-chat-slot,.room-chat){
 display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;height:100%;max-height:none;overflow:hidden;
}
html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport="desktop"] #lov-live-sidebar #room-lines{
 flex:1;min-height:0;height:auto;max-height:none;overflow-y:auto;
 mask-image:none;-webkit-mask-image:none;overscroll-behavior:contain;
}
html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport="desktop"] #lov-live-sidebar .lov-mo-bottom{
 position:static;inset:auto;grid-column:1;grid-row:3;
 width:100%;height:auto;display:flex;flex-wrap:wrap;
 gap:10px;align-items:center;padding:0;margin:0;pointer-events:auto;
}
html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport="desktop"] #lov-live-sidebar .lov-mo-shortcuts{
 display:flex;flex-direction:row;flex:1 1 auto;align-items:center;flex-wrap:wrap;gap:var(--space-2);width:auto;
}
html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport="desktop"] #lov-live-sidebar .lov-hud-viewer-compose{
 position:static;inset:auto;display:block;order:2;
 width:100%;max-width:none;flex:1 0 100%;padding:0;margin:0;
}
#lov-live-sidebar .chat-send{display:flex;gap:var(--space-2);width:100%;box-sizing:border-box}
#lov-live-sidebar .chat-send textarea{flex:1;min-width:0;max-height:8em;resize:vertical}
#lov-live-sidebar .lov-mo-round,#lov-live-sidebar .lov-unified-more{
 display:grid;place-items:center;flex:0 0 40px;
 width:40px;height:40px;min-height:40px;min-width:40px;
 padding:var(--space-2);margin:0;border:1px solid var(--live-control-border);border-radius:var(--space-3);
 background:var(--live-control-background);color:var(--live-control-text);
}
#lov-live-sidebar .lov-unified-more svg{width:20px;height:20px}
#lov-live-sidebar :is(.lov-unified-modes-menu,.lov-unified-drawer,.lov-mo-more){
 position:absolute;inset:var(--space-3);width:auto;max-width:none;
 max-height:calc(100% - 24px);overflow-y:auto;z-index:200;
 padding:var(--space-4);border:1px solid var(--live-dialog-border);border-radius:var(--space-3);background:var(--live-dialog-background);color:var(--live-dialog-text);
 pointer-events:auto;box-sizing:border-box;
}
#lov-live-sidebar :is(.lov-unified-drawer-scrim,.lov-mo-sheet-scrim){position:absolute;inset:0;background:#0009;z-index:190;pointer-events:auto}
#lov-live-sidebar :is(.lov-unified-modes-menu,.lov-unified-drawer,.lov-mo-more,.lov-unified-drawer-scrim,.lov-mo-sheet-scrim)[hidden]{display:none!important}
#lov-live-sidebar .lov-unified-mode-tiles{grid-template-columns:1fr}
#lov-live-sidebar .lov-unified-mode-tile{min-height:72px}
#lov-live-sidebar :is(.lov-mo-toast,.lov-mo-like-pop){position:absolute;pointer-events:none}
html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport="desktop"][data-unified-mode="youtube"] #lov-main-stage{
 display:grid;grid-template-columns:minmax(0,1fr);
 grid-template-rows:minmax(0,3fr) minmax(0,2fr);gap:var(--space-2);
}
html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport="desktop"][data-unified-mode="youtube"] #lov-main-stage #lov-watch-party{
 position:relative;inset:auto;grid-row:1;grid-column:1;
 width:100%;height:100%;min-height:0;transform:none;padding:0;
}
html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport="desktop"][data-unified-mode="youtube"] #lov-main-stage #lov-scene-tiles{
 position:relative;inset:auto;grid-row:2;grid-column:1;
 width:100%;height:100%;max-height:none;min-height:0;
}
html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport="desktop"] #lov-main-stage #speaker-grid>.room-tile video{object-fit:contain}
html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport="mobile"]{
 top:var(--lov-viewport-top,0px);bottom:auto;
 width:100%;height:var(--lov-viewport-height,100dvh);max-height:var(--lov-viewport-height,100dvh);
}
html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport="mobile"] #lov-main-stage{height:100%;max-height:100%}
/* Header/footer measurements replace the old fixed 180px/115px reservations. */
html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport="mobile"][data-unified-mode="youtube"] #lov-main-stage #lov-watch-party{
 top:calc(var(--lov-mobile-header,60px) + 8px);
 height:28%;max-height:28%;
}
html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport="mobile"][data-unified-mode="youtube"] #lov-main-stage #lov-scene-tiles{
 top:calc(var(--lov-mobile-header,60px) + 28% + 24px);
 bottom:calc(var(--lov-mobile-footer,60px) + 20%);
}
html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport="mobile"][data-unified-mode="youtube"] #lov-chat{
 bottom:calc(var(--lov-mobile-footer,60px) + 8px);
 height:18%;max-height:18%;
}
html body.in-live-room #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport] .lov-unified-mode-tiles{grid-template-columns:repeat(3,minmax(0,1fr))}
html body.in-live-room #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport] .lov-unified-mode-tile{min-width:0;overflow-wrap:anywhere}
@media(max-height:500px) and (max-width:767px){
 html body.in-live-room #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport="mobile"] .lov-unified-mode-tile{min-height:44px}
}

/* Short landscape phones place Watch Party and guests side by side. */
@media(max-height:500px) and (max-width:767px){
 html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport="mobile"][data-unified-mode="youtube"] #lov-main-stage #lov-watch-party{
  top:calc(var(--lov-mobile-header,60px) + 8px);bottom:calc(var(--lov-mobile-footer,60px) + 20%);
  left:8px;right:auto;width:53%;height:auto;max-height:none;
 }
 html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport="mobile"][data-unified-mode="youtube"] #lov-main-stage #lov-scene-tiles{
  top:calc(var(--lov-mobile-header,60px) + 8px);left:calc(53% + 16px);right:8px;
 }
}

#lov-live-sidebar .lov-watch-youtube-form{
 position:static;inset:auto;display:flex;flex:1 0 100%;order:-1;
 width:100%;min-width:0;gap:var(--space-2);align-items:end;
}
#lov-live-sidebar .lov-watch-youtube-form[hidden]{display:none!important}
#lov-live-sidebar .lov-watch-youtube-form label{display:grid;flex:1;min-width:0;gap:var(--space-1);font-size:var(--font-size-sm)}
#lov-live-sidebar .lov-watch-youtube-form input{width:100%;min-width:0;box-sizing:border-box}
#lov-live-sidebar .lov-watch-youtube-form button{min-height:40px}

.lov-cinema-video{width:100%}
.lov-guest-settings-form > button[type="submit"]{width:100%}

/* The emoji control occupies its own flex slot; it cannot cover Send. */
html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport] .lov-hud-viewer-compose .chat-send{flex-wrap:nowrap}
html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-unified-mode][data-live-viewport] .lov-hud-viewer-compose .lov-chat-emoji-toggle{
 position:static;inset:auto;transform:none;flex:0 0 32px;width:32px;height:32px;
}


/* STAGE4_SOLO_PORTRAIT: maximize 9:16 video inside available desktop stage. */
html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-live-viewport="desktop"][data-unified-mode="solo"][data-layout="solo"] #speaker-grid {
    container-type:size;
}
html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room.lov-mobile-layered[data-live-viewport="desktop"][data-unified-mode="solo"][data-layout="solo"] #speaker-grid>.lov-host-tile {
    width:min(100cqw,56.25cqh)!important;
    height:min(100cqh,177.777778cqw)!important;
    aspect-ratio:9/16!important;
    max-width:100%!important;
    max-height:100%!important;
    place-self:center;
    position:relative;
}

/* STAGE4_POINT14_390x844 */
@media (max-width: 430px) {
  html body.in-live-room.lov-mo-live #main #lov-studio-v2[data-unified-mode="solo"] .lov-host-tile,
  html body.in-live-room.lov-mo-live #main #lov-studio-v2[data-layout="solo"] .lov-host-tile {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100dvh;
  }
  html body.in-live-room.lov-mo-live #main #lov-studio-v2[data-unified-mode="solo"] .lov-host-tile :is(video, img),
  html body.in-live-room.lov-mo-live #main #lov-studio-v2[data-layout="solo"] .lov-host-tile :is(video, img) {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  html body.in-live-room.lov-mo-live #main #lov-studio-v2[data-unified-mode="solo"] .lov-host-tile :is(.lov-tile-name, .lov-tile-diamonds, .lov-tile-badge, .lov-tile-role),
  html body.in-live-room.lov-mo-live #main #lov-studio-v2[data-layout="solo"] .lov-host-tile :is(.lov-tile-name, .lov-tile-diamonds, .lov-tile-badge, .lov-tile-role) {
    display: none;
  }
  html body.in-live-room.lov-mo-live #main #lov-studio-v2[data-scene-mode="multiguest"] #speaker-grid {
    position: fixed;
    left: 8px;
    top: 96px;
    width: calc(100% - 16px);
    height: 488px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 160px);
    gap: 4px;
  }
  html body.in-live-room.lov-mo-live #main #lov-studio-v2[data-scene-mode="multiguest"] #speaker-grid .room-tile :is(.lov-tile-role, .room-role-badge, .lov-seat-role) {
    display: none;
  }
  html body.in-live-room.lov-mo-live #main #lov-studio-v2[data-scene-mode="multiguest"] #speaker-grid .room-tile .lov-tile-name {
    position: absolute;
    left: 6px;
    bottom: 24px;
    max-width: 145px;
    font-size: 12px;
    font-weight: 600;
  }
  html body.in-live-room.lov-mo-live #main #lov-studio-v2[data-scene-mode="multiguest"] #speaker-grid .room-tile :is(.lov-tile-points, .lov-tile-diamonds) {
    position: absolute;
    left: 6px;
    bottom: 4px;
    max-width: 120px;
    font-size: 11px;
  }
  html body.in-live-room.lov-mo-live #lov-mobile-overlay .lov-mo-host-stack {
    position: fixed;
    left: 8px;
    top: 8px;
    width: 212px;
    height: 40px;
  }
  html body.in-live-room.lov-mo-live #lov-mobile-overlay .lov-mo-avatar {
    position: fixed;
    left: 12px;
    top: 12px;
    width: 32px;
    height: 32px;
  }
  html body.in-live-room.lov-mo-live #lov-mobile-overlay .lov-mo-host-text strong {
    position: fixed;
    left: 50px;
    top: 12px;
    max-width: 112px;
    font-size: 13px;
  }
  html body.in-live-room.lov-mo-live #lov-mobile-overlay .lov-hud-vip {
    position: fixed;
    left: 166px;
    top: 16px;
    width: 50px;
    height: 24px;
  }
  html body.in-live-room.lov-mo-live #lov-mobile-overlay .lov-hud-vip::after {
    content: "";
    position: absolute;
    inset: -8px -2px;
  }
  html body.in-live-room.lov-mo-live #lov-mobile-overlay [data-overlay-daily] {
    position: fixed;
    left: 8px;
    top: 54px;
    width: 104px;
    height: 28px;
  }
  html body.in-live-room.lov-mo-live #lov-mobile-overlay [data-overlay-goal] {
    position: fixed;
    left: 118px;
    top: 54px;
    width: 138px;
    height: 28px;
  }
  html body.in-live-room.lov-mo-live #lov-mobile-overlay :is(.lov-mo-host-level, .lov-hud-guild, .lov-mo-like-count) {
    display: none;
  }
  html body.in-live-room.lov-mo-live #lov-mobile-overlay .lov-mo-right {
    position: fixed;
    left: 226px;
    top: 8px;
    width: 156px;
    height: 40px;
  }
  html body.in-live-room.lov-mo-live #lov-mobile-overlay .lov-mo-viewers {
    position: fixed;
    left: 226px;
    top: 14px;
    width: 84px;
    height: 28px;
  }
  html body.in-live-room.lov-mo-live #lov-mobile-overlay .lov-hud-share-top {
    position: fixed;
    left: 316px;
    top: 14px;
    width: 28px;
    height: 28px;
  }
  html body.in-live-room.lov-mo-live #lov-mobile-overlay .lov-hud-share-top::after,
  html body.in-live-room.lov-mo-live #lov-mobile-overlay .lov-mo-exit::after {
    content: "";
    position: absolute;
    inset: -6px -4px;
  }
  html body.in-live-room.lov-mo-live #lov-mobile-overlay .lov-mo-exit {
    position: fixed;
    left: 354px;
    top: 14px;
    width: 28px;
    height: 28px;
  }
  html body.in-live-room.lov-mo-live #lov-chat {
    position: fixed;
    left: 8px;
    top: 560px;
    width: 310px;
    max-height: calc(100dvh - 560px - 68px - env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 4px;
    font-size: 13px;
    line-height: 18px;
    padding: 4px 8px;
  }
  html body.in-live-room.lov-mo-live #lov-studio-v2[data-scene-mode="multiguest"] #lov-chat {
    top: 592px;
    width: calc(100% - 16px);
    max-height: calc(100dvh - 592px - 68px - env(safe-area-inset-bottom, 0px));
  }
  html body.in-live-room.lov-mo-live #lov-mobile-overlay .lov-mo-bottom {
    position: fixed;
    left: 8px;
    width: calc(100% - 16px);
    height: 48px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: center;
    gap: 8px;
  }
  html body.in-live-room.lov-mo-live #lov-mobile-overlay #lov-chat-editor,
  html body.in-live-room.lov-mo-live #lov-mobile-overlay .lov-chat-editor {
    width: 258px;
    height: 40px;
  }
  html body.in-live-room.lov-mo-live #lov-mobile-overlay form[data-form="room-chat"] button[type="submit"],
  html body.in-live-room.lov-mo-live #lov-mobile-overlay .chat-send {
    position: relative;
    width: 48px;
    height: 40px;
  }
  html body.in-live-room.lov-mo-live #lov-mobile-overlay .lov-mo-more-trigger {
    position: relative;
    width: 52px;
    height: 40px;
  }
  html body.in-live-room.lov-mo-live #lov-mobile-overlay form[data-form="room-chat"] button[type="submit"]::after,
  html body.in-live-room.lov-mo-live #lov-mobile-overlay .lov-mo-more-trigger::after {
    content: "";
    position: absolute;
    inset: -4px -2px;
  }
  html body.in-live-room.lov-mo-live #lov-mobile-overlay .lov-mo-shortcuts > button:not(.lov-mo-more-trigger):not(.lov-mo-request-seat) {
    display: none;
  }
}
/* STAGE4_NO_BUTTON_OVERLAP_390 */
@media (max-width: 430px) {
  html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room #lov-main-stage #lov-mobile-overlay .lov-mo-right :is(.lov-unified-ranking, .lov-unified-stats-trigger),
  html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room #lov-main-stage #lov-mobile-overlay .lov-mo-bottom :is(.lov-love-share-trigger, .lov-unified-gift, .lov-unified-more) {
    display: none;
  }
  html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room #lov-main-stage #lov-mobile-overlay .lov-mo-bottom .lov-hud-viewer-compose {
    flex: 0 0 314px;
    width: 314px;
    max-width: 314px;
    z-index: 80;
  }
  html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-clean-room #lov-main-stage #lov-mobile-overlay .lov-mo-bottom .lov-mo-more-trigger {
    margin-left: auto;
    z-index: 80;
  }
}