:root{--blue:#1956d1;--navy:#172c50;--orange:#f58b35;--muted:#7a879d;--line:#e8edf5;--bg:#f7f9fc}*{box-sizing:border-box}body{background:var(--bg);color:var(--navy);font-family: 'Segoe UI',Arial,sans-serif;font-size:14px}button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-offset:4px}button{transition:background .18s,transform .18s}button:hover{transform:translateY(-1px)}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.svg-defs{position:absolute;width:0;height:0;overflow:hidden}.sidebar{position:fixed;inset:0 auto 0 0;width:246px;background:#fff;border-right:1px solid var(--line);padding:39px 24px 24px;display:flex;flex-direction:column;z-index:10}.brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--navy);font-size:26px;letter-spacing:-1.3px;font-weight:800}.brand:hover{color:var(--blue)}.brand-icon{width:40px;height:43px;display:grid;place-items:center;background:var(--blue);border-radius:12px;color:white;transform:rotate(-5deg)}.brand-icon svg{width:26px;height:26px}.brand-light{font-weight:400}.brand small{display:block;font-size:7px;letter-spacing:1.25px;margin-top:3px;font-weight:700}.space-label{font-size:10px;letter-spacing:1.8px;color:#99a3b4;margin:54px 15px 17px;font-weight:700}.nav-item{border:0;background:none;display:flex;align-items:center;gap:14px;color:#788398;width:100%;padding:15px 17px;margin-bottom:7px;border-radius:11px;text-align:left;font-weight:600;font-size:13px}.nav-item.active{background:#edf3ff;color:var(--blue)}.nav-dot{width:6px;height:6px;border-radius:50%;background:var(--blue);margin-left:auto}.side-prompt{background:#fff8ee;border:1px solid #ffedd5;border-radius:15px;padding:22px 20px 0;margin-top:auto;overflow:hidden}.little-star{color:var(--orange);font-size:33px}.side-prompt h3{font-size:17px;line-height:1.5;font-weight:700;margin-top:5px}.side-prompt p{font-size:12px;color:#a58d73;line-height:1.8}.tiny-books{height:66px;display:flex;align-items:end;justify-content:center;gap:5px}.tiny-books i{display:block;width:23px;height:57px;border:4px solid #94b8f9;background:#729ce7;border-radius:4px 4px 0 0;transform:rotate(-13deg)}.tiny-books i:nth-child(2){height:66px;background:#f6ac63;border-color:#ffc889;transform:rotate(-4deg)}.tiny-books i:nth-child(3){height:47px;background:#438a85;border-color:#77b6a9;transform:rotate(7deg)}.tiny-books i:nth-child(4){height:61px;background:#6585d5;transform:rotate(16deg)}.local-status{margin:25px 9px 0;font-size:11px;font-weight:600}.local-status>span{display:inline-block;width:6px;height:6px;background:#44a78a;border-radius:50%;margin-right:6px}.local-status small{display:block;color:#a3adbb;font-size:10px;margin:7px 0 0 13px}.app-shell{margin-left:246px}.topbar{height:97px;border-bottom:1px solid var(--line);background:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 43px}.breadcrumb-text{font-size:12px;color:#8792a6}.breadcrumb-text span{margin:0 14px;color:#c7cfdb}.breadcrumb-text strong{color:#536178;font-weight:500}.topbar-right{display:flex;align-items:center;gap:13px}.welcome{color:#94a0b1;font-size:11px;margin-right:11px}.avatar{background:#fff0d8;width:40px;height:40px;border:3px solid #fff;outline:1px solid #f1e9da;border-radius:50%;display:grid;place-items:center;font-size:24px}.student{font-size:12px;font-weight:700}.student small{display:block;font-size:9px;color:#95a0b0;font-weight:400;margin-top:4px}main{max-width:1530px;margin:auto;padding:31px 43px 0}.hero{min-height:336px;border-radius:22px;background:#edf3ff;position:relative;overflow:hidden;display:flex;justify-content:space-between}.hero-copy{padding:34px 36px;z-index:2}.eyebrow{font-size:9px;font-weight:700;letter-spacing:1.7px;color:#6083be}.eyebrow>span{display:inline-block;height:5px;width:5px;background:#5c89d9;border-radius:50%;margin-right:5px}.hero h1{font-size:43px;line-height:1.18;letter-spacing:-1.65px;font-weight:750;margin:15px 0 13px}.hero h1 span{color:var(--blue)}.hero p{color:#7b8da9;font-size:12px;line-height:1.9;margin-bottom:20px}.btn{font-size:12px;font-weight:600;border-radius:8px;padding:11px 18px}.btn svg{width:16px;height:16px;margin-left:12px}.btn-orange{background:var(--orange);border-color:var(--orange);color:white;box-shadow:0 6px 12px #f58b351c}.btn-orange:hover{background:#df7422;color:white}.btn-soft{background:#eff4ff;color:var(--blue);border:1px solid #e3ecfc}.btn-primary{background:var(--blue);border-color:var(--blue)}.hero-foot{margin-top:20px;font-size:9px;color:#899cb7;display:flex;align-items:center;gap:10px}.mini-faces{font-size:15px;letter-spacing:-6px;padding-right:5px}.hero-art{width:46%;min-width:300px;position:relative;align-self:stretch}.orbit{position:absolute;border:1px solid #dce7fb;width:370px;height:370px;border-radius:50%;top:4px;left:-12px}.orbit-two{width:278px;height:278px;top:52px;left:34px}.art-star{position:absolute;color:#f2ad4d;font-size:30px}.s1{left:10%;top:24%}.s2{right:13%;bottom:22%;font-size:21px}.s3{left:37%;top:9%;color:#8aaaf0;font-size:26px}.art-planet{position:absolute;right:10%;top:17%;width:20px;height:20px;background:#f6b060;border-radius:50%}.hero-book{position:absolute;box-shadow:12px 16px 18px #27477722;border-radius:4px 11px 11px 4px;overflow:hidden;border-left:7px solid #ffffff24;text-align:center}.book-back{width:167px;height:228px;background:#3d6bd4;color:#fff;transform:rotate(17deg);left:42%;top:73px;padding-top:24px}.book-back span{font-size:14px;font-weight:700;letter-spacing:2px}.book-back div{color:#f8ce77;font-size:90px}.book-front{width:174px;height:242px;background:#ffdb9d;transform:rotate(-13deg);left:15%;top:67px;padding-top:22px;color:#824b24}.book-front small{font-size:8px;letter-spacing:1.5px}.book-front strong{display:block;font:700 23px Georgia,serif;margin-top:5px}.cover-landscape{height:143px;position:relative;overflow:hidden;margin-top:7px}.sun{width:39px;height:39px;position:absolute;border-radius:50%;background:#ed9951;left:57%;top:5px}.mountain{position:absolute;width:150px;height:160px;background:#688f86;transform:rotate(45deg);top:75px;left:-33px;border-radius:8px}.m2{background:#376e70;left:66px;top:65px}.river{position:absolute;left:72px;top:83px;width:25px;height:100px;background:#f8e9bf;transform:rotate(-20deg);border-radius:50%}.book-bottom{font-size:5px;letter-spacing:1px;position:absolute;bottom:10px;left:14px;color:#fff}.floating-label{position:absolute;background:white;border:1px solid #f0f3fc;border-radius:9px;padding:10px 14px;font-size:9px;color:#58729b;z-index:3;box-shadow:0 6px 22px #233c7710;white-space:nowrap}.label-top{top:35px;right:18px;transform:rotate(7deg)}.label-bottom{bottom:25px;left:10px;transform:rotate(-5deg)}.continue-card{display:flex;align-items:center;gap:17px;background:white;border:1px solid var(--line);border-radius:13px;padding:18px 22px;margin:22px 0 33px}.continue-icon{background:#eef3ff;font-size:26px;border-radius:10px;width:55px;height:57px;display:grid;place-items:center}.continue-copy>span{font-size:8px;letter-spacing:1.3px;font-weight:700;color:#98a6ba}.continue-copy h2{font-size:14px;margin:6px 0 5px;font-weight:700}.continue-copy p{font-size:10px;margin:0;color:#97a2b4}.continue-progress{width:145px;margin-left:auto;margin-right:20px}.progress{height:5px;background:#edf1f8;border-radius:5px}.progress-bar{background:#ffa254}.continue-progress small{display:block;font-size:9px;color:#9aa6b8;margin-top:8px}.section-title{display:flex;align-items:end;justify-content:space-between}.blue{color:#7f95b7}.section-title h2{font-size:25px;font-weight:750;letter-spacing:-.6px;margin:9px 0 0}.section-title h2 span{color:var(--orange);font-size:25px;margin-left:5px}.book-count{font-size:10px;color:#929fb2;padding-bottom:5px}.filter-row{display:flex;gap:12px;margin:23px 0 16px}.search-box{flex:1;background:#fff;border:1px solid #e2e8f2;border-radius:9px;display:flex;align-items:center;padding:0 15px;color:#9aa8be}.search-box input{width:100%;border:0;padding:12px;background:none;font-size:11px;color:var(--navy)}.search-box input::placeholder{color:#a0aabd}.form-select{border-color:#e2e8f2;border-radius:9px;font-size:11px;color:#7a889e;width:163px;min-height:41px}.categories{display:flex;gap:9px;flex-wrap:wrap;margin-bottom:24px}.category{border:1px solid #e4eaf3;background:white;border-radius:8px;padding:8px 15px;color:#7f8ca1;font-size:11px}.category.active{background:var(--blue);border-color:var(--blue);color:white;box-shadow:0 4px 9px #1956d11c}.books-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}.book-card{border:1px solid #e7ecf3;background:white;border-radius:13px;overflow:hidden;transition:box-shadow .2s,transform .2s}.book-card:hover{transform:translateY(-4px);box-shadow:0 9px 23px #24375910}.book-cover{height:220px;position:relative;overflow:hidden;margin:9px;border-radius:8px;background:var(--cover-bg);color:var(--cover-fg);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.book-cover:after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#00000012,transparent 5%,#ffffff10 7%,transparent 9%);pointer-events:none}.cover-caption{font-size:7px;letter-spacing:2px;margin-bottom:10px;opacity:.7}.cover-title{font:700 25px/1.07 Georgia,serif;max-width:155px;z-index:2}.cover-illustration{font-size:70px;line-height:1.25;margin:9px 0 3px;position:relative;z-index:1;filter:drop-shadow(3px 6px 0 #0000000b)}.cover-author{font-size:7px;letter-spacing:1px;text-transform:uppercase;z-index:1}.cover-speckles{position:absolute;inset:15px;font-size:25px;display:flex;justify-content:space-between;align-items:center;opacity:.35}.favorite-btn{position:absolute;top:9px;right:9px;border:0;background:#ffffffed;border-radius:50%;width:29px;height:29px;display:grid;place-items:center;z-index:3;color:#9cabc0}.favorite-btn svg{width:15px;height:15px}.favorite-btn.selected{color:#e77658}.favorite-btn.selected svg{fill:#e77658}.format-badge{position:absolute;left:10px;bottom:10px;background:#ffffffec;border-radius:4px;color:#68778d;font-size:7px;letter-spacing:.7px;padding:4px 6px;z-index:2}.book-info{padding:6px 16px 15px}.book-category{font-size:8px;font-weight:600;color:#87a0c4}.book-info h3{font-size:13px;line-height:1.4;font-weight:700;margin:5px 0 3px}.book-info>p{font-size:10px;color:#9aa5b4;margin-bottom:11px}.book-meta{display:flex;align-items:center;justify-content:space-between;font-size:9px;color:#9ca7b8}.book-rating{color:#f4a245;font-size:11px}.book-rating span{color:#6f7f96;font-size:9px;margin-left:4px}.book-open{display:flex;align-items:center;justify-content:space-between;width:100%;border:0;border-top:1px solid #eff2f6;background:white;color:var(--blue);padding:11px 0 0;margin-top:12px;font-weight:600;font-size:10px}.book-open svg{width:14px;height:14px}footer{display:flex;justify-content:space-between;gap:15px;padding:29px 0 22px;margin-top:12px;font-size:9px;color:#a3aec0}footer svg{width:15px;height:15px;margin-right:6px}.footer-dot{margin:0 7px;color:var(--orange)}.empty-state{text-align:center;padding:40px}.empty-state>span{font-size:35px}.empty-state h3{font-size:19px;margin:15px 0}.empty-state p{color:var(--muted)}.reader-body{display:flex;gap:28px;background:#f1f4fa;padding:22px 30px}.reader-workspace{flex:1;min-width:0}.reader-toolbar{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.reader-toolbar .form-select{width:auto;min-height:36px}.tool{background:white;border:1px solid #dce4f0;color:#536986;padding:8px 11px;border-radius:7px;font-size:11px}.tool.active{background:#dfeaff;border-color:#82a8ee;color:var(--blue)}input[type=color]{width:35px;height:35px;border:0;background:white;border-radius:6px}.reader-hint{font-size:11px;color:#7a8ba5;margin:12px 0}.page-scroll{max-height:calc(100vh - 245px);min-height:250px;overflow:auto;padding:4px 10px 18px}.reading-page{width:100%;max-width:720px;aspect-ratio:4/7;background:#fff;color:#28374a;position:relative;margin:0 auto;box-shadow:0 3px 14px #2638580d;transition:background .2s,color .2s}.page-text{padding:9% 10%;height:100%;position:relative}.page-chapter{display:block;font-size:10px;letter-spacing:2px;text-align:center;color:#8191a8}.page-ornament{text-align:center;font-size:38px;color:#eab361;margin:7% 0 4%}.page-text h3{font:700 clamp(21px,2.4vw,34px) Georgia,serif;text-align:center;margin-bottom:8%}.page-text p{font:clamp(13px,1.4vw,19px)/1.9 Georgia,serif;margin-bottom:5%}.page-number{position:absolute;bottom:5%;left:49%;font-family:Georgia,serif;color:#97a0ad}.reading-page.sepia{background:#f5e7cd;color:#63472d}.reading-page.night{background:#263247;color:#e2e7ee}.reading-page.blue{background:#e8f2fc;color:#304767}#drawing{position:absolute;inset:0;width:100%;height:100%;touch-action:none;pointer-events:none}.page-navigation{display:flex;justify-content:center;align-items:center;gap:16px;margin-top:13px}.page-navigation>span{font-size:12px;color:#7e8a9f}.reader-side{width:265px;flex-shrink:0;background:white;border:1px solid var(--line);padding:23px;border-radius:12px;align-self:flex-start}.reader-side h3{font-size:17px;line-height:1.4;font-weight:700}.reader-side h3 span{color:var(--orange)}.reader-side>p{font-size:11px;color:#8796ab;line-height:1.7}.reader-side label,.reader-side h4{display:block;font-size:12px;font-weight:600;margin:15px 0 10px}.reader-side textarea{font-size:12px;border-color:#e1e7f0;resize:vertical}.reader-divider{height:1px;background:var(--line);margin:23px 0}.rating-stars{display:flex;gap:3px;margin:10px 0}.rating-stars button{padding:0;border:0;background:none;font-size:30px;color:#b6c0ce}.rating-stars button.selected{color:#f6a33b}.demo-note{font-size:10px!important;margin:20px 0 0}.bookmark-link{display:inline-block;margin:4px;padding:5px 9px;background:#eef3ff;border:0;border-radius:5px;color:var(--blue);font-size:11px}#feedback{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#193a6c;color:white;border-radius:10px;padding:13px 22px;box-shadow:0 6px 30px #192d4930;z-index:2000;opacity:0;pointer-events:none;transition:opacity .2s}#feedback.show{opacity:1}.note-card{background:white;border:1px solid var(--line);border-radius:10px;padding:18px;margin:12px 0}.note-card p{white-space:pre-wrap;color:#65738a}.note-card h3{font-size:16px}.modal-header{padding:17px 30px}.modal-title{margin-top:5px}
@media(min-width:1600px){.book-cover{height:280px}.hero-art{width:43%}.hero h1{font-size:49px}.hero{min-height:370px}.hero-book{margin-top:12px}}@media(max-width:1200px){.sidebar{width:210px;padding:30px 18px}.brand{font-size:23px}.app-shell{margin-left:210px}main{padding:25px 27px 0}.topbar{padding:0 27px}.hero-copy{padding:30px 25px}.hero h1{font-size:36px}.hero-art{min-width:240px}.book-front{left:5%}.book-back{left:35%}.books-grid{gap:13px}.book-cover{height:190px}.cover-title{font-size:22px}.continue-progress{width:100px;margin-right:5px}.hero-foot{font-size:8px}.reader-side{width:235px}.reader-body{padding:17px;gap:17px}}
@media(max-width:960px){.sidebar{width:78px;padding:28px 12px}.brand>span:last-child,.space-label,.side-prompt,.local-status{display:none}.brand{justify-content:center}.sidebar nav{margin-top:38px}.nav-item{font-size:0;padding:14px;gap:0;justify-content:center}.nav-item svg{flex-shrink:0}.nav-dot{display:none}.app-shell{margin-left:78px}.hero-art{min-width:230px}.hero h1{font-size:34px}.books-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.continue-progress{display:none}.continue-card .btn{margin-left:auto}.reader-body{flex-direction:column}.reader-side{width:100%}.page-scroll{max-height:65vh}.page-text p{font-size:17px}.page-text h3{font-size:29px}.reader-workspace{flex:none}}
@media(max-width:650px){.sidebar{position:static;width:auto;padding:16px 20px;border-bottom:1px solid var(--line);border-right:0}.brand{justify-content:start}.brand>span:last-child{display:block}.brand-icon{height:32px;width:32px}.brand-icon svg{width:22px}.sidebar nav{display:flex;margin:16px 0 0;gap:5px}.nav-item{font-size:10px;flex-direction:column;gap:6px;padding:9px 5px;margin:0;border-radius:8px}.nav-item svg{width:18px;height:18px}.app-shell{margin:0}.topbar{height:69px;padding:0 20px}.welcome,.student small{display:none}.student{font-size:11px}.avatar{width:32px;height:32px;font-size:21px}main{padding:19px 18px 0}.hero{min-height:320px}.hero-copy{padding:27px 22px;width:100%}.hero h1{font-size:33px}.hero p{font-size:11px;max-width:210px}.hero-art{position:absolute;right:-45px;top:45px;width:180px;height:270px;min-width:0;opacity:.32;pointer-events:none}.hero-copy .btn,.hero-foot{position:relative;z-index:3}.hero-foot{font-size:8px}.hero-book{transform:rotate(13deg) scale(.8);left:0}.book-back,.floating-label,.orbit{display:none}.hero-copy h1{position:relative;z-index:4}.hero .eyebrow{font-size:8px;letter-spacing:1px}.continue-card{padding:14px;gap:10px;margin:17px 0 26px;flex-wrap:wrap}.continue-copy{flex:1}.continue-copy h2{font-size:12px}.continue-icon{width:42px;height:46px;font-size:23px}.continue-card .btn{width:100%;margin-top:2px;padding:8px}.section-title h2{font-size:22px}.section-title .eyebrow{font-size:7px;letter-spacing:1px}.book-count{font-size:8px}.filter-row{flex-wrap:wrap;margin-top:19px;gap:8px}.search-box{flex:1 1 100%}.filter-row .form-select{width:calc(50% - 4px)}.categories{gap:6px}.category{font-size:10px;padding:7px 10px}.books-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.book-cover{height:185px;margin:6px}.cover-title{font-size:22px;max-width:130px}.cover-illustration{font-size:53px}.cover-caption{font-size:6px;letter-spacing:1px}.book-info{padding:5px 11px 12px}.book-info h3{font-size:12px}.book-meta{font-size:8px}.cover-author{font-size:6px}.book-info>p{min-height:24px;font-size:9px}footer{flex-direction:column;font-size:8px;gap:9px}.reader-body{padding:12px}.modal-header{padding:15px}.reader-toolbar .tool{font-size:10px;padding:8px}.page-scroll{padding:0 0 10px}.page-text p{font-size:13px;line-height:1.7}.page-text h3{font-size:23px}.page-navigation{gap:7px;flex-wrap:wrap}.page-navigation .btn,.page-navigation .tool{font-size:10px;padding:8px}.page-chapter{font-size:8px}.page-ornament{font-size:25px}#feedback{width:90%;text-align:center;font-size:12px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}


/* School reference palette: navy, white, orange, and teal. */
:root {
  --blue: #1e3c72;
  --navy: #1e3c72;
  --orange: #ff6b35;
  --muted: #687587;
  --line: #dfe6f0;
  --bg: #1e3c72;
  --teal: #169cb2;
  --gold: #ffc35c;
}
body { background: linear-gradient(120deg, #1e3c72, #203f78); }
.sidebar, .topbar { background: #1e3c72; color: #fff; border-color: #ffffff18; }
.brand, .brand:hover, .student, .breadcrumb-text strong { color: #fff; }
.brand-icon { background: linear-gradient(120deg, var(--orange), var(--gold)); }
.space-label, .nav-item, .welcome, .student small, .breadcrumb-text,
.breadcrumb-text span, .local-status small { color: #c8d8ef; }
.nav-item:hover { background: #2a508a; color: #fff; }
.nav-item.active { background: linear-gradient(120deg, var(--orange), #ffb657); color: #fff; }
.nav-dot { background: #fff; }
.side-prompt { background: #284d85; border-color: #ffffff18; }
.side-prompt h3, .local-status { color: #fff; }
.side-prompt p { color: #cfdef2; }
.little-star { color: var(--gold); }
.local-status > span { background: #1bc58d; }
.hero { background: linear-gradient(115deg, #23457c, #2c5290); border: 1px solid #ffffff16; }
.hero h1 { color: #fff; }
.hero h1 span { color: var(--gold); }
.hero .eyebrow, .hero p, .hero-foot { color: #d4e4fa; }
.hero .eyebrow > span { background: var(--gold); }
.orbit { border-color: #ffffff12; }
.book-back { background: #169cb2; }
.floating-label { color: #1e3c72; background: #f8f9fa; border-color: #fff; }
.btn-orange, .btn-primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn-orange:hover, .btn-primary:hover, .btn-primary:active,
.btn-primary:focus { background: #e95724; border-color: #e95724; color: #fff; }
.btn-primary:disabled { background: #be6648; border-color: #be6648; }
.btn-primary:focus, .btn-orange:focus { box-shadow: 0 0 0 .2rem #ff6b3540; }
.btn-soft { background: #eaf4f7; border-color: #d5e8ed; color: #147c8e; }
.btn-soft:hover { background: #d9edf2; color: #126778; }
.continue-card { background: #f8f9fa; }
.continue-icon { background: #e6f3f5; }
.continue-copy > span, .continue-copy p, .continue-progress small { color: #687587; }
.progress-bar { background: var(--orange); }
.section-title h2 { color: #fff; }
.catalog .eyebrow, .book-count { color: #cfdef2; }
.category { background: #f8f9fa; color: #1e3c72; border-color: #e2e8f1; }
.category:hover { background: #e6f3f5; }
.category.active { background: linear-gradient(120deg, #169cb2, #138496); border-color: #169cb2; color: #fff; }
.search-box input::placeholder, .form-select { color: #687587; }
.book-category { color: #138496; }
.book-info > p, .book-meta { color: #687587; }
.book-rating, .rating-stars button.selected { color: #ee9d00; }
.favorite-btn.selected { color: #ff6b35; }
.favorite-btn.selected svg { fill: #ff6b35; }
.empty-state { color: #fff; }
.empty-state p, footer { color: #cfdef2; }
.reader-body { background: #eaf0f7; }
.modal-header { background: linear-gradient(115deg, #1e3c72, #2c5290); color: #fff; border-color: #ffffff20; }
.modal-header .eyebrow { color: #d4e4fa; }
.modal-header .btn-close { filter: invert(1) grayscale(100%) brightness(200%); opacity: .85; }
.tool.active { background: #dceff3; border-color: #169cb2; color: #116c7b; }
.reading-page.inverted { background: #05070c; color: #fff; }
.reading-page.inverted .page-chapter,.reading-page.inverted .page-number { color: #cbd5e1; }
.bookmark-link { background: #e6f3f5; color: #147c8e; }
#feedback { background: #147c8e; }
.form-control:focus, .form-select:focus { border-color: var(--orange); box-shadow: 0 0 0 .2rem #ff6b3526; }


/* Bilingual catalog and edition controls. */
[hidden] { display: none !important; }
.language-switch { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 11px; background: #ffffff10; color: #d7e4f5; border: 1px solid #ffffff30; border-radius: 9px; white-space: nowrap; font-size: 11px; }
.language-switch .selected { color: #fff; font-weight: 700; }
.switch-track { width: 30px; height: 18px; background: #ff6b35; border-radius: 20px; padding: 3px; }
.switch-track i { display: block; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform .2s; }
.language-switch[aria-checked=true] .switch-track i { transform: translateX(12px); }
.modal-header > .language-switch { margin-left: auto; margin-right: 15px; }
.modal-header .btn-close { margin-left: 0; }
.admin-nav { margin-top: 12px; border-top: 1px solid #ffffff20; border-radius: 0; }
.book-details { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; font-size: 12px; margin-bottom: 16px; }
.book-details dt { font-weight: 600; }
.book-details dd { margin: 0; overflow-wrap: anywhere; }
.synopsis-text { color: #67758b; line-height: 1.65; white-space: pre-wrap; font-size: 12px; }
.card-synopsis { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.7; min-height: 50px; }
.edition-panel { background: #fff; border-radius: 14px; padding: 28px; }
.edition-panel h3 { font-size: 24px; margin: 14px 0 22px; }
.edition-label { background: #e6f3f5; color: #147c8e; font-weight: 600; padding: 7px 12px; border-radius: 6px; }
.catalog-actions { display: flex; align-items: center; gap: 12px; }
.catalog-actions .btn { font-size: 10px; padding: 7px 11px; }
#adminModal .modal-body { background: #f8f9fa; }
#adminModal legend { color: #147c8e; font-size: 18px; font-weight: 700; }
#adminModal fieldset { min-width: 0; }
#adminModal small { color: #67758b; font-size: 11px; }
#adminFiles { overflow-wrap: anywhere; font-size: 12px; }
.book-cover .cover-title { overflow-wrap: anywhere; }
@media(max-width:1200px) { .topbar .welcome { display: none; } }
@media(max-width:960px) { .admin-nav span { display: none; } .admin-nav { margin-top: 14px; } }
@media(max-width:650px) {
 .topbar { height: auto; min-height: 76px; padding-top: 12px; padding-bottom: 12px; gap: 12px; flex-wrap: wrap; }
 .topbar .student, .topbar .avatar { display: none; }
 .topbar-right { margin-left: auto; }
 .language-switch { font-size: 10px; padding: 7px; gap: 5px; }
 .admin-nav { width: auto; align-self: flex-end; flex-direction: row; margin-top: 8px; border: none; }
 .admin-nav span { display: inline; }
 .catalog-actions { flex-direction: column; align-items: flex-end; gap: 5px; }
 .catalog-actions .btn { font-size: 9px; padding: 5px; }
 .modal-header { flex-wrap: wrap; gap: 10px; }
 .modal-header > div:first-child { max-width: calc(100% - 35px); }
 .modal-header > .language-switch { margin-left: 0; }
 .edition-panel { padding: 18px; }
}

.book-cover{height:auto;aspect-ratio:2 / 3}
.book-cover-image{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:var(--cover-bg);z-index:1}.book-cover:has(.book-cover-image) .favorite-btn,.book-cover:has(.book-cover-image) .format-badge{z-index:2}.book-cover:has(.book-cover-image) :is(.cover-speckles,.cover-caption,.cover-title,.cover-illustration,.cover-author){visibility:hidden}
.brand-icon img{width:34px;height:34px;object-fit:contain}.school-home-logo{width:92px;height:58px;object-fit:contain;object-position:left center;margin-bottom:10px;border-radius:50%;background:#fff;padding:4px}.hero-copy .school-home-logo + .eyebrow{margin-top:0}

/* Brand marks sit in balanced circular tiles on both light and dark surfaces. */
.brand-icon{width:48px;height:48px;padding:7px;background:#fff;border:1px solid #e3eaf5;border-radius:50%;transform:none;box-shadow:0 5px 14px #102c5c18}
.brand-icon img{width:100%;height:100%;object-fit:contain}
.school-home-logo{width:72px;height:72px;object-fit:cover;object-position:center;margin:0 0 14px;border-radius:50%;background:#fff;padding:3px;border:1px solid #e3eaf5;box-shadow:0 7px 18px #102c5c18}

/* Compact catalog navigation keeps large collections on manageable pages. */
.catalog-pagination{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:12px;margin:30px 0 8px}
.catalog-pagination[hidden]{display:none}
.catalog-page-summary{padding:10px 14px;border-radius:9px;background:#ffffff15;color:#e4edfb;font-size:13px;font-weight:650;white-space:nowrap}
.catalog-page-buttons{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:6px}
.catalog-page{min-width:40px;min-height:42px;padding:8px 12px;border:1px solid #ffffff30;border-radius:9px;background:#fff;color:#1e3c72;font-size:14px;font-weight:700;line-height:1.3}
.catalog-page:hover:not(:disabled){background:#e6effc}
.catalog-page.is-current,.catalog-page.is-current:hover{background:var(--orange);border-color:var(--orange);color:#fff}
.catalog-page:disabled{background:#ffffff12;border-color:#ffffff16;color:#b4c6e0;cursor:default}
.catalog-page:focus-visible{outline:3px solid #ffc35c;outline-offset:3px}
.catalog-page-gap{padding:0 2px;color:#d4e4fa}
@media(max-width:650px){.catalog-pagination{gap:9px;margin-top:24px}.catalog-page{min-width:32px;min-height:40px;padding:8px 6px}.catalog-page-buttons{gap:3px}.catalog-page-summary{font-size:12px;padding:8px 12px}}

/* Refined sidebar: clear sections, readable actions, and a stable brand block. */
.sidebar {
  width: 276px;
  padding: 28px 20px 22px;
  overflow-y: auto;
  background: linear-gradient(180deg, #173665 0%, #20477f 100%);
  border-right: 1px solid #ffffff18;
  box-shadow: 12px 0 32px #102c5c18;
}
.app-shell { margin-left: 276px; }
.brand {
  gap: 12px;
  padding: 4px 8px 20px;
  border-bottom: 1px solid #ffffff20;
  color: #fff;
  letter-spacing: -1px;
}
.brand-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  padding: 8px;
  background: #fff;
  border: 0;
  border-radius: 17px;
  box-shadow: 0 8px 20px #081d3d35;
}
.brand-icon img { width: 100%; height: 100%; object-fit: contain; }
.brand > span:last-child { line-height: 1; }
.brand small {
  margin-top: 8px;
  color: #cfe0f5;
  font-size: 8px;
  letter-spacing: 1.35px;
}
.space-label {
  margin: 30px 10px 12px;
  color: #afc6e7;
  font-size: 10px;
  letter-spacing: 2.1px;
}
.sidebar nav,
.sidebar-tools,
.sidebar-admin-tools { display: flex; flex-direction: column; gap: 5px; }
.sidebar .nav-item,
.sidebar .sidebar-tool,
.sidebar .admin-nav {
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 12px 14px;
  gap: 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #d5e4f7;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -.1px;
}
.sidebar .nav-item svg,
.sidebar .sidebar-tool svg,
.sidebar .admin-nav svg { width: 22px; height: 22px; flex: 0 0 22px; stroke: currentColor; }
.sidebar .nav-item:hover,
.sidebar .sidebar-tool:hover,
.sidebar .admin-nav:hover {
  color: #fff;
  background: #ffffff12;
  border-color: #ffffff18;
  transform: translateX(2px);
}
.sidebar .nav-item.active {
  color: #fff;
  background: linear-gradient(110deg, #ff6a35 0%, #ffad4d 100%);
  border-color: #ffbd6b66;
  box-shadow: 0 10px 22px #091e3d35;
}
.sidebar .nav-item.active svg { filter: drop-shadow(0 1px 1px #8a2f1926); }
.nav-dot { width: 7px; height: 7px; margin-left: auto; background: #fff; box-shadow: 0 0 0 4px #ffffff20; }
.sidebar-tools,
.sidebar-admin-tools {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #ffffff20;
}
.sidebar-admin-tools { margin-top: 14px; }
.sidebar .sidebar-tool,
.sidebar .admin-nav { color: #d5e4f7; }
.sidebar .sidebar-tool:hover,
.sidebar .admin-nav:hover { color: #fff; }
.sidebar .admin-nav[data-ui]::after { content: 'ADMIN'; margin-left: auto; color: #ffc35c; font-size: 8px; letter-spacing: 1px; opacity: .85; }
.side-prompt {
  flex: 0 0 auto;
  min-height: 146px;
  margin-top: 24px;
  padding: 20px 18px 0;
  background: linear-gradient(145deg, #2b568f, #24487d);
  border: 1px solid #ffffff20;
  border-radius: 18px;
  box-shadow: inset 0 1px #ffffff0d;
}
.side-prompt h3 { margin: 4px 0 7px; color: #fff; font-size: 16px; line-height: 1.35; }
.side-prompt p { color: #c8dbf1; font-size: 11px; line-height: 1.55; }
.little-star { color: #ffc35c; font-size: 27px; }
.local-status { flex: 0 0 auto; margin: 20px 10px 0; color: #fff; font-size: 12px; }
.local-status small { color: #c5d8ef; font-size: 10px; }
@media(max-width:1200px){.sidebar{width:238px;padding-left:16px;padding-right:16px}.app-shell{margin-left:238px}}
@media(max-width:960px){
  .sidebar{width:82px;padding:24px 10px}
  .app-shell{margin-left:82px}
  .brand{justify-content:center;padding:4px 0 18px}
  .brand>span:last-child,.space-label,.side-prompt,.local-status{display:none}
  .sidebar nav,.sidebar-tools,.sidebar-admin-tools{gap:6px}
  .sidebar .nav-item,.sidebar .sidebar-tool,.sidebar .admin-nav{justify-content:center;padding:12px 8px}
  .sidebar .nav-item span:not(.nav-dot),.sidebar .sidebar-tool span,.sidebar .admin-nav span,.sidebar .admin-nav[data-ui]::after{display:none}
  .nav-dot{display:none}
}
/* Keep the existing desktop flex layout; the wrapper only groups the mobile menu. */
.sidebar-navigation{display:contents}
.sidebar-navigation[hidden],.mobile-menu-toggle{display:none}
@media(max-width:650px){
  .sidebar{position:static;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:0 12px;width:auto;padding:12px 16px;overflow:visible;border-right:0;border-bottom:1px solid #ffffff20;box-shadow:none}
  .app-shell{margin:0}
  .brand{justify-content:flex-start;gap:9px;padding:0;border:0;font-size:22px;min-width:0}
  .brand>span:last-child{display:block}
  .brand-icon{width:44px;height:44px;flex-basis:44px;padding:6px;border-radius:14px}
  .brand small{font-size:6px;letter-spacing:.6px;line-height:1.4}
  .mobile-menu-toggle:not([hidden]){display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:9px 10px;border:1px solid #ffffff40;border-radius:12px;background:#ffffff12;color:#fff;font-size:12px;font-weight:650}
  .mobile-menu-toggle svg{width:20px;height:20px}
  .mobile-menu-toggle:hover{background:#ffffff20;transform:none}
  .mobile-menu-toggle:focus-visible{outline:2px solid #ffc35c;outline-offset:3px}
  .mobile-menu-close,.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-bars{display:none}
  .mobile-menu-toggle[aria-expanded="true"] .mobile-menu-close{display:block}
  .sidebar-navigation:not([hidden]){display:block;grid-column:1/-1;min-width:0;max-height:70vh;max-height:70dvh;overflow-y:auto;overscroll-behavior:contain;margin-top:12px;padding:4px 0 2px;border-top:1px solid #ffffff20}
  .space-label{display:block;margin:14px 12px 8px}
  .sidebar nav{display:flex;flex-direction:column;gap:4px;margin:0}
  .sidebar .nav-item{min-height:46px;flex:none;flex-direction:row;justify-content:flex-start;gap:12px;padding:12px;font-size:14px;text-align:left}
  .sidebar .nav-item:hover{transform:none}
  .sidebar .nav-item span:not(.nav-dot),.sidebar .sidebar-tool span,.sidebar .admin-nav span{display:block}
  .sidebar-tools,.sidebar-admin-tools{flex-direction:column;gap:4px;border-top:1px solid #ffffff20;padding-top:10px;margin-top:10px}
  .sidebar .sidebar-tool,.sidebar .admin-nav{width:100%;min-width:0;min-height:46px;padding:12px;font-size:14px}
  .sidebar-admin-tools:not(:has(>button:not([hidden]))){display:none}
  .sidebar .admin-nav[data-ui]::after{display:none}
  .side-prompt,.local-status{display:none}
  .categories{display:none}
}
