/* Collection book, clearer (Mac, 2026-10-17). Adds to collection-showcase.css's pastel cards:
   each locked toy is a deeper silhouette of its real shape in its card's color, so kids can see what they're hunting;
   the "?" shrinks to a corner badge so it doesn't cover the shape; set tabs are pictures with a count, no names. */
html #modal[open]:has(.book-grid) .book-page>.book-toy.undiscovered:nth-child(4n+1) .toy{filter:brightness(0) invert(.32) sepia(1) saturate(2.6) hue-rotate(215deg) opacity(.72) drop-shadow(0 2px 0 #ffffffb0)!important}
html #modal[open]:has(.book-grid) .book-page>.book-toy.undiscovered:nth-child(4n+2) .toy{filter:brightness(0) invert(.32) sepia(1) saturate(2.8) hue-rotate(290deg) opacity(.68) drop-shadow(0 2px 0 #ffffffb0)!important}
html #modal[open]:has(.book-grid) .book-page>.book-toy.undiscovered:nth-child(4n+3) .toy{filter:brightness(0) invert(.3) sepia(1) saturate(2.8) hue-rotate(115deg) opacity(.7) drop-shadow(0 2px 0 #ffffffb0)!important}
html #modal[open]:has(.book-grid) .book-page>.book-toy.undiscovered:nth-child(4n) .toy{filter:brightness(0) invert(.32) sepia(1) saturate(2.8) hue-rotate(180deg) opacity(.7) drop-shadow(0 2px 0 #ffffffb0)!important}
/* the "?" as a small badge in the card's top corner */
html #modal[open]:has(.book-grid) .book-grid .book-toy.undiscovered .book-q{left:auto;right:4px;top:4px;translate:none;width:28px;height:28px;display:grid;place-items:center;border-radius:50%;background:#fff;box-shadow:0 2px 0 #d9cbe6;color:#9b86b8;-webkit-text-stroke:0;font-size:17px;line-height:1}
/* set tabs: the set's own toy + how many found; the name stays for screen readers */
html #modal[open] .book-set-tabs .book-tab>b{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap}
html #modal[open] .book-set-tabs .book-tab{gap:4px!important}
/* the arrows turn the pages; no "Page 1 of 11" words */
html #modal[open] .book-nav .book-page-status{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important}

/* Owned instances retain their individual names and artwork, including twins. */
html #modal[open] .book-owned-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
@media(min-width:761px){html #modal[open] .book-owned-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
html #modal[open] .book-empty{text-align:center;color:#593384;margin:24px 12px}
html #modal[open] .book-tab:focus-visible,html #modal[open] .book-toy:focus-visible,html #modal[open] .book-nav button:focus-visible{outline:3px solid #553728;outline-offset:2px}
html #modal[open] .book-nav button:disabled{opacity:.35;cursor:default}
/* Keep the exit reachable even on a 320px phone; count sits below the title. */
html #modal[open]:has(.book-grid) .modal-top{display:grid;grid-template-columns:minmax(0,1fr) 48px;gap:6px 10px}
html #modal[open]:has(.book-grid) .modal-top h2{grid-column:1;margin-left:10px;font-size:clamp(19px,4.8vw,32px)!important;min-width:0}
html #modal[open]:has(.book-grid) .modal-top>.icon-button{grid-column:2;grid-row:1 / 3;width:48px;height:48px;min-width:48px;position:static!important}
html #modal[open]:has(.book-grid) .book-count{grid-column:1;grid-row:2;flex-direction:row;margin:0 0 0 10px;width:calc(100% - 10px);max-width:250px}
html #modal[open]:has(.book-grid) .book-count i{flex:1}
/* Short iPhone landscape: reserve room for toys and page controls, not a second decorative shelf. */
@media(orientation:landscape) and (max-height:500px){
 html #modal[open]:has(.book-grid) .book-shelf{display:none!important}
 html #modal[open]:has(.book-grid) .modal-top{grid-template-columns:minmax(0,1fr) 140px 44px;gap:6px 8px;margin-bottom:4px}
 html #modal[open]:has(.book-grid) .modal-top h2{font-size:22px!important;margin-left:6px}
 html #modal[open]:has(.book-grid) .modal-top>.icon-button{grid-column:3;grid-row:1;width:44px;height:44px;min-width:44px}
 html #modal[open]:has(.book-grid) .book-count{grid-column:2;grid-row:1;width:100%;margin:0;max-width:140px}
 html #modal[open]:has(.book-grid) .book-set-tabs{margin-bottom:4px;padding-top:0;padding-bottom:3px}
 html #modal[open]:has(.book-grid) .book-tab{min-height:44px;padding-top:2px;padding-bottom:2px}
 html #modal[open]:has(.book-grid) .book-tab-icon{width:32px;height:32px}
 html #modal[open]:has(.book-grid) .book-tab-icon>*{width:26px!important;height:26px!important}
}
