:root{--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px)}
.pz-icon { display: block; width: 100%; height: 100%; background: center / 100% no-repeat; transform: rotate(-12deg); }
.pz-icon.open { background-image: url(/assets/icons/stamp-empty.svg); }
.pz-icon.done { background-image: url(/assets/icons/stamp.svg); transform: rotate(-12deg) scale(1.18); }
.book { position: fixed; inset: 0; z-index: 30; background: #FFFDF5; overflow: auto; padding: calc(var(--safe-top) + 16px) 16px calc(var(--safe-bottom) + 24px); color: #111; }
.book[hidden] { display: none; }
.book-top { display: flex; align-items: center; gap: 14px; position: sticky; top: 0; z-index: 1; background: #FFFDF5; padding-bottom: 8px; }
.book-close { width: 56px; height: 56px; border-radius: 50%; background: #FFC93C; color: #111; border: 0; box-shadow: inset 0 0 0 3px #111; display: grid; place-items: center; }
.book-close svg { width: 28px; height: 28px; }
.book-title { margin: 0; font-size: 24px; font-weight: 900; flex: 1; }
.book-total { font-size: 17px; font-weight: 800; }
.book-echo { width: 56px; height: 56px; transform: scale(1.52); }
.book-zone h2 { margin: 22px 0 12px; font-size: 19px; font-weight: 900; padding-bottom: 6px; border-bottom: 2px solid rgba(17,17,17,.15); }
.book-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 12px; }
@media (min-width: 1000px) { .book-grid { grid-template-columns: repeat(6, 1fr); } .book-zone h2 { font-size: 22px; } }
.book-animal { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; padding: 8px 0 0; background: none; color: #111; min-height: 72px; }
.book-bubble { position: relative; width: 72px; height: 72px; --bubble: 72px; }
.book-pic { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; background-color: #fff; box-shadow: 0 0 0 3px #111; }
.book-pic img { width: 100%; height: 100%; object-fit: cover; opacity: var(--fade, .45); }
.book-bubble .pz-badge { --bubble: 72px; }
.book-name { font-size: 15px; font-weight: 800; margin-top: 10px; }
.book-n { font-size: 14px; font-weight: 700; }
@media (min-width: 1000px) { .book-bubble { width: 76px; height: 76px; --bubble: 76px; } }
@media (prefers-reduced-motion: reduce) { .pz-ring circle { transition: none; } }

/* stamp book header: title on one line, the totals on their own line under it (Tymur: "squished") */
.book-top { flex-wrap: wrap; row-gap: 2px; }
.book-title { white-space: nowrap; font-size: 28px; }
.book-total { order: 3; flex-basis: 100%; padding-left: 70px; font-size: 16px; color: #444; }


/* stamp book, simplified (Tymur 2026-10-30: "why so many circles around each animal"): one ring per
   animal — a soft track with the green progress arc hugging the picture — and the stamp itself, no disc */
.book-pic { box-shadow: none; }
.book-bubble .pz-ring { left: -9%; top: -9%; width: 118%; height: 118%; }
.book-bubble .pz-ring circle:nth-child(1), .book-bubble .pz-ring circle:nth-child(3), .book-bubble .pz-ring .ring-edge { display: none; }
.book-bubble .pz-ring circle:nth-child(2) { stroke: #E6E1D3; stroke-width: 7.9; }
.book-bubble .pz-badge, .book-bubble .pz-badge:has(.pz-icon.open) { background: none; box-shadow: none; width: 46%; height: 46%; right: -14%; bottom: -10%; }
.book-bubble .pz-badge .pz-icon, .book-bubble .pz-badge:has(.pz-icon.open) .pz-icon { width: 100%; height: 100%; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.book-animal.complete .book-bubble .pz-badge { top: -10%; bottom: auto; }

.book{touch-action:pan-y}.book[hidden]{display:none}.book-pic img{object-fit:contain}.book-bubble .pz-ring{position:absolute;overflow:visible}.book-bubble .pz-badge{position:absolute}
header .book-btn{padding:0;border:0;background:none;box-shadow:none}header .book-btn img{width:60px;height:60px;transform:scale(1.25)}header .book-btn:disabled{opacity:.45}

.credits-link{position:fixed;left:16px;bottom:calc(var(--safe-bottom) + 12px);z-index:4;display:grid;place-items:center;width:44px;height:44px;color:#553c24;text-decoration:none;background:#fffdf6bd;border-radius:50%}
