* {
  box-sizing: border-box;
  margin:0;
  padding: 0;
}

html, body {
  height:100%;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto,
    "Hiragino Kaku Gothic ProN","Noto Sans JP","Yu Gothic", sans-serif;
  background:linear-gradient(#87ceeb,#DBEFFF);
  padding: 20px;
  display:flex;
  justify-content:center;
  align-items:center;
}

.game-wrap {
  max-width:100%;
  width:800px;
  background:#f7f9fc;
  border-radius:12px;
  position:relative;
  box-shadow:0 10px 30px rgba(0,0,0,0.12);
  overflow:hidden;
}

header {
  padding:12px 18px;
  display:flex;
  justify-content: space-between;
  align-items:center;
}

header h1 {
  color:#333;
  font-size: 16px;
}

.controls{font-size:14px;color:#555;}

#gameCanvas {
  background:linear-gradient(#FFF,#eef6ff);
  display:block;
  width:100%;
}

.overlay {
  position:absolute;
  inset:0;
  display:flex;
  justify-content:center;
  align-items:center;
  pointer-events:none;
}

.panel {
  pointer-events:auto;
  background:rgba(255,255,255,.95);
  padding:18px;
  border-radius:10px;
  text-align:center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

button {
  background:#2B8AEF;
  border: none;
  cursor:pointer;
  padding:10px 14px;
  border-radius:8px;
  color:#fff;
  font-weight:600;
}

.hud {
  position:absolute;
  top:10px;
  right:14px;
  background:rgba(255,255,255, .9);
  padding:6px 10px;
  border-radius:8px;
  font-weight:700;
}

.hint {
  font-size:13px;
  margin-top:8px;
  color:#666;
}

@media (max-width:420px) {
  header h1{
    font-size:14px;
  }
}
