.bookshop{box-sizing:border-box;width:min(1000px,calc(100vw - 24px));max-height:calc(100dvh - 24px);margin:auto;padding:0;border:3px solid #786044;border-radius:14px;background:#f6efdc;color:#263c30;font:16px/1.4 system-ui,sans-serif;box-shadow:0 18px 65px #0008;overflow:hidden}
.bookshop::backdrop{background:#13271ecc}.bookshop[open]{display:flex;flex-direction:column}.bookshop *{box-sizing:border-box}.bookshop button{font:inherit;min-height:44px;cursor:pointer;border-radius:7px;border:1px solid #7b805e}.bookshop button:focus-visible{outline:3px solid #124fa0;outline-offset:3px}.bookshop button:disabled{cursor:default;opacity:.7}.bookshop-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px;background:#304e3c;color:#fff5d9;flex:none}.bookshop h2{margin:0;font:700 26px/1.2 Georgia,serif}.bookshop-close{padding:8px 16px;background:#f6efdc;color:#263c30}.bookshop-balance{margin:0;padding:10px 18px;font-weight:650;flex:none}.bookshop-body{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(240px,1fr);gap:20px;padding:4px 18px 18px;overflow:auto;overscroll-behavior:contain;min-height:0;touch-action:pan-y}.bookshop-shelf{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 12px;align-content:start}.bookshop-book{display:flex;flex-direction:column;align-items:center;gap:7px;padding:10px 7px;background:linear-gradient(#ede3c9 85%,#95734e 85%,#705036 91%,#ac8861 91%);color:#263c30;box-shadow:0 3px 4px #32231330}.bookshop-book[aria-pressed=true]{outline:3px solid #385f45;outline-offset:1px}.bookshop-book img{width:100%;height:155px;object-fit:contain;filter:drop-shadow(2px 3px 2px #372b2840)}.bookshop-name{font-weight:650;overflow-wrap:anywhere}.bookshop-card-state{font-weight:700;background:#fff4d7;padding:2px 7px;border-radius:4px;margin-bottom:6px}.bookshop-detail{align-self:start;text-align:center;background:#fff9eb;border:1px solid #c8b794;border-radius:10px;padding:15px;position:sticky;top:0}.bookshop-art{position:relative;isolation:isolate;min-height:100px}.bookshop-cover{width:100%;height:240px;object-fit:contain;filter:drop-shadow(3px 5px 3px #33231140)}.bookshop-bookmark{position:absolute;right:6%;top:0;background:#dec26b;color:#372c15;padding:8px 10px 17px;font-weight:750;clip-path:polygon(0 0,100% 0,100% 100%,50% 85%,0 100%)}.bookshop h3{font:700 23px/1.2 Georgia,serif;margin:12px 0 8px}.bookshop-detail p{margin:8px 0}.bookshop-buy,.bookshop-target{width:100%;padding:10px;margin-top:8px}.bookshop-buy{background:#32543f;color:#fff8df}.bookshop-target{background:#efe5c9;color:#263c30}.bookshop-status{min-height:24px;font-size:16px}.bookshop-note{padding:9px 18px;margin:0;background:#e7ddc4;font-size:14px;flex:none}.bookshop-dust{position:absolute;left:50%;top:57%;width:5px;height:5px;background:#c7a449;border-radius:50%;pointer-events:none;box-shadow:0 0 7px #d7bb6e;animation:bookshop-curl 900ms ease-out both;transform:rotate(var(--angle))}.is-magical .bookshop-cover{animation:bookshop-lift 900ms ease-in-out}.is-still-magic{box-shadow:0 0 0 3px #d0b459,inset 0 0 24px #ddca8050;border-radius:5px}@keyframes bookshop-lift{0%,100%{transform:translateY(0) rotate(0)}42%{transform:translateY(-12px) rotate(-2deg)}75%{transform:translateY(-4px) rotate(1deg)}}@keyframes bookshop-curl{0%{opacity:0;transform:rotate(var(--angle)) translateX(12px) scale(.4)}25%{opacity:.85}75%{opacity:.5}100%{opacity:0;transform:rotate(calc(var(--angle) + 125deg)) translateX(105px) translateY(-35px) scale(.2)}}
@media(max-width:700px){.bookshop-body{grid-template-columns:1fr;gap:18px;padding:4px 12px 12px}.bookshop-detail{position:static;grid-row:1;display:grid;grid-template-columns:90px minmax(0,1fr);column-gap:12px;text-align:left;padding:12px}.bookshop-art{grid-column:1;grid-row:1/4;align-self:center}.bookshop-cover{height:130px}.bookshop-bookmark{right:0;font-size:12px;padding:4px 5px 10px}.bookshop-detail h3,.bookshop-detail>p{grid-column:2}.bookshop-detail h3{font-size:21px;margin:0}.bookshop-buy,.bookshop-target,.bookshop-status{grid-column:1/-1}.bookshop-shelf{grid-template-columns:repeat(3,minmax(0,1fr))}.bookshop-header{padding:10px 12px}.bookshop h2{font-size:23px}.bookshop-note{font-size:13px}.bookshop-book img{height:140px}}
@media(max-width:480px){.bookshop-shelf{grid-template-columns:repeat(2,minmax(0,1fr))}.bookshop h2{font-size:21px}.bookshop-balance{padding:8px 12px}.bookshop-book img{height:155px}}
@media(prefers-reduced-motion:reduce){.bookshop-dust{display:none}.is-magical .bookshop-cover{animation:none}}
/* Keep the saved goal visible while browsing other books. */
.bookshop-saving,.bookshop-scroll{flex:none;margin:0 18px 8px;padding:8px 12px;text-align:left;background:#e8d89b;color:#263c30;font-weight:700!important}.bookshop-saving[hidden]{display:none}.bookshop-scroll{background:#eee4cd;border-style:dashed!important;font-weight:600!important}.bookshop-body{padding-bottom:32px;scroll-padding-bottom:24px;scrollbar-gutter:stable;flex:1 1 auto}.bookshop-shelf{padding-bottom:12px}.bookshop-book{--cover-height:155px;display:grid;grid-template-rows:var(--cover-height) minmax(5.6em,1fr) auto;justify-items:center;align-items:start;padding:10px 7px 30px;background:linear-gradient(to bottom,#ede3c9 calc(100% - 18px),#95734e calc(100% - 18px),#705036 calc(100% - 12px),#ac8861 calc(100% - 12px))}.bookshop-book img{height:var(--cover-height)}.bookshop-name{text-align:center;line-height:1.4}.bookshop-card-state{align-self:end;margin:0;text-align:center}.bookshop-book.is-saving-target{border:2px solid #96732b}.bookshop-book.is-saving-target .bookshop-card-state{background:#e8d89b}.bookshop-dust{z-index:3;left:var(--x);top:var(--y);width:7px;height:7px;border:1px solid #a27826;background:#fff4c7;box-shadow:0 0 5px #fff5cf,0 0 12px #d8ac48;animation:bookshop-curl 900ms ease-out var(--delay) both;transform:none}.bookshop-dust:nth-of-type(2n){width:5px;height:5px;border-radius:1px;background:#e8bd55}.is-magical .bookshop-cover{animation:bookshop-lift 900ms ease-in-out;filter:drop-shadow(0 0 8px #e0bb65)}.is-still-magic{box-shadow:0 0 0 3px #cba341,0 0 16px #d8b45e70,inset 0 0 20px #f2d68c50}
@keyframes bookshop-curl{0%{opacity:0;transform:translate(-50%,-50%) scale(.5)}18%{opacity:1;transform:translate(-50%,-50%) scale(1.15)}65%{opacity:.95}100%{opacity:0;transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) scale(.55)}}
@media(max-width:700px){.bookshop-book{--cover-height:140px}.bookshop-saving,.bookshop-scroll{margin-left:12px;margin-right:12px}.bookshop-body{padding-bottom:32px}}
@media(max-width:480px){.bookshop-book{--cover-height:155px}}
@media(prefers-reduced-motion:reduce){.bookshop-dust{display:none}.is-magical .bookshop-cover{animation:none}}

/* Ownership belongs beside the details, never over supplied cover lettering. */
.bookshop-bookmark{position:static;display:inline-block;clip-path:none;padding:4px 10px;margin:8px 0 0;border-radius:4px;grid-column:2;justify-self:start}.bookshop-bookmark[hidden]{display:none}
