/* Consistent compact controls for portrait phones and short landscape screens. */
@media(max-width:700px),(max-height:500px){
 /* Main actions stay touchable without oversized padding. Answer keypads are unchanged. */
 .town-app .btn{min-height:44px;padding:10px 13px;font-size:13px;line-height:1.4}
 .room-home-dock,.hq-world-dock,.hq-world-careers,.bank-world-dock,.shop-world-dock,.museum-gallery-dock,.class-world-dock{padding:4px;gap:2px;border-radius:13px;bottom:max(8px,env(safe-area-inset-bottom,0px));width:min(500px,calc(100% - 16px))}
 .room-home-dock button,.hq-world-dock button,.hq-world-careers button,.bank-world-dock button,.shop-world-dock>button,.museum-gallery-dock button,.class-world-dock button{min-height:48px;min-width:0;padding:4px 2px;gap:3px;font-size:10px;line-height:1.25;border-radius:9px;flex-direction:column}
 .room-home-dock .location-logo,.hq-world-dock .location-logo,.bank-world-dock .location-logo,.shop-world-dock .location-logo,.shop-world-dock .shop-department-logo,.museum-gallery-dock .location-logo,.class-world-dock .location-logo{width:23px;height:23px}
 .hq-world-dock button>svg,.shop-world-dock button>svg{width:23px;height:23px;padding:4px}
 .room-home-dock button>svg,.bank-world-dock button>svg,.class-world-dock button>svg,.museum-gallery-dock button>svg{width:23px;height:23px}
 .museum-gallery-dock button strong{font-size:11px}.museum-gallery-dock button small{display:none}
 .class-world-dock{justify-content:space-around}.class-world-dock button{flex:1}
 /* Career hall, all five workspaces and their mission noticeboards. */
 .hq-world{height:100svh;min-height:0}
 .hq-world-hud{top:max(8px,env(safe-area-inset-top,0px));left:max(8px,env(safe-area-inset-left,0px));right:max(8px,env(safe-area-inset-right,0px));gap:5px}
 .hq-world-heading,.hq-world-status{gap:5px;min-width:0}
 .hq-world-heading{flex:1}
 .hq-world-heading h2{font-size:14px;line-height:1.3;padding:9px 8px;min-width:0;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-radius:9px}
 .hq-world-back{width:44px;min-height:44px;padding:8px;justify-content:center;flex-shrink:0;border-radius:10px}
 .hq-world-back>span{display:none}.hq-world-back>.location-logo{width:23px;height:23px}
 .hq-world-wallet{padding:5px 8px;min-height:40px;border-radius:9px}.hq-world-wallet small{font-size:9px}.hq-world-wallet strong{font-size:14px}
 .hq-world-level{min-width:40px;min-height:40px;padding:2px}.hq-world-level .hq-world-level-ring{--ring-size:32px}.hq-world-level .level-orbit-face>strong{font-size:13px}
 .hq-world .hq-spot-label,.hq-world-overview .hq-spot-label{padding:5px 7px;gap:5px;border-radius:9px}
 .hq-world .hq-spot-label strong,.hq-world-overview .hq-spot-label strong{font-size:12px;line-height:1.3}
 .hq-world .hq-spot-label small,.hq-world-overview .hq-spot-label small{font-size:9px;line-height:1.3}
 .hq-world .hq-career-symbol,.hq-world .hq-world-overview .hq-career-symbol{display:flex;min-width:23px}
 .hq-world .hq-career-symbol .career-icon,.hq-world .hq-world-overview .hq-career-symbol .career-icon,.hq-world-career-symbol .career-icon{width:23px;height:23px}
 .hq-world-careers strong{font-size:10px;line-height:1.2;font-weight:650}.hq-world-careers small{display:none}
 .hq-world .room-hotspot,.hq-workspace-clear .room-hotspot{min-width:0;min-height:44px;max-width:145px;padding:6px 9px;border-radius:9px}
 .hq-world .room-hotspot strong,.hq-workspace-clear .room-hotspot strong{font-size:12px;line-height:1.3}
 .hq-world .room-hotspot small{display:none}.hq-world .room-beacon{width:6px;height:6px;top:-9px}
 .hq-workspace-next{bottom:calc(78px + env(safe-area-inset-bottom,0px));width:min(500px,calc(100% - 16px));min-height:54px;padding:8px 11px;gap:8px;border-radius:11px}
 .hq-workspace-next>.location-logo{width:26px;height:26px}.hq-workspace-next>span:not(.hq-next-arrow){gap:2px}.hq-workspace-next small{font-size:9px}.hq-workspace-next strong{font-size:12px;line-height:1.3}.hq-next-arrow{font-size:20px}
 .hq-world-tools,.hq-world-mentor{top:62px}.hq-world-tools{right:8px}.hq-world-mentor{left:8px}
 .hq-world-tools>summary,.hq-world-mentor>summary{min-height:44px;padding:6px 9px;gap:5px;font-size:11px;border-radius:9px}
 .hq-world-tools>summary .location-logo,.hq-world-mentor>summary .career-mentor-portrait{width:22px;height:22px}
 .hq-world-tools-panel,.hq-world-mentor-panel{max-height:calc(100dvh - 180px)}
 .hq-world-home{width:44px;min-height:44px;padding:7px;right:8px;bottom:calc(78px + env(safe-area-inset-bottom,0px));justify-content:center}
 .hq-world-home .location-logo{width:24px;height:24px}.hq-world-home>span{display:none}
 .hq-world-caption{top:62px;left:8px;padding:8px 10px;max-width:210px;border-radius:10px}.hq-world-caption>span,.hq-world-caption p{display:none}.hq-world-caption h3{font-size:14px;margin:0}.hq-world-caption button{font-size:11px;min-height:44px;padding:5px 0 0}
 .hq-world-help{display:none}
 .hq-world .hq-world-camera button{min-width:36px;min-height:44px;font-size:17px;padding:4px}
 .hq-world .hq-world-camera button[data-action="hq-world-overview"]{font-size:11px}.hq-world .hq-world-camera output{font-size:10px;min-width:32px}
 .hq-world-board{padding-top:68px;padding-bottom:86px}
 /* Shared headers and home shortcuts in the other rooms. */
 .bank-world-back,.shop-world-back,.ticker-back,.class-world-nav button{width:44px;min-height:44px;padding:8px;justify-content:center;border-radius:10px}
 .bank-world-back>span,.shop-world-back>span,.ticker-back>span{display:none}
 .bank-world-back>.location-logo,.shop-world-back>.location-logo,.ticker-back>.location-logo,.class-world-nav button .location-logo{width:23px;height:23px}
 .shop-world-wallet,.ticker-wallet{min-height:40px;min-width:0;padding:5px 8px}.shop-world-wallet strong,.ticker-wallet strong{font-size:15px}.shop-world-wallet small,.ticker-wallet small{font-size:9px}
 .room-home-control,.room-home-modern-world .room-home-control,.room-home-modern-world .sound-control{width:44px;min-height:44px;padding:8px}
 .room-home-control>span,.room-home-modern-world .sound-control>span{display:none}
 .room-home-hud .room-profile-badge{width:34px;height:34px;min-width:0;min-height:0;padding:3px}.room-home-hud .room-profile-badge .player-avatar.profile-token{width:28px;height:28px}
 .room-home-hud .room-profile-badge:has(.room-profile-default) .player-avatar.profile-token{width:100%;height:100%}
 .room-home-identity h2{font-size:14px}.room-home-career{font-size:11px}
 .mission-scene-back{min-width:44px;min-height:44px;padding:6px;gap:2px}.mission-scene-back>.location-logo{width:23px;height:23px}.mission-scene-back span{font-size:9px}
 .ticker-world-nav>button{min-height:44px;padding:7px 10px;font-size:11px}.ticker-world-nav .location-logo{width:23px;height:23px}
 .class-world-nav{gap:6px}.class-world-nav h2{font-size:15px;padding:9px}.class-world .class-career{min-height:44px;font-size:12px;padding:6px 8px}.class-career .career-icon{width:24px;height:24px}
}
@media(max-width:370px){
 .hq-world-level{display:none}.hq-world-heading h2{font-size:12px}
 .hq-world-careers strong,.hq-world-dock button,.room-home-dock button,.shop-world-dock>button{font-size:9px}
 .hq-world .room-hotspot{max-width:125px}
}
@media(max-width:700px),(max-height:500px){
 .hq-world-hall .hq-world-tools{top:62px;bottom:auto;right:8px}
 .hq-world-hall .hq-world-tools>summary{width:44px;padding:7px}
 .hq-world-hall .hq-world-tools>summary>span:not(.hq-disclosure-chevron){position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .hq-world-hall .hq-world-tools>summary>.hq-disclosure-chevron{display:none}
 .hq-world-hall .hq-world-tools-panel{top:calc(100% + 8px);bottom:auto}
}
@media(max-width:700px),(max-height:500px){
 .class-world-nav button>span{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
}
@media(max-width:700px),(max-height:500px){
 .museum-exit-links{gap:5px}.museum-exit-links button{min-height:44px;padding:6px 8px;font-size:11px;gap:5px}.museum-exit-links .location-logo{width:23px;height:23px}
 .bank-world-total{min-height:44px;padding:5px 8px}.bank-world-total strong{font-size:15px}.bank-world-total small{font-size:9px}
 .shop-world-look{min-height:44px;padding:7px 9px;font-size:11px}
}
@media(max-width:700px),(max-height:500px){
 .journey-stage{min-height:78px;padding:8px 5px;gap:4px;border-radius:10px;flex-direction:column;text-align:center}
 .journey-stage-symbol{display:none}.journey-stage-copy{gap:2px}.journey-stage-copy strong{font-size:11px;line-height:1.25}.journey-stage-copy>span{font-size:11px;line-height:1.25}.journey-stage-copy small{font-size:10px;line-height:1.3;margin-top:2px}
 .journey-topic-shortcuts button{font-size:12px;padding:6px 9px;min-height:44px}
 .class-world .class-sidebar nav button{min-height:56px;min-width:112px;padding:7px 8px;gap:6px}.class-world .class-sidebar nav b{width:18px;font-size:16px}.class-world .class-sidebar nav span{font-size:12px;line-height:1.3}.class-world .class-sidebar nav small{font-size:10px;line-height:1.3}
 .class-world .class-skill-tabs button{font-size:12px;padding:7px 9px;min-height:44px}
}
@media(max-width:700px),(max-height:500px){
 .hq-world-board .journey-stage{min-height:78px;padding:8px 5px;gap:4px}
 .hq-world-board .journey-stage-copy strong{font-size:11px;line-height:1.25}
}

/* The career camera owns touch gestures without zooming the app's UI. */
.hq-world-viewport{touch-action:none}
.hq-world .hq-world-quick-camera{display:none}
@media(max-width:700px),(max-height:500px){
 .hq-world .hq-world-quick-camera{display:flex;top:auto;right:auto;left:50%;transform:translateX(-50%);bottom:calc(86px + env(safe-area-inset-bottom,0px));gap:3px;padding:3px;max-width:calc(100% - 20px);z-index:19;touch-action:manipulation}
 .hq-world .hq-world-quick-camera button{min-width:44px;min-height:44px;padding:5px}
 .hq-world .hq-world-quick-camera output{min-width:34px;font-size:11px}
 .hq-world.hq-world-room .hq-world-quick-camera{bottom:calc(148px + env(safe-area-inset-bottom,0px))}
 .town-app .hq-world.hq-world-hall .hq-world-caption{bottom:calc(148px + env(safe-area-inset-bottom,0px))}
}

/* Keep the moving room inexpensive to composite on mobile GPUs. */
.hq-world-viewport.hq-world-interacting *{animation-play-state:paused!important;transition:none!important}
@media(pointer:coarse),(max-width:700px),(max-height:500px){
 .hq-world.hq-world-hall .hq-world-canvas>img{filter:none}
}
