/**
 * Search / AI chat UI — input shell, tools, meeting, camera, dark overrides.
 * Extracted from pages/search.html inline styles (S1) then split (S2).
 */

/* ==========================================================================
 * Chat input / AI container / meeting / camera (from search.html inline #1)
 * Migrated 2026-07-21 search S1 — do not reorder relative to overrides below
 * ========================================================================== */
/* ==================== 新设计搜索栏 CSS 整合 ==================== */
.ai-container-wrapper {
    display: flex;
    flex-direction: column;
    row-gap: 20px;
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    font-family: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
    align-items: center;
}
.main-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 28px;
    color: var(--text-color, #ffffff);
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.ai-container {
    display: flex;
    flex-direction: column;
    row-gap: 12px;
    background: rgba(255, 255, 255, 0.95);
    padding: 16px 20px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
/* 黑暗模式：仅作用于聊天容器内（避免切换后样式残留） */
.chat-container.dark-mode .chat-mode-input-wrapper .ai-container {
    background: rgba(55, 62, 74, 0.94);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.32);
}
.chat-container:not(.dark-mode) .chat-mode-input-wrapper .ai-container {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(0, 132, 255, 0.14);
    box-shadow: 0 4px 24px rgba(0, 100, 200, 0.12), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}
/* Input Field */
.ai-input {
    width: 100%;
    padding: 10px 4px;
    border: 0px;
    font-size: 15px;
    outline: none;
    background: transparent;
    color: #333333;
    transition: color 0.3s ease, border-color 0.3s ease;
}
.chat-container.dark-mode .chat-mode-input-wrapper .ai-input {
    color: #f1f5f9;
}
.chat-container.dark-mode .chat-mode-input-wrapper .ai-input::placeholder {
    color: #94a3b8;
}
.chat-container:not(.dark-mode) .chat-mode-input-wrapper .ai-input {
    color: #333333;
}
.chat-container:not(.dark-mode) .chat-mode-input-wrapper .ai-input::placeholder {
    color: #999999;
}
/* Button Group */
.button-group,
.option-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.option-group {
    column-gap: 8px;
    row-gap: 8px;
}
.button-group {
    justify-content: space-between;
    width: 100%;
    row-gap: 8px;
}
/* 首页输入栏：与对话页相同的底部工具行布局 */
.search-section .button-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: nowrap;
}
.search-section .chat-bottom-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: 0;
    flex-wrap: nowrap;
    overflow: visible;
}
.search-section .chat-bottom-toolbar .model-selector-btn {
    min-width: 0;
    margin-right: 0;
    padding: 6px 10px;
    font-size: 12px;
    height: 34px;
    box-sizing: border-box;
    flex-shrink: 0;
}
.search-section .ai-container-wrapper,
.search-section .ai-container {
    overflow: visible;
}
.search-section .chat-bottom-toolbar .model-selector-wrapper {
    position: relative;
}
.search-section .chat-bottom-toolbar .model-selector-dropdown {
    z-index: 100060;
    max-height: min(320px, 45vh);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.search-section .chat-bottom-toolbar .model-selector-dropdown.show.is-toolbar-fixed.opens-up {
    animation: chatToolbarDropUp 0.22s ease-out;
}
.search-section .chat-bottom-toolbar .model-selector-dropdown.show.is-toolbar-fixed.opens-down {
    animation: chatToolbarDropDown 0.22s ease-out;
}
@keyframes chatToolbarDropUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes chatToolbarDropDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.ai-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    column-gap: 6px;
    box-sizing: border-box;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 12px;
    border: 1px solid #3a3a3a;
    background: linear-gradient(180deg, #2a2a2a 0%, #151515 100%);
    color: #f5f5f5;
    font-family: "PingFang SC", "Hiragino Sans GB", "Segoe UI", system-ui, sans-serif;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    text-align: center;
    text-decoration: none;
}
.dark-mode .ai-button {
    background: linear-gradient(180deg, #2a2a2a 0%, #151515 100%);
    color: #f5f5f5;
    border-color: #3a3a3a;
}
.ai-button:hover {
    transform: translateY(-1px);
    border-color: #6b6b6b;
    background: linear-gradient(180deg, #333 0%, #1a1a1a 100%);
}
.dark-mode .ai-button:hover {
    background: linear-gradient(180deg, #333 0%, #1a1a1a 100%);
    color: #fff;
}
.ai-button:focus {
    outline: none;
}
.ai-button:active {
    transform: translateY(0);
}
/* Variants for Suggest */
.search-text {
    display: none;
}
.ai-button.suggest {
    position: relative;
    z-index: 5;
    padding: 0;
    width: 40px;
    height: 40px;
    min-height: 40px;
    border-radius: 12px;
    border: 1px solid #404040;
    background: linear-gradient(180deg, #2a2a2a 0%, #151515 100%);
    box-shadow: none;
    color: #e8e8e8 !important;
    overflow: visible;
    cursor: pointer;
    justify-content: center;
}
.ai-button.suggest:hover {
    border-color: #6b6b6b;
    background: linear-gradient(180deg, #333 0%, #1a1a1a 100%);
    box-shadow: none;
    color: #fff !important;
}
.ai-button.suggest.suggest-open {
    border-color: #d4a574;
    box-shadow: none;
    color: #fff6e8 !important;
}
.ai-button.web-search-toggle {
    justify-content: center;
    border-radius: 50%;
    height: 32px;
    width: 32px;
    padding: 0;
    background: #5c6bc0;
    color: white !important;
    flex-shrink: 0;
}
.ai-button.web-search-toggle:hover {
    background: #4a58a8;
}
.ai-button.web-search-toggle.web-search-active {
    background: #1565c0;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px #0044aa;
}
.suggestion-web-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 3px;
    padding: 10px 14px;
    margin: 0 -6px 6px;
    width: calc(100% + 12px);
    max-width: none;
    box-sizing: border-box;
    border-radius: 12px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}
.suggestion-web-row-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.suggestion-web-status {
    margin: 0;
    padding: 0;
    font-size: 12px;
    line-height: 1.25;
    color: #6b7280;
    text-align: left;
    min-height: 0;
}
.suggestion-web-status[hidden] {
    display: none !important;
}
.suggestion-web-status.is-on { color: #2563eb; }
.suggestion-web-status.is-warn { color: #b45309; }
.suggestion-web-switch.web-search-unavailable,
.suggestion-web-switch:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.suggestion-web-row-label {
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
}
.suggestion-web-switch {
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: #ffffff;
    color: #374151;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.suggestion-web-switch.web-search-active {
    border-color: #d4a574;
    background: #fffaf3;
    color: #8a6238;
}
.dark-mode .suggestion-web-row,
body.app-theme-dark .suggestion-web-row {
    background: rgba(42, 42, 42, 0.9);
    border-color: #3a3a3a;
}
.dark-mode .suggestion-web-row-label,
body.app-theme-dark .suggestion-web-row-label {
    color: #d4d4d4;
}
.dark-mode .suggestion-web-switch,
body.app-theme-dark .suggestion-web-switch {
    border-color: #505050;
    background: linear-gradient(180deg, #2a2a2a 0%, #151515 100%);
    color: #e8e8e8;
    box-shadow: none;
}
.dark-mode .suggestion-web-switch.web-search-active,
body.app-theme-dark .suggestion-web-switch.web-search-active {
    border-color: #d4a574;
    background: linear-gradient(180deg, #333 0%, #1a1a1a 100%);
    color: #fff6e8;
}
[data-voice-toggle].voice-recording,
[data-voice-toggle].voice-processing {
    width: auto !important;
    min-width: 32px;
    height: 32px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    overflow: hidden;
    flex-shrink: 0;
    gap: 0;
    color: #fff !important;
}
[data-voice-toggle].voice-recording {
    background: #e53935 !important;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.35);
    animation: voice-btn-pulse 1.2s ease-in-out infinite;
}
[data-voice-toggle].voice-processing {
    background: #1565c0 !important;
    opacity: 0.95;
    cursor: wait;
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.28);
}
[data-voice-toggle] .voice-btn-label {
    font-size: 11px;
    font-weight: 700;
    margin-left: 2px;
    white-space: nowrap;
    line-height: 1;
    letter-spacing: 0;
}
[data-voice-toggle]:not(.voice-recording):not(.voice-processing) .voice-btn-label {
    display: none;
}
[data-voice-toggle].voice-processing .voice-btn-icon {
    width: 14px !important;
    height: 14px !important;
}
.chat-mode-input-wrapper [data-voice-toggle].voice-recording,
.chat-mode-input-wrapper [data-voice-toggle].voice-processing {
    width: auto !important;
    min-width: 36px;
    height: 36px !important;
    padding: 0 12px !important;
}
@keyframes voice-btn-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.35); }
    50% { transform: scale(1.06); box-shadow: 0 0 0 6px rgba(229, 57, 53, 0.2); }
}
.voice-recording-banner {
    position: fixed;
    left: 50%;
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 999px;
    background: rgba(229, 57, 53, 0.96);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 28px rgba(229, 57, 53, 0.38);
    pointer-events: none;
    max-width: calc(100vw - 32px);
}
.voice-recording-banner[hidden] {
    display: none !important;
}
.voice-recording-banner.is-processing {
    background: rgba(21, 101, 192, 0.96);
    box-shadow: 0 10px 28px rgba(21, 101, 192, 0.32);
}
.voice-recording-dot {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    animation: voice-dot-pulse 1s ease-in-out infinite;
}
.voice-recording-banner.is-processing .voice-recording-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    animation: voice-dot-spin 0.75s linear infinite;
}
@keyframes voice-dot-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.82); }
}
@keyframes voice-dot-spin {
    to { transform: rotate(360deg); }
}
#ai-image-preview-bar,
.ai-image-preview-bar {
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    align-self: flex-start;
    position: relative;
    margin: 4px 0 0;
    padding: 0;
    border: none;
    background: transparent;
    line-height: 0;
}
#ai-image-preview-bar[hidden],
.ai-image-preview-bar[hidden] {
    display: none !important;
}
#ai-image-preview-bar img,
.ai-image-preview-bar img {
    display: block;
    height: 48px;
    width: auto;
    max-width: 120px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(0, 132, 255, 0.28);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.ai-image-preview-clear {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: rgba(30, 30, 30, 0.72);
    color: #fff;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    padding: 0;
}
.ai-image-preview-clear:hover {
    background: rgba(200, 40, 40, 0.9);
}
.ai-camera-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.ai-camera-modal[hidden] {
    display: none !important;
}
.ai-camera-dialog {
    width: min(520px, 100%);
    background: #111;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
#ai-camera-video {
    display: block;
    width: 100%;
    max-height: 70vh;
    object-fit: cover;
    background: #000;
}
.ai-camera-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 14px 16px;
    background: #1a1a1a;
}
.ai-camera-cancel,
.ai-camera-shutter {
    border: none;
    border-radius: 999px;
    padding: 10px 22px;
    font-size: 15px;
    cursor: pointer;
}
.ai-camera-cancel {
    background: #444;
    color: #fff;
}
.ai-camera-shutter {
    background: #0084ff;
    color: #fff;
    font-weight: 600;
}
.suggest-btn-wrapper {
    display: inline-block;
    position: relative;
    z-index: 2;
    padding: 0;
    border-radius: 12px;
    overflow: visible;
}
.suggest-btn-wrapper:before {
    content: none;
    display: none;
    animation: none;
}
/* Variants for Additional Options */
.ai-button.voice,
.ai-button.image,
.ai-button.camera {
    justify-content: center;
    border-radius: 12px;
    height: 40px;
    width: 40px;
    min-height: 40px;
    padding: 0;
    color: #f5f5f5 !important;
    border: 1px solid #404040;
    background: #141414;
    box-shadow: none;
}
.ai-icon {
    flex-shrink: 0;
}
.ai-button.voice:hover,
.ai-button.image:hover,
.ai-button.camera:hover {
    border-color: #6b6b6b;
    background: linear-gradient(180deg, #2a2a2a 0%, #151515 100%);
}

.ai-button.meeting-btn {
    white-space: nowrap;
    flex-shrink: 0;
    border: 1px solid #e8a23a;
    background: linear-gradient(180deg, #2a2a2a 0%, #151515 100%);
    box-shadow: 0 0 0 1px rgba(232, 162, 58, 0.22);
    color: #fff6e8;
}
.ai-button.meeting-btn:hover {
    border-color: #f0b85a;
    background: linear-gradient(180deg, #333 0%, #1a1a1a 100%);
    box-shadow: 0 0 0 1px rgba(232, 162, 58, 0.35);
    color: #fff;
}
.ai-button.meeting-btn .meeting-icon {
    width: 15px;
    height: 15px;
    display: inline-flex;
}
.ai-button.meeting-btn .meeting-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.ai-button.submit {
    border: 1px solid #4a90e2;
    background: linear-gradient(180deg, #2a2a2a 0%, #151515 100%);
    box-shadow: 0 0 0 1px rgba(74, 144, 226, 0.2);
    color: #e8f1fc;
}
.ai-button.submit:hover {
    border-color: #6aa8f0;
    background: linear-gradient(180deg, #333 0%, #1a1a1a 100%);
    box-shadow: 0 0 0 1px rgba(74, 144, 226, 0.35);
    color: #fff;
}

/* 隐藏的 inputs */
#toggle-suggestions,
#voice-input,
#image-input,
#camera-input {
    display: none;
}
/* 推荐面板：默认白天浅色；暗色跟 body.app-theme-dark / .dark-mode */
.suggestion-panel {
    display: flex;
    flex-direction: column;
    row-gap: 8px;
    width: 100%;
    padding: 0 10px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    font-size: 14px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
    box-sizing: border-box;
    color: #374151;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
.dark-mode .suggestion-panel,
body.app-theme-dark .suggestion-panel {
    background: rgba(22, 22, 22, 0.96);
    border-color: #333;
    color: #e8e8e8;
    box-shadow: none;
}
#toggle-suggestions:checked + .suggestion-panel,
#toggle-suggestions-chat:checked + .suggestion-panel {
    max-height: min(420px, 55vh);
    padding: 12px;
    margin-top: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    position: relative;
    z-index: 6;
}
#toggle-suggestions-chat:checked + #suggestion-panel-chat {
    max-height: min(280px, 42vh);
}
.suggestion-panel::-webkit-scrollbar {
    width: 6px;
}
.suggestion-panel::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.55);
    border-radius: 999px;
}
body.app-theme-dark .suggestion-panel::-webkit-scrollbar-thumb,
.dark-mode .suggestion-panel::-webkit-scrollbar-thumb {
    background: rgba(212, 165, 116, 0.35);
}
/* 专家会议功能介绍弹窗 — 必须 viewport 居中，勿被 body flex / ambient 的 relative 带到底部 */
.meeting-intro-overlay,
body.has-ambient-dark > .meeting-intro-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100005;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: auto;
}
body.meeting-intro-open {
    overflow: hidden;
}
.meeting-intro-overlay.show,
body.has-ambient-dark > .meeting-intro-overlay.show {
    display: flex;
}
.meeting-intro-modal {
    background: #fff;
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    padding: 28px 28px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    animation: meetingIntroIn 0.25s ease;
}
.dark-mode .meeting-intro-modal,
body.dark-mode .meeting-intro-modal {
    background: #1e2530;
    color: #e8eaed;
}
@keyframes meetingIntroIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.meeting-intro-modal h2 {
    margin: 0 0 12px;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.meeting-intro-modal p {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.65;
    color: #1a1a1a;
}
.dark-mode .meeting-intro-modal p,
body.dark-mode .meeting-intro-modal p,
html.app-client .meeting-intro-modal p {
    color: #ffffff !important;
}
.meeting-intro-experts {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: grid;
    gap: 8px;
}
.meeting-intro-experts li {
    font-size: 13px;
    padding: 8px 12px;
    background: #f1f5f9;
    border-radius: 10px;
    color: #111111;
    display: flex;
    align-items: center;
    gap: 8px;
}
.meeting-intro-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 0;
}
.meeting-intro-icon .toolbar-glyph,
.meeting-intro-icon .expert-glyph {
    width: 15px;
    height: 15px;
    display: block;
}
#meeting-intro-title .meeting-intro-icon {
    margin-right: 2px;
}
.dark-mode .meeting-intro-experts li,
body.dark-mode .meeting-intro-experts li,
html.app-client .meeting-intro-experts li {
    background: #2a2a2a;
    color: #ffffff !important;
}
html.app-client .meeting-intro-modal {
    background: #1a1a1a !important;
    color: #ffffff !important;
    border: 1px solid #3a3a3a;
}
html.app-client .meeting-intro-modal h2 {
    color: #ffffff !important;
}
.meeting-intro-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}
.meeting-intro-actions button {
    border: none;
    border-radius: 12px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}
.meeting-intro-actions button:active {
    transform: scale(0.97);
}
.meeting-intro-dismiss {
    background: #e2e8f0;
    color: #334155;
}
.dark-mode .meeting-intro-dismiss,
body.dark-mode .meeting-intro-dismiss {
    background: #3d4a5c;
    color: #e2e8f0;
}
.meeting-intro-start {
    background: #e21a1a;
    color: #fff;
}
.meeting-intro-start:hover {
    background: #b81414;
}
.suggestion-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 2px 0 4px;
}
.suggestion-toolbar-label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}
body.app-theme-dark .suggestion-toolbar-label,
.dark-mode .suggestion-toolbar-label {
    color: #a3a3a3;
}
.suggestion-refresh-btn {
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
    background: #ffffff;
    color: #374151;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.suggestion-refresh-btn:hover {
    border-color: #d4a574;
    background: #fffaf3;
    color: #8a6238;
}
body.app-theme-dark .suggestion-refresh-btn,
.dark-mode .suggestion-refresh-btn {
    border-color: #505050;
    background: linear-gradient(180deg, #2a2a2a 0%, #151515 100%);
    color: #e8e8e8;
}
body.app-theme-dark .suggestion-refresh-btn:hover,
.dark-mode .suggestion-refresh-btn:hover {
    border-color: #d4a574;
    color: #fff6e8;
}
.suggestion-list {
    display: flex;
    flex-direction: column;
    row-gap: 8px;
}
.suggestion-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 10px 14px;
    border-radius: 12px;
    text-align: left;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    cursor: pointer;
    color: #374151;
}
.dark-mode .suggestion-item,
body.app-theme-dark .suggestion-item {
    background: linear-gradient(180deg, #2a2a2a 0%, #1a1a1a 100%);
    color: #e8e8e8;
    border-color: #3a3a3a;
}
.suggestion-item:hover {
    background: #fffaf3;
    border-color: #d4a574;
    color: #1f2937;
}
.dark-mode .suggestion-item:hover,
body.app-theme-dark .suggestion-item:hover {
    background: linear-gradient(180deg, #333 0%, #222 100%);
    border-color: #6b6b6b;
    color: #fff;
}

/* 音频波动动画 */
.bar { transform-origin: center; }
@keyframes wave { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.8); } }
@keyframes wave2 { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.4); } }
@keyframes wave3 { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.6); } }
@keyframes wave4 { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.3); } }
.ai-icon:hover .bar-1 { animation: wave 0.6s infinite ease-in-out alternate; }
.ai-icon:hover .bar-2 { animation: wave2 0.6s infinite ease-in-out alternate; }
.ai-icon:hover .bar-3 { animation: wave3 0.6s infinite ease-in-out alternate; }
.ai-icon:hover .bar-4 { animation: wave4 0.6s infinite ease-in-out alternate; }

.meeting-label-short {
    display: none;
}
/* 顶部：仅 HuyTech 角标，无整栏背景 */
.chat-header--minimal {
    position: absolute;
    top: max(10px, env(safe-area-inset-top, 0px));
    left: 16px;
    z-index: 30;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    width: auto;
    pointer-events: none;
}
.chat-header--minimal .chat-brand-badge {
    margin: 0;
    padding: 0;
    font-size: inherit;
    font-weight: inherit;
    cursor: pointer;
    pointer-events: auto;
}
.chat-brand-text {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 132, 255, 0.18);
    box-shadow: 0 2px 10px rgba(0, 80, 160, 0.08);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #1565c0;
    line-height: 1.2;
}
.chat-container.dark-mode .chat-brand-text {
    background: rgba(55, 62, 74, 0.92);
    border-color: rgba(100, 181, 246, 0.28);
    color: #90caf9;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
}
.chat-container.active .chat-messages {
    padding-top: 52px;
}
/* 底部工具行：居中于 Search 与右侧操作按钮之间 */
.chat-mode-input-wrapper .button-group.chat-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    flex-wrap: nowrap;
}
.chat-action-left {
    flex: 0 0 auto;
}
.chat-bottom-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: 0;
    flex-wrap: nowrap;
    overflow: visible;
}
.chat-action-right {
    flex: 0 0 auto;
}
.chat-bottom-toolbar .model-selector-btn {
    min-width: 0;
    margin-right: 0;
    padding: 6px 10px;
    font-size: 12px;
    height: 34px;
    box-sizing: border-box;
    flex-shrink: 0;
}
.chat-bottom-toolbar .model-selector-wrapper {
    position: relative;
}
.chat-bottom-toolbar .model-selector-dropdown {
    z-index: 100060;
    max-height: min(320px, 45vh);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.chat-bottom-toolbar .model-selector-dropdown.show.is-toolbar-fixed.opens-up {
    animation: chatToolbarDropUp 0.22s ease-out;
}
.chat-bottom-toolbar .model-selector-dropdown.show.is-toolbar-fixed.opens-down {
    animation: chatToolbarDropDown 0.22s ease-out;
}
@keyframes chatToolbarDropUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes chatToolbarDropDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.chat-container.dark-mode .chat-bottom-toolbar .model-selector-btn,
html.app-client body.app-search-page .search-section .model-selector-btn,
html.app-client body.app-search-page .chat-container.dark-mode .model-selector-btn {
    background: linear-gradient(180deg, #2a2a2a 0%, #151515 100%);
    border: 1px solid #404040;
    color: #e8e8e8;
    box-shadow: none;
}
html.app-client body.app-search-page .chat-container.dark-mode .model-selector-btn:hover,
html.app-client body.app-search-page .search-section .model-selector-btn:hover {
    background: linear-gradient(180deg, #333 0%, #1a1a1a 100%);
    border-color: #d4a574;
    color: #fff6e8;
}
html.app-client body.app-search-page .chat-container.dark-mode .model-selector-btn.active,
html.app-client body.app-search-page .chat-container.dark-mode .expert-selector-wrapper .model-selector-btn.active {
    background: linear-gradient(180deg, #2a2a2a 0%, #151515 100%);
    border-color: #d4a574;
    color: #e8c49a;
    box-shadow: 0 0 0 1px rgba(212, 165, 116, 0.22);
}
.model-selector-btn .toolbar-glyph {
    width: 15px;
    height: 15px;
    display: block;
    flex-shrink: 0;
}
/* 进入对话状态后的聊天框适配 */
.chat-mode-input-wrapper {
    width: 100%;
    padding: 12px 16px 16px;
    background: transparent;
    box-sizing: border-box;
    overflow: visible;
    position: relative;
    z-index: 20;
    flex-shrink: 0;
}
.chat-mode-input-wrapper .ai-container {
    border-radius: 22px;
    padding: 14px 16px;
    border: 1px solid rgba(0, 132, 255, 0.14);
    box-shadow: 0 4px 24px rgba(0, 100, 200, 0.12), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
    background: rgba(255, 255, 255, 0.98);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    overflow: visible;
}
.chat-mode-input-wrapper .ai-input {
    font-size: 15px;
    padding: 6px 12px 10px;
    text-align: left;
}
.chat-mode-input-wrapper .button-group {
    flex-wrap: nowrap;
    gap: 8px;
}
.chat-mode-input-wrapper .option-group,
.chat-mode-input-wrapper .chat-action-right {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    column-gap: 8px;
}
/* 覆盖 search.css：统一为电能分析同款深色描边键 */
.chat-mode-input-wrapper .send-button {
    width: auto;
    height: 40px;
    min-height: 40px;
    border-radius: 12px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
    flex-shrink: 0;
    gap: 6px;
    line-height: 1;
    overflow: visible;
}
.chat-mode-input-wrapper .send-button::before {
    display: none;
}
.chat-mode-input-wrapper .send-button .send-label {
    white-space: nowrap;
    letter-spacing: 0.02em;
}
.chat-mode-input-wrapper .send-button .toolbar-glyph,
.chat-mode-input-wrapper .send-button .expert-glyph {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    display: block;
}
.chat-mode-input-wrapper .ai-button.submit.send-button {
    /* 发送模式：银色 */
    border: 1px solid #a8aeb8;
    background: linear-gradient(180deg, #f3f4f6 0%, #d1d5db 42%, #9ca3af 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        0 0 0 1px rgba(148, 163, 184, 0.28),
        0 2px 6px rgba(15, 23, 42, 0.18);
    color: #111827;
}
.chat-mode-input-wrapper .ai-button.submit.send-button:hover:not(:disabled) {
    border-color: #cbd5e1;
    background: linear-gradient(180deg, #ffffff 0%, #e5e7eb 42%, #b0b6bf 100%);
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.7),
        0 0 0 1px rgba(148, 163, 184, 0.4),
        0 4px 10px rgba(15, 23, 42, 0.22);
    color: #0f172a;
}
/* 会议模式：开始会议 → 暗红色 */
.chat-mode-input-wrapper .ai-button.submit.send-button.is-meeting-action {
    border: 1px solid #7f1d1d;
    background: linear-gradient(180deg, #9f1239 0%, #7f1d1d 48%, #450a0a 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 0 0 1px rgba(127, 29, 29, 0.45),
        0 2px 8px rgba(69, 10, 10, 0.35);
    color: #fee2e2;
}
.chat-mode-input-wrapper .ai-button.submit.send-button.is-meeting-action:hover:not(:disabled) {
    border-color: #b91c1c;
    background: linear-gradient(180deg, #be123c 0%, #991b1b 48%, #7f1d1d 100%);
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 0 0 1px rgba(185, 28, 28, 0.5),
        0 4px 12px rgba(69, 10, 10, 0.4);
    color: #fff;
}
.chat-mode-input-wrapper .ai-button.meeting-btn {
    width: auto;
    height: 40px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
    flex-shrink: 0;
    gap: 6px;
    line-height: 1;
    border: 1px solid #e8a23a;
    background: linear-gradient(180deg, #2a2a2a 0%, #151515 100%);
    box-shadow: 0 0 0 1px rgba(232, 162, 58, 0.22);
    color: #fff6e8;
}
.chat-mode-input-wrapper .ai-button.meeting-btn:hover:not(:disabled) {
    border-color: #f0b85a;
    background: linear-gradient(180deg, #333 0%, #1a1a1a 100%);
    transform: translateY(-1px);
    box-shadow: 0 0 0 1px rgba(232, 162, 58, 0.35);
    color: #fff;
}
.chat-mode-input-wrapper .ai-button.meeting-btn.meeting-mode-active {
    border-color: #f0b85a;
    box-shadow: 0 0 0 1px rgba(232, 162, 58, 0.45);
}
.chat-mode-input-wrapper .ai-button.voice,
.chat-mode-input-wrapper .ai-button.image,
.chat-mode-input-wrapper .ai-button.camera {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    box-shadow: none;
}
.chat-mode-input-wrapper .suggest-btn-wrapper .ai-button.suggest {
    width: 40px;
    height: 40px;
    padding: 0;
    flex-shrink: 0;
    justify-content: center;
}
.chat-mode-input-wrapper.meeting-pending .ai-container {
    border-color: rgba(226, 26, 26, 0.35);
    box-shadow: 0 4px 24px rgba(226, 26, 26, 0.12), 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}
.chat-mode-input-wrapper.meeting-pending .ai-input::placeholder {
    color: #c0392b;
    opacity: 0.85;
}
.dark-mode .chat-mode-input-wrapper.meeting-pending .ai-input::placeholder,
.chat-container.dark-mode .chat-mode-input-wrapper.meeting-pending .ai-input::placeholder {
    color: #ff8a80;
}
/* 桌面：汉堡/抽屉结构展开为原布局 */
.chat-tools-burger { display: none; }
.chat-primary-row,
.chat-tools-panel,
.chat-primary-end,
.chat-tools-extra {
    display: contents;
}

/* 桌面单行：Search + 工具靠左，模型居中偏左，专家会议/发送靠右 */
@media (min-width: 641px) {
    .chat-action-bar .chat-tools-burger { order: 0; }
    .chat-action-bar .suggest-btn-wrapper { order: 1; }
    .chat-action-bar .dark-mode-toggle { order: 2; }
    .chat-action-bar .clear-button { order: 3; }
    .chat-action-bar .ai-button.voice { order: 4; }
    .chat-action-bar label.ai-button.image,
    .chat-action-bar .ai-button.image { order: 5; }
    .chat-action-bar .ai-button.camera { order: 6; }
    .chat-action-bar .chat-bottom-toolbar { order: 20; }
    .chat-action-bar .meeting-btn { order: 40; margin-left: auto; }
    .chat-action-bar .send-button,
    .chat-action-bar .ai-button.submit.search-btn { order: 50; }
    .chat-action-bar .clear-button .clear-label {
        display: none;
    }
    .chat-action-bar .clear-button {
        width: 40px;
        min-width: 40px;
        height: 40px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* 手机：加大输入框；主栏只留 Search / 会议 / 发送；其余进汉堡 */
@media (max-width: 640px) {
    .chat-mode-input-wrapper {
        padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    }
    .chat-mode-input-wrapper .ai-container,
    .search-section .ai-container {
        padding: 14px 14px 16px;
        row-gap: 12px;
        border-radius: 20px;
    }
    .chat-mode-input-wrapper .ai-input,
    .search-section .ai-input {
        font-size: 16px;
        padding: 12px 6px 10px;
        min-height: 52px;
        line-height: 1.45;
    }
    .chat-mode-input-wrapper .button-group.chat-action-bar,
    .search-section .button-group.chat-action-bar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
    }
    .chat-tools-burger {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4px;
        width: 42px;
        height: 42px;
        flex-shrink: 0;
        border: 1px solid rgba(15, 23, 42, 0.12);
        border-radius: 12px;
        background: rgba(15, 23, 42, 0.04);
        cursor: pointer;
        padding: 0;
    }
    .chat-container.dark-mode .chat-tools-burger,
    .search-section .chat-tools-burger {
        border-color: rgba(255, 255, 255, 0.16);
        background: rgba(255, 255, 255, 0.06);
    }
    .chat-tools-burger span {
        display: block;
        width: 16px;
        height: 2px;
        border-radius: 2px;
        background: #334155;
    }
    .chat-container.dark-mode .chat-tools-burger span,
    .search-section .chat-tools-burger span {
        background: #e5e7eb;
    }
    .chat-action-bar.is-tools-open .chat-tools-burger {
        background: rgba(0, 132, 255, 0.12);
        border-color: rgba(0, 132, 255, 0.35);
    }
    .chat-primary-row {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
    }
    .chat-primary-end {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-left: auto;
        flex-shrink: 0;
    }
    .chat-tools-panel {
        display: none;
        width: 100%;
        margin-top: 10px;
        padding-top: 12px;
        border-top: 1px solid rgba(15, 23, 42, 0.08);
        flex-direction: column;
        gap: 10px;
    }
    .chat-container.dark-mode .chat-tools-panel,
    .search-section .chat-tools-panel {
        border-top-color: rgba(255, 255, 255, 0.12);
    }
    .chat-action-bar.is-tools-open .chat-tools-panel {
        display: flex;
    }
    .chat-tools-extra {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }
    .chat-mode-input-wrapper .chat-bottom-toolbar,
    .search-section .chat-bottom-toolbar {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
        margin: 0;
        padding: 0;
        border: none;
    }
    .chat-mode-input-wrapper .chat-bottom-toolbar .model-selector-btn,
    .search-section .chat-bottom-toolbar .model-selector-btn {
        height: 40px;
        padding: 6px 12px;
        font-size: 13px;
    }
    .chat-mode-input-wrapper .suggest-btn-wrapper .ai-button.suggest .search-text,
    .search-section .suggest-btn-wrapper .ai-button.suggest .search-text {
        display: none;
    }
    .chat-mode-input-wrapper .suggest-btn-wrapper .ai-button.suggest,
    .search-section .suggest-btn-wrapper .ai-button.suggest {
        width: 42px;
        height: 42px;
    }
    .search-section .ai-button.meeting-btn .meeting-label-full {
        display: none;
    }
    .search-section .ai-button.meeting-btn .meeting-label-short {
        display: inline;
    }
    .chat-mode-input-wrapper .ai-button.voice,
    .chat-mode-input-wrapper .ai-button.image,
    .chat-mode-input-wrapper .ai-button.camera,
    .search-section .ai-button.voice,
    .search-section .ai-button.image,
    .search-section .ai-button.camera,
    .chat-mode-input-wrapper .dark-mode-toggle,
    .chat-mode-input-wrapper .clear-button {
        width: 40px;
        height: 40px;
        min-width: 40px;
        padding: 0;
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
    }
    .chat-mode-input-wrapper .clear-button .clear-label {
        display: none;
    }
    .chat-mode-input-wrapper .ai-button.meeting-btn,
    .search-section .ai-button.meeting-btn {
        height: 42px;
        min-height: 42px;
        padding: 0 14px;
    }
    .chat-mode-input-wrapper .ai-button.meeting-btn .meeting-label-full {
        display: none;
    }
    .chat-mode-input-wrapper .ai-button.meeting-btn .meeting-label-short {
        display: inline;
    }
    .chat-mode-input-wrapper .send-button,
    .search-section .send-button,
    .search-section .ai-button.submit {
        height: 42px;
        min-height: 42px;
        padding: 0 14px;
    }
    .search-section .ai-button.meeting-btn span:not([role="img"]) {
        font-size: 13px;
    }
}
@media (min-width: 641px) {
    .chat-mode-input-wrapper .ai-button.meeting-btn .meeting-label-short,
    .search-section .ai-button.meeting-btn .meeting-label-short {
        display: none;
    }
}

/* ==========================================================================
 * Dark / expert send-button overrides (from search.html inline #2)
 * ========================================================================== */
/* 覆盖 search.css 专家主题/暗色发送键；会议暗红 / 发送银色优先 */
.chat-container.dark-mode .send-button:not(.is-meeting-action),
.chat-input-container.expert-theme-distribution .send-button:not(.meeting-inline-btn):not(.is-meeting-action),
.chat-input-container.expert-theme-power_quality .send-button:not(.meeting-inline-btn):not(.is-meeting-action),
.chat-input-container.expert-theme-protection .send-button:not(.meeting-inline-btn):not(.is-meeting-action),
.chat-input-container.expert-theme-scada .send-button:not(.meeting-inline-btn):not(.is-meeting-action),
.chat-input-container.expert-theme-standards .send-button:not(.meeting-inline-btn):not(.is-meeting-action),
.chat-container.dark-mode .chat-input-container.expert-theme-distribution .send-button:not(.meeting-inline-btn):not(.is-meeting-action),
.chat-container.dark-mode .chat-input-container.expert-theme-power_quality .send-button:not(.meeting-inline-btn):not(.is-meeting-action),
.chat-container.dark-mode .chat-input-container.expert-theme-protection .send-button:not(.meeting-inline-btn):not(.is-meeting-action),
.chat-container.dark-mode .chat-input-container.expert-theme-scada .send-button:not(.meeting-inline-btn):not(.is-meeting-action),
.chat-container.dark-mode .chat-input-container.expert-theme-standards .send-button:not(.meeting-inline-btn):not(.is-meeting-action) {
    border: 1px solid #a8aeb8;
    background: linear-gradient(180deg, #f3f4f6 0%, #d1d5db 42%, #9ca3af 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        0 0 0 1px rgba(148, 163, 184, 0.28),
        0 2px 6px rgba(15, 23, 42, 0.18);
    color: #111827;
}
.chat-mode-input-wrapper .ai-button.submit.send-button.is-meeting-action,
.chat-container.dark-mode .send-button.is-meeting-action,
.chat-input-container .send-button.is-meeting-action {
    border: 1px solid #7f1d1d !important;
    background: linear-gradient(180deg, #9f1239 0%, #7f1d1d 48%, #450a0a 100%) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 0 0 1px rgba(127, 29, 29, 0.45),
        0 2px 8px rgba(69, 10, 10, 0.35) !important;
    color: #fee2e2 !important;
}
.chat-container.dark-mode .meeting-inline-btn,
.chat-mode-input-wrapper .ai-button.meeting-btn.meeting-inline-btn {
    border: 1px solid #e8a23a;
    background: linear-gradient(180deg, #2a2a2a 0%, #151515 100%);
    box-shadow: 0 0 0 1px rgba(232, 162, 58, 0.22);
    color: #fff6e8;
}
.chat-input-container.expert-theme-distribution .send-button:not(.meeting-inline-btn):not(.is-meeting-action) { border-color: #a8aeb8; }
.chat-input-container.expert-theme-power_quality .send-button:not(.meeting-inline-btn):not(.is-meeting-action) { border-color: #a8aeb8; }
.chat-input-container.expert-theme-protection .send-button:not(.meeting-inline-btn):not(.is-meeting-action) { border-color: #a8aeb8; }
.chat-input-container.expert-theme-scada .send-button:not(.meeting-inline-btn):not(.is-meeting-action) { border-color: #a8aeb8; }
.chat-input-container.expert-theme-standards .send-button:not(.meeting-inline-btn):not(.is-meeting-action) { border-color: #a8aeb8; }

/* 黑夜 / 首屏：石墨按钮 */
html.app-client body.app-search-page .search-section .model-selector-btn,
html.app-client body.app-search-page .chat-container.dark-mode .model-selector-btn,
html.app-client body.app-search-page .chat-container.dark-mode .dark-mode-toggle,
html.app-client body.app-search-page .chat-container.dark-mode .clear-button,
html.app-client body.app-search-page .chat-container.dark-mode .ai-button {
    background: linear-gradient(180deg, #2a2a2a 0%, #151515 100%) !important;
    border: 1px solid #404040 !important;
    color: #e8e8e8 !important;
    box-shadow: none !important;
}
html.app-client body.app-search-page .chat-container.dark-mode .model-selector-btn:hover,
html.app-client body.app-search-page .chat-container.dark-mode .dark-mode-toggle:hover,
html.app-client body.app-search-page .chat-container.dark-mode .clear-button:hover,
html.app-client body.app-search-page .chat-container.dark-mode .ai-button:hover {
    background: linear-gradient(180deg, #333 0%, #1a1a1a 100%) !important;
    border-color: #d4a574 !important;
    color: #fff6e8 !important;
}
html.app-client body.app-search-page .chat-container.dark-mode .model-selector-dropdown {
    background: rgba(18, 18, 18, 0.98) !important;
    border-color: #2e2e2e !important;
    color: #e8e8e8 !important;
}

/* 白天模式：底部按键浅色 */
html.app-client body.app-search-page .chat-container:not(.dark-mode) .model-selector-btn,
html.app-client body.app-search-page .chat-container:not(.dark-mode) .dark-mode-toggle,
html.app-client body.app-search-page .chat-container:not(.dark-mode) .clear-button,
html.app-client body.app-search-page .chat-container:not(.dark-mode) .ai-button {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    color: #374151 !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
    border-radius: 12px !important;
}
html.app-client body.app-search-page .chat-container:not(.dark-mode) .model-selector-btn:hover,
html.app-client body.app-search-page .chat-container:not(.dark-mode) .dark-mode-toggle:hover,
html.app-client body.app-search-page .chat-container:not(.dark-mode) .clear-button:hover,
html.app-client body.app-search-page .chat-container:not(.dark-mode) .ai-button:hover {
    background: #f9fafb !important;
    border-color: #d4a574 !important;
    color: #1f2937 !important;
    transform: none;
}
html.app-client body.app-search-page .chat-container:not(.dark-mode) .model-selector-btn.active {
    border-color: #d4a574 !important;
    color: #8a6238 !important;
    background: #fffaf3 !important;
}
html.app-client body.app-search-page .chat-container:not(.dark-mode) .model-selector-dropdown {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
    color: #374151 !important;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12) !important;
}
html.app-client body.app-search-page .chat-container:not(.dark-mode) .model-option {
    color: #4b5563 !important;
}
html.app-client body.app-search-page .chat-container:not(.dark-mode) .model-option:hover,
html.app-client body.app-search-page .chat-container:not(.dark-mode) .model-option.active {
    background: rgba(212, 165, 116, 0.14) !important;
    color: #8a6238 !important;
}
html.app-client body.app-search-page .dark-mode-toggle {
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0 !important;
    border-radius: 12px !important;
}
html.app-client body.app-search-page .dark-mode-toggle::before,
html.app-client body.app-search-page .clear-button::before {
    display: none !important;
}
html.app-client body.app-search-page .dark-mode-toggle .toolbar-glyph,
html.app-client body.app-search-page .clear-button .toolbar-glyph,
html.app-client body.app-search-page .model-selector-btn .toolbar-glyph {
    width: 16px;
    height: 16px;
    display: block;
    color: currentColor;
}
html.app-client body.app-search-page .clear-button {
    gap: 6px;
    font-weight: 650;
    font-size: 13px;
}
html.app-client body.app-search-page .clear-btn-icon {
    display: inline-flex;
    line-height: 0;
}

/* 用户消息内附图缩略图 */
.user-msg-thumb {
    display: block;
    max-width: 220px;
    max-height: 160px;
    border-radius: 10px;
    margin-bottom: 8px;
    object-fit: cover;
}

/* ========== 首屏助手：石墨金 · 拉开主次层级 ========== */
html.app-client body.app-search-page:not(:has(.chat-container.active)) .container {
    justify-content: center;
    min-height: 100dvh;
    padding: 88px 24px 56px;
}
html.app-client body.app-search-page .search-section {
    margin-bottom: 0;
}
html.app-client body.app-search-page .ai-container-wrapper {
    max-width: 720px;
    row-gap: 22px;
}
html.app-client body.app-search-page .ai-container-wrapper.is-hero-intro .chat-hero-sub,
html.app-client body.app-search-page .ai-container-wrapper.is-hero-intro .ai-container,
html.app-client body.app-search-page .ai-container-wrapper.is-hero-intro .chat-prompt-chips {
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
}
html.app-client body.app-search-page .ai-container-wrapper.is-hero-ready .chat-hero-sub,
html.app-client body.app-search-page .ai-container-wrapper.is-hero-ready .ai-container,
html.app-client body.app-search-page .ai-container-wrapper.is-hero-ready .chat-prompt-chips {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
html.app-client body.app-search-page .ai-container-wrapper.is-hero-ready .chat-hero-sub {
    transition: opacity 0.45s ease, transform 0.45s ease;
}
html.app-client body.app-search-page .ai-container-wrapper.is-hero-ready .ai-container {
    transition: opacity 0.5s ease 0.08s, transform 0.5s ease 0.08s, box-shadow 0.2s ease, border-color 0.2s ease;
}
html.app-client body.app-search-page .ai-container-wrapper.is-hero-ready .chat-prompt-chips {
    transition: opacity 0.55s ease 0.18s, transform 0.55s ease 0.18s;
}
html.app-client body.app-search-page .chat-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
}
html.app-client body.app-search-page .chat-hero-title-row {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 100%;
}
html.app-client body.app-search-page .chat-hero-mark {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #f3eee6;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}
html.app-client body.app-search-page .chat-hero-mark.is-spinning {
    animation: chatHeroSpin 0.8s linear infinite;
}
@keyframes chatHeroSpin {
    to { transform: rotate(360deg); }
}
html.app-client body.app-search-page .chat-hero-kicker {
    margin: 0 0 10px;
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #d4a574;
}
html.app-client body.app-search-page .chat-hero .main-heading {
    font-size: clamp(26px, 4.2vw, 42px);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.2;
    color: #f6f3ee !important;
    text-shadow: none !important;
    max-width: none;
    text-align: left;
}
html.app-client body.app-search-page .chat-hero .main-heading.is-typing::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 0.82em;
    margin-left: 3px;
    background: currentColor;
    vertical-align: -0.06em;
    animation: chatHeroCaret 0.9s step-end infinite;
}
@keyframes chatHeroCaret {
    50% { opacity: 0; }
}
html.app-client body.app-search-page .chat-hero-sub {
    margin: 12px 0 0;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: rgba(246, 243, 238, 0.46);
}
html.app-client body.app-search-page .search-section .ai-container {
    background: rgba(16, 16, 16, 0.78) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 28px !important;
    padding: 18px 20px 14px !important;
    box-shadow:
        0 28px 80px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
html.app-client body.app-search-page .search-section .ai-container:focus-within {
    border-color: rgba(212, 165, 116, 0.42) !important;
    box-shadow:
        0 28px 80px rgba(0, 0, 0, 0.46),
        0 0 0 1px rgba(212, 165, 116, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
}
html.app-client body.app-search-page .search-section .ai-input {
    font-size: 16px !important;
    padding: 8px 6px 14px !important;
    color: #f4f1ea !important;
}
html.app-client body.app-search-page .search-section .ai-input::placeholder {
    color: rgba(228, 220, 208, 0.42) !important;
}

html.app-client body.app-search-page .search-section .ai-button.suggest,
html.app-client body.app-search-page .search-section .ai-button.voice,
html.app-client body.app-search-page .search-section .ai-button.camera,
html.app-client body.app-search-page .search-section label.ai-button.image {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    color: rgba(244, 241, 234, 0.52) !important;
}
html.app-client body.app-search-page .search-section .ai-button.suggest:hover,
html.app-client body.app-search-page .search-section .ai-button.voice:hover,
html.app-client body.app-search-page .search-section .ai-button.camera:hover,
html.app-client body.app-search-page .search-section label.ai-button.image:hover,
html.app-client body.app-search-page .search-section .ai-button.suggest.suggest-open {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(212, 165, 116, 0.28) !important;
    color: #fff6e8 !important;
    transform: none;
}

html.app-client body.app-search-page .search-section .model-selector-btn {
    height: 36px !important;
    padding: 0 12px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.045) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: rgba(244, 241, 234, 0.78) !important;
    font-weight: 500 !important;
    box-shadow: none !important;
}
html.app-client body.app-search-page .search-section .model-selector-btn:hover,
html.app-client body.app-search-page .search-section .model-selector-btn.active {
    background: rgba(212, 165, 116, 0.1) !important;
    border-color: rgba(212, 165, 116, 0.38) !important;
    color: #fff6e8 !important;
}

html.app-client body.app-search-page .search-section .ai-button.meeting-btn {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 14px !important;
    border-radius: 999px !important;
    background: transparent !important;
    border: 1px solid rgba(212, 165, 116, 0.38) !important;
    color: #e8c9a0 !important;
    box-shadow: none !important;
    font-weight: 600 !important;
}
html.app-client body.app-search-page .search-section .ai-button.meeting-btn:hover {
    background: rgba(212, 165, 116, 0.12) !important;
    border-color: #d4a574 !important;
    color: #fff6e8 !important;
    transform: none;
}

html.app-client body.app-search-page .search-section .ai-button.submit.search-btn {
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 16px !important;
    border-radius: 999px !important;
    background: linear-gradient(180deg, #e8c9a0 0%, #c4925a 100%) !important;
    border: 1px solid #b07d45 !important;
    color: #1a120c !important;
    box-shadow: 0 4px 16px rgba(196, 146, 90, 0.28) !important;
    font-weight: 700 !important;
}
html.app-client body.app-search-page .search-section .ai-button.submit.search-btn:hover {
    background: linear-gradient(180deg, #f0d4ae 0%, #d4a574 100%) !important;
    color: #1a120c !important;
    transform: none;
}

.chat-prompt-chips {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    max-width: 720px;
}
.chat-prompt-chip {
    appearance: none;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.045);
    color: rgba(244, 241, 234, 0.88);
    border-radius: 18px;
    padding: 12px 14px;
    font-size: 13px;
    font-family: inherit;
    line-height: 1.4;
    cursor: pointer;
    min-height: 72px;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.chat-prompt-chip-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(212, 165, 116, 0.16);
    color: #e8c9a0;
}
.chat-prompt-chip-icon svg {
    width: 15px;
    height: 15px;
    display: block;
}
.chat-prompt-chip-icon.is-ups { background: rgba(212, 165, 116, 0.2); color: #e8c9a0; }
.chat-prompt-chip-icon.is-pdu { background: rgba(56, 189, 168, 0.16); color: #7ee0d0; }
.chat-prompt-chip-icon.is-scada { background: rgba(248, 113, 113, 0.16); color: #fca5a5; }
.chat-prompt-chip-icon.is-grid { background: rgba(125, 211, 252, 0.14); color: #7dd3fc; }
.chat-prompt-chip-icon.is-pq { background: rgba(192, 132, 252, 0.16); color: #d8b4fe; }
.chat-prompt-chip-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.chat-prompt-chip:hover {
    border-color: rgba(212, 165, 116, 0.45);
    background: rgba(212, 165, 116, 0.1);
    color: #fff6e8;
}

@media (prefers-reduced-motion: reduce) {
    html.app-client body.app-search-page .chat-hero-mark.is-spinning {
        animation: none;
    }
    html.app-client body.app-search-page .chat-hero .main-heading.is-typing::after {
        animation: none;
    }
    html.app-client body.app-search-page .ai-container-wrapper.is-hero-intro .chat-hero-sub,
    html.app-client body.app-search-page .ai-container-wrapper.is-hero-intro .ai-container,
    html.app-client body.app-search-page .ai-container-wrapper.is-hero-intro .chat-prompt-chips {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }
}

@media (max-width: 640px) {
    html.app-client body.app-search-page .chat-hero .main-heading {
        font-size: 26px;
    }
    html.app-client body.app-search-page .chat-hero-mark {
        width: 38px;
        height: 38px;
    }
    html.app-client body.app-search-page .search-section .ai-container {
        border-radius: 22px !important;
        padding: 14px 14px 12px !important;
    }
    .chat-prompt-chips {
        grid-template-columns: 1fr;
    }
}
