/* Academy honors hall: both match heroes and their rewards. */
body #overlay:where([data-score-step]):not(#_ms){background:radial-gradient(ellipse at 50% 0,#57416666,transparent 65%),linear-gradient(#211a32ed,#181322f5),url('art/academy-honors.svg') center/cover!important;color:#eee0c8;cursor:default}
body #overlay:where([data-score-step]):not(#_ms) .modal{background:linear-gradient(135deg,#392b46e8,#211a32ed)!important;border:1px solid #b49a68!important;border-bottom:4px solid #665039!important;border-radius:22px!important;box-shadow:inset 0 0 0 4px #d1b98622,0 20px 70px #100a2277!important;color:#eee0c8}
body #overlay:where([data-score-step]):not(#_ms) :is(#title,h3,h4){font-family:Georgia,serif!important;color:#f0d8a4!important;text-shadow:0 2px 3px #140b24}
body #overlay:where([data-score-step]):not(#_ms) :is(.eyebrow,.sigil){color:#efd29a!important}
body #overlay:where([data-score-step]):not(#_ms) :is(.score-tabs button,#start,#overlay-menu){border:1px solid #b49a68!important;border-bottom:4px solid #665039!important;background:linear-gradient(#4a3856,#2c233b)!important;color:#f0d8a4!important;font-family:Georgia,serif!important;box-shadow:inset 0 0 0 2px #d1b98622,0 3px 8px #100a2255!important;border-radius:10px 16px!important}
body #overlay:where([data-score-step]):not(#_ms) .score-tabs button[aria-pressed=true],body #overlay:where([data-score-step]):not(#_ms) #start{background:linear-gradient(#ead4a1,#bd9960)!important;color:#302139!important;border-color:#f2dca7!important}
body #overlay #match-scoreboard .hero-card{border:1px solid #b49a68;border-bottom:4px solid #665039;background:linear-gradient(#30253cd9,#211a32ed),url('art/academy-honors.svg') center/cover;box-shadow:inset 0 0 0 3px #1c172880,inset 0 0 0 4px #d1b98633,0 4px 12px #100a2255}
body #overlay #match-scoreboard .hero-card.your-hero{border-color:#e8cc91;box-shadow:inset 0 0 0 3px #1c172880,inset 0 0 0 4px #d1b98655,0 0 18px #d7b87e20}
body #overlay #match-scoreboard :is(.hero-card h4,.hero-numbers){background-color:#292035;color:#e4d4ba}
body #overlay #match-scoreboard .hero-numbers>div{background:#21192e;border:1px solid #b49a6833;border-radius:8px}
body #overlay #match-scoreboard .hero-numbers b{font-family:Georgia,serif;color:#ffe6a7}
body #overlay #match-scoreboard :is(.hero-numbers small,.hero-rank small,.stage-hint){color:#d8c7b5}
body #overlay #match-scoreboard :is(.hero-rank,.hero-awards,.hero-profile-hint){color:#f0d8a4}
body #overlay:where([data-score-step]):not(#_ms) #description{color:#e4d4ba}
body #overlay:where([data-score-step]):not(#_ms) #description :is(strong,b){color:#ffe1a4}
body #overlay:where([data-score-step]):not(#_ms) button:focus-visible,body #match-scoreboard .hero-profile-link:focus-visible{outline:2px solid #ffe2a6;outline-offset:3px}
/* The game's global canvas crosshair belongs only to combat, never portraits. */
body #overlay:where([data-score-step]):not(#_ms) canvas,body #match-user-dialog canvas{cursor:default!important}
body #match-user-dialog{background:radial-gradient(ellipse at 50% 0,#57416655,transparent 65%),linear-gradient(#211a32ed,#181322f5),url('art/academy-honors.svg') center/cover!important;border-color:#b49a68!important;color:#eee0c8}
body #match-user-dialog :is(h2,h3){font-family:Georgia,serif;color:#f0d8a4}
body #match-user-dialog :is(.guild-stat-hero,.guild-stats>div){border:1px solid #b49a68;border-bottom:4px solid #665039;border-radius:16px;background:linear-gradient(#30253cc9,#211a32e8),url('art/academy-honors.svg') center/cover;box-shadow:inset 0 0 0 4px #d1b98622}
body #match-user-dialog .guild-stats strong{color:#ffe6a7;font-family:Georgia,serif}
body #match-user-dialog button{border-color:#b49a68!important;background:linear-gradient(#4a3856,#2c233b)!important;color:#f0d8a4!important}
body #match-user-dialog button[aria-pressed=true]{background:linear-gradient(#ead4a1,#bd9960)!important;color:#302139!important}

body #overlay:where([data-score-step]):not(#_ms) .eyebrow{background:linear-gradient(#ead4a1,#bd9960)!important;color:#302139!important;text-shadow:none!important;border-color:#f2dca7!important}

/* Reserve a compact graduation row rather than adding an implicit overflowing grid row. */
body #overlay:not([hidden]):where([data-score-step=heroes]):not(._ms):not(._hb) .modal:has(.exam-result){grid-template-rows:auto auto auto minmax(0,1fr) auto!important;overflow:hidden!important}
body #overlay #headmaster-exam-result.exam-graduation{grid-template-columns:48px minmax(0,1fr) 110px!important;max-width:760px;width:min(760px,100%);padding:8px 12px!important;margin:0 auto!important;gap:10px;font-size:clamp(13px,1.7vh,18px);align-items:center}
body #overlay #headmaster-exam-result.exam-graduation>img{width:48px;height:66px}
body #overlay #headmaster-exam-result.exam-graduation .exam-property{grid-column:3;grid-row:1;width:100px;margin:0}
body #overlay:not([hidden]):where([data-score-step]):not(#_ms){overflow:hidden!important}
@media(max-height:550px){body #overlay #headmaster-exam-result.exam-graduation{grid-template-columns:32px minmax(0,1fr) 70px!important;padding:4px 8px!important;font-size:12px;gap:6px}body #overlay #headmaster-exam-result.exam-graduation>img{width:32px;height:44px}body #overlay #headmaster-exam-result.exam-graduation .exam-property{width:64px}body #overlay:has(.exam-graduation) .stage-hint,body #overlay:has(.exam-graduation) .hero-profile-hint{display:none}body #overlay:where(:has(.exam-graduation)) .score-tabs button.score-tab{padding:4px 12px!important;font-size:13px!important}}

body #overlay #headmaster-exam-result.exam-result{grid-column:1/-1;justify-self:center;align-self:start;box-sizing:border-box;width:min(760px,100%);max-width:760px;margin:0 auto!important;display:flex;align-items:center;gap:12px;padding:8px 14px;font-size:clamp(13px,1.7vh,18px);min-height:0}
body #overlay #headmaster-exam-result.exam-result>img{width:44px;height:60px;object-fit:contain;flex:none}
body #overlay #headmaster-exam-result.exam-graduation{display:grid}
@media(max-height:550px){body #overlay #headmaster-exam-result.exam-result{padding:4px 8px;font-size:12px;gap:8px}body #overlay #headmaster-exam-result.exam-result>img{width:30px;height:40px}}

body #overlay:where([data-score-step=heroes]):not(._ms):not(._hb) .modal:has(.exam-result) #headmaster-exam-result{grid-row:1}
body #overlay:where([data-score-step=heroes]):not(._ms):not(._hb) .modal:has(.exam-result) .eyebrow{grid-row:2}
body #overlay:where([data-score-step=heroes]):not(._ms):not(._hb) .modal:has(.exam-result) #title{grid-row:3}
body #overlay:where([data-score-step=heroes]):not(._ms):not(._hb) .modal:has(.exam-result) #match-scoreboard{grid-row:4}
body #overlay:where([data-score-step=heroes]):not(._ms):not(._hb) .modal:has(.exam-result) :is(#start,#overlay-menu){grid-row:5}
@media(max-height:620px){body #overlay:not([hidden]):where([data-score-step=heroes]):not(._ms):not(._hb) .modal:has(.exam-result){grid-template-rows:auto auto minmax(0,1fr) auto!important}body #overlay:where([data-score-step=heroes]):not(._ms):not(._hb) .modal:has(.exam-result) #title{grid-row:2}body #overlay:where([data-score-step=heroes]):not(._ms):not(._hb) .modal:has(.exam-result) #match-scoreboard{grid-row:3}body #overlay:where([data-score-step=heroes]):not(._ms):not(._hb) .modal:has(.exam-result) :is(#start,#overlay-menu){grid-row:4}}

/* Reserve every card row and keep tablet/browser chrome inside the viewport. */
body #overlay:not([hidden]):where([data-score-step=heroes]):not(._ms):not(._hb) .modal{height:calc(100dvh - 16px)!important;max-height:calc(100dvh - 16px)!important;max-width:calc(100vw - 16px)!important;min-height:0!important;overflow:hidden!important}
body #overlay:not([hidden]):where([data-score-step=heroes]):not(._ms):not(._hb) .hero-card{grid-template-rows:44px minmax(24px,1fr) 22px 48px auto;min-width:0}
body #overlay .hero-profile-hint{padding:2px;font-size:10px;line-height:12px}
body #overlay .hero-portrait-frame{min-height:0;overflow:hidden}
body #overlay .hero-card h4{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;min-width:0}
@media(max-height:620px){body #overlay:not([hidden]):where([data-score-step=heroes]):not(._ms):not(._hb) .hero-card{grid-template-rows:32px minmax(20px,1fr) 18px 34px}body #overlay .hero-profile-hint{display:none}body #overlay .hero-medals{height:auto;min-height:0;padding:0 6px;font-size:10px}body #overlay #match-scoreboard .hero-rank .rank-badge{width:28px!important;height:28px!important;flex-basis:28px}body #overlay #match-scoreboard .hero-numbers{padding:0 4px 2px}body #overlay #match-scoreboard .hero-numbers b{font-size:16px;line-height:18px}body #overlay #match-scoreboard .hero-numbers small{font-size:9px;line-height:10px}}
/* Exit/settings always shrink and wrap inside the arena's safe edges. */
body #match .heading{right:max(10px,env(safe-area-inset-right))!important;left:max(10px,env(safe-area-inset-left))!important;max-width:calc(100% - 20px);min-width:0}
body #match .heading>div:first-child{min-width:0;flex-shrink:1}
body #match .settings{min-width:0;max-width:100%;flex-shrink:0;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:4px}
body #match .settings button{max-width:100%;white-space:normal}
@media(max-width:1100px){body #match .heading{gap:6px}body #match .settings button{padding:6px 8px!important;font-size:12px!important}body #match .heading h1{font-size:13px}}

body #overlay:where([data-score-step]):not(#_ms) #title{text-align:center;justify-self:center;width:100%}
body #overlay:where([data-score-step=rewards]):not(#_ms):not(._ms){display:grid!important;place-items:center;padding:8px!important;overflow:hidden!important}
body #overlay .modal:where([data-score-step=rewards]):not(#_ms):not(._ms){height:auto!important;max-height:none!important;min-height:0!important;overflow:visible!important;zoom:var(--reward-fit,1);padding:12px!important;margin:0!important}
body #overlay:where([data-score-step=rewards]):not(#_ms):not(._ms) :is(#title,#description,.score-tabs){margin:6px 0!important}
body #overlay:where([data-score-step=rewards]):not(#_ms):not(._ms) #title{font-size:clamp(22px,4vh,36px)!important}
body #overlay:where([data-score-step=rewards]):not(#_ms):not(._ms) .score-tabs button{padding:6px 16px;font-size:16px}
/* Overgrowth season progress, shared by local and online reward summaries. */
body #overlay .result-season-pass{position:relative;isolation:isolate;margin:12px 0 4px;padding:12px 16px;border:1px solid #c6b58a;border-bottom:3px solid #617848;border-radius:14px;background:linear-gradient(110deg,#3d2f20f5,#2d2014ed),url('art/season-pass-interior.svg') center/cover;box-shadow:inset 0 0 0 3px #dacba61a;color:#e9e0cb;text-align:left;font-family:Georgia,serif}
.result-season-pass:before,.result-season-pass:after{content:'';position:absolute;pointer-events:none;width:38px;height:38px;background:url('art/season-pass-corner.svg') center/contain no-repeat;opacity:.85;z-index:-1}.result-season-pass:before{top:0;left:0}.result-season-pass:after{bottom:0;right:0;transform:rotate(180deg)}
.result-season-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;padding-bottom:8px;border-bottom:1px solid #c6b58a33;font-size:11px;letter-spacing:.06em;color:#e7d49a}.result-season-gain{color:#a6e0dc;font-size:11px;white-space:nowrap}
.result-season-body{display:flex;align-items:center;gap:18px;padding-top:9px}.result-season-tier{min-width:90px;text-align:center}.result-season-tier small{display:block;color:#d7c9a5;font-size:9px;letter-spacing:.1em}.result-season-tier strong{display:block;font-size:27px;color:#f2e2ab!important;white-space:nowrap}.result-season-xp{flex:1;min-width:0}.result-season-copy{display:flex;justify-content:space-between;gap:8px;font-size:12px;margin-bottom:6px}.result-season-copy b{color:#e9e0cb!important}.result-season-copy>span{color:#d0c5a6}.result-season-xp progress{display:block;appearance:none;width:100%;height:12px;border:1px solid #799958;border-radius:9px;overflow:hidden;background:#0b201a}.result-season-xp progress::-webkit-progress-bar{background:#0b201a}.result-season-xp progress::-webkit-progress-value{background:linear-gradient(90deg,#548b48,#d3bc7d,#eedb9b);border-radius:8px}.result-season-xp progress::-moz-progress-bar{background:linear-gradient(90deg,#548b48,#d3bc7d,#eedb9b)}.result-season-status{display:block;margin-top:5px;color:#cec2a3;font-size:11px}.season-tier-up .result-season-status{color:#ffe6a0}.season-tier-up .result-season-tier strong{animation:season-tier-bloom 1.1s ease-out}
@keyframes season-tier-bloom{from{text-shadow:0 0 24px #e8d48a;transform:scale(1.15)}to{text-shadow:none;transform:none}}
@media(max-width:600px),(max-height:500px){body #overlay .result-season-pass{padding:8px 12px;margin:8px 0 2px}.result-season-body{gap:10px;padding-top:6px}.result-season-tier{min-width:70px}.result-season-tier strong{font-size:23px}.result-season-heading{font-size:10px;padding-bottom:5px}.result-season-copy{flex-wrap:wrap;font-size:11px;gap:2px 8px}.result-season-status{font-size:10px}}
@media(prefers-reduced-motion:reduce){.season-tier-up .result-season-tier strong{animation:none}}
