.ig-project-profile,
.ig-project-feed,
.ig-post-modal {
    display: none;
}

@media (max-width: 767.98px) {
:root {
        --ig-bg: #0b0f14;
        --ig-border: #252a30;
        --ig-muted: #a8afb9;
        --ig-surface: #262a30;
        --ig-text: #f5f6f7;
    }

    html {
        background: var(--ig-bg);
    }

    body.fjucdb-instagram-test-page {
        min-width: 0;
        padding-bottom: 0;
        background: var(--ig-bg);
        color: var(--ig-text);
        overscroll-behavior-x: none;
    }

    .fjucdb-instagram-test-page .main-header,
    .fjucdb-instagram-test-page .farina-stream-hero,
    .fjucdb-instagram-test-page .progress-wrap {
        display: none !important;
    }

    .ig-project-profile {
        display: block;
        background: var(--ig-bg);
        color: var(--ig-text);
    }

    .ig-project-profile__topbar {
        position: sticky;
        top: 0;
        z-index: 40;
        min-height: calc(58px + env(safe-area-inset-top, 0px));
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr) 48px;
        align-items: end;
        padding: env(safe-area-inset-top, 0px) 8px 5px;
        border-bottom: 1px solid rgba(37, 42, 48, 0.52);
        background: rgba(11, 15, 20, 0.94);
        backdrop-filter: blur(18px);
    }

    .ig-project-profile__top-action {
        width: 48px;
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 0;
        border-radius: 50%;
        background: transparent;
        color: var(--ig-text);
        font-size: 25px;
    }

    .ig-project-profile__handle {
        grid-column: 2;
        min-width: 0;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        margin: 0;
        color: var(--ig-text);
        font-size: clamp(15px, 4.3vw, 18px);
        font-weight: 800;
        letter-spacing: -0.025em;
    }

    .ig-project-profile__handle span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ig-project-profile__handle i {
        flex: 0 0 auto;
        color: #2f95f6;
        font-size: 14px;
    }

    .ig-project-profile__body {
        padding: 20px 16px 0;
    }

    .ig-project-profile__summary {
        display: grid;
        grid-template-columns: 92px minmax(0, 1fr);
        align-items: center;
        gap: clamp(16px, 5vw, 24px);
    }

    .ig-project-profile__avatar {
        width: 92px;
        height: 92px;
        display: grid;
        place-items: center;
        border-radius: 50%;
        background: #5c6570;
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
    }

    .ig-project-profile__avatar > div {
        width: 84px;
        height: 84px;
        overflow: hidden;
        border: 3px solid var(--ig-bg);
        border-radius: 50%;
        background: #e8e1d1;
    }

    .ig-project-profile__avatar img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        object-position: 50% 10%;
        transform: scale(1.72);
    }

    .ig-project-profile__identity {
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .ig-project-profile__identity strong {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 5px;
        color: var(--ig-text);
        font-size: clamp(15px, 4.1vw, 17px);
        font-weight: 800;
        line-height: 1.25;
    }

    .ig-project-profile__identity span {
        color: var(--ig-muted);
        font-size: 13px;
        line-height: 1.2;
    }

    .ig-project-profile__bio {
        margin-top: 15px;
        font-size: 14px;
        line-height: 1.48;
    }

    .ig-project-profile__bio p {
        margin: 0;
        color: #f0f1f2;
    }

    .ig-project-profile__link {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-top: 7px !important;
        color: #8ab4f8 !important;
        font-weight: 700;
    }

    .ig-project-profile__link i {
        font-size: 18px;
    }

    .ig-project-profile__link a {
        color: inherit;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ig-project-profile__actions {
        display: grid;
        grid-template-columns: 1.45fr 1fr 1fr;
        gap: 6px;
        margin-top: 16px;
    }

    .ig-project-profile__actions a,
    .ig-project-profile__actions button {
        min-width: 0;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 6px 5px;
        border: 0;
        border-radius: 8px;
        background: var(--ig-surface);
        color: var(--ig-text);
        font-size: 11.5px;
        font-weight: 800;
        line-height: 1.15;
        text-align: center;
    }

    .ig-project-profile__highlights {
        display: flex;
        gap: 12px;
        margin: 22px -16px 0;
        padding: 0 16px 19px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
    }

    .ig-project-profile__highlights::-webkit-scrollbar {
        display: none;
    }

    .ig-project-profile__highlight {
        width: 80px;
        flex: 0 0 80px;
        display: grid;
        gap: 6px;
        justify-items: center;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--ig-text);
    }

    .ig-project-profile__highlight-media {
        width: 70px;
        height: 70px;
        display: block;
        overflow: hidden;
        border: 2px solid #59616b;
        border-radius: 50%;
        background: #171a1d;
        box-shadow: 0 0 0 2px var(--ig-bg) inset;
    }

    .ig-project-profile__highlight-media img {
        width: 100%;
        height: 100%;
        display: block;
        padding: 3px;
        border-radius: 50%;
        object-fit: cover;
    }

    .ig-project-profile__highlight-label {
        width: 100%;
        min-height: 14px;
        display: block;
        overflow: hidden;
        color: #eef0f2;
        font-size: 11px;
        line-height: 1.2;
        text-align: center;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    :is(.ig-project-profile__top-action, .ig-project-profile__actions a, .ig-project-profile__actions button, .ig-project-profile__highlight, .ig-project-profile__tabs button):focus-visible {
        outline: 2px solid #fff;
        outline-offset: 2px;
    }

    .ig-project-profile__tabs {
        height: 50px;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        border-top: 0;
        border-bottom: 1px solid var(--ig-border);
    }

    .ig-project-profile__tabs button {
        position: relative;
        display: grid;
        place-items: center;
        border: 0;
        background: transparent;
        color: #89919a;
        font-size: 23px;
    }

    .ig-project-profile__tabs button.is-active {
        color: var(--ig-text);
    }

    .ig-project-profile__tabs button.is-active:after {
        content: "";
        position: absolute;
        right: 0;
        bottom: -1px;
        left: 0;
        height: 1px;
        background: var(--ig-text);
    }

    .fjucdb-instagram-test-page .farina-showcase {
        margin: 0;
        padding: 0 0 calc(18px + env(safe-area-inset-bottom, 0px));
        background: var(--ig-bg);
    }

    .fjucdb-instagram-test-page .farina-showcase > .container-fluid {
        max-width: none;
        padding: 0;
    }

    .fjucdb-instagram-test-page .farina-showcase__head {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .fjucdb-instagram-test-page .farina-content-rail {
        display: none;
    }

    .ig-project-feed {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1px;
        min-height: 34vw;
        background: var(--ig-bg);
    }

    .ig-project-feed__item {
        position: relative;
        width: 100%;
        aspect-ratio: 1 / 1;
        display: block;
        overflow: hidden;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: #141719;
    }

    .ig-project-feed__item img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
    }

    .ig-project-feed[data-ig-mode="posts"] .ig-project-feed__item {
        aspect-ratio: 4 / 5;
        background: #000;
    }

    .ig-project-feed[data-ig-mode="posts"] .ig-project-feed__item img {
        object-fit: cover;
    }

    .ig-project-feed__item > i {
        position: absolute;
        top: 8px;
        right: 8px;
        z-index: 1;
        color: #fff;
        font-size: 21px;
        line-height: 1;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
    }

    .ig-project-feed__item:focus-visible {
        outline: 2px solid #fff;
        outline-offset: -3px;
    }

    .ig-post-modal {
        position: fixed;
        inset: 0;
        z-index: 10005;
        display: block;
        background: var(--ig-bg);
    }

    .ig-post-modal[hidden] {
        display: none !important;
    }

    .ig-post-modal__dialog {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background: var(--ig-bg);
        color: var(--ig-text);
    }

    .ig-post-modal__header {
        min-height: calc(58px + env(safe-area-inset-top, 0px));
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 12px;
        padding: env(safe-area-inset-top, 0px) 8px 5px 12px;
        border-bottom: 1px solid var(--ig-border);
        background: var(--ig-bg);
    }

    .ig-post-modal__author {
        min-width: 0;
        min-height: 48px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .ig-post-modal__author > span:last-child {
        min-width: 0;
        display: flex;
        flex-direction: column;
    }

    .ig-post-modal__author strong {
        overflow: hidden;
        color: var(--ig-text);
        font-size: 14px;
        line-height: 1.15;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ig-post-modal__author strong i {
        color: #2f95f6;
    }

    .ig-post-modal__author small {
        margin-top: 3px;
        overflow: hidden;
        color: var(--ig-muted);
        font-size: 11px;
        line-height: 1.15;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ig-post-modal__avatar {
        width: 38px;
        height: 38px;
        flex: 0 0 38px;
        display: block;
        overflow: hidden;
        border: 1px solid #41464b;
        border-radius: 50%;
        background: #e8e1d1;
    }

    .ig-post-modal__avatar img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        object-position: 50% 10%;
        transform: scale(1.72);
    }

    .ig-post-modal__header > button {
        width: 48px;
        height: 48px;
        display: grid;
        flex: 0 0 48px;
        place-items: center;
        border: 0;
        background: transparent;
        color: var(--ig-text);
        font-size: 28px;
    }

    .ig-post-modal__stage {
        position: relative;
        width: 100%;
        aspect-ratio: 1 / 1;
        flex: 0 1 auto;
        max-height: calc(100dvh - 138px);
        overflow: hidden;
        background: #000;
        cursor: grab;
        touch-action: pan-y;
        user-select: none;
        -webkit-user-select: none;
    }

    .ig-post-modal[data-ig-mode="posts"] .ig-post-modal__stage {
        width: 100%;
        height: auto;
        max-height: none;
        aspect-ratio: 4 / 5;
        flex: 0 0 auto;
        align-self: stretch;
    }

    .ig-post-modal[data-ig-mode="videos"] .ig-post-modal__stage {
        width: min(100%, calc((100dvh - 138px) * 9 / 16));
        height: auto;
        max-height: calc(100dvh - 138px);
        aspect-ratio: 9 / 16;
        flex: 0 0 auto;
        align-self: center;
        touch-action: pan-y;
    }

    .ig-post-modal[data-ig-mode="posts"] .ig-post-modal__dialog {
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        scrollbar-width: none;
    }

    .ig-post-modal[data-ig-mode="posts"] .ig-post-modal__dialog::-webkit-scrollbar {
        display: none;
    }

    .ig-post-modal[data-ig-mode="videos"] .ig-post-modal__dialog {
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        scrollbar-width: none;
    }

    .ig-post-modal[data-ig-mode="videos"] .ig-post-modal__dialog::-webkit-scrollbar {
        display: none;
    }

    .ig-post-modal[data-ig-mode="posts"] .ig-post-modal__header {
        position: sticky;
        top: 0;
        z-index: 3;
        flex: 0 0 auto;
    }

    .ig-post-modal[data-ig-mode="videos"] .ig-post-modal__header {
        position: sticky;
        top: 0;
        z-index: 3;
        flex: 0 0 auto;
    }

    .ig-post-modal[data-ig-mode="posts"] .ig-post-modal__actions,
    .ig-post-modal[data-ig-mode="posts"] .ig-post-modal__caption {
        flex: 0 0 auto;
    }

    .ig-post-modal[data-ig-mode="posts"] .ig-post-modal__caption {
        overflow: visible;
    }

    .ig-post-modal[data-ig-mode="videos"] .ig-post-modal__actions,
    .ig-post-modal[data-ig-mode="videos"] .ig-post-modal__caption {
        flex: 0 0 auto;
    }

    .ig-post-modal[data-ig-mode="videos"] .ig-post-modal__caption {
        overflow: visible;
    }

    .ig-post-modal__track {
        width: 100%;
        height: 100%;
        display: flex;
        transition: transform 280ms cubic-bezier(0.22, 0.61, 0.36, 1);
        will-change: transform;
    }

    .ig-post-modal__track.is-dragging {
        cursor: grabbing;
        transition: none;
    }

    .ig-post-modal__slide {
        width: 100%;
        height: 100%;
        flex: 0 0 100%;
        display: grid;
        place-items: center;
        background: #000;
    }

    .ig-post-modal__slide img,
    .ig-post-modal__slide video {
        width: 100%;
        height: 100%;
        display: block;
        background: #000;
        object-fit: contain;
        user-select: none;
        -webkit-user-drag: none;
    }

    .ig-post-modal[data-ig-mode="videos"] .ig-post-modal__slide video {
        min-width: 0;
        min-height: 0;
        max-width: 100%;
        max-height: 100%;
    }

    .ig-post-modal__counter:empty,
    .ig-post-modal__dots:empty {
        display: none;
    }

    .ig-post-modal__counter {
        position: absolute;
        top: 12px;
        right: 12px;
        z-index: 2;
        padding: 5px 9px;
        border-radius: 13px;
        background: rgba(9, 12, 14, 0.72);
        color: #fff;
        font-size: 11px;
        font-weight: 800;
        line-height: 1;
    }

    .ig-post-modal__dots {
        position: absolute;
        right: 16px;
        bottom: 10px;
        left: 16px;
        z-index: 2;
        display: flex;
        justify-content: center;
        gap: 4px;
    }

    .ig-post-modal__dots span {
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.45);
    }

    .ig-post-modal__dots span.is-active {
        background: #3398f0;
    }

    .ig-post-modal__actions {
        min-height: 52px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 2px 8px;
    }

    .ig-post-modal__actions > div {
        display: flex;
    }

    .ig-post-modal__actions button {
        width: 44px;
        height: 44px;
        display: grid;
        place-items: center;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--ig-text);
        font-size: 27px;
    }

    .ig-post-modal__actions button[aria-pressed="true"] {
        color: #ff3040;
    }

    .ig-post-modal__actions [data-ig-save][aria-pressed="true"] {
        color: var(--ig-text);
    }

    .ig-post-modal__caption {
        flex: 1 1 auto;
        min-height: 0;
        padding: 0 14px calc(18px + env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .ig-post-modal__caption p {
        margin: 0;
        color: #ecedef;
        font-size: 13px;
        line-height: 1.45;
    }

    .ig-post-modal__caption p strong {
        color: #fff;
        font-weight: 800;
    }

    .ig-post-modal__caption time {
        display: block;
        margin-top: 10px;
        color: #777f87;
        font-size: 10px;
        letter-spacing: 0.035em;
        text-transform: uppercase;
    }

    .ig-post-modal__status {
        display: block;
        min-height: 16px;
        margin-top: 7px;
        color: #8ab4f8;
        font-size: 11px;
    }

    .fjucdb-instagram-test-page .farina-info-panel {
        display: flex;
        align-items: flex-end;
        justify-content: center;
        padding: 0;
    }

    .fjucdb-instagram-test-page .farina-info-panel[hidden] {
        display: none;
    }

    .fjucdb-instagram-test-page .farina-info-panel__overlay {
        background: rgba(0, 0, 0, 0.72);
        backdrop-filter: blur(3px);
    }

    .fjucdb-instagram-test-page .farina-info-panel__content {
        width: 100%;
        max-height: min(88dvh, 760px);
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 58px 18px calc(24px + env(safe-area-inset-bottom, 0px));
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: 0;
        border-radius: 24px 24px 0 0;
        background: #111518;
        box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.52);
        overflow-y: auto;
    }

    .fjucdb-instagram-test-page .farina-info-panel__content:before {
        content: "";
        position: absolute;
        top: 11px;
        left: 50%;
        width: 42px;
        height: 4px;
        border-radius: 999px;
        background: #5d646b;
        transform: translateX(-50%);
    }

    .fjucdb-instagram-test-page .farina-info-panel__content > .farina-modal-close {
        top: 21px;
        right: 14px;
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        background: #24292e;
        font-size: 23px;
    }

    .fjucdb-instagram-test-page .farina-info-panel__content > p:first-of-type {
        order: 0;
        margin: 0 48px 0 0;
        color: #53a6f5;
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.055em;
        text-transform: uppercase;
    }

    .fjucdb-instagram-test-page .farina-info-panel__content h2 {
        order: 1;
        margin: 8px 0 0;
        color: #fff;
        font-size: clamp(27px, 8.4vw, 36px);
        font-weight: 820;
        letter-spacing: -0.035em;
        line-height: 1.04;
        text-transform: none;
    }

    .fjucdb-instagram-test-page .farina-info-panel__grid {
        order: 2;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
        margin-top: 20px;
    }

    .fjucdb-instagram-test-page .farina-info-panel__grid span {
        min-height: 82px;
        padding: 12px 10px;
        border: 1px solid #2d3338;
        border-radius: 12px;
        background: #1a1f23;
        color: #8e969e;
        font-size: 10px;
        line-height: 1.35;
    }

    .fjucdb-instagram-test-page .farina-info-panel__grid strong {
        margin-top: 4px;
        color: #f3f5f6;
        font-size: 11px;
        line-height: 1.25;
    }

    .fjucdb-instagram-test-page .farina-info-panel__content > p:not(:first-of-type) {
        order: 3;
        margin-top: 20px;
        color: #d4d8dc;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.52;
    }

    .fjucdb-instagram-test-page .farina-info-panel__deliverables {
        order: 4;
        margin-top: 22px;
        padding-top: 20px;
        border-top: 1px solid #2d3338;
    }

    .fjucdb-instagram-test-page .farina-info-panel__deliverables h3 {
        margin-bottom: 13px;
        color: #f3f5f6;
        font-size: 12px;
        letter-spacing: 0.035em;
    }

    .fjucdb-instagram-test-page .farina-info-panel__deliverables ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px 14px;
    }

    .fjucdb-instagram-test-page .farina-info-panel__deliverables li {
        color: #c7ccd0;
        font-size: 12px;
        font-weight: 600;
    }

    .fjucdb-instagram-test-page .farina-info-panel__deliverables li:before {
        width: 5px;
        height: 5px;
        margin-right: 7px;
        background: #53a6f5;
    }

    .fjucdb-instagram-test-page .farina-info-panel__tags {
        gap: 6px;
        margin-top: 18px;
    }

    .fjucdb-instagram-test-page .farina-info-panel__tags span {
        border-color: #353b40;
        background: #1a1f23;
        color: #b7bdc2;
        font-size: 10px;
        padding: 7px 9px;
    }

    .fjucdb-instagram-test-page .farina-content-card {
        width: 100%;
        max-width: none;
        aspect-ratio: 1 / 1;
        border-radius: 0;
        box-shadow: none;
        overflow: hidden;
        transform: none !important;
    }

    .fjucdb-instagram-test-page .farina-content-card[hidden] {
        display: none !important;
    }

    .fjucdb-instagram-test-page .farina-content-card:before,
    .fjucdb-instagram-test-page .farina-content-card__shade,
    .fjucdb-instagram-test-page .farina-content-card__title,
    .fjucdb-instagram-test-page .farina-content-card__content {
        display: none;
    }

    .fjucdb-instagram-test-page .farina-content-card img,
    .fjucdb-instagram-test-page .farina-content-card video {
        border-radius: 0;
        filter: none;
        object-fit: cover;
    }

    .fjucdb-instagram-test-page .farina-video-cover__play {
        top: 10px;
        right: 10px;
        left: auto;
        color: #fff;
        font-size: 20px;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
        transform: none;
    }

    .fjucdb-instagram-test-page .farina-content-card:focus-visible {
        outline: 2px solid #fff;
        outline-offset: -3px;
    }

    html.ig-post-open,
    .fjucdb-instagram-test-page.ig-post-open {
        overflow: hidden;
    }
}

/* Preserve os títulos editoriais do hero: nunca parte uma palavra ao meio. */
.fjucdb-instagram-test-page .farina-stream-hero h1 span {
    max-width: 100%;
    overflow-wrap: normal;
    word-break: keep-all;
    white-space: nowrap;
}

.ig-media-controls {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 13px;
    opacity: 1;
    transform: translate(-50%, -50%);
    transition: opacity 160ms ease, transform 160ms ease;
    pointer-events: auto;
    will-change: opacity, transform;
}

.ig-media-controls[hidden],
.ig-post-modal:not([data-ig-mode="videos"]) [data-ig-post-media-controls] {
    display: none !important;
}

.ig-media-controls.is-playing {
    opacity: 0;
    transform: translate(-50%, -48%) scale(0.97);
    pointer-events: none;
}

.ig-media-controls button {
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.035);
    background: rgba(35, 35, 32, 0.82);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
    line-height: 1;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.ig-media-controls button:active {
    transform: scale(0.96);
}

.ig-media-controls button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.ig-media-controls__volume {
    width: 54px;
    height: 54px;
    font-size: 24px;
}

.ig-media-controls__play {
    width: 86px;
    height: 86px;
    font-size: 39px;
}

.ig-media-controls__play .ri-play-fill {
    transform: translateX(2px);
}

html.ig-story-open,
.fjucdb-instagram-test-page.ig-story-open {
    overflow: hidden;
    touch-action: none;
}

.ig-story-viewer {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #000;
    color: #fff;
}

.ig-story-viewer[hidden] {
    display: none !important;
}

.ig-story-viewer__dialog {
    position: relative;
    width: min(100vw, calc(100dvh * 9 / 16), 540px);
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    isolation: isolate;
    background: #000;
    box-shadow: 0 0 48px rgba(0, 0, 0, 0.5);
}

.ig-story-viewer__dialog:after {
    position: absolute;
    inset: 0 0 auto;
    z-index: 2;
    height: 150px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
    content: "";
}

.ig-story-viewer__progress {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    right: 8px;
    left: 8px;
    z-index: 5;
    height: 3px;
    display: flex;
    gap: 2px;
    pointer-events: none;
}

.ig-story-viewer__progress > span {
    height: 3px;
    flex: 1 1 0;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
}

.ig-story-viewer__progress > span > i {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: inherit;
    background: #fff;
    transform: scaleX(0);
    transform-origin: left center;
}

.ig-story-viewer__progress > span.is-active {
    background: rgba(255, 255, 255, 0.48);
}

.ig-story-viewer__header {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 17px);
    right: 10px;
    left: 10px;
    z-index: 5;
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 9px;
    pointer-events: none;
}

.ig-story-viewer__avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 50%;
    background: #ece5d7;
}

.ig-story-viewer__avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: 50% 10%;
    transform: scale(1.72);
}

.ig-story-viewer__identity {
    min-width: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 3px;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}

.ig-story-viewer__identity strong {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.15;
}

.ig-story-viewer__identity strong i {
    color: #3aa5ff;
    font-size: 13px;
}

.ig-story-viewer__identity small {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 3px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
}

.ig-story-viewer__identity small > span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ig-story-viewer__identity time {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.72);
}

.ig-story-viewer__stage:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -3px;
}

.ig-story-viewer__stage {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    background: #000;
    cursor: pointer;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.ig-story-viewer__media {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    transition: transform 180ms ease, opacity 180ms ease;
}

.ig-story-viewer.is-dragging .ig-story-viewer__media,
.ig-story-viewer.is-dragging-down .ig-story-viewer__media {
    transition: none;
}

.ig-story-viewer__media:before {
    position: absolute;
    inset: -30px;
    z-index: 0;
    background-color: #090909;
    background-image: linear-gradient(rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.42)), var(--story-backdrop, none);
    background-position: center;
    background-size: cover;
    content: "";
    filter: blur(24px) brightness(0.56);
    transform: scale(1.08);
}

.ig-story-viewer__media img,
.ig-story-viewer__media video {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: block;
    background: transparent;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.ig-story-viewer__media [hidden] {
    display: none !important;
}

.ig-story-viewer__media > .ig-media-controls {
    z-index: 3;
}

.ig-story-viewer__loader {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.24);
    border-top-color: rgba(255, 255, 255, 0.96);
    border-radius: 50%;
    animation: ig-story-loader-spin 760ms linear infinite;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.ig-story-viewer__loader[hidden] {
    display: none !important;
}

@keyframes ig-story-loader-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.ig-story-viewer__state {
    position: absolute;
    right: 20px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
    left: 20px;
    z-index: 4;
    display: none;
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.54);
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    pointer-events: none;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.ig-story-viewer__state.is-visible {
    display: block;
}

.ig-story-viewer__state.is-error {
    color: #ffd7d7;
}

@media (max-width: 359.98px) {
    .ig-media-controls {
        gap: 12px;
    }

    .ig-media-controls__volume {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }

    .ig-media-controls__play {
        width: 78px;
        height: 78px;
        font-size: 36px;
    }

    .ig-project-profile__body {
        padding-right: 12px;
        padding-left: 12px;
    }

    .ig-project-profile__summary {
        grid-template-columns: 80px minmax(0, 1fr);
        gap: 12px;
    }

    .ig-project-profile__avatar {
        width: 80px;
        height: 80px;
    }

    .ig-project-profile__avatar > div {
        width: 72px;
        height: 72px;
    }

    .ig-project-profile__highlights {
        margin-right: -12px;
        margin-left: -12px;
        padding-right: 12px;
        padding-left: 12px;
    }

    .ig-project-profile__actions a,
    .ig-project-profile__actions button {
        font-size: 10.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fjucdb-instagram-test-page *,
    .fjucdb-instagram-test-page *:before,
    .fjucdb-instagram-test-page *:after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
