.word-shell {
  max-width: 720px;
}

.word-heading {
  background: linear-gradient(135deg, var(--orange) 0 50%, var(--green) 50%);
  font-size: 21px;
}

.word-entry {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.word-entry label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.word-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
}

.word-input-row input {
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #46484d;
  border-radius: 8px;
  outline: 0;
  background: #101113;
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .05em;
}

.word-input-row input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(89, 170, 85, .13);
}

.word-input-row button {
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.word-entry .message {
  min-height: 0;
  margin: 8px 0 0;
}

.word-rule {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.word-entry .message:empty {
  margin: 0;
}

.attempts-wrap {
  margin-top: 17px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.attempts-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.attempts-heading h2 {
  margin: 0;
  font-size: 18px;
}

.attempts-heading span {
  color: var(--muted);
  font-size: 13px;
}

.attempts {
  display: grid;
  gap: 6px;
  max-height: 266px;
  overflow-y: auto;
}

.attempt {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: center;
  min-height: 47px;
  padding-left: 13px;
  overflow: hidden;
  border: 1px solid #35373b;
  border-radius: 8px;
  background: #141517;
}

.attempt-word {
  overflow: hidden;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: .02em;
  text-overflow: ellipsis;
}

.word-clue {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  align-self: stretch;
  padding: 0 9px;
  color: white;
}

.word-clue b {
  font-size: 23px;
}

.word-clue span {
  text-align: right;
  font-size: 12px;
  font-weight: 900;
}

.proximity-0 { background: #a84c24; }
.proximity-1 { background: #c55e28; }
.proximity-2 { background: #dc762f; }
.proximity-3 { background: #bc8b38; }
.proximity-4 { background: #7f9845; }
.proximity-5 { background: #58a14a; }
.proximity-6 { background: #2f873f; }
.proximity-win { background: var(--green-dark); }

.empty-state {
  margin: 16px 0;
  color: #74767b;
  text-align: center;
  font-size: 14px;
}

.letter-keyboard .key {
  max-width: 54px;
}

.letter-keyboard .key.action {
  max-width: 92px;
  padding-inline: 9px;
}

@media (max-width: 520px) {
  .word-input-row {
    grid-template-columns: 1fr;
  }

  .word-input-row button {
    height: 44px;
  }

  .attempts-wrap,
  .word-entry {
    padding: 12px;
  }

  .attempt {
    grid-template-columns: minmax(0, 1fr) 99px;
  }

  .keyboard-row {
    gap: 3px;
  }

  .letter-keyboard .key {
    height: 45px;
    padding: 0 2px;
    font-size: 13px;
  }
}

@media (max-height: 800px) {
  .game-heading {
    padding-block: 12px;
  }

  .attempts {
    max-height: 175px;
  }

  .letter-keyboard {
    margin-top: 10px;
  }
}
