/* Selected screen artwork. Gameplay owns numbers, rewards and button actions. */
#stage #loading {
  background: #21152e url('./assets/selected-ui/loading-live.webp') center/100% 100% no-repeat;
}
#loading :is(.loading-logo,.loading-party,.loading-tip),#loading h2 {opacity:0}
#stage #loading .loading-track {inset:83.4% 12% auto;width:76%;height:2.85%;border:0;padding:0;background:#32103d;border-radius:2cqw;box-shadow:none}
#stage #loading .loading-track i {background:linear-gradient(#ffa8ff,#ba22df 48%,#8b0ebe);height:100%}
#stage #loading #load-detail {top:74.6%;left:12%;width:76%;text-align:center;font-size:2.6cqw;background:#251431e8;border-radius:2cqw}
#stage .bless-dialog>.modal-title-art {
  content:url('./assets/selected-ui/bless-banner.webp');width:80%;height:22cqw;min-height:0;object-fit:contain;filter:none;
}
#stage .bless-dialog>.bless-subtitle {display:none}
#stage .bless-dialog .blessing-choice {height:52cqw;background-size:100% 100%;filter:drop-shadow(0 .5cqw .5cqw #170c1e)}
#stage .bless-dialog .rarity-0 {background-image:url('./assets/selected-ui/choice-0.webp')!important}
#stage .bless-dialog .rarity-1 {background-image:url('./assets/selected-ui/choice-1.webp')!important}
#stage .bless-dialog .rarity-2 {background-image:url('./assets/selected-ui/choice-2.webp')!important}
#stage .bless-dialog .blessing-choice>strong {top:5.5%;height:12%}
#stage .bless-dialog .blessing-choice>img {top:19%;height:28%}
#stage .bless-dialog .blessing-effect {top:46%;height:9%}
#stage .bless-dialog .blessing-value {top:56%;height:12%}
#stage .bless-dialog .blessing-note {top:68%;height:9%}
#stage .bless-dialog .blessing-limit {top:78%;height:12%}
#stage .pause-dialog>.owned-bless-panel {
 background: url('./assets/selected-ui/owned-panel.webp') center/100% 100% no-repeat;
 padding:6.8cqw 6cqw 3.6cqw;
}
#stage .pause-dialog .owned-bless-panel>h3 {opacity:0;height:0;min-height:0;margin:0;padding:0}
#stage .pause-dialog>.pause-main {
  position:relative;background:transparent url('./assets/selected-ui/pause-panel.webp') center/100% 100% no-repeat;
  border:0;box-shadow:none;padding:25% 17% 7%;margin:2cqw auto 0;width:100%;border-radius:0;
}
#stage .pause-main :is(.pause-mascot,.ribbon-heading){opacity:0;pointer-events:none}
#stage .pause-main>.primary-button,#stage .pause-main>.secondary-button {min-height:8cqw!important;height:8cqw;margin:.45cqw 0!important;padding:1cqw!important}
#stage .pause-main .pause-toggles {margin:2cqw 0 0;padding:1cqw 0;border:0}
#stage .revive-dialog {background:transparent url('./assets/selected-ui/revive-panel.webp') center/100% 100% no-repeat;padding:0}
#stage .revive-dialog>.modal-title-art,#stage .revive-visual>img {opacity:0}
#stage .revive-dialog>p {position:absolute;inset:26% 7% auto;margin:0;font-size:2.7cqw;text-align:center}
#stage .revive-dialog .revive-ring {position:absolute;left:13%;top:37%;width:28%;height:26%;background:none}
#stage .revive-dialog .revive-ring strong {font-size:8cqw}
#stage .revive-dialog .revive-actions {position:absolute;left:8%;right:8%;top:68%;height:17%}
#stage .result-dialog:is(.result-win,.result-lose) {position:absolute;inset:0;width:100%;height:100%;max-height:none;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;background-size:100% 100%}
#stage .result-dialog.result-win {
  isolation:isolate;background:#191331;
  background-image:linear-gradient(#19133190,#352149b0),url('./assets/bg_dungeon_01.png');
}
#stage .result-win::before {
  content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:url('./assets/selected-ui/win-live.webp') center/100% 100% no-repeat;
  clip-path:polygon(0 0,89% 0,89% 6.3%,100% 6.3%,100% 100%,0 100%);
  mask-image:linear-gradient(#000 83.7%,transparent 84.65%);
}
#stage .result-dialog.result-lose {background-image:url('./assets/selected-ui/lose-live.webp')}
#stage .result-dialog>.result-hero,#stage .result-dialog>.result-heading>.modal-title-art {visibility:hidden}
#stage .result-win>.result-star-row {position:absolute;top:16.6%;left:26%;width:48%;height:7.8%;display:flex;justify-content:center;align-items:center;margin:0}
#stage .result-win>.result-star-row img {height:88%;width:30%;object-fit:contain}
#stage .result-dialog .hf-result-top {top:.5%;height:4.2%;font-size:2.9cqw}
#stage .result-win .hf-result-top {
  inset:2.35% 11.6% auto 7.5%;height:3.65%;gap:1.9cqw;font-size:3.15cqw;
}
#stage .result-win .hf-result-top>span {background:none;padding:0}
#stage .result-win .hf-result-top>span:last-child {width:17.8cqw;padding-inline:5.6cqw 1cqw}
#stage .result-win .hf-result-top>span:last-child>img {display:none}
#stage .result-dialog .hf-result-loot {background:none;padding:0;top:70.9%;left:15%;right:15%;height:11%}
#stage .result-dialog .hf-result-loot>h3,#stage .result-lose .hf-defeat-stats>h3 {opacity:0}
#stage .result-lose .hf-defeat-stats {background:none;top:39.5%;height:16.2%;padding:0;left:10%;right:10%}
#stage .result-lose .hf-result-loot {top:60.5%;height:6.5%;left:19%;right:19%}
#stage .result-lose>.result-actions {top:72%;height:20%;justify-content:center}
#stage .tutorial-demo {background:#241934 url('./assets/selected-ui/guide-demo.webp') center/100% 100% no-repeat;overflow:hidden}
#stage .tutorial-demo>* {visibility:hidden}
#stage .hf-settings .hf-settings-intro {background:url('./assets/selected-ui/settings-hero.webp') center/100% 100% no-repeat;height:16cqw}
#stage .hf-settings-intro>* {opacity:0}
#stage .if-page-rank .if-heading>.if-title,#stage .if-page-tasks .if-heading>.if-title {
 background:var(--selected-banner) center/contain no-repeat;color:transparent!important;text-shadow:none!important;-webkit-text-stroke:0!important;
}
#stage .if-page-rank {--selected-banner:url('./assets/selected-ui/rank-title.webp')}
#stage .if-page-tasks {--selected-banner:url('./assets/selected-ui/tasks-title.webp')}
#stage .hf-rank-podium {background:url('./assets/selected-ui/podium.webp') center/100% 100% no-repeat}
#stage .hf-rank-podium .hf-podium {background:none;box-shadow:none;border:0}
#stage .hf-rank-podium :is(.hf-podium-avatar,.hf-podium-medal) {visibility:hidden}
#stage .hf-rank-podium .hf-podium>strong,#stage .hf-rank-podium .hf-podium-score {background:#33183f;color:#fff2ce;border-radius:1cqw;padding:0 1cqw}
#stage .hf-chest-stage {margin:0;background:url('./assets/selected-ui/treasure-stage.webp') center/cover no-repeat}
#stage .hf-chest-stage>* {visibility:hidden}
#stage .reward-layer.is-chest.is-revealed .reward-heading {background:url('./assets/selected-ui/treasure-heading.webp') center/contain no-repeat;color:transparent!important;text-shadow:none!important}
#stage .reward-layer.is-chest.is-revealed .reward-heading>* {opacity:0}
#stage .tutorial-demo {background-image:url('./assets/selected-ui/tutorial-live.webp')}
#stage .tutorial-dialogue {top:auto;bottom:12%;background:#fff0d1}
#stage .tutorial-panel .tutorial-close {background-color:#361942}
#stage .result-win>.result-star-row {inset:16.5% 25% auto;height:8%;width:50%;gap:0}
#stage .result-star-row img[alt="已获星"] {opacity:0}
#stage .result-star-row img[alt="未获星"] {filter:grayscale(1) brightness(.6);height:100%;width:33.3%}
#stage .result-win .hf-victory-stats {
  inset:49.5% 9.5% auto 53%;height:14.55%;gap:2.4cqw;
  grid-template-rows:repeat(3,minmax(0,1fr));
}
#stage .result-win .hf-victory-stats>div {
  display:flex;justify-content:flex-end;position:relative;padding:0 5.5cqw 0 1cqw;
  border-radius:.65cqw;background:linear-gradient(90deg,#29183b,#341d4b 28%,#32224d);
}
#stage .result-win .hf-victory-stats strong {
  display:flex;justify-content:flex-end;align-items:center;gap:.45cqw;min-width:0;font-size:4.5cqw;
}
#stage .result-win .hf-result-loot {inset:71% 15.1% auto;height:10.9%}
#stage .result-win .hf-loot-cards {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.45cqw}
#stage .result-win .hf-loot-cards>div {width:100%;font-size:4.15cqw;gap:.65cqw}
#stage .result-win .hf-loot-cards>div>img {width:8.5cqw;height:8.5cqw}
#stage .result-win .result-actions {
  inset:85.1% 8% auto;height:auto;grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-rows:4.15cqw 12.6cqw 7.5cqw;gap:.95cqw 2cqw;align-items:center;
}
#stage .result-win .result-bonus-tag {
  grid-area:1 / 1;justify-self:center;padding:.2cqw 2cqw;line-height:1.12;
  color:#fff0be;font-size:2.55cqw;font-weight:750;
  background:#882b48;border:1px solid #f1b45b;border-radius:4cqw;
}
#stage .result-win .result-actions:has(#result-bonus:disabled) .result-bonus-tag {visibility:hidden}
#stage .result-win .result-actions>.primary-button {height:100%;min-width:0}
#stage .result-win .result-actions>button:focus-visible {outline:1px solid #ffd57d;outline-offset:.3cqw;border-radius:100px}
#stage .result-win #result-bonus {grid-area:2 / 1}
#stage .result-win #result-next {grid-area:2 / 2}
#stage .result-win #result-home {grid-area:3 / 1 / 4 / 3;min-height:100%;padding:0 4cqw}
#stage .result-win #result-bonus:disabled {font-size:3.6cqw!important}
#stage .result-lose>.result-actions {inset:79.7% 20% auto;height:15%;gap:.5cqw}
#stage .result-lose .result-actions>button {height:7cqw;min-height:0!important;padding:1cqw!important}
#stage .hf-tasks .hf-task-main {grid-template-columns:minmax(0,1fr)}
#stage .hf-tasks .hf-task-list {margin:0}
#stage .hf-tasks .hf-task-side {display:none}
#stage .hf-tasks .hf-task-footer {background:url('./assets/selected-ui/tasks-footer.webp') center/cover no-repeat;align-items:center;justify-content:flex-end}
#stage .hf-task-footer>img {visibility:hidden}
#stage .if-page-tasks .hf-task-line {min-height:12cqw;grid-template-columns:8cqw minmax(0,1fr) 12cqw 14cqw;grid-template-rows:auto;gap:1cqw}
#stage .if-page-tasks .hf-task-line>* {grid-row:1;align-self:center}
#stage .if-page-tasks .hf-task-line>.hf-action {grid-column:4;min-height:0;height:7cqw}
#stage .if-page-tasks .hf-task-line .hf-task-copy p {font-size:2.5cqw}
#stage .tutorial-panel:not([data-guide-step="0"]) .tutorial-demo {background:#241934}
#stage .tutorial-panel:not([data-guide-step="0"]) .tutorial-demo>* {visibility:visible}
#stage #loading .loading-track::after {content:attr(data-percent);position:absolute;inset:0;display:grid;place-items:center;color:#fff;font-weight:800;font-size:2.8cqw;line-height:1;text-shadow:0 .2cqw .4cqw #27072e}

/* The menu shell owns the five destinations. Dialogs and battle stay above it. */
#stage .interface-root > .if-nav {
  position:absolute; inset:auto 0 0; z-index:3; height:10%; min-height:0;
  display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:.4cqw;
  padding:.6cqw .7cqw .8cqw; background:linear-gradient(#61406a,#24152f 12%,#160e24);
}
#stage .interface-root:not(.if-visible) > .if-nav {display:none}
#stage .interface-root > .if-nav .if-nav-item {min-width:0;display:flex;align-items:center;justify-content:center;padding:.6cqw .4cqw}
#stage .interface-root > .if-nav .if-nav-item img {height:8cqw;width:10cqw;object-fit:contain}
#stage .interface-root > .if-nav .if-nav-item strong {height:4.2cqw;display:grid;place-items:center;font-size:3.6cqw;line-height:1}
#stage .interface-root .if-page:is(.if-page-signin,.if-page-tasks,.if-page-rank,.if-page-settings,.if-page-chest) {height:90%}
#stage .rp-page .cf-ball-actions>.cf-upgrade-ball {flex-direction:row;align-items:center;justify-content:center;gap:.9cqw;padding:0 .65cqw}
#stage .rp-page .cf-upgrade-ball .cf-upgrade-caption {height:auto;font-size:3.1cqw;line-height:1}
#stage .rp-page .cf-upgrade-ball .cf-button-price {height:auto;line-height:1;font-size:2.3cqw;gap:.2cqw}
#stage .rp-page .cf-upgrade-ball .cf-button-price>img {height:2.4cqw;width:2.4cqw}

/* A closed chest stays whole until the selected painted open pose takes over. */
#stage .hf-chest:not(.is-opened) .hf-chest-stage {background:radial-gradient(ellipse at 58% 80%,#f5a64844,transparent 58%)}
#stage .hf-chest:not(.is-opened) .hf-chest-stage :is(.hf-chest-box,.hf-chest-witch){visibility:visible;object-fit:contain}
#stage .reward-layer.is-chest .reward-panel {display:grid;grid-template-rows:14cqw 32cqw 42cqw 6cqw auto;align-items:center;gap:1.5cqw;padding:5cqw 4cqw;width:100%;background:radial-gradient(ellipse at 50% 60%,#56264c,#201330 74%);border:.5cqw solid #cc9758;border-radius:3cqw}
#stage .reward-layer.is-chest .reward-panel::before {display:none}
#stage .reward-layer.is-chest .reward-heading {grid-row:1;margin:0 auto;font-size:5.6cqw}
#stage .reward-layer.is-chest .reward-cards {grid-row:2;grid-column:1;margin:0;gap:2cqw;align-self:end;flex-wrap:nowrap}
#stage .reward-layer.is-chest .reward-cards[hidden]{display:none}
#stage .reward-layer.is-chest .reward-card {min-width:0;width:24cqw;padding:1.5cqw;gap:.4cqw;background:linear-gradient(155deg,#843c82,#3c1e51);border-color:#f8bd55;animation:loot-rise .52s cubic-bezier(.2,.82,.3,1.12) both;animation-delay:calc(var(--reward-order)*.14s)}
#stage .reward-layer.is-chest .reward-card:first-child {background:linear-gradient(150deg,#99562c,#502336)}
#stage .reward-layer.is-chest .reward-icon {height:11cqw;width:11cqw}
#stage .reward-layer.is-chest .reward-seal {display:none}
#stage .reward-layer.is-chest .reward-status {grid-row:4;margin:0;font-size:2.8cqw}
#stage .reward-layer.is-chest .reward-continue {grid-row:5;margin:0 auto}
#stage .reward-layer.is-chest .reward-chest-stage {grid-row:3;grid-column:1;position:relative;display:grid;place-items:center;width:100%;height:100%;background:none;overflow:visible}
#stage .reward-layer.is-chest .reward-chest {width:37cqw;height:35cqw;align-self:end;margin-bottom:2cqw;transform-origin:50% 92%}
#stage .reward-layer.is-shaking .reward-chest {animation:loot-windup .86s both}
#stage .reward-layer.is-open .reward-chest {opacity:0}
#stage .reward-layer.is-open .reward-sparkles {opacity:1}
#stage .reward-impact-ring {position:absolute;left:50%;top:55%;width:13cqw;height:13cqw;border-radius:50%;border:.8cqw solid #ffeeb3;opacity:0;pointer-events:none}
#stage .reward-layer.is-open .reward-impact-ring {animation:loot-ring .55s ease-out both}
#stage .reward-layer.is-open:not(.is-revealed) .reward-panel {animation:loot-impact .26s ease-out}
@keyframes loot-windup {0%{transform:translateY(-3cqw) scale(.94)}18%{transform:scale(1.04,.95)}38%,62%{transform:rotate(-5deg)}50%,72%{transform:rotate(5deg)}85%{transform:rotate(-3deg) scale(1.03,.98)}100%{transform:scale(.98,1.04);filter:drop-shadow(0 0 2cqw #ffc95e) brightness(1.3)}}
@keyframes loot-open {from{transform:scale(.92);filter:brightness(1.65)}to{transform:none;filter:none}}
@keyframes loot-ring {0%{opacity:.95;transform:translate(-50%,-50%) scale(.25)}100%{opacity:0;transform:translate(-50%,-50%) scale(4)}}
@keyframes loot-impact {20%{transform:translateY(1cqw)}55%{transform:translateY(-.6cqw)}85%{transform:translateY(.2cqw)}}
@keyframes loot-rise {from{opacity:0;transform:translateY(10cqw) scale(.78)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){#stage .reward-layer .reward-impact-ring,#stage .reward-layer .reward-sparkles{display:none}}

/* Catalogue slots follow the selected shop's parchment stock cards. */
#stage .rp-page .hf-shop[data-shop-mode] .hf-shop-items {grid-template-rows:22cqw;grid-auto-rows:32cqw;gap:1.1cqw;padding:.6cqw;align-items:stretch}
#stage .rp-page .hf-shop[data-shop-mode] .hf-shop-item {box-sizing:border-box;height:100%;min-width:0;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:4.4cqw minmax(0,1fr) 4.2cqw 5.6cqw;align-items:center;justify-items:center;gap:.25cqw;padding:1cqw 1.6cqw;background:linear-gradient(135deg,#f8dba5,#e8bd98 56%,#ffe5af);border:.65cqw ridge #ebb75b;border-radius:1.8cqw;color:#41243c;box-shadow:inset 0 0 0 .22cqw #82496a}
#stage .rp-page .hf-shop[data-shop-mode] .hf-shop-item>:is(img,h3,p,.hf-action){position:static;inset:auto;min-height:0;min-width:0;width:100%;height:100%;max-height:100%;margin:0;padding:0;transform:none;text-align:center}
#stage .rp-page .hf-shop[data-shop-mode] .hf-shop-item>h3 {grid-row:1;display:grid;place-items:center;font-size:3.1cqw;line-height:1.1;color:#fff5d4;background:linear-gradient(90deg,transparent,#774462 15%,#774462 85%,transparent)}
#stage .rp-page .hf-shop[data-shop-mode] .hf-shop-item>img {grid-row:2;object-fit:contain}
#stage .rp-page .hf-shop[data-shop-mode] .hf-shop-item>p {grid-row:3;display:grid;place-items:center;white-space:nowrap;color:#44253a;font-size:2.55cqw;line-height:1.15;text-shadow:none}
#stage .rp-page .hf-shop[data-shop-mode] .hf-shop-item>.hf-action {grid-row:4;width:84%;background:url('./assets/interface/buttonGreen.png') center/100% 100% no-repeat;font-size:2.8cqw}
#stage .rp-page .hf-shop[data-shop-mode] .hf-shop-item.is-wide {grid-template-columns:38% minmax(0,1fr);grid-template-rows:4.6cqw minmax(0,1fr) 6cqw;padding:1.2cqw 2cqw}
#stage .rp-page .hf-shop[data-shop-mode] .hf-shop-item.is-wide>img {grid-column:1;grid-row:1/4}
#stage .rp-page .hf-shop[data-shop-mode] .hf-shop-item.is-wide>:is(h3,p,.hf-action){grid-column:2}
#stage .rp-page .hf-shop[data-shop-mode] .hf-shop-item.is-wide>p{grid-row:2}
#stage .rp-page .hf-shop[data-shop-mode] .hf-shop-item.is-wide>.hf-action{grid-row:3}
#stage .rp-page .hf-shop-category[aria-pressed] {outline:0;filter:none}
#stage .rp-page .hf-shop-category:first-child[aria-pressed="false"] {filter:grayscale(.85) sepia(.75) hue-rotate(230deg) brightness(.65)}
#stage .rp-page .hf-shop-category:not(:first-child)[aria-pressed="true"] {filter:sepia(1) saturate(3) brightness(1.38) drop-shadow(0 0 .6cqw #ffcd52)}
#stage .rp-page .hf-shop[data-shop-mode] .hf-shop-item:not(.is-wide) {height:100%;grid-template-rows:4.5cqw minmax(0,1fr) 4cqw 5.6cqw}
#stage .rp-page .hf-shop[data-shop-mode] .hf-shop-item:not(.is-wide)>:is(img,h3,p,.hf-action){position:static;inset:auto;height:100%;width:100%;margin:0;padding:0;align-self:stretch}
#stage .rp-page .hf-shop[data-shop-mode] .hf-shop-item:not(.is-wide)>p{display:grid;place-items:center;font-size:2.55cqw;line-height:1.15;color:#44253a}
#stage .rp-page .hf-shop[data-shop-mode] .hf-shop-item:not(.is-wide)>.hf-action{width:84%}
#stage .reward-layer.is-chest .reward-card{border:.45cqw ridge #ffc45f;border-radius:1.6cqw}
#stage .rp-page .hf-shop[data-shop-mode] .hf-shop-item{border:1.25cqw solid transparent;border-image:url('./assets/selected-ui/shop-card-rim.webp') 17 / 1.25cqw stretch;box-shadow:none}
#stage .rp-page .hf-shop-category:first-child[aria-pressed="false"]{filter:sepia(.96) saturate(2.4) hue-rotate(229deg) brightness(.78)}
#stage .rp-page .hf-shop:not([data-shop-mode="supplies"]) .hf-shop-title{position:absolute;display:grid!important;place-items:center;left:41.4%;top:29.6%;width:19%;height:3.1%;padding:0;margin:0;min-height:0;background:#482046;color:#ffe4a3;font-size:3.45cqw;line-height:1;z-index:2}
#stage .rp-page .hf-shop:not([data-shop-mode="supplies"]) .hf-shop-title:before,#stage .rp-page .hf-shop:not([data-shop-mode="supplies"]) .hf-shop-title:after{display:none}
#stage .rp-page .hf-shop:not([data-shop-mode="supplies"]) .hf-shop-title{left:47.3%;width:23%;margin:0!important;height:2.85%;top:29.75%;background:linear-gradient(#512552,#381943);letter-spacing:.1cqw}

/* Keep the illustrated area above the dialogue on every guide step. */
#stage .tutorial-panel .tutorial-demo {inset:0 0 27%;background:transparent;overflow:hidden}
#stage .tutorial-panel[data-guide-step="0"] .tutorial-demo {background:url('./assets/selected-ui/tutorial.webp') center 68%/100% auto no-repeat}
#stage .tutorial-panel:not([data-guide-step="0"]) .tutorial-demo {background:transparent}
#stage .tutorial-panel .tutorial-demo>img {position:absolute;object-fit:contain;filter:drop-shadow(0 1cqw 1cqw #100720aa)}
#stage .tutorial-demo .guide-caster {left:15%;bottom:3%;width:24%;height:23%}
#stage .tutorial-demo .guide-hit {left:46%;top:17%;width:19%;height:18%}
.guide-shot {position:absolute;inset:0;width:100%;height:100%}
.guide-threat {left:29%;bottom:23%;width:42%;height:38%}
.guide-wall {left:0;bottom:1%;width:100%;height:26%}
.guide-alert,.guide-pickup {position:absolute;left:50%;transform:translateX(-50%);display:grid;place-items:center;border-radius:50%;color:white;font-weight:900;text-shadow:0 1px #341429}
.guide-alert {bottom:61%;width:10cqw;height:10cqw;background:#b72b38;border:.6cqw solid #ffbc69;font-size:6cqw}
.guide-pickup {top:25%;width:20cqw;height:20cqw;background:radial-gradient(#499b4f,#174b3e);border:.6cqw solid #a5ef84;box-shadow:0 0 5cqw #94ff9977;font-size:4.5cqw}
.guide-blessings,.guide-skills {position:absolute;left:9%;right:9%;bottom:17%;display:flex;justify-content:center;gap:3cqw}
.guide-blessings img,.guide-skills img {width:18cqw;height:19cqw;object-fit:contain;background:linear-gradient(#653877,#2c1842);border:.45cqw solid #cc9950;border-radius:3cqw;padding:1cqw}
.guide-skills img:first-child {box-shadow:0 0 2cqw #ffde68;border-color:#fff38a}
.guide-zone {position:absolute;left:41%;top:26%;width:28%;height:10%;border:.7cqw solid #ff694c;border-radius:50%;background:#ff663b33}
.guide-meteor {left:63%;top:12%;width:12%;height:12%;animation:guide-fall 1.6s ease-in infinite}
@keyframes guide-fall {0%,15%{opacity:0;transform:translate(2cqw,-3cqw)}28%{opacity:1}79%{opacity:1;transform:translate(-11cqw,13cqw)}85%,100%{opacity:0;transform:translate(-12cqw,15cqw)}}
@media(prefers-reduced-motion:reduce){.guide-meteor{animation:none}.guide-shot circle{display:none}}

/* A single outcome entrance, followed by the score and the credited rewards. */
@media(prefers-reduced-motion:no-preference){
#stage .result-dialog.result-win {animation:result-arrival .55s cubic-bezier(.18,.72,.28,1) both}
#stage .result-dialog.result-lose {animation:result-defeat .72s ease-out both}
#stage .result-win .hf-victory-stats strong,#stage .result-lose .hf-defeat-stats {animation:result-tally .38s .30s ease-out backwards}
#stage .result-win .hf-victory-stats>div:nth-child(2) strong{animation-delay:.43s}
#stage .result-win .hf-victory-stats>div:nth-child(3) strong{animation-delay:.56s}
#stage .result-dialog .hf-loot-cards>div {animation:result-tally .38s .70s ease-out backwards}
#stage .result-dialog .hf-loot-cards>div:nth-child(2){animation-delay:.81s}
#stage .result-dialog .hf-loot-cards>div:nth-child(3){animation-delay:.92s}
#stage .result-win:after {content:'';position:absolute;pointer-events:none;inset:10% 5% 52%;background:radial-gradient(ellipse,#ffe39188,transparent 65%);animation:result-glow .92s both}
}
@keyframes result-arrival {from{opacity:.15;transform:scale(1.045);filter:brightness(.58)}to{opacity:1;transform:none;filter:none}}
@keyframes result-defeat {from{opacity:.15;transform:translateY(-1.6cqw);filter:saturate(.3)}to{opacity:1;transform:none;filter:none}}
@keyframes result-tally {from{opacity:0;transform:translateY(2cqw) scale(.95)}to{opacity:1;transform:none}}
@keyframes result-glow {0%,100%{opacity:0}40%{opacity:.85}}
#stage .reward-layer.is-chest .reward-cards {perspective:130cqw}
#stage .reward-layer.is-chest .reward-card {position:relative;transform-style:preserve-3d;background:none;border:0;box-shadow:none;padding:0;height:27cqw;animation-delay:calc(var(--reward-order)*.32s)}
.loot-card-front,.loot-card-back{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.4cqw;border:.55cqw ridge #ffcf72;border-radius:2cqw;backface-visibility:hidden;box-shadow:0 .6cqw 1.4cqw #18091ec9}
.loot-card-front{background:linear-gradient(145deg,#754087,#3f1c4e)}
.reward-card:first-child .loot-card-front{background:linear-gradient(145deg,#996124,#4b2637)}
.loot-card-back{transform:rotateY(180deg);background:#44245c url('./assets/interface/cardBack.png') center/100% 100% no-repeat}
#stage .reward-layer.is-chest.skip-reveal .reward-card{animation:none}
#stage .hf-chest .hf-chest-stage {background:radial-gradient(ellipse at 57% 75%,#f6b94c38,transparent 56%)}
#stage .hf-chest .hf-chest-stage :is(.hf-chest-box,.hf-chest-witch){visibility:visible;object-fit:contain}
#stage .reward-layer.is-chest .reward-chest {width:44cqw;height:44cqw;max-height:100%;margin:0;opacity:1}
#stage .reward-layer.is-chest.is-open .reward-chest {opacity:1;animation:none}
/* Switch the painted face edge-on. Keep lettering legible on compositors that flatten 3D layers. */
#stage .reward-layer.is-chest .loot-card-back {transform:none;opacity:0}
@media(prefers-reduced-motion:no-preference){
}

/* Treasure presentation: one painted hinge track and separate physical reward tickets. */
#stage .reward-layer.is-chest {padding:0;background:radial-gradient(ellipse at 50% 61%,#56344166,#120e21ee 80%),url('./assets/chapter1/bg_dungeon_01.png') center/cover}
#stage .reward-layer.is-chest .reward-panel {width:100%;height:100%;max-height:none;display:block;border:0;border-radius:0;padding:0;overflow:visible;background:none;box-shadow:none}
#stage .reward-layer.is-chest .reward-heading {position:absolute;inset:10% 8% auto;width:84%;height:15%;margin:0;background:none;color:#ffe8aa;font-size:6cqw}
#stage .reward-layer.is-chest.is-revealed .reward-heading {mask-image:radial-gradient(ellipse closest-side,#000 76%,transparent 100%)}
#stage .reward-layer.is-chest .reward-chest-stage {position:absolute;inset:43% 5% auto;width:90%;height:36%;overflow:visible;isolation:isolate}
#stage .reward-layer.is-chest .reward-chest-stage::before {content:'';position:absolute;inset:auto 15% 2%;height:19%;border-radius:50%;background:radial-gradient(ellipse,#110b17 20%,#10091ecc 46%,transparent 72%);transform:rotate(-2deg)}
#stage .reward-layer.is-chest .reward-chest {position:absolute;inset:0;margin:auto;width:auto;height:100%;aspect-ratio:1;max-height:none;filter:drop-shadow(0 1cqw 1cqw #14081899)}
#stage .reward-layer.is-chest .coffer-motion {position:absolute;inset:-16.6667%;background:url('./assets/selected-ui/coffer-opening.webp') 0 0/600% 500% no-repeat}
#stage .reward-layer.is-chest.is-open .coffer-motion {background-position:100% 100%;animation:coffer-hinge .81s steps(1,end) both}
#stage .reward-layer.is-chest.skip-reveal .coffer-motion {animation:none}
#stage .reward-layer.is-chest .reward-rays {inset:5% 4% 3%;background:radial-gradient(ellipse at 50% 68%,#ffd76377, #ffaf4324 35%,transparent 68%);mask-image:none;filter:blur(1cqw)}
#stage .reward-layer.is-chest.is-open .reward-chest::after {content:'';position:absolute;left:30%;right:22%;top:50%;height:10%;border-radius:50%;background:#ffd273;filter:blur(1.8cqw);mix-blend-mode:screen;animation:coffer-light .95s ease-out both}
@keyframes coffer-light {0%{opacity:0;transform:scaleY(.12)}45%{opacity:.9;transform:scale(1,1.8)}100%{opacity:.28;transform:scale(.85,.7)}}
#stage .reward-layer.is-chest .reward-cards {position:absolute;inset:27% 3% auto;height:25%;align-items:center;gap:3cqw;perspective:125cqw;z-index:3}
#stage .reward-layer.is-chest .reward-card {height:30cqw;width:22cqw;overflow:visible;perspective:none;filter:none;isolation:auto;box-shadow:none;border:0;background:none}
#stage .reward-layer.is-chest .reward-card:first-child {background:none}
#stage .reward-layer.is-chest:not(.skip-reveal) .reward-card {animation:loot-deal 1.4s cubic-bezier(.2,.7,.2,1) backwards;animation-delay:calc(var(--reward-order)*.27s)}
.loot-ticket {position:absolute;inset:0;transform-style:preserve-3d}
#stage .reward-layer.is-chest:not(.skip-reveal) .loot-ticket {animation:loot-rotate 1.4s cubic-bezier(.36,.05,.22,1) backwards;animation-delay:calc(var(--reward-order)*.27s)}
#stage .reward-layer.is-chest .loot-card-front,#stage .reward-layer.is-chest .loot-card-back {animation:none;opacity:1;backface-visibility:hidden;overflow:hidden;box-shadow:inset 0 0 0 .3cqw #753b27,inset 0 0 2cqw #ffd67b55}
#stage .loot-card-front {transform:translateZ(.65cqw)}
#stage .reward-layer.is-chest .loot-card-back {transform:rotateY(180deg) translateZ(.65cqw)}
.loot-edge {position:absolute;top:2%;height:96%;width:1.3cqw;background:linear-gradient(90deg,#6f3820,#e4aa55 30%,#fff0ab 60%,#a56a33);transform:rotateY(90deg)}
.loot-edge.left {left:-.65cqw}.loot-edge.right {right:-.65cqw}
#stage .reward-layer.is-chest .reward-status {position:absolute;inset:80% 5% auto;text-align:center}
#stage .reward-layer.is-chest .reward-continue {position:absolute;inset:86% 12% auto;width:76%;margin:0}
@keyframes loot-deal {
  0%{transform:translate3d(calc(var(--origin-offset)*25cqw),52cqw,-25cqw) scale(.12)}
  32%{transform:translate3d(calc(var(--origin-offset)*10cqw),3cqw,4cqw) scale(.86)}
  49%{transform:translate3d(0,-1.5cqw,3cqw)}
  80%{transform:translate3d(0,-.3cqw,2cqw)}
  100%{transform:none}
}
@keyframes loot-rotate {
  0%{transform:rotateX(65deg) rotateY(-205deg) rotateZ(-16deg)}
  34%{transform:rotateX(9deg) rotateY(-181deg) rotateZ(4deg)}
  55%{transform:rotateX(3deg) rotateY(-163deg) rotateZ(-2deg)}
  86%{transform:rotateX(-3deg) rotateY(9deg)}
  100%{transform:none}
}
@media(prefers-reduced-motion:reduce){#stage .reward-layer.is-chest *{animation:none!important;transition:none!important}}
@keyframes coffer-hinge {0%{background-position:0% 0%}3.448%{background-position:20% 0%}6.897%{background-position:40% 0%}10.345%{background-position:60% 0%}13.793%{background-position:80% 0%}17.241%{background-position:100% 0%}20.69%{background-position:0% 25%}24.138%{background-position:20% 25%}27.586%{background-position:40% 25%}31.034%{background-position:60% 25%}34.483%{background-position:80% 25%}37.931%{background-position:100% 25%}41.379%{background-position:0% 50%}44.828%{background-position:20% 50%}48.276%{background-position:40% 50%}51.724%{background-position:60% 50%}55.172%{background-position:80% 50%}58.621%{background-position:100% 50%}62.069%{background-position:0% 75%}65.517%{background-position:20% 75%}68.966%{background-position:40% 75%}72.414%{background-position:60% 75%}75.862%{background-position:80% 75%}79.31%{background-position:100% 75%}82.759%{background-position:0% 100%}86.207%{background-position:20% 100%}89.655%{background-position:40% 100%}93.103%{background-position:60% 100%}96.552%{background-position:80% 100%}100%{background-position:100% 100%}}
/* Lock tension, lid recoil and the coin impulse share a single opening cue. */
.coffer-burst{position:absolute;inset:0;pointer-events:none;z-index:2}
.coffer-burst>*{position:absolute;opacity:0;pointer-events:none}
.coffer-eject{left:52%;top:59%;width:var(--size);height:var(--size);object-fit:contain}
.coffer-flare{left:26%;top:18%;width:51%;height:54%;transform-origin:50% 87%;background:conic-gradient(from -48deg at 50% 88%,transparent,#ffe386 7deg,transparent 15deg,#ffd27288 24deg,transparent 30deg,#fff1c3 49deg,transparent 55deg,#ffc96d99 77deg,transparent 91deg);mask-image:radial-gradient(ellipse at 50% 83%,#000 9%,#000a 37%,transparent 72%);mix-blend-mode:screen}
@media(prefers-reduced-motion:no-preference){
#stage .reward-layer.is-chest.is-shaking .reward-chest{animation:coffer-tension .86s both}
#stage .reward-layer.is-chest.is-open:not(.skip-reveal) .coffer-motion{animation-duration:.59s}
#stage .reward-layer.is-chest.is-open:not(.is-revealed) .reward-panel{animation:none}
#stage .reward-layer.is-chest.is-open:not(.skip-reveal) .reward-chest-stage{transform-origin:52% 59%;animation:coffer-recoil .54s linear both}
#stage .reward-layer.is-chest.is-open:not(.skip-reveal) .coffer-eject{animation:coin-impulse .69s var(--lag) cubic-bezier(.19,.67,.48,1) both}
#stage .reward-layer.is-chest.is-open:not(.skip-reveal) .coffer-flare{animation:lid-flash .44s both}
#stage .reward-layer.is-chest.is-open:not(.skip-reveal) .reward-impact-ring{top:59%;border-width:.46cqw;box-shadow:0 0 1.4cqw #ffbf59;animation:ground-pulse .44s ease-out both}
}
@keyframes coffer-tension{
  0%,60%{transform:none}15%,47%{transform:rotate(-2deg)}27%,54%{transform:rotate(2deg)}
  77%{transform:translateY(.5cqw) scale(1.055,.94);filter:drop-shadow(0 0 1cqw #d99f50)}
  90%,100%{transform:translateY(.8cqw) scale(1.07,.91);filter:drop-shadow(0 0 1.3cqw #ddaa65)}
}
@keyframes coffer-recoil{
  0%{transform:translateY(.8cqw) scale(.98);filter:none}
  8%{transform:translate(-2.4cqw,-5.2cqw) rotate(-2deg) scale(1.14);filter:blur(.40cqw)}
  15%{transform:translate(-2cqw,-4.6cqw) rotate(-1.6deg) scale(1.12);filter:blur(.16cqw)}
  27%{transform:translate(1.9cqw,2.8cqw) rotate(1.4deg) scale(1.08);filter:none}
  42%{transform:translate(-1.2cqw,-1.65cqw) rotate(-.8deg) scale(1.05)}
  59%{transform:translate(.7cqw,.85cqw) rotate(.45deg) scale(1.025)}
  79%{transform:translate(-.25cqw,-.3cqw) scale(1.01)}
  100%{transform:none;filter:none}
}
@keyframes coin-impulse{
  0%{opacity:0;transform:scale(.2)}9%{opacity:1}
  48%{opacity:1;transform:translate(calc(var(--dx)*.72),var(--dy)) rotate(var(--spin)) scaleX(.38)}
  76%{opacity:.95;transform:translate(calc(var(--dx)*.93),calc(var(--dy)*.85)) rotate(calc(var(--spin)*1.32)) scaleX(1)}
  100%{opacity:0;transform:translate(var(--dx),calc(var(--dy)*.32)) rotate(calc(var(--spin)*1.55)) scale(.55)}
}
@keyframes lid-flash{0%{opacity:0;transform:scale(.3,.14)}13%{opacity:.96;transform:scale(1.45,1.25)}46%{opacity:.64;transform:scale(1.25,1.5)}100%{opacity:0;transform:scale(.8,1.72)}}
@keyframes ground-pulse{0%{opacity:.92;transform:translate(-50%,-50%) scale(.4,.15)}100%{opacity:0;transform:translate(-50%,-50%) scale(5.6,1.4)}}

/* Frame the hinged arc closely, leaving room above the lip for the deal. */
#stage .reward-layer.is-chest .reward-chest {height:121%;inset:auto 0 -2%}/* Painted stock cards keep the heading, illustration and amount in separate wells. */
#stage .reward-layer.is-chest .reward-cards {inset:27% 3% auto;gap:0;height:25%}
#stage .reward-layer.is-chest .reward-card {width:24%;height:auto;aspect-ratio:320/460;flex:none;rotate:var(--fan);translate:0 var(--lift);transform-origin:50% 90%}
#stage .reward-layer.is-chest .loot-card-front {border:0;border-radius:0;box-shadow:none;background:transparent url('./assets/interface/cardPurple.png') center/100% 100% no-repeat}
#stage .reward-layer.is-chest .loot-coins,#stage .reward-layer.is-chest .loot-fireShard {background-image:url('./assets/interface/cardOrange.png')}
#stage .reward-layer.is-chest .loot-iceShard {background-image:url('./assets/interface/cardBlue.png')}
#stage .loot-card-front .reward-name,#stage .loot-card-front .reward-amount {position:absolute;left:10%;width:80%;display:grid;place-items:center;line-height:1;white-space:nowrap}
#stage .loot-card-front .reward-name {top:7%;height:12%;font-size:2.9cqw;color:#fff0be;text-shadow:0 .28cqw .3cqw #371427}
#stage .loot-card-front .reward-icon {position:absolute;top:23%;left:21%;width:58%;height:38%;object-fit:contain}
#stage .loot-card-front .reward-amount {top:69%;height:18%;font-size:4.2cqw;filter:drop-shadow(0 .25cqw .18cqw #361b3a)}
#stage .reward-layer.is-chest .loot-card-back {inset:1% 7%;border-radius:2cqw}
#stage .loot-ticket .loot-edge {top:6%;height:88%}
#stage .loot-ticket .loot-edge.left {left:7%}
#stage .loot-ticket .loot-edge.right {right:7%}
#stage .hf-chest-cards {gap:0;align-items:center;padding:0 1%}
#stage .hf-chest-card {position:relative;flex:0 1 26%;height:auto;aspect-ratio:320/460;padding:0;transform:rotate(-7deg)}
#stage .hf-chest-card:nth-child(2){transform:rotate(-3deg) translateY(-1cqw)}
#stage .hf-chest-card:nth-child(3){transform:rotate(3deg) translateY(-1cqw)}
#stage .hf-chest-card:nth-child(4){transform:rotate(7deg)}
#stage .hf-chest-card>h3,#stage .hf-chest-card>.image-number {position:absolute;left:8%;width:84%;margin:0;display:flex;justify-content:center;align-items:center;white-space:nowrap}
#stage .hf-chest-card>h3 {top:7%;height:12%;font-size:2.85cqw}
#stage .hf-chest-card>img {position:absolute;top:23%;left:21%;width:58%;height:38%;object-fit:contain}
#stage .hf-chest-card>.image-number {top:69%;height:18%;font-size:4cqw}
#stage .hf-chest:not(.is-opened) {grid-template-rows:10% 66% 15% 9%}
#stage .hf-chest:not(.is-opened) .hf-chest-witch {bottom:1%;height:41%}
#stage .hf-chest-stage .hf-chest-trigger {
  position:absolute;left:17%;top:11%;width:66%;aspect-ratio:1;
  visibility:visible;padding:0;border:0;border-radius:20%;background:none;
  isolation:isolate;cursor:pointer;
}
#stage .hf-chest-trigger .hf-chest-box {
  inset:0;width:100%;height:100%;pointer-events:none;
  filter:drop-shadow(0 1.5cqw 1.2cqw #140921b0);
}
.hf-chest-trigger::before {
  content:"";position:absolute;inset:12% -17% -8%;z-index:-1;pointer-events:none;
  background:radial-gradient(ellipse at 50% 62%,#ffe19baa 0%,#ffad654f 35%,#e877b728 52%,transparent 72%);
  opacity:.68;
}
#stage .hf-chest-trigger:active:not(:disabled) .hf-chest-box {transform:scale(.96)}
#stage .reward-layer.is-chest.is-revealed .reward-heading::after {
  content:"";position:absolute;inset:15% 2%;pointer-events:none;opacity:0;
  background:linear-gradient(110deg,transparent 38%,#ffe09b 49%,#fff2c7 50%,transparent 61%) no-repeat 100% center/250% 100%;
  mask-image:radial-gradient(ellipse,#000 30%,transparent 71%);
  mix-blend-mode:screen;
}
@media (prefers-reduced-motion:no-preference) {
  .hf-chest-trigger::before {animation:chest-light-breathe 2.8s ease-in-out infinite}
  #stage .reward-layer.is-chest.is-revealed:not(.skip-reveal) .reward-heading {
    animation:reward-banner-in .54s cubic-bezier(.2,.8,.28,1) both;
  }
  #stage .reward-layer.is-chest.is-revealed:not(.skip-reveal) .reward-heading::after {
    animation:reward-banner-shine .74s .34s ease-out both;
  }
}
@keyframes chest-light-breathe {
  0%,100% {opacity:.43;transform:scale(.94)}
  50% {opacity:.92;transform:scale(1.09)}
}
@keyframes reward-banner-in {
  0% {opacity:0;transform:translateY(2.4cqw) scale(.77)}
  62% {opacity:1;transform:translateY(-.35cqw) scale(1.055);filter:brightness(1.24)}
  100% {opacity:1;transform:none;filter:none}
}
@keyframes reward-banner-shine {
  from {opacity:0;background-position:100% center}
  28% {opacity:.58}
  73% {opacity:.46}
  to {opacity:0;background-position:0% center}
}
#stage .chest-card-label {
  color:#fff5d1;
  font-family:"DDFS Sans","Microsoft YaHei",sans-serif;
  font-weight:800;
  letter-spacing:0;
  text-shadow:0 1px 2px #281137!important;
}
#stage .hf-chest-card>.chest-card-label,
#stage .loot-card-front>.chest-card-label {top:7%;height:12%;font-size:clamp(9px,2.65cqw,15px)}

/* The approved battle render links the three header counters and places skills on the parapet. */
#battle-ui .battle-header {
  display:grid;grid-template-columns:minmax(0,1fr) 8.65cqw;
  top:1.85%;left:2%;right:1.7%;gap:.6cqw;align-items:center;
}
#battle-ui .battle-hud-plate {
  position:relative;display:flex;align-items:center;gap:1.15cqw;
  min-width:0;height:10.1cqw;padding:0 3.15cqw;
  background:url('./assets/interface/coinBar.png') center/100% 100% no-repeat;
}
#battle-ui :is(.level-title,.coin-pill) {
  display:flex;align-items:center;flex:none;min-width:0;height:auto;min-height:0;
  border:0;border-radius:0;background:none;box-shadow:none;padding:0;
}
#battle-ui .level-title {gap:.75cqw}
#battle-ui .level-title strong {
  flex:none;font-size:4.12cqw;gap:.5cqw;line-height:1;color:#fff0bd;
}
#battle-ui .battle-hat {flex:none;width:6.5cqw;height:5.6cqw;object-fit:contain}
#battle-ui .battle-wave {
  display:flex;align-items:center;gap:.9cqw;flex:1;min-width:0;padding:0 1.45cqw;
  border-inline:1px solid #edc2b7b5;
}
#battle-ui .battle-wave-label {flex:none;font-size:2.8cqw;color:#fff0c5;line-height:1}
#battle-ui #wave-number {font-size:3.4cqw;line-height:1;white-space:nowrap}
#battle-ui .wave-track {
  position:relative;inset:auto;transform:none;justify-content:space-around;
  flex:1;min-width:0;gap:.38cqw;
}
#battle-ui .wave-track::before {top:50%;transform:translateY(-50%);background:#d09d605f}
#battle-ui .wave-track>i {
  flex:none;width:1.6cqw;height:1.6cqw;background:#483055;
  border:1px solid #d2a970;box-shadow:0 0 0 .23cqw #2c172c;
}
#battle-ui .wave-track>i.done {background:#97dfb2;border-color:#deffdb}
#battle-ui .wave-track>i.active {
  background:radial-gradient(circle at 36% 34%,#fff9da,#ffc444 59%,#db7625);
  border-color:#ffecad;box-shadow:0 0 1.35cqw #ffbd65;
}
#battle-ui .wave-track>.boss-pip {
  width:3.2cqw;height:3.2cqw;border-radius:.75cqw;font-size:2.13cqw;color:#f7d287;line-height:1;
}
#battle-ui .wave-track>.boss-pip.active {color:#48212b}
#battle-ui .coin-pill {width:16.65cqw;justify-content:center;gap:.85cqw}
#battle-ui .coin-pill>img {width:5.05cqw;height:5.05cqw;flex:none}
#stage #battle-ui .coin-pill #coin-number {font-size:3.15cqw}
#battle-ui #pause {width:100%;height:auto;aspect-ratio:1}

#battle-ui :is(.battle-hud-plate,.skill-bar,.battle-dock)::after {
  content:"";position:absolute;z-index:1;pointer-events:none;
  left:50%;width:2.55cqw;height:2.55cqw;rotate:45deg;
  border:.35cqw solid #ffe594;border-radius:.2cqw;
  background:conic-gradient(from 45deg,#770e8e,#b130b4,#ffbadf,#792394,#770e8e);
  box-shadow:0 0 1.1cqw #ffa448,0 0 0 .23cqw #c86e25;
}
#battle-ui .battle-hud-plate::after {top:1.5cqw;transform:translate(-50%,-38%)}
#battle-ui :is(.skill-bar,.battle-dock)::after {bottom:0;transform:translate(-31%,24%)}
#battle-ui .phase-hint {
  top:8.4%;left:14%;right:14%;width:auto;margin:0;font-size:clamp(10px,2.7cqw,15px);
  font-weight:750;line-height:1.2;color:#ffe8b6;text-shadow:0 .4cqw .7cqw #160e25;
}
#battle-ui .phase-hint.firing {opacity:1}
#battle-ui .enemy-threat {
  top:11.25%;left:20%;right:20%;font-size:clamp(9px,2.55cqw,14px);
  padding:.7cqw 1cqw;border-radius:1.4cqw;border-color:#b97961;
}
#battle-ui.has-boss .phase-hint {top:16.2%}
#battle-ui.has-boss .enemy-threat {top:19%}

#battle-ui .skill-bar {
  top:76.2%;bottom:auto;left:42.4%;right:4.25%;gap:1.2cqw;
  padding:0 .45cqw 2.35cqw;align-items:start;isolation:isolate;
}
#battle-ui .skill-bar::before {
  content:"";position:absolute;z-index:-1;pointer-events:none;inset:auto -1.8cqw 0;height:6.7cqw;
  clip-path:polygon(0 15%,7% 47%,93% 47%,100% 15%,96% 65%,92% 100%,8% 100%,4% 65%);
  background:linear-gradient(#ffe9a0 7%,#d78536 36%,#ffe17c 55%,#ca611e 76%,#f6b447);
}
#battle-ui .skill-bar .skill {
  min-width:0;min-height:0;padding:0;border:0;box-shadow:none;overflow:visible;
  background:none;display:flex;flex-direction:column;gap:.25cqw;align-items:center;
  border-radius:1.6cqw;
}
#battle-ui .skill-art {
  width:14.85cqw;height:14.85cqw;max-width:100%;object-fit:contain;display:block;
  filter:drop-shadow(0 .48cqw .42cqw #13071e);
}
#battle-ui .skill>strong {
  width:100%;height:6.95cqw;display:grid;place-items:center;margin:-.22cqw 0 0;
  background:url('./assets/interface/coinBar.png') center/100% 100% no-repeat;
  line-height:1;font-size:3.6cqw;color:#fff1c0;text-shadow:0 .39cqw .35cqw #140820;
}
#battle-ui .skill:disabled {opacity:1;filter:none}
#battle-ui .skill:disabled .skill-art {filter:saturate(.3) brightness(.59)}
#battle-ui .skill:disabled strong {color:#d3c2d5}
#battle-ui .skill.is-targeting {outline-color:#ffe292;outline-offset:.4cqw}
#battle-ui .skill .cooldown {
  inset:8.5cqw 0 auto;margin:auto;width:max-content;max-width:100%;height:4.2cqw;
  border-radius:1.1cqw;border:1px solid #b696c9;background:#261939f5;
  padding:0 .5cqw;font-size:clamp(9px,2.2cqw,13px);line-height:1;color:#f4e5ff;white-space:nowrap;
}

#battle-ui .battle-dock {
  position:absolute;bottom:.5%;left:0;right:0;height:14cqw;
  display:grid;grid-template-columns:minmax(0,1fr) 17.9cqw 25.5cqw;align-items:center;gap:.85cqw;
  padding:0 2.45cqw 0 3.45cqw;
  background:url('./assets/interface/coinBar.png') center/100% 100% no-repeat;
}
#stage:has(.bless-dialog) #battle-ui .battle-dock {visibility:hidden}
#battle-ui :is(.wall-status,.ball-counter,.speed-button) {
  position:relative;inset:auto;width:auto;height:auto;
}
#battle-ui .wall-status {display:flex;align-items:center;gap:.85cqw;min-width:0;padding-right:.55cqw}
#battle-ui .wall-status>img {
  width:7.5cqw;height:7.5cqw;flex:none;object-fit:contain;filter:drop-shadow(0 .3cqw .5cqw #29152f);
}
#battle-ui .wall-readout {
  display:grid;align-items:center;grid-template-columns:auto minmax(0,1fr);gap:.65cqw;
  flex:1;min-width:0;color:#ffe7b6;font-size:3.05cqw;line-height:1;
}
#battle-ui .wall-readout>span {grid-area:1/1;white-space:nowrap}
#battle-ui .wall-status.low .wall-readout {color:#ffb19e}
#battle-ui .wall-readout strong {
  grid-area:1/2;justify-self:center;z-index:1;
  display:grid;place-items:center;min-width:0;font-size:2.96cqw;white-space:nowrap;
  color:inherit;text-shadow:0 .35cqw .35cqw #151a17;
}
#battle-ui .wall-track {
  grid-area:1/2;height:4.1cqw;padding:.22cqw;border-color:#d7a57c;
  border-radius:2.3cqw;background:#211927;min-width:0;
}
#battle-ui .wall-track i {background:linear-gradient(#dbff8b,#8fe753 36%,#41a849 53%,#4d8737)}
#battle-ui .wall-status.low .wall-track i {background:linear-gradient(#ffd18b,#db624a 48%,#aa252f)}
#battle-ui .ball-counter {
  display:flex;justify-content:center;min-width:0;gap:.65cqw;height:7.25cqw;
  border-inline:1px solid #daa59198;color:#fff3d0;
}
#battle-ui .ball-counter>img {width:5.75cqw;height:5.75cqw;flex:none}
#battle-ui .ball-counter .image-number {font-size:3.75cqw}
#battle-ui .speed-button {
  height:9.5cqw;min-height:0;max-width:none;padding:0;background:transparent var(--battle-button-purple) center/100% 100% no-repeat;
  border:0;box-shadow:none;border-radius:3.2cqw;font-size:3.55cqw;color:#fff2cc;white-space:nowrap;
}
#battle-ui :is(.recall-button,.cancel-skill) {
  top:71.35%;right:4%;bottom:auto;left:auto;min-height:6.4cqw;padding:.75cqw 1.5cqw;
  border-color:#ce9b69;background:#39214bef;border-radius:1.5cqw;color:#ffe5b0;
}
#battle-ui .battle-guide {
  position:absolute;top:68%;left:11%;z-index:4;min-height:8.6cqw;
  display:flex;align-items:center;gap:1.55cqw;
  padding:.85cqw 1.95cqw;border:.38cqw solid #d99b4c;
  border-radius:4cqw;background:linear-gradient(#fff1cf,#ffdda2);
  box-shadow:0 .55cqw .55cqw #41253c,0 0 2.1cqw #eda84933;
  font-size:clamp(11px,3.4cqw,19px);line-height:1.2;color:#492542;font-weight:850;
}
#battle-ui .battle-guide::after {
  content:"";position:absolute;left:52%;bottom:-1.3cqw;width:2.2cqw;height:2.2cqw;
  rotate:45deg;background:#ffdea5;border-right:.38cqw solid #d99b4c;border-bottom:.38cqw solid #d99b4c;
}
#battle-ui .battle-guide>img {
  width:7.7cqw;height:7.7cqw;object-fit:contain;border-radius:50%;background:#573069;
}
#battle-guide-skip {
  flex:none;margin-left:.65cqw;pointer-events:auto;min-height:6.5cqw;
  border:0;border-left:1px solid #955a654a;padding:.5cqw 0 .5cqw 1.5cqw;
  background:transparent;color:#73506a;font-size:clamp(9px,2.45cqw,13px);
}
#battle-ui .battle-guide.is-dragging {left:18.2%;padding:1cqw 2.6cqw}
#battle-ui .battle-guide.is-dragging :is(img,button) {display:none}
#battle-ui:has(.battle-guide:not(.hidden)) #phase-hint {visibility:hidden}
#victory-ceremony {
  position:absolute;inset:0;z-index:22;display:grid;place-items:center;
  background:linear-gradient(to bottom,#110c2450,transparent 30% 68%,#110c24e0 96%),
    radial-gradient(ellipse at 50% 49%,#40226672 0%,#110c24e8 73%);
}
.victory-celebration {
  position:relative;width:94%;text-align:center;isolation:isolate;
  display:flex;flex-direction:column;align-items:center;
}
.victory-celebration::before {
  content:"";position:absolute;inset:1% 1% 0;z-index:-1;
  background:radial-gradient(ellipse,#ffc86ba0,transparent 63%),
    repeating-conic-gradient(from -4deg,#fff29155 0 4deg,transparent 5deg 22deg);
  mask-image:radial-gradient(ellipse,#000 18%,transparent 70%);
}
.victory-ceremony-title {
  display:block;width:100%;aspect-ratio:1136 / 413;object-fit:contain;
  filter:drop-shadow(0 1cqw 1.5cqw #0b041bc9);
}
.victory-celebration>p {
  margin:1.1cqw 0 0;padding:.55cqw 3cqw;border-top:1px solid #c5935d66;
  color:#ffeabf;font-size:4cqw;line-height:1.25;font-weight:650;
  text-shadow:0 .3cqw .8cqw #1e102f;
}
.victory-ceremony-stars {display:flex;justify-content:center;gap:1.2cqw;margin-top:1.4cqw}
.victory-ceremony-stars>img {width:11.5cqw;height:11.5cqw;object-fit:contain}
.victory-ceremony-stars>img[src$="starOn.png"] {filter:drop-shadow(0 0 1.65cqw #ffc84caa)}
.victory-ceremony-hero {width:39cqw;height:39cqw;object-fit:contain;filter:drop-shadow(0 1.4cqw 1.5cqw #29133c)}
@media (prefers-reduced-motion:no-preference) {
  #victory-ceremony {animation:victory-fade 1.85s both}
  .victory-ceremony-title {animation:victory-rise .42s cubic-bezier(.18,.8,.31,1.12) both}
  .victory-ceremony-stars>img {animation:victory-star .34s .26s both}
  .victory-ceremony-stars>img:nth-child(2) {animation-delay:.38s}
  .victory-ceremony-stars>img:nth-child(3) {animation-delay:.50s}
  .victory-ceremony-hero {animation:victory-rise .43s .33s ease-out both}
}
@keyframes victory-fade {
  0% {opacity:0}
  20%,81% {opacity:1}
  100% {opacity:0}
}
@keyframes victory-rise {
  from {opacity:0;transform:translateY(6cqw) scale(.88)}
  to {opacity:1;transform:none}
}
@keyframes victory-star {
  0% {opacity:0;transform:scale(.52) rotate(-12deg)}
  70% {opacity:1;transform:scale(1.12)}
  100% {opacity:1;transform:none}
}
