.account-pref-picker {
    display: grid;
    gap: 0.7rem;
}

.account-pref-picker-language {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}

.account-pref-picker-theme {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-pref-item {
    position: relative;
}

.account-pref-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.account-pref-option {
    min-height: 4.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.9rem;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.72), rgba(241, 245, 249, 0.76));
    color: var(--app-text);
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.account-pref-option:hover {
    border-color: rgba(var(--bs-primary-rgb), 0.55);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.16);
    transform: translateY(-1px);
}

.account-pref-input:focus-visible + .account-pref-option {
    border-color: rgba(var(--bs-primary-rgb), 0.72);
    box-shadow: 0 0 0 0.22rem var(--app-ring);
}

.account-pref-input:checked + .account-pref-option {
    border-color: rgba(var(--bs-primary-rgb), 0.78);
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.22), rgba(2, 132, 199, 0.14));
    box-shadow: 0 0 0 0.24rem var(--app-ring), 0 12px 26px rgba(37, 99, 235, 0.2);
}

.account-pref-option-language {
    min-height: 3.2rem;
    justify-content: center;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.45rem 0.4rem;
}

.account-pref-option-theme {
    min-height: 4.2rem;
}

.account-pref-flag {
    width: 1.35rem;
    height: 0.95rem;
    display: block;
    border-radius: 0.18rem;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.14);
}

.account-pref-flag-fallback {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.account-pref-theme-icon {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.6rem;
    background: rgba(var(--bs-primary-rgb), 0.14);
    border: 1px solid rgba(var(--bs-primary-rgb), 0.24);
    font-size: 1rem;
}

.account-pref-label {
    font-weight: 600;
    letter-spacing: 0.01em;
}

.account-pref-option-language .account-pref-label {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
}

[data-bs-theme='dark'] .account-pref-option {
    background: linear-gradient(155deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.76));
    border-color: rgba(148, 163, 184, 0.34);
}

[data-bs-theme='dark'] .account-pref-option:hover {
    border-color: rgba(96, 165, 250, 0.62);
    box-shadow: 0 10px 24px rgba(14, 116, 144, 0.24);
}

[data-bs-theme='dark'] .account-pref-input:checked + .account-pref-option {
    background: linear-gradient(145deg, rgba(29, 78, 216, 0.48), rgba(8, 145, 178, 0.34));
    border-color: rgba(96, 165, 250, 0.78);
    box-shadow: 0 0 0 0.24rem rgba(96, 165, 250, 0.2), 0 12px 30px rgba(14, 116, 144, 0.28);
}

[data-bs-theme='dark'] .account-pref-flag {
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.34);
}

[data-bs-theme='dark'] .account-pref-theme-icon {
    background: rgba(96, 165, 250, 0.16);
    border-color: rgba(96, 165, 250, 0.34);
}

@media (max-width: 575.98px) {
    .account-pref-picker-language {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .account-pref-picker-theme {
        grid-template-columns: 1fr;
    }
}

