/* Fazenda viva: uma cena em três camadas de profundidade (fundo menor, frente maior).
   Posições em % da cena; tamanhos em --u (1cqw no retrato, limitado pela altura). */
.play-fazenda .toy-scene{--u:min(1cqw,.5cqh);background:#c9ecfb;overflow:clip}
.play-fazenda button{position:absolute;padding:0;margin:0;border:0;background:transparent;touch-action:manipulation;-webkit-tap-highlight-color:transparent;cursor:pointer}
.play-fazenda svg{display:block;width:100%;height:100%;overflow:visible}

/* céu */
.fz-sun{left:39%;top:6.5%;width:calc(24*var(--u));aspect-ratio:1;z-index:2}
.fz-cloud{z-index:2;aspect-ratio:2}
.fz-cloud-a{left:2%;top:8%;width:calc(36*var(--u))}
.fz-cloud-b{left:64%;top:8%;width:calc(26*var(--u))}
.fz-rain{position:absolute;top:70%;width:5px;height:12px;border-radius:50% 50% 50% 50%/60% 60% 40% 40%;background:#5ab3dc;pointer-events:none}

/* fundo: celeiro, árvore, cerca, ninho */
.fz-barn{left:-3%;top:15%;width:calc(50*var(--u));aspect-ratio:200/170;z-index:3}
.fz-doorway{position:absolute;left:34%;top:57.6%;width:32%;height:41.2%;perspective:300px}
.fz-leaf{position:absolute;top:0;width:50%;height:100%;backface-visibility:visible}
.fz-leaf-l{left:0;transform-origin:0 50%}.fz-leaf-r{right:0;transform-origin:100% 50%}
.fz-bird{position:absolute;left:15%;top:20%;width:70%;aspect-ratio:1;scale:.6;z-index:-1}
.fz-bird .art-img{width:100%;height:100%;object-fit:contain}
.fz-tree{right:-9%;top:10%;width:calc(52*var(--u));aspect-ratio:3/4;z-index:3}
.fz-tree-top{transform-origin:60px 100px;animation:fz-sway 5s ease-in-out infinite alternate}
.fz-apple{position:absolute;width:13%;aspect-ratio:1;translate:-50% -50%;pointer-events:none;z-index:2}
.fz-apple .art-img{width:100%;height:100%;object-fit:contain}
.fz-fence{position:absolute;left:0;right:0;top:34%;height:7%;z-index:3;pointer-events:none}
.fz-nest{position:absolute;left:25%;bottom:49%;width:calc(17*var(--u));aspect-ratio:100/56;z-index:5;pointer-events:none}
.fz-egg{position:absolute;bottom:40%;width:36%;aspect-ratio:1;translate:-50% 0}
.fz-egg .art-img{width:100%;height:100%;object-fit:contain}

/* frente: lama e lago */
.fz-mud{position:absolute;left:-6%;bottom:4%;width:58%;aspect-ratio:200/64;z-index:7;pointer-events:none}
.fz-mudbubble{position:absolute;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff8 0 18%,#c99b70 30%,#9a6a42 75%);box-shadow:0 0 0 2px #6e4a2e}
.fz-pond{position:absolute;left:42%;right:-6%;bottom:-4%;height:32%;z-index:7;pointer-events:none}
.fz-ripple{position:absolute;left:30%;top:40%;width:22%;aspect-ratio:3;border:2px solid #ffffffaa;border-radius:50%;animation:fz-ripple 3.6s ease-out infinite}
.fz-ripple-2{left:62%;top:62%;animation-delay:-1.8s}
.fz-ring{position:absolute;width:30%;aspect-ratio:3;translate:-50% -50%;border:3px solid #fff;border-radius:50%;pointer-events:none}
.fz-ring-pad{left:50%;top:50%;width:110%}
.fz-drop{position:absolute;width:9px;height:9px;border-radius:50%;background:#bfe9fa;box-shadow:0 0 0 1.5px #5ab3dc;pointer-events:none}
.fz-pad{position:absolute;aspect-ratio:2;z-index:8}
.fz-pad-a{left:70%;bottom:15%;width:calc(27*var(--u))}
.fz-pad-b{left:56%;bottom:1%;width:calc(30*var(--u));z-index:9}

/* bichos */
.fz-animal{width:calc(var(--w)*var(--u));aspect-ratio:1}
.fz-animal::before{content:"";position:absolute;inset:-8%}
.fz-body{position:absolute;inset:0;display:block;transform-origin:50% 92%}
.fz-pic{position:absolute;inset:0;transform-origin:50% 92%;animation:fz-breathe 2.6s ease-in-out infinite alternate}
.fz-shadow{position:absolute;left:20%;right:20%;bottom:5%;height:8%;border-radius:50%;background:#2f5a2a;opacity:.18}
.fz-chicken{--w:25;left:3%;bottom:50%;z-index:5}
.fz-dog{--w:26;left:39%;bottom:49%;z-index:5}
.fz-cat{--w:23;left:60%;bottom:57%;z-index:4}
.fz-cat .fz-shadow{display:none}
.fz-goat{--w:25;left:76%;bottom:48%;z-index:5}
.fz-cow{--w:34;left:-1%;bottom:29%;z-index:6}
.fz-horse{--w:36;left:30%;bottom:30%;z-index:6}
.fz-sheep{--w:32;left:67%;bottom:28%;z-index:6}
.fz-pig{--w:40;left:3%;bottom:6%;z-index:8}
.fz-pig .fz-pic{clip-path:inset(0 0 9% 0)}
.fz-pig .fz-shadow{display:none}
.fz-duck{--w:31;left:41%;bottom:13%;z-index:8}
.fz-duck .fz-pic{clip-path:inset(0 0 20% 0);animation:fz-float 2.4s ease-in-out infinite alternate}
.fz-duck .fz-shadow{bottom:17%;left:12%;right:12%;height:9%;background:#2f8fc0;opacity:.35}
.fz-frog{--w:26;left:calc(50% - 13*var(--u));bottom:30%;z-index:2}
.fz-frog .fz-shadow{display:none}
.fz-dog .fz-pic{animation-duration:1.8s}.fz-cat .fz-pic{animation-duration:3.1s}.fz-goat .fz-pic{animation-duration:2.2s}
.fz-cow .fz-pic{animation-duration:3s}.fz-horse .fz-pic{animation-duration:2.8s}.fz-sheep .fz-pic{animation-duration:2.4s}
.fz-pig .fz-pic{animation-duration:2s}.fz-frog .fz-pic{animation-duration:1.6s}

/* carinhas no topo */
.fz-faces{position:absolute;left:50%;top:1.2%;translate:-50% 0;z-index:12;display:flex;gap:min(.9cqw,5px);padding:4px 7px;border-radius:999px;background:#ffffff8c;pointer-events:none}
.fz-face{width:min(7.6cqw,34px);aspect-ratio:1;border-radius:50%;background:#fff;display:grid;place-items:center;overflow:hidden;box-shadow:inset 0 0 0 2px #e2d6c4}
.fz-face .art-img{width:118%;height:118%;object-fit:contain;filter:grayscale(1) opacity(.38);transition:filter .3s}
.fz-face.on{background:#fff4c9;box-shadow:inset 0 0 0 2.5px #f2b92f}
.fz-face.on .art-img{filter:none}

@keyframes fz-breathe{from{transform:scale(1,1)}to{transform:scale(1.02,1.035)}}
@keyframes fz-float{from{transform:translateY(0) rotate(-2deg)}to{transform:translateY(-4%) rotate(2deg)}}
@keyframes fz-sway{from{rotate:-2deg}to{rotate:2deg}}
@keyframes fz-ripple{from{scale:.4;opacity:.9}to{scale:1.6;opacity:0}}

/* Paisagem: tudo numa faixa larga; bichos medidos pela altura. */
@container (orientation:landscape){
  .play-fazenda .toy-scene>*{--u:.95cqh}
  .fz-faces{top:2%}
  .fz-face{width:min(4cqw,8.5cqh)}
  .fz-sun{right:auto;left:44%;top:12%;width:calc(16*var(--u))}
  .fz-cloud-a{left:4%;top:12%;width:calc(26*var(--u))}
  .fz-cloud-b{left:62%;top:16%;width:calc(22*var(--u))}
  .fz-barn{left:-1%;top:12%;width:calc(44*var(--u))}
  .fz-tree{right:2%;top:2%;width:calc(44*var(--u))}
  .fz-fence{top:38%;height:9%}
  .fz-nest{left:9%;bottom:45%;width:calc(13*var(--u))}
  .fz-chicken{--w:21;left:1%;bottom:45%}
  .fz-dog{--w:22;left:22%;bottom:44%}
  .fz-cat{--w:20;left:33%;bottom:52%}
  .fz-goat{--w:22;left:82%;bottom:42%}
  .fz-cow{--w:36;left:14%;bottom:4%}
  .fz-horse{--w:40;left:30%;bottom:6%}
  .fz-sheep{--w:33;left:47%;bottom:24%;z-index:5}
  .fz-mud{left:-2%;bottom:1%;width:18%}
  .fz-pig{--w:32;left:0;bottom:3%}
  .fz-pond{left:58%;right:-2%;bottom:-4%;height:44%}
  .fz-duck{--w:26;left:64%;bottom:12%}
  .fz-pad-a{left:80%;bottom:22%;width:calc(24*var(--u))}
  .fz-pad-b{left:72%;bottom:1%;width:calc(26*var(--u))}
}
@media (prefers-reduced-motion:reduce){.play-fazenda .fz-pic,.fz-tree-top,.fz-ripple{animation:none!important}}
