/* The challenge games share the same navigation silhouette as the other games:
   home on the left, an independently centered game title, sound + catalog right. */
.challenge-header,
.standalone-hub-page-bomb .topbar.challenge-header,
.standalone-hub-page-timer .site-top.challenge-header {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  min-height: 84px;
  margin: 0;
  padding: 14px max(23px, calc((100vw - 1160px) / 2));
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  column-gap: 15px;
  background: #152c2a;
  border-bottom: 1px solid #4b665b;
}
.challenge-header .challenge-back {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  white-space: nowrap;
  color: #e5ebdc;
  text-decoration: none;
  font-size: 13px;
  font-weight: 750;
}
.challenge-header .challenge-back-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #678071;
  border-radius: 50%;
  color: #e9c780;
  font-size: 19px;
  line-height: 1;
  transition: border-color .15s, background .15s;
}
.challenge-header .challenge-back:hover .challenge-back-icon { border-color:#e9c780; background:#2c4d3e; }
.challenge-header .challenge-title {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  font-size: clamp(16px, 1.65vw, 20px);
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: -.04em;
  color: #f2e7ca;
  white-space: nowrap;
}
.challenge-header .challenge-header-actions {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 9px;
  min-width: 0;
}
.challenge-header .challenge-header-actions > .standalone-hub-rail {
  position: relative;
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: 0;
}
.challenge-header .challenge-header-actions .standalone-hub-button {
  min-height: 42px;
}
.challenge-header .sound-toggle,
.challenge-header .timer-audio-toggle {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #718c7c;
  border-radius: 11px;
  background: #284c3e;
  color: #eaf1dd;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: none;
}
.challenge-header .sound-toggle[aria-pressed='true'] { background:#334e3e; color:#f0e3b0; border-color:#a0a778; }
.challenge-header .sound-toggle[aria-pressed='false'],
.challenge-header .timer-audio-toggle[aria-pressed='false'] { background:#203a34; border-color:#526d60; color:#aabeb1; }
.challenge-header .timer-audio-controls {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  width: auto;
  gap: 6px;
  margin: 0;
  justify-content: flex-end;
}
.challenge-header :is(.challenge-back,.sound-toggle,.timer-audio-toggle,.standalone-hub-button):focus-visible {
  outline: 3px solid #f1d18b;
  outline-offset: 3px;
}
@media(max-width:930px){
  .challenge-header,
  .standalone-hub-page-bomb .topbar.challenge-header,
  .standalone-hub-page-timer .site-top.challenge-header {padding: 11px 18px; column-gap: 10px; min-height: 73px;}
  .challenge-header .challenge-back-label {display:none;}
  .challenge-header .sound-toggle,
  .challenge-header .timer-audio-toggle {
    width: 41px;
    min-width: 41px;
    height: 41px;
    min-height: 41px;
    padding: 0;
    font-size: 0;
  }
  .challenge-header .sound-toggle::before { content:'♫'; font-size: 19px; line-height: 1; }
  .challenge-header .timer-audio-toggle::before { content:'♫'; font-size: 19px; line-height: 1; }
  .challenge-header #toggle-timer-effects::before { content:'♪'; }
}
@media(max-width:600px){
  .challenge-header,
  .standalone-hub-page-bomb .topbar.challenge-header,
  .standalone-hub-page-timer .site-top.challenge-header {
    display: grid;
    grid-template-columns: minmax(34px,1fr) auto minmax(0,1fr);
    min-height: 66px;
    padding: 9px 12px;
    column-gap: 6px;
    flex-wrap: nowrap;
  }
  .challenge-header .challenge-title {font-size: 14px; letter-spacing: -.045em;}
  .challenge-header .challenge-header-actions {gap: 5px;}
  .challenge-header .timer-audio-controls {gap: 4px; flex: 0 0 auto;}
  .challenge-header .sound-toggle,
  .challenge-header .timer-audio-toggle { width: 35px; min-width: 35px; height: 38px; min-height: 38px; }
  .challenge-header .challenge-header-actions .standalone-hub-button {
    min-width: 91px; min-height: 38px; padding: 0 8px; gap: 6px; font-size: 11px;
  }
  .challenge-header .standalone-hub-bars {width: 13px; flex-basis: 13px;}
  .challenge-header .challenge-back-icon {width: 32px; height: 32px;}
}
@media(max-width:350px){
  .challenge-header,
  .standalone-hub-page-bomb .topbar.challenge-header,
  .standalone-hub-page-timer .site-top.challenge-header {padding: 8px; column-gap: 4px;}
  .challenge-header .challenge-title {font-size: 12px;}
  .challenge-header .challenge-header-actions {gap: 3px;}
  .challenge-header .timer-audio-controls {gap: 3px;}
  .challenge-header .timer-audio-toggle {width: 32px;min-width: 32px;}
  .challenge-header .challenge-header-actions .standalone-hub-button {min-width: 83px;padding: 0 5px;}
}
@media(prefers-reduced-motion:reduce){.challenge-header .challenge-back-icon{transition:none;}}
/* On small phones, preserve a truly centered title by switching the wide
   directory control to a compact icon. Its text remains in the accessibility tree. */
@media(max-width:600px){
  .standalone-hub-page-timer .challenge-header .standalone-hub-button {
    width: 39px; min-width: 39px; min-height: 38px; padding: 0; gap: 0;
  }
  .standalone-hub-page-timer .challenge-header .standalone-hub-button-label {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    border: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
  }
}
@media(max-width:350px){
  .standalone-hub-page-bomb .challenge-header .standalone-hub-button {
    width: 39px; min-width: 39px; min-height: 38px; padding: 0; gap: 0;
  }
  .standalone-hub-page-bomb .challenge-header .standalone-hub-button-label {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    border: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
  }
}
