/* Compact panels, predictable button alignment, and readable scrolling content. */
body.referenceHUD #globalChat{width:min(350px,calc(100vw - 20px))!important}
body.referenceHUD #chatPanel{height:min(270px,calc(100dvh - 86px))!important;padding:9px!important;gap:7px}
#chatPanel>.chatHead>strong{font-size:15px!important;gap:5px}#chatPanel>.chatHead{padding-bottom:7px!important}
#chatPanel .globalMessageAvatar{width:28px!important;height:28px!important}#chatPanel #chatMessages .chatMessage{gap:7px;margin-bottom:9px!important}
#chatPanel .chatPlayerName{height:auto!important;min-height:18px!important;max-height:none!important;line-height:1.35!important;font-size:12px!important;overflow:visible;max-width:75%;white-space:normal;overflow-wrap:anywhere}
.chatMessageHead{flex-wrap:wrap;gap:4px}.chatMessageBubble{padding:6px 8px;font-size:12px}.globalMessageTime{font-size:9px}
body.referenceHUD #friendsPanel{width:min(510px,calc(100vw - 24px))!important;height:min(420px,calc(100dvh - 72px))!important;max-height:calc(100dvh - 72px)!important}
#friendsPanel>.dialogHead{padding:9px 12px!important}#friendsPanel>.dialogHead h2{font-size:19px!important;line-height:1.4!important;margin:0!important}
#friendsPanel #friendsTabs{gap:6px!important;margin:8px 10px 4px!important}#friendsPanel #friendsTabs button{padding:5px!important;font-size:12px!important}
#friendsPanel #friendSearch{margin:5px 10px 8px!important;gap:7px}#friendSearch .gameSelectTrigger{flex-basis:84px}#friendNewGroup{font-size:11px!important;padding-inline:6px!important}
#friendsPanel .friendMessages{margin-inline:10px!important;padding:10px!important}#friendsPanel .friendCompose{margin:7px 10px 10px!important;gap:6px;padding:6px!important;flex-wrap:wrap}
#friendsPanel .friendCompose textarea{flex:1 1 160px!important;min-width:80px!important;line-height:21px!important}#friendsPanel .friendCompose .voiceRecordHold{font-size:0!important;min-width:32px!important;width:32px!important;max-width:32px!important;padding:6px!important}#friendsPanel .friendCompose .voiceRecordHold::before{margin:0!important}
#friendsPanel .friendRoomHead>h3{line-height:1.4!important;min-width:0;white-space:normal!important;overflow-wrap:anywhere}
#friendsBody .conversationCard>button{height:auto!important;min-height:66px!important;max-height:none!important}.conversationCard strong{white-space:normal!important;overflow-wrap:anywhere;line-height:1.35}.conversationCard .conversationPreview{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.referenceHUD #accountDialog{width:min(580px,calc(100vw - 24px))!important;height:min(440px,calc(100dvh - 28px))!important}
#accountSettings{grid-template-columns:112px minmax(0,1fr)!important}#accountPageTabs{padding:9px 6px!important}#accountPageTabs button{font-size:12px!important;padding:5px!important;gap:5px!important}#accountPageTabs .previewIcon{width:21px!important;height:21px!important}
#accountDialog>.dialogHead{padding:10px 12px!important}#accountDialog>.dialogHead h2{font-size:20px!important;display:flex;align-items:center;margin:0!important;line-height:1.4!important}
#accountPageBody{padding:11px 12px!important}body.referenceHUD #accountDialog .accountProfileHead{gap:10px!important}body.referenceHUD #accountDialog .accountAvatarFrame{width:62px!important;height:62px!important;flex:0 0 62px!important}body.referenceHUD #accountDialog #accountAvatar{width:62px!important;height:62px!important}#accountHeading{font-size:18px!important;line-height:1.4!important}#accountUsernameText{font-size:12px!important}.accountJoinedCard{min-width:75px;padding:6px;font-size:10px}.accountJoinedCard time{font-size:10px}
.accountActionRow{height:auto!important;min-height:42px!important;max-height:none!important;line-height:1.4!important;flex-wrap:wrap}.accountActionRow strong{white-space:normal;line-height:1.4;overflow-wrap:anywhere}.accountPageFooter{padding:7px 12px!important}.accountInfoRow strong{overflow-wrap:anywhere;white-space:normal!important;text-overflow:clip!important}.accountDangerActions>button{height:auto!important;min-height:59px!important;max-height:none!important;white-space:normal!important}
body.referenceHUD #chatPlayerProfile,body.referenceHUD .playerProfileView{width:min(360px,calc(100vw - 24px))!important;max-width:calc(100vw - 24px)!important}
body.referenceHUD #settingsDialog{width:min(570px,calc(100vw - 28px))!important;max-width:calc(100vw - 28px)!important}
body.referenceHUD #mapDialog{width:min(980px,calc(100vw - 32px))!important;height:min(560px,calc(100dvh - 60px))!important;max-height:calc(100dvh - 60px)!important;padding:12px!important;position:fixed;inset:58px 12px auto auto;margin:0;z-index:105;overflow:hidden}
#mapDialog .mapLayout{grid-template-columns:205px minmax(0,1fr)!important;gap:12px!important}#mapDialog .mapLayout>aside{width:205px!important}#mapDialog .dialogHead h1{font-size:23px!important}#mapDialog #selection{display:grid!important;grid-template-columns:50px minmax(0,1fr)!important;gap:10px 12px!important;padding:12px!important;max-height:44%!important;overflow-y:auto!important}
#mapDialog #mapSelectedPreview{width:50px!important;height:50px!important}#mapDialog .mapSelectedText{min-width:0}#mapDialog .mapSelectedText h2{font-size:19px!important;line-height:1.35!important}#mapDialog .mapSelectedText p{line-height:1.45!important;max-height:none!important;overflow:visible!important;margin:7px 0 0!important}
#mapDialog #mapSelectedStats{grid-column:1/-1;display:flex!important;flex-wrap:wrap;gap:8px 14px;border:0!important;padding:0!important;margin:0!important}#mapDialog #mapSelectedStats>div{display:flex;gap:7px;padding:0!important;flex:1;white-space:nowrap}#mapDialog #mapSelectedStats dd{margin:0}
#mapDialog .mapSelectedActions{grid-column:1/-1;display:flex!important;gap:12px!important;margin-top:6px!important;padding-top:10px!important;border-top:1px solid #72bed955}#mapDialog .mapSelectedActions button{flex:1;height:auto!important;min-height:34px!important;max-height:none!important;white-space:normal!important;padding:6px!important;line-height:1.35!important;font-size:11px!important}
#mapDialog #atlasToolbar{gap:4px!important}#mapDialog #atlasToolbar button{font-size:10px!important;padding:5px!important}#mapDialog .atlasCaption{pointer-events:none;max-width:40%}#mapDialog .atlasCaption small{display:none}#mapDialog #catalog button{min-height:56px!important;padding:7px!important}#mapDialog #catalog b{font-size:12px!important;white-space:normal!important;overflow-wrap:anywhere}#mapDialog #catalog small{font-size:9px!important}#mapDialog #catalog .orb{width:30px!important;height:30px!important}
/* Icons have no asymmetric margins; text shares the same centered flex baseline. */
body.referenceHUD :is(#gameTop,#utilityMenu,#friendsPanel,#accountDialog,#settingsDialog,#mapDialog,.accountSubmenu) button:has(.previewIcon){display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;line-height:1.35!important}
body.referenceHUD .previewIcon{margin:0!important;vertical-align:middle;object-fit:contain;align-self:center;flex-shrink:0;position:static;transform:none}
body.referenceHUD :is(#accountPageTabs,.accountSubmenu) button:has(.previewIcon),body.referenceHUD #accountPageBody .accountActionRow{justify-content:flex-start!important}
#utilityMenu #railSearch{flex-direction:column;gap:4px!important}#utilityMenu #railSearch .previewIcon{width:25px;height:25px}#gameTop button{line-height:1.2!important;contain:layout style}#gameTop .topLeftActions,#gameTop nav{gap:7px!important}#gameTop{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}#fpBalance,#rcBalance{font-variant-numeric:tabular-nums}
.imageViewer[open]{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:#000!important;box-shadow:none!important;display:block!important;overflow:hidden!important}.imageViewer::backdrop{background:#000!important}.imageViewer .imageViewerCanvas{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;overflow:hidden;touch-action:none;background:#000!important}.imageViewer img{max-width:94vw!important;max-height:92dvh!important;object-fit:contain;border:0!important;border-radius:0!important;user-select:none}.imageViewer .imageViewerBar{position:absolute;top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));z-index:2;background:transparent!important;border:0!important;padding:0!important}.imageViewer .imageViewerBar button{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border:0;border-radius:50%;background:#222b;color:#fff;font-size:25px}.imageViewerHint{display:none!important}
.accountSubmenu{width:min(400px,calc(100vw - 28px));max-height:calc(100dvh - 28px);overflow:auto;padding:14px;border:2px solid #a6def5;border-radius:13px;background:#125a7e;color:#fff}.accountSubmenu>.dialogHead{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;gap:12px}.accountSubmenu h2{font-size:20px;margin:0}.accountSubmenu>.dialogHead button{width:32px;height:32px;padding:4px}.accountSubmenu #accountPasswordTools{border:0;padding:0}.accountSubmenu #accountPasswordTools>summary{display:none}.accountSubmenu label{display:grid;gap:6px;margin:10px 0;font-size:13px}.accountSubmenu input{min-width:0;width:100%;height:35px;padding:6px 9px;background:#104a6d;border:1px solid #8ad2ee;border-radius:7px}.accountSubmenu #accountSecurityDetail{margin:0}.accountSubmenu::backdrop{background:#001c3099}
#walkJump,#walkRun{display:flex!important;align-items:center;justify-content:center;padding:10px!important;line-height:1}#walkJump img,#walkRun img{width:55%;height:55%;max-width:42px;max-height:42px;pointer-events:none}
#pilotStatus{background:linear-gradient(90deg,#d0ae4e var(--xp-fill,0%),#206486 var(--xp-fill,0%))!important;font-variant-numeric:tabular-nums;font-size:12px!important;line-height:1.3!important}
#debugVerifiedPage form{display:flex;gap:10px;margin:12px 0}#debugVerifiedPage input{flex:1;min-width:0}#debugVerifiedList article{display:flex;align-items:center;gap:10px;padding:10px;border-bottom:1px solid #82bad766}#debugVerifiedList img{width:35px;height:35px;border-radius:50%;object-fit:cover}#debugVerifiedList span{flex:1;min-width:0;overflow-wrap:anywhere}#debugVerifiedList .verifiedBadge img{width:18px!important;height:18px!important}
@media(max-height:480px){body.referenceHUD #friendsPanel{height:calc(100dvh - 60px)!important;max-height:calc(100dvh - 60px)!important;width:min(490px,calc(100vw - 24px))!important}body.referenceHUD #accountDialog{width:min(550px,calc(100vw - 24px))!important}body.referenceHUD #mapDialog{height:calc(100dvh - 70px)!important;max-height:calc(100dvh - 70px)!important;width:min(740px,calc(100vw - 80px))!important}#mapDialog #selection{max-height:48%!important;grid-template-columns:minmax(0,1fr)!important}#mapDialog #mapSelectedPreview,#mapDialog .mapSelectedText p,#mapDialog #mapSelectedStats{display:none!important}#mapDialog .mapSelectedActions{gap:10px!important;margin-top:0!important;padding-top:7px!important}#mapDialog .mapLayout{grid-template-columns:180px minmax(0,1fr)!important}#mapDialog .mapLayout>aside{width:180px!important}#mapDialog .atlasCaption{display:none!important}}
@media(max-width:580px){#accountSettings{grid-template-columns:88px minmax(0,1fr)!important}#accountPageTabs button{font-size:11px!important;gap:4px!important}#accountPageTabs .previewIcon{width:18px!important;height:18px!important}.accountJoinedCard{display:none}#friendsPanel #friendSearch{flex-wrap:wrap!important}#mapDialog .mapLayout{grid-template-columns:140px minmax(0,1fr)!important}#mapDialog .mapLayout>aside{width:140px!important}#mapDialog .atlasCaption{display:none}#mapDialog #atlasToolbar{flex-wrap:wrap}#mapDialog #selection{grid-template-columns:minmax(0,1fr)!important}#mapDialog #mapSelectedPreview{display:none}}
body.referenceHUD #accountDialog .accountAvatarFrame,body.referenceHUD #accountDialog #accountAvatar{min-width:62px!important}body.referenceHUD #accountDialog #accountHeading{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere}
body.referenceHUD #mapDialog #selection{max-height:44%!important;overflow-y:auto!important;height:auto!important;min-height:0}body.referenceHUD #mapDialog #selection p{max-height:none!important;overflow:visible!important}
@media(max-height:480px){body.referenceHUD #mapDialog #selection{max-height:48%!important}}
body.referenceHUD #mapDialog .atlas{display:grid!important;grid-template-rows:minmax(100px,1fr) auto!important;min-height:0!important}
body.referenceHUD #mapDialog #selection{position:relative!important;inset:auto!important;grid-row:2!important;max-height:220px!important;height:auto!important;overflow-y:auto!important;margin:0!important;align-self:stretch!important}
body.referenceHUD #mapDialog .mapSelectedActions{min-height:44px;flex-shrink:0}
@media(max-height:480px){body.referenceHUD #mapDialog #selection{max-height:120px!important}body.referenceHUD #mapDialog #selection p{display:none!important}body.referenceHUD #mapDialog #mapSelectedStats{display:none!important}body.referenceHUD #mapDialog .mapSelectedActions{min-height:38px}}
body.referenceHUD #mapDialog{z-index:200!important}body.referenceHUD #mapDialog .mapSelectedActions{align-items:stretch!important}body.referenceHUD #mapDialog .mapSelectedActions button{margin:0!important;align-self:stretch!important}
@media(max-height:480px) and (min-width:650px){body.referenceHUD #mapDialog{width:min(650px,calc(100vw - 170px))!important}}
body.referenceHUD :is(#settingsDialog,#accountPageBody,.accountSubmenu) button:not(.accountAvatarEdit):not(.accountFieldEdit):not(#accountShowEmail):not(#accountShowUid):not(#accountCopyUid):not(#accountEditUsername){white-space:normal!important;overflow:visible!important;text-overflow:clip!important;line-height:1.35!important;height:auto!important;min-height:34px!important;max-height:none!important;overflow-wrap:anywhere}
body.referenceHUD #settingsDialog .settingsFooter .sessionActions{flex-wrap:wrap!important}body.referenceHUD #settingsDialog .settingsFooter{height:auto!important;min-height:58px!important;max-height:none!important}body.referenceHUD #settingsDialog label{min-width:0;line-height:1.4;overflow-wrap:anywhere}#friendsPanel .messageSender{height:auto!important;min-height:24px!important;max-height:none!important;white-space:normal!important;overflow:visible!important;line-height:1.4!important;overflow-wrap:anywhere}
