.header-actions {
  position: relative;
  overflow: visible;
}

.header-menu-toggle {
  width: 46px;
  min-height: 58px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  border: 1px solid rgba(216, 229, 237, .2);
  background: rgba(5, 10, 17, .84);
  color: var(--silver);
  padding: 7px 5px;
  cursor: pointer;
  transition: border-color .24s ease-out, background .24s ease-out;
}

.header-menu-toggle:hover,
.header-menu-toggle:focus-visible,
.header-actions.is-menu-open .header-menu-toggle {
  border-color: color-mix(in srgb, var(--actual) 64%, transparent);
  background: rgba(9, 19, 29, .96);
  outline: none;
}

.header-menu-toggle > span {
  width: 17px;
  height: 12px;
  position: relative;
  display: block;
}

.header-menu-toggle i {
  position: absolute;
  left: 0;
  width: 17px;
  height: 1px;
  background: currentColor;
  transform-origin: center;
  transition: top .24s ease-out, transform .24s ease-out, opacity .18s ease-out;
}

.header-menu-toggle i:nth-child(1) { top: 0; }
.header-menu-toggle i:nth-child(2) { top: 5px; }
.header-menu-toggle i:nth-child(3) { top: 10px; }
.header-actions.is-menu-open .header-menu-toggle i:nth-child(1) { top: 5px; transform: rotate(45deg); }
.header-actions.is-menu-open .header-menu-toggle i:nth-child(2) { opacity: 0; }
.header-actions.is-menu-open .header-menu-toggle i:nth-child(3) { top: 5px; transform: rotate(-45deg); }

.header-menu-toggle b {
  font: 700 12px/1 var(--mono);
  letter-spacing: .04em;
}

.header-tool-panel {
  position: absolute;
  left: calc(100% + 13px);
  top: 50%;
  bottom: auto;
  translate: 0 -50%;
  display: flex;
  align-items: stretch;
  gap: 7px;
  padding: 7px;
  border: 1px solid rgba(216, 229, 237, .16);
  background: rgba(3, 8, 14, .94);
  box-shadow: 0 16px 54px rgba(0, 0, 0, .5);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-18px);
  transition: opacity .22s ease-out, visibility .22s ease-out, transform .3s ease-out;
}

.header-actions.is-menu-open .header-tool-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.header-tool-panel > * {
  flex: 0 0 auto;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity .2s ease-out, transform .3s ease-out;
  transition-delay: calc(var(--menu-order, 0) * 42ms);
}

.header-actions.is-menu-open .header-tool-panel > * {
  opacity: 1;
  transform: none;
}

.header-tool-panel .predict-button,
.header-tool-panel .fight-library-open,
.header-tool-panel .video-add-open,
.header-tool-panel .ambient-art-open,
.header-tool-panel .orb-drop-open,
.header-tool-panel .official-editor-open {
  width: 72px;
  height: 58px;
  min-height: 58px;
  display: grid;
  grid-template-rows: 22px 14px;
  place-items: center;
  align-content: center;
  gap: 4px;
  padding: 6px 4px;
  writing-mode: horizontal-tb;
}

.header-tool-panel .predict-button > span,
.header-tool-panel .fight-library-open > span,
.header-tool-panel .video-add-open > span,
.header-tool-panel .ambient-art-open > span,
.header-tool-panel .orb-drop-open > span,
.header-tool-panel .official-editor-open > span {
  display: grid;
  width: 100% !important;
  height: 22px !important;
  place-items: center;
  font-family: var(--mono) !important;
  font-size: 19px !important;
  font-weight: 300 !important;
  line-height: 1 !important;
}

.header-tool-panel .official-editor-open {
  border: 1px solid color-mix(in srgb, var(--actual) 38%, transparent);
  background: color-mix(in srgb, var(--actual) 7%, rgba(5, 10, 17, .82));
  color: var(--actual);
  cursor: pointer;
}

.header-tool-panel .official-editor-open:hover,
.header-tool-panel .official-editor-open:focus-visible {
  border-color: var(--actual);
  background: color-mix(in srgb, var(--actual) 14%, rgba(5, 10, 17, .88));
  outline: none;
}

.official-editor-icon {
  width: 19px;
  display: grid;
  gap: 4px;
}

.official-editor-icon i {
  height: 1px;
  background: currentColor;
}

.header-tool-panel .official-plus { font-size: 19px !important; }

.header-tool-panel .orb-drop-open {
  border: 1px solid color-mix(in srgb, var(--launch-dot-cyan, #13e1f3) 42%, transparent);
  background: color-mix(in srgb, var(--launch-dot-cyan, #13e1f3) 7%, rgba(5, 10, 17, .82));
  color: var(--launch-dot-cyan, #13e1f3);
  cursor: pointer;
}

.header-tool-panel .orb-drop-open:hover,
.header-tool-panel .orb-drop-open:focus-visible {
  border-color: var(--launch-dot-cyan, #13e1f3);
  background: color-mix(in srgb, var(--launch-dot-cyan, #13e1f3) 14%, rgba(5, 10, 17, .9));
  outline: none;
}

.header-tool-panel .orb-drop-icon {
  position: relative;
}

.header-tool-panel .orb-drop-icon i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.header-tool-panel .orb-drop-icon em {
  position: absolute;
  right: 16px;
  top: 2px;
  font: 500 14px/1 var(--mono);
  color: color-mix(in srgb, currentColor 72%, white 28%);
}

.header-tool-panel .orb-drop-open.is-dropping .orb-drop-icon i {
  animation: orbToolDrop 1.1s cubic-bezier(.32, 0, .58, 1);
}

@keyframes orbToolDrop {
  0% { translate: 0 -7px; opacity: .2; }
  34% { opacity: 1; }
  100% { translate: 0 7px; opacity: .42; }
}

/* Filled glyphs occupy less visible area than the two plus signs at the same
   nominal size. Compensate optically while preserving the shared 22px box. */
.header-tool-panel .video-add-open > span { font-size: 21px !important; }
.header-tool-panel .ambient-art-open > span { font-size: 22px !important; }

html[data-crossroad-phase="postlaunch"] .header-tool-panel .predict-button {
  display: grid !important;
}

.header-tool-panel .predict-button {
  border-color: color-mix(in srgb, var(--prediction) 38%, transparent);
  background: color-mix(in srgb, var(--prediction) 7%, rgba(5, 10, 17, .82));
}

.header-tool-panel .predict-button .predict-plus {
  font-size: 19px;
  line-height: 1;
}

.header-tool-panel .predict-button b,
.header-tool-panel .fight-library-open b,
.header-tool-panel .video-add-open b,
.header-tool-panel .ambient-art-open b,
.header-tool-panel .orb-drop-open b,
.header-tool-panel .official-editor-open b {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 14px;
  font: 700 11px/1 var(--mono);
  letter-spacing: .01em;
}

.header-tool-panel .lang-toggle {
  width: 62px;
  height: 58px;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 7px;
  writing-mode: horizontal-tb;
}

.header-tool-panel .fight-library-open[hidden] {
  display: none !important;
}

.header-tool-panel .lang-choice {
  font-size: 12px;
}

.header-tool-panel .lang-divider {
  font-size: 11px;
}

@media (max-width: 760px) {
  .header-menu-toggle {
    width: 44px;
    min-height: 44px;
    padding: 4px;
    gap: 3px;
  }

  .header-menu-toggle b {
    display: none;
  }

  .header-tool-panel {
    position: fixed;
    z-index: 45;
    top: 64px;
    right: 0;
    bottom: auto;
    left: 0;
    translate: none;
    justify-content: flex-end;
    border-width: 0 0 1px;
    padding: 8px 14px;
    transform: translateX(-20px);
  }

  .header-tool-panel .predict-button,
  .header-tool-panel .fight-library-open,
  .header-tool-panel .video-add-open,
  .header-tool-panel .ambient-art-open,
  .header-tool-panel .orb-drop-open,
  .header-tool-panel .official-editor-open,
  .header-tool-panel .lang-toggle {
    width: 58px;
    height: 42px;
    min-height: 42px;
    padding: 4px;
  }

  .header-tool-panel .lang-toggle {
    width: 62px;
  }

  .header-tool-panel .predict-button b,
  .header-tool-panel .fight-library-open b,
  .header-tool-panel .video-add-open b,
  .header-tool-panel .ambient-art-open b,
  .header-tool-panel .orb-drop-open b,
  .header-tool-panel .official-editor-open b {
    font-size: 9px;
  }
}

/* The utility menu is one neutral instrument set. Keep every action white and
   center its pictogram independently from the caption anchored below it. */
.header-tool-panel .predict-button,
.header-tool-panel .fight-library-open,
.header-tool-panel .video-add-open,
.header-tool-panel .ambient-art-open,
.header-tool-panel .orb-drop-open,
.header-tool-panel .official-editor-open {
  position: relative;
  grid-template-rows: 1fr;
  place-items: center;
  color: #f4f7fa !important;
  border: 1px solid rgba(244, 247, 250, .28) !important;
  background: rgba(5, 10, 17, .84) !important;
  box-shadow: none !important;
}

.header-tool-panel .predict-button:hover,
.header-tool-panel .predict-button:focus-visible,
.header-tool-panel .fight-library-open:hover,
.header-tool-panel .fight-library-open:focus-visible,
.header-tool-panel .video-add-open:hover,
.header-tool-panel .video-add-open:focus-visible,
.header-tool-panel .ambient-art-open:hover,
.header-tool-panel .ambient-art-open:focus-visible,
.header-tool-panel .orb-drop-open:hover,
.header-tool-panel .orb-drop-open:focus-visible,
.header-tool-panel .official-editor-open:hover,
.header-tool-panel .official-editor-open:focus-visible {
  color: #fff !important;
  border-color: rgba(255, 255, 255, .68) !important;
  background: rgba(12, 20, 29, .94) !important;
}

.header-tool-panel .predict-button > span,
.header-tool-panel .fight-library-open > span,
.header-tool-panel .video-add-open > span,
.header-tool-panel .ambient-art-open > span,
.header-tool-panel .orb-drop-open > span,
.header-tool-panel .official-editor-open > span {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  color: inherit !important;
}

.header-tool-panel .predict-button b,
.header-tool-panel .fight-library-open b,
.header-tool-panel .video-add-open b,
.header-tool-panel .ambient-art-open b,
.header-tool-panel .orb-drop-open b,
.header-tool-panel .official-editor-open b {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: auto;
  color: inherit !important;
  font-family: "Bahnschrift Condensed", "Arial Narrow", var(--mono) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: .04em !important;
  text-shadow: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .header-menu-toggle,
  .header-menu-toggle i,
  .header-tool-panel,
  .header-tool-panel > *,
  .header-tool-panel .orb-drop-open.is-dropping .orb-drop-icon i {
    transition: none !important;
    animation: none !important;
  }
}
