/* Library navigation and catalog surface. */
body{--library-tab-height:88px;--library-panel-drop:6px;--library-corner-fill:24px}
html body>header.library-head{display:flex;align-items:center;gap:6px;width:100%;max-width:min(100%,1280px);box-sizing:border-box;margin:0 auto;padding:calc(16px + env(safe-area-inset-top,0px)) max(40px,env(safe-area-inset-right,0px)) 0 max(40px,env(safe-area-inset-left,0px));position:relative;background:transparent;z-index:50}
html body:has(>.guest-banner-slot:not([hidden]))>header.library-head{margin-top:calc(var(--library-panel-drop) - var(--library-tab-height) - var(--library-corner-fill));background:transparent}
html body>header.library-head>.brand-tabs{display:flex;flex:1;min-width:0;gap:6px;margin:0}
body>main>.library-actions-row{display:flex;align-items:center;justify-content:flex-end;position:absolute;top:28px;right:40px;height:36px;z-index:1}
body>main>.library-actions-row:has(#actions[hidden]){display:none}
html body>header.library-head>#letter-balance{display:inline-flex;flex:none;min-width:0;margin:0;white-space:nowrap}
html body>header.library-head>#account{display:flex;align-items:center;justify-content:center;height:48px;min-height:48px;margin:0;padding:0 4px}
html body>header.library-head>#account[hidden]{display:none}
html body>header.library-head:after{content:none}
html body>header.library-head>#reader-search{display:grid;place-items:center;flex:0 0 48px;width:48px;min-width:48px;height:48px;min-height:48px;margin:0;padding:0}
html body>header.library-head>#reader-search svg{display:block;width:24px;height:24px}
html body>header.library-head .brand-tabs .chi-publisher-mark{width:34px;height:38px;flex-basis:34px;mask-size:contain;-webkit-mask-size:contain}
html body>header.library-head .brand-tabs .pi-shi-mark{width:40px;height:45px;flex-basis:40px;mask-size:contain;-webkit-mask-size:contain;mask-position:center -3px;-webkit-mask-position:center -3px}
#new-world{white-space:nowrap;height:36px;min-height:36px;padding-top:4px;padding-bottom:4px}
html body:has(>header.library-head)>main{width:100%;max-width:min(100%,1240px);margin-inline:auto;position:relative;border-radius:24px;background:var(--chi-surface,#181a1f);padding-top:28px;min-height:50vh}
body>main:before{content:'';position:absolute;top:0;left:24px;right:24px;height:1px;background:linear-gradient(90deg,transparent,#ffffff22 18%,#ffffff80 48%,#ffffff20 82%,transparent);pointer-events:none}
body>main:after{content:'';position:absolute;bottom:0;left:24px;right:24px;height:1px;background:linear-gradient(90deg,transparent,#ffffff20 18%,#ffffff70 48%,#ffffff20 82%,transparent);pointer-events:none}
body #catalog.catalog .book-info h2.chi-fade{white-space:nowrap;overflow:hidden;min-width:0;line-height:1.35}
body #catalog.catalog .book-info h2.chi-fade.title-static{white-space:normal;overflow:visible;mask-image:none}
@media(max-width:760px){body{--library-tab-height:80px}html body>header.library-head{gap:4px;padding:calc(16px + env(safe-area-inset-top,0px)) max(12px,env(safe-area-inset-right,0px)) 0 max(12px,env(safe-area-inset-left,0px));flex-wrap:nowrap}html body>header.library-head>.brand-tabs{gap:4px}body>main{border-radius:20px}body>main>.library-actions-row{right:max(16px,env(safe-area-inset-right,0px))}}
@media(max-width:480px){body{--library-tab-height:74px}html body>header.library-head>.brand-tabs a{min-width:48px;padding:0;min-height:58px}html body>header.library-head>.brand-tabs a span{display:none}html body>header.library-head>.brand-tabs{gap:0}#new-world{padding:8px;font-size:13px}}

@media(max-width:360px){html body>header.library-head{gap:0;padding-inline:max(8px,env(safe-area-inset-left,0px)) max(8px,env(safe-area-inset-right,0px))}}

@media(pointer:coarse) and (orientation:landscape) and (max-height:600px){html body>header.library-head{padding-top:calc(4px + env(safe-area-inset-top,0px));padding-bottom:4px}html body>header.library-head>.brand-tabs a{height:48px;min-height:48px}html body>header.library-head>.brand-tabs a span{display:none}}
