.ss-words-game {
  width: 640px;
  max-width: 100%;
  min-height: 430px;
  margin: 0 auto 18px;
  box-sizing: border-box;
  background: #f7fbff;
  border: 1px solid #87b8d8;
  box-shadow: 0 2px 8px rgba(23, 65, 92, 0.16);
  color: #1e3447;
  font-family: Arial, Helvetica, sans-serif;
  text-align: left;
}

.ss-words-shell {
  min-height: 430px;
  padding: 15px;
  box-sizing: border-box;
  background: linear-gradient(#ffffff, #edf7ff);
}

.ss-words-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #bad6ea;
}

.ss-words-title {
  margin: 0;
  color: #075e91;
  font-size: 22px;
  line-height: 1.2;
}

.ss-words-pill {
  padding: 5px 9px;
  border: 1px solid #b8d7f0;
  border-radius: 4px;
  background: #e8f4ff;
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
}

.ss-words-feedback {
  min-height: 35px;
  margin: 12px 0;
  padding: 9px;
  border: 1px solid #ead995;
  border-radius: 4px;
  background: #fffdf2;
  font-size: 15px;
}

.ss-words-feedback.good {
  border-color: #9ccc86;
  background: #effbea;
  color: #236513;
}

.ss-words-feedback.bad {
  border-color: #e2a49b;
  background: #fff0ee;
  color: #8a2519;
}

.ss-words-button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #075e91;
  border-radius: 4px;
  background: #0a72ad;
  color: #ffffff;
  cursor: pointer;
  font-weight: bold;
}

.ss-words-button.secondary {
  background: #f5fbff;
  color: #075e91;
}

.ss-words-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ss-wordsearch-layout {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 14px;
  align-items: start;
}

.ss-wordsearch-grid {
  display: grid;
  gap: 2px;
  touch-action: none;
  user-select: none;
}

.ss-wordsearch-cell {
  aspect-ratio: 1 / 1;
  min-width: 0;
  border: 1px solid #97bdd8;
  border-radius: 3px;
  background: #ffffff;
  color: #104764;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  line-height: 1;
}

.ss-wordsearch-cell.selected {
  background: #dff1ff;
  border-color: #0874b0;
}

.ss-wordsearch-cell.found {
  background: #c9efbc;
  border-color: #6bac4e;
}

.ss-word-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 10px;
  border: 1px solid #cfe2f1;
  border-radius: 4px;
  background: #ffffff;
  list-style: none;
}

.ss-word-list li {
  font-size: 14px;
  line-height: 1.2;
}

.ss-word-list li.found {
  color: #2b7418;
  font-weight: bold;
  text-decoration: line-through;
}

.ss-scramble-card,
.ss-sort-panel {
  padding: 14px;
  border: 1px solid #cfe2f1;
  border-radius: 4px;
  background: #ffffff;
}

.ss-scramble-word {
  margin: 8px 0 14px;
  color: #0b5f8a;
  font-size: 34px;
  font-weight: bold;
  letter-spacing: 3px;
  text-align: center;
}

.ss-scramble-input {
  width: 100%;
  height: 42px;
  box-sizing: border-box;
  border: 2px solid #86b2d0;
  border-radius: 4px;
  font-size: 22px;
  text-align: center;
}

.ss-sort-list {
  display: grid;
  gap: 7px;
  margin: 10px 0;
  padding: 0;
  list-style: none;
}

.ss-sort-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px;
  border: 1px solid #91bddc;
  border-radius: 4px;
  background: #ffffff;
  color: #0d557f;
  cursor: grab;
  font-size: 17px;
  font-weight: bold;
}

.ss-sort-item.dragging {
  opacity: 0.45;
}

.ss-sort-item.good {
  border-color: #83be6a;
  background: #e8f8e2;
}

.ss-sort-item.bad {
  border-color: #e2a49b;
  background: #fff0ee;
}

.ss-sort-handle {
  color: #6993ad;
  font-size: 13px;
  font-weight: normal;
}

@media (max-width: 700px) {
  .ss-wordsearch-layout {
    grid-template-columns: 1fr;
  }
}
