.codle-hero {
    border-radius: 4px;
    background: #0f172a;
    color: #fff;
    padding: 24px 16px;
    text-align: center;
}

.codle-hero h1 {
    margin: 0;
    font-size: 2.25rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0;
}

.codle-hero p {
    margin: 8px 0 0;
    color: #cbd5e1;
    font-size: 1rem;
}

.codle-play-wrap {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.codle-game {
    max-width: 560px;
    margin: 12px auto 0;
    padding: 16px;
    border-radius: 4px;
    background: #0f1117;
    color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.codle-clue {
    text-align: center;
    margin: 0 auto 16px;
}

.codle-clue-note {
    color: #f5f5f5;
}

.codle-clue-label {
    display: inline-block;
    margin-top: 12px;
    padding: 4px 10px;
    border: 1px solid #8fd3ff;
    border-radius: 4px;
    color: #8fd3ff;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0;
}

.codle-clue-title {
    margin-top: 10px;
    color: #8fd3ff;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
}

.codle-status {
    min-height: 28px;
    margin: 10px auto 16px;
    padding: 8px 12px;
    border: 1px solid #3a3a3c;
    border-radius: 4px;
    background: #1d1f24;
    color: #f5f5f5;
    text-align: center;
    font-weight: 700;
}

.codle-status.win {
    border-color: #538d4e;
    background: #22391f;
}

.codle-status.loss,
.codle-status.warn {
    border-color: #b59f3b;
    background: #3b3217;
}

.codle-board {
    display: grid;
    gap: 6px;
    width: min(100%, 330px);
    margin: 0 auto 18px;
}

.codle-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.codle-tile {
    aspect-ratio: 1 / 1;
    border: 2px solid #3a3a3c;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #121213;
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.codle-tile:not(:empty) {
    border-color: #565758;
}

.codle-tile.correct {
    border-color: #538d4e;
    background: #538d4e;
}

.codle-tile.present {
    border-color: #b59f3b;
    background: #b59f3b;
}

.codle-tile.absent {
    border-color: #3a3a3c;
    background: #3a3a3c;
}

.codle-form {
    margin: 0 auto 14px;
    text-align: center;
}

.codle-form label {
    display: block;
    color: #fff;
    font-weight: 700;
}

.codle-entry {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.codle-input {
    width: 132px;
    height: 46px;
    border: 2px solid #565758;
    border-radius: 4px;
    background: #121213;
    color: #fff;
    text-align: center;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.codle-input:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.codle-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 14px;
    border: 0;
    border-radius: 4px;
    color: #fff;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.codle-button-primary,
.codle-button-secondary {
    background: #2563eb;
}

.codle-button-green {
    background: #16a34a;
}

.codle-button:hover {
    opacity: 0.92;
}

.codle-score {
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid #3a3a3c;
    border-radius: 6px;
    background: #18191d;
}

.codle-score-page {
    max-width: 460px;
}

.codle-score-title {
    margin-bottom: 10px;
    text-align: center;
    font-size: 1rem;
    font-weight: 800;
}

.codle-score-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    text-align: center;
}

.codle-score-grid strong {
    display: block;
    font-size: 1.35rem;
    line-height: 1;
}

.codle-score-grid span {
    display: block;
    margin-top: 4px;
    color: #c9c9c9;
    font-size: 0.75rem;
}

.codle-score-subtitle {
    margin-top: 16px;
    color: #c9c9c9;
    font-size: 0.85rem;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
}

.codle-distribution {
    display: grid;
    gap: 4px;
    margin-top: 12px;
}

.codle-dist-row {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 6px;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 800;
}

.codle-dist-bar {
    min-width: 26px;
    padding: 3px 6px;
    border-radius: 3px;
    background: #538d4e;
    color: #fff;
    text-align: right;
    line-height: 1.2;
}

.codle-keyboard {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 14px auto;
}

.codle-key {
    min-width: 38px;
    height: 46px;
    border: 0;
    border-radius: 4px;
    background: #818384;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.codle-key.correct {
    background: #538d4e;
}

.codle-key.present {
    background: #b59f3b;
}

.codle-key.absent {
    background: #3a3a3c;
}

.codle-key:disabled,
.codle-submit:disabled,
.codle-input:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.codle-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

.codle-actions-center {
    justify-content: center;
}

@media (max-width: 480px) {
    .codle-hero {
        padding: 20px 12px;
    }

    .codle-hero h1 {
        font-size: 2rem;
    }

    .codle-game {
        padding: 12px 8px;
    }

    .codle-entry {
        align-items: center;
        flex-direction: column;
    }

    .codle-tile {
        font-size: 1.5rem;
    }

    .codle-input {
        width: min(100%, 180px);
    }

    .codle-submit {
        width: min(100%, 180px);
    }

    .codle-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
}