.ccl-crossword-wrapper {
    max-width: 900px;
    margin: 30px auto;
    padding: 24px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
}

.ccl-crossword-wrapper h2 {
    margin-top: 0;
    color: #7a0000;
}


.ccl-grid {
    display: grid;
    width: min(92vw, 520px);
    aspect-ratio: 1 / 1;
    margin: 20px auto;
    border: 2px solid #111;
    background: #111;
    gap: 1px;
}

.ccl-cell {
    background: #fff;
    border: 0;
}

.ccl-cell-black {
    background: #111;
}

.ccl-cell {
    position: relative;
}

.ccl-cell-number {
    position: absolute;
    top: 2px;
    left: 3px;
    font-size: 10px;
    line-height: 1;
    font-weight: 700;
    color: #111;
    pointer-events: none;
}

.ccl-cell-input {
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    text-align: center;
    text-transform: uppercase;
    font-size: clamp(16px, 3vw, 24px);
    font-weight: 700;
    color: #111;
    outline: none;
    font-family: Arial, Helvetica, sans-serif;
}

.ccl-cell-input:focus {
    background: #fff3b0;
}

.ccl-cell-black .ccl-cell-input {
    display: none;
}

.ccl-crossword-layout {
    display: grid;
    grid-template-columns: minmax(260px, 540px) minmax(260px, 1fr);
    gap: 28px;
    align-items: start;
}

.ccl-crossword-board {
    width: 100%;
}

.ccl-clues-panel {
    display: grid;
    gap: 22px;
}

.ccl-clue-section {
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fafafa;
    padding: 16px;
}

.ccl-clue-section h3 {
    margin: 0 0 12px;
    color: #7a0000;
    font-size: 20px;
}

.ccl-clue-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.ccl-clue-item {
    margin-bottom: 10px;
    line-height: 1.45;
    font-size: 15px;
}

@media (max-width: 800px) {
    .ccl-crossword-layout {
        grid-template-columns: 1fr;
    }
}

.ccl-clue-item {
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
}

.ccl-clue-item:hover {
    background: #f4e6e6;
}

.ccl-clue-active {
    background: #fff3b0;
    font-weight: 700;
}

.ccl-cell-word-active {
    background: #fff7cf;
}

.ccl-cell-active {
    background: #ffd966;
}

.ccl-cell-active .ccl-cell-input,
.ccl-cell-word-active .ccl-cell-input {
    background: transparent;
}

.ccl-crossword-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin: 18px 0 12px;
}

.ccl-button {
    border: 0;
    border-radius: 8px;
    padding: 11px 18px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.ccl-button-primary {
    background: #7a0000;
    color: #fff;
}

.ccl-button-primary:hover {
    background: #990000;
}

.ccl-button-secondary {
    background: #eeeeee;
    color: #111;
}

.ccl-button-secondary:hover {
    background: #dddddd;
}

.ccl-message {
    display: none;
    margin: 12px auto 0;
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
    max-width: 520px;
}

.ccl-message-success {
    background: #e8f7e8;
    color: #155724;
    border: 1px solid #b9e6b9;
}

.ccl-message-error {
    background: #fff1f1;
    color: #7a0000;
    border: 1px solid #f1b5b5;
}

.ccl-cell-correct {
    background: #d9f7d9;
}

.ccl-cell-wrong {
    background: #ffd6d6;
}

.ccl-cell-correct .ccl-cell-input,
.ccl-cell-wrong .ccl-cell-input {
    background: transparent;
}

