/* Connection status sits outside the native HUD and never captures combat input. */
#connection-status{position:fixed;left:50%;top:max(8px,env(safe-area-inset-top));transform:translateX(-50%);z-index:600;padding:8px 16px;border:1px solid #b69b65;border-radius:5px;background:#152229ed;color:#ffedba;font:13px/1.5 sans-serif;max-width:86vw;pointer-events:none}#connection-status[hidden]{display:none}#account-modal{z-index:700}#account-modal .modal{max-width:520px}#account-modal p{line-height:1.7}#account-modal .account-actions{display:flex;gap:10px;flex-wrap:wrap}#account-error{color:#bc5e4d}#entry-links a{color:inherit;margin-right:20px}#circuit-bom{line-height:1.7;font-size:13px}#game-root.immersive{position:fixed;inset:0;z-index:300;width:100%;height:100dvh}button:disabled{cursor:not-allowed}
/* Measured diagnostics stay with the canvas in windowed and full-screen play. */
#live-performance{position:absolute;top:max(8px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));z-index:110;padding:4px 7px;border:1px solid #a48a5655;border-radius:3px;background:#102229d9;color:#f1ddae;font:11px/16px ui-monospace,monospace;white-space:nowrap;pointer-events:none;font-variant-numeric:tabular-nums}
[data-public-locked]{opacity:.45;cursor:not-allowed!important}
@media(min-width:801px) and (pointer:fine){.world-hud.hero-ui .topbar nav{margin-right:175px}}
@media(max-width:800px),(pointer:coarse){#live-performance{font-size:10px;line-height:15px;padding:3px 5px}}
/* Compact, single-view roster. Keep the native illustrated cards and both actions. */
#game-root #party-modal .party-pages{display:none!important}
#game-root #party-modal .party-grid{grid-template-columns:repeat(8,minmax(0,1fr));gap:8px}
#game-root #party-modal .hero-card-name{font-size:20px;height:auto;padding:4% 5%;line-height:1.2}
#game-root #party-modal .hero-card-name i{width:70%;margin-top:3px}
#game-root #party-modal .hero-card-state{top:auto;bottom:3%;font-size:9px;padding:3px 4px;letter-spacing:0}
#game-root #party-modal .hero-card-actions{grid-template-columns:1fr}
#game-root #party-modal .hero-card-actions button{padding:7px 2px;font-size:11px;line-height:1.25;min-height:28px;white-space:nowrap}
@media(max-width:760px){#game-root #party-modal .party-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px 5px}#game-root #party-modal .hero-card-name{font-size:16px}#game-root #party-modal .hero-card-state{font-size:8px}#game-root #party-modal .hero-card-actions button{font-size:10px}}
@media(max-width:760px){#game-root #party-modal .hero-card-name{width:75%;font-size:14px;letter-spacing:.04em;white-space:nowrap}}

.shadow-recovery{position:fixed;inset:0;z-index:100000;display:grid;place-items:center;background:#090f19b8;padding:24px}.shadow-recovery[hidden]{display:none}.shadow-recovery section{max-width:440px;width:100%;box-sizing:border-box;padding:26px;border:1px solid #a8824c;border-radius:12px;background:#181b21;color:#eee1c7;box-shadow:0 16px 70px #0009}.shadow-recovery h2{font-size:20px;margin:0 0 14px}.shadow-recovery p{line-height:1.6;margin:0 0 22px}.shadow-recovery button{width:100%;padding:12px;background:#cf9d59;color:#20190e;border:0;border-radius:6px;font-size:16px;cursor:pointer}

/* Shared, lightweight waiting motif: entry, interface operations and reconnect. */
@keyframes ew-wait-turn{to{transform:rotate(360deg)}}
.ew-wait-spinner,#connection-status[data-waiting="true"]::before,#account-progress:not([hidden]) .entry-progress-heading::before,body[data-ui-waiting="1"] #game-root::after{content:"";display:inline-block;box-sizing:border-box;width:18px;height:18px;border:2px solid #bb9a5b55;border-top-color:#f1cb88;border-right-color:#df9655;border-radius:50%;animation:ew-wait-turn .9s linear infinite;flex:0 0 auto;vertical-align:middle}
#connection-status[data-waiting="true"]::before{margin-right:9px}
#account-progress .entry-progress-heading span{flex:1}
body[data-ui-waiting="1"] #game-root::after{position:fixed;bottom:max(20px,env(safe-area-inset-bottom));left:calc(50% - 12px);z-index:900;width:24px;height:24px;pointer-events:none;box-shadow:0 0 0 6px #142027d9}
.shadow-recovery section{text-align:center}.shadow-recovery .ew-wait-spinner{width:36px;height:36px;border-width:3px;margin:2px auto 20px}.shadow-recovery p{margin-bottom:0;color:#c8c0ae}.shadow-recovery h2{font-size:19px}
@media(prefers-reduced-motion:reduce){.ew-wait-spinner,#connection-status[data-waiting="true"]::before,#account-progress:not([hidden]) .entry-progress-heading::before,body[data-ui-waiting="1"] #game-root::after{animation:none}}

.recovery-steps{list-style:none;text-align:left;padding:0;margin:18px 0;display:grid;gap:8px;font-size:14px}.recovery-steps [data-state=pending]{opacity:.45}.recovery-steps [data-state=current]{color:#f4c97d}.recovery-steps [data-state=done]{color:#94c6ad}#recovery-elapsed{display:block;color:#c8c0ae;font-variant-numeric:tabular-nums;margin:12px 0}#shadow-return-home{margin-top:8px}#shadow-return-home:disabled{opacity:.45;cursor:wait}.recovery-hint{display:block;font-size:12px;line-height:1.6;color:#a9a69f;margin-top:12px}

.shadow-recovery section{max-height:calc(100dvh - 32px);overflow:auto}
@media(max-height:560px){.shadow-recovery{padding:12px}.shadow-recovery section{padding:14px;max-width:600px}.shadow-recovery .ew-wait-spinner{display:none}.shadow-recovery h2{font-size:17px;margin:0 0 6px}.shadow-recovery p{font-size:12px}.recovery-steps{grid-template-columns:1fr 1fr;font-size:12px;gap:5px;margin:10px 0}#recovery-elapsed{margin:6px 0}#shadow-return-home{padding:9px;font-size:14px;margin-top:4px}.recovery-hint{font-size:11px;margin-top:6px}}
