#language-switch{font:inherit;font-size:12px;max-width:108px;color:#49372d;background:#fff6e8d4;border:1px solid #8870546b;border-radius:10px;padding:5px 7px;cursor:pointer}
#site-menu #language-switch{max-width:none;margin-top:15px}
.shelf-language{justify-self:end;display:flex;align-items:center;gap:10px}
@media(max-width:580px){.shelf-language .brand{display:none}}

/* Let localized controls grow within their panels instead of covering adjacent controls. */
.page-map :is(.brand-cluster,.search-cluster,.search-form,.search-form input,.dock-context,.dock-heading h2,
  .footer-links,.dialog-heading h2,.popup-bottom,.place-results button span) {min-width:0}
.page-map :is(.dialog-heading h2,.dock-heading h2,.popup-body h3,.popup-place,.site-menu nav button,.place-results button span) {
  overflow-wrap:anywhere;
}
.page-map .dialog-heading .close,.page-map .popup-pages {flex:none}
.page-map :is(.filter-bottom,.popup-bottom,.dock-context,.dock-footer,.footer-links) {flex-wrap:wrap;gap:6px 12px}
.page-map :is(.filter-bottom button,.popup-open,.footer-links > *) {white-space:normal;overflow-wrap:anywhere}
.page-map .dock-heading :is(h2,#result-summary,#clear-city) {white-space:normal}
.page-map :is(.dock-actions,.search-cluster svg,.sheet-chevron,.search-key) {flex-shrink:0}
.page-map .dock-actions {gap:8px}
.page-map #random {max-inline-size:min(24vw,155px);text-align:end}
.page-map .site-menu nav button {text-align:start}
.page-map :is(#country-select,#find-place select) {max-width:100%;min-width:0}
.page-map :is(.search-results button,.search-results button strong,.search-results button small) {min-width:0;overflow-wrap:anywhere}
.page-map .photo-dock {height:auto}
.page-map .map-tools {bottom:var(--dock-tools-bottom,204px)}
.page-map .map-legend {bottom:var(--dock-legend-bottom,188px)}
.page-map .map-stage:has(.sheet-open) .map-tools {bottom:var(--dock-tools-bottom,275px)}
.page-map .map-popup .popup-scroll {overflow-wrap:anywhere}

.page-shelf :is(header h1,.section-head h2,.shelf-contribute a,#album-detail strong,#album-detail a) {min-width:0;overflow-wrap:anywhere}
.page-shelf .shelf-language {min-width:0;flex-wrap:wrap;justify-content:flex-end}
.page-shelf #album-detail a {max-width:100%}
.page-community :is(header,nav,#session,#content,.panel,form,.fields,.band-picker,.compare,.media,label,fieldset) {min-width:0}
.page-community :is(h1,h2,h3,summary,label,nav a,#session,.actions) {overflow-wrap:anywhere}
.page-community :is(button,input,select,textarea,a) {max-width:100%}
.page-community :is(.compare,.release-row) > * {min-width:0}

@media (min-width:768px) and (max-width:960px) {
  .page-map .topbar {grid-template-columns:minmax(0,1fr) minmax(0,1.4fr) auto;gap:12px;inset-inline:18px}
  .page-map .brand .wordmark {font-size:clamp(19px,2.7vw,26px)}
  .page-map .search-cluster {gap:8px}
}
@media (max-width:767px) {
  .page-map .topbar {grid-template-columns:minmax(0,1fr) auto;gap:10px 8px;inset-inline:12px}
  .page-map .brand-cluster {gap:7px}
  .page-map .brand .wordmark {font-size:clamp(17px,5.45vw,27px)}
  .page-map .mode-switch button {padding-inline:9px}
  .page-map .search-cluster {gap:8px}
  .page-map .search-form {padding-inline:9px;gap:5px}
  .page-map .filter-open {padding-inline:9px;gap:5px;max-width:46%;white-space:normal;line-height:1.15}
  .page-map .photo-dock {display:flex;flex-direction:column;max-height:min(46dvh,330px)}
  .page-map #photo-toggle {flex:0 0 auto;height:auto;min-height:51px;padding-block:12px 7px}
  .page-map :is(#photo-label,#photo-count) {min-width:0;overflow-wrap:anywhere}
  .page-map #photo-count {flex:none}
  .page-map #photo-panel {min-height:0;overflow-y:auto;overscroll-behavior-y:contain}
  .page-map .dock-heading {flex-wrap:wrap;gap:5px 8px}
  .page-map .dock-actions {margin-inline-start:auto}
  .page-map .dock-context {flex:1 1 140px}
  .page-map .dock-footer {flex-direction:column}
  .page-map .map-tools {bottom:var(--dock-tools-bottom,84px)}
  .page-map .map-legend {bottom:var(--dock-legend-bottom,81px);flex-wrap:wrap;max-width:calc(100% - 85px);gap:5px 14px}
  .page-map .map-stage:has(.sheet-open) .map-tools {bottom:var(--dock-tools-bottom,275px)}
  .page-map .filter-bottom {align-items:stretch}
  .page-map .filter-bottom button {flex:1 1 110px}
}
@media (max-width:580px) {
  .page-shelf header {grid-template-columns:minmax(0,1fr) auto;gap:6px 12px}
  .page-shelf header h1 {grid-row:2;grid-column:1/-1}
  .page-shelf .shelf-language {grid-row:1;grid-column:2}
  .page-community header {gap:8px 12px}
  .page-community header nav {flex-basis:100%;order:1}
  .page-community .compare {grid-template-columns:minmax(0,1fr)}
}
@media (max-width:360px) {
  .page-map .search-key {display:none}
  .page-map .mode-switch button {padding-inline:7px}
  .page-shelf .section-head {flex-wrap:wrap}
}
