/* C128 mobile typography: keep words whole, prioritize single-line labels. */
@media (max-width: 600px) {
  .home-premium-shortcuts.pm128-home-ready button b {
    display:block;
    font-size:clamp(10px,2.65vw,14px);
    line-height:1.2;
    white-space:nowrap;
    word-break:keep-all;
    overflow-wrap:normal;
    hyphens:none;
    letter-spacing:-.025em;
  }
  .sidebar-nav .nav-group > summary,
  .sidebar-nav .nav-group > .nav-group-title,
  .sidebar-nav .nav-group-items button.nav {
    word-break:keep-all!important;
    overflow-wrap:normal!important;
    hyphens:none!important;
  }
  .sidebar-nav .nav-group > summary,
  .sidebar-nav .nav-group > .nav-group-title {
    font-size:clamp(14px,4.3vw,22px);
  }
  .sidebar-nav .nav-group-items button.nav {
    font-size:clamp(12px,3.8vw,18px)!important;
  }
}

/* C128 profile achievement cards: preserve whole words on narrow screens.
   Reduce the heading before permitting any wrap. */
@media (max-width:600px) {
  #view-profile :is(button,a,[role="button"],.card) :is(h2,h3,h4,strong,b) {
    word-break:normal!important;
    overflow-wrap:normal!important;
    hyphens:none!important;
  }
  #view-profile :is(button,a,[role="button"]) {
    min-width:0;
  }
  #view-profile :is(button,a,[role="button"]) :is(h2,h3,h4,strong,b) {
    font-size:clamp(11px,3.3vw,16px);
    letter-spacing:-.035em;
  }
}

/* C231: club page must scroll clear of the fixed five-button Android dock.
   Scoped to the dedicated club view; no change to the dock or other views. */
@media (max-width: 600px) {
  #view-mountain-groups {
    box-sizing: border-box;
    padding-bottom: calc(160px + env(safe-area-inset-bottom, 0px)) !important;
    min-height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}
