/* Resource library: warm paper, album-like book covers, lightweight document rail. */
.library-workspace .resource-library{max-width:1440px}
.library-workspace .resource-hero{padding-bottom:24px}
.library-workspace .resource-hero h1{font-size:clamp(2rem,3.2vw,2.8rem);letter-spacing:-.045em}
.library-workspace .resource-hero>p{font-size:15px;margin:10px 0 20px}
.library-workspace .resource-search-form{max-width:780px;margin-top:20px}
.library-workspace .resource-search-box input{height:47px;font-size:14px}
.library-workspace .resource-catalog{grid-template-columns:166px minmax(0,1fr);gap:34px;margin-top:26px}
.resource-results:has(.resource-shelves){background:transparent;border:0;border-radius:0;overflow:visible}
.resource-results:has(.resource-shelves)>.resource-results-header{padding:0 0 16px;background:transparent;border-bottom:0}
.resource-results:has(.resource-shelves)>.resource-pagination{margin-top:25px;padding:19px 0 0}
.resource-shelves{min-width:0}
.shelf-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:25px 28px 0}
.shelf-eyebrow{display:block;font-size:10px;letter-spacing:.2em;color:#6c7d71;font-weight:650;margin-bottom:7px}
.shelf-heading h2{font-size:19px;font-weight:600;line-height:1.6;letter-spacing:-.02em;margin:0;color:#30483a}
.shelf-heading h2>span{display:inline-block;font-size:12px;color:#738074;letter-spacing:0;font-weight:400;margin-left:12px}
.shelf-heading p{font-size:14px;color:#6e796f;margin:5px 0 0}
.shelf-arrows{display:flex;gap:8px;flex-shrink:0}
.shelf-arrow{width:40px;height:40px;border:1px solid #ccd7ca;border-radius:50%;background:#ffffffa8;color:#365640;font-size:21px;cursor:pointer;display:grid;place-items:center;transition:background .2s}
.shelf-arrow:hover:not(:disabled){background:#e7eee3;border-color:#7f987f}
.shelf-arrow:disabled{opacity:.33;cursor:default}
.book-collection{border:1px solid #dde3d6;border-radius:18px;background:radial-gradient(ellipse at 50% 15%,#fcfdf8,#eef2e8 80%);overflow:hidden}
.shelf-stage{position:relative;margin-top:2px}
.shelf-stage:after{content:'';position:absolute;left:9%;right:9%;bottom:45px;height:1px;background:linear-gradient(90deg,transparent,#b4c1ac,transparent);pointer-events:none}
.shelf-track{--book-width:182px;display:flex;position:relative;align-items:center;gap:3px;overflow-x:auto;overflow-y:hidden;padding:28px max(0px,calc(50% - var(--book-width)/2)) 22px;scroll-snap-type:x mandatory;scrollbar-width:thin;scrollbar-color:#b7c3ac transparent;overscroll-behavior-x:contain;min-width:0;isolation:isolate}
.shelf-book{position:relative;flex:0 0 var(--book-width);width:var(--book-width);min-width:0;scroll-snap-align:center;scroll-snap-stop:normal;padding:0;border:0;background:none;color:inherit;cursor:pointer;perspective:900px;z-index:1}
.shelf-cover{position:relative;display:block;aspect-ratio:3/4;width:100%;background:#41614f;overflow:hidden;border-radius:3px 7px 7px 3px;box-shadow:inset 5px 0 7px #0003,9px 12px 18px #2738231d;transform:scale(.83) rotateY(30deg);transform-origin:center;transition:transform .38s,box-shadow .38s,opacity .38s;opacity:.74}
.shelf-cover:after{content:'';position:absolute;inset:0;box-shadow:inset 6px 0 9px #0002,inset 8px 0 0 #ffffff16;pointer-events:none;border:1px solid #233c2718;border-radius:inherit}
.shelf-book[data-offset="-1"] .shelf-cover,.shelf-book[data-offset="-2"] .shelf-cover{transform:scale(.83) rotateY(-30deg)}
.shelf-book[data-offset="-2"] .shelf-cover,.shelf-book[data-offset="2"] .shelf-cover{opacity:.55;transform:scale(.74) rotateY(35deg)}
.shelf-book[data-offset="-2"] .shelf-cover{transform:scale(.74) rotateY(-35deg)}
.shelf-book.is-selected{z-index:3}
.shelf-book.is-selected .shelf-cover{transform:scale(1) rotateY(0);opacity:1;box-shadow:5px 14px 23px #27382330}
.shelf-cover-fallback{display:flex;position:absolute;inset:0;flex-direction:column;padding:24px 19px 21px 23px;text-align:left;color:#faf9ec}
.shelf-cover-subject{font-size:10px;line-height:1.6;letter-spacing:.1em;opacity:.8}
.shelf-cover-fallback strong{font-family:Georgia,'Noto Serif SC','SimSun',serif;font-size:24px;line-height:1.5;font-weight:500;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;margin-top:22px}
.shelf-cover-rule{width:24px;height:1px;background:currentColor;opacity:.55;margin-top:auto;margin-bottom:10px}
.shelf-cover-footer{font-size:10px;opacity:.85}
.tone-sage{background:linear-gradient(145deg,#466756,#2f4d3e)}
.tone-blue{background:linear-gradient(145deg,#476573,#2f4c5c)}
.tone-clay{background:linear-gradient(145deg,#976852,#79513f)}
.tone-ink{background:linear-gradient(145deg,#45535d,#29353d)}
.tone-sand{background:linear-gradient(145deg,#b4a177,#91805b)}
.shelf-book-caption{display:block;margin:18px 5px 0;font-size:12px;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#74816f;opacity:.7}
.shelf-book.is-selected .shelf-book-caption{color:#37523e;opacity:1}
.shelf-draft-label{position:absolute;top:8px;right:5px;font-size:11px;padding:3px 6px;border-radius:4px;background:#faf4de;color:#795b2d}
.shelf-selection{display:flex;align-items:center;justify-content:space-between;gap:24px;border-top:1px solid #dce3d4;margin:0 28px;padding:20px 0 0;min-height:146px}
.shelf-selection-copy{min-width:0;flex:1}
.shelf-selection-kicker{font-size:12px;color:#668061}
.shelf-selection-kicker>span{margin:0 5px;color:#a1af98}
.shelf-selection h3{font-size:21px;font-weight:600;color:#2f4738;line-height:1.6;overflow-wrap:anywhere;margin:4px 0 6px}
.shelf-selection p{font-size:14px;line-height:1.8;color:#65725f;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:0 0 8px;overflow-wrap:anywhere}
.shelf-selection-meta{font-size:12px;color:#79836f}
.shelf-selection-actions{flex-shrink:0;text-align:right}
.shelf-selection-actions .row{gap:8px}
.shelf-selection-actions .btn{text-decoration:none;min-height:40px;font-size:13px;padding:9px 14px}
.shelf-position{font-size:14px;color:#3c5942;font-variant-numeric:tabular-nums;letter-spacing:.07em;margin-bottom:10px}
.shelf-position span{color:#8e9b86;font-size:12px}
.shelf-management{display:flex;gap:14px;flex-wrap:wrap;margin-top:9px}
.shelf-management .link-button{font-size:12px;min-height:28px}
.shelf-selection-actions .shelf-management{justify-content:flex-end}
.shelf-gesture-hint{font-size:12px;color:#7c8872;text-align:center;margin:17px 0 18px}
.document-collection{min-width:0;margin-top:31px}
.document-collection:first-child{margin-top:0}
.document-collection>.shelf-heading{padding:0;margin-bottom:17px}
.document-track{display:flex;gap:20px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scrollbar-width:thin;scrollbar-color:#b7c3ac transparent;padding:2px 2px 18px;min-width:0}
.shelf-document{flex:0 0 221px;min-width:0;scroll-snap-align:start}
.shelf-paper-button{position:relative;display:block;width:100%;border:1px solid #e2e5db;background:#eeeFE7;border-radius:10px;padding:16px 18px 24px;cursor:pointer;text-align:left;color:#445b45;overflow:hidden;transition:border-color .2s,background .2s}
.shelf-paper-button:hover{border-color:#9caf93;background:#e7eddf}
.shelf-paper{display:block;position:relative;width:100%;aspect-ratio:1/1.414;background:#fffefb;box-shadow:0 3px 6px #4f614410,0 9px 0 -5px #fffefb,0 10px 0 -5px #d7ddce;overflow:hidden}
.shelf-paper-fallback{position:absolute;inset:0;padding:19px 14px;display:flex;flex-direction:column;gap:13px;color:#53644e}
.shelf-paper-subject{font-size:9px;color:#7c8b74;line-height:1.6;padding-bottom:8px;border-bottom:1px solid #dae0d3}
.shelf-paper-fallback strong{font-size:15px;font-weight:600;line-height:1.7;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.shelf-paper-description{font-size:10px;line-height:1.8;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.shelf-paper-lines{display:block;flex:1;min-height:15px;max-height:50px;background:repeating-linear-gradient(transparent 0 9px,#eef0e8 9px 10px)}
.shelf-paper-format{font-size:9px;color:#8a967e;margin-top:auto}
.shelf-preview-label{position:absolute;left:0;right:0;bottom:8px;font-size:10px;text-align:center;color:#77866c}
.shelf-document-copy{padding:12px 1px 0}
.shelf-document-meta{display:flex;gap:9px;flex-wrap:wrap;font-size:12px;line-height:1.6;color:#73816a}
.shelf-document h3{margin:5px 0;font-size:15px;font-weight:600;line-height:1.75}
.shelf-document h3 button{font:inherit;color:#34583d;text-align:left;border:0;background:none;padding:0;cursor:pointer;overflow-wrap:anywhere}
.shelf-document h3 button:hover{text-decoration:underline;text-underline-offset:4px}
.shelf-document-copy>p{color:#76806e;font-size:13px;line-height:1.7;margin:0 0 12px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.shelf-document-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12px;color:#84907b;border-top:1px solid #e1e6d9;padding-top:10px}
.shelf-document-footer a{color:#45663d;text-decoration:none;min-height:30px;display:flex;align-items:center}
.shelf-cover .resource-preview-image,.shelf-paper .resource-preview-image{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#fffefb;display:block}
.shelf-cover.has-preview .shelf-cover-fallback,.shelf-paper.has-preview .shelf-paper-fallback{visibility:hidden}
.resource-reader-modal{width:min(1080px,calc(100vw - 40px));max-width:1080px}
.resource-reading-layout{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:26px;align-items:start}
.resource-reading-layout .resource-detail{min-width:0}
.resource-reading-layout .resource-detail h3{font-size:20px;margin-top:10px}
.resource-reading-layout .resource-detail dl>div{display:block}
.resource-reading-layout .resource-detail dd{margin-top:4px}
.resource-reader{position:relative;min-width:0;min-height:420px;background:#edf0e8;border:1px solid #dfe5d7;border-radius:10px;overflow:hidden;padding:14px}
.resource-reader .resource-preview-image{display:block;max-width:100%;height:auto;margin:0 auto;background:#fff;box-shadow:0 3px 12px #35493013}
.resource-reader-placeholder{text-align:center;color:#78856d;font-size:14px;padding:80px 15px}
.resource-reader.has-preview>.resource-reader-placeholder{display:none}
.resource-preview-controls{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;padding:12px 0 3px;font-size:13px;color:#52674c}
.resource-preview-controls button{min-height:40px;border:1px solid #cdd8c5;border-radius:6px;background:#fffffa;color:#365936;font:inherit;padding:7px 14px;cursor:pointer}
.resource-preview-controls button:disabled{opacity:.45;cursor:default}
.resource-preview-status{font-size:13px;color:#687a5d;line-height:1.8;text-align:center;margin:8px 0}
.shelf-cover .resource-preview-image,.shelf-paper .resource-preview-image{width:100%!important;height:100%!important;object-fit:contain}
.resource-reader{display:flex;flex-direction:column;align-items:stretch}
.resource-reader .resource-preview-image{width:auto!important;max-height:calc(100dvh - 230px);object-fit:contain}
.resource-reader .resource-preview-controls{order:-1;padding:0 0 12px;flex-shrink:0}
.resource-reader[data-preview-state="error"]>.resource-reader-placeholder{display:none}
.resource-display-choices{padding:14px 16px;border:1px solid #dae4d3;background:#f7faf2;border-radius:9px}
.resource-display-choices select{margin-top:5px}
.resource-display-choices .hint{font-size:12px;line-height:1.8}
.resource-shelves button:focus-visible,.document-track:focus-visible{outline:3px solid #6a8c60;outline-offset:3px}
@media(min-width:1450px){.shelf-track{--book-width:210px;padding-top:36px}.shelf-cover-fallback strong{font-size:28px}}
@media(min-width:1051px){.library-workspace .resource-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(330px,44%);column-gap:30px}.library-workspace .resource-hero-top{grid-column:1/-1}.library-workspace .resource-hero>h1{grid-column:1;grid-row:2}.library-workspace .resource-hero>p{grid-column:1;grid-row:3;margin-bottom:0}.library-workspace .resource-search-form{grid-column:2;grid-row:2/4;align-self:center;margin-top:0}.library-workspace .resource-hero-foot{grid-column:1/-1;margin-top:20px}}
@media(max-width:1050px){.library-workspace .resource-catalog{grid-template-columns:140px minmax(0,1fr);gap:22px}.shelf-track{--book-width:165px}.shelf-heading{padding:22px 20px 0}.shelf-selection{margin:0 20px;gap:15px}.shelf-selection h3{font-size:19px}.shelf-selection-actions .btn{padding:8px 11px}.shelf-selection p{font-size:14px}.shelf-document{flex-basis:206px}}
@media(max-width:760px){.library-workspace .resource-catalog{display:block}.library-workspace .resource-hero h1{font-size:30px}.resource-results:has(.resource-shelves){margin-top:20px}.shelf-heading{padding:20px 17px 0;gap:8px}.shelf-heading h2{font-size:17px}.shelf-heading h2>span{display:block;margin:2px 0 0;font-size:12px}.shelf-eyebrow{font-size:10px;margin-bottom:5px}.shelf-arrow{width:42px;height:42px}.shelf-arrows{gap:6px}.shelf-track{--book-width:155px;gap:0;padding-top:22px;padding-bottom:18px}.shelf-cover-fallback{padding:19px 15px 17px 19px}.shelf-cover-fallback strong{font-size:21px;margin-top:15px}.shelf-cover-subject,.shelf-cover-footer{font-size:10px}.shelf-selection{display:block;margin:0 17px;padding-top:16px}.shelf-selection h3{font-size:19px}.shelf-selection-actions{margin-top:15px;text-align:left;display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px}.shelf-selection-actions>.row{order:0;flex:1;flex-wrap:nowrap}.shelf-selection-actions .btn{min-height:44px;justify-content:center;padding:9px 12px;font-size:13px}.shelf-selection-actions>.shelf-position{order:1;margin:0}.shelf-selection-actions .shelf-management{order:2;flex-basis:100%;justify-content:flex-start;margin:0}.shelf-management .link-button{min-height:36px}.shelf-gesture-hint{font-size:12px;margin:15px 12px}.document-collection{margin-top:26px}.shelf-heading p{font-size:13px;max-width:200px;line-height:1.7}.document-track{gap:16px}.shelf-document{flex-basis:209px}.shelf-document h3{font-size:15px}.shelf-document-copy>p{font-size:14px}.resource-reader-modal{width:calc(100vw - 20px);max-width:none;max-height:calc(100dvh - 24px);margin:auto}.resource-reading-layout{grid-template-columns:minmax(0,1fr);gap:18px}.resource-reader{min-height:310px;padding:9px}.resource-reading-layout .resource-detail dl{grid-template-columns:1fr 1fr}.resource-reading-layout .resource-detail section{margin:17px 0}.resource-preview-controls{gap:9px}.resource-preview-controls button{min-height:44px}}
@media(prefers-reduced-motion:reduce){.shelf-cover,.shelf-arrow,.shelf-paper-button{transition:none}.shelf-track,.document-track{scroll-behavior:auto}}
@media(forced-colors:active){.shelf-cover,.shelf-paper,.book-collection{border:1px solid CanvasText}.shelf-cover-fallback{color:CanvasText}.shelf-book.is-selected{outline:2px solid Highlight}.shelf-cover{opacity:1}}
@media print{.shelf-track,.document-track{overflow:visible;flex-wrap:wrap;padding:15px 0;gap:20px}.shelf-book .shelf-cover{transform:none;opacity:1}.shelf-arrows,.shelf-management,.shelf-gesture-hint{display:none}.book-collection{overflow:visible}.shelf-selection{break-inside:avoid}.shelf-document{break-inside:avoid}.resource-preview-controls{display:none}}
