/* Deep navy first. Every opening reveal is controlled only by scroll position. */
.blue-flight.with-journey .flight-scroll{height:1100svh;background:#080f22}
.blue-flight .flight-stage{background:var(--night-sky,#080f22)}
.blue-flight.with-journey .rotating-sky{filter:grayscale(1) brightness(.8) contrast(5);mix-blend-mode:screen;opacity:var(--night-chart-opacity,0)}
.blue-flight.with-journey .constellation,.blue-flight.with-journey .milky-light{opacity:var(--night-chart-opacity,0)}
.blue-flight.with-journey .milky-light i,.blue-flight.with-journey .star-points circle{animation:none}
.blue-flight.with-journey .plane-dust{display:none}
.blue-flight.with-journey .flight-heading{display:block;position:absolute;top:48%;left:50%;transform:translate(-50%,-50%);width:max-content;max-width:85%;text-align:center;pointer-events:none;z-index:2;opacity:var(--title-reveal,0)}
.blue-flight.with-journey .flight-heading h1 img{-webkit-mask-image:linear-gradient(to right,transparent calc(var(--title-wipe,0%) - 4%),#000 var(--title-wipe,0%));mask-image:linear-gradient(to right,transparent calc(var(--title-wipe,0%) - 4%),#000 var(--title-wipe,0%))}
.blue-flight .flight-heading h1 img{margin:auto;filter:invert(1) drop-shadow(0 0 12px #ffffff70) drop-shadow(0 0 30px #d6e8ff30)}
.flight-title-subtitle{max-width:580px;margin:25px auto 0;text-wrap:balance;color:#fff5d9;font:italic clamp(15px,1.6vw,21px)/1.5 Georgia,serif;letter-spacing:.075em;text-shadow:0 0 7px #fff3cfaa,0 0 19px #ffe8a67a,0 0 36px #ffd8883b;opacity:var(--subtitle-reveal,0);transform:translateY(calc((1 - var(--subtitle-reveal,0))*6px))}
.blue-flight.with-journey .flight-overlay{z-index:3;pointer-events:none}
.blue-flight.with-journey #flying-plane{opacity:0;transform-origin:0 0;transform-box:view-box}
.title-flight-wake{pointer-events:none}
.title-wake-cloud{fill:#f5f6ff;filter:blur(4px)}
.title-wake-star{fill:#fff7da;filter:drop-shadow(0 0 3px #fff8dfaa)}
/* Preserve the complete original painting; supplemental art fills desktop spare space. */
.night-title-art{position:absolute;inset:0;z-index:1;pointer-events:none;opacity:var(--title-art-opacity,0);background:#080f22}
.night-title-art .night-original-painting{display:block;width:100%;height:100%;object-fit:contain;object-position:center}
.night-title-painting{position:absolute;inset:0}.night-art-seam{display:none}
.night-title-art:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,#07172c33,#07172c3d 55%,#07172c05)}
/* Retain the old hook for the chart script, but remove the duplicate opening line. */
.blue-flight.with-journey #flight-quote-start{display:none}
/* The complete passage gets its own centered beat after the aircraft, before mouse. */
.blue-flight.with-journey .flight-quotation{left:50%;top:50%;transform:translate(-50%,-50%);width:min(620px,80vw);text-align:center;z-index:3;font:italic clamp(18px,2vw,27px)/1.7 Georgia,serif;opacity:var(--passage-stage-opacity,0);text-shadow:0 1px 8px #08152d,0 0 28px #08152dbb}
.blue-flight.with-journey .flight-quotation p{position:relative;inset:auto;margin:0;text-wrap:balance}
.blue-flight.with-journey #flight-quote-middle{opacity:var(--passage-opacity,0)!important}
/* The same quiet arrival for every character's words. */
.night-encounter .character-note,.night-ending>div{opacity:var(--dialogue-arrival,0);transform:translateY(calc((1 - var(--dialogue-arrival,0))*18px));will-change:opacity,transform}
.blue-flight .flight-controls{left:5%;right:5%;bottom:22px;align-items:center}
.blue-flight #flight-skip{margin-left:auto;min-width:48px;min-height:44px;display:inline-flex;align-items:center;justify-content:flex-end;pointer-events:auto}
.night-encounter .journey-star-art{animation:night-star-glow 6s ease-in-out infinite}
.night-encounter:has(.journey-star-art) h2{text-shadow:0 0 12px #fff2bd55,0 0 28px #ffe8a52b}
.night-ending h2{text-shadow:0 0 10px #fff1b366,0 0 25px #ffe5a13b;animation:night-ending-glow 6s ease-in-out infinite}
@keyframes night-star-glow{0%,100%{filter:drop-shadow(0 0 8px #fff2b755)}50%{filter:drop-shadow(0 0 17px #fff2b7aa)}}
@keyframes night-ending-glow{0%,100%{text-shadow:0 0 10px #fff1b355,0 0 25px #ffe5a125}50%{text-shadow:0 0 14px #fff1b388,0 0 32px #ffe5a14a}}
/* Keep each encounter one viewport wide even when its illustration is wider. */
.night-encounter{min-width:0}
/* The standalone Alps image is removed; the larger original swan/constellation
   remains wholly visible. The mountains inside the opening painting are intact. */
.blue-flight.with-journey .night-encounter.night-ending{padding:14svh 6vw 6svh}
.blue-flight.with-journey .night-ending .ending-sky-scene{display:flex;align-items:center;justify-content:center;width:min(840px,86vw);max-width:100%;height:min(44svh,440px);margin:25px auto 0}
.blue-flight.with-journey .night-encounter.night-ending .ending-cygnus{position:relative;left:auto;bottom:auto;transform:none;width:min(760px,86vw);max-width:100%;max-height:100%;height:auto;object-fit:contain;opacity:.78}
@media(max-width:700px){
  .blue-flight.with-journey .flight-scroll{height:1000svh}
  .blue-flight.with-journey .flight-heading{top:49%}
  .flight-title-subtitle{margin-top:21px}
  .blue-flight.with-journey .flight-quotation{width:82vw;font-size:clamp(18px,4.8vw,23px);line-height:1.65}
  .blue-flight.with-journey .night-ending .ending-sky-scene{height:38svh;margin-top:20px}
}
@media(prefers-reduced-motion:reduce){
  .blue-flight.with-journey .flight-scroll{height:auto}
  .blue-flight.with-journey .flight-stage{background:#080f22}
  .blue-flight.with-journey .flight-heading{display:flex;flex-direction:column;justify-content:center;position:relative;top:auto;left:auto;transform:none;width:100%;max-width:none;min-height:70svh;padding:110px 20px 80px;box-sizing:border-box;opacity:1}
  .blue-flight.with-journey .flight-heading h1 img{-webkit-mask-image:none;mask-image:none}
  .flight-title-subtitle{opacity:1;transform:none;animation:none}
  .night-title-art{position:relative;inset:auto;height:auto;opacity:1}
  .night-title-art img{height:auto;object-fit:contain}
  .title-flight-wake{display:none}
  .blue-flight.with-journey .flight-quotation{display:flex;align-items:center;justify-content:center;position:relative;left:auto;top:auto;transform:none;width:100%;min-height:65svh;padding:60px 10vw;box-sizing:border-box;opacity:1;background:linear-gradient(#080f2280,#080f2280),url('/shop/book-worlds/assets/night-flight-blue-chart.webp') center/cover no-repeat}
  .night-encounter .character-note,.night-ending>div{opacity:1;transform:none;will-change:auto}
  .night-encounter .journey-star-art,.night-ending h2{animation:none}
  .night-encounter .journey-star-art{filter:drop-shadow(0 0 10px #fff2b766)}
}

/* Native scrolling leaves the sticky story and reaches this ordinary book link. */
.night-book-next{position:relative;min-height:22svh;display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:45px 6vw 65px;background:#648cd0;text-align:center}
.night-book-next a{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:10px 27px;box-sizing:border-box;border:1px solid #ffffffa6;border-radius:28px;color:#fff9e9;font:14px/1.5 Georgia,serif;text-decoration:none}
.night-book-next a:hover{background:#ffffff14}
.night-book-next a:focus-visible{outline:2px solid #fff;outline-offset:5px}
/* A quiet right-side credit block, with left-aligned readable attribution. */
.blue-flight .night-audio-credits{text-align:left;padding:12px 6% 24px}
.blue-flight .night-audio-credits .night-credit-block{width:min(420px,100%);max-width:100%;margin:0 0 0 auto;padding:0;text-align:left}
.blue-flight .night-audio-credits p{color:#c9c4bb;text-align:left}
.blue-flight .night-audio-credits .night-credit-label{margin:0 0 6px;color:#cbc4b7;opacity:.65}

/* Landscape opening: a sharp painted extension fills the viewport. The exact
   original stays on top, proportional and fully within the frame throughout
   the measured 86% -> 100% scroll-led zoom. Only supplemental artwork is cropped. */
@media(prefers-reduced-motion:no-preference){
  .night-title-art{overflow:hidden;background:#234d75}
  .night-title-art:before{content:"";position:absolute;inset:0;z-index:0;background-image:url('/shop/book-worlds/assets/night-flight-panorama-extension.png');background-position:center;background-size:cover;pointer-events:none}
  .night-title-painting{position:absolute;inset:auto;left:50%;top:50%;width:min(100%,calc(100svh * 1365 / 2047));height:auto;aspect-ratio:1365/2047;z-index:1;transform:translate(-50%,-50%) scale(var(--title-art-zoom,.86));transform-origin:center;will-change:transform}
  /* Two CSS pixels of hidden overlap prevent fractional-pixel raster seams at every zoom/DPR. The untouched original stays above all reflection strips. */
  .night-title-art .night-original-painting{position:relative;z-index:2}
  .night-art-seam{display:block;position:absolute;pointer-events:none;overflow:hidden;z-index:1}
  .night-art-seam img{position:absolute;display:block;max-width:none;object-fit:fill}
  .seam-left,.seam-right{width:24%;height:100%;top:0}
  .seam-left{right:calc(100% - 2px);mask-image:linear-gradient(to left,#000,transparent)}
  .seam-right{left:calc(100% - 2px);mask-image:linear-gradient(to right,#000,transparent)}
  .seam-left img,.seam-right img{width:416.666667%;height:100%;top:0;transform:scaleX(-1)}
  .seam-left img{right:0}.seam-right img{left:0}
  .seam-top,.seam-bottom{width:100%;height:12%;left:0}
  .seam-top{bottom:calc(100% - 2px);mask-image:linear-gradient(to top,#000,transparent)}
  .seam-bottom{top:calc(100% - 2px);mask-image:linear-gradient(to bottom,#000,transparent)}
  .seam-top img,.seam-bottom img{width:100%;height:833.333333%;left:0;transform:scaleY(-1)}
  .seam-top img{bottom:0}.seam-bottom img{top:0}
  .seam-corner{width:24%;height:12%;mask-composite:intersect}
  .seam-corner img{width:416.666667%;height:833.333333%;transform:scale(-1,-1)}
  .seam-top-left{right:calc(100% - 2px);bottom:calc(100% - 2px);mask-image:linear-gradient(to left,#000,transparent),linear-gradient(to top,#000,transparent)}
  .seam-top-right{left:calc(100% - 2px);bottom:calc(100% - 2px);mask-image:linear-gradient(to right,#000,transparent),linear-gradient(to top,#000,transparent)}
  .seam-bottom-left{right:calc(100% - 2px);top:calc(100% - 2px);mask-image:linear-gradient(to left,#000,transparent),linear-gradient(to bottom,#000,transparent)}
  .seam-bottom-right{left:calc(100% - 2px);top:calc(100% - 2px);mask-image:linear-gradient(to right,#000,transparent),linear-gradient(to bottom,#000,transparent)}
  .seam-top-left img{right:0;bottom:0}.seam-top-right img{left:0;bottom:0}.seam-bottom-left img{right:0;top:0}.seam-bottom-right img{left:0;top:0}
  .night-title-art:after{z-index:2}
}
@media(prefers-reduced-motion:reduce){.night-title-painting{position:relative;inset:auto;width:100%;height:auto;transform:none!important;will-change:auto}.night-art-seam,.night-title-art:before{display:none}.night-title-art .night-original-painting{height:auto}}

/* Let the passage form from quiet points of light before the chart appears. */
.blue-flight.with-journey .flight-quotation{color:#fff5df;text-shadow:0 0 8px #fff1c94d,0 0 24px #ffe8b52b}
.blue-flight.with-journey #flight-quote-middle{filter:blur(calc((1 - var(--passage-gather,0))*4px))}
.passage-stardust{position:absolute;left:var(--dust-left);top:var(--dust-top);width:var(--dust-point);height:var(--dust-point);border-radius:50%;background:#fff5d7;box-shadow:0 0 5px #fff,0 0 13px #ffffffb3,0 0 24px #ffffff55;opacity:var(--passage-dust-opacity,0);transform:translate(calc((1 - var(--passage-gather,0))*var(--dust-start-x)),calc((1 - var(--passage-gather,0))*var(--dust-start-y)));pointer-events:none}
@media(prefers-reduced-motion:reduce){
  .blue-flight.with-journey .flight-quotation{background:#6d9fe7}
  .blue-flight.with-journey #flight-quote-middle{filter:none}
  .passage-stardust{display:none}
}

/* A quiet empty sky, then gathering stars, title, complete subtitle and painting. */
/* Mask only the letters. Apply the halo outside that mask so its vertical blur is never box-clipped. */
.blue-flight.with-journey .flight-heading h1{position:relative;overflow:visible;filter:drop-shadow(0 0 12px #ffffff70) drop-shadow(0 0 30px #d6e8ff30)}
.blue-flight .flight-heading h1 img{opacity:var(--title-form,0);filter:invert(1) blur(calc((1 - var(--title-form,0))*3px))}
.opening-title-dust{position:absolute;left:var(--dust-left);top:var(--dust-top);width:var(--dust-point);height:var(--dust-point);border-radius:50%;background:#fff;box-shadow:0 0 6px #fff9,0 0 14px #dceeff88;opacity:var(--title-dust-opacity,0);transform:translate(calc((1 - var(--title-gather,0))*var(--dust-start-x)),calc((1 - var(--title-gather,0))*var(--dust-start-y)));pointer-events:none}
.blue-flight.with-journey .flight-controls{height:44px;bottom:max(20px,env(safe-area-inset-bottom));align-items:center}
.blue-flight.with-journey #flight-cue{position:absolute;left:50%;bottom:auto;top:50%;transform:translate(-50%,-50%);margin:0;line-height:1.4}
.blue-flight.with-journey #flight-skip{position:absolute;right:0;top:50%;transform:translateY(-50%);margin:0;line-height:1.4}
@media(max-width:700px){.flight-title-subtitle{max-width:82vw;font-size:15px;line-height:1.55;letter-spacing:.035em}.night-title-painting{transform:translate(-50%,-50%)}.blue-flight.with-journey #flight-cue{left:0;transform:translateY(-50%);max-width:65vw}.night-art-seam.seam-left,.night-art-seam.seam-right{display:none}}
@media(prefers-reduced-motion:reduce){.opening-title-dust{display:none}.blue-flight .flight-heading h1 img{opacity:1;filter:invert(1)}}

/* Keep the original red aircraft; a restrained white edge makes it legible. */
.blue-flight.with-journey #flying-plane,.blue-flight.with-journey .night-journey-plane{filter:hue-rotate(-18deg) saturate(1.8) drop-shadow(0 0 .7px #fff) drop-shadow(0 0 5px #ffffff99) drop-shadow(0 0 12px #ffffff33)}
.blue-flight.with-journey .flight-quotation{color:#fff;text-shadow:0 1px 2px #254b81,0 0 3px #315789,0 0 12px #ffffff44}
/* Faded navigation must not intercept the final scene's credits. */
.blue-flight.with-journey .flight-controls{pointer-events:none}

/* Suppress only the scan's one-pixel pale side border, without altering the source or any illustrated content. Reflected strips overlap beneath it. */
@media(prefers-reduced-motion:no-preference){.night-title-art .night-original-painting,.night-art-seam img{clip-path:inset(calc(100% / 2047) calc(100% / 1365))}}
.blue-flight.with-journey .night-encounter h2{color:#fff}

@media(prefers-reduced-motion:reduce){.blue-flight.with-journey #flight-quote-middle{opacity:1!important}}

/* Quiet, unshadowed passage; gathering stardust remains a separate layer. */
.blue-flight.with-journey .flight-quotation,.blue-flight.with-journey #flight-quote-middle{text-shadow:none}
