/* のぼのぼダイノ（試作）：空は パステルの グラデ（canvas は 透明で、うしろの この グラデが 見える） */
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  font-family: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Yu Gothic UI", sans-serif;
}
body {
  background: linear-gradient(to bottom, #9fd8f5 0%, #c9e8f7 45%, #fde9d4 80%, #fbd9c4 100%);
}
#stage { position: fixed; inset: 0; }
#cv { display: block; width: 100%; height: 100%; touch-action: none; }

/* いまの 高さ */
#height {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: #4a3b2a;
  font-size: 28px;
  font-weight: 800;
  pointer-events: none;
}
#msg {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  color: #e0703a;
  font-size: 32px;
  font-weight: 800;
  pointer-events: none;
  white-space: nowrap;
}

/* 画面下の 大きい ボタン 3つ（← → ジャンプ） */
#pad {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 12px;
  padding: 12px max(24px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  touch-action: none;
}
.pad-btn {
  position: relative;
  overflow: hidden;
  height: 88px;
  flex: 1;
  border: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 5px 0 rgba(90, 70, 50, 0.25);
  color: #4a3b2a;
  font: inherit;
  font-size: 40px;
  font-weight: 800;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.pad-btn.on { transform: translateY(4px); box-shadow: 0 1px 0 rgba(90, 70, 50, 0.25); background: #fff3c4; }
#jump { flex: 1.6; font-size: 30px; background: rgba(255, 220, 160, 0.92); }
#jump .label { position: relative; }
/* ため：下から オレンジが たまる（--charge は 0〜1） */
#jump .charge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--charge, 0) * 100%);
  background: #ff9d5c;
}

/* ?debug=1 の ときだけ：手触りの 定数を その場で かえる スライダー */
#debug {
  position: absolute;
  top: max(8px, env(safe-area-inset-top));
  left: 8px;
  width: 200px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  color: #333;
  touch-action: auto;
}
#debug label { display: block; margin: 4px 0; }
#debug input { width: 100%; }
#debug .fps { font-weight: 700; }
