/* Keep the scroll range aligned with the last assistant action row. */
#chatView .chat-main-area:not(.is-empty) {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    align-self: stretch !important;
}

#chatView .chat-main-area:not(.is-empty) .chat-messages {
    /* Keep the scroll track at the far edge of the chat view. Message rows
       stay centered with their own max-width, so widening this scroll surface
       does not widen the conversation content. */
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
    padding-bottom: 88px !important;
    scroll-padding-bottom: 88px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    pointer-events: auto !important;
    touch-action: pan-y !important;
}

@media (max-width: 768px) {
    #chatView .chat-main-area:not(.is-empty) .chat-messages {
        padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
        scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
    }
}
