html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  background-color: #fef9f4; /* พื้นหลังสีสว่างนวลตา */
  color: #1d1d1f;
  height: 100%;
  overflow: hidden;
}

h1 {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  font-size: 1.5rem;
  margin: 0;
  z-index: 10;
  color: #fc7404;
}

canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  touch-action: none;
}

.footer {
  position: absolute;
  bottom: 10px;
  width: 100%;
  text-align: center;
  color: #888;
  font-size: 0.9rem;
  z-index: 10;
}

.ui {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 11;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.ui button {
  padding: 10px 16px;
  font-size: 1rem;
  background-color: #fc7404;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  min-width: 120px;
  opacity: 0.85;
  transition: background-color 0.2s, opacity 0.2s;
}

.ui button:hover {
  opacity: 1;
  background-color: #f96b00;
}

#touchCountDisplay {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.95rem;
  color: white;
  background: #fc7404;
  padding: 6px 12px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  z-index: 10;
  font-weight: 600;
  white-space: nowrap;
  margin-top: 7rem;
}

@media (max-width: 500px) {
  h1 {
    font-size: 1.2rem;
    top: 50px;
  }

  .ui {
    flex-direction: column;
    bottom: 80px;
  }

  .ui button {
    min-width: unset;
    width: 80vw;
  }

  #touchCountDisplay {
    font-size: 0.9rem;
    padding: 6px 10px;
  }
}
.header-toggle {
  transition: opacity 0.3s ease;
}

.header-toggle.hidden {
  opacity: 0;
  pointer-events: none;
}
