

body.chat-page-body {
    justify-content: flex-start;
    padding-top: 10vh;
    background-color: #190d0c;
    background-image: var(--home-background, url("../../objects/images/fallevent/fallevent3.gif"));
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

.back-link {
    position: fixed;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 2;
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: #ffd9a1;
    text-decoration: none;
}

.back-link:hover {
    color: #fff4df;
}

.chat-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 40rem;
}

#chat-status {
    text-align: center;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
}

.chat-voice-link {
    color: #fff4df;
    font-size: 0.85rem;
    text-decoration-color: rgba(243, 178, 92, 0.5);
    text-underline-offset: 0.2em;
}

.chat-voice-link:hover {
    color: #f3b25c;
}

.chat-room {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
}

.chat-log {
    width: 100%;
    max-width: 34rem;
    list-style: none;
    margin: 0;
    padding: 1rem;
    height: 50vh;
    min-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    border: 1px solid var(--faint);
}

.chat-message {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    max-width: 85%;
}

.chat-message--own {
    align-self: flex-end;
    align-items: flex-end;
}

.chat-message-name {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #f3b25c;
}

.chat-message-profile-link {
    color: inherit;
    text-decoration: none;
    text-decoration-color: transparent;
    text-underline-offset: 0.2em;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.chat-message-profile-link:hover,
.chat-message-profile-link:focus-visible {
    color: #f7c77d;
    text-decoration: underline;
    text-decoration-color: currentColor;
}

.chat-message-text {
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.5;
    word-break: break-word;
    color: var(--white);
}

#chat-form {
    flex-direction: row;
    align-items: stretch;
    gap: 0.6rem;
    max-width: 34rem;
}

#chat-form input[type="text"] {
    flex: 1;
    width: auto;
    border: 1px solid var(--faint);
    padding: 0.7rem 0.9rem;
}

#chat-form button {
    width: auto;
    margin: 0;
    padding: 0.7rem 1.4rem;
    background: #f3b25c;
    border-color: #f3b25c;
    color: #1b120d;
}

@media (max-width: 480px) {
    body.chat-page-body {
        padding-top: 6vh;
    }

    .chat-log {
        height: 58vh;
    }

    #chat-form {
        flex-direction: column;
    }

    #chat-form button {
        width: 100%;
    }
}