* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    background: linear-gradient(135deg, #7C77D1 0%, #6358B5 100%);
}

@media (max-width: 768px) {
    input,
    select,
    textarea {
        font-size: 16px;
    }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #7C77D1 0%, #6358B5 100%);
    height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

input,
textarea,
select,
[contenteditable="true"],
.message-content,
.message-main-text,
.message-quoted-mention-text,
.room-summary-modal-content,
.gpt-assistant-result-answer,
.sidebar-ai-message-bubble,
.sidebar-ai-empty-title,
.sidebar-ai-suggestion-example {
    -webkit-user-select: text;
    user-select: text;
}

#app {
    width: 100%;
    max-width: 100vw;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

.screen {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hidden {
    display: none !important;
}

html.is-member-popout-boot #loginScreen,
html.is-member-popout-boot #guestJoinScreen,
html.is-member-popout-boot #guestSessionEndedScreen {
    display: none !important;
}

html.is-member-popout-boot #chatScreen {
    display: flex !important;
}

html.is-member-popout-boot,
html.is-member-popout-boot body {
    overflow: hidden;
    height: 100%;
}

html.is-member-popout-boot #app,
html.is-member-popout-boot #chatScreen.screen {
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

html.is-member-popout-boot #chatScreen.screen {
    align-items: stretch;
    justify-content: stretch;
}

html.is-member-popout-boot .sidebar,
html.is-member-popout-boot .sidebar-backdrop,
html.is-member-popout-boot #createRoomBtn,
html.is-member-popout-boot .settings-menu-wrapper,
html.is-member-popout-boot #logoutBtn,
html.is-member-popout-boot #toggleSidebarBtn,
html.is-member-popout-boot #closeChatBtn {
    display: none !important;
}

html.is-member-popout-boot .chat-container {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-width: none;
}

html.is-member-popout-boot .chat-main-row {
    flex: 1 1 auto;
    min-height: 0;
}

html.is-member-popout-boot .chat-container .chat-area {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-columns: minmax(0, 1fr);
    flex: 1;
    width: 100%;
    min-height: 0;
}

html.is-member-popout-boot .chat-container .chat-area:has(.chat-search-row:not(.hidden)) {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
}

html.is-member-popout-boot .chat-container .chat-area:has(.chat-search-row:not(.hidden)) .messages-wrapper {
    grid-row: 3;
    grid-column: 1;
}

html.is-member-popout-boot .chat-container .chat-area:has(.chat-search-row:not(.hidden)) .message-input-container {
    grid-row: 4;
    grid-column: 1;
}

.admin-announcement-banner {
    flex: 0 0 auto;
    width: 100%;
    z-index: 30;
    pointer-events: auto;
    -webkit-app-region: no-drag;
    background: linear-gradient(135deg, #fff4d6 0%, #ffe8a3 100%);
    color: #3b2f14;
    border-bottom: 1px solid #e6c76b;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.admin-announcement-banner-inner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0.45rem 0.75rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    line-height: 1.4;
    min-height: 2.4rem;
    box-sizing: border-box;
}

.admin-announcement-banner-title {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    color: #3b2f14;
}

.admin-announcement-megaphone-icon {
    width: 100%;
    height: 100%;
    display: block;
}

.admin-announcement-banner-message-btn {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    -webkit-app-region: no-drag;
}

.admin-announcement-banner-message {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    font-size: 0.9rem;
    line-height: 1.4;
    word-break: break-word;
}

.admin-announcement-banner.is-expanded .admin-announcement-banner-inner {
    align-items: flex-start;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.admin-announcement-banner.is-expanded .admin-announcement-banner-message {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
    white-space: pre-wrap;
}

.admin-announcement-expand-btn {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #3b2f14;
    cursor: pointer;
    opacity: 0.75;
    -webkit-app-region: no-drag;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-announcement-expand-btn:hover {
    opacity: 1;
    background: rgba(59, 47, 20, 0.1);
}

.admin-announcement-expand-icon {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    transition: transform 0.15s ease;
}

.admin-announcement-banner.is-expanded .admin-announcement-expand-icon {
    transform: rotate(180deg);
}

.admin-announcement-close-btn {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #3b2f14;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    -webkit-app-region: no-drag;
}

.admin-announcement-close-btn:hover {
    opacity: 1;
    background: rgba(59, 47, 20, 0.1);
}

.maintenance-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 30, 50, 0.55);
    backdrop-filter: blur(4px);
    padding: 1.5rem;
}

.maintenance-overlay-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    padding: 2.5rem 2rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.maintenance-overlay-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.maintenance-overlay-card h2 {
    font-size: 1.5rem;
    color: #1a1a2e;
    margin-bottom: 0.75rem;
}

.maintenance-overlay-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.maintenance-overlay-status {
    font-size: 0.875rem;
    color: #888;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.maintenance-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: maintenance-spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes maintenance-spin {
    to { transform: rotate(360deg); }
}

/* 로그인·게스트 화면 배경 */
#loginScreen,
#guestJoinScreen,
#guestSessionEndedScreen {
    padding: 0 24px;
    background: linear-gradient(135deg, #7C77D1 0%, #6358B5 100%);
}

.login-container {
    background: white;
    padding: 32px 28px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 380px;
}

.login-container h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #6C80E8;
}

.login-brand {
    margin: 0 0 20px;
    line-height: 0;
    text-align: center;
}

.login-brand-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 56px;
    margin: 0 auto;
    object-fit: contain;
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}

.login-language-selector {
    margin-bottom: 20px;
    text-align: center;
}

.login-language-selector label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.login-language-selector select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    cursor: pointer;
}

.login-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    transition: color 0.3s;
}

.tab-btn.active {
    color: #3498db;
    border-bottom: 2px solid #3498db;
    margin-bottom: -2px;
}

.form-container {
    display: none;
}

.form-container.active {
    display: block;
}

.form-container input:not([type="checkbox"]) {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.login-remember-row {
    margin: -4px 0 12px;
}

.login-remember-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    user-select: none;
}

.login-remember-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.form-container button {
    width: 100%;
    padding: 12px;
    background: #6C80E8;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.form-container button:hover {
    background: #5a6fd6;
}

.form-container button:disabled {
    background: #a8b4f0;
    cursor: not-allowed;
}

.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 10px;
    min-height: 20px;
    white-space: pre-line;
}

.login-download-row {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #ecf0f1;
    text-align: center;
}

.download-app-link {
    display: inline-block;
    width: 100%;
    padding: 12px 16px;
    background: #1EA085;
    color: #ffffff;
    border-radius: 5px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.3s;
    box-sizing: border-box;
}

.download-app-link:hover {
    background: #1a8f74;
    color: #ffffff;
}

.form-footer {
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.guest-join-description {
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.text-link-btn {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    text-decoration: underline;
}

.text-link-btn:hover {
    color: #5568d3;
}

body.guest-mode .sidebar,
body.guest-mode .sidebar-backdrop,
body.guest-mode .toggle-sidebar-btn,
body.guest-mode .room-menu-wrapper,
body.guest-mode .create-room-icon-btn,
body.guest-mode .settings-menu-wrapper,
body.guest-mode .create-room-modal,
body.guest-mode #renameRoomNameModal,
body.guest-mode #addRoomMembersModal,
body.guest-mode .room-section {
    display: none !important;
}

body.guest-mode .chat-top-brand-row .sidebar-brand {
    width: 100%;
    flex: 1 1 auto;
}

body.guest-mode .chat-top-brand-rest {
    display: none;
}

body.guest-mode .chat-container.in-room .chat-area {
    width: 100%;
}

body.guest-mode .chat-container {
    max-width: 100%;
}

.guest-leave-room-btn {
    flex-shrink: 0;
    width: auto;
    min-width: 72px;
    padding: 8px 12px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s;
}

.guest-leave-room-btn:hover {
    background: #c0392b;
}

body.guest-mode .guest-leave-room-btn:not(.hidden) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.switch-link {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
}

.switch-link:hover {
    text-decoration: underline;
}

/* 채팅 화면 */
body.chat-layout-active {
    align-items: stretch;
    justify-content: stretch;
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
}

body.chat-layout-active #app {
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.chat-container {
    width: 100%;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: white;
}

.chat-top-brand-row {
    display: flex;
    flex: 0 0 auto;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    z-index: 40;
    -webkit-app-region: no-drag;
}

/*
 * 전체 채팅/팝아웃에서는 로고 행을 숨긴다.
 * (방 제목 위에 공지 크기만 한 흰 흰 테두리가 남는 문제 방지)
 * 회원 허브(목록+채팅 동시)는 로고 행을 유지한다.
 */
body.member-popout-mode .chat-top-brand-row,
body.guest-standalone-mode .chat-top-brand-row,
body.guest-mode .chat-top-brand-row,
body:not(.member-hub-mode) .chat-container.in-room:not(.sidebar-visible) .chat-top-brand-row {
    display: none !important;
}

.chat-top-brand-row .sidebar-brand {
    width: 400px;
    max-width: 100%;
    flex: 0 0 auto;
    border-bottom: none;
}

.chat-top-brand-rest {
    flex: 1 1 auto;
    min-width: 0;
    background: #ffffff;
}

.chat-main-row {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow: hidden;
    background: white;
    position: relative;
}

/* AI 도우미: 흰 헤더 아래 전체화면 오버레이 (모바일/웹/Electron 공통) */
.chat-container.ai-assistant-overlay-open .chat-top-brand-row {
    display: flex !important;
    position: relative;
    z-index: 320;
}

.chat-container.ai-assistant-overlay-open .chat-top-brand-row .sidebar-brand {
    width: 100%;
    max-width: none;
}

.chat-container.ai-assistant-overlay-open .chat-top-brand-rest {
    display: none;
}

.chat-container.ai-assistant-overlay-open #adminAnnouncementBanner {
    display: none !important;
}

.chat-container.ai-assistant-overlay-open .chat-main-row .sidebar {
    display: flex !important;
    position: absolute;
    inset: 0;
    width: 100% !important;
    max-width: none !important;
    z-index: 310;
    box-shadow: none;
}

.chat-container.ai-assistant-overlay-open .sidebar-backdrop {
    display: none !important;
}

.chat-container.ai-assistant-overlay-open .sidebar-nav,
.chat-container.ai-assistant-overlay-open .user-info {
    display: none !important;
}

.chat-container.ai-assistant-overlay-open .sidebar-content {
    padding: 0;
}

.chat-container.ai-assistant-overlay-open .sidebar-panels {
    flex: 1 1 auto;
    min-height: 0;
}

.chat-container.ai-assistant-overlay-open .sidebar-panel--ai {
    border-radius: 0;
    max-height: none;
}

/* 방 목록 ↔ 대화 전체 화면 전환 */
.chat-container:not(.in-room) .chat-area {
    display: none;
}

.chat-container:not(.in-room) .chat-main-row .sidebar {
    width: 100%;
    flex: 1;
    min-width: 0;
}

.chat-container:not(.in-room) .chat-top-brand-row .sidebar-brand {
    width: 100%;
    flex: 1 1 auto;
}

.chat-container:not(.in-room) .chat-top-brand-rest {
    display: none;
}

.chat-container.in-room:not(.sidebar-visible) .chat-main-row .sidebar {
    display: none;
}

.sidebar-backdrop {
    display: none;
}

.chat-container.in-room.sidebar-visible .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.45);
}

.chat-container.in-room.sidebar-visible .chat-main-row .sidebar {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(400px, 88vw);
    z-index: 210;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.25);
}

.chat-container.in-room.sidebar-visible .chat-area {
    display: grid;
    position: relative;
    z-index: 1;
}

.chat-container.in-room .chat-area {
    flex: 1;
    min-height: 0;
    width: 100%;
}

#chatScreen.screen {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: stretch;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100%;
}

#chatScreen .chat-container {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
}

.sidebar {
    width: 400px;
    background: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    padding: 0;
    min-height: 0;
    overflow: hidden;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    padding: 10px 10px 5px;
    min-height: 60px;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    box-sizing: border-box;
    overflow: visible;
    flex-shrink: 0;
}

.sidebar-brand-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 33px;
    flex: 1 1 auto;
    flex-shrink: 1;
    min-width: 0;
    object-fit: contain;
    object-position: left center;
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}

.sidebar-close-btn {
    display: none;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    margin-left: auto;
    border: none;
    border-radius: 8px;
    background: #ecf0f1;
    color: #5f6b7c;
    font-size: 26px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.sidebar-close-btn:hover {
    background: #dfe6e9;
    color: #2c3e50;
}

.user-info {
    margin-bottom: 16px;
    padding-bottom: 16px;
    padding-right: 16px;
    border-bottom: 1px solid #34495e;
    overflow: visible;
    flex-shrink: 0;
}

.sidebar-layout {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: stretch;
}

.sidebar-content {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 16px 0 16px 8px;
    overflow: hidden;
}

.user-name {
    flex: 1;
    min-width: 0;
    font-size: 18px;
    font-weight: bold;
    word-break: break-word;
}

.current-username {
    flex: 1;
    min-width: 0;
    padding-left: 16px;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.35;
    color: #ecf0f1;
    word-break: break-word;
    overflow: hidden;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.current-username .member-lang-badge {
    font-weight: 500;
    flex-shrink: 0;
}

.current-username.is-empty {
    color: #95a5a6;
}

.user-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
    position: relative;
}

.icon-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: #34495e;
    color: #ecf0f1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.icon-action-btn:hover {
    background: #3d566e;
}

.icon-action-symbol {
    font-size: 20px;
    line-height: 1;
    font-weight: 500;
}

.icon-action-svg {
    width: 18px;
    height: 18px;
}

.notice-board-wrapper {
    position: relative;
}

.notice-board-icon-btn {
    position: relative;
    background: #5d6d7e;
}

.notice-board-icon-btn:hover {
    background: #4a5a6a;
}

.notice-board-unread-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #e74c3c;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    pointer-events: none;
}

.notice-board-modal-dialog {
    width: min(640px, 100%);
}

.notice-board-modal-body {
    padding: 0;
    overflow: hidden;
}

.notice-board-list-step,
.notice-board-detail-step {
    min-height: 240px;
    max-height: calc(100vh - 8vh - 92px);
    overflow-y: auto;
}

.notice-board-status-text {
    margin: 24px 20px;
    color: #7f8c8d;
    font-size: 14px;
    text-align: center;
}

.notice-board-status-text--error {
    color: #c0392b;
}

.notice-board-list {
    margin: 0;
    padding: 8px 0;
}

.notice-board-list-item {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-bottom: 1px solid #eef2f4;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.notice-board-list-item:hover {
    background: #f4f7fb;
}

.notice-board-list-item .notice-board-type-badge {
    justify-self: start;
}

.notice-board-list-item.is-unread .notice-board-list-item-title {
    font-weight: 700;
}

.notice-board-list-item-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.notice-board-type-badge,
.notice-board-pinned-badge,
.notice-board-unread-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}

.notice-board-type-badge {
    background: #e8eef5;
    color: #2c3e50;
}

.notice-board-pinned-badge {
    background: #fdebd0;
    color: #9a3412;
}

.notice-board-unread-dot {
    background: #fde8e8;
    color: #c0392b;
}

.notice-board-list-item-title {
    overflow: hidden;
    font-size: 14px;
    color: #1f2937;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notice-board-list-item-sub,
.notice-board-list-item-date {
    font-size: 12px;
    color: #95a5a6;
}

.notice-board-list-item-date {
    flex-shrink: 0;
    white-space: nowrap;
}

.notice-board-detail-step {
    padding: 0;
    background: #f4f6f8;
}

.notice-board-post {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    background: #fff;
}

.notice-board-post-header {
    padding: 22px 24px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #fafbfc;
}

.notice-board-post-title {
    margin: 0 0 14px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.45;
    color: #1f2937;
    word-break: break-word;
}

.notice-board-post-info {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 0;
}

.notice-board-post-info-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

.notice-board-post-info-row dt {
    color: #6b7280;
    font-weight: 500;
}

.notice-board-post-info-row dd {
    margin: 0;
    color: #111827;
    font-weight: 600;
}

.notice-board-post-info-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.notice-board-post-body {
    flex: 1 1 auto;
    min-height: 220px;
    padding: 24px 28px 32px;
    font-size: 15px;
    line-height: 1.8;
    color: #374151;
    word-break: break-word;
}

.notice-board-post-line {
    margin: 0 0 10px;
    line-height: 1.8;
}

.notice-board-post-text {
    display: inline;
    margin: 0;
    white-space: pre-wrap;
    vertical-align: middle;
}

.notice-board-post-figure {
    display: inline-block;
    vertical-align: middle;
    width: auto;
    max-width: 100%;
    margin: 0 8px 0 0;
    padding: 4px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
}

.notice-board-post-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0;
    border-radius: 6px;
    background: #fff;
}

body.guest-mode .notice-board-wrapper,
body.guest-standalone-mode .notice-board-wrapper {
    display: none !important;
}

.manual-help-icon-btn:hover {
    background: #4a5a6a;
}

.manual-help-icon-btn[aria-expanded="true"] {
    background: #4a5a6a;
}

.manual-menu-wrapper {
    position: relative;
}

.manual-menu-dropdown {
    min-width: 0;
    width: max-content;
}

.manual-menu-dropdown .settings-menu-item {
    padding: 6px 10px;
    white-space: nowrap;
}

.manual-help-icon-symbol {
    font-size: 18px;
    font-weight: 700;
}

.create-room-icon-btn {
    background: #3498db;
}

.create-room-icon-btn:hover {
    background: #2980b9;
}

.settings-menu-btn[aria-expanded="true"] {
    background: #3d566e;
}

.settings-menu-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: auto;
    min-width: 240px;
    padding: 8px 0;
    border-radius: 8px;
    background: #2c3e50;
    border: 1px solid #3d566e;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    z-index: 250;
}

.manual-menu-dropdown.settings-menu-dropdown {
    min-width: 0;
    width: max-content;
    padding: 2px 0;
}

.settings-menu-item {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    text-align: left;
}

.settings-menu-notification {
    border-bottom: 1px solid #3d566e;
}

.settings-menu-notification .member-notification-label {
    padding: 0;
}

.settings-menu-notification .member-notification-hint {
    margin-top: 8px;
    padding: 0;
}

.settings-menu-action {
    background: transparent;
    color: #ecf0f1;
    border: none;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.settings-menu-action:hover {
    background: #34495e;
}

.settings-menu-action:disabled,
.settings-menu-action.is-checking {
    opacity: 0.75;
    cursor: wait;
}

.current-language-label {
    font-size: 16px;
    color: #bdc3c7;
    font-weight: 500;
    margin-left: 6px;
}

.applied-language-text {
    display: none;
}

.member-notification-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #ecf0f1;
    cursor: pointer;
    user-select: none;
}

.member-notification-label input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.member-notification-hint {
    font-size: 11px;
    line-height: 1.4;
    color: #e74c3c;
}

.member-notification-hint.is-info {
    color: #95a5a6;
}

.app-notice-toast-container {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: min(420px, calc(100vw - 32px));
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.app-notice-toast {
    pointer-events: auto;
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    background: #2c3e50;
    color: #ecf0f1;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    border-left: 4px solid #667eea;
    cursor: pointer;
    animation: app-notice-toast-in 0.25s ease;
}

.app-notice-toast--success {
    border-left-color: #2ecc71;
}

.app-notice-toast--error {
    border-left-color: #e74c3c;
}

.app-notice-toast-hiding {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.app-notice-toast-body {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    text-align: center;
    word-break: break-word;
}

@keyframes app-notice-toast-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-alert-toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}

.chat-alert-toast {
    pointer-events: auto;
    padding: 12px 14px;
    border-radius: 10px;
    background: #2c3e50;
    color: #ecf0f1;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    border-left: 4px solid #667eea;
    cursor: pointer;
    animation: chat-alert-toast-in 0.25s ease;
}

.chat-alert-toast-hiding {
    opacity: 0;
    transform: translateX(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.chat-alert-toast-title {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.chat-alert-toast-body {
    font-size: 13px;
    line-height: 1.4;
    color: #bdc3c7;
    word-break: break-word;
}

@keyframes chat-alert-toast-in {
    from {
        opacity: 0;
        transform: translateX(16px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.language-selector {
    margin-bottom: 15px;
}

.language-selector label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: #bdc3c7;
}

.language-selector select {
    width: 100%;
    padding: 8px;
    border-radius: 5px;
    border: none;
    background: #34495e;
    color: white;
}

.logout-icon-btn {
    background: #e74c3c;
}

.logout-icon-btn:hover {
    background: #c0392b;
}

.room-section {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.sidebar-nav {
    flex-shrink: 0;
    width: 52px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px 6px 16px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background: #243342;
    align-self: stretch;
}

.sidebar-nav-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #95a5a6;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.sidebar-nav-unread {
    position: absolute;
    top: 4px;
    right: 2px;
    min-width: 18px;
    padding: 2px 5px;
    border-radius: 10px;
    background: #e74c3c;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    pointer-events: none;
}

.sidebar-nav-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ecf0f1;
}

.sidebar-nav-btn.is-active {
    background: rgba(255, 255, 255, 0.1);
    color: #ecf0f1;
}

#sidebarTabAiBtn {
    flex-direction: column;
    height: 52px;
    min-height: 52px;
    gap: 2px;
}

#sidebarTabAiBtn .sidebar-nav-icon {
    width: 20px;
    height: 20px;
}

.sidebar-nav-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.sidebar-panels {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.sidebar-panel {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-panel-header {
    flex-shrink: 0;
    padding: 0 0 12px;
}

.sidebar-panel-header h3 {
    margin: 0;
    font-size: 16px;
}

.sidebar-panel--members {
    padding: 0;
}

.sidebar-member-search-wrap {
    flex-shrink: 0;
    margin-bottom: 12px;
    padding-right: 16px;
}

.sidebar-member-search-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #4a6278;
    border-radius: 8px;
    background: #2c3e50;
    color: #ecf0f1;
    font-size: 14px;
}

.sidebar-member-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.sidebar-member-search-input::placeholder {
    color: #95a5a6;
}

.sidebar-panel--chats .room-section {
    padding: 0;
}

.sidebar-panel--links {
    padding: 0;
}

.sidebar-nav-label {
    display: block;
    margin-top: 2px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
}

.sidebar-panel--ai {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    height: 100%;
    padding: 0;
    gap: 0;
    background: #1b2733;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar-ai-toolbar {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    pointer-events: none;
}

.sidebar-ai-toolbar > * {
    pointer-events: auto;
}

.sidebar-ai-new-chat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: auto;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(34, 49, 66, 0.88);
    color: #d6eaf8;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(6px);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.sidebar-ai-new-chat-btn:hover {
    background: rgba(44, 62, 80, 0.96);
    border-color: rgba(127, 219, 255, 0.35);
    color: #ffffff;
}

.sidebar-ai-new-chat-btn.hidden {
    display: none;
}

.sidebar-ai-close-btn {
    position: static;
    top: auto;
    right: auto;
    z-index: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(34, 49, 66, 0.88);
    color: #ecf0f1;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(6px);
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.sidebar-ai-close-btn:hover {
    background: rgba(44, 62, 80, 0.96);
    color: #ffffff;
    transform: scale(1.04);
}

.sidebar-ai-thread {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.sidebar-ai-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 48px 18px 28px;
    text-align: center;
}

.sidebar-ai-empty-state.is-hidden {
    display: none;
}

.sidebar-ai-empty-avatar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow:
        0 0 0 1px rgba(52, 152, 219, 0.22),
        0 0 18px rgba(52, 152, 219, 0.28),
        0 0 34px rgba(155, 89, 182, 0.16);
    animation: sidebar-ai-avatar-pulse 3.2s ease-in-out infinite;
    overflow: hidden;
}

.sidebar-ai-empty-avatar-logo {
    width: 78px;
    height: 78px;
    object-fit: contain;
    image-rendering: auto;
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}

@keyframes sidebar-ai-avatar-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 0 0 1px rgba(52, 152, 219, 0.22),
            0 0 18px rgba(52, 152, 219, 0.28),
            0 0 34px rgba(155, 89, 182, 0.16);
    }
    50% {
        transform: scale(1.04);
        box-shadow:
            0 0 0 1px rgba(52, 152, 219, 0.38),
            0 0 26px rgba(52, 152, 219, 0.4),
            0 0 44px rgba(155, 89, 182, 0.24);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar-ai-empty-avatar {
        animation: none;
    }
}

.sidebar-ai-empty-title {
    margin: 4px 0 0;
    font-size: 16px;
    font-weight: 600;
    color: #ecf0f1;
}

.sidebar-ai-suggestions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 6px;
    max-width: 280px;
    text-align: left;
}

.sidebar-ai-suggestion-example {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: #95a5a6;
    text-align: left;
}

.sidebar-ai-messages {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px 12px 16px;
    padding-top: 48px;
}

.sidebar-ai-messages:empty {
    display: none;
}

.sidebar-ai-message {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    max-width: 100%;
    flex-shrink: 0;
}

.sidebar-ai-message.is-user {
    flex-direction: row-reverse;
}

.sidebar-ai-message-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 0 1 auto;
    width: fit-content;
    max-width: 100%;
    align-items: flex-start;
}

.sidebar-ai-message.is-user .sidebar-ai-message-body {
    align-items: flex-end;
}

.sidebar-ai-message-role {
    font-size: 11px;
    font-weight: 600;
    color: #95a5a6;
}

.sidebar-ai-message-bubble {
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    color: #ecf0f1;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

.sidebar-ai-message-bubble.is-markdown {
    white-space: normal;
    width: min(100%, 520px);
    max-width: 100%;
}

.sidebar-ai-message-bubble.is-markdown > :first-child {
    margin-top: 0;
}

.sidebar-ai-message-bubble.is-markdown > :last-child {
    margin-bottom: 0;
}

.sidebar-ai-message-bubble.is-markdown p {
    margin: 0 0 8px;
}

.sidebar-ai-message-bubble.is-markdown h1,
.sidebar-ai-message-bubble.is-markdown h2,
.sidebar-ai-message-bubble.is-markdown h3 {
    margin: 12px 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
}

.sidebar-ai-message-bubble.is-markdown ul,
.sidebar-ai-message-bubble.is-markdown ol {
    margin: 0 0 10px;
    padding-left: 1.25em;
}

.sidebar-ai-message-bubble.is-markdown ul {
    list-style-type: disc;
}

.sidebar-ai-message-bubble.is-markdown ul ul {
    list-style-type: circle;
}

.sidebar-ai-message-bubble.is-markdown ul ul ul {
    list-style-type: square;
}

.sidebar-ai-message-bubble.is-markdown ul ul,
.sidebar-ai-message-bubble.is-markdown ol ul,
.sidebar-ai-message-bubble.is-markdown ul ol,
.sidebar-ai-message-bubble.is-markdown ol ol {
    margin: 4px 0;
}

.sidebar-ai-message-bubble.is-markdown p + ul,
.sidebar-ai-message-bubble.is-markdown p + ol,
.sidebar-ai-message-bubble.is-markdown h3 + ul,
.sidebar-ai-message-bubble.is-markdown h3 + ol {
    margin-top: 2px;
}

.sidebar-ai-message-bubble.is-markdown ul + p,
.sidebar-ai-message-bubble.is-markdown ol + p {
    margin-top: 12px;
}

.sidebar-ai-message-bubble.is-markdown li {
    margin: 0 0 4px;
}

.sidebar-ai-message-bubble.is-markdown code {
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
}

.sidebar-ai-message-bubble.is-markdown strong {
    color: #ffffff;
    font-weight: 700;
}

.ai-md-table-block {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0 0 8px;
    min-width: 0;
}

.ai-md-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.15);
}

.ai-md-table-block .ai-md-table-wrap {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.ai-md-table-block:not(:has(.ai-md-table-more)) .ai-md-table-wrap {
    border-radius: 10px;
}

.ai-md-table tr.ai-md-row.is-collapsed,
.ai-md-table tr.ai-md-row[hidden] {
    display: none !important;
}

.ai-md-table-more {
    display: block;
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    border-radius: 0 0 10px 10px;
    background: rgba(127, 219, 255, 0.08);
    color: #d6eaf8;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    cursor: pointer;
    flex-shrink: 0;
}

.ai-md-table-more:hover {
    background: rgba(127, 219, 255, 0.14);
}

.ai-md-table-more:focus-visible {
    outline: 2px solid rgba(127, 219, 255, 0.55);
    outline-offset: -2px;
}

.ai-md-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    line-height: 1.4;
}

.ai-md-table th,
.ai-md-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    vertical-align: top;
    overflow-wrap: normal;
    word-break: keep-all;
}

.ai-md-table th {
    background: rgba(127, 219, 255, 0.08);
    color: #d6eaf8;
    font-weight: 700;
    white-space: nowrap;
}

.ai-md-table td {
    color: #ecf0f1;
    font-variant-numeric: tabular-nums;
}

.ai-md-table th.ai-md-cell--code,
.ai-md-table td.ai-md-cell--code,
.ai-md-table th.ai-md-cell--compact,
.ai-md-table td.ai-md-cell--compact,
.ai-md-table th.ai-md-cell--qty,
.ai-md-table td.ai-md-cell--qty {
    white-space: nowrap;
}

.ai-md-table th.ai-md-cell--name,
.ai-md-table td.ai-md-cell--name {
    white-space: normal;
    overflow-wrap: break-word;
    max-width: min(240px, 42vw);
}

.ai-md-table tr:last-child td {
    border-bottom: none;
}

.sidebar-ai-message.is-assistant .sidebar-ai-message-bubble {
    background: #2c3e50;
    border-top-left-radius: 4px;
}

.sidebar-ai-message.is-user .sidebar-ai-message-bubble {
    background: #2f6fed;
    border-top-right-radius: 4px;
}

.sidebar-ai-message.is-error .sidebar-ai-message-bubble {
    background: rgba(231, 76, 60, 0.18);
    color: #ffb4b4;
    border: 1px solid rgba(231, 76, 60, 0.35);
}

.sidebar-ai-message.is-typing .sidebar-ai-message-bubble {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 18px;
    padding: 12px 14px;
}

.sidebar-ai-typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #95a5a6;
    animation: sidebar-ai-typing-bounce 1.2s infinite ease-in-out;
}

.sidebar-ai-typing-dot:nth-child(2) {
    animation-delay: 0.15s;
}

.sidebar-ai-typing-dot:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes sidebar-ai-typing-bounce {
    0%, 80%, 100% {
        opacity: 0.35;
        transform: translateY(0);
    }
    40% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

.sidebar-ai-composer {
    flex-shrink: 0;
    flex-grow: 0;
    padding: 10px 12px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #223142;
}

.sidebar-ai-composer-box {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 8px 8px 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: #2c3e50;
}

.sidebar-ai-composer-box:focus-within {
    border-color: rgba(127, 219, 255, 0.45);
}

.sidebar-ai-query-input {
    flex: 1;
    min-height: 24px;
    max-height: 120px;
    resize: none;
    padding: 6px 0;
    border: none;
    background: transparent;
    color: #ecf0f1;
    font: inherit;
    /* 16px 미만이면 iOS/모바일에서 포커스 시 화면이 확대됨 */
    font-size: 16px;
    line-height: 1.45;
    box-sizing: border-box;
}

.sidebar-ai-query-input:focus {
    outline: none;
}

.sidebar-ai-composer-box.is-busy {
    opacity: 0.72;
    border-color: rgba(127, 219, 255, 0.28);
    background: #253545;
    pointer-events: none;
}

.sidebar-ai-query-input:disabled,
.sidebar-ai-query-input[readonly],
.sidebar-ai-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.sidebar-ai-submit-btn:disabled {
    background: #5d6d7e;
}

.sidebar-ai-submit-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #3498db;
    color: #fff;
    cursor: pointer;
}

.sidebar-ai-submit-btn svg {
    width: 16px;
    height: 16px;
}

.sidebar-ai-submit-btn:hover:not(:disabled) {
    background: #2980b9;
}

.sidebar-ai-composer-hint {
    margin: 6px 2px 0;
    font-size: 11px;
    color: #7f8c8d;
    text-align: center;
}

/* 데스크톱/웹/Electron: AI 도우미 글씨 확대 (모바일은 기존 크기 유지) */
@media (min-width: 769px) {
    .sidebar-ai-empty-title {
        font-size: 18px;
    }

    .sidebar-ai-suggestions {
        max-width: 360px;
        gap: 6px;
    }

    .sidebar-ai-suggestion-example {
        font-size: 14px;
    }

    .sidebar-ai-message-role {
        font-size: 14px;
    }

    .sidebar-ai-message-bubble {
        font-size: 15px;
        line-height: 1.55;
        padding: 12px 14px;
    }

    .sidebar-ai-message-bubble.is-markdown {
        width: min(100%, 640px);
    }

    .ai-md-table {
        font-size: 13px;
    }

    .ai-md-table th,
    .ai-md-table td {
        padding: 10px 12px;
    }

    .sidebar-ai-query-input {
        font-size: 15px;
    }

    .sidebar-ai-composer-hint {
        font-size: 12px;
    }
}

.sidebar-links-list {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.sidebar-link-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: #34495e;
    color: #ecf0f1;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.sidebar-link-item:hover {
    background: #3d566e;
}

.sidebar-link-item:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.35);
    outline-offset: 1px;
}

.sidebar-link-item-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #95a5a6;
    transition: color 0.2s, transform 0.2s;
}

.sidebar-link-item-icon svg {
    width: 22px;
    height: 22px;
}

.sidebar-link-item:hover .sidebar-link-item-icon {
    color: #ecf0f1;
    transform: scale(1.08);
}

.sidebar-link-item-icon--internal {
    color: #e74c3c;
}

.sidebar-link-item-icon--external {
    color: #2ecc71;
}

.sidebar-link-item:hover .sidebar-link-item-icon--internal {
    color: #ff6b6b;
}

.sidebar-link-item:hover .sidebar-link-item-icon--external {
    color: #58d68d;
}

.sidebar-link-item-content {
    flex: 1;
    min-width: 0;
}

.sidebar-link-item-title {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-link-item-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.2;
    white-space: nowrap;
}

.sidebar-link-item-badge--internal {
    color: #ffd7d5;
    background: rgba(231, 76, 60, 0.22);
}

.sidebar-link-item-badge--external {
    color: #d5f5e3;
    background: rgba(46, 204, 113, 0.22);
}

.sidebar-links-list-empty {
    flex-shrink: 0;
    margin: 0 16px 0 0;
    padding: 16px 4px;
    color: #95a5a6;
    font-size: 13px;
    text-align: center;
}

.admin-company-links-modal-dialog {
    max-width: 560px;
    max-height: min(680px, calc(100vh - 8vh - 20px));
}

.admin-company-links-modal-dialog .create-room-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 18px 20px 20px;
}

.admin-company-links-modal-description {
    margin: 0 0 14px;
    color: #7f8c8d;
    font-size: 13px;
    line-height: 1.5;
}

.admin-company-links-modal-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.admin-company-links-modal-add-btn {
    align-self: flex-start;
    margin-top: 4px;
}

.admin-company-links-modal-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    max-height: min(280px, calc(100vh - 360px));
    overflow-y: auto;
    padding-bottom: 2px;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
}

.admin-company-links-modal-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #34495e;
    color: #ecf0f1;
    cursor: grab;
}

.admin-company-links-modal-item.is-dragging {
    opacity: 0.5;
}

.admin-company-links-modal-drag-handle {
    flex-shrink: 0;
    color: #95a5a6;
    font-size: 14px;
    letter-spacing: -0.12em;
    user-select: none;
}

.admin-company-links-modal-item-content {
    flex: 1;
    min-width: 0;
}

.admin-company-links-modal-item-title {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-company-links-modal-item-url {
    margin-top: 2px;
    color: #bdc3c7;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-company-links-modal-form-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 4px;
}

.admin-company-links-modal-item-actions {
    display: flex;
    flex-shrink: 0;
    gap: 6px;
}

.admin-company-links-modal-edit-btn,
.admin-company-links-modal-delete-btn {
    flex-shrink: 0;
    padding: 6px 10px;
    border: 1px solid #7f8c8d;
    border-radius: 6px;
    background: transparent;
    color: #ecf0f1;
    font-size: 12px;
    cursor: pointer;
}

.admin-company-links-modal-delete-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.admin-company-links-modal-empty {
    margin: 0;
    padding: 12px 0;
    color: #95a5a6;
    font-size: 13px;
    text-align: center;
}

.admin-company-links-modal-item.is-editing {
    outline: 2px solid rgba(102, 126, 234, 0.55);
    background: #3d566e;
}

body.admin-company-links-modal-open {
    overflow: hidden;
}

.sidebar-member-list {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.sidebar-member-list-section-header {
    flex-shrink: 0;
    padding: 8px 4px 6px;
    margin-right: 16px;
    font-size: 12px;
    font-weight: 600;
    color: #bdc3c7;
    letter-spacing: 0.02em;
}

.sidebar-member-list-section-header.is-offline-section {
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid #34495e;
}

.sidebar-member-item--interactive {
    cursor: pointer;
}

.sidebar-member-item--interactive:hover {
    background: #3d566e;
}

.sidebar-member-item--interactive:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.35);
    outline-offset: 1px;
}

.sidebar-member-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 5px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #34495e;
    color: #ecf0f1;
    font-size: 14px;
}

.sidebar-member-item.is-offline {
    opacity: 0.78;
}

.sidebar-member-status-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #bdc3c7;
}

.sidebar-member-item.is-online .sidebar-member-status-dot {
    background: #2ecc71;
}

.sidebar-member-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sidebar-member-name {
    line-height: 1.3;
    font-weight: 600;
    word-break: break-word;
}

.member-lang-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: #95a5a6;
    white-space: nowrap;
    vertical-align: middle;
}

.member-lang-flag {
    display: inline-flex;
    width: 24px;
    height: 16px;
    border-radius: 2px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.22);
    flex-shrink: 0;
    background: #fff;
}

.member-lang-flag-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.sidebar-member-meta {
    font-size: 12px;
    color: #bdc3c7;
    word-break: break-word;
}

.sidebar-member-list-empty {
    margin: 12px 16px 0 0;
    font-size: 13px;
    color: #95a5a6;
    text-align: center;
}

.room-section h3 {
    margin: 0 16px 14px 0;
    font-size: 16px;
}

.create-room-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 8vh 20px 20px;
    pointer-events: auto;
}

.create-room-modal.hidden {
    display: none;
}

body.create-room-modal-open {
    overflow: hidden;
}

body.create-room-modal-open #app {
    pointer-events: none;
}

.create-room-modal-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(0, 0, 0, 0.5);
}

.create-room-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(480px, 100%);
    max-height: calc(100vh - 8vh - 20px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.24);
    overflow: hidden;
}

.create-room-modal-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid #e8ecef;
}

.create-room-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
    flex: 1;
    min-width: 0;
}

.notice-board-modal .create-room-modal-back-btn {
    margin-left: auto;
}

.notice-board-modal .create-room-modal-back-btn.hidden + .create-room-modal-close-btn {
    margin-left: auto;
}

.create-room-modal-back-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #7f8c8d;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.create-room-modal-back-btn:hover {
    background: #ecf0f1;
    color: #2c3e50;
}

.create-room-type-step,
.create-room-form-step {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.create-room-form-step {
    flex: 1 1 auto;
}

.create-room-form-step.hidden,
.create-room-type-step.hidden {
    display: none;
}

.create-room-modal-dialog.is-type-selection {
    width: min(400px, 100%);
    max-height: none;
}

.create-room-modal-dialog.is-type-selection .create-room-modal-body {
    flex: 0 0 auto;
    padding: 16px 20px 20px;
}

.create-room-type-prompt {
    margin: 0 0 12px;
    font-size: 13px;
    color: #7f8c8d;
    font-weight: 400;
    line-height: 1.4;
}

.create-room-type-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.create-room-type-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border: 1px solid #e8ecef;
    border-radius: 10px;
    background: #fafbfc;
    color: #2c3e50;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.create-room-type-item:hover {
    background: #f4f7fb;
    border-color: #d5dbe3;
}

.create-room-type-item:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.create-room-type-item-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.create-room-type-item-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.create-room-type-item-desc {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: #7f8c8d;
    line-height: 1.4;
}

.create-room-type-item-chevron {
    flex-shrink: 0;
    font-size: 22px;
    line-height: 1;
    color: #a0aec0;
}

.create-room-modal-close-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #7f8c8d;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.create-room-modal-close-btn:hover {
    background: #ecf0f1;
    color: #2c3e50;
}

.create-room-modal-body {
    flex: 0 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 18px 20px 0;
}

.create-room-modal-dialog.notice-board-modal-dialog {
    width: min(640px, 100%);
}

.create-room-modal-body.notice-board-modal-body {
    padding: 0;
}

.notice-board-list-step,
.notice-board-detail-step {
    flex: 1 1 auto;
}

.create-room-modal-top {
    flex-shrink: 0;
}

.create-room-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #2c3e50;
    font-weight: 600;
}

.create-room-name-input,
.create-room-user-search-input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #2c3e50;
    font-size: 14px;
}

.create-room-name-input:focus,
.create-room-user-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.create-room-name-input::placeholder,
.create-room-user-search-input::placeholder {
    color: #95a5a6;
}

.create-room-modal-list-section {
    flex: 0 1 auto;
    min-height: 120px;
    max-height: 280px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-top: 10px;
    padding-bottom: 18px;
}

.create-room-label + .create-room-label,
.create-room-field-error + .create-room-label {
    margin-top: 16px;
}

.create-room-field-error {
    margin: 4px 0 0;
    font-size: 12px;
    color: #e74c3c;
    line-height: 1.4;
}

.create-room-field-error.hidden {
    display: none;
}

.create-room-name-input.is-invalid,
.create-room-user-search-input.is-invalid {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.12);
}

.create-room-user-search-input {
    margin-bottom: 0;
}

.create-room-selected-members {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding: 2px 0;
}

.create-room-selected-members.hidden {
    display: none;
}

.create-room-selected-member-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    padding: 4px 8px 4px 10px;
    border-radius: 999px;
    background: #eef2ff;
    border: 1px solid #dbe2ff;
    color: #2c3e50;
    font-size: 13px;
    line-height: 1.3;
}

.create-room-selected-member-chip-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.create-room-selected-member-chip-remove {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #667eea;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

.create-room-selected-member-chip-remove:hover {
    background: rgba(102, 126, 234, 0.12);
    color: #4c63d2;
}

.create-room-user-list {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    padding: 2px 0;
}

.create-room-user-list-section-header {
    flex-shrink: 0;
    padding: 8px 4px 4px;
    font-size: 12px;
    font-weight: 600;
    color: #7f8c8d;
    letter-spacing: 0.02em;
}

.create-room-user-list-section-header:not(:first-child) {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
}

.create-room-user-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8f9fa;
    color: #2c3e50;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}

.create-room-user-item:hover {
    background: #eef2ff;
    border-color: #dbe2ff;
}

.create-room-user-item input[type="checkbox"] {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.create-room-user-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.create-room-user-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.create-room-user-status-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #95a5a6;
}

.create-room-user-item.is-online .create-room-user-status-dot {
    background: #2ecc71;
}

.create-room-user-item.is-offline .create-room-user-status-dot {
    background: #bdc3c7;
}

.create-room-user-item.is-offline:not(.create-room-user-item--room-member) {
    opacity: 0.72;
}

.create-room-user-name {
    line-height: 1.3;
    word-break: break-word;
}

.create-room-user-name .member-lang-badge {
    color: #7f8c8d;
}

.create-room-user-meta {
    font-size: 12px;
    color: #7f8c8d;
    line-height: 1.4;
}

.create-room-user-item--room-member {
    cursor: default;
    opacity: 0.78;
    background: #f1f3f5;
}

.create-room-user-item--room-member:hover {
    background: #f1f3f5;
    border-color: transparent;
}

.create-room-user-item--room-member input[type="checkbox"] {
    cursor: not-allowed;
}

.create-room-user-member-badge {
    flex-shrink: 0;
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e9ecef;
    color: #6c757d;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
}

.create-room-status-message {
    flex-shrink: 0;
    margin: 10px 0 0;
    font-size: 13px;
    color: #95a5a6;
    text-align: center;
}

.create-room-status-message.hidden {
    display: none;
}

.create-room-actions {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 16px 20px 20px;
    border-top: 1px solid #e8ecef;
    background: #fff;
}

.create-room-solo-btn,
.create-room-together-btn,
.confirm-create-room-btn,
.cancel-create-room-btn {
    padding: 12px 14px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.create-room-solo-btn,
.create-room-together-btn {
    flex: 0 0 auto;
    min-width: 52px;
}

.confirm-create-room-btn,
.cancel-create-room-btn {
    flex: 1;
}

.create-room-solo-btn,
.confirm-create-room-btn {
    background: #667eea;
    color: #fff;
}

.create-room-solo-btn:hover,
.confirm-create-room-btn:hover {
    background: #5568d3;
}

.create-room-together-btn {
    background: #48bb78;
    color: #fff;
}

.create-room-together-btn:hover {
    background: #38a169;
}

.desktop-update-modal {
    position: fixed;
    inset: 0;
    z-index: 350;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 20px 20px;
    pointer-events: auto;
}

.desktop-update-modal.hidden {
    display: none;
}

body.desktop-update-modal-open {
    overflow: hidden;
}

body.desktop-update-modal-open #app {
    pointer-events: none;
}

.desktop-update-modal-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(0, 0, 0, 0.5);
}

.desktop-update-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.24);
    overflow: hidden;
}

.desktop-update-modal-header {
    padding: 18px 20px;
    border-bottom: 1px solid #e8ecef;
}

.desktop-update-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
}

.desktop-update-modal-body {
    padding: 20px;
}

.desktop-update-modal-body p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #4a5568;
    white-space: pre-line;
}

.desktop-update-modal-actions {
    display: flex;
    gap: 10px;
    padding: 16px 20px 20px;
    border-top: 1px solid #e8ecef;
}

.confirm-desktop-update-btn,
.cancel-desktop-update-btn {
    flex: 1;
    padding: 12px 14px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.confirm-desktop-update-btn {
    background: #667eea;
    color: #fff;
}

.confirm-desktop-update-btn:hover {
    background: #5568d3;
}

.cancel-desktop-update-btn {
    background: #ecf0f1;
    color: #2c3e50;
}

.cancel-desktop-update-btn:hover {
    background: #dfe6e9;
}

.app-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 20px 20px;
    pointer-events: auto;
}

.app-confirm-modal.hidden {
    display: none;
}

body.app-confirm-modal-open {
    overflow: hidden;
}

body.app-confirm-modal-open #app {
    pointer-events: none;
}

.app-confirm-modal-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(0, 0, 0, 0.5);
}

.app-confirm-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.24);
    overflow: hidden;
}

.app-confirm-modal-body {
    padding: 24px 20px 8px;
}

.app-confirm-modal-body p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #4a5568;
    white-space: pre-line;
}

.app-confirm-modal-actions {
    display: flex;
    gap: 10px;
    padding: 16px 20px 20px;
}

.app-confirm-modal-confirm-btn,
.app-confirm-modal-cancel-btn {
    flex: 1;
    padding: 12px 14px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.app-confirm-modal-confirm-btn {
    background: #667eea;
    color: #fff;
}

.app-confirm-modal-confirm-btn:hover {
    background: #5568d3;
}

.app-confirm-modal-confirm-btn.is-danger {
    background: #e53e3e;
}

.app-confirm-modal-confirm-btn.is-danger:hover {
    background: #c53030;
}

.app-confirm-modal-cancel-btn {
    background: #ecf0f1;
    color: #2c3e50;
}

.app-confirm-modal-cancel-btn:hover {
    background: #dfe6e9;
}

.app-confirm-modal-cancel-btn.hidden {
    display: none;
}

.cancel-create-room-btn {
    background: #ecf0f1;
    color: #2c3e50;
}

.cancel-create-room-btn:hover {
    background: #dfe6e9;
}

.create-room-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.create-room-btn-icon {
    width: 22px;
    height: 22px;
    display: block;
}

.create-room-btn-icon-group {
    width: 66px;
    height: 22px;
}

.create-room-btn-icon-x {
    font-size: 22px;
    line-height: 1;
    font-weight: 500;
}

.room-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 8px;
}

.room-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    background: #34495e;
    border-radius: 5px;
    cursor: pointer;
}

.room-item.is-room-active,
.room-item:hover {
    background: #3d566e;
}

.room-item-body {
    flex: 1;
    min-width: 0;
}

.room-item-actions {
    display: grid;
    grid-template-columns: auto auto;
    justify-items: end;
    align-items: center;
    gap: 4px 6px;
    flex-shrink: 0;
    cursor: default;
}

.room-item-summarize-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    background: #3498db;
    color: #fff;
    font-size: 11px;
    line-height: 1.3;
    white-space: nowrap;
    cursor: pointer;
}

.room-item-summarize-btn:hover {
    background: #2980b9;
}

.room-item-summarize-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.room-item-leave-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #ecf0f1;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.room-item-leave-btn:hover {
    background: rgba(231, 76, 60, 0.25);
    color: #e74c3c;
}

.room-item-rename-btn {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #bdc3c7;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.room-item-rename-btn:hover {
    background: rgba(52, 152, 219, 0.2);
    color: #ecf0f1;
}

.room-item-rename-icon {
    width: 14px;
    height: 14px;
}

.room-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.room-item-title-row {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.room-item-name {
    font-weight: bold;
    font-size: 15px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.room-item-member-count {
    font-size: 0.82em;
    font-weight: 600;
    color: #bdc3c7;
    vertical-align: baseline;
}

.room-item-header-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.room-item-date {
    grid-column: 1 / -1;
    justify-self: end;
    font-size: 13px;
    color: #bdc3c7;
    white-space: nowrap;
}

.room-item-preview {
    font-size: 12px;
    color: #bdc3c7;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.room-item-unread {
    min-width: 20px;
    padding: 2px 6px;
    border-radius: 10px;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    text-align: center;
}

.room-item-count {
    font-size: 12px;
    color: #bdc3c7;
}

.no-rooms {
    text-align: center;
    color: #bdc3c7;
    padding: 20px;
    font-size: 14px;
}

.room-attachments-modal {
    position: fixed;
    inset: 0;
    z-index: 305;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.room-attachments-modal.hidden {
    display: none;
}

body.room-attachments-modal-open {
    overflow: hidden;
}

.room-attachments-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.room-attachments-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    max-height: min(78vh, 640px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 32px rgba(15, 32, 58, 0.18);
    overflow: hidden;
}

.room-attachments-modal-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 12px;
    border-bottom: 1px solid #ecf0f1;
}

.room-attachments-modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: #2c3e50;
}

.room-attachments-modal-close-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: #ecf0f1;
    color: #5d6d7e;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.room-attachments-modal-close-btn:hover {
    background: #dfe6e9;
    color: #2c3e50;
}

.room-attachments-modal-tabs {
    flex-shrink: 0;
    display: flex;
    gap: 0;
    padding: 0 12px 10px;
    border-bottom: 1px solid #ecf0f1;
}

.room-attachments-tab {
    flex: 1;
    padding: 10px 8px;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #7f8c8d;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.room-attachments-tab.is-active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.room-attachments-modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 16px 20px;
}

.room-attachments-modal-content {
    min-height: 120px;
}

.room-attachments-modal-content.is-loading,
.room-attachments-modal-content.is-empty,
.room-attachments-modal-content.is-error {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    color: #7f8c8d;
    font-size: 14px;
    text-align: center;
}

.room-attachments-modal-content.is-error {
    color: #e74c3c;
}

.room-attachments-image-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.room-attachments-image-item {
    position: relative;
    aspect-ratio: 1;
    border: none;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #ecf0f1;
}

.room-attachments-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.room-attachments-image-item-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 4px 6px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
    color: #fff;
    font-size: 10px;
    line-height: 1.2;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.room-attachments-file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.room-attachments-file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e8ecef;
    border-radius: 10px;
    background: #f8fafb;
    transition: background 0.2s, border-color 0.2s;
}

.room-attachments-file-item:hover {
    background: #f0f4f8;
    border-color: #d5dce3;
}

.room-attachments-file-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #667eea;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.room-attachments-file-meta {
    flex: 1;
    min-width: 0;
}

.room-attachments-file-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.room-attachments-file-sub {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: #7f8c8d;
}

.room-attachments-download-btn {
    flex-shrink: 0;
    padding: 8px 12px;
    border: 1px solid #667eea;
    border-radius: 8px;
    background: #fff;
    color: #667eea;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.room-attachments-download-btn:hover {
    background: #667eea;
    color: #fff;
}

.room-attachments-mixed-list .room-attachments-file-item {
    margin-bottom: 0;
}

.room-attachments-section-label {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 600;
    color: #95a5a6;
    letter-spacing: 0.02em;
}

.room-attachments-section-label + .room-attachments-image-grid,
.room-attachments-section-label + .room-attachments-file-list {
    margin-bottom: 16px;
}

@media (min-width: 600px) {
    .room-attachments-modal {
        align-items: center;
        padding: 20px;
    }

    .room-attachments-modal-dialog {
        border-radius: 16px;
        max-height: min(80vh, 680px);
    }
}

.room-summary-modal {
    position: fixed;
    inset: 0;
    z-index: 310;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 8vh 20px 20px;
}

.room-summary-modal.hidden {
    display: none;
}

body.room-summary-modal-open {
    overflow: hidden;
}

.room-summary-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.room-summary-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(600px, 100%);
    max-height: calc(100vh - 8vh - 20px);
    display: flex;
    flex-direction: column;
    background: #f4f7fb;
    border-radius: 16px;
    box-shadow: 0 20px 56px rgba(15, 32, 58, 0.22);
    overflow: hidden;
}

.room-summary-modal-hero {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 20px 18px;
    background: linear-gradient(135deg, #1f3a5f 0%, #2c5f8f 55%, #3498db 100%);
    color: #fff;
}

.room-summary-briefing-badge {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.room-summary-modal-hero-text {
    flex: 1;
    min-width: 0;
}

.room-summary-modal-eyebrow {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.82;
}

.room-summary-modal-hero h3 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

.room-summary-modal-room-name {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.room-summary-modal-close-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.room-summary-modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.room-summary-modal-hero-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.room-summary-copy-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
}

.room-summary-copy-btn.hidden {
    display: none;
}

.room-summary-copy-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.room-summary-copy-btn:active {
    background: rgba(255, 255, 255, 0.28);
}

.room-summary-copy-icon {
    width: 16px;
    height: 16px;
    display: block;
}

.room-summary-modal-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 16px 16px 8px;
}

.room-summary-modal-content {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: #2c3e50;
    word-break: break-word;
}

.room-summary-modal-content.is-loading {
    padding: 4px 0;
}

.room-summary-modal-content.is-error {
    padding: 14px 16px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #f5c6cb;
    color: #c0392b;
    text-align: center;
}

.room-summary-modal-footer {
    flex-shrink: 0;
    padding: 12px 20px 16px;
    font-size: 12px;
    color: #7f8c8d;
    text-align: center;
    background: #f4f7fb;
    border-top: 1px solid #e3eaf3;
}

.gpt-assistant-button-label {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
}

.gpt-assistant-modal {
    position: fixed;
    inset: 0;
    z-index: 311;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 8vh 20px 20px;
}

.gpt-assistant-modal.hidden {
    display: none;
}

body.gpt-assistant-modal-open {
    overflow: hidden;
}

.gpt-assistant-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.gpt-assistant-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    max-height: calc(100vh - 8vh - 20px);
    display: flex;
    flex-direction: column;
    background: #f4f7fb;
    border-radius: 16px;
    box-shadow: 0 20px 56px rgba(15, 32, 58, 0.22);
    overflow: hidden;
}

.gpt-assistant-modal-hero {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 20px 16px;
    background: linear-gradient(135deg, #1f3a5f 0%, #3d6ea8 100%);
    color: #fff;
}

.gpt-assistant-modal-hero-text h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.gpt-assistant-modal-close-btn {
    margin-left: auto;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.gpt-assistant-modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.24);
}

.gpt-assistant-modal-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 16px;
}

.gpt-assistant-query-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1f3a5f;
}

.gpt-assistant-query-input {
    width: 100%;
    height: 108px;
    max-height: 108px;
    padding: 12px 14px;
    border: 1px solid #d5e0ec;
    border-radius: 12px;
    background: #fff;
    font: inherit;
    font-size: 14px;
    line-height: 1.55;
    color: #2c3e50;
    resize: none;
    overflow-y: auto;
    box-sizing: border-box;
}

.gpt-assistant-query-input:focus {
    outline: none;
    border-color: #3d6ea8;
    box-shadow: 0 0 0 3px rgba(61, 110, 168, 0.15);
}

.gpt-assistant-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.gpt-assistant-submit-btn {
    min-width: 96px;
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: #3d6ea8;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.gpt-assistant-submit-btn:hover:not(:disabled) {
    background: #2f5988;
}

.gpt-assistant-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.gpt-assistant-status-message {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: #1f3a5f;
    background: #eef4fb;
}

.gpt-assistant-status-message.hidden {
    display: none;
}

.gpt-assistant-status-message.is-loading {
    color: #3d6ea8;
}

.gpt-assistant-status-message.is-error {
    color: #c0392b;
    background: #fdecea;
}

.gpt-assistant-results-section {
    margin-top: 16px;
}

.gpt-assistant-results-section.hidden {
    display: none;
}

.gpt-assistant-results-heading {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: #1f3a5f;
}

.gpt-assistant-results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gpt-assistant-result-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    padding: 16px 18px;
    border: 1px solid #d5e0ec;
    border-radius: 14px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.gpt-assistant-result-item:hover {
    border-color: #3d6ea8;
    box-shadow: 0 6px 18px rgba(61, 110, 168, 0.14);
    transform: translateY(-1px);
}

.gpt-assistant-result-group-label {
    margin: 4px 0 2px;
    font-size: 12px;
    font-weight: 700;
    color: #7f8c8d;
}

.gpt-assistant-result-answer {
    padding: 14px 16px;
    border-radius: 12px;
    background: #f7fafc;
    border-left: 3px solid #8eb4dc;
    font-size: 14px;
    line-height: 1.75;
    color: #2c3e50;
    white-space: pre-wrap;
    word-break: break-word;
    user-select: text;
}

.gpt-assistant-result-action {
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eef4fb;
    color: #3d6ea8;
    font-size: 12px;
    font-weight: 600;
}

.gpt-assistant-modal-footer {
    flex-shrink: 0;
    padding: 12px 20px 16px;
    font-size: 12px;
    color: #7f8c8d;
    text-align: center;
    background: #f4f7fb;
    border-top: 1px solid #e3eaf3;
}

.summary-document-inner {
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e3eaf3;
    box-shadow: 0 2px 8px rgba(31, 58, 95, 0.05);
}

.summary-date-heading {
    margin: 1rem 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f3a5f;
}

.summary-document-inner .summary-date-heading:first-child {
    margin-top: 0;
}

.summary-date-body {
    margin: 0 0 0.25rem;
    padding: 0 0 0 0.35rem;
}

.summary-day-summary {
    margin: 0 0 12px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.55;
    font-weight: 600;
    color: #1f3a5f;
    background: #f0f5fb;
    border-radius: 8px;
    border-left: 3px solid #3d6ea8;
}

.summary-day-summary strong {
    font-weight: 700;
}

.summary-topic-heading {
    margin: 14px 0 8px;
    padding: 8px 10px;
    font-size: 0.92rem;
    line-height: 1.45;
    font-weight: 600;
    color: #1f3a5f;
    background: #eef3fa;
    border-radius: 6px;
    border-left: 3px solid #2c5282;
}

.summary-topic-label {
    font-weight: 700;
    color: #2c5282;
}

.summary-topic-separator {
    color: #5d6d7e;
}

.summary-topic-name {
    font-weight: 600;
    color: #1f3a5f;
}

.summary-block {
    margin: 0 0 10px;
}

.summary-block-heading {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #5d6d7e;
    text-transform: none;
}

.summary-block--decisions .summary-block-heading {
    color: #1e6b3a;
}

.summary-block--actionItems .summary-block-heading {
    color: #1f4f8f;
}

.summary-block--issues .summary-block-heading {
    color: #b45309;
}

.summary-block--notes .summary-block-heading,
.summary-block--misc .summary-block-heading {
    color: #6b7280;
}

.summary-block--issues .summary-list li {
    color: #7c4a03;
}

.summary-paragraph,
.summary-sentence {
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.6;
    color: #34495e;
}

.summary-paragraph:last-child,
.summary-date-heading + .summary-sentence:last-child,
.summary-sentence:last-child {
    margin-bottom: 0;
}

.summary-list {
    margin: 0 0 12px;
    padding: 0 0 0 18px;
    list-style: disc;
}

.summary-list li {
    margin: 0 0 6px;
    font-size: 14px;
    line-height: 1.65;
    color: #34495e;
}

.summary-list li:last-child {
    margin-bottom: 0;
}

.summary-list li strong {
    color: #1f3a5f;
}

.summary-loading {
    padding: 20px 16px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e3eaf3;
}

.summary-loading-notice {
    margin: 16px 0 8px;
    font-size: 13px;
    line-height: 1.55;
    color: #7f8c8d;
    white-space: pre-line;
    text-align: center;
}

.summary-loading-line {
    height: 10px;
    margin-bottom: 10px;
    border-radius: 6px;
    background: linear-gradient(90deg, #eef2f7 25%, #e3eaf3 50%, #eef2f7 75%);
    background-size: 200% 100%;
    animation: summary-shimmer 1.4s ease-in-out infinite;
}

.summary-loading-line.short {
    width: 35%;
}

.summary-loading-line.medium {
    width: 65%;
}

.summary-loading-line.long {
    width: 100%;
}

.summary-loading-text {
    margin: 0;
    font-size: 13px;
    color: #7f8c8d;
    text-align: center;
}

@keyframes summary-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.briefing-document-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.briefing-section {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e3eaf3;
    box-shadow: 0 2px 8px rgba(31, 58, 95, 0.05);
    overflow: hidden;
}

.briefing-section-lead {
    border-left: 4px solid #3498db;
}

.briefing-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 0;
}

.briefing-section-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eef4fb;
    font-size: 14px;
    line-height: 1;
}

.briefing-section-head h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #1f3a5f;
    line-height: 1.4;
}

.briefing-section-body {
    padding: 8px 14px 14px;
}

.briefing-section-lead .briefing-section-body {
    padding-top: 14px;
}

.briefing-paragraph {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.65;
    color: #34495e;
}

.briefing-paragraph:last-child {
    margin-bottom: 0;
}

.briefing-list {
    margin: 0;
    padding: 0 0 0 4px;
    list-style: none;
}

.briefing-list li {
    position: relative;
    margin: 0 0 8px;
    padding-left: 18px;
    font-size: 14px;
    line-height: 1.6;
    color: #34495e;
}

.briefing-list li:last-child {
    margin-bottom: 0;
}

.briefing-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.62em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3498db;
    transform: translateY(-50%);
}

.briefing-list-ordered {
    counter-reset: briefing-counter;
    padding-left: 0;
}

.briefing-list-ordered li {
    counter-increment: briefing-counter;
    padding-left: 26px;
}

.briefing-list-ordered li::before {
    content: counter(briefing-counter);
    top: 0;
    transform: none;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: #eef4fb;
    color: #2c5f8f;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}

.briefing-section-body strong {
    color: #1f3a5f;
    font-weight: 600;
}

.briefing-loading {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.briefing-loading-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e3eaf3;
    padding: 16px;
}

.briefing-loading-line {
    height: 10px;
    border-radius: 6px;
    background: linear-gradient(90deg, #e8eef5 0%, #f5f8fc 50%, #e8eef5 100%);
    background-size: 200% 100%;
    animation: briefing-shimmer 1.4s ease-in-out infinite;
}

.briefing-loading-line.short {
    width: 42%;
    margin-bottom: 12px;
}

.briefing-loading-line.medium {
    width: 72%;
    margin-bottom: 10px;
}

.briefing-loading-line.long {
    width: 100%;
}

@keyframes briefing-shimmer {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

.chat-area {
    position: relative;
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
    background: #d9e0e6;
}

.chat-area:has(.chat-search-row:not(.hidden)) {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.chat-area:has(.chat-search-row:not(.hidden)) .messages-wrapper {
    grid-row: 3;
}

.chat-area:has(.chat-search-row:not(.hidden)) .message-input-container {
    grid-row: 4;
}

.room-info {
    grid-row: 1;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    padding: 10px 16px;
    background: white;
    border-bottom: 1px solid #ddd;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 8px;
}

.room-info .toggle-sidebar-btn {
    grid-column: 1;
    grid-row: 1;
}

.room-info h2 {
    min-width: 0;
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.room-title-row {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
}

.create-room-hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: #7f8c8d;
    line-height: 1.4;
}

.participants-backdrop {
    grid-column: 1;
    grid-row: 2 / -1;
    align-self: stretch;
    justify-self: stretch;
    position: absolute;
    inset: 0;
    z-index: 209;
    display: none;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.chat-area:has(.chat-search-row:not(.hidden)) .participants-backdrop,
.chat-area:has(.chat-search-row:not(.hidden)) .room-participants-panel {
    grid-row: 3 / -1;
}

.participants-backdrop.is-open {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.room-participants-panel {
    grid-column: 1;
    grid-row: 2 / -1;
    align-self: stretch;
    justify-self: end;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 210;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    width: min(320px, 85vw);
    background: #fff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.25s ease, visibility 0.25s ease;
}

.room-participants-panel.is-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

.room-participants-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: #fff;
    border-bottom: 1px solid #e1e4e8;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.close-participants-panel-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #7f8c8d;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.close-participants-panel-btn:hover {
    background: #ecf0f1;
    color: #2c3e50;
}

.room-participants-scroll {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
}

.room-participants-list {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 8px 0 16px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
}

.room-participant-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px 18px;
    border-bottom: 1px solid #f0f2f5;
    background: #fff;
}

.room-participant-item.is-offline {
    opacity: 0.72;
}

.room-participant-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.room-participant-status-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #95a5a6;
}

.room-participant-item.is-online .room-participant-status-dot {
    background: #2ecc71;
}

.room-participant-item.is-offline .room-participant-status-dot {
    background: #bdc3c7;
}

.room-participant-item:last-child {
    border-bottom: none;
}

.room-participant-name {
    font-size: 15px;
    color: #2c3e50;
    font-weight: 600;
    line-height: 1.3;
    word-break: break-word;
}

.room-participant-name .member-lang-badge {
    color: #7f8c8d;
}

.room-participant-meta {
    font-size: 12px;
    color: #7f8c8d;
    line-height: 1.4;
}

.room-participants-empty {
    padding: 32px 18px;
    text-align: center;
    font-size: 14px;
    color: #95a5a6;
}

.room-participants-add-btn {
    display: block;
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-top: 1px solid #e8ecef;
    background: #fff;
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.room-participants-add-btn:hover {
    background: #f4f6ff;
    color: #5568d3;
}

.room-info .room-info-actions {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.room-info .chat-search-toggle-btn,
.room-info .room-menu-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f5f7fc;
    color: #5f6b7c;
    line-height: 1;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.room-info .room-header-action-icon {
    width: 18px;
    height: 18px;
    display: block;
}

.room-info .chat-search-toggle-btn:hover,
.room-info .room-menu-btn:hover,
.room-info .room-menu-btn.is-open {
    background: #eaf0ff;
    border-color: #c5d0ef;
    color: #3d56d6;
}

.room-info .chat-search-toggle-btn.is-active {
    background: #eaf0ff;
    border-color: #667eea;
    color: #3d56d6;
}

.room-menu-wrapper {
    position: relative;
}

.room-menu-btn,
.close-chat-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.2s, color 0.2s;
}

.room-menu-btn {
    background: #ecf0f1;
    color: #2c3e50;
    border: 1px solid #ddd;
    font-size: 18px;
    font-weight: 600;
}

.room-menu-btn:hover,
.room-menu-btn.is-open {
    background: #dfe6e9;
    color: #667eea;
}

.close-chat-btn {
    background: #95a5a6;
    color: white;
    font-size: 26px;
    font-weight: 400;
}

.close-chat-btn:hover {
    background: #7f8c8d;
}

.room-menu-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 180px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 50;
    overflow: hidden;
}

.room-menu-dropdown.hidden {
    display: none;
}

.room-menu-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: white;
    color: #2c3e50;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s;
}

.room-menu-item:hover {
    background: #f4f6f8;
}

.room-menu-item.danger {
    color: #e74c3c;
}

.room-menu-item.danger:hover {
    background: #fdecea;
}

.room-users {
    display: none;
}

.room-user-item {
    padding: 5px 10px;
    background: #3498db;
    color: white;
    border-radius: 15px;
    font-size: 12px;
}

.toggle-sidebar-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ecf0f1;
    color: #2c3e50;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 20px;
    font-weight: 600;
    line-height: 1;
    transition: background 0.2s, color 0.2s;
}

.toggle-sidebar-btn:hover {
    background: #dfe6e9;
    color: #667eea;
}

.toggle-sidebar-btn.is-expanded {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.toggle-sidebar-btn.is-expanded:hover {
    background: #5568d3;
    border-color: #5568d3;
}

.messages-wrapper {
    grid-row: 2;
    position: relative;
    z-index: 1;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

/* in-room: wrapper 1칸 grid에 messages를 채워 스크롤 (flex/grid 초기 높이 버그 방지) */
.chat-container.in-room .messages-wrapper {
    display: grid;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
}

.chat-container.in-room .messages {
    grid-area: 1 / 1;
    position: relative;
    z-index: 1;
    flex: none;
    width: 100%;
    height: 100%;
    max-height: 100%;
    min-width: 0;
    min-height: 0;
    align-self: stretch;
    justify-self: stretch;
    align-content: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
}

.messages-scroll-date-label {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    padding: 6px 14px;
    border-radius: 16px;
    background: rgba(44, 62, 80, 0.88);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.messages-scroll-date-label.is-visible {
    opacity: 1;
    visibility: visible;
}

.messages-incoming-preview {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 31;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: min(calc(100% - 88px), 360px);
    padding: 9px 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
    cursor: pointer;
    pointer-events: auto;
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.messages-incoming-preview:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.18);
}

.messages-incoming-preview.hidden {
    display: none;
}

.messages-incoming-preview-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    color: #2c3e50;
    text-align: center;
}

.messages-scroll-to-bottom-btn {
    position: absolute;
    right: 12px;
    bottom: 16px;
    z-index: 32;
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    background: rgba(245, 245, 245, 0.96);
    color: #4a4a4a;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    pointer-events: auto;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.messages-scroll-to-bottom-btn:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

.messages-scroll-to-bottom-btn:active {
    transform: scale(0.96);
}

.messages-scroll-to-bottom-btn.hidden {
    display: none;
}

.messages-scroll-to-bottom-icon {
    width: 18px;
    height: 18px;
    display: block;
    pointer-events: none;
}

.messages-wrapper.is-room-history-settling .messages {
    visibility: hidden;
}

.messages-wrapper.is-room-history-settling .messages-scroll-to-bottom-btn,
.messages-wrapper.is-room-history-settling .messages-incoming-preview {
    display: none !important;
}

.room-history-settling-indicator {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #d9e0e6;
    color: #5d6d7e;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    pointer-events: none;
}

.room-history-settling-indicator.hidden {
    display: none;
}

.room-history-settling-text {
    color: #5d6d7e;
}

.older-history-loading-indicator {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 21;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    color: #5d6d7e;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    pointer-events: none;
}

.older-history-loading-indicator.hidden {
    display: none;
}

.older-history-loading-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(102, 126, 234, 0.25);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: older-history-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes older-history-spin {
    to {
        transform: rotate(360deg);
    }
}

.room-entry-guide-overlay {
    position: absolute;
    inset: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(236, 240, 241, 0.92);
    backdrop-filter: blur(2px);
}

.room-entry-guide-overlay.hidden {
    display: none;
}

.room-entry-guide-card {
    width: min(100%, 360px);
    padding: 28px 24px 22px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 32px rgba(44, 62, 80, 0.14);
    text-align: center;
}

.room-entry-guide-welcome {
    margin: 0 0 16px;
    color: #3d4f7c;
    font-size: 14px;
    line-height: 1.65;
    white-space: pre-wrap;
}

.room-entry-guide-enter {
    margin: 0 0 22px;
    color: #2c3e50;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.room-entry-guide-dismiss-btn {
    min-width: 120px;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    background: #667eea;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.room-entry-guide-dismiss-btn:hover {
    background: #5568d3;
}

.chat-search-row {
    grid-row: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 8px 16px;
    background: #fff;
    border-bottom: 1px solid #ddd;
}

.chat-search-row.hidden {
    display: none !important;
}

.chat-search-toggle-btn,
.chat-search-close-btn {
    height: 34px;
    min-width: 34px;
    padding: 0 10px;
    border: 1px solid #cfd7e6;
    border-radius: 8px;
    background: #f5f7fc;
    color: #34495e;
    font-size: 16px;
    cursor: pointer;
}

.chat-search-toggle-btn.is-active {
    background: #eaf0ff;
    border-color: #667eea;
    color: #3d56d6;
}

.chat-search-input {
    flex: 1;
    min-width: 140px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    font-size: 16px;
    color: #2c3e50;
    background: #fff;
}

.chat-search-nav-btn {
    height: 34px;
    padding: 0 12px;
    border: 1px solid #cfd7e6;
    border-radius: 8px;
    background: #f5f7fc;
    color: #34495e;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.chat-search-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-search-result-count {
    min-width: 70px;
    font-size: 12px;
    color: #5f6b7c;
    text-align: right;
}

.messages > * {
    flex-shrink: 0;
}

.messages {
    width: 100%;
    min-height: 0;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overflow-anchor: none;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: rgba(44, 62, 80, 0.35) transparent;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    --message-bubble-max-width: 65%;
}

.message-group {
    display: flex;
    flex-direction: column;
    width: fit-content;
    max-width: var(--message-bubble-max-width);
    min-width: 0;
}

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

.message-group.other {
    align-self: flex-start;
    align-items: flex-start;
}

.message-group-bubbles {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: auto;
    max-width: 100%;
    min-width: 0;
}

.message-group.own .message-group-bubbles {
    align-items: flex-end;
    width: fit-content;
    max-width: 100%;
}

.message-group.other .message-group-bubbles {
    align-items: flex-start;
    width: fit-content;
    max-width: 100%;
}

.message-group-bubbles > .message-row.own {
    align-self: flex-end;
    width: auto;
    max-width: 100%;
}

.message-group-bubbles > .message-row.other {
    align-self: flex-start;
    width: auto;
    max-width: 100%;
}

.message-group-bubbles > .message-row.own,
.message-group-bubbles > .message-row.other {
    min-width: 0;
}

.message-group-bubbles .message.own {
    align-self: flex-end;
    width: auto;
    max-width: 100%;
}

.message-group-bubbles .message.other {
    align-self: flex-start;
    width: auto;
    max-width: 100%;
}

.message-group-time {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.2;
    color: #8e99a4;
    user-select: none;
}

.message-group.own .message-group-time {
    align-self: flex-end;
    text-align: right;
    padding-right: 0;
    white-space: nowrap;
}

.message-group.other .message-group-time {
    text-align: left;
    padding-left: 2px;
}

.message-group-bubbles .message {
    min-width: 0;
    border-radius: 0;
    padding: 9px 12px;
}

.message-group-bubbles .message-group-single,
.message-group-bubbles .message-group-first,
.message-group-bubbles .message-group-middle,
.message-group-bubbles .message-group-last {
    border-radius: 0;
    margin-top: 0;
}

.message-group-bubbles .message-group-middle,
.message-group-bubbles .message-group-last:not(.message-group-first) {
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    padding-top: 8px;
}

.message-group.other .message-group-bubbles .message-group-middle,
.message-group.other .message-group-bubbles .message-group-last:not(.message-group-first) {
    border-top-color: rgba(44, 62, 80, 0.14);
}

.message-group-bubbles .message-group-first:not(.message-group-last) {
    padding-bottom: 8px;
}

.message-header.hidden {
    display: none;
}

.message {
    width: auto;
    max-width: var(--message-bubble-max-width);
    min-width: 0;
    box-sizing: border-box;
    padding: 9px 12px;
    border-radius: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.message.own {
    align-self: flex-end;
    width: auto;
    max-width: var(--message-bubble-max-width);
    background: #667eea;
    color: white;
}

.message.other {
    align-self: flex-start;
    width: auto;
    max-width: 100%;
    background: #f7f9fc;
    color: #1b2430;
    border: 1px solid #b7c2ce;
    box-shadow: 0 1px 3px rgba(44, 62, 80, 0.14);
}

.message-row.own {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    align-self: flex-end;
    width: auto;
    max-width: var(--message-bubble-max-width);
    min-width: 0;
    box-sizing: border-box;
}

.message-row.own .message.own {
    align-self: auto;
    flex: 0 1 auto;
    width: auto;
    max-width: 100%;
    min-width: 0;
}

.message-row.other {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    align-self: flex-start;
    width: auto;
    max-width: var(--message-bubble-max-width);
    min-width: 0;
    box-sizing: border-box;
}

.message-row.other .message.other {
    align-self: auto;
    flex: 0 1 auto;
    width: auto;
    max-width: 100%;
    min-width: 0;
}

.message-read-count {
    flex-shrink: 0;
    min-width: 10px;
    font-size: 11px;
    line-height: 1.2;
    color: #8e99a4;
    padding-bottom: 2px;
    user-select: none;
}

.message-read-count.hidden {
    display: none;
}

.message.system {
    align-self: center;
    background: #bdc3c7;
    color: white;
    font-size: 12px;
    padding: 8px 15px;
    width: auto;
    max-width: 90%;
    min-width: 0;
}

.message.system.system-with-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.message.system .system-message-text {
    line-height: 1.3;
}

.message.system .system-reinvite-btn {
    border: 0;
    border-radius: 12px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.92);
    color: #4a6278;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.2;
}

.message.system .system-reinvite-btn:hover:not(:disabled) {
    background: #ffffff;
}

.message.system .system-reinvite-btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.message-date-divider {
    align-self: center;
    margin: 4px 0;
    padding: 6px 14px;
    border-radius: 16px;
    background: rgba(189, 195, 199, 0.55);
    color: #5d6d7e;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
}

.message-unread-divider {
    flex-shrink: 0;
}

.message-header {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    min-width: 0;
}

.message-username {
    font-weight: bold;
    opacity: 0.85;
}

.message.other .message-username {
    color: #3d4a5c;
}

.message-content {
    font-size: 13px;
    line-height: 1.4;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: pre-wrap;
}

.message-content.is-single-emoji {
    font-size: 48px;
    line-height: 1.15;
}

.message-content.has-quoted-mention {
    white-space: normal;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.message-quoted-mention {
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.35;
}

.message-quoted-mention-header {
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.message-quoted-mention-text {
    font-size: 12px;
    line-height: 1.35;
    opacity: 0.92;
    white-space: pre-wrap;
    word-break: break-word;
}

.message-mention-reply-divider {
    height: 1px;
    margin: 8px 0;
    background: rgba(0, 0, 0, 0.1);
}

.message-quoted-mention.is-clickable {
    cursor: pointer;
}

.message-quoted-mention.is-clickable:hover {
    opacity: 0.95;
}

.message-main-text {
    font-size: 13px;
    white-space: pre-wrap;
    line-height: 1.45;
}

.message.other .message-quoted-mention {
    border-left: 3px solid #d4b896;
    background: #faf6ed;
    color: #5c4f3f;
}

.message.other .message-quoted-mention-header {
    color: #3f3428;
}

.message.other .message-quoted-mention-text {
    color: #6b5d4d;
}

.message.other .message-mention-reply-divider {
    background: rgba(0, 0, 0, 0.08);
}

.message.own .message-quoted-mention {
    border-left: 3px solid rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.message.own .message-quoted-mention-header {
    color: #fff;
}

.message.own .message-quoted-mention-text {
    color: rgba(255, 255, 255, 0.92);
}

.message.own .message-mention-reply-divider {
    background: rgba(255, 255, 255, 0.35);
}

.chat-search-highlight {
    padding: 0 1px;
    border-radius: 3px;
    background: #fff2a8;
    color: inherit;
}

.message.own .chat-search-highlight {
    background: #ffe066;
    color: #1a2744;
    font-weight: 600;
}

.message.search-focused {
    outline: 2px solid rgba(102, 126, 234, 0.5);
    outline-offset: 2px;
}

.message.mention-target-focused {
    outline: 2px solid rgba(16, 185, 129, 0.55);
    outline-offset: 2px;
}

.message-user-mention {
    font-weight: 700;
}

.message.other .message-user-mention {
    color: #1d4ed8;
}

.message.own .message-user-mention {
    color: #dbeafe;
}

.message.other.message-user-mentioned {
    background: #fff8e1;
    border-color: #f0d48a;
}

.message-content.image-content {
    line-height: normal;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.message-content.file-content {
    line-height: normal;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.message-content.has-link-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: min(100%, 320px);
}

.message-main-text {
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-message-link {
    color: #2563eb;
    text-decoration: underline;
    word-break: break-all;
}

.message.own .chat-message-link {
    color: #dbeafe;
}

.chat-link-preview-card {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    background: #ffffff;
    color: #111827;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.message.own .chat-link-preview-card {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.96);
}

.chat-link-preview-card:hover {
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.chat-link-preview-image {
    display: block;
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    background: #f3f4f6;
}

.chat-link-preview-image-wrap {
    background: #f3f4f6;
    min-height: 120px;
}

.chat-link-preview-image-wrap.is-image-missing {
    min-height: 0;
    display: none;
}

.chat-link-preview-body {
    padding: 10px 12px 12px;
}

.chat-link-preview-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chat-link-preview-description {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.4;
    color: #6b7280;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chat-link-preview-domain {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.3;
    color: #2563eb;
    word-break: break-all;
}

.message-toggle-original-button {
    display: inline-flex;
    margin-top: 8px;
    padding: 5px 10px;
    border: none;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.08);
    color: inherit;
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
}

.message-toggle-original-button:hover {
    text-decoration: underline;
}

.message.own .message-toggle-original-button {
    background: rgba(255, 255, 255, 0.22);
    color: white;
}

.message-mention-preview-container {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    padding: 10px 12px;
    border: 1px solid #e8dcc8;
    border-left: 3px solid #d4b896;
    border-radius: 8px;
    background: #faf6ed;
}

.message-mention-preview-body {
    flex: 1;
    min-width: 0;
}

.message-mention-preview-header {
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #3f3428;
    line-height: 1.3;
}

.message-mention-preview-quote {
    font-size: 12px;
    color: #6b5d4d;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clear-message-mention-button {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: #efe4d4;
    color: #5c4f3f;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.message-context-menu {
    position: fixed;
    z-index: 1100;
    min-width: 110px;
    padding: 6px;
    border: 1px solid #d4dcea;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
}

.message-context-menu-item {
    width: 100%;
    padding: 7px 10px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #2c3e50;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.message-context-menu-item:hover {
    background: #f2f5fb;
}

.chat-image-message-body {
    position: relative;
    display: inline-block;
    max-width: 100%;
    min-width: 0;
}

.chat-image-thumbnail-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    overflow: hidden;
    max-width: min(280px, 100%);
    width: fit-content;
    /* 로드 전 높이 붕괴로 입장 스크롤이 어긋나는 것을 완화 */
    min-height: 120px;
    min-width: 120px;
    margin: 0 auto;
}

.chat-image-thumbnail {
    display: block;
    max-width: 100%;
    max-height: 220px;
    width: auto;
    height: auto;
    margin: 0 auto;
    border-radius: 10px;
    object-fit: contain;
}

.chat-image-thumbnail-button:hover .chat-image-thumbnail {
    opacity: 0.92;
}

.image-download-link {
    position: absolute;
    right: 6px;
    bottom: 6px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.62);
    color: #fff;
    font-size: 11px;
    line-height: 1.2;
    text-decoration: none;
    pointer-events: auto;
}

.message.own .image-download-link {
    background: rgba(15, 23, 42, 0.55);
    color: #fff;
}

.image-download-link:hover {
    text-decoration: underline;
}

.chat-file-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    max-width: 100%;
}

.chat-file-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.08);
    color: inherit;
    text-decoration: none;
    word-break: break-all;
}

.message.own .chat-file-link {
    background: rgba(255, 255, 255, 0.22);
    color: white;
}

.chat-file-link:hover {
    text-decoration: underline;
}

.chat-file-name {
    font-size: 14px;
    font-weight: 600;
}

.chat-file-size {
    font-size: 12px;
    opacity: 0.85;
}

.file-download-link {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.08);
    color: inherit;
    font-size: 12px;
    text-decoration: none;
}

.message.own .file-download-link {
    background: rgba(255, 255, 255, 0.22);
    color: white;
}

.file-download-link:hover {
    text-decoration: underline;
}

.image-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 24px;
}

body.member-popout-mode .image-lightbox,
body.guest-standalone-mode .image-lightbox {
    z-index: 3000;
}

.image-lightbox-preview-image {
    max-width: 92vw;
    max-height: 92vh;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
    transition: transform 0.15s ease;
}

.image-lightbox-toolbar {
    position: absolute;
    top: 18px;
    right: 22px;
    display: flex;
    gap: 8px;
}

.image-lightbox-tool-button {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.image-lightbox-zoom-percentage-label {
    min-width: 64px;
    height: 44px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.image-lightbox-tool-button.reset {
    font-size: 22px;
}

.image-lightbox-tool-button.close {
    font-size: 32px;
}

.message-input-container {
    position: relative;
    z-index: 120;
    grid-row: 3;
    flex-shrink: 0;
    min-width: 0;
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: visible;
}

.typing-indicator {
    min-height: 18px;
    color: #7a7f88;
    font-size: 13px;
    line-height: 18px;
}

.typing-indicator.is-empty {
    visibility: hidden;
}

.message-input-container textarea {
    width: 100%;
    padding: 12px 14px 8px;
    border: none;
    border-radius: 0;
    min-height: 56px;
    max-height: 160px;
    resize: none;
    overflow-y: auto;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.45;
    box-sizing: border-box;
    background: transparent;
    color: #2c3e50;
}

@media (min-width: 769px) {
    .message-input-container textarea {
        min-height: 80px;
        padding: 14px 14px 10px;
    }
}

.message-input-container textarea:focus {
    outline: none;
}

.message-input-container textarea::placeholder {
    color: #9aa0a8;
}

.pending-image-preview-container {
    position: relative;
    width: fit-content;
    max-width: 220px;
}

.pending-image-preview-element {
    display: block;
    width: 100%;
    max-width: 220px;
    max-height: 160px;
    border: 1px solid #ddd;
    border-radius: 8px;
    object-fit: cover;
}

.remove-pending-image-button,
.remove-pending-file-button {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.65);
    color: white;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pending-file-preview-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f7f9fe;
}

.pending-file-preview-name {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: #2c3e50;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attach-file-input {
    display: none;
}

.message-input-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 10px;
    border-top: 1px solid #eceef1;
}

.message-input-toolbar-left {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
}

.attach-menu-wrapper {
    position: relative;
    flex-shrink: 0;
}

.attach-menu-dropdown {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    min-width: 140px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 120;
    overflow: hidden;
}

.attach-menu-dropdown.hidden {
    display: none;
}

.attach-menu-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: white;
    color: #2c3e50;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s;
}

.attach-menu-item:hover {
    background: #f4f6f8;
}

.attach-menu-item.hidden {
    display: none;
}

.message-input-toolbar-icon-button {
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.message-input-toolbar-icon-button:hover {
    background: #f3f4f6;
    color: #374151;
}

.message-input-toolbar-icon-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.message-input-toolbar-icon-button.attach-file-button {
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
}

.emoji-picker-icon {
    width: 22px;
    height: 22px;
    display: block;
}

.emoji-picker-wrapper {
    position: relative;
    flex-shrink: 0;
}

.emoji-picker-panel {
    position: fixed;
    width: min(320px, calc(100vw - 24px));
    max-height: min(280px, 42vh);
    padding: 10px;
    border: 1px solid #dde1e6;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

.emoji-picker-panel.hidden {
    display: none;
}

.user-mention-picker {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: calc(100% + 6px);
    max-height: min(240px, 36vh);
    overflow-y: auto;
    padding: 6px;
    border: 1px solid #dde1e6;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
    z-index: 130;
}

.user-mention-picker.hidden {
    display: none;
}

.user-mention-picker-empty {
    padding: 10px 12px;
    color: #7a7f88;
    font-size: 13px;
}

.user-mention-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #1b2430;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.user-mention-option:hover,
.user-mention-option.is-active {
    background: #eef2ff;
}

.user-mention-option-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c5ccd6;
    flex-shrink: 0;
}

.user-mention-option.is-online .user-mention-option-status {
    background: #22c55e;
}

.user-mention-option-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.emoji-picker-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eceef1;
}

.emoji-picker-tab {
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}

.emoji-picker-tab:hover,
.emoji-picker-tab.active {
    background: #f3f4f6;
}

.emoji-picker-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 2px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    max-height: none;
    padding-right: 2px;
}

.emoji-picker-item {
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s;
}

.emoji-picker-item:hover {
    background: #f3f4f6;
}

.message-send-button {
    min-width: 72px;
    height: 36px;
    padding: 0 16px;
    border: 1px solid #d5d9df;
    border-radius: 8px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    flex-shrink: 0;
}

.message-send-button:hover {
    background: #e9ebef;
    border-color: #c7ccd3;
    color: #374151;
}

.message-send-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.message-input-row {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    border: 1px solid #e3e6ea;
    border-radius: 10px;
    background: #fafbfc;
    overflow: visible;
    position: relative;
    z-index: 1;
}

.message-input-container.emoji-picker-open {
    z-index: 200;
}

.message-input-container.emoji-picker-open .message-input-row {
    z-index: 2;
}

/* 스크롤바 스타일 */
.room-section::-webkit-scrollbar,
.sidebar::-webkit-scrollbar,
.sidebar-member-list::-webkit-scrollbar {
    width: 4px;
}

.room-section::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track,
.sidebar-member-list::-webkit-scrollbar-track {
    background: transparent;
}

.room-section::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb,
.sidebar-member-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 4px;
}

.room-section::-webkit-scrollbar-thumb:hover,
.sidebar::-webkit-scrollbar-thumb:hover,
.sidebar-member-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.42);
}

.messages::-webkit-scrollbar {
    width: 6px;
}

.messages::-webkit-scrollbar-track {
    background: transparent;
}

.messages::-webkit-scrollbar-thumb {
    background: rgba(44, 62, 80, 0.35);
    border-radius: 4px;
}

.messages::-webkit-scrollbar-thumb:hover {
    background: rgba(44, 62, 80, 0.55);
}

/* 모바일 세부 스타일 */
@media (max-width: 768px) {
    #loginScreen,
    #guestJoinScreen,
    #guestSessionEndedScreen {
        align-items: flex-start;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding-top: max(24px, env(safe-area-inset-top, 0px));
        padding-bottom: 24px;
    }

    #loginScreen .login-container,
    #guestJoinScreen .login-container,
    #guestSessionEndedScreen .login-container {
        margin-top: auto;
        margin-bottom: auto;
    }

    html.chat-layout-active,
    html.chat-layout-active body {
        overflow: hidden;
        height: 100vh;
        height: 100svh;
        max-height: 100svh;
    }

    body.chat-layout-active,
    body.chat-layout-active #app,
    #chatScreen.screen {
        height: 100vh;
        height: 100svh;
        min-height: 0;
        max-height: 100svh;
    }

    #chatScreen .chat-container {
        flex: 1 1 auto;
        min-height: 0;
        height: auto;
        max-height: none;
    }

    .chat-container {
        flex-direction: column;
        height: 100vh;
        height: 100svh;
        min-height: 0;
        max-height: 100svh;
    }

    .chat-main-row {
        flex-direction: column;
    }

    .chat-container.in-room .chat-area {
        grid-template-rows: auto minmax(0, 1fr);
    }

    .chat-container.in-room .chat-area:has(.chat-search-row:not(.hidden)) {
        grid-template-rows: auto auto minmax(0, 1fr);
    }

    .chat-container.in-room .chat-area:has(.chat-search-row:not(.hidden)) .messages-wrapper {
        grid-row: 3;
    }

    .chat-container.in-room .message-input-container {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 200;
    }

    .chat-container.in-room .messages {
        padding-bottom: calc(12px + var(--mobile-messages-bottom-offset, 72px));
    }

    .chat-container.in-room .messages-incoming-preview,
    .chat-container.in-room .messages-scroll-to-bottom-btn {
        bottom: calc(16px + var(--mobile-messages-bottom-offset, 72px));
    }

    .sidebar {
        min-height: 0;
    }

    .room-info {
        padding: 10px 12px;
        column-gap: 8px;
        row-gap: 6px;
    }

    .room-info h2 {
        font-size: 16px;
    }

    .messages {
        padding: 12px;
        --message-bubble-max-width: 65%;
    }

    .message.own,
    .message-row.own,
    .message-row.other,
    .message-group {
        max-width: var(--message-bubble-max-width);
    }

    .message-input-container {
        padding: 10px 12px;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }

    .message-input-container textarea {
        font-size: 16px;
    }

    .message-send-button {
        min-width: 64px;
        padding: 0 14px;
    }

    .chat-container.in-room.sidebar-visible .sidebar-close-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

html.electron-desktop .message-input-container textarea,
body.member-popout-mode .message-input-container textarea {
    font-size: 14px;
    min-height: 80px;
    padding: 14px 14px 10px;
}

/* 멀티창: 회원 허브(방 목록만) — in-room 전환 시에는 숨기지 않음 */
body.member-hub-mode .chat-container.hub-list-only .chat-area .room-info,
body.member-hub-mode .chat-container.hub-list-only .chat-area .chat-search-row,
body.member-hub-mode .chat-container.hub-list-only .chat-area .messages-wrapper,
body.member-hub-mode .chat-container.hub-list-only .chat-area .message-input-container {
    display: none !important;
}

/* PC 허브: 방 목록 화면이 아닐 때(in-room) 채팅 영역 표시 */
body.member-hub-mode .chat-container.in-room:not(.hub-list-only) .chat-area .room-info {
    display: grid !important;
}

body.member-hub-mode .chat-container.in-room:not(.hub-list-only) .chat-area .messages-wrapper {
    display: grid !important;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    min-height: 0;
}

body.member-hub-mode .chat-container.in-room:not(.hub-list-only) .chat-area .message-input-container {
    display: flex !important;
}

body.member-hub-mode .chat-container {
    display: flex;
    flex-direction: column;
}

/* 웹: 목록 전체 폭 유지. Electron 허브만 2열(목록+채팅) — 목록 전용은 전체 폭 */
body.member-hub-mode .chat-main-row {
    display: flex;
    min-height: 0;
}

html.electron-desktop body.member-hub-mode .chat-main-row {
    display: grid;
    grid-template-columns: minmax(300px, 380px) 1fr;
}

html.electron-desktop body.member-hub-mode .chat-top-brand-row .sidebar-brand {
    width: min(380px, 100%);
}

html.electron-desktop body.member-hub-mode .chat-container.hub-list-only .chat-main-row {
    display: flex;
    grid-template-columns: unset;
}

html.electron-desktop body.member-hub-mode .chat-container.hub-list-only .chat-main-row .sidebar {
    width: 100%;
    max-width: none;
    flex: 1 1 auto;
    min-width: 0;
}

html.electron-desktop body.member-hub-mode .chat-container.hub-list-only .chat-top-brand-row .sidebar-brand {
    width: 100%;
    max-width: none;
    flex: 1 1 auto;
    padding-right: calc(16px + var(--electron-window-controls-width));
}

html.electron-desktop body.member-hub-mode .chat-container.hub-list-only .chat-top-brand-rest {
    display: none;
}

body.member-hub-mode .chat-container:not(.hub-has-sidebar) .chat-area {
    display: none;
}

body.member-hub-mode .chat-container.hub-list-only .chat-area {
    display: none;
}

/* 회원 허브: 모바일 뷰포트 — 팝아웃 없이 방 목록 ↔ 채팅 화면 전환 */
@media (max-width: 768px) {
    body.member-hub-mode .chat-main-row {
        display: flex;
        grid-template-columns: unset;
    }

    body.member-hub-mode .chat-container:not(.in-room) .chat-main-row .sidebar {
        width: 100%;
        flex: 1;
        min-width: 0;
    }

    body.member-hub-mode .chat-container.in-room .chat-area {
        display: grid !important;
        flex: 1;
        width: 100%;
        min-height: 0;
    }

    body.member-hub-mode .chat-container.in-room .chat-area .room-info {
        display: grid !important;
    }

    body.member-hub-mode .chat-container.in-room .chat-area .messages-wrapper {
        display: grid !important;
        grid-template: minmax(0, 1fr) / minmax(0, 1fr);
        min-height: 0;
    }

    body.member-hub-mode .chat-container.in-room .chat-area .message-input-container {
        display: flex !important;
    }

    body.member-hub-mode .chat-container.in-room:not(.sidebar-visible) .sidebar {
        display: none;
    }

    body.member-hub-mode .chat-container.in-room.sidebar-visible .sidebar-backdrop {
        display: block;
        z-index: 200;
    }

    body.member-hub-mode .chat-container.in-room.sidebar-visible .sidebar {
        display: flex;
        position: fixed;
        z-index: 210;
    }

    body.member-hub-mode .chat-container.in-room.sidebar-visible .chat-area {
        z-index: 1;
    }
}

/* 멀티창: 회원 방 팝아웃 */
html:has(body.member-popout-mode),
html:has(body.guest-standalone-mode) {
    overflow: hidden;
    height: 100%;
}

body.member-popout-mode {
    align-items: stretch;
    justify-content: stretch;
    background: #d9e0e6;
    overflow: hidden;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

body.member-popout-mode #app,
body.member-popout-mode #chatScreen.screen {
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

body.member-popout-mode #chatScreen.screen {
    align-items: stretch;
    justify-content: stretch;
}

body.member-popout-mode #loginScreen,
body.member-popout-mode #guestJoinScreen,
body.member-popout-mode .sidebar,
body.member-popout-mode .sidebar-backdrop,
body.member-popout-mode #createRoomBtn,
body.member-popout-mode .settings-menu-wrapper,
body.member-popout-mode #logoutBtn,
body.member-popout-mode #toggleSidebarBtn,
body.member-popout-mode #closeChatBtn {
    display: none !important;
}

body.member-popout-mode .chat-container {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: 100%;
}

body.member-popout-mode .chat-main-row,
body.guest-standalone-mode .chat-main-row {
    flex: 1 1 auto;
    min-height: 0;
}

body.member-popout-mode .chat-container.in-room .messages,
body.guest-standalone-mode .chat-container.in-room .messages {
    z-index: 5;
}

body.member-popout-mode .chat-container:not(.in-room) .chat-area {
    display: none !important;
}

body.member-popout-mode .chat-container.in-room .chat-area {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-columns: minmax(0, 1fr);
    flex: 1;
    width: 100%;
    min-height: 0;
}

body.member-popout-mode .chat-container.in-room .room-info {
    grid-row: 1;
}

body.member-popout-mode .chat-container.in-room .messages-wrapper {
    grid-row: 2;
    min-height: 0;
}

body.member-popout-mode .chat-container.in-room .message-input-container {
    grid-row: 3;
}

body.member-popout-mode .chat-container.in-room .chat-area:has(.chat-search-row:not(.hidden)) {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
}

body.member-popout-mode .chat-container.in-room .chat-area:has(.chat-search-row:not(.hidden)) .messages-wrapper {
    grid-row: 3;
    grid-column: 1;
}

body.member-popout-mode .chat-container.in-room .chat-area:has(.chat-search-row:not(.hidden)) .message-input-container {
    grid-row: 4;
    grid-column: 1;
}

body.member-popout-mode .room-entry-guide-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

body.member-popout-mode .messages .chat-screen-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    color: #666;
    font-size: 14px;
}

body.member-popout-mode .chat-screen-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    color: #666;
    font-size: 14px;
}

.member-popout-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f7fb;
    pointer-events: none;
}

.member-popout-loading-overlay.hidden {
    display: none;
}

.member-popout-loading-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 28px 32px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(44, 62, 80, 0.12);
}

.member-popout-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: member-popout-loading-spin 0.8s linear infinite;
    flex-shrink: 0;
}

.member-popout-loading-text {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: #5d6d7e;
}

@keyframes member-popout-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

/* 게스트 독립 창 */
body.guest-standalone-mode {
    align-items: stretch;
    justify-content: stretch;
    background: #d9e0e6;
    overflow: hidden;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

body.guest-standalone-mode #app,
body.guest-standalone-mode #chatScreen.screen {
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

body.guest-standalone-mode #chatScreen.screen {
    align-items: stretch;
    justify-content: stretch;
}

body.guest-standalone-mode #loginScreen.hidden + #chatScreen .sidebar,
body.guest-standalone-mode .sidebar,
body.guest-standalone-mode .sidebar-backdrop,
body.guest-standalone-mode #createRoomBtn,
body.guest-standalone-mode .settings-menu-wrapper,
body.guest-standalone-mode #toggleSidebarBtn,
body.guest-standalone-mode #closeChatBtn {
    display: none !important;
}

body.guest-standalone-mode .chat-container.in-room .chat-area {
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-columns: minmax(0, 1fr);
    flex: 1;
    width: 100%;
    min-height: 0;
}

body.guest-standalone-mode .chat-container.in-room .chat-area:has(.chat-search-row:not(.hidden)) {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
}

body.guest-standalone-mode .chat-container.in-room .chat-area:has(.chat-search-row:not(.hidden)) .messages-wrapper {
    grid-row: 3;
    grid-column: 1;
}

body.guest-standalone-mode .chat-container.in-room .chat-area:has(.chat-search-row:not(.hidden)) .message-input-container {
    grid-row: 4;
    grid-column: 1;
}

body.guest-standalone-mode .room-entry-guide-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

/* Electron 데스크톱: OS 타이틀바를 앱 헤더에 통합 (titleBarOverlay) */
html.electron-desktop {
    --electron-titlebar-height: 32px;
    --electron-window-controls-width: 138px;
    --electron-in-room-header-height: 84px;
}

/* 채팅방(in-room)만: 창 컨트롤(최소·최대·닫기) 줄 바로 아래 전체 너비 구분선 */
html.electron-desktop:has(.chat-container.in-room)::after {
    content: '';
    position: fixed;
    top: var(--electron-titlebar-height);
    left: 0;
    right: 0;
    height: 0;
    border-bottom: 1px solid #d8dee8;
    z-index: 10001;
    pointer-events: none;
}

html.electron-desktop #loginScreen,
html.electron-desktop #guestJoinScreen,
html.electron-desktop #guestSessionEndedScreen {
    padding-top: var(--electron-titlebar-height);
}

html.electron-desktop #loginScreen::before,
html.electron-desktop #guestJoinScreen::before,
html.electron-desktop #guestSessionEndedScreen::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--electron-titlebar-height);
    background: #ffffff;
    -webkit-app-region: drag;
    z-index: 10000;
}

/* 메인 화면: 로고를 타이틀바 영역(창 컨트롤 줄)과 같은 높이에 배치 */
html.electron-desktop .chat-top-brand-row {
    -webkit-app-region: drag;
}

html.electron-desktop .chat-top-brand-rest {
    -webkit-app-region: drag;
}

html.electron-desktop .sidebar-brand {
    position: relative;
    align-items: center;
    padding: 10px 16px 8px;
    min-height: auto;
    overflow: visible;
    -webkit-app-region: drag;
}

/* 목록 전체폭(rest 숨김)일 때만 로고 행에 창 버튼 여백 */
html.electron-desktop body:not(.member-hub-mode) .chat-container:not(.in-room) .chat-top-brand-row .sidebar-brand {
    padding-right: calc(16px + var(--electron-window-controls-width));
}

html.electron-desktop body.member-hub-mode .chat-top-brand-row .sidebar-brand {
    padding-right: 20px;
}

html.electron-desktop .sidebar-brand-image {
    position: relative;
    z-index: 1;
    pointer-events: none;
}

html.electron-desktop body.member-hub-mode .chat-main-row {
    position: relative;
}

html.electron-desktop body.member-hub-mode .chat-main-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: min(380px, 100%);
    right: 0;
    height: 0;
    -webkit-app-region: no-drag;
    z-index: 20;
    pointer-events: none;
}

html.electron-desktop body.member-hub-mode .chat-container.hub-list-only .chat-main-row::before {
    display: none;
}

/* 회원 허브(in-room): 로고 행이 타이틀바를 담당하므로 room-info는 일반 헤더만 */
html.electron-desktop body.member-hub-mode .chat-container.in-room .room-info {
    position: relative;
    padding: 8px 16px;
    align-items: center;
    -webkit-app-region: no-drag;
}

html.electron-desktop body.member-hub-mode .chat-container.in-room .room-info::before {
    display: none;
}

/*
 * 팝아웃/게스트/단일 채팅창: 로고 행을 숨기므로
 * 예전처럼 room-info가 Electron 타이틀바(드래그 영역)를 담당한다.
 */
html.electron-desktop body:not(.member-hub-mode) .chat-container.in-room .room-info,
html.electron-desktop body.member-popout-mode .chat-container.in-room .room-info,
html.electron-desktop body.guest-standalone-mode .chat-container.in-room .room-info,
html.electron-desktop body.guest-mode .chat-container.in-room .room-info {
    position: relative;
    padding: 8px 16px;
    padding-top: calc(8px + var(--electron-titlebar-height));
    align-items: center;
    -webkit-app-region: no-drag;
}

html.electron-desktop body:not(.member-hub-mode) .chat-container.in-room .room-info::before,
html.electron-desktop body.member-popout-mode .chat-container.in-room .room-info::before,
html.electron-desktop body.guest-standalone-mode .chat-container.in-room .room-info::before,
html.electron-desktop body.guest-mode .chat-container.in-room .room-info::before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--electron-titlebar-height);
    background: #ffffff;
    -webkit-app-region: drag;
    z-index: 1;
    pointer-events: auto;
}

/* 로고 행이 숨겨진 채팅창에서 공지가 뜰 때: 타이틀바 여백은 공지 쪽이 담당 */
html.electron-desktop body:not(.member-hub-mode) .chat-container.in-room:has(#adminAnnouncementBanner:not(.hidden)) .room-info,
html.electron-desktop body.member-popout-mode .chat-container.in-room:has(#adminAnnouncementBanner:not(.hidden)) .room-info,
html.electron-desktop body.guest-standalone-mode .chat-container.in-room:has(#adminAnnouncementBanner:not(.hidden)) .room-info,
html.electron-desktop body.guest-mode .chat-container.in-room:has(#adminAnnouncementBanner:not(.hidden)) .room-info {
    padding-top: 8px;
}

html.electron-desktop body:not(.member-hub-mode) .chat-container.in-room:has(#adminAnnouncementBanner:not(.hidden)) .room-info::before,
html.electron-desktop body.member-popout-mode .chat-container.in-room:has(#adminAnnouncementBanner:not(.hidden)) .room-info::before,
html.electron-desktop body.guest-standalone-mode .chat-container.in-room:has(#adminAnnouncementBanner:not(.hidden)) .room-info::before,
html.electron-desktop body.guest-mode .chat-container.in-room:has(#adminAnnouncementBanner:not(.hidden)) .room-info::before {
    display: none;
}

html.electron-desktop body:not(.member-hub-mode) .chat-container.in-room #adminAnnouncementBanner:not(.hidden),
html.electron-desktop body.member-popout-mode #adminAnnouncementBanner:not(.hidden),
html.electron-desktop body.guest-standalone-mode #adminAnnouncementBanner:not(.hidden),
html.electron-desktop body.guest-mode #adminAnnouncementBanner:not(.hidden) {
    margin-top: var(--electron-titlebar-height);
}

html.electron-desktop .chat-container.in-room .room-info .room-title-row,
html.electron-desktop .chat-container.in-room .room-info .room-info-actions,
html.electron-desktop .chat-container.in-room .room-info .toggle-sidebar-btn {
    position: relative;
    z-index: 2;
}

html.electron-desktop .chat-container.in-room .chat-search-row,
html.electron-desktop .chat-container.in-room .chat-search-row * {
    -webkit-app-region: no-drag;
}

html.electron-desktop .chat-container.in-room .room-info .room-info-actions {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
}

html.electron-desktop .chat-container.in-room .chat-area,
html.electron-desktop .chat-container.in-room .messages-wrapper,
html.electron-desktop .chat-container.in-room .messages,
html.electron-desktop .chat-container.in-room .message-input-container {
    -webkit-app-region: no-drag;
}

html.electron-desktop .sidebar-brand button,
html.electron-desktop .sidebar-brand input,
html.electron-desktop .sidebar-brand select,
html.electron-desktop .sidebar-brand a,
html.electron-desktop .sidebar-nav,
html.electron-desktop .sidebar-nav *,
html.electron-desktop .user-header-actions,
html.electron-desktop .user-header-actions *,
html.electron-desktop .chat-container.in-room .room-info button,
html.electron-desktop .chat-container.in-room .room-info input,
html.electron-desktop .chat-container.in-room .room-info .room-menu-dropdown,
html.electron-desktop .chat-container.in-room .room-info .room-menu-wrapper,
html.electron-desktop .chat-container.in-room .room-info .room-info-actions,
html.electron-desktop .chat-container.in-room .room-info .room-info-actions * {
    -webkit-app-region: no-drag;
}

html.electron-desktop #loginScreen .login-container,
html.electron-desktop #guestJoinScreen .login-container,
html.electron-desktop #guestSessionEndedScreen .login-container {
    -webkit-app-region: no-drag;
}

/* Electron 팝아웃: 100vh는 titleBarOverlay와 맞지 않아 스크롤 영역 높이가 어긋날 수 있음 */
html.electron-desktop:has(body.member-popout-mode),
html.electron-desktop:has(body.guest-standalone-mode) {
    height: 100%;
    overflow: hidden;
}

html.electron-desktop body.member-popout-mode,
html.electron-desktop body.guest-standalone-mode {
    height: 100%;
    min-height: 0;
    max-height: 100%;
}

html.electron-desktop body.member-popout-mode #app,
html.electron-desktop body.member-popout-mode #chatScreen.screen,
html.electron-desktop body.guest-standalone-mode #app,
html.electron-desktop body.guest-standalone-mode #chatScreen.screen {
    height: 100%;
    min-height: 0;
    max-height: 100%;
}

html.electron-desktop body.member-popout-mode .chat-container,
html.electron-desktop body.guest-standalone-mode .chat-container {
    height: 100%;
    max-height: 100%;
}

html.electron-desktop body.member-popout-mode .chat-container.in-room .chat-area {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

html.electron-desktop .chat-container.in-room .messages {
    -webkit-app-region: no-drag;
    touch-action: pan-y;
}

/* Electron: 토스트는 창 정중앙 */
html.electron-desktop .app-notice-toast-container,
html.electron-desktop .chat-alert-toast-container {
    z-index: 10002;
}

html.electron-desktop .app-notice-toast-container {
    top: 50%;
    left: 50%;
    right: auto;
    width: min(420px, calc(100vw - 32px));
    max-width: none;
    padding: 0;
    box-sizing: border-box;
    transform: translate(-50%, -50%);
    align-items: center;
}

html.electron-desktop:has(.chat-container.in-room) .app-notice-toast-container {
    top: 50%;
    width: min(420px, calc(100vw - 32px));
    transform: translate(-50%, -50%);
}

html.electron-desktop .chat-alert-toast-container {
    top: auto;
    bottom: 16px;
    right: calc(16px + var(--electron-window-controls-width));
    flex-direction: column-reverse;
    max-width: min(360px, calc(100vw - 32px - var(--electron-window-controls-width)));
}

html.electron-desktop:has(.chat-container.in-room) .chat-alert-toast-container {
    top: auto;
    bottom: 16px;
    right: 16px;
    max-width: min(360px, calc(100vw - 32px));
}

html.electron-desktop .chat-alert-toast--desktop {
    width: 100%;
    padding: 0;
    border-radius: 12px;
    background: #ffffff;
    color: #1f2937;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-left: none;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    animation: chat-alert-toast-desktop-in 0.22s ease;
}

html.electron-desktop .chat-alert-toast--desktop.chat-alert-toast-hiding {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

html.electron-desktop .chat-alert-toast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px 0;
}

html.electron-desktop .chat-alert-toast-header.is-roomless {
    justify-content: flex-end;
    padding-top: 8px;
}

html.electron-desktop .chat-alert-toast-room {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html.electron-desktop .chat-alert-toast-close {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

html.electron-desktop .chat-alert-toast-close:hover {
    background: rgba(15, 23, 42, 0.06);
    color: #475569;
}

html.electron-desktop .chat-alert-toast-content {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 12px 12px;
}

html.electron-desktop .chat-alert-toast-avatar {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.06);
    overflow: hidden;
    padding: 4px;
    box-sizing: border-box;
}

html.electron-desktop .chat-alert-toast-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

html.electron-desktop .chat-alert-toast-text {
    flex: 1;
    min-width: 0;
}

html.electron-desktop .chat-alert-toast-sender {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html.electron-desktop .chat-alert-toast-preview {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #4b5563;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@keyframes chat-alert-toast-desktop-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

