/* App chrome, separate from the bookshelf and reader rendering. */
:root{--radius:20px;--app-chrome:rgba(244,239,229,.95)}
body{overscroll-behavior-y:none}.main{max-width:1500px;padding-bottom:36px}.topbar{position:sticky;top:0;z-index:12;background:var(--app-chrome);backdrop-filter:blur(18px);min-height:76px;margin-bottom:22px;border-bottom:1px solid var(--line)}
.app-page-title{font-size:20px;font-weight:700;letter-spacing:-.7px}.topbar-right{gap:10px}.app-pro-button{border:1px solid #ded6b8;background:#eee5cb;color:#625126;border-radius:100px}.app-pro-button .icon{width:16px}.account-trigger{border-radius:100px}.brand-sub,.sidebar-footer,.footer-note{display:none}.brand{margin-bottom:28px}.sidebar{padding-top:28px}.side-pro{background:#293e34;color:#fff9e9;border:0;border-radius:18px}.side-pro p{color:#c3cfbf}.side-pro .mini-stars{color:#dec48d}.side-profile{margin-top:16px}.nav-btn{min-height:45px;border-radius:12px}.nav-btn.active:before{display:none}.nav-btn.active{box-shadow:inset 0 0 0 1px #d5decb}.btn{min-height:44px;border-radius:12px}button:active:not(:disabled){transform:scale(.98)}.page-head h1{letter-spacing:-1px}.demo-banner{border-radius:12px;font-size:11px}.save-state{font-size:10px}.shelf-page-actions{gap:8px}.settings-card{border-radius:20px}.pro-hub{max-width:980px;margin:10px auto 40px;text-align:center;padding:20px 0}.pro-orbit{width:68px;height:68px;border-radius:22px;margin:0 auto 20px;display:grid;place-items:center;font-size:40px;background:#263e32;color:#e6c886;box-shadow:0 14px 32px #31472a1c;transform:rotate(-8deg)}.pro-hub h1{font:clamp(36px,5vw,60px)/1.05 var(--serif);letter-spacing:-2px;margin:16px 0}.pro-intro{color:var(--muted);font-size:15px}.pro-benefits{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:32px 0;text-align:left}.pro-benefits article{border:1px solid var(--line);border-radius:20px;background:var(--white);padding:22px 18px}.pro-benefits .icon{color:#827044;width:25px;height:25px;margin-bottom:20px}.pro-benefits h2{font-size:15px;font-weight:650;line-height:1.4}.pro-benefits p{font-size:12px;color:var(--muted);margin:0}.pro-checkout{text-align:left;border:1px solid #dce2d4;border-radius:24px;padding:28px;background:linear-gradient(135deg,#edf1e5,#f9f7ef)}.pro-checkout h2{font:26px var(--serif);margin-bottom:6px}.pro-checkout p{color:#65715f}.pro-plans{display:flex;gap:12px;margin:18px 0}.plan-option{flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:8px;text-align:left;border:1px solid #c8d3bd;background:var(--white);padding:22px;border-radius:16px}.plan-option strong{font-size:32px;letter-spacing:-1px}.plan-option b{font-size:12px;margin-top:10px;color:#244a70;display:flex;gap:15px;align-items:center}.plan-option small{white-space:normal;color:var(--muted)}.pro-checkout .small{font-size:11px}.pro-hub>.small{margin-top:20px;color:var(--muted)}
@media(min-width:901px){.topbar .mobile-brand{display:none}.main{padding-top:0}.topbar{padding-top:10px}.sidebar{overflow-y:auto}.side-pro h3{font-size:19px}}
@media(max-width:900px){.main{padding:0 20px calc(104px + env(safe-area-inset-bottom))}.topbar{margin:0 -20px 20px;padding:calc(10px + env(safe-area-inset-top)) 20px 10px;min-height:66px;flex-wrap:nowrap;gap:8px}.topbar .mobile-brand{display:none}.app-page-title{font-size:23px;flex:1}.topbar-right{margin-left:auto;gap:6px;flex-wrap:nowrap;width:auto}.topbar .save-state{display:none}.topbar .language-switch>span{display:none}.topbar select{width:75px!important;min-height:40px;font-size:11px!important;padding:7px!important}.account-trigger{padding:10px!important;width:42px;min-width:42px}.account-trigger span{display:none}.app-pro-button{padding:8px 11px;min-height:40px}.mobile-nav{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;inset:auto 10px calc(10px + env(safe-area-inset-bottom));padding:8px 4px;border:1px solid #dce3d3;border-radius:23px;background:rgba(249,250,244,.96);backdrop-filter:blur(20px);box-shadow:0 8px 30px #1c31251a;z-index:20}.mobile-nav button{min-height:50px;gap:5px;font-size:10px;border-radius:15px;display:flex;flex-direction:column;align-items:center;justify-content:center}.mobile-nav button.active{background:#e1e9d8;color:#283f30;font-weight:700}.mobile-nav .icon{height:21px;width:21px}.pro-benefits{grid-template-columns:repeat(2,1fr);gap:10px}.pro-benefits article{padding:18px 14px}.pro-hub{padding-top:10px}.pro-checkout{padding:22px 18px}.page-head{margin-top:10px}.page-head h1{font-size:30px}.page-head>p{font-size:12px}.demo-banner{padding:10px 12px}.stats-strip{border-radius:16px}.modal:not(.book-dialog){border-radius:24px;padding:24px}.plus-tabs{overflow-x:auto;flex-wrap:nowrap}.plus-tabs .btn{flex-shrink:0}}
@media(max-width:380px){.main{padding-left:14px;padding-right:14px}.topbar{margin-left:-14px;margin-right:-14px;padding-left:14px;padding-right:14px}.app-page-title{font-size:20px}.app-pro-button .icon{display:none}.pro-plans{flex-direction:column}.pro-benefits{gap:8px}.pro-benefits article{padding:16px 12px}.pro-benefits h2{font-size:13px}}
@media(prefers-reduced-motion:reduce){button:active:not(:disabled){transform:none}}
.side-pro .btn{color:#293e34}.side-pro p,.side-pro .mini-stars{display:none}.side-pro h3{font-size:16px;line-height:1.3}.side-pro{padding:14px}.shelf-nav{min-height:90px;flex-shrink:0}.side-bottom{flex-shrink:0}
.shelf-options-trigger{display:none}
@media(max-width:900px){.demo-banner{display:flex;align-items:center;justify-content:space-between;margin:8px 0;padding:7px 10px;gap:8px}.demo-banner>span{flex:1}.demo-banner button{margin:0;white-space:nowrap}.topbar{margin-bottom:8px}.shelf-primary-actions{margin:12px 0!important}.stats-strip{margin:12px 0 16px;padding:12px 0}.stat{padding:0 10px}.stat strong{font-size:22px}.stat-icon{display:none}.stat small{font-size:9px}.workspace{margin-top:12px}.section-heading{margin-bottom:8px}.section-heading h2{font-size:24px}.shelf-tabs{margin-bottom:10px}.shelf-search-panel{margin:8px 0;padding:7px 10px}.shelf-options-trigger{display:flex;min-height:36px;margin-left:auto;font-size:10px}.shelf-toolbar:not(.tools-open){display:none}.shelf-toolbar.tools-open{padding-bottom:10px}.below-shelf,.shelf-note{display:none}}

/* Quiet library: warm paper, worn oak and moss. No texture over book text. */
:root{--paper:#f4efe5;--white:#fcf8ef;--ink:#393e32;--muted:#736e61;--line:#ddd4c3;--green:#4e6046;--sage:#e6e6d7;--gold:#a27b43}
body{background-color:var(--paper);background-image:radial-gradient(ellipse at 80% 0%,#e5d3af36,transparent 65%),url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%237a6040' opacity='.045' filter='url(%23p)' d='M0 0h160v160H0z'/%3E%3C/svg%3E")}
.sidebar{background:#eae4d7;border-right-color:#d8cebc}.brand-name{color:#474b39}.brand-mark{color:#776449}.brand-dot{color:#a67b50}.nav-label{color:#776e5d}.nav-btn{color:#6f6b5a}.nav-btn.active{background:#dce0ce;color:#38482f;box-shadow:inset 3px 0 #778062;border-radius:4px 12px 12px 4px}.nav-btn:hover{background:#e0dece}.side-profile{border-top-color:#d5cbb8}.side-pro{background:#505a43;border-radius:5px 15px 15px 5px;box-shadow:inset 3px 0 #a99b75}.side-pro .btn{background:#f2ebda;color:#46513b}
.app-page-title{font-family:var(--serif);font-weight:400;font-size:25px;letter-spacing:-.6px}.topbar{border-bottom-color:#d9cfbd}.app-pro-button{background:#e9ddc2;color:#695330;border-color:#d9c8a6}.account-trigger{background:#fcf8ef}.page-head h1,.section-heading h2{color:#474936}.eyebrow{color:#766c55}.btn-primary{background:#505f46;box-shadow:0 2px 3px #3a332411}.btn-primary:hover{background:#414e39}.btn-secondary{background:#fcf8ef;border-color:#d8cfbd}.btn-secondary:hover{background:#eee7d8}.btn-soft,.pill{background:#e6e6d7;color:#4e5b42}.demo-banner{background:#eee6d5;border-color:#ddd1bb;color:#70634d}.stats-strip{border-color:#dcd1bd;border-radius:0}.stat-icon{background:#e6e0ce;color:#77744e}.stat strong{color:#56583f}.tab.active{color:#4e5b3e}.tab.active:after{background:#7c805f}.tab .tab-count{background:#e8e0ce}.shelf-search-panel{background:#fcf8ef;border-color:#ddd2be}.shelf-options-trigger{color:#69634f}.view-toggle{border-color:#d8cfbd}.view-toggle button.active{background:#dedfcd;color:#4e5b40}
.shelf-space:not(.gallery):not(.walnut):not(.winter):not(.maple):not(.linen):not(.moss):not(.library){--wall:#e7ddc9;--plank:#bea078;--front:#a78a62;--grain:#785e3a36;border-color:#d3c2a5;background:linear-gradient(90deg,#ae916422,transparent 10%,transparent 90%,#ae916422),linear-gradient(180deg,#d7c6a92b,transparent 45%),var(--wall);box-shadow:inset 0 4px 22px #826b4620,0 2px 0 #fff7;border-radius:7px 11px 9px 6px}
.rail-card,.settings-card,.discovery-card,.challenge-card,.pro-benefits article{background:#faf6ec;border-color:#ded4bf;border-radius:7px 15px 12px 9px;box-shadow:0 3px 10px #63503506}.rail-card h3,.discovery-card h3,.settings-card h2{color:#50523c}.pro-orbit{background:#566046;color:#e7d2a5;border-radius:14px 23px 17px 20px;box-shadow:0 8px 22px #65533816;transform:rotate(-4deg)}.pro-checkout{background:linear-gradient(130deg,#e8e5d4,#f7f0df);border-color:#d8cfb6;border-radius:9px 22px 16px 12px}.plan-option{background:#fcf8ed;border-color:#cfc5ad;border-radius:9px}.plan-option b{color:#4d6141}.pro-benefits .icon{color:#8d7853}
@media(max-width:900px){.app-page-title{font-size:24px}.mobile-nav{background:rgba(245,240,229,.97);border-color:#d8cfbc;box-shadow:0 4px 22px #57472d1a;border-radius:18px 21px 17px 20px}.mobile-nav button{color:#736c5a}.mobile-nav button.active{background:#dfe2cf;color:#435138}.stats-strip{border-radius:0}.shelf-space{padding-top:20px}}
@media(max-width:380px){.app-page-title{font-size:21px}}

/* Account provider buttons stay readable in the quiet library palette. */
.btn-google{display:flex;align-items:center;justify-content:center;width:100%;min-height:46px;background:#fff;color:#1f1f1f;border:1px solid #747775;border-radius:4px;font:500 14px/20px Arial,sans-serif;gap:10px;padding:12px;margin-top:16px}
.btn-google:hover{background:#f8f6f1;border-color:#777c6c}
.auth-divider{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:12px;margin:18px 0}
.auth-divider::before,.auth-divider::after{content:'';height:1px;background:var(--line);flex:1}
