.water-home,.water-play { display:grid; justify-items:center; align-content:center; gap:12px; }
.water-cover {width:min(100%,760px); max-height:52vh; object-fit:cover; border-radius:20px;}
.water-play {background:linear-gradient(#fff6,#fff8),url('../illustrations/games/duong-nuoc-ve-vuon.webp') center/cover; padding:22px 8px; border-radius:18px;}
.water-board {width:min(calc(100% - 58px),46vh,410px); display:grid; grid-template-columns:repeat(var(--size),1fr); border:5px solid #79512e; border-radius:8px; background:#8a6846; box-shadow:0 4px 12px #273c2740;}
.water-tile {position:relative; aspect-ratio:1; padding:0; border:1px solid #bdd18b; background:#dee9aa; cursor:pointer; touch-action:manipulation;}
.water-tile:nth-child(even){background:#d0e2a0;}
.water-tile svg {display:block; width:100%; height:100%;}
.water-tile .channel{stroke:#ad803f;}
.water-tile.wet .channel{stroke:#219dd1;}
.water-tile.stopped,.water-tile:focus-visible{outline:4px solid #d7661f; outline-offset:-4px; z-index:1;}
.water-play {container-type:inline-size; grid-template-columns:minmax(0,1fr);}
.water-board {--scene-size:clamp(48px,16cqw,168px); width:min(calc(100% - 2 * var(--scene-size)),52vh,440px);}
.water-tile.inlet::before,.water-tile.outlet::after {
  content:''; position:absolute; top:50%; transform:translateY(-50%);
  width:var(--scene-size); aspect-ratio:1; background:center / contain no-repeat;
  filter:drop-shadow(0 3px 2px #30491f88); pointer-events:none;
}
.water-tile.inlet::before {right:100%;background-image:url('spring.webp');}
.water-tile.outlet::after {left:100%;background-image:url('garden.webp');}
.water-message{margin:0; padding:5px 12px; border-radius:12px; background:#fffbe9; color:#28492a; text-align:center;}

.water-play {background:radial-gradient(ellipse at top,#fff9e4,#e7efd9 75%);padding-block:clamp(32px,6%,70px);}
.water-board {border:6px ridge #ad854c;box-shadow:0 10px 22px #24312180,0 0 0 3px #543e29;}
.water-tile,.water-tile:nth-child(even) {border:0;background:radial-gradient(ellipse at 23% 18%,#d2dc91,transparent 62%),linear-gradient(142deg,#aac272,#91ac61);box-shadow:inset 0 0 0 1.5px #546c3c99;}
.water-tile:nth-child(3n) {background:linear-gradient(145deg,#c2d78c,#96b36c);}
.water-tile .stream,.water-tile .ripple {visibility:hidden;}
.water-tile.wet .stream {visibility:visible;stroke-dasharray:100 100;animation:water-fill 230ms linear both;}
.water-tile.wet.reverse .stream {animation-name:water-fill-back;}
.water-tile.wet .ripple {stroke-dasharray:8 26;animation:water-glint .85s linear 230ms infinite;}
.water-tile.wet.reverse .ripple {animation-direction:reverse;}
@keyframes water-fill {from{stroke-dashoffset:100}to{stroke-dashoffset:0}}
@keyframes water-fill-back {from{stroke-dashoffset:-100}to{stroke-dashoffset:0}}
@keyframes water-glint {from{visibility:visible;stroke-dashoffset:34}to{visibility:visible;stroke-dashoffset:0}}
.water-tile.outlet.wet::after {filter:drop-shadow(0 0 8px #fff3ae) saturate(1.25);}
.water-message {box-shadow:0 3px 8px #24312144;}
@media(prefers-reduced-motion:reduce){.water-tile.wet .stream{animation:none;stroke-dashoffset:0}.water-tile.wet .ripple{animation:none;}}

.water-tile.inlet::after,.water-tile.outlet::before {
  position:absolute; top:calc(50% + var(--scene-size) * .38);
  width:var(--scene-size); text-align:center; border-radius:12px;
  font:700 clamp(11px,1.6cqw,16px)/1.5 system-ui,sans-serif;
  color:white; pointer-events:none; z-index:2;
}
.water-tile.inlet::after {right:100%;content:'Suối →';background:#126079;}
.water-tile.outlet::before {left:100%;content:'→ Vườn';background:#376137;}
