.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 34px;
}

.profile-header__label {
    margin: 0;
    color: #5d6a65;
    font-weight: 750;
}

.profile-page {
    display: grid;
    gap: 20px;
}

.profile-hero,
.profile-panel,
.activity-level-card {
    border: 1px solid #d7e0dc;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(24, 32, 29, 0.05);
}

.profile-hero {
    padding: clamp(22px, 5vw, 38px);
    background:
        radial-gradient(circle at 95% 5%, rgba(111, 171, 143, 0.2), transparent 34%),
        #ffffff;
}

.profile-identity {
    display: flex;
    align-items: center;
    gap: 22px;
}

.profile-identity h1 {
    margin: 5px 0 4px;
    font-size: clamp(1.8rem, 5vw, 2.7rem);
}

.profile-email {
    margin: 0 0 10px;
    color: #68766f;
}

.profile-avatar-button {
    position: relative;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 112px;
    height: 112px;
    padding: 0;
    overflow: visible;
    border: 4px solid #ffffff;
    border-radius: 32px;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 8px 26px rgba(36, 95, 73, 0.22);
    font-size: 2.4rem;
    font-weight: 850;
}

.profile-avatar-art {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 28px;
    object-fit: cover;
}

.profile-avatar-button:hover,
.profile-avatar-button:focus-visible {
    outline: 3px solid rgba(57, 113, 92, 0.25);
    outline-offset: 3px;
}

.profile-avatar-button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.profile-avatar-button__edit {
    position: absolute;
    right: -8px;
    bottom: -8px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: #18201d;
    font-size: 0.95rem;
}

.profile-verification {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 750;
}

.profile-verification--verified {
    background: #e4f3eb;
    color: #246348;
}

.profile-verification--pending {
    background: #fff3d5;
    color: #755716;
}

.profile-image-help,
.profile-status {
    margin: 16px 0 0;
    color: #6b7973;
    font-size: 0.86rem;
}

.profile-status:empty {
    display: none;
}

.profile-status--success {
    color: #246348;
    font-weight: 700;
}

.profile-status--error {
    color: #9d2c2c;
    font-weight: 700;
}

.activity-level-card {
    padding: 26px;
    color: #ffffff;
    background: linear-gradient(135deg, #245f49, #39715c 58%, #568c73);
}

.activity-level-card .eyebrow {
    color: #c8e7d8;
}

.activity-level-card__heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.activity-level-card__heading h2 {
    margin: 5px 0 0;
    font-size: clamp(1.4rem, 4vw, 2rem);
}

.activity-level-card__heading > strong {
    font-size: clamp(2.4rem, 8vw, 4rem);
    line-height: 0.9;
}

.activity-level-card__caption {
    margin: 7px 0 20px;
    color: #d8ebe2;
}

.activity-progress {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
}

.activity-progress span {
    display: block;
    min-width: 0;
    height: 100%;
    border-radius: inherit;
    background: #ffd76a;
}

.activity-progress__labels {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 9px;
    color: #e8f3ee;
    font-size: 0.82rem;
}

.profile-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.profile-summary-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3px 11px;
    padding: 20px;
    border: 1px solid #d7e0dc;
    border-radius: 18px;
    background: #ffffff;
}

.profile-summary-card > span:first-child {
    grid-row: span 3;
    font-size: 1.45rem;
}

.profile-summary-card strong {
    font-size: 1.6rem;
    line-height: 1;
}

.profile-summary-card > span:nth-child(3) {
    color: #43524c;
    font-weight: 700;
}

.profile-summary-card small {
    color: #7a8781;
    line-height: 1.35;
}

.profile-panel {
    padding: 26px;
}

.profile-panel__heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.profile-panel h2,
.profile-settings-panel h2 {
    margin: 5px 0 0;
    font-size: 1.35rem;
}

.profile-data-note {
    margin: 13px 0 0;
    color: #7a8781;
    font-size: 0.82rem;
}

.profile-avatar-picker[hidden] {
    display: none;
}

.profile-avatar-picker .profile-panel__heading > span {
    max-width: 280px;
    color: #718079;
    font-size: 0.85rem;
    line-height: 1.45;
    text-align: right;
}

.profile-avatar-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.profile-avatar-option {
    display: grid;
    justify-items: center;
    gap: 7px;
    min-width: 0;
    padding: 14px 10px;
    border: 1px solid #d7e0dc;
    border-radius: 16px;
    background: #ffffff;
    color: #26332e;
    cursor: pointer;
    text-align: center;
}

.profile-avatar-option:hover:not(:disabled),
.profile-avatar-option:focus-visible {
    border-color: #4e9576;
    outline: 3px solid rgba(57, 113, 92, 0.14);
}

.profile-avatar-option--selected {
    border-color: #39715c;
    background: #eef7f2;
    box-shadow: inset 0 0 0 1px #39715c;
}

.profile-avatar-option--milestone {
    border-color: #d5ad47;
    background: linear-gradient(145deg, #fffdf6, #fff4ce);
    box-shadow: 0 8px 22px rgba(181, 137, 31, 0.14);
}

.profile-avatar-option--milestone.profile-avatar-option--selected {
    box-shadow:
        inset 0 0 0 1px #b5891f,
        0 8px 22px rgba(181, 137, 31, 0.2);
}

.profile-avatar-option:disabled {
    cursor: not-allowed;
    filter: grayscale(0.8);
    opacity: 0.5;
}

.profile-avatar-option__art {
    width: 62px;
    height: 62px;
    border-radius: 20px;
    object-fit: cover;
}

.profile-avatar-option strong {
    overflow-wrap: anywhere;
}

.profile-avatar-option small {
    color: #718079;
    font-size: 0.72rem;
    line-height: 1.3;
}

.profile-avatar-theme--mint { background: linear-gradient(145deg, #d7f3e4, #9ed3b8); }
.profile-avatar-theme--blue { background: linear-gradient(145deg, #d9effa, #9bc8e0); }
.profile-avatar-theme--rose { background: linear-gradient(145deg, #ffe0e3, #efadb5); }
.profile-avatar-theme--violet { background: linear-gradient(145deg, #eee2ff, #c4a6e8); }
.profile-avatar-theme--amber { background: linear-gradient(145deg, #fff0c7, #ecc66a); }
.profile-avatar-theme--red { background: linear-gradient(145deg, #ffe1dc, #ee9d91); }
.profile-avatar-theme--navy { background: linear-gradient(145deg, #dce8f2, #8dabc3); }
.profile-avatar-theme--space { background: linear-gradient(145deg, #30374e, #675189); }

.profile-module-list {
    display: grid;
    gap: 12px;
}

.profile-module-statistic {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 48px;
    align-items: center;
    gap: 13px;
    padding: 14px;
    border-radius: 14px;
    background: #f6f9f7;
}

.profile-module-statistic__icon {
    font-size: 1.35rem;
    text-align: center;
}

.profile-module-statistic__heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.profile-module-statistic__heading span {
    color: #718079;
    font-size: 0.82rem;
}

.profile-module-progress {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #dde6e1;
}

.profile-module-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #4e9576;
}

.profile-module-statistic__percentage {
    color: #39715c;
    text-align: right;
}

.profile-settings-panel {
    display: grid;
    gap: 20px;
}

.profile-settings-panel p {
    margin: 8px 0 0;
    color: #68766f;
    line-height: 1.5;
}

.profile-username-form {
    display: grid;
    gap: 8px;
}

.profile-username-form label {
    color: #31443c;
    font-weight: 700;
}

.profile-username-form > div {
    display: flex;
    gap: 10px;
}

.profile-username-form input {
    flex: 1;
    min-width: 0;
    padding: 12px 13px;
    border: 1px solid #cbd8d2;
    border-radius: 11px;
    color: #18201d;
}

.profile-username-form input:focus {
    border-color: #39715c;
    outline: 3px solid rgba(57, 113, 92, 0.14);
}

.profile-settings-panel > .secondary-button,
.profile-signout-button {
    width: fit-content;
}

.profile-signout-button {
    padding: 4px 0;
    color: #76504b;
}

@media (max-width: 700px) {
    .profile-avatar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-summary {
        grid-template-columns: 1fr;
    }

    .profile-summary-card {
        grid-template-columns: 38px auto 1fr;
        align-items: center;
    }

    .profile-summary-card > span:first-child {
        grid-row: span 2;
    }

    .profile-summary-card small {
        grid-column: 2 / -1;
    }
}

@media (max-width: 520px) {
    .profile-identity {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-avatar-button {
        width: 94px;
        height: 94px;
        border-radius: 27px;
    }

    .profile-avatar-art {
        border-radius: 23px;
    }

    .activity-level-card__heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .activity-progress__labels,
    .profile-panel__heading,
    .profile-module-statistic__heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-module-statistic {
        grid-template-columns: 32px minmax(0, 1fr);
    }

    .profile-module-statistic__percentage {
        display: none;
    }

    .profile-username-form > div {
        flex-direction: column;
    }
}
