/* The audio dock owns a bottom row; game content has its own full-width scroll area. */
body.has-bgm-dock{overflow:hidden;height:100dvh}
#game-scrollport{position:fixed;inset:0 0 var(--bgm-dock-height,64px);overflow-x:hidden;overflow-y:auto;scrollbar-gutter:stable;scroll-padding-block:16px;overscroll-behavior-y:contain}
body #bgm-controls.bgm-compact{position:fixed!important;inset:auto 0 0!important;width:100%!important;max-width:none!important;min-height:60px;margin:0!important;padding:8px max(12px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:flex-end;gap:7px;background:#fff9f5f5;border-top:1px solid #eadbd4;z-index:40}
#bgm-panel{order:-1;flex-basis:auto;width:min(330px,100%);margin:0;max-height:min(300px,45dvh);overflow-y:auto;text-align:left}
#bgm-track{overflow-wrap:anywhere}
/* Existing full-screen stills retain their original full viewport and crop. */
body:has(.event-still-layer) #game-scrollport{bottom:0;z-index:100}
/* Shared navigation, with browsing actions separated from replay. */
.book-common-nav{margin:22px 0 0;text-align:center}
.book-nav-explore{display:grid;gap:10px}
.book-common-nav button{box-sizing:border-box;width:100%;border-radius:30px;min-height:49px;font:16px/1.6 var(--serif),serif;padding:11px 14px}
.book-common-nav .book-nav-replay{margin-top:21px;padding-top:15px;border-top:1px solid #dfc3b7}
.book-nav-replay p{font:14px/1.6 var(--serif),serif;margin:0 0 10px}
.book-common-nav .book-next-life{background:linear-gradient(#f7dfdc,#eac0c1);border:1px solid #e2b7b9;color:#7c3042}
.book-common-nav .book-title-return{margin-top:11px;border:0;border-top:1px solid #dfc3b7;border-radius:0;background:transparent;color:#782b3b}
.book-card .book-back{margin:0 auto 9px;padding:5px 12px;text-align:center;font-size:16px}
/* No tab row, and no reserved space for one. */
#app .ending-with-ad:has(.ending-book){padding-top:18px;padding-bottom:28px}
.book-brand p{flex-wrap:wrap;gap:0 5px;letter-spacing:.06em;line-height:1.6}
.book-brand p:before,.book-brand p:after{display:none}
.book-brand p span{display:inline-block}
.ending-book .book-ending:not(.book-ending--unmet) .ending-prose p.married-story{margin:0 auto;line-height:1.7;text-align:left;overflow-wrap:normal;word-break:normal;line-break:strict;text-wrap:pretty}
.ending-book .book-ending:not(.book-ending--unmet) .ending-prose p.married-story+p.married-story{margin-top:1.15em}
.ending-book .book-ending:not(.book-ending--unmet) .ending-prose p.married-copy-group.married-story{margin-top:1.3em}
.story-tail{white-space:nowrap}
.ending-final-line{overflow-wrap:normal;line-break:strict;text-wrap:balance}
/* Hint content preserves its supplied HTML and breaks; only the surrounding card changes. */
.book-hints{padding:0;text-align:left;overflow:hidden}
.book-hints .strategy-hint-content{padding:20px 0 15px}
.book-hints .hint-header{padding:0 18px;text-align:center}
.book-hints .hint-header h2{font:24px/1.6 var(--serif),serif;margin:6px 0 16px}
.book-hints .hint-copy{padding:0 18px;white-space:normal;word-break:normal;line-break:strict}
.book-hints .hint-theme-card{padding:19px 17px;background:#fffaf5;border:1px solid #d8b8a9;border-radius:15px;box-shadow:0 3px 10px #87525c0b}
.book-hints .hint-titles{margin:0 0 18px}
.book-hints .hint-number{font:13px/1.5 var(--serif),serif!important;color:#a15269;margin:0 0 4px!important;text-align:left}
.book-hints .hint-titles h3{font:24px/1.6 var(--serif),serif;margin:0;text-align:left;line-break:strict}
.book-hints .hint-copy p{font:16px/1.85 var(--serif),serif;margin:0;text-align:left;white-space:normal;word-break:normal;line-break:strict;overflow-wrap:normal}
.book-hints .hint-copy p+p{margin-top:.8em}
.book-hints .hint-copy h4{font:700 17px/1.6 var(--serif),serif;margin:20px 0 5px;color:#98425c}
.book-hints .hint-purpose-conclusion{display:block;margin-top:18px}
.book-hints .hint-reference{margin-top:20px!important}
.book-hints .hint-reference a{color:#963e5c;overflow-wrap:anywhere}
.book-hints .hint-notices{margin:24px 0 0}
.book-hints .hint-notices p{font-size:13px;line-height:1.8;color:#86636c}
.book-hints .hint-ad{margin:22px -1px;width:calc(100% + 2px);text-align:center}
.book-hints .hint-ad>p{font:12px/1.5 system-ui;margin:0 0 7px;color:#86636c}
.book-hints .hint-ad-code{position:relative;display:flex;justify-content:center;align-items:center;width:100%;line-height:0}
.book-hints .hint-ad-code>a{display:inline-flex;flex:none}
.book-hints .hint-ad-code img{display:block;max-width:none;border-radius:0}
.book-hints .hint-ad-code>img{position:absolute;bottom:0;right:0}
.book-hints .book-common-nav{margin:35px 18px 0}
.book-hints .hint-save-warning{font:13px/1.7 system-ui;margin:20px 18px}
@media(max-width:650px){.book-common-nav button{font-size:14px}.book-nav-replay p{font-size:13px}.book-hints .hint-copy p{font-size:15px}.book-hints .hint-titles h3{font-size:22px}.book-hints .hint-notices p{font-size:13px}}
@media(max-width:350px){.book-brand p{gap:0}.book-brand .result-separator{width:100%;font-size:0;line-height:0;height:0}.book-hints{width:calc(100% + 20px);margin-inline:-10px}.book-hints .hint-copy{padding:0 12px}.book-hints .hint-theme-card{padding:17px 13px}}
