#profileBody{
    --hero-size: 24pt;
    --hero-opacity: .7;
    margin: 0;
    background: none;
    color: var(--c2);
    min-height: 100vh;
    position: relative;
}

#profileBody .profileDashboardMain--ownProfile{
    overflow-y: scroll;
}

#profileBody #leagueDashboardMain{
    background: var(--db-sidebar-elbow-color);
}

#profileBody #leagueDashboardMain > #profileShell{
    background: var(--c-page-background);
    border-top-left-radius: var(--db-sidebar-elbow-radius);
    border-bottom-left-radius: var(--db-sidebar-elbow-radius);
}

#profileShell{
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--ff1);
}

.profileShellContent{
    width: 100%;
    max-width: 1160px;
    min-width: 0;
    margin: 0 auto;
    padding: 18px;
    box-sizing: border-box;
    font-family: var(--ff1);
}

.settingsForm{
    margin: 0;
}

.profileFeedback{
    display: none;
    margin: 16px 0 0;
    padding: 10px 12px;
    border-radius: var(--r2);
    font-size: var(--fs-small);
    line-height: 1.35;
    color: var(--c2);
    border: 1px solid transparent;
}

.profileFeedback.profileFeedback--visible{
    display: block;
}

.profileFeedback.profileFeedback--success{
    background: rgba(154,255,154,.42);
    border-color: var(--c-win);
}

.profileFeedback.profileFeedback--error{
    background: rgba(255,205,222,.48);
    border-color: var(--c-loss);
}

.profileTabs{
    display: flex;
    justify-content: center;
    gap: 0;
    border-bottom: 2px solid rgba(23,33,54,.14);
    margin: 18px 0;
}

.profileTabButton{
    appearance: none;
    -webkit-appearance: none;
    background: none;
    border: 0;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: 9px 20px;
    font-family: var(--ff1);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(23,33,54,.55);
    cursor: pointer;
}

.profileTabButton.active{
    color: var(--c1);
    border-bottom-color: var(--c1);
}

.profileLayout{
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: 18px;
    align-items: start;
}

.profileCardsColumn{
    min-width: 0;
}

.profileCardsRow{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.profileSection{
    min-width: 0;
}

.profileSectionHeader{
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 8px;
    margin-bottom: 12px;
    border-bottom: 2px solid rgba(23,33,54,.14);
}

.profileSectionTitle{
    margin: 0;
    padding: 0;
    border: 0;
    font-family: var(--ff1);
    font-size: 1rem;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: var(--letter-spacing-lg);
    text-transform: uppercase;
    color: var(--c2);
}

.profileSectionTitle span{
    font-weight: 400;
    color: rgba(23,33,54,.5);
}

.profileSectionTitle--standalone{
    padding-bottom: 8px;
    margin-bottom: 12px;
    border-bottom: 2px solid rgba(23,33,54,.14);
}

.profileCardList{
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profileLinkCard{
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 10px 12px;
    box-sizing: border-box;
    background: white;
    border: 2px solid rgba(23,33,54,.14);
    border-radius: var(--r2);
    color: var(--c2);
    cursor: pointer;
}

.profileLinkCard:hover{
    border-color: var(--c-a5);
    box-shadow: 0 3px 10px rgba(23,33,54,.12);
}

.profileLinkCard:has(.profileNoEntryWarning:hover):hover,
.profileLinkCard:has(.profileNoEntryWarningTooltip:hover):hover,
.profileLinkCard:has(.profileEntryDeleteButton:hover):hover{
    border-color: rgba(23,33,54,.14);
    box-shadow: none;
}

.profileLinkCard--warning:has(.profileNoEntryWarning:hover):hover,
.profileLinkCard--warning:has(.profileNoEntryWarningTooltip:hover):hover{
    border-color: rgba(255,196,0,.85);
}

.profileEntryDeleteForm{
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(50%, -50%);
    z-index: 3;
    margin: 0;
}

.profileEntryDeleteButton{
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #d10000;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: transform .15s ease;
    transform-origin: center;
}

.profileEntryDeleteButton::before{
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1em;
    height: 1em;
    border-radius: 50%;
    background: var(--sc1);
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.profileEntryDeleteButton i{
    position: relative;
}

.profileEntryDeleteButton:hover{
    transform: scale(1.1);
}

.profileEntryDeleteButton:focus-visible{
    outline: 2px solid rgba(209,0,0,.3);
    outline-offset: 2px;
    border-radius: 50%;
}

.profileLinkCard--warning{
    border-color: rgba(255,196,0,.85);
}

.profileCardLogo{
    --profile-card-logo-color: var(--c1);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--c2);
    border: 3px solid var(--c1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: visible;
}

.profileCardLogo:has(> .profileCardLogoImage){
    background: var(--profile-card-logo-color);
}

.profileCardLogoImage{
    width: 100%;
    height: 100%;
    object-fit: contain;
    box-sizing: border-box;
    border-radius: 50%;
    transform-origin: center;
}

.profileCardLogoIcon{
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
}

.profileCardInfo{
    flex: 1 1 auto;
    min-width: 0;
}

.profileCardName{
    font-size: 1rem;
    line-height: 1.18;
    font-weight: 700;
    color: var(--c2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profileCardLeague{
    margin-top: 2px;
    font-size: .72rem;
    line-height: 1.2;
    color: rgba(23,33,54,.58);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profileEntryLeagueLink{
    color: rgba(23,33,54,.58);
    text-decoration: none;
}

.profileEntryLeagueLink:hover{
    color: var(--c-a5);
}

.profileCardMetric{
    flex: 0 0 auto;
    min-width: 54px;
    text-align: right;
}

.profileCardMetric--rank{
    min-width: 66px;
    padding-left: 10px;
    border-left: 1px solid rgba(23,33,54,.14);
}

.profileCardMetricLabel{
    font-size: .58rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(23,33,54,.5);
}

.profileCardMetricValue{
    margin-top: 3px;
    font-size: 1.35rem;
    line-height: 1;
    font-weight: 700;
    color: var(--c2);
}

.profileCardMetricValue span{
    font-size: .78rem;
    font-weight: 400;
    color: rgba(23,33,54,.55);
}

.profileNoEntryWarning{
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 0;
    cursor: help;
    position: absolute;
    top: -7px;
    left: -7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    color: #d59a00;
    font-size: 1rem;
    line-height: 1;
    isolation: isolate;
    padding: 0;
    z-index: 3;
}

.profileNoEntryWarning i{
    position: relative;
    z-index: 2;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
    pointer-events: none;
}

.profileNoEntryWarning::after{
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    width: .13em;
    height: .38em;
    border-radius: var(--r-pill);
    background: var(--sc1);
    box-shadow: 0 .31em 0 -.015em #fff;
    transform: translate(-50%, -42%);
}

.profileNoEntryWarningTooltip{
    position: absolute;
    top: 1px;
    left: 13px;
    z-index: 4;
    width: max-content;
    max-width: min(240px, calc(100vw - 40px));
    padding: 6px 8px;
    border-radius: var(--r1);
    background: var(--c2);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.25;
    box-shadow: 0 6px 18px rgba(23, 33, 54, .22);
    text-align: left;
    transform: translateY(-50%);
}

.profileNoEntryWarningTooltip[hidden]{
    display: none;
}

.profileEmptyState{
    display: block;
    padding: 12px 14px;
    border-radius: var(--r2);
    background: white;
    border: 1px solid rgba(23,33,54,.14);
    color: rgba(23,33,54,.65);
    font-size: .82rem;
    line-height: 1.35;
}

.profileEmptyState--link{
    text-decoration: none;
}

.profileEmptyState--link span{
    color: var(--c1);
    font-weight: 700;
}

.profileArchiveView{
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profileArchiveYear{
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0 -2px;
}

.profileArchiveYear::after{
    content: "";
    height: 1px;
    flex: 1 1 auto;
    background: rgba(23,33,54,.14);
}

.profileArchiveYearLabel{
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(23,33,54,.55);
}

.profileArchiveToggle{
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 16px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.profileArchiveToggle span{
    height: 1px;
    flex: 1 1 auto;
    background: rgba(23,33,54,.14);
}

.profileArchiveToggle strong{
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(23,33,54,.58);
}

.profileStatsColumn{
    min-width: 0;
}

.profileStatsGrid{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.profileStat{
    min-width: 0;
    padding: 12px 10px;
    border: 2px solid rgba(23,33,54,.14);
    border-radius: var(--r2);
    background: white;
    text-align: center;
}

.profileStatValue{
    font-size: 1.45rem;
    line-height: 1;
    font-weight: 700;
    color: var(--c2);
}

.profileStatLabel{
    margin-top: 5px;
    font-size: .6rem;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(23,33,54,.55);
}

.profileTrophyList{
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profileTrophyCard{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 2px solid rgba(23,33,54,.14);
    border-radius: var(--r2);
    background: white;
}

.profileTrophyIcon{
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: white;
    background: var(--c1);
}

.profileTrophyIcon--1{
    background: #c69214;
}

.profileTrophyIcon--2{
    background: #79818c;
}

.profileTrophyIcon--3{
    background: #99611f;
}

.profileTrophyInfo{
    min-width: 0;
    flex: 1 1 auto;
}

.profileTrophyLeague{
    font-size: .88rem;
    line-height: 1.18;
    font-weight: 700;
    color: var(--c2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profileTrophyMeta{
    margin-top: 2px;
    font-size: .72rem;
    color: rgba(23,33,54,.58);
}

.profileTrophyRank{
    flex: 0 0 auto;
    font-size: .72rem;
    line-height: 1.2;
    font-weight: 700;
    color: rgba(23,33,54,.58);
}

.profileSettingsGrid{
    display: grid;
    grid-template-columns: minmax(280px, .9fr) minmax(360px, 1.1fr);
    gap: 18px;
    align-items: start;
    max-width: 900px;
    margin: 0 auto;
}

.profilePreferenceStack{
    display: grid;
    gap: 8px;
}

.profileToggleRow{
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    background: white;
    border: 1px solid rgba(23,33,54,.14);
}

.profileToggleRow--top{
    border-radius: var(--r2) var(--r2) 0 0;
    border-bottom: 0;
}

.profileToggleRow--middle{
    border-bottom: 0;
}

.profileToggleRow--bottom{
    border-radius: 0 0 var(--r2) var(--r2);
}

.profileToggleRow--standalone{
    border-radius: var(--r2);
}

.profileToggleBody{
    flex: 1 1 auto;
    min-width: 0;
}

.profileToggleLabel{
    font-size: .9rem;
    line-height: 1.2;
    font-weight: 700;
    color: var(--c2);
}

.profileToggleHint{
    margin-top: 3px;
    font-size: .78rem;
    line-height: 1.3;
    color: rgba(23,33,54,.58);
}

.profilePreferenceCheckboxRow{
    cursor: pointer;
}

.profilePreferenceCheckbox{
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    margin: 0;
    accent-color: var(--c1);
}

.profilePreferenceActionButton{
    appearance: none;
    -webkit-appearance: none;
    border-color: rgba(23,33,54,.14);
    box-sizing: border-box;
    color: var(--c2);
    cursor: pointer;
    font: inherit;
    text-align: left;
    width: 100%;
}

.profilePreferenceActionButton:hover{
    border-color: var(--c-a5);
    box-shadow: 0 3px 10px rgba(23,33,54,.12);
}

.profilePreferenceActionIcon{
    align-items: center;
    background: var(--c2);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    flex: 0 0 32px;
    height: 32px;
    justify-content: center;
    width: 32px;
}

#profileBody #background.entrySettingsBackdrop{
    background: #000;
    position: fixed;
    top: var(--db-edge-gap);
    right: var(--db-edge-gap);
    bottom: var(--db-edge-gap);
    left: calc(var(--sb-width) + var(--db-sidebar-gap));
    width: auto;
    height: auto;
    border-radius: 0;
}

#profileBody #alertSettingsModalWindow.alertSettingsModalWindow{
    background: var(--c2);
    box-sizing: border-box;
    color: #1c2d3f;
    height: auto;
    left: calc(var(--sb-width) + var(--db-sidebar-gap) + var(--db-edge-gap));
    margin-left: auto;
    margin-right: auto;
    max-height: calc(100vh - 100px);
    max-width: calc(
        100vw - var(--sb-width) - var(--db-sidebar-gap) -
            var(--db-edge-gap) - 32px
    );
    right: var(--db-edge-gap);
    transform: translateY(-50%);
    width: fit-content;
    z-index: 99;
}

.profileToggleSwitch{
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex: 0 0 auto;
}

.profileToggleSwitch input{
    opacity: 0;
    width: 0;
    height: 0;
}

.profileToggleSlider{
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 20px;
    cursor: pointer;
    transition: background .2s;
}

.profileToggleSlider::before{
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    transition: transform .2s;
    box-shadow: 0 1px 2px rgba(0,0,0,.24);
}

.profileToggleSwitch input:checked + .profileToggleSlider{
    background: var(--c1);
}

.profileToggleSwitch input:checked + .profileToggleSlider::before{
    transform: translateX(16px);
}

.profileFormFull{
    width: 100%;
}

.profilePasswordGrid{
    display: grid;
    gap: 12px;
}

.profileField{
    display: block;
    min-width: 0;
}

.profileField--full{
    width: 100%;
}

.profileInputShell{
    position: relative;
    display: block;
}

.profileFieldLabel{
    display: block;
    margin-bottom: 5px;
    font-size: .78rem;
    line-height: 1.2;
    font-weight: 700;
    color: rgba(23,33,54,.72);
}

.profileInput{
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid rgba(23,33,54,.38);
    border-radius: var(--r2);
    color: var(--c2);
    font-family: var(--ff1);
    font-size: var(--fs-small);
    background: white;
}

.profileInput--withAction{
    padding-right: 42px;
}

.profileInput--readonly{
    cursor: default;
    background: #f8f8f8;
}

.profileFieldError{
    display: block;
    min-height: 16px;
    margin-top: 5px;
    font-size: .72rem;
    line-height: 1.25;
    color: #b00020;
}

.profileField.profileField--error .profileInput{
    border-color: #b00020;
    box-shadow: 0 0 0 2px rgba(255,205,222,.72);
}

.profileInlineActionButton{
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--c2);
    cursor: pointer;
}

.profileInlineActionButton:disabled{
    cursor: default;
    opacity: .6;
}

.profileInlineActionIcon{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.profileInlineActionIcon i{
    font-size: 16px;
    line-height: 1;
}

.profileInlineActionButton[data-mode="view"] .profileInlineActionIcon--confirm,
.profileInlineActionButton[data-mode="confirm"] .profileInlineActionIcon--edit{
    display: none;
}

.profileSubmitButton{
    display: block;
    margin: 12px auto 0;
    border: 1px solid var(--c2);
    border-radius: var(--r2);
    padding: 9px 16px;
    background: var(--c2);
    color: white;
    font-family: var(--ff1);
    font-size: var(--fs-small);
    font-weight: 700;
    cursor: pointer;
}

.profileSubmitButton:hover{
    background: var(--c1);
    border-color: var(--c1);
}

.profileSubmitButton:disabled{
    cursor: default;
    opacity: .6;
}

@media screen and (max-width: 980px){
    .profileShellContent{
        padding: 14px;
    }

    .profileLayout,
    .profileSettingsGrid{
        grid-template-columns: 1fr;
    }

    .profileCardsRow{
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 620px){
    .profileShellContent{
        padding: 10px;
    }

    .profileTabButton{
        padding: 8px 14px;
    }

    .profileLinkCard{
        gap: 9px;
        padding: 9px;
    }

    .profileCardLogo{
        width: 40px;
        height: 40px;
    }

    .profileCardMetric{
        min-width: 46px;
    }

    .profileCardMetric--rank{
        min-width: 58px;
        padding-left: 7px;
    }

    .profileCardMetricValue{
        font-size: 1.12rem;
    }

    .profileToggleRow{
        padding: 11px;
    }

    #profileBody #background.entrySettingsBackdrop{
        left: 0;
        right: 0;
    }

    #profileBody #alertSettingsModalWindow.alertSettingsModalWindow{
        left: 50%;
        max-width: calc(100vw - 24px);
        right: auto;
        transform: translate(-50%, -50%);
        width: calc(100vw - 24px);
    }
}
