/* Presentation only: retain the board's original 700px coordinate system. */
.game-brand,#game-leave-btn,#desktop-roll-btn,.desktop-game-panel,.tb-desktop-only,.tb-chip-icon,.tb-chip-divider,.tb-chip-action{display:none}
.panel-you{background:#f71938;color:white;border-radius:6px;padding:3px 7px;font-size:11px;font-weight:800}
.panel-color,.panel-audio,.panel-emoji,.panel-mic,.panel-voice,.panel-countdown{display:none}
@media(max-width:1099px){
 #player-panels{grid-template-columns:repeat(4,minmax(0,1fr));overflow-x:auto}
 .player-panel{min-width:0}.panel-you{display:none}.panel-stake svg{width:14px;height:14px}
}

/* Compact two-row phone cards: both occupied and waiting seats share one short height. */
@media(max-width:1099px){
 #player-panels{grid-auto-rows:96px;gap:7px}
 .player-panel{height:96px;min-height:96px;padding:6px 7px;border-radius:13px}
 .panel-header{min-height:39px;padding-left:44px;padding-right:32px}.panel-avatar{top:7px;left:7px;width:35px;height:35px;border-width:2px;font-size:14px}.panel-name{padding-top:1px;font-size:10px}.panel-color{top:43px;left:7px;min-width:37px;padding:3px 4px;border-radius:9px;font-size:8px}.panel-you{top:23px;left:48px;padding:2px 5px;font-size:7px}
 .panel-audio,.panel-emoji,.panel-mic,.panel-voice{top:6px;width:24px;height:26px;border-radius:7px}.panel-audio,.panel-mic{right:6px}.panel-emoji,.panel-voice{right:33px}.panel-audio svg,.panel-emoji svg,.panel-mic svg,.panel-voice svg{width:14px;height:14px}
 .panel-countdown{top:42px;left:48px;right:34px;gap:4px;font-size:9px}.panel-countdown i{height:6px}.panel-pips{top:61px;left:48px;gap:4px}.panel-pip{width:15px;height:15px;border-width:1.5px}.panel-info{right:7px;bottom:6px;left:7px;font-size:8px}.panel-stake{gap:3px}.panel-stake svg{width:12px;height:12px}.turn-badge{right:6px;bottom:5px;padding:3px 5px;border-radius:10px;font-size:7px}.panel-info:has(.turn-badge) .panel-stake{max-width:calc(100% - 62px)}
}
@media(max-width:480px){#player-panels{grid-auto-rows:92px;gap:6px}.player-panel{height:92px;min-height:92px}.panel-pips{top:58px}.panel-info{bottom:5px}}

/* Ultra-compact phone cards: two information lines, fixed at roughly half the former height. */
@media(max-width:1099px){
 #player-panels{grid-auto-rows:64px;gap:6px}
 .player-panel{height:64px;min-height:64px;padding:4px 5px;border-radius:11px}
 .panel-header{min-height:0;padding:0 42px 0 34px}.panel-avatar{top:5px;left:5px;width:27px;height:27px;font-size:11px;border-width:2px}.panel-name{padding-top:3px;font-size:9px;line-height:1;white-space:nowrap}.panel-you{top:17px;left:36px;padding:1px 4px;font-size:6px}.panel-color{top:33px;left:5px;min-width:28px;padding:2px 3px;border-radius:7px;font-size:6px}
 .panel-audio,.panel-emoji,.panel-mic,.panel-voice{top:4px;width:20px;height:22px;border-radius:6px}.panel-audio,.panel-mic{right:4px}.panel-emoji,.panel-voice{right:26px}.panel-audio svg,.panel-emoji svg,.panel-mic svg,.panel-voice svg{width:12px;height:12px}
 .panel-countdown{top:22px;left:36px;right:4px;gap:3px;font-size:7px}.panel-countdown i{height:5px}.panel-pips{top:34px;left:39px;gap:3px}.panel-pip{width:12px;height:12px;border-width:1px}.panel-info{right:4px;bottom:4px;left:5px;font-size:7px}.panel-stake{gap:2px}.panel-stake svg{width:10px;height:10px}.turn-badge{right:4px;bottom:3px;padding:2px 4px;border-radius:8px;font-size:6px}.panel-info:has(.turn-badge) .panel-stake{max-width:calc(100% - 52px)}
}
@media(max-width:480px){#player-panels{grid-auto-rows:58px;gap:5px}.player-panel{height:58px;min-height:58px}.panel-color{top:30px}.panel-pips{top:31px}.panel-info{bottom:3px}.turn-badge{bottom:2px}}
@media(min-width:1100px){
 #game-screen{display:grid;grid-template-columns:minmax(260px,1fr) minmax(360px,700px) minmax(260px,1fr);grid-template-rows:clamp(58px,8vh,76px) minmax(108px,15vh) minmax(108px,15vh) minmax(0,1fr) clamp(88px,13vh,124px);gap:10px 16px;padding:10px 24px 14px;height:100dvh;min-height:0;overflow:hidden;align-content:stretch;justify-content:stretch;background:radial-gradient(ellipse at 50% 45%,#072b46 0,#021625 48%,#010b15 100%)!important;color:#edf5ff;box-sizing:border-box}
 #game-screen.hidden{display:none}
 #top-bar{grid-area:1/1/2/4;width:100%;max-width:none;height:76px;margin:0;padding:8px 0;border:0;border-bottom:1px solid #286080;border-radius:0;background:transparent;box-shadow:none;gap:20px}
 #top-bar-left{flex:1;min-width:0;gap:14px}#top-bar-right{gap:10px}
 .game-brand{display:flex;align-items:center;gap:10px;margin-right:auto;color:#ffe000;font-weight:900;font-size:34px;line-height:1}.game-brand img{width:66px;height:66px;object-fit:contain}.game-brand span{display:flex;flex-direction:column;text-transform:uppercase}.game-brand b{color:white;font-size:15px;letter-spacing:2px;line-height:1.4}
 #tb-room-chip,#tb-pot-chip{background:linear-gradient(135deg,#08243d,#031524);border:1px solid #245777;border-radius:12px;padding:14px 18px;white-space:nowrap}.chip-label{font-size:13px;color:#b7cbe1}#tb-room{font-size:24px;letter-spacing:2px}#tb-pot{font-size:20px}.online-badge{font-size:13px;white-space:nowrap}
 #mute-btn,#settings-btn,#game-leave-btn{display:inline-flex;align-items:center;justify-content:center;width:56px;height:56px;border:1px solid #347091;border-radius:13px;background:linear-gradient(135deg,#0b2d49,#031324);color:white;cursor:pointer}#mute-btn svg,#settings-btn svg{width:27px;height:27px}#game-leave-btn{order:4;width:auto;padding:0 24px;border-color:#ff183b;background:linear-gradient(#ff2444,#e90025);font-size:20px;font-weight:800}
 #player-panels{display:contents}
 .player-panel{position:relative;width:100%;min-width:0;height:100%;margin:0;padding:18px 14px;border:2px solid var(--seat)!important;border-radius:18px;background:radial-gradient(ellipse at 25% 10%,#0c2941,#041321 75%);box-shadow:inset 0 0 24px color-mix(in srgb,var(--seat) 10%,transparent),0 0 12px color-mix(in srgb,var(--seat) 16%,transparent);align-self:stretch;box-sizing:border-box;--seat:#06bdff}
 .player-panel[data-color=red]{--seat:#ff1739}.player-panel[data-color=yellow]{--seat:#ffe000}.player-panel[data-color=green]{--seat:#00ec76}
 .player-panel:nth-child(1){grid-area:2/1/3/2}.player-panel:nth-child(2){grid-area:2/3/3/4}.player-panel:nth-child(3){grid-area:3/1/4/2}.player-panel:nth-child(4){grid-area:3/3/4/4}
 .panel-header{display:flex;align-items:flex-start;gap:9px;padding-left:104px;min-width:0}.panel-avatar{position:absolute;left:17px;top:18px;width:86px;height:86px;border:3px solid var(--seat);border-radius:50%;box-shadow:0 0 15px color-mix(in srgb,var(--seat) 65%,transparent);font-size:24px;flex-shrink:0;overflow:hidden}.panel-avatar img{width:100%;height:100%;object-fit:cover}.panel-name{min-width:0;flex:1;font-size:18px;line-height:1.25;white-space:normal;overflow-wrap:anywhere;font-weight:750;color:#f5f8ff}.panel-you{flex-shrink:0;font-size:11px;padding:4px 7px}.panel-audio{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:38px;height:42px;border:1px solid #6092b1;border-radius:10px;background:linear-gradient(135deg,#163750,#04101e);color:white;cursor:pointer}.panel-audio svg{width:23px;height:23px}
 .panel-color{display:block;position:absolute;left:18px;top:99px;min-width:84px;padding:5px 8px;border-radius:12px;background:var(--seat);color:#00121a;text-align:center;text-transform:uppercase;font-size:13px;font-weight:900;box-sizing:border-box}.panel-pips{position:absolute;left:121px;top:73px;display:flex;gap:9px;margin:0}.panel-pip{width:29px;height:29px;border:2px solid #6e88b1;border-radius:50%;background:#020e1b;box-sizing:border-box}.panel-pip.out,.panel-pip.home{background:radial-gradient(circle at 30% 25%,white,var(--seat) 30%,#001327 95%)!important;box-shadow:0 0 10px var(--seat),inset 0 0 0 2px #ffffffa0!important}
 .panel-info{position:absolute;bottom:16px;left:18px;right:14px;display:flex;justify-content:space-between;align-items:center;color:#edf4fd;font-size:14px}.panel-stake{display:flex;align-items:center;gap:7px}.panel-stake svg{width:23px;height:23px;color:#ffe000}.turn-badge{position:absolute;right:14px;bottom:12px;background:linear-gradient(#06b93d,#006b21);border:1px solid #24eb50;border-radius:18px;padding:8px 14px;font-size:12px;color:white}.player-panel.active-turn{box-shadow:0 0 18px var(--seat),inset 0 0 30px #06aaf01c}
 #game-container{grid-area:2/2/5/3;max-width:none;width:100%;height:100%!important;min-height:0;align-self:stretch;justify-self:center;margin:0;filter:drop-shadow(0 0 5px #009eed80)}
 #controls{grid-area:5/2/6/3;max-width:none;width:100%;margin:0;padding:0;display:flex;align-items:center;justify-content:center;position:relative}#controls::after{display:none}#controls #current-player{position:absolute;left:0;bottom:0;font-size:11px;color:#bdd0df}#controls #dice-value{display:flex;flex-direction:column;align-items:center;gap:12px;flex:0}#roll-btn{width:60px;height:60px}#roll-btn .dice-3d-scene{transform:scale(1.2)}#desktop-roll-btn{display:block;min-width:225px;padding:12px 24px;border:1px solid #ffe933;border-radius:14px;background:linear-gradient(#fff024,#ffc400);box-shadow:0 0 24px #ffd90065,inset 0 2px 4px #fff8;color:#151000;font-size:25px;font-weight:900;cursor:pointer}#dice-value:has(#roll-btn:disabled) #desktop-roll-btn{filter:saturate(.55);opacity:.65;cursor:not-allowed}
 .desktop-game-panel{display:block;min-width:0;align-self:stretch;margin:0;padding:13px;border:1px solid #126c9e;border-radius:17px;background:linear-gradient(135deg,#061f33,#02101e);color:#edf4ff;box-sizing:border-box;overflow:auto;scrollbar-width:thin;scrollbar-color:#28617f transparent}.desktop-game-panel h2{display:flex;align-items:center;gap:9px;margin:0 0 10px;font-size:19px}.desktop-game-panel h2 svg,.desktop-game-panel h3 svg{width:24px;height:24px;color:#71caff;flex-shrink:0}
 #desktop-quick-messages{grid-area:4/1/6/2}#desktop-quick-messages>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}#desktop-quick-messages button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:6px;border:1px solid #437a9b;border-radius:10px;background:linear-gradient(135deg,#0a2b45,#031626);box-shadow:inset 0 1px #ffffff0d;color:white;font-size:14px;cursor:pointer}#desktop-quick-messages button:hover{border-color:#00c8ff;background:#103c58}#desktop-quick-messages h3{display:flex;gap:8px;align-items:center;margin:10px 0 7px;font-size:14px;font-weight:500}#desktop-quick-messages .desktop-reactions{grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}#desktop-quick-messages .desktop-reactions button{font-size:27px;min-height:43px;padding:3px}
 #desktop-game-activity{grid-area:4/3/6/4}.desktop-room-audio{border-bottom:1px solid #245572;margin-bottom:12px;padding-bottom:12px}.desktop-room-audio h2 em{margin-left:auto;color:#9ac2df;font-size:12px;font-style:normal}.desktop-room-audio>div{display:grid;grid-template-columns:1fr 1fr;gap:9px}.desktop-room-audio button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:65px;border:1px solid #208ec1;border-radius:11px;background:linear-gradient(#083259,#051827);color:white;font-size:12px;cursor:pointer}.desktop-room-audio button svg{width:29px;height:29px;filter:drop-shadow(0 0 6px #06baff)}.desktop-room-audio button:last-child{border-color:#895163;background:linear-gradient(#3b1d32,#071420)}.desktop-room-audio button.active{border-color:#13df71;box-shadow:inset 0 0 15px #0be75420}
 #desktop-activity-list{margin:0;padding:0;list-style:none}#desktop-activity-list li{display:grid;grid-template-columns:22px minmax(0,1fr) auto;align-items:center;gap:8px;min-height:37px;border-top:1px solid #22445c;font-size:12px}#desktop-activity-list b{font-weight:500;color:#e8f1ff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#desktop-activity-list time{color:#a8b7ce;font-size:11px}
 #chat-feed-anchor{grid-area:2/2/3/3;align-self:start;z-index:20}#status-bar,#fab-group{display:none}
}
@media(min-width:1100px){
 #desktop-game-activity{display:flex;flex-direction:column;gap:12px;padding:0;border:0;background:none;overflow:visible}
 .desktop-room-audio,.desktop-recent-moves{padding:13px;border:1px solid #126c9e;border-radius:16px;background:linear-gradient(135deg,#061f33,#02101e);margin:0}
 .desktop-recent-moves{flex:1;min-height:0;overflow:auto;scrollbar-width:thin}
 .turn-badge{background:linear-gradient(#08bd40,#006322)!important;color:white!important;text-transform:none}
}
@media(min-width:1400px){
 #game-screen{grid-template-columns:minmax(330px,1fr) minmax(500px,640px) minmax(330px,1fr);column-gap:16px;padding-inline:18px}
 #game-container{max-width:640px}
 .game-brand{flex:0 0 clamp(200px,22vw,360px);margin-right:0}#tb-room-chip{margin-left:0}#top-bar-left{justify-content:flex-start}
 .panel-header{padding-left:102px}.panel-avatar{width:82px;height:82px}.panel-color{top:94px;min-width:82px;font-size:13px}.panel-name{font-size:18px;white-space:nowrap}.panel-pips{left:116px;top:78px;gap:8px}.panel-pip{width:29px;height:29px}.panel-info{font-size:14px}.panel-audio{width:40px;height:43px}
 .panel-info{left:116px}.desktop-game-panel h2{font-size:20px}#desktop-quick-messages button{font-size:15px;min-height:42px}#desktop-quick-messages .desktop-reactions button{min-height:44px;font-size:28px}.desktop-room-audio button{font-size:13px}#desktop-activity-list li{font-size:13px;min-height:38px}
}
@media(min-width:1400px) and (max-height:880px){
 #desktop-quick-messages button{min-height:37px;font-size:13px}#desktop-quick-messages .desktop-reactions button{min-height:38px;font-size:24px}
 .panel-info{font-size:13px}.panel-avatar{width:72px;height:72px}.panel-color{top:84px;min-width:74px}.panel-header{padding-left:88px}.panel-pips{left:100px;top:67px}.panel-pip{width:25px;height:25px}.panel-info{left:100px}
}
@media(min-width:1100px) and (max-width:1399px){
 #game-screen{padding:8px 12px 14px;gap:10px;grid-template-columns:minmax(260px,1fr) minmax(360px,1.4fr) minmax(260px,1fr);grid-template-rows:66px minmax(105px,15vh) minmax(105px,15vh) minmax(0,1fr) 108px}.game-brand{font-size:25px}.game-brand img{width:50px;height:50px}.game-brand b{font-size:11px}#top-bar{height:66px;gap:8px}#top-bar-left{gap:8px}#tb-room-chip,#tb-pot-chip{padding:10px}#tb-room{font-size:19px}#tb-pot{font-size:16px}#mute-btn,#settings-btn{width:43px;height:46px}#game-leave-btn{height:46px;padding:0 15px;font-size:16px}.panel-header{padding-left:75px;gap:6px}.panel-avatar{width:64px;height:64px;left:12px}.panel-color{left:10px;top:79px;min-width:72px;font-size:11px}.panel-name{font-size:14px}.panel-audio{width:30px;height:34px}.panel-pips{left:94px;top:71px;gap:7px}.panel-pip{width:24px;height:24px}.panel-info{font-size:12px;left:12px}.turn-badge{font-size:10px;padding:6px 9px}.desktop-game-panel{padding:10px}.desktop-game-panel h2{font-size:16px}#desktop-quick-messages button{font-size:12px;min-height:36px}#desktop-quick-messages .desktop-reactions button{min-height:37px;font-size:24px}
}

/* Reference header */
@media(min-width:1100px){
 #top-bar{position:relative;display:flex;width:100%;max-width:none;height:100%;min-height:58px;margin:0;padding:7px 12px 7px 16px;gap:12px;border:2px solid #12bdf5;border-radius:17px;background:linear-gradient(110deg,#02111f 0%,#03223a 52%,#020c19 100%);box-shadow:0 0 18px #009dff52,inset 0 0 24px #057cc31c;overflow:hidden}
 #top-bar::before,#top-bar::after{content:"";position:absolute;pointer-events:none}
 #top-bar::before{inset:0;background:linear-gradient(130deg,#ffcf1700 0 5%,#ffcf1730 5.2% 5.5%,transparent 5.7% 93%,#ffcf1738 93.2% 93.5%,transparent 93.7%);opacity:.9}
 #top-bar::after{left:28px;right:28px;bottom:0;height:2px;background:linear-gradient(90deg,#ffd400,transparent 20% 80%,#ffd400);box-shadow:0 0 10px #ffd400}
 #top-bar-left,#top-bar-right{position:relative;z-index:1;display:flex;align-items:center;min-width:0}
 #top-bar-left{flex:1 1 auto;gap:14px}#top-bar-right{flex:0 0 auto;gap:12px}
 .game-brand{display:flex;flex:1 1 280px;min-width:220px;max-width:390px;height:100%;align-items:center;gap:13px;margin:0;padding-right:22px;border-right:1px solid #12517f;color:#ffd900;text-shadow:0 0 12px #ffb70077}
 .game-brand img{width:76px;height:76px;max-height:calc(100% + 8px);object-fit:contain;filter:drop-shadow(0 0 8px #ffbd00aa)}
 .game-brand span{display:flex;flex-direction:column;font-size:39px;line-height:.9;font-weight:950;letter-spacing:1px;text-transform:uppercase}.game-brand b{color:#f8fbff;font-size:16px;line-height:1.5;letter-spacing:5px;text-shadow:none}
 #tb-room-chip,#tb-pot-chip{display:flex;align-items:center;align-self:stretch;min-width:0;min-height:0;padding:7px 14px;gap:11px;border-radius:14px;background:linear-gradient(145deg,#052b4a,#020d1a);box-sizing:border-box}
 #tb-room-chip{flex:0 1 310px;border:2px solid #18a9ff;box-shadow:0 0 12px #087eff88,inset 0 0 13px #097bce36}
 #tb-pot-chip{flex:0 1 295px;border:2px solid #ffce14;box-shadow:0 0 14px #ffb3008c,inset 0 0 14px #b86d0030}
 .tb-chip-icon{display:block;width:38px;height:38px;flex:0 0 38px;color:#dcecff;filter:drop-shadow(0 0 7px #268bff)}#tb-pot-chip .tb-chip-icon{color:#ffd000;filter:drop-shadow(0 0 7px #ff9d00)}
 .tb-chip-divider{display:block;align-self:stretch;width:1px;min-height:35px;background:linear-gradient(transparent,#35aaf3,transparent);flex:0 0 1px}#tb-pot-chip .tb-chip-divider{background:linear-gradient(transparent,#d9a811,transparent)}
 .tb-chip-copy{display:flex;flex:1;min-width:0;flex-direction:column;justify-content:center;gap:2px}.chip-label{display:block;color:#b7cce4;font-size:14px;line-height:1;font-weight:800;letter-spacing:1px}.tb-chip-copy strong{line-height:1.05}
 #tb-room{font-size:27px;letter-spacing:2px;color:#ffe000;text-shadow:0 0 9px #ffd00055}#tb-pot{font-size:24px;color:#ffe000;text-shadow:0 0 9px #ffd00055;overflow:visible}
 .tb-chip-action{display:flex;width:39px;height:39px;flex:0 0 39px;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:#d9eeff;cursor:pointer}.tb-chip-action svg{width:30px;height:30px;filter:drop-shadow(0 0 6px #149eff)}
 .tb-desktop-only{display:inline-flex}
 #tb-player-chip{height:54px;min-width:102px;padding:0 15px;align-items:center;justify-content:center;gap:9px;border:1px solid #197fc0;border-radius:14px;background:linear-gradient(145deg,#062846,#03101d);color:#f2f7ff;font-size:20px;box-shadow:inset 0 0 13px #0879cb26}#tb-player-chip svg{width:28px;height:28px;color:#e9f4ff;filter:drop-shadow(0 0 6px #158cff)}
 .online-badge{height:45px;padding:0 17px;border:2px solid #00bb5a;background:linear-gradient(180deg,#073c2a,#041d17);color:#38ed8d;font-size:16px;box-shadow:0 0 11px #00e46b50,inset 0 0 10px #00b34d32}.online-badge::before{width:12px;height:12px;background:#31ef88;box-shadow:0 0 10px #29ef84}
 #mute-btn,#music-btn,#settings-btn{display:inline-flex;width:56px;height:56px;flex:0 0 56px;align-items:center;justify-content:center;padding:0;border:2px solid #168bd6;border-radius:14px;background:linear-gradient(145deg,#073154,#020f1d);color:#eef7ff;box-shadow:0 0 10px #087bcf52,inset 0 0 13px #128fe332;cursor:pointer}
 #mute-btn svg,#music-btn svg,#settings-btn svg{width:28px;height:28px;filter:drop-shadow(0 0 6px #168cff)}
 #game-leave-btn{display:inline-flex;order:10;height:58px;min-width:146px;padding:0 21px;align-items:center;justify-content:center;gap:11px;border:2px solid #ff526a;border-radius:15px;background:linear-gradient(180deg,#ff2644,#db001f);box-shadow:0 0 18px #ff173c9c,inset 0 0 14px #ff829360;color:white;font-size:20px;font-weight:900;cursor:pointer}#game-leave-btn svg{width:27px;height:27px}
}
@media(min-width:1100px) and (max-width:1500px){
 #top-bar{padding-inline:10px;gap:8px}#top-bar-left,#top-bar-right{gap:7px}.game-brand{flex-basis:190px;min-width:165px;gap:7px;padding-right:9px}.game-brand img{width:50px;height:50px}.game-brand span{font-size:24px}.game-brand b{font-size:10px;letter-spacing:3px}
 #tb-room-chip{flex-basis:220px;padding:6px 9px;gap:7px}#tb-pot-chip{flex-basis:205px;padding:6px 9px;gap:7px}.tb-chip-icon{width:25px;height:25px;flex-basis:25px}.tb-chip-action{width:29px;height:29px;flex-basis:29px}.tb-chip-action svg{width:23px;height:23px}.chip-label{font-size:10px}#tb-room{font-size:18px}#tb-pot{font-size:16px}
 #tb-player-chip{height:44px;min-width:75px;padding:0 9px;font-size:15px}#tb-player-chip svg{width:21px}.online-badge{height:38px;padding:0 10px;font-size:12px}#mute-btn,#music-btn,#settings-btn{width:44px;height:44px;flex-basis:44px}#mute-btn svg,#music-btn svg,#settings-btn svg{width:22px;height:22px}#game-leave-btn{height:46px;min-width:105px;padding:0 12px;gap:6px;font-size:16px}#game-leave-btn svg{width:20px}
}

/* Recent Moves: the title stays fixed while only the activity rows scroll. */
@media(min-width:1100px){
 .desktop-recent-moves{display:flex;flex:0 0 auto;min-height:0;max-height:174px;flex-direction:column;overflow:hidden;scrollbar-width:auto}
 .desktop-recent-moves h2{flex:0 0 auto;margin:0 0 5px;padding-bottom:7px;border-bottom:1px solid #236084;font-size:18px}.desktop-recent-moves h2 svg{width:22px;height:22px}
 #desktop-activity-list{display:block;flex:0 1 auto;max-height:111px;margin:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#149ed8 #051827}
 #desktop-activity-list li{grid-template-columns:28px minmax(0,1fr) auto;gap:9px;min-height:36px;padding:0 3px;border-top:1px solid #1e5778;color:#c6d8eb;font-size:12px}#desktop-activity-list li:first-child{border-top:0}
 #desktop-activity-list li>span{display:grid;place-items:center;font-size:18px;filter:drop-shadow(0 0 5px #37bfff66)}#desktop-activity-list b{color:#edf6ff;font-weight:700}#desktop-activity-list time{min-width:48px;color:#a7c0dc;font-size:11px;text-align:right}
 #desktop-activity-list li[data-activity="finish"] b{color:#ffd43b}#desktop-activity-list li[data-activity="timeout"] b{color:#c6d8eb}#desktop-activity-list li[data-activity="capture"] b{color:#62ef9e}#desktop-activity-list li[data-activity="leave"] b{color:#ff9ca9}
}
@media(min-width:1100px) and (max-width:1500px){
 .desktop-recent-moves{max-height:148px}.desktop-recent-moves h2{margin-bottom:4px;padding-bottom:5px;font-size:15px}.desktop-recent-moves h2 svg{width:18px;height:18px}
 #desktop-activity-list{max-height:90px}#desktop-activity-list li{grid-template-columns:20px minmax(0,1fr) auto;gap:6px;min-height:30px;font-size:10px}#desktop-activity-list li>span{font-size:14px}#desktop-activity-list time{min-width:40px;font-size:9px}
}

/* Room audio controls */
@media(min-width:1100px){
 .desktop-room-audio{border:1px solid #1297ca!important;box-shadow:inset 0 0 20px #0077b426,0 0 14px #007fd22c}
 .desktop-room-audio h2{margin-bottom:10px}.desktop-room-audio h2 em{display:flex;align-items:center;gap:7px;color:#42ef9a;font-size:13px;font-weight:800}.desktop-room-audio h2 em span{width:9px;height:9px;border-radius:50%;background:#3af092;box-shadow:0 0 10px #32ef89}
 .desktop-room-audio .room-audio-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0}
 .desktop-room-audio .room-audio-actions button{display:flex;min-height:64px;align-items:center;justify-content:center;gap:5px;padding:7px 4px;border:1px solid #168fd1;border-radius:12px;background:linear-gradient(145deg,#08365c,#031523);color:#f7fbff;box-shadow:inset 0 0 14px #137cc92b;font-size:12px;font-weight:750;cursor:pointer}
 .desktop-room-audio .room-audio-actions button svg{width:28px;height:28px;filter:drop-shadow(0 0 6px #0ba8f8)}
 .desktop-room-audio .room-audio-actions [data-room-mic]{border-color:#0be890;background:linear-gradient(145deg,#07533e,#031b1a);box-shadow:0 0 11px #06d98146,inset 0 0 15px #0cdf8538}.desktop-room-audio .room-audio-actions [data-room-mic].active{background:linear-gradient(145deg,#078f58,#043625)}
 .desktop-room-audio .room-audio-actions [data-room-sound="off"]{border-color:#ff4b65;background:linear-gradient(145deg,#4a1d35,#15101b);box-shadow:inset 0 0 14px #ff305530}.desktop-room-audio .room-audio-actions [data-room-sound="off"].active{background:linear-gradient(145deg,#7d1730,#250915)}
 .desktop-room-audio .room-audience{display:block;margin-top:11px;padding-top:9px;border-top:1px solid #1d648a}.desktop-room-audio .room-audience h3{margin:0 0 7px;color:#b7d0e7;font-size:13px;font-weight:800}.desktop-room-audio #room-audience-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(105px,1fr));gap:7px;margin:0}
 .desktop-room-audio #room-audience-choices button{display:flex;min-height:35px;align-items:center;justify-content:center;gap:5px;padding:5px;border:1px solid #28678f;border-radius:10px;background:#0a253d;color:#bcd1e5;font-size:11px;font-weight:750;cursor:pointer}.desktop-room-audio #room-audience-choices button svg{width:17px;height:17px}.desktop-room-audio #room-audience-choices button.active{border-color:#20aaff;background:linear-gradient(145deg,#0a4476,#06233b);box-shadow:0 0 10px #0d9ffb62;color:#fff}
}
@media(min-width:1100px) and (max-width:1500px){
 .desktop-room-audio .room-audio-actions{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.desktop-room-audio .room-audio-actions button{min-height:52px;flex-direction:column;gap:3px;font-size:9px;line-height:1.05;white-space:normal}.desktop-room-audio .room-audio-actions button svg{width:20px;height:20px}.desktop-room-audio .room-audience{margin-top:8px;padding-top:7px}.desktop-room-audio .room-audience h3{margin-bottom:5px;font-size:11px}.desktop-room-audio #room-audience-choices{grid-template-columns:repeat(auto-fit,minmax(86px,1fr));gap:5px}.desktop-room-audio #room-audience-choices button{min-height:29px;font-size:10px}
}

/* Keep activity visible: compact audio controls without changing their order. */
@media(min-width:1100px){
 .desktop-room-audio,.desktop-recent-moves{padding:9px}.desktop-room-audio h2{margin-bottom:6px;font-size:17px}.desktop-room-audio h2 svg{width:21px;height:21px}.desktop-room-audio h2 em{font-size:11px}.desktop-room-audio h2 em span{width:7px;height:7px}
 .desktop-room-audio .room-audio-actions{gap:6px}.desktop-room-audio .room-audio-actions button{min-height:46px;padding:5px 3px;font-size:10px}.desktop-room-audio .room-audio-actions button svg{width:22px;height:22px}
 .desktop-room-audio .room-audience{margin-top:7px;padding-top:6px}.desktop-room-audio .room-audience h3{margin-bottom:4px;font-size:11px}.desktop-room-audio #room-audience-choices{gap:5px}.desktop-room-audio #room-audience-choices button{min-height:28px;padding:3px;font-size:10px}.desktop-room-audio #room-audience-choices button svg{width:15px;height:15px}
}
@media(min-width:1100px) and (max-width:1500px){
 .desktop-room-audio,.desktop-recent-moves{padding:8px}.desktop-room-audio h2{margin-bottom:5px;font-size:15px}.desktop-room-audio h2 svg{width:19px;height:19px}
 .desktop-room-audio .room-audio-actions{gap:5px}.desktop-room-audio .room-audio-actions button{min-height:36px;padding:3px 2px;gap:2px;font-size:8px}.desktop-room-audio .room-audio-actions button svg{width:17px;height:17px}
 .desktop-room-audio .room-audience{margin-top:5px;padding-top:5px}.desktop-room-audio .room-audience h3{margin-bottom:3px;font-size:10px}.desktop-room-audio #room-audience-choices button{min-height:24px;padding:2px;font-size:9px}.desktop-room-audio #room-audience-choices button svg{width:13px;height:13px}
}

/* Reference player cards; their existing four grid positions are unchanged. */
@media(min-width:1100px){
 .player-panel{padding:13px 14px;border-width:2px!important;border-color:var(--seat)!important;border-radius:20px;background:linear-gradient(120deg,#08253c 0%,#031523 70%,#061c2c 100%);box-shadow:0 0 16px color-mix(in srgb,var(--seat) 40%,transparent),inset 0 0 24px color-mix(in srgb,var(--seat) 8%,transparent);overflow:hidden}
 .player-panel::before{content:"";position:absolute;inset:0;background:linear-gradient(110deg,color-mix(in srgb,var(--seat) 10%,transparent),transparent 45%);pointer-events:none}
 .panel-header{position:static;display:flex;align-items:flex-start;min-width:0;padding:0 126px 0 90px;gap:7px}
 .panel-avatar{position:absolute;left:14px;top:9px;width:62px;height:62px;border:3px solid var(--seat);border-radius:50%;background:#17334a;box-shadow:0 0 15px color-mix(in srgb,var(--seat) 75%,transparent);color:#f7fbff;font-size:20px;font-weight:900;z-index:1}.panel-avatar svg{width:28px;height:28px}
 .panel-name{display:block;min-width:0;padding:6px 0 0;color:#f7fbff;font-size:18px;line-height:1.15;font-weight:850;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .panel-you{margin-top:3px;padding:4px 8px;border-radius:8px;background:#fb183a;box-shadow:0 0 8px #fb183a88;color:#fff;font-size:10px;line-height:1;font-weight:900}
 .panel-color{display:block;position:absolute;left:10px;top:69px;width:72px;min-width:0;padding:3px 7px;border-radius:13px;background:var(--seat);box-shadow:0 0 10px color-mix(in srgb,var(--seat) 55%,transparent);color:#001019;font-size:11px;line-height:1.15;font-weight:950;text-align:center;text-transform:uppercase;z-index:2}
 .panel-audio,.panel-emoji,.panel-mic,.panel-voice{display:flex;position:absolute;top:9px;width:35px;height:37px;align-items:center;justify-content:center;padding:0;border:1px solid #3d86ad;border-radius:11px;background:linear-gradient(145deg,#0b3551,#03131f);box-shadow:inset 0 0 10px #218acb26;color:#f3f8ff;cursor:pointer;z-index:2}.panel-audio{right:94px}.panel-emoji,.panel-mic{right:52px}.panel-voice{right:10px;border-color:#00a9e8;color:#00ed7f;box-shadow:inset 0 0 12px #00e17c26,0 0 9px #00c56c25}.panel-audio svg,.panel-emoji svg,.panel-mic svg,.panel-voice svg{width:21px;height:21px}
.panel-audio.active,.panel-mic.active{border-color:#ff4965;background:#45192b;color:#ff8193}.panel-mic.active{border-color:#16e692;background:#075239;color:#fff}.panel-voice.active,.player-panel.is-speaking .panel-voice{border-color:#22f49c;background:#07573e;color:#fff;box-shadow:0 0 13px #20ee94,inset 0 0 12px #0eff864d}.player-panel.is-speaking{box-shadow:0 0 18px color-mix(in srgb,var(--seat) 75%,#18ff9c)}
.room-device-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:9px;padding-top:9px;border-top:1px solid #1d648a}.room-device-settings[hidden]{display:none}.room-device-settings label{display:grid;gap:4px;color:#bcd2e7;font-size:11px;font-weight:750}.room-device-settings select{width:100%;min-width:0;padding:7px;border:1px solid #287aa5;border-radius:8px;background:#071d31;color:#f4f8ff}.room-device-settings small{grid-column:1/-1;color:#8ba7bd;font-size:10px}
 .panel-countdown{display:none;position:absolute;left:99px;right:134px;top:41px;height:17px;align-items:center;gap:8px}.panel-countdown>span{height:8px;flex:1;border:1px solid #416175;border-radius:10px;background:#0d202e;box-shadow:inset 0 2px 5px #0008}.panel-countdown time{min-width:29px;color:#edf5ff;font-size:12px;font-weight:800}.player-panel.active-turn .panel-countdown{display:flex}
 .player-panel .turn-timer-bar{top:46px!important;bottom:auto!important;left:100px!important;right:175px!important;height:8px!important;border-radius:9px!important;box-shadow:0 0 9px currentColor;z-index:3!important}
 .panel-pips{position:absolute;left:99px;top:62px;display:flex;gap:8px;margin:0}.panel-pip{position:relative;width:27px;height:27px;border:3px solid #547085;border-radius:50%;background:#0a1b28;box-shadow:inset 0 0 8px #0009;box-sizing:border-box}.panel-pip.home::after{content:"★";position:absolute;inset:0;display:grid;place-items:center;color:white;font-size:14px;text-shadow:0 0 5px #fff}
 .panel-info{position:absolute;left:98px;right:13px;bottom:8px;display:flex;align-items:center;justify-content:space-between;color:#f2f6fb;font-size:13px}.panel-stake{display:flex;align-items:center;gap:7px;white-space:nowrap}.panel-stake svg{width:21px;height:21px;color:#ffd800;filter:drop-shadow(0 0 5px #ffc400)}
 .turn-badge{position:absolute;right:12px;bottom:10px;min-width:104px;padding:8px 13px;border:1px solid #17ee63;border-radius:22px;background:linear-gradient(#08c33e,#007827)!important;box-shadow:0 0 14px #08d84e78;color:#fff!important;font-size:12px;text-align:center;z-index:3}
 .player-panel.empty-seat{--seat:#587184!important;border-color:#476274!important;border-style:dashed!important;background:linear-gradient(120deg,#102331,#07131c);box-shadow:none;opacity:.58}.player-panel.empty-seat::before{display:none}.player-panel.empty-seat .panel-avatar{border-color:#607789;box-shadow:none;color:#9eb0bf}.player-panel.empty-seat .panel-color{background:#536b7b;color:#e6eef4;box-shadow:none}.player-panel.empty-seat .panel-pip{border-color:#455c6d;background:#12222d}.player-panel.empty-seat button{cursor:default;opacity:.58}.player-panel.empty-seat .panel-info{color:#93a5b3}.player-panel.empty-seat .panel-stake svg{color:#7f95a4;filter:none}
}
@media(min-width:1100px) and (max-width:1500px){
 .panel-header{padding-right:94px;padding-left:69px}.panel-avatar{left:9px;top:7px;width:50px;height:50px;border-width:3px}.panel-name{padding-top:4px;font-size:13px}.panel-color{left:7px;top:55px;width:56px;font-size:9px}.panel-audio,.panel-emoji,.panel-mic,.panel-voice{top:7px;width:28px;height:30px;border-radius:8px}.panel-audio{right:66px}.panel-emoji,.panel-mic{right:37px}.panel-voice{right:7px}.panel-audio svg,.panel-emoji svg,.panel-mic svg,.panel-voice svg{width:16px;height:16px}.panel-countdown{left:72px;right:101px;top:35px}.player-panel .turn-timer-bar{top:40px!important;left:73px!important;right:139px!important}.panel-pips{left:72px;top:54px;gap:6px}.panel-pip{width:22px;height:22px;border-width:2px}.panel-info{left:71px;bottom:6px;font-size:10px}.panel-stake svg{width:17px;height:17px}.turn-badge{right:7px;bottom:5px;min-width:72px;padding:5px 7px;font-size:9px}
}

/* Roll controls stay below the board: the action and die share one horizontal tray. */
@media(min-width:1100px){
 #controls{align-items:center;justify-content:center;overflow:hidden}
 #controls #current-player{display:none}
 #controls #current-player{left:0;bottom:7px;z-index:1}
 #controls #dice-value{display:grid;grid-template-columns:minmax(0,1fr) 74px;align-items:stretch;gap:8px;flex:0 0 auto;width:min(100%,240px);height:96px;padding:8px;border:3px solid #21c8ff;border-radius:24px;background:linear-gradient(145deg,#08243d,#020d19);box-shadow:0 0 18px #078de695,inset 0 0 18px #0f8cdd38;box-sizing:border-box}
 #desktop-roll-btn{grid-column:1;grid-row:1;display:flex;min-width:0;min-height:0;width:100%;height:auto;align-items:center;justify-content:center;padding:0 10px;border:2px solid #fff7b0;border-radius:20px;background:linear-gradient(180deg,#fff62f 0%,#ffdf0b 45%,#ffb600 100%);box-shadow:0 0 19px #ffd9009c,inset 0 3px 4px #fff9,inset 0 -5px 8px #cc76004d;color:#061322;font-size:30px;font-weight:950;letter-spacing:.2px}
 #roll-btn{grid-column:2;grid-row:1;width:auto;height:auto;min-width:0;min-height:0;border:3px solid #32cfff;border-radius:18px;background:radial-gradient(circle at 50% 32%,#155980,#05233b 70%,#02101d);box-shadow:0 0 13px #069ef1a8,inset 0 0 13px #158fe65e;overflow:hidden}
 #roll-btn .dice-3d-scene{margin:auto;transform:scale(1);transform-origin:center;filter:drop-shadow(0 4px 6px #0008) drop-shadow(0 0 2px #ffffff88)}
 #roll-btn .dice-side{background:linear-gradient(145deg,#ffffff 0%,#fafafa 52%,#deded9 100%);outline:1px solid #b9b9b2;box-shadow:inset 0 2px 4px #fff,inset 0 -2px 4px #0003}
 #roll-btn .dice-side.front,#roll-btn .dice-side.top{background:linear-gradient(145deg,#fff 0%,#fbfbf8 58%,#e4e4dd 100%)}
 #roll-btn .dice-side .dot{background:radial-gradient(circle at 35% 30%,#454545 0 18%,#161616 45%,#050505 100%);box-shadow:inset 0 1px 1px #ffffff33,0 1px 2px #0009}
 #dice-value:has(#roll-btn:disabled) #desktop-roll-btn{filter:saturate(.55);opacity:.65;cursor:not-allowed}
}
@media(min-width:1100px) and (max-width:1500px){
 #controls #dice-value{grid-template-columns:minmax(0,1fr) 54px;gap:6px;width:min(100%,190px);height:70px;padding:5px;border-radius:19px}
 #desktop-roll-btn{padding:0 8px;border-radius:15px;font-size:23px}
 #roll-btn{border-radius:14px}#roll-btn .dice-3d-scene{margin:auto;transform:scale(.82);transform-origin:center}
 #controls #current-player{bottom:3px;font-size:10px}
}

/* A crisp, centred die face without changing the existing roll animation or state updates. */
@media(min-width:1100px){
 #roll-btn{display:grid;place-items:center}
 #roll-btn .dice-3d-scene{display:none}
 #roll-btn .desktop-flat-die{display:grid;width:42px;height:42px;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);place-items:center;padding:7px;box-sizing:border-box;border:1px solid #d1d1c8;border-radius:10px;background:linear-gradient(145deg,#fff 0%,#fcfcf9 55%,#e6e5dd 100%);box-shadow:inset 0 2px 4px #fff,inset 0 -2px 4px #0003,0 2px 5px #0006}
 #roll-btn .desktop-flat-die.is-rolling{visibility:hidden}
 #roll-btn:has(.desktop-flat-die.is-rolling) .dice-3d-scene{display:grid;place-items:center}
 #roll-btn .desktop-flat-die i{display:block;visibility:hidden;width:6px;height:6px;border-radius:50%;background:radial-gradient(circle at 35% 28%,#424242 0 18%,#1b1b1b 52%,#050505 100%);box-shadow:inset 0 1px 1px #ffffff33,0 1px 2px #0009}
 #roll-btn .desktop-flat-die[data-value="1"] i:nth-child(5),#roll-btn .desktop-flat-die[data-value="2"] i:nth-child(3),#roll-btn .desktop-flat-die[data-value="2"] i:nth-child(7),#roll-btn .desktop-flat-die[data-value="3"] i:nth-child(1),#roll-btn .desktop-flat-die[data-value="3"] i:nth-child(5),#roll-btn .desktop-flat-die[data-value="3"] i:nth-child(9),#roll-btn .desktop-flat-die[data-value="4"] i:nth-child(1),#roll-btn .desktop-flat-die[data-value="4"] i:nth-child(3),#roll-btn .desktop-flat-die[data-value="4"] i:nth-child(7),#roll-btn .desktop-flat-die[data-value="4"] i:nth-child(9),#roll-btn .desktop-flat-die[data-value="5"] i:nth-child(1),#roll-btn .desktop-flat-die[data-value="5"] i:nth-child(3),#roll-btn .desktop-flat-die[data-value="5"] i:nth-child(5),#roll-btn .desktop-flat-die[data-value="5"] i:nth-child(7),#roll-btn .desktop-flat-die[data-value="5"] i:nth-child(9),#roll-btn .desktop-flat-die[data-value="6"] i:nth-child(1),#roll-btn .desktop-flat-die[data-value="6"] i:nth-child(3),#roll-btn .desktop-flat-die[data-value="6"] i:nth-child(4),#roll-btn .desktop-flat-die[data-value="6"] i:nth-child(6),#roll-btn .desktop-flat-die[data-value="6"] i:nth-child(7),#roll-btn .desktop-flat-die[data-value="6"] i:nth-child(9){visibility:visible}
 #roll-btn .dice-3d{transform-origin:50% 50%}
 #roll-btn .dice-side{border-radius:9px;background:linear-gradient(145deg,#fff 0%,#fbfbf8 56%,#e3e3dc 100%);outline:1px solid #aeb4b2;box-shadow:inset 0 2px 4px #fff,inset 0 -2px 4px #0004,0 1px 2px #0004}
 #roll-btn .dice-side .dot{width:6px;height:6px;background:radial-gradient(circle at 35% 30%,#4d4d4d 0 18%,#1d1d1d 48%,#050505 100%);box-shadow:inset 0 1px 1px #ffffff33,0 1px 2px #000b}
}

/* Normal interface copy should not show a text caret; actual fields remain editable. */
body{cursor:default;user-select:none}
button,a,[role="button"],summary{cursor:pointer}input,textarea,select,[contenteditable="true"]{cursor:text;user-select:text}

/* Phone layout: the board has its own row; compact controls never overlap it. */
@media(max-width:1099px){
 #game-screen{display:flex;align-items:center;justify-content:flex-start;gap:9px;min-height:100dvh;height:auto;padding:8px 10px 92px;overflow-x:hidden;overflow-y:auto;background:radial-gradient(ellipse at 50% 42%,#06304b 0,#021724 48%,#010b15 100%)!important;box-sizing:border-box}
 #top-bar{order:0;display:flex;flex-wrap:wrap;gap:7px;width:100%;max-width:760px;margin:0;padding:7px 8px;border:1px solid #12bdf5;border-radius:18px;background:linear-gradient(110deg,#031727,#062941 55%,#020e1b);box-shadow:0 0 15px #008be05c,inset 0 0 18px #087bc528}#top-bar-left,#top-bar-right{display:flex;align-items:center;min-width:0;gap:7px}#top-bar-left{flex:1 1 100%;justify-content:space-between}#top-bar-right{flex:1 1 100%;justify-content:flex-end}
 .game-brand{display:flex;align-items:center;gap:6px;min-width:0;color:#ffdc00;font-weight:950;font-size:22px;line-height:.9;text-transform:uppercase}.game-brand img{width:48px;height:48px;object-fit:contain}.game-brand span{display:flex;flex-direction:column}.game-brand b{color:#fff;font-size:9px;letter-spacing:2.4px;line-height:1.5}
 #tb-room-chip,#tb-pot-chip{display:flex;align-items:center;min-width:0;gap:5px;padding:6px 8px;border-radius:11px;background:#061c30;border:1px solid #2188bd;box-sizing:border-box}#tb-pot-chip{border-color:#ffd900}.tb-chip-icon,.tb-chip-divider,.tb-chip-action{display:inline-flex}.tb-chip-icon{width:18px;height:18px;color:#8edcff}.tb-chip-divider{width:1px;height:27px;background:#226185}.tb-chip-copy{display:flex;flex-direction:column;min-width:0}.chip-label{font-size:8px}.tb-chip-copy strong{font-size:15px;line-height:1.1;overflow:hidden;text-overflow:ellipsis}.tb-chip-action{width:22px;height:22px;align-items:center;justify-content:center;border:0;background:transparent;color:#dff3ff}.tb-chip-action svg{width:17px}#tb-room-chip{flex:1 1 92px;max-width:134px}#tb-pot-chip{flex:1 1 106px;max-width:150px}#tb-pot{font-size:14px}
 #tb-player-chip{display:inline-flex;align-items:center;justify-content:center;gap:5px;width:39px;height:39px;border:1px solid #168fc8;border-radius:11px;background:#06213a;color:#edf7ff;font-size:12px}#tb-player-chip svg{width:18px}#top-bar-right .online-badge{margin-right:auto;height:36px;padding:0 10px;font-size:12px}.online-badge::before{width:8px;height:8px}#mute-btn,#music-btn,#settings-btn{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border:1px solid #168fc8;border-radius:11px;background:#08243c;color:#fff}#mute-btn svg,#music-btn svg,#settings-btn svg{width:20px;height:20px}#game-leave-btn{display:inline-flex;order:4;align-items:center;justify-content:center;gap:5px;height:40px;padding:0 13px;border:1px solid #ff4461;border-radius:11px;background:linear-gradient(#ff3450,#e90028);color:#fff;font-weight:900;font-size:15px}#game-leave-btn svg{width:19px}
 #player-panels{order:1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;max-width:760px;margin:0;gap:8px;overflow:visible}.player-panel{min-width:0;min-height:132px;margin:0;padding:10px 9px 8px;border:2px solid var(--seat,#11bdf3)!important;border-radius:17px;background:radial-gradient(ellipse at 30% 0,#0c2d47,#041522 78%);box-shadow:inset 0 0 20px color-mix(in srgb,var(--seat,#11bdf3) 10%,transparent),0 0 9px color-mix(in srgb,var(--seat,#11bdf3) 20%,transparent);box-sizing:border-box;--seat:#0bbfff}.player-panel[data-color=red]{--seat:#ff1d45}.player-panel[data-color=yellow]{--seat:#ffd814}.player-panel[data-color=green]{--seat:#08db75}.player-panel.empty-seat{border-style:dashed!important;opacity:.55;box-shadow:none}
 .panel-header{min-height:55px;padding-left:60px;padding-right:44px;align-items:flex-start;gap:3px}.panel-avatar{position:absolute;top:11px;left:10px;width:52px;height:52px;border:3px solid var(--seat);font-size:20px;box-shadow:0 0 9px color-mix(in srgb,var(--seat) 55%,transparent)}.panel-name{padding-top:3px;font-size:13px;line-height:1.1}.panel-you{position:absolute;top:31px;left:68px;padding:3px 8px;font-size:9px}.panel-color{display:block;position:absolute;top:65px;left:10px;min-width:50px;padding:4px 5px;border-radius:11px;background:var(--seat);color:#06121f;font-size:10px;font-weight:950;text-align:center}.panel-audio,.panel-emoji,.panel-mic,.panel-voice{display:flex;position:absolute;top:10px;width:31px;height:34px;align-items:center;justify-content:center;border:1px solid #2b759e;border-radius:9px;background:#08243d;color:#eaf7ff}.panel-audio{right:9px}.panel-emoji{right:44px}.panel-mic{right:9px}.panel-voice{right:44px}.panel-audio svg,.panel-emoji svg,.panel-mic svg,.panel-voice svg{width:17px;height:17px}.panel-countdown{display:flex;position:absolute;top:56px;left:68px;right:45px;align-items:center;gap:6px;color:#eef6ff;font-weight:850;font-size:12px}.panel-countdown i{display:block;flex:1;height:9px;overflow:hidden;border:1px solid #2b607f;border-radius:8px;background:#061827}.panel-countdown i b{display:block;width:var(--turn-progress,0%);height:100%;border-radius:inherit;background:linear-gradient(90deg,#ff9012,#dfff21);box-shadow:0 0 8px #dfff21}.panel-pips{position:absolute;top:86px;left:68px;gap:6px;padding:0}.panel-pip{width:20px;height:20px;border-width:2px}.panel-info{position:absolute;right:9px;bottom:9px;left:10px;font-size:11px;color:#eef6ff}.panel-stake{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.turn-badge{position:absolute;right:9px;bottom:8px;padding:6px 8px;border:1px solid #21e75a;border-radius:15px;background:linear-gradient(#08bb43,#006522);color:#fff;font-size:10px}.panel-info:has(.turn-badge) .panel-stake{max-width:calc(100% - 80px)}
 #game-container{order:2;flex:0 0 auto;width:min(100%,700px);height:auto!important;min-height:0;margin:2px auto 0;filter:drop-shadow(0 0 6px #f4cb0066)}
 #desktop-game-activity{order:3;display:block;width:100%;max-width:760px;min-width:0;margin:0;padding:0;border:0;background:none;overflow:visible}.desktop-room-audio{display:none}.desktop-recent-moves{display:flex;align-items:center;min-height:50px;padding:0 10px;border:1px solid #12a9e5;border-radius:14px;background:linear-gradient(90deg,#062740,#041624);box-shadow:inset 0 0 14px #0676bd24;color:#edf6ff;box-sizing:border-box;overflow:hidden}.desktop-recent-moves h2{display:flex;align-items:center;flex:0 0 auto;gap:6px;margin:0 10px 0 0;font-size:0;white-space:nowrap}.desktop-recent-moves h2::before{content:'Recent Move';font-size:13px}.desktop-recent-moves h2 svg{width:20px;height:20px;color:#8cdcff}#desktop-activity-list{display:block;min-width:0;flex:1;margin:0;padding:0;list-style:none}#desktop-activity-list li{display:none}#desktop-activity-list li:first-child{display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;gap:7px;min-height:36px;border:0;color:#edf5ff;font-size:12px}#desktop-activity-list li>span{font-size:17px}#desktop-activity-list b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#desktop-activity-list time{font-size:11px;color:#bfd0e5}.desktop-recent-moves::after{content:'›';margin-left:8px;font-size:34px;line-height:1;color:#ecf8ff}
 #controls{order:4;display:flex;width:100%;min-height:70px;margin:0;padding:0;align-items:center;justify-content:center;background:none}#controls #current-player{display:none}#controls #dice-value{display:grid;grid-template-columns:minmax(0,1fr) 68px;gap:7px;width:222px;height:72px;padding:5px;border:2px solid #27caff;border-radius:22px;background:linear-gradient(145deg,#082b46,#03111e);box-shadow:0 0 14px #078fe285,inset 0 0 14px #118bdc38;box-sizing:border-box}#desktop-roll-btn{display:flex;grid-column:1;align-items:center;justify-content:center;min-width:0;padding:0;border:2px solid #fff4a9;border-radius:16px;background:linear-gradient(#fff431,#ffb900);box-shadow:inset 0 2px 4px #fff9,0 0 13px #ffd6007d;color:#061322;font-size:24px;font-weight:950}#roll-btn{display:grid;grid-column:2;place-items:center;width:auto;height:auto;min-width:0;min-height:0;border:2px solid #29ccff;border-radius:15px;background:#082941;overflow:hidden}#roll-btn .dice-3d-scene{transform:scale(.78);transform-origin:center}
 #fab-group{position:fixed;z-index:190;right:10px;bottom:max(8px,env(safe-area-inset-bottom));left:10px;display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:stretch;padding:0;background:transparent}#chat-fab-wrap{position:static;display:contents}#chat-fab,#mobile-audio-fab{display:flex;align-items:center;justify-content:center;gap:10px;min-height:55px;border:1px solid #20bdf5;border-radius:16px;background:linear-gradient(145deg,#082e4c,#041625);box-shadow:0 0 12px #087fcc55;color:#f3f8ff;font-size:17px;font-weight:850}#chat-fab{font-size:0}#chat-fab::before{content:'💬';font-size:24px}#chat-fab::after{content:'Messages';font-size:17px}#mobile-audio-fab{grid-column:2;grid-row:1}#mobile-audio-fab svg{width:27px;height:27px}#mobile-audio-fab b{width:10px;height:10px;border-radius:50%;background:#31ec9a;box-shadow:0 0 10px #31ec9a}#emoji-fab-wrap,#emoji-fab{display:none!important}
 .mobile-audio-open .desktop-room-audio{display:block;position:fixed;z-index:180;right:10px;bottom:75px;left:10px;width:auto;margin:0;padding:11px;border:1px solid #1297ca;border-radius:16px;background:linear-gradient(145deg,#062741,#031321);box-shadow:0 8px 35px #000b;color:#edf6ff}.mobile-audio-open .desktop-room-audio h2{display:flex;align-items:center;gap:7px;margin:0 0 9px;font-size:16px}.mobile-audio-open .desktop-room-audio h2 em{display:flex;align-items:center;gap:5px;margin-left:auto;color:#47ed9b;font-size:12px;font-style:normal}.mobile-audio-open .desktop-room-audio h2 em span{width:8px;height:8px;border-radius:50%;background:#47ed9b}.mobile-audio-open .room-audio-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.mobile-audio-open .room-audio-actions button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:50px;padding:4px 2px;border:1px solid #168fd1;border-radius:10px;background:#082b47;color:#fff;font-size:10px;font-weight:750}.mobile-audio-open .room-audio-actions button svg{width:20px;height:20px}.mobile-audio-open .room-audio-actions [data-room-mic]{border-color:#0be890;background:#07523d}.mobile-audio-open .room-audio-actions [data-room-sound="off"]{border-color:#ff4b65;background:#3e1d31}.mobile-audio-open .room-audience{margin-top:8px;padding-top:7px;border-top:1px solid #1d648a}.mobile-audio-open .room-audience h3{margin:0 0 5px;font-size:12px}.mobile-audio-open #room-audience-choices{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}.mobile-audio-open #room-audience-choices button{display:flex;align-items:center;justify-content:center;gap:4px;min-height:31px;border:1px solid #2684b4;border-radius:9px;background:#0a2942;color:#d9edff;font-size:11px}.mobile-audio-open #room-audience-choices button.active{border-color:#1db6f2;background:#0b4776;color:#fff}#status-bar{display:none}
}
@media(max-width:480px){#game-screen{gap:8px;padding-inline:8px}.game-brand{font-size:20px}.game-brand img{width:44px;height:44px}.game-brand b{font-size:8px}#tb-room-chip{max-width:112px}#tb-pot-chip{max-width:132px}.tb-chip-copy strong{font-size:13px}#top-bar-right .online-badge{padding:0 8px;font-size:11px}#mute-btn,#music-btn,#settings-btn{width:35px;height:35px}#game-leave-btn{height:37px;padding:0 10px;font-size:14px}.player-panel{min-height:124px;padding:8px}.panel-header{min-height:51px;padding-left:55px;padding-right:39px}.panel-avatar{top:9px;left:8px;width:47px;height:47px}.panel-name{font-size:12px}.panel-color{top:58px;left:8px}.panel-audio,.panel-emoji,.panel-mic,.panel-voice{top:8px;width:28px;height:31px}.panel-audio,.panel-mic{right:8px}.panel-emoji,.panel-voice{right:39px}.panel-countdown{top:53px;left:62px;right:40px}.panel-pips{top:81px;left:62px;gap:5px}.panel-pip{width:18px;height:18px}.panel-info{right:8px;bottom:8px;left:8px;font-size:10px}.turn-badge{right:8px;bottom:7px;font-size:9px;padding:5px 7px}.panel-you{top:28px;left:62px}#controls #dice-value{width:206px;height:68px;grid-template-columns:minmax(0,1fr) 63px}#desktop-roll-btn{font-size:22px}#roll-btn .dice-3d-scene{transform:scale(.72)}}

/* Tight phone refinement: header is one deliberate row; account actions live in Settings. */
@media(max-width:1099px){
 #top-bar{flex-wrap:nowrap;min-height:64px;padding:6px;gap:6px}#top-bar-left,#top-bar-right{display:contents}
 .game-brand{flex:0 0 104px;font-size:18px;gap:4px}.game-brand img{width:42px;height:42px}.game-brand b{font-size:7px;letter-spacing:1.8px}
 #tb-room-chip{display:none}#tb-pot-chip{flex:1 1 132px;max-width:none;padding:5px 6px}.tb-chip-icon{width:16px;height:16px}.tb-chip-divider,.tb-chip-action{display:none}.tb-chip-copy strong{font-size:13px}.chip-label{font-size:7px}
 #mute-btn,#music-btn,#game-leave-btn{display:none!important}#tb-player-chip{display:inline-flex;flex:0 0 39px;width:39px;height:34px;border:1px solid #178ccc;border-radius:11px;background:#061d32;color:#f2f8ff;font-size:12px}#tb-player-chip svg{width:18px}#tb-online{flex:0 0 auto;height:34px;padding:0 8px;font-size:10px}#settings-btn{flex:0 0 35px;width:35px;height:35px;border-radius:10px}#settings-btn svg{width:19px;height:19px}
 .player-panel{min-height:108px;padding:7px 8px 6px;border-radius:14px}.panel-header{min-height:44px;padding-left:48px;padding-right:34px}.panel-avatar{top:8px;left:8px;width:39px;height:39px;border-width:2px;font-size:16px}.panel-name{padding-top:2px;font-size:11px}.panel-color{top:49px;left:8px;min-width:39px;padding:3px 4px;font-size:8px}.panel-audio,.panel-emoji,.panel-mic,.panel-voice{top:7px;width:26px;height:28px;border-radius:8px}.panel-audio,.panel-mic{right:7px}.panel-emoji,.panel-voice{right:35px}.panel-countdown{top:47px;left:53px;right:36px;gap:4px;font-size:10px}.panel-countdown i{height:7px}.panel-pips{top:70px;left:53px;gap:5px}.panel-pip{width:16px;height:16px}.panel-info{right:7px;bottom:7px;left:8px;font-size:9px}.turn-badge{right:7px;bottom:6px;padding:4px 6px;border-radius:12px;font-size:8px}.panel-you{top:25px;left:53px;padding:2px 6px;font-size:8px}
 #game-container{width:min(100%,700px);aspect-ratio:1/1;height:auto!important;min-height:0}
}

@media(max-width:1099px){
 #tb-pot{font-size:0}#tb-pot::after{content:attr(data-mobile-amount);font-size:13px}
}

/* The compact version keeps the full reference header in one 54px row. */
@media(max-width:600px){
 #top-bar{min-height:54px;padding:5px;gap:4px;border-radius:15px}
 .game-brand{flex:0 0 78px;gap:3px;font-size:15px}.game-brand img{width:35px;height:35px}.game-brand b{font-size:6px;letter-spacing:1.45px}
 #tb-room-chip{display:none}#tb-pot-chip{flex:1 1 104px;padding:4px 6px;border-radius:9px}.tb-chip-icon{width:13px;height:13px}.tb-chip-copy strong{font-size:11px}.chip-label{font-size:6px}
 #tb-player-chip{flex-basis:29px;width:29px;height:30px;padding:0;border-radius:9px;font-size:9px}#tb-player-chip svg{width:14px}#tb-online{height:30px;padding:0 6px;border-radius:9px;font-size:9px;gap:4px}.online-badge::before{width:6px;height:6px}#settings-btn{flex-basis:31px;width:31px;height:31px;border-radius:9px}#settings-btn svg{width:17px;height:17px}
}

/* Match the reference hierarchy on wider phones without turning it into a desktop header. */
@media(min-width:480px) and (max-width:1099px){
 #top-bar{min-height:66px;padding:6px 8px;gap:7px;border-radius:17px}
 .game-brand{flex-basis:112px;font-size:20px;gap:5px}.game-brand img{width:46px;height:46px}.game-brand b{font-size:8px;letter-spacing:2px}
 #tb-pot-chip{flex-basis:132px;padding:7px 9px;border-radius:12px}.tb-chip-icon{width:19px;height:19px}.tb-chip-copy strong,#tb-pot::after{font-size:15px}.chip-label{font-size:8px}
 #tb-player-chip{flex-basis:42px;width:42px;height:39px;border-radius:12px;font-size:12px}#tb-player-chip svg{width:20px}#tb-online{height:39px;padding:0 10px;border-radius:12px;font-size:12px}.online-badge::before{width:8px;height:8px}#settings-btn{flex-basis:40px;width:40px;height:40px;border-radius:12px}#settings-btn svg{width:22px;height:22px}
}

/* Header groups stay at their natural width: the empty centre is deliberate space. */
@media(max-width:1099px){
 #top-bar{justify-content:space-between}
 #top-bar-left,#top-bar-right{display:contents}
 .game-brand{flex:0 0 auto}#tb-pot-chip{flex:0 0 auto;max-width:none;margin-left:auto}#tb-online{margin-right:0!important}
}
@media(max-width:600px){#tb-pot-chip{flex-basis:auto}}

/* Final phone card scale — placed last so earlier desktop/mobile rules cannot enlarge it. */
@media(max-width:1099px){
 #player-panels{grid-auto-rows:96px;gap:7px}
 .player-panel{height:96px;min-height:96px;padding:6px 7px;border-radius:13px}
 .panel-header{min-height:39px;padding-left:44px;padding-right:32px}.panel-avatar{top:7px;left:7px;width:35px;height:35px;border-width:2px;font-size:14px}.panel-name{padding-top:1px;font-size:10px}.panel-color{top:43px;left:7px;min-width:37px;padding:3px 4px;border-radius:9px;font-size:8px}.panel-you{top:23px;left:48px;padding:2px 5px;font-size:7px}
 .panel-audio,.panel-emoji,.panel-mic,.panel-voice{top:6px;width:24px;height:26px;border-radius:7px}.panel-audio,.panel-mic{right:6px}.panel-emoji,.panel-voice{right:33px}.panel-audio svg,.panel-emoji svg,.panel-mic svg,.panel-voice svg{width:14px;height:14px}
 .panel-countdown{top:42px;left:48px;right:34px;gap:4px;font-size:9px}.panel-countdown i{height:6px}.panel-pips{top:61px;left:48px;gap:4px}.panel-pip{width:15px;height:15px;border-width:1.5px}.panel-info{right:7px;bottom:6px;left:7px;font-size:8px}.panel-stake{gap:3px}.panel-stake svg{width:12px;height:12px}.turn-badge{right:6px;bottom:5px;padding:3px 5px;border-radius:10px;font-size:7px}.panel-info:has(.turn-badge) .panel-stake{max-width:calc(100% - 62px)}
}
@media(max-width:480px){#player-panels{grid-auto-rows:92px;gap:6px}.player-panel{height:92px;min-height:92px}.panel-pips{top:58px}.panel-info{bottom:5px}}
