/* Keep both scorecards and the swing controls visible beside the world map.
   The map keeps its natural SVG aspect ratio and is never cropped. */
@media (min-width: 901px) {
 body.in-match main {padding-top: 10px;}
 body.in-match .match-panel:not([hidden]) {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(255px,300px);
  column-gap:18px;
  padding:16px 18px 20px;
 }
 body.in-match .arena-stage {grid-column:1 / -1;grid-row:1;height:48px;margin:0 0 8px;}
 body.in-match .match-heading {grid-column:1 / -1;grid-row:2;margin-bottom:8px;align-items:center;}
 body.in-match .match-heading h2 {font-size:24px;}
 body.in-match .match-heading p:not(.eyebrow) {margin:3px 0;font-size:12px;}
 body.in-match .match-timer {width:54px;height:54px;}
 body.in-match .match-timer strong {font-size:20px;}
 body.in-match .match-side {grid-column:2;grid-row:3 / 6;align-self:start;min-width:0;}
 body.in-match .match-scores {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 0 10px;}
 body.in-match .match-scores > div {min-width:0;padding:9px;}
 body.in-match .match-scores strong {font-size:23px;}
 body.in-match .match-scores span {font-size:11px;}
 body.in-match .swing-heading {margin:0;}
 body.in-match .swing-options {grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:8px 0 0;}
 body.in-match .swing-options button {min-height:41px;}
 body.in-match .question {grid-column:1;grid-row:3;align-self:start;}
 body.in-match .map-buttons {grid-column:1;grid-row:4;align-self:start;}
 body.in-match .mp-map {grid-column:1;grid-row:5;align-self:start;min-width:0;}
 body.in-match .mp-map svg {height:auto;}
 body.in-match .map-hint {grid-column:1;grid-row:6;}
 body.in-match .answer-review {grid-column:1 / -1;grid-row:7;margin:0;}
 body.in-match .emote-bar {grid-column:1 / -1;grid-row:8;}
}
/* The larger rival portrait has a green pulse outside it. Extra spacing keeps
   the pulse clear of the VS, even at its widest point. */
.search-animation {gap:28px;}
.search-radar {overflow:visible;isolation:isolate;flex:none;margin:8px;}
.search-radar .search-token.rival {width:86px;height:86px;}
.search-radar::after {inset:-5px;border:2px solid #68a678;pointer-events:none;animation:mp-search-outer-pulse 1.5s ease-out infinite;}
@keyframes mp-search-outer-pulse {
 0% {transform:scale(.95);opacity:.85;}
 100% {transform:scale(1.25);opacity:0;}
}
@media(max-width:500px){.search-animation{gap:20px}.search-radar .search-token.rival{width:80px;height:80px}}
@media(max-width:350px){.search-animation{gap:12px}.search-radar .search-token.rival{width:72px;height:72px}}
@media(prefers-reduced-motion:reduce){.search-radar::after{animation:none;transform:none;opacity:.65}}

/* Match the visible frame and rival circle, excluding the outer radar pulse.
   The earned frames extend different distances beyond their avatar artwork. */
.search-animation {--matchup-diameter:88px;}
.search-animation .search-avatar {--frame-diameter-extra:0px;width:calc(var(--matchup-diameter) - var(--frame-diameter-extra));height:calc(var(--matchup-diameter) - var(--frame-diameter-extra));}
.search-animation .search-avatar.geo-frame {--frame-diameter-extra:8px;}
.search-animation .search-avatar.geo-frame.tier-2 {--frame-diameter-extra:12px;}
.search-animation .search-avatar.geo-frame.tier-3 {--frame-diameter-extra:14px;}
.search-animation .search-avatar.geo-frame.tier-4 {--frame-diameter-extra:26px;}
.search-animation .search-radar .search-token.rival {width:calc(var(--matchup-diameter) - 4px);height:calc(var(--matchup-diameter) - 4px);}
@media(max-width:500px){.search-animation{--matchup-diameter:82px;}}
@media(max-width:350px){.search-animation{--matchup-diameter:74px;}}

/* Show both leagues beside the players in the pregame matchup. */
.matchup-player .matchup-rank{max-width:100%;color:#56745d;font-size:11px;font-weight:700;line-height:1.3;text-align:center}

/* Keep match results compact enough for ordinary phones and short desktop
   windows. The promotion stays readable, and the dialog can still scroll as
   a last resort at extreme text zoom or an unusually short viewport. */
.match-result {
 max-height:calc(100dvh - 24px);
 padding:clamp(12px,2.4vh,24px);
 overscroll-behavior:contain;
}
.match-result .result-content {gap:clamp(5px,1.1vh,10px)}
.match-result .result-content>.eyebrow {margin:0;font-size:10px;line-height:1.2}
.match-result .result-emblem {width:clamp(44px,8vh,68px);height:clamp(44px,8vh,68px);border-width:4px;font-size:clamp(23px,4vh,32px)}
.match-result .result-content h2 {margin:0;font-size:clamp(30px,6vh,52px);line-height:1.05}
.match-result .result-content .result-mode {font-size:11px;line-height:1.2}
.match-result .result-content #result-score {gap:12px;margin:0;padding:clamp(7px,1.4vh,12px) 14px}
.match-result .result-contestant {gap:3px}
.match-result .result-contestant strong {font-size:clamp(25px,4.4vh,34px)}
.match-result .result-content .result-atbats {font-size:12px;line-height:1.25}
.match-result .result-content #result-rank-progress:not(:empty) {margin:0;padding:7px 10px;font-size:13px;line-height:1.3}
.match-result .promotion-celebration {display:grid;grid-template-columns:minmax(64px,110px) minmax(0,1fr);align-items:center;gap:12px;box-sizing:border-box;width:min(100%,410px);padding:10px 12px}
.match-result .promotion-art {width:100%;margin:0;border-width:2px}
.match-result .promotion-art svg {height:auto;aspect-ratio:5 / 2}
.match-result .promotion-copy {align-items:flex-start;gap:3px;text-align:left;min-width:0}
.match-result .promotion-copy span {font-size:9px;line-height:1.2}
.match-result .promotion-copy strong {font-size:clamp(19px,3.4vh,25px);line-height:1.08}
.match-result .promotion-copy b {font-size:12px;line-height:1.2}
.match-result .promotion-copy small {font-size:11px;line-height:1.2}
.match-result .result-actions {width:100%;gap:8px}
.match-result .result-actions .button {min-height:42px;padding:9px 12px;font-size:12px;line-height:1.2}
@media(max-width:400px){
 .match-result {width:calc(100% - 24px)}
 .match-result .promotion-celebration {grid-template-columns:minmax(58px,85px) minmax(0,1fr);gap:9px}
 .match-result .result-actions .button {flex:1 1 125px;min-width:0}
}
@media(max-height:600px){
 .match-result .result-content {gap:5px}
 .match-result .result-emblem {display:none}
 .match-result .promotion-celebration {grid-template-columns:minmax(55px,85px) minmax(0,1fr);padding:7px 10px}
 .match-result .result-actions .button {min-height:38px;padding:7px 10px}
}

/* Show the full equipped frame, including its unique outer ornaments, while
   keeping the same visual footprint as the opposing search token. */
.search-animation .matchmaking-avatar{--frame-diameter-extra:0px;display:inline-block;flex:none;width:calc(var(--matchup-diameter) - var(--frame-diameter-extra));height:calc(var(--matchup-diameter) - var(--frame-diameter-extra));margin:0 calc(var(--frame-diameter-extra) / 2)}
.search-animation .matchmaking-avatar.geo-frame{--frame-diameter-extra:18px}
.search-animation .matchmaking-avatar.geo-frame.tier-4{--frame-diameter-extra:28px}

/* Live scoreboard portraits share one compact footprint, even when an earned
   frame normally has much larger ornaments. Keep the frame art and flag, but
   scale their outward spacing to the scorecard rather than overlapping outs. */
.match-scores .contestant .contestant-avatar{box-sizing:border-box;width:30px;height:30px;flex:0 0 30px;margin:3px 6px}
.match-scores .contestant .contestant-avatar.geo-frame{outline:0!important;outline-offset:0!important;box-shadow:0 0 0 1px #fffdf7,0 0 0 3px var(--rim,#9fbea6),0 0 0 5px var(--glow,#dfece0)!important}
.match-scores .contestant .contestant-avatar.geo-frame:not([class*="gp-frame-daily_"])::before{inset:-5px!important}
.match-scores .contestant .contestant-avatar.geo-frame[class*="gp-frame-daily_"]::before{inset:auto auto -5px 50%!important;width:11px;height:11px;border-width:1px;box-shadow:none;font-size:7px;line-height:11px}
.match-scores .contestant .contestant-avatar.geo-frame::after{top:-4px;right:-4px;width:9px;height:9px;font-size:6px;line-height:8px}
.match-scores .contestant .contestant-avatar.geo-frame>.geo-favorite-flag{top:-3px;right:-3px;width:15px;height:11px;border-width:1px;border-radius:2px}
