:root{
  color-scheme:light;
  --paper:#fffaf0;
  --white:#fffefd;
  --ink:#35435e;
  --muted:#7d8aa1;
  --line:#e8eaf2;
  --pink:#ff9cae;
  --pink-dark:#e77891;
  --blue:#9bd9ed;
  --blue-dark:#67b9d5;
  --yellow:#ffd96c;
  --green:#a9d7b7;
  --purple:#bcb1ef;
  --serif:"Fredoka", "Trebuchet MS", sans-serif;
  --sans:"Nunito", "Trebuchet MS", sans-serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--paper);color:var(--ink);font:500 14px/1.55 var(--sans)}
button,input{font:inherit}
button{cursor:pointer}
a{color:inherit;text-decoration:none}
.hidden{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.shell{min-height:100vh}
.sidebar{position:fixed;inset:0 auto 0 0;width:238px;background:#f1efff;border-right:2px solid #e6e1fa;padding:28px 17px 20px;display:flex;flex-direction:column;z-index:5}
.brand{display:flex;align-items:center;gap:11px;padding:2px 9px 43px}
.brand-mark{display:grid;place-items:center;width:42px;height:42px;background:var(--yellow);color:#f18a9d;border:3px solid #fff;border-radius:15px 15px 18px 12px;font:700 24px var(--serif);box-shadow:0 4px 0 #eac95e;transform:rotate(-5deg)}
.brand strong{display:block;font:600 21px/1 var(--serif);letter-spacing:.01em;color:#46506e}
.brand small{display:block;margin-top:4px;color:#8f8aad;font-size:10px;font-weight:700;letter-spacing:.03em}
.side-label,.eyebrow{font-size:9px;font-weight:900;letter-spacing:.16em;color:#9c93c5}
.side-label{padding:0 11px 10px}
.sidebar nav{display:grid;gap:7px}
.nav-link{display:flex;align-items:center;gap:11px;padding:11px;border:2px solid transparent;border-radius:12px;color:#706e91;font-size:12px;font-weight:800;transition:.2s}
.nav-link:hover,.nav-link.is-active{background:#fff;border-color:#e6e1fa;color:#4c5272;box-shadow:0 3px 0 #e2ddf4}
.nav-link.is-active{font-weight:900}
.nav-icon{width:22px;text-align:center;font-size:17px}
.sidebar-bottom{margin-top:auto;display:flex;align-items:center;gap:10px;padding:14px 10px 5px;border-top:2px dashed #dcd7f1}
.shield-icon{width:33px;height:33px;border-radius:12px;background:#fff4c9;color:#71806e;display:grid;place-items:center;font-size:16px}
.sidebar-bottom p{font-size:10px;line-height:1.45;margin:0;color:#625c7c;font-weight:800}
.sidebar-bottom span{color:#9792b2;font-size:9px;font-weight:600}
.main-content{max-width:1500px;margin-left:238px;padding:0 48px}
.topbar{height:65px;border-bottom:2px dashed #ebe5d9;display:flex;justify-content:space-between;align-items:center}
.breadcrumb{font-size:11px;color:#9298a9;font-weight:700}
.breadcrumb span{margin:0 8px;color:#f1ba52}
.breadcrumb strong{font-weight:900;color:#5c6680}
.account{display:flex;align-items:center;gap:8px;color:#707c96;font-size:10px;font-weight:800}
.account-dot{width:8px;height:8px;border-radius:50%;background:#70c995;box-shadow:0 0 0 4px #e3f5e8}
.welcome{position:relative;display:flex;align-items:center;justify-content:space-between;min-height:270px;margin:25px 0 0;padding:28px 7% 28px 5%;border:2px solid #d8edf4;border-radius:25px;background:linear-gradient(115deg,#e8f8ff 0%,#f2fbff 56%,#f1f0ff 100%);overflow:hidden}
.welcome:before,.welcome:after{content:"";position:absolute;border-radius:50%;background:#fff8d9;opacity:.75}
.welcome:before{width:95px;height:95px;right:28%;top:-49px}
.welcome:after{width:42px;height:42px;left:48%;bottom:14px;background:#ffe2e9}
.welcome .eyebrow{position:relative;margin:0 0 14px;color:#78abc0;z-index:1}
.welcome h1{position:relative;font:600 clamp(34px,4vw,47px)/1.04 var(--serif);letter-spacing:.005em;margin:0;color:#42516d;z-index:1}
.welcome h1 em{font-style:normal;color:#ec849a}
.welcome-copy{position:relative;max-width:385px;margin:13px 0 0;color:#71849d;font-size:12px;font-weight:700;z-index:1}
.welcome-art{width:220px;height:220px;position:relative;margin-right:1%;display:grid;place-items:center;z-index:1}
.art-orbit{width:171px;height:171px;border:2px dashed #b7d9e8;border-radius:50%;position:absolute;background:#ffffff45}
.art-orbit:before,.art-orbit:after{content:"";position:absolute;border:2px solid #d6e7f0;border-radius:50%}
.art-orbit:before{inset:14px}
.art-orbit:after{inset:29px;border-style:dotted}
.art-book{position:relative;width:78px;height:108px;background:linear-gradient(140deg,#ffad9c,#f17e8f);border:3px solid #fff;border-radius:8px 12px 12px 8px;transform:rotate(-8deg);box-shadow:8px 9px 0 #d77a88,10px 14px 20px #51688722,inset 7px 0 0 #ec8b85}
.art-book:after{content:"";position:absolute;right:5px;top:7px;bottom:7px;width:4px;border-radius:0 4px 4px 0;background:#ffe7bd}
.art-book span{position:absolute;left:17px;right:14px;top:27px;height:2px;border-radius:4px;background:#ffe9c9}
.art-book i{position:absolute;left:22px;top:45px;width:30px;height:25px;border:2px solid #ffe4b9;border-radius:50% 50% 46% 46%}
.art-leaf{position:absolute;color:#f4b846;font-size:25px;text-shadow:0 2px #fff}
.leaf-one{top:35px;right:26px;color:#f3ad55}
.leaf-two{bottom:24px;left:22px;color:#ee8fa6}
.library-section{padding:30px 0 43px}
.section-heading{display:flex;align-items:end;justify-content:space-between;margin-bottom:18px}
.section-heading .eyebrow{margin:0 0 5px;color:#c39955}
.section-heading h2{margin:0;font:600 27px/1.2 var(--serif);letter-spacing:.005em;color:#46516c}
.count-badge{display:inline-grid;place-items:center;min-width:23px;height:23px;border-radius:9px;vertical-align:middle;margin-left:4px;background:#ffdf7c;color:#827044;font:700 11px var(--sans);transform:rotate(4deg)}
.search-box{height:37px;width:220px;border:2px solid #e8e5f2;border-radius:12px;background:#fff;display:flex;align-items:center;gap:8px;padding:0 10px;color:#9c97bb;box-shadow:0 3px 0 #eeebf6}
.search-box>span{font-size:20px;line-height:1;transform:rotate(-20deg)}
.search-box input{width:100%;border:0;outline:0;background:transparent;font-size:11px;font-weight:700;color:var(--ink)}
.search-box input::placeholder{color:#a8a7ba}
.book-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.loading-card{grid-column:1/-1;padding:34px;color:#8591a7;font-size:12px;font-weight:700}
.spinner{display:inline-block;width:15px;height:15px;border:2px solid #e5e4f2;border-top-color:#ee91a5;border-radius:50%;animation:spin .8s linear infinite;vertical-align:-3px;margin-right:8px}
@keyframes spin{to{transform:rotate(360deg)}}
.book-card{display:grid;grid-template-columns:105px minmax(0,1fr);gap:15px;padding:14px;background:var(--white);border:2px solid #eceaf4;border-radius:18px;box-shadow:0 5px 0 #e9e6f1;transition:transform .2s,box-shadow .2s}
.book-card:hover{transform:translateY(-3px) rotate(-.3deg);box-shadow:0 8px 0 #e2dfed}
.book-cover{height:148px;position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center;flex-direction:column;background:linear-gradient(155deg,#ffb1bd,#ef7f97);border:3px solid #fff;border-radius:7px 15px 15px 7px;box-shadow:inset 6px 0 0 #dc758a,3px 4px 0 #e8cad0;color:#fff7de}
.cover-shine{position:absolute;inset:0;background:linear-gradient(115deg,#ffffff30,transparent 42%)}
.cover-mark{position:relative;font:600 44px/1 var(--serif);color:#fff2b8;text-shadow:0 3px 0 #ed91a1}
.cover-rule{width:32px;height:2px;background:#fff4d5;margin:9px 0;border-radius:3px}
.cover-caption{font-size:6px;font-weight:900;letter-spacing:.12em}
.book-card:nth-child(3n + 2) .book-cover{background:linear-gradient(155deg,#b6e9d3,#75c7b2);box-shadow:inset 6px 0 0 #5eab99,3px 4px 0 #c7e6dc}
.book-card:nth-child(3n) .book-cover{background:linear-gradient(155deg,#b8d6ff,#8d97ea);box-shadow:inset 6px 0 0 #7886d4,3px 4px 0 #d2d6f4}
.book-info{min-width:0;display:flex;flex-direction:column}
.book-author{margin:3px 0 5px;color:#a692cc;font-size:8px;font-weight:900;letter-spacing:.1em;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.book-title{margin:0;color:#43516d;font:500 18px/1.2 var(--serif);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.book-description{margin:7px 0 0;color:#8490a5;font-size:9px;line-height:1.5;font-weight:700;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.book-meta{margin-top:auto;display:flex;justify-content:space-between;gap:6px;padding:8px 0;color:#a1a7b5;font-size:8px;font-weight:800}
.access-count{color:#79aa8a}
.book-actions{display:flex;gap:6px}
.button{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:0;border-radius:9px;transition:.2s}
.button-read{flex:1;background:#dff3fa;padding:8px 9px;color:#537b91;font-size:9px;font-weight:900;box-shadow:0 3px 0 #c3e3ef}
.button-read:hover{background:#ccebf5;color:#3e7088;transform:translateY(-1px)}
.button-read span{font-size:14px}
.access-button{padding:0 4px;background:none;color:#8c81b2;font-size:9px;font-weight:900}
.access-button:hover{color:#e77891}
.admin-section{padding:30px 0 44px;border-top:2px dashed #e7dfed}
.admin-heading{margin-bottom:16px}
.section-subtitle{margin:6px 0 0;color:#8490a5;font-size:11px;font-weight:700}
.upload-panel{background:#fff;border:2px solid #eceaf4;border-radius:19px;padding:21px 22px;box-shadow:0 5px 0 #e9e6f1}
.upload-intro{display:flex;align-items:center;gap:11px;margin-bottom:18px}
.upload-icon{width:37px;height:37px;border-radius:13px;display:grid;place-items:center;background:#fff0bd;font-size:19px}
.upload-intro h3{margin:0;font:500 17px var(--serif);color:#46516c}
.upload-intro p{margin:2px 0 0;color:#939bb0;font-size:10px;font-weight:700}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}
.field{display:grid;gap:6px;color:#6e7891;font-size:10px;font-weight:800}
.field>span{font-weight:900}
.field small{font-weight:700;color:#a7a9bb;margin-left:4px}
.field input{width:100%;height:39px;border:2px solid #e9eaf2;border-radius:10px;padding:0 11px;background:#fff;color:#43516d;font-size:11px;font-weight:700;outline:0;transition:.2s}
.field input:focus,.grant-form input:focus{border-color:#9bd9ed;box-shadow:0 0 0 3px #9bd9ed30}
.field input::placeholder{color:#b0b4c4}
.field-wide{grid-column:1/-1}
.file-picker{min-height:60px;display:flex;align-items:center;gap:12px;padding:8px 12px;border:2px dashed #a9d8e6;border-radius:12px;background:#f4fcff;cursor:pointer;transition:.2s}
.file-picker:hover{border-color:#ee9bac;background:#fff8f8}
.file-icon{width:32px;height:32px;border-radius:11px;display:grid;place-items:center;background:#dff3fa;font-size:17px}
.file-picker strong,.file-picker small{display:block}
.file-picker strong{color:#66738e;font-size:10px;font-weight:900}
.file-picker small{margin-top:3px;color:#9ea8b9;font-size:8px;font-weight:700}
.file-picker input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.form-footer{display:flex;align-items:center;justify-content:space-between;margin-top:15px}
.form-status{color:#719c7d;font-size:10px;font-weight:800}
.button-primary{background:#ff9dae;color:#fff;padding:10px 15px;font-size:10px;font-weight:900;box-shadow:0 4px 0 #e87e93}
.button-primary:hover{background:#f58c9f;transform:translateY(-1px);box-shadow:0 5px 0 #e87e93}
.button-primary:disabled{opacity:.6;cursor:wait}
.button-primary b{font-size:14px;font-weight:700}
.empty-state{text-align:center;padding:36px 10px 46px;color:#8793a7}
.empty-illustration{width:76px;height:69px;margin:0 auto 9px;position:relative;display:grid;place-items:center;color:#f1bf53;font-size:23px;z-index:0}
.empty-illustration:before{content:"";position:absolute;width:49px;height:40px;bottom:1px;border:2px solid #eacde0;border-radius:13px;background:#fff;transform:rotate(-7deg);z-index:-1}
.empty-illustration:after{content:"";position:absolute;width:50px;height:38px;bottom:3px;border:2px solid #cce8f2;border-radius:13px;background:#effaff;transform:rotate(7deg);z-index:-2}
.empty-state h3{margin:0;font:500 21px var(--serif);color:#53617b}
.empty-state p{max-width:360px;margin:6px auto 0;font-size:10px;font-weight:700}
.footer{height:54px;border-top:2px dashed #ebe5d9;display:flex;justify-content:space-between;align-items:center;color:#9aa2b2;font-size:9px;font-weight:800}
.footer-lock{font-size:12px;vertical-align:-1px}
.access-panel{grid-column:1/-1;border-top:2px dashed #e9e5f1;margin-top:4px;padding-top:12px}
.access-panel-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:9px}
.access-panel-heading strong,.access-panel-heading small{display:block}
.access-panel-heading strong{font-size:10px;color:#59657d;font-weight:900}
.access-panel-heading small{margin-top:2px;color:#929cb0;font-size:8px;font-weight:700}
.access-lock{color:#84917c;font-size:19px}
.grant-list{display:grid;gap:6px;margin-bottom:9px}
.grant-item{display:flex;align-items:center;justify-content:space-between;padding:7px 9px;background:#f6f4ff;border-radius:8px;color:#6e7891;font-size:9px;font-weight:800}
.grant-item button{border:0;background:transparent;color:#e77891;font-size:9px;font-weight:900}
.grant-form{display:flex;gap:6px}
.grant-form input{height:33px;width:100%;border:2px solid #e9eaf2;border-radius:9px;padding:0 9px;outline:0;font-size:9px;font-weight:700}
.grant-form>label{flex:1}
.grant-form>button{width:34px;border:0;border-radius:9px;background:#9ed7b1;color:#fff;font-size:18px;font-weight:900;box-shadow:0 3px 0 #81bd95}
.grant-status{min-height:11px;margin:5px 0 0;color:#719c7d;font-size:8px;font-weight:800}
.reader-dialog{width:min(1120px,94vw);height:min(850px,92vh);max-width:none;max-height:none;padding:0;border:3px solid #fff;border-radius:22px;background:#f1efff;box-shadow:0 24px 90px #29334a55;overflow:hidden}
.reader-dialog::backdrop{background:#29334acc;backdrop-filter:blur(4px)}
.reader-topbar{height:65px;display:flex;align-items:center;justify-content:space-between;padding:0 21px;background:#fff;border-bottom:2px dashed #e8eaf2}
.reader-label{font-size:8px;font-weight:900;letter-spacing:.16em;color:#a19abb}
.reader-topbar h2{margin:2px 0 0;font:500 18px var(--serif);color:#46516c}
.icon-button{width:36px;height:36px;border:0;border-radius:12px;background:#fff0bd;color:#6d6686;font-size:24px;line-height:1}
.reader-stage{position:relative;height:calc(100% - 112px);margin:0 auto;background:#dedff0;overflow:hidden}
.reader-stage iframe{width:100%;height:100%;border:0;background:#fff}
.watermark{position:absolute;inset:-25%;display:grid;grid-template-columns:repeat(4,1fr);grid-template-rows:repeat(4,1fr);align-items:center;justify-items:center;pointer-events:none;overflow:hidden;opacity:.18;transform:rotate(-24deg);z-index:2}
.watermark span{color:#704e6b;font:800 11px var(--sans);letter-spacing:.06em;text-shadow:0 1px 1px #fff;white-space:nowrap}
.reader-stage.is-blurred iframe{filter:blur(12px)}
.privacy-message{display:none;position:absolute;inset:0;z-index:3;background:#f7f5ffed;color:#655f82;align-items:center;justify-content:center;text-align:center;font:500 16px var(--serif)}
.reader-stage.is-blurred .privacy-message{display:flex}
.reader-footer{height:47px;display:flex;align-items:center;justify-content:space-between;padding:0 21px;color:#8992a7;font-size:9px;font-weight:700;background:#fff}
.reader-footer strong{color:#59657d}
.toast{position:fixed;right:22px;bottom:22px;z-index:20;padding:11px 15px;background:#505b78;color:#fff;border:2px solid #fff;border-radius:14px;box-shadow:0 5px 0 #3c4765;font-size:11px;font-weight:800;opacity:0;transform:translateY(8px);transition:.25s;pointer-events:none}
.toast.show{opacity:1;transform:translateY(0)}
.toast.error{background:#bd6275}
.delete-book-button{border:0;background:transparent;padding:4px;color:#e77891;font:800 9px var(--sans)}
.delete-book-button:hover{color:#b95169;text-decoration:underline}
.share-footer{display:flex;align-items:center;justify-content:space-between;gap:8px}
.copy-link-button{border:0;background:transparent;padding:3px;color:#8c86ad;font:800 8px var(--sans)}
.copy-link-button:hover{color:#d96f87;text-decoration:underline}
@media print{body{display:none!important}}
@media(max-width:1100px){.main-content{padding:0 30px}.book-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.welcome{padding-right:4%}.welcome-art{margin-right:0}}
@media(max-width:740px){
  .sidebar{position:sticky;top:0;width:auto;height:58px;padding:0 13px;flex-direction:row;align-items:center;justify-content:space-between;border-right:0;border-bottom:2px solid #e6e1fa}
  .brand{padding:0;gap:8px}.brand-mark{width:34px;height:34px;font-size:19px;border-radius:12px}.brand strong{font-size:17px}.brand small{font-size:8px}
  .side-label,.sidebar nav,.sidebar-bottom{display:none}
  .main-content{margin:0;padding:0 16px}.topbar{height:48px}.breadcrumb{font-size:9px}.account{font-size:9px;max-width:58%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
  .welcome{min-height:218px;margin-top:15px;padding:25px 18px;border-radius:20px}.welcome h1{font-size:36px}.welcome-copy{max-width:280px;font-size:10px}.welcome-art{position:absolute;right:-66px;opacity:.45;transform:scale(.8)}
  .library-section{padding:25px 0 34px}.section-heading h2{font-size:23px}.search-box{width:150px;height:34px}.book-grid{grid-template-columns:1fr;gap:12px}
  .book-card{grid-template-columns:90px minmax(0,1fr);gap:13px;padding:12px;border-radius:16px}.book-cover{height:128px}.book-title{font-size:17px}.book-description{font-size:9px}
  .admin-section{padding:25px 0 34px}.upload-panel{padding:16px 13px;border-radius:16px}.form-grid{grid-template-columns:1fr}.field-wide{grid-column:auto}.footer{font-size:8px}
  .reader-dialog{width:100vw;height:100dvh;max-height:none;border-radius:0;border:0}.reader-footer{font-size:8px;padding:0 10px}.reader-footer span:last-child{max-width:45%;text-align:right}.reader-topbar{padding:0 14px}
}
@media(max-width:390px){.search-box{width:127px}.welcome-art{right:-88px}.welcome h1{font-size:33px}.book-card{grid-template-columns:82px minmax(0,1fr)}.book-cover{height:122px}}
