:root {
    --page-bg: #f3f5f7;
    --card-bg: #fff;
    --border: #d9e2ec;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --accent: #0a66c2;
    --accent-soft: #e8f2ff;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: var(--page-bg);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding-left: 32px;
    padding-right: 32px;
}

.page-wrap {
    padding-top: 68px;
    padding-bottom: 60px;
}

.header-card,
.panel,
.profile-card,
.mini-card,
.field,
.url-card,
.hero-card,
.sidebar,
.public-url,
.empty-state,
.badge,
.btn-pill,
.edit-btn {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    color: var(--text-main);
}

 .header-card {
    padding: 28px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.eyebrow {
    display: inline-block;
    background: var(--accent-soft);
    color: var(--accent);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

h1 {
    font-size: 36px;
    line-height: 1.1;
    margin-top: 14px;
    letter-spacing: -1px;
    color: var(--text-main);
}

.subtitle {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 16px;
    max-width: 820px;
}

.layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: start;
}

.sidebar {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    position: sticky;
    top: 110px;
}

.sidebar h2 {
    font-size: 14px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.sidebar a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-main);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
}

.sidebar a:hover,
.sidebar a.active {
    background: #f1f5f9;
    color: var(--accent);
}

.content {
    display: grid;
    gap: 18px;
}

.profile-banner {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, #fde68a, #fda4af 42%, #ddd6fe);
    position: relative;
}

.banner-image {
    height: 320px;
    position: relative;
    background:
        radial-gradient(circle at 18% 18%, rgba(255,255,255,.35), transparent 22%),
        radial-gradient(circle at 82% 24%, rgba(255,255,255,.22), transparent 18%),
        linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,0));
}

.banner-actions {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    gap: 10px;
}

.edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-main);
    cursor: pointer;
    transition: 0.2s ease;
}

.edit-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: #f8fbff;
}

.featured-modal {
    display:none;
    position:fixed;
    inset:0;
    z-index:999999;
    background:rgba(15,23,42,.45);
    align-items:center;
    justify-content:center;
    padding:20px;
}

.featured-modal.active {
    display:flex;
}

.featured-modal-box {
    width:100%;
    max-width:600px;
    background:#ffffff;
    border-radius:22px;
    border:1px solid #e5e7eb;
    box-shadow:0 25px 80px rgba(15,23,42,.25);
    padding:24px;
}

.featured-modal-header {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:20px;
}

.featured-modal-header h3 {
    margin:0;
    font-size:22px;
    color:#111827;
}

.featured-modal-close {
    width:36px;
    height:36px;
    border-radius:50%;
    border:1px solid #e5e7eb;
    background:#fff;
    cursor:pointer;
    font-size:22px;
    line-height:1;
}

.featured-modal-box textarea {
    width:100%;
    min-height:180px;
    resize:vertical;
    border:1px solid #dbe7f3;
    border-radius:14px;
    padding:14px;
    font-size:15px;
}

.featured-modal-actions {
    display:flex;
    justify-content:flex-end;
    gap:10px;
    margin-top:18px;
}

.profile-edit-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .2s ease;
    padding: 0;
}

.profile-edit-btn:hover {
    background: #f9fafb;
    transform: translateY(-1px);
}

.profile-edit-btn i {
    font-size: 14px;
}

.public-url {
    position: relative;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 14px;
    padding: 14px;
    min-width: 280px;
}

.public-url label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.public-url a {
    display: block;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    word-break: break-all;
}

.profile-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 18px;
    padding: 24px;
    margin-top: -40px;
    position: relative;
    z-index: 2;
    background: #fff;
    border-radius: 18px;
}

.avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0a66c2, #6aa9ff);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1px;
    position: relative;
    border: 4px solid #fff;
    box-shadow: 0 12px 24px rgba(10, 102, 194, 0.18);
    overflow: hidden;
    flex: 0 0 auto;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-shell .edit-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 10;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    background: #ffffff;
}

.avatar-shell {
    position: relative;
    margin-top: -90px;
    margin-bottom: 20px;
    z-index: 10;
    width: fit-content;
}

.profile-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.profile-head h3 {
    font-size: 28px;
    line-height: 1.1;
    margin-bottom: 6px;
    color: var(--text-main);
}

.profile-head p {
    color: var(--text-muted);
    margin-bottom: 6px;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    background: #f8fafc;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.badge.green {
    background: #ecfdf3;
    border-color: #bbf7d0;
    color: var(--accent);
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.btn-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-main);
}

.btn-pill.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.panel {
    padding: 24px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.section-title h3 {
    font-size: 18px;
    color: var(--text-main);
}

.section-title p {
    color: var(--text-muted);
    font-size: 14px;
}

.section-grid {
    display: grid;
    grid-template-columns: 1.3fr .7fr;
    gap: 18px;
}

.stack {
    display: grid;
    gap: 12px;
}

.mini-card,
.field {
    padding: 16px;
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.card-head h4 {
    font-size: 16px;
    color: var(--text-main);
}

.muted {
    color: var(--text-muted);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.field label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.field .value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
}

.empty-state {
    padding: 18px;
    border: 1px dashed var(--border);
    border-radius: 14px;
    color: var(--text-muted);
    background: #fbfdff;
}

.row-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid #edf2f7;
    color: var(--text-main);
    font-weight: 600;
    font-size: 15px;
}

.row-link:first-of-type { border-top: 0; }

.row-link span {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14px;
    margin-right: 8px;
}

.row-link .arrow {
    color: var(--accent);
    font-size: 18px;
}

.profile-main-content {
    flex: 1;
    min-width: 0;
}

.hero-card {
    padding: 22px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.9fr);
    gap: 20px;
    align-items: stretch;
}

.hero-left {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    min-width: 0;
}

.hero-left .avatar-shell {
    position: relative;
    flex: 0 0 auto;
    width: 140px;
    min-width: 140px;
}

.hero-copy {
    min-width: 0;
    flex: 1;
}

.hero-topline {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.hero-copy h3 {
    margin: 0 0 6px 0;
    font-size: 1.6rem;
    line-height: 1.15;
    color: var(--text-main);
}

.hero-meta {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 4px;
}

.hero-submeta {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.profile-action-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
    align-items: center;
}

.profile-stats-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 0;
}

.hero-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}



/* ============================================================ */
/*     Creator Profile Online Status                          */
/* ============================================================ */

.pill.status-active {
    background: #16a34a !important;
    color: #ffffff !important;
    border-color: #16a34a !important;
}

.pill.status-offline {
    background: #dc2626 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
}


/* ============================================================ */
/*              CREATOR PROFILE ONLINE STATUS                  */
/* ============================================================ */

/* Desktop status badge */
.profile-head h3 .status-badge,
.hero-copy h3 .status-badge {
    display: inline-flex !important;
    align-items: center !important;
    padding: 3px 9px !important;
    margin-left: 5px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
}

.status-badge.online {
    background-color: #16a34a !important;
    color: #ffffff !important;
}

.status-badge.offline {
    background-color: #dc2626 !important;
    color: #ffffff !important;
}

/* ============================================================ */
/*                  TABLET RESPONSIVE RULES                     */
/* ============================================================ */

@media (max-width: 1200px) {
    .content-split {
        grid-template-columns: minmax(0, 1fr) 300px;
    }
}

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 200px minmax(0, 1fr);
        gap: 16px;
    }

    .content-split {
        grid-template-columns: minmax(0, 1fr);
    }

    .profile-right-sidebar,
    .profile-right-column {
        position: static;
        margin-top: 0;
    }
}


/* ============================================================ */
/*                 DESKTOP PROFILE PAGE SPACING                 */
/* ============================================================ */

@media (min-width: 769px) {
    .profile-page {
        padding-top: 90px;
        padding-left: 32px;
        padding-right: 32px;
        box-sizing: border-box;
    }
}


/* ============================================================ */
/*                MOBILE CREATOR PROFILE OVERRIDES              */
/* ============================================================ */

@media (max-width: 768px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    /*
     * Full viewport width with one consistent page gutter.
     * Do not add horizontal padding to nested page wrappers.
     */
    .profile-page {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding-top: 175px !important;
        padding-right: 15px !important;
        padding-bottom: 24px !important;
        padding-left: 15px !important;
        overflow: visible !important;
        box-sizing: border-box;
    }

    .profile-shell,
    .container,
    .content,
    .profile-area,
    .profile-main-content,
    .profile-right-sidebar,
    .profile-right-column {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    /*
     * No nested horizontal padding:
     * profile-page owns the 15px left/right mobile gutter.
     */
    .profile-shell,
    .content,
    .profile-main-content {
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    .layout {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-width: 100%;
        gap: 14px;
        margin: 0;
    }

    .sidebar,
    .profile-main-content,
    .profile-right-sidebar,
    .profile-right-column {
        position: static;
        top: auto;
        right: auto;
        left: auto;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 0;
    }

    .sidebar {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        padding: 12px;
        border-radius: 12px;
    }

    .sidebar h2 {
        width: 100%;
        margin-bottom: 3px;
        font-size: 11px;
    }

    .sidebar a {
        display: inline-block;
        width: auto;
        margin: 0;
        padding: 6px 10px;
        font-size: 12px;
        border-radius: 8px;
    }

    .profile-area {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .profile-page .banner-image {
        width: 100%;
        height: 120px;
        min-height: 120px;
        max-height: 120px;
        border-radius: 12px;
        background-position: center;
        background-size: cover;
    }

    .profile-page .profile-shell > .header-card {
        width: 100%;
        margin-top: 25px;
        padding: 16px;
        border-radius: 12px;
    }

    .header-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .header-card h1,
    h1 {
        margin-top: 6px;
        font-size: 24px;
        line-height: 1.15;
    }

    .public-url {
        width: 100%;
        min-width: 0;
    }

    /* ======================================================== */
    /*                       HERO SECTION                      */
    /* ======================================================== */

    .hero-card {
        position: relative;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin: 0;
        padding: 14px 12px 16px;
        overflow: visible;
        border-radius: 12px;
        box-sizing: border-box;
    }

    /*
     * Actual hero markup:
     * .hero-card > div[style="display:flex; ... flex-wrap:nowrap"]
     *
     * The desktop wrapper has avatar + details + actions in one row.
     * Mobile converts that real wrapper into a vertical layout.
     */
    .hero-card > div[style*="align-items:flex-start"],
    .hero-card > div:first-child {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        gap: 12px !important;
        flex-wrap: nowrap !important;
        box-sizing: border-box !important;
    }

    /* Avatar */
    .hero-card > div:first-child > .avatar-shell {
        position: relative !important;
        z-index: 10 !important;
        align-self: center !important;
        width: 82px !important;
        min-width: 82px !important;
        max-width: 82px !important;
        height: 82px !important;
        min-height: 82px !important;
        max-height: 82px !important;
        margin: -54px auto 0 !important;
        flex: 0 0 82px !important;
    }

    .hero-card > div:first-child > .avatar-shell .avatar {
        width: 82px !important;
        min-width: 82px !important;
        max-width: 82px !important;
        height: 82px !important;
        min-height: 82px !important;
        max-height: 82px !important;
        font-size: 25px !important;
    }

    .hero-card > div:first-child > .avatar-shell .avatar img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .hero-card > div:first-child > .avatar-shell .edit-btn {
        position: absolute !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 11 !important;
        width: 26px !important;
        height: 26px !important;
    }

    /*
     * Center details column:
     * inline style contains flex:1 1 auto and flex-direction:column.
     */
    .hero-card > div:first-child > div:nth-child(2) {
        display: flex !important;
        flex: 0 0 auto !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        gap: 7px !important;
        margin: 0 !important;
        padding: 0 !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    .hero-card > div:first-child > div:nth-child(2) h3 {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        font-size: 21px !important;
        line-height: 1.2 !important;
        text-align: center !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    .hero-card > div:first-child > div:nth-child(2) p {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        gap: 5px !important;
        text-align: center !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
    }

    .hero-card > div:first-child > div:nth-child(2) p .edit-btn {
        width: 26px !important;
        height: 26px !important;
        flex: 0 0 26px !important;
    }

    /* Add Links / Settings controls */
    .hero-card > div:first-child > div:nth-child(2) > div:last-child {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        min-width: 0 !important;
        gap: 8px !important;
        margin: 2px 0 0 !important;
    }

    .hero-card > div:first-child > div:nth-child(2) .btn-pill {
        width: auto !important;
        min-width: 0 !important;
        padding: 7px 11px !important;
        font-size: 11px !important;
    }

    /*
     * Right column:
     * action toolbar + stats + badges.
     * Desktop has margin-left:auto and right alignment.
     */
    .hero-card > div:first-child > div:nth-child(3) {
        display: flex !important;
        flex: 0 0 auto !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        gap: 12px !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    /* Action icon toolbar */
    .hero-card > div:first-child > div:nth-child(3) > div:first-child {
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        align-items: center !important;
        justify-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        gap: 8px !important;
        margin: 0 !important;
        padding: 2px 0 0 !important;
        box-sizing: border-box !important;
    }

    .hero-card > div:first-child > div:nth-child(3) > div:first-child > .edit-btn,
    .hero-card > div:first-child > div:nth-child(3) > div:first-child > a.edit-btn,
    .hero-card > div:first-child > div:nth-child(3) > div:first-child > button.edit-btn,
    .hero-card > div:first-child > div:nth-child(3) > div:first-child > form {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 30px !important;
        min-width: 30px !important;
        height: 30px !important;
        min-height: 30px !important;
        margin: 0 !important;
    }

    .hero-card > div:first-child > div:nth-child(3) > div:first-child > form .edit-btn {
        width: 30px !important;
        height: 30px !important;
        margin: 0 !important;
    }

    /* Statistics */
    .hero-profile-stats,
    .profile-stats-row {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        align-items: stretch !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        gap: 6px !important;
        margin: 0 !important;
        padding: 0 !important;
        white-space: normal !important;
        box-sizing: border-box !important;
    }

    .hero-profile-stats .mini-card,
    .profile-stats-row .mini-card {
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 8px 4px !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    .hero-profile-stats h4,
    .profile-stats-row h4,
    .hero-profile-stats .small,
    .profile-stats-row .small {
        margin: 0 !important;
        font-size: 10px !important;
        line-height: 1.25 !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }

    /* Account badges */
    .badge-row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        gap: 6px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .badge {
        width: auto !important;
        max-width: 100% !important;
        padding: 6px 9px !important;
        font-size: 11px !important;
        line-height: 1.2 !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
    }
    
    
    .status-badge {
        display: inline-block !important;
        width: 9px !important;
        height: 9px !important;
        min-width: 9px !important;
        padding: 0 !important;
        margin-left: 5px !important;
        border-radius: 50% !important;
        font-size: 0 !important;
        line-height: 0 !important;
        vertical-align: middle !important;
    }

    .status-badge.online {
        background-color: #16a34a !important;
    }

    .status-badge.offline {
        background-color: #dc2626 !important;
    }


    /* ======================================================== */
    /*                 BELOW-HERO CONTENT                      */
    /* ======================================================== */

    .content-split {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        gap: 14px !important;
    }

    .profile-main-content,
    .profile-right-sidebar,
    .profile-right-column {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    .section-grid,
    .grid-2 {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px !important;
    }

    .panel {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding: 14px;
        border-radius: 12px;
        box-sizing: border-box;
    }

    .section-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .section-title h3 {
        font-size: 16px;
    }

    .section-title p {
        font-size: 13px;
    }

    .mini-card,
    .field {
        padding: 12px;
        border-radius: 10px;
    }

    .card-head h4 {
        font-size: 14px;
    }

    .field label {
        font-size: 12px;
    }

    .field .value {
        font-size: 13px;
    }

    .row-link {
        flex-wrap: wrap;
        gap: 6px;
        padding: 10px 0;
        font-size: 13px;
    }

    .row-link span {
        font-size: 12px;
    }

    .row-link .arrow {
        font-size: 16px;
    }

    .empty-state {
        padding: 12px;
        font-size: 13px;
    }

    .content {
        gap: 12px;
    }

    .stack {
        gap: 8px;
    }

    /*
     * The Blade has inline flex children with min-width:200px.
     * This prevents those desktop minimums from widening a phone screen.
     */
    .profile-page .row > div[style*="min-width:200px"],
    .profile-page .row > div[style*="min-width: 200px"] {
        width: 100% !important;
        min-width: 0 !important;
        flex: 1 1 100% !important;
    }

    /* Dropdown */
    .dropdown {
        position: relative;
    }

    .dropdown-menu {
        position: absolute;
        right: auto;
        left: 50%;
        width: calc(100vw - 30px);
        max-width: 350px;
        min-width: 0;
        transform: translateX(-50%);
        border-radius: 14px;
    }

    .dropdown-menu-end {
        right: auto;
        left: 50%;
    }

    .dropdown-item {
        padding: 12px;
        font-size: 13px;
        white-space: normal;
    }

    /* Banner edit action */
    .banner-actions {
        top: 5px;
        right: 5px;
        gap: 3px;
    }

    .banner-actions .edit-btn {
        width: 24px;
        height: 24px;
    }

    /* Prevent long text and media from creating horizontal scrolling */
    .profile-page p,
    .profile-page h1,
    .profile-page h2,
    .profile-page h3,
    .profile-page h4,
    .profile-page a,
    .profile-page span,
    .profile-page li {
        overflow-wrap: anywhere;
    }

    .profile-page img,
    .profile-page iframe,
    .profile-page video,
    .profile-page svg {
        max-width: 100%;
        height: auto;
    }
}


/* =========================================================
   
   ========================================================= */



/* ============================================================ */
/*                  SMALL PHONE OVERRIDES                       */
/* ============================================================ */

@media (max-width: 480px) {
    .profile-page {
        padding-right: 12px !important;
        padding-left: 12px !important;
    }

    .profile-page .banner-image {
        height: 130px;
        min-height: 130px;
        max-height: 130px;
    }

    .hero-card {
        padding: 12px 10px 14px;
    }

    .hero-card > div:first-child > .avatar-shell,
    .hero-card > div:first-child > .avatar-shell .avatar {
        width: 76px !important;
        min-width: 76px !important;
        max-width: 76px !important;
        height: 76px !important;
        min-height: 76px !important;
        max-height: 76px !important;
    }

    .hero-card > div:first-child > .avatar-shell {
        margin-top: -50px !important;
        flex-basis: 76px !important;
    }

    .hero-card > div:first-child > div:nth-child(3) > div:first-child {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 7px !important;
    }

    .hero-profile-stats,
    .profile-stats-row {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}


@media (max-width: 420px) {
    .profile-page {
        padding-right: 8px !important;
        padding-left: 8px !important;
    }

   

    .hero-card > div:first-child > .avatar-shell,
    .hero-card > div:first-child > .avatar-shell .avatar {
        width: 70px !important;
        min-width: 70px !important;
        max-width: 70px !important;
        height: 70px !important;
        min-height: 70px !important;
        max-height: 70px !important;
    }

    .hero-card > div:first-child > .avatar-shell {
        margin-top: -47px !important;
        flex-basis: 70px !important;
    }

    .hero-card > div:first-child > div:nth-child(2) h3 {
        font-size: 19px !important;
    }
}
       
 
 /* ============================================================
   MOBILE — below hero only
   Fix Discoverability, panels, and sidebar partials
   ============================================================ */
@media (max-width: 768px) {

    /* The main below-hero layout */
    .content-split {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    /* Center content: every panel becomes full page width */
    .content-split .profile-main-content {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 0 14px !important;
        padding: 0 !important;
        gap: 14px !important;
        box-sizing: border-box !important;
    }

    .content-split .profile-main-content > .panel {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 14px !important;
        box-sizing: border-box !important;
    }

    /* Right-side partials: now normal full-width mobile content */
    .content-split .profile-right-column,
    .content-split .profile-right-sidebar {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        gap: 14px !important;
        position: static !important;
        box-sizing: border-box !important;
    }

    /* Discoverability's two inline flex columns */
    #discoverability-matching .row {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
    }

    #discoverability-matching .row > div {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 0 12px !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    #discoverability-matching .row > div:last-child {
        margin-bottom: 0 !important;
    }

    /* Internal two-column layouts stack safely */
    .content-split .section-grid,
    .content-split .grid-2 {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        gap: 12px !important;
    }

    /* Prevent long content from pushing a panel off screen */
    .content-split .panel,
    .content-split .panel * {
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .content-split .panel p,
    .content-split .panel a,
    .content-split .panel span,
    .content-split .panel li {
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
    }
}
    
 
 /* ============================================================
   CREATOR PROFILE: MOBILE BELOW-HERO FIX
   Add at END of stylesheet. No PHP or class changes required.
   ============================================================ */
@media screen and (max-width: 768px) {

    /*
     * Start at the known below-hero wrapper and neutralize
     * desktop grid/flex sizing, including inline flex styles.
     */
    .profile-page .content-split {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    /*
     * This is the left/main column containing Discoverability,
     * Target Match, About, Contact, etc.
     */
    .profile-page .content-split .profile-main-content {
        display: block !important;
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        margin: 0 0 14px 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    /*
     * Match both possible sidebar wrapper names. They remain
     * beneath center content, full width, on mobile.
     */
    .profile-page .content-split .profile-right-sidebar,
    .profile-page .content-split .profile-right-column {
        display: block !important;
        flex: none !important;
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    /*
     * Reset every first-level card/panel in both columns.
     * This catches panels even when their specific class differs.
     */
    .profile-page .content-split .profile-main-content > *,
    .profile-page .content-split .profile-right-sidebar > *,
    .profile-page .content-split .profile-right-column > * {
        display: block !important;
        flex: none !important;
        float: none !important;
        clear: both !important;
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    /*
     * Target Match / Discoverability often use Bootstrap .row
     * and .col-* classes. Force those rows to a one-column stack.
     */
    .profile-page .content-split .row {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .profile-page .content-split .row > *,
    .profile-page .content-split [class*="col-"] {
        display: block !important;
        flex: none !important;
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }

    /*
     * Existing internal CSS grid layouts must not retain
     * desktop columns below the hero.
     */
    .profile-page .content-split .section-grid,
    .profile-page .content-split .grid-2,
    .profile-page .content-split .stack {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    /*
     * Last-resort protection: a child with a fixed width,
     * flex-basis, transform, or long unbreakable content cannot
     * make Discoverability appear as a thin/off-screen column.
     */
    .profile-page .content-split,
    .profile-page .content-split * {
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .profile-page .content-split p,
    .profile-page .content-split a,
    .profile-page .content-split span,
    .profile-page .content-split li,
    .profile-page .content-split h1,
    .profile-page .content-split h2,
    .profile-page .content-split h3,
    .profile-page .content-split h4 {
        max-width: 100% !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
        white-space: normal !important;
    }

    .profile-page .content-split img,
    .profile-page .content-split iframe,
    .profile-page .content-split video,
    .profile-page .content-split svg,
    .profile-page .content-split canvas {
        max-width: 100% !important;
        height: auto !important;
    }
}  