/* Phone layout uses the same normal document flow as the main Links sections. */
html{scrollbar-gutter:stable}
.hh-motion-paused .scene-atmosphere *, .hh-motion-paused #particles{animation-play-state:paused!important}
@media(max-width:1000px),(hover:none) and (pointer:coarse){
 html{width:100%;overflow-x:hidden;scrollbar-gutter:auto;scroll-padding-bottom:160px}
 body{width:100%;min-width:0;overflow-x:hidden;--hh-nav-base:78px}
 *,*:before,*:after{box-sizing:border-box}
 .wrap{width:calc(100% - 28px);max-width:680px;min-width:0}
 .topbar{height:auto;min-height:68px;gap:8px;flex-wrap:nowrap}
 .brand{flex:1 1 auto;min-width:0;gap:7px}
 .brand>svg{width:27px;height:27px;flex:0 0 27px;animation:none}
 .brand>span{font-size:clamp(19px,5.3vw,23px);white-space:nowrap;min-width:0}
 .brand small{font-size:7px;letter-spacing:.04em}
 .top-books{flex:0 0 auto;max-width:49%;min-width:0;font-size:16px;gap:6px;padding:9px;white-space:nowrap}
 .top-books svg{width:18px;height:18px}.top-books svg:last-child{display:none}
 .site-nav.wrap{width:100%;max-width:none;gap:2px;padding:5px 4px calc(5px + env(safe-area-inset-bottom,0px));box-shadow:0 -2px 12px #08040d50}
 .site-nav>a{min-width:0;min-height:68px;padding:3px 1px;line-height:1.25;overflow-wrap:anywhere}
 .site-nav .pp-painted-icon{width:34px;height:34px}
 .site-nav>a>span{display:block;max-width:100%;min-width:0;font-size:9px}
 .realm-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto 44px;gap:7px;min-width:0}
 .realm-toolbar>.eyebrow{min-width:0;max-width:100%;font-size:8px;letter-spacing:.04em;text-align:center;overflow-wrap:anywhere}
 .realm-toolbar .back-button{width:max-content;max-width:100%;min-width:0;min-height:44px;padding:9px 10px;font-size:10px;gap:5px}
 .replay-button{width:44px;height:44px;min-width:44px}
 .realm-stage{display:grid;grid-template-columns:minmax(0,1fr);gap:20px;height:auto;min-height:0;max-height:none;padding-top:15px}
 .realm-copy,.chapter-preview,.guardian{min-width:0;max-width:100%}
 .realm-copy h2{font-size:clamp(36px,10vw,47px);overflow-wrap:break-word;filter:none}
 .realm-copy>p:not(.eyebrow){line-height:1.7;text-shadow:0 1px 3px #0009}
 .story-actions{flex-wrap:wrap;min-width:0}
 .guardian{height:clamp(350px,58svh,490px);min-height:0;max-width:390px;margin:0 auto}
 .guardian-parallax{inset:0;transform:none;transition:none;animation:none;backface-visibility:visible}
 .guardian .guardian-body{filter:none;animation:mobile-figure-breathe 12s ease-in-out infinite;transform-origin:50% 90%;will-change:auto}
 .guardian .guardian-preview{filter:none;animation:none}
 .guardian .halo,.guardian .magic-orbit,.guardian .living-light,.guardian .hh-figure-spark{display:none}
 .guardian-hint{bottom:0;font-size:10px;max-width:100%;text-shadow:0 1px 3px #0009}
 .chapter-preview{width:min(300px,100%);margin:16px auto;animation:none;transform:none;filter:none}
 .page-preview{transform:none!important;animation:none!important;perspective:none;filter:none}
 .page-preview img{transform:none;animation:none;filter:none;max-width:100%;height:auto}
 .page-caption{min-height:44px;justify-content:center;white-space:normal;text-align:center}
 .realm-offer{bottom:var(--hh-nav-height);gap:10px;padding:7px 12px;box-shadow:none;background:#24172df7;min-height:58px;max-width:100%;animation:none}
 .realm-offer .price{font-size:25px;white-space:nowrap}
 .realm-offer .price>span{font-size:15px}
 .realm-offer .paper-button{min-height:44px;font-size:16px;line-height:1.15;padding:9px 10px;gap:7px;max-width:100%;box-shadow:none}
 .realm-offer .paper-button:after{display:none}
 body.in-realm{padding-bottom:calc(var(--hh-nav-height) + 78px)}
 .world{contain:strict;animation:none;isolation:auto}
 .world-parallax{inset:0;transform:none;transition:none;backface-visibility:visible}
 .world .world-painting{inset:0;animation:none;transform:none;will-change:auto;backface-visibility:visible}
 .world-painting img{filter:none!important;transform:none;animation:none}
 .world .world-fog,.world .world-firelight,.world .world-lanternlight,.realm-haze,.sky:after,#particles{display:none!important;animation:none!important}
 .bone-spirit{display:none!important}
 .scene-atmosphere{contain:strict}
 .scene-atmosphere .hh-flight{will-change:auto}
 .scene-atmosphere .hh-flight-bone-raven,.scene-atmosphere .hh-flight-bat-small,.scene-atmosphere .hh-soul-lights,.scene-atmosphere .hh-petals{display:none}
 .scene-atmosphere .hh-cat-path{--cat-size:105px;bottom:25%;animation-duration:40s}
 .scene-atmosphere .hh-pumpkin{width:54px;animation:none}
 .door{min-width:0;transform:none;translate:none;transition:none}
 .door-art{isolation:auto;perspective:none;contain:layout paint style}
 .door-art .portal-window,.door-art .gate-leaf,.door-art .threshold-glow{display:none}
 .door-art .portal-surround{mask:none;-webkit-mask:none;filter:none;transform:none}
 .door-art img{filter:none;animation:none;transform:none}
 .portal-flight{display:none!important}
 .paper-button,.story-button,.back-button{min-height:44px;touch-action:manipulation}
 .art-dialog[open]{position:fixed;inset:0;display:flex;flex-direction:column;width:100%;max-width:100%;height:100%;height:100dvh;max-height:100dvh;margin:0;padding:0;border:0;border-radius:0;overflow:hidden;overscroll-behavior:contain;filter:none;transform:none}
 .art-dialog::backdrop{background:#100b17ed;backdrop-filter:none;-webkit-backdrop-filter:none}
 .art-dialog header{flex:0 0 auto;display:flex;align-items:center;gap:8px;min-width:0;padding:calc(9px + env(safe-area-inset-top,0px)) 12px 9px}
 .art-dialog header>div{min-width:0}.art-dialog h2{font-size:23px;overflow-wrap:anywhere}.art-dialog small{font-size:9px}
 .art-dialog header .icon-button{min-width:44px;min-height:44px;flex:0 0 44px}
 .page-scroll,.scene-view{flex:1 1 auto;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y pinch-zoom;-webkit-overflow-scrolling:touch}
 .page-scroll img{width:100%;max-width:100%;height:auto;animation:none;transform:none;filter:none}
 .scene-view img{width:100%;max-width:100%;height:100%;object-fit:contain;animation:none;transform:none;filter:none}
 .art-dialog footer{flex:0 0 auto;min-width:0;gap:8px;padding:8px 12px calc(9px + env(safe-area-inset-bottom,0px))}
 .art-dialog footer>span{font-size:11px}.art-dialog .paper-button{font-size:17px;min-height:44px;padding:10px}
 .site-footer{min-width:0;gap:14px}.site-footer>div{flex-wrap:wrap;justify-content:center;gap:12px 18px;min-width:0}.site-footer>div>a{min-height:36px}
 .retry-images,.status{max-width:calc(100vw - 28px);white-space:normal;text-align:center}
}
@media(max-width:350px){.top-books{font-size:14px;padding:8px 7px}.top-books svg{width:16px;height:16px}.brand>svg{width:24px;flex-basis:24px}.brand>span{font-size:18px}.brand small{font-size:6px}.wrap{width:calc(100% - 22px)}.site-nav>a>span{font-size:8px}.realm-toolbar .back-button{font-size:9px;padding-inline:7px}.realm-toolbar>.eyebrow{font-size:7px}}
@keyframes mobile-figure-breathe{0%,100%{transform:translateY(0)}50%{transform:translateY(-2px)}}
@media(prefers-reduced-motion:reduce){.guardian .guardian-body{animation:none!important}}
