@font-face{font-family:DiaryHand;src:url('../assets/fonts/diary-hand.ttf') format('truetype');font-weight:400;font-display:block}
/* Coordinates refer to the visible cover, whose bounds are 9–92% x 9–92%. */
.notebook-object{width:auto!important;aspect-ratio:2/3;height:min(82svh,780px)!important;animation:none!important}
.notebook-object .cover-label,.front-cover .hard-label{left:50.5%!important;top:50.5%!important;right:auto!important;bottom:auto!important;transform:translate(-50%,-50%)!important;writing-mode:horizontal-tb!important;white-space:nowrap;display:block;width:max-content;text-align:center;font-family:DiaryHand!important;font-weight:400;letter-spacing:.24em;text-indent:.24em;font-size:clamp(24px,4.6vh,40px)!important;color:#ead8ad;text-shadow:0 1px 2px #201308;line-height:1.4}
#inspect .sheet-copy,.diary-measure .sheet-copy{inset:12% 12% 12%!important;text-align:left!important;transform:none!important;color:#392b23}
#inspect .sheet-date,.diary-measure .sheet-date{font-family:ExpeditionInk!important;font-size:15px!important;text-align:left!important;line-height:1.4;margin:0 0 8px!important;color:#67503c}
#inspect .sheet-copy h2,.diary-measure .sheet-copy h2{font-family:DiaryHand!important;font-size:25px!important;text-align:left!important;line-height:1.3;letter-spacing:.08em;margin:0 0 14px!important;color:#392b23}
#inspect .sheet-lines p,.diary-measure .sheet-lines p{font-family:DiaryHand!important;font-weight:400;font-size:20px!important;line-height:1.65!important;letter-spacing:.025em!important;white-space:normal!important;overflow-wrap:anywhere;text-align:left!important;color:#392b23;margin:0 0 7px!important;transform:none!important}
#inspect .narrative-sheet .sheet-lines p,.diary-measure .narrative-sheet .sheet-lines p{text-indent:2em}
#inspect .sheet-number{bottom:3%;font:13px DiaryHand;color:#78644f}
#inspect .book-stage{animation:none}
#inspect .physical-book-nav{gap:24px;margin:6px 0 0!important}
#inspect .physical-book-nav button{font:16px DiaryHand;padding:8px;min-height:40px}
#inspect .book-gesture{font:14px DiaryHand;margin:0}
@media(max-height:560px){#inspect .sheet-lines p,.diary-measure .sheet-lines p{font-size:18px!important;line-height:1.55!important;margin-bottom:5px!important}#inspect .sheet-date,.diary-measure .sheet-date{font-size:13px!important;margin-bottom:5px!important}#inspect .sheet-copy h2,.diary-measure .sheet-copy h2{font-size:21px!important;margin-bottom:8px!important}#inspect .physical-book-nav{gap:18px}#inspect .physical-book-nav button{font-size:15px;padding:5px}#inspect .book-gesture{font-size:12px}}

/* Preserve the portrait 2:3 physical notebook at every window size. */
#inspect #inspect-content{box-sizing:border-box;padding:24px 24px 46px;overflow:hidden;gap:0}
#inspect .notebook-object{width:min(calc(78svh * .666667),calc(100vw - 64px))!important;height:auto!important;aspect-ratio:2/3!important;flex:none;min-width:0;max-height:78svh;max-width:100%;box-sizing:border-box}
#inspect .notebook-object img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain}
#inspect .notebook-object .cover-label,#inspect .front-cover .hard-label{left:72.8%!important;top:36.2%!important;right:auto!important;bottom:auto!important;writing-mode:vertical-rl!important;text-orientation:upright;transform:translate(-50%,-50%)!important;width:max-content;height:max-content;white-space:nowrap;letter-spacing:.22em!important;text-indent:.22em;font-family:DiaryHand!important;font-size:clamp(19px,3.8vh,34px)!important;color:#453420;text-shadow:none;line-height:1.2;text-align:center}
#inspect .book-stage{flex:none;max-width:100%;max-height:calc(100svh - 110px);box-sizing:border-box}
#inspect .notebook-sheet,.diary-measure .notebook-sheet{box-sizing:border-box;overflow:hidden}
#inspect .sheet-copy,.diary-measure .sheet-copy{inset:13% 14% 13%!important;width:auto!important;height:auto!important;box-sizing:border-box;max-width:none;overflow:hidden}
#inspect .sheet-lines,.diary-measure .sheet-lines{width:100%;max-width:100%;box-sizing:border-box}
#inspect .sheet-lines p,.diary-measure .sheet-lines p{width:auto!important;max-width:100%;box-sizing:border-box;word-break:normal;overflow-wrap:anywhere}
#inspect .sheet-date,#inspect .sheet-copy h2,.diary-measure .sheet-date,.diary-measure .sheet-copy h2{width:auto!important;max-width:100%;box-sizing:border-box}
#inspect .physical-book-nav{flex:none;max-width:100%;flex-wrap:nowrap;gap:16px}
#inspect .book-gesture{flex:none}

/* A fixed 400x600 typesetting grid, scaled by each leaf's container width. */
#inspect .sheet-copy,.diary-measure .sheet-copy{inset:10% 10% 10%!important}
#inspect .sheet-date,.diary-measure .sheet-date{font-size:3.5cqw!important;line-height:1.4!important;margin:0 0 2cqw!important}
#inspect .sheet-copy h2,.diary-measure .sheet-copy h2{font-size:6cqw!important;line-height:1.3!important;margin:0 0 3cqw!important}
#inspect .sheet-lines p,.diary-measure .sheet-lines p{font-size:4.5cqw!important;line-height:1.5!important;letter-spacing:.015em!important;margin:0 0 1.2cqw!important}
#inspect .notebook-object .cover-label,#inspect .front-cover .hard-label{font-size:clamp(19px,3.5vh,32px)!important}

/* Mirror the writing margins: keep the text near the binding on both leaves. */
#inspect .side-left .sheet-copy,.diary-measure .side-left .sheet-copy{left:20%!important;right:6%!important}
#inspect .side-right .sheet-copy,.diary-measure .side-right .sheet-copy{left:6%!important;right:14%!important}

#inspect.book-view{background:transparent!important}
#inspect.book-view::backdrop,#inspect.notebook-view::backdrop{background:#0b100b66}

/* Retain the scene behind the notebook, without the gameplay copy shining through. */
#game:has(#inspect[open]) > header,#game:has(#inspect[open]) #hud,#game:has(#inspect[open]) :is(.light-heading,.light-footer,.light-narration,.light-controls,.reunion-heading,.reunion-footer,.reunion-narration,.reunion-controls,#chapter-end){visibility:hidden}
