.divination{background:radial-gradient(ellipse at 50% 49%,#202332,#030408 72%);overflow:hidden;isolation:isolate}.divination:after{display:none}
.book-transition{position:fixed;inset:0;pointer-events:none;perspective:1600px;overflow:hidden;z-index:0}
.book-world{position:absolute;left:50%;top:47%;width:min(90vw,920px);aspect-ratio:1.5;transform-style:preserve-3d;transform-origin:68% 52%;will-change:transform}
.book-floor{position:absolute;inset:2% -1% -1% 50%;border-radius:1.3%;background:#141928;box-shadow:0 34px 95px #000c,0 9px 12px #0009;opacity:0;transform:translateZ(-6px)}.book-transition[data-phase=pullback] .book-floor,.book-transition[data-phase=open] .book-floor,.book-transition[data-phase=closing] .book-floor,.book-transition[data-phase=closed] .book-floor{opacity:1;transition:opacity .5s}
.book-surface{opacity:0}.book-right-surface,.book-left-leaf{position:absolute;top:0;width:50%;height:100%;box-sizing:border-box}
.book-right-surface{left:50%;border-radius:0 1% 1% 0;background:linear-gradient(90deg,#d7d0ca,#f9f5ec 5%,#f5f0e7 85%,#dedad5);box-shadow:3px 4px 0 #c7c2be,5px 7px 0 #eee9e2,7px 10px 0 #b9b8b9;overflow:visible;transform:translateZ(-2px)}
.book-right-surface:before,.book-left-page:before{content:"";position:absolute;inset:3% 4%;background:repeating-linear-gradient(0deg,transparent 0 23px,#9c9dc424 23px 24px),repeating-linear-gradient(90deg,transparent 0 23px,#9c9dc424 23px 24px);border:1px solid #a5a3b144;pointer-events:none}
.book-left-leaf{left:0;transform-origin:100% 50%;transform-style:preserve-3d;z-index:20}
.book-left-page,.book-front-cover{position:absolute;inset:0;backface-visibility:hidden;-webkit-backface-visibility:hidden;border-radius:1.4% 0 0 1.4%;overflow:hidden}
.book-left-page{transform:translateZ(.2px);background:linear-gradient(90deg,#eae7e1,#faf6ef 10%,#f7f2e9 94%,#c7c2bd);box-shadow:-3px 4px 0 #c7c2be,-5px 7px 0 #eee9e2}
.book-left-page:after{content:"";position:absolute;top:0;right:0;height:100%;width:4%;background:linear-gradient(90deg,transparent,#72696322)}
.scrap-heading{position:absolute;top:5%;left:9%;font:clamp(7px,1vw,13px) Georgia,serif;letter-spacing:.15em;color:#817080}
.scrap-label{position:absolute;top:11%;left:9%;font:clamp(14px,2.6vw,34px) "KaiTi","SimSun",serif;color:#a57189;letter-spacing:.08em;transform:rotate(-4deg);border-bottom:2px solid #bdb0cb55}
.page-photo-grid{position:absolute;display:grid;grid-template-columns:repeat(var(--cols,6),minmax(0,1fr));grid-template-rows:repeat(var(--rows,7),minmax(0,1fr));gap:2.5%;align-items:center}
.page-grid-left{inset:25% 10% 14% 9%}.page-grid-right{inset:12% 8% 15% 9%;}
.page-photo-grid img{display:block;height:100%;width:auto;max-width:100%;min-height:0;justify-self:center;aspect-ratio:1;object-fit:contain;background:#fff;padding:3%;border:1px solid #c7c1ce66;transform:rotate(var(--slant));box-shadow:1px 2px 3px #3528332b;filter:none}
.page-footer,.scrap-note{position:absolute;bottom:5%;font:clamp(7px,1.05vw,14px) "KaiTi","SimSun",serif;color:#84667d;letter-spacing:.08em}.page-footer{left:10%}.scrap-note{right:10%;bottom:7%;transform:rotate(-3deg)}
.book-tab{position:absolute;right:-5%;width:11%;height:12%;display:grid;place-items:center;font:clamp(8px,1vw,13px) Georgia,serif;border-radius:0 14% 14% 0;color:#665471;writing-mode:vertical-rl;letter-spacing:.12em;box-shadow:2px 3px 2px #0002}.tab-one{top:12%;background:#c5b4dc}.tab-two{top:35%;background:#debf9b}
.washi{position:absolute;width:22%;height:4%;background:repeating-linear-gradient(45deg,#b5a6cfaa 0 5px,#ddcce4aa 5px 10px);transform:rotate(-34deg)}.washi-one{top:22%;left:2%}.washi-two{bottom:11%;right:3%;transform:rotate(-20deg)}
.paper-star{position:absolute;color:#b094c1;font-size:clamp(22px,5vw,64px);line-height:1}.star-a{top:1%;right:9%;transform:rotate(20deg)}.star-b{bottom:3%;left:6%;font-size:clamp(17px,3vw,42px);color:#c8ac6c}
.book-binding{position:absolute;top:8%;bottom:8%;left:47.4%;width:5.2%;z-index:22;display:flex;flex-direction:column;justify-content:space-between}
.book-binding i{height:2.5%;width:100%;border-radius:50%;background:linear-gradient(0deg,#786984,#dfd6e9 45%,#96849b);box-shadow:0 2px 2px #5b4e6066;position:relative}.book-binding i:before,.book-binding i:after{content:"";position:absolute;top:-45%;width:17%;height:180%;border-radius:50%;background:#514853;z-index:-1}.book-binding i:before{left:0}.book-binding i:after{right:0}
.book-photo-stack{position:absolute;inset:0;z-index:10;transform:translateZ(3px)}
.book-photo{position:absolute;left:50%;top:26%;width:36%;aspect-ratio:1 / 1.17;margin:0;background:#faf7ef;padding:1.2% 1.2% 4.8%;border:1px solid #bfb7ae;box-shadow:0 5px 11px #3323244d,0 2px 4px #0003;opacity:0;transform-origin:50% 50%;will-change:transform,opacity}
.book-photo img{display:block;width:100%;height:100%;object-fit:contain;background:#fff;filter:none;opacity:1}.book-photo figcaption{position:absolute;bottom:3.5%;left:4%;right:4%;text-align:right;font:clamp(6px,1vw,13px) "KaiTi","SimSun",serif;color:#8f779b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.book-front-cover{transform:rotateY(180deg) translateZ(.2px);background:repeating-linear-gradient(100deg,#ffffff03 0 1px,transparent 1px 4px),linear-gradient(120deg,#1b2131,#090d17 80%);box-shadow:inset 0 0 0 2px #a58b5d,8px 7px 0 #0a0d14;display:flex;align-items:center;flex-direction:column;justify-content:center;color:#d5bd8b}
.book-front-cover:before{content:"";position:absolute;inset:5%;border:1px solid #c7ac7066;border-radius:2px}.cover-corner{position:absolute;top:10%;font:clamp(6px,1vw,12px) Georgia,serif;letter-spacing:.18em}.cover-emblem{font:clamp(30px,7vw,88px) Georgia,serif;position:relative;border:1px solid #c7ac7077;padding:3% 8%;line-height:1.2;margin-bottom:8%}.cover-emblem>span{position:absolute;right:-15%;bottom:-17%;font-size:.4em;background:#101522}.book-front-cover>strong{font:clamp(16px,3vw,38px) "SimSun",serif;letter-spacing:.14em}.cover-subtitle{font:clamp(6px,1vw,12px) "SimSun",serif;margin-top:6%;color:#a8a8ae}.cover-edition{position:absolute;bottom:9%;font:clamp(6px,.9vw,10px) Georgia,serif;letter-spacing:.2em}
.book-sparkles{position:absolute;inset:0;z-index:40}.book-sparkles>span{position:absolute;left:50%;top:47%;font-size:clamp(18px,2.6vw,33px);text-shadow:0 0 15px currentColor}
.divination #divinationTitle{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.divination #divinationMessage{position:absolute;bottom:12%;left:20px;right:20px;z-index:2;font-family:"SimSun",serif;font-size:16px;letter-spacing:.16em;color:#c9c5d1;text-shadow:0 2px 10px #000}
.divination #skipAnimation{position:absolute;bottom:5%;left:50%;transform:translateX(-50%);margin:0;z-index:3;padding:10px 22px;white-space:nowrap;background:#080b12b3;border:1px solid #c7b68644;color:#d8c7a4}
@media(max-width:700px){.book-world{width:90vw;top:46%}.book-photo{border-width:.5px}.page-photo-grid{gap:2%}.divination #divinationMessage{bottom:17%;font-size:13px;letter-spacing:.09em}.divination #skipAnimation{bottom:9%}.book-binding i{box-shadow:0 1px 1px #5b4e6066}}
@media(prefers-reduced-motion:reduce){.book-transition{display:none}.book-world,.book-photo{will-change:auto}}

.divination #divinationMessage{transition:opacity .3s}.divination[data-book-phase=stacking] #divinationMessage{opacity:0}

/* A close camera and physical page block, shared by the foreground and backdrop. */
.book-transition .book-world{width:max(114vw,130svh);top:50%;transform-origin:68% 58%;--book-depth:clamp(48px,6vw,110px)}
.book-paper-block{position:absolute;left:50%;top:0;width:50%;height:100%;transform-style:preserve-3d}
.book-fore-edge,.book-bottom-edge,.book-spine-edge,.book-back-board{position:absolute;backface-visibility:visible;box-sizing:border-box}
.book-fore-edge{left:100%;top:0;height:100%;width:var(--book-depth,42px);transform-origin:0 50%;transform:rotateY(90deg);background:repeating-linear-gradient(90deg,#eee3cc 0 2px,#ad9e88 2px 3px,#f8efdb 3px 5px);box-shadow:inset 0 0 12px #58453155}
.book-bottom-edge{left:0;top:100%;width:100%;height:var(--book-depth,42px);transform-origin:50% 0;transform:rotateX(-90deg);background:repeating-linear-gradient(0deg,#efe5d1 0 2px,#a89a85 2px 3px,#e3d4ba 3px 5px);box-shadow:inset 0 -6px 14px #36281766}
.book-spine-edge{right:100%;top:0;width:var(--book-depth,42px);height:100%;transform-origin:100% 50%;transform:rotateY(-90deg);background:linear-gradient(90deg,#171827,#515064,#101320);border:2px solid #c0a575}
.book-back-board{inset:-1%;transform:translateZ(calc(-1 * var(--book-depth,42px)));background:#131724;border:3px solid #bba375;border-radius:1%;box-shadow:0 35px 70px #000b}
.book-surface{transform-style:preserve-3d}.book-right-surface{transform:translateZ(0)}.book-left-leaf{transform-origin:100% 50%;overflow:visible}.book-front-cover{box-shadow:inset 0 0 0 3px #a58b5d,0 0 0 4px #11131e,3px 3px 0 5px #c3b799}
.book-photo-stack{transform-origin:74% 53%}.book-photo{top:23%;padding:1% 1% 3.5%;aspect-ratio:1 / 1.14}.book-photo figcaption{bottom:2.2%;font-size:clamp(10px,1.2vw,19px)}
.scrap-photo{display:block;position:relative;width:100%;height:100%;min-height:0;perspective:800px;transform:rotate(var(--slant))}.scrap-photo-turn{display:block;position:relative;width:100%;height:100%;transform-style:preserve-3d;transition:transform 3.6s cubic-bezier(.3,0,.15,1)}
.page-photo-grid .scrap-photo img,.scrap-photo-back{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;backface-visibility:hidden;-webkit-backface-visibility:hidden;transform:none;box-shadow:1px 2px 4px #35283336}
.scrap-photo-back{display:grid;place-items:center;background:#152130 url('assets/reunion-back.svg') center/100% 100%;border:1px solid #cbb581;transform:rotateY(180deg);font:30px Georgia;color:transparent}
.scrap-photo.is-backed .scrap-photo-turn{transform:rotateY(180deg)}.scrap-photo.is-revealed .scrap-photo-turn{transform:rotateY(0);transition-duration:.8s}
.scrap-sticker{position:absolute;pointer-events:none;font-family:Georgia,serif}.sticker-heart{right:4%;bottom:15%;font-size:clamp(30px,5vw,78px);color:#bd7c9b;transform:rotate(15deg)}.sticker-star{left:80%;top:9%;font-size:clamp(35px,5vw,80px);color:#c6a652;transform:rotate(-14deg)}.sticker-postmark{right:6%;top:6%;width:14%;aspect-ratio:1;border:3px double #9c829aaa;border-radius:50%;font-size:clamp(7px,1vw,16px);display:grid;place-content:center;text-align:center;color:#9b7896;transform:rotate(18deg)}.scrap-ribbon{position:absolute;bottom:-7%;left:17%;width:5%;height:20%;background:linear-gradient(90deg,#aa778d,#ddaabd 45%,#b7869f);clip-path:polygon(0 0,100% 0,100% 100%,50% 85%,0 100%);box-shadow:0 5px 5px #0003}.scrap-doodle{position:absolute;bottom:6%;right:10%;font-size:clamp(12px,2vw,30px);color:#a59aba}
body[data-scene=divination] .site-header{visibility:hidden}.divination #divinationMessage{bottom:8%;font-size:15px;text-shadow:0 2px 10px #000,0 0 4px #000}.divination #skipAnimation{bottom:2%;background:#080b12cf}.divination[data-book-phase=stacking] #divinationMessage,.divination[data-book-phase=reopening] #divinationMessage{opacity:0}
.book-atmosphere{position:fixed;inset:0;z-index:-2;pointer-events:none;overflow:hidden;opacity:0;transition:opacity .7s;perspective:1800px;background:#05060b}
body[data-scene=ritual] .book-atmosphere,body[data-scene=results] .book-atmosphere{opacity:1}.book-atmosphere .book-world{width:max(125vw,150svh);top:53%;transform:translate(-50%,-50%) rotateZ(-9deg) rotateX(12deg);filter:blur(3.8px);--book-depth:42px}.book-atmosphere .book-surface{opacity:1}.book-atmosphere:after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#05070bef 2%,#05070bac 42%,#05070b75 80%),linear-gradient(0deg,#030407c9,transparent 30%,transparent 75%,#03040788)}
body[data-scene=results] .book-atmosphere .book-world{transform:translate(-50%,-50%) rotateZ(8deg) rotateX(6deg);filter:blur(5px)}body[data-scene=results] .book-atmosphere:after{background:radial-gradient(ellipse at 50% 35%,#05060ae6 8%,#05060aa1 57%,#05060a8c),linear-gradient(0deg,#030407dd,transparent 65%)}
body[data-scene=ritual] .ambient,body[data-scene=results] .ambient{background:#030408}.question-side:before{background:radial-gradient(ellipse,#060810ed 20%,#060810bf 52%,transparent 75%)}.question-side input{background:#e5dbbf08}.deck-halo{display:none}.card-back.has-portrait{background:#0c101a;padding:8px;box-shadow:0 24px 48px #0009;border:1px solid #cfb87e}.has-portrait .card-inner,.has-portrait>.card-corner{display:none}.card-back.has-portrait:before{z-index:2;pointer-events:none;background:none;border-color:#e2c9996b}.deck-portrait{position:absolute;left:7px;top:7px;width:calc(100% - 14px);height:calc(100% - 50px);object-fit:cover;object-position:50% 42%;border-radius:4px;filter:none;opacity:1}.deck-portrait-caption{position:absolute;bottom:18px;left:10px;right:10px;text-align:center;font:14px 'SimSun',serif;letter-spacing:.06em;color:#e0cfab}.deck-caption{color:#e5d7b9}.deck-foot p{color:#d1c5b5}
@media(max-width:700px){.book-transition .book-world{width:130svh;top:50%;--book-depth:52px}.divination #skipAnimation{bottom:7%}.divination #divinationMessage{bottom:14%;font-size:12px}.book-atmosphere .book-world{width:150svh;transform:translate(-60%,-50%) rotateZ(-8deg)}body[data-scene=results] .book-atmosphere .book-world{transform:translate(-63%,-50%) rotateZ(7deg)}.book-atmosphere:after{background:linear-gradient(0deg,#05060b99,#05060bdd 68%,#05060b77)}.deck-portrait{height:calc(100% - 37px)}.deck-portrait-caption{bottom:12px;font-size:10px}.question-side:before{background:radial-gradient(ellipse,#060810ea 25%,#060810ad 57%,transparent 78%)}.book-photo figcaption{font-size:15px}}
@media(prefers-reduced-motion:reduce){.scrap-photo-turn{transition:none!important}.book-atmosphere{transition:none}}

.book-atmosphere.is-setting .scrap-photo-turn{transition:none!important}
.book-atmosphere[data-photos=static]{perspective:none}
.book-atmosphere[data-photos=static] .book-world,body[data-scene=results] .book-atmosphere[data-photos=static] .book-world{left:50%;top:50%;transform:translate(-50%,-50%);perspective:none;transform-style:flat}
.book-atmosphere[data-photos=static] .scrap-photo{perspective:none;transform-style:flat}
.book-atmosphere[data-photos=static] .scrap-photo>img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;transform:none;backface-visibility:visible;-webkit-backface-visibility:visible;transition:none}

/* Pastel animals and hand-made details on the diary pages. */
.diary-sticker{position:absolute;display:block;pointer-events:none;z-index:2;filter:drop-shadow(0 2px 0 #fff) drop-shadow(1px 3px 2px #917d7426)}.diary-sticker svg{display:block;width:100%;height:auto;background:#fff9f055;border-radius:24%;overflow:visible}
.diary-cat{width:17%;right:8%;top:9%;transform:rotate(11deg)}.diary-flower{width:11%;left:3%;bottom:2%;transform:rotate(-14deg)}.diary-bunny{width:16%;left:4%;bottom:0%;transform:rotate(-10deg)}.diary-rainbow{width:24%;left:13%;top:-1%;transform:rotate(-5deg)}.diary-bear{width:14%;right:-3%;top:36%;transform:rotate(12deg)}
.diary-note{position:absolute;left:9%;top:19%;font:clamp(11px,1.6vw,24px) 'KaiTi','STKaiti',serif;letter-spacing:.08em;color:#ad7e95;transform:rotate(-3deg)}.book-left-page .sticker-star{display:none}.page-footer{left:17%;bottom:5%}.book-right-surface .star-a{right:7%;top:1%;font-size:clamp(30px,5vw,76px)}.book-right-surface .star-b{display:none}.washi-one{background:radial-gradient(circle,#e6bac8 25%,transparent 28%) 0 0/10px 10px,#f6dfaa9c;transform:rotate(-24deg)}.washi-two{background:repeating-linear-gradient(45deg,#aacdbbaa 0 7px,#e0eddfa8 7px 14px)}.book-left-page:before,.book-right-surface:before{opacity:.65}.book-atmosphere .diary-sticker{filter:drop-shadow(0 2px 0 #fff)}

.book-atmosphere .diary-cat{top:28%;right:17%;width:17%}.book-atmosphere .diary-bunny{bottom:30%;left:52%;width:17%}.book-atmosphere .diary-bear{right:34%;top:12%;width:17%}.book-atmosphere .diary-rainbow{left:14%;top:58%;width:24%}.book-atmosphere .diary-flower{left:16%;bottom:25%;width:13%}
@media(max-width:700px){.book-atmosphere .diary-bunny{left:10%;bottom:26%;width:20%}.book-atmosphere .diary-bear{right:auto;left:24%;top:11%;width:20%}.book-atmosphere .diary-rainbow{top:47%;left:8%;width:30%}}
/* Full square portraits, tactile paper and rounded lilac binder rings. */
.book-transition .book-world{transform-origin:68% 53%;--book-depth:clamp(76px,8.3vw,146px)}
.book-photo{top:22%;box-sizing:border-box;aspect-ratio:1/1.14;padding:1% 1% 3.5%}
.book-photo img{aspect-ratio:1;height:auto;object-fit:contain}
.book-transition .book-photo{background:#fff9ef url('assets/diary-paper.svg') repeat;background-size:170px}
.book-right-surface,.book-left-page{background-image:url('assets/diary-paper.svg'),linear-gradient(90deg,#fff6e9,#fcf5e9 95%,#ede5da);background-size:170px,100%;border:2px solid #d9c7e5}
.book-left-page{border-radius:1.4% 0 0 1.4%;background-image:url('assets/diary-paper.svg'),linear-gradient(90deg,#f4edde,#fff8ed 14%,#fbf4e9);border-right:0}
.book-right-surface{border-left:0}.book-left-page:after{width:1.1%;background:linear-gradient(90deg,transparent,#a795ab12)}
.book-right-surface:before,.book-left-page:before{border:2px dotted #b8a1d6;opacity:.65;border-radius:3%;background:repeating-linear-gradient(0deg,transparent 0 23px,#ae94c22c 23px 24px),repeating-linear-gradient(90deg,transparent 0 23px,#ae94c22c 23px 24px)}
.book-binding{top:6%;bottom:6%;left:46.7%;width:6.6%;transform:translateZ(7px)}
.diary-ring{display:block;width:100%;height:9%;filter:drop-shadow(1px 4px 2px #64577326)}.diary-ring svg{display:block;width:100%;height:100%;overflow:visible}
.book-fore-edge{background:repeating-linear-gradient(90deg,#faf1df 0 2px,#cbbdb3 2px 2.6px,#fff8ec 2.6px 5px);box-shadow:inset 0 0 8px #b09aba44;border-left:6px solid #b694d4;border-right:6px solid #9676b5;overflow:visible}
.book-bottom-edge{background:repeating-linear-gradient(0deg,#fff6e4 0 2px,#cbbdb6 2px 3px,#f4eadb 3px 5px);border-top:4px solid #b694d4;border-bottom:5px solid #9676b5}
.diary-insert{position:absolute;left:calc(6% + var(--insert) * 10%);top:calc(8% + var(--insert) * 10%);width:18%;height:20%;background:var(--insert-color);border-radius:2px;transform:translateZ(2px) rotate(-4deg);box-shadow:2px 2px 4px #60504438;border:1px solid #ffffff88}.diary-insert:nth-child(3n){height:13%;transform:translateZ(3px) rotate(4deg)}
.book-spine-edge{background:linear-gradient(90deg,#9370b7,#c5a6e0 45%,#aa87c6);border-color:#86649e}
.book-back-board{background:#b79bd4;border-color:#dbc8ea}.book-front-cover{background:repeating-linear-gradient(100deg,#ffffff07 0 1px,transparent 1px 4px),linear-gradient(125deg,#574069,#32223e);box-shadow:inset 0 0 0 3px #d4b8e6,0 0 0 4px #87669f,3px 3px 0 5px #f1dfb6}.cover-emblem>span{background:#44304f}
.diary-memo,.diary-calendar{position:absolute;z-index:3;box-shadow:1px 4px 5px #8b7d7a25;color:#9780b2;font-family:'KaiTi','STKaiti',serif;font-size:clamp(7px,1.1vw,16px);line-height:1.7;border:2px solid #b8a0cd;background:#fff8ef;transform:rotate(-7deg);padding:2%;pointer-events:none}
.diary-memo{left:4%;top:5%;width:29%;background:repeating-linear-gradient(0deg,transparent 0 22px,#cbb4df44 22px 23px),#fff7f0}.diary-memo strong{color:#d88bab;font:italic 1.5em Georgia,serif;display:block}.diary-memo span{display:block}.diary-memo:before{content:'';position:absolute;top:-5%;left:10%;width:70%;height:12%;background:repeating-linear-gradient(45deg,#f1b7cdaa 0 6px,#f6dbe8aa 6px 12px);transform:rotate(7deg)}
.diary-calendar{right:5%;bottom:3%;width:29%;transform:rotate(8deg);background:#fff3b9}.diary-calendar b{display:block;border-bottom:1px solid #b8a0cd;margin-bottom:5%}.diary-calendar span{font-size:1.08em;white-space:nowrap}
.book-left-page .scrap-heading{left:41%;top:6%}.book-left-page .scrap-label{left:42%;top:12%;font-size:clamp(14px,2vw,30px)}.book-left-page .diary-note{top:21%;left:10%}.diary-cat{top:2%;right:3%;width:19%}.page-grid-left{top:29%;bottom:18%}.page-grid-right{bottom:25%;top:17%}.diary-calendar:before{content:'♫';position:absolute;right:-14%;top:-40%;font-size:3em;color:#a788ca;transform:rotate(-12deg);text-shadow:2px 2px #fff}
.diary-floating{font-size:clamp(27px,4.8vw,65px)!important;line-height:1;text-shadow:2px 2px #fff9,-2px -2px #fff9,0 0 15px currentColor!important;filter:drop-shadow(0 4px 6px #0006)}
.deck-portrait{top:15%;width:calc(100% - 14px);height:auto;aspect-ratio:1;object-fit:contain;object-position:center;background:#faf7ef}.card-back.has-portrait{background:linear-gradient(145deg,#30223c,#17131e)}
.book-atmosphere .diary-memo{left:16%;top:10%;width:38%}.book-atmosphere .diary-calendar{right:4%;bottom:7%;width:32%}
.music-toggle{position:fixed;bottom:max(24px,env(safe-area-inset-bottom));left:24px;z-index:90;border:1px solid #c9b99466;border-radius:30px;padding:10px 17px;background:#090d17dd;backdrop-filter:blur(12px);color:#e0d1af;font:14px system-ui;cursor:pointer}.music-toggle[hidden]{display:none}body[data-scene=divination] .music-toggle{visibility:hidden}
@media(max-width:700px){.book-transition .book-world{--book-depth:85px}.deck-portrait{height:auto}.music-toggle{left:14px;bottom:20px;font-size:12px;padding:8px 13px}.diary-ring{height:8%}}

.book-photo-stack{z-index:30;transform:translateZ(12px)}
/* A flat, playful scrapbook: the photographs own the camera movement. */
.flat-diary-scene{perspective:none;background:radial-gradient(ellipse at 50% 45%,#151020,#030308 74%)}
.flat-diary-scene>.book-world{width:max(110vw,145svh);top:50%;left:50%;transform:translate(-50%,-50%);transform-style:flat;perspective:none;opacity:0;will-change:opacity;filter:none}
.flat-diary-scene>.book-photo-stack{position:absolute;inset:0;transform:translate(0,0);transform-origin:50% 50%;z-index:30;will-change:transform;perspective:none}
.flat-diary-scene .book-photo{left:50%;top:50%;width:var(--photo-side);height:var(--photo-side);aspect-ratio:1;padding:6px;border:1px solid #efe5f3;background:#fffaf5;transform:translate(-50%,-50%);border-radius:2px;box-shadow:0 4px 0 #d5c7df66,0 18px 45px #0005}
.flat-diary-scene .book-photo img{width:100%;height:100%;aspect-ratio:1;object-fit:contain;background:#fff;filter:none}
.flat-diary-scene .book-photo figcaption{top:calc(100% + 6px);bottom:auto;left:10%;right:10%;font-size:14px;text-align:center;color:#d9c5e7;text-shadow:0 1px 4px #090509}
.flat-diary-scene[data-phase=stacking] .book-world{opacity:0}.flat-diary-scene[data-phase=open] .book-photo figcaption{color:#9772b7;text-shadow:none}
.flat-diary-scene .book-paper-block,.flat-diary-scene .book-front-cover,.book-atmosphere .book-paper-block,.book-atmosphere .book-front-cover{display:none}
.flat-diary-scene .book-surface,.flat-diary-scene .book-left-leaf,.flat-diary-scene .book-left-page,.flat-diary-scene .book-right-surface,.book-atmosphere .book-surface,.book-atmosphere .book-left-leaf,.book-atmosphere .book-left-page,.book-atmosphere .book-right-surface{transform:none;transform-style:flat;box-shadow:none;backface-visibility:visible;overflow:visible}
.flat-diary-scene .book-left-page,.flat-diary-scene .book-right-surface,.book-atmosphere .book-left-page,.book-atmosphere .book-right-surface{background:#fff9f2 url('assets/diary-paper.svg') repeat;border:3px solid #d4c0eb;border-radius:0}
.flat-diary-scene .book-left-page:after,.book-atmosphere .book-left-page:after{display:none}
.flat-diary-scene .book-binding,.book-atmosphere .book-binding{transform:none;left:48.6%;width:2.8%;top:4%;bottom:4%}.flat-diary-scene .diary-ring,.book-atmosphere .diary-ring{filter:none}
.book-atmosphere .book-world,body[data-scene=results] .book-atmosphere .book-world{width:max(120vw,135svh);top:50%;transform:translate(-50%,-50%);filter:blur(4px);transform-style:flat;will-change:auto}
.diary-memo{background:#fffdf8;box-shadow:8px 8px 0 #b893dd;border:1px dashed #b8a0cd;transform:rotate(-4deg);padding:4% 3%;width:38%;height:25%;top:3%;left:7%}.diary-memo strong{font:italic bold clamp(20px,3vw,45px) 'Comic Sans MS','KaiTi',cursive;color:#e6a1c6;line-height:1.1}.diary-memo>span{display:none}.diary-memo:after{content:'';position:absolute;inset:18% 2% -1%;background:url('assets/happy-doodle.svg') center/contain no-repeat}.diary-memo:before{background:repeating-linear-gradient(0deg,transparent 0 5px,#e3b6d844 5px 6px),repeating-linear-gradient(90deg,#edcdeaaa 0 5px,#fff5e599 5px 9px);box-shadow:none}
.diary-calendar{box-shadow:6px 6px 0 #c8b0e1;border:2px dashed #b895cf;background:#fff3bd;transform:rotate(5deg)}.diary-sticker,.book-atmosphere .diary-sticker{filter:none}.diary-sticker svg{background:none;border-radius:0}.book-tab,.scrap-ribbon{box-shadow:none}.book-tab{background:#dabeea;color:#9570b4}.book-tab.tab-two{background:#f9dba6}.scrap-ribbon{background:#eab8d9}.book-left-page .scrap-label{top:10%;left:53%;color:#ab83c8;transform:rotate(3deg)}.book-left-page .scrap-heading{left:52%;top:5%}.diary-note{color:#c17fa6}.book-atmosphere .diary-memo{width:38%;height:27%;left:7%;top:3%}.book-atmosphere .diary-calendar{bottom:4%;right:8%;width:30%}.book-atmosphere .diary-cat{top:14%;right:5%;width:19%}.book-atmosphere .diary-bunny{left:7%;bottom:3%;width:18%}.book-atmosphere .diary-bear{right:1%;top:32%;width:17%}.book-atmosphere .diary-rainbow{left:29%;top:0%;width:26%}.book-atmosphere .diary-flower{left:8%;bottom:4%;width:13%}
.flat-diary-scene .diary-floating{filter:none;text-shadow:1px 1px #fff6,-1px -1px #fff6!important;line-height:1;z-index:45}
.diary-flat-cover{position:absolute;left:50%;top:50%;width:min(76vw,66svh);aspect-ratio:.82;z-index:35;opacity:0;transform:translate(-145%,-50%) rotate(-9deg);border:6px solid #bf9cdc;border-radius:14px;background:radial-gradient(circle,#b58acc35 1px,transparent 2px) 0 0/19px 19px,#fff1fa;box-shadow:8px 7px 0 #e9dca5,14px 13px 0 #c8e1d2;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#aa80c5;font-family:'KaiTi','STKaiti',cursive}
.diary-flat-cover:before{content:'';position:absolute;inset:4%;border:2px dashed #d0b2e0;border-radius:10px;pointer-events:none}.diary-flat-cover strong{font:clamp(24px,5vw,65px) 'KaiTi','STKaiti',cursive;letter-spacing:.08em;margin:5% 0;color:#a478c2}.flat-cover-label{font:italic bold clamp(12px,2vw,25px) Georgia,serif;color:#dd99bd}.flat-cover-title{font-size:clamp(13px,2vw,24px)}.flat-cover-doodles{font-size:clamp(35px,6vw,70px);letter-spacing:.15em;color:#cba7dc;margin-top:5%}.flat-cover-note{position:absolute;bottom:10%;font-size:clamp(12px,1.5vw,20px)}.diary-cover-cat{left:-7%;bottom:14%;width:28%;transform:rotate(-10deg)}.diary-cover-bunny{right:-7%;top:12%;width:28%;transform:rotate(12deg)}.diary-cover-rainbow{width:50%;left:25%;top:2%}
@media(max-width:700px){.flat-diary-scene .book-photo{padding:4px}.flat-diary-scene .book-photo figcaption{font-size:12px}.flat-diary-scene .book-world{width:165vw}.book-atmosphere .book-world,body[data-scene=results] .book-atmosphere .book-world{width:145svh;transform:translate(-56%,-50%)}.diary-flat-cover{width:78vw}.diary-memo strong{font-size:25px}}
.flat-diary-scene .book-photo{box-shadow:3px 3px 0 #bfa2d04d}

/* One bound diary, from the still photo stage to the closing and reopening. */
.bound-diary-scene{perspective:1800px}
.bound-diary-scene>.book-world,.bound-diary-scene[data-phase=stacking]>.book-world{opacity:1;transform-style:preserve-3d;transform-origin:75% 50%;will-change:transform;--book-depth:clamp(92px,9vw,145px)}
.bound-diary-scene .book-paper-block{display:block;transform-style:preserve-3d}
.bound-diary-scene .book-left-leaf{transform:rotateY(0);transform-style:preserve-3d;backface-visibility:visible;overflow:visible}
.bound-diary-scene .book-left-page{transform:translateZ(1px);backface-visibility:hidden;-webkit-backface-visibility:hidden;overflow:hidden;border-radius:12px 0 0 12px}
.bound-diary-scene .book-right-surface{transform:translateZ(0);transform-style:flat;overflow:hidden;border-radius:0 12px 12px 0}
.bound-diary-scene .book-front-cover{display:flex;transform:rotateY(180deg) translateZ(2px);backface-visibility:hidden;-webkit-backface-visibility:hidden;border:7px solid #b68dce;border-radius:0 12px 12px 0;box-sizing:border-box;box-shadow:inset 0 0 0 3px #eee0f5,0 0 0 2px #916baa;background:radial-gradient(circle,#b58acc25 1px,transparent 2px) 0 0/19px 19px,#fff1fa;color:#a478c2;overflow:hidden}
.bound-diary-scene .book-front-cover:before{inset:4%;border:2px dashed #d0b2e0;border-radius:8px}
.bound-diary-scene .book-front-cover>strong{font:clamp(28px,4vw,64px) 'KaiTi','STKaiti',cursive;letter-spacing:.08em;margin:5% 0;color:#a478c2}
.bound-diary-scene .book-front-cover .diary-cover-cat{left:3%;bottom:13%;width:28%}.bound-diary-scene .book-front-cover .diary-cover-bunny{right:2%;top:14%;width:28%}
.bound-diary-scene .book-binding{transform:translateZ(5px)}
.bound-diary-scene .book-photo-stack{position:absolute;inset:0;transform-origin:50% 50%;transform-style:flat;z-index:3}
.bound-diary-scene>.book-photo-stack{z-index:30}
.bound-diary-scene .book-photo{filter:none;box-shadow:2px 3px 0 #bdabd04d,0 8px 17px #35263928}
.bound-diary-scene .book-photo figcaption{display:none}
.book-stage-shade{position:absolute;inset:0;z-index:25;background:radial-gradient(ellipse,#09081255,#040409ad);pointer-events:none}
.bound-diary-scene .book-back-board{box-shadow:none;border-width:7px;border-radius:12px}
.bound-diary-scene .book-bottom-edge{box-shadow:none}.bound-diary-scene .book-fore-edge{box-shadow:none}
.bound-diary-scene .book-sparkles{z-index:40}
@media(max-width:700px){.bound-diary-scene>.book-world{--book-depth:105px}.bound-diary-scene .book-front-cover>strong{font-size:38px}.bound-diary-scene .flat-cover-label{font-size:18px}.bound-diary-scene .flat-cover-title{font-size:20px}.bound-diary-scene .flat-cover-note{font-size:18px}.bound-diary-scene .flat-cover-doodles{font-size:48px}}

/* The page edges face the camera at the clap; no cover is presented. */
.bound-diary-scene>.book-world{transform-origin:100% 50%}
.bound-diary-scene .book-fore-edge{border-left:8px solid #b58ad2;border-right:8px solid #b58ad2;background:repeating-linear-gradient(90deg,#fff8ee 0 8px,#d6c5df 8px 10px,#fff3e9 10px 18px,#ede1ed 18px 20px);box-shadow:none}
.bound-diary-scene .book-bottom-edge{background:repeating-linear-gradient(0deg,#fff8ef 0 8px,#cbb7d9 8px 10px);box-shadow:none}
.bound-diary-scene .diary-insert{width:15%;height:18%;border:0;border-radius:0;box-shadow:none}
.bound-diary-scene .diary-edge-flower{width:47%;left:14%;top:26%;transform:rotate(-13deg)}
.bound-diary-scene .diary-edge-cat{width:42%;left:36%;top:65%;transform:rotate(11deg)}
.book-edge-note{position:absolute;left:40%;top:42%;color:#a381c0;font:clamp(28px,4vw,62px)/1.1 'KaiTi',cursive;transform:rotate(-7deg)}
.bound-diary-scene[data-phase=loading]:after{content:'♡';position:absolute;left:50%;top:44%;transform:translate(-50%,-50%);color:#d2b4e5;font-size:54px}
.divination[data-book-phase=closed] #divinationMessage{opacity:0}

/* A single close-up at a time, then a spread in the middle of a thick diary. */
.bound-diary-scene .book-photo{top:46%;visibility:hidden}
.bound-diary-scene .book-stage-shade{background:rgba(55,43,62,.32)}
.bound-diary-scene[data-phase=stacking]>.book-world{visibility:visible}
.bound-diary-scene .book-half-right,.bound-diary-scene .book-half-left{--book-depth:var(--half-depth)}
.bound-diary-scene .book-half-left{left:0;width:100%;height:100%;top:0}
.bound-diary-scene .book-half-left .book-fore-edge{left:0}
.bound-diary-scene .book-half-left .book-spine-edge{left:100%;right:auto}
.bound-diary-scene .book-half-left .book-back-board{backface-visibility:hidden}
.bound-diary-scene .book-fore-edge{border:0;background:#fff3e5;overflow:hidden}
.bound-diary-scene .book-fore-edge:before{content:'';position:absolute;inset:0;background:url('assets/diary-fore-edge-v2.webp') right center/200% 100% no-repeat}
.bound-diary-scene .book-half-left .book-fore-edge:before{background-position:left center;transform:scaleX(-1)}
.bound-diary-scene .book-half-right .book-fore-edge{border-right:5px solid #b58ad2}
.bound-diary-scene .book-half-left .book-fore-edge{border-right:5px solid #b58ad2}
.bound-diary-scene .diary-burst{will-change:transform,opacity;pointer-events:none}
.divination[data-book-phase=closing] #divinationMessage,.divination[data-book-phase=reopening] #divinationMessage{opacity:0}

/* One camera carries the diary and loose sheets through the final throw. */
.book-camera{position:absolute;inset:0;transform:scale(1);transform-origin:50% 50%;transform-style:preserve-3d;will-change:transform}
.bound-diary-scene .book-camera>.book-world{opacity:1;visibility:visible;top:50%;left:50%;transform-style:preserve-3d;transform-origin:100% 50%;will-change:transform;perspective:none}
.bound-diary-scene .book-camera>.book-photo-stack{position:absolute;inset:0;transform:translate(0,0);transform-origin:50% 50%;z-index:30;will-change:transform;perspective:none}
/* Only the arriving sheet is promoted. Settled poses stay on the paper rather
   than being re-animated when a newer photograph lands above them. */
.bound-diary-scene .book-photo[data-settled=false]{will-change:transform}
.bound-diary-scene .book-photo[data-settled=true]{will-change:auto}
.bound-diary-scene .book-photo{box-shadow:1px 2px 0 #d2bfd84d,0 8px 20px #34283c24}

/* The real reunion mosaic emerges from the shut diary, then opens on a diagonal. */
.reunion-seal{position:absolute;inset:0;z-index:48;perspective:1300px;pointer-events:none;overflow:hidden}
.reunion-seal-backdrop{position:absolute;inset:0;opacity:0;background:radial-gradient(ellipse at 50% 47%,#26202e 0,#12111c 45%,#090b13 100%)}
.reunion-seal-art{position:absolute;left:50%;top:47%;width:min(83vw,75svh,820px);aspect-ratio:1;opacity:0;transform-style:preserve-3d;will-change:transform,opacity;filter:drop-shadow(0 0 14px #d4ad6740) drop-shadow(0 15px 22px #0008)}
.reunion-seal-half{position:absolute;inset:0;will-change:transform,opacity}
.reunion-seal-upper{clip-path:polygon(0 0,100% 0,0 100%)}
.reunion-seal-lower{clip-path:polygon(100% 0,100% 100%,0 100%)}
.reunion-seal-half canvas{display:block;width:100%;height:100%}
.reunion-seal-result{position:absolute;left:50%;top:47%;width:min(76vw,66svh,610px);aspect-ratio:1;opacity:0;transform:translate(-50%,-50%);padding:5px;border:1px solid #e0c58e;border-radius:6px;background:#f7f1e6;box-shadow:0 10px 45px #0007;overflow:hidden}
.reunion-seal-result:empty{display:none}
.reunion-seal-result img{display:block;width:100%;height:100%;object-fit:contain}
.reunion-seal-glow{position:absolute;left:50%;top:47%;width:min(91vw,83svh,900px);aspect-ratio:1;opacity:0;border-radius:50%;background:radial-gradient(circle,transparent 30%,#dfbd7d0c 45%,#dfbd7d24 56%,transparent 69%);transform:translate(-50%,-50%);box-shadow:inset 0 0 60px #d9bd7212}
.reunion-seal-label{position:absolute;left:50%;top:calc(47% + min(44vw,40svh,435px));white-space:nowrap;opacity:0;font:clamp(12px,1.3vw,17px)/1.4 'Noto Serif SC','SimSun',serif;letter-spacing:.28em;color:#e0c58e;transform:translate(-50%,0)}
.divination[data-book-phase^=seal-] #divinationMessage{opacity:0}
@media(prefers-reduced-motion:reduce){.reunion-seal{display:none}}
