/* Arcade Pulse: original geometry, bold control surfaces, no borrowed game assets. */
:root {
  --arcade-void:#040916; --arcade-panel:#101d35; --arcade-raised:#203959;
  --arcade-cyan:#37eaff; --arcade-lime:#d8ff47; --arcade-pink:#ff7ccd;
  --arcade-white:#f3fcff; --arcade-muted:#adbed3;
  --arcade-display:'Bahnschrift SemiCondensed','Impact','Yu Gothic','Meiryo',sans-serif;
  --arcade-body:'Bahnschrift','Yu Gothic','Meiryo',sans-serif;
}
body.pulse-ui { background:#040916; color:var(--arcade-white); }
body.pulse-ui #app { font-family:var(--arcade-body); }
body.pulse-ui #app button { -webkit-tap-highlight-color:transparent; }
body.pulse-ui #app button:focus-visible { outline:3px solid var(--arcade-lime) !important; outline-offset:4px !important; }
body.pulse-ui #app button:disabled { filter:saturate(.3); }

/* Home retains its navigation and ship roster, but becomes a neon launch gate. */
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul {
  --arcade-cyan:#37eaff; --arcade-lime:#d8ff47; --arcade-pink:#ff7ccd;
  background:
    linear-gradient(145deg,transparent 62%,#39dcff12 62% 62.5%,transparent 62.5%),
    linear-gradient(35deg,transparent 35%,#6ac5ff0b 35% 49%,transparent 49%),
    radial-gradient(ellipse at 50% 38%,#123f72 0,#09172f 48%,#040916 90%) !important;
}
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul[data-design-pack]:not([data-design-pack='standard']) {
  --arcade-cyan:var(--pack-line); --arcade-lime:var(--pack-accent);
  background:linear-gradient(145deg,transparent 60%,var(--pack-glow) 60% 61%,transparent 61%),radial-gradient(ellipse at 50% 38%,var(--pack-shell),var(--pack-bg) 78%) !important;
}
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .rem-menu { background:none !important; padding-inline:18px !important; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .rem-menu-header {
  border:2px solid #668aac !important; border-left:5px solid var(--arcade-cyan) !important;
  padding:5px 120px 5px 10px !important; background:#071225ed !important; box-shadow:0 4px 0 #01040d !important;
}
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .menu-header__label { color:#a8d2e8 !important; font-size:9px !important; letter-spacing:.07em !important; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .menu-header__value { color:#f4fdff !important; font-family:var(--arcade-display) !important; font-weight:900 !important; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .menu-home-topbar { top:0 !important; right:0 !important; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-credit-resource { min-height:54px; border:2px solid #8093b3 !important; border-radius:0 !important; background:#15263e !important; box-shadow:inset 0 -4px #0b1527 !important; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .menu-home-resource-label { color:var(--arcade-lime) !important; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .menu-home-resource-value { color:#f5ffd5 !important; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-active-frame { border-left:0 !important; padding:0 !important; gap:0 !important; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-active-frame strong { font:900 28px/1.35 var(--arcade-display) !important; color:#f4ffff !important; text-shadow:3px 3px 0 #020712 !important; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-active-frame span { color:var(--arcade-lime) !important; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-hangar-visual { isolation:isolate; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .rem-menu-hangar { z-index:2; background:none !important; border:0 !important; box-shadow:none !important; filter:drop-shadow(0 8px 0 #01081588) drop-shadow(0 0 15px #3cddff35); }
.arcade-hangar-gate { position:absolute; z-index:0; width:220px; height:220px; left:50%; top:50%; transform:translate(-50%,-45%); pointer-events:none; }
.arcade-hangar-gate > i { position:absolute; inset:13%; border:4px solid var(--arcade-cyan); transform:rotate(45deg); background:linear-gradient(145deg,#173e6822,#06152a88); box-shadow:0 0 0 7px #040c1b,inset 0 0 0 5px #040c1b,0 0 22px #38dbff33; }
.arcade-hangar-gate > i:nth-child(2) { inset:-3%; border-width:2px; background:none; border-color:#45cefb35; box-shadow:none; }
.arcade-hangar-gate > i:nth-child(3) { inset:29%; border-width:3px; background:none; border-color:var(--arcade-pink); box-shadow:none; }
.arcade-hangar-gate > b { position:absolute; left:-12%; right:-12%; top:50%; height:2px; background:linear-gradient(90deg,var(--arcade-cyan),transparent 30% 70%,var(--arcade-cyan)); }
.arcade-hangar-brand { position:absolute; left:0; right:0; top:7px; text-align:center; font:900 26px/1 'Impact','Bahnschrift',sans-serif; letter-spacing:.11em; color:#7ca8d645; pointer-events:none; }
body.pulse-ui #menu-screen.active .arcade-hangar-gate { animation:arcade-gate-in .7s cubic-bezier(.2,.75,.2,1) both; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-loadout-strip { border-bottom:2px solid #46d9fa33 !important; margin-bottom:8px; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .menu-hangar-info { color:#b4d4e9 !important; font-size:12px !important; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .menu-hero-play {
  clip-path:none !important; border:3px solid #edffd4 !important; border-radius:4px !important;
  background:linear-gradient(180deg,#e5ff82 0 48%,#b4ed35 49% 100%) !important;
  box-shadow:inset 0 -7px #54872b,0 5px 0 #02060e,0 0 0 3px #142839 !important; height:74px !important;
  transition:transform .12s,box-shadow .12s !important;
}
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-sortie-copy strong { color:#09291e !important; font:900 30px/1.1 var(--arcade-display) !important; letter-spacing:.15em !important; text-shadow:0 1px #f3ffd0 !important; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul :is(.home-sortie-index,.home-sortie-copy small,.home-sortie-arrow) { color:#214824 !important; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions .menu-dock-btn > i {
  clip-path:none !important; border:2px solid var(--arcade-cyan) !important; border-radius:4px !important; background:#112a46 !important;
  box-shadow:inset 0 -5px #030d20,0 3px 0 #010710,0 0 0 2px #031022 !important;
}
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions .menu-dock-btn:nth-child(even) > i { border-color:var(--arcade-pink) !important; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions .menu-dock-btn svg { stroke:var(--arcade-cyan) !important; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-side-actions .menu-dock-btn > strong { font-weight:900 !important; color:#f1fbff !important; text-shadow:2px 2px #020810 !important; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .rem-menu-section-title { color:var(--arcade-white) !important; font:900 23px/1.4 var(--arcade-display) !important; text-shadow:2px 3px #020612 !important; border-bottom:2px solid var(--arcade-cyan) !important; padding-bottom:9px !important; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .rem-menu-section-title span { color:var(--arcade-lime) !important; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul :is(.home-facility-deck,.home-personnel-deck,.home-operation-deck) .menu-btn {
  background:linear-gradient(145deg,#1d3c5d,#0e1d35 72%) !important; border:2px solid #5c9dc0 !important; border-top:3px solid var(--arcade-cyan) !important;
  border-radius:3px !important; box-shadow:inset 0 -5px #071024,0 4px 0 #010610 !important; padding:50px 10px 13px !important; min-height:126px !important;
}
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul :is(.home-facility-deck,.home-personnel-deck,.home-operation-deck) .menu-btn:nth-child(even) { border-top-color:var(--arcade-pink) !important; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul :is(.home-facility-deck,.home-personnel-deck,.home-operation-deck) .menu-btn strong { font:900 15px/1.45 var(--arcade-display) !important; color:#f3fcff !important; text-shadow:1px 2px #01060e !important; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul :is(.home-facility-deck,.home-personnel-deck,.home-operation-deck) .menu-btn > span { font-size:11px !important; line-height:1.5 !important; color:#b3ccdf !important; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul :is(.home-facility-deck,.home-personnel-deck,.home-operation-deck) .menu-btn::before { top:10px !important; left:10px !important; border:2px solid var(--arcade-cyan) !important; border-radius:2px !important; color:var(--arcade-lime) !important; background:#071328 !important; box-shadow:2px 2px #010710 !important; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-tabbar { background:#080e21 !important; border-top:3px solid #3d739a !important; box-shadow:0 -5px 0 #020511 !important; gap:4px !important; padding:5px 8px max(8px,env(safe-area-inset-bottom)) !important; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-tabbar__item { border:1px solid #283957 !important; border-radius:3px !important; color:#a3b9cf !important; background:#0e1b31 !important; min-height:55px; }
body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .home-tabbar__item.is-active { color:var(--arcade-lime) !important; background:#1c3147 !important; border-color:var(--arcade-lime) !important; box-shadow:inset 0 -4px #58723a !important; }

/* Shared facilities: keep each room's artwork and layout, unify the controls. */
body.pulse-ui #app > .rem-port { --port-font:var(--arcade-body); --port-text:var(--arcade-white); --port-muted:var(--arcade-muted); }
body.pulse-ui #app > :is(#shop-screen,#hangar-screen,#ship-training-screen,#skill-tree-screen,#stellar-domain-screen,#mode-lobby-screen,#protocol-forge-screen,#record-screen,#profile-screen,#options-screen,#stage-select-screen,#stage-brief-screen,#stage-clear-screen,#ship-training-detail,#ship-custom-screen,#starlight-treasure-screen,#starlight-inventory-screen,#mode-info-screen,#materials-screen,#events-screen,#login-bonus-screen,#language-screen,#update-screen,#zettai-difficulty-screen,#performance-notice-screen,#reduced-danmaku-screen,#tutorial-intro-screen).rem-port { --chamber-accent:var(--arcade-lime); --chamber-metal:var(--arcade-cyan); --chamber-ink:var(--arcade-white); }
body.pulse-ui #app > :is(#shop-screen,#hangar-screen,#ship-training-screen,#skill-tree-screen,#stellar-domain-screen,#mode-lobby-screen,#protocol-forge-screen,#record-screen,#profile-screen,#options-screen,#stage-select-screen,#stage-brief-screen,#stage-clear-screen,#ship-training-detail,#ship-custom-screen,#starlight-treasure-screen,#starlight-inventory-screen,#mode-info-screen,#materials-screen,#events-screen,#login-bonus-screen,#language-screen,#update-screen,#zettai-difficulty-screen,#performance-notice-screen,#reduced-danmaku-screen,#tutorial-intro-screen).rem-port .panel-head { border-bottom:3px solid var(--arcade-cyan) !important; margin-bottom:14px !important; padding-bottom:12px !important; }
body.pulse-ui #app > :is(#shop-screen,#hangar-screen,#ship-training-screen,#skill-tree-screen,#stellar-domain-screen,#mode-lobby-screen,#protocol-forge-screen,#record-screen,#profile-screen,#options-screen,#stage-select-screen,#stage-brief-screen,#stage-clear-screen,#ship-training-detail,#ship-custom-screen,#starlight-treasure-screen,#starlight-inventory-screen,#mode-info-screen,#materials-screen,#events-screen,#login-bonus-screen,#language-screen,#update-screen,#zettai-difficulty-screen,#performance-notice-screen,#reduced-danmaku-screen,#tutorial-intro-screen).rem-port .panel-head h2 { color:#f2fbff !important; font:900 28px/1.3 var(--arcade-display) !important; text-shadow:3px 3px #010611 !important; }
body.pulse-ui #app > :is(#shop-screen,#hangar-screen,#ship-training-screen,#skill-tree-screen,#stellar-domain-screen,#mode-lobby-screen,#protocol-forge-screen,#record-screen,#profile-screen,#options-screen,#stage-select-screen,#stage-brief-screen,#stage-clear-screen,#ship-training-detail,#ship-custom-screen,#starlight-treasure-screen,#starlight-inventory-screen,#mode-info-screen,#materials-screen,#events-screen,#login-bonus-screen,#language-screen,#update-screen,#zettai-difficulty-screen,#performance-notice-screen,#reduced-danmaku-screen,#tutorial-intro-screen).rem-port :is(.primary-btn,.shop-btn,.rem-port-back) { border:2px solid #78b9d1 !important; border-radius:3px !important; background:linear-gradient(180deg,#294b65,#16314b) !important; color:#ecfcff !important; font-weight:900 !important; box-shadow:inset 0 -4px #0a192b,0 3px #010710 !important; }
body.pulse-ui #app > :is(#shop-screen,#hangar-screen,#ship-training-screen,#skill-tree-screen,#stellar-domain-screen,#mode-lobby-screen,#protocol-forge-screen,#record-screen,#profile-screen,#options-screen,#stage-select-screen,#stage-brief-screen,#stage-clear-screen,#ship-training-detail,#ship-custom-screen,#starlight-treasure-screen,#starlight-inventory-screen,#mode-info-screen,#materials-screen,#events-screen,#login-bonus-screen,#language-screen,#update-screen,#zettai-difficulty-screen,#performance-notice-screen,#reduced-danmaku-screen,#tutorial-intro-screen).rem-port :is(.primary-btn,.shop-btn,.rem-port-back):disabled { color:#81929e !important; border-color:#465567 !important; box-shadow:none !important; }
body.pulse-ui #app > #stage-select-screen.rem-port .stage-world-atlas--continent { border:3px solid #549bb9; box-shadow:0 4px #020710; }
body.pulse-ui #app > #stage-select-screen.rem-port .stage-node { border-width:2px !important; box-shadow:0 3px #030b17 !important; }
body.pulse-ui #app > #skill-tree-screen.rem-port .research-tree-viewport { border:2px solid #42739b; border-top:4px solid var(--arcade-cyan); background:repeating-linear-gradient(0deg,#56cfff07 0 1px,transparent 1px 30px),#091629; }
body.pulse-ui #app > #skill-tree-screen.rem-port .tree-node__socket { border-radius:5px; border-width:3px; }
body.pulse-ui #app > #skill-tree-screen.rem-port .tree-node.owned .tree-node__socket { border-color:#d8ff47; background:#2c502f; }
body.pulse-ui #app > #scout-screen { --scout-gold:#e3ff78; --scout-line:#3b6388; --scout-muted:#a7c2d4; }
body.pulse-ui #app > #scout-screen .scout-tabs button { border:2px solid #5494b5; border-radius:3px; box-shadow:inset 0 -4px #071525; font-weight:900; }
body.pulse-ui #app > #scout-screen .scout-tabs button[aria-pressed=true] { background:#b9f1ef; color:#092035; box-shadow:inset 0 -4px #55a7ab; }
body.pulse-ui #app > #scout-screen .scout-feature { border:2px solid #66919b; border-top:3px solid #e9d094; background:linear-gradient(145deg,#26324788,#0b172a); }
body.pulse-ui #app > #scout-screen .scout-draw-actions button { border:2px solid #f2ffd1; border-radius:3px; box-shadow:inset 0 -5px #729854,0 3px #01050d; }

/* Title and transitions use the same light rails without constant flashing. */
body.pulse-ui #app > #title-screen.title-screen--premium { background:radial-gradient(ellipse at 50% 40%,#143e73,#050b20 70%) !important; }
body.pulse-ui #app > #title-screen.title-screen--premium :is(.neo-title-bg,.neo-title-nebula,.neo-title-planet,.entry-title-world) { opacity:.18 !important; }
body.pulse-ui #app > #title-screen.title-screen--premium .title-premium-hudframe { border:3px solid #2c80ae !important; box-shadow:inset 0 0 0 5px #010819 !important; }
body.pulse-ui #app > #title-screen.title-screen--premium .title-signal-orbit { border:3px solid #31eaff99; border-radius:7%; transform:translate(-50%,-50%) rotate(45deg); animation:arcade-title-lock .8s ease-out both !important; }
body.pulse-ui #app > #title-screen.title-screen--premium .title-signal-orbit i { border-color:#eb80d08c; border-radius:6%; }
body.pulse-ui .rem-screen-wipe__panel { background:repeating-linear-gradient(135deg,#07142b 0 24px,#0c2343 24px 48px); }
body.pulse-ui .rem-screen-wipe__panel::before { border:3px solid #2cc8e766; }
body.pulse-ui .rem-screen-wipe__panel--left::after { background:var(--arcade-cyan); }
body.pulse-ui .rem-screen-wipe__panel--right::after { background:var(--arcade-pink); }

/* Keep the full playfield above the HUD, with dedicated ability touch targets. */
body.pulse-ui #game-screen.rem-battle--phase4 { --battle-cyan:var(--arcade-cyan); --battle-cyan-pale:#edffff; --battle-green:var(--arcade-lime); --battle-paper:#f6fcff; --battle-gold:#f5e36b; --battle-display:var(--arcade-display); --battle-body:var(--arcade-body); --battle-panel:#071125ef; --battle-panel-solid:#0a192b; }
body.pulse-ui #game-screen.rem-battle--phase4 .game-canvas-wrap {
  inset:calc(136px + env(safe-area-inset-top)) 0 calc(176px + env(safe-area-inset-bottom)) !important;
  width:100% !important; height:auto !important; display:flex; justify-content:center; align-items:center;
  background:linear-gradient(90deg,#071327,#091830 12%,#071126 50%,#091830 88%,#071327);
}
body.pulse-ui #game-screen.rem-battle--phase4 #game-canvas {
  position:static !important; inset:auto !important;
  width:min(100%,calc((100dvh - 312px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) * .5625)) !important; height:auto !important;
  max-width:100% !important; max-height:100% !important; aspect-ratio:9 / 16; flex:none;
  outline:2px solid #467d99; outline-offset:0; box-shadow:0 0 0 5px #020612;
}
body.pulse-ui #game-screen.rem-battle--phase4 :is(.dust-panel,.hp-panel,.rem-battle-rhythm) { margin-inline:72px !important; }
body.pulse-ui #game-screen.rem-battle--phase4 :is(.dust-panel,.hp-panel) { grid-template-columns:65px minmax(0,1fr) !important; gap:4px !important; }
body.pulse-ui #game-screen.rem-battle--phase4 .rem-battle-chain small { display:none; }
body.pulse-ui #game-screen.rem-battle--phase4 :is(.special-skill-btn,.breach-drive-btn) {
  z-index:36 !important; bottom:calc(96px + env(safe-area-inset-bottom)) !important;
  width:64px !important; min-width:64px !important; max-width:64px !important;
  height:64px !important; min-height:64px !important; max-height:64px !important;
}
body.pulse-ui #game-screen.rem-battle--phase4 .breach-drive-btn { left:16px !important; }
body.pulse-ui #game-screen.rem-battle--phase4 .special-skill-btn { right:16px !important; }
body.pulse-ui #game-screen.rem-battle--phase4 :is(.hud-top,.hud-bottom) { background:#060e21f2 !important; border:2px solid #6b8eb1 !important; box-shadow:inset 0 3px #223d5c,inset 0 -3px #020714,0 0 0 3px #020713 !important; border-radius:2px !important; }
body.pulse-ui #game-screen.rem-battle--phase4 .hud-top { border-bottom:3px solid var(--arcade-cyan) !important; }
body.pulse-ui #game-screen.rem-battle--phase4 .hud-block { border-right:2px solid #304660 !important; background:linear-gradient(180deg,#16324b44,transparent) !important; }
body.pulse-ui #game-screen.rem-battle--phase4 :is(#score-value,#run-hi-value) { color:#eaffff !important; font-family:var(--arcade-display) !important; font-weight:900 !important; text-shadow:2px 2px #000 !important; }
body.pulse-ui #game-screen.rem-battle--phase4 #score-value { color:var(--arcade-lime) !important; }
body.pulse-ui #game-screen.rem-battle--phase4 .rem-battle-frame .corner { width:24px; height:24px; border-color:var(--arcade-cyan) !important; }
body.pulse-ui #game-screen.rem-battle--phase4 .rem-battle-reticle { display:none !important; }
body.pulse-ui #game-screen.rem-battle--phase4 .rem-battle-rail { width:4px; background:repeating-linear-gradient(180deg,var(--arcade-cyan) 0 9px,transparent 9px 31px); opacity:.4; }
body.pulse-ui #game-screen.rem-battle--phase4 #boss-hud { background:#121225ed !important; border:2px solid #bc95aa !important; border-left:5px solid #ff8b8a !important; box-shadow:0 3px 0 #010612 !important; border-radius:2px !important; }
body.pulse-ui #game-screen.rem-battle--phase4 :is(.hp-gauge,.dust-gauge,.boss-gauge) { position:relative; border:1px solid #7596ac !important; border-radius:0 !important; background:#050b17 !important; overflow:hidden; }
body.pulse-ui #game-screen.rem-battle--phase4 :is(.hp-gauge,.dust-gauge,.boss-gauge)::after { content:''; position:absolute; inset:0; background:repeating-linear-gradient(90deg,transparent 0 19px,#030a17a6 19px 22px); pointer-events:none; z-index:3; }
body.pulse-ui #game-screen.rem-battle--phase4 .hp-fill { border-radius:0 !important; background:linear-gradient(180deg,#f0ffc2,var(--arcade-lime)) !important; box-shadow:none !important; }
body.pulse-ui #game-screen.rem-battle--phase4 .dust-fill { border-radius:0 !important; background:linear-gradient(180deg,#d2fdff,var(--arcade-cyan)) !important; box-shadow:none !important; }
body.pulse-ui #game-screen.rem-battle--phase4 .boss-fill { border-radius:0 !important; background:linear-gradient(180deg,#ffd5a3,#ff9065) !important; }
body.pulse-ui #game-screen.rem-battle--phase4 .boss-hud-sealed .boss-fill { background:linear-gradient(180deg,#c7ebff,#77a9fb) !important; }
body.pulse-ui #game-screen.rem-battle--phase4 .boss-hud-critical .boss-fill { background:#ff767f !important; }
body.pulse-ui #game-screen.rem-battle--phase4 .hud-lowhp .hp-fill { background:#ff7692 !important; }
body.pulse-ui #game-screen.rem-battle--phase4 .hud-dust-active .dust-fill { background:linear-gradient(90deg,#ff9ddd,#eaff96) !important; }
body.pulse-ui #game-screen.rem-battle--phase4 .item-btn { border:2px solid #5398b9 !important; border-radius:3px !important; background:linear-gradient(180deg,#1f4b64,#112840) !important; box-shadow:inset 0 -4px #050d1d !important; color:#ddf9ff !important; font-weight:900 !important; }
body.pulse-ui #game-screen.rem-battle--phase4 .item-btn:disabled { color:#7a97aa !important; border-color:#364c61 !important; }
body.pulse-ui #game-screen.rem-battle--phase4 :is(.special-skill-btn,.breach-drive-btn) { border:3px solid #81d5ed !important; border-radius:6px !important; background:#102843 !important; box-shadow:inset 0 -5px #040c1b,0 3px 0 #020715 !important; font-family:var(--arcade-display) !important; font-weight:900 !important; }
body.pulse-ui #game-screen.rem-battle--phase4 .special-skill-btn.ready { border-color:#f3ffc7 !important; background:linear-gradient(180deg,#ebff8b,#bbea37) !important; color:#142b15 !important; box-shadow:inset 0 -5px #668c2c,0 0 0 3px #223d25,0 0 15px #baff6b45 !important; animation:arcade-ready .45s ease-out both !important; }
body.pulse-ui #game-screen.rem-battle--phase4 .breach-drive-btn.ready { border-color:#c7faff !important; color:#071b2d !important; background:#73e8f2 !important; box-shadow:inset 0 -5px #357e96,0 3px #020815 !important; }
body.pulse-ui #game-screen.rem-battle--phase4 :is(.special-skill-btn,.breach-drive-btn).active { border-color:#ffc6e7 !important; color:#fff8fe !important; background:#722951 !important; }
body.pulse-ui #game-screen.rem-battle--phase4 :is(.floating-btn,.pause-btn) { border:2px solid #87accb !important; border-radius:3px !important; background:#11233b !important; box-shadow:inset 0 -3px #030d1f !important; font-weight:900 !important; }
body.pulse-ui #game-screen.rem-battle--phase4 > :is(#back-to-menu-btn,#pause-btn).floating-btn { right:2px !important; width:44px !important; min-width:44px !important; max-width:44px !important; height:44px !important; min-height:44px !important; max-height:44px !important; padding:3px !important; font-size:7px !important; }
body.pulse-ui #game-screen.rem-battle--phase4 > #back-to-menu-btn.floating-btn { top:calc(137px + env(safe-area-inset-top)) !important; }
body.pulse-ui #game-screen.rem-battle--phase4 > #pause-btn.floating-btn { top:calc(187px + env(safe-area-inset-top)) !important; }
body.pulse-ui #game-screen.rem-battle--phase4 .breach-drive-btn::before { display:none; }
body.pulse-ui #game-screen.rem-battle--phase4 .rem-battle-warning { color:#fff4e2 !important; border:3px solid #ffc368 !important; background:#301921f2 !important; box-shadow:0 5px #020610 !important; font-family:var(--arcade-display) !important; text-shadow:2px 2px #140307 !important; }
body.pulse-ui #game-screen.rem-battle--phase4 .rem-battle-chain { color:var(--arcade-cyan); }
body.pulse-ui #game-screen.rem-battle--phase4 .rem-battle-chain.is-milestone strong { color:var(--arcade-lime); text-shadow:2px 2px #000; }

@keyframes arcade-gate-in { from {opacity:0;transform:translate(-50%,-45%) scale(1.14)} to {opacity:1;transform:translate(-50%,-45%) scale(1)} }
@keyframes arcade-title-lock { from {opacity:0;transform:translate(-50%,-50%) rotate(35deg) scale(1.1)} to {opacity:1;transform:translate(-50%,-50%) rotate(45deg) scale(1)} }
@keyframes arcade-ready { from {transform:translateY(3px)} to {transform:translateY(0)} }
@media(max-width:380px) {
  body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul .rem-menu { padding-inline:13px !important; }
  body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul :is(.home-facility-deck,.home-personnel-deck,.home-operation-deck) .menu-btn { min-height:118px !important; padding-inline:8px !important; }
  body.pulse-ui #app > #menu-screen.main-menu--premium.rem-menu-v3.home-overhaul :is(.home-facility-deck,.home-personnel-deck,.home-operation-deck) .menu-btn strong { font-size:14px !important; }
  .arcade-hangar-gate { width:196px; height:196px; }
}
@media(orientation:landscape) and (max-height:520px) {
  body.pulse-ui #game-screen.rem-battle--phase4 .game-canvas-wrap { inset:8px 0 8px !important; }
  body.pulse-ui #game-screen.rem-battle--phase4 #game-canvas { width:calc((100dvh - 16px) * .5625) !important; max-width:42% !important; }
  body.pulse-ui #game-screen.rem-battle--phase4 .hud-top { left:7px !important; right:auto !important; width:26% !important; }
  body.pulse-ui #game-screen.rem-battle--phase4 #boss-hud { left:7px !important; right:auto !important; width:26% !important; }
  body.pulse-ui #game-screen.rem-battle--phase4 .hud-bottom { left:auto !important; right:7px !important; width:26% !important; height:224px !important; max-height:224px !important; min-height:224px !important; grid-template-rows:20px 20px 20px 16px 118px !important; }
  body.pulse-ui #game-screen.rem-battle--phase4 :is(.dust-panel,.hp-panel,.rem-battle-rhythm) { margin-inline:0 !important; }
  body.pulse-ui #game-screen.rem-battle--phase4 .bottom-row { grid-template-columns:1fr !important; grid-template-rows:14px 96px !important; }
  body.pulse-ui #game-screen.rem-battle--phase4 .item-panel { display:grid !important; grid-template-columns:repeat(3,minmax(0,1fr)) !important; }
  body.pulse-ui #game-screen.rem-battle--phase4 .weapon-panel { height:14px !important; min-height:14px !important; max-height:14px !important; grid-template-columns:50px minmax(0,1fr) !important; align-items:center !important; }
  body.pulse-ui #game-screen.rem-battle--phase4 #weapon-value { font-size:10px !important; line-height:12px !important; }
  body.pulse-ui #game-screen.rem-battle--phase4 :is(.special-skill-btn,.breach-drive-btn) { bottom:calc(240px + env(safe-area-inset-bottom)) !important; width:58px !important; min-width:58px !important; max-width:58px !important; height:58px !important; min-height:58px !important; max-height:58px !important; }
  body.pulse-ui #game-screen.rem-battle--phase4 .special-skill-btn { right:12px !important; }
  body.pulse-ui #game-screen.rem-battle--phase4 .breach-drive-btn { left:auto !important; right:calc(26% - 55px) !important; }
  body.pulse-ui #game-screen.rem-battle--phase4 > #back-to-menu-btn.floating-btn { left:12px !important; right:auto !important; top:156px !important; }
  body.pulse-ui #game-screen.rem-battle--phase4 > #pause-btn.floating-btn { left:12px !important; right:auto !important; top:200px !important; }
}
html.lowfx .arcade-hangar-gate,html.lowfx .title-signal-orbit { animation:none !important; }
html.lowfx .arcade-hangar-gate > i { box-shadow:none; }
html.lowfx body.pulse-ui #game-screen.rem-battle--phase4 .special-skill-btn { animation:none !important; }
@media(prefers-reduced-motion:reduce) {
  body.pulse-ui #app :is(.arcade-hangar-gate,.title-signal-orbit,.special-skill-btn) { animation:none !important; }
  body.pulse-ui #app button { transition:none !important; }
}
