/* Controls over the arena and the ringside panels. */
.sound-button {
  color: var(--muted);
  padding: 6px 10px;
  background: #181e32;
  border: 1px solid #343c55;
  border-radius: 6px;
  white-space: nowrap;
  font-size: 11px;
}
.sound-button[aria-pressed="true"] { color: var(--accent); border-color: #8abc5b; }
.fighter-platform { min-height: 11px; margin: -2px 0 4px; color: #b8c4e0; font: 600 8px/1.3 var(--mono); letter-spacing: .07em; text-transform: uppercase; }
.meter { display: flex; align-items: center; gap: 5px; margin-top: 7px; }
.blue .meter { flex-direction: row-reverse; }
.meter-label { color: #bdc6df; font: 600 8px/1.15 var(--mono); }
.gem { width: 10px; height: 5px; border-radius: 1px; background: #405071; transform: skew(-15deg); }
.gem.lit { background: var(--accent); box-shadow: 0 0 7px #bdff7d52; }
.fight-read {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(118deg, #222b40, #171d31);
}
.fight-read strong { color: var(--accent); font: 600 10px/1.35 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.fight-read p { margin-top: 3px; color: #d3dbee; font-size: 12px; }
.broadcast .feed { min-height: 150px; }
#entry-dialog { width: min(615px, calc(100% - 28px)); max-height: calc(100dvh - 30px); }
.roster-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.roster-card {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
  min-width: 0;
  gap: 3px;
  padding: 6px 4px 8px;
  color: var(--white);
  border: 1px solid #384360;
  border-radius: 8px;
  cursor: pointer;
  background: radial-gradient(ellipse at 50% 54%, color-mix(in srgb, var(--mascot-color) 16%, #13182b), #121829 74%);
}
.roster-card:hover { border-color: var(--mascot-color); }
.roster-card:has(:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.roster-card:has(:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.roster-radio { position: absolute; left: 6px; top: 6px; margin: 0; accent-color: var(--accent); }
.roster-art { max-width: 100%; width: 106px; height: 77px; object-fit: contain; }
.roster-copy { display: grid; line-height: 1.25; gap: 1px; }
.roster-copy strong { color: var(--mascot-color); font-size: 13px; }
.roster-copy span { font-size: 11px; color: #cad4e9; }
.compact-roster { display: grid; gap: 8px; margin: 12px 0; }
.roster-select { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.roster-select select { width: 100%; color: var(--white); background: #0d1223; border: 1px solid #404b68; border-radius: 6px; padding: 8px; font: inherit; }
.bout-portraits { float: right; display: flex; width: 39%; margin-left: 6px; gap: 0; }
.bout-mascot { width: 50%; height: 59px; object-fit: contain; }
.bout-mascot:last-child { transform: scaleX(-1); }
@media (max-width: 800px) {
  .broadcast .feed { min-height: 132px; }
}
@media (max-width: 425px) {
  .fighter-platform { font-size: 7px; }
  .sound-button { padding: 5px; font-size: 9px; }
  .roster-grid { gap: 6px; }
  .roster-art { height: 64px; }
  .roster-copy strong { font-size: 11px; }
}

.broadcast-tools { display: flex; gap: 5px; }
.career-hud { color: #d8e3ff; font: 500 9px/1.2 var(--mono); margin-top: 5px; }
.xp-results { display: grid; gap: 4px; margin: 8px 0 3px; }
.xp-award {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 7px;
  align-items: center;
  font: 500 10px/1.35 var(--mono);
  color: #d8e3f8;
  background: #192536;
  border: 1px solid #354761;
  border-radius: 5px;
  padding: 5px 6px;
}
.xp-award strong { color: var(--accent); }
.xp-award.level-up { color: #eaffd5; border-color: #95c867; background: #243a29; animation: level-award .65s ease-out; }
@keyframes level-award { from { transform: scale(.98); opacity: .54; } }
@media (max-width: 425px) {
  .broadcast-tools { gap: 3px; }
  .career-hud { font-size: 8px; }
  #round-top { text-align: center; }
}

.corner-guide { margin-top: 14px; }
.corner-guide > h3 { margin-bottom: 3px; font-size: 16px; }
.corner-guide > p { margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.corner-guide-cards { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
@media (max-width: 420px) {
  .corner-guide-cards { grid-template-columns: 1fr; }
}

/* Leave the removed portion visible for a beat so simultaneous trades are readable. */
.bar.health.health-loss::before {
  position: absolute;
  content: '';
  inset-block: 0;
  left: var(--loss-from);
  width: var(--loss-width);
  background: #ffdab2;
  transform-origin: left center;
  animation: hp-loss 810ms ease-out forwards;
}
.blue .bar.health.health-loss::before {
  right: var(--loss-from);
  left: auto;
  transform-origin: right center;
}
@keyframes hp-loss {
  0%, 42% { opacity: .95; transform: scaleX(1); }
  100% { opacity: 0; transform: scaleX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .bar.health.health-loss::before { animation: none; opacity: .48; }
}

/* The hit already happened when its call appears. Keep it legible under the ring. */
.ring.motion-windup .center-call { opacity: 0; }
.ring.motion-contact .center-call[data-call="exchange"],
.ring.motion-contact .center-call[data-call="break"] { opacity: .94; }

#report-bout { color: var(--muted); background: none; border: 0; font: inherit; font-size: 11px; text-decoration: underline; }
#report-bout[hidden] { display: none; }
#report-dialog .tournament-dialog-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; }
#report-dialog .dialog-close { background:none; border:0; font-size:24px; color:inherit; }
#report-dialog .report-label { display:grid; gap:8px; margin:16px 0; }
#report-dialog select { padding:9px; font:inherit; background:#101a30; border:1px solid #526587; color:inherit; border-radius:6px; }
#report-dialog #report-status { min-height:1.4em; margin:8px 0; }

.bout-unavailable :is(.hud, .ring-scene3d, .ring-art, .motion-effects, .round-track, .ringside, #range-read, #post-bout) {
  visibility: hidden;
}

.math-board {
  padding: .85rem clamp(.85rem, 3vw, 1.5rem);
  border-left: 3px solid #5cf4ee;
  background: linear-gradient(108deg, #142b39, #141b30 75%);
  color: #eefbff;
}
.math-board[hidden] { display: none; }
.math-board[data-phase="revealed"] { border-color: #c3ff70; }
.math-head { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; }
.math-head strong { color: #91fffa; font: 700 .78rem/1.4 var(--mono); text-transform: uppercase; }
#math-time { flex-shrink: 0; color: #d0ff94; font: 700 .86rem/1.3 var(--mono); }
#math-equation { margin: .5rem 0 .35rem; line-height: 1.45; overflow-wrap: anywhere; }
#math-result { margin: 0; color: #c1d3df; font-size: .82rem; line-height: 1.45; }

.pair-chat {
  padding: 18px clamp(15px, 3vw, 26px); border-top: 1px solid #55694d;
  background: linear-gradient(110deg, #203629, #161e31); color: #f0fff4;
}
.pair-chat h2 { margin: 0; font-size: clamp(18px, 2vw, 24px); line-height: 1.24; }
.pair-chat p { margin: 7px 0 13px; color: #d0dede; font-size: 14px; }
.pair-chat #pair-chat-status { margin-bottom: 0; }
.pair-chat p:empty { display: none; }
.pair-chat > div, .pair-secondary { display: flex; flex-wrap: wrap; gap: 8px; }
.corner-status { display: grid; gap: 4px; padding: 0; margin: 12px 0; list-style: none; font: 600 13px/1.45 var(--mono); }
