/* Speaker keeps the left half; other participants fit inside the right half.
   Narrow stages stack the same two areas without horizontal scrolling. */
#conferenceV255.is-half-speaker-v360:not(.is-minimised):not(.has-screen-stage-v267)>[data-conference-grid]{display:block!important;position:relative!important;overflow:hidden!important;padding:0!important;min-width:0;min-height:0;align-self:stretch}
#conferenceV255.is-half-speaker-v360:not(.is-minimised):not(.has-screen-stage-v267)>[data-conference-grid]>[data-speaker-role-v360]{position:absolute!important;inset:auto!important;left:var(--speaker-left-v360)!important;top:var(--speaker-top-v360)!important;width:var(--speaker-width-v360)!important;height:var(--speaker-height-v360)!important;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;margin:0!important;grid-row:auto!important;grid-column:auto!important;aspect-ratio:auto!important}
#conferenceV255.is-half-speaker-v360 [data-speaker-role-v360=main]{outline:2px solid #6fa9d4;outline-offset:-2px}

/* The full-window stage must not inherit the original 55vh compact-call cap
   when leaving native fullscreen clears is-expanded-v262. */
#conferenceV255:not(.is-minimised)>[data-conference-grid]{max-height:none}
#conferenceV255.is-grid-view-v366:not(.is-minimised):not(.has-screen-stage-v267)>[data-conference-grid]{display:grid!important;grid-template-columns:repeat(var(--grid-columns-v366,1),minmax(0,1fr))!important;grid-template-rows:repeat(var(--grid-rows-v366,1),minmax(var(--grid-min-row-v366,0px),1fr))!important;grid-auto-rows:minmax(0,1fr)!important;align-content:stretch;align-items:stretch;justify-items:stretch;overflow:auto!important}
#conferenceV255.is-grid-view-v366:not(.is-minimised):not(.has-screen-stage-v267)>[data-conference-grid]>[data-participant]{min-width:0;min-height:0!important;width:100%;height:100%;grid-column:auto!important;grid-row:auto!important;aspect-ratio:auto;order:0}

/* Fit the complete camera frame in every tile; tile geometry must never crop faces. */
#conferenceV255.is-box-pair-v293:not(.is-mobile-pair-v356):not(.is-minimised):not(.has-screen-stage-v267)>[data-conference-grid]>[data-box-role-v293=main]>video,
#conferenceV255.is-grid-view-v366:not(.is-minimised):not(.has-screen-stage-v267)>[data-conference-grid]>[data-participant]>video,
#conferenceV255.is-half-speaker-v360:not(.is-minimised):not(.has-screen-stage-v267)>[data-conference-grid]>[data-participant]>video{object-fit:contain!important;object-position:50% 50%}
#conferenceV255.is-grid-view-v366:not(.is-minimised):not(.has-screen-stage-v267)>[data-conference-grid]{grid-template-columns:repeat(var(--grid-tracks-v369,2),minmax(0,1fr))!important}
#conferenceV255.is-grid-view-v366:not(.is-minimised):not(.has-screen-stage-v267)>[data-conference-grid]>[data-grid-position-v369]{grid-column:var(--grid-start-v369,1)/span 2!important;grid-row:var(--grid-row-v369,1)!important}

/* Preserve branded frames in every view, including mobile overlays and share thumbnails. */
#conferenceV255.is-box-pair-v293:not(.is-mobile-pair-v356):not(.is-minimised):not(.has-screen-stage-v267)>[data-conference-grid]>[data-box-role-v293=main].has-background-logo-v370>video,
#conferenceV255.is-grid-view-v366:not(.is-minimised):not(.has-screen-stage-v267)>[data-conference-grid]>[data-participant].has-background-logo-v370>video,
#conferenceV255.is-half-speaker-v360:not(.is-minimised):not(.has-screen-stage-v267)>[data-conference-grid]>[data-participant].has-background-logo-v370>video,
#conferenceV255.has-screen-stage-v267 [data-participant].has-background-logo-v370>video,
#conferenceV255.is-mobile-pair-v356 [data-participant].has-background-logo-v370>video,
#conferenceV255:not(.is-minimised) [data-conference-grid]>[data-participant].has-background-logo-v370>video{object-fit:contain!important;object-position:50% 0%!important;background:#102b40}

/* Camera bounds follow the tile, including narrow popups and mobile self-view. */
#conferenceV255:not(.is-minimised)>[data-conference-grid]>[data-participant]>video{width:100%!important;height:100%!important;min-width:0;min-height:0;max-width:100%!important;max-height:100%!important;object-fit:contain!important}

/* Layout contract v372: complete camera frames; distinct Box, Grid and Speaker geometry. */

#conferenceV255.has-box-seats:not(.is-minimised):not(.has-screen-stage-v267)>[data-conference-grid]{
 display:grid!important;grid-template-columns:repeat(var(--box-columns),minmax(0,1fr))!important;
 grid-template-rows:var(--box-rows)!important;gap:8px!important;padding:12px!important;align-content:stretch;
}
#conferenceV255.has-box-seats:not(.is-minimised):not(.has-screen-stage-v267)>[data-conference-grid]>[data-participant]{
 grid-column:var(--box-column)!important;grid-row:var(--box-row)!important;
 width:100%!important;height:100%!important;min-width:0;min-height:0!important;max-height:none!important;aspect-ratio:auto;
}
#conferenceV255:not(.is-minimised):not(.has-screen-stage-v267)>[data-conference-grid]>.is-speaking-camera{
 outline:2px solid #57aaff!important;outline-offset:-2px;
}

/* Paint the speaking rim above the camera surface, including accelerated video. */
#conferenceV255.has-box-seats > [data-conference-grid] > [data-participant].is-speaking-camera::after{
 content:"";position:absolute;inset:0;box-sizing:border-box;border:3px solid #57aaff;
 border-radius:inherit;z-index:8;pointer-events:none;
}
