:root {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #f6f2e8;
  background: radial-gradient(circle at 50% 0%, #26305c, #141a2e 60%);
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0 auto; padding: 14px; max-width: 860px; text-align: center; }
h1 { margin: .2em 0 .1em; font-size: clamp(1.6rem, 5vw, 2.4rem); letter-spacing: .02em; }
.tagline { margin: 0 auto 12px; max-width: 620px; opacity: .85; }
.hud {
  display: flex; flex-wrap: wrap; gap: 8px 14px; justify-content: center; align-items: center;
  margin: 10px auto; font-weight: 600;
}
.stat { background: #232c4a; border: 1px solid #3b4a72; padding: 7px 12px; border-radius: 999px; }
.stat strong { color: #ffcf40; font-variant-numeric: tabular-nums; }
.hint { min-height: 2.6em; margin: 6px auto 10px; max-width: 640px; font-size: .95rem; color: #bfc9e4; }
.frame { position: relative; }
#throw {
  position: absolute; right: 16px; bottom: 16px; width: 96px; height: 96px;
  border-radius: 50%; padding: 0; background: #a9744f; color: #fff8ec;
  font-size: .82rem; line-height: 1.15; letter-spacing: .04em;
  box-shadow: 0 6px 0 #6d4a30, 0 10px 20px rgba(0, 0, 0, .4);
  touch-action: manipulation;
}
#throw[hidden] { display: none; }
#throw:active { transform: translateY(3px); box-shadow: 0 3px 0 #6d4a30; }
@media (max-width: 480px) {
  #throw { width: 82px; height: 82px; right: 10px; bottom: 10px; font-size: .74rem; }
}
canvas {
  display: block; width: 100%; height: auto; border-radius: 18px;
  background: #1b2238; touch-action: none; user-select: none;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .45);
}
button {
  font: inherit; font-weight: 600; padding: 10px 18px; border: 0; border-radius: 12px;
  cursor: pointer; background: #ffcf40; color: #1b2238;
}
button:active { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: default; }
#sound { background: #38466e; color: #e8eeff; padding: 7px 12px; border-radius: 999px; }
section { margin: 26px auto 20px; max-width: 520px; }
h2 { font-size: 1.2rem; margin-bottom: 10px; }
form { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 16px 0 10px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: #bfc9e4; }
input {
  font: inherit; padding: 10px; width: 7em; border-radius: 10px;
  border: 1px solid #3b4a72; background: #1b2238; color: #fff; text-align: center;
}
ol { text-align: left; line-height: 1.9; max-width: 420px; margin: 0 auto 12px; padding-left: 1.4em; }
@media (max-width: 480px) {
  body { padding: 8px; }
  .tagline { font-size: .9rem; }
  .hint { font-size: .85rem; }
  .stat { padding: 6px 10px; font-size: .9rem; }
}
@media (orientation: landscape) and (max-height: 560px) {
  body { padding: 6px 10px; }
  h1 { font-size: 1.15rem; margin: 0; }
  .tagline, .hint { display: none; }
  .hud { margin: 4px auto; gap: 6px 8px; font-size: .8rem; }
  .stat { padding: 4px 9px; }
  #sound { padding: 4px 9px; }
  canvas { width: auto; height: calc(100svh - 92px); max-width: 100%; margin: 0 auto; }
}
