/* v21: paint sits above the paper, never above a player's next action. */
.joy-layer,.joy-layer *{pointer-events:none!important;user-select:none!important}
.joy-layer{position:fixed;inset:0;z-index:80;overflow:hidden;contain:layout style;isolation:isolate;font-family:"Microsoft YaHei","PingFang SC",sans-serif;color:#514d39}
.joy-wash{position:absolute;box-sizing:border-box;border-radius:14% 8% 12% 6% / 7% 13% 8% 15%;background:radial-gradient(ellipse at 32% 38%,#c5d5a366,transparent 69%),radial-gradient(ellipse at 67% 63%,#edca6959,transparent 68%);border:3px solid #8d9e7866;box-shadow:0 0 15px #c5d5a35c,inset 0 0 12px #f9f2c755;animation:joy-ink-settle var(--joy-duration) ease-out both}
.joy-wash-place{background:#f3e1ad26;border:2px solid #fff5cfa6;box-shadow:0 0 10px #d2bb8450,inset 0 0 8px #fff8dd5e}
.joy-wash-dog{background:radial-gradient(ellipse,#f7d78315,#ddc37b55 78%,transparent);border-color:#eac67899}
.joy-wash-expand{border-width:2px;background:radial-gradient(ellipse at 22% 32%,#a0c5ac55,transparent 72%),radial-gradient(ellipse at 78% 68%,#e1d49b55,transparent 74%);animation:joy-garden-wash var(--joy-duration) ease-out both}
.joy-wash-complete{background:radial-gradient(ellipse,#fff2bf0a 55%,#e0bd6255);border:4px double #bb9b4dcc;box-shadow:0 0 13px #e2c98780,inset 0 0 14px #e7d49655;animation:joy-garden-border var(--joy-duration) ease-out both}
.joy-paper{position:absolute;transform:translateX(-50%);width:310px;box-sizing:border-box;padding:16px 21px 18px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:6px;background:#fff9e9;background-image:radial-gradient(ellipse at 0 0,#c4d4ac6b,transparent 62%),radial-gradient(ellipse at 100% 100%,#e9ce835c,transparent 64%);border:1px solid #baac795f;border-radius:8px 4px 12px 5px;box-shadow:0 5px 17px #4949351f,0 1px 2px #fffef6 inset;animation:joy-paper-arrive var(--joy-duration) ease both;clip-path:polygon(0 3%,6% 0,13% 2%,28% 0,45% 2%,63% 0,81% 2%,96% 0,100% 5%,99% 29%,100% 57%,99% 81%,100% 96%,92% 99%,76% 97%,60% 100%,41% 98%,23% 100%,8% 98%,0 100%,1% 76%,0 51%,1% 24%)}
.joy-paper::before,.joy-paper::after{content:"❧";position:absolute;top:37px;color:#8b9a6b;font:33px Georgia,serif;opacity:.8}
.joy-paper::before{left:6px;transform:rotate(-68deg)}
.joy-paper::after{right:6px;transform:scaleX(-1) rotate(-68deg)}
.joy-paper-opening,.joy-paper-finish{background-color:#fff6d8;border-color:#baa05b8c;background-image:radial-gradient(ellipse at 15% 20%,#f3d8856b,transparent 58%),radial-gradient(ellipse at 85% 85%,#cad6ad6b,transparent 62%)}
.joy-paper-kicker{font-size:9px;letter-spacing:2px;color:#8c8767;line-height:1.5}
.joy-paper-title{font-size:20px;font-weight:700;line-height:1.55;letter-spacing:1px;color:#64613e}
.joy-paper-opening .joy-paper-title,.joy-paper-finish .joy-paper-title{color:#8d692f;font-size:22px}
.joy-paper-subtitle{font-size:11px;line-height:1.65;color:#77715b;max-width:260px;text-wrap:balance}
.joy-paper-result{width:300px;padding:11px 18px 13px;opacity:.98}
.joy-paper-result .joy-paper-kicker{font-size:8px}.joy-paper-result .joy-paper-subtitle{font-size:10px}
.joy-achievement-chips{display:flex;gap:5px;flex-wrap:wrap;justify-content:center;max-height:100px;overflow:hidden}
.joy-achievement-chips:empty{display:none}
.joy-achievement-chip{display:inline-block;background:#e2e8cdcf;border:1px solid #a6b58c80;border-radius:4px 9px 5px 8px;color:#5e7051;padding:3px 7px;font-size:11px;line-height:1.5}
.joy-petal{position:absolute;width:10px;height:17px;border-radius:80% 15% 70% 20%;background:#d1a384;opacity:0;transform:rotate(calc(var(--joy-i)*31deg));animation:joy-petal-fall var(--joy-duration) ease-out both;animation-delay:calc(var(--joy-i)*17ms);box-shadow:inset 2px 0 4px #fff5d277}
.joy-petal:nth-child(3n){background:#b4c193;width:9px;height:14px}.joy-petal:nth-child(3n + 1){background:#dfc277}
.joy-paw{position:absolute;font-size:17px;opacity:0;filter:sepia(.6);animation:joy-paw-stamp 850ms ease-out both;animation-delay:calc(var(--joy-i)*80ms)}
.joy-resource,.joy-whisper{position:absolute;padding:6px 10px;border:1px solid #bec69e99;border-radius:5px 9px 6px 10px;background:#fffae9ed;box-shadow:0 2px 8px #45523912;color:#68784e;font-size:13px;line-height:1.5;font-weight:700;white-space:nowrap;animation:joy-resource-rise var(--joy-duration) ease-out both}
.joy-whisper{font-size:11px;font-weight:500;transform:translateX(-50%);color:#7c775c;animation:joy-whisper-in var(--joy-duration) ease both}
.joy-cue-select{animation:joy-touch 150ms ease-out!important}.joy-cue-rotate{animation:joy-tilt 200ms ease-out!important;transform-box:fill-box;transform-origin:center}.joy-cue-invalid{animation:joy-invalid 250ms ease-out!important}
.joy-score-reveal{animation:joy-score-ink 1700ms cubic-bezier(.18,.62,.25,1) both!important;transform-origin:left center}
.joy-score-soft{animation:joy-score-soft 350ms ease-out both!important}
@keyframes joy-touch{0%{filter:brightness(1.08)}100%{filter:brightness(1)}}
@keyframes joy-tilt{0%{filter:brightness(1.09);transform:rotate(-1deg)}100%{filter:brightness(1);transform:rotate(0)}}
@keyframes joy-invalid{0%,55%{filter:sepia(.25) drop-shadow(0 0 3px #c7806e)}100%{filter:none}}
@keyframes joy-ink-settle{0%{opacity:0;transform:scale(.97)}20%{opacity:.85;transform:scale(1.012)}65%{opacity:.55;transform:scale(1)}100%{opacity:0;transform:scale(1)}}
@keyframes joy-garden-wash{0%{opacity:0;clip-path:inset(0 100% 0 0)}36%{opacity:1;clip-path:inset(0)}76%{opacity:.65;clip-path:inset(0)}100%{opacity:0;clip-path:inset(0)}}
@keyframes joy-garden-border{0%{opacity:0;clip-path:inset(0 100% 0 0)}25%{opacity:1;clip-path:inset(0)}78%{opacity:.9;clip-path:inset(0)}100%{opacity:0;clip-path:inset(0)}}
@keyframes joy-paper-arrive{0%{opacity:0;transform:translate(-50%,-7px) rotate(-1deg)}15%,78%{opacity:1;transform:translate(-50%,0) rotate(0)}100%{opacity:0;transform:translate(-50%,-3px)}}
@keyframes joy-petal-fall{0%{opacity:0;translate:0 -10px}18%{opacity:.7}85%{opacity:.45}100%{opacity:0;translate:var(--joy-drift) 70px;rotate:55deg}}
@keyframes joy-paw-stamp{0%{opacity:0;scale:.8}25%{opacity:.55;scale:1}80%{opacity:.35}100%{opacity:0;scale:1}}
@keyframes joy-resource-rise{0%{opacity:0;translate:0 5px}18%,68%{opacity:1}100%{opacity:0;translate:0 -22px}}
@keyframes joy-whisper-in{0%{opacity:0}20%,65%{opacity:1}100%{opacity:0}}
@keyframes joy-score-ink{0%{clip-path:inset(0 100% 0 0)}100%{clip-path:inset(0)}}
@keyframes joy-score-soft{from{opacity:.65}to{opacity:1}}
.joy-reduced .joy-wash,.joy-reduced .joy-paper,.joy-reduced .joy-resource,.joy-reduced .joy-whisper{animation:joy-static 450ms ease-out both!important;translate:none!important;rotate:none!important;scale:none!important}
.joy-reduced .joy-wash{transform:none!important}.joy-reduced .joy-paper,.joy-reduced .joy-whisper{transform:translateX(-50%)!important}.joy-reduced .joy-petal,.joy-reduced .joy-paw{display:none!important}
@keyframes joy-static{0%{opacity:.25}25%,80%{opacity:.95}100%{opacity:0}}
@media(prefers-reduced-motion:reduce){.joy-cue-rotate{animation:joy-touch 140ms ease-out!important;transform:none!important}.joy-layer .joy-petal,.joy-layer .joy-paw{display:none!important}.joy-layer .joy-wash,.joy-layer .joy-paper,.joy-layer .joy-resource{animation:joy-static 450ms ease-out both!important;translate:none!important;rotate:none!important;scale:none!important}.joy-layer .joy-wash{transform:none!important}.joy-layer .joy-paper{transform:translateX(-50%)!important}.joy-score-reveal{animation:joy-score-soft 250ms ease-out both!important}}
@media(max-width:600px){.joy-paper{width:272px;padding:11px 19px 13px}.joy-paper-title{font-size:18px}.joy-paper-opening .joy-paper-title,.joy-paper-finish .joy-paper-title{font-size:20px}.joy-paper-subtitle{font-size:10px}.joy-resource{font-size:11px;max-width:220px;white-space:normal}}
.joy-flight{position:absolute;transform-origin:0 0;animation:joy-tile-flight 380ms cubic-bezier(.23,.62,.37,1) both;filter:drop-shadow(0 5px 4px #55604424)}
.joy-flight>svg{display:block;width:100%;height:100%;overflow:visible}
@keyframes joy-tile-flight{0%{opacity:.75;transform:translate(0,0) scale(1)}80%{opacity:.65}100%{opacity:0;transform:translate(var(--joy-flight-x),var(--joy-flight-y)) scale(var(--joy-flight-sx),var(--joy-flight-sy))}}
/* Result paint occupies the decorative heading only; totals and parks remain exposed. */
.joy-paper-result{padding:5px 15px 7px;width:260px;gap:3px}.joy-paper-result .joy-paper-kicker,.joy-paper-result .joy-paper-subtitle{display:none}.joy-paper-result .joy-paper-title{font-size:17px;line-height:1.45}.joy-paper-result::before,.joy-paper-result::after{top:3px;font-size:24px}.joy-paper-result .joy-achievement-chips{max-height:40px}.joy-paper-result .joy-achievement-chip{font-size:10px;padding:1px 5px}
.joy-paw{width:21px;height:24px;color:#b58b4d;filter:none;font-size:0}.joy-paw:nth-child(2n){color:#a9815b}.joy-paw>svg{display:block;width:100%;height:100%;overflow:visible}
.joy-wash-place:not(.joy-wash-shaped),.joy-wash-dog:not(.joy-wash-shaped){border:0;background:radial-gradient(ellipse,#edce7926,transparent 73%);box-shadow:0 0 8px #dbc47e20}
/* Clip the pigment to the confirmed cell union. Never scale a shape beyond its cells. */
.joy-wash-shaped{border:0;border-radius:0;box-shadow:none;transform:none!important;animation:joy-cell-pigment var(--joy-duration) ease-out both}
.joy-wash-shaped.joy-wash-place{background:radial-gradient(ellipse at 20% 35%,#f6e4a43b,transparent 70%),radial-gradient(ellipse at 72% 65%,#d1c68c35,transparent 72%)}
.joy-wash-shaped.joy-wash-dog{background:radial-gradient(ellipse at 27% 33%,#efd18b50,transparent 72%),radial-gradient(ellipse at 75% 70%,#ccab6545,transparent 78%)}
@keyframes joy-cell-pigment{0%{opacity:0}23%{opacity:.8}68%{opacity:.5}100%{opacity:0}}
/* A single watercolor paw beside first place. Static until a confirmed finish. */
.result-park-label{min-width:0;overflow:hidden;text-overflow:ellipsis}
.result-winner-paw{position:relative;display:inline-flex;align-items:center;justify-content:center;width:28px;height:30px;flex:0 0 28px;color:#b58046;isolation:isolate;transform:rotate(-9deg);pointer-events:none}
.result-winner-paw::before{content:"";position:absolute;inset:0 -2px;border-radius:47% 53% 58% 42%;background:radial-gradient(ellipse at 38% 48%,#e9c27670,transparent 72%),radial-gradient(ellipse at 68% 65%,#d5a66c45,transparent 68%);z-index:-1}
.result-winner-paw svg{display:block;width:25px;height:28px;overflow:visible}
.result-welcome{font-size:15px;font-weight:700;color:#966438;margin:0 0 12px;line-height:1.6}
.joy-winner-stamp{animation:joy-winner-press 2000ms cubic-bezier(.2,.65,.3,1) both}
.joy-winner-stamp::before{animation:joy-winner-bloom 2000ms ease-out both}
.joy-winner-soft{animation:joy-winner-fade 350ms ease-out both}
@keyframes joy-winner-press{0%{opacity:0;transform:translateY(-5px) scale(1.45) rotate(-15deg)}10%{opacity:1;transform:translateY(1px) scale(.92) rotate(-9deg)}22%,100%{opacity:1;transform:translateY(0) scale(1) rotate(-9deg)}}
@keyframes joy-winner-bloom{0%,8%{opacity:0;scale:.65}35%{opacity:1;scale:1.18}100%{opacity:1;scale:1}}
@keyframes joy-winner-fade{from{opacity:.25}to{opacity:1}}
html[data-gentle-motion="true"] .joy-winner-stamp{animation:joy-winner-fade 350ms ease-out both;transform:rotate(-9deg)}
html[data-gentle-motion="true"] .joy-winner-stamp::before{animation:none}
@media(prefers-reduced-motion:reduce){.joy-winner-stamp{animation:joy-winner-fade 350ms ease-out both;transform:rotate(-9deg)}.joy-winner-stamp::before{animation:none}}
@media(max-width:740px){.result-winner-paw{width:24px;height:26px;flex-basis:24px}.result-winner-paw svg{width:22px;height:24px}}
.joy-ribbon {
  position: absolute;
  width: 5px;
  height: 16px;
  border-radius: 2px;
  opacity: 0;
  animation: joy-ribbon-burst 2400ms cubic-bezier(.23,1,.32,1) both;
}
.joy-full-park { z-index: 1; }
@keyframes joy-ribbon-burst {
  0% { transform: translate(0,0) rotate(0); opacity: 0; }
  8% { opacity: .9; }
  32% { transform: translate(calc(var(--burst-x) * .65),var(--burst-up)) rotate(calc(var(--burst-spin) * .4)); opacity: .9; }
  100% { transform: translate(var(--burst-x),var(--burst-down)) rotate(var(--burst-spin)); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .joy-ribbon { display: none; }
}
