:root{--pb-gold:#c4a55d;--pb-ink:#283b30;--pb-paper:#f4ecd7;--pb-forest:#708455;--pb-rust:#a96f46}
.museum-collection-links{display:flex;gap:10px;align-items:stretch;margin:0 0 17px}.museum-collection-links .favorites-compact{flex:1 1 0;min-width:0;margin:0}.museum-collection-links .favorites-open{height:100%;min-height:58px;padding:8px 10px;gap:8px}.museum-collection-links .favorites-label{min-width:0}.museum-collection-links .favorites-label small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.museum-collection-links .favorites-star,.picture-book-mark{width:32px;height:32px;flex:none;border-radius:10px;display:grid;place-items:center;font-size:17px}.picture-book-launch{flex:1 1 0;min-width:0;background:linear-gradient(135deg,#7e8b62,#596d4d)!important;border-color:#c4cc9a!important;color:#fff6df!important}.picture-book-mark{background:#f5edda;color:#65784e;border:1px solid #b5bc8f}.picture-book-launch .favorites-label b{color:#fff4d8}.picture-book-launch .favorites-label small{color:#e5e7c9}.picture-book-launch .favorites-chevron{color:#f0dda8}
.picture-book-drawer{position:fixed;z-index:4;top:0;bottom:calc(75px + env(safe-area-inset-bottom));left:50%;transform:translate(-50%,14px);width:min(100%,480px);padding:17px 12px calc(18px + env(safe-area-inset-bottom));display:flex;flex-direction:column;overflow:hidden;opacity:0;visibility:hidden;transition:opacity .24s,transform .28s,visibility .24s;box-shadow:0 8px 40px #0007;background:#f3ecd9;color:#324735}.picture-book-drawer.show{opacity:1;visibility:visible;transform:translate(-50%,0)}.picture-book-head{position:relative;display:flex;align-items:center;justify-content:space-between;flex:none;padding:3px 40px 11px 4px;border-bottom:1px solid #8c79522c}.picture-book-head small{display:block;font:8px/1.5 system-ui,sans-serif;letter-spacing:.18em;color:#79846d}.picture-book-head h2{font:500 20px/1.2 Georgia,serif;letter-spacing:.13em;margin:4px 0 0;color:#334932}.picture-book-count{font:9px system-ui,sans-serif;color:#718064;white-space:nowrap}.picture-book-head button{position:absolute;right:1px;top:2px;width:30px;height:30px;border:1px solid #86917466;border-radius:50%;background:#fff9e9;color:#526247;font-size:18px;line-height:1}.picture-category-wrap{position:relative;flex:none;padding:10px 0 9px}.picture-category-toggle{width:100%;display:flex;align-items:center;justify-content:space-between;padding:8px 10px;border:1px solid #84906a69;border-radius:7px;background:#fff9eb;color:#46583e;text-align:left;font:12px system-ui,sans-serif}.picture-category-arrow{width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:6px solid currentColor;transition:transform .2s}.picture-category-toggle[aria-expanded="true"] .picture-category-arrow{transform:rotate(180deg)}.picture-category-options{display:flex;flex-wrap:wrap;gap:6px;padding:9px 3px 1px}.picture-category-options[hidden]{display:none}.picture-category-options button{padding:5px 9px;border:1px solid #83907161;border-radius:999px;background:#fff9eb;color:#53654c;font:10px system-ui,sans-serif}.picture-category-options button.selected{background:#496341;color:#fff5df;border-color:#496341}.picture-book-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;align-content:start;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#8b956f transparent;padding:2px 1px 12px}.picture-card{position:relative;min-width:0;padding:3px;border:1px solid #b59a59;border-radius:5px;background:linear-gradient(145deg,#fff8e6,#e6d8b5);text-align:center;box-shadow:0 3px 8px #514a3021;overflow:hidden}.picture-card img{display:block;width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:2px;background:#dfd3b4}.picture-card .picture-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:4px 1px 2px;color:#364b36;font:10px/1.2 'Noto Serif SC','Songti SC',serif}.picture-card .picture-collected-mark{position:absolute;right:6px;top:6px;width:15px;height:15px;display:grid;place-items:center;border:1px solid #f5df9b;border-radius:50%;background:#385540;color:#ffedb9;font:9px Georgia;box-shadow:0 1px 4px #0005}.picture-card.locked{min-height:calc((100vw - 57px)/4);display:flex;align-items:center;justify-content:center;border:1px dashed #a2a18c;background:#e9e4d4;color:#817f70;box-shadow:none;padding:5px}.picture-card.locked span{font:9px/1.4 system-ui,sans-serif}.picture-card:disabled{cursor:default;opacity:.8}
/* Forest: option 1, archival catalogue */
body[data-theme="warm"] .picture-book-drawer{background-color:#f2ead5;background-image:radial-gradient(#796c4710 .7px,transparent .8px),linear-gradient(165deg,#f8f1df,#e9dfc8);background-size:7px 7px,100% 100%;border:1px solid #faf1dc;color:#304735}body[data-theme="warm"] .picture-book-drawer .picture-book-head{border-color:#78856b4d}body[data-theme="warm"] .picture-book-drawer .picture-book-head h2{color:#3b523b}body[data-theme="warm"] .picture-book-drawer .picture-book-head small,.picture-book-drawer .picture-book-count{color:#75816b}body[data-theme="warm"] .picture-book-drawer .picture-book-head button{background:#fff9e9;color:#526448;border-color:#85906c}body[data-theme="warm"] .picture-book-drawer .picture-category-toggle{border-color:#859171;background:#fbf5e6;color:#465b40}body[data-theme="warm"] .picture-book-drawer .picture-category-options button{background:#fbf5e6;border-color:#899574;color:#4d6244}body[data-theme="warm"] .picture-book-drawer .picture-category-options button.selected{background:#526b49;color:#fff5df}body[data-theme="warm"] .picture-book-drawer .picture-card{border-color:#b69a58;background:linear-gradient(145deg,#fff9e8,#eee2c2);box-shadow:0 2px 5px #39472f18}body[data-theme="warm"] .picture-book-drawer .picture-card .picture-name{color:#394f39}body[data-theme="warm"] .picture-book-drawer .picture-card.locked{border-color:#a6a28d;background:#e9e4d4;color:#858170}
/* Night: option 3, star gallery */
body[data-theme="night"] .picture-book-drawer{background-color:#111d29;background-image:radial-gradient(circle at 13% 9%,#f0d99036 0 1px,transparent 1.4px),radial-gradient(circle at 81% 24%,#f0d99027 0 1px,transparent 1.4px),linear-gradient(155deg,#172535,#101923);background-size:89px 76px,113px 92px,100% 100%;border:1px solid #b99c58;color:#f3e7c9}body[data-theme="night"] .picture-book-drawer .picture-book-head{border-color:#d1b97655}body[data-theme="night"] .picture-book-drawer .picture-book-head h2{color:#f2e2bc}body[data-theme="night"] .picture-book-drawer .picture-book-head small,.picture-book-drawer .picture-book-count{color:#cfbf95}body[data-theme="night"] .picture-book-drawer .picture-book-head button{background:#263443;color:#f0d98f;border-color:#c7aa63}body[data-theme="night"] .picture-book-drawer .picture-category-toggle{background:#1d2b39;border-color:#b59c5e;color:#eddfbd}body[data-theme="night"] .picture-book-drawer .picture-category-options button{background:#1d2b39;border-color:#a68b4f;color:#e3d5b5}body[data-theme="night"] .picture-book-drawer .picture-category-options button.selected{background:#c4a45a;color:#1a2731;border-color:#f0d995}body[data-theme="night"] .picture-book-drawer .picture-card{border-color:#c5a859;background:linear-gradient(145deg,#293846,#182633);box-shadow:inset 0 0 0 2px #f0d78615,0 3px 8px #0005}body[data-theme="night"] .picture-book-drawer .picture-card img{border:1px solid #d7bf79}body[data-theme="night"] .picture-book-drawer .picture-card .picture-name{color:#f0e2be}body[data-theme="night"] .picture-book-drawer .picture-collected-mark{background:#d0af58;color:#1f2c31;border-color:#fff0ae}body[data-theme="night"] .picture-book-drawer .picture-card.locked{border:1px dashed #aa9563;background:#1b2935;color:#bcae8b}
@media(min-width:650px){.picture-book-drawer{bottom:calc(97px + env(safe-area-inset-bottom));border-radius:0 0 24px 24px}.picture-card.locked{min-height:75px}}
@media(max-width:360px){.museum-collection-links{gap:7px}.museum-collection-links .favorites-open{padding:7px;gap:6px}.museum-collection-links .favorites-star,.picture-book-mark{width:28px;height:28px}.picture-book-grid{gap:5px}.picture-card .picture-name{font-size:9px}}

/* Keep every card at a stable height before and after lazy image loading. */
.picture-book-grid{flex:1 1 0;min-height:0;grid-auto-rows:max-content;align-items:start;}
.picture-card{align-self:start;display:grid;grid-template-rows:minmax(0,1fr) 18px;width:100%;aspect-ratio:1 / 1.28;min-height:0;}
.picture-card img{width:100%;height:100%;min-height:0;aspect-ratio:auto;object-fit:cover;image-rendering:auto;}
.picture-card .picture-name{height:18px;padding:4px 0 2px;font-size:9px;line-height:12px;}
.picture-card.locked{min-height:0;aspect-ratio:1 / 1.28;}

/* Night museum: distinguish favorites from the paper category tiles. */
body[data-theme="night"] #museumPage #favoritesOpen{background:linear-gradient(135deg,#70414f,#472b3e);border-color:#c7aa72;color:#fff0d6;box-shadow:inset 0 0 0 3px #f4dbaa16,0 6px 15px #080c1766;}
body[data-theme="night"] #museumPage #favoritesOpen .favorites-star{background:#f0d8aa;border:1px solid #b99860;color:#693b4d;}
body[data-theme="night"] #museumPage #favoritesOpen .favorites-label b{color:#fff1da;}
body[data-theme="night"] #museumPage #favoritesOpen .favorites-label small{color:#e6cdbd;}
body[data-theme="night"] #museumPage #favoritesOpen .favorites-chevron{color:#efd39a;}

/* Paired museum collection controls share the same frame and icon treatment. */
body[data-theme="night"] #museumPage .museum-collection-links #favoritesOpen,
body[data-theme="night"] #museumPage .museum-collection-links #pictureBookOpen{border:1px solid #fff7e9!important;border-radius:7px 16px 7px 16px;box-shadow:inset 0 0 0 3px #fff6e322,0 6px 15px #080c1766;}
body[data-theme="night"] #museumPage .museum-collection-links .favorites-star,
body[data-theme="night"] #museumPage .museum-collection-links .picture-book-mark{border:1px solid #fff9ec;border-radius:4px 10px 4px 10px;background:#f6ead1;transform:rotate(-4deg);}
body[data-theme="night"] #museumPage #pictureBookOpen .favorites-label b{color:#fffaf0;}
body[data-theme="night"] #museumPage #pictureBookOpen .favorites-label small,
body[data-theme="night"] #museumPage #pictureBookOpen .favorites-chevron{color:#fff2d8;}

/* Equal-width museum controls, independent of button content and padding. */
#museumPage .museum-collection-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}
#museumPage .museum-collection-links .favorites-compact,
#museumPage .museum-collection-links #pictureBookOpen{width:100%;min-width:0;}

/* Artwork viewer: full original illustration and its full title. */
.picture-art-viewer{width:min(452px,calc(100% - 24px));max-width:none;max-height:calc(100svh - 40px);padding:46px 12px 18px;border:1px solid #bc9d57;border-radius:14px;background:#f6eedb;color:#354c38;box-shadow:0 20px 65px #0008;overflow:auto;}
.picture-art-viewer[open]{display:flex;flex-direction:column;align-items:center;gap:15px;}
.picture-art-viewer::backdrop{background:#07111bc9;backdrop-filter:blur(4px);}
.picture-art-viewer>img{display:block;width:100%;height:auto;max-height:70svh;object-fit:contain;border-radius:5px;flex:none;}
.picture-art-viewer>h2{margin:0 8px;font:500 21px/1.5 var(--serif,Georgia,serif);text-align:center;overflow-wrap:anywhere;}
.picture-art-close{position:absolute;top:9px;right:10px;width:29px;height:29px;border:1px solid #a3a58a;border-radius:50%;background:#fff9ec;color:#526448;font:21px/1 sans-serif;display:grid;place-items:center;}
body[data-theme="night"] .picture-art-viewer{background:#172533;color:#f3e3be;border-color:#d1b56a;}
body[data-theme="night"] .picture-art-close{background:#263848;color:#f6e2ae;border-color:#c5ad70;}

#favoritesDrawer .picture-category-wrap{padding-top:0;margin-bottom:2px;}

/* Favorites drawer: close at the header and match the album theme. */
#favoritesDrawer .favorites-drawer-head{position:relative;padding-right:40px;}
#favoritesDrawer #favoritesClose{position:absolute;top:1px;right:0;bottom:auto;left:auto;transform:none;width:30px;height:30px;border-radius:50%;font:21px/1 sans-serif;display:grid;place-items:center;box-shadow:none;}
body[data-theme="warm"] #favoritesDrawer{background-color:#f2ead5;background-image:radial-gradient(#796c4710 .7px,transparent .8px),linear-gradient(165deg,#f8f1df,#e9dfc8);background-size:7px 7px,100% 100%;background-position:0 0;background-blend-mode:normal;}
body[data-theme="night"] #favoritesDrawer{background-color:#111d29;background-image:radial-gradient(circle at 13% 9%,#f0d99036 0 1px,transparent 1.4px),radial-gradient(circle at 81% 24%,#f0d99027 0 1px,transparent 1.4px),linear-gradient(155deg,#172535,#101923);background-size:89px 76px,113px 92px,100% 100%;background-position:0 0;background-blend-mode:normal;color:#f3e7c9;border:1px solid #b99c58;box-shadow:0 8px 40px #0007;}
body[data-theme="night"] #favoritesDrawer .favorites-drawer-head{border-color:#d1b97655;}
body[data-theme="night"] #favoritesDrawer .favorites-drawer-head h2{color:#f2e2bc;}
body[data-theme="night"] #favoritesDrawer .favorites-drawer-head small,
body[data-theme="night"] #favoritesDrawer #savedCount,
body[data-theme="night"] #favoritesDrawer .favorites-note{color:#cfbf95;}
body[data-theme="night"] #favoritesDrawer #favoritesClose{background:#263443;color:#f0d98f;border-color:#c7aa63;}
body[data-theme="night"] #favoritesDrawer .favorite-entry{background:linear-gradient(145deg,#293846,#182633);border:1px solid #c5a859;color:#f0e2be;box-shadow:inset 0 0 0 2px #f0d78615,0 3px 8px #0005;}
body[data-theme="night"] #favoritesDrawer .favorite-entry b{color:#f0e2be;}
body[data-theme="night"] #favoritesDrawer .favorite-entry small{color:#cbbf9d;}
body[data-theme="night"] #favoritesDrawer .favorite-entry .favorite-icon{background:#263947;border-color:#bca163;color:#ead6a0;}
body[data-theme="night"] #favoritesDrawer .favorite-entry .favorite-icon svg{stroke:#ead6a0;}
body[data-theme="night"] #favoritesDrawer .favorite-marker,
body[data-theme="night"] #favoritesDrawer .favorite-open-state{color:#e8ce89;}
body[data-theme="night"] #favoritesDrawer .favorites-empty{background:#1b2935;border-color:#aa9563;color:#d8caab;}
body[data-theme="night"] #favoritesDrawer .picture-category-toggle{background:#1d2b39;border-color:#b59c5e;color:#eddfbd;}
body[data-theme="night"] #favoritesDrawer .picture-category-options button{background:#1d2b39;border-color:#a68b4f;color:#e3d5b5;}
body[data-theme="night"] #favoritesDrawer .picture-category-options button.selected{background:#c4a45a;color:#1a2731;border-color:#f0d995;}
