/* Phone/tablet menu layout; gameplay controls retain their dedicated touch layout. */
@media(max-width:1000px){
body:not(.playing) .masthead{grid-template-columns:minmax(0,1fr);padding:12px max(12px,env(safe-area-inset-right)) 14px;gap:12px}
body:not(.playing) .masthead .wordmark{grid-column:1;grid-row:1;justify-self:center}
body:not(.playing) .masthead #account-presence{grid-column:1;grid-row:2;justify-self:center;display:flex;flex-wrap:wrap;justify-content:center;gap:8px 14px}
body:not(.playing) .masthead .header-actions{grid-column:1;grid-row:3;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:7px;align-items:stretch}
body:not(.playing) .header-actions .icon-button,body:not(.playing) .masthead #upgrades{min-height:44px;font-size:12px;padding:7px 4px}
body:not(.playing) .header-actions #version-tag{align-self:stretch;justify-content:center;padding:4px;gap:3px;white-space:normal}
body:not(.playing) .header-actions #version-tag .version-value{font-size:8px;white-space:normal;text-align:center}
body:not(.playing) .header-actions #version-tag .early-beta{font-size:10px}
body:not(.playing) .header-actions #version-tag #open-changelog{font-size:10px;padding:4px}
body:not(.playing) #account-identity{justify-content:center;flex-wrap:wrap;max-width:100%}body:not(.playing) #account-playing{max-width:150px;overflow-wrap:anywhere}
body:not(.playing) #lobby{padding-bottom:110px}body:not(.playing) #menu-navigation{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
body:not(.playing) .menu-card strong{font-size:19px}body:not(.playing) .menu-card-note{font-size:12px}body:not(.playing) .menu-card b{font-size:10px;letter-spacing:0;line-height:1.4}
body:not(.playing) #menu-quote{font-size:clamp(23px,4.8vw,31px);line-height:1.2;letter-spacing:0}
body:not(.playing) .panel-heading{flex-wrap:wrap}body:not(.playing) .map-picker{grid-template-columns:repeat(2,minmax(0,1fr))}body:not(.playing) .player-setup{min-width:0}
body:not(.playing) #online-panel .online-title{gap:8px}body:not(.playing) #online-panel .online-title h2{font-size:22px}
body:not(.playing) #online-entry{display:grid;grid-template-columns:1fr;gap:10px}body:not(.playing) #online-entry button{min-height:44px;width:100%}
#queue-settings,#community-dialog,#presence-stats,#account-dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);box-sizing:border-box;overflow:auto}
#community-dialog header,#presence-stats header{gap:8px}#community-dialog h2,#presence-stats h2{font-size:24px}.community-player{overflow-wrap:anywhere}
#chat-panel,#global-chat.expanded #chat-panel{max-height:calc(var(--chat-viewport,100dvh) - 110px);width:min(360px,calc(100vw - 20px))}
#global-chat.expanded #chat-panel{width:min(620px,calc(100vw - 20px));height:calc(var(--chat-viewport,100dvh) - 110px)}
#global-chat{bottom:calc(max(10px,env(safe-area-inset-bottom)) + var(--chat-keyboard,0px))}
#chat-close,#chat-expand,#chat-form button{min-height:44px;min-width:44px}#chat-panel header{padding:5px 10px}#chat-toggle{min-height:44px}#chat-input{font-size:16px}
}
@media(max-width:360px){body:not(.playing) .wordmark-title{font-size:15px}body:not(.playing) .menu-card strong{font-size:17px}body:not(.playing) .header-actions #version-tag{grid-template-columns:1fr}body:not(.playing) .header-actions #version-tag .version-value{grid-column:1}body:not(.playing) .header-actions #version-tag .early-beta{text-align:center}}
@media(max-height:500px) and (min-width:600px) and (max-width:1000px){body:not(.playing) .masthead{grid-template-columns:1fr 1fr;padding-top:8px;gap:8px}body:not(.playing) .masthead .wordmark{grid-column:1;justify-self:start}body:not(.playing) .masthead #account-presence{grid-column:2;grid-row:1;flex-direction:column;gap:4px}body:not(.playing) .masthead .header-actions{grid-column:1/-1;grid-row:2;grid-template-columns:repeat(6,minmax(0,1fr))}body:not(.playing) #menu-navigation{grid-template-columns:repeat(4,minmax(0,1fr))}body:not(.playing) .menu-card strong{font-size:17px}body:not(.playing) #lobby{padding-top:12px}body:not(.playing) #menu-quote{font-size:23px}#chat-status{font-size:11px}}
