body {
  font-family: system-ui, sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding: 24px;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

#difficulty-picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

#difficulty-picker button {
  padding: 8px 24px;
  font-size: 1em;
  cursor: pointer;
}

/* Same specificity issue as #game-area[hidden] below: startGame() sets this element's hidden
   attribute via JS after a level is picked, and the ID selector above would otherwise win. */
#difficulty-picker[hidden] {
  display: none;
}

#game-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* An ID selector outranks the UA stylesheet's [hidden] { display: none }, so without this
   override #game-area { display: flex } above would make the element visible even while the
   hidden attribute is set. */
#game-area[hidden] {
  display: none;
}

.score-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
}

.score-row p {
  margin: 0;
}

.score-row button {
  padding: 4px 12px;
  font-size: 0.85em;
  cursor: pointer;
}

#game-canvas {
  background: #1e293b;
  border: 2px solid #334155;
  touch-action: none;
  max-width: 100%;
}

#status {
  min-height: 1.5em;
  font-weight: bold;
  color: #f87171;
}

.hint {
  max-width: 400px;
  text-align: center;
  font-size: 0.85em;
  color: #94a3b8;
}
