/* Shared night theme; retained from the pre-cleanup browser stylesheet. */
@layer night-theme {
  html[data-theme="dark"] { --night-ground: #080a0e; --night-surface: #20252e; --night-raised: #2b3340; --night-inset: #161b22; --night-hover: #364253; --night-line: #485568; --night-control-line: #748399; --night-ink: #f2f4f8; --night-soft: #d1d8e3; --night-muted: #b0bccd; --night-accent: #ed985e; --night-accent-hover: #ffb27c; --night-on-accent: #24170e; --night-accent-soft: #403024; --night-success: #85dfb5; --night-success-bg: #173b30; --night-danger: #ffacb5; --night-danger-bg: #45252e; --night-warning: #f6d38b; --night-warning-bg: #3d3120; --night-info: #acd2ff; --night-info-bg: #233b57; color-scheme: dark !important; background: var(--night-ground) !important; }
  html[data-theme="dark"], html[data-theme="dark"] body { --main-bg: var(--night-ground) !important; --main-surface: var(--night-surface) !important; --main-surface-soft: var(--night-raised) !important; --panel-bg: var(--night-surface) !important; --panel-muted: var(--night-raised) !important; --panel-inset: var(--night-inset) !important; --card-bg: var(--night-surface) !important; --bg: var(--night-ground) !important; --surface: var(--night-surface) !important; --subtle: var(--night-raised) !important; --text: var(--night-ink) !important; --text-main: var(--night-ink) !important; --text-soft: var(--night-soft) !important; --text-muted: var(--night-muted) !important; --ink: var(--night-ink) !important; --soft: var(--night-soft) !important; --muted: var(--night-muted) !important; --line: var(--night-line) !important; --line-strong: var(--night-control-line) !important; --border: var(--night-line) !important; --primary: var(--night-accent) !important; --primary-dark: var(--night-accent-hover) !important; --primary-light: var(--night-accent-hover) !important; --primary-hover: var(--night-accent-hover) !important; --primary-soft: var(--night-accent-soft) !important; --primary-glow: #ed985e24 !important; --success: var(--night-success) !important; --success-soft: var(--night-success-bg) !important; --warning: var(--night-warning) !important; --warning-soft: var(--night-warning-bg) !important; --danger: var(--night-danger) !important; --danger-soft: var(--night-danger-bg) !important; --notice-bg: var(--night-raised) !important; --notice-border: var(--night-line) !important; --sidebar-bg: #181d25 !important; --sidebar-surface: var(--night-raised) !important; --sidebar-border: var(--night-line) !important; --sidebar-text: var(--night-muted) !important; --sidebar-text-hover: var(--night-ink) !important; --sidebar-text-active: var(--night-accent-hover) !important; --sidebar-accent: var(--night-accent) !important; --sidebar-accent-glow: var(--night-accent-soft) !important; --cxai-ink: var(--night-ink) !important; --cxai-line: var(--night-line) !important; --cxai-surface: var(--night-surface) !important; --cxai-accent: var(--night-accent) !important; --shadow-card: 0 1px 0 #ffffff0a, 0 8px 24px #00000035 !important; --shadow: 0 8px 28px #00000040 !important; --shadow-lg: 0 18px 48px #00000066 !important; color-scheme: dark !important; color: var(--night-ink) !important; }
  html[data-theme="dark"] body, html[data-theme="dark"] .main-area { background: var(--night-ground) !important; }
  html[data-theme="dark"] body::before, html[data-theme="dark"] body::after { background: none !important; }
  html[data-theme="dark"] body.page-app .main-area { background: transparent !important; }
  html[data-theme="dark"] body:is(.page-shop, .page-ucenter, .page-records, .page-gallery, .page-invite, .page-credits, .page-earnings, .page-api-tokens, .page-agent-platform, .page-tenant-console, .page-agent-cards, .page-card-products) .main-area > main, html[data-theme="dark"] body:is(.page-shop, .page-ucenter, .page-records, .page-gallery, .page-invite, .page-credits, .page-earnings, .page-api-tokens, .page-agent-platform, .page-tenant-console, .page-agent-cards, .page-card-products) .main-area > [data-frontend-entry] > main { background: rgb(24, 29, 37) !important; border-color: var(--night-line) !important; color: var(--night-ink) !important; backdrop-filter: none !important; }
  html[data-theme="dark"] :is(.card-v3, .page-hd, .stat-card, .media-card, .package-card, .credits-stat, .credits-item, .table-wrap, .empty-state, .cxai-native-item, .cxai-native-balance, .home-console, .home-project-thread, .home-feature-card, .home-workflow-card, .home-workflow-copy, .home-showcase-main, .home-public-gallery-card, .home-featured-orbit-card, .feedback-form, .feedback-policy, .feedback-item, .feedback-detail-main, .feedback-message, .feedback-supplement, .agent-project-card, .agent-project-bar, .agent-project-dialog-card, .agent-workspace-nav, .uc-hero, .uc-card, .uc-panel, .uc-section, .uc-stat-card, .uc-overview-card, .uc-profile-card, .card-product-card, .card-product-manager-agent, .shop-package, .shop-panel, .shop-card, .shop-section, .shop-card-product, .shop-storage-card, .api-test-card, .creation-sidebar, .creation-topbar, .creation-message > div, .chat-main, .chat-sidebar, .chat-topbar, .chat-input-area, .chat-msg-body, .video-native-reference, .audio-result, .video-result) { background: var(--night-surface) !important; color: var(--night-ink) !important; border-color: var(--night-line) !important; box-shadow: var(--shadow-card) !important; backdrop-filter: none !important; }
  html[data-theme="dark"] :is(.home-workflow-copy, .card-v3-body, .record-dialog-body, .redeem-form, .creation-main, .creation-thread, .chat-messages) { color: var(--night-ink) !important; background: transparent !important; box-shadow: none !important; }
  html[data-theme="dark"] :is(.card-v3-head, .record-dialog-head, .record-dialog-foot, .home-console-head, .redeem-head, .table-v3 th, .table-wrap th, .media-card-body, .record-list-header, .home-public-gallery-card-footer, .home-public-gallery-card-meta, .agent-project-info, .feedback-tabs, .uc-section-head, .uc-card-head, .uc-profile-form, .uc-field-row) { background: var(--night-raised) !important; border-color: var(--night-line) !important; color: var(--night-soft) !important; }
  html[data-theme="dark"] body.page-app:not(.page-admin) .home-console-head { background: transparent !important; border-color: transparent !important; box-shadow: none !important; }
  html[data-theme="dark"] body.page-app:not(.page-admin) .home-console { background: transparent !important; border-color: transparent !important; box-shadow: none !important; }
  html[data-theme="dark"] body.page-app:not(.page-admin) .home-console-body { isolation: isolate; background: var(--night-surface) !important; box-shadow: var(--shadow-card) !important; }
  html[data-theme="dark"] body.page-app:not(.page-admin) .home-console-body::before { content: ""; position: absolute; inset: 2px; z-index: -1; pointer-events: none; border-radius: inherit; background: transparent; box-shadow: rgba(104, 187, 223, 0.29) -22px -7px 42px -8px, rgba(237, 152, 94, 0.28) 24px -10px 44px -9px, rgba(237, 152, 94, 0.16) 0px 17px 38px -10px; opacity: 0.4; animation: 6s ease-in-out 0s infinite alternate none running home-composer-breathe; }
  html[data-theme="dark"] body.page-app:not(.page-admin) .home-console:focus-within .home-console-body::before { animation-play-state: paused; }
  @media (hover: hover) and (pointer: fine) {
  html[data-theme="dark"] body.page-app:not(.page-admin):has(.home-atmosphere[data-paused="true"]) .home-console-body::before { animation-play-state: paused; }
}
  html[data-theme="dark"] body.page-app:not(.page-admin) .home-prompt-shell { border: 0px !important; border-radius: 18px !important; box-shadow: none !important; }
  html[data-theme="dark"] body.page-app:not(.page-admin) .home-prompt-shell:focus-within { box-shadow: rgba(237, 152, 94, 0.14) 0px 0px 0px 2px !important; }
  html[data-theme="dark"] body.page-app:not(.page-admin) #homePrompt { background: transparent !important; }
  html[data-theme="dark"] body.has-unified-workbench .home-logo-navigation { --home-logo-menu-offset: calc(var(--home-logo-mark-size) + 42px); height: calc(var(--home-logo-mark-size) + 34px) !important; }
  html[data-theme="dark"] body.has-unified-workbench .home-logo-nav-toggle { box-sizing: border-box; height: calc(var(--home-logo-mark-size) + 34px) !important; padding: 0px 0px 34px !important; }
  html[data-theme="dark"] body.has-unified-workbench .home-logo-nav-mark::after { content: ""; position: absolute; box-sizing: border-box; top: calc(100% + 4px); left: calc(50% - 20px); z-index: 0; width: 40px; height: 26px; border: 1px solid rgba(237, 152, 94, 0.47); border-radius: 999px; background: var(--night-raised); box-shadow: rgba(237, 152, 94, 0.21) 0px 0px 12px; opacity: 0.72; animation: 3.2s ease-in-out 0s infinite alternate none running home-logo-disclosure-breathe; }
  html[data-theme="dark"] body.has-unified-workbench .home-logo-nav-chevron { z-index: 1; stroke-width: 2.4; opacity: 0.72; animation: 3.2s ease-in-out 0s infinite alternate none running home-logo-disclosure-breathe; inset: calc(100% + 4px) auto auto calc(50% - 13px) !important; width: 26px !important; height: 26px !important; padding: 2px !important; border: 0px !important; background: transparent !important; color: var(--night-accent-hover) !important; }
  html[data-theme="dark"] body.has-unified-workbench .home-logo-nav-panel { top: var(--home-logo-menu-offset) !important; max-height: calc(100dvh - max(20px, env(safe-area-inset-top)) - var(--home-logo-menu-offset) - 16px) !important; }
  /* On the designer canvas the global brand is already seated in the topbar.
     Keep its disclosure affordance inside the mark instead of creating a
     second orange control below the toolbar. */
  html[data-theme="dark"] body.page-designer-canvas.has-unified-workbench .home-logo-navigation { height: 40px !important; }
  html[data-theme="dark"] body.page-designer-canvas.has-unified-workbench .home-logo-nav-toggle { height: 40px !important; padding: 0 !important; }
  html[data-theme="dark"] body.page-designer-canvas.has-unified-workbench .home-logo-nav-mark::after { display: none !important; }
  html[data-theme="dark"] body.page-designer-canvas.has-unified-workbench .home-logo-nav-chevron { inset: auto 1px 1px auto !important; width: 13px !important; height: 13px !important; padding: 1px !important; border: 0 !important; background: #020817d6 !important; color: inherit !important; }
  html[data-theme="dark"] body.page-designer-canvas.has-unified-workbench .home-logo-nav-panel { top: 47px !important; max-height: calc(100dvh - 62px) !important; }
  @media (max-width: 720px) {
  html[data-theme="dark"] body.has-unified-workbench .home-logo-nav-panel { max-height: calc(100dvh - max(20px, env(safe-area-inset-top)) - var(--home-logo-menu-offset) - 84px - env(safe-area-inset-bottom)) !important; }
}
  @keyframes home-logo-disclosure-breathe { 
  0% { opacity: 0.65; }
  100% { opacity: 1; }
}
  @keyframes home-composer-breathe { 
  0% { opacity: 0.32; }
  100% { opacity: 0.64; }
}
  @media (prefers-reduced-motion: reduce) {
  html[data-theme="dark"] body.has-unified-workbench .home-logo-nav-mark::after, html[data-theme="dark"] body.has-unified-workbench .home-logo-nav-chevron, html[data-theme="dark"] body.page-app:not(.page-admin) .home-console-body::before { animation: auto ease 0s 1 normal none running none !important; }
}
  html[data-theme="dark"] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]), select, textarea) { background: var(--night-inset) !important; color: var(--night-ink) !important; border-color: var(--night-control-line) !important; caret-color: var(--night-accent) !important; color-scheme: dark !important; }
  html[data-theme="dark"] :is(input, textarea)::placeholder { color: var(--night-muted) !important; opacity: 1 !important; }
  html[data-theme="dark"] :is(select option, select optgroup) { background: var(--night-inset) !important; color: var(--night-ink) !important; }
  html[data-theme="dark"] input:-webkit-autofill { -webkit-text-fill-color: var(--night-ink) !important; box-shadow: 0 0 0 1000px var(--night-inset) inset !important; }
  html[data-theme="dark"] :is(input[type="checkbox"], input[type="radio"], input[type="range"]) { accent-color: var(--night-accent) !important; }
  html[data-theme="dark"] :is(.home-prompt-shell, .chat-input-wrap, .record-full-prompt, .record-detail-grid > div, .record-error, .content-slot, .history-empty-inline, .edit-upload-box, .feedback-file, .creation-history-item, .home-capability-group, .home-model-menu-option, .api-test-result, .api-test-models span, .agent-project-document-cover, .agent-project-stats-cover, .agent-project-status, .uc-form, .uc-form-row, .uc-info-row, .uc-security-item, .uc-social-item) { background: var(--night-inset) !important; color: var(--night-soft) !important; border-color: var(--night-line) !important; }
  html[data-theme="dark"] :is(.home-prompt-shell, .chat-input-wrap) { border: 1px solid var(--night-control-line) !important; }
  html[data-theme="dark"] :is(.home-prompt-shell, .chat-input-wrap, .home-console):focus-within { border-color: var(--night-accent) !important; box-shadow: rgba(237, 152, 94, 0.14) 0px 0px 0px 3px !important; }
  html[data-theme="dark"] :is(.record-dialog-panel, .redeem-panel, .jpt-layer-panel, .jpt-toast, .home-contact-dialog, .home-article-panel, .home-prompt-modal-panel, .home-tool-popover, .home-mode-picker-menu, .home-model-menu, .creation-history-menu, .record-action-dropdown, .theme-menu, .home-logo-nav-panel, .native-auth-panel, .agent-project-card-menu, .agent-project-more > div, .designer-modal-panel, .canvas-modal-panel, .cxai-modal-panel, .confirm-dialog, .card-product-dialog, .shop-dialog, .site-auth-panel) { background: var(--night-raised) !important; color: var(--night-ink) !important; border: 1px solid var(--night-control-line) !important; box-shadow: rgba(0, 0, 0, 0.65) 0px 24px 80px !important; backdrop-filter: none !important; }
  html[data-theme="dark"] :is(.native-auth-modal, .home-contact-backdrop, .modal-backdrop, .record-dialog-overlay, .jpt-layer-mask, .designer-modal-backdrop, .cxai-modal-backdrop) { background: rgba(4, 6, 9, 0.72) !important; }
  html[data-theme="dark"] dialog::backdrop { background: rgba(4, 6, 9, 0.72) !important; }
  html[data-theme="dark"] :is(.btn, .home-mode-tabs button, .home-compact-tool-button, .home-file-tool, .home-prompt-expand, .home-prompt-polish, .home-mode-picker-trigger, .home-cost-hint, .home-prompt-resize-handle, .home-featured-orbit-arrow, .home-marketplace-type-nav button, .home-gallery-tag-nav button, .home-contact-details button, .home-contact-close, .record-dialog-close, .record-action-trigger, .creation-history-menu button, .record-action-dropdown button, .chat-model-pill, .chat-suggestion, .site-auth-close, .native-auth-social button, .native-auth-code-row button, .uc-btn, .uc-btn-secondary, .api-test-copy, .agent-workspace-nav-item, .agent-project-actions a, .agent-project-dialog-card button) { background: var(--night-raised) !important; color: var(--night-soft) !important; border-color: var(--night-control-line) !important; text-shadow: none !important; box-shadow: none !important; }
  html[data-theme="dark"] :is(.btn-primary, .home-prompt-send, .chat-send-btn, .native-auth-primary, .uc-btn-primary, .agent-project-create, .agent-project-dialog-card .is-primary, .feedback-submit-actions button, .feedback-supplement button, .shop-purchase-btn, .shop-buy-btn) { background: var(--night-accent) !important; color: var(--night-on-accent) !important; border-color: var(--night-accent) !important; text-shadow: none !important; }
  html[data-theme="dark"] :is(.btn-primary, .home-prompt-send, .chat-send-btn, .native-auth-primary, .uc-btn-primary) :is(span, svg, strong) { color: inherit !important; }
  html[data-theme="dark"] :is(.btn-primary, .home-prompt-send, .chat-send-btn, .native-auth-primary, .uc-btn-primary):hover:not(:disabled) { background: var(--night-accent-hover) !important; }
  html[data-theme="dark"] :is(.home-mode-tabs button.active, .home-model-menu-option.is-selected, .home-marketplace-type-nav button.active, .home-gallery-tag-nav button.active, .chat-model-pill.active, .agent-workspace-nav-item.active, .feedback-tabs .is-active) { background: var(--night-accent-soft) !important; color: var(--night-accent-hover) !important; border-color: var(--night-accent) !important; }
  html[data-theme="dark"] :is(.btn, .uc-btn, .home-compact-tool-button, .home-file-tool, .home-featured-orbit-arrow):hover:not(:disabled):not(.btn-primary):not(.uc-btn-primary) { background: var(--night-hover) !important; color: var(--night-ink) !important; }
  html[data-theme="dark"] :is(button, input, select, textarea, a, summary):focus-visible { outline: 2px solid var(--night-accent-hover) !important; outline-offset: 3px !important; }
  html[data-theme="dark"] :is(.page-hd, .card-v3, .home-contact-dialog, .native-auth-panel, .home-article-panel, .record-dialog-panel, .uc-page, .feedback-page, .cxai-native-page, .home-console, .home-workflow-copy, .home-section-title, .creation-topbar, .creation-message, .chat-main, .shop-page, .page-admin) :is(h1, h2, h3, h4, legend) { color: var(--night-ink) !important; text-shadow: none !important; }
  html[data-theme="dark"] .sidebar-nav-section { color: var(--night-muted) !important; }
  html[data-theme="dark"] :is(.uc-avatar, .uc-avatar-preview, .uc-action-primary, .uc-action-primary .uc-action-icon, .home-prompt-send, #homeGenerateButton, #homeGenerateButton.home-prompt-send) { background: var(--night-accent) !important; color: var(--night-on-accent) !important; border-color: var(--night-accent) !important; }
  html[data-theme="dark"] :is(.uc-avatar, .uc-avatar-preview, .uc-action-primary, .uc-action-primary .uc-action-icon, .home-prompt-send, #homeGenerateButton, #homeGenerateButton.home-prompt-send) :is(span, svg) { color: var(--night-on-accent) !important; }
  html[data-theme="dark"] :is(.uc-status, .uc-bind-state.is-bound, .uc-social-state.is-bound) { background: var(--night-success-bg) !important; color: var(--night-success) !important; border-color: rgb(60, 136, 105) !important; }
  html[data-theme="dark"] :is(.uc-balance-icon, .uc-balance-icon.invite) { background: var(--night-info-bg) !important; color: var(--night-info) !important; }
  html[data-theme="dark"] :is(.home-public-gallery-media, .gallery-card-media, .media-placeholder, .home-gallery-native-media) { background: var(--night-inset) !important; color: var(--night-muted) !important; }
  html[data-theme="dark"] body.page-creation .creation-workspace { background: var(--night-ground) !important; color: var(--night-ink) !important; border-color: var(--night-line) !important; }
  html[data-theme="dark"] body.page-creation :is(.creation-type-badge, .creation-history-entry .creation-history-item, .creation-room-heading, .creation-history-title-line) { color: var(--night-soft) !important; border-color: var(--night-line) !important; }
  html[data-theme="dark"] body.page-creation .creation-type-badge { background: var(--night-info-bg) !important; color: var(--night-info) !important; }
  html[data-theme="dark"] body.page-creation :is(.creation-sidebar-head a, .creation-sidebar-head button, .creation-sidebar-head .btn) { background: var(--night-raised) !important; color: var(--night-soft) !important; border-color: var(--night-control-line) !important; }
  html[data-theme="dark"] body.page-creation #homePromptSend, html[data-theme="dark"] body.page-creation #homeGenerateButton, html[data-theme="dark"] body.page-creation .home-prompt-send { background: var(--night-accent) !important; color: var(--night-on-accent) !important; border-color: var(--night-accent) !important; }
  html[data-theme="dark"] body.page-creation #homePromptSend :is(span, svg), html[data-theme="dark"] body.page-creation #homeGenerateButton :is(span, svg), html[data-theme="dark"] body.page-creation .home-prompt-send :is(span, svg) { color: var(--night-on-accent) !important; }
  html[data-theme="dark"] :is(.sub, .hint, .field-hint, .field > label, .field > span, .cxai-native-field, .cxai-creation-controls label, .home-tool-popover-head, .home-capability-group-head, .home-model-fields label, .home-console-footer, .home-feature-card small, .home-workflow-copy > span, .home-feature-kicker, .home-contact-lead, .home-contact-qr-caption, .home-contact-details strong, .home-contact-call, .home-contact-empty, .native-auth-head p, .native-auth-form label, .native-auth-social > span, .native-auth-switch, .record-detail-grid dt, .home-public-gallery-state, .home-featured-orbit-state) { color: var(--night-muted) !important; text-shadow: none !important; }
  html[data-theme="dark"] :is(.home-contact-details > a, .home-contact-details > div) { background: var(--night-surface) !important; border-color: var(--night-line) !important; color: var(--night-ink) !important; }
  html[data-theme="dark"] :is(.wechat-contact) { background: linear-gradient(135deg, rgb(27, 51, 45), rgb(32, 42, 52)) !important; border-color: rgb(60, 128, 104) !important; color: var(--night-ink) !important; box-shadow: var(--shadow-card) !important; }
  html[data-theme="dark"] :is(.wechat-contact-copy .eyebrow, .wechat-contact-copy strong, .wechat-contact-copy p, .wechat-contact-copy p span, .wechat-contact-phone, .wechat-contact-code, .external-card-shop-mark) { color: var(--night-soft) !important; }
  html[data-theme="dark"] :is(.wechat-contact-code, .wechat-contact-phone) { background: var(--night-inset) !important; border-color: rgb(60, 128, 104) !important; }
  html[data-theme="dark"] :is(.wechat-contact-button) { background: rgb(44, 173, 106) !important; border-color: rgb(44, 173, 106) !important; color: rgb(7, 23, 14) !important; }
  html[data-theme="dark"] :is(.wechat-contact--auth) { background: linear-gradient(135deg, rgb(16, 42, 37), rgb(24, 42, 55)) !important; }
  html[data-theme="dark"] :is(.pkg-promotion, .shop-promotion, .promotion-badge) { background: var(--night-danger-bg) !important; color: var(--night-danger) !important; border-color: rgb(164, 88, 103) !important; }
  html[data-theme="dark"] :is(.native-auth-links button, .native-auth-switch button, .native-auth-head > span, .home-workflow-copy > strong, .home-feature-card strong) { color: var(--night-accent-hover) !important; }
  html[data-theme="dark"] :is(.native-auth-links button, .native-auth-switch button) { background: transparent !important; }
  html[data-theme="dark"] :is(.ag-center, .af-workspace, .cxai-agent-workbench, .eis-workspace, .story-workspace, .asset-workspace, .video-cleaner-workbench, .video-prompt-workbench, .viral-video-workbench) { --af-ink: var(--night-ink) !important; --af-muted: var(--night-muted) !important; --af-edge: var(--night-line) !important; --af-panel: var(--night-surface) !important; --ag-border: var(--night-line) !important; --ag-muted: var(--night-muted) !important; --cxai-ink: var(--night-ink) !important; --cxai-line: var(--night-line) !important; --cxai-surface: var(--night-surface) !important; --eis-border: var(--night-line) !important; --eis-text: var(--night-ink) !important; --eis-muted: var(--night-muted) !important; color: var(--night-ink) !important; background-color: var(--night-ground) !important; }
  html[data-theme="dark"] .af-ambience { background: var(--night-ground) !important; }
  html[data-theme="dark"] :is(.cxai-agent-catalog, .cxai-agent-catalog-card, .cxai-agent-introduction, .cxai-agent-project-bar, .cxai-agent-project-card, .cxai-agent-tool-panel, .workspace-panel, .workspace-band, .storyboard-workbench, .storyboard-panel, .eis-band, .eis-submit-band, .video-cleaner-panel, .video-prompt-panel, .viral-panel, .cxai-agent-file-slot, .cxai-agent-file-list article, .cxai-agent-choice-field, .cxai-agent-check-field, .eis-asset, .eis-presets > button, .asset-card, .result-card, .queue-card, .af-catalog-card, .af-project-card, .af-project-create, .af-intro-card) { background: var(--night-surface) !important; color: var(--night-ink) !important; border-color: var(--night-line) !important; box-shadow: var(--shadow-card) !important; }
  html[data-theme="dark"] .ag-center :is(h1, h2, h3, h4, h5, strong, legend, .cxai-agent-project-agent-name, .cxai-agent-project-status) { color: var(--night-ink) !important; }
  html[data-theme="dark"] .ag-center :is(p, small, dt, label, li, .field-label, .field > span, .eis-field > span) { color: var(--night-muted) !important; }
  html[data-theme="dark"] :is(.cxai-agent-dropzone, .document-upload, .eis-upload-button, .video-cleaner-empty, .video-prompt-empty, .viral-video-empty, .output-empty, .cxai-agent-result-empty, .cxai-agent-choice-field label, .cxai-agent-check-field label, .cxai-agent-stage-list li, .flow-steps li, .video-cleaner-agent-rail b, .video-prompt-agent-rail b, .viral-agent-rail b) { background: var(--night-inset) !important; color: var(--night-muted) !important; border-color: var(--night-control-line) !important; }
  html[data-theme="dark"] .ag-center :is(button, .eis-upload-button, .video-cleaner-upload-button span, .video-prompt-upload-button span, .viral-video-upload span) { background: var(--night-raised) !important; color: var(--night-soft) !important; border-color: var(--night-control-line) !important; }
  html[data-theme="dark"] .ag-center :is(button, .eis-upload-button):hover:not(:disabled) { background: var(--night-hover) !important; color: var(--night-ink) !important; }
  html[data-theme="dark"] .ag-center :is(.cxai-button, .primary-button, .eis-button-primary, .video-cleaner-submit, .smart-tool-submit, .smart-tool-actions .primary, .af-primary, .cxai-agent-section-create, .cxai-agent-project-create) { background: var(--night-accent) !important; color: var(--night-on-accent) !important; border-color: var(--night-accent) !important; }
  html[data-theme="dark"] .ag-center :is(.flow-steps li.active, .video-prompt-agent-rail .is-active b, .video-cleaner-agent-rail .is-active b, .viral-agent-rail .is-active b, .cxai-agent-stage-list b, button.is-selected) { background: var(--night-accent-soft) !important; color: var(--night-accent-hover) !important; border-color: var(--night-accent) !important; }
  html[data-theme="dark"] :is(.designer-canvas-stage, .designer-canvas-viewport) { background-color: var(--night-ground) !important; }
  html[data-theme="dark"] :is(.designer-topbar, .designer-toolbar, .designer-tools, .designer-inspector, .designer-panel, .designer-context-menu, .designer-project-panel, .designer-project-gate, .designer-project-dialog, .designer-auxiliary-panel, .designer-assistant-panel, .designer-templates-panel, .designer-inspiration-panel, .designer-node-card:not(.is-media-presentation-node), .designer-generation-workbench, .designer-text-workbench, .designer-selection-toolbar, .designer-media-node-toolbar, .designer-reference-picker, .designer-model-menu, .designer-node-preset-menu, .canvas-panel, .canvas-toolbar, .canvas-context-menu) { color: var(--night-ink) !important; background: var(--night-surface) !important; border-color: var(--night-control-line) !important; box-shadow: var(--shadow-lg) !important; }
  html[data-theme="dark"] :is(.docs-topbar, .docs-sidebar, .docs-sidebar-footer, .docs-callout, .docs-endpoint, .docs-steps li > span, .docs-tags span, .docs-table th, .docs-search kbd, .docs-menu-button, .box) { background: var(--night-surface) !important; color: var(--night-soft) !important; border-color: var(--night-line) !important; }
  html[data-theme="dark"] :is(.docs-content, .docs-brand-link, .docs-content h1, .docs-content h2, .docs-steps strong, .docs-billing strong) { color: var(--night-ink) !important; }
  html[data-theme="dark"] :is(.docs-base code, .docs-action-link, .docs-nav-group a, .docs-model-id code, .docs-table td, .docs-table code, .docs-endpoint code, .docs-nav-group h2, .docs-nav-group a code, .docs-copy-button, .box p) { color: var(--night-muted) !important; }
  html[data-theme="dark"] :is(.docs-nav-group a.active, .docs-nav-group a:hover) { background: var(--night-accent-soft) !important; color: var(--night-accent-hover) !important; }
  html[data-theme="dark"] :is(.docs-model-meta span, .docs-endpoint > span) { background: var(--night-info-bg) !important; color: var(--night-info) !important; }
  html[data-theme="dark"] :is(.alert, .generation-notice, .cost-hint, .api-test-state, .status-badge, .feedback-status, .native-auth-message, .badge-balance, .home-gallery-refreshing span) { background: var(--night-raised) !important; color: var(--night-soft) !important; border-color: var(--night-line) !important; }
  html[data-theme="dark"] :is(.alert-success, .cxai-native-success, .status-badge.succeeded, .status-badge.completed, .status-badge.active, .feedback-status.is-adopted, .api-test-state.is-success, .agent-project-status.is-completed, .agent-project-status.is-running, .docs-callout.success, .uc-status-ok, .uc-badge-success, .uc-profile-progress) { background: var(--night-success-bg) !important; color: var(--night-success) !important; border-color: rgb(60, 136, 105) !important; }
  html[data-theme="dark"] :is(.alert-danger, .alert-error, .status-badge.failed, .api-test-state.is-error, .native-auth-message.is-error, .agent-project-status.is-failed) { background: var(--night-danger-bg) !important; color: var(--night-danger) !important; border-color: rgb(164, 88, 103) !important; }
  html[data-theme="dark"] :is(.alert-warning, .status-badge.queued, .status-badge.pending, .docs-callout.warning, .agent-project-status.is-draft) { background: var(--night-warning-bg) !important; color: var(--night-warning) !important; border-color: rgb(143, 113, 59) !important; }
  html[data-theme="dark"] :is(.alert-info, .status-badge.running, .api-test-state.is-running, .feedback-status.is-received) { background: var(--night-info-bg) !important; color: var(--night-info) !important; border-color: rgb(77, 124, 170) !important; }
  html[data-theme="dark"] :is(.btn-danger, .is-danger, .text-danger, .required, .agent-project-expiry-warning, .agent-project-retention.is-urgent) { color: var(--night-danger) !important; }
  html[data-theme="dark"] :is(.btn-danger) { background: var(--night-danger-bg) !important; }
  html[data-theme="dark"] :is(button, input, select, textarea):disabled { color: rgb(160, 173, 191) !important; border-color: var(--night-line) !important; opacity: 0.7 !important; }
  html[data-theme="dark"] :is(.btn-primary, .home-prompt-send, .chat-send-btn, .native-auth-primary, .uc-btn-primary):disabled { background: var(--night-raised) !important; }
  html[data-theme="dark"] body :is(#homeGenerateButton, #homePromptSend, .home-prompt-send):disabled { background: var(--night-raised) !important; color: rgb(160, 173, 191) !important; border-color: var(--night-line) !important; }
  html[data-theme="dark"] body :is(#homeGenerateButton, #homePromptSend, .home-prompt-send):disabled :is(span, svg) { color: rgb(160, 173, 191) !important; }
  html[data-theme="dark"] :is(.designer-project-gate-empty, .designer-project-gate-head span) { color: var(--night-muted) !important; }
  html[data-theme="dark"] .home-gallery-refreshing { background: rgba(16, 18, 22, 0.7) !important; }
  html[data-theme="dark"] .mobile-bottom-nav { background: var(--night-surface) !important; border-color: var(--night-control-line) !important; box-shadow: rgba(0, 0, 0, 0.314) 0px -6px 24px !important; }
}
