#page-cat{position:fixed;left:0;top:0;width:58px;height:58px;z-index:35;pointer-events:none;user-select:none;will-change:transform;contain:layout style;filter:drop-shadow(0 2px 1px #18232020)}
#page-cat[hidden],#cat-toggle[hidden]{display:none!important}
.page-cat-sprite{width:100%;height:100%;position:relative;transform-origin:center}
.page-cat-sprite img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}
#page-cat.is-dark{filter:drop-shadow(0 0 1px #eee8d3) drop-shadow(0 2px 2px #0005)}
#page-cat[data-state="sleep"] img{animation:cat-sleep-breath 5s ease-in-out infinite;transform-origin:50% 97%}
.page-cat-snooze{display:none;position:absolute;top:26%;right:9%;font:italic 12px Georgia,serif;color:#6c7771}
.page-cat-snooze>span{font-size:9px;position:absolute;left:10px;top:-10px}
#page-cat[data-state="sleep"] .page-cat-snooze{display:block;animation:cat-snooze 5s ease-in-out infinite}
#page-cat.is-dark .page-cat-snooze{color:#d1d8c9}
#page-cat.is-paused *,body.motion-off #page-cat *{animation-play-state:paused!important}
#cat-toggle{display:grid;place-items:center;width:32px;padding:6px}
#cat-toggle svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
#cat-toggle.is-muted{opacity:.45}
@keyframes cat-sleep-breath{50%{transform:scaleY(1.018)}}
@keyframes cat-snooze{0%,100%{opacity:.25}50%{opacity:.8}}
@media(prefers-reduced-motion:reduce){#page-cat *{animation:none!important}}
@media print{#page-cat,#cat-toggle{display:none!important}}

#page-cat[data-state="look"] img{animation:cat-look 1.3s ease-in-out both;transform-origin:50% 95%}
#page-cat[data-state="land"] img{animation:cat-land .18s ease-out both;transform-origin:50% 95%}
@keyframes cat-look{0%,100%{transform:rotate(0)}50%{transform:rotate(-5deg)}}
@keyframes cat-land{0%{transform:scale(1.1,.88)}100%{transform:scale(1)}}

/* Closing scene: the familiar opening cat, a quiet wave and one diagonal spotlight. */
.closing-thanks{position:relative;isolation:isolate;overflow:hidden}
.closing-thanks .thanks-content{position:relative;z-index:2;margin-top:-16vh}
.closing-cat-scene{position:absolute;left:50%;bottom:7%;width:160px;height:192px;transform:translateX(-50%);pointer-events:none;z-index:1;animation:closing-cat-appear .8s ease-out both}
.closing-cat-scene[hidden]{display:none}
.closing-spotlight{position:absolute;left:-160px;bottom:16px;width:520px;height:650px;background:linear-gradient(155deg,#f0f8cf00 4%,#eff7ce12 50%,#e7f2c522 100%);clip-path:polygon(93% 0,99% 0,69% 100%,11% 100%);filter:blur(3px);opacity:.8;z-index:-1}
.closing-cat-ground{position:absolute;left:-48px;right:-48px;bottom:0;height:31px;border-radius:50%;background:radial-gradient(ellipse,#eef6c62d 0,#e4f5b311 45%,transparent 72%);box-shadow:0 0 32px #d8edb409}
.closing-cat{position:relative;width:100%;height:100%;filter:drop-shadow(3px -3px 3px #edf5c42b)}
.closing-cat-svg{display:block;width:100%;height:100%;overflow:visible}
.ending-wave{transform-origin:98px 126px;animation:closing-wave 5s 1s ease-in-out infinite}
.ending-tail{transform-origin:100px 137px;animation:closing-tail 5.5s ease-in-out infinite}
.ending-eyes{animation:closing-eyes 5s 1s infinite}
.ending-happy{opacity:0;animation:closing-smile 5s 1s infinite}
.ending-hug{transform:translate(9px,3px) rotate(-5deg);transform-origin:48px 122px}
@keyframes closing-wave{0%,12%,40%,100%{transform:rotate(0)}18%,30%{transform:rotate(-17deg)}24%,36%{transform:rotate(10deg)}}
@keyframes closing-tail{50%{transform:rotate(-7deg)}}
@keyframes closing-eyes{0%,12%,42%,100%{opacity:1}16%,38%{opacity:0}}
@keyframes closing-smile{0%,12%,42%,100%{opacity:0}16%,38%{opacity:1}}
@keyframes closing-cat-appear{from{opacity:0}to{opacity:1}}
body.motion-off .closing-cat-scene *,body.motion-off .closing-cat-scene{animation-play-state:paused!important}
@media(max-width:750px){.closing-cat-scene{width:135px;height:162px;bottom:12%}.closing-thanks .thanks-content{margin-top:-20vh}.closing-spotlight{height:480px;width:420px;left:-130px}}
@media(prefers-reduced-motion:reduce){.closing-cat-scene,.closing-cat-scene *{animation:none!important}}

/* One main thank-you sign, held by the cat; no duplicate label. */
.closing-thanks .thanks-content{width:min(760px,82vw);margin-top:-3vh;padding-top:142px;isolation:isolate}
.closing-thanks .closing-cat-scene{top:0;bottom:auto;left:50%;width:160px;height:192px;z-index:0}
.closing-thanks .closing-spotlight{height:650px;bottom:-135px;left:-165px;opacity:.65;z-index:-1}
.closing-thanks h1.thanks-main-sign{position:relative;z-index:2;margin:0;padding:24px 30px 29px;border:2px solid #b8ce95;border-radius:12px;background:#eaf0d6;color:#243a2d;font-size:clamp(56px,6.9vw,105px);line-height:1.22;letter-spacing:-.055em;box-shadow:0 14px 35px #0003,inset 0 -5px 0 #d4debc;font-weight:450}
.thanks-paw{position:absolute;top:-13px;width:25px;height:35px;background:#050707;border:1px solid #9baa8c;border-radius:13px 13px 10px 10px;box-shadow:0 3px 3px #0004}
.thanks-paw::after{content:"";position:absolute;left:8px;top:12px;height:10px;width:5px;border-left:1px solid #aab998;border-right:1px solid #aab998;border-radius:1px}
.thanks-paw.paw-left{left:calc(50% - 66px);transform:rotate(-8deg)}
.thanks-paw.paw-right{right:calc(50% - 66px);transform:rotate(8deg)}
.closing-thanks .thanks-discussion{position:relative;z-index:2;margin-top:40px;padding-top:24px;font-size:clamp(18px,2vw,30px)}
@media(max-width:750px){.closing-thanks .thanks-content{width:90vw;padding-top:120px;margin-top:-5vh}.closing-thanks .closing-cat-scene{width:135px;height:162px;top:0;bottom:auto}.closing-thanks h1.thanks-main-sign{font-size:clamp(37px,8.8vw,64px);padding:22px 12px 26px}.thanks-paw{width:22px;height:29px}.thanks-paw.paw-left{left:calc(50% - 55px)}.thanks-paw.paw-right{right:calc(50% - 55px)}.closing-thanks .thanks-discussion{margin-top:32px}.closing-thanks .closing-spotlight{bottom:-100px}}
.thanks-content:has(.closing-cat-scene[hidden]) .thanks-paw{display:none}
/* A coordinated grooming beat: right paw leaves the sign, meets the tongue, returns. */
.thanks-paw.paw-right{animation:closing-paw-groom 16s ease-in-out infinite;transform-origin:50% 80%}
.ending-head{transform-origin:71px 90px;animation:closing-head-groom 16s ease-in-out infinite}
.ending-lick-tongue{opacity:0;transform-origin:78px 94px;animation:closing-tongue-groom 16s linear infinite}
.ending-mouth{animation:closing-mouth-groom 16s linear infinite}
.ending-eyes{animation:closing-groom-eyes 16s linear infinite}
.ending-happy{animation:closing-groom-happy 16s linear infinite}
@keyframes closing-paw-groom{0%,40%,66%,100%{transform:translate(0,0) rotate(8deg)}45%,48%,52%,56%,60%{transform:translate(-42px,-31px) rotate(-28deg)}50%,54%,58%{transform:translate(-40px,-29px) rotate(-25deg)}63%{transform:translate(-41px,-30px) rotate(-28deg)}}
@keyframes closing-head-groom{0%,40%,66%,100%{transform:rotate(0)}45%,62%{transform:rotate(7deg)}}
@keyframes closing-tongue-groom{0%,47%,50.5%,54.5%,58.5%,62%,100%{opacity:0;transform:scale(.5)}48%,50%,52%,54%,56%,58%,60%,61.5%{opacity:1;transform:scale(1)}}
@keyframes closing-mouth-groom{0%,44%,64%,100%{opacity:1}45%,63%{opacity:0}}
@keyframes closing-groom-eyes{0%,10%,22%,44%,65%,100%{opacity:1}12%,20%,46%,63%{opacity:0}}
@keyframes closing-groom-happy{0%,10%,22%,44%,65%,100%{opacity:0}12%,20%,46%,63%{opacity:1}}
body.motion-off .thanks-paw{animation-play-state:paused!important}
@media(max-width:750px){@keyframes closing-paw-groom{0%,40%,66%,100%{transform:translate(0,0) rotate(8deg)}45%,48%,52%,56%,60%{transform:translate(-34px,-27px) rotate(-28deg)}50%,54%,58%{transform:translate(-32px,-25px) rotate(-25deg)}63%{transform:translate(-33px,-26px) rotate(-28deg)}}}
@media(prefers-reduced-motion:reduce){.thanks-paw{animation:none!important}}
