/* Active play is a stage, not a dashboard. Lobby controls remain accessible. */
body:not([data-phase="lobby"])[data-phase] #tvBadge{display:none}
body:not([data-phase="lobby"])[data-phase] #app{padding:0;max-width:none}
body:not([data-phase="lobby"])[data-phase] #app main{display:grid;place-items:center;min-height:100dvh;margin:0}
body:not([data-phase="lobby"])[data-phase] .gameColumn{width:100%;margin:0;position:relative}
body:not([data-phase="lobby"])[data-phase] .gamewrap{width:min(100vw,200dvh);max-width:none;margin:auto;border:0;border-radius:0;box-shadow:none;line-height:0}
body:not([data-phase="lobby"])[data-phase] #game{display:block;width:100%;height:auto;aspect-ratio:2/1}
body:not([data-phase="lobby"])[data-phase] #app aside,body:not([data-phase="lobby"])[data-phase] #scorebar,body:not([data-phase="lobby"])[data-phase] #phaseBanner,body:not([data-phase="lobby"])[data-phase] #controlsHint,body:not([data-phase="lobby"])[data-phase] #killfeed,body:not([data-phase="lobby"])[data-phase] #playPanel{display:none!important}
body:not([data-phase="lobby"])[data-phase] #app header{position:fixed;right:12px;top:12px;z-index:20;min-height:0;padding:0;background:none;border:0;box-shadow:none;gap:6px}
body:not([data-phase="lobby"])[data-phase] #app header>*{display:none}
body:not([data-phase="lobby"])[data-phase] #app header>div:last-child{display:flex;gap:6px}
body:not([data-phase="lobby"])[data-phase] #app header #ping,body:not([data-phase="lobby"])[data-phase] #app header #inviteBtn{display:none}
body:not([data-phase="lobby"])[data-phase] #app header #settingsBtn,body:not([data-phase="lobby"])[data-phase] #app header #leaveBtn{display:block;background:#423b44ba;color:#fff0d2;border:0;box-shadow:none}
body[data-phase="scoring"][data-phase] #playPanel,body[data-phase="gameover"][data-phase] #playPanel{display:block!important;position:absolute;z-index:5;left:50%;top:50%;transform:translate(-50%,-50%) rotate(-1deg);width:min(560px,85vw);max-height:80dvh;overflow:auto;padding:24px;background:#f6e9cfeF;border:3px solid #554443;box-shadow:10px 12px #1c293644}
body.needsCharacter:not([data-phase="lobby"]) #playPanel{display:block!important;position:absolute;left:5%;right:5%;top:auto;bottom:4%;width:auto;transform:none;z-index:6;background:#f6e9cfeb;max-height:45dvh;overflow:auto}

/* V45 physical lobby: the stage itself is the menu */
body.inLobby #app aside,
body.inLobby #playPanel,
body.inLobby #mapGallery,
body.inLobby .flowStrip{display:none!important}
body.inLobby #app main{display:block!important}
body.inLobby .gameColumn{width:100%!important;max-width:none!important}
body.inLobby .gamewrap{width:100%!important;max-width:none!important;margin:0!important}
body.inLobby #game{width:100%!important;max-width:none!important}
body[data-phase="partybox"] #touchPickup{display:none!important}

/* V48 cinematic round ending */
body[data-phase="scoring"] #playPanel,
body[data-phase="gameover"] #playPanel{display:none!important}

/* V51 visual finish: cut-paper UI instead of straight boxed borders */
:root{--rough-paper:polygon(1% 2%,18% 0,43% 1.5%,67% .4%,98% 2%,100% 24%,99% 56%,100% 94%,83% 100%,58% 98.5%,30% 100%,1% 97%,0 71%,1.2% 39%)}
button,.paperPanel,.roomShelf,.modernModal,.menuPaper,.partyBoard,.partyPick,.roomCard{border:0!important;clip-path:var(--rough-paper);box-shadow:0 1px 0 #443d3522,4px 6px 0 #2e2a2630!important}
button{outline:1px solid transparent}
.gamewrap{border:0!important;box-shadow:0 14px 34px #18262645!important}
#phaseBanner,#controlsHint{border:0!important;clip-path:var(--rough-paper);box-shadow:3px 4px 0 #312b2630!important}
.inLobby .gameColumn:before{display:none!important}
body.inLobby #app{background:linear-gradient(#445d68,#889b91 56%,#b8ab89)!important}
body.inLobby #app header{background:#304a52cc!important;backdrop-filter:blur(4px)}
