.matchup-image-dialog{box-sizing:border-box;width:min(1000px,94vw);max-height:92dvh;padding:20px;border:1px solid #d5b879;border-radius:12px;background:#172333;color:#e8edf4;overflow:auto}.matchup-image-dialog::backdrop{background:#050a12b8}.matchup-image-dialog header,.matchup-image-actions{display:flex;align-items:center;justify-content:space-between;gap:12px}.matchup-image-dialog h2{margin:0;font-size:20px;color:#f5dfac}.matchup-image-dialog p{font-size:13px;line-height:1.6}.matchup-image-stage{min-height:100px;max-height:65dvh;overflow:auto;text-align:center;background:#101925;border-radius:6px}.matchup-image-stage img{display:block;max-width:100%;height:auto;margin:auto}.matchup-image-actions{justify-content:flex-end}.matchup-image-actions button{min-height:38px}.matchup-image-dialog [hidden]{display:none!important}

.matchup-image-actions{flex-wrap:wrap}.matchup-image-actions button{width:auto;flex:0 1 auto;white-space:nowrap}.matchup-image-dialog header h2{min-width:0}.matchup-image-dialog header button{flex-shrink:0}@media(max-width:600px){.matchup-image-dialog{padding:14px}.matchup-image-actions button{min-height:44px;flex:1 1 auto}}

/* A compact image option belongs to the match editor, away from page actions. */
.matchup-image-option{margin:12px 0}.matchup-thumbnail-button{display:flex;align-items:center;gap:12px;min-height:64px;max-width:100%;text-align:left;flex-wrap:wrap}.matchup-thumbnail-button [data-thumbnail-stage]:empty{display:none}.matchup-thumbnail-button [data-thumbnail-stage]{width:96px;height:60px;flex:none;border:1px solid #89764f;border-radius:5px;overflow:hidden;background:#101925}.matchup-thumbnail-button img{display:block;width:100%;height:100%;object-fit:contain}.matchup-thumbnail-button small{font-size:12px;color:#bdc8d8;font-weight:400}.leaders-grid .leader-side h4 .result-badge{margin-inline-start:8px}
@media(max-width:540px){.matchup-thumbnail-button{width:100%;gap:8px}.matchup-thumbnail-button small{flex-basis:100%}}

/* Keep the derived Huayu card on its source card's right when columns allow it. */
@media(min-width:1280px){.battle-surface .leaders-grid>.leader-card:has(+.leader-huayu):nth-child(3n){grid-column:1}}
@media(min-width:751px) and (max-width:1279px){.battle-surface .leaders-grid>.leader-card:has(+.leader-huayu):nth-child(2n){grid-column:1}}

/* One compact view-only image shortcut below the selected teams / VS. */
.battle-surface .match-banner-teams:has(.matchup-view-row){row-gap:6px}
.match-banner-teams .matchup-view-row{display:flex;flex:0 0 100%;justify-content:center;margin-top:2px}.match-banner-teams .matchup-view-button{width:auto;min-height:30px;padding:4px 12px;font-size:12px;line-height:1.5;letter-spacing:0;white-space:nowrap}@media(max-width:600px){.match-banner-teams .matchup-view-button{min-height:36px;padding:6px 12px}}

/* Uploaded match table zoom: the surrounding controls remain outside the pan surface. */
.matchup-image-stage{display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden;height:min(60dvh,620px);min-height:180px;touch-action:pan-y;overscroll-behavior:contain}
.matchup-image-stage img{flex:none;width:auto;height:auto;max-width:100%;max-height:100%;margin:0;user-select:none;-webkit-user-select:none;pointer-events:none}
.matchup-image-stage[data-zoomed="true"]{cursor:grab;touch-action:none}.matchup-image-stage[data-zoomed="true"]:active{cursor:grabbing}
.matchup-image-stage:focus-visible{outline:2px solid #f5dfac;outline-offset:3px}
.matchup-image-zoom{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;margin-top:10px}.matchup-image-zoom output{min-width:3.5em;text-align:center;font-variant-numeric:tabular-nums}.matchup-image-zoom button{min-height:44px}
