@media(max-width:600px){
  html,body{max-width:100%;overflow-x:clip;overscroll-behavior-y:none}
  .sampah-page,.sampah-intro,.game-layout,.ocean-shell,.leaderboard-card{box-sizing:border-box;width:100%;max-width:100%;min-width:0}
  .sampah-page{padding:12px}
  .sampah-intro{gap:10px;margin-bottom:12px}
  .sampah-intro>*,.game-layout>*{max-width:100%;min-width:0}
  .sampah-intro>div>p:last-child{margin-bottom:4px;font-size:.9rem}
  .score-strip{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));width:100%;max-width:100%;border-radius:15px}
  .score-strip span{min-width:0;padding:9px 3px;overflow:hidden;text-align:center;font-size:.58rem;letter-spacing:.02em}
  .score-strip strong{font-size:1.05rem}
  .ocean-shell,canvas{height:clamp(420px,64svh,540px)!important;min-height:0!important}
  .ocean-shell{contain:layout paint;border-width:2px;border-radius:18px}
  canvas{display:block;width:100%!important;max-width:100%;contain:strict}
  .game-overlay{box-sizing:border-box;max-width:100%;min-width:0;padding:18px;justify-content:flex-start;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
  .game-overlay>*{flex:0 0 auto;max-width:100%}
  .game-overlay input,.game-overlay button,.daily-swim-card,.collect-preview{box-sizing:border-box;width:100%;max-width:100%;min-width:0}
  .collect-preview span{min-width:0;overflow-wrap:anywhere}
  .ocean-shell:before,.ambient-bubbles{display:none!important}
}
@media(max-width:600px) and (display-mode:standalone){
  .game-site-header{position:relative}
  .sampah-page{padding-top:10px;padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}
  .sampah-intro h1{font-size:2.65rem}
  .ocean-shell,canvas{height:clamp(410px,61svh,520px)!important}
  .game-site-footer{padding-bottom:max(24px,env(safe-area-inset-bottom))!important}
}
@media(max-width:380px){
  .sampah-intro h1{font-size:2.45rem}
  .score-strip span{font-size:.5rem;letter-spacing:0}
  .score-strip strong{font-size:.95rem}
  .game-overlay{padding:14px}
  .ocean-shell,canvas{height:clamp(390px,61svh,480px)!important}
}
