.hero-controls {
  position: absolute;
  top: 78px;
  left: 50%;
  z-index: 3;
  display: flex;
  width: max-content;
  max-width: calc(100% - 18px);
  gap: 5px;
  transform: translateX(-50%);
}

.hero-toggle, .hero-cast, .hero-close {
  min-width: 44px;
  min-height: 44px;
  padding: 4px 9px;
  border: 1px solid #61727d;
  border-radius: 7px;
  background: #192a33ed;
  color: #eef7f8;
  font: 750 .8rem/1.15 system-ui, sans-serif;
  cursor: pointer;
}

.hero-cast { border-color: var(--hero-color); color: var(--hero-color); }
.hero-toggle[aria-expanded="true"], .hero-toggle.hero-branch-ready { border-color: #ffe09d; color: #ffe09d; }
.hero-toggle:disabled, .hero-cast:disabled { opacity: .68; cursor: default; }

.hero-panel {
  position: absolute;
  top: 129px;
  bottom: auto;
  left: 50%;
  z-index: 10;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(355px, calc(100% - 18px));
  max-height: calc(100% - 145px);
  transform: translateX(-50%);
  overflow: hidden;
  border: 1px solid #6b8390;
  border-radius: 11px;
  background: #15252ded;
  color: #edf6f7;
  box-shadow: 0 10px 32px #050a13b0;
}

.hero-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 5px 7px 5px 12px;
  border-bottom: 1px solid #45606a;
}

.hero-panel h2 { margin: 0; font-size: .98rem; }
.hero-close { padding: 0; font-size: 1.25rem; }
.hero-panel-content { display: grid; gap: 7px; overflow-y: auto; padding: 10px 12px; }
.hero-note, .hero-xp { margin: 0; font-size: .8rem; line-height: 1.35; }
.hero-note { color: #c0d3d8; }
.hero-xp { color: #f7dda5; font-weight: 750; }

.hero-option {
  display: grid;
  gap: 4px;
  min-height: 45px;
  padding: 7px 9px;
  border: 1px solid #536f77;
  border-left: 3px solid var(--hero-color);
  border-radius: 6px;
  background: #1f343b;
  color: #e0eff0;
  text-align: start;
  cursor: pointer;
}

.hero-option:hover:not(:disabled) { border-color: var(--hero-color); }
.hero-option:disabled { opacity: .66; cursor: default; }
.hero-option strong { color: var(--hero-color); font-size: .88rem; }
.hero-option span { font-size: .77rem; line-height: 1.35; }
.hero-milestones { display: grid; gap: 5px; margin: 0; padding: 0; color: #b7c4c8; list-style: none; font-size: .79rem; }
.hero-milestones li { padding: 4px 0 4px 9px; border-left: 2px solid #4f6973; }
.hero-milestones li.is-unlocked { color: #f1f4e1; border-color: #e9cf98; }

@media (orientation: landscape) and (max-height: 540px) {
  .hero-controls { top: 52px; left: 47%; }
  .hero-panel { top: 5px; bottom: 5px; max-height: none; }
}
