/* The stable main element fills either the viewport or native fullscreen. */
body.simulator-active{overflow:hidden}
main.immersive-simulator{position:fixed;inset:0;z-index:50;width:100%;max-width:none;height:100svh;height:100dvh;margin:0;padding:0;display:flex;flex-direction:column;background:#dce7f5;overflow:hidden;isolation:isolate}
main.immersive-simulator:fullscreen{height:100%;width:100%;background:#dce7f5}
.simulator-toolbar{flex:none;min-height:58px;padding:7px max(12px,env(safe-area-inset-right)) 7px max(16px,env(safe-area-inset-left));display:flex;align-items:center;justify-content:space-between;gap:16px;background:#f7f9fd;border-bottom:1px solid #cbd8e8;z-index:15;color:#25354b}
.simulator-title{display:flex;gap:16px;align-items:center;min-width:0}.simulator-brand{font-weight:800;font-size:19px;white-space:nowrap;color:#4e49ce}.simulator-title>span:nth-child(2){font-size:13px;font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.simulator-title>small{font-size:10px;color:#65778d;white-space:nowrap}
.simulator-toolbar nav{display:flex;gap:6px;align-items:center;flex:none}.simulator-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:8px 12px;border:1px solid #d0dae9;border-radius:8px;background:white;color:#334a65;font-size:12px;font-weight:650}.simulator-button:hover{background:#eaf0fa}.simulator-button svg{width:17px;height:17px}.guide-badge{font-size:10px;padding:2px 5px;border-radius:5px;background:#eeedff;color:#4e49ce}
.simulator-stage{flex:1;min-height:0;min-width:0;display:flex;overflow:hidden}.immersive-simulator .pc-shell{flex:1;min-height:0;width:100%;display:flex;flex-direction:column;border:0;border-radius:0;box-shadow:none}.immersive-simulator .pc-titlebar{display:none}.immersive-simulator .pc-desktop{flex:1;height:auto;min-height:0;padding:0}.immersive-simulator .pc-taskbar{flex:none;padding-bottom:max(5px,env(safe-area-inset-bottom))}.immersive-simulator .pc-window{left:112px;right:36px;top:40px;bottom:36px;height:auto;max-height:none;min-height:0}.immersive-simulator .pc-window.is-maximized{inset:8px;height:auto;max-height:none;width:auto}
.simulator-guide{position:absolute;z-index:20;top:74px;right:20px;width:350px;max-width:calc(100% - 32px);max-height:calc(100% - 170px);overflow:auto;overscroll-behavior:contain;padding:18px 20px;border:1px solid #d9d3f6;border-radius:16px;background:#fffffff7;box-shadow:0 16px 55px #26355138;color:#29364b;backdrop-filter:blur(12px)}.simulator-guide[hidden]{display:none}.guide-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.guide-heading .kicker{font-size:10px;margin:0;color:#5b4cca}.guide-close{width:44px;height:44px;min-width:44px;border:0;border-radius:8px;background:transparent;font-size:25px;color:#65748c}.guide-close:hover{background:#eef0f7}.simulator-guide h2{font-size:19px;line-height:1.35;letter-spacing:-.025em;margin:4px 0 12px}.simulator-guide p{font-size:13px;line-height:1.65;margin:0 0 14px}.guide-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 10px}.guide-actions .primary-button{min-height:44px;padding:10px 15px;font-size:12px}.guide-actions .text-button{font-size:12px}.simulator-guide>small{display:block;font-size:10px;color:#78839a;line-height:1.55}.simulator-guide .guide-hint{padding:12px;border-radius:9px;background:#eeedff;color:#574d8d;margin-top:8px;font-size:12px}.simulator-toast{position:absolute;z-index:18;bottom:78px;left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 32px);padding:10px 16px;background:#263952ef;color:white;box-shadow:0 4px 20px #17355030;border-radius:10px;pointer-events:none;font-size:12px;line-height:1.6}
.immersive-simulator .phone-scene{flex:1;min-height:0;width:100%;display:flex;justify-content:center;padding:16px;border:0;border-radius:0;background:radial-gradient(ellipse at 50% 40%,#dce0fb,#ecf1fa)}.immersive-simulator .phone-scene-caption{display:none}.immersive-simulator .phone-device{height:100%;max-height:none;min-height:0;width:min(100%,430px);max-width:430px;margin:0;border-width:6px;border-radius:32px;outline:0}.immersive-simulator .phone-screen{min-height:0}.immersive-simulator .phone-home{gap:24px}.immersive-simulator .phone-home-clock>strong{font-size:clamp(32px,6vh,51px)}
/* Fit the ordinary embedded phone as well as its expanded counterpart. */
.phone-device{height:clamp(380px,calc(100dvh - 320px),760px);min-height:0;max-height:none}
@media(max-height:600px){.phone-scene-caption{display:none}}
@media(max-width:760px){
 .phone-device{height:clamp(380px,calc(100dvh - 320px),740px);min-height:0;max-height:none}
 .mission-tools{gap:6px}.mission-tools>.secondary-button{min-height:44px;padding:8px 13px;font-size:12px}
 .simulator-toolbar{min-height:54px;padding:5px 8px;gap:4px}.simulator-title{gap:0}.simulator-brand{font-size:17px}.simulator-title>span:nth-child(2),.simulator-title>small{display:none}.simulator-toolbar nav{gap:4px}.simulator-button{padding:7px 8px;font-size:11px;gap:4px}.simulator-exit{font-size:0;padding:8px 10px}.simulator-exit svg{width:19px;height:19px}.guide-badge{font-size:9px}.simulator-toolbar .simulator-button:focus-visible{outline-offset:-3px}
 .immersive-simulator .phone-scene{padding:0}.immersive-simulator .phone-device{width:100%;max-width:480px;border:0;border-radius:0;box-shadow:none}.immersive-simulator .phone-notch{display:none}.immersive-simulator .phone-status-bar{height:30px;min-height:30px}.immersive-simulator .phone-home{padding:22px 20px;gap:22px}.immersive-simulator .phone-bottom-bar{padding-bottom:env(safe-area-inset-bottom)}
 .immersive-simulator .pc-desktop{padding:0}.immersive-simulator .desktop-shortcuts{padding:8px;gap:4px}.immersive-simulator .pc-window,.immersive-simulator .pc-window.is-maximized{top:88px!important;bottom:8px!important;left:8px!important;right:8px!important;height:auto!important;min-height:0}
 .simulator-guide{top:auto;bottom:84px;right:12px;width:350px;max-width:calc(100% - 24px);max-height:48%;padding:12px 16px;border-radius:14px}.simulator-guide h2{font-size:17px}.simulator-guide p{font-size:12px;margin-bottom:10px}.simulator-guide>small{font-size:9px}.guide-actions{margin-bottom:8px}.simulator-toast{bottom:84px;font-size:11px}
}
@media(max-height:550px) and (min-width:761px){.simulator-toolbar{min-height:50px;padding-block:3px}.immersive-simulator .pc-window{top:16px;bottom:16px}.simulator-guide{top:62px;max-height:calc(100% - 140px)}.immersive-simulator .phone-scene{padding:8px}.immersive-simulator .phone-device{width:400px;border-radius:20px}.immersive-simulator .phone-status-bar{min-height:28px;height:28px}.immersive-simulator .phone-notch{display:none}.immersive-simulator .phone-home{padding:14px 20px;gap:16px}.immersive-simulator .phone-home-clock,.immersive-simulator .phone-home-footer{display:none}.immersive-simulator .phone-notification{min-height:100px}}
@media(max-width:760px) and (orientation:landscape){.simulator-title{display:none}.simulator-toolbar{justify-content:flex-end}.immersive-simulator .phone-device{max-width:600px}.immersive-simulator .phone-home{gap:14px;padding:14px 20px}.immersive-simulator .phone-home-clock,.immersive-simulator .phone-home-footer{display:none}.simulator-guide{bottom:65px;max-height:calc(100% - 125px)}}
@media(prefers-reduced-motion:reduce){.immersive-simulator *{scroll-behavior:auto;transition:none!important}}

/* Full-window play is the default; pause replaces the cramped embedded view. */
.pause-screen{max-width:640px;margin:8vh auto;padding:36px;border:1px solid var(--line);border-radius:20px;background:white}.pause-screen h1{font-size:32px}.pause-screen p{color:var(--muted);line-height:1.7}.pause-screen>button{margin:8px 12px 0 0}
@media(max-width:480px){.simulator-title{display:none}.simulator-toolbar{justify-content:flex-end}.simulator-toolbar nav{width:100%;justify-content:space-between}.simulator-button{padding:7px 9px}.pause-screen{padding:24px}.pause-screen h1{font-size:26px}}

/* Game context stays outside the simulated operating system. */
.episode-status{display:flex;align-items:center;gap:18px;padding:8px 18px;color:#efebff;background:#35204e;flex-shrink:0}.episode-status span{font-size:10px;letter-spacing:.07em;white-space:nowrap;font-weight:800}.episode-status p{margin:0;font-size:13px;line-height:1.4}.episode-finish{background:#fff1a6!important;color:#34214c!important;font-weight:800}.simulator-stage{display:flex;flex-direction:column;min-height:0}.simulator-stage>.pc-shell,.simulator-stage>.phone-scene{flex:1;min-height:0}.simulator-stage>.simulation-context{flex-shrink:0}.simulator-guide.exploration-guide .guide-actions{flex-shrink:0}@media(max-width:600px){.episode-status{gap:8px;padding:7px 10px}.episode-status span{display:none}.episode-status p{font-size:12px}.simulator-toolbar nav{flex-wrap:wrap}.simulator-toolbar .episode-finish{min-height:36px}.simulator-guide.exploration-guide>small{font-size:11px;line-height:1.4}}
