/* Lava-Pedras (scripts/features/wash-game.js): Montar Palavra e Fono. Imagem do fundo do dono (1672×941) inteira no meio da tela,
   com ela mesma desfocada em volta; pedras, lama e mangueira (imagens do dono) e o jato (canvas) por cima, em % do quadro. */
.sf-root[data-screen="wash"] {height:100%}
.trainer:has(.sf-root[data-screen="wash"]) {overflow:hidden}
.trainer:has(.sf-root[data-screen="wash"]) > .choices.sf-host {height:100%}
.wg-stage {position:relative;min-height:0;border-radius:24px;overflow:hidden;container-type:size;background:#e4864a;user-select:none;-webkit-user-select:none;touch-action:none;-webkit-touch-callout:none}
.wg-stage::before {content:"";position:absolute;inset:-40px;background:url("../assets/stimuli/lava-pedras/fundo-v1.webp") center/cover;filter:blur(18px) saturate(1.1)}
.wg-scene {position:absolute;left:50%;top:50%;width:min(100cqw,calc(100cqh * 1672 / 941));aspect-ratio:1672/941;transform:translate(-50%,-50%);container-type:size}
.wg-scene img {-webkit-user-drag:none;user-select:none}
.wg-art {position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none}
.wg-hose {position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none;overflow:visible;z-index:3}
.wg-tube {fill:none;stroke:#5cc14a;stroke-width:24;stroke-linecap:round}
.wg-tube.is-line {stroke:#2b4a12;stroke-width:34}
.wg-tube.is-shine {stroke:#b6f29a;stroke-width:6;opacity:.8;transform:translate(-5px,-5px)}
.wg-gun {position:absolute;z-index:4;height:auto;display:block;pointer-events:none;filter:drop-shadow(0 .8cqh .6cqh rgba(80,40,10,.3))}
.wg-scene.is-washing .wg-gun {animation:wg-recoil .09s linear infinite alternate}
@keyframes wg-recoil {to {translate:-1.5px 1px}}
.wg-jet {position:absolute;inset:0;width:100%;height:100%;display:block;pointer-events:none;z-index:5}

/* Pedras (imagens do dono) com a letra; a lama (imagem do dono) cobre e sai de cima para baixo (--wash = quanto já saiu, em %). */
.wg-stone {position:absolute;z-index:2;cursor:pointer;touch-action:none}
.wg-rock {position:absolute;inset:0;width:100%;height:100%;object-fit:contain;display:block;pointer-events:none;filter:drop-shadow(0 .9cqh .5cqh rgba(90,40,10,.28))}
.wg-letter {position:absolute;inset:14% 0 4%;display:grid;place-items:center;font:900 calc(var(--lh) * .5cqh)/1 "Nunito","Baloo 2","Arial Rounded MT Bold",system-ui,sans-serif;color:#3a1870;text-shadow:0 .3cqh 0 rgba(255,255,255,.45);pointer-events:none}
.wg-mud {position:absolute;left:-9%;top:-14%;width:118%;height:126%;object-fit:fill;display:block;pointer-events:none;
  -webkit-mask-image:linear-gradient(to bottom,transparent calc(var(--wash,0) * 1.14% - 6%),#000 calc(var(--wash,0) * 1.14% + 6%));
  mask-image:linear-gradient(to bottom,transparent calc(var(--wash,0) * 1.14% - 6%),#000 calc(var(--wash,0) * 1.14% + 6%));
  transform:translateY(calc(var(--wash,0) * .06%))}
.wg-stone.is-washing .wg-mud, .wg-pile.is-washing .wg-mud {animation:wg-wobble .12s linear infinite alternate}
@keyframes wg-wobble {to {translate:0 .2cqh}}
.wg-stone.is-next {animation:wg-call 1.2s ease-in-out infinite}
@keyframes wg-call {0%,100% {transform:translateY(0)} 50% {transform:translateY(-2.5%)}}
.wg-stone.is-washing, .wg-pile.is-washing {animation:none}
.wg-stone.is-hint > .wg-rock, .wg-stone.is-hint > .wg-mud {animation:wg-hint .8s ease-in-out 2}
@keyframes wg-hint {50% {filter:drop-shadow(0 0 1.6cqw #fff36b) brightness(1.15)}}
.wg-stone.is-wrong, .wg-pile.is-wrong {animation:wg-shake .4s}
@keyframes wg-shake {20%,60% {translate:-3% 0} 40%,80% {translate:3% 0}}
.wg-stone.is-shine > .wg-rock {animation:wg-shine .8s ease-out}
.wg-stone.is-shine .wg-letter {animation:wg-pop .5s cubic-bezier(.3,1.6,.5,1)}
@keyframes wg-shine {0% {filter:brightness(1.5) drop-shadow(0 0 2cqw #fff)} 100% {filter:drop-shadow(0 .9cqh .5cqh rgba(90,40,10,.28))}}
@keyframes wg-pop {0% {transform:scale(.6)} 100% {transform:none}}

/* Pedra grande: a figura em cima dela, embaixo da lama; lavada, a figura aparece. */
.wg-pile {position:absolute;z-index:1;cursor:pointer;touch-action:none}
.wg-pile-base {position:absolute;inset:0;width:100%;height:100%;object-fit:fill;display:block;pointer-events:none;filter:drop-shadow(0 1.2cqh .8cqh rgba(90,40,10,.3))}
.wg-picture {position:absolute;display:grid;place-items:center;padding:3%;border:.35cqw solid #3a1870;border-radius:12%;background:#fff;box-shadow:0 1cqh 2.5cqh rgba(60,30,120,.25);cursor:pointer}
.wg-picture {box-sizing:border-box;overflow:hidden;min-width:0;min-height:0}
.wg-picture :is(span,div,figure,picture) {width:100%;height:100%;min-width:0;min-height:0;margin:0;padding:0;display:grid;place-items:center;overflow:hidden}
.wg-picture img {width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;display:block}
.wg-mud.is-big {left:-9%;top:-12%;width:118%;height:126%}
.wg-pile.is-next {animation:wg-call 1.2s ease-in-out infinite}
.wg-pile.is-open .wg-picture {animation:wg-reveal .6s cubic-bezier(.3,1.6,.5,1)}
@keyframes wg-reveal {0% {transform:scale(.7)} 100% {transform:none}}

/* Faixa da instrução (🔊 lê) e o botão da próxima palavra. */
.wg-say {position:absolute;z-index:6;left:50%;translate:-50% 0;display:flex;align-items:center;gap:2.4cqw;padding:0 3cqw 0 1cqw;border:.4cqw solid #3a1870;border-radius:999px;background:#fff7ee;color:#3a1870;font:800 3.6cqh/1.1 "Nunito",system-ui,sans-serif;white-space:nowrap;box-shadow:0 .8cqh 0 rgba(58,24,112,.25);cursor:pointer;text-align:left}
.wg-say i {flex:none;display:grid;place-items:center;width:7cqh;height:7cqh;border-radius:50%;background:#8a5ae0;font-style:normal;font-size:3.4cqh}
.wg-go {position:absolute;z-index:7;right:3%;top:4%;font-size:clamp(1rem,3.4cqh,1.6rem)}

/* Tela cheia: o palco na tela toda, sem margem nem cantos; a barra fica por cima (some com os botões escondidos). */
body.training-fullscreen:is([data-active-module="letterWord"],[data-active-module="speechFlashcards"]) .trainer:has(.sf-root[data-screen="wash"]) {padding:0!important}
body.training-fullscreen:is([data-active-module="letterWord"],[data-active-module="speechFlashcards"]) .choices.sf-host:has(.sf-root[data-screen="wash"]) {max-width:none;width:100%;margin:0}
body.training-fullscreen:is([data-active-module="letterWord"],[data-active-module="speechFlashcards"]) .sf-root[data-screen="wash"] {padding-top:0}
body.training-fullscreen:is([data-active-module="letterWord"],[data-active-module="speechFlashcards"]) .wg.sf-hunt.is-play.has-task {position:relative;grid-template-rows:minmax(0,1fr);gap:0}
body.training-fullscreen:is([data-active-module="letterWord"],[data-active-module="speechFlashcards"]) .wg.has-task > .sf-hunt-top {position:absolute;z-index:7;top:10px;left:12px}
body.training-fullscreen.controls-hidden:is([data-active-module="letterWord"],[data-active-module="speechFlashcards"]) .wg.has-task > .sf-hunt-top {display:none!important}
body.training-fullscreen:is([data-active-module="letterWord"],[data-active-module="speechFlashcards"]) .wg-stage {grid-row:1;border-radius:0}
