/* One presentation toolbar; profile/directory cards retain their existing sizes. */
.header-catalog-controls {display:flex;align-items:center;gap:8px;flex:0 0 auto;min-width:0}
.header-catalog-toggle,.header-view-control {display:flex;align-items:stretch;border:1px solid #63758d;border-radius:7px;overflow:hidden;background:var(--header-control-bg,#344963);box-shadow:var(--catalog-control-shadow)}
.header-catalog-toggle:hover,.header-view-control:hover {box-shadow:var(--catalog-control-shadow-hover)}
.header-catalog-controls button {border:0;background:var(--header-control-bg,var(--bg-card));color:#e3ecf6;font:inherit;font-size:12px;font-weight:700;line-height:1.2;min-height:30px;padding:6px 9px;cursor:pointer;white-space:nowrap}
.header-catalog-controls button:hover:not(.active) {background:var(--header-control-hover,var(--bg-card-hover))}
.header-catalog-controls button.active {background:#405b7a;color:#fff;box-shadow:inset 0 0 0 2px var(--accent,#be3455)}
.header-catalog-controls button:focus-visible {outline:2px solid #fff;outline-offset:-3px}
.header-view-control button {font-size:19px;min-width:30px;padding:3px 6px}
.header-view-control[hidden] {display:none!important}
.header-utility-controls {display:flex;align-items:center;gap:5px;min-width:0}
.header-utility-controls .lang-toggle {border:1px solid #63758d;border-radius:7px;background:var(--header-control-bg,#344963);color:var(--text-primary);padding:6px 9px}
.header-utility-controls .lang-toggle:hover {background:var(--header-control-hover,#405977)}
.header-utility-controls .lang-toggle.is-active {border-color:var(--accent,#be3455)}
.header-utility-controls .header-magnet-toggle {border:1px solid rgba(233,69,96,.5);border-radius:7px}
.header-utility-controls .member-nav {max-width:110px}
.header-utility-controls .member-nav a,.header-utility-controls .member-nav summary {overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.header-utility-controls .lang-menu {max-height:60vh;overflow-y:auto}
/* Keep the selection frame inside the chosen magnet option, like Catalog/View. */
body #sharedSiteNav.three-row-header .header-magnet-control {align-items:stretch;border-color:#63758d;background:var(--header-control-bg,#344963);box-shadow:var(--catalog-control-shadow)}
body #sharedSiteNav.three-row-header .header-magnet-control:hover {box-shadow:var(--catalog-control-shadow-hover)}
body #sharedSiteNav.three-row-header .header-magnet-control .header-magnet-toggle {border:0;border-radius:0;box-shadow:none}
body #sharedSiteNav.three-row-header .header-magnet-control .header-magnet-toggle.active,
body #sharedSiteNav.three-row-header .header-magnet-control .header-magnet-toggle.active:hover {background:#405b7a;box-shadow:inset 0 0 0 2px var(--accent,#be3455)}
body #sharedSiteNav.three-row-header .header-magnet-control .header-magnet-toggle:focus-visible {outline:2px solid #fff;outline-offset:-3px}
#sharedSiteNav.three-row-header .header-info-row {gap:12px;flex-wrap:wrap}
#sharedSiteNav.three-row-header .header-live-info {min-width:0;flex:0 1 auto}
body .profile-catalog-toggle,body .profile-release-toolbar,body .advanced-catalog-toggle,body .advanced-results-toolbar,
body .catalog-stats .view-toggles,body .stats-bar .view-toggles,body #javStats .view-toggles {display:none!important}
/* Remove the originals even on templates with older wrapper class names. */
body [data-view],body [data-jav-view],body [data-profile-view],body [data-advanced-view],body [data-advanced-catalog] {display:none!important}
.jav-card .card-rating {display:none}
@media(max-width:1100px) {
  #sharedSiteNav.three-row-header .header-info-row {gap:8px}
}
@media(max-width:767px) {
 .header-utility-controls .lang-menu {left:0;right:auto;min-width:130px;max-width:calc(100vw - 24px)}
 #sharedSiteNav.three-row-header .header-info-row {display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:5px 8px}
  #sharedSiteNav.three-row-header .header-info-row .site-brand {grid-column:1;grid-row:1}
 #sharedSiteNav.three-row-header .header-info-row > .member-nav {grid-column:3;grid-row:1;justify-self:end}
 #sharedSiteNav.three-row-header .header-live-info {grid-column:2;grid-row:1;justify-content:flex-start;font-size:10px;gap:8px;flex-wrap:nowrap}
  .header-catalog-controls button {font-size:10px;min-height:28px;padding:4px 6px}
  .header-view-control button {font-size:16px;min-width:25px;padding:3px 5px}
}
@media(max-width:600px) {
  /* Keep every catalog control together on the navigation row. */
  #sharedSiteNav.three-row-header .header-catalog-controls {gap:4px}
  #sharedSiteNav.three-row-header .header-catalog-controls .header-utility-controls {display:flex!important;gap:3px}
  #sharedSiteNav.three-row-header .header-utility-controls .lang-toggle,
  #sharedSiteNav.three-row-header .header-utility-controls .header-magnet-toggle {min-height:28px;padding:4px 5px;font-size:10px}
  #sharedSiteNav.three-row-header .header-actions {gap:4px}
}
@media(max-width:359px) {
  #sharedSiteNav.three-row-header .header-inner {padding-left:6px;padding-right:6px}
  .header-catalog-controls button {padding-left:4px;padding-right:4px;font-size:9px}
  .header-catalog-controls small {font-size:8px}
  .header-view-control button {font-size:15px;min-width:22px}
}
