html, body {
    margin: 0;
    height: 100%;
}

body {
    /* max-width: 100em; */
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    position: fixed;
    overflow: hidden;
}

header {
    border: 1px solid;
    height: 5em;
    width: 100%;
    position: absolute;
    top: 0;
    box-sizing: border-box;
}

section {
    width: 100%;
    height: calc(100% - 10em);
    margin-top: 5em;
    margin-bottom: 5em;
    position: absolute;
    overflow-y: scroll;
    overscroll-behavior: contain;
    box-sizing: border-box;
}

.ps-chat-area>p {
    clear: both;
    min-height: 1em;
    max-width: 80%;
    border: 1px solid;
    margin: 0.5em;
    padding: 0.5em;
    border-radius: 5px;
    position: relative;
    overflow-wrap: anywhere;
}

.ps-chat-area>p.ps-msg-sent {
    float: right;
}

.ps-chat-area>p.ps-msg-received {
    float: left;
}

.ps-chat-area>p.ps-msg-sent::after,
.ps-chat-area>p.ps-msg-received::after{
    content: '';
    width: 0.6em;
    height: 0.6em;
    display: block;
    position: absolute;
    right: -0.5px;
    top: 0.6em;
    transform: rotate(-45deg);
    transform-origin: right top;
    border-right-width: 1px;
    border-right-style: solid;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-left-style: none;
    border-top-style: none;
    background-color: #fff;
    /* border-color: #000; */
}

.ps-chat-area>p.ps-msg-received::after{
    left: -0.5px;
    transform: rotate(45deg);
    transform-origin: left top;
    border-left-width: 1px;
    border-left-style: solid;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-right-style: none;
    border-top-style: none;
    background-color: #fff;
    /* border-color: #000; */
}


main {
    max-height: 100vh;
    height: 100vh;
    height: -webkit-fill-available;
    top: 0;
    width: 100%;
    position: absolute;
}

article {
    height: 100%;
}

div.ps-control-panel {
    border: 1px solid;
    height: 5em;
    width: 100%;
    position: absolute;
    bottom: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-around;
}

div.ps-control-panel>textarea {
    flex-grow: 1;
    margin: 0;
    height: 100%;
    resize: none;
    box-sizing: border-box;
}

div.ps-control-panel>button {
    width: 5em;
    margin: 0;
    height: 100%;
    border: 1px solid;
    box-sizing: border-box;
}