/* Painted keepsake pages. All controls keep native button and keyboard semantics. */
#stamp-album[hidden],.stamp-celebration[hidden]{display:none!important}
#stamp-album{position:absolute;inset:0;z-index:45;background:#bedbe1;color:#244e68;overflow:auto;overscroll-behavior:contain;padding:max(12px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-left)) max(14px,env(safe-area-inset-bottom));font-family:Thmanyah,sans-serif;scrollbar-color:#779aa9 #bedbe1}
#stamp-album *{box-sizing:border-box}
#stamp-album button,.stamp-celebration button{font-family:Thmanyah,sans-serif;color:#254e68;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
#stamp-album button:focus-visible,.stamp-celebration button:focus-visible{outline:3px solid #255f8d;outline-offset:4px}
#stamp-album button:disabled{opacity:.32;cursor:default}
.stamp-heading{display:flex;align-items:center;gap:12px;max-width:1080px;margin:0 auto 6px;min-height:92px}
.stamp-cover{width:86px;height:86px;object-fit:contain;transform:rotate(5deg);flex:none}
.stamp-heading>div{flex:1;min-width:0}.stamp-heading small{font-size:15px}.stamp-heading h1{font-size:clamp(25px,3.6vw,37px);line-height:1.1;margin:3px 0 7px}.stamp-total{margin:0;font-size:clamp(14px,1.7vw,18px);line-height:1.5}.stamp-total b{font-size:1.18em}.stamp-total>span{margin:0 5px;color:#718b8c}
#stamp-album .stamp-illustrated-button{border:0;background:none;box-shadow:none;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:62px;min-height:60px;padding:2px 8px;font-size:14px;line-height:1.3;border-radius:12px}
.stamp-illustrated-button img{width:46px;height:46px;object-fit:contain}.stamp-illustrated-button span{font-weight:bold}.stamp-illustrated-button:hover:not(:disabled){background:#ffffff35!important}.stamp-flipped{transform:scaleX(-1)}
.stamp-bookmarks{display:flex;gap:6px;max-width:1080px;margin:6px auto 0;padding:4px 3px 8px;overflow-x:auto;scrollbar-width:thin;align-items:stretch}
#stamp-album .stamp-bookmarks button{flex:1 0 auto;min-width:90px;min-height:62px;border:0;border-radius:5px 5px 14px 9px;padding:8px 12px;box-shadow:1px 3px 0 #6f7b6626;background:#f4e5c5;color:#4a625e;font-size:15px;line-height:1.3;transform:rotate(-.7deg)}
#stamp-album .stamp-bookmarks button:nth-child(2n){transform:rotate(.7deg);background:#e9d9b2}.stamp-bookmarks small{display:block;font-size:12px;line-height:1.6;color:inherit;opacity:.82}#stamp-album .stamp-bookmarks button[aria-pressed=true]{background:#2b5973;color:#fff2cb;box-shadow:0 4px 0 #193f5460}
.stamp-ribbon{max-width:1020px;margin:4px auto 0;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px}.stamp-ribbon h2{font-size:18px;margin:0}.stamp-ribbon h2 small{font-weight:normal;font-size:13px;margin-inline-start:5px}.stamp-filters{display:flex;gap:4px}
#stamp-album .stamp-filters button{font-size:14px;min-height:44px;min-width:54px;padding:6px 10px;background:transparent;border:0;border-radius:50% 45% 38% 42%;box-shadow:none}#stamp-album .stamp-filters button[aria-pressed=true]{background:#fff1cd;box-shadow:inset 0 -3px 0 #dec994}
.stamp-book{position:relative;width:min(1080px,100%);aspect-ratio:1.5;margin:0 auto;background:linear-gradient(90deg,#f6e5be 0%,#fff5da 47%,#d2b581 49.6%,#ae8957 50%,#dfc99e 50.5%,#fff5da 53%,#f6e5be 100%);border:7px solid #a67845;border-radius:18px 12px 15px 21px;box-shadow:inset 0 0 0 3px #fff1cf;filter:drop-shadow(0 9px 10px #38576522)}
.stamp-leaves{position:absolute;inset:10% 7% 13%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));column-gap:2.8%;row-gap:3%;direction:rtl;align-items:center}
#stamp-album .stamp-slot{display:flex;flex-direction:column;align-items:center;align-self:stretch;justify-content:center;min-width:0;min-height:0;padding:0 2px;border:0;background:none;border-radius:5px;box-shadow:none;line-height:1.3;position:relative;text-align:center;overflow:visible}
#stamp-album .stamp-slot:nth-child(4n+2){margin-inline-end:11%}#stamp-album .stamp-slot:nth-child(4n+3){margin-inline-start:11%}
.stamp-picture{display:block;position:relative;width:min(100%,185px);aspect-ratio:1;transform:rotate(var(--stamp-tilt));filter:drop-shadow(1px 3px 2px #71563825)}.stamp-picture>img{display:block;width:100%;height:100%;object-fit:contain;border-radius:2px}.stamp-slot>b{font-size:clamp(12px,1.5vw,18px);display:block;margin-top:3px;line-height:1.25}.stamp-slot>small{display:block;font-size:clamp(10px,1.05vw,12px);line-height:1.3;margin-top:2px;max-width:100%;color:#66776d}
.stamp-missing .stamp-picture>img{filter:grayscale(1) sepia(.25);opacity:.20}.stamp-waiting-mark{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:clamp(12px,1.4vw,16px);color:#7b7764;text-shadow:0 1px 3px #fff9e4;font-weight:bold}.stamp-collected-mark{position:absolute;bottom:5%;left:3%;display:flex;align-items:center;justify-content:center;width:29px;height:29px;border:2px solid #467755;background:#f3e6bd;color:#376347;border-radius:50%;font-size:19px;line-height:1;font-weight:bold;transform:rotate(-14deg)}
#stamp-album .stamp-slot:hover .stamp-picture{filter:drop-shadow(0 5px 3px #62442a3b);transform:rotate(0) translateY(-2px)}
.stamp-empty{grid-column:1/-1;grid-row:1/-1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;margin:0 10%;padding:22px;background:#fff3d9ed;border-radius:5px}.stamp-empty img{width:100px;height:100px;object-fit:contain}.stamp-empty h3{font-size:23px;margin:10px 0}.stamp-empty p{font-size:17px;line-height:1.6;margin:0;max-width:380px}
.stamp-page-turns{display:flex;align-items:center;justify-content:center;gap:22px;margin:-8px auto 0;min-height:62px}.stamp-page-turns>span{font-size:15px}.stamp-page-turns .stamp-illustrated-button{flex-direction:row!important;gap:3px;min-height:50px!important}.stamp-page-turns img{width:37px;height:37px}.stamp-footnote{max-width:880px;margin:8px auto 4px;text-align:center;font-size:13px;line-height:1.6;color:#4b6c78}
.stamp-detail{max-width:940px;min-height:450px;margin:8px auto 16px;padding:34px 42px;display:grid;grid-template-columns:1fr 1fr;gap:30px;align-items:center;background:#faf0d8;border:8px solid #315975;box-shadow:0 4px 0 #c5b48c,0 8px 0 #f6e7c8,0 10px 0 #244d67;border-radius:4px 13px 12px 5px;position:relative}.stamp-detail:before{content:'';position:absolute;left:50%;top:0;bottom:0;width:3px;background:#c5b18d33}
.stamp-detail-art{position:relative;transform:rotate(-2deg)}.stamp-detail-art>img{display:block;width:100%;max-width:355px;margin:auto;filter:drop-shadow(0 4px 3px #805e3225)}.stamp-detail-art .stamp-collected-mark{width:42px;height:42px;font-size:27px}.stamp-detail.stamp-missing .stamp-detail-art>img{filter:grayscale(.7);opacity:.44}.stamp-detail-copy{position:relative}.stamp-detail-copy>small{font-size:15px;color:#77816c}.stamp-detail-copy h2{font-size:clamp(23px,3vw,34px);line-height:1.3;margin:10px 0}.stamp-detail-copy>b{font-size:18px;color:#59805c}.stamp-detail-copy>p{font-size:18px;line-height:1.7}.stamp-detail-copy .stamp-evidence{font-size:14px;color:#75816a}.stamp-detail-actions{display:flex;gap:8px;flex-wrap:wrap}
#stamp-album .stamp-paper-button{min-height:46px;padding:9px 15px;border:1px solid #b7a782;box-shadow:0 3px 0 #c8b78e55;border-radius:5px 8px 6px 10px;background:#e7d7b1;font-size:16px;line-height:1.4}
.stamp-celebration{position:absolute;z-index:60;bottom:max(18px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(425px,calc(100% - 30px));display:flex;align-items:center;gap:12px;padding:10px 14px 10px 44px;background:#fff0d5;border:2px solid #bd9c68;box-shadow:0 4px 0 #e1caa0,0 7px 0 #335c75,0 12px 20px #183f5530;border-radius:5px 12px 7px 13px;color:#284f67;pointer-events:none;font-family:Thmanyah,sans-serif;animation:stamp-arrive .42s ease-out}
.stamp-celebration-art{width:96px;height:96px;object-fit:contain;transform:rotate(-5deg);flex:none;animation:stamp-print .55s ease-out}.stamp-celebration>div{min-width:0;display:flex;flex-direction:column;gap:5px}.stamp-celebration small{font-size:14px;color:#477958}.stamp-celebration b{font-size:21px;line-height:1.3}.stamp-celebration div>span{font-size:12px;line-height:1.4}.stamp-toast-dismiss{position:absolute;left:5px;top:5px;width:38px;height:38px;min-height:38px!important;border:0!important;background:transparent!important;font-size:26px!important;line-height:1;pointer-events:auto;box-shadow:none!important;border-radius:50%}.stamp-spark{position:absolute;width:26px;height:26px;object-fit:contain;pointer-events:none;animation:stamp-spark .85s ease-out both}.stamp-spark-one{right:-5px;top:-15px;--spark-angle:-14deg}.stamp-spark-two{left:25px;top:-24px;width:21px;height:21px;--spark-angle:18deg;animation-delay:.08s}.stamp-spark-three{right:95px;bottom:-17px;width:18px;height:18px;--spark-angle:6deg;animation-delay:.15s}
@keyframes stamp-arrive{from{opacity:0;transform:translate(-50%,10px)}to{opacity:1;transform:translate(-50%,0)}}@keyframes stamp-print{from{transform:rotate(-10deg) scale(1.1);opacity:.1}to{transform:rotate(-5deg) scale(1);opacity:1}}@keyframes stamp-spark{from{opacity:0;transform:scale(.4)}50%{opacity:1}to{opacity:1;transform:scale(1) rotate(var(--spark-angle))}}
@media(max-width:699px){#stamp-album{padding-inline:9px}.stamp-heading{gap:7px;min-height:83px}.stamp-cover{width:60px;height:68px}.stamp-heading small{font-size:12px}.stamp-heading h1{font-size:27px}.stamp-total{font-size:12px}.stamp-total>span{margin:0 2px}#stamp-album .stamp-heading .stamp-illustrated-button{min-width:46px;padding:1px;font-size:12px}.stamp-heading .stamp-illustrated-button img{width:39px;height:39px}.stamp-bookmarks{gap:5px;padding-bottom:7px}#stamp-album .stamp-bookmarks button{min-height:54px;min-width:76px;padding:6px 10px;font-size:14px}.stamp-bookmarks small{font-size:11px}.stamp-ribbon{padding:5px 3px;gap:4px;flex-wrap:wrap}.stamp-ribbon h2{font-size:17px}.stamp-ribbon h2 small{font-size:12px}#stamp-album .stamp-filters button{font-size:13px;min-width:47px;padding:6px}.stamp-book{aspect-ratio:.72;max-width:450px;background-size:200% 100%;background-position:100% 50%;min-height:410px;max-height:650px}.stamp-leaves{inset:10% 8% 13% 12%;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));column-gap:7%;row-gap:5%}#stamp-album .stamp-slot:nth-child(n){margin:0}.stamp-picture{width:min(100%,160px)}.stamp-slot>b{font-size:15px;line-height:1.25}.stamp-slot>small{font-size:10px}.stamp-waiting-mark{font-size:12px}.stamp-collected-mark{width:24px;height:24px;font-size:16px}.stamp-page-turns{margin:0 auto;gap:15px}.stamp-footnote{font-size:12px;margin-inline:12px}.stamp-detail{min-height:0;grid-template-columns:1fr;gap:18px;padding:23px 20px;border-width:6px}.stamp-detail:before{display:none}.stamp-detail-art>img{max-width:225px}.stamp-detail-art .stamp-collected-mark{left:calc(50% - 103px);width:34px;height:34px;font-size:22px}.stamp-detail-copy{text-align:center}.stamp-detail-copy h2{font-size:26px}.stamp-detail-copy>p{font-size:17px}.stamp-detail-actions{justify-content:center}.stamp-celebration{bottom:max(13px,env(safe-area-inset-bottom));gap:8px;padding:8px 9px 8px 36px;width:calc(100% - 24px)}.stamp-celebration-art{width:72px;height:72px}.stamp-celebration b{font-size:18px}.stamp-celebration small{font-size:12px}.stamp-celebration div>span{font-size:11px}.stamp-toast-dismiss{width:34px;height:34px}}
@media(max-width:359px){.stamp-cover{width:48px}.stamp-heading h1{font-size:24px}.stamp-total{font-size:11px}.stamp-book{min-height:420px}.stamp-slot>b{font-size:13px}.stamp-slot>small{font-size:10px}.stamp-ribbon{justify-content:center}.stamp-ribbon h2{width:100%;text-align:center}.stamp-leaves{inset:10% 8% 13% 12%}}
@media(prefers-reduced-motion:reduce){#stamp-album *,#stamp-album *:before,.stamp-celebration,.stamp-celebration *{animation:none!important;transition:none!important;scroll-behavior:auto!important}.stamp-picture,.stamp-celebration-art,#stamp-album .stamp-slot:hover .stamp-picture{transform:none!important}.stamp-spark{display:none!important}}

/* Sequence controls have a physical direction independent of text direction. */
.stamp-page-turns{direction:ltr}.stamp-page-turns>span{direction:rtl}
