:root {
  --bg: #f8f9fa; --card:#fff; --ink:#333;
  --accent:#0d6efd; --save:#e03131; --goal:#2f9e44;
}

* { box-sizing: border-box; }
body { margin:0; background:var(--bg); color:var(--ink);
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
}

.pk-app {
  max-width:760px; margin:18px auto; padding:16px;
  background:var(--card); border-radius:14px;
  box-shadow:0 6px 20px rgba(0,0,0,.06);
  overscroll-behavior: contain; /* ← スクロール抑止 */
}

h3 { margin:0 0 10px; }
#pkCanvas {
  width:100%; height:auto; display:block;
  background:linear-gradient(#e9ecef,#f8f9fa);
  touch-action: none;       /* ← これでスマホフリック無効 */
  -ms-touch-action: none;
}

.row { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:10px; }
.row > * { margin:4px 0; }
button {
  padding:8px 14px; border:none; border-radius:999px;
  background:var(--accent); color:#fff; font-weight:600; cursor:pointer;
}
button:disabled { opacity:.5; cursor:not-allowed; }

.pill { padding:6px 10px; background:#eef2ff; border-radius:999px; font-size:12px; }
.legend { display:flex; gap:6px; align-items:center; font-size:12px; opacity:.8; }
.dot { width:10px; height:10px; border-radius:50%; }
.dot.goal { background:var(--goal); }
.dot.save { background:var(--save); }

#status { margin-top:8px; font-size:14px; min-height:1.4em; }
#result { margin-top:6px; font-weight:700; }
.tips { margin-top:8px; font-size:12px; opacity:.8; line-height:1.6; }