:root{
  --bg:#f1fff7;
  --ink:#0a3526;
  --accent:#0a5a3a;
  --accent-2:#dff7ea;
}

*{box-sizing:border-box}
html,body{height:100%;}
body{
  margin:0;
  font-family:Rubik,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:var(--bg);
  color:var(--ink);
  -webkit-tap-highlight-color: transparent;
}

#game-root{
  position:fixed;
  inset:0;
  display:grid;
  place-items:center;
  overflow:hidden;
}

#game{
  width:100vw;
  height:100vh;
  touch-action:none; /* we handle gestures */
  display:block;
  background:linear-gradient(180deg, #eafff2 0%, #f7fff8 60%, #ffffff 100%);
}

#hud{
  position:fixed;
  top:12px;left:12px;right:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  pointer-events:auto;
  user-select:none;
}

#score{
  font-weight:700;
  font-size:20px;
  background:var(--accent-2);
  padding:6px 10px;
  border-radius:10px;
}

#highScore{
  margin-left:auto;
  margin-right:8px;
  font-weight:700;
}

#pauseBtn{
  border:none;
  background:var(--accent);
  color:white;
  width:40px;height:40px;
  border-radius:10px;
  font-size:18px;
}

#overlay{
  position:fixed;
  inset:0;
  display:grid;
  place-items:center;
  background:rgba(10,53,38,0.2);
  backdrop-filter:saturate(1.1) blur(2px);
}

#overlay.hidden{ display:none; }

.panel{
  width:min(92vw,460px);
  background:#fff;
  border:2px solid var(--accent-2);
  border-radius:16px;
  padding:18px 18px 14px;
  text-align:center;
  box-shadow:0 10px 30px rgba(10,53,38,0.1);
}

.panel h2{margin:4px 0 8px 0}
.tips{opacity:.8; font-size:14px; margin:8px 0 14px}

.primary{
  border:none;
  background:var(--accent);
  color:#fff;
  font-weight:700;
  border-radius:12px;
  padding:10px 16px;
  font-size:16px;
}

@media (min-width:800px){
  #score{font-size:22px}
}
