.substitutions.jamnik-screen { padding: 0; overflow: hidden; }
.dog-park {
    width: 100%; height: 100%; position: relative; overflow: hidden; isolation: isolate;
    background: radial-gradient(ellipse at 50% 0%, #f8fce9 0%, transparent 62%), linear-gradient(150deg, #e6f4d8, #cce8b8);
    touch-action: none; user-select: none; -webkit-user-select: none; cursor: crosshair;
    -webkit-tap-highlight-color: transparent; outline-offset: -4px;
}
.dog-park::before {
    content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .20;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='170' height='125' viewBox='0 0 170 125'%3E%3Cg fill='none' stroke='%237ba95d' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M18 96l-5-7m5 7v-10m0 10 6-7M123 25l-5-7m5 7V15m0 10 6-7'/%3E%3C/g%3E%3Cg fill='%23fff8da'%3E%3Ccircle cx='75' cy='38' r='3'/%3E%3Ccircle cx='145' cy='91' r='3'/%3E%3C/g%3E%3C/svg%3E");
}
.dog-park-heading { z-index: 1; position: absolute; top: clamp(14px, 4%, 38px); left: 12px; right: 12px; text-align: center; color: #355a30; pointer-events: none; }
.dog-park-heading h1 { margin: 0 0 8px; font-size: clamp(23px, 3vw, 42px); letter-spacing: -.025em; }
.dog-park-heading p { margin: 0 auto; max-width: 600px; font-size: clamp(13px, 1.6vw, 20px); line-height: 1.4; color: #52714a; }
.dog-position { position: absolute; left: 0; top: 0; width: min(clamp(96px, 22vw, 260px), 75%, var(--dog-max-width, 260px)); aspect-ratio: 280 / 150; pointer-events: none; z-index: 2; will-change: transform; }
.dog-art { width: 100%; height: 100%; overflow: visible; display: block; transform: scaleX(var(--dog-direction, 1)); }
.dog-shadow { position: absolute; bottom: 8%; left: 15%; width: 72%; height: 13%; border-radius: 50%; background: #537942; opacity: .22; filter: blur(3px); }
.dog-tail { transform-box: view-box; transform-origin: 62px 80px; animation: dog-wag 1.05s ease-in-out infinite alternate; }
.dog-ear { transform-box: view-box; transform-origin: 211px 34px; }

.dog-eye { transform-box: fill-box; transform-origin: center; animation: dog-blink 4.7s infinite; }
.dog-leg { transform-box: view-box; }
.dog-leg-far-a { transform-origin: 80px 99px; }
.dog-leg-far-b { transform-origin: 190px 99px; }
.dog-leg-near-a { transform-origin: 75px 100px; }
.dog-leg-near-b { transform-origin: 186px 100px; }
.dog-position.is-walking .dog-leg { animation: dog-step .34s ease-in-out infinite alternate; }
.dog-position.is-walking .dog-leg-far-a, .dog-position.is-walking .dog-leg-near-b { animation-direction: alternate-reverse; }
.dog-position.is-walking .dog-bounce { animation: dog-bob .34s ease-in-out infinite; }
.dog-position.is-walking .dog-ear { animation: dog-ear-bounce .42s ease-in-out infinite alternate; }
.dog-position.is-walking .dog-head { animation: dog-head-bob .42s ease-in-out infinite alternate; }
.dog-position.is-walking .dog-tail { animation-duration: .28s; }
.dog-target { position: absolute; left: 0; top: 0; width: 42px; height: 42px; margin: -21px; border: 2px dashed #6c9856; border-radius: 50%; display: grid; place-items: center; color: #5e8a4c; font-size: 19px; pointer-events: none; z-index: 1; background: #f5ffe6a0; }
.dog-target[hidden] { display: none; }
.dog-no-js { position: absolute; bottom: 10px; left: 10px; }
@keyframes dog-wag { from { transform: rotate(-10deg); } to { transform: rotate(15deg); } }
@keyframes dog-step { from { transform: rotate(-18deg); } to { transform: rotate(18deg); } }
@keyframes dog-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes dog-ear-bounce { from { transform: rotate(-3deg); } to { transform: rotate(7deg); } }
@keyframes dog-head-bob { from { transform: rotate(-2deg) translateY(0); } to { transform: rotate(2deg) translateY(1px); } }
@keyframes dog-blink { 0%, 45%, 49%, 100% { transform: scaleY(1); } 47% { transform: scaleY(.1); } }
@media (prefers-reduced-motion: reduce) { .dog-position * { animation: none !important; } }

.substitutions.jamnik-screen, .dog-park { touch-action: none; -ms-touch-action: none; overscroll-behavior: none; }
.dog-park { -webkit-touch-callout: none; }
.dog-park > * { pointer-events: none; }
.dog-park [hidden] { display: none !important; }
.dog-target { width: 30px; height: 30px; margin: -15px; border: 2px solid #639649; background: #ffffff60; }
/* Zamknięty pysk jest jednolitą częścią głowy. Szczęka pojawia się tylko przy jedzeniu lub gryzieniu. */
.dog-jaw { transform-box: view-box; transform-origin: 225px 70px; opacity: 0; }
.dog-position.is-biting .dog-jaw { animation: dog-chomp .19s ease-in-out infinite alternate; }
.dog-position.is-eating .dog-jaw { animation: dog-chomp .16s ease-in-out infinite alternate; }
.dog-position.is-digging .dog-leg-near-b, .dog-position.is-digging .dog-leg-far-b { animation: dog-step .12s ease-in-out infinite alternate; }
.dog-position.is-digging .dog-bounce { animation: dog-bob .24s ease-in-out infinite; }
.dog-position.is-stretching .dog-bounce { transform-origin: 65% 80%; animation: dog-stretch 1.5s ease-in-out; }
.dog-position.is-sleeping .dog-art { transform: scaleX(var(--dog-direction,1)) scaleY(.65) translateY(28%); }
.dog-position.is-sleeping .dog-eye { animation: none; transform: scaleY(.12); }
.dog-position.is-sleeping .dog-tail { animation: none; }
.dog-sleep { position: absolute; top: -8%; left: 50%; color: #355a30; font-size: clamp(18px, 2vw, 30px); font-weight: bold; z-index: 3; }
@keyframes dog-chomp { from { transform: rotate(0deg); opacity: 0; } 30% { opacity: 1; } to { transform: rotate(23deg); opacity: 1; } }
@keyframes dog-stretch { 50% { transform: scale(1.13,.77); } }
@media (prefers-reduced-motion: reduce) { .dog-position * { animation: none !important; } }

/* Jamnik 4: wyłącznie warstwa efektów oraz animacje bezczynności. */
.dog-effects { position:absolute; inset:0; z-index:0; pointer-events:none; }
.dog-effects *, .dog-butterfly, .dog-butterfly * { pointer-events:none; }
.dog-paw, .dog-dust { position:absolute; opacity:0; }
.dog-paw { width:20px; height:20px; margin:-10px; background: center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%235b7e42'%3E%3Cpath d='M12 9c-3 0-4 3-6 5-4 5 1 8 6 6 5 2 10-1 6-6-2-2-3-5-6-5Z'/%3E%3Cellipse cx='4' cy='8' rx='2.5' ry='3.5' transform='rotate(-25 4 8)'/%3E%3Cellipse cx='9' cy='4' rx='2.5' ry='3.5'/%3E%3Cellipse cx='15' cy='4' rx='2.5' ry='3.5'/%3E%3Cellipse cx='20' cy='8' rx='2.5' ry='3.5' transform='rotate(25 20 8)'/%3E%3C/g%3E%3C/svg%3E"); transform:rotate(var(--effect-angle,0deg)); }
.dog-paw.is-visible { animation:dog-paw-fade 3s linear both; }
.dog-dust { width:34px; height:23px; margin:-12px -17px; background:radial-gradient(circle at 22% 64%,#baaa87 0 24%,transparent 26%),radial-gradient(circle at 53% 40%,#baaa87 0 33%,transparent 35%),radial-gradient(circle at 82% 65%,#baaa87 0 26%,transparent 28%); }
.dog-dust.is-visible { animation:dog-dust-fade .65s ease-out both; }
@keyframes dog-paw-fade { 0% { opacity:.34; } 45% { opacity:.24; } 100% { opacity:0; } }
@keyframes dog-dust-fade { 0% { opacity:.6; transform:scale(.6); } 100% { opacity:0; transform:translateY(-13px) scale(2); } }
.dog-butterfly { position:absolute; top:0; left:0; z-index:3; width:2px; height:2px; margin:-1px; }
.dog-wing { position:absolute; top:-15px; width:20px; height:24px; background:radial-gradient(circle at 45% 45%,#fff4c9 0 18%,#f2b553 21% 60%,#bb6f39 80%); border:1px solid #a96736; }
.dog-wing-left { right:1px; border-radius:75% 65% 35% 65%; transform-origin:right center; animation:dog-flutter .16s ease-in-out infinite alternate; }
.dog-wing-right { left:1px; border-radius:65% 75% 65% 35%; transform-origin:left center; animation:dog-flutter .16s ease-in-out infinite alternate; }
.dog-butterfly-body { position:absolute; left:-2px; top:-12px; width:4px; height:22px; background:#755232; border-radius:50%; }
@keyframes dog-flutter { from { transform:scaleX(1); } to { transform:scaleX(.22); } }
.dog-position.is-walking .dog-leg, .dog-position.is-walking .dog-bounce, .dog-position.is-walking .dog-ear { animation-duration:calc(.34s / var(--dog-pace,1)); }
.dog-head { transform-box:view-box; transform-origin:195px 85px; }
.dog-position.is-sniffing .dog-head { animation:dog-sniff .75s ease-in-out infinite; }
.dog-position.is-scratching .dog-leg-near-a { animation:dog-scratch .23s ease-in-out infinite alternate; }
.dog-position.is-scratching .dog-bounce { animation:dog-scratch-body 1.9s ease-in-out; transform-origin:50% 80%; }
.dog-position.is-spinning .dog-art { animation:dog-spin .9s ease-in-out 2; }
@keyframes dog-sniff { 0%,100% { transform:rotate(5deg); } 50% { transform:rotate(25deg) translateY(3px); } }
@keyframes dog-scratch { from { transform:rotate(-30deg); } to { transform:rotate(-95deg) translateY(-10px); } }
@keyframes dog-scratch-body { 0%,100% { transform:rotate(0); } 20%,80% { transform:rotate(-7deg); } }
@keyframes dog-spin { 0%,100% { transform:scaleX(var(--dog-direction,1)); } 25%,75% { transform:scaleX(0.13); } 50% { transform:scaleX(calc(-1 * var(--dog-direction,1))); } }
@media (prefers-reduced-motion: reduce) { .dog-effects *, .dog-butterfly * { animation:none !important; } }

/* Jamnik 5: dekoracje nie przechwytują dotyku. */
.dog-paw.is-visible { animation-duration:11s; }
.dog-sausage { position:absolute; left:0; top:0; width:clamp(35px,5vw,62px); margin-left:clamp(-31px,-2.5vw,-17.5px); margin-top:-17px; z-index:1; pointer-events:none; }
.dog-sausage svg { display:block; width:100%; overflow:visible; }
.dog-sausage.is-eaten svg { animation:dog-food-eaten .65s ease-in both; }
@keyframes dog-food-eaten { 0%,35% { transform:scale(1); opacity:1; } 100% { transform:scale(.1); opacity:0; } }
.dog-position.is-eating .dog-head { animation:dog-sniff .55s ease-in-out infinite; }
.dog-position.is-eating .dog-jaw { animation:dog-chomp .16s ease-in-out infinite alternate; }
.dog-position.is-detecting .dog-head { animation:dog-sniff .45s ease-in-out infinite; }
.dog-position.is-sulking .dog-art { transform:scaleX(var(--dog-direction,1)) rotate(0deg) scaleY(.86) translateY(10%); transition:transform .12s ease; }
.dog-position.is-sulking .dog-leg-near-a, .dog-position.is-sulking .dog-leg-far-a { transform:rotate(-55deg) translateY(-4px); }
.dog-position.is-sulking .dog-tail { animation:none; transform:rotate(-23deg); }
.dog-position.is-sulking .dog-head { transform:rotate(12deg); }
.dog-flower { position:absolute; width:38px; height:40px; margin:-32px -19px; opacity:0; pointer-events:none; }
.dog-flower::before { content:''; position:absolute; bottom:0; left:4px; width:30px; height:11px; border-radius:50%; background:#997b51; box-shadow:inset 0 2px 3px #755c39; }
.dog-flower::after { content:''; position:absolute; inset:0 0 4px; background:center bottom / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 38 38'%3E%3Cpath d='M19 35V16M19 31Q7 19 8 29Q13 34 19 31M19 28Q31 16 31 25Q29 31 19 28' stroke='%235b9346' stroke-width='2.6' fill='%237eb45b' stroke-linecap='round'/%3E%3Cg fill='%23fff7de' stroke='%23d7b662' stroke-width='.7'%3E%3Cellipse cx='19' cy='5' rx='4' ry='6'/%3E%3Cellipse cx='19' cy='19' rx='4' ry='6'/%3E%3Cellipse cx='12' cy='12' rx='6' ry='4'/%3E%3Cellipse cx='26' cy='12' rx='6' ry='4'/%3E%3C/g%3E%3Ccircle cx='19' cy='12' r='4.4' fill='%23efb943'/%3E%3C/svg%3E"); transform-origin:center bottom; transform:scaleY(0); }
.dog-flower.is-visible { animation:dog-flower-life 22s linear both; }
.dog-flower.is-visible::after { animation:dog-flower-grow 22s linear both; }
@keyframes dog-flower-life { 0%,86% { opacity:1; } 100% { opacity:0; } }
@keyframes dog-flower-grow { 0%,5% { transform:scaleY(0); } 13%,100% { transform:scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .dog-flower.is-visible { animation:dog-flower-life 22s linear both !important; } .dog-flower.is-visible::after { animation:none !important; transform:scaleY(1); } }
