/* Navigation labels stay intact. Resize/reflow their containers, not words. */
.category-card strong,.theme-card strong,.city-card strong,
.mp-tabs button,.mp-switch button,.bp .mp-switch button,.news-filters button,
.desktop-nav button,.bottom-nav button small,
.choice-grid button,.filter-grid button,.filter-option span,
.assistant-theme-picker button,.assistant-criteria button,.assistant-criteria button span,
.tags .tag,.mp-chip,.mp-team-chip,
.btn,.mp .btn,.bp .btn,.section-head button,.text-link{
  white-space:nowrap;overflow-wrap:normal;word-break:normal;hyphens:none;
}

/* Equal columns: label length must never resize one tile independently. */
.category-grid,.theme-grid,.themes-page .theme-grid,.city-grid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  grid-auto-rows:1fr;gap:12px;min-width:0;max-width:100%;
}
.category-grid>.category-card,.theme-grid>.theme-card,.city-grid>.city-card{
  min-inline-size:0;max-inline-size:100%;inline-size:100%;block-size:100%;
}
.category-card strong,.theme-card strong{max-width:100%;width:auto}
.theme-card>span:last-child{min-width:0;max-width:100%}
.city-card{padding:12px;min-height:112px;display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-start;text-align:left}
.city-copy{width:100%;padding-right:0;min-width:0;margin-top:auto;text-align:left}
.city-copy strong{font-size:16px}
.city-copy small{white-space:normal;overflow-wrap:normal;word-break:normal;line-height:1.4;min-height:0}
.city-arrow{top:10px;right:10px;bottom:auto;background:#10121599;border-radius:50%;padding:3px}

/* Member, venue and news tabs scroll as a row, with full readable labels. */
.mp-tabs,.mp-switch,.bp .mp-switch,.news-filters{
  display:flex;flex-wrap:nowrap;min-width:0;max-width:100%;overflow-x:auto;
  overscroll-behavior-x:contain;scroll-padding-inline:8px;scrollbar-width:thin;
}
.mp-tabs button,.mp-switch button,.bp .mp-switch button,.news-filters button{
  flex:0 0 auto;min-width:max-content;max-width:none;
}

/* Filter choices can change row, but an individual label never splits. */
.choice-grid,.choice-grid.small,.filter-grid:not(.players){
  display:flex;flex-wrap:wrap;min-width:0;max-width:100%;overflow-x:auto;
}
.choice-grid button,.filter-grid:not(.players) button{
  flex:1 0 auto;min-width:max-content;max-width:none;
}
.filter-grid.players button{min-width:0}
.assistant-criteria,.assistant-theme-picker>div,.tags,.mp-chips{
  max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;
}
.assistant-criteria button,.assistant-theme-picker button,.tags .tag,.mp-chip{
  flex:0 0 auto;min-width:max-content;max-width:none;
}

/* Action buttons use their natural label width, including narrow mobile views. */
.btn,.mp .btn,.bp .btn{min-inline-size:max-content}
.btn>span{white-space:nowrap;overflow-wrap:normal}
.mp .mp-hero .mp-actions,.mp-actions,.bp-actions,.bp-room-actions,
.venue-actions,.venue-hero-actions,.venue-contact-actions,.member-actions,.news-actions{
  display:flex;flex-wrap:wrap;gap:10px;min-width:0;max-width:100%;overflow-x:auto;
}
.mp .mp-hero .mp-actions>.btn,.mp-actions>.btn,.bp-actions>.btn,
.bp-room-actions>.btn,.venue-actions>.btn,.venue-hero-actions>.btn,.venue-contact-actions>.btn{
  flex:1 0 auto;width:auto;min-width:max-content;
}
.section-head{flex-wrap:wrap}
.section-head button{max-width:none;flex:0 0 auto}
.detail-cta{flex-wrap:wrap}
.detail-cta .btn{flex:1 0 auto;min-width:max-content}
#filterSheet .sheet-actions{display:flex;flex-wrap:wrap;gap:10px}
#filterSheet .sheet-actions .btn{flex:1 0 auto;min-width:max-content;white-space:nowrap}

@media(min-width:700px){
  .city-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .theme-grid,.themes-page .theme-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(min-width:1000px){.category-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
/* Keep long theme/category names whole on narrow screens. */
@media(max-width:440px){.category-grid,.theme-grid,.themes-page .theme-grid{grid-template-columns:minmax(0,1fr)}}

/* Member profile: keep the main action visually centred and the tab bar balanced. */
.mp-own-hero .mp-profile-controls{
  display:flex;
  justify-content:center;
  width:100%;
  overflow:visible;
}
.mp-own-hero .mp-profile-primary{
  flex:0 1 660px!important;
  width:min(76%,660px)!important;
  min-width:0!important;
  justify-content:center;
}
.mp .mp-tabs{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  overflow:hidden;
}
.mp .mp-tabs:has(>button:nth-child(4)){
  grid-template-columns:repeat(4,minmax(0,1fr));
}
.mp .mp-tabs>button{
  width:100%;
  min-width:0;
  max-width:100%;
  justify-content:center;
  overflow:hidden;
  text-overflow:ellipsis;
}

@media(max-width:440px){
  .mp-own-hero .mp-profile-primary{width:82%!important}
}
