/* Shared visual polish for crossword templates, previews and games. */
.word-search-grid.crossword-grid {
  gap: 2px;
  padding: 4px;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.word-search-grid.crossword-grid > span:not(.crossword-block),
.word-search-grid.crossword-grid > .crossword-input-cell {
  border: 1px solid #89bca8;
  border-radius: 3px;
  background: #fff;
  box-shadow: none;
}
.word-search-grid.crossword-grid .crossword-block {
  visibility: hidden;
  border: 0;
  border-radius: 2px;
  background: transparent;
  box-shadow: none;
}
.crossword-grid small { top: 2px; left: 3px; z-index: 1; color: #6f7a76; font-size: 6px; font-weight: 800; }
.public-crossword-grid input { border-radius: 3px; }
.public-crossword-grid input:focus { position: relative; z-index: 2; background: #fff; box-shadow: inset 0 0 0 2px var(--green); }
.crossword-clues section { padding: 14px 16px; background: #f6f4ee; border: 1px solid #e4e1d8; border-radius: 10px; }
.crossword-clues section > b { display: block; padding-bottom: 8px; border-bottom: 1px solid #e1ded5; letter-spacing: .09em; }
.crossword-clues li { margin-bottom: 8px; line-height: 1.45; }
.template-player .public-crossword { display: grid; grid-template-columns: minmax(230px,.9fr) minmax(220px,1.1fr); align-items: start; gap: 24px; }
.template-player .public-crossword-grid { width: 100%; max-width: 390px; }
.template-player .public-crossword-clues { margin-top: 0; grid-template-columns: 1fr; gap: 9px; }

/* One truth selector in editor preview, template demo and game. */
.table-truth-preview {
  width: 100%;
  min-height: 38px;
  display: grid;
  place-items: center;
  position: relative;
  margin: 0 !important;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: background .16s ease,border-color .16s ease;
}
.table-truth-preview:hover { background: #e8f2ed; border-color: #b8d4c8; }
.table-truth-preview input {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px;
  margin: 0 !important;
  padding: 0 !important;
  border: 2px solid #9caaa4 !important;
  border-radius: 50% !important;
  background: #fff !important;
  box-shadow: 0 2px 7px rgba(31,54,45,.12) !important;
  opacity: 1;
  cursor: pointer;
  transition: border-color .16s ease,background .16s ease,box-shadow .16s ease,transform .16s ease;
}
.table-truth-preview input[type="checkbox"] { border-radius: 7px !important; }
.table-truth-preview input:hover { border-color: var(--green) !important; transform: scale(1.06); }
.table-truth-preview input:focus-visible { outline: 3px solid rgba(22,119,92,.24) !important; outline-offset: 3px; }
.table-truth-preview input:checked { border-color: var(--green) !important; background: var(--green) !important; box-shadow: inset 0 0 0 5px #fff,0 2px 7px rgba(22,119,92,.2) !important; }
.table-truth-preview input[type="checkbox"]:checked { box-shadow: none !important; }
.table-truth-preview:has(input:checked),.learning-table td:has(.table-truth-preview input:checked) { background: #e5f2ec; border-color: #acd0c0; }
.table-truth-preview input:disabled,.table-truth-preview:has(input:disabled) { cursor: default; }

@media (max-width:720px) {
  .template-player .public-crossword { grid-template-columns: 1fr; }
  .template-player .public-crossword-grid { max-width: 430px; }
  .template-player .public-crossword-clues { grid-template-columns: 1fr 1fr; }
}
@media (max-width:480px) { .template-player .public-crossword-clues { grid-template-columns: 1fr; } }
