#notfixed-img[data-augment-age-affirmed] :is(.checkbox-container, .age-affirmation-error) {
    display: none;
}

#notfixed-img .avatar-info.augment-portrait-stage {
    position: relative;
    display: grid;
}

#notfixed-img .augment-portrait-stage > .augment-portrait-motion {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.augment-portrait-stage .augment-portrait-motion {
    visibility: hidden;
}

.augment-portrait-stage[data-augment-speaking] .augment-portrait-motion {
    visibility: visible;
    z-index: 1;
}

.augment-portrait-stage #idle-video[hidden],
.augment-live-reply-portrait > [hidden] {
    display: none;
}

.augment-portrait-play {
    position: absolute;
    bottom: .4rem;
    left: .4rem;
    right: .4rem;
    min-height: 40px;
    padding: .2rem;
    z-index: 2;
}

.augment-live-reply-portrait {
    display: block;
    width: 150px;
    max-width: 100%;
    aspect-ratio: 3 / 2;
}

.augment-live-reply-portrait > :is(img, video) {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 767px) {
    #notfixed-img, .avatar-interaction-page {
        --augment-chat-portrait-width: clamp(7rem, 38vw, 11rem);
    }

    #notfixed-img.fixed-img {
        top: var(--augment-chat-visible-top, 0px);
        width: 100%;
        height: var(--augment-chat-visible-height, 100dvh);
        align-items: stretch;
    }

    #notfixed-img.fixed-img .catalog-content {
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        max-width: none;
        height: 100%;
        min-height: 0;
        max-height: none;
        overflow: hidden;
        margin: 0;
        gap: .5rem;
        padding: max(.5rem, env(safe-area-inset-top)) max(.75rem, env(safe-area-inset-right))
            max(.5rem, env(safe-area-inset-bottom)) max(.75rem, env(safe-area-inset-left));
    }

    #notfixed-img .catalog-content .demo-close {
        top: .5rem;
        right: .75rem;
        z-index: 3;
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
    }

    #notfixed-img .catalog-content .about-avatar {
        flex: 0 0 auto;
        box-sizing: border-box;
        width: 100%;
        min-height: 0;
        max-height: min(17rem, 46%);
        align-items: stretch;
        justify-content: flex-start;
        overflow: auto;
        padding: 0;
        gap: .35rem;
    }

    #notfixed-img .about-avatar .login {
        padding-inline-end: 44px;
    }

    #notfixed-img .about-avatar .login a {
        padding-block: .6rem;
    }

    #notfixed-img .about-avatar > :is(.membership_info, .features-you-get) {
        display: none;
    }

    #notfixed-img .about-avatar-data {
        display: grid;
        grid-template-columns: var(--augment-chat-portrait-width) minmax(0, 1fr);
        grid-template-areas: "media details";
        align-items: start;
        width: 100%;
        gap: .65rem;
        margin: 0;
    }

    #notfixed-img .catalog-content .avatar-info {
        grid-area: media;
        min-width: 0;
        width: 100%;
        height: var(--augment-chat-portrait-width);
    }

    #notfixed-img .catalog-content .avatar-data {
        grid-area: details;
        margin: 0;
        gap: .25rem;
        min-width: 0;
        overflow-wrap: anywhere;
    }

    #notfixed-img .catalog-content .avatar-data span {
        font-size: .9rem;
        line-height: 1.35;
    }

    #notfixed-img .catalog-content .avatar-data > span:first-child {
        font-size: 1.1rem;
        font-weight: 700;
    }

    #notfixed-img .avatar-data .museum_links {
        flex-wrap: wrap;
        align-items: center;
        margin: .2rem 0 0;
    }

    #notfixed-img .avatar-data .museum_links a {
        font-size: .875rem;
        padding: .15rem .25rem;
    }

    #notfixed-img .catalog-content .avatar-info :is(img, video) {
        display: block;
        width: 100%;
        height: 100%;
        min-height: 0;
        max-height: none;
        margin: 0;
        object-fit: contain;
    }

    .augment-live-reply-portrait {
        width: min(70vw, 17rem);
    }

    #notfixed-img .catalog-content .message-container {
        display: flex;
        flex: 1 1 auto;
        min-height: 0;
        width: 100%;
        padding: 0;
        overflow: hidden;
        gap: .4rem;
    }

    #notfixed-img .messages-content_demo {
        flex: 1 1 auto;
        min-height: 0;
    }

    :is(#notfixed-img .messages-content_demo, .avatar-interaction-page #message-content) {
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        gap: .65rem;
        width: 100%;
        min-width: 0;
        overflow: hidden auto;
        overscroll-behavior-y: contain;
        padding: .25rem .25rem .6rem;
    }

    :is(#notfixed-img .messages-content_demo, .avatar-interaction-page #message-content) .message {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        align-self: flex-start;
        flex: 0 0 auto;
        gap: .25rem;
        min-width: 0;
        max-width: 100%;
        width: fit-content;
        float: none;
        margin: 0;
        padding: .1rem .15rem;
        overflow-wrap: anywhere;
    }

    :is(#notfixed-img .messages-content_demo, .avatar-interaction-page #message-content) .message-personal {
        align-self: flex-end;
        align-items: flex-end;
    }

    :is(#notfixed-img .messages-content_demo, .avatar-interaction-page #message-content) .message :is(p, .augment-chat-body, audio, video) {
        box-sizing: border-box;
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    :is(#notfixed-img .messages-content_demo, .avatar-interaction-page #message-content) .augment-chat-retry {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: .25rem .5rem;
        align-items: center;
        text-align: start;
        font-size: .875rem;
    }

    #notfixed-img .augment-chat-starters,
    .avatar-interaction-page .augment-chat-starters {
        max-height: 3rem;
        overflow: auto;
        margin: 0;
    }

    #notfixed-img .catalog-content .message-box-demo {
        flex: 0 0 auto;
        box-sizing: border-box;
        width: 100%;
        margin: 0;
    }

    #notfixed-img .catalog-content .checkbox-container {
        align-items: center;
        gap: .5rem;
        margin: 0 0 .4rem;
    }

    #notfixed-img .checkbox-container p,
    #notfixed-img .age-affirmation-error {
        font-size: .8rem;
        line-height: 1.3;
    }

    #notfixed-img .age-affirmation-error {
        position: static;
        flex: 0 0 auto;
        margin: 0;
    }

    #notfixed-img.checked-affirmation .age-affirmation-error {
        display: none;
    }

    :is(#notfixed-img .message-box-demo, .avatar-interaction-page .message-box) textarea {
        box-sizing: border-box;
        width: 100%;
        min-height: 44px;
        max-height: 96px;
        margin: 0;
        padding-inline-end: 5.25rem;
        font-size: 16px;
    }

    :is(#notfixed-img, .avatar-interaction-page) :is(#talk-button-demo, #talk-button) {
        min-width: 44px;
        min-height: 44px;
    }

    #notfixed-img .catalog-content .message-container :is(#talk-button-demo, #recordButton) {
        inset: auto .375rem .375rem auto;
        min-width: 44px;
        min-height: 44px;
    }

    .avatar-interaction-page .main-chat-container {
        align-items: stretch;
        row-gap: .5rem;
    }

    .avatar-interaction-page .video-background:has(.augment-portrait-stage) {
        flex-direction: row;
        align-items: center;
        align-self: stretch;
        gap: .75rem;
    }

    .avatar-interaction-page .main-chat-container .video-animated.augment-portrait-stage {
        flex: 0 0 var(--augment-chat-portrait-width);
        width: var(--augment-chat-portrait-width);
        height: var(--augment-chat-portrait-width);
        min-height: 0;
        margin: 0;
    }

    .avatar-interaction-page .video-animated.augment-portrait-stage > .ai-video {
        inset: 0;
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
        border-radius: 0;
        object-fit: contain;
    }

    .chat-page-scroll.hidden-menu .avatar-interaction-page .video-background:has(.augment-portrait-stage) {
        opacity: 1;
    }

    .chat-page-scroll .avatar-interaction-page .main-chat-container,
    .chat-page-scroll .avatar-interaction-page .avenue-messenger-outer {
        padding-top: 0;
    }

    .avatar-interaction-page .messages {
        width: 100%;
        max-width: none;
        min-width: 0;
        padding-bottom: .5rem;
    }

    .avatar-interaction-page #message-content {
        max-height: max(9rem, calc(var(--augment-chat-visible-height, 100dvh) - 14rem));
    }

    .avatar-interaction-page:has(#query) {
        padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
    }

    .avatar-interaction-page .message-box-outer-div:has(#query):not(.expanded-chat) {
        position: fixed;
        inset: auto 0 var(--augment-chat-bottom-inset, 0px);
        width: 100%;
        max-width: none;
        box-sizing: border-box;
        padding: .35rem max(.75rem, env(safe-area-inset-right)) max(.35rem, env(safe-area-inset-bottom))
            max(.75rem, env(safe-area-inset-left));
        z-index: 12;
        background: var(--dark-background-color, #191919);
        transition: none;
    }

    [data-augment-chat-keyboard="open"] :is(#notfixed-img, .avatar-interaction-page) {
        --augment-chat-portrait-width: clamp(4rem, 22vw, 6rem);
    }

    [data-augment-chat-keyboard="open"] #notfixed-img .about-avatar {
        max-height: min(8rem, 40%);
    }

    [data-augment-chat-keyboard="open"] #notfixed-img .about-avatar .login {
        display: none;
    }

    [data-augment-chat-keyboard="open"] #notfixed-img .avatar-data {
        padding-inline-end: 44px;
    }

    [data-augment-chat-keyboard="open"] :is(#notfixed-img, .avatar-interaction-page) .augment-chat-starters {
        display: none;
    }

}
