/* Rewards read as one compact composition, with breathing room below actions. */
.stage-loot .spoils-screen{
 --chest-size:clamp(108px,23cqh,156px);
 --loot-grid-height:min(calc(var(--loot-rows,1)*124px + (var(--loot-rows,1) - 1)*8px),max(90px,calc(100cqh - 344px)));
 grid-template-rows:auto auto auto clamp(70px,16cqh,106px) auto auto;
 align-content:center;gap:5px;padding:42px 14px 34px;
}
.stage-loot .loot-presentation{height:auto;grid-template-rows:var(--loot-grid-height) 32px 42px;gap:8px}
.stage-loot .treasure-spread{height:100%;gap:8px;align-items:center}
.stage-loot .treasure-item{height:100%;max-height:124px;grid-template-rows:minmax(0,76px) 26px 22px}
.stage-loot .treasure-item:after{display:none!important}
.stage-loot .loot-total{margin:0 auto}
.stage-loot .loot-continue{margin:0 auto}
.encounter-rule .intro-ready{border:0;box-shadow:none}
.encounter-rule .intro-ready:before,.encounter-rule .intro-ready:after{display:none!important}

.stage-experience .experience-screen{justify-content:center;gap:5px;padding:42px 18px 34px}
.stage-experience .experience-screen>h1{width:auto;max-width:none;font-size:clamp(18px,3.5cqh,24px);line-height:1.2;letter-spacing:1px;margin:0 0 4px}
.stage-experience .experience-screen .ascension-emblem{width:clamp(90px,22cqh,154px);height:clamp(90px,22cqh,154px);flex:none}
.stage-experience .experience-screen h2{margin:3px 0}
.stage-experience .xp-story{max-width:310px;margin:4px 0;line-height:1.3}
.stage-experience .xp-continue{margin:7px 0 0}
.stage-loot .hoard-finale{justify-content:center;padding:42px 18px 34px;gap:6px}
.stage-loot .hoard-finale .hoard-theater{flex:0 1 auto;height:clamp(110px,33cqh,220px);min-height:90px;margin:0}
.stage-loot .hoard-finale .hoard-receipt{min-height:102px}
.stage-loot .hoard-finale .hoard-continue{margin:7px 0 0}

.oath-ceremony{grid-template-rows:12px auto minmax(0,min(330px,calc(100cqh - 260px))) 24px 16px 52px 40px;align-content:center;gap:4px;padding:24px 12px 36px}
.oath-ceremony .oath-heart{height:100%}
.oath-ceremony .oath-earned-boons{padding:4px 6px}
.oath-ceremony .oath-earned-boons b{font-size:22px}

.shell.stage-results>.result-screen{display:grid;grid-template-rows:minmax(0,140px) auto auto auto auto auto auto;align-content:center;justify-items:center;gap:7px;padding:44px 18px 34px;overflow:hidden}
.stage-results .result-screen>.victory-scene{height:100%;max-height:140px;width:190px;margin:0;min-height:0}
.stage-results .victory-scene .pixel-scene{height:100%;width:100%;object-fit:contain}
.stage-results .result-screen>.eyebrow{font-size:7px;margin:0}
.stage-results .result-screen>h1{font-size:clamp(20px,3.8cqh,28px);line-height:1.2;margin:0;letter-spacing:1px}
.stage-results .result-screen>.result-sub{font-size:12px;line-height:1.3;margin:0;max-width:340px}
.stage-results .result-screen .result-grid{width:min(100%,430px);margin:3px 0;gap:6px}
.stage-results .result-grid>div{padding:7px 4px}
.stage-results .result-grid b{font-size:21px;line-height:1.1}
.stage-results .result-grid span{font-size:7px;line-height:1.2;margin-top:4px}
.stage-results .result-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:5px 0 0;width:min(100%,360px)}
.stage-results .result-actions>.btn{min-width:0;min-height:36px;padding:8px 5px;font-size:8px}
.stage-results .result-actions>.btn:last-child:nth-child(odd){grid-column:1/-1}
.stage-results .result-screen>.badge{padding:6px 12px;font-size:8px}
.stage-results .result-screen.fallen{grid-template-rows:minmax(0,68px) auto auto auto auto auto auto}
.stage-results .fallen-scene{height:100%;margin:0;min-height:0}
.stage-results .result-screen>.footnote{margin:2px 0 0;font-size:10px;line-height:1.3}
.stage-results .result-screen:has(.result-breakdown){overflow-y:auto;align-content:start}
.stage-stats>.menu-screen,.stage-tutorial>.menu-screen{padding-bottom:34px}
.stage-stats .screen-title{margin-bottom:18px}
.stage-stats .stats-grid{gap:8px}
.stage-stats .stat{padding:12px 8px}
.stage-stats .stat strong{font-size:24px;margin-bottom:6px}
.stage-stats .stat span{font-size:8px;line-height:1.4}
.stage-stats .quest-ledger{margin-top:20px}
.stage-stats .footnote{margin-top:16px;font-size:10px;line-height:1.5}
.stage-tutorial .tutorial-art{margin:18px auto;padding:18px}
.stage-tutorial .tutorial-nav{margin:18px auto 0}

/* A small lift keeps combat controls clear of the advertisement. */
.stage-combat .combat.screen{padding-bottom:16px}
.stage-combat .combat .turn-clock{position:relative;top:-3px}

@media(max-height:650px) and (max-width:599px){
 .stage-loot .spoils-screen{padding-top:38px;padding-bottom:30px;gap:4px;--loot-grid-height:min(calc(var(--loot-rows,1)*116px + (var(--loot-rows,1) - 1)*8px),max(84px,calc(100cqh - 326px)))}
 .stage-loot .loot-presentation{gap:6px}
 .stage-experience .experience-screen{padding:38px 16px 30px;gap:4px}
 .stage-experience .experience-screen>h1{font-size:19px}
 .stage-experience .experience-screen .ascension-emblem{width:104px;height:104px}
 .stage-experience .experience-screen h2{font-size:20px;margin:2px 0}
 .stage-experience .xp-tally{margin:0;font-size:14px}.stage-experience .xp-story{font-size:11px}
 .stage-experience .xp-test-ascension{padding:5px}
 .stage-results .result-screen>.victory-scene{max-height:110px}
 .stage-results .result-screen>.badge{padding:4px 10px}
 .stage-results .result-grid b{font-size:18px}
}
@media(orientation:landscape) and (max-height:500px){
 .stage-loot .spoils-screen{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);grid-template-rows:auto auto auto minmax(0,1fr) auto;padding:32px 35px 28px;column-gap:22px;align-content:stretch}
 .stage-loot .loot-presentation{grid-row:1/6;grid-template-rows:minmax(0,1fr) 28px 38px;height:100%;gap:5px}
 .stage-loot .loot-continue{height:38px;min-height:38px}
 .stage-loot .loot-stage{grid-row:4}
 .stage-experience .experience-screen{padding:32px 40px 28px;gap:4px 20px;justify-content:normal}
 .stage-experience .experience-screen .ascension-emblem{width:84px;height:84px}
 .stage-experience .xp-continue{margin:0;min-height:36px}
 .stage-loot .hoard-finale{padding:32px 35px 28px;gap:5px 22px}
 .stage-loot .hoard-finale .hoard-theater{height:100%;min-height:0}
 .stage-loot .hoard-finale .hoard-continue{margin:0;min-height:38px}
 .oath-ceremony{grid-template-columns:1fr 1fr;grid-template-rows:12px auto 24px 16px 48px 38px;padding:14px 24px 28px;gap:4px 14px}
 .shell.stage-results>.result-screen{grid-template-columns:1fr 1.2fr;grid-template-rows:auto auto auto minmax(0,1fr);padding:32px 35px 28px;gap:6px 20px}
 .stage-results .result-screen>.victory-scene,.stage-results .result-screen>.fallen-scene{grid-column:1;grid-row:4;max-height:100px;align-self:center}
 .stage-results .result-screen>.eyebrow{grid-column:1;grid-row:1}.stage-results .result-screen>h1{grid-column:1;grid-row:2;font-size:22px}
 .stage-results .result-screen>.result-sub{grid-column:1;grid-row:3;font-size:10px}
 .stage-results .result-screen>.result-grid{grid-column:2;grid-row:1/4;margin:0;align-self:center}
 .stage-results .result-screen>.badge{display:none}
 .stage-results .result-actions{grid-column:2;grid-row:4;margin:0;align-self:start;gap:5px}
 .stage-results .result-actions>.btn{min-height:32px;padding:6px 4px;font-size:7px}
 .stage-results .result-screen>.footnote{display:none}
}
