/* The collection is a little world to explore, with the real catalog behind every tile. */
html #modal[open]:has(.book-grid){width:min(860px,calc(100vw - 20px));max-height:min(940px,calc(100dvh - 16px - var(--sat) - var(--sab)));height:calc(100dvh - 16px - var(--sat) - var(--sab));padding:18px 22px 20px!important;border:2px solid #fff!important;border-radius:30px!important;background:linear-gradient(160deg,#fffaf2 0%,#fff5e8 55%,#f9e9d8 100%)!important;box-shadow:0 10px 0 #d6ae8d,0 23px 56px #32234e63!important;color:#593384}
html #modal[open]:has(.book-grid) .modal-top{min-height:50px;margin:0 0 10px}
html #modal[open]:has(.book-grid) .modal-top h2{font-size:clamp(26px,4.3vw,42px);letter-spacing:-.04em;line-height:1;font-weight:950;color:#573188}
html #modal[open]:has(.book-grid) .modal-top .icon-button{width:48px;height:48px;min-width:48px;border:2px solid #fff;background:linear-gradient(#fff,#efe3fc);box-shadow:0 5px 11px #795a9233}
html #modal[open]:has(.book-grid) .collection-overview{min-height:126px;margin:0 0 12px;padding:14px 20px;border:2px solid #fff;border-radius:22px;background:linear-gradient(115deg,#fffdf6 15%,#f5f5ff 70%,#e8e1ff);box-shadow:0 7px 14px #765b8230}
html #modal[open]:has(.book-grid) .collection-overview-copy{width:61%}
html #modal[open]:has(.book-grid) .collection-overview-kicker{font-size:14px;color:#8d6aa6}
html #modal[open]:has(.book-grid) .collection-overview-copy>strong{font-size:46px;color:#583188}
html #modal[open]:has(.book-grid) .collection-overview-copy>strong small{font-size:20px}
html #modal[open]:has(.book-grid) .collection-overview-copy p{font-size:13px;color:#806594}
html #modal[open]:has(.book-grid) .collection-overview-track{height:11px;width:100%;background:#ddd2eb}
html #modal[open]:has(.book-grid) .collection-overview-track i{background:linear-gradient(90deg,#8ce6db,#ae70f5)}
html #modal[open]:has(.book-grid) .collection-overview-toys{right:1%;width:41%}
html #modal[open]:has(.book-grid) .collection-overview-toys .toy{width:92px;height:92px;bottom:3px}
html #modal[open]:has(.book-grid) .collection-overview-toys .toy:first-child{width:112px;height:112px;right:43%;filter:drop-shadow(0 9px 6px #6a456659)}
html #modal[open]:has(.book-grid) .book-set-heading{margin:0 2px 5px}
html #modal[open]:has(.book-grid) .book-set-heading strong,html #modal[open]:has(.book-grid) .book-discover-heading strong{font-size:19px}
html #modal[open]:has(.book-grid) .book-set-heading small,html #modal[open]:has(.book-grid) .book-discover-heading small{font-size:12px}
html #modal[open]:has(.book-grid) .book-set-chips{margin:0 0 10px;gap:8px;min-height:72px}
html #modal[open]:has(.book-grid) .book-set-chips .set-chip{min-width:165px;min-height:67px;display:flex;flex-direction:row;align-items:center;gap:8px;padding:7px 10px;border:2px solid #fff;border-radius:19px;box-shadow:0 4px 8px #765c6b22;background:#fffaf1}
html #modal[open]:has(.book-grid) .book-set-chips .set-chip .toy{width:48px;height:48px;flex:none}
html #modal[open]:has(.book-grid) .book-set-chips .set-chip-copy{display:flex;min-width:0;flex:1;flex-direction:column;gap:2px}
html #modal[open]:has(.book-grid) .book-set-chips .set-chip b{font-size:13px;white-space:nowrap}
html #modal[open]:has(.book-grid) .book-set-chips .set-chip small{font-size:11px}
html #modal[open]:has(.book-grid) .book-set-chips .set-chip i{position:static;height:5px;width:100%;margin-top:3px;border-radius:10px;display:block}
html #modal[open]:has(.book-grid) .book-discover-heading{margin:0 2px 6px}
html #modal[open]:has(.book-grid) .calm-book-sparkle{flex:none;position:relative;min-height:91px;margin:0 0 9px;padding:5px 15px;gap:15px;overflow:hidden;text-align:left;border:3px solid #fff;border-radius:22px;background:radial-gradient(circle at 15% 50%,#fff7c7,#ffe3a0 30%,#f9c76e 58%,#b994a3 100%);box-shadow:0 4px 0 #e5b552,0 7px 17px #ae753e54;color:#59307d}
html #modal[open]:has(.book-grid) .calm-book-sparkle:before{content:'✦  ✧   ✦';position:absolute;inset:5px auto auto 7px;font-size:25px;color:#fff9cc;letter-spacing:18px;pointer-events:none}
html #modal[open]:has(.book-grid) .book-feature-art{width:91px;height:78px;flex:none;display:grid;place-items:center;filter:drop-shadow(0 5px 6px #ac6a3a55)}
html #modal[open]:has(.book-grid) .book-feature-art img{width:100%;height:100%;object-fit:contain}
html #modal[open]:has(.book-grid) .book-feature-copy{position:relative;z-index:1;display:flex;flex-direction:column;align-items:start;gap:2px;min-width:0;flex:1}
html #modal[open]:has(.book-grid) .book-feature-copy b{padding:2px 8px;border-radius:30px;background:#b77725;color:white;font-size:10px;letter-spacing:.04em}
html #modal[open]:has(.book-grid) .book-feature-copy strong{font-size:19px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
html #modal[open]:has(.book-grid) .book-feature-copy small{font-size:11px;color:#704d68;font-weight:700}
html #modal[open]:has(.book-grid) .book-feature-go{position:relative;z-index:1;width:37px;height:37px;flex:none;border:2px solid white;border-radius:50%;display:grid;place-items:center;background:#fff8ec;font-size:30px;line-height:1;color:#714d8d}
html #modal[open]:has(.book-grid) .book-filters{flex:none;gap:7px;margin:0 0 8px}
html #modal[open]:has(.book-grid) .book-filters .pill{min-height:38px;padding:5px 16px;border:2px solid #fff;background:#f1e9f7;box-shadow:0 3px 7px #8d738c29;color:#673b8e;font-size:12px;font-weight:850}
html #modal[open]:has(.book-grid) .book-filters .pill:nth-child(2){background:#f0eeee;color:#666}
html #modal[open]:has(.book-grid) .book-filters .pill:nth-child(3){background:#def6eb;color:#417262}
html #modal[open]:has(.book-grid) .book-filters .pill:nth-child(4){background:#eee4ff;color:#7441a7}
html #modal[open]:has(.book-grid) .book-filters .pill:nth-child(5){background:#fff0c6;color:#916119}
html #modal[open]:has(.book-grid) .book-filters .pill.active{background:#8958cd;color:#fff}
html #modal[open]:has(.book-grid) .book-grid{margin:0;gap:0}
html #modal[open]:has(.book-grid) .book-page{gap:8px;padding:2px}
html #modal[open]:has(.book-grid) .book-grid .book-toy{position:relative;min-width:0;padding:4px 4px 5px;border:2px solid #fff!important;border-radius:19px;box-shadow:0 4px 10px #765c6b2e!important;background:linear-gradient(145deg,#fffdf7,#f7e7d3)!important;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1px}
html #modal[open]:has(.book-grid) .book-grid .book-toy.rarity-uncommon{background:linear-gradient(145deg,#edfff5,#d8f4df)!important}
html #modal[open]:has(.book-grid) .book-grid .book-toy.rarity-rare{background:linear-gradient(145deg,#f8edff,#e9d8ff)!important}
html #modal[open]:has(.book-grid) .book-grid .book-toy.rarity-ultra,html #modal[open]:has(.book-grid) .book-grid .book-toy.rarity-legendary{background:linear-gradient(145deg,#fff6ca,#ffdb83)!important;border-color:#ffe899!important}
html #modal[open]:has(.book-grid) .book-grid .book-toy.undiscovered{background:linear-gradient(145deg,#f2eaf8,#e9e5f2)!important}
html #modal[open]:has(.book-grid) .book-grid .book-toy .toy{width:auto!important;height:min(96px,54%)!important;max-width:90%;aspect-ratio:1;flex:none}
html #modal[open]:has(.book-grid) .book-grid .book-toy strong{font-size:12px;line-height:1.1;white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
html #modal[open]:has(.book-grid) .book-grid .book-toy .rarity{position:static;margin:0;font-size:10px;border-radius:20px;line-height:1.2}
html #modal[open]:has(.book-grid) .book-grid .book-toy small{font-size:9px;line-height:1.1}
html #modal[open]:has(.book-grid) .book-heart{position:absolute;z-index:2;right:8px;top:2px;color:#a68d9f;font-size:18px;line-height:1}
html #modal[open]:has(.book-grid) .book-toy.wished .book-heart{color:#e95491}
html #modal[open]:has(.book-grid) .book-nav{flex:none;min-height:52px;margin-top:5px;gap:22px}
html #modal[open]:has(.book-grid) .book-nav .icon-button{width:44px;height:44px;border:2px solid #fff;background:linear-gradient(#fff,#efe4fa);box-shadow:0 4px 8px #765c6b2e;color:#634482}
@media(max-width:760px){
 html #modal[open]:has(.book-grid){width:calc(100vw - 16px);padding:13px 13px 14px!important;border-radius:26px!important}
 html #modal[open]:has(.book-grid) .modal-top{min-height:41px;margin-bottom:6px}
 html #modal[open]:has(.book-grid) .modal-top h2{font-size:clamp(23px,7vw,34px)}
 html #modal[open]:has(.book-grid) .modal-top .icon-button{width:41px;height:41px;min-width:41px}
 html #modal[open]:has(.book-grid) .collection-overview{min-height:98px;margin-bottom:7px;padding:8px 11px;border-radius:18px}
 html #modal[open]:has(.book-grid) .collection-overview-kicker{font-size:11px}
 html #modal[open]:has(.book-grid) .collection-overview-copy>strong{font-size:34px}
 html #modal[open]:has(.book-grid) .collection-overview-copy>strong small{font-size:14px}
 html #modal[open]:has(.book-grid) .collection-overview-copy p{font-size:10px;margin:2px 0 6px}
 html #modal[open]:has(.book-grid) .collection-overview-toys .toy{width:55px;height:55px}
 html #modal[open]:has(.book-grid) .collection-overview-toys .toy:first-child{width:75px;height:75px}
 html #modal[open]:has(.book-grid) .book-set-heading strong,html #modal[open]:has(.book-grid) .book-discover-heading strong{font-size:14px}
 html #modal[open]:has(.book-grid) .book-set-heading small,html #modal[open]:has(.book-grid) .book-discover-heading small{font-size:9px}
 html #modal[open]:has(.book-grid) .book-set-chips{min-height:58px;margin-bottom:6px}
 html #modal[open]:has(.book-grid) .book-set-chips .set-chip{min-width:110px;min-height:54px;padding:4px 6px;gap:3px;border-radius:14px}
 html #modal[open]:has(.book-grid) .book-set-chips .set-chip .toy{width:32px;height:32px}
 html #modal[open]:has(.book-grid) .book-set-chips .set-chip b{font-size:10px}
 html #modal[open]:has(.book-grid) .book-set-chips .set-chip small{font-size:8px}
 html #modal[open]:has(.book-grid) .book-set-chips .set-chip i{height:3px;margin-top:2px}
 html #modal[open]:has(.book-grid) .calm-book-sparkle{min-height:70px;padding:4px 7px;gap:7px;margin-bottom:6px;border-radius:17px}
 html #modal[open]:has(.book-grid) .book-feature-art{width:65px;height:60px}
 html #modal[open]:has(.book-grid) .book-feature-copy b{font-size:8px}
 html #modal[open]:has(.book-grid) .book-feature-copy strong{font-size:14px}
 html #modal[open]:has(.book-grid) .book-feature-copy small{font-size:9px}
 html #modal[open]:has(.book-grid) .book-feature-go{width:29px;height:29px;font-size:23px}
 html #modal[open]:has(.book-grid) .book-filters .pill{min-height:31px;padding:3px 10px;font-size:10px}
 html #modal[open]:has(.book-grid) .book-grid .book-toy .toy{height:min(76px,52%)!important}
 html #modal[open]:has(.book-grid) .book-grid .book-toy strong{font-size:10px}
 html #modal[open]:has(.book-grid) .book-grid .book-toy .rarity{font-size:8px}
 html #modal[open]:has(.book-grid) .book-grid .book-toy small{font-size:8px}
}
@media(max-height:730px){html #modal[open]:has(.book-grid) .collection-overview{min-height:78px}html #modal[open]:has(.book-grid) .book-set-chips{min-height:47px}html #modal[open]:has(.book-grid) .book-set-chips .set-chip{min-height:44px}html #modal[open]:has(.book-grid) .calm-book-sparkle{min-height:59px}html #modal[open]:has(.book-grid) .book-feature-art{height:51px}html #modal[open]:has(.book-grid) .book-feature-copy small{display:none}}
@media(max-width:360px){html #modal[open]:has(.book-grid) .book-feature-copy strong{font-size:12px}html #modal[open]:has(.book-grid) .book-feature-copy small{font-size:8px;line-height:1.05}html #modal[open]:has(.book-grid) .book-set-heading small{display:none}}
@media(max-height:650px){html #modal[open]:has(.book-grid) .book-grid .book-toy{padding:2px}html #modal[open]:has(.book-grid) .book-grid .book-toy .toy{height:48%!important}html #modal[open]:has(.book-grid) .book-grid .book-toy strong{font-size:9px}html #modal[open]:has(.book-grid) .book-grid .book-toy .rarity{font-size:7px;padding:1px 3px}html #modal[open]:has(.book-grid) .book-grid .book-toy small{display:none}html #modal[open]:has(.book-grid) .book-heart{font-size:14px;right:4px}}

/* 2026-10-16 kid pass: bubbly title + count pill, a wooden shelf of finds, bigger picture cards, sparkly mystery cards, round purple page arrows. */
html #modal[open]:has(.book-grid) .modal-top{display:flex;align-items:center;gap:12px}
html #modal[open]:has(.book-grid) .modal-top h2{outline:none;position:relative;margin:0 0 0 22px;white-space:nowrap;font-family:"Grandstander",ui-rounded,sans-serif!important;font-weight:900;text-transform:none;letter-spacing:-.02em;color:#5a2d91;-webkit-text-stroke:5px #fffaf2;paint-order:stroke fill;text-shadow:0 4px 0 #ead9f6}
html #modal[open]:has(.book-grid) .modal-top h2:before,html #modal[open]:has(.book-grid) .modal-top h2:after{content:'★';position:absolute;color:#ffd34d;-webkit-text-stroke:0;text-shadow:0 2px 0 #e7a92c;font-size:.42em;pointer-events:none}
html #modal[open]:has(.book-grid) .modal-top h2:before{left:-.8em;top:0}
html #modal[open]:has(.book-grid) .modal-top h2:after{right:-.78em;top:-.12em;font-size:.34em}
html #modal[open]:has(.book-grid) .book-count{margin-left:auto;display:flex;flex-direction:column;align-items:center;gap:5px;width:min(230px,34%)}
html #modal[open]:has(.book-grid) .book-count b{white-space:nowrap;padding:2px 16px;border:2px solid #fff;border-radius:30px;background:#fffaf3;box-shadow:0 3px 7px #765c6b26;color:#5a2d91;font-size:clamp(15px,2.4vw,21px);font-weight:900;line-height:1.25}
html #modal[open]:has(.book-grid) .book-count i{display:block;width:100%;height:12px;border:2px solid #fff;border-radius:20px;background:#e3dcea;box-shadow:inset 0 2px 3px #7a5f8a33;overflow:hidden}
html #modal[open]:has(.book-grid) .book-count em{display:block;height:100%;border-radius:20px;background:linear-gradient(90deg,#8ce6db,#ae70f5)}
html #modal[open]:has(.book-grid) .book-shelf{flex:none;position:relative;margin:0 0 14px;padding:0 6px 22px}
html #modal[open]:has(.book-grid) .book-shelf:after{content:'';position:absolute;left:0;right:0;bottom:4px;height:18px;border-radius:4px 4px 8px 8px;background:repeating-linear-gradient(2deg,transparent 0 5px,#9b60341c 6px 7px),linear-gradient(#f2cc94 0 5px,#c68d54 5px 14px,#aa7143 14px);box-shadow:0 4px 6px #6d462a40}
html #modal[open]:has(.book-grid) .book-shelf-row{position:relative;z-index:1;display:flex;align-items:flex-end;justify-content:space-between;gap:4px;height:clamp(58px,9vw,86px)}
html #modal[open]:has(.book-grid) .book-shelf-spot{position:relative;flex:1;min-width:0;height:100%;display:flex;align-items:flex-end;justify-content:center}
html #modal[open]:has(.book-grid) .book-shelf-spot .toy{width:100%!important;height:100%!important;max-width:86px;transform:translateY(12%);filter:drop-shadow(0 3px 2px #75513c40)}
html #modal[open]:has(.book-grid) .book-shelf-spot.mystery .toy{filter:brightness(0) opacity(.16)}
html #modal[open]:has(.book-grid) .book-shelf-spot.mystery i,html #modal[open]:has(.book-grid) .book-q{position:absolute;left:50%;top:55%;translate:-50% -50%;font-style:normal;font-weight:900;color:#fff;-webkit-text-stroke:2px #b7a9c2;paint-order:stroke fill;font-size:clamp(20px,3.4vw,30px);pointer-events:none}
html #modal[open]:has(.book-grid) .book-grid .book-toy{gap:4px;padding:8px 6px 8px}
html #modal[open]:has(.book-grid) .book-grid .book-art{position:relative;flex:1;min-height:0;width:100%;display:grid;place-items:center;container-type:size}
html #modal[open]:has(.book-grid) .book-grid .book-toy .book-art .toy{width:min(92cqw,100cqh,130px)!important;height:min(92cqw,100cqh,130px)!important;max-width:none;max-height:none}
html #modal[open]:has(.book-grid) .book-grid:not(.paged) .book-toy{height:170px}
html #modal[open]:has(.book-grid) .book-grid .book-toy strong{font-size:clamp(12px,1.8vw,16px);font-weight:850;color:#5a2d91}
html #modal[open]:has(.book-grid) .book-dots{flex:none;display:flex;gap:3px;padding:3px 6px;border-radius:20px;background:#ffffffd9;box-shadow:0 1px 3px #6d4b7a30}
html #modal[open]:has(.book-grid) .book-dots i{width:7px;height:7px;border-radius:50%;background:#7fc79a}
html #modal[open]:has(.book-grid) .book-dots.dots-rare i{background:#a774e6}
html #modal[open]:has(.book-grid) .book-dots:is(.dots-ultra,.dots-legendary) i{background:#e7a92c}
html #modal[open]:has(.book-grid) .book-grid .book-toy.undiscovered:before{content:'✦     ✧\A\A   ✧      ✦';white-space:pre;position:absolute;inset:14% 10% auto;text-align:center;font-size:clamp(11px,1.8vw,17px);line-height:1;color:#fff6b8;text-shadow:0 0 6px #ffe36b;pointer-events:none}
html #modal[open]:has(.book-grid) .book-grid .book-toy.undiscovered:after{content:'';position:absolute;left:0;right:0;bottom:0;height:24%;border-radius:0 0 17px 17px;background:radial-gradient(ellipse at 20% 100%,#fff 0 35%,transparent 36%),radial-gradient(ellipse at 55% 110%,#fff 0 40%,transparent 41%),radial-gradient(ellipse at 90% 100%,#fff 0 30%,transparent 31%);opacity:.75;pointer-events:none}
html #modal[open]:has(.book-grid) .book-page>.book-toy.undiscovered:nth-child(4n+1){background:linear-gradient(160deg,#f3e8ff,#e4d4fb)!important}
html #modal[open]:has(.book-grid) .book-page>.book-toy.undiscovered:nth-child(4n+2){background:linear-gradient(160deg,#ffeaf1,#f9d8e4)!important}
html #modal[open]:has(.book-grid) .book-page>.book-toy.undiscovered:nth-child(4n+3){background:linear-gradient(160deg,#e3fbf2,#c9efe1)!important}
html #modal[open]:has(.book-grid) .book-page>.book-toy.undiscovered:nth-child(4n){background:linear-gradient(160deg,#e8f0ff,#d6e2fb)!important}
html #modal[open]:has(.book-grid) .book-grid .book-toy.undiscovered .toy{filter:brightness(0) opacity(.16)!important}
html #modal[open]:has(.book-grid) .book-nav{gap:28px;min-height:60px}
html #modal[open]:has(.book-grid) .book-nav .icon-button{width:58px;height:58px;min-width:58px;border:3px solid #fff;border-radius:50%;background:linear-gradient(#9d6ce0,#7646bf);box-shadow:0 5px 0 #573192,0 8px 14px #57319255;color:#fff;font-size:34px;font-weight:900;line-height:1}
html #modal[open]:has(.book-grid) .book-nav .icon-button:active{translate:0 3px;box-shadow:0 2px 0 #573192}
html #modal[open]:has(.book-grid) .book-page-status{font-size:15px}
@media(min-width:600px){html #modal[open]:has(.book-grid) .book-grid:not(.paged){grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:600px){html #modal[open]:has(.book-grid) .book-shelf-row{overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;scrollbar-width:none;padding-bottom:8px;margin-bottom:-8px;box-sizing:content-box}html #modal[open]:has(.book-grid) .book-shelf-row::-webkit-scrollbar{display:none}html #modal[open]:has(.book-grid) .book-shelf-spot{scroll-snap-align:start}html #modal[open]:has(.book-grid) .modal-top h2{margin-left:16px;font-size:clamp(22px,6.6vw,30px)}html #modal[open]:has(.book-grid) .modal-top{gap:8px}html #modal[open]:has(.book-grid) .book-count{width:auto;flex:0 1 110px}html #modal[open]:has(.book-grid) .book-count b{padding:1px 10px;font-size:15px}html #modal[open]:has(.book-grid) .book-count i{height:9px}html #modal[open]:has(.book-grid) .book-shelf{margin-bottom:8px;padding-bottom:18px}html #modal[open]:has(.book-grid) .book-shelf-row{height:52px}html #modal[open]:has(.book-grid) .book-shelf:after{height:14px}html #modal[open]:has(.book-grid) .book-grid:not(.paged) .book-toy{height:132px}html #modal[open]:has(.book-grid) .book-nav{min-height:52px}}
@media(max-width:360px){html #modal[open]:has(.book-grid) .modal-top h2{font-size:20px;margin-left:14px}html #modal[open]:has(.book-grid) .book-count{flex-basis:78px}html #modal[open]:has(.book-grid) .book-count b{padding:1px 7px;font-size:13px}html #modal[open]:has(.book-grid) .book-nav .icon-button{width:50px;height:50px;min-width:50px}}

/* 2026-10-16 pass 2: set tabs replace headings and rarity pills, shelf taps, NEW badges, tinted mysteries, roomier grid. */
html #modal[open]:has(.book-grid) :is(.book-set-heading,.book-set-chips,.book-discover-heading){display:none!important}
html #modal[open]:has(.book-grid) .book-set-tabs{display:flex;flex-wrap:nowrap;gap:8px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;margin:0 -4px 10px;padding:3px 4px 6px;scroll-snap-type:x proximity}
html #modal[open]:has(.book-grid) .book-set-tabs::-webkit-scrollbar{display:none}
html #modal[open]:has(.book-grid) .book-tab{flex:none;scroll-snap-align:start;display:flex;align-items:center;gap:8px;min-height:58px;padding:5px 16px 5px 6px;border:3px solid #fff;border-radius:40px;background:#fff8ef;box-shadow:0 4px 0 #e2d2e7,0 6px 12px #765c6b22;color:#5a2d91;font:inherit;font-weight:850;font-size:16px;white-space:nowrap}
html #modal[open]:has(.book-grid) .book-tab.active{background:linear-gradient(#fff6d2,#ffe7a0);border-color:#ffd34d;box-shadow:0 4px 0 #e2b043,0 6px 12px #b8863a33}
html #modal[open]:has(.book-grid) .book-tab small{font-size:12px;color:#8a6f9c;font-weight:800}
html #modal[open]:has(.book-grid) .book-tab-icon{position:relative;width:42px;height:42px;flex:none;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#7fd8c4 calc(var(--p,0)*1%),#e8def0 0)}
html #modal[open]:has(.book-grid) .book-tab-icon:before{content:'';position:absolute;inset:4px;border-radius:50%;background:#fffdf8}
html #modal[open]:has(.book-grid) .book-tab-icon>*{position:relative;width:32px!important;height:32px!important;margin:0}
html #modal[open]:has(.book-grid) .book-tab-icon svg{width:22px!important;height:22px!important;color:#e7a92c;fill:#ffd34d}
html #modal[open]:has(.book-grid) .book-tab.done .book-tab-icon{background:conic-gradient(#ffc93c 100%,#ffc93c 0)}
html #modal[open]:has(.book-grid) .book-shelf-spot{padding:0;border:0;background:none;cursor:pointer;-webkit-tap-highlight-color:transparent}
html #modal[open]:has(.book-grid) .book-label{display:flex;align-items:center;justify-content:center;gap:6px;max-width:100%;min-width:0}
html #modal[open]:has(.book-grid) .book-label strong{min-width:0}
html #modal[open]:has(.book-grid) .book-new{position:absolute;z-index:2;left:8px;top:7px;padding:2px 8px;border:2px solid #fff;border-radius:20px;background:linear-gradient(#ff8fb8,#f45d97);color:#fff;font-size:11px;font-weight:900;letter-spacing:.04em;box-shadow:0 2px 4px #b0336a44}
@media(prefers-reduced-motion:no-preference){html #modal[open]:has(.book-grid) .book-new{animation:book-new 1.8s ease-in-out infinite}@keyframes book-new{50%{scale:1.08}}}
html #modal[open]:has(.book-grid) .book-page>.book-toy.undiscovered:nth-child(4n+1) .toy{filter:brightness(0) invert(.55) sepia(1) saturate(2.2) hue-rotate(215deg) opacity(.42)!important}
html #modal[open]:has(.book-grid) .book-page>.book-toy.undiscovered:nth-child(4n+2) .toy{filter:brightness(0) invert(.55) sepia(1) saturate(2.4) hue-rotate(290deg) opacity(.4)!important}
html #modal[open]:has(.book-grid) .book-page>.book-toy.undiscovered:nth-child(4n+3) .toy{filter:brightness(0) invert(.5) sepia(1) saturate(2.4) hue-rotate(115deg) opacity(.42)!important}
html #modal[open]:has(.book-grid) .book-page>.book-toy.undiscovered:nth-child(4n) .toy{filter:brightness(0) invert(.55) sepia(1) saturate(2.4) hue-rotate(180deg) opacity(.42)!important}
html #modal[open]:has(.book-grid) .book-grid:not(.paged) .book-toy{height:150px}
@media(max-width:600px){
 html #modal[open]:has(.book-grid) .book-tab{min-height:48px;font-size:14px;padding:4px 12px 4px 5px;gap:6px}
 html #modal[open]:has(.book-grid) .book-tab-icon{width:36px;height:36px}html #modal[open]:has(.book-grid) .book-tab-icon>*{width:27px!important;height:27px!important}
 html #modal[open]:has(.book-grid) .calm-book-sparkle{min-height:58px!important;padding:3px 10px!important;gap:10px!important;margin-bottom:8px!important;border-radius:18px!important}
 html #modal[open]:has(.book-grid) .calm-book-sparkle .book-feature-art{width:58px;height:52px}
 html #modal[open]:has(.book-grid) .calm-book-sparkle .book-feature-copy b,html #modal[open]:has(.book-grid) .calm-book-sparkle .book-feature-copy small{display:none}
 html #modal[open]:has(.book-grid) .calm-book-sparkle .book-feature-copy strong{font-size:16px}
 html #modal[open]:has(.book-grid) .calm-book-sparkle .book-feature-go{width:32px;height:32px;font-size:24px}
 html #modal[open]:has(.book-grid) .book-grid:not(.paged) .book-toy{height:112px}
 html #modal[open]:has(.book-grid) .book-new{left:5px;top:5px;font-size:9px;padding:1px 6px}
}

/* Unbought shop toys: look, don't squish. */
html #modal[open] .squish-stage.squish-locked{cursor:not-allowed;touch-action:auto}
html #modal[open] .squish-stage.squish-locked #squish{pointer-events:none}
html #modal[open] .squish-stage.squish-locked .squish-lock{position:absolute;right:14%;bottom:12%;z-index:3;width:52px;height:52px;display:grid;place-items:center;border:3px solid #fff;border-radius:50%;background:#fff6e2;box-shadow:0 4px 0 #e2c48a,0 6px 12px #8a5d2a33;font-size:24px;pointer-events:none}

/* 2026-10-16: shops have no bottom bar (Earn coins / Basket / Collection removed); the help button lives in the shop header. */
html body .shop-footer{display:none!important}
@media(min-width:700px) and (min-height:600px){html body.ui2[data-mode][data-place=shop] #main{grid-template-rows:56px minmax(0,1fr)!important}}

/* 2026-10-16: Fidget Shop on iPad (portrait): zoom the interior 25% around its shelf so cards (and toys) match the other shops. */
@media(min-width:761px) and (orientation:portrait){
 html body.ui2[data-place=shop] .shop-scene.shop-color-7.shop-color-7{background-size:125% 125%!important;background-position:50% 36%!important}
 html body.ui2[data-place=shop] .shop-scene.shop-color-7.shop-color-7 .shelves{inset:11% 3.5% 31.5%!important;column-gap:6%!important}
}
@media(min-width:761px) and (orientation:portrait){html body.ui2[data-place=shop] .shop-scene.shop-color-7.shop-color-7 .toy-card>.toy{width:min(90cqw,calc(100cqh - 36px))!important;height:min(90cqw,calc(100cqh - 36px))!important}}

/* 2026-10-16: Shops tab in My Collection (replaces the old Passport). */
html #modal[open]:has(.book-grid) .book-shop-card{background:linear-gradient(160deg,#fffaf0,#f6e9d6)!important}
html #modal[open]:has(.book-grid) .book-shop-card .book-art{overflow:hidden}
html #modal[open]:has(.book-grid) .book-shop-card .book-art .shop-building{width:min(100cqw,100cqh)!important;height:min(100cqw,100cqh)!important;max-width:none;position:relative;display:block}
html #modal[open]:has(.book-grid) .book-shop-card.shop-locked{background:linear-gradient(160deg,#f1ecf4,#e4ddea)!important}
html #modal[open]:has(.book-grid) .book-shop-card.shop-locked .book-art .shop-building{filter:grayscale(.85) opacity(.55)}
html #modal[open]:has(.book-grid) .book-shop-lock{position:absolute;z-index:2;left:50%;top:42%;translate:-50% -50%;display:flex;flex-direction:column;align-items:center;gap:2px;padding:8px 12px;border:3px solid #fff;border-radius:22px;background:conic-gradient(#7fd8c4 calc(var(--p,0)*1%),#fff8ef 0);box-shadow:0 4px 0 #d8c6e0;font-size:22px;line-height:1}
html #modal[open]:has(.book-grid) .book-shop-lock small{padding:2px 6px;border-radius:10px;background:#fffdf8;color:#5a2d91;font-size:12px;font-weight:900}
html #modal[open]:has(.book-grid) .book-shop-card.shop-open .book-label strong:after{content:' ✓';color:#3f9d84}
html #modal[open]:has(.book-grid) .book-shop-soon{position:absolute;z-index:2;left:50%;top:8px;translate:-50% 0;padding:2px 8px;border:2px solid #fff;border-radius:14px;background:#fff3c9;color:#7a5414;font-size:11px;font-weight:900;white-space:nowrap}
