* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #111;
  color: #fff;
}

#app {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

canvas {
  display: block;
}

#overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.top-panel {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

.top-panel h1 {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.25;
}

.top-panel p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #e5e5e5;
}

.status {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 96px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.72);
  font-size: 13px;
  line-height: 1.45;
  color: #f2f2f2;
  pointer-events: auto;
}

.bottom-panel {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  pointer-events: auto;
}

button {
  appearance: none;
  border: none;
  border-radius: 12px;
  padding: 11px 8px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: #2563eb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.34);
}

button:active {
  transform: translateY(1px);
}

#btnPause {
  background: #374151;
}

#btnReset {
  background: #f97316;
}

#btnScaleUp,
#btnScaleDown {
  background: #16a34a;
}

#btnRotate {
  background: #7c3aed;
}

.notice {
  position: absolute;
  right: 12px;
  top: 112px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.9);
  color: white;
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
}

.sp {
  display: none;
}

@media (max-width: 480px) {
  .sp {
    display: block;
  }

  .top-panel h1 {
    font-size: 15px;
  }

  .top-panel p,
  .status {
    font-size: 12px;
  }

  button {
    font-size: 12px;
    padding: 10px 6px;
  }
}