.hql-room-right-stack{display:contents}
/* Keep the custom-room guess panel ahead of scores, including saved pop-out layouts. */
@media(min-width:768px){
 body.hql-custom-room:not(.hql-influencer-room):not(.room-desktop):not(.influencer-stream-view):not(.hql-broadcast-view) #workspace{grid-template-columns:minmax(0,1fr) 290px;grid-template-areas:"summary summary" "answers guess" "answers scores" "answers recent";grid-template-rows:auto auto auto 1fr;align-items:start}
 body.hql-custom-room:not(.hql-influencer-room):not(.room-desktop) [data-panel=summary]{grid-area:summary}
 body.hql-custom-room:not(.hql-influencer-room):not(.room-desktop) [data-panel=answers]{grid-area:answers}
 body.hql-custom-room:not(.hql-influencer-room):not(.room-desktop) [data-panel=recent]{grid-area:recent}
 body.hql-custom-room.room-desktop [data-panel=guess] .panel-handle,body.hql-custom-room.room-desktop [data-panel=scores] .panel-handle{cursor:default;touch-action:auto}
}

@media(min-width:768px){
 body.hql-custom-room.room-desktop:not(.influencer-stream-view):not(.hql-broadcast-view) .hql-room-right-stack{display:flex;flex-direction:column;gap:10px;position:absolute;left:66%;top:17%;width:34%;height:56%;min-height:0;overflow:auto}
 body.hql-custom-room.hql-influencer-room.room-desktop:not(.influencer-stream-view):not(.hql-broadcast-view) .hql-room-right-stack{height:83%}
 body.hql-custom-room.room-desktop:not(.influencer-stream-view):not(.hql-broadcast-view) .hql-room-right-stack>.panel{position:relative!important;inset:auto!important;width:100%!important;height:auto!important;min-height:0;max-height:none;resize:none;box-sizing:border-box;margin:0;overflow:auto}
 body.hql-custom-room.room-desktop:not(.influencer-stream-view):not(.hql-broadcast-view) .hql-room-right-stack>[data-panel=guess]{flex:0 0 auto;overflow:visible}
 body.hql-custom-room.room-desktop:not(.influencer-stream-view):not(.hql-broadcast-view) .hql-room-right-stack>[data-panel=scores]{flex:1 0 100px}
}

/* Bound the roster itself so the heading stays visible while players scroll. */
body.hql-custom-room [data-panel=scores] #scores{max-height:var(--hql-roster-height,900px);overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;scrollbar-gutter:stable;min-height:0}
body.hql-custom-room [data-panel=scores]{max-height:calc(var(--hql-roster-height,900px) + 140px)}
body.hql-custom-room.room-desktop:not(.influencer-stream-view):not(.hql-broadcast-view) .hql-room-right-stack>[data-panel=scores]{max-height:calc(var(--hql-roster-height,900px) + 140px);overflow:hidden;display:flex;flex-direction:column}
body.hql-custom-room.room-desktop .hql-room-right-stack>[data-panel=scores]>.panel-body{display:flex;flex-direction:column;flex:1;min-height:0;overflow:auto}
body.hql-custom-room.room-desktop .hql-room-right-stack>[data-panel=scores] #scores{flex:0 1 auto}
body.hql-custom-room.room-desktop .hql-room-right-stack>[data-panel=scores] #roster-title,body.hql-custom-room.room-desktop .hql-room-right-stack>[data-panel=scores] #rating-note{flex-shrink:0}
