/* A cinematic final chapter, painted in the same green and gold as the fields. */
#outboundDialog{position:fixed;inset:0;margin:0;width:100vw;height:100dvh;max-width:none;max-height:none;padding:0;border:0;border-radius:0;overflow:hidden;transform:none;background:#102e29;color:#fff4d9;box-shadow:none}
#outboundDialog::backdrop{background:#102e29}
#outboundDialog:focus{outline:none}
#outboundDialog *{box-sizing:border-box}
.outbound-shell{position:relative;width:100%;height:100%;overflow:clip;isolation:isolate;container-type:size;background:#173d32;font-family:'PingFang SC',sans-serif;animation:outbound-enter .8s ease both}
.outbound-shell:before{content:'';position:absolute;inset:-4%;z-index:-3;background:var(--media-64cad9c264) center 60%/cover no-repeat;filter:brightness(.48) saturate(.7);transform:scale(1.04)}
.outbound-shell:after{content:'';position:absolute;inset:0;z-index:-2;background:linear-gradient(90deg,#092c29ed 0%,#113c32b8 29%,#183c3240 62%,#112c2860),linear-gradient(0deg,#0b2828e8,transparent 24%,transparent 80%,#102c2980);pointer-events:none}

.outbound-controls{position:absolute;top:clamp(12px,3.8cqh,34px);left:clamp(20px,4.5cqw,76px);z-index:7;display:flex}
.outbound-controls button{display:grid;place-items:center;width:40px;height:40px;padding:0;border:1px solid #ead49a66;border-radius:50%;background:#173d3266;color:#f9e8bf;font:22px Georgia,serif;backdrop-filter:blur(6px);transition:transform .2s,background .2s}
.outbound-controls button:hover{transform:translateY(-2px);background:#d4b57333}
.outbound-controls button:focus-visible{outline:2px solid #ffdf91;outline-offset:4px}
.outbound-controls button:disabled{opacity:.3;cursor:default}
.outbound-enter-ending{position:absolute;left:50%;bottom:6%;z-index:3;transform:translateX(-50%);padding:12px 30px;border:1px solid #f6e5b6b3;border-radius:999px;background:linear-gradient(135deg,#f8ebc7,#dfbf7f);box-shadow:0 6px 24px #071f224d;color:#284b38;font:600 clamp(14px,1.5cqw,20px)/1.4 'PingFang SC',sans-serif;letter-spacing:.12em;opacity:0;cursor:pointer}
.outbound-enter-ending[hidden]{display:none}
.outbound-enter-ending span{display:inline-block;margin-left:12px;transition:transform .2s}
.outbound-enter-ending:hover span{transform:translateX(4px)}
.outbound-enter-ending:focus-visible{outline:2px solid #fff5d2;outline-offset:5px}
.outbound-copy{position:absolute;left:5%;top:50%;width:34%;transform:translateY(-50%);z-index:3;pointer-events:none;text-shadow:0 3px 24px #052824}
.outbound-sales{display:flex;flex-direction:column;gap:clamp(12px,3cqh,26px)}
.outbound-sales p{margin:0;opacity:0;font:400 clamp(16px,2cqw,30px)/1.65 'PingFang SC',sans-serif;letter-spacing:.025em}
.outbound-sales-total>span{display:block}
.outbound-sales-total>span:first-child{margin-bottom:.2em;color:#e4d9b9;font-size:.85em;letter-spacing:.09em}
.outbound-sales-total strong{display:block;margin-top:.08em;color:#ffe1a0;font:700 clamp(58px,8cqw,124px)/1.08 Georgia,'Songti SC',serif;letter-spacing:.015em;text-shadow:0 2px 22px #e9bf5933,0 3px 24px #052824}
.outbound-sales-total strong span{margin-left:.2em;font:600 .38em 'Songti SC','STSong',serif}

.outbound-copy h2{position:absolute;left:0;top:50%;margin:-1.3em 0 0;opacity:0;font:500 clamp(30px,4.3cqw,72px)/1.3 'Songti SC','STSong',serif;letter-spacing:.025em;white-space:nowrap}
.outbound-copy h2 span,.outbound-copy h2 em{display:block}
.outbound-copy h2 em{font-style:normal;color:#f4d18a}

.outbound-map{position:absolute;top:9%;bottom:10%;right:-1%;width:77%;transform:scale(var(--camera-scale,1.64));transform-origin:69.7% 61.5%;will-change:transform,opacity}
.outbound-map svg{width:100%;height:100%;overflow:visible}
.outbound-map-depth{fill:#0b2724;stroke:#a7925680;stroke-width:1.2;filter:drop-shadow(0 16px 12px #061e27aa)}
.outbound-province{fill:url(#provinceFill);stroke:#c6cc9d88;stroke-width:.65;stroke-linejoin:round;transition:fill .7s,stroke .3s;vector-effect:non-scaling-stroke}
.outbound-province.covered{cursor:pointer;fill:#668568}
.outbound-province.arrived{fill:url(#provinceArrived);stroke:#ffe8a7c9}
.outbound-province.selected,.outbound-province.covered:hover,.outbound-province.covered:focus-visible{fill:#ffe4a0;stroke:#fff5d2;stroke-width:1.8;outline:none}
.outbound-route,.outbound-route-glow{fill:none;stroke:#ffe4a0;stroke-width:1.9;stroke-dasharray:1;stroke-dashoffset:1;opacity:0;stroke-linecap:round;pointer-events:none}
.outbound-route-glow{stroke:#efb855;stroke-width:7;filter:url(#outboundGlow)}
.outbound-route.selected{stroke:#fff8df;stroke-width:3}
.outbound-destination{opacity:0;transition:opacity .4s;pointer-events:none}
.outbound-destination.arrived{opacity:1}
.outbound-destination circle{fill:#fff3c1;stroke:#fff9df;stroke-width:1}
.outbound-destination .destination-halo{fill:#ffe28e33;stroke:#ffe9a144;stroke-width:1}
.outbound-destination .arrival-ring{fill:none;stroke:#fff1ad;stroke-width:1.4;opacity:0;transform-box:fill-box;transform-origin:center}
.outbound-destination.arrived .arrival-ring{animation:outbound-arrive 1.8s ease-out}
.outbound-destination text{font:600 15px 'PingFang SC',sans-serif;fill:#fff3d1;paint-order:stroke;stroke:#284a37;stroke-width:4;stroke-linejoin:round}
.outbound-origin{pointer-events:none}
.outbound-origin circle{fill:#fff1a9;stroke:#fff8d9;stroke-width:2}
.outbound-origin .origin-halo{fill:#e5bd5b66;stroke:#ffe7a5;stroke-width:1}
.outbound-origin .origin-wave{fill:none;stroke:#ffe7a5;stroke-width:1;transform-box:view-box;transform-origin:0 0;animation:outbound-origin-wave 3s ease-out infinite}
.outbound-origin .origin-wave-two{animation-delay:1.5s}
.outbound-origin path{fill:none;stroke:#e3cc88;stroke-width:1}
.outbound-origin text{font:600 14px 'PingFang SC',sans-serif;fill:#ffecb6;paint-order:stroke;stroke:#143f33;stroke-width:4;stroke-linejoin:round}
.outbound-inset{fill:#173b3320;stroke:#c8d0a777;stroke-width:.8;pointer-events:none}
.outbound-inset-label{font:12px 'Songti SC',serif;fill:#d6d8b0}
.outbound-atmosphere{position:absolute;inset:0;pointer-events:none;z-index:2;overflow:hidden}
.outbound-atmosphere i{position:absolute;left:var(--x);top:var(--y);width:var(--size);height:calc(var(--size)*.5);border-radius:80% 20%;background:#ffe2a4;box-shadow:0 0 10px #f4c77066;opacity:0;animation:outbound-grain var(--duration) ease-in-out var(--delay) infinite}
.outbound-departure{position:absolute;bottom:15%;left:0;width:100%;height:25%;z-index:4;pointer-events:none;will-change:transform,opacity}
.outbound-departure img{position:absolute;left:18%;bottom:15px;width:clamp(150px,22vw,360px);filter:drop-shadow(0 13px 12px #071f22aa)}

.outbound-road{position:absolute;bottom:18px;left:0;width:65%;height:2px;background:linear-gradient(90deg,transparent,#dec48088,transparent);box-shadow:0 8px 26px 10px #dac38218}

.outbound-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.outbound-active .travel-hint,.outbound-active #seedGuide,.outbound-active #stagePrompt{visibility:hidden}
/* Pause the story without freezing the navigation's reveal and menu fade-in. */
#outboundDialog:not([open]) *,
#outboundDialog .is-paused > :not(.outbound-navigation),
#outboundDialog .is-paused > :not(.outbound-navigation) *,
#outboundDialog .is-background *{animation-play-state:paused!important}
@keyframes outbound-enter{from{opacity:0}to{opacity:1}}
@keyframes outbound-origin-wave{0%{transform:scale(.8);opacity:.8}100%{transform:scale(4);opacity:0}}
@keyframes outbound-arrive{0%{opacity:1;transform:scale(.25)}100%{opacity:0;transform:scale(2.5)}}
@keyframes outbound-grain{0%,100%{opacity:0;transform:translate3d(-15px,28px,0) rotate(-30deg)}30%,65%{opacity:.5}90%{transform:translate3d(35px,-35px,0) rotate(40deg)}}
@media(max-height:540px){.outbound-controls button{width:32px;height:32px;font-size:20px}.outbound-map{top:9%;bottom:6%;right:-2%;width:76%}.outbound-departure{bottom:9%}.outbound-departure img{width:22vw}}
@media(orientation:portrait) and (max-width:760px){#outboundDialog{inset:auto;left:50vw;top:50dvh;width:100dvh;height:100vw;max-height:none;transform:translate(-50%,-50%) rotate(90deg)}.outbound-controls button{width:32px;height:32px;font-size:20px}.outbound-departure{bottom:9%}.outbound-map{top:9%;bottom:6%;width:76%;right:-2%}.outbound-departure img{width:35vw}}
@media(prefers-reduced-motion:reduce){#outboundDialog *,#outboundDialog *:before,#outboundDialog *:after{animation:none!important;transition:none!important}.outbound-departure,.outbound-atmosphere{display:none}.outbound-map{will-change:auto}}

@media(max-height:540px), (orientation:portrait) and (max-width:760px){.outbound-destination text{font-size:23px;stroke-width:5px}.outbound-origin text{font-size:18px}.outbound-inset-label{font-size:15px}}

.outbound-controls [data-sound-toggle]{width:auto;min-width:54px;padding:0 9px;font-size:11px}

/* Keep both complete source canvases at the same scale, including their padding. */
.outbound-finale{position:absolute;inset:0;z-index:4;display:grid;place-items:center;overflow:hidden;opacity:0;pointer-events:none;container-type:size}
.outbound-finale-background{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center}
.outbound-quote-group{position:relative;display:flex;flex-direction:column;align-items:center;gap:clamp(12px,3cqh,30px);width:min(88%,1180px);transform:translateY(3cqh);filter:drop-shadow(0 2px 6px #163c3540)}
.outbound-quote{position:relative;flex:none;width:100%;opacity:0;will-change:opacity,transform}
.outbound-quote img{width:100%;height:auto;display:block}
.outbound-summary{position:absolute;inset:0;display:grid;place-items:center;opacity:0;pointer-events:none}
.outbound-summary img{display:block;width:min(92%,1400px);height:auto;max-height:78%;object-fit:contain;filter:drop-shadow(0 2px 6px #163c3566)}
.closing-active .outbound-atmosphere{visibility:hidden}
.closing-active .outbound-controls button{background:#173d328c;border-color:#fff5d999;color:#fff9e8}
.outbound-end-cover{position:absolute;inset:0;z-index:6;overflow:hidden;background:#f5f5f5;opacity:0;pointer-events:none}
.outbound-end-cover img{display:block;width:100%;height:100%;object-fit:cover;object-position:center}
@media(prefers-reduced-motion:reduce){.outbound-quote{will-change:auto}}
