.celestial-result{--panel-h:min(740px,90dvh);--panel-w:min(94vw,480px);background:#102e35 url('art/celestial/result.png') center/100% 100% no-repeat!important;border:0!important;box-shadow:0 20px 90px #000c!important;width:var(--panel-w)!important;height:var(--panel-h);padding:calc(var(--panel-h)*.16) calc(var(--panel-w)*.175) calc(var(--panel-h)*.13)!important;min-height:0;max-height:90dvh;color:#fff0bf;overflow:hidden}
.celestial-result h2{text-align:center;color:#ffe4a0;font-family:KaiTi,serif;font-size:clamp(22px,5vw,32px);margin:12px 0}.celestial-result .result-podium{display:none}.celestial-result #resultRanks{max-height:43vh;overflow:auto}.celestial-result .result-row{background:#08232bbb;border:1px solid #d2aa6055;border-radius:9px;padding:12px;margin:8px 0}.celestial-result #resultReward{text-align:center;color:#f1d690}.celestial-jade{display:inline-block;color:#fff2a6;font-size:18px;font-weight:bold;text-shadow:0 0 12px #ffc65388;padding:5px 0}.celestial-result button{border-color:#c9a35b}.celestial-reward-preview{display:flex;flex-wrap:wrap;gap:9px;background:#103137;border:1px solid #ba985955;color:#ffe2a0;padding:12px;border-radius:10px;margin:12px 0}.stage-card.celestial{border-color:#dbb96b88;box-shadow:inset 0 0 20px #c8983c18}.saga-tabs{flex-wrap:wrap}
.stage-card.celestial:after{content:'天外';color:#ffe6b2}
.celestial-result .result-row{grid-template-columns:24px 28px minmax(0,1fr)}.celestial-result #resultRanks{max-height:calc(var(--panel-h)*.42)}.celestial-result h2{color:#4a3218;text-shadow:0 1px #fff3c9;font-size:clamp(19px,4vw,25px);margin:0 0 12px}.celestial-result .earned-materials{gap:4px}.celestial-result .earned-materials span{font-size:11px}.celestial-result .earned-materials svg{width:26px;height:26px}
@media(max-width:430px){.celestial-result{padding-left:calc(var(--panel-w)*.175)!important;padding-right:calc(var(--panel-w)*.175)!important}.celestial-result .result-row{padding:8px}.celestial-result h2{font-size:20px}}
.celestial-result h2{font-size:19px!important;letter-spacing:1px;white-space:nowrap}.celestial-result .result-row{display:grid;grid-template-columns:20px 24px minmax(0,1fr);gap:6px;font-size:13px;line-height:1.55}.celestial-result .result-row>div{min-width:0}.celestial-result .result-row .avatar{width:24px;height:24px}.celestial-result .result-row p{margin:5px 0}.celestial-result .earned-materials{display:flex;flex-wrap:wrap}.celestial-result #nextStageBtn,.celestial-result #continueBtn{position:absolute;bottom:calc(var(--panel-h)*.13);width:30%;padding:9px 3px;border:1px solid #b18b43;border-radius:6px;background:linear-gradient(#efd59b,#b48a43);color:#3c2b15;font:bold 13px KaiTi,serif;min-height:36px}.celestial-result #nextStageBtn{left:18%}.celestial-result #continueBtn{right:18%}.celestial-result #nextRoundClock{font-size:11px;text-align:center;margin-top:8px}
/* Isolate this activity from the legacy 920px, game-scaled royal dialog. */
#resultDialog.celestial-result[open]{display:block!important;transform:none!important;box-sizing:border-box;width:var(--panel-w)!important;height:var(--panel-h)!important;max-height:90dvh!important;max-width:94vw!important;padding:calc(var(--panel-h)*.16) calc(var(--panel-w)*.175) calc(var(--panel-h)*.13)!important;text-align:center}
#resultDialog.celestial-result #resultEmblem,#resultDialog.celestial-result #resultEyebrow{display:none!important}
#resultDialog.celestial-result #resultTitle{display:block!important;color:#4a3218!important;text-shadow:0 1px #fff3c9!important;font-size:19px!important;line-height:1.3;letter-spacing:1px!important;margin:0 0 12px!important}
#resultDialog.celestial-result #resultReward{display:block!important;font-size:13px!important;line-height:1.5;margin:6px 0 12px!important;text-align:center}
#resultDialog.celestial-result #resultRanks{display:block!important;flex:none!important;min-height:0;height:auto!important;max-height:calc(var(--panel-h)*.42)!important;overflow:auto;text-align:left}
#resultDialog.celestial-result #continueBtn,#resultDialog.celestial-result #nextStageBtn{position:absolute!important;bottom:calc(var(--panel-h)*.13)!important;width:30%!important;min-height:36px!important;margin:0!important;padding:9px 3px!important;border:1px solid #b18b43!important;background:linear-gradient(#efd59b,#b48a43)!important;color:#3c2b15!important;font:bold 13px KaiTi,serif!important}
#resultDialog.celestial-result #nextStageBtn{left:18%!important}#resultDialog.celestial-result #continueBtn{right:18%!important}

.saga-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.saga-tabs button{min-width:0;padding:11px 3px;line-height:1.4}.saga-tabs strong{display:block;font-size:13px}.saga-tabs small{display:block;font-size:10px;font-weight:normal;margin-top:4px;color:#c9bd9f}.saga-tabs button:disabled{opacity:1;background:#203439;color:#a9b8b5;border-color:#647672;cursor:default}.saga-tabs button:disabled small{color:#a9b8b5}

.page-intro:has(#mapProgress){display:block}.page-intro:has(#mapProgress) h2{font-size:clamp(18px,4vw,24px);white-space:nowrap}.page-intro #mapProgress{display:inline-block;max-width:100%;margin-top:7px;font-size:10px;line-height:1.6;box-sizing:border-box;white-space:normal}

.celestial-goal{box-sizing:border-box;background:#102e35ed;border:1px solid #d2b26999;border-radius:9px;padding:8px 12px;color:#ffe3a3;line-height:1.4}.celestial-goal>div:first-child{display:flex;justify-content:space-between;gap:8px;font-size:14px}.celestial-goal small{display:block;font-size:11px;color:#e2d5b5;margin-top:4px}.celestial-goal-bar{height:5px;background:#031e25;border-radius:6px;margin:5px 0;overflow:hidden}.celestial-goal-bar i{display:block;height:100%;background:linear-gradient(90deg,#349f91,#f0cc7c);transition:width .3s}.celestial-goal.funded{border-color:#70d5ae}.celestial-goal.funded strong{color:#aaf0cf}.celestial-reward-preview small{flex-basis:100%;line-height:1.7}.celestial-goal-slot:empty{display:none}
/* Battle goal replaces the flavor strip, leaving the actors unobstructed. */
.scene-bottom:has(.celestial-goal){display:block!important;padding:0!important;background:none!important;left:12px!important;right:12px!important;top:265px!important;bottom:auto!important}.scene-bottom:has(.celestial-goal) .npc-label{display:none!important}
#resultDialog.celestial-result #resultRanks{max-height:calc(var(--panel-h)*.34)!important}.celestial-result .result-row .celestial-jade{font-size:15px}

#resultDialog.celestial-result #resultReward{margin-top:24px!important}
