.privacy-settings {
    display: grid;
    gap: 18px;
}

.privacy-settings__hero {
    padding: 26px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 16px;
    background:
        radial-gradient(
            circle at 8% 0,
            rgba(125, 74, 220, .16),
            transparent 38%
        ),
        linear-gradient(
            145deg,
            rgba(11, 15, 29, .98),
            rgba(6, 9, 18, .98)
        );
    box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
}

.privacy-settings__hero > div {
    min-width: 0;
}

.privacy-settings__hero span,
.privacy-settings__panel header span {
    color: #9b73d5;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.4px;
}

.privacy-settings__hero h1 {
    margin: 8px 0 0;
    color: #f7f5ff;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1;
}

.privacy-settings__hero p {
    max-width: 660px;
    margin: 11px 0 0;
    color: #8993aa;
    font-size: 13px;
    line-height: 1.7;
}

.privacy-settings__profile-link,
.privacy-settings__blacklist,
.privacy-settings__save {
    min-height: 44px;
    padding: 0 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px;
    color: #c9cfe0;
    background: rgba(255, 255, 255, .025);
    font: inherit;
    font-size: 12px;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
    transition:
        border-color .18s ease,
        color .18s ease,
        transform .18s ease;
}

.privacy-settings__profile-link:hover,
.privacy-settings__blacklist:hover,
.privacy-settings__save:hover {
    border-color: rgba(167, 112, 239, .4);
    color: #fff;
    transform: translateY(-1px);
}

.privacy-settings__form {
    display: grid;
    gap: 14px;
}

.privacy-settings__panel {
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 14px;
    background:
        linear-gradient(
            145deg,
            rgba(10, 14, 27, .97),
            rgba(6, 9, 18, .97)
        );
    box-shadow: 0 18px 50px rgba(0, 0, 0, .17);
}

.privacy-settings__panel > header {
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.privacy-settings__panel header > div {
    display: grid;
    gap: 6px;
}

.privacy-settings__panel h2 {
    margin: 0;
    color: #eef0f7;
    font-size: 19px;
}

.privacy-settings__panel header > small {
    color: #667188;
    font-size: 10px;
}

.privacy-options {
    display: grid;
    gap: 10px;
}

.privacy-options--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.privacy-options--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.privacy-option {
    min-width: 0;
    min-height: 118px;
    padding: 15px;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 11px;
    background: rgba(3, 6, 14, .58);
    cursor: pointer;
    transition:
        border-color .18s ease,
        background .18s ease,
        transform .18s ease;
}

.privacy-option:hover {
    border-color: rgba(158, 102, 231, .28);
    transform: translateY(-1px);
}

.privacy-option > input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.privacy-option__mark {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
    background: rgba(255, 255, 255, .02);
}

.privacy-option__mark::after {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ac74ec;
    box-shadow: 0 0 14px rgba(172, 116, 236, .75);
    content: '';
    opacity: 0;
    transform: scale(.35);
    transition: .18s ease;
}

.privacy-option > input:focus-visible
    + .privacy-option__mark {
    outline: 2px solid rgba(172, 116, 236, .7);
    outline-offset: 3px;
}

.privacy-option:has(input:checked) {
    border-color: rgba(172, 116, 236, .46);
    background:
        linear-gradient(
            145deg,
            rgba(111, 60, 184, .15),
            rgba(8, 10, 20, .75)
        );
}

.privacy-option > input:checked
    + .privacy-option__mark {
    border-color: rgba(172, 116, 236, .72);
}

.privacy-option > input:checked
    + .privacy-option__mark::after {
    opacity: 1;
    transform: scale(1);
}

.privacy-option__copy {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.privacy-option__copy strong {
    color: #e5e7ef;
    font-size: 12px;
}

.privacy-option__copy small {
    color: #707b91;
    font-size: 10px;
    line-height: 1.55;
}

.privacy-settings__hint {
    margin: 13px 0 0;
    color: #657087;
    font-size: 10px;
    line-height: 1.6;
}

.privacy-search-toggle {
    margin-top: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 13px;
    border: 1px solid rgba(255, 255, 255, .055);
    border-radius: 11px;
    background: rgba(3, 6, 14, .48);
    cursor: pointer;
}

.privacy-search-toggle > input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.privacy-search-toggle__control {
    position: relative;
    width: 42px;
    height: 23px;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 999px;
    background: rgba(255, 255, 255, .045);
    transition: .18s ease;
}

.privacy-search-toggle__control::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #727b8f;
    content: '';
    transition: .18s ease;
}

.privacy-search-toggle > input[type="checkbox"]:checked
    ~ .privacy-search-toggle__control {
    border-color: rgba(172, 116, 236, .5);
    background: rgba(126, 71, 205, .24);
}

.privacy-search-toggle > input[type="checkbox"]:checked
    ~ .privacy-search-toggle__control::after {
    left: 22px;
    background: #b780f0;
    box-shadow: 0 0 13px rgba(172, 116, 236, .7);
}

.privacy-search-toggle > input[type="checkbox"]:focus-visible
    ~ .privacy-search-toggle__control {
    outline: 2px solid rgba(172, 116, 236, .7);
    outline-offset: 3px;
}

.privacy-search-toggle > span:last-child {
    display: grid;
    gap: 5px;
}

.privacy-search-toggle strong {
    color: #e4e6ef;
    font-size: 11px;
}

.privacy-search-toggle small {
    color: #6f7a90;
    font-size: 9px;
    line-height: 1.55;
}

.privacy-settings__priority {
    padding: 17px 19px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border: 1px solid rgba(236, 109, 132, .17);
    border-radius: 12px;
    background: rgba(104, 29, 47, .08);
}

.privacy-settings__priority > span {
    color: #d7778b;
    font-size: 20px;
}

.privacy-settings__priority div {
    display: grid;
    gap: 5px;
}

.privacy-settings__priority strong {
    color: #dca0ad;
    font-size: 11px;
}

.privacy-settings__priority p {
    margin: 0;
    color: #826e7a;
    font-size: 10px;
    line-height: 1.6;
}

.privacy-settings__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.privacy-settings__save {
    border-color: rgba(159, 95, 235, .42);
    color: #fff;
    background:
        linear-gradient(
            135deg,
            #7445b5,
            #9660d5
        );
    box-shadow: 0 12px 30px rgba(91, 48, 156, .22);
}

/* Restricted public profile: deliberately shows no private metadata. */

.restricted-profile {
    position: relative;
    min-height: 620px;
    padding: 70px 20px;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.restricted-profile__ambient {
    position: absolute;
    inset: 8% 10%;
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            rgba(112, 62, 190, .16),
            transparent 65%
        );
    filter: blur(16px);
    pointer-events: none;
}

.restricted-profile__card {
    position: relative;
    z-index: 1;
    width: min(100%, 620px);
    padding: 42px;
    display: grid;
    justify-items: center;
    border: 1px solid rgba(255, 255, 255, .065);
    border-radius: 18px;
    background:
        linear-gradient(
            145deg,
            rgba(11, 15, 29, .98),
            rgba(5, 8, 16, .98)
        );
    box-shadow: 0 32px 90px rgba(0, 0, 0, .34);
    text-align: center;
}

.restricted-profile__avatar {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(174, 113, 239, .38);
    border-radius: 22px;
    color: #ddc5fb;
    background:
        linear-gradient(
            145deg,
            rgba(123, 69, 198, .22),
            rgba(33, 24, 58, .2)
        );
    box-shadow: 0 18px 50px rgba(77, 40, 132, .24);
    font-size: 30px;
    font-weight: 900;
}

.restricted-profile__kicker {
    margin-top: 18px;
    color: #966bc9;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.4px;
}

.restricted-profile h1 {
    margin: 7px 0 0;
    color: #f4f3fa;
    font-size: 31px;
}

.restricted-profile__lock {
    width: 38px;
    height: 38px;
    margin-top: 24px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 50%;
    color: #7f6a9c;
    background: rgba(255, 255, 255, .025);
    font-size: 17px;
}

.restricted-profile h2 {
    margin: 12px 0 0;
    color: #d9dbe5;
    font-size: 17px;
}

.restricted-profile p {
    max-width: 440px;
    margin: 9px 0 0;
    color: #727d92;
    font-size: 11px;
    line-height: 1.7;
}

.restricted-profile__actions {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px;
}

.restricted-profile__actions form {
    margin: 0;
}

.restricted-profile__card > .community-alert {
    width: 100%;
    margin-top: 18px;
    text-align: left;
}

@media (max-width: 980px) {
    .privacy-options--four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .privacy-settings__hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .privacy-options--three,
    .privacy-options--four {
        grid-template-columns: 1fr;
    }

    .privacy-option {
        min-height: 0;
    }
}

@media (max-width: 520px) {
    .privacy-settings__hero,
    .privacy-settings__panel,
    .restricted-profile__card {
        padding: 20px;
    }

    .privacy-settings__panel > header,
    .privacy-settings__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .privacy-settings__profile-link,
    .privacy-settings__blacklist,
    .privacy-settings__save {
        width: 100%;
    }

    .restricted-profile {
        min-height: 520px;
        padding: 38px 12px;
    }
}
