*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: #ffffff;
  color: #111111;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 6vw, 44px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sub {
  margin: 8px 0 24px;
  color: #8a8a8a;
  font-size: 16px;
}

.stage {
  position: relative;
  width: 100%;
  max-width: 640px;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 5;
  touch-action: none;
  cursor: crosshair;
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.88);
  cursor: pointer;
}

.overlay[hidden] { display: none; }

.msg {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.hint {
  margin: 8px 0 0;
  max-width: 320px;
  color: #8a8a8a;
  font-size: 13px;
  line-height: 1.45;
}

.score {
  margin: 16px 0 0;
  color: #8a8a8a;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.score b { color: #111111; font-weight: 600; }
.sep { margin: 0 6px; }
