* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden;
  background: #7fc8f0;
  touch-action: none;
  user-select: none; -webkit-user-select: none;
  font-family: -apple-system, "Segoe UI", Verdana, sans-serif;
}
#game {
  display: block; width: 100vw; height: 100vh; touch-action: none;
}
.overlay {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 20%, rgba(255,255,255,0.35), rgba(120,190,90,0.55));
  z-index: 10;
}
.overlay.hidden { display: none; }
.panel {
  background: rgba(255,255,255,0.92);
  border-radius: 24px;
  padding: 28px 34px;
  max-width: 420px;
  width: 92vw;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  max-height: 92vh;
  overflow-y: auto;
}
.panel h1 { margin: 0 0 4px; font-size: 1.6em; color: #3b6b2a; }
.sub { color: #557a45; margin-bottom: 14px; font-size: 0.95em; }
.bigbtn {
  display: block; width: 100%;
  font-size: 1.3em; font-weight: bold;
  padding: 16px; margin: 10px 0;
  border: none; border-radius: 16px;
  background: linear-gradient(180deg,#ffd76a,#ffb545);
  color: #5a3a00;
  cursor: pointer;
  box-shadow: 0 4px 0 #d98f1f;
}
.bigbtn:active { transform: translateY(3px); box-shadow: 0 1px 0 #d98f1f; }
.bigbtn.secondary { background: linear-gradient(180deg,#bfe89a,#8fcf63); color: #23440f; box-shadow: 0 4px 0 #5f9a34; }
.row { display: flex; justify-content: space-between; padding: 6px 4px; color: #3b6b2a; font-weight: 600; }
.settings { margin-top: 12px; border-top: 1px solid #dde; padding-top: 10px; }
.settingRow { display: flex; align-items: center; justify-content: space-between; margin: 10px 0; }
.settingRow label { font-weight: 600; color: #3b5a2a; font-size: 0.9em; }
input[type=range] { width: 140px; }
.segmented { display: flex; border-radius: 10px; overflow: hidden; border: 1px solid #9c9; }
.segmented button {
  border: none; background: #eef8e6; padding: 6px 8px; font-size: 0.75em; cursor: pointer; color: #345;
}
.segmented button.active { background: #7fc85a; color: white; font-weight: bold; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background-color: #ccc; border-radius: 26px; transition: 0.2s; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.2s; }
input:checked + .slider { background-color: #7fc85a; }
input:checked + .slider:before { transform: translateX(20px); }
.hint { font-size: 0.72em; color: #789; margin-top: 14px; line-height: 1.4; }
