/* Mobile safeguards shared by the town interiors. Preserve page zoom and map panning. */
button { touch-action:manipulation; }
dialog {
 max-height:calc(100vh - 32px);
 max-height:calc(100dvh - 32px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));
 overflow:auto;
 overscroll-behavior:contain;
 -webkit-overflow-scrolling:touch;
}
.modal-head h2 { min-width:0; overflow-wrap:anywhere; }
.shop-receipt strong { overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.home-profile-heading>div { min-width:0; }
#toast { bottom:max(25px,calc(env(safe-area-inset-bottom,0px) + 12px)); }
.profile-status.profile-saving { bottom:max(20px,calc(env(safe-area-inset-bottom,0px) + 12px)); }

@media(max-width:750px), (pointer:coarse) and (max-width:1000px) and (max-height:600px) {
 .close { width:44px; height:44px; min-width:44px; min-height:44px; }
 .town-header .avatar,.premium-shell .town-header .avatar { width:44px; height:44px; min-width:44px; flex-shrink:0; }
 .primary-nav button,.text-btn,.place-shortcuts button,.hq-breadcrumb,.hq-career-shortcuts button,.journey-topic-shortcuts button,.mission-support button { min-height:44px; }
 .mission-support button { font-size:14px; }
 .shop-equipped-list .text-btn { padding:10px 6px; }
 .class-controls input[type=range] { min-height:44px; }
 .emporium-item-info h3,.personal-desk h3 { overflow-wrap:anywhere; }
 .profile-status { flex-wrap:wrap; }
 .town-app main,.premium-shell .town-app main {
  padding-left:max(32px,env(safe-area-inset-left,0px));
  padding-right:max(32px,env(safe-area-inset-right,0px));
  padding-bottom:max(24px,calc(env(safe-area-inset-bottom,0px) + 12px));
 }
}
@media(max-width:750px) {
 .town-app main,.premium-shell .town-app main {
  padding-top:max(18px,env(safe-area-inset-top,0px));
  padding-left:max(16px,env(safe-area-inset-left,0px));
  padding-right:max(16px,env(safe-area-inset-right,0px));
 }
}
@media(max-width:520px) {
 /* The profile emblem and title need their own row above the career selector. */
 .home-heading { flex-wrap:wrap; align-items:flex-start; gap:14px; }
 .home-profile-heading { flex:1 1 100%; min-width:0; }
 .home-career-choice { width:100%; min-height:48px; gap:12px; justify-content:space-between; }
 .home-career-choice>span:nth-child(2) { display:flex; align-items:center; gap:12px; min-width:0; }
 .home-career-choice small { margin:0; }
 .home-career-choice strong { overflow-wrap:anywhere; }
 .home-career-change { display:inline; flex-shrink:0; }
}
