.room-page {
    margin: 0 10px;
    text-align: center;
    margin-bottom: 70px;
}

.room-countdown-cell {
    width: 200px;
    max-width: 100%;
}

.room-tool-label {
    font-size: 10px;
    margin-top: 2px;
}

.attendance-1 {
    padding: 8px 10px 5px;
    border: none;
    border-radius: 13px;
    background: #c27ce7;
    width: 37px;
}

.attendance-2 {
    color: #fff;
    font-weight: 600;
}

.swap-selected {
    outline: 2px dashed #ff5722;
}

.swapped {
    border: 2px dotted red;
}

#message-input-container {
    position: fixed;
    inset-inline-start: 0;
    inset-block-end: 0;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px env(safe-area-inset-right) calc(8px + env(safe-area-inset-bottom)) env(safe-area-inset-left);
    background: #fff;
    box-shadow: 0 -1px 5px rgba(0, 0, 0, .1);
    z-index: 1000;
}

#image-upload-btn {
    border: none;
    background: transparent;
    cursor: pointer;
}

#image-input {
    display: none;
}

#image-preview {
    display: flex;
    align-items: center;
    margin-left: 0;
}

#image-preview img {
    max-height: 60px;
    border-radius: 4px;
    margin-right: 8px;
}

#message-input {
    flex: 1;
    padding: 8px 12px;
    margin: 0 5px 0 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    resize: none;
    height: auto;
    min-height: 34px;
    max-height: 200px;
    overflow-y: hidden;
}

#send-btn {
    border: none;
    background: #fff;
    cursor: pointer;
    margin-top: 5px;
}

.chat-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 4px;
}

.avatar-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: -14px;
    position: relative;
    z-index: 1;
}

.avatar-wrap .uname {
    font-size: 11px;
    color: #444;
}

.avatar-wrap img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 5px solid #fff;
}

.chat-row.other .uname {
    color: #888;
}

.chat-row.other .avatar-wrap {
    margin-bottom: -10px;
    margin-left: 0;
}

.chat-row.other .chat-bubble {
    background: #f0f0f0;
    align-self: flex-start;
    text-align: left;
}

.chat-row.me {
    align-items: flex-end;
}

.chat-row.me .uname {
    color: #9c27b0;
}

.chat-row.me .avatar-wrap {
    flex-direction: row-reverse;
    margin-bottom: -10px;
    margin-right: 0;
}

.chat-row.me .chat-bubble {
    background: #e6d9ff;
    align-self: flex-end;
    text-align: left;
}

.chat-bubble {
    position: relative;
    display: inline-block;
    max-width: 70%;
    padding: 10px 20px;
    border-radius: 20px;
    word-break: break-word;
    font-size: 12px;
    line-height: 1.5;
    -webkit-user-select: none;
    user-select: none;
}

.chat-bubble img {
    max-width: 100%;
    border-radius: 8px;
    display: block;
}

.chat-bubble.destroyed {
    background: #111 !important;
    color: transparent !important;
    pointer-events: none;
}

.chat-bubble.destroyed.other::before {
    border-right-color: #111 !important;
}

.chat-bubble.destroyed.me::after {
    border-left-color: #111 !important;
}

.chat-image {
    display: block;
    max-width: 50%;
    border-radius: 20px;
    margin: 10px;
}

.term {
    font-size: 10px;
    position: absolute;
    top: -17px;
    background: #fff;
    width: 97%;
    text-align: left;
}

#image-loading {
    display: none;
    position: fixed;
    inset: 0;
    backdrop-filter: blur(4px);
    background: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
