@font-face{font-family:"BookInk";font-style:normal;font-weight:400;font-display:swap;src:url(../fonts/book-ink.woff2) format("woff2")}
@font-face{font-family:"WenKai";font-weight:400;font-style:normal;font-display:swap;src:url(../fonts/wen-kai.woff2) format("woff2")}
@font-face{font-family:"Brush";font-weight:400;font-style:normal;font-display:swap;src:url(../fonts/brush.woff2) format("woff2")}
:root{color-scheme:dark;--cream:#fff3d9;--quiet:#d6d7c6;--gold:#dfbd77;--navy:#132626;--line:#fff3d92c;font-family:'WenKai',serif;background:var(--navy);color:var(--cream)}
*{box-sizing:border-box}.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap;border:0}body{margin:0;overflow:hidden}button,input,select{font:inherit}button{color:inherit;background:none;border:0;cursor:pointer}button:disabled{opacity:.35;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid var(--gold);outline-offset:5px}button:disabled{pointer-events:none}[hidden]{display:none!important}a{color:inherit;text-decoration:none}
#scenery{position:fixed;inset:0;overflow:hidden;background:#152b30}.scene-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:60% center;opacity:0;transition:opacity 1.5s ease;animation:sceneBreath 32s ease-in-out infinite alternate}.scene-image.active{opacity:1}.scene-shade{position:absolute;inset:0;background:linear-gradient(90deg,rgba(13,30,35,.87),rgba(13,30,35,.62) 31%,rgba(13,30,35,.06) 67%),linear-gradient(0deg,rgba(10,27,30,.7),transparent 24%,transparent 79%,rgba(10,27,30,.28));transition:background 1s}.atmosphere{position:absolute;inset:0;background:radial-gradient(ellipse at 75% 20%,#ffce7612,transparent 60%);mix-blend-mode:screen;animation:lightBreath 9s ease-in-out infinite alternate}.grain{position:absolute;inset:0;opacity:.045;pointer-events:none;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' filter='url(%23n)' d='M0 0h180v180H0z'/%3E%3C/svg%3E")}
@keyframes sceneBreath{from{transform:scale(1.015) translateX(.2%)}to{transform:scale(1.055) translateX(-.6%)}}@keyframes lightBreath{to{opacity:.35}}.motes{position:absolute;inset:0;pointer-events:none}.motes i{position:absolute;left:65%;top:63%;width:3px;height:3px;border-radius:50%;background:#f5d9a4;opacity:0;animation:float 14s linear infinite}.motes i:nth-child(2){left:74%;top:42%;animation-delay:-4s}.motes i:nth-child(3){left:88%;top:80%;animation-delay:-7s}.motes i:nth-child(4){left:53%;top:32%;animation-delay:-11s}.motes i:nth-child(5){left:40%;top:76%;animation-delay:-2s}@keyframes float{10%{opacity:.4}80%{opacity:0}to{transform:translate(-60px,-110px)}}
header{position:fixed;left:5vw;right:5vw;top:max(30px,env(safe-area-inset-top));display:flex;justify-content:space-between;align-items:center;z-index:15}.wordmark{display:flex;align-items:center;gap:20px;font-size:19px;letter-spacing:.2em}.wordmark span{font:10px/1.5 Arial,sans-serif;letter-spacing:.22em;opacity:.63;border-left:1px solid #fff3d94d;padding-left:20px}.header-actions{display:flex;gap:25px}.header-actions button{font-size:12px;letter-spacing:.1em;opacity:.8;padding:8px 0}.screen{position:fixed;inset:0}.eyebrow{font-size:12px;letter-spacing:.24em;color:var(--gold);margin:0 0 24px}.cover-copy{position:absolute;top:22%;left:11vw}.cover-copy h1{font-weight:400;font-size:clamp(62px,7vw,112px);line-height:1.2;letter-spacing:.09em;margin:0 0 25px}.cover-description{font-size:16px;line-height:2.2;letter-spacing:.12em;color:#fff3d9dc}.primary{display:inline-flex;justify-content:space-between;align-items:center;gap:50px;min-width:220px;border-bottom:1px solid var(--gold);padding:17px 0;color:var(--gold);letter-spacing:.12em;font-size:14px;margin-top:18px}.primary span{font-family:Arial,sans-serif;font-size:19px;transition:transform .3s}.primary:hover span{transform:translateX(6px)}.cover-bottom{position:absolute;left:5vw;right:5vw;bottom:30px;display:flex;justify-content:space-between;color:#fff3d9ad;font-size:11px;letter-spacing:.18em;align-items:center}.cover-bottom p{margin:0}.side-label{position:absolute;right:4vw;top:40%;writing-mode:vertical-rl;font:10px Arial,sans-serif;letter-spacing:.3em;opacity:.55}
#birth{overflow-y:auto;display:grid;grid-template-columns:1fr 1fr;align-items:center;padding:115px 11vw 65px;gap:8vw;background:linear-gradient(90deg,#1326266b,#13262638)}.birth-copy h2{font-weight:400;font-size:clamp(38px,4.5vw,68px);letter-spacing:.1em;line-height:1.45;margin:0 0 24px}.birth-copy>p:not(.eyebrow){font-size:14px;color:var(--quiet);line-height:2.2}.birth-small{display:block;font-size:11px;color:#d6d7c6a6;line-height:2.1;margin-top:36px}.form-wrap{background:#142829eb;border:1px solid #fff3d918;border-radius:3px;padding:28px 32px;box-shadow:0 15px 80px #081b2440;max-width:440px;width:100%;justify-self:end;backdrop-filter:blur(16px)}.form-caption{font-size:12px;letter-spacing:.2em;margin:0 0 22px;color:var(--gold)}.field{margin-bottom:20px}.field-label{font-size:11px;letter-spacing:.1em;color:#d6d7c6c9;display:block;margin-bottom:7px}.row{display:flex;gap:18px;align-items:center}.row>label{flex:1;min-width:0}.segmented{display:flex;gap:25px}.segmented label{cursor:pointer;font-size:13px;padding:4px 0;color:#d6d7c6a3}.segmented input{position:absolute;opacity:0}.segmented label:has(:checked){color:var(--gold);border-bottom:1px solid var(--gold)}.segmented label:has(:focus-visible){outline:2px solid var(--gold)}select,input[type=text],input[type=number]{color:var(--cream);background:#142829;width:100%;border:0;border-bottom:1px solid var(--line);border-radius:0;padding:8px 0;font-size:16px}select{cursor:pointer}.advanced{font-size:12px;line-height:1.9;border-top:1px solid var(--line);padding-top:13px}.advanced summary{color:#d6d7c6ba;cursor:pointer}.advanced .field-label{margin-top:12px}.advanced input,.advanced select{font-size:12px}.advanced .row{margin:12px 0}input[type=checkbox]{accent-color:var(--gold)}.footnote{font-size:10px;color:#d6d7c69e;line-height:1.9;margin-bottom:0}#form-error{font-size:12px;color:#ffca94;line-height:1.8}#calculate{width:100%;font-size:13px;margin-top:5px}#calculate:disabled{cursor:wait}
#inscription{z-index:18;background:radial-gradient(ellipse at 50% 38%,#263331,#101c21 75%);display:grid;place-items:center;overflow-y:auto}.gold-texture{position:absolute;inset:0;opacity:.28;background:radial-gradient(ellipse at center,#d9ae5712,transparent 60%)}.inscription-inner{position:relative;text-align:center;padding:90px 25px 40px;max-width:900px;width:100%}.inscription-inner h2{font-weight:400;font-size:21px;letter-spacing:.18em;color:#e5d9ba;margin:0 0 35px}#gold-pillars{display:flex;justify-content:center;gap:36px}.gold-pillar{display:flex;flex-direction:column;align-items:center;gap:6px}.gold-pillar>span{color:#c8b98b;font-size:11px;letter-spacing:.3em;margin-bottom:15px}.glyph{filter:drop-shadow(0 0 9px #d9ad6540);width:84px;height:84px}.gold-char-fallback{font-size:65px;color:var(--gold)}#gold-terms{margin-top:30px;color:var(--gold);font-size:15px;letter-spacing:.16em;line-height:2.2;opacity:0;transition:opacity 1.2s}#gold-terms.visible{opacity:1}#gold-terms small{font-size:11px;color:#c8c4b0;display:block;letter-spacing:.1em;margin-top:6px}#gold-foot{font-size:11px;color:#b9bca8;letter-spacing:.15em;margin:23px 0 0}#gold-continue{min-width:220px;justify-content:center}.text-button{display:inline-block;font-size:12px;color:var(--gold);letter-spacing:.08em;padding:12px 0;border-bottom:1px solid #dfbd7745}#gold-skip{display:block;margin:15px auto 0;border:0;font-size:11px;color:#b9bca8}

.story-meta{position:absolute;left:7vw;right:7vw;top:110px;display:flex;justify-content:space-between;font-size:12px;letter-spacing:.16em;color:#fff3d9ba}.story-meta #story-age{font-size:13px;color:var(--gold)}.story-copy{position:absolute;left:11vw;top:24%;width:min(40vw,500px);max-height:62%;overflow-y:auto;padding:5px 15px 20px 0;scrollbar-width:thin;scrollbar-color:#dfbd7750 transparent;overscroll-behavior:contain}.story-copy:focus{outline:none}.story-copy h2{font-size:clamp(30px,3.6vw,56px);font-weight:400;line-height:1.5;letter-spacing:.08em;margin:0 0 25px;text-wrap:balance}.story-copy .eyebrow{font-size:11px;margin-bottom:19px}.story-copy p.narrative{font-size:14px;line-height:2.15;letter-spacing:.03em;color:#fff3d9e6;margin:0 0 14px}.story-copy p.narrative:first-child{font-size:16px;color:var(--cream)}.story-copy .evidence-link{font-size:11px;letter-spacing:.1em;color:#d5d6c3a3;margin-top:16px;border-bottom:1px solid #d5d6c335;padding:6px 0}.evidence-link:hover{color:var(--gold)}#choice{margin-top:22px}#choice p{font-size:12px;color:var(--gold);margin-bottom:12px}.choice-options{display:flex;gap:16px;flex-wrap:wrap}.choice-options button{font-size:12px;color:var(--cream);padding:9px 0;border-bottom:1px solid #fff3d94d}.choice-options button.selected{color:var(--gold);border-bottom-color:var(--gold)}#choice-echo{font-size:12px;line-height:2;color:var(--gold);border-left:1px solid var(--gold);padding-left:15px;margin:20px 0}#ending-actions{display:flex;gap:22px;flex-wrap:wrap}.story-footer{position:absolute;left:7vw;right:7vw;bottom:max(25px,env(safe-area-inset-bottom))}.timeline{position:relative;padding:0 0 13px;margin-bottom:20px}#timeline-buttons{display:flex;justify-content:space-between;gap:8px}#timeline-buttons button{font-size:10px;color:#d6d7c698;padding:5px 0;letter-spacing:.1em;transition:color .5s}#timeline-buttons button.current{color:var(--gold)}.timeline-track{position:absolute;bottom:0;left:0;right:0;height:1px;background:#fff3d92b}.timeline-track i{display:block;height:1px;background:var(--gold);transition:width 1s}.reader-controls{display:flex;align-items:center;gap:20px}#previous{font:24px Arial,sans-serif;padding:0 10px 0 0}#page-number{font:11px Georgia,serif;letter-spacing:.2em;color:#d6d7c6a3}#next{margin-left:auto;display:flex;align-items:center;gap:34px;color:var(--gold);font-size:12px;letter-spacing:.12em}#next span{font-size:23px;font-family:Arial,sans-serif}.copy-enter{animation:copyIn 1s ease both}@keyframes copyIn{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:translateY(0)}}.copy-out{opacity:0;transform:translateY(-12px);transition:opacity .35s,transform .35s}
dialog{position:fixed;max-width:780px;width:calc(100% - 40px);max-height:85dvh;background:#f4eedf;color:#273f3e;border:1px solid #a7b1a0;padding:35px 45px;box-shadow:0 30px 150px #041a2699;border-radius:3px;overflow-y:auto;scrollbar-width:thin}dialog::backdrop{background:#071a24b3;backdrop-filter:blur(10px)}dialog h2{font-size:30px;letter-spacing:.1em;font-weight:400;margin:0 0 20px}dialog .eyebrow{color:#687965;margin:0;font-size:11px}.dialog-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.close{font-size:25px;color:#5f746e;padding:0 4px}.basis-heading{font-size:13px;color:#6d795d}.basis-row{font-size:13px;line-height:2.1}.basis-evidence{font-size:12px;line-height:1.9;color:#627265}.basis-evidence li{margin-bottom:4px}.disclosure{font-size:11px;line-height:2;color:#718072;margin-top:30px;border-top:1px solid #9fa68f55;padding-top:16px}#full-report{margin-top:25px;border-top:1px solid #9fa68f55;padding-top:18px}#full-report>summary{cursor:pointer;font-size:13px}.report-section{margin-top:26px}.report-section h3{font-size:18px;font-weight:400}.report-item{padding-bottom:15px;border-bottom:1px solid #9fa68f44;margin:15px 0}.report-item>p{font-size:13px;line-height:2}.report-item summary{font-size:11px;cursor:pointer;color:#718072}.report-item ul{font-size:12px;line-height:2;color:#627265}#chapter-list{display:grid;grid-template-columns:1fr 1fr;gap:10px 24px}#chapter-list button{text-align:left;border-bottom:1px solid #9fa68f55;padding:13px 0;font-size:13px;color:#273f3e}#chapter-list button small{display:block;color:#718072;font-size:11px;margin-top:5px}#toast{position:fixed;bottom:110px;left:50%;transform:translateX(-50%);padding:12px 24px;background:#f4eedf;color:#273f3e;box-shadow:0 10px 40px #071a2460;z-index:50;font-size:12px;max-width:85vw;text-align:center;line-height:1.8}
@media(max-width:760px){header{left:6vw;right:6vw;top:max(21px,env(safe-area-inset-top))}.wordmark{font-size:16px;gap:0}.wordmark span{display:none}.header-actions{gap:17px}.header-actions button{font-size:11px}.scene-image{object-position:65% center}.scene-shade{background:linear-gradient(0deg,#10292bf2 0%,#10292be3 25%,#10292b8c 52%,#10292b05 82%),linear-gradient(180deg,#10292b90,transparent 22%)}.cover-copy{left:9vw;top:auto;bottom:17%}.cover-copy h1{font-size:64px}.cover-copy .eyebrow{font-size:10px;margin-bottom:19px}.cover-description{font-size:13px}.cover-bottom{left:9vw;right:9vw;bottom:26px;font-size:9px}.cover-bottom p{display:none}.side-label{font-size:9px;right:6vw;top:18%}#birth{display:block;padding:100px 7vw 40px;background:#13262670}.birth-copy h2{font-size:34px;line-height:1.4;margin-bottom:14px}.birth-copy>p:not(.eyebrow){font-size:12px}.birth-small{display:none}.birth-copy .eyebrow{font-size:10px;margin-bottom:16px}.form-wrap{max-width:none;margin-top:25px;padding:22px 23px;background:#142829f2}.field{margin-bottom:18px}#gold-pillars{gap:13px}.glyph{width:60px;height:60px}.gold-pillar>span{font-size:10px}.inscription-inner{padding-top:90px}#gold-heading{font-size:17px}.inscription-inner>.eyebrow{font-size:11px}#gold-terms{font-size:13px}.gold-char-fallback{font-size:48px}#character,body[data-scene] #character{width:130px;height:260px;left:auto;right:9%;top:auto;bottom:35%;opacity:.88}.story-meta{top:84px;left:8vw;right:8vw;font-size:10px}.story-meta #story-age{font-size:12px}.story-copy{left:8vw;right:8vw;width:auto;top:auto;bottom:145px;max-height:49%;padding-right:0}.story-copy h2{font-size:31px;line-height:1.5;margin-bottom:17px}.story-copy .eyebrow{font-size:10px;margin-bottom:12px}.story-copy p.narrative{font-size:12px;line-height:2;margin-bottom:10px}.story-copy p.narrative:first-child{font-size:14px}.story-copy .evidence-link{font-size:10px;margin-top:8px}.story-footer{left:8vw;right:8vw;bottom:max(22px,env(safe-area-inset-bottom))}.timeline{margin-bottom:18px}#timeline-buttons button{font-size:0;width:12px;height:16px;position:relative}#timeline-buttons button::after{content:'';width:4px;height:4px;border:1px solid #d6d7c6a3;border-radius:50%;position:absolute;left:4px;top:5px}#timeline-buttons button.current::after{background:var(--gold);border-color:var(--gold)}#next{font-size:12px;gap:25px}dialog{width:calc(100% - 28px);padding:25px 22px;max-height:88dvh}dialog h2{font-size:24px}#chapter-list{gap:5px 18px}#chapter-list button{font-size:12px}.choice-options button{font-size:12px}.choice-options{gap:12px}#choice{margin-top:12px}#choice-echo{font-size:12px;margin:14px 0}.text-button{font-size:11px}#ending-actions{gap:14px}.primary{font-size:13px;min-width:210px}}
@media(max-height:700px) and (min-width:761px){.cover-copy{top:19%}.cover-copy h1{font-size:68px}.story-copy{top:23%;max-height:57%}.story-copy h2{font-size:36px}.story-copy p.narrative{font-size:12px}.story-copy p.narrative:first-child{font-size:14px}.story-meta{top:90px}.glyph{width:65px;height:65px}.inscription-inner{padding-top:75px}.inscription-inner h2{margin-bottom:20px}#gold-terms{margin-top:20px}#birth{padding-top:100px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;animation-iteration-count:1!important}}

#scenery:has(~ #birth:not([hidden])) .scene-shade{background:linear-gradient(90deg,#10292bdb,#10292b90 45%,#10292b30)}

/* Original cinnabar seal entrance, followed by an ink-drop transition. */
#cover{z-index:17;background:#f6f1e6;color:#333839;display:grid;place-items:center;isolation:isolate}
#cover::before{content:'';position:absolute;inset:0;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23887255' filter='url(%23n)' opacity='.2' d='M0 0h180v180H0z'/%3E%3C/svg%3E");opacity:.24;z-index:-1}
.seal-content{text-align:center;display:flex;align-items:center;flex-direction:column}
#entry-seal{width:200px;height:285px;background:url('../img/seal-paper.webp') center 52%/550px auto no-repeat;mix-blend-mode:multiply;transform-origin:center 60%;will-change:transform,filter,opacity}
#entry-caption{font-size:12px;letter-spacing:.4em;color:#7e7365;margin:30px 0 8px}
#cover .primary{color:#ab4935;border-color:#ab493566;min-width:140px;font-size:13px;justify-content:center;gap:24px;margin-top:12px}
#skip-entry{position:absolute;right:6vw;bottom:max(28px,env(safe-area-inset-bottom));font-size:11px;letter-spacing:.15em;color:#897d6d;z-index:22}
#entry-canvas{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:19}
body[data-screen=cover] header{color:#7e7365}body[data-screen=cover] .wordmark span{border-color:#7e736544}
@media(max-width:760px){#entry-seal{width:175px;height:255px;background-size:490px auto}#entry-caption{font-size:11px;margin-top:24px}}

#entry-seal{width:230px;height:330px;mask-image:linear-gradient(to right,transparent,#000 12%,#000 88%,transparent),linear-gradient(to bottom,transparent,#000 10%,#000 90%,transparent);mask-composite:intersect}
@media(max-width:760px){#entry-seal{width:210px;height:300px}}

/* Composable story illustration layers, all sprites stay on the same floor. */
#scene-layers{position:absolute;inset:0;z-index:2;pointer-events:none}
.composition-item{position:absolute;left:calc(var(--x)*1%);bottom:calc(var(--bottom)*1vh);width:calc(var(--w)*1vw);height:calc(var(--h)*1vh);transform:translateX(-50%);background-repeat:no-repeat;filter:drop-shadow(0 8px 10px #152c3030);animation:layerArrive 1.2s ease both}
.composition-item img{width:100%;height:100%;object-fit:contain;object-position:center bottom}
@keyframes layerArrive{from{opacity:0;translate:8px 0}to{opacity:1;translate:0 0}}
#scene-weather{position:absolute;inset:0;pointer-events:none;z-index:4;opacity:0;transition:opacity 1.2s}
body[data-weather=rain] #scene-weather{opacity:.28;background:repeating-linear-gradient(110deg,transparent 0 90px,#c0d7e44a 91px,transparent 93px 180px);animation:sceneRain .65s linear infinite}
body[data-weather=overcast] #scene-weather{opacity:.3;background:#49647a;mix-blend-mode:multiply}
body[data-weather=gold] #scene-weather{opacity:.13;background:radial-gradient(ellipse at 70% 20%,#ffca66,transparent 70%);mix-blend-mode:screen}
#scenery .scene-shade{z-index:5}#scenery .grain{z-index:6}#scenery .motes{z-index:7}
@keyframes sceneRain{to{background-position:-35px 110px}}
body[data-composed=true] .timeline{overflow-x:auto;scrollbar-width:none}
#timeline-buttons{min-width:660px}
@media(max-width:760px){#scene-layers{inset:8vh -33vw 0 -33vw;height:48vh;--mobile-floor:1}.composition-item{left:calc(var(--x)*1% - 18vw);bottom:2vh;width:calc(var(--w)*1.5vw);height:calc(var(--h)*.6vh)}.composition-item.prop{width:calc(var(--w)*1.55vw);height:calc(var(--h)*.6vh)}#timeline-buttons{min-width:0}.timeline{overflow:visible}#timeline-buttons button{width:8px}#timeline-buttons button::after{left:2px;width:3px;height:3px}}

/* Warm paper reels coordinated with the animated illustrated world. */
.reel-native{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;border:0!important;clip-path:inset(50%);overflow:hidden;opacity:0}
.birth-reel{display:grid;grid-template-rows:18px 88px 18px;background:#ddd6bd;border:1px solid #b9b69e;border-radius:7px;box-shadow:inset 0 2px 4px #fff8dc80,0 3px 0 #0c212b66;overflow:hidden}
.reel-arrow{font:16px/18px Arial,sans-serif;color:#607b79;padding:0;background:#e2ddc8;z-index:2}
.reel-arrow:hover{color:#254b51;background:#eee9d7}
.reel-viewport{position:relative;height:88px;overflow:hidden;touch-action:none;cursor:ns-resize;background:linear-gradient(90deg,#e5ddc4,#fff8e6 24%,#f6efdc 78%,#d2c9ae);color:#294b51}
.reel-viewport::before{content:'';position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(#b3b198a1,transparent 38%,transparent 62%,#b3b198a1)}
.reel-viewport::after{content:'';position:absolute;left:4px;right:4px;top:28px;height:32px;border-block:1px solid #607e7950;pointer-events:none;border-radius:2px}
.reel-viewport:focus-visible{outline:2px solid #e1bc75;outline-offset:-3px}
.reel-track{position:absolute;top:-31px;left:0;right:0;pointer-events:none}
.reel-row{height:30px;text-align:center;line-height:30px;white-space:nowrap;font-size:14px;color:#617670;opacity:.5}
.reel-row.selected{font-size:21px;color:#294b51;opacity:1;text-shadow:0 1px #fff9e2}
#birth .form-wrap{max-width:460px;padding:25px 28px}
#birth .field{margin-bottom:17px}
#birth .form-caption{font-size:12px;letter-spacing:.15em}
#birth .row{gap:12px}
@media(min-width:761px){#birth{align-items:start;padding-top:110px}.birth-copy{align-self:center}#birth .form-wrap{justify-self:end}}
@media(max-width:760px){.birth-reel{grid-template-rows:16px 88px 16px}#birth .form-wrap{padding:22px}#birth .row{gap:10px}.reel-row.selected{font-size:19px}}

@media(max-width:760px){body[data-screen=birth] header{top:0;left:0;right:0;padding:20px 6vw;background:#142829ed;backdrop-filter:blur(8px)}}

/* The form is ink on a physical illustrated page, positioned inside the artwork. */
#birth{display:block;padding:0;overflow:hidden;background:#f4eedf;isolation:isolate}
/* 启卷/出生页不要露出场景图；等真正进入故事再显示。 */
body[data-screen=cover] #scenery,body[data-screen=birth] #scenery{visibility:hidden}
.album-stage { position:absolute; left:50%; top:50%; width:max(100vw,177.7778vh); height:max(100vh,56.25vw); transform:translate(-50%,-50%); }
.album-art { position:absolute; inset:0; display:block; pointer-events:none; }
.album-art img { width:100%; height:100%; object-fit:fill; display:block; }
#birth .birth-copy { position:absolute; left:23%; top:24%; width:24%; color:#594c39; margin:0; }
#birth .birth-copy .eyebrow { color:#947d53; font-size:11px; letter-spacing:.18em; }
#birth .birth-copy h2 { font-size:clamp(28px,3.5vw,52px); font-weight:400; line-height:1.6; margin:0 0 20px; color:#4b4e45; }
#birth .birth-copy>p:not(.eyebrow) { color:#877655; font-size:12px; line-height:2.1; }
#album-record { margin-top:20px; font-size:11px!important; letter-spacing:.08em; }
#birth .form-wrap { position:absolute; left:54%; top:23%; width:28%; height:62%; max-width:none; max-height:none; margin:0; padding:0!important; border:0; border-radius:0; background:none; box-shadow:none; backdrop-filter:none; color:#4d5248; overflow-y:auto; scrollbar-width:thin; scrollbar-color:#a78c5c70 transparent; }
#birth .form-caption { font-size:20px; font-weight:400; color:#5f5e49; margin:0 0 12px; letter-spacing:.13em; }
.album-modes { display:flex; gap:12px; align-items:center; margin:0 0 6px; font-size:11px; color:#ac9976; }
.album-modes button { color:#9b8a6a; padding:3px 0; font-size:12px; }
.album-modes button[aria-pressed=true] { color:#a7593c; border-bottom:1px solid #ad76544d; }
#ink-hint { font-size:10px; line-height:1.8; color:#a08a64; margin:4px 0 12px; }
.album-step { position:relative; transform-origin:left center; }
#birth .field { margin-bottom:12px; }
#birth .field-label { color:#8d7957; font-size:11px; margin-bottom:7px; letter-spacing:.14em; }
#birth .row { gap:18px; }
#birth .segmented { gap:24px; }
#birth .segmented label { color:#958363; font-size:12px; }
#birth .segmented label:has(:checked) { color:#a65037; border-color:#a6503760; }
#birth .segmented input { accent-color:#a65037; }
#birth select,#birth input[type=text],#birth input[type=number] { color:#5a5b4d; background:none; border-color:#a78c5c50; }
#birth #city { font-size:24px; padding:10px 0; }
#birth .advanced { border-color:#a78c5c50; color:#81745b; font-size:11px; padding-top:12px; margin-top:14px; }
#birth .advanced summary,#birth .advanced .field-label { color:#8d7957; }
#birth .advanced .footnote,#birth .footnote { color:#a18e6b; font-size:9px; line-height:1.8; }
#birth .primary { color:#a35a3b; border-color:#a66c4c77; font-size:12px; min-width:0; padding:12px 0; margin-top:10px; }
#birth #calculate { justify-content:space-between; width:100%; }
.album-navigation { display:flex; gap:14px; justify-content:space-between; align-items:center; border-top:1px solid #a78c5c35; margin-top:14px; padding-top:12px; }
.album-navigation button { font-size:11px; color:#a35a3b; padding:4px 0; letter-spacing:.04em; }
#album-page-number { font:10px/1.5 Georgia,serif; color:#aa9672; letter-spacing:.16em; margin-right:auto; }
#album-next { margin-left:auto; }
#birth #form-error { color:#ac5a3b; font-size:11px; line-height:1.8; margin:10px 0 0; }
#birth .birth-reel { border:0; border-radius:0; box-shadow:none; background:none; grid-template-rows:16px 106px 16px; }
#birth .reel-arrow { background:none; color:#a38b64; opacity:.7; }
#birth .reel-viewport { height:106px; background:none; color:#535c50; mask-image:linear-gradient(transparent,#000 30%,#000 70%,transparent); }
#birth .reel-viewport::before { display:none; }
#birth .reel-viewport::after { top:37px; height:32px; border:0; border-bottom:1px solid #ad987335; border-radius:0; }
#birth .reel-track { top:-22px; }
#birth .reel-row { color:#938566; font-size:17px; }
#birth .reel-row.selected { color:#555a4b; font-size:28px; text-shadow:0 1px #ffefcf66; }
.ink-field { display:none; }
#birth-form[data-writing-mode=ink] .birth-reel { display:none; }
#birth-form[data-writing-mode=ink] .ink-field { display:block; }
#birth-form[data-writing-mode=ink] .album-step[data-step="1"]>.row { display:grid; grid-template-columns:1fr 1fr; gap:12px 20px; }
#birth-form[data-writing-mode=ink] .album-step[data-step="1"]>.row>label:first-child { grid-column:1/-1; }
.ink-digits { display:flex; gap:7px; }
.ink-cell { position:relative; width:57px; height:64px; border-bottom:1px solid #a6906a55; }
.ink-cell::before { content:''; position:absolute; left:50%; top:22px; bottom:10px; border-left:1px dashed #b9a58230; pointer-events:none; }
.ink-cell canvas { position:absolute; inset:0; width:100%; height:100%; touch-action:none; cursor:crosshair; }
.ink-field-tools { display:flex; align-items:center; gap:8px; margin-top:3px; }
#birth input.ink-review { width:85px; padding:3px 0; border:0; font-size:16px; color:#75664d; line-height:1.5; }
#birth input.ink-review::placeholder { color:#b29c77; font-size:9px; }
.ink-field-tools button { color:#aa906b; font-size:9px; padding:4px; }
.ink-leap { display:block; font-size:10px; color:#9f8863; margin-top:5px; }
.ink-leap input { accent-color:#a65037; }
body[data-screen=birth] header { color:#fff2d4; background:none; backdrop-filter:none; }
@media(max-width:760px) {
  .album-stage { inset:0; width:100%; height:100%; transform:none; }
  .album-art img { object-fit:cover; object-position:center; }
  #birth .birth-copy { left:15%; top:16%; width:72%; }
  #birth .birth-copy .eyebrow { font-size:9px; margin-bottom:8px; }
  #birth .birth-copy h2 { font-size:26px; line-height:1.4; margin-bottom:8px; }
  #birth .birth-copy h2 br { display:none; }
  #birth .birth-copy>p:not(.eyebrow) { display:none; }
  #birth .form-wrap { left:15%; top:31%; width:72%; height:55%; padding:0!important; }
  #birth .form-caption { font-size:17px; margin-bottom:9px; }
  #birth .field-label { font-size:10px; margin-bottom:4px; }
  #birth .field { margin-bottom:10px; }
  #birth .row { gap:12px; }
  #birth .reel-row.selected { font-size:22px; }
  .ink-cell { width:47px; height:56px; }
  .ink-digits { gap:5px; }
  #birth-form[data-writing-mode=ink] .album-step[data-step="1"]>.row { gap:7px 14px; }
  #ink-hint { font-size:9px; margin:3px 0 8px; }
  .album-navigation { margin-top:9px; padding-top:9px; }
  .album-navigation button { font-size:10px; }
  #birth input.ink-review { width:66px; font-size:15px; }
  body[data-screen=birth] header { top:0; left:0; right:0; padding:20px 6vw; color:#f8e7c5; background:none; backdrop-filter:none; }
}
@media(max-height:720px) and (min-width:761px) {
  #birth .form-wrap { top:20%; height:67%; }
  .ink-cell { width:47px; height:50px; }
  #birth .form-caption { font-size:17px; }
  #ink-hint { font-size:9px; margin-bottom:6px; }
}

@media(min-width:761px){#birth .birth-copy{top:22%}#birth .birth-copy h2{font-size:clamp(28px,3.2vw,48px)}#album-record{margin-top:8px}.ink-cell{width:66px;height:71px}#birth .field-label{font-size:12px}#birth .form-wrap{width:29%;top:22%}}

/* Ink is set with an open-source handwriting face, using the paper's own color and grain. */
#birth .birth-copy,#birth .form-wrap,#inscription .inscription-inner { font-family:'BookInk','WenKai',sans-serif; font-weight:400; }
#birth .birth-copy,#birth .form-wrap { mix-blend-mode:multiply; filter:url(#paper-ink-texture); }
#birth .form-caption { color:#6b4c34; font-size:24px; letter-spacing:.06em; }
#birth .birth-copy h2 { color:#574c3d; letter-spacing:.05em; transform:rotate(-.35deg); }
#birth .field-label { color:#8b7253; font-size:12px; }
#birth .reel-row { font-family:'BookInk',serif; }
#birth .reel-row.selected { color:#65513b; font-size:31px; text-shadow:none; }
#birth .album-modes button,#birth .album-navigation button { font-size:12px; }
.ink-open-area { position:relative; width:calc(100% + 12px); margin-left:-6px; aspect-ratio:5/3; touch-action:none; }
.ink-open-area canvas { position:absolute; inset:0; width:100%; height:100%; touch-action:none; cursor:crosshair; }
.ink-example { position:absolute; left:12px; top:24px; color:#aa94721f; font-size:30px; letter-spacing:.15em; pointer-events:none; }
.ink-page { display:none; }
#birth-form[data-writing-mode=ink] .ink-page { display:block; }
#birth-form[data-writing-mode=ink] .reel-only { display:none!important; }
.ink-page-tools { display:flex; justify-content:flex-end; gap:15px; margin:0 0 12px; color:#9d8462; font-size:11px; }
.ink-page-tools span { margin-right:auto; font-size:10px; }
.ink-page-tools button { padding:0; color:#946d4c; font-size:11px; }
.ink-page-review { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-bottom:12px; }
.album-step[data-step="2"] .ink-page-review { grid-template-columns:1fr 1fr; }
.ink-page-review label { font-size:12px; color:#937c5b; }
.ink-page-review label>span { display:block; }
#birth input.ink-review { width:100%; font-family:'BookInk',serif; font-size:22px; padding:3px 0; border-bottom:1px solid #9d84622e; }
#birth input.ink-review::placeholder { font-size:11px; color:#ae9471; }
.album-gender { padding:10px 0 6px; border-top:1px solid #9d846233; }
#birth .album-gender .field-label { color:#8e5d3c; font-size:13px; margin-bottom:8px; }
#birth .album-gender .segmented { gap:28px; }
#birth .album-gender .segmented label { min-height:44px; display:flex; align-items:center; padding:4px 9px; font-size:22px; color:#887359; border:0; position:relative; }
#birth .album-gender .segmented label:has(:checked) { color:#a74e32; }
#birth .album-gender .segmented label:has(:checked)::after { content:''; position:absolute; inset:0 -2px; border:1.5px solid #b26b4a99; border-radius:47% 51% 48% 52%; transform:rotate(-4deg); pointer-events:none; }
#birth .album-gender.needs-gender .field-label { color:#a94a31; }
#album-summary { font-size:17px; line-height:1.9; color:#73563e; border-bottom:1px solid #a68a633b; padding-bottom:14px; margin-top:0; }
#inscription { background:radial-gradient(ellipse at 50% 43%,#433125 0%,#292421 40%,#111b1e 82%); }
#inscription .gold-texture { opacity:.5; background:radial-gradient(ellipse at 50% 50%,#c8883a12,transparent 60%); }
#inscription .inscription-inner h2 { font-family:'BookInk',serif; color:#e0c49a; font-size:27px; letter-spacing:.1em; }
#inscription .glyph { width:100px; height:100px; filter:drop-shadow(0 0 5px #db822b35); }
#inscription .glyph svg { overflow:visible; }
#inscription #gold-terms { color:#e4b777; font-size:19px; letter-spacing:.08em; }
#inscription #gold-foot { color:#b6a187; font-family:'BookInk',serif; font-size:12px; }
#inscription #gold-continue { font-family:'BookInk',serif; color:#e5b975; }
.burn-transition { position:fixed; inset:0; z-index:80; overflow:hidden; isolation:isolate; pointer-events:auto; }
.burn-old { position:absolute; inset:0; transform:translateZ(0); overflow:hidden; pointer-events:none; }
.burn-transition>canvas { position:absolute; inset:0; width:100%; height:100%; z-index:2; pointer-events:none; }
@media(max-width:760px) {
  #birth .form-wrap { top:29%; height:61%; }
  #birth .form-caption { font-size:21px; }
  #birth .field-label { font-size:12px; }
  #birth .reel-row.selected { font-size:26px; }
  .ink-open-area { aspect-ratio:5/3; }
  .ink-page-tools { gap:9px; margin-bottom:10px; font-size:10px; }
  .ink-page-tools span { font-size:9px; }
  #birth .album-gender .segmented label { font-size:21px; min-height:42px; }
  #birth .album-gender .segmented { gap:21px; }
  #birth input.ink-review { font-size:20px; }
  #birth .album-navigation button { font-size:12px; }
  #inscription .glyph { width:64px; height:64px; }
  #inscription .inscription-inner h2 { font-size:21px; }
  #inscription #gold-terms { font-size:15px; }
}
@media(max-height:720px) and (min-width:761px) { #inscription .glyph { width:78px; height:78px; } }

@media(min-width:761px){#birth .form-wrap{height:65%}.album-step[data-step="2"] .ink-open-area{aspect-ratio:2/1}}

#birth input{color-scheme:light}#birth input[type=checkbox]{accent-color:#a45c3b}@media(max-width:760px){#birth .album-navigation{padding-right:42px}}

/* Graphite on paper, with permanently reachable page controls. */
#birth .form-wrap{overflow:visible!important;perspective:1500px}
#birth-form{height:100%;display:flex;flex-direction:column;position:relative;min-width:0}
.album-page-content{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding-right:8px;scrollbar-width:thin}
#birth .album-navigation{flex:none;margin-top:8px;padding:10px 2px 0;min-height:38px}
#birth .album-navigation button{font-size:15px;padding:8px 0}
#birth .birth-copy,#birth .form-wrap{color:#58554e;filter:url(#paper-ink-texture)}
#birth .birth-copy h2,#birth .form-caption,#birth .field-label,#birth .reel-row.selected,#birth .segmented label,#birth .album-navigation button,#birth #city{color:#58554e;text-shadow:.2px .3px .25px #55534a45,-.25px 0 .2px #faf0d980}
#birth .segmented label:has(:checked){color:#7d5142}
@media(max-width:760px){#birth .album-navigation{padding-right:32px}#birth .album-navigation button{font-size:13px}}

.living-fire{mix-blend-mode:screen;animation:letterFire .8s ease-in-out infinite alternate;}@keyframes letterFire{from{opacity:.55}to{opacity:1}}

/* A quiet title leaf: the eight characters carry the flame, annotations sit below. */
#inscription{background:radial-gradient(ellipse at 50% 46%,#3c2b2055,transparent 56%),#191c1b}
#inscription .inscription-inner{width:min(100%,680px);padding:56px 32px 32px;font-family:'WenKai',serif}
#inscription .inscription-inner>.eyebrow{font-family:'WenKai',serif;font-size:11px;letter-spacing:.38em;color:#ab916c;margin:0 0 19px}
#inscription .inscription-inner h2{font-family:'WenKai',serif;font-size:25px;letter-spacing:.22em;color:#d8c5a6;margin:0 0 42px;font-weight:400}
#inscription #gold-pillars{gap:34px}
#inscription .gold-pillar>span{font-family:'WenKai',serif;font-size:11px;letter-spacing:.25em;color:#a98f6b;margin-bottom:13px}
#inscription #gold-terms{max-width:490px;margin:31px auto 0;color:#c7b89f;font-family:'WenKai',serif;font-size:13px;letter-spacing:.06em;line-height:1.7}
.destiny-identity{display:flex;align-items:center;justify-content:center;gap:14px;color:#b5a58c;font-size:12px}
.destiny-identity i{height:2px;width:2px;background:#9c815d;border-radius:50%}
.destiny-reading{display:flex;align-items:center;justify-content:center;gap:30px;padding:19px 0;margin:17px 0 0;border-top:1px solid #b3956333;border-bottom:1px solid #b3956322}
.destiny-pattern{font-size:23px;letter-spacing:.16em;color:#cfb78b}
.destiny-elements{border-left:1px solid #b3956333;padding-left:27px;text-align:left;font-size:12px;color:#b9a78a}
.destiny-elements p{margin:0;line-height:2}.destiny-elements em{font-style:normal;display:inline-block;margin-right:16px;font-size:11px;color:#8f806c}
.destiny-onset{display:flex;justify-content:center;gap:16px;flex-wrap:wrap;font-size:11px;color:#908574;margin-top:14px;letter-spacing:.04em;font-variant-numeric:tabular-nums}
.destiny-onset time{color:#796f60}
#inscription #gold-foot{font-family:'WenKai',serif;font-size:12px;letter-spacing:.12em;color:#958773;margin:27px 0 0;line-height:1.8}
#inscription #gold-continue{font-family:'WenKai',serif;font-size:14px;letter-spacing:.16em;min-width:245px;margin-top:19px;padding:14px 0;color:#d1b482;border-color:#a58b5b70;justify-content:space-between}
#inscription #gold-continue span{font-size:16px;opacity:.7}
#inscription #gold-skip.is-hidden{visibility:hidden;pointer-events:none}
#inscription #gold-skip{font-family:'WenKai',serif;font-size:11px;color:#877d6e;margin-top:8px}
@media(max-width:760px){#inscription .inscription-inner{padding:45px 24px 25px}#inscription .inscription-inner h2{font-size:21px;margin-bottom:32px}#inscription #gold-pillars{gap:13px}#inscription #gold-terms{margin-top:25px}.destiny-pattern{font-size:21px}.destiny-reading{gap:19px}.destiny-elements{padding-left:18px}#inscription #gold-foot{font-size:11px}}
@media(max-height:730px){#inscription .inscription-inner{padding-top:30px}#inscription .inscription-inner h2{margin-bottom:23px}#inscription #gold-terms{margin-top:19px}#inscription #gold-foot{margin-top:17px}}

#inscription .glyph svg{display:block;width:100%;height:100%}

#birth .album-gender .segmented{gap:16px;flex-wrap:wrap}
#birth .album-gender .segmented label{gap:7px;padding:6px 2px;min-width:0;font-size:20px;color:#7b7365;touch-action:manipulation}
#birth .album-gender .segmented label:has(:checked){color:#555349;border:0}
#birth .album-gender .segmented label:has(:checked)::after{content:none}
#birth .album-gender .segmented input{inset:0;width:100%;height:100%;margin:0;z-index:2;cursor:pointer;opacity:0}
.pencil-choice{width:22px;height:28px;flex:none;display:inline-block;border-bottom:1px solid #8d816341}
.pencil-choice svg{width:100%;height:100%;opacity:0;transform:rotate(-5deg)}
label:has(:checked) .pencil-choice svg{opacity:.9}
#birth .album-gender .segmented label:has(:focus-visible){outline:1px dashed #766c57;outline-offset:3px}
@media(max-width:760px){#birth .album-gender .segmented{gap:13px}#birth .album-gender .segmented label{font-size:18px;gap:5px}.pencil-choice{width:19px}}

/* ═══ 重做：字体 · 命盘页 · 故事页 · 焚字 ═══ */
:root{--ink:#0f2b2a;--vermilion:#b8392c;--paper:#f3e6c8;--ash:#a9ab9c;--gold:#e0bf7c;--sans:'WenKai','Noto Sans CJK SC','PingFang SC','Microsoft YaHei',sans-serif;--brush:'Brush','WenKai','Noto Sans CJK SC',sans-serif;font-family:var(--sans)}
body{font-family:var(--sans)}
.wordmark{font-family:var(--brush);font-size:22px;letter-spacing:.16em}
#inscription .inscription-inner,#inscription .inscription-inner *{font-family:var(--sans)}
body[data-screen=story] .wordmark{font-size:20px}

/* —— 命盘页：只留字 —— */
#inscription .inscription-inner{padding:40px 28px}
#inscription #gold-pillars{margin-top:0}
#inscription .gold-pillar>span{font-family:var(--brush);font-size:15px;letter-spacing:.3em;color:#b79c70}
#inscription .destiny-pattern{font-family:var(--brush);font-size:30px;letter-spacing:.14em;color:#e2c58f}
#inscription #gold-terms{font-size:14px;color:#cdbda2}
#inscription #gold-continue{font-family:var(--brush);font-size:20px;letter-spacing:.3em;min-width:260px;color:#eab870;border-bottom:1px solid #d0a25f99}
#inscription #gold-continue span{font-family:var(--sans);opacity:.8}
#inscription #gold-skip{font-size:12px;letter-spacing:.2em}
#inscription.igniting .glyph{animation:glyphHeat 1.2s ease-in forwards}
@keyframes glyphHeat{0%{filter:drop-shadow(0 0 5px #db822b35) brightness(1)}35%{filter:drop-shadow(0 0 16px #ff9a3acc) brightness(1.7)}100%{filter:drop-shadow(0 0 26px #ff7a1fe6) brightness(2.2)}}
.burn-overlay{position:fixed;inset:0;z-index:90;pointer-events:auto}
.burn-overlay canvas{position:absolute;inset:0;width:100%;height:100%;display:block}

/* —— 故事页：画是主角，字是题跋 —— */
body[data-screen=story]{--art-h:100dvh}
body[data-screen=story] .scene-image{animation:none;object-position:calc(var(--px,.6)*100%) 50%}
body[data-screen=story] .atmosphere{opacity:.8}
body[data-screen=story] .scene-shade{z-index:5;background:linear-gradient(90deg,#0f2b2af2 0,#0f2b2ac8 22%,#0f2b2a80 38%,#0f2b2a20 56%,transparent 70%),linear-gradient(0deg,#0f2b2ae6 0,transparent 24%),linear-gradient(180deg,#0f2b2a99,transparent 20%)}
body[data-screen=story] .motes{z-index:7}
#scene-layers{position:absolute;left:0;top:0;width:100%;height:var(--art-h);container-type:size;z-index:3;pointer-events:none;overflow:hidden;transition:filter 1.2s}
#scene-layers .stage{position:absolute;height:max(100cqh,56.25cqw);aspect-ratio:16/9;top:calc((100cqh - max(100cqh,56.25cqw))*.5);left:calc((100cqw - max(100cqh,56.25cqw)*16/9)*var(--px,.6))}
.sprite{position:absolute;left:calc(var(--x)*1%);bottom:calc(var(--b)*1%);height:calc(var(--h)*1%);transform:translateX(-50%);isolation:isolate;animation:spriteIn 1.1s cubic-bezier(.2,.7,.2,1) both;filter:drop-shadow(0 7px 9px #0f2b2a45)}
.sprite.sheet{aspect-ratio:543/724;background-size:400% 100%;background-repeat:no-repeat}
.sprite img{height:100%;width:auto;display:block;max-width:none}
.sprite::before{content:'';position:absolute;left:6%;right:6%;bottom:-2%;height:7%;background:radial-gradient(ellipse at center,#0a1210b0,transparent 70%);z-index:-1;filter:blur(1.5px)}
.sprite.prop{animation-name:propIn}
.sprite.hero,.sprite.seat,.sprite.mate{transform-origin:50% 100%;animation:spriteIn 1.1s cubic-bezier(.2,.7,.2,1) both,breathe 6s ease-in-out 1.4s infinite}
@keyframes breathe{0%,100%{transform:translateX(-50%) scaleY(1)}50%{transform:translateX(-50%) scaleY(1.009)}}
@keyframes spriteIn{from{opacity:0;transform:translate(-50%,14px)}to{opacity:1;transform:translate(-50%,0)}}
@keyframes propIn{from{opacity:0;transform:translate(-50%,-10px) scale(.96)}to{opacity:1;transform:translate(-50%,0) scale(1)}}
/* 天气跟着这一年的断语走：凶=雨，滞=阴，顺=金光 */
body[data-screen=story][data-weather=rain] .scene-image,body[data-screen=story][data-weather=rain] #scene-layers{filter:saturate(.62) brightness(.8) contrast(1.05) hue-rotate(-8deg)}
body[data-screen=story][data-weather=overcast] .scene-image,body[data-screen=story][data-weather=overcast] #scene-layers{filter:saturate(.74) brightness(.88) hue-rotate(-4deg)}
body[data-screen=story][data-weather=gold] .scene-image,body[data-screen=story][data-weather=gold] #scene-layers{filter:saturate(1.12) brightness(1.06)}
.scene-image{transition:opacity 1.5s ease,filter 1.2s}
#scene-weather{z-index:4}
body[data-weather=rain] #scene-weather{opacity:.26}

#story .st-panel{position:absolute;left:max(6vw,48px);top:max(118px,17vh);width:min(460px,38vw);max-height:calc(100dvh - 252px);overflow-y:auto;padding:4px 14px 24px 0;scrollbar-width:thin;scrollbar-color:#e0bf7c40 transparent;overscroll-behavior:contain;z-index:8;text-shadow:0 1px 14px #0f2b2a}
#story .st-panel:focus{outline:none}
.st-top{display:flex;align-items:center;gap:14px;margin-bottom:20px}
#st-seal{flex:none;width:54px;height:54px;display:grid;place-items:center;font-family:var(--brush);font-size:35px;line-height:1;color:#f4e6c6;-webkit-text-stroke:.7px #f4e6c6;border-radius:2px;transform:rotate(-2deg);background:radial-gradient(ellipse at 28% 22%,#d24a38,transparent 60%),radial-gradient(ellipse at 80% 88%,#8a2217,transparent 62%),#b4382b;box-shadow:inset 0 0 0 2.5px #b4382b,inset 0 0 0 3.6px #f4e6c85c,0 3px 14px #0007;text-shadow:none;filter:url(#stamp)}
.st-meta{display:flex;flex-direction:column;gap:5px;min-width:0}
#st-title{font-family:var(--brush);font-size:23px;letter-spacing:.2em;color:var(--paper);line-height:1.1}
#st-when{font-size:12px;letter-spacing:.14em;color:var(--gold);font-variant-numeric:tabular-nums}
.st-badges{margin-left:auto;display:flex;gap:8px;align-items:center;flex:none}
.st-badges b{font-weight:400;font-size:12px;letter-spacing:.18em;padding:3px 9px 3px 11px;border:1px solid currentColor;border-radius:99px;color:var(--ash)}
#st-state[data-s=此刻]{color:#ffd98a;background:#ffd98a1c}
#st-state[data-s=将至]{color:var(--ash);border-style:dashed}
#st-label[data-t=bad]{color:#f08a76;background:#f08a7620}
#st-label[data-t=low]{color:#aebfd0}
#st-label[data-t=mid]{color:var(--paper)}
#st-label[data-t=up]{color:#ffd98a;background:#ffd98a1c}
#st-head{margin:0 0 18px;font-weight:400;font-family:var(--sans);font-size:clamp(20px,1.9vw,25px);line-height:1.65;letter-spacing:.05em;color:#fff7e6;text-wrap:balance}
#st-head[data-len=short]{font-family:var(--brush);font-size:clamp(30px,3vw,44px);line-height:1.38;letter-spacing:.07em}
#st-lines p{margin:0 0 11px;font-size:15px;line-height:1.95;letter-spacing:.035em;color:#fff3d9e0}
#st-omens{list-style:none;margin:20px 0 0;padding:0;display:grid;gap:11px}
#st-omens li{display:grid;grid-template-columns:auto 1fr;gap:3px 12px;align-items:baseline;font-size:13px;line-height:1.75;padding-left:15px;position:relative}
#st-omens li::before{content:'';position:absolute;left:0;top:.72em;width:6px;height:6px;border-radius:50%;background:#e9785f;box-shadow:0 0 8px #e9785f90}
#st-omens li.up::before{background:#ffd98a;box-shadow:0 0 8px #ffd98a90}
#st-omens b{font-weight:400;letter-spacing:.1em;color:#ffd7ac;white-space:nowrap}
#st-omens li.down b{color:#ffc0b1}
#st-omens span{color:#fff3d9c4;grid-column:2}
#st-luck{margin:20px 0 0;padding:10px 0 10px 14px;border-left:2px solid #e0bf7c80;font-size:12px;line-height:1.8;color:#e6dcc4cc;display:grid;grid-template-columns:auto 1fr;gap:0 12px}
#st-luck b{font-family:var(--brush);font-weight:400;font-size:19px;color:var(--gold);letter-spacing:.1em;grid-row:1}
#st-luck i{font-style:normal;color:var(--ash);letter-spacing:.1em;align-self:center}
#st-luck span{grid-column:1/-1;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
#st-check{margin:20px 0 0;padding-top:14px;border-top:1px dashed #e0bf7c55;font-size:14px;line-height:1.85;color:#ffe9c4}
#st-check em{display:block;font-style:normal;font-size:12px;letter-spacing:.3em;color:var(--gold);margin-bottom:5px}
#st-check b{display:inline-block;font-family:var(--brush);font-weight:400;font-size:26px;color:#f3977f;margin:0 14px 4px 0;letter-spacing:.06em}
#st-check b.g{color:#ffd98a}
#st-check em+b{margin-top:2px}
#st-check small{display:block;margin-top:8px;font-size:12px;line-height:1.8;color:#ffe9c4aa}
#story .evidence-link{display:inline-block;margin-top:18px;font-size:12px;letter-spacing:.14em;color:#e6dcc4b0;border-bottom:1px solid #e6dcc440;padding:5px 0;text-shadow:none}
#ending-actions{display:flex;flex-direction:column;align-items:flex-start;gap:6px;margin-top:16px}
#ending-actions .text-button{font-size:13px;letter-spacing:.16em;color:var(--gold);padding:8px 0;border-bottom:1px solid #e0bf7c55}
.copy-enter{animation:none}
.copy-enter>*{animation:rise .8s cubic-bezier(.2,.75,.2,1) both;animation-delay:calc(var(--i,0)*70ms + 60ms)}
.copy-enter #st-lines p,.copy-enter #st-omens li{animation:rise .8s cubic-bezier(.2,.75,.2,1) both;animation-delay:calc(var(--j,0)*95ms + 280ms)}
.copy-enter .st-top{animation:none}
@keyframes rise{from{opacity:0;transform:translate3d(calc(var(--dir,1)*18px),10px,0);filter:blur(3px)}to{opacity:1;transform:none;filter:none}}
.copy-enter #st-seal{animation:stamp .62s cubic-bezier(.3,1.5,.5,1) .12s both}
@keyframes stamp{0%{transform:scale(1.9) rotate(-9deg);opacity:0}55%{transform:scale(.93) rotate(-3deg);opacity:1}100%{transform:scale(1) rotate(-3deg);opacity:1}}

#story .st-foot{position:absolute;left:max(6vw,48px);right:max(6vw,48px);bottom:max(22px,env(safe-area-inset-bottom));z-index:9}
#story .st-time{position:relative;margin-bottom:16px}
#timeline-buttons{display:flex;justify-content:space-between;gap:2px;min-width:0}
#timeline-buttons button{font-family:var(--brush);font-size:20px;line-height:1;color:#d6d7c660;padding:6px 3px;min-width:26px;transition:color .5s,transform .5s;letter-spacing:0}
#timeline-buttons button.passed{color:#e0bf7cb0}
#timeline-buttons button.current{color:#f26b57;transform:translateY(-3px) scale(1.18);text-shadow:0 0 14px #f26b5766}
#timeline-buttons button::after{display:none!important}
.st-track{position:absolute;left:0;right:0;bottom:-6px;height:1px;background:#fff3d92b}
.st-track i{display:block;height:1px;background:linear-gradient(90deg,#e0bf7c00,#e0bf7c);transition:width 1s}
#story .reader-controls{display:flex;justify-content:space-between;align-items:center}
#story #previous{font-size:22px;padding:8px 12px 8px 0;color:var(--paper)}
#story #page-number{font-size:12px;letter-spacing:.22em;color:var(--ash);font-variant-numeric:tabular-nums}
#story #next{font-family:var(--brush);font-size:21px;letter-spacing:.24em;color:var(--gold);display:inline-flex;gap:18px;align-items:center;padding:8px 0}
#story #next span{font-family:var(--sans);font-size:20px}

/* 开场：一滴墨落进画里，印章盖下 */
#ink-intro{position:fixed;inset:0;z-index:12;pointer-events:none;overflow:hidden}
#ink-intro img{position:absolute;display:block}
#ink-intro .drop{width:clamp(34px,4vw,54px);left:var(--dx,60%);top:-16%;opacity:0;transform:translateX(-50%)}
#ink-intro .splash{width:clamp(260px,32vw,520px);left:var(--dx,60%);top:var(--dy,30%);opacity:0;transform:translate(-50%,-50%) scale(.2) rotate(-12deg);mix-blend-mode:multiply}
#ink-intro.go .drop{animation:inkFall 1.05s cubic-bezier(.55,.05,.9,.4) both}
#ink-intro.go .splash{animation:inkSplash 3s cubic-bezier(.2,.8,.2,1) .95s both}
@keyframes inkFall{0%{opacity:0;top:-16%}12%{opacity:1}92%{opacity:1;top:var(--dy,30%);transform:translateX(-50%) scale(1)}100%{opacity:0;top:var(--dy,30%);transform:translateX(-50%) scale(.3,.5)}}
@keyframes inkSplash{0%{opacity:0;transform:translate(-50%,-50%) scale(.2) rotate(-12deg)}12%{opacity:.82;transform:translate(-50%,-50%) scale(.78) rotate(-6deg)}100%{opacity:0;transform:translate(-50%,-50%) scale(1.2) rotate(2deg)}}

/* 手机：上半是画，下半是题跋 */
@media(max-width:760px){
  body{--split:50dvh}
body[data-beat=origin]{--split:35dvh}
body[data-screen=story]{--art-h:var(--split)}
  body[data-screen=story] .scene-image{bottom:auto;height:var(--split)}
  body[data-screen=story] .scene-shade{background:linear-gradient(180deg,#0f2b2a99 0,transparent 15%,transparent calc(var(--split) - 150px),#0f2b2a calc(var(--split) + 4px),#0f2b2a 100%)}
  body[data-screen=story] #scene-weather{height:var(--split)}
  #story .st-panel{left:max(6.5vw,22px);right:max(6.5vw,22px);width:auto;top:calc(var(--split) + 6px);max-height:none;bottom:calc(max(22px,env(safe-area-inset-bottom)) + 96px);padding:2px 6px 14px 0;text-shadow:0 1px 10px #0f2b2a;-webkit-mask-image:linear-gradient(180deg,transparent 0,#000 18px,#000 calc(100% - 22px),transparent 100%);mask-image:linear-gradient(180deg,transparent 0,#000 18px,#000 calc(100% - 22px),transparent 100%);padding-top:16px}
  .st-top{gap:12px;margin-bottom:14px}
  #st-seal{width:46px;height:46px;font-size:29px}
  #st-title{font-size:20px}
  #st-when{font-size:12px}
  #st-head{font-size:19px;line-height:1.6;margin-bottom:12px}
  #st-head[data-len=short]{font-size:30px}
  #st-lines p{font-size:13.5px;line-height:1.85;margin-bottom:8px}
  #st-omens{margin-top:14px;gap:9px}
  #st-omens li{font-size:12.5px;line-height:1.7}
  #st-luck{margin-top:14px;font-size:11.5px}
  #st-check{margin-top:14px;font-size:13px}
  #story .st-foot{left:max(6.5vw,22px);right:max(6.5vw,22px)}
  #timeline-buttons button{font-size:17px;min-width:20px;padding:5px 1px}
  #story #next{font-size:19px}
  #inscription .destiny-pattern{font-size:26px}
}
@media(prefers-reduced-motion:reduce){.sprite,.copy-enter,.copy-enter #st-seal{animation:none!important}}

/* —— 触感与生命感 —— */
html{-webkit-tap-highlight-color:transparent}
button,summary,label,a{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
#story,#inscription,#cover{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#story{touch-action:pan-y}
body{overscroll-behavior:none}
button{transition:transform .22s cubic-bezier(.3,1.7,.5,1),color .25s,opacity .25s,background .25s}
button:active:not(:disabled){transform:scale(.94)}
#story #next:active{transform:translateX(5px) scale(.95)}
#story #previous:active{transform:translateX(-5px) scale(.9)}
#timeline-buttons button:active{transform:translateY(-2px) scale(1.25)}
#inscription #gold-continue:active:not(:disabled){transform:scale(.97);background:#e0bf7c14}
.ripple{position:fixed;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;border:1px solid #e8c88a;background:radial-gradient(circle,#e8c88a40,transparent 70%);pointer-events:none;z-index:120;animation:ripple .8s cubic-bezier(.2,.7,.3,1) forwards}
@keyframes ripple{from{transform:scale(.4);opacity:.95}to{transform:scale(8);opacity:0}}
.st-bead{position:absolute;left:0;bottom:-9.5px;width:7px;height:7px;margin-left:-3.5px;border-radius:50%;background:#ff8a5c;box-shadow:0 0 10px #ff6a3d,0 0 22px #ff6a3d80;transition:transform .8s cubic-bezier(.3,1.25,.4,1);pointer-events:none;animation:ember 1.8s ease-in-out infinite alternate}
@keyframes ember{from{box-shadow:0 0 8px #ff6a3d,0 0 16px #ff6a3d60}to{box-shadow:0 0 13px #ff8a5c,0 0 30px #ff6a3d90}}
#st-state[data-s=此刻]{animation:nowGlow 2.6s ease-in-out infinite alternate}
@keyframes nowGlow{from{box-shadow:0 0 0 #ffd98a00}to{box-shadow:0 0 14px #ffd98a66}}
#st-omens li::before{animation:dotBeat 3.2s ease-in-out infinite}
#st-omens li:nth-child(2)::before{animation-delay:-1s}
#st-omens li:nth-child(3)::before{animation-delay:-2s}
@keyframes dotBeat{0%,100%{transform:scale(1)}50%{transform:scale(1.5)}}
/* 镜头缓慢漂移：画面与人物同向，人物走得略多一点，形成景深 */
body[data-screen=story] .scene-image{transform:translate3d(calc(var(--cx,0)*1px),calc(var(--cy,0)*1px),0) scale(1.07);will-change:transform}
body[data-screen=story] #scene-layers{transform:translate3d(calc(var(--cx,0)*1.7px),calc(var(--cy,0)*1.7px),0) scale(1.07);will-change:transform}
.stage.leaving{animation:stageOut .46s ease forwards}
@keyframes stageOut{to{opacity:0;transform:translateY(8px)}}
.stage.leaving .sprite{animation:none}
@media(max-width:760px){body[data-screen=story] .scene-shade{background:linear-gradient(180deg,#0f2b2a99 0,transparent 15%,transparent calc(var(--split) - 150px),#0f2b2a calc(var(--split) - 2px),#0f2b2a 100%)}}

/* ═══ 统一：深青宣纸 + 三层山 + 一线金 ═══ */
body[data-screen=story] #scenery{background:#0f2b2a var(--ink-tex) center/cover no-repeat}
#inscription{background:radial-gradient(ellipse at 50% 40%,#5a381e55,transparent 58%),radial-gradient(ellipse at 50% 100%,#a3381b24,transparent 55%),#0f2b2a var(--ink-tex) center/cover no-repeat!important}
#inscription .gold-texture{opacity:.0}
/* 第一幕/终幕：整幅画就是那幅抽象画，山不被压暗；底部控件处用一层深青托住 */
body[data-beat=origin] .scene-image,body[data-beat=end] .scene-image{object-position:50% 100%}
@media(min-width:761px){
  body[data-screen=story][data-beat=origin] .scene-image,body[data-screen=story][data-beat=end] .scene-image{object-position:50% 50%}
  body[data-screen=story][data-beat=origin] .scene-shade,body[data-screen=story][data-beat=end] .scene-shade{background:linear-gradient(90deg,#0f2b2ab3,#0f2b2a60 30%,transparent 55%),linear-gradient(0deg,#0f2b2aeb 0,#0f2b2a99 10%,transparent 24%),linear-gradient(180deg,#0f2b2a80,transparent 18%)}
}
body[data-beat=origin] .atmosphere,body[data-beat=end] .atmosphere{opacity:.3}

/* 命局总批 */
#st-marks{list-style:none;margin:2px 0 14px;padding:0;border-top:1px solid #e0bf7c2e}
#st-marks li{border-bottom:1px solid #e0bf7c24;cursor:pointer;-webkit-tap-highlight-color:transparent}
#st-marks .mk{display:grid;grid-template-columns:26px 1fr 16px;align-items:center;padding:9px 0 8px}
#st-marks .mk i{font-style:normal;font-family:var(--brush);font-size:17px;color:#ef735c;line-height:1}
#st-marks .mk b{font-family:var(--brush);font-weight:400;font-size:19px;letter-spacing:.07em;color:#f6e7c8;line-height:1.3;transition:color .3s}
#st-marks li.open .mk b{color:#ffd98a}
#st-marks .mk u{position:relative;width:9px;height:9px;justify-self:end;text-decoration:none}
#st-marks .mk u::before,#st-marks .mk u::after{content:'';position:absolute;left:0;top:4px;width:9px;height:1px;background:#e0bf7ccc;transition:transform .35s cubic-bezier(.3,1.4,.5,1)}
#st-marks .mk u::after{transform:rotate(90deg)}
#st-marks li.open .mk u::after{transform:rotate(0)}
#st-marks .mm{display:grid;grid-template-rows:0fr;transition:grid-template-rows .45s cubic-bezier(.3,.8,.3,1)}
#st-marks li.open .mm{grid-template-rows:1fr}
#st-marks .mm>div{overflow:hidden;min-height:0}
#st-marks .mm span{display:block;padding:0 22px 11px 26px;font-size:13px;line-height:1.8;letter-spacing:.03em;color:#fff3d9d0;opacity:0;transform:translateY(-4px);transition:opacity .4s .08s,transform .4s .08s}
#st-marks li.open .mm span{opacity:1;transform:none}
.copy-enter #st-marks li{animation:rise .8s cubic-bezier(.2,.75,.2,1) both;animation-delay:calc(var(--j,0)*95ms + 220ms)}
body[data-beat=origin] #st-head[data-len=short]{font-size:clamp(28px,2.6vw,38px)}
@media(max-width:760px){
  body[data-beat=origin] .scene-image,body[data-beat=end] .scene-image{object-position:50% 100%}
  #st-marks .mk b{font-size:17.5px}
  #st-marks .mm span{font-size:12.5px}
  body[data-beat=origin] #st-lines{display:none}
  body[data-screen=story] .scene-shade{background:linear-gradient(180deg,#0f2b2a99 0,transparent 15%,transparent calc(var(--split) - 150px),#0f2b2a calc(var(--split) - 2px),#0f2b2a calc(var(--split) + 18px),#0f2b2a00 calc(var(--split) + 84px),#0f2b2a00 100%)}
}

@media(max-width:760px){body[data-screen=story] .scene-image{transform-origin:50% 100%}#st-marks .mk{padding:8px 0 7px}}

/* ═══ 章：命、归用大字，其余九章的印位置、大小、落法各不相同 ═══ */
#st-seal,#st-stamp,#st-glyph{display:none}
#st-seal{width:50px;height:50px;flex:none;background:center/contain no-repeat;border-radius:0;box-shadow:none;font-size:0;-webkit-text-stroke:0;filter:drop-shadow(0 3px 9px #0009);transform:rotate(-3deg)}
#st-stamp{position:absolute;z-index:9;pointer-events:none;background:center/contain no-repeat;filter:drop-shadow(0 4px 12px #000a);--r:0deg;transform:rotate(var(--r))}
#story[data-seal=row] #st-seal{display:block}
#story[data-seal=corner] #st-stamp,#story[data-seal=cornerL] #st-stamp,#story[data-seal=edge] #st-stamp,#story[data-seal=ghost] #st-stamp{display:block}
#story[data-seal=corner] #st-stamp{width:66px;height:66px;top:68px;right:max(7vw,22px);--r:5deg}
#story[data-seal=cornerL] #st-stamp{width:60px;height:60px;top:70px;left:max(7vw,22px);--r:-6deg}
#story[data-seal=edge] #st-stamp{width:78px;height:78px;top:calc(var(--split,50dvh) - 52px);right:max(7vw,22px);--r:-4deg}
#story[data-seal=edge] .st-panel{top:calc(var(--split,50dvh) + 26px)}
#story[data-seal=ghost] #st-stamp{width:176px;height:176px;top:calc(var(--split,50dvh) + 14px);right:-6vw;z-index:7;--r:-9deg;opacity:.17;filter:none}
.stamp-go #st-stamp{animation:stampDown .72s cubic-bezier(.28,1.5,.5,1) .38s both}
.stamp-go[data-seal=ghost] #st-stamp{animation:ghostIn 1.6s ease .3s both}
@keyframes stampDown{0%{opacity:0;transform:rotate(calc(var(--r) - 10deg)) scale(1.9)}55%{opacity:1;transform:rotate(var(--r)) scale(.94)}100%{opacity:1;transform:rotate(var(--r)) scale(1)}}
@keyframes ghostIn{from{opacity:0;transform:rotate(calc(var(--r) - 5deg)) scale(1.08)}to{opacity:.17;transform:rotate(var(--r)) scale(1)}}
.copy-enter #st-seal{animation:stamp .62s cubic-bezier(.3,1.5,.5,1) .12s both}
/* 命 / 归：用画里三层山的颜色做成的大字，一线金系着它 */
#story[data-seal=glyph] #st-glyph{display:block;position:absolute;z-index:6;pointer-events:none;font-family:var(--brush);line-height:1.04;font-size:clamp(104px,30vw,132px);right:max(7vw,22px);top:64px;color:transparent;background:linear-gradient(180deg,#f4ce8f 0%,#e0a24a 30%,#cd6a2b 62%,#a3381b 100%) 0 0/100% 190%;-webkit-background-clip:text;background-clip:text;filter:drop-shadow(0 0 26px #cd813138);animation:glyphIn 1.7s cubic-bezier(.2,.7,.2,1) both,glyphShift 11s ease-in-out 1.7s infinite alternate}
body[data-beat=end] #st-glyph{background-image:linear-gradient(0deg,#f4ce8f 0%,#e0a24a 30%,#cd6a2b 62%,#a3381b 100%)}
#story[data-seal=glyph] #st-glyph::after{content:'';position:absolute;left:50%;top:100%;width:1px;height:90px;background:linear-gradient(180deg,#e0bf7caa,transparent);transform-origin:top;animation:threadDrop 1.6s .5s cubic-bezier(.2,.7,.2,1) both}
@keyframes glyphIn{from{opacity:0;filter:blur(14px) drop-shadow(0 0 0 #0000);transform:scale(1.12) translateY(-8px)}to{opacity:1}}
@keyframes glyphShift{to{background-position:0 100%}}
@keyframes threadDrop{from{transform:scaleY(0)}to{transform:scaleY(1)}}
#story[data-seal=glyph] .st-top::before{content:'';width:26px;height:1px;background:var(--gold);flex:none;align-self:center;margin-right:-2px}
@media(min-width:761px){
  #story[data-seal=corner] #st-stamp{width:92px;height:92px;top:17vh;right:9vw}
  #story[data-seal=cornerL] #st-stamp{width:84px;height:84px;top:25vh;right:21vw}
  #story[data-seal=edge] #st-stamp{width:100px;height:100px;top:auto;bottom:21vh;right:9vw}
  #story[data-seal=edge] .st-panel{top:max(118px,17vh)}
  #story[data-seal=ghost] #st-stamp{width:260px;height:260px;top:16vh;right:auto;left:calc(max(6vw,48px) + 250px);opacity:.13}
  @keyframes ghostIn{from{opacity:0;transform:rotate(calc(var(--r) - 5deg)) scale(1.08)}to{opacity:.13;transform:rotate(var(--r)) scale(1)}}
  #story[data-seal=glyph] #st-glyph{font-size:clamp(150px,17vw,250px);right:13vw;top:13vh}
}
@media(prefers-reduced-motion:reduce){#st-stamp,#st-glyph,#st-glyph::after{animation:none!important}}

/* 中间九章：印规整地落在文字区右上角（朱文白文各异，位置统一）；状态徽标收到标题下 */
.st-top{display:grid;grid-template-columns:1fr auto;align-items:start;column-gap:12px;row-gap:9px}
.st-top .st-meta{grid-column:1;grid-row:1}
.st-top .st-badges{grid-column:1;grid-row:2;margin-left:0;justify-self:start}
#story[data-seal=row] #st-seal{display:block;grid-column:2;grid-row:1/3;width:64px;height:64px;margin-top:-4px;transform:none;filter:drop-shadow(0 3px 10px #000a)}
.copy-enter #st-seal{animation:sealDown .66s cubic-bezier(.28,1.5,.5,1) .2s both}
@keyframes sealDown{0%{opacity:0;transform:scale(1.8) rotate(-6deg)}55%{opacity:1;transform:scale(.94) rotate(0)}100%{opacity:1;transform:none}}
@media(max-width:760px){#story[data-seal=row] #st-seal{width:56px;height:56px;margin-top:-3px}}
#story[data-seal=glyph] .st-top::before{display:none}
@media(min-width:761px){#story .st-panel{-webkit-mask-image:linear-gradient(180deg,#000 calc(100% - 30px),transparent);mask-image:linear-gradient(180deg,#000 calc(100% - 30px),transparent)}}

/* ═══ 封面与生辰页：不改版式，只打磨 ═══ */
#cover{background:radial-gradient(ellipse at 50% 40%,#fcf8ee 0,#f6f1e6 52%,#ebe3d0 100%)}
#entry-caption{font-family:var(--brush);font-size:15px;letter-spacing:.5em;text-indent:.5em;color:#6b5f50;margin:36px 0 8px}
#cover .primary{font-family:var(--brush);font-size:24px;letter-spacing:.42em;text-indent:.42em;gap:18px;min-width:196px;padding:14px 0 17px;border:0;position:relative;color:#a8402e}
#cover .primary::after{content:'';position:absolute;left:0;right:0;bottom:0;height:1px;background:linear-gradient(90deg,transparent,#a8402e 28%,#a8402e 72%,transparent);transform:scaleX(0);animation:lineDraw 1.8s .5s cubic-bezier(.2,.7,.2,1) forwards}
#cover .primary span{font-family:var(--sans);animation:nudge 2.6s ease-in-out 2s infinite}
@keyframes lineDraw{to{transform:scaleX(1)}}
@keyframes nudge{0%,100%{transform:translate(0,0)}50%{transform:translate(3px,-3px)}}
body[data-screen=birth] header{text-shadow:0 1px 12px #3c2410b8,0 0 3px #3c24108f}
body[data-screen=birth] header::before{content:'';position:absolute;inset:-26px -6vw -36px;background:linear-gradient(180deg,#3a22106b,transparent);pointer-events:none;z-index:-1}
@media(max-width:760px){#birth .birth-copy .eyebrow{font-size:11px;letter-spacing:.22em}#album-page-number{font-size:12px}#birth .footnote,#birth .advanced .footnote{font-size:11px}#birth #form-error{font-size:12px}}
@media(max-width:760px){body #birth .field-label{font-size:12px;letter-spacing:.16em;margin-bottom:6px}body #birth .advanced summary{font-size:12px}body #birth #form-error{font-size:12px;color:#a4482c}}
/* 题字页：轻微下沉，让柱组更居中；次要按钮加大点按区 */
#inscription #gold-skip{font-size:12px;letter-spacing:.24em;padding:14px 18px;color:#a99a80}

/* ═══ 样稿 A 的两处小细节：左侧朱红竖线 + 圆「批」（只用于中间九章，版式不动） ═══ */
#story[data-seal=row] #st-lines p{border-left:2px solid #c9432f;padding-left:11px}
#story[data-seal=row] #st-omens li{padding-left:0;grid-template-columns:24px auto 1fr;align-items:center}
#story[data-seal=row] #st-omens li::before{display:none}
#story[data-seal=row] #st-omens li::after{content:'批';grid-column:1;grid-row:1;font-family:var(--brush);font-size:15px;color:#e9553f;border:1px solid #e9553f;border-radius:50%;width:19px;height:19px;display:grid;place-items:center;line-height:1;transform:rotate(-8deg)}
#story[data-seal=row] #st-omens li b{grid-column:2;grid-row:1}
#story[data-seal=row] #st-omens li span{grid-column:2/4;grid-row:2}
#story[data-seal=row] #st-omens li.up::after{color:#f0b95c;border-color:#f0b95c}

/* 「今」章：印小小的，落在标题左上角 */
#story[data-seal=row][data-sealpos=left] .st-top{grid-template-columns:auto 1fr;column-gap:12px;align-items:center}
#story[data-seal=row][data-sealpos=left] #st-seal{grid-column:1;grid-row:1/3;align-self:center;justify-self:start;width:34px;height:34px;transform:rotate(-4deg);filter:drop-shadow(0 2px 6px #0008)}
#story[data-seal=row][data-sealpos=left] .st-meta{grid-column:2;grid-row:1}
#story[data-seal=row][data-sealpos=left] .st-badges{grid-column:2;grid-row:2}
@media(max-width:760px){#story[data-seal=row][data-sealpos=left] #st-seal{width:32px;height:32px}}

/* 烧字衔接：量版面时关掉动画；落到故事页时不再重播入场/淡入，直接是"已经有字"的那一页 */
body.measuring *,body.measuring *::before,body.measuring *::after{animation:none!important;transition:none!important}
body.no-enter #story *,body.no-enter #story *::before,body.no-enter #story *::after,body.no-enter .scene-image{animation:none!important;transition:none!important}

/* 命/归（竖排叠放时）：画多露一些，深青只在文字区下方托住，不再把画压成一条 */
@media(max-width:760px){
  body[data-beat=origin],body[data-beat=end]{--split:45dvh}
  body[data-screen=story][data-beat=origin] .scene-shade,body[data-screen=story][data-beat=end] .scene-shade{background:linear-gradient(180deg,#0f2b2a80 0,transparent 14%,transparent calc(var(--split) - 120px),#0f2b2a88 calc(var(--split) - 40px),#0f2b2af0 calc(var(--split) + 8px),#0f2b2a calc(var(--split) + 40px),#0f2b2a 100%)}
}
@media(max-width:760px) and (max-height:560px){
  body[data-beat=origin],body[data-beat=end]{--split:40dvh}
}

/* 高考年份（生辰册第三页）：一个滚轮 + 一句说明 */
#birth .exam-row{display:grid;grid-template-columns:96px 1fr;align-items:center;gap:6px 18px;margin-top:4px;padding-top:10px;border-top:1px solid #9d846233}
#birth .exam-row .exam-hint{margin:0;font-size:12px;line-height:1.75;color:#a08c6a;letter-spacing:.04em}
@media(max-width:760px){#birth .exam-row{grid-template-columns:92px 1fr}#birth .exam-row .exam-hint{font-size:10.5px}}
#birth .exam-row .birth-reel{grid-template-rows:14px 72px 14px}
#birth .exam-row .reel-viewport{height:72px; -webkit-mask-image:none; mask-image:none}
#birth .exam-row .reel-track{top:-39px}
#birth .exam-row .reel-viewport::after{top:20px;height:32px}
#birth .exam-row .reel-row{height:30px;line-height:30px}
#birth .album-gender>.field-label{display:none}
#birth .advanced,#birth .footnote{display:none!important}
#open-chapters{display:none!important}
#download{display:none!important}

/* ═══ 终章：合卷 ═══ */
#finale{position:fixed;inset:0;z-index:200;pointer-events:none;overflow:hidden;background:transparent}
#finale[data-ready=true]{pointer-events:auto;cursor:pointer}
#finale-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 50%}
#finale-text{position:absolute;left:17vw;top:14vh;writing-mode:vertical-rl;text-orientation:upright;font-family:var(--brush);font-size:clamp(34px,min(5.4vw,8.2vh),80px);line-height:1.75;letter-spacing:.2em;color:#0a3a43;text-shadow:0 1px 0 #ffffff33,0 0 18px #3fd9e633}
#finale-text p{margin:0;white-space:nowrap}
#finale-text p:nth-child(2){margin-top:2.7em}
#finale-text span{display:inline-block}
#finale-text span.w{display:inline-block;width:.78em;height:.62em;margin-top:.5em;transform:rotate(-9deg)}
#finale-text .stamp{display:inline-block;vertical-align:top;width:1.08em;height:1.08em;margin-top:.5em;margin-left:.04em;transform-origin:50% 50%;filter:drop-shadow(0 1px 1px #0a3a4355)}
#finale-text .stamp img{display:block;width:100%;height:100%}
#finale-text span.w svg{display:block;width:100%;height:100%;overflow:visible}
#finale-text span.w path{fill:none;stroke:currentColor;stroke-width:3.8;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:90;filter:drop-shadow(0 1px 0 #ffffff33) drop-shadow(0 0 18px #3fd9e633)}
#finale-hint{position:absolute;left:0;right:0;bottom:max(34px,env(safe-area-inset-bottom));text-align:center;font-family:var(--brush);font-size:15px;letter-spacing:.5em;text-indent:.5em;color:#0a3a43}
@media(max-width:760px){
  #finale-art{object-position:16% 100%}
  body[data-screen=story]{--story-lift:calc(var(--split) * .36)}
  body[data-screen=story] .scene-image{transition:opacity 1.5s ease,filter 1.2s,translate .6s cubic-bezier(.16,1,.3,1)}
  body[data-screen=story] .st-panel{transition:top .6s cubic-bezier(.16,1,.3,1),padding-bottom .6s cubic-bezier(.16,1,.3,1)}
  body[data-screen=story] #story::before{content:'';position:absolute;left:0;right:0;top:calc(var(--split) + 6px - var(--story-lift) - 64px);height:calc(var(--story-lift) + 58px);z-index:7;pointer-events:none;opacity:0;transition:opacity .5s ease;background:linear-gradient(180deg,rgba(15,43,42,0) 0,rgba(15,43,42,.15) 26px,rgba(15,43,42,.55) 48px,rgba(15,43,42,.9) 64px,#0f2b2a 100%)}
  body[data-screen=story].story-reading #story .st-panel{top:calc(var(--split) + 6px - var(--story-lift));padding-bottom:calc(14px + var(--story-lift))}
  body[data-screen=story].story-reading #story::before{opacity:1}
  body[data-screen=story].story-reading.read-move .scene-image{translate:0 calc(-1 * var(--story-lift))}
  body[data-screen=story].story-reading.read-move #story::before{display:none}
  body.no-enter[data-screen=story] #story .st-panel{transition:top .6s cubic-bezier(.16,1,.3,1),padding-bottom .6s cubic-bezier(.16,1,.3,1)!important}
  body.no-enter[data-screen=story] #story::before{transition:opacity .5s ease!important}
  body.no-enter[data-screen=story].story-reading.read-move .scene-image{transition:translate .6s cubic-bezier(.16,1,.3,1)!important}
  #finale-text{left:12vw;top:10dvh;font-size:clamp(30px,8.4vw,52px)}
}
#finale-canvas{position:fixed;inset:0;width:100vw;height:100dvh;z-index:210;pointer-events:none}
body.finale-end #entry-caption,body.finale-end #begin,body.finale-end #skip-entry{display:none!important}
#finale-opts{position:absolute;right:max(18px,env(safe-area-inset-right,0px));bottom:max(16px,env(safe-area-inset-bottom,0px));display:flex;justify-content:flex-end;align-items:center;gap:12px;z-index:5}
#finale-opts i{width:1px;height:13px;background:#c4b393}
#finale-opts button{font-family:var(--brush);font-size:14px;letter-spacing:.3em;text-indent:.3em;color:#a8402e;opacity:.85;background:none;border:0;padding:12px 6px;cursor:pointer}
#finale-bye{position:absolute;left:0;right:0;top:46%;text-align:center;margin:0;font-family:var(--brush);font-size:20px;letter-spacing:.5em;text-indent:.5em;color:#8f7f68}

/* 回望：最难 / 最顺的几年，一年一行 */
#st-check .yr{display:grid;grid-template-columns:auto 1fr;column-gap:12px;align-items:baseline;margin:0 0 9px}
#st-check .yr b{grid-row:1/3;font-size:27px;margin:0;color:#f3977f}
#st-check .yr.g b{color:#ffd98a}
#st-check .yr i{font-style:normal;font-size:12px;letter-spacing:.14em;color:var(--gold)}
#st-check .yr span{font-size:13px;line-height:1.7;color:#ffe9c4cc}
#st-check em.second{margin-top:16px}

/* 最初的八个字 */
#eight{position:fixed;inset:0;z-index:180;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(14px,3.4vh,34px);background:radial-gradient(ellipse at 50% 42%,#173a38,#0b2120 70%);cursor:pointer;padding:0 16px}
#eight[hidden]{display:none}
#eight .eight-title{margin:0;font-family:var(--brush);font-size:clamp(17px,2.2vw,24px);letter-spacing:.5em;text-indent:.5em;color:#e0bf7c}
#eight .eight-grid{display:grid;grid-template-columns:repeat(4,auto);gap:clamp(8px,2.6vw,40px)}
#eight .eight-col{display:flex;flex-direction:column;align-items:center}
#eight .eight-col svg{display:block;width:clamp(64px,min(17.5vw,22vh),170px);height:clamp(64px,min(17.5vw,22vh),170px);filter:drop-shadow(0 0 14px #e8a04a40)}
#eight .eight-col .eight-fallback{font-family:var(--brush);font-size:clamp(56px,13vw,120px);color:#efb866;line-height:1.1}
#eight .eight-col i{font-style:normal;margin-top:8px;font-size:12px;letter-spacing:.4em;text-indent:.4em;color:#b79c70}
#eight .eight-hint{margin:0;font-size:12px;letter-spacing:.5em;text-indent:.5em;color:#e0bf7c88}

/* 结局页：八个字直接摆在文末（取代“再看最初的八个字”按钮） */
#echo-gold{display:none}
#eight-inline{margin:22px 0 4px;display:flex;flex-direction:column;align-items:center;gap:12px}
#eight-inline .eight-title{margin:0;font-family:var(--brush);font-size:15px;letter-spacing:.5em;text-indent:.5em;color:#e0bf7c}
#eight-inline .eight-grid{display:grid;grid-template-columns:repeat(4,auto);gap:clamp(6px,3vw,22px)}
#eight-inline .eight-col{display:flex;flex-direction:column;align-items:center}
#eight-inline .eight-col svg{display:block;width:clamp(48px,min(15vw,15vh),84px);height:clamp(48px,min(15vw,15vh),84px);filter:drop-shadow(0 0 10px #e8a04a40)}
#eight-inline .eight-col .eight-fallback{font-family:var(--brush);font-size:clamp(44px,11vw,72px);color:#efb866;line-height:1.1}
#eight-inline .eight-col i{font-style:normal;margin-top:4px;font-size:12px;letter-spacing:.4em;text-indent:.4em;color:#b79c70}
/* 封面只需要“另一个我 / 启卷”几个字：小字体立即到，整副毛笔字等到命盘页再下，首屏少 850KB */
@font-face{font-family:"BrushUI";font-weight:400;font-style:normal;font-display:swap;src:url(../fonts/brush-ui.woff2) format("woff2")}
.wordmark,#cover .primary{font-family:'BrushUI','WenKai',serif}
/* 启卷/焚字时把看不见的背景动画停掉，省下 CPU 给当前动画。 */
body.motion-paused #cover *,body.motion-paused #inscription *,body.motion-paused #story .scene-image,body.motion-paused #story .scene-shade,body.motion-paused #story .st-bead{animation-play-state:paused!important}
/* 全局右下角加载提示：真实阻塞超过 270ms 才出现，引用计数归零后淡出。 */
#loading-chip{position:fixed;right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));z-index:60;display:flex;align-items:center;gap:7px;padding:0;border:0;border-radius:0;background:none;box-shadow:none;color:#fff6e3e6;font-size:11px;letter-spacing:.08em;text-shadow:0 1px 4px #171006b8;pointer-events:none;opacity:0;visibility:hidden;transform:translateY(4px);transition:opacity .18s ease,transform .18s ease,visibility .18s}
#loading-chip.is-visible{opacity:1;visibility:visible;transform:none}
#loading-chip .loading-seal{width:24px;height:26px;background:url('../img/seal-paper.webp') center/contain no-repeat;clip-path:inset(0 0 100% 0);animation:sealLoadingFill 1.15s ease-in-out infinite}
@keyframes sealLoadingFill{0%{clip-path:inset(0 0 100% 0)}55%,78%{clip-path:inset(0)}100%{clip-path:inset(0 0 100% 0)}}
@media(prefers-reduced-motion:reduce){#loading-chip .loading-seal{animation:none;clip-path:none}}
/* 手机上年份「1996年」在 26px 时会比滚轮宽 5px，被右侧裁掉；最终覆盖回合适的字号。 */
@media(max-width:760px){#birth .reel-row.selected{font-size:clamp(16px,4.8vw,19px)}}
/* 书本底部导航：三件事都要在一行里，不能把“上一步/继续填写”挤成竖排。 */
#birth .album-navigation{gap:8px;padding:10px 0 0;min-height:34px;flex-wrap:nowrap}
#birth .album-navigation button{font-size:12px;line-height:1.4;white-space:nowrap;flex:none;padding:6px 0;letter-spacing:.02em}
#album-page-number{font-size:10px;line-height:1.4;white-space:nowrap;margin-right:auto;letter-spacing:.1em}
@media(max-width:760px){#birth .album-navigation{gap:6px;padding-right:14px}#birth .album-navigation button{font-size:clamp(12px,3.85vw,15px)}#album-page-number{font-size:clamp(11px,3.33vw,13px)}}
/* 满屏取景，向左侧多露一点书页；不缩书本，彻底去掉四周边带。 */
@media(max-width:760px){
  #birth .album-art img{object-fit:cover;object-position:0 50%}
}
#birth .footnote a{color:inherit;text-decoration:none}
#birth .footnote a:hover{text-decoration:underline}

/* 手机填写页：前两步的翻页条离书页底边太近，抬高后留出装订与安全区呼吸。 */
@media(max-width:760px){
  #birth-form[data-album-step="1"] .album-navigation,
  #birth-form[data-album-step="2"] .album-navigation{margin-bottom:22px}
  /* 终章的两列竖排是整屏的主视觉，手机上再放大一档；提示也一起放大。 */
  #finale-text{left:10vw;top:9dvh;font-size:clamp(34px,10vw,58px);line-height:1.82}
  #finale-hint{bottom:max(40px,env(safe-area-inset-bottom));font-size:17px;letter-spacing:.55em}
}
