/*
 * LUMINA PROFILE STANDARD v1.1
 * One unified, responsive layout contract for EVERY profile in LUMINA (existing, dynamic, and new).
 * Reference Profile: /mariusz
 *
 * Contract:
 * - Cover: Master 1920x640 (3:1 aspect ratio), fluid responsive height, central Safe Zone (640x640)
 * - Avatar: 1:1 circle, object-fit: cover, object-position: center, uniform LUMINA border & gold glow
 *   - Desktop: 160x160 px (-80px cover overlap)
 *   - Tablet (769px-1024px): 128x128 px (-64px cover overlap)
 *   - Mobile (<=768px): 96x96 px (-48px cover overlap)
 *   - Small Mobile (<=360px): min 88x88 px (-44px cover overlap)
 * - Layout: Cover -> Avatar overlapping cover edge -> Name & details & actions
 * - Safe: No horizontal overflow, zero collisions, accessible fallbacks
 */

/* Intelligent minimalism: original actions remain available, without covering avatars. */
/* Decorative cover caption only: profile identity below the cover remains visible. */
body.lumina-profile-standard .cover-badge-banner:not(:focus-within) {
    animation: lumina-cover-caption-fade 600ms ease 5s forwards;
}
@keyframes lumina-cover-caption-fade {
    to { opacity: 0; visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
    body.lumina-profile-standard .cover-badge-banner:not(:focus-within) { animation-duration: 1ms; }
}
body.lumina-profile-standard .profile-actions-more { display: contents !important; }
body.lumina-profile-standard .profile-actions-more[hidden] { display: none !important; }
body.lumina-profile-standard .profile-actions-compact :is(button, a):is([hidden], [style*="display:none"], [style*="display: none"]) {
    display: none !important;
}
body.lumina-profile-standard .profile-actions-more > summary {
    display: inline-flex; align-items: center; justify-content: center;
    box-sizing: border-box; cursor: pointer; list-style: none;
    width: 44px; height: 44px; min-width: 44px; flex: 0 0 44px;
    border-radius: 50%; border: 1px solid #a89570;
    background: #17223b; color: #ffffff; font-size: 26px;
}
body.lumina-profile-standard .profile-actions-more > summary::-webkit-details-marker { display: none; }
body.lumina-profile-standard .profile-actions-more > summary > [aria-hidden] {
    display: inline !important; font-size: 26px !important; color: inherit !important;
}
body.lumina-profile-standard .profile-action-label { display: none; }
body.lumina-profile-standard .profile-actions-more:not([open]) > .profile-actions-panel { display: none; }
body.lumina-profile-standard .profile-actions-more[open] > .profile-actions-panel {
    display: grid; grid-template-columns: 1fr; gap: 8px;
    width: 100%; flex: 0 0 100%; min-width: 0;
    padding: 8px 0; box-sizing: border-box;
}
body.lumina-profile-standard :is(.head-actions, .hero-actions).profile-actions-compact .profile-actions-panel > :is(button, a) {
    position: static !important; transform: none !important;
    box-sizing: border-box !important; min-height: 44px !important; height: auto !important;
    width: 100% !important; max-width: 100% !important; margin: 0 !important;
    padding: 12px 16px !important; text-align: left; white-space: normal !important;
    background: #17223b !important; color: #fff !important; border: 1px solid #a89570 !important;
    border-radius: 12px !important; font-size: 0.9rem !important;
}
body.lumina-profile-standard .profile-actions-panel > .profile-avatar-utility {
    opacity: 1 !important; visibility: visible !important; pointer-events: auto !important;
}
body.lumina-profile-standard .profile-actions-compact .profile-actions-panel :is(.btn-text, .profile-action-label) {
    display: inline !important; font-size: inherit !important; color: inherit !important;
}
body.lumina-profile-standard .profile-actions-compact .profile-actions-panel i { color: currentColor !important; }
html[data-lumina-theme="light"] body.lumina-profile-standard .profile-actions-compact :is(.profile-actions-more > summary, .profile-actions-panel > button, .profile-actions-panel > a) {
    background: #f5f2eb !important; color: #292524 !important;
}
body.lumina-profile-standard .profile-actions-more > summary:focus-visible {
    outline: 3px solid #b88e3e; outline-offset: 3px;
}
@media (max-width: 768px) {
    body.lumina-profile-standard :is(.head-actions, .hero-actions).profile-actions-compact {
        flex-wrap: wrap !important; overflow: visible !important; gap: 8px !important;
    }
    body.lumina-profile-standard :is(.head-actions, .hero-actions).profile-actions-compact > :is(button, a) {
        width: 44px !important; min-width: 44px !important; height: 44px !important;
        min-height: 44px !important; max-height: 44px !important;
        padding: 0 !important; flex: 0 0 44px !important; font-size: 0 !important;
        color: #ffffff !important;
    }
    body.lumina-profile-standard :is(.head-actions, .hero-actions).profile-actions-compact > :is(button, a) :is(.btn-text, #followBtnText, #followCountBadge, #heartBtnText, #heartCountBadge, .btn-divider, .profile-action-label) {
        display: none !important;
    }
    body.lumina-profile-standard :is(.head-actions, .hero-actions).profile-actions-compact > :is(button, a) i { font-size: 1rem !important; }
    html[data-lumina-theme="light"] body.lumina-profile-standard :is(.head-actions, .hero-actions).profile-actions-compact > :is(button, a) {
        color: #292524 !important;
    }
}

html body.lumina-profile-standard {
    --profile-shell-width: 1200px;
    --profile-page-gutter: clamp(12px, 2.4vw, 24px);
    --profile-card-radius: 20px;
    --gold-accent: #d4a94a;
    --gold-glow: rgba(212, 169, 74, 0.35);
    --navy-dark: #070e24;
    --navy-card: #0b1838;
    --navy-border: rgba(255, 255, 255, 0.1);
    overflow-x: clip !important;
}

/* Light surfaces must not inherit the pale labels intended for dark cards.
 * Keep this contract specific enough to win over the shared layout rules. */
:is(html[data-lumina-theme="light"], html[data-theme="light"]) body.lumina-profile-standard,
body.lumina-profile-standard.theme-lumina-light {
    --profile-text: #292524;
    --profile-muted: #57534e;
    --profile-gold-text: #765414;
}

:is(html[data-lumina-theme="light"], html[data-theme="light"]) body.lumina-profile-standard :is(.info-val, .info-row > div, #userBioFull),
body.lumina-profile-standard.theme-lumina-light :is(.info-val, .info-row > div, #userBioFull) {
    color: var(--profile-text) !important;
    overflow-wrap: anywhere;
}

:is(html[data-lumina-theme="light"], html[data-theme="light"]) body.lumina-profile-standard :is(#userMatchEl, #userMatchEl i, .verse-ref),
body.lumina-profile-standard.theme-lumina-light :is(#userMatchEl, #userMatchEl i, .verse-ref) {
    color: var(--profile-gold-text) !important;
}

:is(html[data-lumina-theme="light"], html[data-theme="light"]) body.lumina-profile-standard #userStatusEl a,
body.lumina-profile-standard.theme-lumina-light #userStatusEl a {
    color: #9d174d !important;
    text-decoration: underline;
    text-underline-offset: 3px;
}

:is(html[data-lumina-theme="light"], html[data-theme="light"]) body.lumina-profile-standard .sidebar-card > div > :is(span, a),
body.lumina-profile-standard.theme-lumina-light .sidebar-card > div > :is(span, a) {
    color: var(--profile-text) !important;
}

:is(html[data-lumina-theme="light"], html[data-theme="light"]) body.lumina-profile-standard .sidebar-card .btn-action-secondary,
body.lumina-profile-standard.theme-lumina-light .sidebar-card .btn-action-secondary {
    color: var(--profile-text) !important;
    background: #f5f2eb !important;
    border-color: #b5a48b !important;
    min-height: 44px !important;
}

:is(html[data-lumina-theme="light"], html[data-theme="light"]) body.lumina-profile-standard :is(.stat-tag-chip, .badge-visibility-pub, .badge-visibility-priv),
body.lumina-profile-standard.theme-lumina-light :is(.stat-tag-chip, .badge-visibility-pub, .badge-visibility-priv) {
    background: #f5f2eb !important;
    color: #44403c !important;
    border-color: #b5a48b !important;
}

:is(html[data-lumina-theme="light"], html[data-theme="light"]) body.lumina-profile-standard :is(.stat-tag-chip, .badge-visibility-pub, .badge-visibility-priv) *,
body.lumina-profile-standard.theme-lumina-light :is(.stat-tag-chip, .badge-visibility-pub, .badge-visibility-priv) * {
    color: inherit !important;
}

:is(html[data-lumina-theme="light"], html[data-theme="light"]) body.lumina-profile-standard .followed-friends-card :is(div, span, p, strong, a),
body.lumina-profile-standard.theme-lumina-light .followed-friends-card :is(div, span, p, strong, a) {
    color: var(--profile-text) !important;
}

:is(html[data-lumina-theme="light"], html[data-theme="light"]) body.lumina-profile-standard .followed-friends-card :is(input, button, .followed-friends-badge, .btn-discover-all-friends),
body.lumina-profile-standard.theme-lumina-light .followed-friends-card :is(input, button, .followed-friends-badge, .btn-discover-all-friends) {
    background: #f5f2eb !important;
    color: var(--profile-text) !important;
    border: 1px solid #a8987e !important;
}

:is(html[data-lumina-theme="light"], html[data-theme="light"]) body.lumina-profile-standard .followed-friends-card input::placeholder,
body.lumina-profile-standard.theme-lumina-light .followed-friends-card input::placeholder {
    color: var(--profile-muted) !important;
    opacity: 1;
}

:is(html[data-lumina-theme="light"], html[data-theme="light"]) body.lumina-profile-standard .mission-live-broadcast-card :is(.post-content > div, .post-author),
body.lumina-profile-standard.theme-lumina-light .mission-live-broadcast-card :is(.post-content > div, .post-author) {
    color: var(--profile-text) !important;
}

:is(html[data-lumina-theme="light"], html[data-theme="light"]) body.lumina-profile-standard .mission-live-broadcast-card :is(.post-time, .mission-live-pill, .live-viewer-chip),
body.lumina-profile-standard.theme-lumina-light .mission-live-broadcast-card :is(.post-time, .mission-live-pill, .live-viewer-chip) {
    color: #991b1b !important;
}

/* Legacy profile class names still used by public aliases. Keep media overlays
 * dark, but make navigation, profile copy and feed/sidebar surfaces readable. */
html[data-lumina-theme="light"] body.lumina-profile-standard :is(.profile-navbar, .side-card, .feed-post-card) {
    background: #ffffff !important;
    border-color: #ddd5c8 !important;
    color: #292524 !important;
}
html[data-lumina-theme="light"] body.lumina-profile-standard :is(.profile-title-name, .side-title, .post-title, .post-author-name, .post-text-content, .profile-meta-row, .info-label, .post-time, .side-card p, .side-card > div, .feed-post-card p) {
    color: #292524 !important;
}
html[data-lumina-theme="light"] body.lumina-profile-standard .nav-brand-title {
    background: none !important;
    color: #292524 !important;
    -webkit-text-fill-color: #292524 !important;
}
html[data-lumina-theme="light"] body.lumina-profile-standard :is(.nav-link-btn, .btn-nav-back, .tag-pill, .post-series-tag, .post-badge-daily, .post-action-btn, .verse-box, .post-highlight) {
    background: #f5f2eb !important;
    color: #514137 !important;
    border-color: #b5a48b !important;
}

/* 44px controls, visible keyboard focus and a readable selected tab. */
:is(html[data-lumina-theme="light"], html[data-theme="light"]) body.lumina-profile-standard :is(.head-actions, .hero-actions) > :is(button, a),
:is(html[data-lumina-theme="light"], html[data-theme="light"]) body.lumina-profile-standard .profile-nav-tabs .tab-btn,
body.lumina-profile-standard.theme-lumina-light :is(.head-actions, .hero-actions) > :is(button, a),
body.lumina-profile-standard.theme-lumina-light .profile-nav-tabs .tab-btn {
    min-height: 44px !important;
    height: auto !important;
    max-height: none !important;
    min-width: 44px !important;
    color: var(--profile-muted) !important;
}

:is(html[data-lumina-theme="light"], html[data-theme="light"]) body.lumina-profile-standard .profile-nav-tabs .tab-btn.active,
body.lumina-profile-standard.theme-lumina-light .profile-nav-tabs .tab-btn.active {
    background: #765414 !important;
    color: #ffffff !important;
}

:is(html[data-lumina-theme="light"], html[data-theme="light"]) body.lumina-profile-standard .profile-nav-tabs .tab-btn :is(i, .tab-text),
body.lumina-profile-standard.theme-lumina-light .profile-nav-tabs .tab-btn :is(i, .tab-text) {
    color: inherit !important;
}

:is(html[data-lumina-theme="light"], html[data-theme="light"]) body.lumina-profile-standard :is(button, a, input, textarea, select):focus-visible,
body.lumina-profile-standard.theme-lumina-light :is(button, a, input, textarea, select):focus-visible {
    outline: 3px solid #765414 !important;
    outline-offset: 3px;
    scroll-margin-block: 90px 160px;
}

body.lumina-profile-standard .profile-container {
    box-sizing: border-box !important;
    width: min(100%, var(--profile-shell-width)) !important;
    max-width: var(--profile-shell-width) !important;
    margin-inline: auto !important;
    padding: 0 var(--profile-page-gutter) 88px !important;
    overflow-x: clip !important;
}

body.lumina-profile-standard #profilePublicView {
    width: 100% !important;
    min-width: 0 !important;
}

/* ══════════ 1. PROFILE COVER (STANDARD 3:1) ══════════ */
body.lumina-profile-standard .cover-wrapper,
body.lumina-profile-standard .profile-hero > div:first-child,
body.lumina-profile-standard .lumina-profile-cover {
    box-sizing: border-box !important;
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 540px !important;
    aspect-ratio: 3 / 1 !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-radius: 0 0 var(--profile-card-radius) var(--profile-card-radius) !important;
    background: #080d1a !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4) !important;
}

body.lumina-profile-standard .cover-photo,
body.lumina-profile-standard .cover-video,
body.lumina-profile-standard .cover-video-iframe,
body.lumina-profile-standard .hero-cover,
body.lumina-profile-standard .lumina-profile-cover img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
}

/* ══════════ 2. PROFILE HEAD CARD & LAYOUT ══════════ */
body.lumina-profile-standard .profile-head-card,
body.lumina-profile-standard .hero-info-bar,
body.lumina-profile-standard .lumina-profile-head-card {
    box-sizing: border-box !important;
    position: relative !important;
    width: calc(100% - 40px) !important;
    max-width: none !important;
    margin: 0 auto !important;
    padding: 0 24px 24px !important;
    overflow: visible !important;
    border-radius: var(--profile-card-radius) !important;
    z-index: 10 !important;
}

body.lumina-profile-standard .profile-head-top,
body.lumina-profile-standard .profile-head-main {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important;
    gap: 20px !important;
}

/* ══════════ 3. PROFILE AVATAR (1:1, CIRCLE, 160x160 DESKTOP) ══════════ */
body.lumina-profile-standard .avatar-wrap,
body.lumina-profile-standard .hero-avatar-wrap,
body.lumina-profile-standard .head-avatar-wrapper,
body.lumina-profile-standard .profile-avatar-wrap,
body.lumina-profile-standard .lumina-profile-avatar-wrap {
    box-sizing: border-box !important;
    position: relative !important;
    width: 160px !important;
    height: 160px !important;
    min-width: 160px !important;
    min-height: 160px !important;
    flex: 0 0 160px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    margin-top: -80px !important;
    margin-bottom: 0 !important;
    background: #091228 !important;
    border: 4px solid #070e24 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 20px rgba(212, 169, 74, 0.25) !important;
    overflow: visible !important;
    z-index: 15 !important;
}

body.lumina-profile-standard .avatar-img,
body.lumina-profile-standard .hero-avatar-img,
body.lumina-profile-standard .profile-avatar-img,
body.lumina-profile-standard .lumina-profile-avatar {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
}

/* ══════════ 4. USER DETAILS & TYPOGRAPHY ══════════ */
body.lumina-profile-standard .head-user-details,
body.lumina-profile-standard .hero-details {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    text-align: left !important;
    padding-top: 12px !important;
}

body.lumina-profile-standard .head-user-name,
body.lumina-profile-standard .hero-name {
    justify-content: flex-start !important;
    max-width: 100% !important;
    margin: 0 0 8px !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

body.lumina-profile-standard .head-user-tagline,
body.lumina-profile-standard .hero-role,
body.lumina-profile-standard .hero-location {
    justify-content: flex-start !important;
    max-width: 100% !important;
    gap: 7px !important;
}

/* ══════════ 5. ACTION BUTTONS ══════════ */
body.lumina-profile-standard .head-actions,
body.lumina-profile-standard .hero-actions {
    box-sizing: border-box !important;
    display: flex !important;
    flex-flow: row wrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 18px 0 0 !important;
    padding: 16px 0 0 !important;
    gap: 9px !important;
    overflow: visible !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.lumina-profile-standard .head-actions > button,
body.lumina-profile-standard .head-actions > a,
body.lumina-profile-standard .hero-actions > button,
body.lumina-profile-standard .hero-actions > a {
    box-sizing: border-box !important;
    width: auto !important;
    min-width: 42px !important;
    max-width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    flex: 0 0 auto !important;
    padding: 0 16px !important;
    border-radius: 999px !important;
    color: #fff;
    font-size: 0.82rem !important;
    white-space: nowrap !important;
}

html[data-lumina-theme="light"] body.lumina-profile-standard .head-actions > button,
html[data-lumina-theme="light"] body.lumina-profile-standard .head-actions > a,
html[data-lumina-theme="light"] body.lumina-profile-standard .hero-actions > button,
html[data-lumina-theme="light"] body.lumina-profile-standard .hero-actions > a {
    color: #1C1917 !important;
}

body.lumina-profile-standard .head-actions > button i,
body.lumina-profile-standard .head-actions > a i,
body.lumina-profile-standard .hero-actions > button i,
body.lumina-profile-standard .hero-actions > a i {
    flex: 0 0 auto !important;
    margin: 0 !important;
    font-size: 1rem !important;
    color: currentColor !important;
}

body.lumina-profile-standard .head-actions .btn-text,
body.lumina-profile-standard .head-actions #followBtnText,
body.lumina-profile-standard .head-actions #followCountBadge,
body.lumina-profile-standard .head-actions #heartBtnText,
body.lumina-profile-standard .head-actions #heartCountBadge,
body.lumina-profile-standard .head-actions .btn-divider {
    display: inline !important;
    color: inherit !important;
    font-size: inherit !important;
}

body.lumina-profile-standard .head-actions .btn-action-gear,
body.lumina-profile-standard .head-actions .btn-action-share,
body.lumina-profile-standard .head-actions .btn-action-logout,
body.lumina-profile-standard .head-actions .btn-action-more {
    width: 42px !important;
    padding: 0 !important;
    border-radius: 50% !important;
}

body.lumina-profile-standard .profile-nav-tabs {
    box-sizing: border-box !important;
    display: flex !important;
    justify-content: flex-start !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 16px 0 0 !important;
    padding: 8px 0 0 !important;
    gap: 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: thin !important;
}

body.lumina-profile-standard .profile-nav-tabs .tab-btn {
    box-sizing: border-box !important;
    width: auto !important;
    min-width: max-content !important;
    max-width: none !important;
    height: 42px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    flex: 0 0 auto !important;
    padding: 0 14px !important;
    border-radius: 12px !important;
    font-size: 0.78rem !important;
    color: #94a3b8 !important;
}

body.lumina-profile-standard .profile-nav-tabs .tab-btn i,
body.lumina-profile-standard .profile-nav-tabs .tab-btn .tab-text {
    display: inline !important;
    color: inherit !important;
    font-size: inherit !important;
}

body.lumina-profile-standard .profile-nav-tabs .tab-btn.active {
    color: #facc15 !important;
}

body.lumina-profile-standard .profile-body-grid {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(250px, 320px) minmax(0, 1fr) !important;
    align-items: start !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 20px !important;
    margin-top: 20px !important;
}

body.lumina-profile-standard .founder-3col {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) minmax(220px, 280px) !important;
    align-items: start !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 18px !important;
    margin-top: 20px !important;
}

body.lumina-profile-standard .profile-body-grid > *,
body.lumina-profile-standard .founder-3col > *,
body.lumina-profile-standard .center-founder-feed,
body.lumina-profile-standard .left-founder-wing,
body.lumina-profile-standard .right-founder-wing {
    min-width: 0 !important;
    max-width: 100% !important;
}

body.lumina-profile-standard .post-card,
body.lumina-profile-standard .sidebar-card {
    box-sizing: border-box !important;
    max-width: 100% !important;
    border-radius: var(--profile-card-radius) !important;
}

body.lumina-profile-standard :is(button, a, input, textarea, select):focus-visible {
    outline: 3px solid #facc15 !important;
    outline-offset: 3px !important;
}

/* ══════════ 6. TABLET RESPONSIVENESS (769px - 1024px) ══════════ */
@media (min-width: 769px) and (max-width: 1024px) {
    body.lumina-profile-standard .cover-wrapper,
    body.lumina-profile-standard .profile-hero > div:first-child,
    body.lumina-profile-standard .lumina-profile-cover {
        aspect-ratio: 3 / 1 !important;
        min-height: 220px !important;
    }

    body.lumina-profile-standard .avatar-wrap,
    body.lumina-profile-standard .hero-avatar-wrap,
    body.lumina-profile-standard .lumina-profile-avatar-wrap {
        width: 128px !important;
        height: 128px !important;
        min-width: 128px !important;
        min-height: 128px !important;
        flex: 0 0 128px !important;
        margin-top: -64px !important;
    }

    body.lumina-profile-standard .founder-3col {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body.lumina-profile-standard .center-founder-feed {
        order: 1 !important;
    }

    body.lumina-profile-standard .left-founder-wing {
        order: 2 !important;
    }

    body.lumina-profile-standard .right-founder-wing {
        order: 3 !important;
    }
}

@media (max-width: 1100px) {
    body.lumina-profile-standard .founder-3col {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body.lumina-profile-standard .center-founder-feed {
        order: 1 !important;
    }

    body.lumina-profile-standard .left-founder-wing {
        order: 2 !important;
    }

    body.lumina-profile-standard .right-founder-wing {
        order: 3 !important;
    }
}

/* ══════════ 7. MOBILE RESPONSIVENESS (<= 768px) ══════════ */
@media (max-width: 768px) {
    html body.lumina-profile-standard {
        --profile-page-gutter: 10px;
        --profile-card-radius: 18px;
        overflow-x: clip !important;
        padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
    }

    body.lumina-profile-standard .profile-container {
        padding: 0 var(--profile-page-gutter) calc(88px + env(safe-area-inset-bottom, 0px)) !important;
        overflow-x: clip !important;
    }

    /* Mobile Cover: prioritizes central 640x640 safe-zone without stretching */
    body.lumina-profile-standard .cover-wrapper,
    body.lumina-profile-standard .profile-hero > div:first-child,
    body.lumina-profile-standard .lumina-profile-cover {
        aspect-ratio: 16 / 7 !important;
        min-height: 160px !important;
        max-height: 240px !important;
        border-radius: 0 0 16px 16px !important;
    }

    body.lumina-profile-standard .profile-head-card,
    body.lumina-profile-standard .hero-info-bar,
    body.lumina-profile-standard .lumina-profile-head-card {
        width: 100% !important;
        margin: 0 auto !important;
        padding: 0 16px 20px !important;
        overflow: visible !important;
        position: relative !important;
        z-index: 10 !important;
    }

    body.lumina-profile-standard .profile-head-top {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
        padding-bottom: 16px !important;
    }

    body.lumina-profile-standard .profile-head-main {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 12px !important;
        width: 100% !important;
    }

    /* Mobile Avatar: 96x96 px (-48px overlap) */
    body.lumina-profile-standard .avatar-wrap,
    body.lumina-profile-standard .hero-avatar-wrap,
    body.lumina-profile-standard .head-avatar-wrapper,
    body.lumina-profile-standard .profile-avatar-wrap,
    body.lumina-profile-standard .lumina-profile-avatar-wrap {
        width: 96px !important;
        height: 96px !important;
        min-width: 96px !important;
        min-height: 96px !important;
        flex: 0 0 96px !important;
        margin-top: -48px !important;
        position: relative !important;
        z-index: 15 !important;
        overflow: visible !important;
        border-width: 3.5px !important;
    }

    body.lumina-profile-standard .head-user-details,
    body.lumina-profile-standard .hero-details {
        margin-top: 0 !important;
        width: 100% !important;
        text-align: center !important;
        padding-top: 0 !important;
        flex: 1 !important;
        min-width: 0 !important;
    }

    body.lumina-profile-standard .head-user-name,
    body.lumina-profile-standard .hero-name {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
        font-size: clamp(1.2rem, 5.5vw, 1.55rem) !important;
        line-height: 1.25 !important;
    }

    body.lumina-profile-standard .head-user-tagline,
    body.lumina-profile-standard .hero-role,
    body.lumina-profile-standard .hero-location {
        justify-content: center !important;
        text-align: center !important;
        font-size: 0.74rem !important;
    }

    body.lumina-profile-standard .head-actions,
    body.lumina-profile-standard .hero-actions {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        width: 100% !important;
        margin-top: 14px !important;
        padding: 14px 2px 8px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        overscroll-behavior-inline: contain !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
        gap: 8px !important;
    }

    body.lumina-profile-standard .head-actions::-webkit-scrollbar,
    body.lumina-profile-standard .hero-actions::-webkit-scrollbar,
    body.lumina-profile-standard .profile-nav-tabs::-webkit-scrollbar {
        display: none !important;
    }

    body.lumina-profile-standard .head-actions > button,
    body.lumina-profile-standard .head-actions > a,
    body.lumina-profile-standard .hero-actions > button,
    body.lumina-profile-standard .hero-actions > a {
        min-width: max-content !important;
        padding: 0 14px !important;
    }

    body.lumina-profile-standard .head-actions .btn-action-gear,
    body.lumina-profile-standard .head-actions .btn-action-share,
    body.lumina-profile-standard .head-actions .btn-action-logout,
    body.lumina-profile-standard .head-actions .btn-action-more {
        min-width: 42px !important;
        flex-basis: 42px !important;
        padding: 0 !important;
    }

    body.lumina-profile-standard .profile-nav-tabs {
        margin-top: 12px !important;
        padding-bottom: 4px !important;
    }

    body.lumina-profile-standard .profile-nav-tabs .tab-btn {
        padding: 0 12px !important;
    }

    body.lumina-profile-standard .profile-body-grid,
    body.lumina-profile-standard .founder-3col {
        display: flex !important;
        flex-direction: column !important;
        gap: 14px !important;
        margin-top: 14px !important;
    }

    body.lumina-profile-standard .profile-body-grid > *,
    body.lumina-profile-standard .founder-3col > *,
    body.lumina-profile-standard .left-founder-wing,
    body.lumina-profile-standard .center-founder-feed,
    body.lumina-profile-standard .right-founder-wing {
        width: 100% !important;
    }

    body.lumina-profile-standard .post-card,
    body.lumina-profile-standard .sidebar-card {
        padding: 14px !important;
        margin-bottom: 12px !important;
    }
}

/* ══════════ 8. SMALL MOBILE SCREENS (<= 360px) ══════════ */
@media (max-width: 360px) {
    body.lumina-profile-standard .avatar-wrap,
    body.lumina-profile-standard .hero-avatar-wrap,
    body.lumina-profile-standard .head-avatar-wrapper,
    body.lumina-profile-standard .profile-avatar-wrap,
    body.lumina-profile-standard .lumina-profile-avatar-wrap {
        width: 88px !important;
        height: 88px !important;
        min-width: 88px !important;
        min-height: 88px !important;
        flex: 0 0 88px !important;
        margin-top: -44px !important;
    }
}

@media (max-width: 390px) {
    body.lumina-profile-standard .profile-container {
        padding-inline: 6px !important;
    }

    body.lumina-profile-standard .profile-head-card,
    body.lumina-profile-standard .hero-info-bar {
        padding-inline: 10px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.lumina-profile-standard *,
    body.lumina-profile-standard *::before,
    body.lumina-profile-standard *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ══════════ 9. MOBILE PROFILE HEADER — PROFESSIONAL STANDARD (Strażnik, 2026-10-11) ══════════
 * Wszystkie profile na telefonie: awatar wyśrodkowany, w połowie na zdjęciu tła i w połowie na karcie,
 * imię i dane wyśrodkowane pod awatarem, zwarte odstępy, zakładki w czytelnej siatce (bez przewijania w bok).
 * Nadpisuje starsze reguły (np. .profile-head-main { margin-top: -46px }, .avatar-wrap { align-self: flex-start }). */
@media (max-width: 768px) {
    body.lumina-profile-standard :is(.profile-head-card, .hero-info-bar, .lumina-profile-head-card) {
        padding-top: 0 !important;
    }

    body.lumina-profile-standard :is(.profile-head-card, .hero-info-bar, .lumina-profile-head-card) :is(.profile-head-top, .hero-head-top) {
        gap: 0 !important;
        padding-bottom: 4px !important;
        margin-top: 0 !important;
    }

    body.lumina-profile-standard :is(.profile-head-card, .hero-info-bar, .lumina-profile-head-card) .profile-head-main {
        margin-top: 0 !important;
        padding: 0 !important;
        align-items: center !important;
        gap: 10px !important;
    }

    body.lumina-profile-standard :is(.profile-head-card, .hero-info-bar, .lumina-profile-head-card) :is(.avatar-wrap, .hero-avatar-wrap, .head-avatar-wrapper, .profile-avatar-wrap, .lumina-profile-avatar-wrap) {
        align-self: center !important;
        margin: -48px auto 0 !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
    }

    body.lumina-profile-standard :is(.profile-head-card, .hero-info-bar, .lumina-profile-head-card) :is(.head-user-name, .hero-name) {
        margin: 0 0 6px !important;
    }

    body.lumina-profile-standard :is(.profile-head-card, .hero-info-bar, .lumina-profile-head-card) :is(.head-user-tagline, .hero-role, .hero-location) {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 6px 10px !important;
        margin: 0 !important;
    }

    body.lumina-profile-standard :is(.profile-head-card, .hero-info-bar, .lumina-profile-head-card) :is(.head-actions, .hero-actions) {
        justify-content: center !important;
        margin-top: 10px !important;
        padding: 12px 2px 4px !important;
    }

    body.lumina-profile-standard :is(.profile-head-card, .hero-info-bar, .lumina-profile-head-card) .profile-nav-tabs {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 6px !important;
        margin-top: 10px !important;
        padding: 10px 0 0 !important;
        overflow: visible !important;
    }

    body.lumina-profile-standard :is(.profile-head-card, .hero-info-bar, .lumina-profile-head-card) .profile-nav-tabs .tab-btn {
        width: 100% !important;
        min-width: 0 !important;
        justify-content: center !important;
        gap: 6px !important;
        padding: 0 8px !important;
        border-radius: 12px !important;
        font-size: 0.74rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    body.lumina-profile-standard :is(.profile-head-card, .hero-info-bar, .lumina-profile-head-card) .profile-nav-tabs .tab-btn:last-child:nth-child(odd) {
        grid-column: 1 / -1 !important;
    }

    /* Plakietka „Kliknij w tło” — mała, w prawym górnym rogu tła; nigdy nie zasłania awatara. */
    body.lumina-profile-standard .cover-wrapper .cover-hint-badge {
        top: 10px !important;
        right: 10px !important;
        bottom: auto !important;
        left: auto !important;
        transform: none !important;
        max-width: calc(100% - 20px) !important;
        padding: 6px 10px !important;
        font-size: 0.7rem !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
    }
}

@media (max-width: 360px) {
    body.lumina-profile-standard :is(.profile-head-card, .hero-info-bar, .lumina-profile-head-card) :is(.avatar-wrap, .hero-avatar-wrap, .head-avatar-wrapper, .profile-avatar-wrap, .lumina-profile-avatar-wrap) {
        margin-top: -44px !important;
    }
}

/* Karta transmisji na żywo: jedna informacja „NA ŻYWO”, bez powtórzeń; przyciski jako czytelne ikony (Strażnik, 2026-10-11). */
.mission-live-broadcast-card .post-header .post-time { display: none !important; }
.mission-live-broadcast-card .live-viewer-chip { width: 34px !important; height: 34px !important; min-width: 34px !important; padding: 0 !important; justify-content: center !important; border-radius: 50% !important; flex: 0 0 34px !important; }
.mission-live-broadcast-card .live-viewer-chip > span,
.mission-live-player-overlay :is(.btn-unmute-live, .btn-expand-live) > span { display: none !important; }
.mission-live-player-overlay :is(.btn-unmute-live, .btn-expand-live) { min-width: 44px !important; min-height: 44px !important; padding: 0 !important; justify-content: center !important; border-radius: 50% !important; gap: 0 !important; }

/* Starszy układ profili (.head-top-row): kolejność awatar → imię → dane → przyciski; bez powtórzeń tych samych informacji. */
@media (max-width: 768px) {
    body.lumina-profile-standard .profile-head-card:has(> .head-top-row) { display: flex !important; flex-direction: column !important; align-items: stretch !important; }
    body.lumina-profile-standard .profile-head-card > .head-top-row { display: contents !important; }
    body.lumina-profile-standard .profile-head-card:has(> .head-top-row) > * { order: 5; }
    body.lumina-profile-standard .profile-head-card > .head-top-row > :is(.avatar-wrap, .hero-avatar-wrap) { order: 0 !important; }
    body.lumina-profile-standard .profile-head-card > .profile-title-name { order: 1 !important; display: flex !important; flex-direction: column !important; align-items: center !important; text-align: center !important; gap: 8px !important; margin: 12px 0 0 !important; font-size: clamp(1.35rem, 6vw, 1.7rem) !important; line-height: 1.2 !important; }
    body.lumina-profile-standard .profile-head-card > .profile-meta-row { order: 2 !important; display: flex !important; flex-wrap: wrap !important; justify-content: center !important; gap: 6px 14px !important; margin: 10px 0 0 !important; text-align: center !important; }
    body.lumina-profile-standard .profile-head-card > .head-top-row > .head-actions { order: 3 !important; }
    body.lumina-profile-standard .profile-head-card > .profile-tags-row { order: 4 !important; justify-content: center !important; margin-top: 12px !important; }
    /* Wiek i miasto są już w plakietce pod imieniem, weryfikacja — w znaczku na awatarze. */
    body.lumina-profile-standard .profile-head-card:has(.age-tag) .profile-meta-row > span:has(> :is(.fa-location-dot, .fa-cake-candles)) { display: none !important; }
    body.lumina-profile-standard .profile-head-card:has(.avatar-badge-check) .profile-meta-row > span:has(> .fa-shield-halved) { display: none !important; }
}

/* Odznaki: w panelu bocznym tylko zdobyte (pełna lista z odznakami do zdobycia jest w zakładce „Odznaki”). */
#sidebar3DBadgesBox .lumina-badge-3d-card.is-locked { display: none !important; }
#sidebar3DBadgesBox .lumina-3d-badges-section:not(:has(.lumina-badge-3d-card:not(.is-locked))) { display: none !important; }
.lumina-badge-3d-card:focus-visible { outline: 3px solid #b88e3e; outline-offset: 3px; }

/* Jasny motyw: profile projektowane na ciemne tło (np. /mariusz) — czytelny, ciemny tekst zamiast bladego na białym (Strażnik, 2026-10-11). */
html[data-lumina-theme="light"] body.lumina-profile-standard :is(.service-title, .service-desc, .hero-bio-quote, .post-body, .post-body b, .main-column-area h2, .main-column-area h3, .sidebar-title, .profile-navbar .btn-action-secondary) { color: #292524 !important; }
html[data-lumina-theme="light"] body.lumina-profile-standard .hero-bio-quote { color: #44403c !important; }
html[data-lumina-theme="light"] body.lumina-profile-standard :is(.badge-community, .post-badge-role) { color: #765414 !important; background: #f5f2eb !important; border-color: #b5a48b !important; }
html[data-lumina-theme="light"] body.lumina-profile-standard :is(.post-act-btn, .tab-btn.active) { color: #765414 !important; }
html[data-lumina-theme="light"] body.lumina-profile-standard .stat-label { color: #e7e5e4 !important; }
html[data-lumina-theme="light"] body.lumina-profile-standard .hero-cc-badge { color: #ffffff !important; }
html[data-lumina-theme="light"] body.lumina-profile-standard .mini-radio-title { color: #765414 !important; }
html[data-lumina-theme="light"] body.lumina-profile-standard .mini-radio-sub { color: #57534e !important; }
