/* Os pets atravessando o túnel de banho: usados na página inicial e nas telas de login.
   Tudo preso a .scene, porque o sistema também tem classes como .head.
   Os mesmos pets correm em duas camadas iguais: a suja aparece só à esquerda do chuveiro
   e a limpa só à direita, então cada pet troca de visual exatamente ao passar pela água. */
:root { --hero-bg: #f7c948; --hero-ink: #12363f; --foam: #ffffff; --water: #0b6680; --bubble: rgba(255, 255, 255, .75); --pet-size: clamp(116px, 14.5vw, 200px); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --hero-bg: #123a47; --hero-ink: #f5f1dc; --foam: #cfe9ef; --water: #0a2a34; --bubble: rgba(207, 233, 239, .45); } }
:root[data-theme="dark"] { --hero-bg: #123a47; --hero-ink: #f5f1dc; --foam: #cfe9ef; --water: #0a2a34; --bubble: rgba(207, 233, 239, .45); }
.scene-slot { min-height: calc(var(--pet-size) * .9 + 76px); }
.scene { position: relative; height: calc(var(--pet-size) * .9 + 76px); overflow: hidden; margin-top: 4px; }
.scene .faixa { position: absolute; inset: 0; }
.scene .sujo { clip-path: inset(0 50% 0 0); filter: saturate(.5) brightness(.93) sepia(.22); }
.scene .limpo { clip-path: inset(0 0 0 50%); }
.scene .lama { mix-blend-mode: multiply; }
.scene .poeira { fill: rgba(123, 90, 60, .35); transform-box: fill-box; transform-origin: 100% 50%; animation: poeira .5s ease-out infinite; }
.scene .brilhos path { transform-box: fill-box; transform-origin: 50% 50%; animation: brilho 1.4s ease-in-out infinite alternate; }
.scene .brilhos path:nth-child(2) { animation-delay: -.5s; }
.scene .brilhos path:nth-child(3) { animation-delay: -1s; }
/* o túnel: arco, chuveiros, água caindo e a plaquinha */
.scene .tunel { position: absolute; left: 50%; bottom: 30px; z-index: 3; width: calc(var(--pet-size) * 1.12); height: calc(var(--pet-size) * .9 + 18px); transform: translateX(-50%); border: 9px solid var(--water); border-bottom: 0; border-radius: 44px 44px 0 0; background: linear-gradient(rgba(189, 230, 242, .28), rgba(189, 230, 242, .12)); pointer-events: none; }
.scene .tunel::before { content: ""; position: absolute; top: 0; left: 14%; right: 14%; height: 12px; background: radial-gradient(circle at 50% 0, var(--water) 0 8px, transparent 9px) 0 0 / 33.34% 100% repeat-x; }
.scene .chuva { position: absolute; inset: 12px 6px 0; background-color: rgba(189, 230, 242, .22); background-image: repeating-linear-gradient(180deg, rgba(255, 255, 255, .9) 0 7px, transparent 7px 30px); background-size: 100% 30px; -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 19px); mask-image: repeating-linear-gradient(90deg, #000 0 2px, transparent 2px 19px); opacity: .55; animation: chover .55s linear infinite; }
.scene .placa { position: absolute; top: -26px; left: 50%; transform: translateX(-50%); padding: 1px 16px 3px; border-radius: 99px; background: var(--water); color: #ffffff; font: 800 1rem/1.4 var(--display); white-space: nowrap; }
.scene .marco { position: absolute; bottom: 6px; color: #e5f4f7; font: 600 .8rem/1.2 var(--body); white-space: nowrap; }
.scene .marco::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.scene .m1 { left: 18%; }
.scene .m2 { left: 68%; }
.scene .m2::before { background: #8fe0a5; }
/* o aviso que o tutor recebe quando o pet sai pronto */
.scene .zap { position: absolute; top: 8px; right: max(16px, 5%); z-index: 4; display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 16px 16px 4px 16px; background: #ffffff; color: #12363f; box-shadow: 0 4px 0 rgba(18, 54, 63, .14); font: 600 .9rem/1.2 var(--body); }
.scene .zap-ic { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: #1f9d55; color: #ffffff; }
.scene .zap-ic .i { width: 15px; height: 15px; stroke-width: 3; }
.scene .zap-msgs { display: grid; }
.scene .zap-msgs span { grid-area: 1 / 1; opacity: 0; animation: zap 15s ease-in-out infinite; }
.scene .zap-msgs span:nth-child(2) { animation-delay: 5s; }
.scene .zap-msgs span:nth-child(3) { animation-delay: 10s; }
.scene .i { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.scene .foam { position: absolute; inset: auto 0 0; height: 34px; background: var(--water); }
.scene .foam::before { content: ""; position: absolute; left: 0; right: 0; top: -30px; height: 34px; background-color: transparent; background-image: linear-gradient(transparent 22px, var(--foam) 22px), radial-gradient(circle at 26px 24px, var(--foam) 22px, transparent 23px), radial-gradient(circle at 34px 28px, var(--foam) 15px, transparent 16px), radial-gradient(circle at 60px 30px, var(--foam) 28px, transparent 29px); background-size: 100% 100%, 97px 34px, 61px 34px, 143px 34px; background-repeat: no-repeat, repeat-x, repeat-x, repeat-x; }
.scene .runner { position: absolute; left: 0; bottom: 34px; width: var(--pet-size); z-index: 2; animation: correr var(--tempo, 20s) linear infinite; animation-delay: var(--inicio, 0s); }
.scene .pet { display: block; width: 100%; height: auto; overflow: visible; }
.scene .hop { animation: pular var(--passo, .44s) ease-in-out infinite alternate; transform-origin: 50% 100%; }
.scene .leg, .scene .ear, .scene .tail, .scene .head, .scene .tongue { transform-box: fill-box; }
.scene .leg { transform-origin: 50% 6%; animation: perna var(--passo, .44s) ease-in-out infinite alternate; }
.scene .leg.f2 { animation-delay: -.07s; }
.scene .leg.h1, .scene .leg.h2 { animation-direction: alternate-reverse; }
.scene .head { transform-origin: 20% 80%; animation: cabeca var(--passo, .44s) ease-in-out infinite alternate; }
.scene .ear { transform-origin: 50% 10%; animation: orelha var(--passo, .44s) ease-in-out infinite alternate; }
.scene .tail { transform-origin: 90% 90%; animation: rabo .24s ease-in-out infinite alternate; }
.scene .tongue { transform-origin: 50% 0; animation: lingua .22s ease-in-out infinite alternate; }
.scene .r1 { --tempo: 26s; --inicio: -22s; --passo: .17s; bottom: 46px; scale: .84; z-index: 1; }
.scene .r2 { --tempo: 19s; --inicio: -9s; --passo: .2s; bottom: 46px; scale: .8; z-index: 1; }
.scene .r6 { --tempo: 23s; --inicio: -3s; --passo: .16s; bottom: 46px; scale: .78; z-index: 1; }
.scene .r3 { --tempo: 23s; --inicio: -14s; --passo: .24s; }
.scene .r4 { --tempo: 17s; --inicio: -2s; --passo: .22s; bottom: 30px; }
.scene .r5 { --tempo: 21s; --inicio: -19s; --passo: .19s; bottom: 28px; }
.scene .r7 { --tempo: 28s; --inicio: -7s; --passo: .23s; bottom: 26px; }
.scene .bubble { position: absolute; bottom: 44px; width: var(--d, 18px); height: var(--d, 18px); border-radius: 50%; border: 2px solid var(--bubble); background: radial-gradient(circle at 32% 30%, var(--bubble) 0 18%, transparent 20%); z-index: 3; animation: bolha var(--b, 7s) ease-in infinite; animation-delay: var(--bi, 0s); }
.scene .b1 { left: calc(50% - var(--pet-size) * .5); --d: 14px; --b: 4s; --bi: -1s; }
.scene .b2 { left: calc(50% - var(--pet-size) * .3); --d: 24px; --b: 5s; --bi: -3s; }
.scene .b3 { left: calc(50% - var(--pet-size) * .1); --d: 12px; --b: 3.5s; --bi: -2s; }
.scene .b4 { left: calc(50% + var(--pet-size) * .12); --d: 20px; --b: 4.5s; --bi: -1.2s; }
.scene .b5 { left: calc(50% + var(--pet-size) * .34); --d: 15px; --b: 4s; --bi: -2.6s; }
.scene .b6 { left: calc(50% + var(--pet-size) * .52); --d: 18px; --b: 5.5s; --bi: -4s; }
.scene .b7 { left: calc(50% - var(--pet-size) * .62); --d: 10px; --b: 3.8s; --bi: -.5s; }
.scene .b8 { left: 8%; --d: 16px; --b: 7.5s; --bi: -6s; }
.scene .b9 { left: 92%; --d: 12px; --b: 6s; --bi: -2.5s; }
@keyframes chover { to { background-position: 0 30px; } }
@keyframes poeira { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.3) translateX(-6px); opacity: .2; } }
@keyframes brilho { from { transform: scale(.4) rotate(0deg); opacity: .5; } to { transform: scale(1.1) rotate(45deg); opacity: 1; } }
@keyframes zap { 0% { opacity: 0; transform: translateY(6px); } 4%, 30% { opacity: 1; transform: none; } 34%, 100% { opacity: 0; transform: translateY(-4px); } }
@keyframes correr { from { transform: translateX(calc(var(--pet-size) * -1.2)); } to { transform: translateX(100vw); } }
@keyframes pular { from { transform: translateY(2px) rotate(1.5deg); } to { transform: translateY(-12px) rotate(-3deg); } }
@keyframes perna { from { transform: rotate(-36deg); } to { transform: rotate(36deg); } }
@keyframes cabeca { from { transform: rotate(-3deg); } to { transform: rotate(4deg); } }
@keyframes orelha { from { transform: rotate(-10deg); } to { transform: rotate(16deg); } }
@keyframes rabo { from { transform: rotate(-16deg); } to { transform: rotate(18deg); } }
@keyframes lingua { from { transform: scaleY(.85) rotate(-6deg); } to { transform: scaleY(1.1) rotate(8deg); } }
@keyframes bolha { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(calc(var(--pet-size) * -.55)) translateX(12px) scale(1.1); opacity: 0; } }
.scene .scene-pause { position: absolute; right: max(12px, env(safe-area-inset-right, 0px)); bottom: 2px; z-index: 4; display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 2px 10px; border: 0; border-radius: 99px; background: transparent; color: #e5f4f7; font: 500 .82rem var(--body); cursor: pointer; }
.scene .scene-pause:hover { text-decoration: underline; }
.scene .scene-pause:focus-visible { outline: 3px solid #e5f4f7; outline-offset: 1px; }
.scene .ic-tocar { display: none; }
.scene.parado .ic-tocar { display: inline-block; }
.scene.parado .ic-pausa { display: none; }
.scene.parado, .scene.parado * { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  .scene, .scene * { animation-play-state: paused !important; }
  .scene .scene-pause { display: none; }
  .scene .zap-msgs span:first-child { animation: none; opacity: 1; }
}
@media (max-width: 620px) { .scene .zap { display: none; } .scene .m1 { left: 8%; } .scene .m2 { left: 64%; } }
@media (max-width: 620px) { .scene .scene-pause span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } }
