body {
  margin: 0;
  overflow: hidden;
  font-family: system-ui, 'Malgun Gothic', sans-serif;
  background: #9fd8ff;
  touch-action: none;
  user-select: none;
}

canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#info {
  position: fixed;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.85);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.5;
  pointer-events: none;
  min-width: 180px;
}

#bar {
  width: 100%;
  height: 8px;
  margin-top: 4px;
  background: #ddd;
  border-radius: 4px;
  overflow: hidden;
}

#fill {
  height: 100%;
  width: 0%;
  background: #ffcc00;
  transition: width 0.3s;
}

#next {
  font-size: 13px;
  color: #333;
}

#reset {
  position: fixed;
  top: 12px;
  right: 12px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
  cursor: pointer;
}

#toolbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px;
  background: rgba(0, 0, 0, 0.6);
}

#toolbar button {
  flex: 0 0 auto;
  padding: 10px 12px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
  cursor: pointer;
}

#toolbar button.locked {
  background: #bfbfbf;
  color: #444;
  cursor: not-allowed;
}

#toolbar button.active {
  border-color: #ffcc00;
  background: #ffe9a0;
}

#flash {
  position: fixed;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.5s;
}

#flash.on {
  opacity: 0.95;
  transition: none;
}
