* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(ellipse at top, #3a2a1d 0%, #201510 70%);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  color: #f4ead9;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
  width: 100%;
  max-width: 640px;
}

h1 {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: 0.1em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.controls label {
  font-size: 0.95rem;
}

.controls select,
.controls button {
  font-size: 0.95rem;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #6b4a2d;
  background: #4a3221;
  color: #f4ead9;
  cursor: pointer;
}

.controls button {
  background: linear-gradient(180deg, #8a5a30, #6b4321);
  font-weight: bold;
}

.controls button:active {
  transform: translateY(1px);
}

.status {
  font-size: 1.05rem;
  min-height: 1.4em;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.board-wrapper {
  position: relative;
  width: min(92vw, 560px);
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 0 0 6px #2c1c10;
  overflow: hidden;
}

#board,
#confetti {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#board {
  cursor: pointer;
}

#confetti {
  pointer-events: none;
}
