* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: system-ui, sans-serif;
  background: #fef9c3;
  color: #422006;
  text-align: center;
}

:focus-visible {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
}

.hud {
  width: 100%;
  padding: 0.75rem;
  background: #a16207;
  color: #fefce8;
}

.hud h1 {
  margin: 0;
  font-size: 1.25rem;
}

.hud__score {
  margin: 0.25rem 0 0;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem;
}

#gallows {
  width: 140px;
  height: auto;
  stroke: #422006;
  stroke-width: 4;
  stroke-linecap: round;
  fill: none;
}

.word {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.35rem;
  font-variant-numeric: tabular-nums;
}

.status {
  min-height: 1.5rem;
  margin: 0;
  font-weight: 600;
}

.letters {
  display: grid;
  grid-template-columns: repeat(8, minmax(30px, 36px));
  gap: 5px;
  justify-content: center;
}

.letter {
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: #a16207;
  color: #fefce8;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.letter:hover:not(:disabled) {
  background: #ca8a04;
}

.letter:disabled {
  opacity: 0.35;
  cursor: default;
}

.button {
  padding: 0.5rem 1.5rem;
  border: 0;
  border-radius: 8px;
  background: #422006;
  color: #fefce8;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.button:hover {
  background: #575034;
}

.hint {
  margin: 0;
  max-width: 320px;
  color: #92600e;
  font-size: 0.875rem;
}
