*{box-sizing:border-box}
:root{font-family:system-ui,sans-serif;background:#e3f2ef;color:#19444e}
body{margin:0}
main{width:min(100%,540px);margin:auto;padding:11px 10px max(12px,env(safe-area-inset-bottom))}
header a{font-size:.78rem;font-weight:850;color:#27616a}h1{margin:4px 0 10px;font-size:1.5rem}
#bath{position:relative;height:clamp(330px,72dvh,680px);border-radius:17px;overflow:hidden;border:2px solid #43868e;background:#96c9c7}
canvas{display:block;width:100%;height:100%;touch-action:none}
#hud{display:flex;justify-content:space-between;position:absolute;inset:10px 8px auto;pointer-events:none}
#hud>*{font-size:.87rem;font-weight:900;padding:6px 8px;border-radius:8px;color:#16434e;background:#fef5d9}
#speech{position:absolute;top:49px;left:50%;transform:translateX(-50%);background:#e8fff3;color:#1e545b;border:1px solid #7ab5ae;border-radius:8px;padding:6px 8px;font-weight:850;white-space:nowrap;pointer-events:none}
#foamWrap{position:absolute;bottom:10px;left:10px;right:10px;color:white;background:#235765df;border-radius:8px;padding:8px 10px;pointer-events:none}
#foamWrap label,#waterControl{display:flex;align-items:center;gap:10px;font-weight:850;font-size:.86rem}
#foamWrap progress{flex:1;accent-color:#83d9d0}
#intro{position:absolute;inset:0;display:grid;place-items:center;background:#254e5680;padding:18px}
#intro[hidden]{display:none}
#intro div{background:#fff1d7;padding:17px;border-radius:13px;max-width:340px}
h2,p{margin:0 0 8px}p{line-height:1.46}
button{width:100%;min-height:46px;border:0;border-radius:8px;background:#2c6878;color:#fff;font:900 1rem system-ui}
#waterControl{background:#effaf6;margin-top:8px;padding:7px 9px;border-radius:7px}
#waterControl input{flex:1;min-width:0;accent-color:#387d89}
#power{width:78px;accent-color:#508ac0}
