/* A single uploaded original owns both pages' scenery. No generated
   extension, duplicate image, edge mask, image card or section backdrop.
   Fixed positioning preserves forest at the viewport edges during scrolling
   without stretching a character over the height of a long document. */
html:root body.nw-nightbook[data-locale="zh-tw"]{
 --text:#e8e3d8!important;--text-muted:#c1cdd0!important;
 --accent:#cebc95!important;--accent-soft:#cbd7d6!important;
 --bg:#08131d!important;--bg-elevated:#142630!important;
 --book-grade:saturate(.78) brightness(.93);
 --book-wash:rgba(6,17,28,.70);
 position:relative;isolation:isolate;min-height:100svh;width:100%;max-width:none;
 margin:0;overflow-x:clip;background:#08131d!important;background-image:none!important;
 color:var(--text);height:auto;
}
html:root[data-theme="dim"] body.nw-nightbook[data-locale="zh-tw"]{
 --text:#d5d4ca!important;--text-muted:#b7c5c9!important;
 --accent:#bdad8c!important;--accent-soft:#bfcfce!important;
 --book-grade:saturate(.72) brightness(.80);--book-wash:rgba(7,18,28,.72);
}
html:root[data-theme="dawn"] body.nw-nightbook[data-locale="zh-tw"]{
 /* Keep this night scene continuous instead of surrounding it with a pale
    page. Dawn changes its light level and controls, without a second image. */
 --text:#f0eadd!important;--text-muted:#d1dbdc!important;
 --accent:#dbcaab!important;--accent-soft:#dce4df!important;
 --book-grade:saturate(.81) brightness(1.04);--book-wash:rgba(13,29,39,.72);
}
html:root body.nw-nightbook::before,html:root body.nw-nightbook::after{content:none!important;display:none!important}
html:root body.nw-nightbook>.nightbook-scene{
 position:fixed!important;inset:0!important;z-index:-1!important;
 width:100%!important;height:100%!important;min-height:100svh;
 margin:0!important;padding:0!important;max-width:none!important;
 overflow:hidden;pointer-events:none;isolation:isolate;
 background:none!important;border:0!important;border-radius:0!important;
 box-shadow:none!important;mask:none!important;-webkit-mask:none!important;
 transform:none!important;filter:none!important;
}
html:root body.nw-nightbook>.nightbook-scene>img{
 position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
 max-width:none!important;min-height:0!important;display:block!important;
 object-fit:cover!important;object-position:82% 72%!important;
 aspect-ratio:auto!important;margin:0!important;padding:0!important;
 opacity:1!important;filter:var(--book-grade)!important;
 border:0!important;border-radius:0!important;box-shadow:none!important;
 mask:none!important;-webkit-mask:none!important;clip-path:none!important;
 transform:none!important;mix-blend-mode:normal!important;
}
/* Reading light is independent of image boundaries. It never fades the
   image itself or places an opaque panel behind the text. */
html:root body.nw-nightbook>.nightbook-scene::after{
 content:"";position:absolute;inset:0;pointer-events:none;
 background:linear-gradient(90deg,var(--book-wash),rgba(7,19,29,.32) 43%,transparent 74%);
}
html:root body.nw-nightbook :is(main,.header,.footer,.home-opening,.nw-chat-opening,.section,.closing,.nw-start-followup,.nw-start-followup>section,.nw-ambient){
 background:transparent!important;background-image:none!important;border:0!important;
 box-shadow:none!important;backdrop-filter:none!important;
}
html:root body.nw-nightbook :is(main,.home-opening,.home-copy,.nw-chat-opening,.nw-chat-content,.section,.closing,.footer,.nw-start-followup,.nw-start-followup>section,.nw-ambient)::before,
html:root body.nw-nightbook :is(main,.home-opening,.home-copy,.nw-chat-opening,.nw-chat-content,.section,.closing,.footer,.nw-start-followup,.nw-start-followup>section,.nw-ambient)::after{content:none!important;display:none!important}
html:root body.nw-nightbook>main{position:relative;max-width:none!important;width:100%;padding:0;margin:0;isolation:auto!important;overflow:visible!important;filter:none!important;transform:none!important}
html:root body.nw-nightbook .header{max-width:none;width:100%;position:relative;z-index:20;padding-inline:clamp(16px,4vw,64px);flex-wrap:wrap}
html:root body.nw-nightbook .header nav{flex-wrap:wrap}
html:root body.nw-nightbook :is(.home-opening,.nw-chat-opening){
 display:block!important;position:relative;max-width:none!important;width:100%;margin:0;
 height:auto!important;min-height:calc(100svh - 100px);aspect-ratio:auto!important;
 padding:clamp(36px,7vh,90px) clamp(24px,5vw,80px) 72px;overflow:visible!important;
}
html:root body.nw-nightbook :is(.home-copy,.nw-chat-content){
 position:relative!important;inset:auto!important;z-index:1;width:min(42%,520px)!important;
 max-width:520px!important;min-width:0;margin:0!important;padding:0!important;
 background:none!important;box-shadow:none!important;border:0!important;
 color:var(--text)!important;filter:none!important;transform:none!important;
}
html:root body.nw-nightbook :is(.home-copy,.nw-chat-content) h1{font-size:clamp(2.8rem,4.2vw,4.5rem);line-height:1.35;letter-spacing:0}
html:root body.nw-nightbook :is(h1,h2,h3,.brand){color:var(--text)!important;text-shadow:none!important}
html:root body.nw-nightbook :is(p,.definition,.muted,.tiny,.brand small){color:var(--text-muted)!important}
html:root body.nw-nightbook .eyebrow{color:var(--accent)!important}
html:root body.nw-nightbook .text-link{color:var(--accent-soft)!important}
html:root body.nw-nightbook .definition{margin-left:0;font-size:1rem}
html:root body.nw-nightbook .button.primary{background:var(--accent)!important;border-color:var(--accent)!important;color:#1a2d32!important;border-radius:999px;box-shadow:none!important;text-shadow:none!important}
html:root body.nw-nightbook .theme{color:var(--text);background:rgba(10,25,35,.38);box-shadow:none}
html:root body.nw-nightbook :is(a,button,summary,select):focus-visible{outline:2px solid var(--accent);outline-offset:5px}
html:root body.nw-nightbook :is(.features>div,.story-panel,.story-body,.home-story-links a,.nw-channel-placeholder,.footer-bottom){background:transparent!important;background-image:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;backdrop-filter:none!important}
html:root body.nw-nightbook .section{max-width:1150px}
html:root body.nw-nightbook .closing{text-align:left;padding:64px clamp(24px,5vw,80px);max-width:none}
html:root body.nw-nightbook .closing>.woven-copy{max-width:620px}
html:root body.nw-nightbook .closing h2{margin:0 0 28px}
html:root body.nw-nightbook .home-start-note{margin:24px 0}
html:root body.nw-nightbook .nw-start-followup{max-width:1150px;width:100%;margin:0 auto;padding:0 40px 36px}
html:root body.nw-nightbook .nw-start-followup>section{max-width:650px;margin:0;padding:36px 0}
.nw-nightbook .nw-chat-content nav{margin-bottom:28px}
.nw-nightbook .nw-chat-entry{margin:30px 0 18px}
.nw-nightbook .nw-chat-entry .tiny{margin:12px 0 0}
.nw-nightbook [hidden]{display:none!important}
html:root body.nw-nightbook .sticky-cta{background:transparent!important;border:0!important;box-shadow:none!important}
@media(max-width:1000px) and (min-width:701px){html:root body.nw-nightbook :is(.home-copy,.nw-chat-content){width:48%!important}}
@media(max-width:700px){
 html:root body.nw-nightbook .header{padding:18px 16px}
 html:root body.nw-nightbook :is(.home-opening,.nw-chat-opening){padding:28px 16px max(280px,36svh);min-height:calc(100svh - 130px)}
 html:root body.nw-nightbook :is(.home-copy,.nw-chat-content){width:100%!important;max-width:580px!important;margin-inline:auto!important}
 html:root body.nw-nightbook :is(.home-copy,.nw-chat-content) h1{font-size:clamp(2.5rem,9vw,3.7rem)}
 /* Retain the original scale: crop to the right-hand reading group instead
    of stretching the uploaded landscape into a portrait. */
 html:root body.nw-nightbook>.nightbook-scene>img{object-position:86% bottom!important}
 html:root body.nw-nightbook>.nightbook-scene::after{background:linear-gradient(180deg,var(--book-wash),rgba(7,19,29,.42) 48%,transparent 75%)}
 html:root body.nw-nightbook .nw-start-followup{padding-inline:16px}
 html:root body.nw-nightbook .closing{padding:48px 16px}
 html:root body.nw-nightbook .footer{padding-bottom:110px}
 .nw-nightbook .nw-chat-entry .button{width:100%;white-space:normal}
}
@media(prefers-reduced-motion:reduce){.nw-nightbook .nightbook-scene,.nw-nightbook .nightbook-scene img{animation:none!important;transition:none!important}}
