#tp-game-modal { z-index: 9999999999!important; }

.tp-crossword-frontend { margin: 32px 0; }
#poststuff h2.tp-crossword-title,
.tp-crossword-title {
  margin-bottom: 16px;
  text-align: center;
  font-size: 2.2em;
  font-weight: bold;
  letter-spacing: 1px;
}
.tp-crossword-board { margin-bottom: 24px; }
.tp-crossword-grid { border-collapse: collapse; margin: 0 auto; }
.tp-crossword-grid td {
  width: 32px;
  height: 32px;
  border: 1px solid #bbb;
  text-align: center;
  background: #fff;
  padding: 0;
  position: relative;
}
.tp-crossword-grid td.tp-crossword-empty {
  background: #222;
}
/* Frontend TD cell: keep table layout intact; only make it positioned for number badge */
.tp-crossword-grid td.tp-crossword-cell {
  position: relative;
}
.tp-crossword-number {
  position: absolute;
  top: 2px;
  left: 3px;
  font-size: 10px;
  color: #888;
  font-weight: normal;
  z-index: 2;
  pointer-events: none;
}
/* Interactive input (frontend) inside admin-style wrapper */
.tp-crossword-cell-wrap input,
.tp-crossword-input {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  text-align: center;
  font-weight: bold;
  font-size: 18px;
  color: #333;
  background: transparent;
  text-transform: uppercase;
}
.tp-crossword-cell-wrap input.correct,
.tp-crossword-input.correct {
  background-color: #d4edda;
  color: #155724;
}
.tp-crossword-cell-wrap input.incorrect,
.tp-crossword-input.incorrect {
  background-color: #f8d7da;
  color: #721c24;
}
.tp-crossword-clues { max-width: 600px; margin: 0 auto; }
.tp-crossword-clues-cols {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.tp-crossword-clues-col {
  flex: 1 1 200px;
  min-width: 180px;
}
.tp-crossword-clues-col ol {
  padding-left: 24px;
  margin-top: 3px;
  margin-bottom: 0;
}
.tp-crossword-clues-col li {
  margin-bottom: 7px;
}
.tp-crossword-clues a { font-size: 12px; margin-left: 6px; color: #0073aa; text-decoration: underline; }
.tp-crossword-clues a:hover { color: #005177; }

/* Admin preview (non-interactive) grid styles */
.tp-crossword-table { border-collapse: collapse; margin: 0 auto; }
.tp-crossword-table td {
  width: 32px;
  height: 32px;
  border: 1px solid #bbb;
  text-align: center;
  background: #fff;
  padding: 0;
  position: relative;
}
.tp-crossword-table td.tp-crossword-empty { background: #222; }
.tp-crossword-cell-wrap {
  position: relative;
  width: 32px;
  height: 32px;
  display: block;
}
.tp-crossword-table .tp-crossword-num {
  position: absolute;
  top: 2px;
  left: 3px;
  font-size: 10px;
  color: #888;
  font-weight: normal;
  z-index: 2;
  pointer-events: none;
}
.tp-crossword-table .tp-crossword-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-weight: bold;
  font-size: 18px;
  color: #333;
  text-transform: uppercase;
}
