.ss-word-game {
  width: min(550px, 96%);
  margin: 8px auto 18px;
  padding: 14px;
  box-sizing: border-box;
  border: 1px solid #b8d5e6;
  border-radius: 6px;
  background: #f8fcff;
  color: #1d3340;
  font-family: Arial, Helvetica, sans-serif;
  text-align: left;
}

.ss-word-game-title {
  margin: 0 0 8px;
  color: #0b6d9a;
  font-size: 24px;
  line-height: 1.2;
  text-align: center;
}

.ss-word-game-status {
  min-height: 22px;
  margin: 8px 0 10px;
  font-size: 14px;
  font-weight: bold;
  color: #42515a;
  text-align: center;
}

.ss-word-game-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0 auto;
  max-width: 430px;
}

.ss-word-game-card {
  display: grid;
  grid-template-columns: 34px 1fr 76px;
  align-items: center;
  min-height: 42px;
  padding: 6px 8px;
  border: 1px solid #9fc5dd;
  border-radius: 5px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(22, 65, 90, 0.14);
  color: #134b68;
  cursor: grab;
  user-select: none;
}

.ss-word-game-card:active {
  cursor: grabbing;
}

.ss-word-game-card.is-dragging {
  opacity: 0.55;
}

.ss-word-game-card.is-correct {
  border-color: #66aa44;
  background: #f0ffe9;
}

.ss-word-game-card.is-wrong {
  border-color: #d86b5b;
  background: #fff3f0;
}

.ss-word-game-index {
  color: #7a8a95;
  font-size: 13px;
  font-weight: bold;
}

.ss-word-game-word {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 18px;
  font-weight: bold;
}

.ss-word-game-card-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.ss-word-game-card-buttons button,
.ss-word-game-actions button {
  border: 1px solid #88b9d6;
  border-radius: 5px;
  background: #e9f6ff;
  color: #13516f;
  font: bold 13px Arial, Helvetica, sans-serif;
  cursor: pointer;
}

.ss-word-game-card-buttons button {
  width: 32px;
  height: 28px;
  line-height: 1;
}

.ss-word-game-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.ss-word-game-actions button {
  min-width: 104px;
  min-height: 32px;
  padding: 6px 10px;
}

.ss-word-game-actions button:hover,
.ss-word-game-card-buttons button:hover {
  background: #d5efff;
}

.ss-word-game-hangman {
  max-width: 640px;
}

.ss-word-game-hangman-grid {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  align-items: start;
}

.ss-word-game-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 188px;
  border: 1px solid #b8d5e6;
  border-radius: 5px;
  background: #ffffff;
}

.ss-word-game-figure-count {
  font-size: 54px;
  font-weight: bold;
  color: #0b6d9a;
  line-height: 1;
}

.ss-word-game-figure-label {
  margin-top: 8px;
  color: #5f707a;
  font-size: 13px;
  font-weight: bold;
  text-align: center;
}

.ss-word-game-word-display {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 12px;
  min-height: 48px;
}

.ss-word-game-letter-slot {
  min-width: 30px;
  padding: 6px 4px;
  border-bottom: 3px solid #277ca6;
  color: #173746;
  font-size: 25px;
  font-weight: bold;
  text-align: center;
  text-transform: uppercase;
}

.ss-word-game-letter-space {
  min-width: 18px;
  border-bottom: 0;
}

.ss-word-game-keyboard {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 5px;
  max-width: 430px;
  margin: 0 auto;
}

.ss-word-game-keyboard button {
  min-height: 30px;
  border: 1px solid #88b9d6;
  border-radius: 5px;
  background: #e9f6ff;
  color: #13516f;
  font: bold 14px Arial, Helvetica, sans-serif;
  cursor: pointer;
}

.ss-word-game-keyboard button:disabled {
  border-color: #c7d5dc;
  background: #eef2f4;
  color: #8a989f;
  cursor: default;
}

.ss-word-game-misses {
  min-height: 20px;
  margin-top: 10px;
  color: #884235;
  font-size: 13px;
  text-align: center;
}

.ss-word-game-scramble {
  max-width: 590px;
  text-align: center;
}

.ss-word-game-scrambled {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 12px 0;
}

.ss-word-game-tile {
  min-width: 34px;
  min-height: 38px;
  padding: 5px 8px;
  border: 1px solid #88b9d6;
  border-radius: 5px;
  background: #ffffff;
  color: #134b68;
  font-size: 22px;
  font-weight: bold;
  line-height: 1.2;
  text-transform: uppercase;
  box-shadow: 0 1px 2px rgba(22, 65, 90, 0.14);
  cursor: pointer;
}

.ss-word-game-tile:disabled {
  background: #eef2f4;
  color: #9aa8af;
  cursor: default;
}

.ss-word-game-answer {
  display: block;
  width: min(360px, 92%);
  min-height: 34px;
  margin: 10px auto;
  padding: 6px 8px;
  border: 1px solid #9fc5dd;
  border-radius: 5px;
  color: #173746;
  font: bold 20px Arial, Helvetica, sans-serif;
  text-align: center;
  box-sizing: border-box;
}

.ss-word-game-hint {
  min-height: 22px;
  margin: 8px 0;
  color: #5f707a;
  font-size: 13px;
}

.ss-word-game-wordsearch {
  max-width: 640px;
}

.ss-word-game-search-layout {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 12px;
  align-items: start;
}

.ss-word-game-search-grid {
  display: grid;
  gap: 2px;
  justify-content: center;
  touch-action: manipulation;
}

.ss-word-game-search-cell {
  width: 30px;
  height: 30px;
  border: 1px solid #9fc5dd;
  border-radius: 4px;
  background: #ffffff;
  color: #153d52;
  font: bold 17px Arial, Helvetica, sans-serif;
  line-height: 28px;
  text-align: center;
  cursor: pointer;
  user-select: none;
}

.ss-word-game-search-cell.is-selected {
  background: #ffef9a;
  border-color: #e0b845;
}

.ss-word-game-search-cell.is-found {
  background: #c9f2c3;
  border-color: #67aa62;
}

.ss-word-game-search-list {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #b8d5e6;
  border-radius: 5px;
  background: #ffffff;
  list-style: none;
}

.ss-word-game-search-list li {
  margin: 5px 0;
  color: #134b68;
  font-size: 14px;
  font-weight: bold;
}

.ss-word-game-search-list li.is-found {
  color: #5e8b44;
  text-decoration: line-through;
}

@media (max-width: 560px) {
  .ss-word-game {
    padding: 10px;
  }

  .ss-word-game-card {
    grid-template-columns: 28px 1fr 70px;
  }

  .ss-word-game-hangman-grid {
    grid-template-columns: 1fr;
  }

  .ss-word-game-keyboard {
    grid-template-columns: repeat(7, 1fr);
  }

  .ss-word-game-tile {
    min-width: 30px;
    font-size: 18px;
  }

  .ss-word-game-search-layout {
    grid-template-columns: 1fr;
  }

  .ss-word-game-search-cell {
    width: 24px;
    height: 24px;
    font-size: 14px;
    line-height: 22px;
  }
}
