#adventure-prologue{position:absolute;inset:0;z-index:90;overflow:hidden;background:#141816;color:#fff6dc;isolation:isolate}#adventure-prologue[hidden]{display:none!important}
body.prologue-active .scene>*:not(#adventure-prologue){visibility:hidden}body.prologue-active .scene{cursor:default}
body.prologue-active .scene>#panel[open]{visibility:visible}
.intro-entry-view{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;z-index:90;pointer-events:none}
.intro-entering #akiel-character{opacity:0;transition:opacity .65s ease}
.intro-entering.intro-actor-arriving #akiel-character{opacity:1}
.intro-entering .game-tools,.intro-entering .room-tag,.intro-entering #hotspots{opacity:0;pointer-events:none}
.game-tools,.room-tag,#hotspots{transition:opacity .35s ease}
.prologue-art{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;opacity:1;transition:opacity .45s ease,transform 1.1s ease;transform:scale(1.025)}#adventure-prologue.scene-changing .prologue-art{opacity:.12}#adventure-prologue[data-scene="2"] .prologue-art{transform:scale(1.045);transform-origin:20% 50%}
.prologue-shade{position:absolute;inset:0;background:linear-gradient(180deg,#0a100c70,transparent 25%,transparent 60%,#0a100cbf)}
.prologue-top{position:absolute;left:4%;right:4%;top:4%;display:flex;justify-content:space-between;align-items:center;gap:15px;font:11px 'Syne Mono',monospace;letter-spacing:.12em;text-shadow:0 2px 4px #000}.prologue-dots{display:flex;gap:7px}.prologue-dots i{width:6px;height:6px;background:#fff6dc35;border-radius:50%}.prologue-dots .current{background:#fff6dc;box-shadow:0 0 8px #fff6dc70}.prologue-dots .visited{background:#fff6dc90}
.prologue-loading{position:absolute;inset:35% 10% auto;text-align:center;font:14px 'Syne Mono',monospace}.prologue-loading[hidden]{display:none}
.prologue-caption{position:absolute;inset:auto 4% 4%;display:flex;align-items:flex-end;gap:20px;justify-content:space-between;border:0;margin:0;padding:0;min-height:65px;color:#fff6dc}.prologue-dialogue{flex:1;max-width:78%;font:17px/1.55 'Trebuchet MS',Arial,sans-serif;text-shadow:0 2px 4px #000}.prologue-dialogue small{font:700 10px 'Syne Mono',monospace;letter-spacing:.15em;display:inline-block;border-left:3px solid #dfc78d;padding-left:8px;color:#f4d899}.prologue-dialogue p{margin:8px 0 0}.prologue-dialogue[hidden]{display:none}#adventure-prologue[data-speaker="AMSI"] .prologue-dialogue small{border-color:#99b8a1;color:#bfdcc6}
.prologue-next{margin-left:auto;flex-shrink:0;border:2px solid #221c15;border-radius:8px;background:#f3e4bc;color:#2d241b;box-shadow:2px 3px 0 #0005;font:13px 'Trebuchet MS',Arial,sans-serif;padding:11px 14px;min-height:40px;display:flex;align-items:center;gap:10px}.prologue-next:hover{background:#fff4d3;transform:translateY(-1px)}.prologue-next:disabled{opacity:.5;cursor:wait}.prologue-next span{font-size:18px}
.prologue-phone{position:absolute;right:6%;top:15%;width:29%;height:65%;max-width:270px;box-sizing:border-box;border:4px solid #29251f;border-radius:22px;background:#d7c8b4;box-shadow:6px 8px 18px #0006;display:flex;flex-direction:column;padding:15px 7px 12px;transform:rotate(2deg)}.prologue-phone[hidden]{display:none}.prologue-phone-speaker{position:absolute;width:20%;height:4px;border-radius:4px;background:#352e28;top:6px;left:40%}.prologue-phone header{display:flex;justify-content:flex-start;align-items:center;gap:8px;padding:6px 8px;background:#eaddb9;color:#29251f;border:0;font:12px 'Trebuchet MS',Arial,sans-serif;border-radius:7px 7px 0 0}.prologue-phone header small{display:block;font-size:9px;color:#675e4a;letter-spacing:0;margin-top:3px}.prologue-avatar{position:relative;width:36px;height:36px;overflow:hidden;border:2px solid #29251f;border-radius:50%;background:#95ab98;flex-shrink:0}.prologue-avatar img{position:absolute;width:130%;height:auto;max-width:none;left:-15%;top:-2%}.prologue-messages{background:#e8dfc7;flex:1;min-height:0;overflow:auto;scrollbar-width:none;padding:8px;display:flex;flex-direction:column;gap:9px}.prologue-messages::-webkit-scrollbar{display:none}.prologue-message{margin:0;max-width:94%;border:1.5px solid #342b21;border-radius:7px;background:#fff4d5;color:#29251f;font:12px/1.4 'Trebuchet MS',Arial,sans-serif;padding:7px 9px;align-self:flex-start}.prologue-message.you{background:#bad0b7;align-self:flex-end}.prologue-message.arriving{animation:prologue-message-in .22s ease-out}.prologue-home-mark{position:absolute;bottom:4px;left:38%;width:24%;height:3px;border-radius:4px;background:#514940}
.prologue-call{position:absolute;right:4%;top:13%;display:flex;align-items:center;gap:9px;padding:9px 12px;border:2px solid #27281e;border-radius:12px;background:#dae4d4ec;color:#26382a;box-shadow:3px 4px 0 #0003;font:700 12px 'Syne Mono',monospace}.prologue-call[hidden]{display:none}.prologue-call small{display:block;font:10px 'Trebuchet MS',Arial,sans-serif;margin-top:4px;color:#50634f}.prologue-call svg{width:18px;height:18px;margin-left:4px}.prologue-floor{position:absolute;left:50%;top:13.4%;width:7%;height:2.5%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;color:#ffc47d;font:700 clamp(9px,2cqw,18px)/1 'Syne Mono',monospace;text-shadow:0 0 3px #ec862980;overflow:hidden}.prologue-floor[hidden]{display:none}
@keyframes prologue-message-in{from{opacity:0;transform:translateY(7px) scale(.96)}to{opacity:1;transform:none}}
@media(max-width:600px){.prologue-top{font-size:7px;gap:5px}.prologue-phone{width:40%;right:5%;top:12%;height:65%;border-width:3px;border-radius:15px;padding:12px 4px 9px}.prologue-phone header{padding:4px;gap:5px;font-size:10px}.prologue-avatar{width:25px;height:25px}.prologue-phone header small{font-size:7px}.prologue-messages{padding:5px;gap:5px}.prologue-message{font-size:9px;padding:4px 5px}.prologue-caption{gap:9px;bottom:4%;min-height:45px;flex-wrap:wrap}.prologue-dialogue{max-width:100%;width:100%;flex-basis:100%;font-size:12px;line-height:1.4}.prologue-dialogue small{font-size:8px}.prologue-dialogue p{margin-top:5px}.prologue-next{font-size:10px;min-height:30px;padding:6px 8px;gap:7px}.prologue-next span{font-size:14px}.prologue-call{top:13%;padding:5px 7px;gap:5px;font-size:8px}.prologue-call small{font-size:7px}.prologue-call svg{width:12px;height:12px}.prologue-floor{font-size:clamp(8px,2cqw,14px)}.prologue-loading{font-size:10px}}

/* The intro shares the mobile lower screen; its artwork stays unobstructed. */
.prologue-caption[hidden]{display:none!important}
@media(max-width:900px) and (orientation:portrait), (max-width:1100px) and (max-height:600px) and (orientation:landscape){
 .mobile-ds-bottom>.prologue-caption{position:relative;inset:auto;grid-column:1;grid-row:2;align-self:stretch;box-sizing:border-box;display:flex;flex-direction:column;align-items:stretch;justify-content:space-between;gap:8px;min-width:0;min-height:0;margin:18px 6px 6px;padding:14px 12px 8px;border:2px solid #89663f;border-radius:7px;background:linear-gradient(#fff7d7,#e9d6a7);box-shadow:inset 0 0 0 1px #b39a67;color:#30291f;font-family:'Nintendo DS',monospace;z-index:40}
 .mobile-ds-bottom>.prologue-caption .prologue-dialogue{max-width:none;width:100%;flex:1;min-height:0;font:23px/1.14 'Nintendo DS',monospace;text-shadow:none}
 .mobile-ds-bottom>.prologue-caption .prologue-dialogue small{font:21px/1 'Nintendo DS',monospace;letter-spacing:0;background:#78502d;color:#fff0cd;border:1px solid #5a3a23;border-radius:4px;padding:4px 12px}
 .mobile-ds-bottom>.prologue-caption[data-speaker="AMSI"] .prologue-dialogue small{background:#526c53;border-color:#354b37}
 .mobile-ds-bottom>.prologue-caption[data-mode="thought"] .prologue-dialogue p{font-style:italic}
 .mobile-ds-bottom>.prologue-caption .prologue-dialogue p{margin:8px 0;overflow:visible}
 .mobile-ds-bottom>.prologue-caption .prologue-next{align-self:flex-end;min-height:44px;max-width:100%;margin:0;font:22px/1 'Nintendo DS',monospace;box-shadow:none;padding:6px 12px}
 .mobile-ds-bottom>.prologue-caption[data-mode="messages"]{justify-content:flex-end}
}
@media(max-width:1100px) and (max-height:600px) and (orientation:landscape){.mobile-ds-bottom>.prologue-caption{grid-column:1;grid-row:2;margin:12px 0 6px 6px}.mobile-ds-bottom>.prologue-caption .prologue-dialogue{font-size:21px}}

@media(max-width:900px) and (max-height:650px) and (orientation:portrait){
 body.mobile-ds.prologue-active .mobile-ds-top{flex-basis:90px}
 .mobile-ds-bottom>.prologue-caption .prologue-dialogue{font-size:21px}
}

/* Messages already carry their text on the phone: show only the advance action. */
#adventure-prologue[data-mode="messages"] .prologue-caption{justify-content:center}
#adventure-prologue[data-mode="messages"] .prologue-caption .prologue-next{margin-left:0}
@media(max-width:900px) and (orientation:portrait), (max-width:1100px) and (max-height:600px) and (orientation:landscape){
 body.mobile-ds .mobile-ds-bottom>.prologue-caption[data-mode="messages"]{align-items:center;justify-content:center;background:none;border:0;border-radius:0;box-shadow:none;margin:0;padding:16px}
 body.mobile-ds .mobile-ds-bottom>.prologue-caption[data-mode="messages"] .prologue-dialogue{display:none}
 body.mobile-ds .mobile-ds-bottom>.prologue-caption[data-mode="messages"] .prologue-next{align-self:center;justify-content:center;margin:0;min-width:180px;min-height:52px;padding:12px 24px;border:1px solid #ac8e55;border-radius:6px;background:linear-gradient(110deg,#d8bd85,#f1dfb2 55%,#dfc38c);box-shadow:inset 0 1px #fff8,0 3px #20170e55;color:#30291f;font:24px/1.1 'Nintendo DS',monospace}
 body.mobile-ds .mobile-ds-bottom>.prologue-caption[data-mode="messages"] .prologue-next:focus-visible{outline:2px solid #ffe5a3;outline-offset:4px}
}
/* The opening is cinematic; the travel journal starts with free exploration. */
body.prologue-active .mobile-ds-top{visibility:hidden!important;pointer-events:none}
