.ig-shell.subpage {
    padding-bottom: 0;
}

.ig-shell.subpage .ig-nav {
    display: none;
}

.ig-nav button.active .ig-ico {
    stroke-width: 2.2;
}

.ig-nav button.active .ig-ico.filled,
.ig-nav button.active .ig-ico.liked {
    fill: currentColor;
    stroke: none;
}

.ig-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 20;
    animation: igFade 0.18s ease;
}

.ig-sheet {
    position: fixed;
    inset: auto 0 0 0;
    width: min(470px, 100%);
    left: 50%;
    transform: translateX(-50%);
    background: #262626;
    border-radius: 16px 16px 0 0;
    padding: 4px 0 20px;
    z-index: 21;
    max-height: 86vh;
    overflow: auto;
    animation: igSheetUp 0.28s ease;
}

.ig-sheet .grab {
    width: 36px;
    height: 4px;
    border-radius: 99px;
    background: #555;
    margin: 8px auto 6px;
}

.ig-sheet h3 {
    margin: 4px 16px 10px;
    font-size: 16px;
    text-align: center;
}

.ig-sheet-row,
.ig-sheet button.ig-sheet-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    color: #f5f5f5;
    padding: 13px 16px;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
}

.ig-sheet-row span {
    color: #a8a8a8;
    font-size: 13px;
}

.ig-sheet-row.danger {
    color: #ed4956;
}

.ig-sheet-cancel {
    margin-top: 6px;
    border-top: 1px solid #3a3a3a;
}

@keyframes igSheetUp {
    from { transform: translate(-50%, 24px); opacity: 0.4; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

@keyframes igFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes igSlideIn {
    from { transform: translateX(18px); opacity: 0.35; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes igBurst {
    0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0; }
    35% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

@keyframes igStoryBar {
    from { width: 0; }
    to { width: 100%; }
}

.ig-sub {
    min-height: 100vh;
    animation: igSlideIn 0.2s ease;
    background: #000;
}

.ig-search-input {
    display: block;
    width: calc(100% - 24px);
    margin: 10px 12px;
    background: #262626;
    border: 0;
    border-radius: 10px;
    padding: 9px 12px;
    color: #f5f5f5;
    font-size: 16px;
    font-family: inherit;
}

.ig-search-input::placeholder {
    color: #a8a8a8;
}

.ig-set-sec {
    color: #a8a8a8;
    font-size: 13px;
    font-weight: 600;
    padding: 18px 16px 6px;
}

.ig-set-info {
    color: #a8a8a8;
    font-size: 14px;
    line-height: 1.45;
    padding: 8px 16px 12px;
}

.ig-set-row {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 16px;
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.ig-set-row .meta {
    flex: 1;
}

.ig-set-row .meta b {
    display: block;
    font-size: 16px;
    font-weight: 400;
}

.ig-set-row .meta span {
    color: #a8a8a8;
    font-size: 13px;
}

.ig-set-row.danger,
.ig-set-row.danger b {
    color: #ed4956;
}

.ig-set-ico {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: #f5f5f5;
}

.ig-chev {
    color: #737373;
    width: 16px;
    height: 16px;
}

.ig-switch {
    width: 44px;
    height: 26px;
    border-radius: 99px;
    background: #363636;
    position: relative;
    flex-shrink: 0;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.ig-switch.on {
    background: #0095f6;
}

.ig-switch i {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    transition: left 0.18s ease;
    display: block;
}

.ig-switch.on i {
    left: 20px;
}

.ig-toast {
    position: fixed;
    left: 50%;
    bottom: 78px;
    transform: translateX(-50%);
    background: #262626;
    color: #f5f5f5;
    padding: 12px 16px;
    border-radius: 10px;
    z-index: 40;
    font-size: 14px;
    max-width: 86%;
    animation: igFade 0.18s ease;
}

.ig-burst {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 90px;
    height: 90px;
    transform: translate(-50%, -50%);
    animation: igBurst 0.7s ease-out forwards;
    pointer-events: none;
    fill: #fff;
    stroke: none;
}

.ig-seg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid #262626;
}

.ig-seg.three {
    grid-template-columns: 1fr 1fr 1fr;
}

.ig-seg button {
    background: transparent;
    border: 0;
    color: #737373;
    padding: 12px 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.ig-seg button.on {
    color: #f5f5f5;
    box-shadow: inset 0 -1px 0 #f5f5f5;
}

.ig-form-row {
    padding: 10px 16px 0;
}

.ig-form-row label {
    display: block;
    color: #a8a8a8;
    font-size: 12px;
    margin-bottom: 4px;
}

.ig-form-row input,
.ig-form-row textarea {
    width: 100%;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #262626;
    color: #f5f5f5;
    font-size: 16px;
    font-family: inherit;
    padding: 8px 0;
    resize: vertical;
}

.ig-form-row input:disabled {
    color: #737373;
}

.ig-btn-text {
    border: 0;
    background: transparent;
    color: #0095f6;
    font-weight: 600;
    font-size: 16px;
    font-family: inherit;
    cursor: pointer;
    padding: 4px 8px;
}

.ig-composer {
    min-height: 100vh;
    background: #000;
}

.ig-composer .stage {
    min-height: 52vh;
    display: grid;
    place-items: center;
    background: #111;
    color: #a8a8a8;
    text-align: center;
    padding: 24px;
}

.ig-viewer {
    background: #000;
    min-height: 100vh;
}

.ig-story-view {
    position: relative;
    min-height: 100vh;
    background: #111;
    color: #fff;
}

.ig-story-view .bars {
    display: flex;
    gap: 4px;
    padding: 10px 8px 0;
}

.ig-story-view .bars b {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.28);
    border-radius: 2px;
    overflow: hidden;
}

.ig-story-view .bars b i {
    display: block;
    height: 100%;
    background: #fff;
    animation: igStoryBar 4s linear forwards;
}

.ig-story-view .media {
    height: calc(100vh - 88px);
    height: calc(100dvh - 88px);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.ig-story-view .media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ig-story-view .media.ig-face-lock {
    position: relative;
}
.ig-story-view .media.ig-face-lock::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 0;
    background: rgba(0, 0, 0, .53);
    z-index: 2;
    pointer-events: none;
}
.ig-story-view .media.ig-face-lock > .ig-pay-lock {
    left: 50%;
    top: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    z-index: 3;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .7));
}

.ig-story-view .who {
    position: absolute;
    top: 22px;
    left: 12px;
    display: flex;
    gap: 8px;
    align-items: center;
    font-weight: 600;
    font-size: 13px;
}

.ig-hl {
    cursor: pointer;
    background: transparent;
    border: 0;
    font-family: inherit;
}

.ig-stats button,
.ig-stats > button {
    background: transparent;
    border: 0;
    color: inherit;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
}

.ig-tabs button {
    background: transparent;
    border: 0;
    color: #737373;
    display: grid;
    place-items: center;
    height: 44px;
    cursor: pointer;
    padding: 0;
}

.ig-tabs button.active {
    color: #f5f5f5;
    box-shadow: inset 0 -1px 0 #f5f5f5;
}

.ig-grid .tile {
    cursor: pointer;
    border: 0;
    padding: 0;
}

.ig-note-row {
    display: flex;
    gap: 14px;
    padding: 12px 14px 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ig-note {
    width: 76px;
    flex-shrink: 0;
    text-align: center;
    font-size: 11px;
    color: #f5f5f5;
}

.ig-note .bubble {
    font-size: 11px;
    background: #262626;
    border-radius: 12px;
    padding: 6px 8px;
    margin-bottom: 6px;
    color: #ddd;
}

.ig-chat {
    padding: 12px 14px 80px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ig-bubble {
    max-width: 78%;
    padding: 8px 12px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.35;
}

.ig-bubble.them {
    background: #262626;
    align-self: flex-start;
}

.ig-bubble.me {
    background: #3797f0;
    align-self: flex-end;
}

.ig-chat-bar {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: min(470px, 100%);
    padding: 8px 12px calc(14px + env(safe-area-inset-bottom, 0px));
    background: #000;
}

.ig-chat-bar input {
    width: 100%;
    background: #262626;
    border: 0;
    border-radius: 22px;
    color: #fff;
    padding: 10px 14px;
    font-size: 15px;
    font-family: inherit;
}

.ig-people-btn {
    color: #0095f6;
    background: transparent;
    border: 0;
    font-weight: 600;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
}

.ig-time-bar {
    height: 120px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 20px 16px;
}

.ig-time-bar i {
    flex: 1;
    background: #0095f6;
    border-radius: 4px 4px 0 0;
    min-height: 8px;
}

.ig-lang button.on b {
    color: #0095f6;
}

.feed-media {
    cursor: pointer;
}

.ig-reel-actions {
    position: absolute;
    right: 12px;
    bottom: 90px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.ig-reel-wrap {
    position: relative;
    min-height: calc(100vh - 56px);
    min-height: calc(100dvh - 56px);
    background: #000;
}

.ig-reel-wrap img {
    width: 100%;
    height: calc(100vh - 56px);
    height: calc(100dvh - 56px);
    object-fit: cover;
}

.ig-reel-meta {
    position: absolute;
    left: 12px;
    right: 64px;
    bottom: 72px;
}

.ig-check {
    color: #0095f6;
    font-weight: 700;
}

.ig-own .ig-actions {
    grid-template-columns: 1fr 1fr 36px;
    gap: 8px;
}

.ig-actions button {
    cursor: pointer;
}

.ig-profile-btn {
    width: 100%;
    background: #363636;
    color: #fff;
    white-space: nowrap;
    display: grid;
    place-items: center;
}

.ig-add-people {
    background: #363636;
    color: #fff;
    display: grid;
    place-items: center;
    width: 36px;
    padding: 0;
}

.ig-explore .tile {
    aspect-ratio: 1;
    overflow: hidden;
    border: 0;
    padding: 0;
    background: #111;
    position: relative;
}

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

.ig-hl i {
    pointer-events: none;
}

.ig-note {
    background: transparent;
    border: 0;
    color: inherit;
    font-family: inherit;
    cursor: pointer;
}

.ig-note-ava-wrap {
    width: clamp(56px, 14vw, 64px);
    height: clamp(56px, 14vw, 64px);
    margin: 0 auto 6px;
    border-radius: 50%;
    overflow: hidden;
    background: #262626;
}

.ig-note-ava-wrap .ig-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
}

.ig-note .bubble {
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ig-dm-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px 10px 8px 6px;
}

.ig-dm-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 0;
    color: inherit;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    padding: 4px;
}

.ig-dm-ava {
    width: clamp(56px, 15vw, 64px);
    height: clamp(56px, 15vw, 64px);
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #262626;
}

.ig-dm-ava.has-story {
    padding: 2px;
    background: linear-gradient(45deg, #f9ce34, #ee2a7b 55%, #6228d7);
}

.ig-dm-ava img,
.ig-dm-ava .feed-ava {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #000;
    display: block;
}

.ig-dm-main .meta span.unread {
    color: #f5f5f5;
    font-weight: 600;
}

.ig-dm-cam {
    background: transparent;
    border: 0;
    color: #f5f5f5;
    padding: 6px;
    cursor: pointer;
}

.ig-dm-cam .ig-ico {
    width: 22px;
    height: 22px;
}

.ig-req-actions {
    display: flex;
    gap: 8px;
    width: 100%;
    padding: 0 8px 4px 72px;
}

.ig-req-ok,
.ig-req-no {
    border: 0;
    border-radius: 8px;
    padding: 7px 14px;
    font-weight: 600;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
}

.ig-req-ok {
    background: #0095f6;
    color: #fff;
}

.ig-req-no {
    background: #262626;
    color: #f5f5f5;
}

.ig-top .ig-thread-who {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    background: transparent;
    border: 0;
    color: inherit;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    min-width: 0;
    padding: 0;
    place-items: unset;
}

.ig-thread-who .feed-ava {
    width: 32px;
    height: 32px;
}

.ig-thread-who span {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ig-thread-who b {
    font-size: 14px;
    line-height: 1.15;
}

.ig-thread-who small {
    color: #a8a8a8;
    font-size: 12px;
}

.ig-msg {
    display: flex;
    flex-direction: column;
    max-width: 78%;
    gap: 4px;
}

.ig-msg.them { align-self: flex-start; align-items: flex-start; }
.ig-msg.me { align-self: flex-end; align-items: flex-end; }

.ig-msg time {
    color: #737373;
    font-size: 11px;
    padding: 0 6px;
}

.ig-seen {
    color: #a8a8a8;
    font-size: 11px;
    padding: 0 6px;
}

.ig-hidden-media {
    position: relative;
    width: 220px;
    max-width: 70vw;
    aspect-ratio: 1;
    border: 0;
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    background: #111;
    cursor: pointer;
}

.ig-hidden-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ig-lock-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.35);
}

.ig-lock-badge .ig-ico {
    width: 18px;
    height: 18px;
}

.ig-voice {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #262626;
    border-radius: 18px;
    padding: 10px 14px;
    min-width: 180px;
}

.ig-voice i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f5f5f5;
}

.ig-voice span {
    flex: 1;
    height: 16px;
    background: repeating-linear-gradient(90deg, #737373 0 2px, transparent 2px 5px);
    border-radius: 4px;
    opacity: 0.85;
}

.ig-voice em {
    font-style: normal;
    font-size: 12px;
    color: #a8a8a8;
}

.ig-chat {
    padding: 12px 14px 96px;
}

.ig-dm-composer {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ig-dm-composer > button {
    background: transparent;
    border: 0;
    color: #f5f5f5;
    padding: 4px;
    cursor: pointer;
}

.ig-composer-pill {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    background: #262626;
    border-radius: 22px;
    padding: 4px 6px 4px 10px;
    min-width: 0;
}

.ig-composer-pill input {
    flex: 1;
    width: auto;
    min-width: 0;
    background: transparent;
    border: 0;
    color: #fff;
    padding: 8px 4px;
    font-size: 15px;
    font-family: inherit;
}

.ig-composer-pill button {
    background: transparent;
    border: 0;
    color: #f5f5f5;
    padding: 4px;
    cursor: pointer;
}

.ig-dm-composer:not(.has-text) .ig-dm-send { display: none; }
.ig-dm-composer.has-text .ig-dm-heart,
.ig-dm-composer.has-text .ig-dm-mic { display: none; }

.ig-note-viewer {
    position: fixed;
    left: 50%;
    top: 38%;
    transform: translate(-50%, -50%);
    z-index: 22;
    text-align: center;
    color: #f5f5f5;
    width: min(280px, 80vw);
}

.ig-note-viewer .ig-note-ava,
.ig-note-viewer img {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    display: block;
}

.ig-note-viewer .bubble {
    background: #262626;
    border-radius: 18px;
    padding: 14px 16px;
    font-size: 18px;
    margin-bottom: 10px;
}

.ig-note-row::-webkit-scrollbar { display: none; }
.ig-note-row { scrollbar-width: none; }

.ig-offer-banner {
    position: fixed;
    left: 50%;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    width: min(430px, calc(100% - 24px));
    background: linear-gradient(90deg, #ee2a7b, #833ab4);
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-weight: 800;
    font-size: 13px;
    line-height: 1.35;
    padding: 12px 14px;
    border-radius: 14px;
    z-index: 40;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    pointer-events: auto;
}

.ig-shell.subpage .ig-offer-banner {
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
}

.ig-pay-dim {
    position: relative;
    opacity: 0.4;
}

.ig-note.ig-pay-dim,
.ig-dm-row.ig-pay-dim,
.ig-stats .ig-pay-dim {
    overflow: visible;
}

.ig-pay-dim::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
}

.ig-pay-lock {
    position: absolute;
    right: 6px;
    top: 6px;
    z-index: 3;
    pointer-events: none;
    width: 18px;
    height: 18px;
    color: #fff;
}

.ig-star {
    background: transparent;
    border: 0;
    color: #ee2a7b;
    font-weight: 800;
    cursor: pointer;
    padding: 0 2px;
    font: inherit;
}

.ig-off-badge {
    display: inline-block;
    margin-left: 4px;
    background: #ee2a7b;
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.2;
    padding: 2px 5px;
    border-radius: 6px;
    vertical-align: middle;
    pointer-events: none;
    white-space: nowrap;
}

.ig-pay-dim > .ig-off-badge {
    position: absolute;
    left: 6px;
    bottom: 6px;
    z-index: 3;
    margin-left: 0;
}

.ig-story .ig-ring > .sim-lock.round,
.ig-dm-ava > .sim-lock,
.ig-note-ava-wrap > .sim-lock {
    width: 100%;
    height: 100%;
}

.ig-session-flag {
    margin: 8px 12px;
    color: #a8a8a8;
    font-size: 12px;
}

.ig-shell.reduce,
.ig-shell.reduce * {
    animation: none !important;
    transition: none !important;
}

.ig-shell.data-saver img,
.ig-shell.data-saver .sim-face,
.ig-shell.data-saver .feed-media img,
.ig-shell.data-saver .tile img {
    filter: blur(0.6px) contrast(0.92) saturate(0.85);
    image-rendering: auto;
}

.ig-shell.data-hd img,
.ig-shell.data-hd .feed-media img,
.ig-shell.data-hd .tile img {
    image-rendering: auto;
    filter: none;
}

.ig-shell.captions-on .ig-reel-cap,
.ig-shell.captions-on .ig-story-cap {
    display: block;
}

.ig-reel-cap,
.ig-story-cap {
    display: none;
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 72px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 13px;
    z-index: 4;
    pointer-events: none;
}

.ig-open-media-box {
    width: 220px;
    max-width: 70vw;
}
.ig-open-media-box img {
    width: 100%;
    border-radius: 16px;
    display: block;
}

@media (max-width: 640px) {
    .ig-toast {
        bottom: calc(78px + env(safe-area-inset-bottom, 0px));
        max-width: calc(100% - 24px);
        font-size: 13px;
    }

    .ig-chat-bar {
        padding: 8px 10px calc(12px + env(safe-area-inset-bottom, 0px));
    }

    .ig-offer-banner {
        width: calc(100% - 20px);
        font-size: 12px;
        padding: 11px 12px;
        bottom: calc(60px + env(safe-area-inset-bottom, 0px));
    }

    .ig-shell.subpage .ig-offer-banner {
        bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    }

    .ig-note-row {
        padding-inline: 12px;
    }

    .ig-story-view .media {
        height: calc(100vh - 80px);
        height: calc(100dvh - 80px);
    }

    .ig-reel-wrap,
    .ig-reel-wrap img {
        min-height: calc(100vh - 52px);
        min-height: calc(100dvh - 52px);
        height: calc(100vh - 52px);
        height: calc(100dvh - 52px);
    }
}
