.chat-app.without-site-header {
    grid-template-rows: 1fr auto;
}

/* The activity indicator is opt-in for an active submitted request. */
.typing {
    display: none;
}

.typing.is-visible:not([hidden]) {
    display: flex;
}

.typing[hidden] {
    display: none !important;
}

.chat-app,
.conversation,
.messages,
.message,
.message-body,
.bubble,
.composer-wrap,
.composer {
    min-width: 0;
    max-width: 100%;
}

.chat-app {
    width: 100%;
    max-width: 100vw;
}

.message {
    align-items: flex-start;
}

.message-body {
    flex: 0 1 auto;
    min-width: 0;
}

.bubble,
.response-actions,
.quick-actions,
.media-grid,
.link-preview-grid,
.media-card,
.link-preview-card {
    min-width: 0;
    max-width: 100%;
}

.suggestion,
.response-action {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.composer textarea {
    min-width: 0;
    width: 100%;
}

.avatar {
    flex: 0 0 auto;
    width: max-content;
    min-width: 31px;
    max-width: none;
    height: auto;
    min-height: 31px;
    padding: 6px 8px;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.bubble a {
    color: #164f9b;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.message.user .bubble a {
    color: #fff;
}

/* Keep conversation imagery compact and arrange galleries across a row. */
.media-grid,
.link-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
    align-items: start;
    gap: 10px;
    width: min(100%, 788px);
}

.media-card,
.link-preview-card {
    justify-self: start;
    width: 100%;
    max-width: 256px;
}

.media-card img,
.link-preview-card img {
    display: block;
    width: 100%;
    max-width: 256px;
    height: auto;
    max-height: 256px;
    object-fit: contain;
    background: #f1f4f8;
}

.link-preview-card > a {
    display: block;
    width: 100%;
    max-width: 256px;
}

.link-preview-card.preview-size-128,
.link-preview-card.preview-size-128 > a,
.link-preview-card.preview-size-128 img {
    max-width: 128px;
}

.link-preview-card.preview-size-128 img {
    max-height: 128px;
}

.link-preview-card.preview-size-64,
.link-preview-card.preview-size-64 > a,
.link-preview-card.preview-size-64 img {
    max-width: 64px;
}

.link-preview-card.preview-size-64 img {
    max-height: 64px;
}

@media (max-width: 620px) {
    .conversation {
        padding-right: max(10px, env(safe-area-inset-right));
        padding-left: max(10px, env(safe-area-inset-left));
    }

    .message {
        width: 100%;
        max-width: 100%;
        gap: 7px;
    }

    .message.user {
        justify-content: flex-start;
    }

    .message-body {
        flex: 1 1 0;
        max-width: none;
    }

    .avatar {
        flex: 0 0 auto;
        width: max-content;
        max-width: none;
        padding-right: 6px;
        padding-left: 6px;
        font-size: 11px;
    }

    .bubble {
        padding: 10px 11px;
    }

    .media-grid,
    .link-preview-grid {
        width: 100%;
        grid-template-columns: repeat(auto-fit, minmax(min(112px, 100%), 1fr));
    }

    .media-card,
    .link-preview-card {
        width: 100%;
        max-width: 256px;
    }

    .composer-wrap {
        width: 100%;
        padding-right: max(8px, env(safe-area-inset-right));
        padding-left: max(8px, env(safe-area-inset-left));
    }

    .composer {
        width: 100%;
        gap: 6px;
        padding-left: 10px;
    }

    .privacy-line {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .topbar {
        min-width: 0;
    }

    .identity {
        flex: 1 1 120px;
    }

    .top-actions {
        flex: 0 0 auto;
    }
}

@media (max-width: 340px) {
    .conversation {
        padding-right: max(6px, env(safe-area-inset-right));
        padding-left: max(6px, env(safe-area-inset-left));
    }

    .message {
        gap: 5px;
    }

    .avatar {
        flex-basis: auto;
        width: max-content;
        max-width: none;
        min-width: 27px;
        padding: 5px 4px;
        font-size: 10px;
    }

    .bubble {
        padding: 9px;
    }

    .composer-wrap {
        padding-right: max(5px, env(safe-area-inset-right));
        padding-left: max(5px, env(safe-area-inset-left));
    }

    .composer {
        padding: 5px 5px 5px 8px;
        gap: 4px;
    }

    .composer button {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .quick-actions,
    .response-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .topbar {
        flex-wrap: wrap;
        padding-right: max(8px, env(safe-area-inset-right));
        padding-left: max(8px, env(safe-area-inset-left));
    }

    .top-actions {
        width: 100%;
    }

    .top-actions .icon-button {
        flex: 1 1 0;
    }
}

/* Version 1.7.7: cinematic public presentation. */
:root {
    --public-night: #071321;
    --public-night-soft: #142233;
    --public-cream: #f7f0e6;
    --public-copper: #ce7617;
    --public-copper-light: #ef9a36;
}

body {
    background: var(--public-night);
}

.chat-app {
    isolation: isolate;
    color: var(--public-cream);
    background-color: var(--public-night);
    background-image: var(--public-background);
    background-repeat: no-repeat;
    background-position: right top;
    background-size: cover;
}

.chat-app::before {
    display: none;
}

.topbar,
.conversation,
.composer-wrap {
    position: relative;
    z-index: 1;
}

.topbar {
    color: var(--public-cream);
    background: rgba(5, 16, 29, .74);
    border-bottom-color: rgba(247, 240, 230, .13);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
}

.identity span {
    color: rgba(247, 240, 230, .67);
}

.logo,
.logo-fallback {
    border-color: rgba(247, 240, 230, .42);
    border-radius: 50%;
    background-color: rgba(7, 19, 33, .82);
}

.icon-button {
    color: var(--public-cream);
    border-color: rgba(247, 240, 230, .28);
    background: rgba(7, 19, 33, .66);
}

.icon-button:hover {
    color: #fff;
    border-color: var(--public-copper-light);
}

.conversation {
    padding: clamp(18px, 4vh, 46px) max(24px, calc((100% - 1280px) / 2)) 24px;
    scrollbar-color: rgba(239, 154, 54, .5) transparent;
}

.welcome {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    text-align: left;
}

.welcome[hidden] {
    display: none !important;
}

.welcome-copy {
    width: min(610px, 55%);
}

.welcome-avatar,
.welcome-prompt-avatar {
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 50%;
    border: 3px solid rgba(247, 240, 230, .92);
    background-color: var(--public-night-soft);
    background-image: var(--public-background);
    background-repeat: no-repeat;
    background-position: right center;
    background-size: cover;
    box-shadow: 0 15px 36px rgba(0, 0, 0, .34);
}

.welcome-avatar {
    width: clamp(76px, 8.2vw, 116px);
    height: clamp(76px, 8.2vw, 116px);
    margin-bottom: clamp(14px, 2.5vh, 26px);
}

.welcome h1 {
    margin: 0 0 9px;
    color: var(--public-cream);
    font-size: clamp(42px, 5.4vw, 72px);
    line-height: .98;
    letter-spacing: -.045em;
    text-shadow: 0 5px 24px rgba(0, 0, 0, .38);
}

.welcome .welcome-description {
    max-width: 600px;
    margin: 18px 0 0;
    color: rgba(247, 240, 230, .9);
    font-size: clamp(17px, 1.55vw, 22px);
    line-height: 1.45;
    text-shadow: 0 3px 15px rgba(0, 0, 0, .52);
}

.interface-prompts {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 24px;
}

.interface-prompt {
    display: grid;
    grid-template-columns: 14px minmax(0, auto);
    align-items: center;
    gap: 9px;
    max-width: 100%;
    min-height: 43px;
    padding: 9px 17px;
    color: var(--public-cream);
    border: 1px solid rgba(247, 240, 230, .38);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(38, 52, 66, .84), rgba(17, 30, 45, .84));
    box-shadow: inset 0 1px rgba(255, 255, 255, .13), 0 9px 24px rgba(0, 0, 0, .15);
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .11em;
    line-height: 1.35;
    text-align: left;
    text-transform: uppercase;
}

.interface-prompt:hover,
.interface-prompt:focus-visible {
    color: #fff;
    border-color: var(--public-copper-light);
    box-shadow: inset 0 1px rgba(255, 255, 255, .13), 0 9px 24px rgba(0, 0, 0, .22), 0 0 0 3px rgba(239, 154, 54, .17);
}

.interface-prompt i {
    color: var(--public-copper-light);
    font-style: normal;
    font-size: 11px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
    margin: clamp(30px, 5vh, 52px) 0 0;
}

.suggestion {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 13px;
    min-height: 108px;
    padding: 16px 20px;
    color: #101b2a;
    border: 2px solid var(--public-copper);
    border-radius: 18px;
    background: linear-gradient(135deg, #fffdfa, #f3ece3);
    box-shadow: 0 16px 34px rgba(0, 0, 0, .24), inset 0 1px #fff;
    font-size: clamp(15px, 1.35vw, 20px);
    font-weight: 850;
    line-height: 1.25;
    text-align: left;
}

.suggestion:hover,
.suggestion:focus-visible {
    color: #101b2a;
    border-color: var(--public-copper-light);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .3), 0 0 0 3px rgba(239, 154, 54, .22);
}

.suggestion-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    color: var(--public-copper);
    font-size: 31px;
    line-height: 1;
}

.welcome-prompt {
    display: flex;
    align-items: center;
    gap: 14px;
    width: min(720px, 100%);
    margin-top: 24px;
    color: var(--public-cream);
    font-size: clamp(16px, 1.55vw, 21px);
}

.welcome-prompt-avatar {
    width: 58px;
    height: 58px;
    border-width: 2px;
    background-image: var(--interface-profile-image);
    background-position: center;
}

.welcome-prompt > div:last-child {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    padding: 16px 22px;
    border: 2px solid rgba(247, 240, 230, .32);
    border-radius: 20px;
    background: rgba(17, 30, 45, .88);
    box-shadow: 0 13px 30px rgba(0, 0, 0, .22);
}

.messages {
    width: min(100%, 1000px);
    margin: 0 auto;
}

.message {
    color: var(--public-cream);
}

.avatar {
    color: var(--public-cream);
    border: 1px solid rgba(247, 240, 230, .38);
    border-radius: 999px;
    background: rgba(9, 24, 40, .9);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .2);
}

.message.user .avatar {
    color: #172335;
    border-color: rgba(247, 240, 230, .65);
    background: var(--public-cream);
}

.bubble {
    color: var(--public-cream);
    border: 1px solid rgba(247, 240, 230, .28);
    background: rgba(18, 33, 50, .92);
    box-shadow: 0 13px 32px rgba(0, 0, 0, .24);
    backdrop-filter: blur(9px);
}

.message.user .bubble {
    color: #172335;
    background: var(--public-cream);
}

.message.user .bubble a {
    color: #81450c;
}

.message-time {
    color: rgba(247, 240, 230, .64);
}

.typing {
    color: var(--public-cream);
    border: 1px solid rgba(247, 240, 230, .22);
    background: rgba(18, 33, 50, .94);
}

.typing span {
    background: var(--public-copper-light);
}

.typing em {
    color: rgba(247, 240, 230, .72);
}

.composer-wrap {
    padding: 10px max(24px, calc((100% - 1280px) / 2)) max(10px, env(safe-area-inset-bottom));
    background: linear-gradient(180deg, transparent, rgba(4, 13, 25, .8) 24%, rgba(4, 13, 25, .96));
}

.composer {
    min-height: 72px;
    align-items: center;
    padding: 8px 10px 8px 22px;
    border: 2px solid rgba(247, 240, 230, .66);
    border-radius: 24px;
    background: linear-gradient(135deg, #fffdfa, #f3ede5);
    box-shadow: 0 17px 42px rgba(0, 0, 0, .34), inset 0 1px #fff;
}

.composer:focus-within {
    border-color: var(--public-copper-light);
    box-shadow: 0 17px 42px rgba(0, 0, 0, .34), 0 0 0 3px rgba(239, 154, 54, .2);
}

.composer textarea {
    color: #182234;
    font-size: clamp(16px, 1.5vw, 20px);
}

.composer textarea::placeholder {
    color: #697180;
    opacity: 1;
}

.composer button {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--public-copper-light), #b95d08);
    box-shadow: 0 9px 20px rgba(136, 68, 9, .34);
}

.privacy-line {
    color: rgba(247, 240, 230, .59);
}

.brand-signature {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 7px;
    color: var(--public-copper-light);
    font-size: 10px;
    letter-spacing: .34em;
    text-transform: uppercase;
}

.brand-signature span {
    width: min(150px, 18vw);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--public-copper));
}

.brand-signature span:last-child {
    background: linear-gradient(90deg, var(--public-copper), transparent);
}

.brand-signature strong {
    max-width: min(420px, 52vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 920px) {
    .chat-app {
        background-position: right top;
    }

    .welcome-copy {
        width: min(650px, 72%);
    }

    .quick-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .suggestion {
        min-height: 88px;
    }
}

@media (max-width: 620px) {
    .chat-app {
        background-image: var(--public-mobile-background);
        background-position: right top;
        background-size: cover;
    }

    .conversation {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .welcome-copy {
        width: 100%;
    }

    .welcome-avatar {
        width: 72px;
        height: 72px;
        margin-bottom: 14px;
    }

    .welcome h1 {
        max-width: 92%;
        font-size: clamp(34px, 11vw, 48px);
    }

    .welcome .welcome-description {
        max-width: 92%;
        margin-top: 12px;
        font-size: 15px;
    }

    .interface-prompts {
        gap: 7px;
        margin-top: 16px;
    }

    .interface-prompt {
        min-height: 35px;
        padding: 7px 11px;
        font-size: 10px;
    }

    .quick-actions {
        gap: 9px;
        margin-top: 22px;
    }

    .suggestion {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 8px;
        min-height: 72px;
        padding: 10px 11px;
        border-radius: 14px;
        font-size: 13px;
    }

    .suggestion-icon {
        width: 34px;
        height: 34px;
        font-size: 20px;
    }

    .welcome-prompt {
        gap: 9px;
        margin-top: 16px;
        font-size: 14px;
    }

    .welcome-prompt-avatar {
        width: 42px;
        height: 42px;
    }

    .welcome-prompt > div:last-child {
        padding: 11px 13px;
        border-radius: 15px;
    }

    .composer-wrap {
        padding-top: 7px;
        padding-right: max(8px, env(safe-area-inset-right));
        padding-left: max(8px, env(safe-area-inset-left));
    }

    .composer {
        min-height: 57px;
        padding: 6px 7px 6px 13px;
        border-radius: 18px;
    }

    .composer textarea {
        padding-top: 7px;
        padding-bottom: 7px;
        font-size: 15px;
    }

    .composer button {
        width: 43px;
        height: 43px;
        flex-basis: 43px;
    }

    .brand-signature {
        gap: 9px;
        letter-spacing: .2em;
    }
}

@media (max-width: 340px) {
    .quick-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .suggestion {
        min-height: 58px;
    }

    .welcome-prompt-avatar {
        width: 36px;
        height: 36px;
    }

    .brand-signature span {
        width: 22px;
    }
}
