.captcha_block {
    width: min(440px, calc(100vw - 32px));
    margin: 0 auto;
    line-height: 1.35;
    text-align: center;
}

.local_captcha_wrapper {
    width: 100%;
    box-sizing: border-box;
    padding: 16px;
    border: 1px solid var(--item_block_border);
    border-radius: 12px;
    background: var(--item_block_background);
    color: var(--item_block_color);
    box-shadow: var(--box-shadow);
}

.local_captcha_header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.local_captcha_title {
    font-size: 15px;
    font-weight: 700;
    color: var(--item_block_color);
}

.local_captcha_subtitle {
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--color_secondary);
}

.local_captcha_grid {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.local_captcha_item {
    position: relative;
    min-width: 0;
    padding: 4px;
    border: 1px solid var(--item_block_border);
    border-radius: 10px;
    background: var(--bg-input-bgcolor);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.local_captcha_item:hover,
.local_captcha_item:focus-visible {
    transform: translateY(-2px);
    border-color: var(--bg-input-border-color-hover);
    box-shadow: var(--box-shadow);
    outline: none;
}

.local_captcha_item img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 7px;
    transform-origin: center;
    transition: transform 0.18s ease;
    user-select: none;
    pointer-events: none;
}

.local_captcha_status {
    position: absolute;
    top: 7px;
    right: 7px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--btn_gray_bg);
    color: var(--btn_gray_color);
    font-size: 15px;
    line-height: 1;
    pointer-events: none;
}

.local_captcha_helper {
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--color_secondary);
}

.local_captcha_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 20px;
    border: var(--btn-first-border-style);
    border-radius: 7px;
    background: var(--btn-first-bg-color);
    color: var(--btn-first-font-color);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.local_captcha_btn:hover,
.local_captcha_btn:focus-visible {
    filter: brightness(1.06);
    outline: none;
}

.local_captcha_error {
    padding: 14px;
    border: 1px solid var(--item_block_border);
    border-radius: 10px;
    background: var(--item_block_background);
    color: var(--item_block_color);
}

@media (max-width: 520px) {
    .local_captcha_wrapper {
        padding: 12px;
    }

    .local_captcha_grid {
        grid-template-columns: repeat(2, minmax(90px, 1fr));
    }
}
