/* 学科书架：书脊、翻开的目录与真实课堂工作台。 */
.classroom-library { background:#edf0ec;padding:80px 0 92px;overflow:hidden; }
.library-layout { display:grid;grid-template-columns:310px minmax(0,1fr);gap:46px;align-items:start;max-width:1450px; }
.library-side { position:relative;padding-top:17px;min-width:0; }
.library-side .eyebrow { font-size:11px;letter-spacing:.08em;margin-bottom:19px; }
.library-side h2 { font:900 38px/1.45 var(--display-lesson);letter-spacing:-.03em;color:var(--ink); }
.library-side h2>span { color:var(--blue); }
.subject-shelf { position:relative;height:160px;display:flex;flex-direction:column-reverse;align-items:flex-start;gap:0;padding:0 24px 16px;margin-top:28px;isolation:isolate; }
.shelf-back { position:absolute;inset:18px 0 0;background:linear-gradient(0deg,#e4e5d9,#e7e9df00 90%);border-left:1px solid #c8c9b444;border-right:1px solid #c8c9b444;z-index:-1; }
.subject-book { position:relative;display:flex;flex:none;align-items:center;width:244px;max-width:100%;height:58px;padding:0 23px 9px;border:0;border-radius:3px 5px 4px 3px;color:#f3efdc;cursor:pointer;box-shadow:inset 0 2px #ffffff24,inset 0 -4px #17251f40,0 2px 3px #243b3626;transition:filter .25s,box-shadow .25s; }
.math-book { background:#345b4b; }
.physics-book { background:#3d5683;width:calc(100% - 14px);max-width:228px;margin-left:7px;height:62px; }
.subject-book::before { content:"";position:absolute;inset:5px 10px 5px;border:1px solid #f5eed529;border-radius:2px;pointer-events:none; }
.subject-book::after { content:"";position:absolute;top:6px;bottom:5px;right:-3px;width:5px;background:repeating-linear-gradient(0deg,#e8e2ce 0 1px,#bcb8a8 1px 2px);border-radius:0 2px 2px 0; }
.subject-book.is-open { box-shadow:inset 0 2px #ffffff45,inset 0 -4px #17251f40,0 2px 3px #243b3626; }
.subject-book.is-open .spine-line { background:#e4d7af;opacity:1; }
.subject-book:hover { filter:brightness(1.1); }
.subject-book:focus-visible { outline:2px solid var(--blue);outline-offset:6px; }
.spine-line { position:absolute;right:16px;top:0;width:8px;height:16px;background:#e4d7af;opacity:.22;clip-path:polygon(0 0,100% 0,100% 100%,50% 80%,0 100%);transition:opacity .25s; }
.book-subject { font:400 25px/1.15 var(--serif);letter-spacing:5px; }
.spine-symbol { margin-left:auto;margin-right:8px;font:italic 21px Georgia,serif;opacity:.75; }
.book-edition { position:absolute;bottom:9px;left:25px;font-size:5px;letter-spacing:.15em;opacity:.6; }
.shelf-plank { position:absolute;bottom:0;left:-8px;right:-8px;height:16px;background:linear-gradient(#bdab8b 0 3px,#cbbb9b 3px 10px,#9f9179 10px 12px,#cabfa7 12px);box-shadow:0 10px 13px #263c3512; }
.shelf-notes { display:none; }
.shelf-notes>span { display:block;margin-top:5px;padding:5px 0;border-left:5px solid #b58b6b;border-radius:1px;background:#e3decd;font:9px/1.25 var(--serif);color:#6b7869;text-align:center;box-shadow:0 2px 0 #bfc3b1; }
.shelf-notes>span+span { background:#d7decd;border-color:#779582;margin-left:-6px; }
.open-subject-book { position:relative;display:grid;grid-template-columns:104px minmax(0,1fr);min-height:205px;margin:33px -1px 0;background:#fbf8ee;border-radius:3px 7px 6px 2px;box-shadow:0 3px 0 #ddd9c9,0 6px 0 #f4f1e4,0 7px 0 #cecdbd,0 14px 22px #2d41370c;perspective:800px; }
.open-subject-book::before { content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;background:linear-gradient(90deg,transparent 29%,#5243280b 33%,#fff8 34%,transparent 38%); }
.open-book-leaf { position:relative;display:flex;align-items:center;flex-direction:column;padding:23px 8px 16px;border-right:1px solid #d7d0bc44; }
.book-page-label { font:9px var(--serif);letter-spacing:.15em;color:#9b9e88; }
.open-book-leaf h3 { font:400 30px/1.5 var(--serif);writing-mode:vertical-rl;letter-spacing:10px;margin-top:12px;color:var(--ink); }
.book-page-formula { position:absolute;bottom:35px;font:italic 11px Georgia,serif;color:#9a9d89;transform:rotate(-8deg); }
.book-page-number { font-size:6px;color:#a9a992;margin-top:auto;letter-spacing:.03em; }
.open-book-contents { position:relative;padding:13px 16px 13px 15px; }
.book-chapters[hidden] { display:none!important; }
.book-chapters>button { width:100%;position:relative;display:block;padding:12px 0 11px;text-align:left;background:none;border:0;border-bottom:1px solid #d3d3c75c;color:#6a776c;cursor:pointer; }
.book-chapters>button:last-child { border:0; }
.book-chapters>button>span { font:500 14px/1.6 var(--serif);display:block; }
.book-chapters>button>small { font-size:9px;display:block;line-height:1.8;color:#9d9f8e;white-space:nowrap; }
.book-chapters>button[aria-pressed=true] { color:var(--blue); }
.book-chapters>button[aria-pressed=true]::before { content:"";position:absolute;top:19px;left:-10px;width:3px;height:3px;border-radius:50%;background:var(--blue); }
.book-chapters>button[aria-pressed=true]>span { text-decoration:underline;text-underline-offset:5px;text-decoration-color:#8da6d880; }
.book-chapters>button:focus-visible { outline:2px solid var(--blue);outline-offset:3px; }
.book-ribbon { position:absolute;right:19px;top:-4px;width:10px;height:22px;background:#b65342;clip-path:polygon(0 0,100% 0,100% 100%,50% 79%,0 100%); }
.is-turning .open-book-contents { transform-origin:left center;animation:book-page-open .6s cubic-bezier(.2,.7,.2,1); }
@keyframes book-page-open { from { transform:rotateY(-68deg);opacity:.2; } 45% { opacity:1; } to { transform:rotateY(0);opacity:1; } }
.library-demo { margin-top:4px;min-width:0;border:1px solid #d8dfd8;border-radius:5px;background:#f7f8fa;box-shadow:9px 12px 0 #dce2db,0 15px 40px #25463708;overflow:hidden; }
.library-demo-caption { display:flex;justify-content:space-between;align-items:center;gap:14px;padding:12px 18px;border-bottom:1px solid #d9dfd6;background:#fafbf8;font-size:10px;color:#7b8a7c; }
.library-demo-caption>span:last-child { display:flex;align-items:center;gap:7px; }
.library-demo-caption i { display:inline-block;width:5px;height:5px;border-radius:50%;background:#74957b; }
#classroom-demo-frame { width:100%;height:628px;display:block;border:0;background:#f7f8fa; }
.library-exit { border:1px solid #bdc8bd;border-radius:5px;background:transparent;color:var(--ink);padding:5px 9px;cursor:pointer;font-size:11px; }
.library-exit[hidden] { display:none; }.library-exit:focus-visible { outline:2px solid var(--blue);outline-offset:3px; }
body.classroom-expanded { overflow:hidden; }
.library-demo.is-expanded { position:fixed;inset:12px;z-index:100;margin:0;display:flex;flex-direction:column;transform:none;opacity:1;box-shadow:0 0 0 24px #edf0ec,0 12px 70px #172f3d30; }
.library-demo.is-expanded .library-demo-caption { flex:none; }
.library-demo.is-expanded #classroom-demo-frame { flex:1;height:0!important;min-height:0; }
@media(max-width:1100px) and (min-width:721px) { .library-layout { grid-template-columns:255px minmax(0,1fr);gap:27px; }.library-side h2 { font-size:34px; }.subject-shelf { padding-inline:17px; }.open-subject-book { grid-template-columns:89px 1fr; }.open-book-contents { padding-inline:12px; }.book-chapters>button>small { font-size:8px; } }
@media(max-width:720px) {
 .classroom-library { padding:48px 0 61px; }.library-layout { display:block; }.library-side { padding:0; }.library-side .eyebrow { font-size:10px;margin-bottom:13px; }.library-side h2 { font-size:33px;line-height:1.4; }
 .subject-shelf { margin-top:21px;height:164px;width:154px;padding:0 7px 16px; }.subject-book { width:140px;height:48px;padding:0 13px 8px; }.physics-book { width:132px;height:52px;margin-left:4px; }.book-subject { font-size:21px;letter-spacing:3px; }.book-edition { font-size:4px;left:15px;bottom:7px; }.spine-line { right:10px;width:6px;height:12px; }.spine-symbol { font-size:16px;margin-right:2px; }.shelf-plank { left:-5px;right:-5px; }
 .open-subject-book { position:absolute;right:0;bottom:0;width:calc(100% - 169px);min-height:164px;margin:0;grid-template-columns:1fr; }.open-book-leaf { display:none; }.open-book-contents { padding:3px 13px; }.book-chapters>button { padding:9px 0; }.book-chapters>button>span { font-size:13px; }.book-chapters>button>small { font-size:8px;line-height:1.5; }.book-ribbon { right:11px;width:8px;height:17px; }.book-chapters>button[aria-pressed=true]::before { left:-7px;top:17px; }
 .library-demo { margin:34px 6px 0 0;box-shadow:6px 7px 0 #dce2db; }.library-demo-caption { padding:11px 12px;font-size:9px; }
}
@media(max-width:360px) { .subject-shelf { width:125px;padding-inline:4px; }.subject-book { width:117px;padding-inline:10px; }.physics-book { width:110px;margin-left:3px; }.book-subject { font-size:20px; }.spine-symbol { font-size:14px; }.book-edition { left:12px; }.open-subject-book { width:calc(100% - 141px); }.open-book-contents { padding-inline:10px; }.book-chapters>button>small { font-size:7px; }.library-side h2 { font-size:30px; } }
@media(prefers-reduced-motion:reduce) { .subject-book { transition:none; }.is-turning .open-book-contents { animation:none; } }
