/* Native app parity overrides. Loaded after profile and gamification styles. */
@media (min-width: 768px) {
    .profile-app-hero { display: none !important; }
}

@media (max-width: 767px) {
    .profile-page > .profile-app-hero {
        display: block !important;
        overflow: hidden !important;
        margin: 0 0 14px !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: #fff !important;
        box-shadow: none !important;
    }

    .profile-page > section.profile-app-hero:first-child {
        margin-bottom: 0 !important;
    }

    .profile-app-hero__glass-action img {
        display: block;
        width: 22px;
        height: 22px;
        filter: brightness(0) invert(1);
    }

    .profile-page > .profile-desktop-hero { display: none !important; }

    .profile-page .profile-content-layout {
        display: flex !important;
        gap: 16px !important;
        padding: 0 12px 28px !important;
        background: #fff !important;
    }

    .profile-page .profile-main-sections { gap: 28px !important; }

    .profile-page .profile-app-tabs {
        display: flex !important;
        width: 100% !important;
        min-height: 46px !important;
        align-items: stretch !important;
        gap: 18px !important;
        overflow-x: auto !important;
        margin: 0 !important;
        padding: 0 4px !important;
        border-bottom: 1px solid #e5e7eb !important;
        scrollbar-width: none !important;
    }
    .profile-page .profile-app-tabs::-webkit-scrollbar { display: none !important; }
    .profile-page .profile-app-tabs button {
        position: relative !important;
        min-width: max-content !important;
        min-height: 46px !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        color: #7b8491 !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        white-space: nowrap !important;
    }
    .profile-page .profile-app-tabs button::after {
        position: absolute;
        right: 0;
        bottom: -1px;
        left: 0;
        height: 3px;
        border-radius: 999px 999px 0 0;
        background: transparent;
        content: '';
    }
    .profile-page .profile-app-tabs button.is-active {
        color: #111827 !important;
        font-weight: 700 !important;
    }
    .profile-page .profile-app-tabs button.is-active::after { background: #f97316; }
    .profile-page .profile-app-section-hidden { display: none !important; }
    .profile-page .profile-app-tab-empty {
        display: flex;
        min-height: 156px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 5px;
        padding: 20px;
        border: 1px solid #e5e7eb;
        border-radius: 18px;
        background: #f8fafc;
        color: #7b8491;
        text-align: center;
    }
    .profile-page .profile-app-tab-empty[hidden] { display: none !important; }
    .profile-page .profile-app-tab-empty strong { color: #111827; font-size: 14px; font-weight: 700; }
    .profile-page .profile-app-tab-empty span { max-width: 250px; font-size: 12px; line-height: 18px; }

    .profile-page .profile-mobile-sidebar-toggle {
        display: flex !important;
        width: calc(100% - 24px) !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    .profile-page .profile-mobile-sidebar-toggle__copy {
        display: flex !important;
        min-width: 0 !important;
        flex: 1 !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        text-align: left !important;
    }
    .profile-page .profile-mobile-sidebar-toggle__copy strong {
        display: flex !important;
        align-items: center !important;
        white-space: nowrap !important;
    }
    .profile-page .profile-mobile-sidebar-toggle__copy small {
        display: block !important;
        width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .profile-page .profile-route-experience,
    .profile-page #profile-photos,
    .profile-page #profile-posts,
    .profile-page .profile-achievements,
    .profile-page .profile-mobile-reference,
    .profile-page .profile-mobile-reference__visited {
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .profile-page .profile-route-experience { padding: 0 !important; }
    .profile-page .profile-route-experience__header {
        display: flex !important;
        margin: 0 4px 12px !important;
    }
    .profile-page .profile-route-experience__title {
        font-size: 20px !important;
        line-height: 1.2 !important;
        font-weight: 700 !important;
    }
    .profile-page .profile-route-experience__summary {
        margin-top: 4px !important;
        font-size: 12px !important;
    }
    .profile-page .profile-route-experience__all {
        font-size: 12px !important;
        text-transform: none !important;
        letter-spacing: 0 !important;
    }
    .profile-page .profile-route-map,
    .profile-page .profile-route-sort,
    .profile-page .profile-route-slider-controls { display: none !important; }
    .profile-page .profile-route-toolbar {
        display: block !important;
        margin-bottom: 12px !important;
    }
    .profile-page .profile-route-experience__tabs {
        display: flex !important;
        width: 100% !important;
        overflow-x: auto !important;
        border: 0 !important;
        border-bottom: 1px solid #e5e7eb !important;
        border-radius: 0 !important;
        background: transparent !important;
    }
    .profile-page .profile-route-experience__tab {
        min-height: 42px !important;
        padding: 0 12px !important;
        border: 0 !important;
        border-bottom: 3px solid transparent !important;
        border-radius: 0 !important;
        background: transparent !important;
        color: #7b8491 !important;
        font-size: 13px !important;
        font-weight: 500 !important;
    }
    .profile-page .profile-route-experience__tab.is-active {
        border-bottom-color: #f97316 !important;
        color: #111827 !important;
        font-weight: 700 !important;
    }
    .profile-page .profile-route-experience__tab-count { display: none !important; }
    .profile-page .profile-route-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        overflow: visible !important;
        padding: 0 !important;
    }
    .profile-page .profile-route-card {
        width: 100% !important;
        min-height: 0 !important;
        aspect-ratio: 1.72 !important;
        border: 0 !important;
        border-radius: 20px !important;
        box-shadow: none !important;
    }

    .profile-page .profile-mobile-reference,
    .profile-page .profile-mobile-reference__visited {
        display: flex !important;
        gap: 28px !important;
        padding: 0 4px !important;
    }
    .profile-page .profile-mobile-reference__heading { margin-bottom: 14px !important; }
    .profile-page .profile-mobile-reference__heading h3 {
        font-size: 20px !important;
        font-weight: 700 !important;
    }
    .profile-page .profile-mobile-reference__stats {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        border: 0 !important;
        border-radius: 0 !important;
    }
    .profile-page .profile-mobile-reference__stat {
        min-height: 78px !important;
        flex-direction: column !important;
        justify-content: center !important;
        gap: 7px !important;
        padding: 6px 2px !important;
        border: 0 !important;
        text-align: center !important;
    }
    .profile-page .profile-mobile-reference__stat:nth-child(n+5) { display: none !important; }
    .profile-page .profile-mobile-reference__stat > span:last-child {
        align-items: center !important;
        gap: 2px !important;
    }
    .profile-page .profile-mobile-reference__stat strong {
        font-size: clamp(12px, 3.2vw, 15px) !important;
    }
    .profile-page .profile-mobile-reference__stat small {
        font-size: 8px !important;
        white-space: nowrap !important;
    }
    .profile-page .profile-mobile-reference__icon {
        width: 42px !important;
        height: 42px !important;
        flex-basis: 42px !important;
    }

    .profile-page .profile-achievements { padding: 0 4px !important; }
    .profile-page .profile-achievements__head { align-items: center !important; }
    .profile-page .profile-achievements__eyebrow,
    .profile-page .profile-achievements__intro,
    .profile-page .profile-achievements__categories { display: none !important; }
    .profile-page .profile-achievements__head h2 {
        font-size: 20px !important;
        line-height: 1.2 !important;
        font-weight: 700 !important;
    }
    .profile-page .profile-achievements__all {
        font-size: 12px !important;
        text-transform: none !important;
        letter-spacing: 0 !important;
    }
    .profile-page .profile-achievements__featured {
        display: flex !important;
        gap: 14px !important;
        margin-top: 14px !important;
        padding-bottom: 4px !important;
        overflow-x: auto !important;
    }
    .profile-page .profile-achievements__badge {
        width: 108px !important;
        flex: 0 0 108px !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }
    .profile-page .profile-achievements__badge img {
        width: 88px !important;
        height: 88px !important;
        margin: 0 auto 8px !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }
    .profile-page .profile-achievements__badge-category {
        color: #f97316 !important;
        font-size: 9px !important;
        font-weight: 700 !important;
    }
    .profile-page .profile-achievements__badge strong {
        margin-top: 4px !important;
        font-size: 11px !important;
        line-height: 14px !important;
    }

    .profile-page #profile-photos,
    .profile-page #profile-posts { padding: 0 4px !important; }
    .profile-page #profile-photos > div:first-child { margin-bottom: 14px !important; }
    .profile-page #profile-photos h3,
    .profile-page #profile-posts > div:first-child > div:first-child h3 {
        font-size: 20px !important;
        line-height: 1.2 !important;
        font-weight: 700 !important;
    }
    .profile-page #profile-photos .profile-photos-eyebrow,
    .profile-page #profile-posts > div:first-child > div:first-child p { display: none !important; }
    .profile-page #profile-photos a[href*="albums"] {
        font-size: 12px !important;
        text-transform: none !important;
        letter-spacing: 0 !important;
    }
}

.profile-share-status {
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: max(24px, calc(env(safe-area-inset-bottom) + 14px));
    max-width: calc(100vw - 32px);
    padding: 11px 16px;
    border-radius: 999px;
    background: rgba(17, 24, 39, .94);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 12px);
    transition: opacity .18s ease, transform .18s ease;
}

.profile-share-status.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 359px) {
    .profile-app-hero__edit-cover {
        right: 10px;
        gap: 5px;
        padding: 0 8px;
        font-size: 10px;
    }

    .profile-app-hero__name-block h1 {
        font-size: 23px;
        line-height: 1.14;
    }

    .profile-app-reputation {
        width: 110px;
        flex-basis: 110px;
    }
}
