.chat-shell,
.chat-modal {
    color: #222;
    font-family: "Noto Sans KR", "Noto Sans CJK KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

html.chat-popup-page,
body.chat-popup-body {
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #fff;
    overscroll-behavior: none;
}

.chat-popup-body .chat-shell {
    box-sizing: border-box;
    display: flex;
    width: 100%;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    min-height: 0;
    max-width: none;
    max-height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body.chat-popup-body .chat-app {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    max-height: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

body.chat-popup-body .chat-room-header,
body.chat-popup-body .chat-ban-notice,
body.chat-popup-body .chat-access-block-notice,
body.chat-popup-body .chat-freeze-notice,
body.chat-popup-body .chat-slow-mode-notice,
body.chat-popup-body .chat-notice,
body.chat-popup-body .chat-announcements,
body.chat-popup-body .chat-composer,
body.chat-popup-body .chat-noscript {
    flex: 0 0 auto;
}

body.chat-popup-body .chat-log-wrap {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

html.chat-popup-page.is-chat-viewport-managed,
body.chat-popup-body.is-chat-viewport-managed {
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #fff;
    overscroll-behavior: none;
}

body.chat-popup-body.is-chat-viewport-managed {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

body.chat-popup-body.is-chat-viewport-managed .chat-shell {
    position: absolute;
    top: var(--chat-visual-viewport-top, 0px);
    left: var(--chat-visual-viewport-left, 0px);
    box-sizing: border-box;
    display: flex;
    width: 100%;
    width: var(--chat-visual-viewport-width, 100vw);
    height: 100vh;
    height: var(--chat-visual-viewport-height, 100dvh);
    min-height: 0;
    max-height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body.chat-popup-body.is-chat-viewport-managed .chat-app {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    max-height: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

body.chat-popup-body.is-chat-viewport-managed .chat-room-header,
body.chat-popup-body.is-chat-viewport-managed .chat-ban-notice,
body.chat-popup-body.is-chat-viewport-managed .chat-access-block-notice,
body.chat-popup-body.is-chat-viewport-managed .chat-freeze-notice,
body.chat-popup-body.is-chat-viewport-managed .chat-slow-mode-notice,
body.chat-popup-body.is-chat-viewport-managed .chat-notice,
body.chat-popup-body.is-chat-viewport-managed .chat-announcements,
body.chat-popup-body.is-chat-viewport-managed .chat-composer,
body.chat-popup-body.is-chat-viewport-managed .chat-noscript {
    flex: 0 0 auto;
}

body.chat-popup-body.is-chat-viewport-managed .chat-log-wrap {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

body.chat-popup-body.is-chat-viewport-managed .chat-announcements {
    max-height: 96px;
    overflow-y: auto;
    overscroll-behavior-y: contain;
}

body.chat-popup-body.is-chat-viewport-managed.is-chat-keyboard-open .chat-composer-toolbar {
    display: none;
}

body.chat-popup-body.is-chat-viewport-managed.is-chat-keyboard-open .chat-room-header {
    min-height: 48px;
    padding-top: 2px;
    padding-bottom: 2px;
}

body.chat-popup-body.is-chat-viewport-managed.is-chat-keyboard-open .chat-header-actions {
    top: 2px;
}

body.chat-popup-body.is-chat-viewport-managed.is-chat-keyboard-open .chat-composer {
    padding: 4px;
}

body.chat-popup-body.is-chat-viewport-managed.is-chat-keyboard-open .chat-log-wrap {
    min-height: 72px;
}

body.chat-popup-body.is-chat-viewport-managed.is-chat-keyboard-open .chat-announcements {
    max-height: 48px;
}

.chat-shell {
    width: auto;
    max-width: 900px;
    margin: 18px auto 36px;
    padding: 0 12px;
}

.chat-shell * {
    box-sizing: border-box;
}

.chat-directory-header {
    position: relative;
    min-height: 44px;
    margin-bottom: 12px;
    padding-right: 52px;
}

.chat-directory-header h1,
.chat-room-header h1 {
    margin: 0;
    color: #222;
    font-size: 22px;
    line-height: 1.35;
}

.chat-directory-intro,
.chat-room-header p {
    margin: 3px 0 0;
    color: #777;
    font-size: 12px;
    line-height: 1.45;
}

.chat-directory-management {
    position: absolute;
    z-index: 70;
    top: 0;
    right: 0;
}

.chat-directory-management > summary {
    list-style: none;
}

.chat-directory-management > summary::-webkit-details-marker {
    display: none;
}

.chat-directory-management-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #fff;
    color: #222;
    box-shadow: none;
    cursor: pointer;
}

.chat-directory-management-toggle:hover,
.chat-directory-management[open] .chat-directory-management-toggle {
    border-color: #1769e0;
    background: #fff;
    color: #1769e0;
}

.chat-directory-management-icon {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-size: 20px;
    line-height: 1;
}

.chat-directory-management-panel {
    position: absolute;
    top: 52px;
    right: 0;
    width: 620px;
    max-width: calc(100vw - 36px);
    max-height: calc(100vh - 100px);
    overflow: auto;
    padding: 16px;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #fff;
    box-shadow: none;
}

.chat-directory-management-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.chat-directory-management-heading h2 {
    margin: 0;
    color: #222;
    font-size: 18px;
    line-height: 1.35;
}

.chat-directory-management-link {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 6px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid #b2ccff;
    border-radius: 2px;
    background: #eff4ff;
    color: #175cd3;
    font-size: 12px;
    font-weight: bold;
    text-decoration: none;
}

.chat-directory-management-link:hover {
    border-color: #84adff;
    background: #dbeafe;
}

.chat-directory-management-note {
    margin: 18px 0 0;
    padding: 13px 14px;
    border-radius: 2px;
    background: #f3f4f6;
    color: #777;
    font-size: 13px;
    line-height: 1.6;
}

.chat-room-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin: 0;
    padding: 0;
    border: 1px solid #d9dde3;
    background: #fff;
    list-style: none;
}

.chat-room-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 22px 0 0;
}

.chat-room-pagination a,
.chat-room-pagination span,
.chat-room-pagination strong {
    min-width: 66px;
    padding: 9px 12px;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #fff;
    color: #222;
    font-size: 13px;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
}

.chat-room-pagination a:hover,
.chat-room-pagination a:focus {
    border-color: #84adff;
    color: #175cd3;
}

.chat-room-pagination strong {
    border-color: transparent;
    background: #eff4ff;
    color: #175cd3;
}

.chat-room-pagination .is-disabled {
    color: #777;
    background: #f3f4f6;
}

.chat-room-card {
    margin: 0;
    padding: 0;
    border: 0;
    border-bottom: 1px solid #d9dde3;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.chat-room-card:hover {
    border-color: #d9dde3;
    background: #f3f4f6;
    box-shadow: none;
}

.chat-room-card:last-child {
    border-bottom: 0;
}

.chat-room-card a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 66px;
    padding: 11px 14px;
    color: inherit;
    text-decoration: none;
}

.chat-room-card-main {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
}

.chat-room-card-side {
    display: flex;
    align-items: flex-end;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 3px;
    min-width: 52px;
    text-align: right;
}

.chat-room-card-count {
    color: #222;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
}

.chat-room-card a:focus,
.chat-header-directory-link:focus,
.chat-directory-management-toggle:focus,
.chat-directory-management-link:focus,
.chat-toolbar-admin-link:focus,
.chat-freeze-toggle:focus,
.chat-slow-mode-toggle:focus,
.chat-slow-mode-form input:focus,
.chat-message-action:focus,
.chat-composer textarea:focus,
.chat-composer button:focus,
.chat-modal button:focus,
.chat-modal select:focus,
.chat-modal textarea:focus {
    outline: 3px solid #175cd3;
    outline-offset: 2px;
}

.chat-room-card-title {
    display: block;
    color: #222;
    overflow: hidden;
    font-size: 15px;
    font-weight: bold;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-room-card-description {
    display: block;
    min-height: 0;
    margin-top: 3px;
    overflow: hidden;
    color: #777;
    font-size: 12px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-room-card-action {
    display: block;
    margin-top: 0;
    color: #1769e0;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
}

.chat-room-directory .chat-directory-notice {
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid #abefc6;
    border-radius: 2px;
    background: #ecfdf3;
    color: #05603a;
    font-size: 14px;
    line-height: 1.6;
}

.chat-room-directory .chat-directory-notice a {
    margin-left: 8px;
    color: #175cd3;
    font-weight: bold;
}

.chat-room-directory .chat-room-create {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #f3f4f6;
    box-shadow: none;
}

.chat-room-directory .chat-room-create-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.chat-room-directory .chat-room-create-heading h2 {
    margin: 0;
    color: #222;
    font-size: 21px;
    line-height: 1.4;
}

.chat-room-directory .chat-room-create-policy {
    display: inline-flex;
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 2px;
    background: #eff8ff;
    color: #175cd3;
    font-size: 12px;
    font-weight: bold;
}

.chat-room-directory .chat-room-create-help {
    margin: 10px 0 20px;
    color: #777;
    font-size: 13px;
    line-height: 1.7;
}

.chat-room-directory .chat-room-create-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: 16px;
}

.chat-room-directory .chat-room-create-field label,
.chat-room-directory .chat-room-create-field small {
    display: block;
}

.chat-room-directory .chat-room-create-field label {
    margin-bottom: 7px;
    color: #222;
    font-size: 13px;
    font-weight: bold;
}

.chat-room-directory .chat-room-create-field input,
.chat-room-directory .chat-room-create-field textarea {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #fff;
    color: #222;
    font: inherit;
    font-size: 14px;
    line-height: 1.5;
}

.chat-room-directory .chat-room-create-field input {
    min-height: 44px;
}

.chat-room-directory .chat-room-create-field textarea {
    min-height: 100px;
    resize: vertical;
}

.chat-room-directory .chat-room-create-field input:focus,
.chat-room-directory .chat-room-create-field textarea:focus,
.chat-room-directory .chat-room-create-actions button:focus,
.chat-room-directory .chat-directory-notice a:focus {
    outline: 3px solid #175cd3;
    outline-offset: 2px;
}

.chat-room-directory .chat-room-create-field small {
    margin-top: 6px;
    color: #777;
    font-size: 11px;
    line-height: 1.5;
}

.chat-room-directory .chat-room-create-actions {
    display: flex;
    justify-content: flex-end;
    grid-column: 1 / -1;
}

.chat-room-directory .chat-room-create-actions button {
    min-height: 44px;
    padding: 10px 18px;
    border: 0;
    border-radius: 2px;
    background: #1769e0;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: bold;
}

.chat-room-directory .chat-room-create-actions button:hover {
    background: #0f57c4;
}

.chat-room-directory .chat-room-create-restricted {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
    padding: 14px 16px;
    border: 1px dashed #d9dde3;
    border-radius: 2px;
    background: #f3f4f6;
    color: #777;
    font-size: 13px;
}

.chat-room-directory .chat-room-create-restricted span {
    color: #175cd3;
    font-weight: bold;
}

.chat-empty-card {
    padding: 44px 20px;
    border: 1px dashed #d9dde3;
    border-radius: 2px;
    background: #f3f4f6;
    color: #777;
    text-align: center;
}

.chat-app {
    overflow: hidden;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #fff;
    box-shadow: none;
}

.chat-room-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    padding: 7px 112px 7px 14px;
    border-bottom: 1px solid #d9dde3;
    background: #fff;
}

.chat-room-heading {
    width: 100%;
    min-width: 0;
}

.chat-room-header p {
    display: none;
}

.chat-room-header h1 {
    margin-top: 0;
    font-size: 17px;
}

.chat-room-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
    margin-top: 0;
}

.chat-room-title-row h1 {
    flex: 0 1 auto;
    min-width: 0;
    margin-top: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-presence {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-height: 22px;
    margin: 0;
    padding: 3px 6px;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #fff;
    color: #777;
    cursor: pointer;
    font-family: inherit;
    font-size: 10px;
    font-weight: bold;
    line-height: 1.2;
    white-space: nowrap;
}

.chat-presence:hover,
.chat-presence:focus,
.chat-presence[aria-expanded="true"] {
    border-color: #84adff;
    color: #1769e0;
}

.chat-presence:focus {
    outline: 3px solid #175cd3;
    outline-offset: 2px;
}

.chat-presence.is-stale {
    border-color: #d9dde3;
    background: #f3f4f6;
    color: #777;
}

.chat-connection {
    display: none;
    align-items: center;
    flex: 0 0 auto;
    margin-left: 0;
    padding: 7px 11px;
    border-radius: 2px;
    background: #f3f4f6;
    color: #777;
    font-size: 12px;
}

.chat-notification-toggle {
    padding: 6px 10px;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #fff;
    color: #777;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: bold;
}

.chat-notification-toggle:hover,
.chat-notification-toggle:focus {
    border-color: #84adff;
    color: #175cd3;
}

.chat-notification-toggle.is-on {
    border-color: #86d5a8;
    background: #ecfdf3;
    color: #067647;
}

.chat-notification-toggle:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.chat-header-actions {
    position: absolute;
    top: 6px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-header-directory-link,
.chat-header-settings-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #fff;
    color: #222;
    cursor: pointer;
    box-shadow: none;
    text-decoration: none;
}

.chat-header-directory-link:hover,
.chat-header-directory-link:focus,
.chat-header-settings-toggle:hover,
.chat-header-settings-toggle:focus {
    border-color: #1769e0;
    background: #fff;
    color: #1769e0;
}

.chat-header-directory-icon,
.chat-header-settings-icon {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-size: 20px;
    line-height: 1;
}

.chat-freeze-toggle {
    padding: 6px 10px;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #fff;
    color: #777;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: bold;
}

.chat-freeze-toggle:hover,
.chat-freeze-toggle:focus {
    border-color: #1769e0;
    background: #fff;
    color: #1769e0;
}

.chat-freeze-toggle.is-frozen {
    border-color: #1769e0;
    background: #1769e0;
    color: #fff;
}

.chat-freeze-toggle.is-frozen:hover,
.chat-freeze-toggle.is-frozen:focus {
    border-color: #0f57c4;
    background: #0f57c4;
}

.chat-freeze-toggle:disabled {
    cursor: wait;
    opacity: 0.65;
}

.chat-slow-mode-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 11px;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #fff;
    color: #777;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: bold;
}

.chat-slow-mode-toggle:hover,
.chat-slow-mode-toggle:focus {
    border-color: #1769e0;
    background: #fff;
    color: #1769e0;
}

.chat-slow-mode-toggle.is-active {
    border-color: #1769e0;
    background: #1769e0;
    color: #fff;
}

.chat-slow-mode-toggle.is-active:hover,
.chat-slow-mode-toggle.is-active:focus {
    border-color: #0f57c4;
    background: #0f57c4;
}

.chat-slow-mode-toggle:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.chat-connection-dot {
    width: 7px;
    height: 7px;
    margin-right: 6px;
    border-radius: 2px;
    background: #777;
}

.chat-connection.is-connected {
    display: none;
    background: #ecfdf3;
    color: #027a48;
}

.chat-connection.is-connected .chat-connection-dot {
    background: #12b76a;
}

.chat-connection.is-disconnected {
    display: inline-flex;
    background: #fef3f2;
    color: #b42318;
}

.chat-connection.is-disconnected .chat-connection-dot {
    background: #f04438;
}

.chat-ban-notice,
.chat-freeze-notice,
.chat-slow-mode-notice,
.chat-access-block-notice,
.chat-notice {
    margin: 14px 18px 0;
    padding: 11px 14px;
    border-radius: 2px;
    font-size: 13px;
    line-height: 1.5;
}

.chat-ban-notice,
.chat-notice.is-error {
    border: 1px solid #fecdca;
    background: #fef3f2;
    color: #b42318;
}

.chat-freeze-notice {
    border: 1px solid #b2ddff;
    background: #eff8ff;
    color: #175cd3;
    font-weight: bold;
}

.chat-freeze-notice.is-manager {
    border-color: #a6f4c5;
    background: #ecfdf3;
    color: #067647;
}

.chat-slow-mode-notice {
    border: 1px solid #d6bbfb;
    background: #f9f5ff;
    color: #6941c6;
    font-weight: bold;
}

.chat-slow-mode-notice.is-manager {
    border-color: #a6f4c5;
    background: #ecfdf3;
    color: #067647;
}

.chat-access-block-notice {
    border: 1px solid #bae6fd;
    background: #eff8ff;
    color: #075985;
    font-weight: bold;
}

.chat-notice.is-success {
    border: 1px solid #abefc6;
    background: #ecfdf3;
    color: #067647;
}

.chat-notice.is-info {
    border: 1px solid #b2ddff;
    background: #eff8ff;
    color: #175cd3;
}

.chat-notice.is-terminal strong {
    display: block;
    margin-bottom: 3px;
}

.chat-notice.is-terminal .chat-terminal-room-link {
    display: inline-block;
    margin-top: 7px;
    padding: 6px 10px;
    border: 1px solid #fda29b;
    border-radius: 2px;
    background: #fff;
    color: #912018;
    font-weight: bold;
    text-decoration: none;
}

.chat-notice.is-terminal .chat-terminal-room-link:hover,
.chat-notice.is-terminal .chat-terminal-room-link:focus {
    border-color: #d92d20;
    outline: 3px solid rgba(217, 45, 32, 0.16);
    outline-offset: 2px;
}

.chat-announcements {
    margin: 14px 18px 0;
}

.chat-announcement {
    position: relative;
    margin-top: 9px;
    padding: 13px 15px;
    border: 1px solid #b9e6fe;
    border-left-width: 5px;
    border-radius: 2px;
    background: #eff8ff;
    color: #075985;
}

.chat-announcement:first-child {
    margin-top: 0;
}

.chat-announcement-label {
    display: inline-block;
    margin-right: 7px;
    padding: 2px 7px;
    border-radius: 2px;
    background: #0ea5e9;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
}

.chat-announcement-title {
    color: #075985;
    font-size: 13px;
}

.chat-announcement-content {
    margin: 7px 0 0;
    color: #0c4a6e;
    font-size: 13px;
    font-weight: bold;
    line-height: 1.55;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-announcement-meta {
    display: block;
    margin-top: 6px;
    color: #0369a1;
    font-size: 10px;
}

.chat-announcement.is-color-red .chat-announcement-title,
.chat-announcement.is-color-red .chat-announcement-content,
.chat-admin-message.is-color-red .chat-admin-nickname,
.chat-admin-message.is-color-red .chat-admin-message-content {
    color: #b42318;
}

.chat-announcement.is-color-sky .chat-announcement-title,
.chat-announcement.is-color-sky .chat-announcement-content,
.chat-admin-message.is-color-sky .chat-admin-nickname,
.chat-admin-message.is-color-sky .chat-admin-message-content {
    color: #026aa2;
}

.chat-announcement.is-color-blue .chat-announcement-title,
.chat-announcement.is-color-blue .chat-announcement-content,
.chat-admin-message.is-color-blue .chat-admin-nickname,
.chat-admin-message.is-color-blue .chat-admin-message-content {
    color: #175cd3;
}

.chat-announcement.is-color-green .chat-announcement-title,
.chat-announcement.is-color-green .chat-announcement-content,
.chat-admin-message.is-color-green .chat-admin-nickname,
.chat-admin-message.is-color-green .chat-admin-message-content {
    color: #067647;
}

.chat-announcement.is-color-purple .chat-announcement-title,
.chat-announcement.is-color-purple .chat-announcement-content,
.chat-admin-message.is-color-purple .chat-admin-nickname,
.chat-admin-message.is-color-purple .chat-admin-message-content {
    color: #6941c6;
}

.chat-announcement.is-color-black .chat-announcement-title,
.chat-announcement.is-color-black .chat-announcement-content,
.chat-admin-message.is-color-black .chat-admin-nickname,
.chat-admin-message.is-color-black .chat-admin-message-content {
    color: #222;
}

.chat-log-wrap {
    position: relative;
    height: 500px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px 12px;
    background: #fff;
}

.chat-messages {
    margin: 0;
    padding: 0;
    list-style: none;
}

.chat-message {
    max-width: 100%;
    margin: 0 0 16px;
}

.chat-message.is-own {
    margin-left: auto;
}

.chat-admin-message {
    max-width: 94%;
    margin-right: auto;
    margin-left: auto;
}

.chat-admin-message-meta {
    align-items: center;
    color: #777;
}

.chat-admin-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 2px;
    background: #b42318;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
}

.chat-admin-message.is-auto-notice .chat-admin-badge {
    background: #1769e0;
}

.chat-admin-nickname {
    font-size: 12px;
}

.chat-admin-message-bubble {
    border: 1px solid #b9e6fe;
    border-left: 5px solid #b42318;
    border-radius: 2px;
    background: #eff8ff;
    box-shadow: none;
}

.chat-admin-message-content {
    font-weight: bold;
}

.chat-announcement-image-link {
    display: inline-block;
    max-width: 100%;
    margin-top: 8px;
}

.chat-announcement-image {
    display: block;
    width: auto;
    max-width: min(100%, 520px);
    max-height: 320px;
    border: 1px solid #d9dde3;
    object-fit: contain;
}

.chat-announcement-link {
    display: block;
    width: max-content;
    max-width: 100%;
    margin-top: 7px;
    color: #1769e0;
    font-size: 11px;
    font-weight: bold;
    overflow-wrap: anywhere;
}

/* The two supported Gnuboard renderers use equivalent legacy class names. */
.chat-auto-notice-media {
    display: inline-block;
    max-width: 100%;
    margin-top: 8px;
}

.chat-auto-notice-media img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 360px;
    border: 1px solid #b2ddff;
    object-fit: contain;
}

.chat-auto-notice-link {
    display: inline-block;
    margin-top: 7px;
    color: #1769e0;
    font-size: 12px;
    font-weight: bold;
    text-decoration: underline;
}

.chat-admin-message.is-color-sky .chat-admin-message-bubble {
    border-left-color: #026aa2;
}

.chat-admin-message.is-auto-notice,
.chat-admin-message.is-auto-notice .chat-admin-message-bubble {
    background: #eff8ff;
}

.chat-admin-message.is-color-blue .chat-admin-message-bubble {
    border-left-color: #175cd3;
}

.chat-admin-message.is-color-green .chat-admin-message-bubble {
    border-left-color: #067647;
}

.chat-admin-message.is-color-purple .chat-admin-message-bubble {
    border-left-color: #6941c6;
}

.chat-admin-message.is-color-black .chat-admin-message-bubble {
    border-left-color: #222;
}

.chat-message-meta {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin: 0 4px 5px;
    color: #777;
    font-size: 11px;
}

.chat-message.is-own .chat-message-meta {
    justify-content: flex-end;
}

.chat-message-nick {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #222;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: bold;
}

.chat-message-nick:hover,
.chat-message-nick:focus {
    color: #175cd3;
    text-decoration: underline;
}

.chat-message.is-own .chat-message-nick,
.chat-message.is-own .chat-message-nick:hover {
    color: #222;
    cursor: default;
    text-decoration: none;
}

.chat-message-bubble {
    position: relative;
    padding: 11px 13px;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #fff;
    box-shadow: none;
}

.chat-message.is-own .chat-message-bubble {
    border-color: #84adff;
    border-radius: 2px;
    background: #eff4ff;
}

.chat-message.is-mentioned .chat-message-bubble {
    border-color: #38bdf8;
    background: #eff8ff;
    box-shadow: none;
}

.chat-message.is-whisper .chat-message-bubble {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.chat-message.is-whisper.is-own .chat-message-bubble {
    border: 0;
    background: transparent;
}

.chat-whisper-badge {
    display: inline;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #6941c6;
    font-size: 10px;
    font-weight: bold;
    line-height: 1.2;
    white-space: nowrap;
}

.chat-message-content {
    margin: 0;
    color: #222;
    font-size: 14px;
    line-height: 1.6;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-message.is-deleted {
    max-width: 100%;
}

.chat-message.is-deleted .chat-message-bubble {
    border-style: dashed;
    background: #f3f4f6;
    box-shadow: none;
}

.chat-message.is-deleted .chat-message-content {
    color: #777;
    font-size: 12px;
    font-style: italic;
}

.chat-message-actions {
    display: flex;
    gap: 6px;
    margin-top: 7px;
}

.chat-message.is-own .chat-message-actions {
    justify-content: flex-end;
}

.chat-message-actions button {
    padding: 3px 7px;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #fff;
    color: #777;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
}

.chat-message-actions button:hover {
    border-color: #fda29b;
    color: #b42318;
}

.chat-message-actions button:disabled {
    cursor: wait;
    opacity: 0.55;
}

.chat-message-action.is-report {
    border-color: #b2ccff;
    background: #eff4ff;
    color: #1849a9;
}

.chat-message-action.is-report:hover,
.chat-message-action.is-report:focus {
    border-color: #84adff;
    background: #d1e0ff;
    color: #175cd3;
}

.chat-message-action.is-reported,
.chat-message-action.is-reported:hover,
.chat-message-action.is-reported:focus {
    border-color: #abefc6;
    background: #ecfdf3;
    color: #067647;
    cursor: default;
    opacity: 1;
}

/* Flat transcript rows: nickname : message, without speech bubbles. */
.chat-message,
.chat-message.is-own,
.chat-admin-message {
    position: relative;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 3px;
    max-width: 100%;
    margin: 0;
    padding: 5px 2px;
    border-bottom: 0;
    border-left: 2px solid transparent;
}

.chat-message.is-own {
    margin-left: 0;
}

.chat-message-meta,
.chat-message.is-own .chat-message-meta,
.chat-admin-message-meta {
    display: inline-flex;
    align-items: baseline;
    flex: 0 0 auto;
    justify-content: flex-start;
    gap: 5px;
    margin: 0;
}

.chat-message-separator {
    color: #777;
    font-weight: bold;
}

.chat-author-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    overflow: hidden;
    vertical-align: -3px;
}

.chat-author-icon.is-text {
    width: auto;
    min-width: 18px;
    overflow: visible;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Noto Sans KR", sans-serif;
    font-size: 15px;
    font-weight: normal;
    line-height: 18px;
    white-space: nowrap;
}

img.chat-author-icon.is-image {
    border: 0;
    border-radius: 2px;
    object-fit: contain;
}

.chat-message-bubble,
.chat-message.is-own .chat-message-bubble,
.chat-message.is-mentioned .chat-message-bubble,
.chat-message.is-whisper .chat-message-bubble,
.chat-message.is-whisper.is-own .chat-message-bubble,
.chat-message.is-deleted .chat-message-bubble,
.chat-admin-message-bubble {
    position: static;
    flex: 0 1 auto;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.chat-message-content {
    display: inline;
    line-height: 1.5;
}

.chat-message-content.is-admin-emphasized {
    font-weight: 700;
}

.chat-message.is-emoji-only .chat-message-content {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-size: 28px;
    line-height: 1.35;
}

.chat-message-time {
    flex: 0 0 auto;
    margin-left: 4px;
    color: #777;
    font-size: 10px;
    white-space: nowrap;
}

.chat-message-actions,
.chat-message.is-own .chat-message-actions {
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: flex-start;
    margin: 0 0 0 6px;
}

.chat-message-actions.chat-member-menu,
.chat-message.is-own .chat-message-actions.chat-member-menu {
    position: absolute;
    z-index: 80;
    top: calc(100% - 2px);
    left: 6px;
    display: none;
    width: 190px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    margin: 0;
    padding: 5px;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #fff;
    box-shadow: none;
}

.chat-message-actions.chat-member-menu.is-open,
.chat-message.is-own .chat-message-actions.chat-member-menu.is-open {
    display: flex;
    align-items: stretch;
    flex-direction: column;
    gap: 2px;
}

.chat-message-actions.chat-member-menu.is-above {
    top: auto;
    bottom: calc(100% - 2px);
}

.chat-message-actions.chat-member-menu .chat-message-action {
    width: 100%;
    min-height: 34px;
    padding: 7px 9px;
    border: 0;
    border-radius: 2px;
    background: #fff;
    color: #222;
    text-align: left;
}

.chat-message-actions.chat-member-menu .chat-message-action:hover,
.chat-message-actions.chat-member-menu .chat-message-action:focus {
    border: 0;
    outline: 2px solid #175cd3;
    outline-offset: -2px;
    background: #eff6ff;
    color: #175cd3;
}

.chat-message-actions.chat-member-menu .chat-message-action:disabled {
    outline: 0;
    background: #f3f4f6;
    color: #777;
    cursor: not-allowed;
}

.chat-message-actions.chat-member-menu .chat-message-action.is-report,
.chat-message-actions.chat-member-menu .chat-message-action.is-reported {
    border: 0;
    background: #fff;
    color: #222;
}

.chat-message-actions.chat-member-menu .chat-message-action.is-reported {
    background: #ecfdf3;
    color: #067647;
}

.chat-message.is-own button.chat-message-nick,
.chat-message.is-own button.chat-message-nick:hover,
.chat-message.is-own button.chat-message-nick:focus {
    color: #222;
    cursor: pointer;
    text-decoration: underline;
}

.chat-message.is-mentioned {
    border-left-color: #38bdf8;
    background: #eff8ff;
}

.chat-message.is-whisper,
.chat-message.is-whisper.is-own {
    border-left-color: transparent;
    background: transparent;
}

.chat-message.is-deleted {
    background: #f3f4f6;
}

.chat-admin-message {
    border-left-color: #b42318;
    background: #eff8ff;
}

.chat-admin-message.is-color-sky {
    border-left-color: #026aa2;
}

.chat-admin-message.is-color-blue {
    border-left-color: #175cd3;
}

.chat-admin-message.is-color-green {
    border-left-color: #067647;
}

.chat-admin-message.is-color-purple {
    border-left-color: #6941c6;
}

.chat-admin-message.is-color-black {
    border-left-color: #222;
}

.chat-empty-state {
    position: absolute;
    top: 50%;
    right: 20px;
    left: 20px;
    margin-top: -35px;
    color: #777;
    text-align: center;
}

.chat-empty-state p {
    margin: 0 0 6px;
    color: #777;
    font-size: 14px;
    font-weight: bold;
}

.chat-empty-state span {
    font-size: 12px;
}

.chat-composer {
    padding: 8px 10px 9px;
    border-top: 1px solid #d9dde3;
    background: #fff;
}

.chat-composer.is-room-terminated {
    background: #f3f4f6;
}

.chat-composer-main {
    display: flex;
    align-items: stretch;
    gap: 6px;
}

.chat-composer textarea {
    display: block;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    min-height: 46px;
    max-height: 96px;
    resize: none;
    padding: 6px 9px;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    color: #222;
    font: inherit;
    font-size: 14px;
    line-height: 1.3;
}

.chat-send-main {
    flex: 0 0 72px;
    min-width: 72px;
    min-height: 46px;
    padding: 7px 10px;
    border: 0;
    border-radius: 2px;
    background: #1769e0;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: bold;
}

.chat-send-main:hover,
.chat-send-main:focus {
    background: #0f57c4;
}

.chat-composer.is-announcement-mode .chat-send-main {
    background: #b42318;
}

.chat-composer.is-announcement-mode .chat-send-main:hover,
.chat-composer.is-announcement-mode .chat-send-main:focus {
    background: #912018;
}

.chat-send-main:disabled {
    background: #777;
    cursor: not-allowed;
}

.chat-composer textarea:focus {
    border-color: #84adff;
}

.chat-composer textarea:disabled {
    background: #f3f4f6;
    color: #777;
    cursor: not-allowed;
}

.chat-composer-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: flex-start;
    min-height: 32px;
    margin-top: 6px;
}

.chat-toolbar-utility {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 0;
    margin-left: 2px;
    padding-left: 6px;
    border-left: 1px solid #d9dde3;
}

.chat-toolbar-admin-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #fff;
    color: #222;
    cursor: pointer;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-size: 17px;
    line-height: 1;
    text-decoration: none;
}

.chat-toolbar-admin-link:hover,
.chat-toolbar-admin-link:focus {
    border-color: #1769e0;
    background: #fff;
    color: #1769e0;
}

.chat-toolbar-utility .chat-freeze-toggle {
    height: 32px;
    min-height: 32px;
}

.chat-toolbar-utility .chat-slow-mode-toggle {
    min-height: 32px;
}

.chat-toolbar-moderation-compose {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 7px;
    min-width: 0;
}

.chat-composer-toolbar > .chat-connection.is-disconnected {
    min-height: 32px;
}

.chat-whisper-status {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 32px;
    padding: 5px 7px 5px 10px;
    border: 1px solid #d6bbfb;
    border-radius: 2px;
    background: #f9f5ff;
    color: #6941c6;
    font-size: 12px;
    font-weight: bold;
    line-height: 1.35;
}

.chat-whisper-clear {
    min-height: 24px;
    padding: 2px 7px;
    border: 1px solid #bdb4fe;
    border-radius: 2px;
    background: #fff;
    color: #53389e;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: bold;
}

.chat-whisper-clear:hover,
.chat-whisper-clear:focus {
    border-color: #7f56d9;
    background: #f4ebff;
    color: #42307d;
}

.chat-whisper-clear:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.chat-emoji-control {
    position: relative;
}

.chat-emoji-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 4px;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #fff;
    color: #222;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: bold;
}

.chat-emoji-toggle span {
    margin-right: 0;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-size: 17px;
    vertical-align: -1px;
}

.chat-emoji-toggle:hover,
.chat-emoji-toggle:focus {
    border-color: #1769e0;
    background: #fff;
    color: #1769e0;
}

.chat-emoji-toggle:disabled {
    border-color: #d9dde3;
    background: #f3f4f6;
    color: #777;
    cursor: not-allowed;
}

.chat-gomoku-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 32px;
    min-height: 32px;
    padding: 4px 9px;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #fff;
    color: #777;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: bold;
}

.chat-gomoku-toggle:hover,
.chat-gomoku-toggle:focus,
.chat-gomoku-toggle.has-active-game {
    border-color: #1769e0;
    background: #fff;
    color: #1769e0;
}

.chat-gomoku-toggle:disabled {
    border-color: #d9dde3;
    background: #f3f4f6;
    color: #777;
    cursor: not-allowed;
}

.chat-gomoku-toolbar-status {
    color: #0c4a6e;
    font-size: 11px;
    font-weight: bold;
}

.chat-emoji-picker {
    position: absolute;
    z-index: 40;
    bottom: 39px;
    left: 0;
    width: 340px;
    max-width: calc(100vw - 36px);
    padding: 12px;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #fff;
    box-shadow: none;
}

.chat-emoji-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 9px;
    color: #222;
    font-size: 13px;
}

.chat-emoji-close {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 2px;
    background: transparent;
    color: #777;
    cursor: pointer;
    font-size: 21px;
    line-height: 30px;
}

.chat-emoji-close:hover,
.chat-emoji-close:focus {
    background: #f3f4f6;
    color: #222;
}

.chat-emoji-search-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.chat-emoji-search {
    display: block;
    width: 100%;
    min-height: 36px;
    margin-bottom: 9px;
    padding: 7px 9px;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #fff;
    color: #222;
    font: inherit;
    font-size: 12px;
}

.chat-emoji-search:focus {
    border-color: #84adff;
    outline: 3px solid rgba(37, 99, 235, 0.15);
}

.chat-emoji-list {
    display: flex;
    align-content: flex-start;
    flex-wrap: wrap;
    gap: 4px;
    max-height: 238px;
    overflow-y: auto;
    padding: 2px;
}

.chat-emoji-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 2px;
    background: transparent;
    cursor: pointer;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-size: 25px;
    line-height: 1;
}

.chat-emoji-button:hover,
.chat-emoji-button:focus {
    border-color: #b2ccff;
    background: #eff6ff;
}

.chat-emoji-empty {
    margin: 8px 0 2px;
    padding: 20px 8px;
    color: #777;
    font-size: 12px;
    text-align: center;
}

.chat-composer.is-frozen-for-member {
    background: #f3f4f6;
}

.chat-composer.is-frozen-for-member textarea {
    border-color: #b2ddff;
    background: #eff8ff;
    color: #777;
}

.chat-composer.is-slow-mode-waiting {
    background: #fafaff;
}

.chat-composer.is-slow-mode-waiting textarea {
    border-color: #d6bbfb;
    background: #f9f5ff;
    color: #777;
}

.chat-composer.is-announcement-mode {
    background: #f0f9ff;
}

.chat-composer.is-announcement-mode textarea {
    border-color: #0ea5e9;
    box-shadow: none;
}

.chat-announcement-compose {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 0;
    margin: 0;
    padding: 0;
    color: #075985;
    font-size: 12px;
}

.chat-announcement-check {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 6px 10px;
    border: 1px solid #bae6fd;
    border-radius: 2px;
    background: #eff8ff;
    cursor: pointer;
    line-height: 1.25;
    white-space: nowrap;
}

.chat-announcement-check input {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 0 6px 0 0;
}

.chat-announcement-options {
    position: absolute;
    z-index: 100;
    right: 0;
    bottom: calc(100% + 8px);
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    box-sizing: border-box;
    width: 310px;
    max-width: calc(100vw - 32px);
    margin: 0;
    padding: 10px 43px 10px 11px;
    border: 1px solid #bae6fd;
    border-radius: 2px;
    background: #eff8ff;
    box-shadow: none;
}

.chat-announcement-options label {
    font-weight: bold;
}

.chat-announcement-options select {
    min-width: 88px;
    padding: 5px 7px;
    border: 1px solid #38bdf8;
    border-radius: 2px;
    background: #fff;
    color: #075985;
    font: inherit;
}

.chat-announcement-options-close {
    position: absolute;
    top: 6px;
    right: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 2px;
    background: transparent;
    color: #075985;
    cursor: pointer;
    font: inherit;
    font-size: 20px;
    line-height: 1;
}

.chat-announcement-options-close:hover,
.chat-announcement-options-close:focus {
    background: #dbeafe;
    color: #175cd3;
}

.chat-announcement-options-close:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.chat-announcement-style-option {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 3px 6px;
    border: 1px solid #bae6fd;
    border-radius: 2px;
    background: #fff;
    cursor: pointer;
    white-space: nowrap;
}

.chat-announcement-style-option input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.chat-announcement-options-help {
    flex: 1 1 100%;
    color: #026aa2;
    font-size: 11px;
}

.chat-admin-message-content.is-font-normal,
.chat-announcement-content.is-font-normal {
    font-weight: normal;
}

.chat-admin-message-content.is-text-underline,
.chat-announcement-content.is-text-underline {
    text-decoration: underline;
}

.chat-slow-mode-panel {
    max-width: 420px;
}

.chat-slow-mode-description {
    margin: -5px 0 12px;
    color: #777;
    font-size: 13px;
    line-height: 1.55;
}

.chat-slow-mode-current {
    margin: 0 0 15px;
    padding: 9px 11px;
    border: 1px solid #d6bbfb;
    border-radius: 2px;
    background: #f9f5ff;
    color: #53389e;
    font-size: 12px;
    line-height: 1.5;
}

.chat-slow-mode-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-slow-mode-form .chat-slow-mode-input-row input {
    display: block;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 9px 10px;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #fff;
    color: #222;
    font: inherit;
    font-size: 15px;
}

.chat-slow-mode-form .chat-slow-mode-input-row input[aria-invalid="true"] {
    border-color: #f04438;
    box-shadow: none;
}

.chat-slow-mode-input-row > span {
    flex: 0 0 auto;
    color: #222;
    font-size: 13px;
    font-weight: bold;
}

.chat-slow-mode-help {
    margin: 8px 0 0;
    color: #777;
    font-size: 11px;
    line-height: 1.5;
}

#chat-slow-mode-apply {
    min-width: 82px;
    padding: 9px 15px;
    border: 0;
    border-radius: 2px;
    background: #1769e0;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: bold;
}

#chat-slow-mode-apply:disabled {
    background: #777;
    cursor: not-allowed;
}

body.chat-slow-mode-open {
    overflow: hidden;
}

.chat-danger-button,
.chat-secondary-button {
    min-width: 82px;
    padding: 9px 15px;
    border: 0;
    border-radius: 2px;
    background: #1769e0;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: bold;
}

.chat-noscript {
    margin: 0;
    padding: 12px 18px;
    border-top: 1px solid #d9dde3;
    background: #eff8ff;
    color: #026aa2;
    font-size: 13px;
}

.chat-modal {
    position: fixed;
    z-index: 10000;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.chat-modal * {
    box-sizing: border-box;
}

.chat-user-settings-modal * {
    box-sizing: border-box;
}

.chat-gomoku-modal * {
    box-sizing: border-box;
}

#chat-gomoku-lobby-modal,
#chat-gomoku-stats-modal {
    z-index: 10010;
}

#chat-gomoku-game-modal {
    z-index: 10020;
}

#chat-gomoku-challenge-modal {
    z-index: 10030;
}

.chat-modal-backdrop {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(16, 24, 40, 0.62);
}

.chat-modal-panel {
    position: relative;
    width: 92%;
    max-width: 430px;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    margin: 12px auto 0;
    overflow-y: auto;
    padding: 18px;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #fff;
    box-shadow: none;
}

#chat-report-modal .chat-modal-panel {
    max-width: 480px;
}

#chat-report-modal * {
    box-sizing: border-box;
}

.chat-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.chat-modal-header h2 {
    margin: 0;
    color: #222;
    font-size: 17px;
}

.chat-icon-button {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 2px;
    background: #f3f4f6;
    color: #777;
    cursor: pointer;
    font-size: 21px;
    line-height: 30px;
}

.chat-ban-target {
    margin: 0 0 16px;
    color: #777;
    font-size: 13px;
    line-height: 1.5;
}

.chat-report-preview {
    max-height: 126px;
    overflow-y: auto;
    margin: 0 0 14px;
    padding: 11px 12px;
    border: 1px solid #d9dde3;
    border-left: 4px solid #84adff;
    border-radius: 2px;
    background: #f3f4f6;
    color: #222;
    font-size: 12px;
    line-height: 1.55;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-report-privacy {
    margin: 0 0 15px;
    padding: 9px 11px;
    border: 1px solid #bae6fd;
    border-radius: 2px;
    background: #eff8ff;
    color: #075985;
    font-size: 11px;
    line-height: 1.5;
}

#chat-report-modal .chat-report-form label {
    margin-top: 12px;
}

.chat-report-form select {
    min-height: 40px;
}

.chat-report-form textarea {
    min-height: 92px;
    line-height: 1.5;
}

.chat-modal label {
    display: block;
    margin: 13px 0 5px;
    color: #222;
    font-size: 12px;
    font-weight: bold;
}

.chat-modal select,
.chat-modal textarea {
    display: block;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #fff;
    color: #222;
    font: inherit;
    font-size: 13px;
}

.chat-modal textarea {
    resize: vertical;
}

.chat-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

.chat-gomoku-lobby-panel,
.chat-gomoku-stats-panel {
    max-width: 520px;
    max-height: 84vh;
    overflow-y: auto;
}

.chat-gomoku-game-panel {
    width: calc(100% - 24px);
    max-width: 570px;
    max-height: 96vh;
    margin-top: 2vh;
    overflow-y: auto;
}

.chat-gomoku-challenge-panel {
    max-width: 430px;
}

.chat-gomoku-description,
.chat-gomoku-challenge-question,
.chat-gomoku-inline-status,
.chat-gomoku-rule {
    color: #777;
    font-size: 13px;
    line-height: 1.65;
}

.chat-gomoku-description {
    margin: -6px 0 14px;
}

.chat-gomoku-inline-status {
    margin: 0 0 12px;
    padding: 9px 11px;
    border-radius: 2px;
    background: #f3f4f6;
}

.chat-gomoku-challenge-question {
    margin: 4px 0 12px;
    color: #222;
    font-size: 15px;
}

.chat-gomoku-challenge-question strong {
    color: #175cd3;
}

.chat-gomoku-primary-button,
.chat-gomoku-resume,
.chat-gomoku-players button {
    border: 0;
    background: #1769e0;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: bold;
}

.chat-gomoku-primary-button:hover,
.chat-gomoku-resume:hover,
.chat-gomoku-players button:hover {
    background: #0f57c4;
}

.chat-gomoku-primary-button:disabled,
.chat-gomoku-resume:disabled,
.chat-gomoku-players button:disabled {
    background: #777;
    cursor: wait;
}

.chat-gomoku-resume {
    width: 100%;
    min-height: 42px;
    margin-bottom: 12px;
    border-radius: 2px;
}

.chat-gomoku-players {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
}

.chat-gomoku-players li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #fff;
}

.chat-gomoku-players li span {
    min-width: 0;
    overflow: hidden;
    color: #222;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-gomoku-players button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 6px 9px;
    border-radius: 2px;
    font-size: 11px;
}

.chat-gomoku-lobby-actions {
    justify-content: space-between;
}

.chat-gomoku-lobby-actions button,
.chat-gomoku-decision-actions button,
.chat-gomoku-game-actions button {
    min-height: 42px;
    padding: 8px 14px;
    border-radius: 2px;
    font: inherit;
    font-size: 13px;
    font-weight: bold;
}

.chat-gomoku-decision-actions button {
    flex: 1 1 0;
}

.chat-gomoku-players-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: -5px 0 12px;
}

.chat-gomoku-player {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 6px;
    color: #222;
    font-size: 12px;
}

.chat-gomoku-player > span:last-child {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-gomoku-stone,
.chat-gomoku-cell-stone {
    display: block;
    border-radius: 2px;
    box-shadow: none;
}

.chat-gomoku-player .chat-gomoku-stone {
    width: 18px;
    height: 18px;
}

.chat-gomoku-player.is-black .chat-gomoku-stone {
    background: #222;
}

.chat-gomoku-player.is-white .chat-gomoku-stone {
    border: 1px solid #777;
    background: #fff;
}

.chat-gomoku-versus {
    flex: 0 0 auto;
    color: #777;
    font-size: 11px;
    font-weight: bold;
}

.chat-gomoku-game-status {
    margin: 0 0 5px;
    padding: 9px 12px;
    border: 1px solid #b2ccff;
    border-radius: 2px;
    background: #eff4ff;
    color: #1849a9;
    font-size: 13px;
    font-weight: bold;
    line-height: 1.5;
    text-align: center;
}

.chat-gomoku-rule {
    margin: 0 0 10px;
    color: #777;
    font-size: 10px;
    text-align: center;
}

.chat-gomoku-board-wrap {
    width: 100%;
    overflow: hidden;
    padding: 8px;
    border: 1px solid #60a5fa;
    border-radius: 2px;
    background: #dbeafe;
}

.chat-gomoku-board {
    display: grid;
    grid-template-columns: repeat(15, minmax(0, 1fr));
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.chat-gomoku-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 0;
    padding: 0;
    border: 1px solid #93c5fd;
    border-radius: 0;
    background-color: transparent;
    background-image: none;
    cursor: pointer;
}

.chat-gomoku-cell:hover:not(:disabled),
.chat-gomoku-cell:focus:not(:disabled) {
    z-index: 2;
    outline: 3px solid #175cd3;
    outline-offset: -3px;
    background-color: rgba(255, 255, 255, 0.28);
}

.chat-gomoku-cell:disabled {
    cursor: default;
}

.chat-gomoku-cell-stone {
    position: relative;
    z-index: 1;
    width: 76%;
    height: 76%;
}

.chat-gomoku-cell.is-black .chat-gomoku-cell-stone {
    background: #222;
}

.chat-gomoku-cell.is-white .chat-gomoku-cell-stone {
    border: 1px solid #777;
    background: #fff;
}

.chat-gomoku-cell.is-last-move .chat-gomoku-cell-stone:after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    margin: -2px 0 0 -2px;
    border-radius: 50%;
    background: #d92d20;
    content: "";
}

.chat-gomoku-board.is-busy {
    opacity: 0.72;
}

.chat-gomoku-record {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin: 0 0 20px;
}

.chat-gomoku-record div {
    padding: 14px 8px;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #f3f4f6;
    text-align: center;
}

.chat-gomoku-record dt {
    color: #777;
    font-size: 12px;
    font-weight: bold;
}

.chat-gomoku-record dd {
    margin: 5px 0 0;
    color: #222;
    font-size: 24px;
    font-weight: bold;
}

.chat-gomoku-recent-title {
    margin: 0 0 9px;
    color: #222;
    font-size: 14px;
}

.chat-gomoku-recent {
    margin: 0;
    padding: 0;
    list-style: none;
}

.chat-gomoku-recent li {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 9px 5px;
    border-bottom: 1px solid #d9dde3;
    color: #777;
    font-size: 12px;
}

.chat-gomoku-recent li strong {
    color: #175cd3;
    font-size: 13px;
}

.chat-gomoku-recent li time {
    color: #777;
    font-size: 10px;
}

.chat-gomoku-recent li.is-empty {
    display: block;
    color: #777;
    text-align: center;
}

body.chat-gomoku-open {
    overflow: hidden;
}

.chat-user-settings-panel {
    max-width: 560px;
    max-height: 84vh;
    overflow-y: auto;
}

.chat-user-settings-description {
    margin: -7px 0 16px;
    color: #777;
    font-size: 13px;
    line-height: 1.55;
}

.chat-user-setting-section {
    margin-top: 12px;
    padding: 15px 16px;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #f3f4f6;
}

.chat-user-setting-row,
.chat-online-members-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.chat-user-setting-section h3,
.chat-online-members-header h3 {
    margin: 0;
    color: #222;
    font-size: 14px;
}

.chat-user-setting-section p {
    margin: 5px 0 0;
    color: #777;
    font-size: 12px;
    line-height: 1.5;
}

.chat-setting-switch {
    flex: 0 0 auto;
    min-width: 68px;
    min-height: 36px;
    padding: 6px 12px;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #fff;
    color: #777;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: bold;
}

.chat-setting-switch.is-on,
.chat-setting-switch[aria-checked="true"] {
    border-color: #75e0a7;
    background: #ecfdf3;
    color: #067647;
}

.chat-setting-switch:disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

.chat-online-members-header button {
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #b2ccff;
    border-radius: 2px;
    background: #eff4ff;
    color: #1849a9;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: bold;
}

.chat-online-members-header button:disabled {
    cursor: wait;
    opacity: 0.6;
}

.chat-online-members-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    max-height: 230px;
    overflow-y: auto;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.chat-online-members-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #d9dde3;
    border-radius: 2px;
    background: #fff;
    color: #222;
    font-size: 12px;
}

.chat-online-members-list li span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-online-members-list li strong {
    flex: 0 0 auto;
    color: #175cd3;
    font-size: 10px;
}

.chat-online-members-list li.is-self {
    border-color: #b2ccff;
    background: #eff4ff;
}

body.chat-settings-open {
    overflow: hidden;
}

body.chat-presence-open,
body.chat-online-members-open {
    overflow: hidden;
}

.chat-presence-panel,
.chat-online-members-panel {
    max-width: 520px;
    max-height: 84vh;
    overflow-y: auto;
}

.chat-presence-panel .chat-online-members-header p,
.chat-online-members-panel > p {
    margin: 0;
    color: #777;
    font-size: 12px;
    line-height: 1.5;
}

.chat-secondary-button {
    border: 1px solid #d9dde3;
    background: #fff;
    color: #222;
}

.chat-danger-button {
    background: #d92d20;
}

.chat-danger-button:hover {
    background: #b42318;
}

.chat-danger-button:disabled {
    background: #fda29b;
    cursor: wait;
}

.chat-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    margin: -1px;
    padding: 0;
    border: 0;
    clip: rect(0, 0, 0, 0);
}

@media (max-width: 640px) {
    .chat-shell {
        margin: 8px auto 18px;
        padding: 0 6px;
    }

    .chat-directory-header {
        min-height: 48px;
        padding-right: 54px;
    }

    .chat-directory-management-panel {
        position: fixed;
        z-index: 10010;
        top: 64px;
        right: 12px;
        bottom: 12px;
        left: 12px;
        width: auto;
        max-width: none;
        max-height: none;
        padding: 17px 14px;
    }

    .chat-directory-management-heading {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .chat-directory-management-link {
        justify-content: center;
        width: 100%;
        min-height: 44px;
    }

    .chat-room-list {
        display: block;
    }

    .chat-room-card {
        margin-bottom: 0;
    }

    .chat-room-card a {
        min-height: 62px;
        padding: 9px 10px;
    }

    .chat-room-directory .chat-directory-notice {
        padding: 12px 13px;
    }

    .chat-room-directory .chat-directory-notice a {
        display: block;
        margin-top: 5px;
        margin-left: 0;
    }

    .chat-room-directory .chat-room-create {
        margin-top: 18px;
        padding: 18px 15px;
    }

    .chat-room-directory .chat-room-create-heading {
        flex-direction: column;
        gap: 10px;
    }

    .chat-room-directory .chat-room-create-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .chat-room-directory .chat-room-create-actions {
        grid-column: auto;
    }

    .chat-room-directory .chat-room-create-actions button {
        width: 100%;
    }

    .chat-room-directory .chat-room-create-restricted {
        align-items: flex-start;
        flex-direction: column;
    }

    .chat-room-header {
        align-items: center;
        min-height: 56px;
        padding: 6px 108px 6px 10px;
    }

    .chat-room-header h1 {
        font-size: 16px;
    }

    .chat-room-title-row {
        align-items: center;
        gap: 6px;
    }

    .chat-presence {
        min-height: 22px;
        padding: 3px 5px;
    }

    .chat-room-header p {
        display: none;
    }

    .chat-connection {
        margin-left: 0;
        padding: 6px 8px;
    }

    .chat-notification-toggle {
        padding: 5px 8px;
    }

    .chat-header-actions {
        top: 6px;
        right: 8px;
    }

    .chat-header-directory-link,
    .chat-header-settings-toggle {
        width: 44px;
        height: 44px;
        min-height: 44px;
        padding: 0;
    }

    .chat-announcements {
        margin-right: 12px;
        margin-left: 12px;
    }

    .chat-access-block-notice {
        margin-right: 12px;
        margin-left: 12px;
    }

    .chat-log-wrap {
        height: 55vh;
        min-height: 330px;
        padding: 8px 7px;
    }

    html.chat-popup-page {
        width: 100%;
        height: 100%;
        overflow: hidden;
        overscroll-behavior: none;
    }

    body.chat-popup-body {
        width: 100%;
        height: 100%;
        min-height: 0;
        overflow: hidden;
        overscroll-behavior: none;
    }

    body.chat-popup-body .chat-shell {
        box-sizing: border-box;
        display: flex;
        width: 100%;
        height: 100vh;
        height: 100svh;
        height: 100dvh;
        min-height: 0;
        margin: 0;
        padding: 0;
        overflow: hidden;
    }

    body.chat-popup-body .chat-app {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        width: 100%;
        height: 100%;
        min-width: 0;
        min-height: 0;
        max-height: 100%;
    }

    body.chat-popup-body .chat-room-header,
    body.chat-popup-body .chat-ban-notice,
    body.chat-popup-body .chat-access-block-notice,
    body.chat-popup-body .chat-freeze-notice,
    body.chat-popup-body .chat-slow-mode-notice,
    body.chat-popup-body .chat-notice,
    body.chat-popup-body .chat-announcements,
    body.chat-popup-body .chat-composer,
    body.chat-popup-body .chat-noscript {
        flex: 0 0 auto;
    }

    body.chat-popup-body .chat-room-header {
        min-height: 56px;
    }

    body.chat-popup-body .chat-log-wrap {
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
    }

    body.chat-popup-body .chat-announcements {
        max-height: 96px;
        overflow-y: auto;
        overscroll-behavior-y: contain;
    }

    .chat-message {
        max-width: 100%;
    }

    button.chat-message-nick {
        min-height: 32px;
        margin: -6px -4px;
        padding: 6px 4px;
    }

    .chat-message-action {
        min-height: 44px;
        padding: 8px 11px;
    }

    .chat-message-actions.chat-member-menu,
    .chat-message.is-own .chat-message-actions.chat-member-menu {
        left: 3px;
        width: 190px;
        max-width: calc(100vw - 32px);
    }

    .chat-admin-message {
        max-width: 100%;
    }

    .chat-announcement-options {
        align-items: flex-start;
        flex-direction: column;
    }

    .chat-composer {
        padding: 6px;
    }

    .chat-composer-main {
        gap: 5px;
    }

    .chat-send-main {
        flex-basis: 64px;
        min-width: 64px;
        padding-right: 7px;
        padding-left: 7px;
    }

    .chat-whisper-status {
        flex: 1 1 100%;
        justify-content: space-between;
        width: 100%;
        min-height: 42px;
        margin-top: 8px;
        padding: 7px 8px 7px 11px;
    }

    .chat-whisper-clear {
        min-height: 44px;
        padding: 7px 11px;
    }

    .chat-emoji-toggle {
        width: 44px;
        height: 44px;
        min-height: 44px;
    }

    .chat-gomoku-toggle {
        min-width: 62px;
        height: 44px;
        min-height: 44px;
        padding-right: 9px;
        padding-left: 9px;
    }

    .chat-gomoku-toolbar-status {
        display: none !important;
    }

    .chat-toolbar-utility {
        flex: 1 1 100%;
        width: 100%;
        margin-left: 0;
        padding-top: 8px;
        padding-left: 0;
        border-top: 1px solid #d9dde3;
        border-left: 0;
    }

    .chat-toolbar-admin-link,
    .chat-toolbar-utility .chat-freeze-toggle,
    .chat-toolbar-utility .chat-slow-mode-toggle {
        height: 44px;
        min-height: 44px;
    }

    .chat-toolbar-admin-link {
        width: 44px;
    }

    .chat-toolbar-utility .chat-announcement-compose {
        flex: 1 1 190px;
        max-width: 100%;
    }

    .chat-toolbar-utility .chat-toolbar-moderation-compose {
        flex: 1 1 100%;
        width: 100%;
    }

    .chat-toolbar-utility .chat-announcement-check {
        justify-content: center;
        width: 100%;
        min-height: 44px;
        box-sizing: border-box;
    }

    .chat-toolbar-utility .chat-announcement-options {
        right: 0;
        width: 310px;
        max-width: calc(100vw - 40px);
    }

    .chat-composer-toolbar > .chat-connection.is-disconnected {
        min-height: 44px;
    }

    .chat-emoji-picker {
        position: fixed;
        z-index: 10020;
        top: auto;
        right: 12px;
        bottom: 12px;
        left: 12px;
        width: auto;
        max-width: none;
        max-height: 55vh;
    }

    .chat-emoji-list {
        max-height: calc(55vh - 112px);
    }

    .chat-emoji-button {
        width: 44px;
        height: 44px;
        font-size: 27px;
    }

    .chat-emoji-close {
        width: 44px;
        height: 44px;
        line-height: 44px;
    }

    .chat-gomoku-lobby-panel,
    .chat-gomoku-stats-panel,
    .chat-gomoku-challenge-panel {
        width: calc(100% - 20px);
        max-height: calc(100vh - 20px);
        margin-top: 10px;
        padding: 18px 15px;
        overflow-y: auto;
    }

    .chat-gomoku-game-panel {
        width: calc(100% - 12px);
        max-height: calc(100vh - 12px);
        margin-top: 6px;
        padding: 15px 10px calc(15px + env(safe-area-inset-bottom));
    }

    .chat-gomoku-players {
        grid-template-columns: minmax(0, 1fr);
    }

    .chat-gomoku-players button,
    .chat-gomoku-lobby-actions button,
    .chat-gomoku-decision-actions button,
    .chat-gomoku-game-actions button,
    .chat-gomoku-resume {
        min-height: 44px;
    }

    .chat-gomoku-lobby-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .chat-gomoku-players-bar {
        gap: 8px;
    }

    .chat-gomoku-player {
        flex: 1 1 0;
    }

    .chat-gomoku-player.is-white {
        justify-content: flex-end;
    }

    .chat-gomoku-player > span:last-child {
        max-width: 88px;
    }

    .chat-gomoku-board-wrap {
        padding: 4px;
    }

    .chat-gomoku-rule {
        font-size: 9px;
        line-height: 1.45;
    }

    .chat-gomoku-game-actions {
        justify-content: space-between;
    }

    .chat-gomoku-game-actions button {
        flex: 1 1 0;
    }

    .chat-gomoku-recent li {
        grid-template-columns: 26px minmax(0, 1fr);
    }

    .chat-gomoku-recent li time {
        grid-column: 2;
    }

    #chat-report-modal .chat-modal-panel {
        max-height: calc(100vh - 24px);
        margin-top: 12px;
        padding: 18px;
        overflow-y: auto;
    }

    .chat-report-form select,
    #chat-report-modal .chat-modal-actions button {
        min-height: 44px;
    }

    .chat-report-form textarea {
        min-height: 110px;
    }

    .chat-report-preview {
        max-height: 104px;
    }

    .chat-user-settings-panel,
    .chat-presence-panel,
    .chat-online-members-panel {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: none;
        max-height: 88vh;
        margin: 0;
        padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
        border-radius: 2px;
    }

    .chat-slow-mode-panel {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: none;
        max-height: 88vh;
        margin: 0;
        padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
        border-radius: 2px;
        box-sizing: border-box;
        overflow-y: auto;
    }

    .chat-slow-mode-form .chat-modal-actions button {
        min-height: 44px;
    }

    .chat-user-settings-panel .chat-modal-header,
    .chat-presence-panel .chat-modal-header,
    .chat-online-members-panel .chat-modal-header {
        margin-bottom: 14px;
    }

    .chat-user-setting-row {
        align-items: flex-start;
    }

    .chat-setting-switch,
    .chat-online-members-header button {
        min-height: 44px;
    }

    .chat-online-members-list {
        grid-template-columns: 1fr;
    }
}

