/* H5 layout additions. Semantic colors are scoped to the light theme. */
:root[data-meeting-theme='light'] {
    color-scheme: light;
    --body-bg: #f5f7fc;
    --settings-bg: #fff;
    --msger-bg: #fff;
    --select-bg: #f0f3fa;
    --dd-color: #263b61;
    --fg-1: #1c2b45;
    --fg-2: #52627d;
    --fg-3: #72829d;
    --fg-muted: #91a0b6;
    --fg-disabled: #aab6c7;
    --surface-1: #f7f9fd;
    --surface-2: #edf2fa;
    --surface-3: #e4ebf8;
    --border-subtle: #e6ebf4;
    --border-strong: #d1dbea;
    --border: 1px solid #e0e7f2;
    --box-shadow: 0 12px 40px #1d376b12;
    --room-shadow: 0 12px 40px #1d376b12;
    --room-accent: #3168ee;
    --room-accent-soft: #eef3ff;
    --room-control-hover: #e8effc;
    --swal-neutral-ink: #52627d;
    --swal-confirm-ink: #fff;
    --swal-focus-ink: #3168ee;
}
body,
button,
input,
select,
textarea,
p,
span,
strong,
h1,
h2,
h3,
h4,
label {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
[hidden] {
    display: none !important;
}
.meeting-audio-prompt {
    position: fixed;
    z-index: 10050;
    top: calc(78px + env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100vw - 24px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 10px 14px;
    border: 1px solid #dce6fb;
    border-radius: 12px;
    background: #fff;
    color: #1c2b45;
    box-shadow: 0 8px 28px #1c2b4524;
    font-size: 13px;
}
.meeting-audio-prompt button {
    min-height: 40px;
    border: 0;
    border-radius: 9px;
    padding: 8px 12px;
    background: #3168ee;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}
.meeting-audio-prompt button:focus-visible {
    outline: 3px solid #9bb9ff;
    outline-offset: 2px;
}
.meeting-header {
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;
    right: 0;
    height: calc(68px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 26px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--settings-bg);
    border-bottom: 1px solid var(--room-border);
}
.meeting-header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.meeting-header-brand img {
    width: 35px;
    height: 35px;
}
.meeting-header-brand div {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.meeting-header-brand strong {
    font-size: 16px;
    color: var(--fg-1);
}
.meeting-header-brand span {
    font-family: ui-monospace, monospace;
    color: var(--fg-3);
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 250px;
}
#meetingInviteButton {
    min-height: 40px;
    padding: 9px 15px;
    border-radius: 11px;
    border: 1px solid #dce6fb;
    background: #edf3ff;
    color: #3168ee;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
:root[data-meeting-theme='light'] body {
    color: var(--fg-1);
}
:root[data-meeting-theme='light']
    :is(.swal2-popup, .swal2-title, .swal2-html-container, .swal2-input, .swal2-label, .swal2-validation-message) {
    color: var(--fg-1) !important;
}
:root[data-meeting-theme='light'] .swal2-popup {
    border-radius: 22px;
    border: 1px solid var(--border-subtle);
}
:root[data-meeting-theme='light'] .swal2-toast .swal2-close {
    color: var(--fg-1) !important;
    border-radius: 8px;
}
:root[data-meeting-theme='light'] .swal2-toast .swal2-close:hover {
    background: #eef2f8;
}
:root[data-meeting-theme='light'] .swal2-styled.swal2-confirm {
    background: #3168ee !important;
    border-radius: 11px;
}
:root[data-meeting-theme='light'] :is(.swal2-cancel, .swal2-deny) {
    background: #eef2f8 !important;
}
:root[data-meeting-theme='light'] :is(.swal2-input, input, textarea, select) {
    color: var(--fg-1);
}
:root[data-meeting-theme='light'] .form-select.text-light {
    color: var(--fg-1) !important;
}
:root[data-meeting-theme='light'] :is(.swal2-input, .init-user select) {
    border: 1px solid #dce4f0;
    background: #f8faff;
}
.meeting-prejoin.init-modal-size {
    width: min(520px, calc(100vw - 28px)) !important;
    padding: 28px 8px;
    max-height: calc(100dvh - 28px);
    overflow-y: auto;
}
.meeting-prejoin .swal2-title {
    font-size: 24px;
    padding-top: 12px;
}
.meeting-prejoin .swal2-input {
    font-size: 16px;
    height: 50px;
    border-radius: 12px;
    margin: 18px 26px 10px;
    width: calc(100% - 52px);
}
.meeting-prejoin .init-user {
    display: flex !important;
    flex-direction: column;
    gap: 14px;
    padding: 0;
}
.meeting-prejoin .swal2-html-container {
    margin: 8px 26px 0;
    overflow: visible;
}
.meeting-prejoin-copy {
    order: -1;
    text-align: center;
}
.meeting-prejoin-badge {
    color: #3168ee;
    font-size: 11px;
    font-weight: 600;
}
.meeting-prejoin-copy p {
    margin: 13px 0 0;
    color: #7d8da6;
    font-size: 12px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}
#prejoinRoomCode {
    font-family: ui-monospace, monospace;
    font-size: 10px;
}
.meeting-prejoin .init-video-container {
    margin: 0;
}
.meeting-prejoin.media-off :is(.init-video-container, .initComands) {
    display: none !important;
}
:root[data-meeting-theme='light'] .meeting-prejoin .init-user button {
    color: var(--fg-1);
}
.meeting-prejoin .initComands {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}
.meeting-prejoin .init-user button {
    margin: 0;
    min-width: 44px;
    min-height: 44px;
}
.meeting-prejoin .init-user select {
    margin: 3px 0;
}
.meeting-prejoin :is(#initUsernameEmojiButton, #initExitButton) {
    display: none;
}
.meeting-prejoin .swal2-actions {
    margin-top: 20px !important;
}
.meeting-prejoin .swal2-confirm {
    width: 100%;
    min-height: 50px;
    font-size: 15px;
}
.meeting-share-modal {
    width: min(440px, calc(100vw - 28px)) !important;
}
.meeting-share-modal .swal2-title {
    font-size: 22px;
}
.meeting-share-modal .qr-room-copy {
    color: var(--fg-2) !important;
    font-size: 13px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}
.meeting-share-modal [data-template-text='roomUrl'] {
    background: var(--select-bg);
    padding: 12px;
    border-radius: 10px;
    font-size: 11px;
    text-align: left;
    user-select: all;
}
.meeting-share-modal canvas {
    background: white;
    padding: 12px;
    border-radius: 12px;
    max-width: 100%;
}
.meeting-local-note {
    color: #977548;
    background: #fff8e9;
    border-radius: 10px;
    padding: 12px;
    font-size: 11px;
    line-height: 1.8;
}
:root[data-meeting-theme='light']
    :is(#bottomButtons button, #mySettings button, #msgerDraggable button, .dropdown-menu button) {
    color: var(--fg-1);
}
:root[data-meeting-theme='light'] :is(.dropdown-menu, #exitMenu) {
    background: #fff;
    border-color: #e0e7f2;
    color: var(--fg-1);
}
:root[data-meeting-theme='light'] :is(.dropdown-menu button, .tabButtonText, .settings-nav-label, .device-menu-header) {
    color: var(--fg-2);
}
:root[data-meeting-theme='light'] #bottomButtons :is(.device-dropdown-toggle i, #participantViewButton) {
    color: var(--fg-2) !important;
}
:root[data-meeting-theme='light'] #bottomButtons .dropdown-menu :is(button, i) {
    color: var(--fg-1) !important;
}
/* Exit choices are menu rows, not the compact toolbar icon buttons. */
#bottomButtons #exitMenu {
    width: 224px;
    min-width: 0;
    max-width: calc(100vw - 24px);
    padding: 6px;
}
#bottomButtons #exitMenu button {
    width: 100%;
    height: auto;
    min-height: 46px;
    margin: 0;
    padding: 12px 14px;
    gap: 10px;
    font-size: 14px;
    line-height: 1.5;
    white-space: normal;
    color: var(--fg-1) !important;
    box-shadow: none;
    transform: none;
}
#bottomButtons #exitMenu button i {
    color: inherit !important;
    margin: 0;
    font-size: 16px;
}
#bottomButtons #exitMenu button:hover,
#bottomButtons #exitMenu button:focus-visible {
    padding: 12px 14px;
    background: var(--room-control-hover) !important;
    transform: none;
}
#bottomButtons #exitMenu #exitLeaveAllBtn {
    margin-top: 4px;
    color: #dc3545 !important;
}
#bottomButtons #exitMenu #exitLeaveAllBtn:hover,
#bottomButtons #exitMenu #exitLeaveAllBtn:focus-visible {
    background: #dc354514 !important;
}
:root[data-meeting-theme='light'] :is(#loadingTitle, .loading-message, #userName, .qr-room-copy) {
    color: var(--fg-1);
}
:root[data-meeting-theme='light'] #videoMediaContainer {
    background: #f5f7fc;
}
:root[data-meeting-theme='light'] .Camera {
    border: 1px solid #e0e7f2;
    box-shadow: 0 5px 18px #273d6510;
    border-radius: 18px;
}
:root[data-meeting-theme='light'] :is(.Camera .videoOff, .Camera .video-off) {
    background: #edf2fc;
}
:root[data-meeting-theme='light'] :is(.videoPeerName, .video-peer-name) {
    color: var(--fg-1);
}
/* Pinning replaces .Camera; both layouts must keep the same readable label. */
:root[data-meeting-theme='light'] :is(.Camera, .pinned-video-container) .username {
    box-sizing: border-box;
    color: var(--fg-1);
    background: #fffffff2;
    border: 1px solid #dce4f0;
    box-shadow: 0 2px 8px #1c2b4512;
    padding: 6px 10px;
    height: auto;
    min-height: 28px;
    max-width: calc(100% - 24px);
    gap: 5px;
    font-size: 12px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
:root[data-meeting-theme='light'] :is(.Camera, .pinned-video-container) .username .presenter-name-badge {
    color: #237a4e !important;
}
:root[data-meeting-theme='light'] .Camera[data-camera-off='true'] .videoMenuBar :is(button, .navbar-session-time) {
    color: var(--fg-2);
}
:root[data-meeting-theme='light'] .Camera[data-camera-off='true'] .navbar-dropdown-content {
    background: #fff;
}
:root[data-meeting-theme='light'] .Camera[data-camera-off='true'] .navbar-dropdown-item :is(button, span) {
    color: var(--fg-1) !important;
}
#videoMediaContainer {
    padding-top: calc(84px + env(safe-area-inset-top)) !important;
    padding-bottom: calc(108px + env(safe-area-inset-bottom)) !important;
}
#bottomButtons {
    --meeting-tool-width: 38px;
    --meeting-tool-height: 42px;
    border-radius: 16px;
    gap: 4px;
    border: 1px solid var(--room-border);
    padding: 6px 8px;
    background: var(--btns-bg-color);
    box-shadow: var(--room-shadow);
}
#bottomButtons > button,
#bottomButtons .split-btn > button:not(.device-dropdown-toggle),
#bottomButtons #participantViewButton,
#bottomButtons #exitButton {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: var(--meeting-tool-width);
    min-width: var(--meeting-tool-width);
    height: var(--meeting-tool-height);
    min-height: var(--meeting-tool-height);
    padding: 3px 0;
    font-size: 18px;
    line-height: 1;
    border-radius: 9px;
    background: transparent;
    box-shadow: none;
}
#bottomButtons .split-btn {
    border-radius: 9px;
    background: transparent;
}
#bottomButtons .split-btn > button:not(.device-dropdown-toggle) {
    border-radius: 9px 0 0 9px;
}
#bottomButtons .split-btn .device-dropdown-toggle {
    width: 18px;
    min-width: 18px;
    height: var(--meeting-tool-height);
    min-height: var(--meeting-tool-height);
    padding: 0;
    border-radius: 0 9px 9px 0;
    background: transparent;
}
#bottomButtons .device-dropdown-toggle i {
    font-size: 10px;
}
#bottomButtons :is(#settingsExtraMenu, #participantsActionsMenu, #participantViewMenu) {
    padding: 6px !important;
    max-height: min(540px, calc(100dvh - 160px));
    overflow-y: auto;
}
#bottomButtons #settingsExtraMenu {
    min-width: 184px !important;
    bottom: calc(var(--meeting-tool-height) + 10px) !important;
}
#bottomButtons :is(#settingsExtraMenu, #participantsActionsMenu, #participantViewMenu) button {
    height: 32px;
    min-height: 32px;
    min-width: 0;
    width: 100%;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.4;
}
#bottomButtons #settingsExtraMenu button:hover {
    padding: 6px 10px;
}
#bottomButtons #settingsExtraMenu button i {
    width: 16px;
    min-width: 16px;
    font-size: 13px;
    margin-right: 8px;
}
#bottomButtons #settingsExtraMenu .extra-menu-group {
    color: var(--fg-3);
    font-size: 10px;
    line-height: 1.4;
    letter-spacing: 0;
    padding: 7px 10px 3px;
}
#bottomButtons #settingsExtraMenu .extra-menu-divider {
    background: var(--room-border);
    margin: 4px 8px;
}
:root[data-meeting-theme='light'] #bottomButtons :is(button:hover, button:active) {
    box-shadow: none;
}
#bottomButtons #participantsCountBadge {
    font-size: 9px;
}
#bottomButtons
    :is(
        #startAudioButton,
        #stopAudioButton,
        #startVideoButton,
        #stopVideoButton,
        #chatButton,
        #participantsButton,
        #startScreenButton,
        #raiseHandButton,
        #lowerHandButton,
        #settingsButton,
        #participantViewButton,
        #extraButton,
        #exitButton
    )::after {
    display: block;
    border: 0;
    width: auto;
    font:
        10px/1.3 -apple-system,
        BlinkMacSystemFont,
        'PingFang SC',
        sans-serif;
    margin-top: 3px;
    color: var(--fg-2);
    white-space: nowrap;
}
#startAudioButton::after {
    content: '麦克风';
}
#stopAudioButton::after {
    content: '麦克风';
}
#startVideoButton::after {
    content: '摄像头';
}
#stopVideoButton::after {
    content: '摄像头';
}
#chatButton::after {
    content: '聊天';
}
#participantsButton::after {
    content: '成员';
}
#extraButton::after {
    content: '更多';
}
#startScreenButton::after {
    content: '共享';
}
#raiseHandButton::after {
    content: '举手';
}
#lowerHandButton::after {
    content: '放下手';
}
#settingsButton::after {
    content: '设置';
}
#participantViewButton::after {
    content: '布局';
    display: block !important;
}
#exitButton::after {
    content: '离开';
}
@media (max-width: 680px) {
    .meeting-header {
        height: calc(62px + env(safe-area-inset-top));
        padding-left: 16px;
        padding-right: 16px;
        gap: 8px;
    }
    .meeting-header-brand img {
        width: 31px;
        height: 31px;
    }
    .meeting-header-brand span {
        max-width: 170px;
        font-size: 9px;
    }
    #meetingInviteButton {
        padding: 9px 11px;
        font-size: 11px;
    }
    #videoMediaContainer {
        padding-top: calc(76px + env(safe-area-inset-top)) !important;
        padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important;
    }
    #bottomButtons {
        --meeting-tool-width: clamp(28px, calc((100vw - 92px) / 9), 34px);
        max-width: calc(100vw - 20px);
        width: max-content;
        flex-wrap: wrap;
        justify-content: center;
        gap: 3px;
        padding: 5px;
        margin-bottom: calc(10px + env(safe-area-inset-bottom));
    }
    #bottomButtons :is(#startAudioDeviceDropdown, #startVideoDeviceDropdown) {
        display: none !important;
    }
    #bottomButtons :is(button, .split-btn) {
        flex-shrink: 0;
    }
    #bottomButtons .split-btn .device-dropdown-toggle {
        width: 16px;
        min-width: 16px;
    }
    #bottomButtons
        :is(
            #startAudioButton,
            #stopAudioButton,
            #startVideoButton,
            #stopVideoButton,
            #chatButton,
            #participantsButton,
            #startScreenButton,
            #raiseHandButton,
            #lowerHandButton,
            #settingsButton,
            #participantViewButton,
            #extraButton,
            #exitButton
        )::after {
        font-size: 9px;
    }
    #bottomButtons :is(#settingsExtraMenu, #participantsActionsMenu, #participantViewMenu) button {
        height: 36px;
        min-height: 36px;
    }
    #bottomButtons #settingsExtraMenu {
        bottom: calc(110px + env(safe-area-inset-bottom)) !important;
    }
    #mySettings,
    #chatRoom {
        max-width: calc(100vw - 16px);
    }
    .meeting-prejoin .swal2-title {
        font-size: 22px;
    }
}
@media (max-width: 360px) {
    .meeting-header-brand span {
        max-width: 140px;
    }
    #bottomButtons {
        gap: 1px;
    }
    #bottomButtons .split-btn .device-dropdown-toggle {
        width: 12px;
        min-width: 12px;
    }
    #bottomButtons > button,
    #bottomButtons .split-btn > button:not(.device-dropdown-toggle),
    #bottomButtons #participantViewButton,
    #bottomButtons #exitButton {
        font-size: 16px;
    }
}

/* Keep settings above the meeting header, with a fixed header and scrollable content. */
body.meeting-settings-open::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(28, 43, 69, 0.2);
    backdrop-filter: blur(2px);
}
#mySettings {
    position: fixed;
    z-index: 2010;
    animation-duration: 160ms;
    width: min(780px, calc(100vw - 40px));
    height: min(620px, calc(100dvh - 48px));
    min-height: 0;
    max-height: calc(100dvh - 48px);
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
}
#mySettingsHeader {
    flex: 0 0 56px;
    height: 56px;
    margin: 0;
    padding: 0 18px;
    gap: 12px;
    cursor: default;
    box-sizing: border-box;
    background: var(--room-panel-raised);
}
#mySettingsHeader .meeting-settings-title {
    margin: 0 auto 0 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--fg-1);
}
#mySettingsHeader #mySettingsCloseBtn,
#mySettingsHeader #mySettingsNavToggleBtn {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 9px;
    font-size: 16px;
    color: var(--fg-2);
    background: var(--select-bg);
}
#mySettings .mySettingsMain {
    padding: 12px;
    overflow: hidden;
}
#mySettings #mySettingsNav {
    min-height: 0;
    min-width: 150px;
    max-width: 180px;
    padding: 6px;
}
#mySettings #mySettingsNav button {
    min-height: 38px;
    height: 38px;
    padding: 8px 10px;
    font-size: 14px;
    gap: 8px;
}
#mySettings #mySettingsNav .tabButtonText {
    padding: 0;
    font-size: 13px;
}
#mySettings .tabActions {
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
}
#mySettings .settings-section-intro {
    padding: 14px 18px;
    margin-bottom: 12px;
}
#mySettings .settings-option-copy strong {
    font-size: 13px;
}
#mySettings .settings-option-copy small {
    font-size: 11px;
}
#mySettings .settingsTable td {
    padding: 10px 8px;
}
#mySettings .room-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
#mySettings .room-action-grid .room-action-card {
    min-height: 48px;
    padding: 8px 10px;
    font-size: 12px;
}
#mySettings .room-action-grid .room-action-card i {
    width: 26px;
    height: 26px;
    font-size: 15px;
}
:root[data-meeting-theme='light'] #mySettings :is(p, i, .settingsTable, .tabButtonText) {
    color: var(--fg-1);
}
:root[data-meeting-theme='light'] #mySettings #mySettingsNav button {
    color: var(--fg-2);
}
:root[data-meeting-theme='light'] #mySettings #mySettingsNav button.active,
:root[data-meeting-theme='light'] #mySettings #mySettingsNav button.active p {
    color: var(--room-accent);
}
:root[data-meeting-theme='light'] #mySettings :is(select, input, textarea) {
    color: var(--fg-1);
}
:root[data-meeting-theme='light'] #mySettings :is(.orange, p.orange, i.orange) {
    color: #a85a00 !important;
}
:root[data-meeting-theme='light'] #mySettings :is(.red, p.red, i.red) {
    color: #dc3545;
}
/* Menus are portaled to body, so these styles must not depend on the video parent. */
:root[data-meeting-theme='light'] .navbar-dropdown-content {
    background: #fff;
    border: 1px solid var(--border-strong);
    box-shadow: 0 8px 28px #1c2b4524;
    min-width: 156px;
}
:root[data-meeting-theme='light'] .navbar-dropdown-content .navbar-dropdown-item,
:root[data-meeting-theme='light'] .navbar-dropdown-content .navbar-dropdown-item button {
    color: var(--fg-1) !important;
    font-size: 13px;
}
:root[data-meeting-theme='light'] .navbar-dropdown-content .navbar-dropdown-item:hover {
    background: var(--room-accent-soft);
}
:root[data-meeting-theme='light'] .navbar-dropdown-content .navbar-dropdown-item.red,
:root[data-meeting-theme='light'] .navbar-dropdown-content .navbar-dropdown-item.red button {
    color: #dc3545 !important;
}
:root[data-meeting-theme='light'] .Camera[data-camera-off='true'] .videoMenuBar {
    width: auto !important;
    left: auto;
    right: 10px;
    top: 10px;
    padding: 4px 6px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: #ffffffed;
    gap: 4px;
}
:root[data-meeting-theme='light'] .videoMenuBar .navbar-session-time {
    font-size: 11px;
    padding: 0 4px;
    color: var(--fg-2);
}
:root[data-meeting-theme='light'] .videoMenuBar button {
    min-width: 28px;
    min-height: 28px;
    padding: 4px;
    font-size: 14px;
    border-radius: 7px;
}
:root[data-meeting-theme='light'] .videoMenuBar.mobile-floating {
    top: calc(68px + env(safe-area-inset-top));
    background: #fff;
    color: var(--fg-1);
}
:root[data-meeting-theme='light'] .videoMenuBar.mobile-floating button {
    color: var(--fg-1);
}
@media (max-width: 830px) {
    #mySettings {
        width: calc(100vw - 20px) !important;
        height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
        max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        border: 1px solid var(--room-border);
        border-radius: 14px;
    }
    #mySettingsHeader {
        padding: 0 12px;
    }
    #mySettingsHeader #mySettingsNavToggleBtn {
        display: inline-flex;
        position: static;
        order: -1;
    }
    #mySettings .mySettingsMain {
        padding: 8px;
    }
    #mySettings #mySettingsNav {
        min-width: 0;
        width: 100%;
        max-width: none;
    }
    #mySettings .tabActions {
        width: 100%;
        margin: 0;
        padding: 0;
    }
    #mySettings .room-action-grid {
        grid-template-columns: 1fr;
    }
    #mySettings .settingsTable .title {
        gap: 6px;
    }
    #mySettings .settingsTable :is(p, strong) {
        overflow-wrap: anywhere;
    }
}

#mySettings.show {
    display: flex !important;
}

:root[lang='zh-CN'] .form-switch.form-switch-md::after {
    content: '关';
}
:root[lang='zh-CN'] .form-switch.form-switch-md:has(.form-check-input:checked)::after {
    content: '开';
}
:root[data-meeting-theme='light'] select.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2352627d' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

/* Profile uses the same readable, compact cards as the other light settings panels. */
#mySettings #tabProfile #myProfileAvatarControls {
    display: flex;
    gap: 16px;
    margin: 4px 0 18px;
    padding: 4px 0;
}
#mySettings #tabProfile #myProfileAvatar {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    padding: 0;
    object-fit: cover;
    border-radius: 50%;
}
#mySettings #tabProfile #myProfileAvatarButtons button {
    width: auto;
    min-height: 34px;
    padding: 8px 12px;
    margin: 0;
    font-size: 12px;
    gap: 7px;
}
#mySettings #tabProfile #myProfileAvatarButtons {
    gap: 8px;
}
#mySettings #tabProfile p {
    margin: 0;
    padding: 0;
}
#mySettings #tabProfile .profile-details {
    border: 1px solid var(--room-border);
    border-radius: 10px;
    background: var(--select-bg);
    overflow: hidden;
    margin-bottom: 20px;
}
#mySettings #tabProfile .profile-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    font-size: 13px;
}
#mySettings #tabProfile .profile-detail-row + .profile-detail-row {
    border-top: 1px solid var(--room-border);
}
#mySettings #tabProfile .profile-detail-label {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    color: var(--fg-2);
}
#mySettings #tabProfile .profile-detail-label i {
    padding: 0;
    margin: 0;
    width: 18px;
    justify-content: center;
    color: var(--fg-2);
}
#mySettings #tabProfile .profile-detail-value {
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: right;
    font-weight: 600;
}
#mySettings #tabProfile .profile-role-badge {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 6px;
    color: var(--room-accent);
    background: var(--room-accent-soft);
    font-size: 12px;
    white-space: nowrap;
}
#mySettings #tabProfile .profile-device-section h4 {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--fg-2);
}
#mySettings #tabProfile .extra-info-row {
    padding: 10px 12px;
    gap: 12px;
}
#mySettings #tabProfile .extra-info-label {
    flex-shrink: 0;
    font-size: 12px;
}
#mySettings #tabProfile .extra-info-badge {
    font-size: 11px;
    padding: 3px 8px;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}
:root[data-meeting-theme='light'] #mySettings #tabProfile :is(.extra-info-label, .extra-info-icon) {
    color: var(--fg-2);
}
:root[data-meeting-theme='light'] #mySettings #tabProfile .extra-info-badge {
    color: var(--fg-1);
    background: #fff;
    border-color: var(--border-strong);
}
@media (max-width: 480px) {
    #mySettings #tabProfile .extra-info-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
    #mySettings #tabProfile .extra-info-values {
        justify-content: flex-start;
        min-width: 0;
        width: 100%;
    }
}

/* Members share the chat panel; keep controls readable and clear of the meeting chrome. */
:root[data-meeting-theme='light'] #chatRoom {
    --chat-toolbar-surface: #f7f9fd;
    --chat-control-surface: #edf2fa;
    z-index: 110;
    min-width: 0;
    min-height: 0;
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 180px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    border-color: var(--border-subtle);
}
@media (min-width: 731px) {
    :root[data-meeting-theme='light'] #chatRoom:has(#chatTogglePin[aria-pressed='true']) {
        top: calc(76px + env(safe-area-inset-top)) !important;
        right: 8px !important;
    }
}
:root[data-meeting-theme='light'] #plist {
    box-sizing: border-box;
    position: absolute !important;
    height: 100% !important;
    padding: 16px;
    color: var(--fg-1);
}
:root[data-meeting-theme='light'] #plist .input-group {
    padding: 2px;
    margin-top: 0;
    background: var(--surface-1);
    border: 1px solid var(--border-strong);
    box-shadow: none;
}
:root[data-meeting-theme='light'] #plist .input-group:focus-within {
    border-color: var(--room-accent);
    box-shadow: 0 0 0 3px var(--room-accent-soft);
}
:root[data-meeting-theme='light'] #plist .input-group-text {
    min-width: 36px;
    height: 36px;
    font-size: 15px;
    border: 0;
    background: transparent;
    color: var(--fg-2);
}
:root[data-meeting-theme='light'] #searchParticipantsFromList {
    min-width: 0;
    padding: 10px 8px;
    color: var(--fg-1);
}
:root[data-meeting-theme='light'] #searchParticipantsFromList::placeholder {
    color: var(--fg-3);
}
:root[data-meeting-theme='light'] #plist :is(.chat-conversations-count, .chat-peer-status-text) {
    color: var(--fg-2);
    line-height: 1.6;
}
:root[data-meeting-theme='light'] #plist #chatShareRoomBtn {
    padding: 8px 10px;
    background: var(--room-accent-soft);
    color: var(--room-accent);
    font-family: inherit;
}
:root[data-meeting-theme='light'] #plist .chat-action-icon-btns > button,
:root[data-meeting-theme='light'] #plist #participantsHiddenBtn {
    color: var(--fg-2) !important;
    background: var(--surface-2);
}
:root[data-meeting-theme='light'] #plist #participantsHiddenBtn.is-filtering {
    color: var(--room-accent) !important;
    background: var(--room-accent-soft);
}
:root[data-meeting-theme='light'] #participantsList > li {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border-subtle);
    background: #fff;
    box-shadow: none;
}
:root[data-meeting-theme='light'] #participantsList > li:is(:hover, .active) {
    background: var(--room-accent-soft);
    border-color: #cddcfb;
    transform: none;
}
:root[data-meeting-theme='light'] #participantsList > li > img {
    float: none;
    width: 40px;
    height: 40px;
    object-fit: cover;
}
:root[data-meeting-theme='light'] #participantsList #all > img {
    background: var(--room-accent);
    padding: 6px;
}
:root[data-meeting-theme='light'] #participantsList .about {
    float: none;
    width: auto;
    min-width: 0;
    padding: 0 28px 0 0;
}
:root[data-meeting-theme='light'] #participantsList .name {
    color: var(--fg-1);
    font-size: 14px;
    font-weight: 600;
}
:root[data-meeting-theme='light'] #participantsList .chat-peer-status-text {
    overflow-wrap: anywhere;
    font-size: 12px;
}
:root[data-meeting-theme='light'] #participantsList .participant-list-buttons-slot > br {
    display: none;
}
:root[data-meeting-theme='light'] #participantsList .about-buttons {
    grid-column: 1 / -1;
    margin: 0;
    gap: 6px;
    flex-wrap: wrap;
    max-height: none;
}
:root[data-meeting-theme='light'] #participantsList .about-buttons button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--border-subtle);
    font-size: 14px;
}
:root[data-meeting-theme='light'] #participantsList .about-buttons button:hover {
    background: var(--surface-2);
}
:root[data-meeting-theme='light'] #participantsList .about-buttons .participant-action-label:empty {
    display: none;
}
:root[data-meeting-theme='light'] #participantsList .participant-list-dropdown-toggle {
    background: var(--surface-2);
    color: var(--fg-2) !important;
    opacity: 1;
}
:root[data-meeting-theme='light'] .participant-list-dropdown-menu :is(.participant-menu-header-title, button) {
    color: var(--fg-1);
}
:root[data-meeting-theme='light']
    .participant-list-dropdown-menu
    :is(.participant-menu-header, .participant-menu-group-label) {
    border-color: var(--border-subtle);
    color: var(--fg-2);
}
:root[data-meeting-theme='light'] .participant-list-dropdown-menu .participant-menu-header {
    background: var(--surface-1);
}
:root[data-meeting-theme='light'] .participant-list-dropdown-menu .participant-menu-header-avatar {
    background: var(--room-accent);
}
:root[data-meeting-theme='light'] .participant-list-dropdown-menu .participant-action-danger {
    color: #c93445;
}
:root[data-meeting-theme='light'] #plist button:focus-visible {
    outline: 2px solid var(--room-accent);
    outline-offset: 2px;
}
:root[data-meeting-theme='light'] #chatRoom :is(.chat-about h6, #chatEmptyNotice h5) {
    color: var(--fg-1);
}
:root[data-meeting-theme='light'] #chatRoom :is(.chat-peer-status-text, #chatEmptyNotice p) {
    color: var(--fg-2);
}
:root[data-meeting-theme='light'] #chatRoom .chat-header {
    border-color: var(--border-subtle);
    box-shadow: none;
}
/* Message content needs its own light palette; the upstream bubbles use white ink. */
#chatRoom .chat-history > ul > li {
    display: flow-root;
    margin-bottom: 16px;
}
#chatRoom .chat-history .message-data {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
#chatRoom .chat-history .message-data.text-end {
    justify-content: flex-end;
}
#chatRoom .chat-history .message-data img {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    box-shadow: none;
}
#chatRoom .chat-history .message-data-time {
    min-width: 0;
    padding: 0;
    overflow-wrap: anywhere;
}
#chatRoom .chat-history .message {
    box-sizing: border-box;
    max-width: calc(100% - 12px);
    padding: 10px 12px;
    overflow-wrap: anywhere;
    backdrop-filter: none;
}
#chatRoom .chat-history .message > .text-start {
    display: block;
    white-space: pre-wrap;
}
#chatRoom .chat-history .message :is(img, video) {
    max-width: 100%;
    height: auto;
}
#chatRoom .chat-history .message pre {
    max-width: 100%;
    overflow-x: auto;
}
#chatRoom .chat-history .message hr {
    margin: 8px 0 6px;
}
#chatRoom .chat-history .message-reactions:empty {
    display: none;
}
#chatRoom .chat-history .about-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 0;
}
#chatRoom .chat-history .about-buttons button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 7px;
    font-size: 13px;
}
:root[data-meeting-theme='light'] #chatRoom .chat-history .message {
    color: var(--fg-1);
    border: 1px solid var(--border-subtle);
}
:root[data-meeting-theme='light'] #chatRoom .chat-history .message p {
    color: inherit;
}
:root[data-meeting-theme='light'] #chatRoom .chat-history .other-message {
    background: var(--surface-1);
}
:root[data-meeting-theme='light'] #chatRoom .chat-history .my-message {
    background: var(--room-accent-soft);
    border-color: #dce6fb;
}
:root[data-meeting-theme='light'] #chatRoom .chat-history .message-data-time {
    color: var(--fg-2);
}
:root[data-meeting-theme='light'] #chatRoom .chat-history .message hr {
    background: var(--border-strong);
    border-color: var(--border-strong);
    opacity: 1;
}
:root[data-meeting-theme='light'] #chatRoom .chat-history .about-buttons button {
    color: var(--fg-2);
    background: transparent;
}
:root[data-meeting-theme='light'] #chatRoom .chat-history .about-buttons button:hover {
    color: var(--room-accent);
    background: var(--surface-3);
}
#chatRoom .chat-history .about-buttons button:focus-visible {
    outline: 2px solid var(--room-accent, #4678f9);
    outline-offset: 2px;
}
:root[data-meeting-theme='light'] #chatRoom :is(.reaction-picker, .reaction-badge) {
    color: var(--fg-1);
    background: var(--surface-2);
    border-color: var(--border-strong);
}
:root[data-meeting-theme='light'] #chatRoom .reaction-count {
    color: var(--fg-2);
}
:root[data-meeting-theme='light'] #chatRoom .reaction-badge.my-reaction {
    background: var(--room-accent-soft);
    border-color: var(--room-accent);
}
:root[data-meeting-theme='light'] #chatRoom .chat-about > img {
    background: var(--room-accent);
    border-radius: 50%;
}
:root[data-meeting-theme='light'] #chatRoom :is(.chat-header, .chat-message) button {
    color: var(--fg-2);
}
:root[data-meeting-theme='light'] #chatRoom :is(.chat-header, .chat-message) button i {
    color: inherit;
}
:root[data-meeting-theme='light'] #chatAbout img[src$='/all.png'] {
    padding: 5px;
    border-radius: 50%;
    background: var(--room-accent);
}
:root[data-meeting-theme='light'] #chatDropDownMenu {
    color: var(--fg-2) !important;
}
:root[data-meeting-theme='light'] #chatDropDownMenu[aria-expanded='true'] {
    color: var(--room-accent) !important;
    background: var(--room-accent-soft);
}
#chatOptionsMenu {
    box-sizing: border-box;
    width: 280px;
    min-width: 0;
    max-width: calc(100vw - 32px);
    max-height: calc(100dvh - 180px);
    padding: 6px;
}
#chatOptionsMenu > li {
    padding: 0;
}
#chatOptionsMenu > li:first-child > hr {
    display: none;
}
#chatOptionsMenu .transcription-switch-row {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) 44px;
    gap: 10px;
    padding: 10px;
    min-height: 44px;
    white-space: normal;
}
#chatOptionsMenu .transcription-switch-row i {
    width: 18px;
    font-size: 14px;
}
#chatOptionsMenu .transcription-switch-label {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    cursor: pointer;
}
#chatOptionsMenu .form-switch.form-switch-md {
    min-height: 24px;
}
#chatOptionsMenu .form-switch.form-switch-md::after {
    content: none;
}
#chatOptionsMenu .form-switch.form-switch-md .form-check-input {
    width: 44px;
    height: 24px;
    margin: 0;
    background-image: radial-gradient(circle, #fff 0 8px, transparent 9px);
    background-size: 22px 22px;
    cursor: pointer;
}
#chatOptionsMenu > li > button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    margin: 0;
    padding: 10px;
    font-size: 13px;
    line-height: 1.5;
}
#chatOptionsMenu > li > button i {
    width: 18px;
    margin: 0;
    text-align: center;
}
#chatOptionsMenu > li > button:hover {
    padding-left: 10px;
}
:root[data-meeting-theme='light'] #chatOptionsMenu :is(.transcription-switch-row, label, i) {
    color: var(--fg-2);
}
:root[data-meeting-theme='light'] #chatOptionsMenu .form-check-input:not(:checked) {
    background-color: #dce4ef;
    border-color: #cbd6e5;
}
:root[data-meeting-theme='light'] #chatOptionsMenu .form-check-input:checked {
    background-color: var(--room-accent);
    border-color: var(--room-accent);
}
:root[data-meeting-theme='light'] #chatOptionsMenu hr {
    margin: 6px 10px;
    background: var(--border-subtle);
    opacity: 1;
}
:root[data-meeting-theme='light'] #chatOptionsMenu .transcription-switch-row:hover {
    background: var(--surface-1);
}
:root[data-meeting-theme='light'] #chatOptionsMenu #chatCleanButton,
:root[data-meeting-theme='light'] #chatOptionsMenu #chatCleanButton i {
    color: #c93445;
}
:root[data-meeting-theme='light'] #chatMessage::placeholder {
    color: var(--fg-3);
}
:root[data-meeting-theme='light'] #chatMessage {
    color: var(--fg-1) !important;
    caret-color: var(--room-accent);
    font-family: inherit;
}
:root[data-meeting-theme='light'] #chatRoom :is(.chat-char-count, .chat-input-hint) {
    color: var(--fg-2);
}
:root[data-meeting-theme='light'] #chatRoom .chat-input-container {
    background: var(--surface-1);
    border-color: var(--border-strong);
    border-radius: 12px;
}
:root[data-meeting-theme='light'] #chatRoom .chat-input-container:focus-within {
    border-color: var(--room-accent);
    box-shadow: 0 0 0 3px var(--room-accent-soft);
}
:root[data-meeting-theme='light'] #chatRoom #chatEmojiButton {
    color: var(--fg-2) !important;
}
:root[data-meeting-theme='light'] #chatRoom #chatEmojiButton[aria-expanded='true'] {
    color: var(--room-accent) !important;
    background: var(--room-accent-soft);
}
#chat > #chatEmoji {
    z-index: 20;
    left: 12px;
    bottom: 140px;
    width: min(340px, calc(100% - 24px));
    height: min(320px, calc(100% - 190px));
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--box-shadow);
}
#chatApp #chat {
    isolation: isolate;
}
#chatEmoji em-emoji-picker {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 0;
    --border-radius: 16px;
    --font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --shadow: none;
}
:root[data-meeting-theme='light'] #chatEmoji {
    background: #fff;
    border-color: var(--border-strong);
    --rgb-background: 255, 255, 255;
    --rgb-color: 28, 43, 69;
    --rgb-accent: 49, 104, 238;
    --rgb-input: 240, 243, 250;
    --rgb-color-border: 224, 231, 242;
}
@media (max-width: 730px) {
    :root[data-meeting-theme='light'] #chatRoom {
        top: calc(76px + env(safe-area-inset-top)) !important;
        left: 8px !important;
        right: 8px !important;
        bottom: calc(96px + env(safe-area-inset-bottom)) !important;
        width: auto !important;
        height: auto !important;
        max-height: none;
        transform: none !important;
    }
    :root[data-meeting-theme='light'] #plist {
        padding: 12px;
    }
    :root[data-meeting-theme='light'] #chat {
        margin-left: 0 !important;
        border-left: 0 !important;
    }
}

#loadingDiv.meeting-loading {
    position: fixed;
    inset: 0;
    display: grid;
    width: 100%;
    height: 100dvh;
    border-radius: 0;
    padding: 24px;
    background: #f7f9fc;
    transform: none;
}
#loadingDiv.meeting-loading #loadingTitle {
    font-family: inherit;
    padding: 0;
    font-size: 20px;
}
#loadingDiv.meeting-loading #loadingMessage {
    font-family: inherit;
    padding: 0;
    color: #758198;
    font-size: 13px;
}
:root[data-meeting-theme='light'] :is(.init-video-loader, .video-loader) .loading-spinner {
    width: 64px;
    height: 64px;
}
:root[data-meeting-theme='light'] :is(.init-video-loader, .video-loader) .spinner-ring {
    border: 3px solid #ffffff35;
    border-top-color: #89adff;
    border-right-color: #fff;
    animation-duration: 1.3s;
}
:root[data-meeting-theme='light'] :is(.init-video-loader, .video-loader) .spinner-ring::before {
    display: none;
}
:root[data-meeting-theme='light'] :is(.init-video-loader, .video-loader) .spinner-logo {
    width: 34px;
    height: 34px;
    animation: none;
}
@media (prefers-reduced-motion: reduce) {
    :is(.init-video-loader, .video-loader) .spinner-ring {
        animation: none;
    }
}

.meeting-diagnostics {
    margin-top: 16px;
    padding: 12px;
    border: 1px solid #d8e1f0;
    border-radius: 12px;
    text-align: left;
}
.meeting-diagnostics summary {
    cursor: pointer;
    font-weight: 600;
}
.meeting-diagnostics p {
    font-size: 13px;
    line-height: 1.6;
    margin: 10px 0;
}
.meeting-diagnostics label {
    display: block;
    margin-top: 8px;
    font-size: 13px;
}
#mySettings .meeting-diagnostics select {
    width: 100%;
    min-height: 40px;
    border: 1px solid #d8e1f0;
    border-radius: 8px;
    padding: 8px;
}
.meeting-diagnostics-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
#mySettings .meeting-diagnostics-actions button {
    width: auto;
    min-height: 40px;
    margin: 0;
    padding: 8px 12px;
    font-size: 13px;
}
#mySettings .meeting-diagnostics textarea {
    width: 100%;
    height: 160px;
    margin-top: 8px;
    padding: 8px;
    font: 12px/1.5 monospace;
}
:root[data-meeting-theme='light'] .meeting-diagnostics :is(select, textarea) {
    color: #22324b;
    background: #fff;
}
