/* Crossword-specific styles — builds on unified-2d-game.css + newspaper-theme.css */
:root {
  --news-cell-size: 46px;
  --news-active: var(--accent);
  --news-highlight: color-mix(in srgb, var(--accent) 15%, var(--panel));
  --news-correct: #2e7d32;
  --news-incorrect: #c62828;
}

html[data-theme='dark'] {
  --news-active: var(--accent);
  --news-highlight: color-mix(in srgb, var(--accent) 20%, transparent);
  --news-correct: #4caf50;
  --news-incorrect: #ef5350;
}

.classic-grid {
  display: grid;
  gap: 1px;
  background: var(--news-ink);
  border: 1px solid var(--news-ink);
}

.classic-cell {
  width: var(--news-cell-size);
  height: var(--news-cell-size);
  background: var(--news-paper);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.classic-cell.black {
  background: var(--news-ink);
}

.classic-cell input {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  text-align: center;
  font-family: var(--news-font-display);
  font-size: 1.45rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--news-ink);
  padding: 0;
  outline: none;
  caret-color: var(--news-accent);
}

.classic-cell.active input {
  background: var(--news-active);
  color: #fff;
}

.classic-cell.highlight input {
  background: var(--news-highlight);
}

.classic-cell.correct input {
  background: var(--news-correct);
  color: #fff;
}

.classic-cell.incorrect input {
  background: var(--news-incorrect);
  color: #fff;
}

.classic-cell .cell-number {
  position: absolute;
  top: 1px;
  left: 2px;
  font-family: var(--news-font-body);
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--news-ink);
  line-height: 1;
  pointer-events: none;
  z-index: 2;
}

.classic-cell.active .cell-number {
  color: #fff;
}

.classic-clue-item {
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.classic-clue-item:hover {
  background: rgba(0,0,0,0.04);
  border-left-color: var(--news-rule-light);
}

html[data-theme='dark'] .classic-clue-item:hover {
  background: rgba(255,255,255,0.04);
}

.classic-clue-item.active {
  background: var(--news-highlight);
  border-left-color: var(--news-active);
  font-weight: 600;
}

.classic-clue-item.solved {
  text-decoration: line-through;
  opacity: 0.5;
}

.classic-clues-heading--down {
  margin-top: 20px;
}

@media (max-width: 768px) {
  :root {
    --news-cell-size: 32px;
  }

  .classic-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .classic-grid-section,
  .classic-clues-section {
    width: 100%;
  }

  .classic-grid-section {
    order: 1;
  }

  .classic-clues-section {
    order: 2;
  }

  .classic-progress-bar {
    display: none;
  }

  .classic-grid-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 100vw;
    margin-left: -20px;
    margin-right: -20px;
    box-sizing: border-box;
  }

  .classic-grid {
    width: 100%;
    max-width: 100vw;
    height: auto;
  }

  .classic-cell input {
    font-size: 1rem;
  }

  .classic-keyboard-hints {
    display: none !important;
  }
}

@media (max-width: 480px) {
  :root {
    --news-cell-size: 28px;
  }

  .classic-cell input {
    font-size: 0.9rem;
  }

  .classic-cell .cell-number {
    font-size: 0.48rem;
  }
}
