.pattern-sequence {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
    margin: 2rem 0;
}

.pattern-term {
    min-width: 3.2rem;
    height: 3.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f0f4ff;
    border: 2px solid #dbe6ff;
    border-radius: 12px;
    font-size: 1.8rem;
}

.pattern-question {
    min-width: 3.2rem;
    height: 3.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--primary);
    border-radius: 12px;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.pattern-options {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    justify-content: center;
    margin: 1rem 0;
}

.pattern-option {
    min-width: 3.6rem;
    height: 3.6rem;
    font-size: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ccc;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: transform .15s, border-color .15s, background .15s;
    padding: 0;
}

.pattern-option:hover {
    transform: none;
}

.pattern-option.pattern-correct {
    border-color: #2e7d32;
    background: #e8f5e9;
}

.pattern-option.pattern-wrong {
    border-color: #c62828;
    background: #ffebee;
}

.pattern-message {
    font-size: 1.3rem;
    font-weight: bold;
    margin: 1rem 0;
    min-height: 1.5em;
    text-align: center;
}

.pattern-message-good {
    color: #2e7d32;
}

.pattern-message-bad {
    color: #c62828;
}

.pattern-next {
    display: block;
    margin: 1rem auto 0;
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    border: 2px solid #4a90d9;
    border-radius: 12px;
    background: #4a90d9;
    color: white;
    cursor: pointer;
}

@media (max-width: 380px) {
    .pattern-term,
    .pattern-question {
        min-width: 2.8rem;
        height: 2.8rem;
        font-size: 1.5rem;
    }

    .pattern-option {
        min-width: 3.2rem;
        height: 3.2rem;
        font-size: 1.8rem;
    }
}
