/* Word Cross — game-specific styles (shared look lives in ../theme.css) */

.cw-area {
  position: relative;
  display: flex;
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
}

.cw-left {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  transition: filter 0.25s ease;
}

.cw-board-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.cw-board {
  display: grid;
  gap: 2px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  touch-action: manipulation;
}

.cw-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: var(--bg);
  border-radius: 5px;
  color: var(--ink);
  cursor: pointer;
}

.cw-cell.block {
  background: transparent;
  cursor: default;
}

.cw-cell.in-slot {
  background: var(--accent-soft);
}

.cw-cell.cursor {
  background: var(--accent);
  color: #fff;
}

.cw-cell.wrong {
  color: #c92a2a;
}

.cw-cell.cursor.wrong {
  color: #ffd8d8;
}

.cw-cell .num {
  position: absolute;
  top: 1px;
  left: 3px;
  font-size: 0.42em;
  font-weight: 700;
  color: var(--ink-soft);
}

.cw-cell.cursor .num {
  color: rgba(255, 255, 255, 0.85);
}

.active-clue {
  font-weight: 700;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 18px;
  min-height: 2.2em;
  text-align: center;
  max-width: 640px;
}

.active-clue span {
  color: var(--accent);
  margin-right: 8px;
}

/* ---------- On-screen keyboard ---------- */
.cw-keyboard {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  padding-bottom: 4px;
  flex-shrink: 0;
}

.kb-row {
  display: flex;
  gap: 5px;
  justify-content: center;
}

.kb-key {
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 9px;
  width: clamp(40px, 4.6vw, 58px);
  height: clamp(44px, 5.4vh, 56px);
  cursor: pointer;
  touch-action: manipulation;
}

.kb-key:active {
  background: var(--accent-soft);
}

.kb-key.kb-wide {
  width: clamp(64px, 7vw, 88px);
}

/* ---------- Clue panel ---------- */
.clue-panel {
  flex: 0 0 320px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  overflow-y: auto;
  max-height: 100%;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: filter 0.25s ease;
}

.clue-col h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.clue-col ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.clue-col li {
  font-weight: 500;
  font-size: 0.85rem;
  line-height: 1.35;
  padding: 5px 9px;
  border-radius: 8px;
  cursor: pointer;
}

.clue-col li b {
  color: var(--accent);
  margin-right: 5px;
}

.clue-col li.active {
  background: var(--accent-soft);
  font-weight: 700;
}

.clue-col li.done {
  opacity: 0.45;
  text-decoration: line-through;
}

/* ---------- Large screens ---------- */
@media (min-width: 1280px) and (min-height: 900px) {
  .clue-panel {
    flex: 0 0 360px;
    padding: 18px;
  }

  .clue-col li {
    font-size: 0.9rem;
  }
}

/* ---------- Narrow screens ---------- */
@media (max-width: 760px) {
  .cw-area {
    flex-direction: column;
  }

  .clue-panel {
    flex: 1 1 auto;
    max-height: none;
    flex-direction: row;
  }

  .clue-col {
    flex: 1;
  }
}
