.library-index-card{position:absolute;z-index:4;width:330px;max-width:calc(100% - 24px);box-sizing:border-box;padding:15px 20px 22px;text-align:left;color:#38453f;background:#f4eedc;border:1px solid #cfc5ad;border-radius:3px;box-shadow:3px 8px 24px #253a3426;animation:card-arrive .2s ease-out}
.library-card-top{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #b5827870;padding-bottom:7px;font:9px 'Courier New',monospace;letter-spacing:1.5px;color:#746e5c}
.library-card-close{border:0;background:none;color:#6b6d5f;font:23px/1 Georgia,serif;cursor:pointer;padding:0 0 0 12px;min-width:30px;min-height:28px}
.library-index-card h2{font:21px/1.3 Georgia,serif;font-weight:normal;margin:7px 24px 17px 0;color:#34483f}
.library-index-card h2 small{font:12px Georgia,serif;white-space:nowrap;color:#787360}
.library-card-photo{display:block;width:100%;height:192px;object-fit:contain;background:#e7e3d9;border:1px solid #c9c2b0;box-sizing:border-box;padding:4px}
.library-index-card dl{margin:12px 0 0;font:13px/1.8 'Courier New',monospace}
.library-index-card dl div{display:flex;gap:12px;border-bottom:1px solid #a6afa54d;padding:3px 0}
.library-index-card dt{color:#7b796c;min-width:86px;font-size:11px}
.library-index-card dd{margin:0;color:#34483f}
.library-card-hole{display:block;width:26px;height:5px;border-radius:50%;border:1px solid #c9bea3;background:#ddd4bc;margin:14px auto -13px;box-shadow:inset 0 1px 2px #776b4930}
@keyframes card-arrive{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.library-index-card{animation:none}}

.library-index-card[hidden],.portable-library-select[hidden],.library-picker-options[hidden]{display:none}
.library-photo-trigger{display:block;width:100%;border:0;padding:0;background:none;cursor:zoom-in}
.library-photo-title{padding:0;border:0;background:none;font:inherit;color:inherit;text-align:inherit;cursor:zoom-in}
.library-photo-trigger:focus-visible,.library-photo-title:focus-visible{outline:2px solid #456b61;outline-offset:3px}
.library-photo-dialog .book-cover-body>img{width:min(84vw,78dvh);height:auto;max-height:78dvh;object-fit:contain}
.library-card-close{position:absolute;right:12px;top:12px}
/* Shared paper palette for the conversation and library profile. */
.portable-reading-page{
 --library-paper:#f4eedc;
 --lib-bg:var(--library-paper);
 --lib-surface:#f4eedc;
 --lib-surface-raised:#ebe5d5;
 --lib-surface-soft:#e5e9dd;
 --lib-border:#cfc5ad;
 --lib-border-strong:#a5ad97;
 --lib-text:#34483f;
 --lib-text-muted:#626b5b;
 --lib-text-soft:#44564b;
 --lib-accent:#456b61;
 --lib-accent-strong:#365e52;
 --lib-accent-ink:#f4eedc;
}
.portable-reading-page .librarian-widget-shell,
.portable-reading-page .library-index-card{background:var(--library-paper);color:var(--lib-text);border-color:var(--lib-border);box-shadow:0 14px 40px #253a3426}
.portable-reading-page .librarian-widget-header{background:transparent}
.portable-reading-page .librarian-widget-composer{background:#faf7ed;border-color:var(--lib-border);box-shadow:0 4px 16px #253a3410;backdrop-filter:none;-webkit-backdrop-filter:none}
.portable-reading-page .librarian-widget-input::placeholder{color:#687264}
.portable-reading-page .librarian-widget-input:focus{border-color:#7e9789;background:#fffdf7;outline-color:#456b61}
.portable-reading-page .librarian-widget-message.user{box-shadow:none}
.portable-reading-page .library-index-card dt{color:#626b5b}
.portable-reading-page .library-card-close{color:#626b5b}
.librarian-widget-overlay.with-library-card{padding-right:388px}
.with-library-card .librarian-widget-shell{position:relative;overflow:visible}
.with-library-card .library-index-card{position:absolute;left:calc(100% + 20px)!important;top:0!important;max-width:none;width:330px}
@media(max-width:1000px){
 .with-library-card .library-photo-trigger{position:absolute;left:12px;top:12px;width:76px;height:84px}
 .with-library-card .library-photo-trigger .library-card-photo{position:static;width:100%;height:100%}
 .librarian-widget-overlay.with-library-card{padding:12px}
 .with-library-card .librarian-widget-shell{overflow:hidden;height:calc(100dvh - 24px);min-height:0}
 .with-library-card .library-index-card{position:relative;left:auto!important;top:auto!important;order:-1;flex:0 0 auto;width:100%;max-width:100%;padding:10px 42px 10px 100px;border-radius:0;min-height:108px;box-shadow:none}
 .with-library-card .library-card-photo{position:absolute;left:12px;top:12px;width:76px;height:84px;padding:2px}
 .with-library-card .library-index-card h2{font-size:18px;margin:0 0 5px}
 .with-library-card .library-index-card dl{margin:0;font-size:12px;line-height:1.4}
 .with-library-card .library-index-card dl div{padding:2px 0;gap:5px}
 .with-library-card .library-index-card dt{min-width:72px}
 .with-library-card .library-card-hole{display:none}
}
@media(max-width:720px){
 .librarian-widget-overlay.with-library-card{padding:0}
 .with-library-card .librarian-widget-shell{height:100%}
}
.library-picker{position:relative;width:100%}.library-picker-toggle{text-align:left;cursor:pointer;padding-right:30px}.library-picker-toggle::after{content:'⌄';position:absolute;right:14px}.library-picker-options{position:absolute;top:calc(100% + 5px);left:0;right:0;z-index:6;padding:5px;background:#f6f3e9;border:1px solid #c6cbbb;border-radius:8px;box-shadow:0 5px 15px #253a3420}.library-picker-options button{width:100%;text-align:left;padding:12px 10px;border:0;border-radius:4px;background:transparent;color:#34483f;font:13px sans-serif;cursor:pointer}.library-picker-options button:hover,.library-picker-options button:focus{background:#e3e8dc;outline-offset:0}


/* A profile-only library must never inherit the demo catalog. */
.library-profile-dialog{position:fixed;width:min(440px,calc(100vw - 28px));max-width:calc(100vw - 28px);max-height:calc(100dvh - 32px);overflow:auto;margin:auto;padding:24px 24px 28px}
.library-profile-dialog:not([open]){display:none}
.library-profile-dialog::backdrop{background:#14231db8;backdrop-filter:blur(4px)}
.library-profile-dialog .library-card-photo{height:auto;aspect-ratio:1740/904;object-fit:contain}
.library-profile-dialog .library-card-close{min-width:44px;min-height:44px;right:4px;top:4px}
.library-profile-dialog .library-catalog-pending{margin:18px 0 0;font:13px/1.6 Georgia,serif;color:#626b5b}
