/* Immersive mode: the book is the only visible interface. */
html,body,#appShell{width:100%;height:100%;min-height:100%;overflow:hidden}
.immersive-reader{height:100svh;min-height:100svh;background:radial-gradient(ellipse at 50% 48%,#463b32 0%,#302923 58%,#211d19 100%)}
.immersive-reader>.topbar,.immersive-reader>.progress-track,.immersive-reader>.bottom-bar,.immersive-reader>.mobile-toc-button,.immersive-reader>.scrim,.immersive-reader>.contents-drawer,.immersive-reader>.toast{display:none!important}
.immersive-reader.library-mode .stage{display:none!important}
.immersive-reader .library-screen{display:none}
.immersive-reader.library-mode .library-screen{position:absolute;inset:0;z-index:8;display:flex;flex-direction:column;align-items:center;overflow:auto;padding:clamp(45px,9vh,100px) 24px 30px;background:radial-gradient(ellipse at 50% 43%,#44392f 0%,#302923 58%,#211d19 100%);color:#e8dece}
.library-heading{text-align:center;flex:0 0 auto}
.library-eyebrow{font:9px var(--mono);letter-spacing:.22em;color:#b49870}
.library-heading h1{font:400 clamp(37px,5vw,58px)/1.12 var(--display);letter-spacing:-.06em;margin:18px 0 12px;color:#f0e4d0}
.library-heading h1 i{color:#c6a477;font-weight:400}
.library-heading p{margin:0;color:#ab9a86;font:italic 13px var(--serif)}
.library-shelf{width:min(100%,1000px);display:flex;justify-content:center;align-items:flex-start;flex-wrap:wrap;gap:clamp(28px,6vw,68px);margin:auto;padding:50px 12px 30px}
.shelf-book{width:clamp(190px,22vw,250px);padding:0;text-align:left;position:relative;flex:0 0 auto;transition:transform .35s cubic-bezier(.2,.8,.2,1),filter .35s}
.shelf-book:hover{transform:translateY(-9px) rotate(-.6deg);filter:drop-shadow(0 19px 22px #100d0b88)}
.shelf-book-cover{display:flex;position:relative;min-height:clamp(280px,35vw,360px);flex-direction:column;justify-content:space-between;padding:20px 20px 18px;overflow:hidden;background:linear-gradient(115deg,#211a18 0,#49352e 14%,#67483c 55%,#332620 100%);border:1px solid #b493647d;box-shadow:inset 8px 0 12px #c1a17420,inset -6px 0 12px #170f0d6b,5px 7px 0 #b9a484,7px 9px 0 #766953;transition:box-shadow .3s}
.shelf-book-cover:before{content:"";position:absolute;inset:10px;border:1px solid #c5a87863;pointer-events:none}
.shelf-book-cover:after{content:"";position:absolute;inset:0;opacity:.16;pointer-events:none;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' 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%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.34'/%3E%3C/svg%3E")}
.cover-night .shelf-book-cover{background:linear-gradient(115deg,#201b26 0,#44354c 48%,#28212b 100%)}
.cover-moss .shelf-book-cover{background:linear-gradient(115deg,#25271f 0,#48503c 52%,#292a22 100%)}
.shelf-cover-top,.shelf-cover-bottom{display:flex;justify-content:space-between;gap:8px;font:7px var(--mono);letter-spacing:.1em;color:#d2b98c;position:relative;z-index:1}
.shelf-cover-top i{font-style:normal;text-align:right}
.shelf-cover-moon{position:absolute;top:27%;left:50%;transform:translateX(-50%);color:#d9bd8a;font-size:22px}
.shelf-cover-title{position:relative;z-index:1;text-align:center;margin:auto 0;color:#f4e9d6;font:400 clamp(25px,3vw,34px)/1.2 var(--serif);letter-spacing:-.04em;text-wrap:balance;overflow-wrap:anywhere}
.shelf-cover-title small{display:block;margin:13px auto 0;max-width:90%;font:italic 12px/1.6 var(--serif);color:#d6c2a2;letter-spacing:0}
.shelf-book-caption{display:flex;justify-content:space-between;align-items:center;padding:17px 2px;color:#a79683;font:8px var(--mono);letter-spacing:.13em}
.shelf-book-arrow{font-size:14px;color:#d0b487;transition:transform .2s}.shelf-book:hover .shelf-book-arrow{transform:translate(3px,-3px)}
.library-footnote{display:flex;gap:15px;align-items:center;color:#857563;font:7px var(--mono);letter-spacing:.15em}
.library-footnote span:nth-child(2){color:#ba986c;font-size:11px}
.library-empty{font:italic 15px var(--serif);color:#baa990;text-align:center}
.library-shelf .shelf-book[lang="my"] .shelf-cover-title{font-family:'Noto Serif Myanmar','Myanmar Sangam MN','Myanmar Text','Padauk',serif;font-size:22px;line-height:1.85;letter-spacing:0}
.library-shelf .shelf-book[lang="my"] .shelf-cover-title small{font-family:'Noto Sans Myanmar','Myanmar Sangam MN','Myanmar Text','Padauk',sans-serif;font-size:12px;line-height:2}
.library-shelf .shelf-book[lang="my"] .shelf-cover-top,.library-shelf .shelf-book[lang="my"] .shelf-cover-bottom,.library-shelf .shelf-book[lang="my"] .shelf-book-caption{font-family:'Noto Sans Myanmar','Myanmar Sangam MN','Myanmar Text','Padauk',sans-serif;letter-spacing:0;line-height:1.9}
.library-mode .reading-page{visibility:hidden}
.book-selected .library-screen{display:none!important}
.book-selected .stage{display:grid}
.immersive-reader .stage{width:100%;height:100%;min-height:0;max-height:100svh;padding:0;display:grid;grid-template-columns:minmax(0,1fr);gap:0;perspective:1800px;overflow:hidden}
.immersive-reader .chapter-rail,.immersive-reader .reading-note{display:none!important}
.immersive-reader .book-area{width:min(100vw,1120px);height:100%;max-width:none;justify-self:center;align-self:stretch;margin:0}
.immersive-reader .book-object{width:100%;height:100%;min-height:0;max-height:100svh;filter:drop-shadow(0 22px 45px #08060565);touch-action:pan-y;user-select:text;--drag-x:0px;transform:translateX(var(--drag-x));transition:transform .52s cubic-bezier(.2,.8,.2,1)}
.immersive-reader .book-object.is-dragging{transition:none;cursor:grabbing}
.immersive-reader .book-object:after{right:-7px;top:8px;bottom:8px;width:10px;opacity:.9}
.immersive-reader .book-cover,.immersive-reader .reading-page{height:100%;min-height:0;max-height:100svh}
.immersive-reader .book-cover{border-radius:1px 3px 3px 1px}
.immersive-reader .reading-page{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none}
.immersive-reader .reading-page::-webkit-scrollbar{display:none}
.immersive-reader .page-inner{min-height:100%;padding:clamp(30px,6vh,62px) clamp(28px,8vw,106px) 30px}
.immersive-reader .page-inner{max-width:920px;padding-left:clamp(46px,8vw,112px);padding-right:clamp(46px,8vw,112px)}
.immersive-reader .markdown-content{padding-top:clamp(28px,5vh,48px)}
.immersive-reader .chapter-flip{animation:immersive-arrive .55s cubic-bezier(.2,.75,.25,1)}
.immersive-reader .cover-title h1:lang(my){font-family:'Noto Serif Myanmar','Myanmar Sangam MN','Myanmar Text','Padauk',serif;font-size:clamp(31px,4vw,52px);line-height:1.7;letter-spacing:0;font-weight:500}
.immersive-reader .cover-subtitle:lang(my),.immersive-reader .cover-kicker:lang(my){font-family:'Noto Sans Myanmar','Myanmar Sangam MN','Myanmar Text','Padauk',sans-serif;line-height:2;letter-spacing:0}
.immersive-reader .page-running-head :lang(my),.immersive-reader .chapter-heading .chapter-kicker :lang(my){font-family:'Noto Sans Myanmar','Myanmar Sangam MN','Myanmar Text','Padauk',sans-serif;letter-spacing:0;line-height:1.8}
.immersive-reader .markdown-content:lang(my){font-family:'Noto Serif Myanmar','Myanmar Sangam MN','Myanmar Text','Padauk',serif;font-size:20px;line-height:2.08;letter-spacing:0;overflow-wrap:anywhere;word-break:normal}
.immersive-reader .markdown-content:lang(my) p{margin-bottom:24px}
.immersive-reader .markdown-content:lang(my) h2,.immersive-reader .markdown-content:lang(my) h3{font-family:'Noto Serif Myanmar','Myanmar Sangam MN','Myanmar Text','Padauk',serif;line-height:1.75;letter-spacing:0}
.immersive-reader .chapter-heading h1:lang(my){font-family:'Noto Serif Myanmar','Myanmar Sangam MN','Myanmar Text','Padauk',serif;line-height:1.75;letter-spacing:0;font-size:clamp(30px,4vw,46px);font-weight:500}
@keyframes immersive-arrive{from{opacity:.4;transform:translateX(var(--chapter-enter,18px))}to{opacity:1;transform:translateX(0)}}
@media(min-width:1100px){.immersive-reader .book-object{width:min(84vw,1120px)}}
@media(max-width:700px){
  .immersive-reader{height:100svh;min-height:100svh}
  .immersive-reader .stage{height:100svh;min-height:0;padding:0}
  .immersive-reader .book-area,.immersive-reader .book-object{height:100svh;width:100%;min-height:0}
  .immersive-reader .book-object:after{display:none}
  .immersive-reader .book-cover,.immersive-reader .reading-page{height:100svh;min-height:0}
  .immersive-reader .book-cover{border-radius:0}
  .immersive-reader .reading-page{position:absolute;inset:0;padding:0}
  .immersive-reader .page-inner{min-height:100%;padding:26px 25px 24px}
  .immersive-reader .markdown-content{font-size:16px;line-height:1.88;padding:25px 0 22px}
  .immersive-reader .markdown-content:lang(my){font-size:18px;line-height:2.08;padding-top:27px}
  .immersive-reader .chapter-heading h1:lang(my){font-size:clamp(27px,8vw,37px);line-height:1.8}
  .immersive-reader .cover-title h1:lang(my){font-size:clamp(27px,8vw,42px);line-height:1.8}
  .immersive-reader .chapter-heading h1{font-size:clamp(34px,10vw,48px)}
  .immersive-reader .cover-border{inset:18px}
  .immersive-reader .cover-title h1{font-size:clamp(52px,15vw,76px)}
  .immersive-reader .open-book-button{bottom:clamp(36px,9vh,76px)}
}
@media(prefers-reduced-motion:reduce){.immersive-reader .book-object{transition:none!important}.immersive-reader .chapter-flip{animation:none!important}}
