.game-nonogram .subtitle {
  margin-bottom: 20px;
}

.game-nonogram .game-controls {
  margin-bottom: 20px;
}

.game-nonogram select {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--muted);
  background: var(--surface);
  color: var(--text-bright);
  cursor: pointer;
  outline: none;
}

.game-nonogram select:focus {
  border-color: var(--teal);
}

.game-nonogram .game-stats {
  margin-bottom: 20px;
  font-family: 'Fredoka', sans-serif;
  font-size: 1rem;
}

.game-nonogram .game-stats span {
  color: var(--muted-light);
}

.game-nonogram .game-stats .value {
  color: var(--gold);
  font-weight: 600;
}

.game-nonogram .board-wrapper {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.06);
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
}

.game-nonogram .board {
  display: grid;
  gap: 0;
  position: relative;
}

.game-nonogram .clue-corner {
  background: var(--surface);
}

.game-nonogram .clue-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 4px 2px 6px;
  background: var(--surface);
  font-family: 'Fredoka', sans-serif;
  font-size: 0.85rem;
  color: var(--text);
  gap: 1px;
  min-width: 0;
}

.game-nonogram .clue-col .clue-num {
  line-height: 1.2;
}

.game-nonogram .clue-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 2px 8px 2px 4px;
  background: var(--surface);
  font-family: 'Fredoka', sans-serif;
  font-size: 0.85rem;
  color: var(--text);
  gap: 4px;
  min-height: 0;
}

.game-nonogram .cell {
  width: 44px;
  height: 44px;
  background: var(--board-bg);
  border: 1px solid var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.1s;
  position: relative;
}

.game-nonogram .cell:hover {
  background: #E0E0DC;
}

.game-nonogram .cell.filled {
  background: var(--teal);
  border-color: var(--teal);
}

.game-nonogram .cell.filled:hover {
  background: #24967C;
}

.game-nonogram .cell.marked::after {
  content: '\00d7';
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.game-nonogram .cell.marked {
  background: var(--board-bg);
}

.game-nonogram .cell.border-right {
  border-right: 2.5px solid var(--muted-light);
}

.game-nonogram .cell.border-bottom {
  border-bottom: 2.5px solid var(--muted-light);
}

.game-nonogram .clue-row.completed, .game-nonogram .clue-col.completed {
  color: var(--muted);
  text-decoration: line-through;
}

.game-nonogram .game-overlay-card h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.game-nonogram .game-overlay-card p {
  color: var(--text);
  margin-bottom: 24px;
  font-size: 1.05rem;
}

.game-nonogram .game-overlay-card .time-result {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.3rem;
  color: var(--teal);
  font-weight: 600;
  margin-bottom: 20px;
}

.game-nonogram .mode-toggle {
  display: flex;
  gap: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--muted);
}

.game-nonogram .mode-toggle button {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  border: none;
  cursor: pointer;
  border-radius: 0;
  padding: 8px 16px;
  font-size: 0.85rem;
  background: var(--surface);
  color: var(--text);
  transition: background 0.15s ease;
}

.game-nonogram .mode-toggle button.active {
  background: var(--teal);
  color: #fff;
}

.game-nonogram .mode-toggle button:last-child.active {
  background: var(--accent);
}

.game-nonogram .game-hint {
  display: none;
  margin-bottom: 12px;
}

@media (max-width: 600px) {
  .game-nonogram .cell {
    width: 36px;
    height: 36px;
  }

  .game-nonogram .clue-col { font-size: 0.75rem; }
  .game-nonogram .clue-row { font-size: 0.75rem; }

  .game-nonogram .board-wrapper { padding: 12px; }

  .game-nonogram .game-overlay-card { padding: 28px 24px; }

  .game-nonogram .game-hint { display: block; }
}

@media (max-width: 400px) {
  .game-nonogram .cell {
    width: 30px;
    height: 30px;
  }
  .game-nonogram .cell.marked::after {
    font-size: 1.2rem;
  }
}
