/* StellarChat terminal themes pass 88.
   Uses data-stellar-theme for the real theme and leaves data-theme as light/dark tone
   so older Stellar CSS does not mistake terminal-light for dark mode. */

:root {
    --stellar-terminal-font: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

html[data-stellar-theme="terminal-dark"],
body[data-stellar-theme="terminal-dark"] {
    --terminal-bg: #000000;
    --terminal-panel: #030603;
    --terminal-panel-2: #071107;
    --terminal-text: #00ff66;
    --terminal-muted: #68f59a;
    --terminal-border: #00cc55;
    --terminal-fill: #001a0a;
    --terminal-danger: #ff3b3b;
    --accent: #00ff66;
    --accent-2: #00cc55;
    --primary: #00ff66;
    --button-gradient: none;
    background: var(--terminal-bg) !important;
    color: var(--terminal-text) !important;
}

html[data-stellar-theme="terminal-light"],
body[data-stellar-theme="terminal-light"] {
    --terminal-bg: #dddddd;
    --terminal-panel: #eeeeee;
    --terminal-panel-2: #d6d6d6;
    --terminal-text: #a00000;
    --terminal-muted: #7a1b1b;
    --terminal-border: #a00000;
    --terminal-fill: #f5f5f5;
    --terminal-danger: #5a0000;
    --accent: #a00000;
    --accent-2: #7a0000;
    --primary: #a00000;
    --button-gradient: none;
    background: var(--terminal-bg) !important;
    color: var(--terminal-text) !important;
}

html[data-stellar-theme^="terminal-"] *,
html[data-stellar-theme^="terminal-"] *::before,
html[data-stellar-theme^="terminal-"] *::after {
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    backdrop-filter: none !important;
}

html[data-stellar-theme^="terminal-"],
body[data-stellar-theme^="terminal-"] {
    font-family: var(--stellar-terminal-font) !important;
    letter-spacing: 0 !important;
}

html[data-stellar-theme^="terminal-"] .app-shell,
html[data-stellar-theme^="terminal-"] .auth-view,
html[data-stellar-theme^="terminal-"] .screen,
html[data-stellar-theme^="terminal-"] .settings-card,
html[data-stellar-theme^="terminal-"] .chat-panel,
html[data-stellar-theme^="terminal-"] .chat-window,
html[data-stellar-theme^="terminal-"] .chat-header,
html[data-stellar-theme^="terminal-"] .chat-composer,
html[data-stellar-theme^="terminal-"] .bottom-nav,
html[data-stellar-theme^="terminal-"] .stellar-drawer,
html[data-stellar-theme^="terminal-"] .call-overlay-card,
html[data-stellar-theme^="terminal-"] .group-call-overlay-card,
html[data-stellar-theme^="terminal-"] .modal,
html[data-stellar-theme^="terminal-"] .auth-card {
    background: var(--terminal-bg) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border-color: var(--terminal-border) !important;
}

html[data-stellar-theme^="terminal-"] .settings-card,
html[data-stellar-theme^="terminal-"] .conversation-item,
html[data-stellar-theme^="terminal-"] .contact-item,
html[data-stellar-theme^="terminal-"] .group-card,
html[data-stellar-theme^="terminal-"] .call-log-item,
html[data-stellar-theme^="terminal-"] .message-bubble,
html[data-stellar-theme^="terminal-"] .message-options-menu,
html[data-stellar-theme^="terminal-"] .reply-preview,
html[data-stellar-theme^="terminal-"] .attachment-menu,
html[data-stellar-theme^="terminal-"] .profile-card,
html[data-stellar-theme^="terminal-"] .settings-section-card,
html[data-stellar-theme^="terminal-"] .settings-preference-card {
    background: var(--terminal-panel) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border: 1px solid var(--terminal-border) !important;
    border-radius: 2px !important;
}

html[data-stellar-theme^="terminal-"] .message-bubble.is-own,
html[data-stellar-theme^="terminal-"] .message.is-own .message-bubble,
html[data-stellar-theme^="terminal-"] .chat-message.is-own .message-bubble {
    background: var(--terminal-fill) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border-color: var(--terminal-border) !important;
}

html[data-stellar-theme^="terminal-"] button,
html[data-stellar-theme^="terminal-"] .button,
html[data-stellar-theme^="terminal-"] .primary-button,
html[data-stellar-theme^="terminal-"] .auth-submit-button,
html[data-stellar-theme^="terminal-"] .send-button,
html[data-stellar-theme^="terminal-"] .fab-button,
html[data-stellar-theme^="terminal-"] .icon-button,
html[data-stellar-theme^="terminal-"] .call-action-button,
html[data-stellar-theme^="terminal-"] .nav-item,
html[data-stellar-theme^="terminal-"] .stellar-nav-item,
html[data-stellar-theme^="terminal-"] .tab-button,
html[data-stellar-theme^="terminal-"] .messaging-tab {
    font-family: var(--stellar-terminal-font) !important;
    background: var(--terminal-bg) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border: 1px solid var(--terminal-border) !important;
    border-radius: 2px !important;
    text-transform: uppercase;
}

html[data-stellar-theme^="terminal-"] button::before,
html[data-stellar-theme^="terminal-"] .primary-button::before,
html[data-stellar-theme^="terminal-"] .send-button::before,
html[data-stellar-theme^="terminal-"] .call-action-button::before {
    content: "[";
}

html[data-stellar-theme^="terminal-"] button::after,
html[data-stellar-theme^="terminal-"] .primary-button::after,
html[data-stellar-theme^="terminal-"] .send-button::after,
html[data-stellar-theme^="terminal-"] .call-action-button::after {
    content: "]";
}

html[data-stellar-theme^="terminal-"] button.is-active,
html[data-stellar-theme^="terminal-"] button:hover,
html[data-stellar-theme^="terminal-"] .nav-item.is-active,
html[data-stellar-theme^="terminal-"] .stellar-nav-item.is-active,
html[data-stellar-theme^="terminal-"] .tab-button.is-active,
html[data-stellar-theme^="terminal-"] .messaging-tab.is-active {
    background: var(--terminal-fill) !important;
    color: var(--terminal-text) !important;
    outline: 1px solid var(--terminal-border) !important;
}

html[data-stellar-theme^="terminal-"] input,
html[data-stellar-theme^="terminal-"] textarea,
html[data-stellar-theme^="terminal-"] select,
html[data-stellar-theme^="terminal-"] .composer-input,
html[data-stellar-theme^="terminal-"] .message-input {
    font-family: var(--stellar-terminal-font) !important;
    background: var(--terminal-panel) !important;
    color: var(--terminal-text) !important;
    border: 1px solid var(--terminal-border) !important;
    border-radius: 2px !important;
    caret-color: var(--terminal-text) !important;
}

html[data-stellar-theme^="terminal-"] input::placeholder,
html[data-stellar-theme^="terminal-"] textarea::placeholder {
    color: var(--terminal-muted) !important;
    opacity: 0.85 !important;
}

html[data-stellar-theme^="terminal-"] i,
html[data-stellar-theme^="terminal-"] svg,
html[data-stellar-theme^="terminal-"] small,
html[data-stellar-theme^="terminal-"] .muted,
html[data-stellar-theme^="terminal-"] .message-meta,
html[data-stellar-theme^="terminal-"] .conversation-preview,
html[data-stellar-theme^="terminal-"] .call-log-meta {
    color: var(--terminal-text) !important;
    fill: var(--terminal-text) !important;
}

html[data-stellar-theme^="terminal-"] .profile-initials,
html[data-stellar-theme^="terminal-"] .avatar,
html[data-stellar-theme^="terminal-"] .conversation-avatar,
html[data-stellar-theme^="terminal-"] .contact-avatar,
html[data-stellar-theme^="terminal-"] .group-avatar,
html[data-stellar-theme^="terminal-"] .call-icon {
    background: var(--terminal-bg) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border: 1px solid var(--terminal-border) !important;
}

html[data-stellar-theme^="terminal-"] .call-video-stage,
html[data-stellar-theme^="terminal-"] .group-call-video-stage,
html[data-stellar-theme^="terminal-"] video {
    background: #000 !important;
    border-color: var(--terminal-border) !important;
}

html[data-stellar-theme^="terminal-"] .is-danger,
html[data-stellar-theme^="terminal-"] .danger-button,
html[data-stellar-theme^="terminal-"] .hangup-button,
html[data-stellar-theme^="terminal-"] [data-call-action="end"],
html[data-stellar-theme^="terminal-"] [data-group-call-action="leave"] {
    color: var(--terminal-danger) !important;
    border-color: var(--terminal-danger) !important;
}

.settings-theme-select-row,
.settings-theme-select-row select {
    min-width: 180px;
}

@media (max-width: 520px) {
    .theme-settings-card {
        align-items: stretch;
        flex-direction: column;
    }

    .settings-theme-select-row,
    .settings-theme-select-row select {
        width: 100%;
    }
}

/* PASS90 terminal theme polish start */
/* Real terminal mode: flat, readable, no blue leaks, no pseudo-bracket chaos. */
html[data-stellar-theme="terminal-dark"],
body[data-stellar-theme="terminal-dark"] {
    --terminal-bg: #000000;
    --terminal-panel: #020502;
    --terminal-panel-2: #061006;
    --terminal-own: #001b0a;
    --terminal-text: #00ff66;
    --terminal-muted: #9dffbf;
    --terminal-border: #00d85a;
    --terminal-fill: #001f0d;
    --terminal-danger: #ff4d4d;
    --terminal-selection: #073015;
    --stellar-neon: #00ff66;
    --stellar-neon-2: #00d85a;
    --stellar-neon-rgb: 0, 255, 102;
    --stellar-neon-glow: transparent;
    --stellar-neon-soft: transparent;
    --stellar-neon-line: #00d85a;
    --bg: #000000;
    --surface: #020502;
    --surface-soft: #061006;
    --surface-strong: #061006;
    --text: #00ff66;
    --muted: #9dffbf;
    --border: #00d85a;
    --icon: #00ff66;
    --accent: #00ff66;
    --accent-2: #00d85a;
    --primary: #00ff66;
    --button-gradient: none;
    --shadow: transparent;
}

html[data-stellar-theme="terminal-light"],
body[data-stellar-theme="terminal-light"] {
    --terminal-bg: #dedbd5;
    --terminal-panel: #e9e6df;
    --terminal-panel-2: #d8d4cc;
    --terminal-own: #f1dfdc;
    --terminal-text: #8d0000;
    --terminal-muted: #5f2020;
    --terminal-border: #990000;
    --terminal-fill: #f3e8e5;
    --terminal-danger: #4d0000;
    --terminal-selection: #ead1ce;
    --stellar-neon: #990000;
    --stellar-neon-2: #6e0000;
    --stellar-neon-rgb: 153, 0, 0;
    --stellar-neon-glow: transparent;
    --stellar-neon-soft: transparent;
    --stellar-neon-line: #990000;
    --bg: #dedbd5;
    --surface: #e9e6df;
    --surface-soft: #f1efea;
    --surface-strong: #d8d4cc;
    --text: #8d0000;
    --muted: #5f2020;
    --border: #990000;
    --icon: #8d0000;
    --accent: #8d0000;
    --accent-2: #6e0000;
    --primary: #8d0000;
    --button-gradient: none;
    --shadow: transparent;
}

html[data-stellar-theme^="terminal-"] *,
html[data-stellar-theme^="terminal-"] *::before,
html[data-stellar-theme^="terminal-"] *::after {
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    backdrop-filter: none !important;
}

html[data-stellar-theme^="terminal-"] .app-shell::before,
html[data-stellar-theme^="terminal-"] body::before,
html[data-stellar-theme^="terminal-"] body::after,
html[data-stellar-theme^="terminal-"] .screen::before,
html[data-stellar-theme^="terminal-"] .screen::after,
html[data-stellar-theme^="terminal-"] .bottom-nav::before,
html[data-stellar-theme^="terminal-"] .bottom-nav::after,
html[data-stellar-theme^="terminal-"] .message-composer::before,
html[data-stellar-theme^="terminal-"] .message-composer::after {
    content: none !important;
    display: none !important;
    background: none !important;
}

/* Pass88 brackets looked funny for 4 seconds, then became UI shrapnel. Remove them. */
html[data-stellar-theme^="terminal-"] button::before,
html[data-stellar-theme^="terminal-"] button::after,
html[data-stellar-theme^="terminal-"] .button::before,
html[data-stellar-theme^="terminal-"] .button::after,
html[data-stellar-theme^="terminal-"] .primary-button::before,
html[data-stellar-theme^="terminal-"] .primary-button::after,
html[data-stellar-theme^="terminal-"] .send-button::before,
html[data-stellar-theme^="terminal-"] .send-button::after,
html[data-stellar-theme^="terminal-"] .call-action-button::before,
html[data-stellar-theme^="terminal-"] .call-action-button::after,
html[data-stellar-theme^="terminal-"] .composer-icon-button::before,
html[data-stellar-theme^="terminal-"] .composer-icon-button::after,
html[data-stellar-theme^="terminal-"] .icon-button::before,
html[data-stellar-theme^="terminal-"] .icon-button::after {
    content: none !important;
    display: none !important;
}

html[data-stellar-theme^="terminal-"],
html[data-stellar-theme^="terminal-"] body,
html[data-stellar-theme^="terminal-"] .app-shell,
html[data-stellar-theme^="terminal-"] .auth-view,
html[data-stellar-theme^="terminal-"] .app-view,
html[data-stellar-theme^="terminal-"] .screen,
html[data-stellar-theme^="terminal-"] .chat-window,
html[data-stellar-theme^="terminal-"] .chat-panel,
html[data-stellar-theme^="terminal-"] .messages-list,
html[data-stellar-theme^="terminal-"] .chat-thread,
html[data-stellar-theme^="terminal-"] .chat-main,
html[data-stellar-theme^="terminal-"] .app-main,
html[data-stellar-theme^="terminal-"] .screen-content {
    font-family: var(--stellar-terminal-font) !important;
    background: var(--terminal-bg) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
}

html[data-stellar-theme^="terminal-"] .auth-card,
html[data-stellar-theme^="terminal-"] .settings-card,
html[data-stellar-theme^="terminal-"] .settings-section-card,
html[data-stellar-theme^="terminal-"] .settings-preference-card,
html[data-stellar-theme^="terminal-"] .settings-preference-row,
html[data-stellar-theme^="terminal-"] .settings-toggle-card,
html[data-stellar-theme^="terminal-"] .translation-settings-card,
html[data-stellar-theme^="terminal-"] .conversation-item,
html[data-stellar-theme^="terminal-"] .group-conversation-item,
html[data-stellar-theme^="terminal-"] .contact-item,
html[data-stellar-theme^="terminal-"] .contact-card,
html[data-stellar-theme^="terminal-"] .group-card,
html[data-stellar-theme^="terminal-"] .call-log-item,
html[data-stellar-theme^="terminal-"] .profile-card,
html[data-stellar-theme^="terminal-"] .modal,
html[data-stellar-theme^="terminal-"] .message-options-menu,
html[data-stellar-theme^="terminal-"] .attachment-menu,
html[data-stellar-theme^="terminal-"] .reply-preview,
html[data-stellar-theme^="terminal-"] .inline-reply-preview,
html[data-stellar-theme^="terminal-"] .composer-retry-panel,
html[data-stellar-theme^="terminal-"] .voice-recording-panel,
html[data-stellar-theme^="terminal-"] .device-stats-toggle,
html[data-stellar-theme^="terminal-"] .call-overlay-card,
html[data-stellar-theme^="terminal-"] .group-call-overlay-card {
    background: var(--terminal-panel) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border: 1px solid var(--terminal-border) !important;
    border-radius: 2px !important;
    outline: 0 !important;
}

html[data-stellar-theme^="terminal-"] .chat-header,
html[data-stellar-theme^="terminal-"] .bottom-nav,
html[data-stellar-theme^="terminal-"] .message-composer,
html[data-stellar-theme^="terminal-"] .stellar-drawer,
html[data-stellar-theme^="terminal-"] .stellar-drawer-panel,
html[data-stellar-theme^="terminal-"] .messaging-tabs,
html[data-stellar-theme^="terminal-"] .nav-style-segmented {
    background: var(--terminal-bg) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border-color: var(--terminal-border) !important;
    border-radius: 2px !important;
}

html[data-stellar-theme^="terminal-"] .screen-header h1,
html[data-stellar-theme^="terminal-"] .screen-header p,
html[data-stellar-theme^="terminal-"] .chat-header h1,
html[data-stellar-theme^="terminal-"] .chat-header p,
html[data-stellar-theme^="terminal-"] .settings-card h2,
html[data-stellar-theme^="terminal-"] .settings-card h3,
html[data-stellar-theme^="terminal-"] .settings-card p,
html[data-stellar-theme^="terminal-"] .settings-preference-copy,
html[data-stellar-theme^="terminal-"] .settings-preference-copy strong,
html[data-stellar-theme^="terminal-"] .settings-preference-copy small,
html[data-stellar-theme^="terminal-"] .conversation-title,
html[data-stellar-theme^="terminal-"] .conversation-preview,
html[data-stellar-theme^="terminal-"] .contact-name,
html[data-stellar-theme^="terminal-"] .contact-alias,
html[data-stellar-theme^="terminal-"] .group-name,
html[data-stellar-theme^="terminal-"] .call-log-name,
html[data-stellar-theme^="terminal-"] .call-log-meta,
html[data-stellar-theme^="terminal-"] .call-log-time,
html[data-stellar-theme^="terminal-"] .muted,
html[data-stellar-theme^="terminal-"] small,
html[data-stellar-theme^="terminal-"] label,
html[data-stellar-theme^="terminal-"] span,
html[data-stellar-theme^="terminal-"] p,
html[data-stellar-theme^="terminal-"] strong {
    color: var(--terminal-text) !important;
    opacity: 1 !important;
}

html[data-stellar-theme^="terminal-"] .muted,
html[data-stellar-theme^="terminal-"] small,
html[data-stellar-theme^="terminal-"] .conversation-preview,
html[data-stellar-theme^="terminal-"] .contact-alias,
html[data-stellar-theme^="terminal-"] .call-log-meta,
html[data-stellar-theme^="terminal-"] .message-meta,
html[data-stellar-theme^="terminal-"] .message-date-separator span {
    color: var(--terminal-muted) !important;
}

html[data-stellar-theme^="terminal-"] button,
html[data-stellar-theme^="terminal-"] .button,
html[data-stellar-theme^="terminal-"] .primary-button,
html[data-stellar-theme^="terminal-"] .auth-submit-button,
html[data-stellar-theme^="terminal-"] .send-button,
html[data-stellar-theme^="terminal-"] .fab-button,
html[data-stellar-theme^="terminal-"] .chat-create-button,
html[data-stellar-theme^="terminal-"] .icon-button,
html[data-stellar-theme^="terminal-"] .chat-header-action,
html[data-stellar-theme^="terminal-"] .chat-back-button,
html[data-stellar-theme^="terminal-"] .composer-icon-button,
html[data-stellar-theme^="terminal-"] .call-action-button,
html[data-stellar-theme^="terminal-"] .contact-action-button,
html[data-stellar-theme^="terminal-"] .message-options-button,
html[data-stellar-theme^="terminal-"] .nav-item,
html[data-stellar-theme^="terminal-"] .bottom-nav button,
html[data-stellar-theme^="terminal-"] .stellar-nav-item,
html[data-stellar-theme^="terminal-"] .nav-style-option,
html[data-stellar-theme^="terminal-"] .messaging-tab,
html[data-stellar-theme^="terminal-"] .messaging-tab-button,
html[data-stellar-theme^="terminal-"] .tab-button {
    font-family: var(--stellar-terminal-font) !important;
    background: var(--terminal-bg) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border: 1px solid var(--terminal-border) !important;
    border-radius: 2px !important;
    outline: 0 !important;
    text-transform: uppercase;
}

html[data-stellar-theme^="terminal-"] button.is-active,
html[data-stellar-theme^="terminal-"] button[aria-pressed="true"],
html[data-stellar-theme^="terminal-"] .primary-button,
html[data-stellar-theme^="terminal-"] .auth-submit-button,
html[data-stellar-theme^="terminal-"] .send-button,
html[data-stellar-theme^="terminal-"] .fab-button,
html[data-stellar-theme^="terminal-"] .chat-create-button,
html[data-stellar-theme^="terminal-"] .nav-item.is-active,
html[data-stellar-theme^="terminal-"] .bottom-nav button.is-active,
html[data-stellar-theme^="terminal-"] .stellar-nav-item.is-active,
html[data-stellar-theme^="terminal-"] .nav-style-option.is-active,
html[data-stellar-theme^="terminal-"] .messaging-tab.is-active,
html[data-stellar-theme^="terminal-"] .messaging-tab-button.is-active,
html[data-stellar-theme^="terminal-"] .tab-button.is-active {
    background: var(--terminal-selection) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border-color: var(--terminal-border) !important;
}

html[data-stellar-theme^="terminal-"] i,
html[data-stellar-theme^="terminal-"] .fa,
html[data-stellar-theme^="terminal-"] .fa-solid,
html[data-stellar-theme^="terminal-"] [class^="fa-"],
html[data-stellar-theme^="terminal-"] [class*=" fa-"],
html[data-stellar-theme^="terminal-"] svg,
html[data-stellar-theme^="terminal-"] svg *,
html[data-stellar-theme^="terminal-"] .settings-preference-icon,
html[data-stellar-theme^="terminal-"] .settings-preference-icon i,
html[data-stellar-theme^="terminal-"] .nav-item i,
html[data-stellar-theme^="terminal-"] .bottom-nav i,
html[data-stellar-theme^="terminal-"] .send-button i,
html[data-stellar-theme^="terminal-"] .composer-icon-button i,
html[data-stellar-theme^="terminal-"] .chat-header-action i,
html[data-stellar-theme^="terminal-"] .contact-action-button i,
html[data-stellar-theme^="terminal-"] .call-icon i {
    color: var(--terminal-text) !important;
    fill: var(--terminal-text) !important;
    stroke: var(--terminal-text) !important;
}

html[data-stellar-theme^="terminal-"] input,
html[data-stellar-theme^="terminal-"] textarea,
html[data-stellar-theme^="terminal-"] select,
html[data-stellar-theme^="terminal-"] .composer-input,
html[data-stellar-theme^="terminal-"] .message-input,
html[data-stellar-theme^="terminal-"] .message-composer textarea {
    font-family: var(--stellar-terminal-font) !important;
    background: var(--terminal-panel) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border: 1px solid var(--terminal-border) !important;
    border-radius: 2px !important;
    caret-color: var(--terminal-text) !important;
}

html[data-stellar-theme^="terminal-"] input::placeholder,
html[data-stellar-theme^="terminal-"] textarea::placeholder {
    color: var(--terminal-muted) !important;
    opacity: 0.9 !important;
}

html[data-stellar-theme^="terminal-"] input:focus,
html[data-stellar-theme^="terminal-"] textarea:focus,
html[data-stellar-theme^="terminal-"] select:focus,
html[data-stellar-theme^="terminal-"] button:focus-visible {
    border-color: var(--terminal-text) !important;
    outline: 1px solid var(--terminal-text) !important;
}

html[data-stellar-theme^="terminal-"] .message-bubble,
html[data-stellar-theme^="terminal-"] .message-bubble:not(.is-own),
html[data-stellar-theme^="terminal-"] .chat-message:not(.is-own) .message-bubble {
    background: var(--terminal-panel) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border: 1px solid var(--terminal-border) !important;
    border-radius: 2px !important;
    opacity: 1 !important;
}

html[data-stellar-theme^="terminal-"] .message-bubble.is-own,
html[data-stellar-theme^="terminal-"] .message.is-own .message-bubble,
html[data-stellar-theme^="terminal-"] .chat-message.is-own .message-bubble {
    background: var(--terminal-own) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border: 1px solid var(--terminal-border) !important;
}

html[data-stellar-theme^="terminal-"] .message-bubble *,
html[data-stellar-theme^="terminal-"] .message-bubble.is-own *,
html[data-stellar-theme^="terminal-"] .message-bubble:not(.is-own) *,
html[data-stellar-theme^="terminal-"] .inline-reply-preview *,
html[data-stellar-theme^="terminal-"] .attachment-file *,
html[data-stellar-theme^="terminal-"] .attachment-location *,
html[data-stellar-theme^="terminal-"] .attachment-voice * {
    color: var(--terminal-text) !important;
    opacity: 1 !important;
}

html[data-stellar-theme^="terminal-"] .message-meta,
html[data-stellar-theme^="terminal-"] .message-meta *,
html[data-stellar-theme^="terminal-"] .voice-duration {
    color: var(--terminal-muted) !important;
    opacity: 1 !important;
}

html[data-stellar-theme^="terminal-"] .inline-reply-preview,
html[data-stellar-theme^="terminal-"] .attachment-file,
html[data-stellar-theme^="terminal-"] .attachment-location,
html[data-stellar-theme^="terminal-"] .attachment-voice,
html[data-stellar-theme^="terminal-"] .reaction-pill {
    background: var(--terminal-bg) !important;
    background-image: none !important;
    border: 1px solid var(--terminal-border) !important;
    color: var(--terminal-text) !important;
}

html[data-stellar-theme^="terminal-"] .voice-play-button,
html[data-stellar-theme^="terminal-"] .voice-waveform,
html[data-stellar-theme^="terminal-"] .voice-progress,
html[data-stellar-theme^="terminal-"] .voice-progress-track {
    background: var(--terminal-bg) !important;
    border: 1px solid var(--terminal-border) !important;
    color: var(--terminal-text) !important;
}

html[data-stellar-theme^="terminal-"] .voice-waveform i,
html[data-stellar-theme^="terminal-"] .voice-progress-fill {
    background: var(--terminal-text) !important;
}

html[data-stellar-theme^="terminal-"] .message-date-separator span {
    background: var(--terminal-panel-2) !important;
    background-image: none !important;
    border: 1px solid var(--terminal-border) !important;
    border-radius: 2px !important;
    color: var(--terminal-muted) !important;
}

html[data-stellar-theme^="terminal-"] .avatar,
html[data-stellar-theme^="terminal-"] .profile-initials,
html[data-stellar-theme^="terminal-"] .conversation-avatar,
html[data-stellar-theme^="terminal-"] .contact-avatar,
html[data-stellar-theme^="terminal-"] .group-avatar,
html[data-stellar-theme^="terminal-"] .call-icon,
html[data-stellar-theme^="terminal-"] .settings-preference-icon {
    background: var(--terminal-bg) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border: 1px solid var(--terminal-border) !important;
    border-radius: 2px !important;
}

html[data-stellar-theme^="terminal-"] .call-log-item .call-icon,
html[data-stellar-theme^="terminal-"] .call-icon {
    background: var(--terminal-selection) !important;
    background-image: none !important;
}

html[data-stellar-theme^="terminal-"] .toggle-switch,
html[data-stellar-theme^="terminal-"] .switch,
html[data-stellar-theme^="terminal-"] .slider,
html[data-stellar-theme^="terminal-"] .toggle-slider,
html[data-stellar-theme^="terminal-"] .settings-toggle,
html[data-stellar-theme^="terminal-"] input[type="checkbox"] + span {
    background: var(--terminal-bg) !important;
    background-image: none !important;
    border-color: var(--terminal-border) !important;
}

html[data-stellar-theme^="terminal-"] .call-video-stage,
html[data-stellar-theme^="terminal-"] .group-call-video-stage,
html[data-stellar-theme^="terminal-"] .local-video-container,
html[data-stellar-theme^="terminal-"] .remote-video-container,
html[data-stellar-theme^="terminal-"] video {
    background: #000 !important;
    background-image: none !important;
    border-color: var(--terminal-border) !important;
}

html[data-stellar-theme^="terminal-"] .is-danger,
html[data-stellar-theme^="terminal-"] .danger-button,
html[data-stellar-theme^="terminal-"] .hangup-button,
html[data-stellar-theme^="terminal-"] [data-call-action="end"],
html[data-stellar-theme^="terminal-"] [data-group-call-action="leave"] {
    color: var(--terminal-danger) !important;
    border-color: var(--terminal-danger) !important;
}

html[data-stellar-theme^="terminal-"] img {
    box-shadow: none !important;
}

html[data-stellar-theme^="terminal-"] ::selection {
    background: var(--terminal-selection) !important;
    color: var(--terminal-text) !important;
}
/* PASS90 terminal theme polish end */

/* PASS91 terminal hardcore fast mode start
   Less cute, more terminal. No blue leaks, no photos, no rounded eggs, no glow. */
html[data-stellar-theme="terminal-dark"],
body[data-stellar-theme="terminal-dark"] {
    --stellar-terminal-font: "Courier New", "Nimbus Mono PS", "Liberation Mono", monospace;
    --terminal-bg: #000000;
    --terminal-panel: #000000;
    --terminal-panel-2: #020602;
    --terminal-own: #001006;
    --terminal-text: #00b84a;
    --terminal-muted: #63b984;
    --terminal-border: #007f34;
    --terminal-fill: #001607;
    --terminal-danger: #b84444;
    --terminal-selection: #031f0d;
    --stellar-neon: #00b84a;
    --stellar-neon-2: #007f34;
    --stellar-neon-rgb: 0, 184, 74;
    --stellar-neon-glow: transparent;
    --stellar-neon-soft: transparent;
    --stellar-neon-line: #007f34;
    --bg: #000000;
    --surface: #000000;
    --surface-soft: #000000;
    --surface-strong: #020602;
    --text: #00b84a;
    --muted: #63b984;
    --border: #007f34;
    --icon: #00b84a;
    --accent: #00b84a;
    --accent-2: #007f34;
    --primary: #00b84a;
    --button-gradient: none;
    --shadow: transparent;
    color-scheme: dark;
}

html[data-stellar-theme="terminal-light"],
body[data-stellar-theme="terminal-light"] {
    --stellar-terminal-font: "Courier New", "Nimbus Mono PS", "Liberation Mono", monospace;
    --terminal-bg: #d8d8d8;
    --terminal-panel: #d8d8d8;
    --terminal-panel-2: #cfcfcf;
    --terminal-own: #e3d6d6;
    --terminal-text: #7c0000;
    --terminal-muted: #643232;
    --terminal-border: #8a0000;
    --terminal-fill: #e8dfdf;
    --terminal-danger: #4d0000;
    --terminal-selection: #c9bbbb;
    --stellar-neon: #7c0000;
    --stellar-neon-2: #8a0000;
    --stellar-neon-rgb: 124, 0, 0;
    --stellar-neon-glow: transparent;
    --stellar-neon-soft: transparent;
    --stellar-neon-line: #8a0000;
    --bg: #d8d8d8;
    --surface: #d8d8d8;
    --surface-soft: #d8d8d8;
    --surface-strong: #cfcfcf;
    --text: #7c0000;
    --muted: #643232;
    --border: #8a0000;
    --icon: #7c0000;
    --accent: #7c0000;
    --accent-2: #8a0000;
    --primary: #7c0000;
    --button-gradient: none;
    --shadow: transparent;
    color-scheme: light;
}

html[data-stellar-theme^="terminal-"] *,
html[data-stellar-theme^="terminal-"] *::before,
html[data-stellar-theme^="terminal-"] *::after {
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    border-radius: 0 !important;
    -webkit-font-smoothing: none !important;
    font-smooth: never !important;
    text-rendering: optimizeSpeed !important;
}

html[data-stellar-theme^="terminal-"],
html[data-stellar-theme^="terminal-"] body,
html[data-stellar-theme^="terminal-"] .app-shell,
html[data-stellar-theme^="terminal-"] .app-view,
html[data-stellar-theme^="terminal-"] .auth-view,
html[data-stellar-theme^="terminal-"] .screen,
html[data-stellar-theme^="terminal-"] .screen-content,
html[data-stellar-theme^="terminal-"] .app-main,
html[data-stellar-theme^="terminal-"] .chat-main,
html[data-stellar-theme^="terminal-"] .chat-window,
html[data-stellar-theme^="terminal-"] .chat-panel,
html[data-stellar-theme^="terminal-"] .messages-list,
html[data-stellar-theme^="terminal-"] .chat-thread,
html[data-stellar-theme^="terminal-"] .settings-list,
html[data-stellar-theme^="terminal-"] .contacts-list,
html[data-stellar-theme^="terminal-"] .conversations-list,
html[data-stellar-theme^="terminal-"] .groups-list,
html[data-stellar-theme^="terminal-"] .calls-list,
html[data-stellar-theme^="terminal-"] .bottom-nav,
html[data-stellar-theme^="terminal-"] .chat-header,
html[data-stellar-theme^="terminal-"] .message-composer,
html[data-stellar-theme^="terminal-"] .stellar-drawer,
html[data-stellar-theme^="terminal-"] .stellar-drawer-panel,
html[data-stellar-theme^="terminal-"] .native-safe-area,
html[data-stellar-theme^="terminal-"] .mobile-safe-area,
html[data-stellar-theme^="terminal-"] .safe-area-pad {
    font-family: var(--stellar-terminal-font) !important;
    font-variant-ligatures: none !important;
    letter-spacing: 0.035em !important;
    background: var(--terminal-bg) !important;
    background-color: var(--terminal-bg) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
}

html[data-stellar-theme^="terminal-"] .auth-card,
html[data-stellar-theme^="terminal-"] .settings-card,
html[data-stellar-theme^="terminal-"] .settings-section-card,
html[data-stellar-theme^="terminal-"] .settings-preference-card,
html[data-stellar-theme^="terminal-"] .settings-preference-row,
html[data-stellar-theme^="terminal-"] .settings-toggle-card,
html[data-stellar-theme^="terminal-"] .translation-settings-card,
html[data-stellar-theme^="terminal-"] .conversation-item,
html[data-stellar-theme^="terminal-"] .group-conversation-item,
html[data-stellar-theme^="terminal-"] .contact-item,
html[data-stellar-theme^="terminal-"] .contact-card,
html[data-stellar-theme^="terminal-"] .group-card,
html[data-stellar-theme^="terminal-"] .call-log-item,
html[data-stellar-theme^="terminal-"] .profile-card,
html[data-stellar-theme^="terminal-"] .modal,
html[data-stellar-theme^="terminal-"] .confirm-card,
html[data-stellar-theme^="terminal-"] .message-options-menu,
html[data-stellar-theme^="terminal-"] .attachment-menu,
html[data-stellar-theme^="terminal-"] .reply-preview,
html[data-stellar-theme^="terminal-"] .inline-reply-preview,
html[data-stellar-theme^="terminal-"] .composer-retry-panel,
html[data-stellar-theme^="terminal-"] .voice-recording-panel,
html[data-stellar-theme^="terminal-"] .device-stats-toggle,
html[data-stellar-theme^="terminal-"] .call-overlay-card,
html[data-stellar-theme^="terminal-"] .group-call-overlay-card,
html[data-stellar-theme^="terminal-"] .messaging-tabs,
html[data-stellar-theme^="terminal-"] .nav-style-segmented,
html[data-stellar-theme^="terminal-"] .contact-add-panel,
html[data-stellar-theme^="terminal-"] .blocked-user-row {
    background: var(--terminal-panel) !important;
    background-color: var(--terminal-panel) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border: 1px solid var(--terminal-border) !important;
    outline: 0 !important;
}

html[data-stellar-theme^="terminal-"] .screen::before,
html[data-stellar-theme^="terminal-"] .screen::after,
html[data-stellar-theme^="terminal-"] .app-shell::before,
html[data-stellar-theme^="terminal-"] .app-shell::after,
html[data-stellar-theme^="terminal-"] body::before,
html[data-stellar-theme^="terminal-"] body::after,
html[data-stellar-theme^="terminal-"] .bottom-nav::before,
html[data-stellar-theme^="terminal-"] .bottom-nav::after,
html[data-stellar-theme^="terminal-"] .chat-header::before,
html[data-stellar-theme^="terminal-"] .chat-header::after,
html[data-stellar-theme^="terminal-"] .message-composer::before,
html[data-stellar-theme^="terminal-"] .message-composer::after,
html[data-stellar-theme^="terminal-"] .settings-card::before,
html[data-stellar-theme^="terminal-"] .settings-card::after,
html[data-stellar-theme^="terminal-"] .fab-button::before,
html[data-stellar-theme^="terminal-"] .fab-button::after,
html[data-stellar-theme^="terminal-"] .chat-create-button::before,
html[data-stellar-theme^="terminal-"] .chat-create-button::after {
    content: none !important;
    display: none !important;
    background: none !important;
}

html[data-stellar-theme^="terminal-"] .message-bubble,
html[data-stellar-theme^="terminal-"] .message-bubble:not(.is-own),
html[data-stellar-theme^="terminal-"] .chat-message:not(.is-own) .message-bubble {
    background: var(--terminal-panel) !important;
    background-image: none !important;
    border: 1px solid var(--terminal-border) !important;
    color: var(--terminal-text) !important;
}

html[data-stellar-theme^="terminal-"] .message-bubble.is-own,
html[data-stellar-theme^="terminal-"] .message.is-own .message-bubble,
html[data-stellar-theme^="terminal-"] .chat-message.is-own .message-bubble {
    background: var(--terminal-own) !important;
    background-image: none !important;
    border: 1px solid var(--terminal-border) !important;
    color: var(--terminal-text) !important;
}

html[data-stellar-theme^="terminal-"] .terminal-media-placeholder,
html[data-stellar-theme^="terminal-"] .attachment-preview.image-preview::before {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 4.5rem;
    min-height: 3.2rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--terminal-border);
    background: var(--terminal-bg);
    color: var(--terminal-text);
    font-family: var(--stellar-terminal-font) !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

html[data-stellar-theme^="terminal-"] .terminal-image-disabled {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
}

html[data-stellar-theme^="terminal-"] .avatar,
html[data-stellar-theme^="terminal-"] .profile-initials,
html[data-stellar-theme^="terminal-"] .conversation-avatar,
html[data-stellar-theme^="terminal-"] .contact-avatar,
html[data-stellar-theme^="terminal-"] .group-avatar,
html[data-stellar-theme^="terminal-"] .call-icon,
html[data-stellar-theme^="terminal-"] .settings-preference-icon,
html[data-stellar-theme^="terminal-"] .group-call-avatar,
html[data-stellar-theme^="terminal-"] .forward-target-avatar,
html[data-stellar-theme^="terminal-"] .new-chat-avatar {
    background: var(--terminal-bg) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border: 1px solid var(--terminal-border) !important;
}

html[data-stellar-theme^="terminal-"] button,
html[data-stellar-theme^="terminal-"] .button,
html[data-stellar-theme^="terminal-"] .primary-button,
html[data-stellar-theme^="terminal-"] .secondary-button,
html[data-stellar-theme^="terminal-"] .auth-submit-button,
html[data-stellar-theme^="terminal-"] .send-button,
html[data-stellar-theme^="terminal-"] .fab-button,
html[data-stellar-theme^="terminal-"] .chat-create-button,
html[data-stellar-theme^="terminal-"] .icon-button,
html[data-stellar-theme^="terminal-"] .chat-header-action,
html[data-stellar-theme^="terminal-"] .chat-back-button,
html[data-stellar-theme^="terminal-"] .composer-icon-button,
html[data-stellar-theme^="terminal-"] .call-action-button,
html[data-stellar-theme^="terminal-"] .contact-action-button,
html[data-stellar-theme^="terminal-"] .message-options-button,
html[data-stellar-theme^="terminal-"] .nav-item,
html[data-stellar-theme^="terminal-"] .bottom-nav button,
html[data-stellar-theme^="terminal-"] .stellar-nav-item,
html[data-stellar-theme^="terminal-"] .nav-style-option,
html[data-stellar-theme^="terminal-"] .messaging-tab,
html[data-stellar-theme^="terminal-"] .messaging-tab-button,
html[data-stellar-theme^="terminal-"] .tab-button,
html[data-stellar-theme^="terminal-"] input,
html[data-stellar-theme^="terminal-"] textarea,
html[data-stellar-theme^="terminal-"] select,
html[data-stellar-theme^="terminal-"] .composer-input,
html[data-stellar-theme^="terminal-"] .message-input,
html[data-stellar-theme^="terminal-"] .message-composer textarea {
    font-family: var(--stellar-terminal-font) !important;
    font-variant-ligatures: none !important;
    background: var(--terminal-bg) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border: 1px solid var(--terminal-border) !important;
    outline: 0 !important;
}

html[data-stellar-theme^="terminal-"] button.is-active,
html[data-stellar-theme^="terminal-"] button[aria-pressed="true"],
html[data-stellar-theme^="terminal-"] .nav-item.is-active,
html[data-stellar-theme^="terminal-"] .bottom-nav button.is-active,
html[data-stellar-theme^="terminal-"] .stellar-nav-item.is-active,
html[data-stellar-theme^="terminal-"] .nav-style-option.is-active,
html[data-stellar-theme^="terminal-"] .messaging-tab.is-active,
html[data-stellar-theme^="terminal-"] .messaging-tab-button.is-active,
html[data-stellar-theme^="terminal-"] .tab-button.is-active,
html[data-stellar-theme^="terminal-"] .primary-button,
html[data-stellar-theme^="terminal-"] .auth-submit-button,
html[data-stellar-theme^="terminal-"] .send-button,
html[data-stellar-theme^="terminal-"] .fab-button,
html[data-stellar-theme^="terminal-"] .chat-create-button {
    background: var(--terminal-selection) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border-color: var(--terminal-border) !important;
}

html[data-stellar-theme^="terminal-"] .message-date-separator span,
html[data-stellar-theme^="terminal-"] .inline-reply-preview,
html[data-stellar-theme^="terminal-"] .attachment-file,
html[data-stellar-theme^="terminal-"] .attachment-location,
html[data-stellar-theme^="terminal-"] .attachment-voice,
html[data-stellar-theme^="terminal-"] .voice-play-button,
html[data-stellar-theme^="terminal-"] .voice-waveform,
html[data-stellar-theme^="terminal-"] .voice-progress,
html[data-stellar-theme^="terminal-"] .voice-progress-track,
html[data-stellar-theme^="terminal-"] .reaction-pill,
html[data-stellar-theme^="terminal-"] .loading-card,
html[data-stellar-theme^="terminal-"] .empty-state,
html[data-stellar-theme^="terminal-"] .status-pill {
    background: var(--terminal-bg) !important;
    background-image: none !important;
    border: 1px solid var(--terminal-border) !important;
    color: var(--terminal-text) !important;
}

html[data-stellar-theme^="terminal-"] .loader,
html[data-stellar-theme^="terminal-"] .loading-spinner,
html[data-stellar-theme^="terminal-"] .spinner,
html[data-stellar-theme^="terminal-"] .typing-dot {
    border-radius: 0 !important;
    background: var(--terminal-text) !important;
    border-color: var(--terminal-border) !important;
}

html[data-stellar-theme^="terminal-"] .call-video-stage,
html[data-stellar-theme^="terminal-"] .group-call-video-stage,
html[data-stellar-theme^="terminal-"] .local-video-container,
html[data-stellar-theme^="terminal-"] .remote-video-container,
html[data-stellar-theme^="terminal-"] video {
    background: #000000 !important;
    background-image: none !important;
    border: 1px solid var(--terminal-border) !important;
}

html[data-stellar-theme^="terminal-"] img,
html[data-stellar-theme^="terminal-"] picture,
html[data-stellar-theme^="terminal-"] source {
    image-rendering: pixelated !important;
}

html[data-stellar-theme^="terminal-"] .is-danger,
html[data-stellar-theme^="terminal-"] .danger-button,
html[data-stellar-theme^="terminal-"] .hangup-button,
html[data-stellar-theme^="terminal-"] [data-call-action="end"],
html[data-stellar-theme^="terminal-"] [data-group-call-action="leave"] {
    color: var(--terminal-danger) !important;
    border-color: var(--terminal-danger) !important;
}
/* PASS91 terminal hardcore fast mode end */
/* PASS94 terminal final purge: no blue, no gradients, no glow, no thumbnails. */
html[data-stellar-theme="terminal-dark"],
body[data-stellar-theme="terminal-dark"] {
    --stellar-terminal-font: "Courier New", "Liberation Mono", "Nimbus Mono PS", monospace;
    --terminal-bg: #000000;
    --terminal-panel: #000000;
    --terminal-panel-2: #000000;
    --terminal-own: #000000;
    --terminal-text: #008f3a;
    --terminal-muted: #4f8f69;
    --terminal-border: #005f27;
    --terminal-fill: #000000;
    --terminal-selection: #001507;
    --terminal-danger: #8f3f3f;
    --stellar-neon: #008f3a;
    --stellar-neon-2: #005f27;
    --stellar-neon-rgb: 0, 143, 58;
    --stellar-neon-glow: transparent;
    --stellar-neon-soft: transparent;
    --stellar-neon-line: #005f27;
    --bg: #000000;
    --surface: #000000;
    --surface-soft: #000000;
    --surface-strong: #000000;
    --text: #008f3a;
    --muted: #4f8f69;
    --border: #005f27;
    --icon: #008f3a;
    --accent: #008f3a;
    --accent-2: #005f27;
    --primary: #008f3a;
    --button-gradient: none;
    --shadow: transparent;
    color-scheme: dark;
}

html[data-stellar-theme="terminal-light"],
body[data-stellar-theme="terminal-light"] {
    --stellar-terminal-font: "Courier New", "Liberation Mono", "Nimbus Mono PS", monospace;
    --terminal-bg: #d7d7d7;
    --terminal-panel: #d7d7d7;
    --terminal-panel-2: #d7d7d7;
    --terminal-own: #d7d7d7;
    --terminal-text: #7a0000;
    --terminal-muted: #5c2525;
    --terminal-border: #8a0000;
    --terminal-fill: #d7d7d7;
    --terminal-selection: #c8c8c8;
    --terminal-danger: #4a0000;
    --stellar-neon: #7a0000;
    --stellar-neon-2: #8a0000;
    --stellar-neon-rgb: 122, 0, 0;
    --stellar-neon-glow: transparent;
    --stellar-neon-soft: transparent;
    --stellar-neon-line: #8a0000;
    --bg: #d7d7d7;
    --surface: #d7d7d7;
    --surface-soft: #d7d7d7;
    --surface-strong: #d7d7d7;
    --text: #7a0000;
    --muted: #5c2525;
    --border: #8a0000;
    --icon: #7a0000;
    --accent: #7a0000;
    --accent-2: #8a0000;
    --primary: #7a0000;
    --button-gradient: none;
    --shadow: transparent;
    color-scheme: light;
}

html[data-stellar-theme^="terminal-"] *,
html[data-stellar-theme^="terminal-"] *::before,
html[data-stellar-theme^="terminal-"] *::after {
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    background-image: none !important;
    border-radius: 0 !important;
    -webkit-font-smoothing: none !important;
    font-smooth: never !important;
    text-rendering: optimizeSpeed !important;
}

html[data-stellar-theme^="terminal-"] body,
html[data-stellar-theme^="terminal-"] .app-shell,
html[data-stellar-theme^="terminal-"] .app-view,
html[data-stellar-theme^="terminal-"] .screen,
html[data-stellar-theme^="terminal-"] .screen-content,
html[data-stellar-theme^="terminal-"] .app-main,
html[data-stellar-theme^="terminal-"] .chat-main,
html[data-stellar-theme^="terminal-"] .chat-window,
html[data-stellar-theme^="terminal-"] .chat-panel,
html[data-stellar-theme^="terminal-"] .messages-list,
html[data-stellar-theme^="terminal-"] .chat-thread,
html[data-stellar-theme^="terminal-"] .settings-list,
html[data-stellar-theme^="terminal-"] .contacts-list,
html[data-stellar-theme^="terminal-"] .conversations-list,
html[data-stellar-theme^="terminal-"] .groups-list,
html[data-stellar-theme^="terminal-"] .calls-list,
html[data-stellar-theme^="terminal-"] .bottom-nav,
html[data-stellar-theme^="terminal-"] .chat-header,
html[data-stellar-theme^="terminal-"] .message-composer,
html[data-stellar-theme^="terminal-"] .stellar-drawer,
html[data-stellar-theme^="terminal-"] .stellar-drawer-panel,
html[data-stellar-theme^="terminal-"] .native-safe-area,
html[data-stellar-theme^="terminal-"] .mobile-safe-area,
html[data-stellar-theme^="terminal-"] .safe-area-pad,
html[data-stellar-theme^="terminal-"] .status-bar-spacer,
html[data-stellar-theme^="terminal-"] .android-nav-spacer {
    font-family: var(--stellar-terminal-font) !important;
    font-variant-ligatures: none !important;
    letter-spacing: 0.09em !important;
    background: var(--terminal-bg) !important;
    background-color: var(--terminal-bg) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
}

html[data-stellar-theme^="terminal-"] .auth-card,
html[data-stellar-theme^="terminal-"] .settings-card,
html[data-stellar-theme^="terminal-"] .settings-section-card,
html[data-stellar-theme^="terminal-"] .settings-preference-card,
html[data-stellar-theme^="terminal-"] .settings-preference-row,
html[data-stellar-theme^="terminal-"] .settings-toggle-card,
html[data-stellar-theme^="terminal-"] .translation-settings-card,
html[data-stellar-theme^="terminal-"] .conversation-item,
html[data-stellar-theme^="terminal-"] .group-conversation-item,
html[data-stellar-theme^="terminal-"] .contact-item,
html[data-stellar-theme^="terminal-"] .contact-card,
html[data-stellar-theme^="terminal-"] .group-card,
html[data-stellar-theme^="terminal-"] .call-log-item,
html[data-stellar-theme^="terminal-"] .profile-card,
html[data-stellar-theme^="terminal-"] .modal,
html[data-stellar-theme^="terminal-"] .confirm-card,
html[data-stellar-theme^="terminal-"] .message-options-menu,
html[data-stellar-theme^="terminal-"] .attachment-menu,
html[data-stellar-theme^="terminal-"] .reply-preview,
html[data-stellar-theme^="terminal-"] .inline-reply-preview,
html[data-stellar-theme^="terminal-"] .composer-retry-panel,
html[data-stellar-theme^="terminal-"] .voice-recording-panel,
html[data-stellar-theme^="terminal-"] .device-stats-toggle,
html[data-stellar-theme^="terminal-"] .call-overlay-card,
html[data-stellar-theme^="terminal-"] .group-call-overlay-card,
html[data-stellar-theme^="terminal-"] .messaging-tabs,
html[data-stellar-theme^="terminal-"] .nav-style-segmented,
html[data-stellar-theme^="terminal-"] .contact-add-panel,
html[data-stellar-theme^="terminal-"] .blocked-user-row,
html[data-stellar-theme^="terminal-"] .cache-control-card,
html[data-stellar-theme^="terminal-"] .device-stat-card,
html[data-stellar-theme^="terminal-"] .diagnostic-card,
html[data-stellar-theme^="terminal-"] .profile-image-section,
html[data-stellar-theme^="terminal-"] .import-contacts-card,
html[data-stellar-theme^="terminal-"] .settings-panel,
html[data-stellar-theme^="terminal-"] .settings-block {
    background: var(--terminal-panel) !important;
    background-color: var(--terminal-panel) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border: 1px solid var(--terminal-border) !important;
    outline: 0 !important;
}

html[data-stellar-theme^="terminal-"] .message-bubble,
html[data-stellar-theme^="terminal-"] .message-bubble.is-own,
html[data-stellar-theme^="terminal-"] .message-bubble:not(.is-own),
html[data-stellar-theme^="terminal-"] .message-bubble.has-attachment,
html[data-stellar-theme^="terminal-"] .message.is-own .message-bubble,
html[data-stellar-theme^="terminal-"] .chat-message.is-own .message-bubble,
html[data-stellar-theme^="terminal-"] [data-is-own="1"],
html[data-stellar-theme^="terminal-"] [data-is-own="0"],
html[data-stellar-theme^="terminal-"] .attachment-file,
html[data-stellar-theme^="terminal-"] .attachment-location,
html[data-stellar-theme^="terminal-"] .attachment-voice,
html[data-stellar-theme^="terminal-"] .voice-note,
html[data-stellar-theme^="terminal-"] .voice-player,
html[data-stellar-theme^="terminal-"] .voice-waveform,
html[data-stellar-theme^="terminal-"] .voice-progress,
html[data-stellar-theme^="terminal-"] .voice-progress-track {
    background: var(--terminal-bg) !important;
    background-color: var(--terminal-bg) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border: 1px solid var(--terminal-border) !important;
}

html[data-stellar-theme^="terminal-"] .message-bubble p,
html[data-stellar-theme^="terminal-"] .message-bubble span,
html[data-stellar-theme^="terminal-"] .message-bubble time,
html[data-stellar-theme^="terminal-"] .message-sender-name,
html[data-stellar-theme^="terminal-"] .attachment-caption,
html[data-stellar-theme^="terminal-"] .message-meta,
html[data-stellar-theme^="terminal-"] .message-status {
    color: var(--terminal-text) !important;
}

html[data-stellar-theme^="terminal-"] button,
html[data-stellar-theme^="terminal-"] .button,
html[data-stellar-theme^="terminal-"] .primary-button,
html[data-stellar-theme^="terminal-"] .secondary-button,
html[data-stellar-theme^="terminal-"] .auth-submit-button,
html[data-stellar-theme^="terminal-"] .send-button,
html[data-stellar-theme^="terminal-"] .fab-button,
html[data-stellar-theme^="terminal-"] .chat-create-button,
html[data-stellar-theme^="terminal-"] .icon-button,
html[data-stellar-theme^="terminal-"] .chat-header-action,
html[data-stellar-theme^="terminal-"] .chat-back-button,
html[data-stellar-theme^="terminal-"] .composer-icon-button,
html[data-stellar-theme^="terminal-"] .call-action-button,
html[data-stellar-theme^="terminal-"] .contact-action-button,
html[data-stellar-theme^="terminal-"] .message-options-button,
html[data-stellar-theme^="terminal-"] .nav-item,
html[data-stellar-theme^="terminal-"] .bottom-nav button,
html[data-stellar-theme^="terminal-"] .stellar-nav-item,
html[data-stellar-theme^="terminal-"] .nav-style-option,
html[data-stellar-theme^="terminal-"] .messaging-tab,
html[data-stellar-theme^="terminal-"] .messaging-tab-button,
html[data-stellar-theme^="terminal-"] .tab-button,
html[data-stellar-theme^="terminal-"] input,
html[data-stellar-theme^="terminal-"] textarea,
html[data-stellar-theme^="terminal-"] select,
html[data-stellar-theme^="terminal-"] .composer-input,
html[data-stellar-theme^="terminal-"] .message-input,
html[data-stellar-theme^="terminal-"] .message-composer textarea {
    font-family: var(--stellar-terminal-font) !important;
    background: var(--terminal-bg) !important;
    background-color: var(--terminal-bg) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border: 1px solid var(--terminal-border) !important;
    outline: 0 !important;
}

html[data-stellar-theme^="terminal-"] button.is-active,
html[data-stellar-theme^="terminal-"] button[aria-pressed="true"],
html[data-stellar-theme^="terminal-"] .is-active,
html[data-stellar-theme^="terminal-"] .nav-item.is-active,
html[data-stellar-theme^="terminal-"] .bottom-nav button.is-active,
html[data-stellar-theme^="terminal-"] .stellar-nav-item.is-active,
html[data-stellar-theme^="terminal-"] .nav-style-option.is-active,
html[data-stellar-theme^="terminal-"] .messaging-tab.is-active,
html[data-stellar-theme^="terminal-"] .messaging-tab-button.is-active,
html[data-stellar-theme^="terminal-"] .tab-button.is-active,
html[data-stellar-theme^="terminal-"] .primary-button,
html[data-stellar-theme^="terminal-"] .auth-submit-button,
html[data-stellar-theme^="terminal-"] .send-button,
html[data-stellar-theme^="terminal-"] .fab-button,
html[data-stellar-theme^="terminal-"] .chat-create-button {
    background: var(--terminal-selection) !important;
    background-color: var(--terminal-selection) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border-color: var(--terminal-border) !important;
}

html[data-stellar-theme^="terminal-"] i,
html[data-stellar-theme^="terminal-"] svg,
html[data-stellar-theme^="terminal-"] .fa-solid,
html[data-stellar-theme^="terminal-"] .fa-regular,
html[data-stellar-theme^="terminal-"] .fa-brands,
html[data-stellar-theme^="terminal-"] .icon,
html[data-stellar-theme^="terminal-"] .material-icons {
    color: var(--terminal-text) !important;
    fill: var(--terminal-text) !important;
    stroke: var(--terminal-text) !important;
    filter: none !important;
}

html[data-stellar-theme^="terminal-"] .avatar,
html[data-stellar-theme^="terminal-"] .profile-initials,
html[data-stellar-theme^="terminal-"] .conversation-avatar,
html[data-stellar-theme^="terminal-"] .contact-avatar,
html[data-stellar-theme^="terminal-"] .group-avatar,
html[data-stellar-theme^="terminal-"] .group-member-picker-avatar,
html[data-stellar-theme^="terminal-"] .call-icon,
html[data-stellar-theme^="terminal-"] .settings-preference-icon,
html[data-stellar-theme^="terminal-"] .group-call-avatar,
html[data-stellar-theme^="terminal-"] .forward-target-avatar,
html[data-stellar-theme^="terminal-"] .new-chat-avatar {
    background: var(--terminal-bg) !important;
    background-color: var(--terminal-bg) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border: 1px solid var(--terminal-border) !important;
    overflow: hidden !important;
}

html[data-stellar-theme^="terminal-"] .conversation-avatar img,
html[data-stellar-theme^="terminal-"] .contact-avatar img,
html[data-stellar-theme^="terminal-"] .group-avatar img,
html[data-stellar-theme^="terminal-"] .group-member-picker-avatar img,
html[data-stellar-theme^="terminal-"] .profile-avatar img,
html[data-stellar-theme^="terminal-"] .settings-profile-image img,
html[data-stellar-theme^="terminal-"] img.terminal-image-disabled {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
}

html[data-stellar-theme^="terminal-"] .terminal-avatar-placeholder,
html[data-stellar-theme^="terminal-"] .terminal-media-placeholder {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 2.75rem !important;
    min-height: 2.75rem !important;
    padding: 0.35rem 0.55rem !important;
    background: var(--terminal-bg) !important;
    background-color: var(--terminal-bg) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border: 1px solid var(--terminal-border) !important;
    font-family: var(--stellar-terminal-font) !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
}

html[data-stellar-theme^="terminal-"] .image-preview,
html[data-stellar-theme^="terminal-"] .video-preview,
html[data-stellar-theme^="terminal-"] .attachment-preview {
    background: var(--terminal-bg) !important;
    background-color: var(--terminal-bg) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border: 1px solid var(--terminal-border) !important;
}

html[data-stellar-theme^="terminal-"] .image-preview img,
html[data-stellar-theme^="terminal-"] .video-preview video,
html[data-stellar-theme^="terminal-"] .attachment-preview img,
html[data-stellar-theme^="terminal-"] .attachment-preview video {
    display: none !important;
    visibility: hidden !important;
}

html[data-stellar-theme^="terminal-"] .loading-card,
html[data-stellar-theme^="terminal-"] .loading-screen,
html[data-stellar-theme^="terminal-"] .empty-state,
html[data-stellar-theme^="terminal-"] .status-pill,
html[data-stellar-theme^="terminal-"] .message-date-separator span,
html[data-stellar-theme^="terminal-"] .toast,
html[data-stellar-theme^="terminal-"] .app-toast {
    background: var(--terminal-bg) !important;
    background-color: var(--terminal-bg) !important;
    background-image: none !important;
    border: 1px solid var(--terminal-border) !important;
    color: var(--terminal-text) !important;
}

html[data-stellar-theme^="terminal-"] .loader,
html[data-stellar-theme^="terminal-"] .loading-spinner,
html[data-stellar-theme^="terminal-"] .spinner,
html[data-stellar-theme^="terminal-"] .typing-dot {
    background: var(--terminal-text) !important;
    background-color: var(--terminal-text) !important;
    background-image: none !important;
    border: 1px solid var(--terminal-border) !important;
    border-radius: 0 !important;
}

html[data-stellar-theme^="terminal-"] .is-danger,
html[data-stellar-theme^="terminal-"] .danger-button,
html[data-stellar-theme^="terminal-"] .hangup-button,
html[data-stellar-theme^="terminal-"] [data-call-action="end"],
html[data-stellar-theme^="terminal-"] [data-group-call-action="leave"],
html[data-stellar-theme^="terminal-"] .delete-button,
html[data-stellar-theme^="terminal-"] .block-button {
    color: var(--terminal-danger) !important;
    border-color: var(--terminal-danger) !important;
}

html[data-stellar-theme^="terminal-"] .is-danger i,
html[data-stellar-theme^="terminal-"] .danger-button i,
html[data-stellar-theme^="terminal-"] .delete-button i,
html[data-stellar-theme^="terminal-"] .block-button i {
    color: var(--terminal-danger) !important;
}
/* PASS94 terminal final purge end */

/* PASS95 terminal common blue purge start */
/*
   Actual common offender found in source:
   - base/app theme variables still feed --surface-soft/#08162b, --card-gradient, --button-gradient, --stellar-neon*
   - settings.css uses .settings-section-icon/.settings-preference-icon with rgba(37,99,235,...)
   - local-cache/device-stats/call-diagnostics use literal rgba(15,23,42,...)
   This block deliberately sits LAST and overrides those shared sources in terminal themes.
*/

html[data-stellar-theme="terminal-dark"],
body[data-stellar-theme="terminal-dark"],
html.theme-terminal-dark,
body.theme-terminal-dark {
    --stellar-terminal-font: "Courier New", "Droid Sans Mono", "Liberation Mono", monospace;

    --terminal-bg: #000000;
    --terminal-panel: #000000;
    --terminal-panel-2: #000000;
    --terminal-own: #000000;
    --terminal-selection: #000000;
    --terminal-fill: #000000;

    /* Restored readable green. PASS94 muted this too far. */
    --terminal-text: #00ff66;
    --terminal-muted: #68f59a;
    --terminal-border: #00cc55;
    --terminal-danger: #ff5c5c;

    --bg: #000000;
    --surface: #000000;
    --card: #000000;
    --surface-soft: #000000;
    --surface-strong: #000000;
    --input-bg: #000000;
    --nav-bg: #000000;
    --app-gradient: #000000;
    --card-gradient: #000000;
    --button-gradient: #000000;

    --text: #00ff66;
    --text-color: #00ff66;
    --muted: #68f59a;
    --muted-text: #68f59a;
    --border: #00cc55;
    --icon: #00ff66;
    --accent: #00ff66;
    --accent-2: #00cc55;
    --accent-strong: #00cc55;
    --primary: #00ff66;
    --danger: #ff5c5c;

    --stellar-neon: #00ff66;
    --stellar-neon-2: #00cc55;
    --stellar-neon-rgb: 0, 255, 102;
    --stellar-neon-soft: transparent;
    --stellar-neon-glow: transparent;
    --stellar-neon-line: #00cc55;
    --shadow: transparent;

    color-scheme: dark;
    background: #000000 !important;
    background-color: #000000 !important;
    background-image: none !important;
    color: #00ff66 !important;
}

html[data-stellar-theme="terminal-light"],
body[data-stellar-theme="terminal-light"],
html.theme-terminal-light,
body.theme-terminal-light {
    --stellar-terminal-font: "Courier New", "Droid Sans Mono", "Liberation Mono", monospace;

    --terminal-bg: #d8d8d8;
    --terminal-panel: #d8d8d8;
    --terminal-panel-2: #d8d8d8;
    --terminal-own: #d8d8d8;
    --terminal-selection: #d8d8d8;
    --terminal-fill: #d8d8d8;
    --terminal-text: #9a0000;
    --terminal-muted: #6f2020;
    --terminal-border: #9a0000;
    --terminal-danger: #500000;

    --bg: #d8d8d8;
    --surface: #d8d8d8;
    --card: #d8d8d8;
    --surface-soft: #d8d8d8;
    --surface-strong: #d8d8d8;
    --input-bg: #d8d8d8;
    --nav-bg: #d8d8d8;
    --app-gradient: #d8d8d8;
    --card-gradient: #d8d8d8;
    --button-gradient: #d8d8d8;

    --text: #9a0000;
    --text-color: #9a0000;
    --muted: #6f2020;
    --muted-text: #6f2020;
    --border: #9a0000;
    --icon: #9a0000;
    --accent: #9a0000;
    --accent-2: #9a0000;
    --accent-strong: #9a0000;
    --primary: #9a0000;
    --danger: #500000;

    --stellar-neon: #9a0000;
    --stellar-neon-2: #9a0000;
    --stellar-neon-rgb: 154, 0, 0;
    --stellar-neon-soft: transparent;
    --stellar-neon-glow: transparent;
    --stellar-neon-line: #9a0000;
    --shadow: transparent;

    color-scheme: light;
    background: #d8d8d8 !important;
    background-color: #d8d8d8 !important;
    background-image: none !important;
    color: #9a0000 !important;
}

:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light),
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) body,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .app-shell,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .app-view,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .app-screen,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .screen,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .screen-content,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .app-main,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .chat-main,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .messages-list,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .chat-thread,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .settings-list,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .contacts-list,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .conversations-list,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .groups-list,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .calls-list {
    background: var(--terminal-bg) !important;
    background-color: var(--terminal-bg) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
}

:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) *,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) *::before,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) *::after {
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    background-image: none !important;
    border-radius: 0 !important;
    font-family: var(--stellar-terminal-font) !important;
    font-variant-ligatures: none !important;
}

/* Kill pseudo glow/backdrop layers from Stellar CSS. */
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .app-shell::before,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .app-shell::after,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .screen::before,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .screen::after,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .settings-card::before,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .settings-card::after,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .conversation-item::before,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .conversation-item::after {
    content: none !important;
    display: none !important;
    background: transparent !important;
    background-image: none !important;
}

/* The common blue/navy containers: everything here used --surface-soft/card-gradient or literal rgba(15,23,42). */
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .settings-card,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .settings-section-card,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .settings-preference-card,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .settings-preference-row,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .settings-action-row,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .conversation-item,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .group-conversation-item,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .contact-item,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .contact-card,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .group-card,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .call-log-item,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .import-contacts-card,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .contact-add-panel,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .cache-control-card,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .local-cache-settings-card,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .local-cache-summary,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .device-stats-settings-card,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .device-stats-toggle,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .device-stat-tile,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .call-diagnostics-card,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .call-diagnostics-toggle,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .call-diagnostics-grid article,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .diagnostic-card,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .blocked-user-row,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .profile-card,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .message-options-menu,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .attachment-menu {
    background: var(--terminal-panel) !important;
    background-color: var(--terminal-panel) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border: 1px solid var(--terminal-border) !important;
    outline: 0 !important;
}

/* The icon boxes were a direct blue source: settings.css: rgba(37,99,235,.10). */
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .settings-section-icon,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .settings-preference-icon,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .local-cache-settings-card .settings-section-icon,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .device-stats-settings-card .settings-section-icon,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .call-diagnostics-card .settings-section-icon,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .settings-section-icon i,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .settings-preference-icon i {
    background: var(--terminal-panel) !important;
    background-color: var(--terminal-panel) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    fill: var(--terminal-text) !important;
    stroke: var(--terminal-text) !important;
    border: 1px solid var(--terminal-border) !important;
}

/* Buttons/tabs/nav: no fill gradients. Active state is border/text only, not green panels. */
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) button,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .button,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .primary-button,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .secondary-button,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .send-button,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .fab-button,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .chat-create-button,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .icon-button,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .chat-header-action,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .composer-icon-button,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .bottom-nav,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .bottom-nav button,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .nav-item,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .messaging-tab,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .messaging-tab-button,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .tab-button,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .nav-style-option,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .call-action-button,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .contact-action-button {
    background: var(--terminal-bg) !important;
    background-color: var(--terminal-bg) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border: 1px solid var(--terminal-border) !important;
    outline: 0 !important;
}

:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) button.is-active,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) button[aria-pressed="true"],
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .is-active,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .bottom-nav button.is-active,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .nav-item.is-active,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .messaging-tab.is-active,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .messaging-tab-button.is-active,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .tab-button.is-active,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .nav-style-option.is-active,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .primary-button,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .send-button,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .fab-button,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .chat-create-button {
    background: var(--terminal-bg) !important;
    background-color: var(--terminal-bg) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border-color: var(--terminal-text) !important;
    outline: 1px solid var(--terminal-text) !important;
}

/* Message bubbles: no green gradients, no filled panels, readable text only. */
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .message-bubble,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .message-bubble.is-own,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .message.is-own .message-bubble,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .chat-message.is-own .message-bubble,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .message-bubble.has-attachment,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .attachment-file,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .attachment-location,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .attachment-voice,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .voice-note,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .voice-player,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .voice-waveform,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .voice-progress,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .voice-progress-track {
    background: var(--terminal-bg) !important;
    background-color: var(--terminal-bg) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border: 1px solid var(--terminal-border) !important;
}

:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) input,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) textarea,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) select,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .composer-input,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .message-input,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .message-composer textarea,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .chat-composer {
    background: var(--terminal-bg) !important;
    background-color: var(--terminal-bg) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border-color: var(--terminal-border) !important;
}

:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) i,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) svg,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .fa-solid,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .fa-regular,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .fa-brands,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .icon {
    color: var(--terminal-text) !important;
    fill: var(--terminal-text) !important;
    stroke: var(--terminal-text) !important;
}

:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .is-danger,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .danger-button,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .delete-button,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .block-button,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .hangup-button {
    color: var(--terminal-danger) !important;
    border-color: var(--terminal-danger) !important;
}

/* Remove the old experimental bracket pseudo-elements. They were noise, not style. */
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) button::before,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) button::after,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .primary-button::before,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .primary-button::after,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .send-button::before,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .send-button::after {
    content: none !important;
}

/* Keep image suppression placeholders terminal-colored, but never blue/navy. */
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .avatar,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .profile-initials,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .conversation-avatar,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .contact-avatar,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .group-avatar,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .terminal-avatar-placeholder,
:is(html[data-stellar-theme^="terminal-"], body[data-stellar-theme^="terminal-"], html.theme-terminal-dark, body.theme-terminal-dark, html.theme-terminal-light, body.theme-terminal-light) .terminal-media-placeholder {
    background: var(--terminal-bg) !important;
    background-color: var(--terminal-bg) !important;
    background-image: none !important;
    color: var(--terminal-text) !important;
    border: 1px solid var(--terminal-border) !important;
}
/* PASS95 terminal common blue purge end */

/* PASS115 terminal icon normalization
   Keep this block near the end of terminal-themes.css so it wins.
   Scope: terminal themes only.
*/

html[data-theme^="terminal-"] {
  --terminal-icon-size: 34px;
  --terminal-icon-glyph-size: 15px;
}

html[data-theme="terminal-dark"] {
  --terminal-icon-color: #00ff66;
  --terminal-icon-bg: #000000;
  --terminal-icon-border: #00ff66;
}

html[data-theme="terminal-light"] {
  --terminal-icon-color: #8b0000;
  --terminal-icon-bg: #e5e5e5;
  --terminal-icon-border: #8b0000;
}

html[data-theme^="terminal-"] i[class*="fa-"],
html[data-theme^="terminal-"] .fa,
html[data-theme^="terminal-"] .fas,
html[data-theme^="terminal-"] .far,
html[data-theme^="terminal-"] .fab,
html[data-theme^="terminal-"] .fa-solid,
html[data-theme^="terminal-"] .fa-regular,
html[data-theme^="terminal-"] .fa-brands,
html[data-theme^="terminal-"] svg.svg-inline--fa,
body[data-theme^="terminal-"] i[class*="fa-"],
body[data-theme^="terminal-"] .fa,
body[data-theme^="terminal-"] .fas,
body[data-theme^="terminal-"] .far,
body[data-theme^="terminal-"] .fab,
body[data-theme^="terminal-"] .fa-solid,
body[data-theme^="terminal-"] .fa-regular,
body[data-theme^="terminal-"] .fa-brands,
body[data-theme^="terminal-"] svg.svg-inline--fa {
  color: var(--terminal-icon-color) !important;
  fill: var(--terminal-icon-color) !important;
  stroke: none !important;
  filter: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Common icon containers across settings, tabs, chats, calls, diagnostics, cache stats. */
html[data-theme^="terminal-"] .settings-section-icon,
html[data-theme^="terminal-"] .settings-preference-icon,
html[data-theme^="terminal-"] .settings-item-icon,
html[data-theme^="terminal-"] .settings-icon,
html[data-theme^="terminal-"] .device-stat-icon,
html[data-theme^="terminal-"] .device-stat-tile > i,
html[data-theme^="terminal-"] .call-diagnostics-icon,
html[data-theme^="terminal-"] .local-cache-icon,
html[data-theme^="terminal-"] .local-cache-summary i,
html[data-theme^="terminal-"] .sound-setting-icon,
html[data-theme^="terminal-"] .keep-awake-icon,
html[data-theme^="terminal-"] .mobile-layout-icon,
html[data-theme^="terminal-"] .conversation-icon,
html[data-theme^="terminal-"] .group-icon,
html[data-theme^="terminal-"] .call-type-icon,
html[data-theme^="terminal-"] .call-history-icon,
html[data-theme^="terminal-"] .nav-icon,
html[data-theme^="terminal-"] .tab-icon,
html[data-theme^="terminal-"] .bottom-nav i,
html[data-theme^="terminal-"] .bottom-nav .nav-item i,
html[data-theme^="terminal-"] .chat-header button i,
html[data-theme^="terminal-"] .chat-action-button i,
html[data-theme^="terminal-"] .call-action-button i,
html[data-theme^="terminal-"] .message-option-button i,
html[data-theme^="terminal-"] .composer-action-button i,
body[data-theme^="terminal-"] .settings-section-icon,
body[data-theme^="terminal-"] .settings-preference-icon,
body[data-theme^="terminal-"] .settings-item-icon,
body[data-theme^="terminal-"] .settings-icon,
body[data-theme^="terminal-"] .device-stat-icon,
body[data-theme^="terminal-"] .device-stat-tile > i,
body[data-theme^="terminal-"] .call-diagnostics-icon,
body[data-theme^="terminal-"] .local-cache-icon,
body[data-theme^="terminal-"] .local-cache-summary i,
body[data-theme^="terminal-"] .sound-setting-icon,
body[data-theme^="terminal-"] .keep-awake-icon,
body[data-theme^="terminal-"] .mobile-layout-icon,
body[data-theme^="terminal-"] .conversation-icon,
body[data-theme^="terminal-"] .group-icon,
body[data-theme^="terminal-"] .call-type-icon,
body[data-theme^="terminal-"] .call-history-icon,
body[data-theme^="terminal-"] .nav-icon,
body[data-theme^="terminal-"] .tab-icon,
body[data-theme^="terminal-"] .bottom-nav i,
body[data-theme^="terminal-"] .bottom-nav .nav-item i,
body[data-theme^="terminal-"] .chat-header button i,
body[data-theme^="terminal-"] .chat-action-button i,
body[data-theme^="terminal-"] .call-action-button i,
body[data-theme^="terminal-"] .message-option-button i,
body[data-theme^="terminal-"] .composer-action-button i {
  width: var(--terminal-icon-size) !important;
  height: var(--terminal-icon-size) !important;
  min-width: var(--terminal-icon-size) !important;
  min-height: var(--terminal-icon-size) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--terminal-icon-color) !important;
  background: var(--terminal-icon-bg) !important;
  background-image: none !important;
  border: 1px solid var(--terminal-icon-border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  text-shadow: none !important;
  outline: none !important;
  transform: none !important;
}

html[data-theme^="terminal-"] button i[class*="fa-"],
html[data-theme^="terminal-"] button .fa,
html[data-theme^="terminal-"] button .fas,
html[data-theme^="terminal-"] button .far,
html[data-theme^="terminal-"] button .fab,
html[data-theme^="terminal-"] button svg.svg-inline--fa,
body[data-theme^="terminal-"] button i[class*="fa-"],
body[data-theme^="terminal-"] button .fa,
body[data-theme^="terminal-"] button .fas,
body[data-theme^="terminal-"] button .far,
body[data-theme^="terminal-"] button .fab,
body[data-theme^="terminal-"] button svg.svg-inline--fa {
  font-size: var(--terminal-icon-glyph-size) !important;
  line-height: 1 !important;
}

html[data-theme^="terminal-"] .chat-header button,
html[data-theme^="terminal-"] .header-action,
html[data-theme^="terminal-"] .icon-button,
html[data-theme^="terminal-"] .round-icon-button,
html[data-theme^="terminal-"] .floating-action-button,
html[data-theme^="terminal-"] .fab-button,
html[data-theme^="terminal-"] .call-action-button,
html[data-theme^="terminal-"] .composer-action-button,
body[data-theme^="terminal-"] .chat-header button,
body[data-theme^="terminal-"] .header-action,
body[data-theme^="terminal-"] .icon-button,
body[data-theme^="terminal-"] .round-icon-button,
body[data-theme^="terminal-"] .floating-action-button,
body[data-theme^="terminal-"] .fab-button,
body[data-theme^="terminal-"] .call-action-button,
body[data-theme^="terminal-"] .composer-action-button {
  color: var(--terminal-icon-color) !important;
  background: var(--terminal-icon-bg) !important;
  background-image: none !important;
  border: 1px solid var(--terminal-icon-border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: none !important;
}

html[data-theme^="terminal-"] button::before,
html[data-theme^="terminal-"] button::after,
html[data-theme^="terminal-"] .icon-button::before,
html[data-theme^="terminal-"] .icon-button::after,
html[data-theme^="terminal-"] .settings-section-icon::before,
html[data-theme^="terminal-"] .settings-section-icon::after,
html[data-theme^="terminal-"] .settings-preference-icon::before,
html[data-theme^="terminal-"] .settings-preference-icon::after,
body[data-theme^="terminal-"] button::before,
body[data-theme^="terminal-"] button::after,
body[data-theme^="terminal-"] .icon-button::before,
body[data-theme^="terminal-"] .icon-button::after,
body[data-theme^="terminal-"] .settings-section-icon::before,
body[data-theme^="terminal-"] .settings-section-icon::after,
body[data-theme^="terminal-"] .settings-preference-icon::before,
body[data-theme^="terminal-"] .settings-preference-icon::after {
  content: none !important;
  display: none !important;
}

html[data-theme^="terminal-"] .settings-section-icon,
html[data-theme^="terminal-"] .settings-preference-icon,
html[data-theme^="terminal-"] .device-stat-icon,
html[data-theme^="terminal-"] .call-diagnostics-icon,
html[data-theme^="terminal-"] .local-cache-icon,
body[data-theme^="terminal-"] .settings-section-icon,
body[data-theme^="terminal-"] .settings-preference-icon,
body[data-theme^="terminal-"] .device-stat-icon,
body[data-theme^="terminal-"] .call-diagnostics-icon,
body[data-theme^="terminal-"] .local-cache-icon {
  image-rendering: pixelated;
  font-family: "Courier New", "Liberation Mono", monospace !important;
}

/* PASS116 terminal icon selector correction
   Scope: terminal themes only.
   Uses multiple theme markers because the older theme system has too many opinions.
*/

html[data-stellar-theme^="terminal-"],
body[data-stellar-theme^="terminal-"],
html[data-app-theme^="terminal-"],
body[data-app-theme^="terminal-"],
html[data-theme-mode^="terminal-"],
body[data-theme-mode^="terminal-"],
html.theme-terminal,
body.theme-terminal {
  --terminal-icon-size: 34px;
  --terminal-icon-glyph-size: 15px;
}

html[data-stellar-theme="terminal-dark"],
body[data-stellar-theme="terminal-dark"],
html[data-app-theme="terminal-dark"],
body[data-app-theme="terminal-dark"],
html[data-theme-mode="terminal-dark"],
body[data-theme-mode="terminal-dark"],
html.theme-terminal-dark,
body.theme-terminal-dark {
  --terminal-icon-color: #00ff66;
  --terminal-icon-bg: #000000;
  --terminal-icon-border: #00ff66;
}

html[data-stellar-theme="terminal-light"],
body[data-stellar-theme="terminal-light"],
html[data-app-theme="terminal-light"],
body[data-app-theme="terminal-light"],
html[data-theme-mode="terminal-light"],
body[data-theme-mode="terminal-light"],
html.theme-terminal-light,
body.theme-terminal-light {
  --terminal-icon-color: #8b0000;
  --terminal-icon-bg: #e5e5e5;
  --terminal-icon-border: #8b0000;
}

html.theme-terminal i[class*="fa-"],
html.theme-terminal .fa,
html.theme-terminal .fas,
html.theme-terminal .far,
html.theme-terminal .fab,
html.theme-terminal .fa-solid,
html.theme-terminal .fa-regular,
html.theme-terminal .fa-brands,
html.theme-terminal svg.svg-inline--fa,
body.theme-terminal i[class*="fa-"],
body.theme-terminal .fa,
body.theme-terminal .fas,
body.theme-terminal .far,
body.theme-terminal .fab,
body.theme-terminal .fa-solid,
body.theme-terminal .fa-regular,
body.theme-terminal .fa-brands,
body.theme-terminal svg.svg-inline--fa,
html[data-stellar-theme^="terminal-"] i[class*="fa-"],
html[data-stellar-theme^="terminal-"] .fa,
html[data-stellar-theme^="terminal-"] .fas,
html[data-stellar-theme^="terminal-"] .far,
html[data-stellar-theme^="terminal-"] .fab,
html[data-stellar-theme^="terminal-"] .fa-solid,
html[data-stellar-theme^="terminal-"] .fa-regular,
html[data-stellar-theme^="terminal-"] .fa-brands,
html[data-stellar-theme^="terminal-"] svg.svg-inline--fa,
body[data-stellar-theme^="terminal-"] i[class*="fa-"],
body[data-stellar-theme^="terminal-"] .fa,
body[data-stellar-theme^="terminal-"] .fas,
body[data-stellar-theme^="terminal-"] .far,
body[data-stellar-theme^="terminal-"] .fab,
body[data-stellar-theme^="terminal-"] .fa-solid,
body[data-stellar-theme^="terminal-"] .fa-regular,
body[data-stellar-theme^="terminal-"] .fa-brands,
body[data-stellar-theme^="terminal-"] svg.svg-inline--fa {
  color: var(--terminal-icon-color) !important;
  fill: var(--terminal-icon-color) !important;
  stroke: none !important;
  filter: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

html.theme-terminal .settings-section-icon,
html.theme-terminal .settings-preference-icon,
html.theme-terminal .settings-item-icon,
html.theme-terminal .settings-icon,
html.theme-terminal .device-stat-icon,
html.theme-terminal .device-stat-tile > i,
html.theme-terminal .call-diagnostics-icon,
html.theme-terminal .local-cache-icon,
html.theme-terminal .local-cache-summary i,
html.theme-terminal .sound-setting-icon,
html.theme-terminal .keep-awake-icon,
html.theme-terminal .mobile-layout-icon,
html.theme-terminal .conversation-icon,
html.theme-terminal .group-icon,
html.theme-terminal .call-type-icon,
html.theme-terminal .call-history-icon,
html.theme-terminal .nav-icon,
html.theme-terminal .tab-icon,
html.theme-terminal .bottom-nav i,
html.theme-terminal .bottom-nav .nav-item i,
html.theme-terminal .chat-header button i,
html.theme-terminal .chat-action-button i,
html.theme-terminal .call-action-button i,
html.theme-terminal .message-option-button i,
html.theme-terminal .composer-action-button i,
body.theme-terminal .settings-section-icon,
body.theme-terminal .settings-preference-icon,
body.theme-terminal .settings-item-icon,
body.theme-terminal .settings-icon,
body.theme-terminal .device-stat-icon,
body.theme-terminal .device-stat-tile > i,
body.theme-terminal .call-diagnostics-icon,
body.theme-terminal .local-cache-icon,
body.theme-terminal .local-cache-summary i,
body.theme-terminal .sound-setting-icon,
body.theme-terminal .keep-awake-icon,
body.theme-terminal .mobile-layout-icon,
body.theme-terminal .conversation-icon,
body.theme-terminal .group-icon,
body.theme-terminal .call-type-icon,
body.theme-terminal .call-history-icon,
body.theme-terminal .nav-icon,
body.theme-terminal .tab-icon,
body.theme-terminal .bottom-nav i,
body.theme-terminal .bottom-nav .nav-item i,
body.theme-terminal .chat-header button i,
body.theme-terminal .chat-action-button i,
body.theme-terminal .call-action-button i,
body.theme-terminal .message-option-button i,
body.theme-terminal .composer-action-button i,
html[data-stellar-theme^="terminal-"] .settings-section-icon,
html[data-stellar-theme^="terminal-"] .settings-preference-icon,
html[data-stellar-theme^="terminal-"] .settings-item-icon,
html[data-stellar-theme^="terminal-"] .settings-icon,
html[data-stellar-theme^="terminal-"] .device-stat-icon,
html[data-stellar-theme^="terminal-"] .device-stat-tile > i,
html[data-stellar-theme^="terminal-"] .call-diagnostics-icon,
html[data-stellar-theme^="terminal-"] .local-cache-icon,
html[data-stellar-theme^="terminal-"] .local-cache-summary i,
html[data-stellar-theme^="terminal-"] .sound-setting-icon,
html[data-stellar-theme^="terminal-"] .keep-awake-icon,
html[data-stellar-theme^="terminal-"] .mobile-layout-icon,
html[data-stellar-theme^="terminal-"] .conversation-icon,
html[data-stellar-theme^="terminal-"] .group-icon,
html[data-stellar-theme^="terminal-"] .call-type-icon,
html[data-stellar-theme^="terminal-"] .call-history-icon,
html[data-stellar-theme^="terminal-"] .nav-icon,
html[data-stellar-theme^="terminal-"] .tab-icon,
html[data-stellar-theme^="terminal-"] .bottom-nav i,
html[data-stellar-theme^="terminal-"] .bottom-nav .nav-item i,
html[data-stellar-theme^="terminal-"] .chat-header button i,
html[data-stellar-theme^="terminal-"] .chat-action-button i,
html[data-stellar-theme^="terminal-"] .call-action-button i,
html[data-stellar-theme^="terminal-"] .message-option-button i,
html[data-stellar-theme^="terminal-"] .composer-action-button i {
  width: var(--terminal-icon-size) !important;
  height: var(--terminal-icon-size) !important;
  min-width: var(--terminal-icon-size) !important;
  min-height: var(--terminal-icon-size) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--terminal-icon-color) !important;
  background: var(--terminal-icon-bg) !important;
  background-image: none !important;
  border: 1px solid var(--terminal-icon-border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  text-shadow: none !important;
  outline: none !important;
  transform: none !important;
}

/* PASS117 terminal Font Awesome repair
   Terminal themes must not replace Font Awesome's icon font with monospace.
   Otherwise private-use icon codes render as garbage text. Humanity survives another CSS lesson.
*/

html.theme-terminal .fa,
html.theme-terminal .fas,
html.theme-terminal .fa-solid,
html.theme-terminal i.fa,
html.theme-terminal i.fas,
html.theme-terminal i.fa-solid,
body.theme-terminal .fa,
body.theme-terminal .fas,
body.theme-terminal .fa-solid,
body.theme-terminal i.fa,
body.theme-terminal i.fas,
body.theme-terminal i.fa-solid,
html[data-stellar-theme^="terminal-"] .fa,
html[data-stellar-theme^="terminal-"] .fas,
html[data-stellar-theme^="terminal-"] .fa-solid,
html[data-stellar-theme^="terminal-"] i.fa,
html[data-stellar-theme^="terminal-"] i.fas,
html[data-stellar-theme^="terminal-"] i.fa-solid,
body[data-stellar-theme^="terminal-"] .fa,
body[data-stellar-theme^="terminal-"] .fas,
body[data-stellar-theme^="terminal-"] .fa-solid,
body[data-stellar-theme^="terminal-"] i.fa,
body[data-stellar-theme^="terminal-"] i.fas,
body[data-stellar-theme^="terminal-"] i.fa-solid,
html[data-app-theme^="terminal-"] .fa,
html[data-app-theme^="terminal-"] .fas,
html[data-app-theme^="terminal-"] .fa-solid,
html[data-app-theme^="terminal-"] i.fa,
html[data-app-theme^="terminal-"] i.fas,
html[data-app-theme^="terminal-"] i.fa-solid,
body[data-app-theme^="terminal-"] .fa,
body[data-app-theme^="terminal-"] .fas,
body[data-app-theme^="terminal-"] .fa-solid,
body[data-app-theme^="terminal-"] i.fa,
body[data-app-theme^="terminal-"] i.fas,
body[data-app-theme^="terminal-"] i.fa-solid {
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free" !important;
  font-weight: 900 !important;
  font-style: normal !important;
  font-variant: normal !important;
  text-rendering: auto !important;
  line-height: 1 !important;
  color: var(--terminal-icon-color, currentColor) !important;
}

html.theme-terminal .far,
html.theme-terminal .fa-regular,
html.theme-terminal i.far,
html.theme-terminal i.fa-regular,
body.theme-terminal .far,
body.theme-terminal .fa-regular,
body.theme-terminal i.far,
body.theme-terminal i.fa-regular,
html[data-stellar-theme^="terminal-"] .far,
html[data-stellar-theme^="terminal-"] .fa-regular,
html[data-stellar-theme^="terminal-"] i.far,
html[data-stellar-theme^="terminal-"] i.fa-regular,
body[data-stellar-theme^="terminal-"] .far,
body[data-stellar-theme^="terminal-"] .fa-regular,
body[data-stellar-theme^="terminal-"] i.far,
body[data-stellar-theme^="terminal-"] i.fa-regular,
html[data-app-theme^="terminal-"] .far,
html[data-app-theme^="terminal-"] .fa-regular,
html[data-app-theme^="terminal-"] i.far,
html[data-app-theme^="terminal-"] i.fa-regular,
body[data-app-theme^="terminal-"] .far,
body[data-app-theme^="terminal-"] .fa-regular,
body[data-app-theme^="terminal-"] i.far,
body[data-app-theme^="terminal-"] i.fa-regular {
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free" !important;
  font-weight: 400 !important;
  font-style: normal !important;
  font-variant: normal !important;
  text-rendering: auto !important;
  line-height: 1 !important;
  color: var(--terminal-icon-color, currentColor) !important;
}

html.theme-terminal .fab,
html.theme-terminal .fa-brands,
html.theme-terminal i.fab,
html.theme-terminal i.fa-brands,
body.theme-terminal .fab,
body.theme-terminal .fa-brands,
body.theme-terminal i.fab,
body.theme-terminal i.fa-brands,
html[data-stellar-theme^="terminal-"] .fab,
html[data-stellar-theme^="terminal-"] .fa-brands,
html[data-stellar-theme^="terminal-"] i.fab,
html[data-stellar-theme^="terminal-"] i.fa-brands,
body[data-stellar-theme^="terminal-"] .fab,
body[data-stellar-theme^="terminal-"] .fa-brands,
body[data-stellar-theme^="terminal-"] i.fab,
body[data-stellar-theme^="terminal-"] i.fa-brands,
html[data-app-theme^="terminal-"] .fab,
html[data-app-theme^="terminal-"] .fa-brands,
html[data-app-theme^="terminal-"] i.fab,
html[data-app-theme^="terminal-"] i.fa-brands,
body[data-app-theme^="terminal-"] .fab,
body[data-app-theme^="terminal-"] .fa-brands,
body[data-app-theme^="terminal-"] i.fab,
body[data-app-theme^="terminal-"] i.fa-brands {
  font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands" !important;
  font-weight: 400 !important;
  font-style: normal !important;
  font-variant: normal !important;
  text-rendering: auto !important;
  line-height: 1 !important;
  color: var(--terminal-icon-color, currentColor) !important;
}

/* Repair pseudo-elements too, because many FA icons render the glyph through ::before. */
html.theme-terminal .fa::before,
html.theme-terminal .fas::before,
html.theme-terminal .fa-solid::before,
html.theme-terminal i[class*="fa-"]::before,
body.theme-terminal .fa::before,
body.theme-terminal .fas::before,
body.theme-terminal .fa-solid::before,
body.theme-terminal i[class*="fa-"]::before,
html[data-stellar-theme^="terminal-"] .fa::before,
html[data-stellar-theme^="terminal-"] .fas::before,
html[data-stellar-theme^="terminal-"] .fa-solid::before,
html[data-stellar-theme^="terminal-"] i[class*="fa-"]::before,
body[data-stellar-theme^="terminal-"] .fa::before,
body[data-stellar-theme^="terminal-"] .fas::before,
body[data-stellar-theme^="terminal-"] .fa-solid::before,
body[data-stellar-theme^="terminal-"] i[class*="fa-"]::before,
html[data-app-theme^="terminal-"] .fa::before,
html[data-app-theme^="terminal-"] .fas::before,
html[data-app-theme^="terminal-"] .fa-solid::before,
html[data-app-theme^="terminal-"] i[class*="fa-"]::before,
body[data-app-theme^="terminal-"] .fa::before,
body[data-app-theme^="terminal-"] .fas::before,
body[data-app-theme^="terminal-"] .fa-solid::before,
body[data-app-theme^="terminal-"] i[class*="fa-"]::before {
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free" !important;
  font-weight: 900 !important;
  font-style: normal !important;
  font-variant: normal !important;
  text-rendering: auto !important;
  color: var(--terminal-icon-color, currentColor) !important;
}

html.theme-terminal .far::before,
html.theme-terminal .fa-regular::before,
body.theme-terminal .far::before,
body.theme-terminal .fa-regular::before,
html[data-stellar-theme^="terminal-"] .far::before,
html[data-stellar-theme^="terminal-"] .fa-regular::before,
body[data-stellar-theme^="terminal-"] .far::before,
body[data-stellar-theme^="terminal-"] .fa-regular::before,
html[data-app-theme^="terminal-"] .far::before,
html[data-app-theme^="terminal-"] .fa-regular::before,
body[data-app-theme^="terminal-"] .far::before,
body[data-app-theme^="terminal-"] .fa-regular::before {
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free" !important;
  font-weight: 400 !important;
}

html.theme-terminal .fab::before,
html.theme-terminal .fa-brands::before,
body.theme-terminal .fab::before,
body.theme-terminal .fa-brands::before,
html[data-stellar-theme^="terminal-"] .fab::before,
html[data-stellar-theme^="terminal-"] .fa-brands::before,
body[data-stellar-theme^="terminal-"] .fab::before,
body[data-stellar-theme^="terminal-"] .fa-brands::before,
html[data-app-theme^="terminal-"] .fab::before,
html[data-app-theme^="terminal-"] .fa-brands::before,
body[data-app-theme^="terminal-"] .fab::before,
body[data-app-theme^="terminal-"] .fa-brands::before {
  font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands" !important;
  font-weight: 400 !important;
}

/* Do not let old terminal rules render icon code text visibly. */
html.theme-terminal .bottom-nav i,
html.theme-terminal .bottom-nav .nav-item i,
html.theme-terminal .chat-header button i,
html.theme-terminal .settings-section-icon i,
html.theme-terminal .settings-preference-icon i,
body.theme-terminal .bottom-nav i,
body.theme-terminal .bottom-nav .nav-item i,
body.theme-terminal .chat-header button i,
body.theme-terminal .settings-section-icon i,
body.theme-terminal .settings-preference-icon i,
html[data-stellar-theme^="terminal-"] .bottom-nav i,
html[data-stellar-theme^="terminal-"] .bottom-nav .nav-item i,
html[data-stellar-theme^="terminal-"] .chat-header button i,
html[data-stellar-theme^="terminal-"] .settings-section-icon i,
html[data-stellar-theme^="terminal-"] .settings-preference-icon i,
body[data-stellar-theme^="terminal-"] .bottom-nav i,
body[data-stellar-theme^="terminal-"] .bottom-nav .nav-item i,
body[data-stellar-theme^="terminal-"] .chat-header button i,
body[data-stellar-theme^="terminal-"] .settings-section-icon i,
body[data-stellar-theme^="terminal-"] .settings-preference-icon i {
  font-family: "Font Awesome 6 Free", "Font Awesome 5 Free" !important;
}

/* PASS118 terminal chat bubble contrast
   Stop terminal-dark sent bubbles from becoming radioactive green slabs.
   Scope: terminal themes only.
*/

html.theme-terminal,
body.theme-terminal,
html[data-stellar-theme^="terminal-"],
body[data-stellar-theme^="terminal-"],
html[data-app-theme^="terminal-"],
body[data-app-theme^="terminal-"],
html[data-theme-mode^="terminal-"],
body[data-theme-mode^="terminal-"] {
  --terminal-msg-radius: 0;
  --terminal-msg-shadow: none;
}

/* Terminal Dark palette */
html.theme-terminal-dark,
body.theme-terminal-dark,
html[data-stellar-theme="terminal-dark"],
body[data-stellar-theme="terminal-dark"],
html[data-app-theme="terminal-dark"],
body[data-app-theme="terminal-dark"],
html[data-theme-mode="terminal-dark"],
body[data-theme-mode="terminal-dark"] {
  --terminal-msg-own-bg: #001607;
  --terminal-msg-own-border: rgba(0, 255, 102, 0.72);
  --terminal-msg-own-text: #d7ffe1;
  --terminal-msg-own-meta: rgba(215, 255, 225, 0.70);

  --terminal-msg-other-bg: #000000;
  --terminal-msg-other-border: rgba(0, 255, 102, 0.46);
  --terminal-msg-other-text: #bfffd1;
  --terminal-msg-other-meta: rgba(191, 255, 209, 0.62);

  --terminal-msg-reply-bg: rgba(0, 255, 102, 0.08);
  --terminal-msg-reaction-bg: #000000;
}

/* Terminal Light palette */
html.theme-terminal-light,
body.theme-terminal-light,
html[data-stellar-theme="terminal-light"],
body[data-stellar-theme="terminal-light"],
html[data-app-theme="terminal-light"],
body[data-app-theme="terminal-light"],
html[data-theme-mode="terminal-light"],
body[data-theme-mode="terminal-light"] {
  --terminal-msg-own-bg: #f2e8e8;
  --terminal-msg-own-border: rgba(139, 0, 0, 0.78);
  --terminal-msg-own-text: #4a0000;
  --terminal-msg-own-meta: rgba(74, 0, 0, 0.66);

  --terminal-msg-other-bg: #e5e5e5;
  --terminal-msg-other-border: rgba(139, 0, 0, 0.42);
  --terminal-msg-other-text: #4a0000;
  --terminal-msg-other-meta: rgba(74, 0, 0, 0.58);

  --terminal-msg-reply-bg: rgba(139, 0, 0, 0.06);
  --terminal-msg-reaction-bg: #eeeeee;
}

/* Base message bubble reset for terminal modes. */
html.theme-terminal .message-bubble,
body.theme-terminal .message-bubble,
html[data-stellar-theme^="terminal-"] .message-bubble,
body[data-stellar-theme^="terminal-"] .message-bubble,
html[data-app-theme^="terminal-"] .message-bubble,
body[data-app-theme^="terminal-"] .message-bubble,
html[data-theme-mode^="terminal-"] .message-bubble,
body[data-theme-mode^="terminal-"] .message-bubble {
  border-radius: var(--terminal-msg-radius) !important;
  box-shadow: var(--terminal-msg-shadow) !important;
  text-shadow: none !important;
  filter: none !important;
  background-image: none !important;
}

/* Own/sent bubbles: dark tint, not solid neon fill. */
html.theme-terminal .message-bubble.is-own,
html.theme-terminal .message-bubble.is-mine,
html.theme-terminal .message-bubble.is-outgoing,
html.theme-terminal .message-bubble.outgoing,
html.theme-terminal .message-bubble.sent,
html.theme-terminal .message-row.is-outgoing .message-bubble,
html.theme-terminal .message-row.outgoing .message-bubble,
html.theme-terminal .chat-message.is-outgoing .message-bubble,
html.theme-terminal .chat-message.outgoing .message-bubble,
html.theme-terminal .message.is-outgoing .message-bubble,
html.theme-terminal .message.outgoing .message-bubble,
html.theme-terminal [data-message-direction="outgoing"] .message-bubble,
body.theme-terminal .message-bubble.is-own,
body.theme-terminal .message-bubble.is-mine,
body.theme-terminal .message-bubble.is-outgoing,
body.theme-terminal .message-bubble.outgoing,
body.theme-terminal .message-bubble.sent,
body.theme-terminal .message-row.is-outgoing .message-bubble,
body.theme-terminal .message-row.outgoing .message-bubble,
body.theme-terminal .chat-message.is-outgoing .message-bubble,
body.theme-terminal .chat-message.outgoing .message-bubble,
body.theme-terminal .message.is-outgoing .message-bubble,
body.theme-terminal .message.outgoing .message-bubble,
body.theme-terminal [data-message-direction="outgoing"] .message-bubble,
html[data-stellar-theme^="terminal-"] .message-bubble.is-own,
html[data-stellar-theme^="terminal-"] .message-bubble.is-mine,
html[data-stellar-theme^="terminal-"] .message-bubble.is-outgoing,
html[data-stellar-theme^="terminal-"] .message-bubble.outgoing,
html[data-stellar-theme^="terminal-"] .message-bubble.sent,
html[data-stellar-theme^="terminal-"] .message-row.is-outgoing .message-bubble,
html[data-stellar-theme^="terminal-"] .message-row.outgoing .message-bubble,
html[data-stellar-theme^="terminal-"] .chat-message.is-outgoing .message-bubble,
html[data-stellar-theme^="terminal-"] .chat-message.outgoing .message-bubble,
html[data-stellar-theme^="terminal-"] .message.is-outgoing .message-bubble,
html[data-stellar-theme^="terminal-"] .message.outgoing .message-bubble,
html[data-stellar-theme^="terminal-"] [data-message-direction="outgoing"] .message-bubble,
body[data-stellar-theme^="terminal-"] .message-bubble.is-own,
body[data-stellar-theme^="terminal-"] .message-bubble.is-mine,
body[data-stellar-theme^="terminal-"] .message-bubble.is-outgoing,
body[data-stellar-theme^="terminal-"] .message-bubble.outgoing,
body[data-stellar-theme^="terminal-"] .message-bubble.sent,
body[data-stellar-theme^="terminal-"] .message-row.is-outgoing .message-bubble,
body[data-stellar-theme^="terminal-"] .message-row.outgoing .message-bubble,
body[data-stellar-theme^="terminal-"] .chat-message.is-outgoing .message-bubble,
body[data-stellar-theme^="terminal-"] .chat-message.outgoing .message-bubble,
body[data-stellar-theme^="terminal-"] .message.is-outgoing .message-bubble,
body[data-stellar-theme^="terminal-"] .message.outgoing .message-bubble,
body[data-stellar-theme^="terminal-"] [data-message-direction="outgoing"] .message-bubble {
  color: var(--terminal-msg-own-text) !important;
  background: var(--terminal-msg-own-bg) !important;
  background-color: var(--terminal-msg-own-bg) !important;
  background-image: none !important;
  border: 1px solid var(--terminal-msg-own-border) !important;
}

/* Incoming bubbles. */
html.theme-terminal .message-bubble:not(.is-own):not(.is-mine):not(.is-outgoing):not(.outgoing):not(.sent),
body.theme-terminal .message-bubble:not(.is-own):not(.is-mine):not(.is-outgoing):not(.outgoing):not(.sent),
html[data-stellar-theme^="terminal-"] .message-bubble:not(.is-own):not(.is-mine):not(.is-outgoing):not(.outgoing):not(.sent),
body[data-stellar-theme^="terminal-"] .message-bubble:not(.is-own):not(.is-mine):not(.is-outgoing):not(.outgoing):not(.sent) {
  color: var(--terminal-msg-other-text) !important;
  background: var(--terminal-msg-other-bg) !important;
  background-color: var(--terminal-msg-other-bg) !important;
  background-image: none !important;
  border: 1px solid var(--terminal-msg-other-border) !important;
}

/* Text and metadata inside bubbles. */
html.theme-terminal .message-bubble p,
html.theme-terminal .message-bubble .message-text,
html.theme-terminal .message-bubble .message-body,
html.theme-terminal .message-bubble .message-content,
body.theme-terminal .message-bubble p,
body.theme-terminal .message-bubble .message-text,
body.theme-terminal .message-bubble .message-body,
body.theme-terminal .message-bubble .message-content,
html[data-stellar-theme^="terminal-"] .message-bubble p,
html[data-stellar-theme^="terminal-"] .message-bubble .message-text,
html[data-stellar-theme^="terminal-"] .message-bubble .message-body,
html[data-stellar-theme^="terminal-"] .message-bubble .message-content,
body[data-stellar-theme^="terminal-"] .message-bubble p,
body[data-stellar-theme^="terminal-"] .message-bubble .message-text,
body[data-stellar-theme^="terminal-"] .message-bubble .message-body,
body[data-stellar-theme^="terminal-"] .message-bubble .message-content {
  color: inherit !important;
  text-shadow: none !important;
}

html.theme-terminal .message-bubble.is-own .message-meta,
html.theme-terminal .message-bubble.is-own time,
html.theme-terminal .message-bubble.is-own .message-status,
body.theme-terminal .message-bubble.is-own .message-meta,
body.theme-terminal .message-bubble.is-own time,
body.theme-terminal .message-bubble.is-own .message-status,
html[data-stellar-theme^="terminal-"] .message-bubble.is-own .message-meta,
html[data-stellar-theme^="terminal-"] .message-bubble.is-own time,
html[data-stellar-theme^="terminal-"] .message-bubble.is-own .message-status,
body[data-stellar-theme^="terminal-"] .message-bubble.is-own .message-meta,
body[data-stellar-theme^="terminal-"] .message-bubble.is-own time,
body[data-stellar-theme^="terminal-"] .message-bubble.is-own .message-status {
  color: var(--terminal-msg-own-meta) !important;
}

html.theme-terminal .message-bubble:not(.is-own) .message-meta,
html.theme-terminal .message-bubble:not(.is-own) time,
html.theme-terminal .message-bubble:not(.is-own) .message-status,
body.theme-terminal .message-bubble:not(.is-own) .message-meta,
body.theme-terminal .message-bubble:not(.is-own) time,
body.theme-terminal .message-bubble:not(.is-own) .message-status,
html[data-stellar-theme^="terminal-"] .message-bubble:not(.is-own) .message-meta,
html[data-stellar-theme^="terminal-"] .message-bubble:not(.is-own) time,
html[data-stellar-theme^="terminal-"] .message-bubble:not(.is-own) .message-status,
body[data-stellar-theme^="terminal-"] .message-bubble:not(.is-own) .message-meta,
body[data-stellar-theme^="terminal-"] .message-bubble:not(.is-own) time,
body[data-stellar-theme^="terminal-"] .message-bubble:not(.is-own) .message-status {
  color: var(--terminal-msg-other-meta) !important;
}

/* Keep replies/reactions terminal-readable without bright slabs. */
html.theme-terminal .message-bubble .inline-reply-preview,
html.theme-terminal .message-bubble .reaction-pill,
body.theme-terminal .message-bubble .inline-reply-preview,
body.theme-terminal .message-bubble .reaction-pill,
html[data-stellar-theme^="terminal-"] .message-bubble .inline-reply-preview,
html[data-stellar-theme^="terminal-"] .message-bubble .reaction-pill,
body[data-stellar-theme^="terminal-"] .message-bubble .inline-reply-preview,
body[data-stellar-theme^="terminal-"] .message-bubble .reaction-pill {
  background: var(--terminal-msg-reply-bg) !important;
  border-color: currentColor !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
