.isv-wrap{--p:#6d28d9;max-width:1120px;margin:30px auto;font-family:inherit}.isv-search-card,.isv-profile{background:#fff;border:1px solid #e8e4ef;border-radius:18px;box-shadow:0 14px 40px rgba(28,20,43,.07)}.isv-search-card{padding:34px;text-align:center}.isv-brand{color:var(--p);font-weight:800;font-size:18px}.isv-search-card h2{font-size:clamp(28px,4vw,42px);margin:8px 0}.isv-search-card p{color:#6f687a}.isv-row{max-width:720px;margin:auto;display:flex;align-items:center;border:1px solid #d8d2e0;border-radius:13px;overflow:hidden}.isv-row span{padding-left:16px}.isv-user{flex:1;border:0!important;box-shadow:none!important;padding:15px 12px!important}.isv-row button{border:0;background:var(--p);color:#fff;font-weight:700;padding:16px 28px}.isv-status{min-height:22px;margin-top:14px;color:#7a3654}.isv-results{margin-top:22px}.isv-profile{display:grid;grid-template-columns:auto 1fr auto;gap:24px;align-items:center;padding:26px}.isv-avatar{width:104px;height:104px;border-radius:50%;object-fit:cover}.isv-name{margin:0}.isv-link{color:var(--p);font-weight:700}.isv-bio{color:#6f687a}.isv-cache{background:#fff8df;border:1px solid #f3df9e;border-radius:8px;padding:8px 10px;color:#725600;font-size:13px}.isv-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.isv-stats div{text-align:center;border:1px solid #e8e4ef;border-radius:13px;padding:13px}.isv-stats b,.isv-stats span{display:block}.isv-tabs{display:flex;gap:8px;margin:18px 0}.isv-tabs button{border:1px solid #e8e4ef;background:#fff;border-radius:10px;padding:10px 20px;font-weight:700;color:#17131f!important;cursor:pointer}.isv-tabs button:hover{color:#17131f!important}.isv-tabs .active{background:var(--p);color:#fff!important}.isv-private{padding:16px;background:#faf7ff;border:1px solid #e7dbff;border-radius:12px;margin-bottom:18px}.isv-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.isv-card{position:relative;display:block;overflow:hidden;border-radius:14px;aspect-ratio:1;background:#f2eff6;color:#fff}.isv-card img{width:100%;height:100%;object-fit:cover}.isv-play{position:absolute;right:10px;top:10px;width:34px;height:34px;border-radius:50%;background:rgba(0,0,0,.62);display:grid;place-items:center}.isv-meta{position:absolute;left:0;right:0;bottom:0;padding:28px 10px 9px;background:linear-gradient(transparent,rgba(0,0,0,.7));font-size:12px;font-weight:700}@media(max-width:850px){.isv-profile{grid-template-columns:auto 1fr}.isv-stats{grid-column:1/-1}.isv-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:560px){.isv-profile{grid-template-columns:1fr;text-align:center}.isv-avatar{margin:auto}.isv-grid{grid-template-columns:repeat(2,1fr)}.isv-row{flex-wrap:wrap}.isv-row button{width:100%}}

.isv-card{
    position:relative;
    cursor:pointer;
    transition:transform .24s ease,box-shadow .24s ease;
}
.isv-card:hover{
    transform:translateY(-3px);
    box-shadow:0 14px 34px rgba(22,14,35,.16);
}
.isv-card:focus-visible{
    outline:3px solid rgba(109,40,217,.25);
    outline-offset:3px;
}
.isv-card img{
    transition:transform .35s ease,filter .3s ease;
}
.isv-card:hover img{
    transform:scale(1.025);
}
.isv-media-badge{
    position:absolute;
    z-index:4;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    display:flex;
    align-items:center;
    gap:7px;
    border:0;
    border-radius:999px;
    background:rgba(17,17,20,.78);
    color:#fff!important;
    padding:10px 15px;
    font-weight:800;
    pointer-events:none;
    opacity:0;
    transition:opacity .22s ease,transform .22s ease;
    backdrop-filter:blur(5px);
}
.isv-video-card .isv-media-badge,
.isv-card:hover .isv-media-badge{
    opacity:1;
}
.isv-card:hover .isv-media-badge{
    transform:translate(-50%,-50%) scale(1.03);
}
.isv-meta{
    display:flex;
    gap:12px;
    z-index:3;
    pointer-events:none;
}


.isv-modal[hidden]{display:none!important}

.isv-modal{
    position:fixed;
    z-index:999999;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:18px;
    opacity:0;
    animation:isvFadeIn .18s ease forwards;
}

.isv-modal-backdrop{
    position:absolute;
    inset:0;
    background:#14172f;
    opacity:.98;
}

.isv-modal-dialog{
    position:relative;
    z-index:2;
    width:auto;
    max-width:94vw;
    height:auto;
    max-height:94vh;
    display:flex;
    flex-direction:column;
    align-items:center;
    background:transparent;
    border-radius:12px;
    overflow:visible;
    box-shadow:none;
    transform:scale(.985);
    animation:isvMediaIn .22s cubic-bezier(.2,.8,.2,1) forwards;
}

.isv-media-stage{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:center;
    width:auto;
    max-width:94vw;
    height:auto;
    max-height:86vh;
    min-width:280px;
    min-height:280px;
    background:#000;
    border-radius:8px;
    overflow:hidden;
    box-shadow:0 10px 38px rgba(0,0,0,.34);
}

.isv-modal-image,
.isv-video{
    display:block;
    width:auto;
    height:auto;
    max-width:min(94vw,760px);
    max-height:86vh;
    object-fit:contain;
    background:#000;
}

.isv-video{
    aspect-ratio:auto;
}

.isv-modal-image[hidden],
.isv-video[hidden]{
    display:none!important;
}


.isv-nav{
    position:absolute;
    top:50%;
    z-index:15;
    width:52px;
    height:52px;
    display:grid;
    place-items:center;
    transform:translateY(-50%);
    padding:0;
    border:0;
    border-radius:50%;
    background:rgba(15,15,18,.74);
    color:#fff!important;
    font-family:Arial,sans-serif;
    font-size:42px;
    font-weight:400;
    line-height:1;
    cursor:pointer;
    user-select:none;
    backdrop-filter:blur(7px);
    -webkit-backdrop-filter:blur(7px);
    box-shadow:0 8px 24px rgba(0,0,0,.28);
    transition:background .18s ease,transform .18s ease,opacity .18s ease;
}

.isv-nav:hover{
    background:rgba(15,15,18,.94);
}

.isv-nav:active{
    transform:translateY(-50%) scale(.94);
}

.isv-nav-prev{left:14px}
.isv-nav-next{right:14px}

.isv-position{
    position:absolute;
    z-index:14;
    left:50%;
    bottom:12px;
    transform:translateX(-50%);
    padding:6px 10px;
    border-radius:999px;
    background:rgba(12,12,14,.66);
    color:#fff;
    font-size:12px;
    font-weight:800;
    line-height:1;
    pointer-events:none;
    backdrop-filter:blur(5px);
    -webkit-backdrop-filter:blur(5px);
}

@media(max-width:640px){
    .isv-nav{
        width:44px;
        height:44px;
        font-size:36px;
    }
    .isv-nav-prev{left:8px}
    .isv-nav-next{right:8px}
    .isv-position{bottom:10px}
}

.isv-media-loading{
    position:absolute;
    inset:0;
    z-index:1;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#000;
}

.isv-media-loading[hidden]{
    display:none!important;
}

.isv-loader{
    width:42px;
    height:42px;
    border-radius:50%;
    border:4px solid rgba(255,255,255,.22);
    border-top-color:#fff;
    animation:isvSpin .8s linear infinite;
}

.isv-modal-close{
    position:absolute;
    right:10px;
    top:10px;
    z-index:10;
    width:44px;
    height:44px;
    display:grid;
    place-items:center;
    border:0;
    border-radius:50%;
    background:rgba(20,20,22,.72);
    color:#fff!important;
    font-size:30px;
    font-weight:500;
    line-height:1;
    cursor:pointer;
    backdrop-filter:blur(5px);
    -webkit-backdrop-filter:blur(5px);
    transition:transform .18s ease,background .18s ease;
}

.isv-modal-close:hover{
    transform:scale(1.05);
    background:rgba(20,20,22,.9);
}

.isv-modal-actions{
    width:100%;
    max-width:min(94vw,760px);
    padding-top:12px;
    background:transparent;
    border:0;
}

.isv-modal-actions a{
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    min-height:48px;
    border-radius:12px;
    padding:12px 18px;
    text-decoration:none!important;
    font-weight:800;
    transition:transform .18s ease,opacity .18s ease;
}

.isv-download{
    background:var(--p);
    color:#fff!important;
    box-shadow:0 8px 24px rgba(109,40,217,.25);
}

.isv-download:hover{
    transform:translateY(-1px);
    opacity:.96;
}

html.isv-modal-open,
body.isv-modal-open{
    overflow:hidden!important;
    overscroll-behavior:none;
}

@keyframes isvFadeIn{
    from{opacity:0}
    to{opacity:1}
}

@keyframes isvMediaIn{
    from{transform:scale(.975);opacity:.65}
    to{transform:scale(1);opacity:1}
}

@keyframes isvSpin{
    to{transform:rotate(360deg)}
}

@media(max-width:640px){
    .isv-modal{
        padding:0;
    }

    .isv-modal-dialog{
        width:100vw;
        max-width:100vw;
        max-height:100dvh;
    }

    .isv-media-stage{
        max-width:100vw;
        max-height:88dvh;
        min-width:0;
        min-height:220px;
        border-radius:0;
    }

    .isv-modal-image,
    .isv-video{
        max-width:100vw;
        max-height:88dvh;
    }

    .isv-modal-actions{
        width:100%;
        max-width:100%;
        padding:10px 12px 14px;
    }

    .isv-modal-close{
        top:12px;
        right:12px;
    }
}


/* ===== InstaStoris v1.8 Instagram-inspired profile UI ===== */
.isv-instagram-inspired{
    --isv-ink:#17131f;
    --isv-muted:#77707d;
    --isv-line:#ece8f0;
}

.isv-profile-shell{
    background:#fff;
    border:1px solid var(--isv-line);
    border-radius:22px;
    overflow:hidden;
    box-shadow:0 10px 34px rgba(36,24,46,.055);
}

.isv-profile-main{
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    align-items:center;
    gap:24px;
    padding:28px 30px 24px;
}

.isv-avatar-ring{
    width:112px;
    height:112px;
    padding:4px;
    border-radius:50%;
    background:linear-gradient(135deg,#f9ce34,#ee2a7b,#6228d7);
    box-shadow:0 8px 22px rgba(98,40,215,.15);
}

.isv-avatar-ring .isv-avatar{
    width:100%;
    height:100%;
    border-radius:50%;
    object-fit:cover;
    border:4px solid #fff;
    background:#f3f0f5;
}

.isv-profile-copy{
    min-width:0;
}

.isv-profile-title-row{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:9px 12px;
}

.isv-profile-title-row .isv-name{
    margin:0;
    color:var(--isv-ink);
    font-size:25px;
    line-height:1.2;
    font-weight:800;
}

.isv-profile-title-row .isv-link{
    color:var(--p);
    font-size:14px;
    font-weight:800;
}

.isv-profile-copy .isv-bio{
    margin:10px 0 0;
    color:#4d4652;
    font-size:14px;
    line-height:1.6;
    white-space:pre-line;
}

.isv-profile-copy .isv-cache{
    margin:9px 0 0;
    color:#8a7d91;
    font-size:12px;
}

.isv-profile-main .isv-stats{
    display:grid;
    grid-template-columns:repeat(3,minmax(86px,1fr));
    gap:10px;
}

.isv-profile-main .isv-stats>div{
    min-width:92px;
    padding:13px 12px;
    text-align:center;
    border:1px solid var(--isv-line);
    border-radius:14px;
    background:#fff;
}

.isv-profile-main .isv-stats b{
    display:block;
    color:var(--isv-ink);
    font-size:19px;
    line-height:1.15;
}

.isv-profile-main .isv-stats span{
    display:block;
    margin-top:5px;
    color:#5f5865;
    font-size:12px;
}

.isv-featured-wrap{
    border-top:1px solid var(--isv-line);
    padding:18px 24px 22px;
    background:linear-gradient(180deg,#fff,#fdfcff);
}

.isv-section-head{
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:12px;
    margin-bottom:14px;
}

.isv-section-head strong{
    color:var(--isv-ink);
    font-size:15px;
}

.isv-section-head span{
    color:#918998;
    font-size:12px;
}

.isv-featured{
    display:flex;
    gap:16px;
    overflow-x:auto;
    overscroll-behavior-x:contain;
    scrollbar-width:none;
    padding:2px 2px 5px;
}

.isv-featured::-webkit-scrollbar{display:none}

.isv-featured-item{
    flex:0 0 78px;
    width:78px;
    border:0;
    padding:0;
    background:transparent;
    color:inherit;
    cursor:pointer;
    text-align:center;
}

.isv-featured-thumb{
    width:70px;
    height:70px;
    margin:0 auto;
    padding:3px;
    border-radius:50%;
    background:linear-gradient(135deg,#f9ce34,#ee2a7b,#6228d7);
    transition:transform .18s ease;
}

.isv-featured-item:hover .isv-featured-thumb{
    transform:scale(1.045);
}

.isv-featured-thumb img{
    width:100%;
    height:100%;
    border-radius:50%;
    border:3px solid #fff;
    object-fit:cover;
    display:block;
    background:#f2eff4;
}

.isv-featured-label{
    display:block;
    margin-top:7px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:#4f4755;
    font-size:11px;
    font-weight:700;
}

.isv-media-toolbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    margin-top:18px;
    border-bottom:1px solid var(--isv-line);
}

.isv-media-toolbar .isv-tabs{
    display:flex;
    gap:0;
    margin:0;
}

.isv-media-toolbar .isv-tabs button{
    display:flex;
    align-items:center;
    gap:7px;
    min-height:50px;
    padding:0 24px;
    border:0;
    border-bottom:2px solid transparent;
    border-radius:0;
    background:transparent;
    color:#8a8290;
    box-shadow:none;
    font-size:13px;
    font-weight:800;
    text-transform:none;
}

.isv-media-toolbar .isv-tabs button.active{
    color:var(--p);
    border-bottom-color:var(--p);
    background:transparent;
}

.isv-tab-icon{
    font-size:19px;
    line-height:1;
}

.isv-view-label{
    color:#aaa2af;
    font-size:12px;
    font-weight:700;
}

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

.isv-ig-grid .isv-card{
    aspect-ratio:1/1;
    border-radius:3px!important;
    box-shadow:none!important;
    background:#f1eef3;
}

.isv-ig-grid .isv-card:hover{
    transform:none;
    box-shadow:none!important;
}

.isv-ig-grid .isv-card img{
    width:100%;
    height:100%!important;
    border-radius:0!important;
    object-fit:cover;
}

.isv-ig-grid .isv-card:hover img{
    transform:none;
    filter:brightness(.86);
}

.isv-ig-grid .isv-meta{
    left:50%;
    bottom:50%;
    transform:translate(-50%,50%);
    opacity:0;
    white-space:nowrap;
    transition:opacity .18s ease;
    font-size:14px;
    font-weight:800;
}

.isv-ig-grid .isv-card:hover .isv-meta{
    opacity:1;
}

.isv-ig-grid .isv-media-badge{
    left:auto;
    right:10px;
    top:10px;
    transform:none;
    opacity:1;
    width:30px;
    height:30px;
    padding:0;
    border-radius:8px;
    justify-content:center;
    background:rgba(12,12,14,.62);
    font-size:0;
}

.isv-ig-grid .isv-image-card .isv-media-badge{display:none}

.isv-ig-grid .isv-video-card .isv-media-badge span:first-child{
    font-size:16px;
}

.isv-ig-grid .isv-card:hover .isv-media-badge{transform:none}

@media(max-width:900px){
    .isv-profile-main{
        grid-template-columns:auto minmax(0,1fr);
    }
    .isv-profile-main .isv-stats{
        grid-column:1/-1;
        width:100%;
    }
}

@media(max-width:640px){
    .isv-profile-main{
        gap:14px;
        padding:20px 16px 16px;
    }

    .isv-avatar-ring{
        width:82px;
        height:82px;
    }

    .isv-profile-title-row .isv-name{
        font-size:19px;
    }

    .isv-profile-main .isv-stats{
        gap:6px;
    }

    .isv-profile-main .isv-stats>div{
        min-width:0;
        padding:10px 6px;
    }

    .isv-featured-wrap{
        padding:15px 14px 18px;
    }

    .isv-featured{
        gap:12px;
    }

    .isv-featured-item{
        flex-basis:68px;
        width:68px;
    }

    .isv-featured-thumb{
        width:62px;
        height:62px;
    }

    .isv-media-toolbar{
        margin-top:12px;
    }

    .isv-media-toolbar .isv-tabs{
        width:100%;
    }

    .isv-media-toolbar .isv-tabs button{
        flex:1 1 50%;
        justify-content:center;
        padding:0 12px;
    }

    .isv-view-label{display:none}

    .isv-ig-grid{gap:2px!important}
}


/* ===== InstaStoris v1.9 full public profile UI ===== */
.isv-avatar-ring{
    border:0!important;
    cursor:pointer;
    position:relative;
}
.isv-avatar-open:focus-visible{
    outline:3px solid rgba(109,40,217,.22);
    outline-offset:4px;
}
.isv-story-dot{
    position:absolute;
    right:7px;
    bottom:8px;
    width:17px;
    height:17px;
    border-radius:50%;
    border:3px solid #fff;
    background:#ff2f7d;
}

.isv-username-main{
    color:#17131f;
    font-size:23px;
    line-height:1.2;
    overflow-wrap:anywhere;
}
.isv-profile-title-row .isv-name{
    margin-top:7px;
}
.isv-profile-copy>.isv-name{
    margin:7px 0 0;
    font-size:15px;
    color:#332d38;
    font-weight:800;
}
.isv-verified{
    display:inline-grid;
    place-items:center;
    width:20px;
    height:20px;
    border-radius:50%;
    background:#169cff;
    color:#fff;
    font-size:13px;
    font-weight:900;
}
.isv-account-badge{
    display:inline-flex;
    align-items:center;
    min-height:24px;
    padding:4px 8px;
    border-radius:999px;
    background:#f3effa;
    color:#6d28d9;
    font-size:10px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.035em;
}
.isv-category{
    display:inline-flex;
    margin-top:8px;
    color:#817887;
    font-size:12px;
    font-weight:700;
}
.isv-bio-links{
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    margin-top:10px;
}
.isv-bio-link{
    display:inline-flex;
    max-width:100%;
    padding:6px 9px;
    border-radius:9px;
    background:#f7f4fb;
    color:#5f20c9!important;
    text-decoration:none!important;
    font-size:11px;
    font-weight:750;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.isv-bio-link:hover{
    background:#f0e9fa;
}

.isv-secondary-stats{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:8px;
    padding:0 24px 20px;
}
.isv-secondary-item{
    padding:11px 12px;
    border:1px solid #eee9f3;
    border-radius:12px;
    background:#fbfafd;
}
.isv-secondary-item b{
    display:block;
    color:#201a25;
    font-size:15px;
}
.isv-secondary-item span{
    display:block;
    margin-top:3px;
    color:#817887;
    font-size:10px;
}

.isv-profile-details,
.isv-related-wrap{
    padding:18px 24px 22px;
    border-top:1px solid #ece8f0;
}
.isv-detail-chips{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}
.isv-detail-chip{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:8px 10px;
    border:1px solid #ece8f0;
    border-radius:999px;
    background:#fff;
    color:#5d5562;
    font-size:11px;
    font-weight:700;
}
.isv-detail-chip strong{
    color:#28222d;
}

.isv-related{
    display:flex;
    gap:12px;
    overflow-x:auto;
    scrollbar-width:none;
    padding:2px 2px 4px;
}
.isv-related::-webkit-scrollbar{display:none}
.isv-related-card{
    flex:0 0 138px;
    width:138px;
    padding:13px 11px;
    border:1px solid #ece8f0;
    border-radius:14px;
    background:#fff;
    cursor:pointer;
    text-align:center;
    transition:transform .18s ease,box-shadow .18s ease;
}
.isv-related-card:hover{
    transform:translateY(-2px);
    box-shadow:0 10px 22px rgba(30,20,40,.08);
}
.isv-related-card img{
    width:56px;
    height:56px;
    margin:auto;
    border-radius:50%;
    object-fit:cover;
    background:#f2eff4;
}
.isv-related-user{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:4px;
    margin-top:8px;
    color:#2d2632;
    font-size:11px;
    font-weight:800;
    overflow:hidden;
}
.isv-related-name{
    display:block;
    margin-top:3px;
    color:#918995;
    font-size:10px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.isv-mini-verified{
    display:inline-grid;
    place-items:center;
    width:13px;
    height:13px;
    border-radius:50%;
    background:#169cff;
    color:#fff;
    font-size:8px;
}

.isv-carousel-card::after{
    content:"▣";
    position:absolute;
    z-index:5;
    top:10px;
    right:10px;
    display:grid;
    place-items:center;
    width:30px;
    height:30px;
    border-radius:8px;
    background:rgba(12,12,14,.64);
    color:#fff;
    font-size:16px;
    pointer-events:none;
}
.isv-carousel-card.isv-video-card .isv-media-badge{
    right:46px;
}

.isv-pinned-badge{
    position:absolute;
    z-index:6;
    left:10px;
    top:10px;
    padding:5px 7px;
    border-radius:7px;
    background:rgba(12,12,14,.64);
    color:#fff;
    font-size:10px;
    font-weight:800;
    pointer-events:none;
}

.isv-modal-info{
    width:100%;
    max-width:min(94vw,760px);
    max-height:160px;
    overflow-y:auto;
    padding:12px 14px;
    background:rgba(7,7,9,.94);
    color:#fff;
    border-top:1px solid rgba(255,255,255,.08);
    scrollbar-width:thin;
}
.isv-modal-info-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}
.isv-modal-media-type{
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.04em;
}
.isv-modal-date{
    color:#b9b5bd;
    font-size:11px;
}
.isv-modal-caption{
    margin-top:8px;
    color:#f4f2f5;
    font-size:12px;
    line-height:1.5;
    white-space:pre-wrap;
}
.isv-modal-location{
    margin-top:7px;
    color:#cfc9d4;
    font-size:11px;
}
.isv-modal-tags{
    display:flex;
    flex-wrap:wrap;
    gap:5px;
    margin-top:8px;
}
.isv-modal-tag{
    color:#b894ff;
    font-size:11px;
    font-weight:700;
}
.isv-modal-metrics{
    display:flex;
    flex-wrap:wrap;
    gap:8px 14px;
    margin-top:9px;
    color:#ddd9df;
    font-size:11px;
    font-weight:700;
}

@media(max-width:900px){
    .isv-secondary-stats{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}
@media(max-width:640px){
    .isv-username-main{font-size:18px}
    .isv-secondary-stats{
        grid-template-columns:repeat(2,minmax(0,1fr));
        padding:0 14px 15px;
    }
    .isv-profile-details,
    .isv-related-wrap{
        padding:15px 14px 18px;
    }
    .isv-modal-info{
        max-width:100%;
        max-height:130px;
    }
}


/* ===== InstaStoris v2.0 color-control compatibility ===== */
.isv-wrap{
    background:var(--isv-background,#FFFFFF);
}
.isv-profile-shell,
.isv-search-card{
    color:var(--isv-text,#17131F);
}
.isv-row input{
    color:var(--isv-text,#17131F)!important;
    background:var(--isv-card,#FFFFFF)!important;
}
.isv-row input::placeholder{
    color:var(--isv-muted,#77707D);
}
.isv-row span{
    color:var(--isv-text,#17131F);
}
.isv-media-toolbar .isv-tabs button{
    color:var(--isv-muted,#77707D)!important;
}
.isv-modal-actions{
    background:transparent!important;
}


/* ===== v2.0.2 Featured / Instagram Highlights style ===== */
.isv-featured-wrap{
    padding:20px 22px 22px!important;
    background:var(--isv-card,#fff)!important;
}
.isv-featured-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:16px;
}
.isv-featured-header>div:first-child{
    display:flex;
    flex-direction:column;
    gap:2px;
}
.isv-featured-header strong{
    color:var(--isv-text,#17131F);
    font-size:15px;
    line-height:1.2;
}
.isv-featured-header span{
    color:var(--isv-muted,#77707D);
    font-size:11px;
}
.isv-featured-controls{
    display:flex;
    gap:7px;
}
.isv-featured-controls button{
    width:34px;
    height:34px;
    display:grid;
    place-items:center;
    padding:0;
    border:1px solid var(--isv-border,#ECE8F0);
    border-radius:50%;
    background:var(--isv-card,#fff);
    color:var(--isv-text,#17131F);
    font-size:25px;
    line-height:1;
    cursor:pointer;
    transition:transform .18s ease,background .18s ease;
}
.isv-featured-controls button:hover{
    transform:translateY(-1px);
    background:var(--isv-surface,#FAF9FB);
}
.isv-featured-viewport{
    position:relative;
    overflow:hidden;
}
.isv-featured{
    display:flex!important;
    align-items:flex-start;
    gap:18px!important;
    overflow-x:auto!important;
    scroll-behavior:smooth;
    scroll-snap-type:x proximity;
    overscroll-behavior-x:contain;
    scrollbar-width:none;
    padding:2px 4px 6px!important;
}
.isv-featured::-webkit-scrollbar{display:none}
.isv-featured-item{
    flex:0 0 88px!important;
    width:88px!important;
    scroll-snap-align:start;
    border:0!important;
    padding:0!important;
    background:transparent!important;
    cursor:pointer;
    text-align:center;
}
.isv-featured-thumb{
    position:relative;
    width:78px!important;
    height:78px!important;
    margin:0 auto!important;
    padding:3px!important;
    border-radius:50%!important;
    background:linear-gradient(
        135deg,
        var(--isv-highlight-start,#F9CE34),
        var(--isv-highlight-mid,#EE2A7B),
        var(--isv-highlight-end,#6228D7)
    )!important;
    box-shadow:0 6px 18px rgba(35,20,48,.12);
}
.isv-featured-thumb::after{
    content:"";
    position:absolute;
    inset:3px;
    border:2px solid var(--isv-card,#fff);
    border-radius:50%;
    pointer-events:none;
}
.isv-featured-thumb img{
    width:100%!important;
    height:100%!important;
    display:block;
    border-radius:50%!important;
    object-fit:cover!important;
    border:3px solid var(--isv-card,#fff)!important;
    background:var(--isv-surface,#FAF9FB);
}
.isv-featured-item:hover .isv-featured-thumb{
    transform:scale(1.035);
}
.isv-featured-label{
    display:block!important;
    max-width:88px;
    margin:8px auto 0!important;
    color:var(--isv-text,#17131F)!important;
    font-size:11px!important;
    font-weight:750!important;
    line-height:1.25;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
}
.isv-featured-kind{
    position:absolute;
    z-index:3;
    right:0;
    bottom:1px;
    min-width:22px;
    height:22px;
    display:grid;
    place-items:center;
    padding:0 5px;
    border-radius:999px;
    border:2px solid var(--isv-card,#fff);
    background:var(--isv-primary,#6D28D9);
    color:#fff;
    font-size:10px;
    font-weight:900;
}
@media(max-width:640px){
    .isv-featured-wrap{
        padding:16px 12px 18px!important;
    }
    .isv-featured-header{
        margin-bottom:13px;
    }
    .isv-featured-controls button{
        width:32px;
        height:32px;
    }
    .isv-featured{
        gap:13px!important;
    }
    .isv-featured-item{
        flex-basis:76px!important;
        width:76px!important;
    }
    .isv-featured-thumb{
        width:68px!important;
        height:68px!important;
    }
    .isv-featured-label{
        max-width:76px;
        font-size:10px!important;
    }
}


/* ===== InstaStoris v3.0 advanced profile / followers system ===== */
.isv-main-tabs{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    border-top:1px solid var(--isv-border,#ECE8F0);
    border-bottom:1px solid var(--isv-border,#ECE8F0);
    background:var(--isv-card,#fff);
}
.isv-main-tabs button{
    min-height:54px;
    border:0;
    border-bottom:2px solid transparent;
    background:transparent;
    color:var(--isv-muted,#77707D);
    font-size:13px;
    font-weight:800;
    cursor:pointer;
}
.isv-main-tabs button.active{
    color:var(--isv-primary,#6D28D9);
    border-bottom-color:var(--isv-primary,#6D28D9);
}
.isv-main-panel{
    background:var(--isv-card,#fff);
}
.isv-panel-posts{
    padding:0 22px 24px;
}
.isv-profile-main .isv-stats{
    display:grid;
    grid-template-columns:repeat(3,minmax(86px,1fr));
}
.isv-profile-main .isv-stats>button{
    min-width:92px;
    padding:13px 12px;
    text-align:center;
    border:1px solid var(--isv-border,#ECE8F0);
    border-radius:14px;
    background:var(--isv-card,#fff);
    color:var(--isv-text,#17131F);
    cursor:pointer;
    transition:transform .18s ease,box-shadow .18s ease;
}
.isv-profile-main .isv-stats>button:hover{
    transform:translateY(-1px);
    box-shadow:0 8px 18px rgba(20,15,30,.07);
}
.isv-profile-main .isv-stats>button b{
    display:block;
    color:var(--isv-text,#17131F);
    font-size:19px;
}
.isv-profile-main .isv-stats>button span{
    display:block;
    margin-top:5px;
    color:var(--isv-muted,#77707D);
    font-size:12px;
}

.isv-people-panel{
    padding:22px;
}
.isv-people-head{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:18px;
    margin-bottom:16px;
}
.isv-people-head>div{
    display:flex;
    flex-direction:column;
    gap:3px;
}
.isv-people-head strong{
    color:var(--isv-text,#17131F);
    font-size:17px;
}
.isv-people-head>div span{
    color:var(--isv-muted,#77707D);
    font-size:11px;
}
.isv-people-search{
    width:min(300px,100%);
    display:flex;
    align-items:center;
    gap:8px;
    min-height:42px;
    padding:0 12px;
    border:1px solid var(--isv-border,#ECE8F0);
    border-radius:12px;
    background:var(--isv-surface,#FAF9FB);
}
.isv-people-search span{
    color:var(--isv-muted,#77707D);
}
.isv-people-search input{
    width:100%;
    border:0!important;
    outline:0!important;
    box-shadow:none!important;
    background:transparent!important;
    color:var(--isv-text,#17131F)!important;
    font-size:12px;
}
.isv-people-status{
    min-height:20px;
    margin:0 0 10px;
    color:var(--isv-muted,#77707D);
    font-size:12px;
}
.isv-people-list{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:9px;
}
.isv-person{
    display:grid;
    grid-template-columns:52px minmax(0,1fr) auto;
    align-items:center;
    gap:11px;
    min-width:0;
    padding:12px;
    border:1px solid var(--isv-border,#ECE8F0);
    border-radius:14px;
    background:var(--isv-card,#fff);
    transition:box-shadow .18s ease,transform .18s ease;
}
.isv-person:hover{
    transform:translateY(-1px);
    box-shadow:0 9px 22px rgba(28,18,36,.07);
}
.isv-person-avatar{
    width:52px;
    height:52px;
    border-radius:50%;
    object-fit:cover;
    background:var(--isv-surface,#FAF9FB);
}
.isv-person-copy{
    min-width:0;
}
.isv-person-userline{
    display:flex;
    align-items:center;
    gap:5px;
    min-width:0;
}
.isv-person-username{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:var(--isv-text,#17131F);
    font-size:12px;
    font-weight:850;
}
.isv-person-name{
    display:block;
    margin-top:3px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:var(--isv-muted,#77707D);
    font-size:11px;
}
.isv-person-flags{
    display:flex;
    gap:5px;
    margin-top:5px;
}
.isv-person-flag{
    display:inline-flex;
    padding:3px 6px;
    border-radius:999px;
    background:var(--isv-surface,#FAF9FB);
    color:var(--isv-muted,#77707D);
    font-size:9px;
    font-weight:800;
}
.isv-person-actions{
    display:flex;
    flex-direction:column;
    gap:6px;
}
.isv-person-actions button{
    min-width:64px;
    padding:7px 9px;
    border:1px solid var(--isv-border,#ECE8F0);
    border-radius:9px;
    background:var(--isv-card,#fff);
    color:var(--isv-text,#17131F);
    font-size:10px;
    font-weight:800;
    cursor:pointer;
}
.isv-person-actions button.isv-view-person{
    border-color:var(--isv-primary,#6D28D9);
    background:var(--isv-primary,#6D28D9);
    color:var(--isv-button-text,#fff);
}
.isv-person-actions button:hover{
    opacity:.94;
}
.isv-load-more{
    display:block;
    width:min(360px,100%);
    margin:16px auto 0;
    min-height:44px;
    border:0;
    border-radius:12px;
    background:var(--isv-button,#6D28D9);
    color:var(--isv-button-text,#fff);
    font-size:12px;
    font-weight:850;
    cursor:pointer;
}
.isv-load-more[disabled]{
    opacity:.6;
    cursor:wait;
}
.isv-no-people{
    grid-column:1/-1;
    padding:28px 16px;
    border:1px dashed var(--isv-border,#ECE8F0);
    border-radius:14px;
    text-align:center;
    color:var(--isv-muted,#77707D);
    font-size:12px;
}
.isv-copy-ok{
    color:var(--isv-primary,#6D28D9)!important;
}

.isv-ig-grid .isv-card .isv-meta{
    gap:10px!important;
}
.isv-ig-grid .isv-card .isv-meta .isv-view-count{
    display:inline-flex;
}

@media(max-width:900px){
    .isv-people-list{grid-template-columns:1fr}
}
@media(max-width:640px){
    .isv-main-tabs{
        position:sticky;
        top:0;
        z-index:15;
    }
    .isv-main-tabs button{
        min-height:48px;
        font-size:11px;
    }
    .isv-panel-posts,
    .isv-people-panel{
        padding:0 12px 18px;
    }
    .isv-people-head{
        align-items:stretch;
        flex-direction:column;
        padding-top:16px;
    }
    .isv-people-search{width:100%}
    .isv-person{
        grid-template-columns:46px minmax(0,1fr) auto;
        padding:10px;
    }
    .isv-person-avatar{
        width:46px;
        height:46px;
    }
    .isv-person-actions button{
        min-width:58px;
        padding:6px 7px;
    }
}


/* ===== v3.1 Posts / Reels Load More ===== */
.isv-media-more-wrap{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:8px;
    padding:18px 0 2px;
}
.isv-media-page-status{
    min-height:16px;
    color:var(--isv-muted,#77707D);
    font-size:11px;
    font-weight:700;
}
.isv-load-more-media{
    width:min(360px,100%);
}


/* ===== v3.1.1 Search input + attached rounded button ===== */
.isv-search-card .isv-row{
    display:flex!important;
    align-items:stretch!important;
    gap:0!important;
    width:100%!important;
    max-width:980px;
    margin-left:auto;
    margin-right:auto;
    border:0!important;
    background:transparent!important;
    overflow:visible!important;
}
.isv-search-card .isv-row > span{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex:0 0 54px!important;
    min-width:54px!important;
    border:1px solid var(--isv-border,#ECE8F0)!important;
    border-right:0!important;
    border-radius:16px 0 0 16px!important;
    background:var(--isv-card,#FFFFFF)!important;
    color:var(--isv-text,#17131F)!important;
    font-size:18px!important;
}
.isv-search-card .isv-row input.isv-user{
    flex:1 1 auto!important;
    min-width:0!important;
    height:64px!important;
    margin:0!important;
    padding:0 18px!important;
    border:1px solid var(--isv-border,#ECE8F0)!important;
    border-left:0!important;
    border-right:0!important;
    border-radius:0!important;
    outline:0!important;
    box-shadow:none!important;
    background:var(--isv-card,#FFFFFF)!important;
    color:var(--isv-text,#17131F)!important;
    font-size:16px!important;
    line-height:64px!important;
}
.isv-search-card .isv-row input.isv-user:focus{
    border-color:var(--isv-primary,#6D28D9)!important;
    box-shadow:inset 0 1px 0 var(--isv-primary,#6D28D9),
               inset 0 -1px 0 var(--isv-primary,#6D28D9)!important;
}
.isv-search-card .isv-row:focus-within > span{
    border-color:var(--isv-primary,#6D28D9)!important;
}
.isv-search-card .isv-row button{
    flex:0 0 auto!important;
    min-width:150px!important;
    height:64px!important;
    margin:0!important;
    padding:0 28px!important;
    border:1px solid var(--isv-button,#6D28D9)!important;
    border-radius:0 16px 16px 0!important;
    background:var(--isv-button,#6D28D9)!important;
    color:var(--isv-button-text,#FFFFFF)!important;
    font-size:14px!important;
    font-weight:850!important;
    cursor:pointer!important;
    box-shadow:none!important;
}
@media(max-width:640px){
    .isv-search-card .isv-row > span{
        flex-basis:46px!important;
        min-width:46px!important;
        border-radius:13px 0 0 13px!important;
    }
    .isv-search-card .isv-row input.isv-user{
        height:56px!important;
        padding:0 12px!important;
        font-size:14px!important;
        line-height:56px!important;
    }
    .isv-search-card .isv-row button{
        min-width:105px!important;
        height:56px!important;
        padding:0 16px!important;
        border-radius:0 13px 13px 0!important;
        font-size:12px!important;
    }
}


/* ===== v3.1.2 Full viewport scraper layout ===== */
.isv-wrap{
    position:relative!important;
    left:50%!important;
    right:50%!important;
    width:100vw!important;
    max-width:none!important;
    margin-left:-50vw!important;
    margin-right:-50vw!important;
    padding-left:clamp(12px,2vw,32px)!important;
    padding-right:clamp(12px,2vw,32px)!important;
    box-sizing:border-box!important;
    overflow-x:hidden!important;
}

.isv-wrap *,
.isv-wrap *::before,
.isv-wrap *::after{
    box-sizing:border-box!important;
}

.isv-search-card,
.isv-results,
.isv-profile-shell{
    width:100%!important;
    max-width:none!important;
}

.isv-search-card{
    margin-left:0!important;
    margin-right:0!important;
}

.isv-search-card .isv-row{
    width:100%!important;
    max-width:none!important;
}

.isv-profile-main{
    width:100%!important;
    max-width:none!important;
}

.isv-main-tabs,
.isv-main-panel,
.isv-panel-profile,
.isv-panel-posts,
.isv-people-panel,
.isv-featured-wrap,
.isv-profile-details,
.isv-related-wrap,
.isv-media-toolbar,
.isv-grid,
.isv-ig-grid{
    width:100%!important;
    max-width:none!important;
}

.isv-ig-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
}

.isv-people-list{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
}

@media (max-width:1200px){
    .isv-ig-grid{
        grid-template-columns:repeat(3,minmax(0,1fr))!important;
    }
    .isv-people-list{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
    }
}

@media (max-width:760px){
    .isv-wrap{
        padding-left:10px!important;
        padding-right:10px!important;
    }
    .isv-ig-grid{
        grid-template-columns:repeat(3,minmax(0,1fr))!important;
        gap:3px!important;
    }
    .isv-people-list{
        grid-template-columns:1fr!important;
    }
}

@media (max-width:480px){
    .isv-wrap{
        padding-left:6px!important;
        padding-right:6px!important;
    }
}


/* ===== v3.1.3 Search-only top area ===== */
.isv-search-card{
    padding:18px!important;
    min-height:0!important;
}
.isv-search-card .isv-brand,
.isv-search-card > h2,
.isv-search-card > p{
    display:none!important;
}
.isv-search-card .isv-row{
    margin-top:0!important;
    margin-bottom:0!important;
}
.isv-status{
    margin-top:10px!important;
    margin-bottom:0!important;
}

/* Keep public media pagination predictable: 12 per request, then Load More. */
.isv-media-more-wrap{
    clear:both;
    width:100%;
}


/* ===== v3.1.5 verified 12-item media pagination ===== */
.isv-load-more-media[hidden]{
    display:none!important;
}
.isv-load-more-media:not([hidden]){
    display:block!important;
}
.isv-media-page-status{
    text-align:center;
}


/* ===== v3.2.0 Large archive performance ===== */
.isv-card{
    content-visibility:auto;
    contain-intrinsic-size:320px 320px;
}
.isv-ig-grid{
    align-items:start;
}
.isv-media-page-status{
    font-variant-numeric:tabular-nums;
}


/* ===== v3.3.0 Video fallback + per-post Likes/Comments ===== */
.isv-meta{pointer-events:auto!important;align-items:center}
.isv-card-metric{
    border:0!important;background:transparent!important;color:#fff!important;
    padding:2px 1px!important;margin:0!important;font:inherit!important;font-weight:800!important;
    cursor:pointer!important;line-height:1.2!important;text-shadow:0 1px 4px rgba(0,0,0,.35)
}
.isv-card-metric:hover{text-decoration:underline}
.isv-modal-metrics{align-items:center}
.isv-metric-btn{
    border:0!important;background:transparent!important;color:#f2eef4!important;
    padding:2px 0!important;margin:0!important;font:inherit!important;font-weight:800!important;
    cursor:pointer!important
}
.isv-metric-btn:hover{text-decoration:underline}
.isv-metric-btn:disabled{cursor:default!important;opacity:.7;text-decoration:none!important}
.isv-engagement-drawer{
    width:100%;max-width:min(94vw,760px);max-height:330px;overflow:hidden;
    display:flex;flex-direction:column;background:rgba(10,10,13,.98);color:#fff;
    border-top:1px solid rgba(255,255,255,.1)
}
.isv-engagement-drawer[hidden]{display:none!important}
.isv-engagement-head{display:flex;align-items:center;justify-content:space-between;padding:11px 14px;border-bottom:1px solid rgba(255,255,255,.08)}
.isv-engagement-title{font-size:13px}
.isv-engagement-close{width:30px;height:30px;border:0;border-radius:50%;background:rgba(255,255,255,.08);color:#fff;font-size:21px;cursor:pointer}
.isv-engagement-status{min-height:0;padding:7px 14px 0;color:#aaa4ad;font-size:11px}
.isv-engagement-list{overflow-y:auto;overscroll-behavior:contain;padding:6px 10px 10px;scrollbar-width:thin}
.isv-engagement-row{display:grid;grid-template-columns:42px minmax(0,1fr);gap:10px;align-items:start;padding:9px 4px;border-bottom:1px solid rgba(255,255,255,.06)}
.isv-engagement-avatar{width:42px;height:42px;border-radius:50%;object-fit:cover;background:#242329}
.isv-engagement-copy{min-width:0}
.isv-engagement-userline{display:flex;align-items:center;gap:5px}
.isv-engagement-user{border:0!important;background:transparent!important;color:#fff!important;padding:0!important;font-size:12px!important;font-weight:850!important;cursor:pointer!important;text-align:left}
.isv-engagement-name,.isv-engagement-flags,.isv-comment-meta{margin-top:3px;color:#aaa4ad;font-size:10px}
.isv-comment-text{margin-top:4px;color:#f1eff3;font-size:12px;line-height:1.45;white-space:pre-wrap}
.isv-engagement-more{margin:0 12px 12px;min-height:38px;border:0;border-radius:10px;background:var(--isv-button,#6D28D9);color:var(--isv-button-text,#fff);font-size:11px;font-weight:850;cursor:pointer}
@media(max-width:640px){
  .isv-engagement-drawer{max-width:100%;max-height:42dvh}
  .isv-modal-dialog{max-height:100dvh}
  .isv-media-stage{max-height:58dvh}
}


/* ============================================================
   InstaStoris v4.0 - PVStory-plus public profile features
   ============================================================ */

.isv-search-history{
    width:100%;
    margin-top:12px;
    padding-top:12px;
    border-top:1px solid var(--isv-border,#ECE8F0);
}
.isv-history-head{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    margin-bottom:9px;
}
.isv-history-head strong{
    font-size:12px;
    color:var(--isv-text,#17131F);
}
.isv-history-clear{
    border:0;
    background:transparent;
    color:var(--isv-primary,#6D28D9);
    font-size:11px;
    font-weight:800;
    cursor:pointer;
}
.isv-history-items{
    display:flex;
    gap:8px;
    overflow-x:auto;
    scrollbar-width:thin;
}
.isv-history-item{
    display:flex;
    align-items:center;
    gap:7px;
    flex:0 0 auto;
    padding:7px 10px;
    border:1px solid var(--isv-border,#ECE8F0);
    border-radius:999px;
    background:var(--isv-card,#fff);
    color:var(--isv-text,#17131F);
    cursor:pointer;
    font-size:11px;
    font-weight:750;
}
.isv-history-item img{
    width:25px;
    height:25px;
    border-radius:50%;
    object-fit:cover;
}

.isv-stories-wrap{
    padding:20px 22px;
    border-bottom:1px solid var(--isv-border,#ECE8F0);
}
.isv-stories{
    display:flex;
    gap:14px;
    overflow-x:auto;
    padding:10px 2px 3px;
    scrollbar-width:thin;
}
.isv-story-item{
    width:82px;
    flex:0 0 82px;
    padding:0;
    border:0;
    background:transparent;
    color:var(--isv-text,#17131F);
    cursor:pointer;
}
.isv-story-item .isv-featured-thumb{
    width:70px;
    height:70px;
    margin:0 auto;
}
.isv-story-item .isv-featured-label{
    display:block;
    margin-top:6px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:10px;
}

.isv-media-toolbar .isv-tabs{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    width:100%!important;
}
.isv-media-toolbar .isv-tabs button{
    min-width:0!important;
}

.isv-feed-badge{
    position:absolute;
    top:9px;
    left:9px;
    z-index:4;
    display:inline-flex;
    align-items:center;
    max-width:calc(100% - 18px);
    padding:5px 8px;
    border-radius:999px;
    background:rgba(0,0,0,.72);
    color:#fff;
    font-size:9px;
    font-weight:850;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.isv-people-tools{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:8px;
    width:min(430px,100%);
}
.isv-people-tools .isv-people-search{
    flex:1 1 auto;
    width:auto;
}
.isv-copy-loaded{
    flex:0 0 auto;
    min-height:42px;
    padding:0 12px;
    border:1px solid var(--isv-border,#ECE8F0);
    border-radius:12px;
    background:var(--isv-card,#fff);
    color:var(--isv-primary,#6D28D9);
    font-size:10px;
    font-weight:850;
    cursor:pointer;
}

.isv-modal-actions{
    display:grid!important;
    grid-template-columns:auto auto minmax(180px,1fr);
    gap:8px!important;
}
.isv-modal-actions button{
    min-height:44px;
    padding:0 13px;
    border:1px solid rgba(255,255,255,.18);
    border-radius:11px;
    background:rgba(255,255,255,.08);
    color:#fff;
    font-size:11px;
    font-weight:800;
    cursor:pointer;
}
.isv-modal-link{
    text-decoration:none;
}

@media(max-width:720px){
    .isv-media-toolbar .isv-tabs{
        grid-template-columns:repeat(4,1fr)!important;
    }
    .isv-media-toolbar .isv-tabs button{
        padding-left:6px!important;
        padding-right:6px!important;
        font-size:10px!important;
    }
    .isv-people-tools{
        width:100%;
        align-items:stretch;
        flex-direction:column;
    }
    .isv-copy-loaded{
        width:100%;
    }
    .isv-modal-actions{
        grid-template-columns:1fr 1fr!important;
    }
    .isv-modal-actions .isv-download{
        grid-column:1/-1;
    }
}


/* ===== v4.1.0 Video playback / Reels presentation ===== */
.isv-ig-grid.isv-reels-grid .isv-card{aspect-ratio:9/13!important;}
.isv-ig-grid.isv-reels-grid .isv-meta{
    left:10px!important;
    top:10px!important;
    right:auto!important;
    bottom:auto!important;
    transform:none!important;
    opacity:1!important;
    padding:0!important;
    background:none!important;
}
.isv-ig-grid.isv-reels-grid .isv-meta .isv-card-metric{display:none!important;}
.isv-ig-grid.isv-reels-grid .isv-view-count{
    display:inline-flex!important;align-items:center;gap:5px;
    color:#fff!important;font-size:15px!important;font-weight:800!important;
    text-shadow:0 1px 4px rgba(0,0,0,.75);
}
.isv-ig-grid.isv-reels-grid .isv-media-badge{
    background:rgba(0,0,0,.46)!important;
}
.isv-video{min-width:min(92vw,320px);min-height:240px;}


/* ============================================================
   InstaStoris v4.2 - exact media engagement explorer
   ============================================================ */
.isv-modal-metrics{
    gap:10px!important;
}
.isv-modal-metrics .isv-metric-btn,
.isv-modal-metrics>span{
    display:inline-flex!important;
    align-items:center!important;
    min-height:34px;
    padding:7px 11px!important;
    border-radius:10px!important;
    background:rgba(255,255,255,.08)!important;
    color:#f6f3f8!important;
    text-decoration:none!important;
    font-size:11px!important;
    line-height:1!important;
}
.isv-modal-metrics .isv-metric-btn{
    border:1px solid rgba(255,255,255,.08)!important;
}
.isv-modal-metrics .isv-metric-btn:hover{
    background:rgba(255,255,255,.14)!important;
    transform:translateY(-1px);
}

.isv-engagement-drawer{
    position:absolute!important;
    z-index:60!important;
    left:50%!important;
    top:50%!important;
    transform:translate(-50%,-50%)!important;
    width:min(92vw,720px)!important;
    max-width:720px!important;
    height:min(80vh,700px)!important;
    max-height:min(80vh,700px)!important;
    border:1px solid rgba(255,255,255,.12)!important;
    border-radius:18px!important;
    overflow:hidden!important;
    background:#11162A!important;
    color:#F5F6FB!important;
    box-shadow:
        0 24px 70px rgba(0,0,0,.58),
        0 0 0 100vmax rgba(7,10,25,.66)!important;
}
.isv-engagement-drawer[hidden]{display:none!important}

.isv-engagement-head{
    display:flex!important;
    align-items:flex-start!important;
    justify-content:space-between!important;
    gap:18px!important;
    padding:22px 24px 16px!important;
    border-bottom:0!important;
}
.isv-engagement-head>div{
    min-width:0;
}
.isv-engagement-title{
    display:block;
    color:#F7F8FC!important;
    font-size:22px!important;
    font-weight:900!important;
    line-height:1.15!important;
}
.isv-engagement-subtitle{
    display:block;
    margin-top:8px;
    color:#B8C2D6;
    font-size:12px;
    font-weight:700;
    line-height:1.4;
}
.isv-engagement-close{
    flex:0 0 auto;
    width:34px!important;
    height:34px!important;
    display:grid!important;
    place-items:center!important;
    padding:0!important;
    border:0!important;
    border-radius:50%!important;
    background:transparent!important;
    color:#AEB7C8!important;
    font-size:25px!important;
    line-height:1!important;
}
.isv-engagement-close:hover{
    background:rgba(255,255,255,.08)!important;
    color:#fff!important;
}

.isv-engagement-search{
    display:flex;
    align-items:center;
    gap:9px;
    margin:0 24px 14px;
    min-height:48px;
    padding:0 15px;
    border:1px solid rgba(255,255,255,.06);
    border-radius:13px;
    background:#1B2940;
}
.isv-engagement-search[hidden]{display:none!important}
.isv-engagement-search>span{
    color:#93A2B9;
    font-size:18px;
}
.isv-engagement-search input{
    flex:1;
    min-width:0;
    height:44px;
    border:0!important;
    outline:0!important;
    box-shadow:none!important;
    background:transparent!important;
    color:#fff!important;
    font-size:14px!important;
}
.isv-engagement-search input::placeholder{
    color:#9CA8BA!important;
}

.isv-engagement-status{
    min-height:0!important;
    padding:0 24px 8px!important;
    color:#AEB8C9!important;
    font-size:12px!important;
}
.isv-engagement-list{
    flex:1 1 auto!important;
    min-height:120px;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    padding:2px 24px 8px!important;
    scrollbar-width:thin;
}
.isv-engagement-row{
    display:grid!important;
    grid-template-columns:48px minmax(0,1fr) auto 32px!important;
    gap:12px!important;
    align-items:center!important;
    min-height:72px;
    padding:10px 4px!important;
    border-bottom:1px solid rgba(255,255,255,.055)!important;
}
.isv-engagement-avatar{
    width:48px!important;
    height:48px!important;
    border-radius:50%!important;
    object-fit:cover!important;
    background:#222A3D!important;
}
.isv-engagement-copy{
    min-width:0!important;
}
.isv-engagement-userline{
    display:flex!important;
    align-items:center!important;
    gap:6px!important;
}
.isv-engagement-user{
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    border:0!important;
    background:transparent!important;
    color:#F3F5FA!important;
    padding:0!important;
    font-size:14px!important;
    font-weight:900!important;
    cursor:pointer!important;
    text-align:left!important;
}
.isv-engagement-user:hover{
    text-decoration:underline!important;
}
.isv-engagement-name{
    margin-top:4px!important;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    color:#B6C0D0!important;
    font-size:12px!important;
}
.isv-engagement-privacy{
    display:inline-flex;
    align-items:center;
    width:max-content;
    margin-top:6px;
    padding:3px 8px;
    border-radius:999px;
    border:1px solid rgba(255,255,255,.14);
    color:#C9D1DF;
    font-size:10px;
    font-weight:800;
}
.isv-engagement-privacy.is-private{
    border-color:#FF5EB3;
    color:#FF78BF;
}
.isv-engagement-privacy.is-public{
    border-color:#4DD6A5;
    color:#6BE3B8;
}
.isv-comment-text{
    margin-top:5px!important;
    color:#F2F4F8!important;
    font-size:12px!important;
    line-height:1.5!important;
    white-space:pre-wrap!important;
}
.isv-comment-meta{
    margin-top:5px!important;
    color:#9EAABD!important;
    font-size:10px!important;
}
.isv-engagement-actions{
    display:flex;
    align-items:center;
    gap:5px;
}
.isv-engagement-actions button{
    width:32px!important;
    height:32px!important;
    display:grid!important;
    place-items:center!important;
    padding:0!important;
    border:1px solid rgba(255,255,255,.1)!important;
    border-radius:9px!important;
    background:rgba(255,255,255,.05)!important;
    color:#C8D2E2!important;
    font-size:16px!important;
    line-height:1!important;
    cursor:pointer!important;
}
.isv-engagement-actions button:hover{
    background:rgba(255,255,255,.12)!important;
    color:#fff!important;
}
.isv-engagement-rank{
    color:#8390A7;
    font-size:11px;
    font-variant-numeric:tabular-nums;
    text-align:right;
}

.isv-engagement-pagination{
    flex:0 0 auto;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    padding:14px 18px 12px;
    border-top:1px solid rgba(255,255,255,.06);
}
.isv-engagement-pagination[hidden]{display:none!important}
.isv-engagement-pages{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    min-width:0;
}
.isv-engagement-page-prev,
.isv-engagement-page-next,
.isv-engagement-page{
    min-width:38px!important;
    height:38px!important;
    display:grid!important;
    place-items:center!important;
    padding:0 10px!important;
    border:1px solid transparent!important;
    border-radius:10px!important;
    background:#1C2A41!important;
    color:#AAB6C9!important;
    font-size:12px!important;
    font-weight:850!important;
    cursor:pointer!important;
}
.isv-engagement-page:hover,
.isv-engagement-page-prev:hover,
.isv-engagement-page-next:hover{
    background:#263852!important;
    color:#fff!important;
}
.isv-engagement-page.is-active{
    background:var(--isv-primary,#6D28D9)!important;
    color:#fff!important;
}
.isv-engagement-page:disabled,
.isv-engagement-page-prev:disabled,
.isv-engagement-page-next:disabled{
    opacity:.42!important;
    cursor:default!important;
}
.isv-engagement-dots{
    padding:0 2px;
    color:#8290A7;
    font-weight:900;
}

.isv-engagement-bottom-close{
    flex:0 0 auto;
    align-self:flex-end;
    min-height:40px;
    margin:0 24px 16px!important;
    padding:8px 17px!important;
    border:1px solid rgba(139,92,246,.28)!important;
    border-radius:11px!important;
    background:rgba(139,92,246,.18)!important;
    color:#CDB6FF!important;
    font-size:12px!important;
    font-weight:850!important;
    cursor:pointer!important;
}
.isv-engagement-bottom-close:hover{
    background:rgba(139,92,246,.28)!important;
}
.isv-engagement-more{display:none!important}

@media(max-width:640px){
    .isv-engagement-drawer{
        width:calc(100vw - 18px)!important;
        height:min(84dvh,720px)!important;
        max-height:84dvh!important;
        border-radius:16px!important;
    }
    .isv-engagement-head{
        padding:18px 16px 13px!important;
    }
    .isv-engagement-title{
        font-size:19px!important;
    }
    .isv-engagement-search{
        margin:0 16px 12px!important;
    }
    .isv-engagement-status{
        padding-left:16px!important;
        padding-right:16px!important;
    }
    .isv-engagement-list{
        padding-left:16px!important;
        padding-right:16px!important;
    }
    .isv-engagement-row{
        grid-template-columns:42px minmax(0,1fr) auto 22px!important;
        gap:9px!important;
    }
    .isv-engagement-avatar{
        width:42px!important;
        height:42px!important;
    }
    .isv-engagement-view-user{
        display:none!important;
    }
    .isv-engagement-pagination{
        gap:5px!important;
        padding:12px 10px!important;
    }
    .isv-engagement-page-prev,
    .isv-engagement-page-next,
    .isv-engagement-page{
        min-width:34px!important;
        height:36px!important;
        padding:0 8px!important;
    }
    .isv-engagement-bottom-close{
        margin-right:16px!important;
        margin-bottom:12px!important;
    }
}


/* v4.2.1: keep very long/spam comments from consuming the whole explorer */
.isv-comment-text-wrap{
    position:relative;
    min-width:0;
}
.isv-comment-text{
    overflow-wrap:anywhere;
}
.isv-comment-text.is-collapsed{
    display:-webkit-box!important;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:3;
    overflow:hidden!important;
    max-height:4.5em;
}
.isv-comment-toggle{
    margin-top:4px!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    color:#BFA7FF!important;
    font-size:11px!important;
    font-weight:850!important;
    cursor:pointer!important;
}
.isv-comment-toggle:hover{
    color:#fff!important;
    text-decoration:underline!important;
}


/* ============================================================
   InstaStoris v4.2.2 - Likes/Comments readable on photos + reels
   ============================================================ */
.isv-tab-icon{display:inline-grid!important;place-items:center!important}
.isv-tab-icon svg,.isv-download-icon{display:block}
.isv-download{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:10px!important;
}
.isv-download-icon{flex:0 0 auto}

.isv-ig-grid .isv-card .isv-meta{
    pointer-events:auto!important;
    display:flex!important;
    align-items:center!important;
    gap:7px!important;
    left:8px!important;
    right:8px!important;
    bottom:8px!important;
    top:auto!important;
    width:auto!important;
    transform:none!important;
    opacity:1!important;
    padding:0!important;
    background:none!important;
    flex-wrap:wrap!important;
}

/* Override v4.1 rule that hid Likes/Comments on Reels */
.isv-ig-grid.isv-reels-grid .isv-meta .isv-card-metric{
    display:inline-flex!important;
}

.isv-card-metric,
.isv-view-count{
    display:inline-flex!important;
    align-items:center!important;
    gap:5px!important;
    min-height:30px!important;
    padding:6px 8px!important;
    border-radius:9px!important;
    background:rgba(8,10,18,.62)!important;
    color:#fff!important;
    font-size:11px!important;
    font-weight:850!important;
    line-height:1!important;
    text-shadow:none!important;
    backdrop-filter:blur(8px);
    -webkit-backdrop-filter:blur(8px);
}
.isv-card-metric{
    border:1px solid rgba(255,255,255,.14)!important;
    cursor:pointer!important;
}
.isv-card-metric:hover{
    background:rgba(22,25,38,.90)!important;
    transform:translateY(-1px);
    text-decoration:none!important;
}
.isv-card-metric svg,
.isv-view-count svg,
.isv-metric-btn svg{
    display:block;
    flex:0 0 auto;
}
.isv-view-count{
    border:1px solid rgba(255,255,255,.09)!important;
}
.isv-ig-grid.isv-reels-grid .isv-view-count{
    margin-left:auto!important;
}

/* Modal: Like and Comment are clear clickable controls */
.isv-modal-metrics .isv-metric-btn{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:7px!important;
    min-height:38px!important;
    padding:8px 12px!important;
    border:1px solid rgba(255,255,255,.10)!important;
    border-radius:10px!important;
    background:rgba(255,255,255,.08)!important;
    text-decoration:none!important;
}
.isv-modal-metrics .isv-metric-btn:hover{
    background:rgba(255,255,255,.14)!important;
    text-decoration:none!important;
}

/* Readable exact comments */
.isv-comment-text{
    color:#F7F8FC!important;
    font-size:13px!important;
    line-height:1.55!important;
    overflow-wrap:anywhere!important;
}
.isv-comment-meta{
    margin-top:6px!important;
    color:#9EAABD!important;
    font-size:11px!important;
}
.isv-engagement-user{
    font-size:13px!important;
}

/* Reels badge with SVG */
.isv-badge-svg{
    display:inline-grid;
    place-items:center;
}
.isv-badge-svg svg{display:block}

@media(max-width:640px){
    .isv-card-metric,.isv-view-count{
        min-height:28px!important;
        padding:5px 7px!important;
        font-size:10px!important;
        border-radius:8px!important;
    }
    .isv-card-metric svg,.isv-view-count svg{
        width:14px!important;
        height:14px!important;
    }
}


/* ============================================================
   InstaStoris v4.2.3 - stable counters + compact media controls
   ============================================================ */

/*
 * Rich media detail can contain lots of caption/tag metadata. Keep that data
 * available for Copy Caption / API use, but do not turn the player into a
 * large black information banner. The visible area is a compact engagement bar.
 */
.isv-modal-info{
    width:100%!important;
    max-width:min(94vw,760px)!important;
    max-height:none!important;
    overflow:visible!important;
    padding:8px 0 0!important;
    border:0!important;
    background:transparent!important;
    scrollbar-width:none!important;
}
.isv-modal-info::-webkit-scrollbar{display:none!important}

/* Hide verbose metadata inside the playback surface. */
.isv-modal-info-top,
.isv-modal-caption,
.isv-modal-location,
.isv-modal-tags{
    display:none!important;
}

/* Compact likes/comments/views row similar to a modern media viewer. */
.isv-modal-metrics{
    display:flex!important;
    align-items:center!important;
    flex-wrap:wrap!important;
    gap:8px!important;
    margin:0!important;
    padding:0!important;
}
.isv-modal-metrics .isv-metric-btn,
.isv-modal-metrics>span{
    min-height:40px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:7px!important;
    margin:0!important;
    padding:8px 12px!important;
    border:1px solid rgba(255,255,255,.14)!important;
    border-radius:11px!important;
    background:rgba(255,255,255,.07)!important;
    color:#F7F8FC!important;
    font-size:12px!important;
    font-weight:850!important;
    line-height:1!important;
}
.isv-modal-metrics .isv-metric-btn:hover{
    background:rgba(255,255,255,.14)!important;
}

/* Action bar should not look like another large banner. */
.isv-modal-actions{
    width:100%!important;
    max-width:min(94vw,760px)!important;
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    margin-top:8px!important;
}
.isv-modal-actions button{
    flex:0 0 auto!important;
    min-height:42px!important;
    padding:0 13px!important;
}
.isv-modal-actions .isv-download{
    flex:1 1 auto!important;
    min-width:190px!important;
    min-height:42px!important;
    padding:0 17px!important;
    border-radius:11px!important;
    font-size:14px!important;
    font-weight:900!important;
}
.isv-modal-actions .isv-download svg{
    width:19px!important;
    height:19px!important;
}

/* Keep the overall viewer compact vertically. */
.isv-modal-dialog{
    max-height:96dvh!important;
}
.isv-media-stage{
    max-height:72dvh!important;
}
.isv-modal-image,
.isv-video{
    max-height:72dvh!important;
}

/* Remove obsolete scrollbar appearance from the compact info strip. */
.isv-modal-info{
    scrollbar-width:none!important;
}

@media(max-width:720px){
    .isv-modal{
        padding:8px!important;
    }
    .isv-media-stage{
        max-height:66dvh!important;
        min-height:220px!important;
    }
    .isv-modal-image,
    .isv-video{
        max-height:66dvh!important;
    }
    .isv-modal-metrics{
        gap:6px!important;
    }
    .isv-modal-metrics .isv-metric-btn,
    .isv-modal-metrics>span{
        min-height:36px!important;
        padding:7px 9px!important;
        font-size:11px!important;
        border-radius:9px!important;
    }
    .isv-modal-actions{
        display:grid!important;
        grid-template-columns:1fr 1fr!important;
        gap:7px!important;
    }
    .isv-modal-actions .isv-download{
        grid-column:1/-1!important;
        width:100%!important;
        min-width:0!important;
    }
}
