/* Profile */
.profile-hero {
    border-bottom: 1px solid var(--color-border);
}

.profile-cover {
    height: 196px;
}

.profile-cover > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-cover__line {
    position: absolute;
    right: 11%;
    bottom: 20%;
    width: 58%;
    height: 48%;
    border: 2px solid rgba(255, 255, 255, .55);
    border-radius: 50%;
    transform: rotate(-9deg);
}

.profile-main {
    position: relative;
    padding: 0 20px 23px;
}

.profile-avatar-wrap {
    height: 48px;
}

.profile-avatar-wrap .avatar {
    position: absolute;
    top: -49px;
}

.profile-header-aside {
    position: absolute;
    top: 12px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.profile-actions {
    display: flex;
    gap: 7px;
}

.profile-actions .icon-button {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
}

.profile-block-action {
    color: var(--color-tertiary);
}

.profile-identity {
    display: grid;
    line-height: 1.35;
    max-width: calc(100% - 160px);
}

.profile-identity h2 {
    font-size: 22px;
    letter-spacing: -.035em;
}

.profile-identity span,
.profile-location {
    color: var(--color-text-muted);
    font-size: 12px;
}

.profile-block-status {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface-muted);
}

.profile-block-status > .rs-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    color: var(--color-primary);
}

.profile-block-status p {
    display: grid;
    gap: 3px;
}

.profile-block-status b {
    font-size: 12px;
}

.profile-block-status span {
    color: var(--color-text-muted);
    font-size: 10px;
    line-height: 1.5;
}

.profile-bio-wrap,
.profile-bio {
    max-width: 560px;
    margin-top: 13px;
}

.profile-bio-wrap[data-profile-bio-ready] .profile-bio {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 0;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-height: 1.75;
}

.profile-bio-wrap[data-profile-bio-ready] .profile-bio.is-expanded {
    display: block;
    overflow: visible;
}

.profile-bio__toggle {
    margin-top: 3px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}

.profile-bio__toggle:hover {
    text-decoration: underline;
}

.profile-bio__toggle:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

.profile-empty-copy {
    color: var(--color-text-muted);
}

.profile-location {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 9px;
}

.profile-location .rs-icon {
    width: 15px;
    height: 15px;
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 15px;
}

.profile-tags span {
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--color-surface-muted);
    color: var(--color-text-muted);
    font-size: 10px;
}

.profile-stats {
    display: flex;
    gap: 18px;
    margin-top: 0;
    text-align: center;
}

.profile-stats--own {
    gap: 18px;
    margin-top: 0;
    text-align: center;
}

.profile-stats a,
.profile-stats > div {
    display: grid;
    justify-items: center;
    line-height: 1.3;
    text-decoration: none;
    color: inherit;
}

.profile-stats b {
    font-size: 15px;
}

.profile-stats span {
    color: var(--color-text-muted);
    font-size: 10px;
}

.profile-tabs {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--color-border);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.profile-tabs::-webkit-scrollbar {
    display: none;
}

.profile-tabs button,
.profile-tabs a {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 50px;
    padding: 0 14px;
    flex: 1 0 auto;
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    font-weight: 650;
    font-size: 13px;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.profile-tabs button.is-active,
.profile-tabs a.is-active {
    color: var(--color-text);
}

.profile-tabs button.is-active::after,
.profile-tabs a.is-active::after {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 2px;
    border-radius: 999px;
    background: var(--color-primary);
    content: "";
}

.profile-tabs--single {
    display: grid;
    grid-template-columns: 1fr;
}

.profile-feed {
    display: grid;
}

.profile-post {
    display: grid;
    grid-template-columns: minmax(0, 130px) minmax(0, 1fr);
    gap: 14px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--color-border);
}

.profile-post > .placeholder-photo,
.profile-post > .run-summary-card,
.profile-post__media {
    min-height: 108px;
    aspect-ratio: 1.2;
    border-radius: 12px;
}

.profile-post__media {
    position: relative;
    display: grid;
    width: 100%;
    min-width: 0;
    min-height: 0;
    place-items: center;
    overflow: hidden;
    background: var(--color-surface-muted);
    color: var(--color-text-muted);
}

.profile-post__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-post__media .rs-icon {
    width: 24px;
    height: 24px;
}

.profile-post > div:last-child {
    display: grid;
    min-width: 0;
    overflow: hidden;
    align-content: center;
    gap: 6px;
}

.profile-post p {
    min-width: 0;
    overflow-wrap: anywhere;
}

.profile-page-more,
.bookmark-page-more {
    justify-self: center;
    margin: 16px auto 22px;
}

.profile-post small,
.profile-post span {
    color: var(--color-text-muted);
    font-size: 10px;
}

.profile-post .rs-icon {
    display: inline;
    width: 13px;
    height: 13px;
    vertical-align: -2px;
}

.run-summary-card--mini {
    min-height: 108px;
    padding: 12px;
}

.run-summary-card--mini b {
    font-size: 14px;
}

.run-summary-card--mini .run-route {
    inset: 42% 8% 8%;
}

.empty-state {
    display: grid;
    place-items: center;
    min-height: 260px;
    padding: 40px;
    color: var(--color-text-muted);
    text-align: center;
}

.empty-state > .rs-icon {
    width: 30px;
    height: 30px;
    margin-bottom: 12px;
    color: var(--color-primary);
}

.empty-state h3 {
    color: var(--color-text);
}

.empty-state p {
    margin-top: 5px;
    font-size: 12px;
}

.profile-edit-form {
    padding-bottom: 0;
}

.edit-visuals {
    position: relative;
    padding-bottom: 50px;
}

.edit-visuals .profile-cover {
    height: 185px;
}

.asset-file-input {
    display: none;
}

.image-edit-button {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 11px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 999px;
    background: rgba(44, 38, 34, .55);
    color: #fff;
    font-size: 11px;
    backdrop-filter: blur(8px);
}

.image-edit-button .rs-icon {
    width: 15px;
    height: 15px;
}

.edit-cover-upload {
    top: 134px;
    bottom: auto;
}

.edit-avatar {
    position: absolute;
    bottom: 4px;
    left: 20px;
}

.edit-avatar > button {
    position: absolute;
    right: -3px;
    bottom: 2px;
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    padding: 0;
    border: 2px solid var(--color-surface);
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
}

.edit-avatar .rs-icon {
    width: 14px;
    height: 14px;
}

.profile-asset-status {
    position: absolute;
    right: 20px;
    bottom: 17px;
    left: 132px;
    color: var(--color-text-muted);
    font-size: 11px;
    line-height: 1.45;
}

.profile-asset-status.is-error {
    color: #8c352d;
}

.profile-asset-status.is-success {
    color: #356b49;
}

.profile-cropper {
    width: min(calc(100% - 32px), 680px);
    max-height: calc(100dvh - 32px);
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 22px;
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: 0 24px 70px rgba(39, 30, 24, .28);
}

.profile-cropper::backdrop {
    background: rgba(37, 30, 26, .62);
    backdrop-filter: blur(5px);
}

.profile-cropper__panel {
    max-height: calc(100dvh - 32px);
    padding: 20px;
    overflow-y: auto;
}

.profile-cropper__header,
.profile-cropper__actions,
.profile-cropper__zoom {
    display: flex;
    align-items: center;
}

.profile-cropper__header {
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.profile-cropper__header > div {
    display: grid;
    gap: 2px;
}

.profile-cropper__header small,
.profile-cropper__hint {
    color: var(--color-text-muted);
}

.profile-cropper__header small {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
}

.profile-cropper__header h2 {
    font-size: 20px;
}

.profile-cropper__close {
    font-size: 25px;
    font-weight: 300;
    line-height: 1;
}

.profile-cropper__stage {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
    background: #292724;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
    touch-action: none;
    user-select: none;
}

.profile-cropper__stage.is-avatar {
    width: min(100%, 420px);
    margin-inline: auto;
    border-radius: 50%;
}

.profile-cropper__canvas {
    display: block;
    width: 100%;
    height: auto;
    cursor: grab;
    outline: none;
}

.profile-cropper__canvas:focus-visible {
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .9);
}

.profile-cropper__stage.is-dragging .profile-cropper__canvas {
    cursor: grabbing;
}

.profile-cropper__guide {
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .76);
}

.profile-cropper__stage.is-avatar .profile-cropper__guide {
    border-radius: 50%;
    box-shadow:
        inset 0 0 0 2px rgba(255, 255, 255, .9),
        inset 0 0 36px rgba(0, 0, 0, .22);
}

.profile-cropper__hint {
    display: grid;
    gap: 3px;
    margin-top: 12px;
    font-size: 11px;
    text-align: center;
}

.profile-cropper__hint b {
    color: var(--color-sage);
    font-weight: 650;
}

.profile-cropper__zoom {
    gap: 12px;
    margin-top: 16px;
}

.profile-cropper__zoom > span,
.profile-cropper__zoom output {
    flex: 0 0 auto;
    min-width: 36px;
    font-size: 11px;
    font-weight: 650;
}

.profile-cropper__zoom input {
    width: 100%;
    accent-color: var(--color-primary);
}

.profile-cropper__zoom output {
    color: var(--color-text-muted);
    text-align: right;
}

.profile-cropper__status {
    min-height: 20px;
    margin-top: 8px;
    color: #8c352d;
    font-size: 11px;
    text-align: right;
}

.profile-cropper__actions {
    justify-content: flex-end;
    gap: 10px;
    margin-top: 4px;
}

.form-section {
    padding: 0 20px 24px;
    border-bottom: 1px solid var(--color-border);
}

.profile-edit-form > .form-section:last-of-type {
    border-bottom: none;
    padding-bottom: 32px;
}

.field--chips {
    margin-top: 18px;
}

.profile-edit-form > .sticky-form-action {
    margin-top: 0;
    margin-inline: 0;
    padding: 14px 20px;
    border-top: 1px solid var(--color-border);
    background: rgba(255, 253, 249, .95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 -4px 16px rgba(44, 38, 34, .04);
}

