body.game-shell{margin:0;overflow:hidden;background:#050914}.game-shell>.rail,.game-shell .arcade>footer{display:none!important}.game-shell .arcade{position:relative;width:100vw;height:100dvh;max-width:none;padding:0;margin:0;overflow:hidden;isolation:isolate;background:#060a17 url('/night-circuit-lobby.webp') center/cover}.game-shell .arcade::before{content:"";position:absolute;inset:0;background:#050914b8;backdrop-filter:blur(20px);z-index:-1}
.game-shell .game-hud{position:absolute;inset:0 0 auto;z-index:10;height:62px;padding:8px 22px;margin:0;box-sizing:border-box;justify-content:flex-end;gap:12px;background:linear-gradient(#050913e8,#05091311);font-size:13px}.game-hud .brand{margin-right:auto}.game-hud .brand-name{font-size:16px}.game-hud #credits{background:#10182bd9;border-color:#85714e;border-radius:20px;padding:8px 14px}.hud-control{border:1px solid #6c6d82;background:#10182bd9;color:#d9e8ed;padding:8px 12px;border-radius:6px;cursor:pointer}.game-hud #arcade-membership{font-size:12px;padding:8px}
.game-shell .lobby-heading{position:absolute;left:24px;bottom:22px;z-index:3;pointer-events:none;margin:0;display:block}.game-shell .lobby-heading .eyebrow{font-size:10px;letter-spacing:.2em;color:#9be3da;margin:0}.game-shell .lobby-heading h1{font-size:clamp(28px,4vw,58px);letter-spacing:.02em;margin:8px 0 0;text-shadow:0 4px 20px #000}.game-shell .lobby-heading>p{display:none}
.game-shell .night-lobby{position:absolute;left:50%;top:50%;width:min(100vw,150dvh);height:auto;aspect-ratio:3/2;transform:translate(-50%,-50%);border:0;border-radius:0;box-shadow:none;background:transparent;overflow:hidden}.game-shell .night-lobby>img{width:100%;height:100%;object-fit:contain}.game-shell .night-lobby .machine-hotspot{border:0!important;box-shadow:none!important;background:transparent!important}.game-shell .night-lobby .machine-hotspot>span{opacity:0;transform:translateY(6px);transition:opacity .2s,transform .2s;font-size:clamp(13px,1.8vw,22px);padding:10px 12px;width:max-content;max-width:100%;left:50%;right:auto;translate:-50% 0;bottom:8%;text-align:center;pointer-events:none;background:#0a1429ee;border:1px solid #c5a268}.game-shell .night-lobby .machine-hotspot:is(:hover,:focus-visible)>span{opacity:1;transform:translateY(0)}.game-shell .night-lobby .machine-hotspot:is(:hover,:focus-visible){filter:drop-shadow(0 0 10px #ffe4a0)}.game-shell .night-lobby .machine-hotspot em{display:none}.game-shell .night-lobby .lobby-main>span{bottom:20%}.game-shell .night-lobby .lobby-location{display:none}.game-shell .arcade-note{display:none}.game-shell #arcade-status{position:absolute;right:24px;bottom:18px;max-width:45%;font-size:11px;text-align:right;z-index:4;color:#9cd0d4;text-shadow:0 2px 6px #000;pointer-events:none}
#station-modal[open][data-station]{inset:0;width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:0;border:0;border-radius:0;box-sizing:border-box;background:#09101e;color:#e4e6ed;animation:game-screen-enter .35s ease-out}#station-modal::backdrop{background:#040713}#station-modal .station-toolbar{position:relative;top:0;height:56px;padding:8px 20px;margin:0;box-sizing:border-box;border-bottom:1px solid #85704b88;background:linear-gradient(90deg,#17263b,#101426);z-index:30}#station-modal .station-toolbar h2{font-size:20px;color:#ffe1a0;letter-spacing:.08em}#station-modal #close-station{font-size:12px;min-height:34px;border-color:#86704e;padding:6px 14px}#station-content{height:calc(100dvh - 56px);overflow:auto;background:radial-gradient(ellipse at top,#22364c44,transparent 70%),#0a1120}#station-content #rpg-station{display:block;position:relative;min-height:100%;padding:0 18px 18px;box-sizing:border-box}#rpg-station .build-version{display:none}#rpg-station .circuit-nav{position:sticky;top:0;z-index:20;margin:0 -18px 0;padding:8px 18px;background:#0a1426f0;backdrop-filter:blur(12px);border-bottom:1px solid #84704d66;gap:6px}#rpg-station .circuit-nav button{padding:9px;font-size:13px;background:#15253b;border:1px solid #3b5064;border-radius:6px}#rpg-station .circuit-nav button[aria-pressed=true]{color:#ffe1a0;border-color:#d4ad6a;background:#342b32}
#station-content #adventure{position:relative;margin:0 -18px}#adventure-heading{display:none}#station-content #expedition-scene{height:calc(100dvh - 186px);min-height:330px;border:0;border-radius:0;background-color:#080e1a}#station-content #expedition-scene.party-preview{height:calc(100dvh - 113px);min-height:400px}#station-content #expedition-status{margin:0;min-height:22px;padding:7px 20px;background:#0a1425;font-size:12px}#station-content #expedition-actions{padding:8px 20px;margin:0;background:#101a2d;gap:8px}#expedition-actions button{font-size:12px;padding:8px 12px}#expedition-planner{position:absolute;inset:0 0 0 auto;width:min(100%,780px);z-index:15;overflow:auto;margin:0!important;border-radius:0!important;box-sizing:border-box;max-height:calc(100dvh - 113px);background:#0b1528f5!important;backdrop-filter:blur(15px)}#expedition-planner #expedition-party{grid-template-columns:repeat(auto-fit,minmax(100px,1fr))}#expedition-planner .party-select img{height:120px}#expedition-planner~#expedition-actions{position:relative;z-index:16}#district-hub{padding:80px 30px 28px;background:linear-gradient(transparent,#07101be8)}#district-hub h4{font-family:var(--display);font-size:clamp(28px,4vw,54px);color:#ffe1a0}#district-hub .secondary,#district-hub .cta{font-size:13px;border-radius:6px;padding:10px 16px}.route-stages{gap:5px}.route-stages li{padding:8px}.route-stages strong{font-size:12px}.route-stages span{font-size:10px}
#station-content #fighters,#station-content #skill-tree,#station-content #combat,#station-content #circuit-shop{margin-top:16px}#station-content #machine{max-width:1400px;margin:auto;border:0;padding:28px;background:transparent}.capsule-card{border-radius:14px!important;background:linear-gradient(145deg,#223149,#0c1527)!important;border-color:#8f7655!important}.capsule-card .cabinet{border-radius:10px;overflow:hidden}.lab-heading h2{font-size:30px;color:#ffe1a0}#collection-station{max-width:1200px;margin:auto;background:transparent;border:0}.game-shell .secondary,.game-shell .cta{border-radius:6px}
#game-menu{width:min(90vw,400px);background:linear-gradient(145deg,#1d3046,#0b1223);border:1px solid #b68b53;border-radius:16px;padding:28px;box-shadow:0 20px 90px #000b;color:#e4e6ed}#game-menu::backdrop{background:#030712bf;backdrop-filter:blur(10px)}#game-menu h2{color:#ffe1a0;font-size:34px}#game-menu>a,#game-menu>button{display:block;text-align:center;margin:10px 0;width:100%;box-sizing:border-box}.game-option{display:flex;gap:8px;align-items:center;margin:20px 0}.game-fineprint{font-size:11px;color:#9eafbf}.game-fineprint a{color:inherit}
@keyframes game-screen-enter{from{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}
#jrpg-story[hidden]{display:none}#jrpg-story{position:absolute;inset:0;z-index:12;overflow:hidden;background:linear-gradient(90deg,#070e1888,#070e1811);isolation:isolate}.story-vignette{position:absolute;inset:0;background:linear-gradient(transparent 25%,#07101deb)}#story-portrait{position:absolute;left:2%;bottom:15%;height:83%;width:44%;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 12px 30px #0009);animation:portrait-arrive .4s ease-out}.story-panel{position:absolute;left:8%;right:5%;bottom:5%;padding:18px 28px 20px;border:1px solid #c5a167;border-radius:12px;background:linear-gradient(110deg,#14263af5,#10172bf2);box-shadow:0 15px 40px #0009;min-height:120px}.story-panel small{color:#85d9d4;letter-spacing:.12em;font-size:11px}.story-panel h3{margin:7px 0 8px;color:#ffe1a0;font-size:22px}.story-panel p{font-size:clamp(15px,1.7vw,21px);line-height:1.55;color:#f2eff5;margin:0 0 14px;max-width:1000px}.story-next{display:block;margin-left:auto;border:1px solid #b59765;background:#27384a;color:#ffe1a0;padding:8px 18px;border-radius:6px;cursor:pointer}.story-skip{position:absolute;right:18px;top:18px;background:#10182bce;border:1px solid #8e7c68;color:#cddde6;border-radius:6px;padding:7px 12px;cursor:pointer}.enemy-falling .expedition-enemy img{animation:enemy-fall .7s ease-in forwards}.encounter-cleared .expedition-enemy{visibility:hidden}.combat-damage{position:absolute;left:72%;top:35%;z-index:4;color:#ffe1a0;font:800 clamp(24px,4vw,48px) var(--display);text-shadow:2px 3px #722646;pointer-events:none;animation:damage-rise .8s ease-out forwards}
@keyframes enemy-fall{0%{filter:brightness(3)}40%{opacity:1;transform:translateX(5px)}100%{opacity:0;transform:translateY(20px);filter:blur(4px)}}@keyframes damage-rise{from{opacity:1;transform:translateY(0) scale(.8)}to{opacity:0;transform:translateY(-45px) scale(1.1)}}@keyframes portrait-arrive{from{opacity:0;transform:translateX(-22px)}to{opacity:1;transform:translateX(0)}}
@media(max-width:680px){.game-shell .game-hud{height:54px;padding:7px 10px;gap:6px}.game-hud .brand-name{display:none}.game-hud #arcade-membership{max-width:105px;font-size:10px}.game-hud #credits{padding:7px 8px;font-size:11px}.hud-control{padding:7px 8px;font-size:10px}.game-shell .lobby-heading{left:16px;bottom:45px}.game-shell #arcade-status{max-width:65%;right:14px;bottom:12px;font-size:9px}.game-shell .night-lobby .machine-hotspot small{display:none}.game-shell .night-lobby .machine-hotspot:is(:hover,:focus-visible)>span{font-size:12px}.game-shell .night-lobby .lobby-maze>span,.game-shell .night-lobby .lobby-shooter>span,.game-shell .night-lobby .lobby-collection>span{display:block}#station-modal .station-toolbar{height:48px;padding:7px 12px}#station-content{height:calc(100dvh - 48px)}#rpg-station .circuit-nav{grid-template-columns:repeat(3,minmax(0,1fr))}#rpg-station .circuit-nav button{padding:6px;font-size:11px}#station-content #expedition-scene{height:calc(100dvh - 236px);min-height:270px}#station-content #expedition-scene.party-preview{height:calc(100dvh - 142px);min-height:350px}.story-panel{left:3%;right:3%;bottom:3%;padding:12px 15px;min-height:115px}#story-portrait{left:0;bottom:26%;height:69%;width:65%}.story-panel h3{font-size:18px}.story-panel p{font-size:15px}.story-panel small{font-size:9px}#expedition-planner{max-height:calc(100dvh - 142px)}#station-content #machine{padding:14px}#district-hub{padding:60px 18px 24px}#district-hub p{font-size:13px}}
@media(prefers-reduced-motion:reduce){#station-modal[open][data-station],#story-portrait,.enemy-falling .expedition-enemy img,.combat-damage{animation:none}.game-shell .night-lobby .machine-hotspot>span{transition:none}}
.game-shell .shell{display:block;width:100vw;max-width:none;margin:0;padding:0}.game-shell .shell>.rail{display:none!important}
#station-content #adventure:has(#expedition-planner:not([hidden])) #expedition-scene{height:calc(100dvh - 196px);min-height:330px}
#expedition-planner{max-height:calc(100dvh - 196px)}
@media(max-width:680px){#station-content #adventure:has(#expedition-planner:not([hidden])) #expedition-scene{height:calc(100dvh - 236px);min-height:270px}#expedition-planner{max-height:calc(100dvh - 236px)}}
.game-shell .cta{background:linear-gradient(135deg,#d9bd80,#a7e9d8);border:1px solid #e8d8a2;color:#102332;box-shadow:0 0 15px #8cd8cd22}
#expedition-scene.story-active,#expedition-scene.story-active #expedition-actors{animation-play-state:paused!important}
#expedition-stage-label{font-size:11px}
.game-shell button:disabled{opacity:.42;cursor:default}
#station-content #expedition-scene:not(.party-preview){background-position:var(--travel-end,100%) bottom}
@keyframes journey-scroll{from{background-position:var(--travel-start,0%) bottom}to{background-position:var(--travel-end,100%) bottom}}
#station-content #machine{max-width:none;padding:0 22px 22px;box-sizing:border-box;min-height:100%}.lab-heading{height:36px;margin:0;justify-content:flex-end}.lab-heading h2{display:none}.lab-machine-deck{display:flex;justify-content:center;gap:8px;padding:8px 0 14px}.lab-machine-deck button{background:#122139;color:#c7dce6;border:1px solid #536a7c;border-radius:6px;padding:10px 20px;cursor:pointer}.lab-machine-deck button[aria-pressed=true]{border-color:#d6b97f;color:#ffe1a0;box-shadow:0 0 18px #f4c27822;background:#302a35}#machine .capsule-grid{display:block;max-width:1500px;margin:0 auto}#machine .capsule-card:not(.lab-active){display:none}#machine .capsule-card.lab-active{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(260px,1fr);grid-template-rows:1fr auto auto auto 1fr;column-gap:30px;min-height:calc(100dvh - 200px);padding:0;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none}#machine .capsule-card .cabinet{grid-column:1;grid-row:1/6;align-self:center;aspect-ratio:3/2;height:auto;width:100%;margin:0;border:1px solid #a68a5b88;border-radius:14px}#machine .capsule-card h3{grid-column:2;grid-row:2;font-size:clamp(28px,3vw,44px);margin:0 0 10px}#machine .capsule-card>p{grid-column:2;grid-row:3;font-size:16px;line-height:1.6;margin:0 0 22px}#machine .capsule-controls{grid-column:2;grid-row:4;align-self:start}#machine .capsule-card>details{grid-column:2;grid-row:5;align-self:start}.capsule-pull,.batch-pull{min-height:48px!important}.game-shell #machine>.lab-status:empty{display:none}
#adventure:has(#expedition-planner[hidden]) #expedition-start{display:none}#expedition-scene:has(.expedition-victory)~#expedition-actions{display:none}#expedition-scene.story-active #expedition-actors{opacity:.12}
#expedition-actors>.expedition-unit:not(.expedition-enemy) progress{width:90%;max-width:130px;margin:4px auto;display:block}#expedition-actors>.expedition-unit:not(.expedition-enemy) img{height:clamp(90px,18dvh,180px)}
@media(max-width:680px){#station-content #machine{padding:0 12px 16px}.lab-machine-deck{gap:4px}.lab-machine-deck button{font-size:10px;padding:8px 6px;flex:1}#machine .capsule-card.lab-active{display:block;min-height:0}#machine .capsule-card .cabinet{max-height:44dvh;aspect-ratio:3/2;margin-bottom:16px}#machine .capsule-card h3{font-size:26px}#machine .capsule-card>p{font-size:13px;margin:0 0 12px}}

.game-shell .arcade{background-image:url('/night-circuit-lobby-hd.webp')}
.game-shell .night-lobby{width:min(100%,177.7778dvh);aspect-ratio:16/9}
.game-shell .night-lobby>img{aspect-ratio:16/9;object-fit:fill}
.game-shell .lobby-screen{left:27.2%;top:26%;width:25.5%;height:31.5%;clip-path:polygon(5% 1%,86% 9%,99% 97%,96% 99%,11% 99%,7% 97%,0 42%,0 9%)}
.game-shell .night-lobby .lobby-main{left:19%;top:8%;width:40%;height:81%}
.game-shell .night-lobby .lobby-lab{left:66%;top:30%;width:22%;height:53%}
.game-shell .night-lobby .lobby-maze{left:4.7%;top:40%;width:6.7%;height:20%}
.game-shell .night-lobby .lobby-shooter{left:11.4%;top:40%;width:5.7%;height:20%}
.game-shell .night-lobby .lobby-collection{left:88%;top:25%;width:10%;height:24%}
.game-shell .lobby-capsule-magic{left:68%;top:39%;width:17%;height:21%}
.game-shell .window-left{left:9%;top:15%}
.game-shell .window-right{left:69%;top:11%}
.game-shell .window-train{left:70%;top:25%;width:15%}
.game-shell .window-tower{left:79.4%;top:11%}

body.game-shell.windowed-game{overflow:auto}
.game-shell.windowed-game .shell{display:grid;grid-template-columns:152px minmax(0,1fr);max-width:1540px;width:100%}
.game-shell.windowed-game .shell>.rail{display:flex!important}
.game-shell.windowed-game .arcade{width:calc(100% - 48px);height:auto;aspect-ratio:16/9;max-width:1280px;margin:36px 24px;align-self:start;border-radius:14px;box-shadow:0 0 0 1px #9a7a4c,0 18px 75px #0008}
.game-shell.windowed-game .game-hud{height:48px;padding:7px 12px;gap:7px}
.game-shell.windowed-game .game-hud .brand{display:none}
.game-shell.windowed-game .lobby-heading h1{font-size:clamp(23px,3vw,46px)}
.game-shell.windowed-game #station-modal[open][data-station]{left:var(--game-left);top:var(--game-top);right:auto;bottom:auto;width:var(--game-width);height:var(--game-height);border-radius:14px;overflow:hidden}
.game-shell.windowed-game #station-modal::backdrop{background:#050a1820}
.game-shell.windowed-game #station-content{height:calc(var(--game-height) - 56px)}
.game-shell.windowed-game #station-content #expedition-scene,
.game-shell.windowed-game #station-content #expedition-scene.party-preview{height:calc(var(--game-height) - 145px);min-height:290px}
.game-shell.windowed-game #expedition-planner{max-height:calc(var(--game-height) - 155px)}
#station-modal .station-toolbar h2{margin-right:auto}
@media(max-width:715px){
  .game-shell.windowed-game .shell{display:block}
  .game-shell.windowed-game .shell>.rail{display:none!important}
  .game-shell.windowed-game .arcade{width:calc(100% - 20px);margin:18px 10px}
  .game-shell.windowed-game #station-modal[open][data-station]{top:10dvh;height:80dvh}
  .game-shell.windowed-game #station-content{height:calc(80dvh - 48px)}
  .game-shell.windowed-game #arcade-status{display:none}
  .game-shell.windowed-game .lobby-heading .eyebrow{display:none}
}
/* Give the wide Adventure scenes room to pan between encounters. */
#station-content #expedition-scene:not(.party-preview){background-size:var(--scene-art-width,cover)}
#station-content{container-type:size}
.game-shell.windowed-game #station-modal[open][data-station]{position:fixed}
@media(max-width:715px){
  .game-shell.windowed-game #station-content #expedition-scene,
  .game-shell.windowed-game #station-content #expedition-scene.party-preview{height:calc(80dvh - 185px);min-height:260px}
  .game-shell.windowed-game #expedition-planner{max-height:calc(80dvh - 170px)}
}
@media(min-width:716px){
  .game-shell.windowed-game .arcade{max-width:min(1280px,calc((100dvh - 72px) * 1.7778))}
}

#expedition-scene{container-type:size}
#station-content #scene-motion{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;max-height:none;margin:0;pointer-events:none}
#station-content #scene-motion[hidden]{display:none}
#expedition-scene:not(.party-preview) #expedition-actors{bottom:var(--scene-ground,12%)}
#expedition-actors>.expedition-unit:not(.expedition-enemy) img{height:clamp(48px,23cqh,158px);object-position:center bottom}
#expedition-actors>.expedition-enemy img{height:clamp(75px,32cqh,235px)}
#expedition-actors>.enemy-elite img{height:clamp(88px,40cqh,280px)}
#expedition-actors>.enemy-boss img{height:clamp(105px,55cqh,395px)}
#expedition-actors>.enemy-colossal{width:44%;right:10%}
#expedition-actors>.enemy-colossal img{display:block;width:100%;height:clamp(125px,59cqh,500px);filter:drop-shadow(0 0 22px #bd64ff88)}
#expedition-actors>.enemy-colossal :is(small,progress){width:78%;margin-inline:auto}
#expedition-scene.boss-defeated .enemy-colossal{animation:boss-dissolve 1.1s ease-in forwards}
@media(prefers-reduced-motion:reduce){#expedition-scene.boss-defeated .enemy-colossal{animation:none;opacity:0}}

#station-content #scene-motion{image-rendering:pixelated}
#expedition-scene[data-environment]{image-rendering:pixelated;background-repeat:no-repeat}
#expedition-scene[data-environment] #expedition-actors img{image-rendering:pixelated}
#expedition-scene[data-environment] #expedition-actors>.expedition-unit:not(.expedition-enemy) img{height:clamp(44px,20cqh,146px)}
#expedition-scene[data-environment] .expedition-unit img{vertical-align:bottom}
#expedition-scene.party-preview{image-rendering:pixelated}
#expedition-scene.party-preview #expedition-actors{bottom:23%;left:42%;right:5%}
#expedition-scene.party-preview .expedition-unit{width:26%}

/* The district has its own camera and sidewalk, independent of the battle pans. */
#station-content #expedition-scene.party-preview{
  background-size:cover;
  background-position:center bottom;
  background-repeat:no-repeat;
}
#expedition-scene.party-preview #expedition-actors{
  bottom:15%;
  left:40%;
  right:4%;
  gap:1%;
  justify-content:center;
}
#expedition-scene.party-preview #expedition-actors>.expedition-unit{
  width:29%;
}
#expedition-scene.party-preview #expedition-actors>.expedition-unit img{
  display:block;
  width:100%;
  height:clamp(72px,22cqh,230px);
  max-height:none;
  object-fit:contain;
  object-position:center bottom;
  image-rendering:pixelated;
}
#expedition-scene[data-environment] #expedition-actors>.expedition-unit:not(.expedition-enemy) img{
  height:clamp(60px,24cqh,230px);
}
@media(max-width:680px){
  #expedition-scene.party-preview #expedition-actors{left:8%;right:8%;bottom:22%}
  #expedition-scene.party-preview #expedition-actors>.expedition-unit img{height:clamp(62px,22cqh,125px)}
  #expedition-scene.party-preview #district-hub{padding-top:32px}
}
#expedition-actors>.expedition-unit::before{
  content:"";
  position:absolute;
  z-index:-1;
  bottom:0;
  left:26%;
  width:48%;
  height:clamp(4px,1.3cqh,12px);
  background:#080d1890;
  clip-path:polygon(12% 0,88% 0,88% 20%,100% 20%,100% 80%,88% 80%,88% 100%,12% 100%,12% 80%,0 80%,0 20%,12% 20%);
}

/* Keep the party and enemy in separate lanes throughout the encounter. */
#expedition-scene[data-environment] #expedition-actors{
  inset-inline:3%;
  padding:0;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr)) minmax(0,2fr);
  gap:1%;
  transform:none;
  align-items:end;
}
#expedition-scene[data-environment].walking:not(.departing) #expedition-actors{
  animation-name:expedition-party-arrive;
}
@keyframes expedition-party-arrive{
  from{transform:translateX(-3%);opacity:.7}
  to{transform:translateX(0);opacity:1}
}
#expedition-scene[data-environment] #expedition-actors>.expedition-unit{
  width:100%;
  min-width:0;
  margin:0;
}
#expedition-scene[data-environment] #expedition-actors>.expedition-enemy{
  position:relative;
  inset:auto;
  grid-column:4;
  grid-row:1;
  width:100%;
  display:grid;
  justify-items:center;
}
#expedition-scene[data-environment] #expedition-actors>.expedition-enemy :is(small,progress){
  box-sizing:border-box;
  width:min(90%,290px);
  margin-inline:auto;
  overflow-wrap:anywhere;
}
#expedition-scene[data-environment] #expedition-actors>.expedition-enemy img{
  display:block;
  width:100%;
  max-height:calc(100cqh - var(--scene-ground,12cqh) - 70px);
}
#station-content #expedition-scene[data-environment]{
  height:calc(100dvh - 211px);
}
.game-shell.windowed-game #station-content #expedition-scene[data-environment]{
  height:calc(var(--game-height) - 193px);
}
@media(max-width:715px){
  #station-content #expedition-scene[data-environment]{height:calc(100dvh - 245px)}
  .game-shell.windowed-game #station-content #expedition-scene[data-environment]{height:calc(80dvh - 220px)}
  #expedition-scene[data-environment] #expedition-actors>.expedition-unit small{font-size:10px;overflow-wrap:anywhere}
}

/* The actor baseline is calculated from the same artwork transform as the canvas. */
#expedition-scene.party-preview #expedition-actors {
  bottom:var(--scene-ground, 10%);
  transform:none;
}
#expedition-scene[data-environment] #expedition-actors {bottom:var(--scene-ground, 8%)}
#expedition-scene[data-environment] #expedition-actors>.expedition-unit:not(.expedition-enemy) img {
  display:block;
}
#expedition-scene[data-environment] #expedition-actors>.expedition-unit.strike {
  animation-name:circuit-grounded-strike;
}
@keyframes circuit-grounded-strike {
  50% {transform:translateX(7%)}
}
#expedition-scene[data-environment] #expedition-actors>.expedition-enemy.strike {
  animation-direction:reverse;
  animation-name:circuit-grounded-enemy-strike;
}
@keyframes circuit-grounded-enemy-strike {
  50% {transform:translateX(-4%)}
}
@media (prefers-reduced-motion:reduce) {
  #expedition-scene[data-environment] #expedition-actors>.expedition-unit.strike {animation:none}
}
.game-shell:not(.windowed-game) #station-modal[open][data-station] {
  inset:0;
  width:100vw;
  height:100dvh;
  max-width:none;
  max-height:none;
}
#station-content #rpg-station>.circuit-nav {
  grid-template-columns:repeat(6,minmax(0,1fr));
}
#station-content #rpg-station>:is(#fighters,#combat,#skill-tree,#circuit-shop) {
  width:100%;
  max-width:none;
  box-sizing:border-box;
  min-height:calc(100cqh - 85px);
}
#station-content #fighters {
  align-content:start;
}
#station-content #build {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:14px;
  align-items:start;
}
#station-content .inventory-deck {grid-template-columns:1fr}
#station-content .inventory-doll {
  background:linear-gradient(0deg,#090f20,#253b5888),url('/pixel-district.webp') center/cover;
  border-color:#887052;
}
#station-content .inventory-doll .hero-display img {
  height:clamp(245px,44cqh,540px);
  object-fit:contain;
}
#station-content .stash {
  margin:0;
  background:#101a2d;
  border-color:#887052;
}
#station-content .stash-grid {
  grid-template-columns:repeat(auto-fill,minmax(76px,1fr));
  max-height:max(210px,calc(100cqh - 280px));
  overflow:auto;
  align-content:start;
  padding:4px;
}
#station-content .stash-item {
  width:100%;
  max-height:none;
}
#station-content .stash-item img {max-height:none}
#station-content #duel-panel .duel-banner {
  min-height:clamp(210px,56cqh,680px);
  border-color:#887052;
}
#station-content #battle .duel-arena {
  min-height:clamp(235px,64cqh,760px);
  background-position:center bottom;
  image-rendering:pixelated;
}
#station-content :is(.shop-art,.duel-banner img) {image-rendering:pixelated}
#station-content .shop-art {max-height:none}
#station-content .workshop-layout {grid-template-columns:minmax(0,2.4fr) minmax(240px,1fr)}
@media(max-width:850px) {
  #station-content #build,#station-content .workshop-layout {grid-template-columns:1fr}
  #station-content .stash-grid {max-height:none;overflow:visible}
}
@media(max-width:680px) {
  #station-content #rpg-station>.circuit-nav {grid-template-columns:repeat(3,minmax(0,1fr))}
}
#station-content .mechanic-mouth {
  left:77.452%;
  top:43.252%;
  width:1.734%;
  height:2.444%;
  opacity:0;
  mask-image:none;
  image-rendering:pixelated;
}
#station-content .mechanic-bubble {left:auto;right:28%;top:29%;border-radius:5px}
#station-content .mechanic-bubble::before {left:calc(100% - 1px);right:auto;transform:scaleX(-1)}
#station-content .workshop-light.warm-left {inset:-3% auto auto 22%;width:10%}
#station-content .workshop-light.warm-center {left:63%;top:9%;width:11%;height:13%;--light-core:#ff79b598;--light-edge:#ff4c9f39}
#station-content .workshop-light.warm-strip {left:56%;top:46%;width:15%;height:18%}
#station-content .workshop-light.crate-light {left:73%;top:61%;width:19%;height:23%}
#station-content #skill-tree {background:linear-gradient(#0b1528f0,#0b1528d9),url('/pixel-stage-4.webp') center/cover}

.touch-arcade {display:none}
@media (max-width:715px) {
  .game-shell.windowed-game .arcade {
    display:flex;
    flex-direction:column;
    gap:10px;
    width:100%;
    max-width:none;
    min-height:100vh;
    min-height:100dvh;
    margin:0;
    padding:0 max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));
    box-sizing:border-box;
    aspect-ratio:auto;
    overflow:visible;
    overflow-anchor:none;
    border-radius:0;
    background:#080d1b;
    box-shadow:none;
  }
  .game-shell.windowed-game .game-hud {
    position:sticky;
    top:0;
    height:auto;
    min-height:48px;
    padding-top:max(4px,env(safe-area-inset-top));
    background:#080d1b;
    margin:0;
  }
  .game-shell .game-hud .hud-control {min-height:44px}
  .game-shell.windowed-game .night-lobby {
    position:relative;
    inset:auto;
    width:100%;
    transform:none;
  }
  .game-shell.windowed-game .lobby-heading {
    position:relative;
    inset:auto;
    margin:0;
  }
  .game-shell.windowed-game .lobby-heading h1 {margin:0}
  .game-shell.windowed-game .touch-arcade {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }
  .touch-arcade button {min-height:44px;touch-action:manipulation}
  .touch-arcade button:first-child {grid-column:1/-1}
  .game-shell.windowed-game #arcade-status {
    position:static;
    display:block;
    max-width:none;
    margin:0;
    text-align:start;
    font-size:12px;
  }
  .game-shell.windowed-game #station-modal[open][data-station],
  .game-shell:not(.windowed-game) #station-modal[open][data-station] {
    position:fixed;
    inset:0;
    width:100%;
    height:100vh;
    height:100dvh;
    border-radius:0;
    padding-top:env(safe-area-inset-top);
    overflow:hidden;
  }
  .game-shell #station-modal[open][data-station] {display:flex;flex-direction:column}
  .game-shell #station-modal .station-toolbar {
    height:auto;
    min-height:52px;
    flex:none;
    padding-inline:max(12px,env(safe-area-inset-left)) max(12px,env(safe-area-inset-right));
  }
  .game-shell #station-content {
    height:auto!important;
    flex:1;
    min-height:0;
    padding-bottom:env(safe-area-inset-bottom);
    overscroll-behavior:contain;
  }
  #station-content #rpg-station .circuit-nav button {min-height:40px}
}
@media (pointer:coarse) {
  .night-lobby .machine-hotspot {touch-action:manipulation}
  .game-shell .lobby-screen .lobby-screen-monster,
  .game-shell .lobby-screen .lobby-screen-hero {will-change:transform}
  .game-shell .lobby-capsule-magic i {filter:none}
  .game-shell .lobby-window-lights i {mix-blend-mode:normal}
}
