/* =========================================================
   VIRALMINT AI — PROFILE AUDIT MOBILE
   Dedicated mobile polish layer
   Load AFTER profile-audit.css + mobile-nav.css
========================================================= */

@media (max-width: 850px) {

    /* =====================================================
       1. MOBILE PAGE SHELL
    ===================================================== */

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
    }

    body {
        min-width: 0 !important;
    }

    .dashboard-layout {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .dashboard-main {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 10px 10px 30px !important;
        box-sizing: border-box !important;
    }

    .dashboard-content-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        gap: 12px !important;
    }


    /* =====================================================
       2. MOBILE NAVBAR
       Same visual system as Account + Trend Intelligence
    ===================================================== */

    .sidebar {
        position: relative !important;
        inset: auto !important;

        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;

        margin: 0 !important;
        padding: 9px 10px 8px !important;

        display: block !important;

        border-right: 0 !important;
        border-bottom: 1px solid rgba(255,255,255,.055) !important;

        box-shadow: 0 8px 24px rgba(0,0,0,.16) !important;

        box-sizing: border-box !important;
    }

    .sidebar-inner {
        width: 100% !important;
        display: block !important;
    }

    /* Logo row */

    .sidebar-logo {
        width: 100% !important;

        margin: 0 0 8px !important;
        padding: 0 !important;

        display: flex !important;
        align-items: center !important;

        gap: 7px !important;

        border-bottom: 0 !important;
    }

    .logo-mark {
        width: 31px !important;
        height: 31px !important;
        min-width: 31px !important;

        border-radius: 9px !important;
    }

    .logo-mark svg {
        width: 15px !important;
        height: 15px !important;
    }

    .logo-copy {
        min-width: 0 !important;
    }

    .logo-copy strong {
        font-size: .82rem !important;
        line-height: 1 !important;
        letter-spacing: -.035em !important;
    }

    .logo-copy span {
        display: none !important;
    }


    /* -----------------------------------------------------
       ALL 8 NAV ITEMS — ONE SINGLE ROW
    ----------------------------------------------------- */

    .sidebar-menu {
        width: 100% !important;

        display: grid !important;

        grid-template-columns:
            repeat(8, minmax(0, 1fr)) !important;

        gap: 4px !important;

        margin: 0 !important;
        padding: 0 !important;

        align-items: center !important;
    }

    .sidebar-menu a {
        position: relative !important;

        width: 100% !important;
        min-width: 0 !important;
        min-height: 34px !important;

        padding: 6px 2px !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        border-radius: 9px !important;

        border: 1px solid transparent !important;

        color: rgba(255,255,255,.48) !important;

        font-size: 0 !important;
        line-height: 1 !important;

        transform: none !important;

        box-sizing: border-box !important;
    }

    .sidebar-menu a:hover {
        transform: none !important;
    }

    .sidebar-menu a span {
        display: none !important;
    }

    .sidebar-menu a svg {
        width: 15px !important;
        height: 15px !important;

        min-width: 15px !important;
        flex: 0 0 15px !important;

        opacity: .76 !important;
        stroke-width: 2 !important;
    }


    /* -----------------------------------------------------
       ACTIVE NAV ITEM
       Icon stays in the row.
       Small label appears underneath.
    ----------------------------------------------------- */

    .sidebar-menu a.active-link {
        color: #fff !important;

        background:
            linear-gradient(
                135deg,
                rgba(255,79,195,.17),
                rgba(143,107,255,.10)
            ) !important;

        border-color:
            rgba(255,79,195,.28) !important;

        box-shadow:
            0 8px 22px rgba(255,79,195,.06) !important;

        overflow: visible !important;
    }

    .sidebar-menu a.active-link::before {
        display: none !important;
    }

    .sidebar-menu a.active-link svg {
        color: #ff35b5 !important;
        opacity: 1 !important;
    }

    /*
       Show the active page name as a tiny tooltip.
    */

    .sidebar-menu a.active-link span {
        display: block !important;

        position: absolute !important;

        left: 50% !important;
        top: calc(100% + 4px) !important;

        transform: translateX(-50%) !important;

        z-index: 100 !important;

        width: max-content !important;
        max-width: 105px !important;

        padding: 5px 7px !important;

        border-radius: 6px !important;

        background: rgba(18,18,24,.97) !important;

        border: 1px solid rgba(255,255,255,.08) !important;

        color: rgba(255,255,255,.92) !important;

        font-size: .48rem !important;
        line-height: 1 !important;
        font-weight: 700 !important;

        white-space: nowrap !important;

        box-shadow: 0 8px 20px rgba(0,0,0,.28) !important;
    }


    /* Hide upgrade card on mobile */

    .upgrade-mini-btn {
        display: none !important;
    }


    /* =====================================================
       3. HERO
    ===================================================== */

    .profile-audit-hero {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .hero-left {
        width: 100% !important;
        min-height: 0 !important;

        padding: 22px 18px !important;

        border-radius: 20px !important;

        box-sizing: border-box !important;
    }

    .hero-right {
        width: 100% !important;
        min-height: 0 !important;

        margin-top: 10px !important;
    }

    .dashboard-label,
    .mini-label {
        font-size: .58rem !important;
        letter-spacing: .12em !important;
    }

    /*
       IMPORTANT:
       Keep this intentionally compact.
       The mobile hero should not dominate the screen.
    */

    .dashboard-title {
        max-width: 100% !important;

        margin-top: 8px !important;

        font-size: 1.55rem !important;
        line-height: 1.05 !important;

        letter-spacing: -.045em !important;

        font-weight: 850 !important;
    }

    .dashboard-subtitle {
        max-width: 100% !important;

        margin-top: 10px !important;

        font-size: .72rem !important;
        line-height: 1.45 !important;

        font-weight: 560 !important;
    }

    .hero-chip-row {
        gap: 6px !important;
        margin-top: 12px !important;
    }

    .hero-chip {
        min-height: 29px !important;

        padding: 6px 9px !important;

        gap: 5px !important;

        font-size: .60rem !important;
    }

    .hero-chip svg {
        width: 12px !important;
        height: 12px !important;
    }


    /* =====================================================
       4. PREVIEW CARD
    ===================================================== */

    .audit-preview-card {
        min-height: 0 !important;

        padding: 16px !important;

        border-radius: 20px !important;
    }


    /* =====================================================
       5. GENERAL CARDS
    ===================================================== */

    .hero-left,
    .hero-right,
    .audit-card,
    .result-header-card,
    .main-score-card,
    .stats-card,
    .mini-score-card,
    .analysis-card,
    .profile-history-section {
        min-width: 0 !important;
        max-width: 100% !important;

        box-sizing: border-box !important;

        border-radius: 18px !important;
    }

    .audit-card,
    .analysis-card,
    .profile-history-section {
        padding: 16px !important;
    }


    /* =====================================================
       6. INPUT / AUDIT SECTION
    ===================================================== */

    .audit-top {
        display: flex !important;

        flex-direction: column !important;

        align-items: flex-start !important;

        gap: 8px !important;
    }

    .audit-top h2 {
        margin-top: 5px !important;

        font-size: 1.05rem !important;
        line-height: 1.12 !important;

        letter-spacing: -.025em !important;
    }

    .audit-top p {
        margin-top: 5px !important;

        font-size: .67rem !important;
        line-height: 1.45 !important;
    }

    .generator-badge {
        font-size: .58rem !important;

        padding: 6px 9px !important;

        border-radius: 999px !important;
    }


    /* =====================================================
       7. AUDIT MODE BUTTONS
    ===================================================== */

    .audit-mode-switch {
        display: grid !important;

        grid-template-columns: 1fr !important;

        gap: 7px !important;

        margin-top: 12px !important;
    }

    .audit-mode-btn {
        width: 100% !important;

        min-height: 52px !important;

        padding: 9px 11px !important;

        display: flex !important;

        align-items: center !important;

        gap: 9px !important;

        border-radius: 14px !important;

        box-sizing: border-box !important;
    }

    .audit-mode-btn svg {
        width: 16px !important;
        height: 16px !important;
        flex: 0 0 16px !important;
    }

    .audit-mode-btn strong,
    .audit-mode-btn span {
        font-size: .70rem !important;
        line-height: 1.2 !important;
    }


    /* =====================================================
       8. FORM
    ===================================================== */

    .audit-form-grid {
        display: grid !important;

        grid-template-columns: 1fr !important;

        gap: 11px !important;

        margin-top: 13px !important;
    }

    .audit-form-grid > * {
        min-width: 0 !important;
    }

    .audit-form-grid label,
    .audit-form-grid .field-label {
        font-size: .62rem !important;
    }

    input,
    select,
    textarea {
        width: 100% !important;

        max-width: 100% !important;

        box-sizing: border-box !important;

        font-size: .70rem !important;

        border-radius: 12px !important;
    }

    input,
    select {
        min-height: 42px !important;

        padding: 9px 11px !important;
    }

    textarea {
        min-height: 90px !important;

        padding: 10px 11px !important;

        line-height: 1.45 !important;
    }

    .field-help,
    .input-help,
    .form-help {
        font-size: .55rem !important;

        line-height: 1.4 !important;
    }


    /* =====================================================
       9. PROFILE TYPE PICKER
    ===================================================== */

    .profile-type-group {
        grid-column: 1 / -1 !important;
    }

    .profile-type-picker {
        display: grid !important;

        grid-template-columns: 1fr 1fr !important;

        gap: 7px !important;

        margin-top: 6px !important;
    }

    .profile-type-option {
        min-width: 0 !important;

        min-height: 58px !important;

        padding: 9px !important;

        gap: 8px !important;

        border-radius: 13px !important;
    }

    .profile-type-option svg {
        width: 15px !important;
        height: 15px !important;
        flex: 0 0 15px !important;
    }

    .profile-type-option strong {
        font-size: .66rem !important;
        line-height: 1.15 !important;
    }

    .profile-type-option small {
        font-size: .52rem !important;
        line-height: 1.2 !important;
    }


    /* =====================================================
       10. TOGGLES
    ===================================================== */

    .audit-options-row {
        margin-top: 13px !important;

        display: flex !important;

        flex-direction: column !important;

        align-items: flex-start !important;

        gap: 7px !important;
    }

    .audit-toggle {
        max-width: 100% !important;

        font-size: .62rem !important;
    }


    /* =====================================================
       11. ANALYZE BUTTON
    ===================================================== */

    .audit-action-row {
        margin-top: 15px !important;

        display: flex !important;

        flex-direction: column !important;

        align-items: stretch !important;

        gap: 9px !important;
    }

    .primary-btn,
    .analyze-btn {
        width: 100% !important;

        min-width: 0 !important;
        max-width: 100% !important;

        min-height: 45px !important;

        padding: 10px 13px !important;

        border-radius: 12px !important;

        font-size: .68rem !important;
    }

    .generate-loader {
        max-width: 100% !important;

        gap: 6px !important;

        font-size: .65rem !important;
    }

    .generate-loader svg {
        width: 14px !important;
        height: 14px !important;
    }

    .audit-status-text {
        width: 100% !important;
        max-width: 100% !important;

        min-height: 0 !important;

        padding: 9px 11px !important;

        border-radius: 11px !important;

        font-size: .58rem !important;

        line-height: 1.4 !important;
    }


    /* =====================================================
       12. RESULTS CONTAINER
    ===================================================== */

    .profile-results {
        width: 100% !important;

        min-width: 0 !important;

        display: flex !important;

        flex-direction: column !important;

        gap: 10px !important;
    }

    .profile-results > * {
        min-width: 0 !important;

        max-width: 100% !important;

        box-sizing: border-box !important;
    }


    /* =====================================================
       13. RESULT HEADER
    ===================================================== */

    .result-header-card {
        padding: 14px !important;

        display: flex !important;

        flex-direction: column !important;

        align-items: flex-start !important;

        gap: 10px !important;
    }

    .profile-identity {
        width: 100% !important;

        min-width: 0 !important;

        display: flex !important;

        align-items: center !important;

        gap: 9px !important;
    }

    .profile-avatar-stack {
        gap: 8px !important;
    }

    .profile-avatar-wrap {
        width: 48px !important;
        height: 48px !important;

        flex: 0 0 48px !important;

        border-radius: 15px !important;
    }

    .profile-avatar-fallback svg {
        width: 20px !important;
        height: 20px !important;
    }

    .profile-title-block {
        min-width: 0 !important;
    }

    .profile-title-block h2 {
        margin-top: 3px !important;

        font-size: .95rem !important;

        line-height: 1.1 !important;

        overflow-wrap: anywhere !important;
    }

    .profile-title-block p {
        margin-top: 4px !important;

        font-size: .60rem !important;

        line-height: 1.35 !important;
    }

    .result-meta-pills {
        width: 100% !important;

        display: flex !important;

        flex-wrap: wrap !important;

        gap: 5px !important;
    }


    /* =====================================================
       14. SCORE + STATS
    ===================================================== */

    .score-stats-grid {
        display: grid !important;

        grid-template-columns: 1fr !important;

        gap: 9px !important;
    }

    .main-score-card {
        padding: 14px !important;

        display: flex !important;

        flex-direction: column !important;

        align-items: center !important;

        text-align: center !important;

        gap: 10px !important;
    }

    .score-circle {
        width: 92px !important;
        height: 92px !important;

        flex: 0 0 92px !important;
    }

    .score-number {
        font-size: 1.55rem !important;
    }

    .score-info {
        width: 100% !important;

        min-width: 0 !important;
    }

    .score-info span {
        font-size: .58rem !important;
    }

    .score-info h3 {
        margin-top: 4px !important;

        font-size: .78rem !important;

        line-height: 1.25 !important;
    }

    .score-info p {
        margin-top: 5px !important;

        font-size: .58rem !important;

        line-height: 1.4 !important;
    }


    /* Three stats — keep compact */

    .profile-stats {
        display: grid !important;

        grid-template-columns:
            repeat(3, minmax(0, 1fr)) !important;

        gap: 7px !important;
    }

    .stats-card {
        min-width: 0 !important;

        min-height: 70px !important;

        padding: 9px 7px !important;

        display: flex !important;

        flex-direction: column !important;

        align-items: flex-start !important;

        justify-content: center !important;

        gap: 4px !important;

        border-radius: 13px !important;
    }

    .stats-card svg {
        width: 14px !important;
        height: 14px !important;

        flex: 0 0 14px !important;
    }

    .stats-card h3 {
        max-width: 100% !important;

        font-size: .70rem !important;

        line-height: 1.1 !important;

        white-space: normal !important;

        overflow-wrap: anywhere !important;
    }

    .stats-card p {
        max-width: 100% !important;

        font-size: .50rem !important;

        line-height: 1.25 !important;

        white-space: normal !important;

        overflow-wrap: anywhere !important;
    }


    /* =====================================================
       15. SNAPSHOT / INSIGHTS
    ===================================================== */

    .snapshot-list {
        gap: 6px !important;

        margin-top: 9px !important;
    }

    .snapshot-list div {
        display: grid !important;

        grid-template-columns: 78px minmax(0,1fr) !important;

        gap: 8px !important;

        padding: 8px 0 !important;
    }

    .snapshot-list span,
    .insight-grid span,
    .compare-grid span {
        font-size: .52rem !important;
    }

    .snapshot-list strong,
    .compare-grid strong {
        font-size: .62rem !important;

        line-height: 1.4 !important;

        overflow-wrap: anywhere !important;
    }


    /* =====================================================
       16. ANALYSIS GRIDS
    ===================================================== */

    .analysis-grid {
        display: grid !important;

        grid-template-columns: 1fr !important;

        gap: 9px !important;
    }

    .analysis-card {
        width: 100% !important;

        min-width: 0 !important;

        padding: 13px !important;

        border-radius: 15px !important;

        box-sizing: border-box !important;
    }

    .analysis-card h3 {
        margin: 0 !important;

        font-size: .78rem !important;

        line-height: 1.2 !important;
    }

    .analysis-card p {
        margin-top: 5px !important;

        font-size: .60rem !important;

        line-height: 1.42 !important;

        overflow-wrap: anywhere !important;
    }


    /* =====================================================
       17. INSIGHT / COMPARE FOUR-CARD AREAS
    ===================================================== */

    .insight-grid,
    .compare-grid {
        display: grid !important;

        grid-template-columns: 1fr 1fr !important;

        gap: 7px !important;

        margin-top: 10px !important;
    }

    .insight-grid div,
    .compare-grid div {
        min-width: 0 !important;

        min-height: 78px !important;

        padding: 9px !important;

        border-radius: 12px !important;

        box-sizing: border-box !important;
    }

    .insight-grid p,
    .compare-grid strong {
        margin-top: 5px !important;

        font-size: .58rem !important;

        line-height: 1.35 !important;

        overflow-wrap: anywhere !important;
    }


    /* =====================================================
       18. AUDIT LISTS
    ===================================================== */

    .audit-list {
        gap: 7px !important;

        margin-top: 9px !important;
    }

    .audit-list li {
        min-height: 34px !important;

        padding: 8px 8px 8px 30px !important;

        font-size: .61rem !important;

        line-height: 1.38 !important;

        border-radius: 11px !important;

        overflow-wrap: anywhere !important;
    }

    .audit-list li::before {
        top: 12px !important;
        left: 10px !important;

        width: 6px !important;
        height: 6px !important;
    }

    .numbered-list li::before {
        top: 8px !important;
        left: 8px !important;

        width: 19px !important;
        height: 19px !important;

        font-size: .55rem !important;
    }


    /* =====================================================
       19. PILL LISTS
    ===================================================== */

    .pill-list {
        gap: 5px !important;

        margin-top: 9px !important;
    }

    .pill-list span {
        min-height: 24px !important;

        padding: 5px 7px !important;

        font-size: .54rem !important;
    }


    /* =====================================================
       20. HISTORY
    ===================================================== */

    .profile-history-section {
        padding: 14px !important;

        width: 100% !important;

        min-width: 0 !important;
    }

    .section-head {
        display: flex !important;

        flex-direction: row !important;

        align-items: flex-start !important;

        justify-content: space-between !important;

        gap: 8px !important;
    }

    .section-head > div {
        min-width: 0 !important;
    }

    .section-head h3 {
        margin-top: 3px !important;

        font-size: .88rem !important;

        line-height: 1.15 !important;
    }

    .section-head > div > p:last-child {
        margin-top: 4px !important;

        font-size: .56rem !important;

        line-height: 1.35 !important;
    }

    .text-action-btn {
        flex: 0 0 auto !important;

        min-height: 28px !important;

        padding: 6px 8px !important;

        font-size: .55rem !important;

        border-radius: 9px !important;
    }

    .text-action-btn svg {
        width: 11px !important;
        height: 11px !important;
    }

    .history-list {
        display: grid !important;

        grid-template-columns: 1fr !important;

        gap: 7px !important;

        margin-top: 10px !important;
    }

    .history-list.is-scrollable {
        max-height: 360px !important;

        overflow-y: auto !important;

        padding-right: 4px !important;
    }

    .history-card {
        min-width: 0 !important;

        padding: 10px !important;

        border-radius: 12px !important;

        overflow: hidden !important;
    }

    .history-card strong {
        font-size: .65rem !important;

        line-height: 1.3 !important;

        overflow-wrap: anywhere !important;
    }

    .history-card p {
        margin-top: 4px !important;

        font-size: .55rem !important;

        line-height: 1.35 !important;

        overflow-wrap: anywhere !important;
    }

    .history-card span {
        min-height: 22px !important;

        margin-top: 7px !important;

        padding: 4px 6px !important;

        font-size: .52rem !important;
    }

    .history-status {
        padding: 9px !important;

        font-size: .58rem !important;

        line-height: 1.35 !important;
    }


    /* =====================================================
       21. ERROR / SUCCESS / WARNING
    ===================================================== */

    .error-state,
    .success-state,
    .warning-state {
        padding: 9px 10px !important;

        border-radius: 11px !important;

        font-size: .60rem !important;

        line-height: 1.4 !important;
    }


    /* =====================================================
       22. PREVENT MOBILE OVERFLOW EVERYWHERE
    ===================================================== */

    .dashboard-main *,
    .dashboard-content-wrapper *,
    .profile-results * {
        max-width: 100% !important;

        box-sizing: border-box !important;
    }

    img,
    svg,
    video {
        max-width: 100% !important;
    }

}


/* =========================================================
   EXTRA SMALL PHONES
========================================================= */

@media (max-width: 380px) {

    .dashboard-main {
        padding-left: 7px !important;
        padding-right: 7px !important;
    }

    .sidebar {
        padding-left: 7px !important;
        padding-right: 7px !important;
    }

    .sidebar-menu {
        gap: 2px !important;
    }

    .sidebar-menu a {
        min-height: 32px !important;
    }

    .sidebar-menu a svg {
        width: 14px !important;
        height: 14px !important;
        min-width: 14px !important;
    }

    .dashboard-title {
        font-size: 1.43rem !important;
    }

    .hero-left,
    .audit-card,
    .analysis-card,
    .profile-history-section {
        padding: 14px !important;
    }

    .profile-type-picker {
        gap: 5px !important;
    }

    .profile-type-option {
        padding: 8px !important;
    }

    .profile-stats {
        gap: 5px !important;
    }

    .stats-card {
        padding: 8px 6px !important;
    }

}

/* =========================================================
   VIRALMINT AI — PROFILE AUDIT MOBILE
   FINAL MOBILE POLISH
   Loaded AFTER profile-audit.css
========================================================= */

@media (max-width: 720px) {

    /* =====================================================
       1. MOBILE PAGE SHELL
    ===================================================== */

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
    }

    .dashboard-layout {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .dashboard-main {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        padding: 10px 10px 28px !important;
    }

    .dashboard-content-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        gap: 14px !important;
    }


    /* =====================================================
       2. MOBILE NAV
       Keep the shared mobile-nav system in control.
       Profile Audit uses the same compact one-row nav
       as Account / Trend Intelligence.
    ===================================================== */

    .sidebar {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 8px 10px 8px !important;
        overflow: visible !important;
    }

    .sidebar-inner {
        width: 100% !important;
        gap: 8px !important;
    }

    .sidebar-logo {
        margin: 0 0 7px !important;
        padding: 0 !important;
        min-height: 31px !important;
        height: 31px !important;
        border-bottom: 0 !important;
        gap: 7px !important;
    }

    .logo-mark {
        width: 31px !important;
        height: 31px !important;
        min-width: 31px !important;
        border-radius: 9px !important;
    }

    .logo-mark svg {
        width: 15px !important;
        height: 15px !important;
    }

    .logo-copy strong,
    .sidebar-logo strong {
        font-size: .82rem !important;
        line-height: 1 !important;
    }

    .logo-copy span,
    .sidebar-logo span {
        display: none !important;
    }

    /*
       IMPORTANT:
       Do NOT let the old 4-column / 2-column desktop
       responsive rules stack the navigation.
    */

    .sidebar-menu {
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 3px !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .sidebar-menu a {
        position: relative !important;
        width: 38px !important;
        min-width: 38px !important;
        max-width: 38px !important;
        height: 34px !important;
        min-height: 34px !important;

        padding: 0 !important;
        margin: 0 !important;

        display: grid !important;
        place-items: center !important;

        border-radius: 10px !important;
        font-size: 0 !important;
        line-height: 0 !important;
        gap: 0 !important;
    }

    .sidebar-menu a span {
        display: none !important;
    }

    .sidebar-menu a svg {
        width: 16px !important;
        height: 16px !important;
        flex: 0 0 16px !important;
    }

    .sidebar-menu a.active-link::before {
        display: none !important;
    }

    .sidebar-menu a.active-link::after {
        content: "Profile Audit" !important;

        position: absolute !important;
        left: 50% !important;
        top: calc(100% + 5px) !important;

        transform: translateX(-50%) !important;

        width: max-content !important;
        max-width: 105px !important;

        padding: 4px 7px !important;

        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;

        border-radius: 6px !important;

        background: rgba(14, 12, 18, .96) !important;
        border: 1px solid rgba(255,255,255,.075) !important;

        color: rgba(255,255,255,.88) !important;

        font-size: 9px !important;
        font-weight: 700 !important;
        line-height: 1 !important;

        white-space: nowrap !important;

        box-shadow: 0 7px 18px rgba(0,0,0,.30) !important;

        z-index: 100 !important;
    }

    /*
       Remove Pro Blueprint card from mobile.
       It consumes unnecessary vertical space.
    */

    .upgrade-mini-btn {
        display: none !important;
    }


    /* =====================================================
       3. HERO — SMALLER / CLEANER
    ===================================================== */

    .profile-audit-hero {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
    }

    .hero-left {
        width: 100% !important;
        min-height: 0 !important;
        padding: 20px 18px !important;
        border-radius: 22px !important;
    }

    .hero-right {
        display: none !important;
    }

    .dashboard-label {
        font-size: 9px !important;
        letter-spacing: .13em !important;
    }

    .dashboard-title {
        max-width: 100% !important;

        margin-top: 8px !important;

        font-size: 30px !important;
        line-height: 1.04 !important;
        letter-spacing: -.045em !important;
    }

    .dashboard-subtitle {
        max-width: 100% !important;

        margin-top: 12px !important;

        font-size: 11.5px !important;
        line-height: 1.5 !important;
    }

    .hero-chip-row {
        gap: 6px !important;
        margin-top: 14px !important;
    }

    .hero-chip {
        min-height: 28px !important;
        padding: 6px 9px !important;
        gap: 5px !important;
        font-size: 9px !important;
    }

    .hero-chip svg {
        width: 12px !important;
        height: 12px !important;
    }


    /* =====================================================
       4. GENERAL CARD SIZING
    ===================================================== */

    .audit-card,
    .result-header-card,
    .main-score-card,
    .analysis-card,
    .profile-history-section {
        border-radius: 20px !important;
    }

    .audit-card,
    .analysis-card,
    .profile-history-section {
        padding: 16px !important;
    }

    .result-header-card {
        padding: 15px !important;
    }


    /* =====================================================
       5. RESULT HEADER
    ===================================================== */

    .result-header-card {
        gap: 10px !important;
    }

    .profile-identity {
        gap: 10px !important;
        min-width: 0 !important;
    }

    .profile-avatar-wrap {
        width: 48px !important;
        height: 48px !important;
        flex: 0 0 48px !important;
        border-radius: 15px !important;
    }

    #profileName {
        font-size: 1rem !important;
        line-height: 1.15 !important;
        margin-top: 3px !important;
    }

    #profileUsername {
        margin-top: 3px !important;
        font-size: .72rem !important;
    }

    .result-meta-pills {
        justify-content: flex-start !important;
        gap: 5px !important;
    }

    .result-meta-pills span,
    .soft-pill {
        min-height: 27px !important;
        padding: 5px 8px !important;
        font-size: .64rem !important;
    }


    /* =====================================================
       6. MAIN SCORE
       Keep the main score prominent, but compact.
    ===================================================== */

    .score-stats-grid {
        display: block !important;
    }

    .main-score-card {
        width: 100% !important;
        padding: 17px !important;

        display: flex !important;
        align-items: center !important;
        gap: 14px !important;
    }

    .score-circle {
        width: 92px !important;
        height: 92px !important;
        flex: 0 0 92px !important;
    }

    .score-circle::before {
        inset: 10px !important;
    }

    .score-number {
        font-size: 1.65rem !important;
    }

    .score-info {
        min-width: 0 !important;
    }

    .score-info span {
        font-size: .60rem !important;
        letter-spacing: .08em !important;
    }

    .score-info h3 {
        margin-top: 5px !important;
        font-size: .92rem !important;
        line-height: 1.25 !important;
    }

    .score-info p {
        margin-top: 5px !important;
        font-size: .68rem !important;
        line-height: 1.42 !important;
    }


    /* =====================================================
       7. PROFILE STATS
       Three compact stats in one row.
    ===================================================== */

    .profile-stats {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 7px !important;
        margin-top: 7px !important;
    }

    .stats-card {
        min-width: 0 !important;
        min-height: 62px !important;

        padding: 9px 7px !important;

        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;

        gap: 3px !important;

        border-radius: 14px !important;
        text-align: center !important;
    }

    .stats-card svg {
        width: 22px !important;
        height: 22px !important;
        padding: 5px !important;
        border-radius: 7px !important;
    }

    .stats-card h3 {
        font-size: .82rem !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }

    .stats-card p {
        margin-top: 1px !important;
        font-size: .52rem !important;
        line-height: 1 !important;
        white-space: nowrap !important;
    }


    /* =====================================================
       8. SIX SECONDARY SCORE CARDS
       THIS IS THE IMPORTANT FIX:
       3 cards per row × 2 rows.
    ===================================================== */

    .scorecard-grid {
        display: grid !important;

        grid-template-columns:
            repeat(3, minmax(0, 1fr)) !important;

        gap: 7px !important;

        margin-top: 7px !important;
        width: 100% !important;
    }

    .mini-score-card {
        min-width: 0 !important;
        min-height: 72px !important;

        height: auto !important;

        padding: 11px 7px !important;

        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;

        border-radius: 14px !important;
    }

    .mini-score-card span {
        font-size: 1.05rem !important;
        line-height: 1 !important;
    }

    .mini-score-card p {
        margin-top: 5px !important;
        font-size: .54rem !important;
        line-height: 1.15 !important;
        text-align: center !important;
    }


    /* =====================================================
       9. INPUT / AUDIT SECTION
       Less vertical waste without making it cramped.
    ===================================================== */

    .audit-card {
        padding: 17px !important;
    }

    .audit-top {
        gap: 8px !important;
    }

    .audit-top h2,
    .audit-card h2 {
        font-size: 1.22rem !important;
        line-height: 1.18 !important;
    }

    .audit-top p,
    .audit-card > p {
        font-size: .72rem !important;
        line-height: 1.45 !important;
    }

    .audit-form-grid {
        gap: 11px !important;
    }

    .audit-form-grid label {
        font-size: .68rem !important;
    }

    .audit-form-grid input,
    .audit-form-grid select,
    .audit-form-grid textarea {
        min-height: 43px !important;
        padding: 10px 12px !important;
        border-radius: 13px !important;
        font-size: .72rem !important;
    }

    .audit-form-grid textarea {
        min-height: 88px !important;
    }

    .input-help {
        margin-top: 5px !important;
        font-size: .58rem !important;
        line-height: 1.35 !important;
    }

    .profile-type-picker {
        gap: 7px !important;
    }

    .profile-type-option {
        min-height: 55px !important;
        padding: 9px 10px !important;
        border-radius: 14px !important;
    }

    .profile-type-option strong {
        font-size: .70rem !important;
    }

    .profile-type-option small {
        font-size: .56rem !important;
    }

    .profile-type-option svg {
        width: 17px !important;
        height: 17px !important;
    }

    .audit-options-row {
        margin-top: 14px !important;
        gap: 8px !important;
    }

    .audit-toggle {
        font-size: .68rem !important;
    }

    .audit-action-row {
        margin-top: 15px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 9px !important;
    }

    .audit-status-text {
        max-width: 100% !important;
        padding: 9px 11px !important;
        border-radius: 12px !important;
        font-size: .64rem !important;
        line-height: 1.4 !important;
    }

    .primary-btn,
    .analyze-btn {
        width: 100% !important;
        min-width: 0 !important;
        height: 46px !important;
        min-height: 46px !important;
        padding: 0 14px !important;
        border-radius: 13px !important;
        font-size: .72rem !important;
    }


    /* =====================================================
       10. ANALYSIS / RESULT CARDS
    ===================================================== */

    .analysis-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .analysis-card {
        min-height: 0 !important;
        padding: 15px !important;
    }

    .analysis-card h3 {
        font-size: .88rem !important;
        line-height: 1.25 !important;
    }

    .audit-list {
        gap: 6px !important;
        margin-top: 9px !important;
    }

    .audit-list li {
        min-height: 0 !important;
        padding: 8px 9px 8px 31px !important;

        font-size: .64rem !important;
        line-height: 1.42 !important;

        border-radius: 11px !important;
    }

    .audit-list li::before {
        top: 12px !important;
        left: 11px !important;
        width: 6px !important;
        height: 6px !important;
    }

    .numbered-list li::before {
        top: 8px !important;
        left: 8px !important;
        width: 19px !important;
        height: 19px !important;
        font-size: .58rem !important;
    }


    /* =====================================================
       11. INSIGHT / COMPARISON BLOCKS
    ===================================================== */

    .insight-grid,
    .compare-grid {
        grid-template-columns: 1fr !important;
        gap: 7px !important;
        margin-top: 10px !important;
    }

    .insight-grid div,
    .compare-grid div {
        min-height: 0 !important;
        padding: 10px !important;
        border-radius: 13px !important;
    }

    .insight-grid span,
    .compare-grid span {
        font-size: .58rem !important;
    }

    .insight-grid p,
    .compare-grid strong {
        margin-top: 5px !important;
        font-size: .65rem !important;
        line-height: 1.4 !important;
    }

    .snapshot-list {
        gap: 5px !important;
        margin-top: 10px !important;
    }

    .snapshot-list div {
        grid-template-columns: 90px 1fr !important;
        gap: 8px !important;
        padding: 8px 0 !important;
    }

    .snapshot-list span {
        font-size: .58rem !important;
    }

    .snapshot-list strong {
        font-size: .66rem !important;
        line-height: 1.4 !important;
    }


    /* =====================================================
       12. HISTORY
       Compact cards, but keep readable.
    ===================================================== */

    .profile-history-section {
        padding: 15px !important;
    }

    .profile-history-section .section-head {
        display: flex !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        justify-content: space-between !important;
        gap: 8px !important;
    }

    .profile-history-section .section-head > div {
        min-width: 0 !important;
    }

    .profile-history-section .mini-label {
        font-size: .58rem !important;
        letter-spacing: .10em !important;
    }

    .profile-history-section .section-head h3 {
        margin-top: 3px !important;
        font-size: .94rem !important;
        line-height: 1.15 !important;
    }

    .profile-history-section .section-head p {
        margin-top: 3px !important;
        font-size: .60rem !important;
        line-height: 1.35 !important;
    }

    #refreshProfileHistoryBtn {
        flex: 0 0 auto !important;
        min-height: 28px !important;
        padding: 0 8px !important;
        border-radius: 999px !important;
        font-size: .58rem !important;
    }

    #refreshProfileHistoryBtn svg {
        width: 12px !important;
        height: 12px !important;
    }

    .history-status {
        margin-top: 9px !important;
        padding: 8px 9px !important;
        border-radius: 11px !important;
        font-size: .60rem !important;
        line-height: 1.35 !important;
    }

    .history-list {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 7px !important;
        margin-top: 9px !important;
    }

    .history-list.is-scrollable {
        max-height: 390px !important;
        padding-right: 5px !important;
    }

    .history-card {
        min-height: 0 !important;
        padding: 11px !important;
        border-radius: 13px !important;
    }

    .history-card strong {
        font-size: .68rem !important;
        line-height: 1.3 !important;
    }

    .history-card p {
        margin-top: 3px !important;
        font-size: .57rem !important;
        line-height: 1.3 !important;
    }

    .history-card span {
        min-height: 22px !important;
        margin-top: 7px !important;
        padding: 4px 7px !important;
        font-size: .54rem !important;
    }


    /* =====================================================
       13. BIO / TEXT RESULTS
    ===================================================== */

    .bio-suggestion {
        min-height: 0 !important;
        margin: 10px 0 8px !important;
        padding: 11px !important;
        font-size: .70rem !important;
        line-height: 1.48 !important;
        border-radius: 13px !important;
    }


    /* =====================================================
       14. PILLS
    ===================================================== */

    .pill-list {
        gap: 5px !important;
        margin-top: 9px !important;
    }

    .pill-list span {
        min-height: 25px !important;
        padding: 5px 8px !important;
        font-size: .58rem !important;
    }

}


/* =========================================================
   VERY SMALL PHONES
========================================================= */

@media (max-width: 420px) {

    .dashboard-main {
        padding: 8px 8px 24px !important;
    }

    .sidebar {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .sidebar-menu a {
        width: 35px !important;
        min-width: 35px !important;
        max-width: 35px !important;
        height: 32px !important;
        min-height: 32px !important;
    }

    .sidebar-menu a svg {
        width: 15px !important;
        height: 15px !important;
    }

    .dashboard-title {
        font-size: 28px !important;
    }

    .dashboard-subtitle {
        font-size: 11px !important;
    }

    .hero-left {
        padding: 18px 15px !important;
    }

    .main-score-card {
        padding: 14px !important;
    }

    .score-circle {
        width: 84px !important;
        height: 84px !important;
        flex-basis: 84px !important;
    }

    .score-number {
        font-size: 1.5rem !important;
    }

    .profile-stats {
        gap: 6px !important;
    }

    .scorecard-grid {
        gap: 6px !important;
    }

    .mini-score-card {
        min-height: 68px !important;
        padding: 9px 5px !important;
    }

    .mini-score-card span {
        font-size: 1rem !important;
    }

    .mini-score-card p {
        font-size: .50rem !important;
    }
}

/* ================================
   PROFILE AUDIT — MOBILE SCORE CARDS
   ================================ */

@media (max-width: 768px) {

    /* Keep the small profile stats perfectly aligned */
    .profile-audit-stats,
    .profile-stats,
    .audit-stats {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }

    /* Make all small score/stat cards consistent */
    .profile-audit-stats > *,
    .profile-stats > *,
    .audit-stats > * {
        min-width: 0;
        min-height: 66px;
        height: 66px;
        padding: 10px 6px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    /* Prevent the tiny pink icon/dot from collapsing */
    .profile-audit-stats .icon,
    .profile-stats .icon,
    .audit-stats .icon {
        width: 16px;
        height: 16px;
        min-width: 16px;
        min-height: 16px;
        margin-bottom: 3px;
        border-radius: 50%;
        flex-shrink: 0;
    }

    /* Score number */
    .profile-audit-stats .score,
    .profile-stats .score,
    .audit-stats .score {
        line-height: 1.1;
        margin: 0;
    }

    /* Label */
    .profile-audit-stats .label,
    .profile-stats .label,
    .audit-stats .label {
        margin-top: 3px;
        line-height: 1.15;
    }
}

/* =========================================
   PROFILE AUDIT — MOBILE RESULT SCORE LAYOUT
   ========================================= */

@media (max-width: 768px) {

    /* ---------- 3 PROFILE STATS ---------- */

    .profile-stats {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
        width: 100%;
        margin-top: 7px;
    }

    .profile-stats .stats-card {
        min-width: 0;
        height: 62px;
        min-height: 62px;
        padding: 7px 5px;
        box-sizing: border-box;

        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        overflow: hidden;
    }

    /* Fix the small icons becoming tiny dots */
    .profile-stats .stats-card > svg,
    .profile-stats .stats-card > i {
        width: 13px;
        height: 13px;
        min-width: 13px;
        min-height: 13px;
        margin-bottom: 2px;
        flex-shrink: 0;
    }

    .profile-stats .stats-card h3 {
        margin: 0;
        line-height: 1.05;
        font-size: 13px;
    }

    .profile-stats .stats-card p {
        margin: 2px 0 0;
        line-height: 1.05;
        font-size: 8px;
    }


    /* ---------- SIX SCORE CARDS ---------- */

    .scorecard-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
        width: 100%;
        margin-top: 8px;
    }

    .scorecard-grid .mini-score-card {
        min-width: 0;
        height: 62px;
        min-height: 62px;
        padding: 7px 5px;
        box-sizing: border-box;

        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        overflow: hidden;
    }

    .scorecard-grid .mini-score-card span {
        display: block;
        margin: 0;
        line-height: 1;
        font-size: 15px;
        font-weight: 700;
    }

    .scorecard-grid .mini-score-card p {
        margin: 3px 0 0;
        line-height: 1.05;
        font-size: 8px;
        text-align: center;
    }


    /* ---------- CONSISTENT SPACING ---------- */

    .score-stats-grid {
        gap: 7px;
    }

    .main-score-card {
        margin-bottom: 0;
    }
}

/* =========================================================
   PROFILE AUDIT — MOBILE HERO HEADING
   Compact 2-line heading
========================================================= */

@media (max-width: 720px) {

    .profile-audit-hero .dashboard-title {
        font-size: 1.65rem !important;
        line-height: 1.02 !important;
        letter-spacing: -0.045em !important;
        max-width: 100% !important;
        margin-top: 10px !important;
        margin-bottom: 0 !important;
    }

}


/* Extra-small phones */
@media (max-width: 380px) {

    .profile-audit-hero .dashboard-title {
        font-size: 1.55rem !important;
        line-height: 1.03 !important;
        letter-spacing: -0.045em !important;
    }

}

/* =========================================================
   PROFILE AUDIT — FINAL MOBILE HERO HEADING
   FORCE COMPACT 2-LINE LAYOUT
========================================================= */

@media (max-width: 720px) {

    .profile-audit-hero .hero-left h1.dashboard-title {
        display: block !important;

        width: 100% !important;
        max-width: 100% !important;

        font-size: 23px !important;
        line-height: 1.04 !important;
        letter-spacing: -0.045em !important;
        font-weight: 820 !important;

        margin: 8px 0 0 !important;

        white-space: normal !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
    }

}


@media (max-width: 380px) {

    .profile-audit-hero .hero-left h1.dashboard-title {
        font-size: 22px !important;
        line-height: 1.05 !important;
        letter-spacing: -0.04em !important;
    }

}