/* Each room has a full stage. Its console opens in front of the set. */
#station-content:has(#rpg-station.world-active) {padding:0;overflow:hidden}
#station-content #rpg-station.world-active {
  position:relative;
  display:flex;
  flex-direction:column;
  height:100%;
  min-height:0;
  padding:0;
  isolation:isolate;
}
#station-content #rpg-station.world-active > .circuit-nav {
  position:relative;
  inset:auto;
  flex:none;
  margin:0;
  z-index:6;
}
#circuit-world[hidden],.world-destination[hidden],.world-console-close[hidden],.world-fighter[hidden],#rpg-station:not([data-screen="hangar"]) .world-fighter {display:none}
.circuit-world {
  position:relative;
  flex:1;
  min-height:0;
  color:#fff3dc;
  --world-color:#9ff4f0;
  --world-pan:.5;
  --world-art:url('/pixel-fighter-armory.webp');
}
[data-screen="missions"] .circuit-world {
  --world-color:#78f3dc;
  --world-art:url('/pixel-mission-control.webp');
}
[data-screen="duels"] .circuit-world {
  --world-color:#ffb975;
  --world-art:url('/pixel-circuit-arena.webp');
}
[data-screen="skills"] .circuit-world {
  --world-color:#c5aaff;
  --world-art:url('/pixel-skill-observatory.webp');
}
[data-screen="shop"] .circuit-world {
  --world-color:#ffda8b;
  --world-pan:.69;
  --world-art:url('/pixel-circuit-shop.webp');
}
.world-stage {
  position:absolute;
  inset:0;
  overflow:hidden;
  container-type:size;
  background:#0b0d1f;
}
.world-set {
  position:absolute;
  width:max(100cqw,177.68cqh);
  aspect-ratio:1672/941;
  top:50%;
  left:calc((100% - max(100cqw,177.68cqh)) * var(--world-pan));
  transform:translateY(-50%);
  background:var(--world-art) center/100% 100% no-repeat;
  image-rendering:pixelated;
}
.world-stage::after {
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(0deg,#070919e8,transparent 36%),linear-gradient(90deg,#090b1a65,transparent 52%);
}
.world-effects,.world-mechanic,.world-sparring {position:absolute;inset:0;pointer-events:none}
.world-effects i {
  position:absolute;
  display:none;
  border-radius:50%;
  opacity:.45;
}
[data-screen="hangar"] .world-effects i:nth-child(-n+2) {
  display:block;
  left:22%;top:46%;width:11%;height:26%;
  background:radial-gradient(ellipse,#33eee869,transparent 66%);
  animation:world-lamp 5.2s ease-in-out infinite alternate;
  mix-blend-mode:screen;
}
[data-screen="hangar"] .world-effects i:nth-child(2) {
  left:69%;top:55%;
  background:radial-gradient(ellipse,#ff983e73,transparent 66%);
  animation-delay:-2.3s;
}
.world-fighter {
  position:absolute;
  inset:auto auto 28% 50%;
  height:54%;
  width:min(38%,52cqh);
  object-fit:contain;
  object-position:center bottom;
  transform:translateX(-50%);
  filter:drop-shadow(0 10px 12px #080718);
  animation:world-fighter-idle 5s ease-in-out infinite alternate;
}
.world-fighter.world-awakened {
  filter:drop-shadow(0 0 15px #cb87edaa) drop-shadow(0 9px 10px #0e0720);
}
[data-screen="missions"] .world-effects i:nth-child(-n+2) {
  display:block;
  left:57%;top:39%;width:17%;height:19%;
  background:radial-gradient(ellipse,#43fdd155,transparent 68%);
  animation:world-lamp 6s ease-in-out infinite alternate;
  mix-blend-mode:screen;
}
[data-screen="missions"] .world-effects i:nth-child(2) {
  left:21%;top:23%;width:57%;height:33%;
  background:linear-gradient(174deg,transparent 18%,#51ffc524,transparent 75%);
  mask-image:radial-gradient(ellipse,#000 22%,transparent 71%);
  animation:world-scan 9s linear infinite;
}
.world-sparring {display:none}
[data-screen="duels"] .world-sparring {display:block}
.world-sparring img {
  position:absolute;
  bottom:15%;
  left:36%;
  height:31%;
  object-fit:contain;
  filter:drop-shadow(0 6px 6px #050717);
  animation:world-spar-left 3.8s ease-in-out infinite;
}
.world-sparring img+img {left:56%;animation-name:world-spar-right}
[data-screen="duels"] .world-effects i:first-child {
  display:block;
  left:47%;top:61%;width:6%;height:11%;
  background:radial-gradient(ellipse,#fff9bd, #ff985790 18%, transparent 65%);
  animation:world-spar-spark 3.8s linear infinite;
}
[data-screen="skills"] .world-effects i {
  display:block;
  left:30%;top:18%;width:.55%;aspect-ratio:1;
  background:#f6eeff;
  box-shadow:0 0 9px 3px #ab89ff80;
  animation:world-star 4.7s ease-in-out infinite alternate;
}
[data-screen="skills"] .world-effects i:nth-child(2) {left:47%;top:12%;animation-delay:-.8s}
[data-screen="skills"] .world-effects i:nth-child(3) {left:65%;top:26%;animation-delay:-1.6s}
[data-screen="skills"] .world-effects i:nth-child(4) {left:62%;top:17%;animation-delay:-2.4s}
[data-screen="skills"] .world-effects i:nth-child(5) {left:54%;top:33%;animation-delay:-3.2s}
[data-screen="skills"] .world-effects i:nth-child(6) {left:74%;top:12%;animation-delay:-4s}
.world-mechanic {display:none}
[data-screen="shop"] .world-mechanic {display:block}
.world-mechanic .workshop-scene {border:0;border-radius:0}
.world-mechanic .mechanic-bubble {
  max-width:min(23%,270px);
  font-size:clamp(.85rem,2cqw,1.15rem);
}
.world-destination {
  position:absolute;
  inset:auto 0 0;
  padding:clamp(16px,4cqw,60px);
  text-shadow:0 2px 6px #060611;
}
.world-destination h3 {
  margin:0 0 .25em;
  color:#fff3dc;
  font-family:Barlow Condensed,Impact,sans-serif;
  font-size:clamp(2rem,4.7cqw,5.25rem);
  line-height:.94;
  text-wrap:balance;
}
.world-destination p {margin:0 0 12px;color:#eaebfb}
.world-destination p:empty {display:none}
.world-interaction,#station-content .world-console-close {
  min-height:44px;
  padding:.62rem .95rem;
  border:1px solid var(--world-color,#e1b572);
  border-radius:4px;
  background:#10192deb;
  box-shadow:inset 0 -3px #050a19,0 3px 12px #050a19;
  color:#f4fffb;
  font-weight:700;
}
.world-interaction:hover,.world-interaction:focus-visible {
  color:var(--world-color);
  background:#1b2a46;
}
.world-interaction::before {
  content:"";
  display:inline-block;
  vertical-align:.1em;
  inline-size:.48em;
  block-size:.48em;
  margin-inline-end:.65em;
  background:var(--world-color);
  box-shadow:0 0 10px var(--world-color);
  transform:rotate(45deg);
}
.world-talk {margin-inline-start:.35em;margin-block-start:.35em}
#station-modal:not([open]) :is(.world-effects i,.world-sparring img,.world-fighter) {animation-play-state:paused}
#station-content #rpg-station.world-active > :is(#fighters,#combat,#skill-tree,#circuit-shop) {display:none}
#station-content #rpg-station.world-active.console-open > :is(#fighters,#combat,#skill-tree,#circuit-shop):not([hidden]) {
  position:absolute;
  z-index:4;
  inset:53px 0 0 auto;
  width:min(100%,1040px);
  height:auto;
  min-height:0;
  max-height:none;
  margin:0;
  padding:55px clamp(14px,2.4cqw,35px) 25px;
  overflow:auto;
  overscroll-behavior:contain;
  align-content:start;
  border:0;
  border-inline-start:1px solid #c69b6880;
  border-radius:0;
  background:linear-gradient(155deg,#23243dde,#0b1222f5 45%);
  box-shadow:-16px 0 70px #030510a6;
  animation:world-console-in .23s ease-out both;
}
#station-content #rpg-station.console-open[data-screen="hangar"] > #fighters,
#station-content #rpg-station.console-open[data-screen="missions"] > #combat,
#station-content #rpg-station.console-open[data-screen="duels"] > #combat,
#station-content #rpg-station.console-open[data-screen="skills"] > #skill-tree,
#station-content #rpg-station.console-open[data-screen="shop"] > #circuit-shop {display:block}
#station-content #rpg-station.console-open[data-screen="shop"] > #circuit-shop {width:min(100%,470px)}
#station-content #rpg-station.console-open[data-screen="duels"] #duel-panel {display:grid;grid-template-columns:1fr}
#station-content #rpg-station.console-open #duel-panel .arena-rankings {
  grid-column:1;
  grid-row:auto;
  margin-top:12px;
}
#station-content #rpg-station.console-open #battle:not(:empty) {margin:14px 0}
#station-content #rpg-station.console-open[data-screen="duels"] #combat {
  display:flex;
  flex-direction:column;
}
#station-content #rpg-station.console-open #fighters .fighter-room {
  min-height:0;
  background:none;
  border:0;
  padding:0;
  margin:0 0 15px;
}
#station-content #rpg-station.console-open #skill-tree .skill-tree-header {
  min-height:0;
  background:none;
  border:0;
  padding:0;
}
#station-content #rpg-station.console-open #skill-tree :is(h3,p) {text-shadow:none}
#station-content .world-console-close {
  position:absolute;
  z-index:5;
  top:62px;
  right:clamp(12px,2.5cqw,32px);
  min-height:40px;
  font-size:.875rem;
}
.console-open .world-destination {visibility:hidden}
#station-content #adventure:has(#district-hub:not([hidden])) #expedition-status {display:none}
#station-content #expedition-planner:not([hidden]) {
  background:linear-gradient(145deg,#10162be8,#11182df6 66%),url('/pixel-formation-hangar.webp') center/cover;
}
#station-content #district-hub:not([hidden]) {
  text-align:left;
  padding:clamp(34px,10cqh,110px) clamp(16px,4cqw,60px) clamp(16px,4cqw,60px);
}
#station-content #district-hub:not([hidden]) h4 {
  font:700 clamp(2rem,4.7cqw,5.25rem)/.95 Barlow Condensed,Impact,sans-serif;
  color:#fff3dc;
  margin:0 0 .28em;
}
#station-content #district-hub:not([hidden]) > div {justify-content:flex-start}
#station-content #district-hub:not([hidden]) button {min-height:44px}
#district-hub:not([hidden])::before {
  content:"";
  position:absolute;
  width:18cqw;
  height:14cqh;
  bottom:46cqh;
  left:49%;
  background:radial-gradient(ellipse,#ff8ec249,transparent 71%);
  mix-blend-mode:screen;
  animation:world-lamp 6s ease-in-out infinite alternate;
  pointer-events:none;
}
@keyframes world-lamp {
  from {opacity:.33;transform:scale(.94)}
  to {opacity:.85;transform:scale(1.05)}
}
@keyframes world-fighter-idle {
  from {transform:translateX(-50%)}
  to {transform:translate(-50%,-1.7%)}
}
@keyframes world-scan {
  0%,100% {opacity:0;transform:translateY(-42%)}
  18%,60% {opacity:.65}
  80% {opacity:0;transform:translateY(45%)}
}
@keyframes world-star {
  0%,30% {opacity:.13;transform:scale(.68)}
  60%,100% {opacity:.8;transform:scale(1)}
}
@keyframes world-spar-left {
  0%,30%,100% {transform:translateX(0) scale(.96,1)}
  45% {transform:translateX(-7%) scale(1.02,.92)}
  53% {transform:translate(21%,-8%) rotate(9deg)}
  65% {transform:translateX(10%) scale(.98,1.02)}
}
@keyframes world-spar-right {
  0%,30%,100% {transform:translateX(0) scaleX(-1)}
  45% {transform:translateX(7%) scale(-1.04,.94)}
  53% {transform:translate(-24%,-6%) scaleX(-1) rotate(7deg)}
  65% {transform:translateX(12%) scale(-.97,1.02)}
}
@keyframes world-spar-spark {
  0%,49%,62%,100% {opacity:0;transform:scale(.5)}
  54% {opacity:.85;transform:scale(1.25)}
}
@keyframes world-console-in {
  from {opacity:0;transform:translateX(20px)}
  to {opacity:1;transform:translateX(0)}
}
@media (min-width:716px) {
  #station-content #rpg-station.world-active.console-open > :is(#fighters,#combat,#skill-tree):not([hidden]) {
    width:min(77%,1040px);
  }
  .console-open .world-stage {right:min(77%,1040px)}
  [data-screen="shop"].console-open .world-stage {right:470px;--world-pan:.87}
  .console-open .world-fighter {width:86%}
  #station-content #rpg-station.console-open[data-screen="duels"] #duel-panel {grid-template-columns:1fr minmax(220px,.65fr)}
  #station-content #rpg-station.console-open #duel-panel .arena-rankings {grid-column:2;grid-row:1/3;margin:0}
}
@media (max-width:715px) {
  #station-content #rpg-station:is(.world-active,:has(#district-hub:not([hidden])),:has(#expedition-planner:not([hidden]))) > .circuit-nav {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    overflow:visible;
    padding:6px;
  }
  #station-content #rpg-station:is(.world-active,:has(#district-hub:not([hidden])),:has(#expedition-planner:not([hidden]))) > .circuit-nav button {min-height:38px;padding-inline:4px}
  .world-destination {padding:18px 14px max(21px,env(safe-area-inset-bottom))}
  .world-destination h3 {font-size:clamp(2rem,10cqw,3rem)}
  .world-destination p {font-size:.875rem}
  .world-interaction {padding:.55rem .65rem;font-size:.875rem}
  [data-screen="shop"] .circuit-world {--world-pan:.81}
  .world-mechanic .mechanic-bubble {max-width:16%;font-size:.84rem;right:17%;top:24%}
  .world-sparring img {height:29%;left:40%;bottom:21%}
  .world-sparring img+img {left:52%}
  #station-content #rpg-station.world-active.console-open > :is(#fighters,#combat,#skill-tree,#circuit-shop):not([hidden]) {
    inset:118px 0 0;
    width:100%;
    border:0;
    border-top:1px solid #c69b6880;
  }
  #station-content #rpg-station.world-active.console-open > #circuit-shop:not([hidden]) {inset-block-start:clamp(124px,58%,calc(100% - 230px))}
  #station-content .world-console-close {top:126px}
  #station-content [data-screen="shop"] .world-console-close {top:calc(clamp(124px,58%,100% - 230px) + 8px)}
  #station-content #district-hub:not([hidden]) {padding:30px 14px 17px}
}
body[data-scenery-motion="off"] #station-content #district-hub:not([hidden])::before {animation:none}
body[data-scenery-motion="off"] :is(.world-effects i,.world-sparring img,.world-fighter,.workshop-light) {animation:none!important}
@media (prefers-reduced-motion:reduce) {
  body:not([data-scenery-motion="on"]) :is(.world-effects i,.world-sparring img,.world-fighter) {animation:none}
  body:not([data-scenery-motion="on"]) #station-content #district-hub:not([hidden])::before {animation:none}
  #station-content #rpg-station.world-active.console-open > :is(#fighters,#combat,#skill-tree,#circuit-shop):not([hidden]) {animation:none}
}
