/* Screen 5: existing lobby palette and navigation; current server room is authoritative. */
body #home:not(.game-active) #lobbyFriendsRoom.lobby-layer-open{position:fixed;inset:12px 12px 12px 238px;width:auto;height:auto;max-height:none;min-height:0;margin:0;padding:22px;z-index:760;display:grid;grid-template-rows:64px 48px minmax(0,1fr) 30px;gap:14px;overflow:hidden;border:1px solid #9c7835;border-radius:18px;background:radial-gradient(ellipse at 25% 30%,#09251a,#020c09 75%);color:#eac785;font-family:Georgia,"Times New Roman",serif}
body #lobbyFriendsRoom :is(button,input,select,h2,h3,p,span,strong,small,b,label){font-family:inherit}
body #lobbyFriendsRoom :is(button,input,select){box-sizing:border-box;min-width:0;min-height:0;font-size:14px}
body #lobbyFriendsRoom button{border:1px solid #806332;border-radius:9px;background:linear-gradient(120deg,#183819,#091a0e);color:#efd496;padding:8px 12px;white-space:normal;line-height:1.2}
body #lobbyFriendsRoom button::after{content:none}
body #lobbyFriendsRoom button:disabled{opacity:.5}
body #lobbyFriendsRoom button:focus-visible{outline:2px solid #ffdb80;outline-offset:2px}
body #lobbyFriendsRoom .lobby-panel-heading{margin:0;display:flex;flex-direction:row;align-items:center;min-height:0;gap:12px}
body #lobbyFriendsRoom .lobby-panel-heading .eyebrow{display:none}
body #lobbyFriendsRoom .lobby-panel-heading h2{font-size:30px;color:#efc266;margin:0;text-transform:uppercase}
body #lobbyFriendsRoom .lobby-panel-heading p{font-size:15px;margin:5px 0 0;color:#cdb889}
body #lobbyFriendsRoom .lobby-panel-close{position:static;width:44px;height:40px;flex:none}
body #lobbyFriendsRoom .friends-room-tabs{min-height:0;margin:0;padding:0;border:0;display:grid;grid-template-columns:1fr 1fr;gap:12px}
body #lobbyFriendsRoom .friends-room-tabs button{width:100%;font-size:16px;text-transform:uppercase;background:#06130e}
body #lobbyFriendsRoom .friends-room-tabs button.selected{background:linear-gradient(#224421,#0a2312);border-color:#b59445;box-shadow:inset 0 0 12px #a7972625}
body #lobbyFriendsRoom .friends-room-pane{min-width:0;min-height:0;overflow:hidden}
body #lobbyFriendsRoom .friends-create-pane{height:100%;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) minmax(0,.9fr);gap:14px}
body #lobbyFriendsRoom .friends-room-settings,body #lobbyFriendsRoom .friends-table-stage,body #lobbyFriendsRoom .friends-room-share{min-height:0;min-width:0;padding:14px;border:1px solid #624c2a;border-radius:12px;background:#0003;grid-column:auto}
body #lobbyFriendsRoom .eyebrow,body #lobbyFriendsRoom .friends-list-heading strong{font-size:15px;color:#e9bb5e;letter-spacing:0;text-transform:uppercase}
body #lobbyFriendsRoom .friends-room-settings{display:grid;grid-template-rows:auto auto auto 30px minmax(70px,1fr) 38px;gap:12px;align-content:stretch}
body #lobbyFriendsRoom label{display:grid;gap:5px;font-size:14px;color:#d3bb8f;margin:0}
body #lobbyFriendsRoom select{height:40px;padding:7px 10px;border:1px solid #79602f;border-radius:8px;color:#f2d398;background:#0a1910}
body #lobbyFriendsRoom .friends-setting{min-width:0;margin:0;padding:0;border:0}
body #lobbyFriendsRoom .friends-setting legend{padding:0;margin:0 0 5px;font-size:14px;color:#d3bb8f}
body #lobbyFriendsRoom .friends-setting-options{display:flex;gap:5px}
body #lobbyFriendsRoom .friends-setting-options button{flex:1;height:40px;padding:4px;font-size:14px;background:#07150e}
body #lobbyFriendsRoom .friends-setting-options button.selected{border-color:#dfb85f;color:#ffdf8e;background:linear-gradient(#37542a,#16291b);box-shadow:inset 0 0 8px #bb963630}
body #lobbyFriendsRoom .friends-setting-options button.selected:disabled{opacity:1}
body #lobbyFriendsRoom .friends-setting select[hidden]{display:none}
body #lobbyFriendsRoom .friends-list-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0}
body #lobbyFriendsRoom #friendsRefreshBtn{width:32px;height:30px;padding:0;font-size:20px;flex:none}
body #lobbyFriendsRoom .lobby-friends-list{min-height:0;max-height:none;display:flex;flex-direction:column;gap:5px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
body #lobbyFriendsRoom .lobby-friends-list article{flex:none;min-height:56px;grid-template-columns:34px minmax(0,1fr) auto;gap:7px;padding:5px;border:0;border-bottom:1px solid #5a492d;border-radius:0;background:transparent}
body #lobbyFriendsRoom .lobby-friends-list strong{font-size:15px}
body #lobbyFriendsRoom .lobby-friends-list small{font-size:12px}
body #lobbyFriendsRoom .lobby-friends-list small.online{color:#99c962}
body #lobbyFriendsRoom .lobby-friends-list button{font-size:12px;padding:6px;min-height:32px;max-width:108px}
body #lobbyFriendsRoom .friend-avatar{width:32px;height:32px;font-size:17px;background:#153424}
body #lobbyFriendsRoom .friends-table-stage{display:grid;grid-template-rows:30px minmax(0,1fr) auto;gap:12px;align-items:stretch}
body #lobbyFriendsRoom .friends-seat-heading{display:flex;align-items:center;justify-content:space-between;min-height:0;font-size:15px;gap:8px}
body #lobbyFriendsRoom .friends-seat-heading b{white-space:nowrap;font-size:14px;font-weight:400}
body #lobbyFriendsRoom .friends-seat-list{min-height:0;display:grid;grid-auto-rows:minmax(0,1fr);gap:10px;align-content:stretch}
body #lobbyFriendsRoom .friends-seat-list article{display:grid;align-items:center;min-width:0;min-height:0;grid-template-columns:44px minmax(0,1fr);grid-template-rows:1fr auto;gap:2px 10px;padding:10px;border:1px solid #65512e;border-radius:10px;background:linear-gradient(130deg,#10231a,#070e0c)}
body #lobbyFriendsRoom .friends-seat-list article>i{display:grid;place-items:center;width:42px;height:42px;font-size:23px;grid-row:1 / 3;box-sizing:border-box;overflow:hidden;border:1px solid #a57a28;border-radius:50%;background:#121b18;color:#e7b84d;font-style:normal}
body #lobbyFriendsRoom .friends-seat-list img{width:100%;height:100%;object-fit:cover}
body #lobbyFriendsRoom .friends-seat-list strong{font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;align-self:end}
body #lobbyFriendsRoom .friends-seat-list article>span{font-size:12px;align-self:start}
body #lobbyFriendsRoom .friends-seat-list article.empty strong{grid-row:1 / 3;align-self:center;font-weight:400;white-space:normal}
body #lobbyFriendsRoom #friendsTableHint{margin:0;font-size:13px;line-height:1.4;text-align:left;color:#b8b098}
body #lobbyFriendsRoom .friends-room-share{display:flex;flex-direction:column;gap:14px;justify-content:flex-start}
body #lobbyFriendsRoom .friends-room-share h3{font-size:21px;margin:0;color:#e7d2a0}
body #lobbyFriendsRoom .friends-copy-field{display:grid;grid-template-columns:minmax(0,1fr) 38px;gap:4px}
body #lobbyFriendsRoom .friends-copy-field input{width:100%;height:38px;padding:7px;border:1px solid #66512b;border-radius:7px;color:#efd6a0;background:#030b08;text-overflow:ellipsis}
body #lobbyFriendsRoom .friends-copy-field button{padding:0;font-size:22px;text-transform:none}
body #lobbyFriendsRoom #friendsAccessHint{margin:0;padding:12px;border:1px solid #55472d;border-radius:8px;font-size:13px;line-height:1.45;color:#c7bb9d}
body #lobbyFriendsRoom #friendsShareBtn{font-size:14px;min-height:40px;text-transform:none}
body #lobbyFriendsRoom #friendsCreateBtn{margin-top:auto;min-height:55px;font-size:18px;background:linear-gradient(#9a2517,#5a110b);border-color:#be6937}
body #lobbyFriendsRoom #friendsRoomStatus{margin:0;font-size:13px;color:#f1d296;align-self:center;line-height:1.25}
body #lobbyFriendsRoom .friends-join-pane{grid-template-columns:1fr 1fr;gap:20px;align-content:start;padding:20px;border:1px solid #695331;border-radius:12px;background:#020c09}
body #lobbyFriendsRoom .friends-join-pane h3{font-size:25px;margin:12px 0}
body #lobbyFriendsRoom .friends-join-pane p{font-size:15px;color:#c3b695}
body #lobbyFriendsRoom .lobby-code-entry{display:flex;gap:8px}
body #lobbyFriendsRoom #friendsJoinBtn{flex:none;min-width:75px}
body #lobbyFriendsRoom .lobby-code-entry input{width:100%;height:42px;background:#071a10;border:1px solid #7f6637;color:#f2d498}
body #lobbyFriendsRoom .lobby-incoming-invites{overflow:auto;min-height:0;max-height:100%;overscroll-behavior:contain}
body #lobbyFriendsRoom .lobby-incoming-invites article{grid-template-columns:minmax(0,1fr) auto;min-height:55px}
body #lobbyFriendsRoom .lobby-incoming-invites strong{font-size:16px}
body #lobbyFriendsRoom .lobby-incoming-invites small{font-size:13px}
body:has(#lobbyFriendsRoom.lobby-layer-open) #home:not(.game-active) .lobby-side-rail{position:fixed;left:12px;top:12px;bottom:12px;width:212px;height:auto;z-index:761;display:flex!important;flex-direction:column;min-height:0}
body:has(#lobbyFriendsRoom.lobby-layer-open) #home .lobby-nav-scroll{flex:1;min-height:0}
@media(max-width:1100px),(max-height:600px){
 body #home:not(.game-active) #lobbyFriendsRoom.lobby-layer-open{inset:7px;padding:12px;gap:8px;grid-template-rows:48px 36px minmax(0,1fr) 30px}
 body:has(#lobbyFriendsRoom.lobby-layer-open) #home:not(.game-active) .lobby-side-rail{display:none!important}
 body #lobbyFriendsRoom .lobby-panel-heading h2{font-size:24px}
 body #lobbyFriendsRoom .lobby-panel-heading p{font-size:12px}
 body #lobbyFriendsRoom .friends-room-tabs button{font-size:13px}
 body #lobbyFriendsRoom .friends-create-pane{gap:8px}
 body #lobbyFriendsRoom .friends-room-settings,body #lobbyFriendsRoom .friends-table-stage,body #lobbyFriendsRoom .friends-room-share{padding:8px}
}
@media(orientation:landscape) and (max-height:450px){
 body #home:not(.game-active) #lobbyFriendsRoom.lobby-layer-open{inset:5px;padding:7px;gap:5px;grid-template-rows:30px 30px minmax(0,1fr) 25px}
 body #lobbyFriendsRoom .lobby-panel-heading h2{font-size:19px}
 body #lobbyFriendsRoom .lobby-panel-heading p{display:none}
 body #lobbyFriendsRoom .lobby-panel-close{height:28px;width:35px;padding:0}
 body #lobbyFriendsRoom .friends-room-tabs button{font-size:11px;padding:3px 6px}
 body #lobbyFriendsRoom .eyebrow,body #lobbyFriendsRoom .friends-list-heading strong,body #lobbyFriendsRoom .friends-seat-heading{font-size:10px}
 body #lobbyFriendsRoom .friends-room-settings{grid-template-rows:12px 31px 31px 19px minmax(30px,1fr) 24px;gap:3px}
 body #lobbyFriendsRoom label{font-size:10px;gap:1px}
 body #lobbyFriendsRoom select{height:20px;padding:1px 4px;font-size:10px}
 body #lobbyFriendsRoom .friends-setting legend{font-size:10px;margin-bottom:1px;line-height:10px}
 body #lobbyFriendsRoom .friends-setting-options{gap:3px}
 body #lobbyFriendsRoom .friends-setting-options button{height:20px;padding:1px;font-size:10px;border-radius:5px}
 body #lobbyFriendsRoom #friendsRefreshBtn{height:19px;width:24px;font-size:16px}
 body #lobbyFriendsRoom .lobby-friends-list article{min-height:30px;padding:2px 0;grid-template-columns:22px minmax(0,1fr) auto;gap:3px}
 body #lobbyFriendsRoom .friend-avatar{width:21px;height:21px;font-size:12px}
 body #lobbyFriendsRoom .lobby-friends-list strong{font-size:11px}
 body #lobbyFriendsRoom .lobby-friends-list small{font-size:9px}
 body #lobbyFriendsRoom .lobby-friends-list button{font-size:9px;min-height:23px;padding:2px 3px;max-width:70px}
 body #lobbyFriendsRoom #friendsAllBtn{font-size:10px;padding:2px}
 body #lobbyFriendsRoom .friends-table-stage{grid-template-rows:22px minmax(0,1fr) 28px;gap:5px}
 body #lobbyFriendsRoom .friends-seat-heading b{font-size:10px}
 body #lobbyFriendsRoom .friends-seat-list{gap:4px}
 body #lobbyFriendsRoom .friends-seat-list article{padding:2px 4px;grid-template-columns:20px minmax(0,1fr);gap:0 5px}
 body #lobbyFriendsRoom .friends-seat-list article>i{width:20px;height:20px;font-size:13px}
 body #lobbyFriendsRoom .friends-seat-list strong{font-size:10px}
 body #lobbyFriendsRoom .friends-seat-list article>span{font-size:9px}
 body #lobbyFriendsRoom #friendsTableHint{font-size:9px;line-height:1.2}
 body #lobbyFriendsRoom .friends-room-share{display:grid;grid-template-rows:24px 32px 32px 24px minmax(0,1fr) 30px;gap:3px}
 body #lobbyFriendsRoom .friends-room-share h3{display:none}
 body #lobbyFriendsRoom .friends-copy-field{grid-template-columns:minmax(0,1fr) 26px}
 body #lobbyFriendsRoom .friends-copy-field input{height:24px;padding:2px 4px;font-size:10px}
 body #lobbyFriendsRoom .friends-copy-field button{font-size:17px}
 body #lobbyFriendsRoom #friendsShareBtn{min-height:24px;font-size:10px;padding:3px}
 body #lobbyFriendsRoom #friendsAccessHint{font-size:9px;padding:0;border:0;line-height:1.05}
 body #lobbyFriendsRoom #friendsCreateBtn{min-height:30px;padding:4px;font-size:11px}
 body #lobbyFriendsRoom #friendsRoomStatus{font-size:10px}
 body #lobbyFriendsRoom .friends-join-pane{padding:10px;gap:12px}
 body #lobbyFriendsRoom .friends-join-pane h3{font-size:19px}
 body #lobbyFriendsRoom .friends-join-pane p{font-size:12px}
}
@media(orientation:portrait) and (max-width:900px){
 body #home:not(.game-active) #lobbyFriendsRoom.lobby-layer-open{grid-template-rows:58px 42px minmax(0,1fr) 32px;gap:8px;padding:10px}
 body #lobbyFriendsRoom .friends-create-pane{grid-template-columns:1fr 1fr;grid-template-rows:minmax(0,1fr) 232px;gap:8px}
 body #lobbyFriendsRoom .friends-room-settings{grid-template-rows:auto auto auto 30px minmax(55px,1fr) 35px;gap:7px}
 body #lobbyFriendsRoom .friends-room-tabs button{font-size:12px;padding:3px 6px}
 body #lobbyFriendsRoom .eyebrow,body #lobbyFriendsRoom .friends-list-heading strong{font-size:11px}
 body #lobbyFriendsRoom label{font-size:12px}
 body #lobbyFriendsRoom select{height:34px;font-size:11px;padding:4px}
 body #lobbyFriendsRoom .friends-setting legend{font-size:12px;margin-bottom:5px}
 body #lobbyFriendsRoom .friends-setting-options button{height:34px;font-size:11px;padding:2px}
 body #lobbyFriendsRoom .lobby-friends-list article{grid-template-columns:24px minmax(0,1fr);gap:4px;min-height:70px}
 body #lobbyFriendsRoom .lobby-friends-list button{grid-column:1 / 3;width:100%;max-width:none;min-height:26px;padding:3px;font-size:11px}
 body #lobbyFriendsRoom .friend-avatar{width:24px;height:24px;font-size:13px}
 body #lobbyFriendsRoom .lobby-friends-list strong{font-size:12px}
 body #lobbyFriendsRoom .lobby-friends-list small{font-size:10px}
 body #lobbyFriendsRoom #friendsAllBtn{font-size:11px;padding:4px}
 body #lobbyFriendsRoom .friends-table-stage{grid-template-rows:32px minmax(0,1fr) 48px;gap:8px}
 body #lobbyFriendsRoom .friends-seat-heading{font-size:11px}
 body #lobbyFriendsRoom .friends-seat-heading b{font-size:10px;white-space:normal;text-align:right}
 body #lobbyFriendsRoom .friends-seat-list{gap:6px}
 body #lobbyFriendsRoom .friends-seat-list article{padding:6px;grid-template-columns:28px minmax(0,1fr);gap:2px 6px}
 body #lobbyFriendsRoom .friends-seat-list article>i{width:28px;height:28px;font-size:17px}
 body #lobbyFriendsRoom .friends-seat-list strong{font-size:11px}
 body #lobbyFriendsRoom .friends-seat-list article>span{font-size:10px}
 body #lobbyFriendsRoom #friendsTableHint{font-size:11px;line-height:1.25}
 body #lobbyFriendsRoom .friends-room-share{grid-column:1 / 3;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:18px 55px 37px 70px;gap:7px;align-content:start;padding:10px}
 body #lobbyFriendsRoom .friends-room-share>.eyebrow{grid-column:1 / 3;font-size:13px}
 body #lobbyFriendsRoom .friends-room-share h3{display:none}
 body #lobbyFriendsRoom #friendsShareBtn{grid-column:1 / 3;min-height:0;font-size:13px}
 body #lobbyFriendsRoom #friendsAccessHint{font-size:10px;padding:5px;line-height:1.25}
 body #lobbyFriendsRoom #friendsCreateBtn{margin:0;min-height:0;font-size:15px}
 body #lobbyFriendsRoom .friends-join-pane{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);height:100%;padding:12px}
 body #lobbyFriendsRoom #friendsRoomStatus{font-size:11px}
}
