/* Reward presentation uses the existing cabinet controls and real cosmetics.
   The celebratory illustration is an AI-generated, frame-by-frame sprite. */
.match-finish-modal{width:min(580px,calc(100vw - 32px));max-width:580px;max-height:calc(100dvh - 28px);overflow-y:auto;padding:24px;}
.match-finish-modal .section-title{margin-bottom:16px;text-wrap:balance;}
.match-result-scores{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:0 0 16px!important;text-align:left;}
.match-result-score{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;padding:8px 11px;border:2px solid var(--chrome-border);border-radius:7px;background:var(--chrome-well);font-size:14px;}
.match-result-score>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.match-result-score>strong{font-size:17px;color:var(--cream);}
.match-result-score.is-winner{border-color:var(--gold);background:var(--chrome-raised);}
.match-result-score.is-winner>strong{color:var(--gold-ink);}
#gameoverProgress.match-rewards{padding:17px 18px;margin:0 0 19px;border:2px solid var(--chrome-border-strong);background:var(--chrome-well);color:var(--cream);text-align:left;overflow:hidden;}
.match-reward-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px;}
.match-reward-label{font-size:16px;}
.match-xp-total{font-size:25px;line-height:1.05;white-space:nowrap;color:var(--gold-ink);font-variant-numeric:tabular-nums;}
.match-earned-lines{display:flex;flex-wrap:wrap;gap:6px 18px;margin-bottom:19px;color:var(--chrome-muted);font-size:13px;line-height:1.2;}
.match-earned-lines>span{display:flex;align-items:baseline;gap:7px;}
.match-earned-lines b{color:var(--cream);font-weight:400;}
.match-xp-caption{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:8px;}
.match-xp-level{font-size:17px;line-height:1.15;}
.match-xp-numbers{font-size:12px;white-space:nowrap;color:var(--chrome-muted);font-variant-numeric:tabular-nums;}
.match-xp-track{height:17px;border:2px solid var(--chrome-border-strong);border-radius:5px;background:var(--chrome-surface);overflow:hidden;box-shadow:inset 0 2px 0 rgba(0,0,0,.15);}
.match-xp-fill{display:block;height:100%;width:0;background:var(--gold);border-top:3px solid var(--gold-hot,#ffe894);box-shadow:inset 0 -3px 0 var(--gold-dark);will-change:width;}
.match-level-celebration{display:none;position:relative;grid-template-columns:76px minmax(0,1fr);grid-template-rows:auto auto;column-gap:9px;align-items:center;margin-top:13px;min-height:70px;}
.has-level-up .match-level-celebration{display:grid;}
.match-level-sprite{display:block;grid-column:1;grid-row:1/3;width:76px;height:76px;background-image:url('../assets/art/level-up-v54.webp');background-size:400% 200%;background-repeat:no-repeat;image-rendering:pixelated;}
.match-level-announcement{grid-column:2;grid-row:1;font-size:24px;align-self:end;line-height:1.05;color:var(--gold-ink);}
.match-level-destination{grid-column:2;grid-row:2;font-size:15px;align-self:start;margin-top:4px;color:var(--cream);}
.sprite-unavailable .match-level-sprite{visibility:hidden;}
.sprite-unavailable .match-level-celebration{grid-template-columns:minmax(0,1fr);min-height:50px;}
.sprite-unavailable .match-level-announcement,.sprite-unavailable .match-level-destination{grid-column:1;}
.match-unlocks{padding-top:14px;margin-top:13px;border-top:2px solid var(--chrome-border);}
.match-unlocks h3{font-size:13px;font-weight:400;color:var(--chrome-muted);margin:0 0 10px;}
.match-unlock-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
.match-unlock-item{display:grid;grid-template-columns:54px minmax(0,1fr);grid-template-rows:1fr 1fr;align-items:center;column-gap:9px;min-height:70px;padding:7px;background:var(--chrome-raised);border:2px solid var(--chrome-border-strong);border-radius:8px;box-shadow:0 3px 0 var(--chrome-shadow);color:var(--cream);font:inherit;text-align:left;cursor:pointer;}
.match-unlock-item:hover{border-color:var(--gold);}
.match-unlock-item:focus-visible{outline:3px solid var(--gold);outline-offset:2px;}
.match-unlock-item>.progress-reward-icon{grid-column:1;grid-row:1/3;align-self:center;justify-self:center;width:47px!important;height:48px!important;max-width:47px!important;max-height:58px!important;}
.match-unlock-item>.progress-reward-icon.deck{width:36px!important;height:51px!important;max-width:36px!important;max-height:51px!important;aspect-ratio:1/1.435;}
.match-unlock-item>.progress-reward-icon.table-preview{width:53px!important;height:40px!important;max-width:53px!important;max-height:40px!important;}
.match-unlock-item>.progress-reward-icon svg{width:100%;height:100%;}
.match-unlock-item>.progress-reward-icon .locker-table-preview{width:100%;height:100%;}
.match-unlock-name{grid-column:2;grid-row:1;align-self:end;font-size:13px;line-height:1.15;overflow-wrap:anywhere;}
.match-unlock-item>small{grid-column:2;grid-row:2;align-self:start;font-size:11px;color:var(--chrome-muted);margin-top:4px;}
.match-reward-live{position:fixed;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;pointer-events:none;}
.match-rewards-pending{display:flex;flex-direction:column;gap:7px;min-height:68px;}
.match-rewards-pending>strong{font-size:16px;color:var(--cream);}
.match-reward-pending-copy{font-size:13px;line-height:1.35;color:var(--chrome-muted);}
#btnOperatorLevelUp[aria-pressed="true"]{border-color:var(--gold);color:var(--gold-ink);}
body.light .match-result-score{background:var(--chrome-raised);}
body.light #gameoverProgress.match-rewards{background:var(--chrome-well)!important;}
@media(max-width:760px){
  .match-finish-modal{width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:17px;}
  .match-finish-modal .section-title{font-size:25px;margin-bottom:13px;}
  .match-result-scores{gap:5px;margin-bottom:12px!important;}
  .match-result-score{padding:6px 8px;font-size:12px;gap:7px;}
  .match-result-score>strong{font-size:15px;}
  #gameoverProgress.match-rewards{padding:13px 12px;margin-bottom:15px;}
  .match-reward-label{font-size:14px;}
  .match-xp-total{font-size:23px;}
  .match-earned-lines{font-size:12px;gap:7px 14px;margin-bottom:15px;}
  .match-xp-level{font-size:15px;}
  .match-xp-numbers{font-size:11px;}
  .match-unlock-items{gap:7px;}
  .match-unlock-item{grid-template-columns:46px minmax(0,1fr);column-gap:5px;padding:5px;min-height:66px;}
  .match-unlock-name{font-size:11px;}
  .match-unlock-item>small{font-size:10px;}
  .match-unlock-item>.progress-reward-icon{width:42px!important;height:44px!important;max-width:42px!important;}
  .match-unlock-item>.progress-reward-icon.table-preview{width:43px!important;height:34px!important;max-width:43px!important;}
  .match-level-announcement{font-size:23px;}
}
@media(max-width:350px){.match-unlock-items{grid-template-columns:1fr;}.match-earned-lines{font-size:11px;}.match-reward-label{font-size:13px;}.match-xp-total{font-size:21px;}}
@media(max-height:550px) and (min-width:620px){.match-finish-modal{max-height:calc(100dvh - 16px);padding:16px 21px;}.match-finish-modal .section-title{font-size:25px;margin-bottom:10px;}.match-result-scores{margin-bottom:10px!important;}.match-result-score{padding:5px 9px;}.match-earned-lines{margin-bottom:12px;}.match-level-celebration{min-height:60px;margin-top:7px;}.match-level-sprite{width:60px;height:60px;}.match-unlocks{padding-top:9px;margin-top:9px;}}
@media(prefers-reduced-motion:reduce){.match-xp-fill{will-change:auto;}}

.match-unlock-item {position:relative;}
.match-unlock-item[data-art-state="loading"]>* {visibility:hidden;}
.match-unlock-item[data-art-state="loading"]::after {content:'···';position:absolute;inset:0;display:grid;place-items:center;font:600 20px/1 var(--ui-display);color:var(--gold-ink);}

/* The finish actions share a row and the same touch target/shadow. */
.match-finish-actions{display:flex;flex-wrap:wrap;gap:12px;}
.match-finish-actions>.btn{flex:1 1 155px;min-width:0;min-height:48px;margin:0!important;}
#gameoverProgress.match-rewards{position:relative;isolation:isolate;}
.match-reward-confetti{position:absolute;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none;}
.match-level-celebration{grid-template-columns:92px minmax(0,1fr);min-height:88px;column-gap:12px;}
.match-level-sprite{width:92px;height:92px;}
.has-level-up{border-color:var(--gold)!important;}
@media(max-width:760px){.match-level-celebration{grid-template-columns:76px minmax(0,1fr);min-height:74px;column-gap:9px;}.match-level-sprite{width:76px;height:76px;}.match-finish-actions{gap:10px;}.match-finish-actions>.btn{flex-basis:120px;font-size:16px!important;}}
@media(max-height:550px) and (min-width:620px){.match-level-celebration{grid-template-columns:64px minmax(0,1fr);min-height:64px;}.match-level-sprite{width:64px;height:64px;}}
