/* Hero select: top bar with the moon, hero cards (labels around visually hidden radios), secret toasts. */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.topbar-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.sound-btn {
  font-family: var(--display);
  font-size: 0.625rem;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 0;
  box-shadow: inset 0 0 0 2px var(--line);
  padding: 0 10px;
  min-block-size: 44px;
  cursor: pointer;
}
.moon { width: 48px; height: 48px; padding: 2px; border: 0; background: transparent; cursor: pointer; flex: none; }
.moon canvas { width: 44px; height: 44px; display: block; image-rendering: crisp-edges; image-rendering: pixelated; }
.moon.tap canvas { animation: moonTap 0.18s steps(2); }
.moon.lit canvas { filter: drop-shadow(0 0 6px var(--gold)); }
@keyframes moonTap { 50% { transform: scale(0.86) rotate(-8deg); } }

.heroes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px 12px;
  background: var(--night-2);
  color: var(--ink);
  border: 0;
  box-shadow: inset 0 0 0 2px var(--line);
  font: inherit;
  cursor: pointer;
  text-align: center;
  min-width: 0;
  position: relative;
}
/* The radio stays hidden even while focused (the card shows the focus ring); it still drives keys and screen readers. */
.hero-card input {
  position: absolute;
  clip-path: inset(50%);
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  white-space: nowrap;
}
.hero-card canvas { width: 78px; height: 78px; image-rendering: crisp-edges; image-rendering: pixelated; }
.hero-card:has(:checked) { background: #17344a; box-shadow: inset 0 0 0 2px var(--teal), 0 0 0 2px var(--teal); }
.hero-card:has(:focus-visible) { outline: 3px solid var(--gold); outline-offset: 4px; }
.hero-card.secret { grid-column: 1 / -1; box-shadow: inset 0 0 0 2px var(--gold); }
.hero-card.secret:has(:checked) { box-shadow: inset 0 0 0 2px var(--gold), 0 0 0 2px var(--gold); }
.notice.secret-toast { box-shadow: inset 0 0 0 2px var(--gold); color: var(--gold); font-weight: 600; }
.hero-card:has(:checked) canvas { animation: bob 0.6s steps(2) infinite; }
.hero-card .hn { font-family: var(--display); font-size: 0.6875rem; }
.hero-card .hw { font-size: 0.9375rem; color: var(--gold); font-weight: 600; }
.hero-card .hb { font-size: 0.8125rem; line-height: 1.3; color: var(--ink-dim); }
@keyframes bob { 50% { transform: translateY(-3px); } }

@media (prefers-reduced-motion: reduce) {
  .hero-card:has(:checked) canvas, .moon.tap canvas { animation: none; }
}

@media (forced-colors: active) {
  .sound-btn { border: 2px solid ButtonText; }
  .hero-card { border: 2px solid ButtonText; }
  .hero-card:has(:checked) { outline: 3px solid Highlight; outline-offset: 2px; }
}
