    /* ═══════════════════════════════════════════════════════════════
       主题系统：暗色模式（默认）
       ═══════════════════════════════════════════════════════════════ */
    :root,
    [data-theme="dark"] {
      --bg-dark: #050508;
      --bg-main: #0a0a0f;
      --bg-side: #101018;
      --bg-hover: #15151f;
      --accent: #CCFF00;
      --accent-cyan: #CCFF00;
      --accent-soft: rgba(204, 255, 0, 0.12);
      --accent-focus: rgba(204, 255, 0, 0.35);
      --accent-glow: rgba(204, 255, 0, 0.25);
      --text: #f0f0f5;
      --text-muted: #888898;
      --text-inverse: #000000;
      --border: rgba(255, 255, 255, 0.06);
      --border-input: rgba(255, 255, 255, 0.1);
      --gold: #CCFF00;
      --brand-primary: #CCFF00;
      --brand-dim: #a8d900;
      --msg-user-bg: rgba(204, 255, 0, 0.15);
      --msg-user-border: rgba(204, 255, 0, 0.25);
      --navbar-bg: rgba(10, 10, 10, 0.7);
      --card-bg: rgba(255, 255, 255, 0.06);
    }

    /* ═══════════════════════════════════════════════════════════════
       主题系统：亮色模式
       ═══════════════════════════════════════════════════════════════ */
    [data-theme="light"] {
      --bg-dark: #f5f5f7;
      --bg-main: #ffffff;
      --bg-side: #fafafa;
      --bg-hover: #f0f0f2;
      --accent: #9acd00;
      --accent-cyan: #9acd00;
      --accent-soft: rgba(154, 205, 0, 0.15);
      --accent-focus: rgba(154, 205, 0, 0.35);
      --accent-glow: rgba(154, 205, 0, 0.3);
      --text: #1a1a1a;
      --text-muted: #666666;
      --text-inverse: #ffffff;
      --border: rgba(0, 0, 0, 0.08);
      --border-input: rgba(0, 0, 0, 0.12);
      --gold: #9acd00;
      --brand-primary: #9acd00;
      --brand-dim: #7ab300;
      --msg-user-bg: rgba(154, 205, 0, 0.12);
      --msg-user-border: rgba(154, 205, 0, 0.3);
      --navbar-bg: rgba(255, 255, 255, 0.85);
      --card-bg: rgba(0, 0, 0, 0.03);
    }

    /* 亮色模式下的特殊样式覆盖 */
    [data-theme="light"] body {
      background: linear-gradient(rgba(250, 250, 252, 0.92), rgba(245, 245, 247, 0.95)), url('https://cdn.wutuobangai.com/assets/bg/bg-agent.webp') no-repeat center center fixed;
      background-size: cover;
    }

    [data-theme="light"] .navbar {
      background: var(--navbar-bg);
      border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    [data-theme="light"] .history-sidebar,
    [data-theme="light"] .memory-pane {
      background: var(--bg-side);
      border-color: var(--border);
    }

    [data-theme="light"] .chat-pane {
      background: var(--bg-main);
    }

    [data-theme="light"] .msg.assistant {
      background: var(--card-bg);
      border-color: var(--border);
    }

    [data-theme="light"] .nav-links > a,
    [data-theme="light"] .nav-dropdown-toggle {
      color: #555;
    }

    [data-theme="light"] .nav-links > a:hover,
    [data-theme="light"] .nav-dropdown:hover .nav-dropdown-toggle,
    [data-theme="light"] .nav-dropdown:focus-within .nav-dropdown-toggle {
      color: #1a1a1a;
    }

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

    html,
    body {
      height: 100%;
    }

    body {
      color: var(--text);
      font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
      background: linear-gradient(rgba(18, 18, 18, 0.75), rgba(18, 18, 18, 0.85)), url('https://cdn.wutuobangai.com/assets/bg/bg-agent.webp') no-repeat center center fixed;
      background-size: cover;
      overflow: hidden;
      line-height: 1.6;
      letter-spacing: 0.02em;
    }

    a {
      color: inherit;
      text-decoration: none;
    }

    /* ========== 全站统一导航栏 ========== */
    .navbar {
      position: fixed;
      top: 0;
      width: 100%;
      height: 72px;
      background: rgba(10, 10, 10, 0.7);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      z-index: 1000;
    }

    .navbar-inner {
      height: 100%;
      max-width: 1600px;
      margin: 0 auto;
      padding: 0 24px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 24px;
    }

    .nav-left,
    .nav-right {
      display: flex;
      align-items: center;
      gap: 12px;
      flex: 0 0 auto;
    }

    .nav-center {
      flex: 1 1 auto;
      display: flex;
      align-items: center;
      justify-content: center;
      min-width: 0;
    }

    .nav-logo {
      display: flex;
      align-items: center;
      gap: 12px;
      font-size: 20px;
      font-weight: 700;
      color: #fff;
      transition: 0.3s;
    }

    .nav-logo:hover {
      color: var(--accent-cyan);
    }

    .nav-logo img {
      height: 38px;
      width: auto;
      mix-blend-mode: screen;
      filter: drop-shadow(0 0 10px var(--accent-cyan));
    }

    .nav-links {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 8px;
      font-size: 14px;
      font-weight: 500;
      flex-wrap: wrap;
      max-width: 1100px;
    }

    .nav-links > a,
    .nav-dropdown-toggle {
      padding: 10px 16px;
      color: #ccc;
      border-radius: 6px;
      transition: all 0.25s ease;
    }

    .nav-links > a:hover,
    .nav-dropdown:hover .nav-dropdown-toggle,
    .nav-dropdown:focus-within .nav-dropdown-toggle {
      color: #fff;
      background: rgba(204, 255, 0, 0.08);
    }

    .nav-links > a.active,
    .nav-dropdown.is-active .nav-dropdown-toggle {
      color: var(--gold);
      background: rgba(204, 255, 0, 0.1);
    }

    /* 会员订阅 VIP 金色样式 */
    .nav-links > a.nav-link-vip {
      color: #CCFF00;
      background: rgba(255, 215, 0, 0.15);
      font-weight: 700;
      text-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
    }

    .nav-links > a.nav-link-vip:hover {
      color: #D4FF00;
      background: rgba(255, 215, 0, 0.25);
      text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    }

    .nav-dropdown {
      position: relative;
      display: flex;
      align-items: center;
    }

    .nav-dropdown::after {
      content: '';
      position: absolute;
      left: 0;
      right: 0;
      top: 100%;
      height: 16px;
    }

    .nav-dropdown-toggle {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      white-space: nowrap;
    }

    .nav-dropdown-toggle::after {
      content: '▾';
      font-size: 10px;
      opacity: 0.75;
      transition: transform 0.22s ease;
    }

    .nav-dropdown:hover .nav-dropdown-toggle::after,
    .nav-dropdown:focus-within .nav-dropdown-toggle::after {
      transform: rotate(180deg);
    }

    .nav-dropdown-panel {
      position: absolute;
      top: calc(100% + 12px);
      left: 50%;
      width: min(720px, 76vw);
      min-width: 620px;
      padding: 14px;
      border-radius: 20px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: linear-gradient(180deg, rgba(12, 14, 20, 0.98) 0%, rgba(8, 10, 15, 0.98) 100%);
      box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
      backdrop-filter: blur(24px);
      -webkit-backdrop-filter: blur(24px);
      transform: translateX(-50%) translateY(10px);
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: all 0.24s ease;
      z-index: 1200;
    }

    .nav-dropdown:hover .nav-dropdown-panel,
    .nav-dropdown:focus-within .nav-dropdown-panel {
      transform: translateX(-50%) translateY(0);
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }

    .nav-dropdown-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
    }

    .nav-dropdown-item {
      display: block;
      padding: 12px 14px;
      border-radius: 14px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(255, 255, 255, 0.03);
      transition: all 0.22s ease;
    }

    .nav-dropdown-item:hover {
      border-color: rgba(204, 255, 0, 0.28);
      background: rgba(204, 255, 0, 0.08);
      transform: translateY(-2px);
    }

    .nav-dropdown-item strong {
      display: block;
      margin-bottom: 4px;
      font-size: 13px;
      color: #fff;
    }

    .nav-dropdown-item span {
      display: block;
      font-size: 12px;
      line-height: 1.55;
      color: rgba(255, 255, 255, 0.55);
    }

    .nav-dropdown-item.is-featured {
      grid-column: 1 / -1;
      background: linear-gradient(135deg, rgba(204, 255, 0, 0.14), rgba(255, 255, 255, 0.03));
      border-color: rgba(204, 255, 0, 0.24);
    }

    .nav-dropdown-item.is-featured strong {
      color: #CCFF00;
    }

    [data-theme="light"] .nav-dropdown-panel {
      background: rgba(255, 255, 255, 0.96);
      border-color: rgba(0, 0, 0, 0.08);
      box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
    }

    [data-theme="light"] .nav-dropdown-item {
      background: rgba(0, 0, 0, 0.03);
      border-color: rgba(0, 0, 0, 0.08);
    }

    [data-theme="light"] .nav-dropdown-item strong {
      color: #1a1a1a;
    }

    [data-theme="light"] .nav-dropdown-item span {
      color: #666;
    }

    .nav-btn {
      padding: 10px 20px;
      font-size: 14px;
      font-weight: 600;
      border-radius: 8px;
      cursor: pointer;
      border: 1px solid rgba(255, 255, 255, 0.15);
      background: rgba(255, 255, 255, 0.06);
      color: #fff;
      transition: all 0.25s ease;
    }

    .nav-btn:hover {
      border-color: rgba(204, 255, 0, 0.5);
      background: rgba(204, 255, 0, 0.12);
      color: var(--accent-cyan);
    }

    .modal-box .btn {
      padding: 10px 20px;
      font-size: 14px;
      font-weight: 600;
      border-radius: 8px;
      cursor: pointer;
      border: 1px solid rgba(255, 255, 255, 0.15);
      background: rgba(255, 255, 255, 0.06);
      color: #fff;
    }

    .modal-box .btn:hover {
      border-color: rgba(204, 255, 0, 0.5);
      background: rgba(204, 255, 0, 0.12);
      color: var(--accent-cyan);
    }

    .btn-contact {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 10px 20px;
      font-size: 14px;
      font-weight: 700;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      color: #fff !important;
      background: linear-gradient(135deg, #CCFF00 0%, #a8d900 100%);
      box-shadow: 0 0 20px rgba(204, 255, 0, 0.5);
      transition: all 0.3s ease;
    }

    .btn-contact:hover {
      transform: scale(1.05);
      filter: brightness(1.15);
      color: #fff !important;
    }

    .btn-contact svg {
      width: 18px;
      height: 18px;
    }

    .nav-mobile-actions {
      display: none;
      align-items: center;
      gap: 12px;
    }

    .btn-contact-icon {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 42px;
      height: 42px;
      border: none;
      border-radius: 10px;
      cursor: pointer;
      background: linear-gradient(135deg, #CCFF00 0%, #a8d900 100%);
      color: #fff;
      box-shadow: 0 0 16px rgba(204, 255, 0, 0.5);
    }

    .btn-contact-icon svg {
      width: 20px;
      height: 20px;
    }

    .nav-hamburger {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      height: 36px;
      padding: 0 12px;
      border: 1px solid rgba(204, 255, 0, 0.2);
      border-radius: 20px;
      background: rgba(204, 255, 0, 0.08);
      color: #CCFF00;
      font-size: 13px;
      font-weight: 700;
      gap: 4px;
      letter-spacing: 0.5px;
      cursor: pointer;
      transition: all 0.25s ease;
    }

    .nav-hamburger:hover {
      background: rgba(204, 255, 0, 0.12);
      border-color: rgba(204, 255, 0, 0.4);
    }

    .mobile-menu-overlay {
      position: fixed;
      inset: 0;
      z-index: 9999;
      visibility: hidden;
      opacity: 0;
      transition: opacity 0.35s ease, visibility 0.35s ease;
    }

    .mobile-menu-overlay.open {
      visibility: visible;
      opacity: 1;
    }

    .mobile-menu-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.6);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
    }

    .mobile-menu-panel {
      position: absolute;
      top: 0;
      right: 0;
      width: min(320px, 85vw);
      max-width: 320px;
      height: 100%;
      background: rgba(10, 10, 10, 0.85);
      backdrop-filter: blur(24px);
      -webkit-backdrop-filter: blur(24px);
      border-left: 1px solid rgba(255, 255, 255, 0.1);
      box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
      padding: 80px 24px 32px;
      overflow-y: auto;
      transform: translateX(100%);
      transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-menu-overlay.open .mobile-menu-panel {
      transform: translateX(0);
    }

    .mobile-menu-panel a {
      display: block;
      padding: 14px 16px;
      color: #ccc;
      font-size: 16px;
      font-weight: 500;
      border-radius: 10px;
      margin-bottom: 4px;
      transition: all 0.25s ease;
    }

    .mobile-menu-panel a:hover {
      color: #fff;
      background: rgba(204, 255, 0, 0.1);
    }

    .mobile-menu-panel a.nav-link-vip {
      color: #CCFF00;
      background: rgba(255, 215, 0, 0.15);
      font-weight: 700;
    }

    .mobile-menu-panel a.nav-link-vip:hover {
      color: #D4FF00;
      background: rgba(255, 215, 0, 0.25);
    }

    .mobile-menu-group {
      margin: 8px 0 10px;
      padding: 12px;
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 16px;
      background: rgba(255, 255, 255, 0.03);
    }

    .mobile-menu-group-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 10px;
      padding: 0 4px;
    }

    .mobile-menu-group-title strong {
      font-size: 15px;
      color: #fff;
    }

    .mobile-menu-group-title span {
      font-size: 12px;
      color: rgba(255, 255, 255, 0.5);
    }

    .mobile-menu-group-overview {
      margin-bottom: 8px;
      border: 1px solid rgba(204, 255, 0, 0.18);
      background: rgba(204, 255, 0, 0.08);
    }

    .mobile-menu-group-list {
      display: none;
      gap: 6px;
    }

    .mobile-menu-group.is-open .mobile-menu-group-list {
      display: grid;
    }
    .mobile-menu-group-title { cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .mobile-menu-group-title .group-arrow { font-size: 10px; color: rgba(255,255,255,0.4); transition: transform 0.25s ease; }
    .mobile-menu-group.is-open .group-arrow { transform: rotate(180deg); }

    .mobile-menu-group-list a {
      margin-bottom: 0;
      padding: 12px 14px;
      font-size: 14px;
      background: rgba(255, 255, 255, 0.03);
    }

    [data-theme="light"] .mobile-menu-group {
      background: rgba(0, 0, 0, 0.03);
      border-color: rgba(0, 0, 0, 0.08);
    }

    [data-theme="light"] .mobile-menu-group-title strong {
      color: #1a1a1a;
    }

    [data-theme="light"] .mobile-menu-group-title span {
      color: #666;
    }

    [data-theme="light"] .mobile-menu-group-list a,
    [data-theme="light"] .mobile-menu-group-overview {
      background: rgba(0, 0, 0, 0.03);
      color: #555;
    }

    .mobile-menu-panel .menu-divider {
      height: 1px;
      background: rgba(255, 255, 255, 0.1);
      margin: 16px 0;
    }

    .mobile-menu-panel .menu-section-title {
      font-size: 12px;
      color: rgba(255, 255, 255, 0.5);
      text-transform: uppercase;
      letter-spacing: 1px;
      padding: 8px 16px 4px;
      margin-top: 8px;
    }

    .top-spacer {
      height: 72px;
    }

    @media (max-width: 1200px) {
      .nav-dropdown-panel {
        width: min(620px, 86vw);
        min-width: 0;
      }
    }

    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.92);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      display: none;
      justify-content: center;
      align-items: center;
      z-index: 10000;
    }

    .modal-overlay.show {
      display: flex;
    }

    .modal-box {
      background: linear-gradient(145deg, #141414, #0a0a0a);
      padding: 40px;
      border-radius: 24px;
      border: 1px solid var(--accent-cyan);
      text-align: center;
      max-width: 440px;
      width: 90%;
      box-shadow: 0 0 100px rgba(204, 255, 0, 0.25);
      position: relative;
    }

    .close-btn {
      position: absolute;
      top: 16px;
      right: 20px;
      font-size: 32px;
      color: rgba(255, 255, 255, 0.6);
      cursor: pointer;
      transition: 0.25s;
      line-height: 1;
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
    }

    .close-btn:hover {
      color: var(--accent-cyan);
      background: rgba(204, 255, 0, 0.1);
    }

    @media (max-width: 768px) {
      body {
        background: linear-gradient(rgba(18, 18, 18, 0.75), rgba(18, 18, 18, 0.85)), url('https://cdn.wutuobangai.com/assets/bg/bg-agent.m.webp') no-repeat center center fixed;
        background-size: cover;
        background-attachment: scroll;
      }

      .navbar-inner {
        padding: 0 16px;
      }

      .nav-logo {
        font-size: 16px;
      }

      .nav-logo img {
        height: 30px;
      }

      .nav-links {
        display: none;
      }

      .nav-right {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
      }

      .nav-mobile-actions {
        display: flex;
      }

      .navbar {
        height: 60px;
      }

      .top-spacer {
        height: 60px;
      }

      .mobile-menu-panel a {
        min-height: 44px;
        font-size: 16px;
        padding: 14px 20px;
      }

      .mobile-menu-panel .menu-section-title {
        font-size: 16px;
      }
    }

    /* ================= 三栏：左 260 | 中 flex | 右 350 ================= */
    .main-wrap {
      display: flex;
      height: calc(100vh - 72px);
    }

    /* 左侧：历史栏 260px */
    .history-sidebar {
      width: 260px;
      min-width: 260px;
      background: var(--bg-side);
      border-right: 1px solid var(--border);
      display: flex;
      flex-direction: column;
    }

    .history-brand {
      padding: 20px 18px 16px;
      border-bottom: 1px solid var(--border);
    }

    .history-brand a {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .history-brand img {
      height: 32px;
      width: auto;
      mix-blend-mode: screen;
    }

    .history-brand span {
      font-weight: 700;
      font-size: 15px;
      color: var(--text);
    }

    .btn-new-chat {
      margin: 14px 18px 0;
      padding: 12px 16px;
      font-size: 14px;
      color: var(--text);
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid var(--border-input);
      border-radius: 12px;
      cursor: pointer;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }

    .btn-new-chat:hover {
      background: rgba(255, 255, 255, 0.1);
      border-color: rgba(255, 255, 255, 0.15);
    }

    .history-list {
      flex: 1;
      overflow-y: auto;
      padding: 12px 10px 16px;
    }

    .history-item {
      padding: 12px 14px;
      font-size: 13px;
      color: var(--text-muted);
      border-radius: 10px;
      cursor: pointer;
      transition: all 0.2s ease;
      margin-bottom: 4px;
    }

    .history-item:hover {
      background: rgba(255, 255, 255, 0.06);
      color: var(--text);
    }

    .history-footer {
      padding: 12px 18px 20px;
      border-top: 1px solid var(--border);
    }

    .history-footer a {
      font-size: 12px;
      color: var(--text-muted);
      transition: color 0.2s;
    }

    .history-footer a:hover {
      color: var(--accent);
    }

    /* 中间：主聊 flex-1 */
    .chat-pane {
      flex: 1;
      min-width: 0;
      display: flex;
      flex-direction: column;
      background: var(--bg-main);
    }

    .chat-messages {
      flex: 1;
      overflow-y: auto;
      padding: 32px 40px 20px;
      display: flex;
      flex-direction: column;
      gap: 24px;
    }

    .chat-messages::-webkit-scrollbar,
    .memory-body::-webkit-scrollbar,
    .history-list::-webkit-scrollbar {
      width: 6px;
      height: 6px;
    }

    .chat-messages::-webkit-scrollbar-track,
    .memory-body::-webkit-scrollbar-track,
    .history-list::-webkit-scrollbar-track {
      background: transparent;
    }

    .chat-messages::-webkit-scrollbar-thumb,
    .memory-body::-webkit-scrollbar-thumb,
    .history-list::-webkit-scrollbar-thumb {
      background: rgba(255, 255, 255, 0.12);
      border-radius: 3px;
    }

    .msg {
      max-width: 78%;
      padding: 16px 20px;
      border-radius: 20px;
      line-height: 1.6;
      font-size: 14px;
    }

    .msg.assistant {
      align-self: flex-start;
      background: rgba(255, 255, 255, 0.06);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border: 1px solid rgba(255, 255, 255, 0.08);
    }

    .msg.user {
      align-self: flex-end;
      background: var(--msg-user-bg);
      border: 1px solid var(--msg-user-border);
      color: var(--text);
    }

    .load-more-bar { text-align: center; padding: 12px 0; }
    .btn-load-more { background: none; border: 1px solid var(--border); color: var(--text-secondary); padding: 6px 18px; border-radius: 16px; cursor: pointer; font-size: 13px; transition: all .2s; }
    .btn-load-more:hover { background: var(--msg-user-bg); color: var(--text-primary); }
    .btn-load-more:disabled { opacity: .5; cursor: wait; }

    .msg.assistant .role {
      font-size: 11px;
      color: var(--accent);
      margin-bottom: 8px;
      letter-spacing: 0.5px;
    }

    .quick-btn {
      padding: 6px 14px;
      border-radius: 16px;
      border: 1px solid var(--border);
      background: rgba(255, 255, 255, 0.04);
      color: var(--text);
      font-size: 13px;
      cursor: pointer;
      transition: all 0.2s;
      white-space: nowrap;
    }

    .quick-btn:hover {
      border-color: var(--accent);
      background: var(--accent-soft);
      color: var(--accent);
    }

    .chat-input-wrap {
      padding: 20px 40px 32px;
      border-top: 1px solid var(--border);
    }

    .chat-input-row {
      display: flex;
      gap: 12px;
      align-items: flex-end;
    }

    .chat-input {
      flex: 1;
      min-height: 52px;
      max-height: 160px;
      padding: 16px 20px;
      font-size: 14px;
      color: var(--text);
      background: rgba(0, 0, 0, 0.25);
      border: 1px solid var(--border-input);
      border-radius: 16px;
      resize: none;
      font-family: inherit;
      transition: all 0.2s ease;
    }

    .chat-input::placeholder {
      color: var(--text-muted);
    }

    .chat-input:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 1px var(--accent), 0 0 16px var(--accent-focus);
    }

    .btn-send {
      flex-shrink: 0;
      width: 52px;
      height: 52px;
      border: none;
      border-radius: 16px;
      background: linear-gradient(180deg, #CCFF00, #a8d900);
      color: #000;
      font-size: 18px;
      cursor: pointer;
      transition: all 0.2s ease;
      box-shadow: 0 0 20px rgba(204, 255, 0, 0.3);
    }

    .btn-send:hover {
      background: linear-gradient(180deg, #d4ff33, #b8e600);
      transform: scale(1.02);
      box-shadow: 0 0 30px rgba(204, 255, 0, 0.5);
    }

    .btn-upload-img {
      flex-shrink: 0;
      width: 44px;
      height: 44px;
      border: 1px solid var(--border-input);
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.06);
      color: var(--text-muted);
      font-size: 18px;
      cursor: pointer;
      transition: all 0.2s ease;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }

    .btn-upload-img:hover {
      border-color: var(--accent);
      color: var(--accent);
      background: var(--accent-soft);
    }

    .chat-preview-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      padding: 8px 0 0;
      min-height: 0;
    }

    .chat-preview-item {
      position: relative;
      width: 56px;
      height: 56px;
      border-radius: 10px;
      overflow: hidden;
      border: 1px solid var(--border-input);
      flex-shrink: 0;
    }

    .chat-preview-item img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .chat-preview-item .preview-remove {
      position: absolute;
      top: 2px;
      right: 2px;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: rgba(0, 0, 0, 0.7);
      color: #fff;
      font-size: 14px;
      line-height: 1;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      border: none;
      padding: 0;
    }

    .chat-preview-item .preview-remove:hover {
      background: #ff6b6b;
    }

    /* ========== 模型标识 ========== */
    .model-indicator {
      display: none;
      align-items: center;
      gap: 6px;
      padding: 4px 12px;
      font-size: 12px;
      color: var(--text-dim);
    }

    .model-indicator .model-tag {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 2px 8px;
      border-radius: 10px;
      font-size: 11px;
      font-weight: 600;
    }

    .model-indicator .model-tag.deepseek,
    .model-indicator .model-tag.gpt52 {
      background: rgba(0, 200, 120, 0.12);
      color: #00c878;
    }

    .model-indicator .model-tag.gpt5m {
      background: rgba(120, 80, 255, 0.12);
      color: #9b7aff;
    }

    .model-indicator .model-cost {
      color: var(--text-dim);
      font-size: 11px;
    }

    .msg-model-tag {
      display: inline-block;
      font-size: 10px;
      padding: 1px 6px;
      border-radius: 6px;
      margin-top: 6px;
      font-weight: 500;
    }

    .msg-model-tag.deepseek,
    .msg-model-tag.gpt52 {
      background: rgba(0, 200, 120, 0.1);
      color: #00c878;
    }

    .msg-model-tag.gpt5m {
      background: rgba(120, 80, 255, 0.1);
      color: #9b7aff;
    }

    /* ========== 右侧：记忆舱 350px，悬浮控制面板 ========== */
    .memory-pane {
      width: 350px;
      min-width: 350px;
      display: flex;
      flex-direction: column;
      background: rgba(28, 28, 32, 0.95);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border-left: 1px solid var(--border);
      box-shadow: -8px 0 40px rgba(0, 0, 0, 0.25);
    }

    .memory-header {
      padding: 20px 20px 14px;
      border-bottom: 1px solid var(--border);
      flex-shrink: 0;
    }

    .memory-title {
      font-size: 13px;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 12px;
      letter-spacing: 0.03em;
    }

    .sync-bar-wrap {
      margin-bottom: 10px;
    }

    .sync-bar-label {
      font-size: 11px;
      color: var(--text-muted);
      margin-bottom: 6px;
      display: flex;
      justify-content: space-between;
    }

    .sync-bar {
      height: 5px;
      background: rgba(255, 255, 255, 0.06);
      border-radius: 3px;
      overflow: hidden;
    }

    .sync-bar-fill {
      height: 100%;
      width: 0%;
      background: linear-gradient(90deg, #CCFF00, #a8d900);
      border-radius: 3px;
      transition: width 0.35s ease;
    }

    .btn-clear-privacy {
      width: 100%;
      padding: 10px 12px;
      font-size: 12px;
      color: var(--text-muted);
      background: transparent;
      border: 1px dashed var(--border-input);
      border-radius: 10px;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .btn-clear-privacy:hover {
      color: #ff6b6b;
      border-color: rgba(255, 107, 107, 0.4);
      background: rgba(255, 107, 107, 0.06);
    }

    .memory-body {
      flex: 1;
      overflow-y: auto;
      padding: 16px 18px 120px;
    }

    .protocol-layer {
      border: 1px solid var(--border);
      border-radius: 14px;
      margin-bottom: 12px;
      overflow: hidden;
      background: rgba(255, 255, 255, 0.02);
      transition: all 0.25s ease;
    }

    .protocol-layer.open {
      border-color: rgba(255, 255, 255, 0.1);
    }

    .protocol-layer.animate-next {
      animation: layer-scan 0.45s ease;
    }

    @keyframes layer-scan {
      0% {
        box-shadow: 0 0 0 0 rgba(77, 171, 247, 0.3);
      }

      50% {
        box-shadow: 0 0 24px 1px rgba(77, 171, 247, 0.25);
      }

      100% {
        box-shadow: none;
      }
    }

    .layer-head {
      padding: 14px 16px;
      cursor: pointer;
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 12px;
      font-weight: 600;
      color: var(--text);
      transition: all 0.2s ease;
      user-select: none;
    }

    .protocol-layer.open .layer-head {
      border-bottom: 1px solid var(--border);
    }

    .layer-head:hover {
      background: rgba(255, 255, 255, 0.04);
    }

    .layer-head .layer-num {
      color: var(--accent);
      margin-right: 6px;
    }

    .layer-head .arrow {
      font-size: 10px;
      color: var(--text-muted);
      transition: transform 0.25s ease;
    }

    .protocol-layer.open .layer-head .arrow {
      transform: rotate(180deg);
    }

    .layer-body {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .protocol-layer.open .layer-body {
      max-height: 1400px;
    }

    .layer-inner {
      padding: 16px;
    }

    .field {
      margin-top: 14px;
    }

    .field:first-child {
      margin-top: 0;
    }

    .field-label {
      font-size: 11px;
      color: var(--text-muted);
      margin-bottom: 8px;
      display: block;
    }

    /* 输入 / 文本域：极细灰边，仅 focus 时青微光 */
    input[type="text"],
    input[type="number"],
    textarea,
    select {
      width: 100%;
      padding: 12px 14px;
      font-size: 13px;
      color: var(--text);
      background: rgba(0, 0, 0, 0.2);
      border: 1px solid var(--border-input);
      border-radius: 12px;
      font-family: inherit;
      transition: all 0.2s ease;
    }

    input::placeholder,
    textarea::placeholder {
      color: var(--text-muted);
      opacity: 0.9;
    }

    input:focus,
    textarea:focus,
    select:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 1px var(--accent), 0 0 12px var(--accent-focus);
    }

    textarea {
      min-height: 88px;
      resize: vertical;
    }

    /* 可点标签：点则填入输入框 */
    .clickable-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 8px;
    }

    .click-tag {
      padding: 8px 14px;
      font-size: 12px;
      border: 1px solid var(--border-input);
      border-radius: 20px;
      background: rgba(255, 255, 255, 0.04);
      color: var(--text-muted);
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .click-tag:hover {
      border-color: rgba(255, 255, 255, 0.2);
      color: var(--text);
    }

    /* 风险滑块 */
    .risk-slider-wrap {
      padding: 10px 0;
    }

    .risk-slider-labels {
      display: flex;
      justify-content: space-between;
      font-size: 11px;
      color: var(--text-muted);
      margin-bottom: 8px;
    }

    input[type="range"].risk-range {
      width: 100%;
      height: 6px;
      -webkit-appearance: none;
      appearance: none;
      background: rgba(255, 255, 255, 0.08);
      border-radius: 3px;
    }

    input[type="range"].risk-range::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 16px;
      height: 16px;
      border-radius: 50%;
      background: linear-gradient(180deg, #CCFF00, #a8d900);
      cursor: pointer;
      transition: transform 0.2s;
    }

    input[type="range"].risk-range::-webkit-slider-thumb:hover {
      transform: scale(1.1);
    }

    /* 沟通风格：三张大卡片 */
    .style-cards {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .style-card {
      padding: 14px 16px;
      border: 1px solid var(--border-input);
      border-radius: 14px;
      cursor: pointer;
      transition: all 0.2s ease;
      background: rgba(255, 255, 255, 0.02);
    }

    .style-card:hover {
      border-color: rgba(255, 255, 255, 0.18);
      background: rgba(255, 255, 255, 0.05);
    }

    .style-card.selected {
      border-color: var(--accent);
      background: var(--accent-soft);
    }

    .style-card input {
      display: none;
    }

    .style-card .sc-title {
      font-size: 13px;
      font-weight: 600;
      margin-bottom: 4px;
    }

    .style-card .sc-desc {
      font-size: 11px;
      color: var(--text-muted);
      line-height: 1.5;
    }

    /* 单选卡片（算力、生存血条、驱动力等） */
    .radio-cards {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .radio-card {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 14px;
      border: 1px solid var(--border-input);
      border-radius: 12px;
      cursor: pointer;
      transition: all 0.2s ease;
      background: rgba(255, 255, 255, 0.02);
    }

    .radio-card:hover {
      border-color: rgba(255, 255, 255, 0.15);
    }

    .radio-card.selected {
      border-color: var(--accent);
      background: var(--accent-soft);
    }

    .radio-card input {
      display: none;
    }

    .radio-card .dot {
      width: 10px;
      height: 10px;
      border: 2px solid var(--border-input);
      border-radius: 50%;
      flex-shrink: 0;
    }

    .radio-card.selected .dot {
      border-color: var(--accent);
      background: var(--accent);
    }

    .tag-list {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .tag-item {
      padding: 8px 14px;
      font-size: 11px;
      border: 1px solid var(--border-input);
      border-radius: 20px;
      background: rgba(255, 255, 255, 0.03);
      color: var(--text-muted);
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .tag-item:hover {
      border-color: rgba(255, 255, 255, 0.2);
      color: var(--text);
    }

    .tag-item.selected {
      border-color: var(--accent);
      background: var(--accent-soft);
      color: var(--accent);
    }

    .toggle-wrap {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .toggle-switch {
      position: relative;
      width: 44px;
      height: 24px;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid var(--border-input);
      border-radius: 12px;
      cursor: pointer;
      transition: all 0.25s ease;
    }

    .toggle-switch.on {
      background: var(--accent-soft);
      border-color: var(--accent);
    }

    .toggle-switch::after {
      content: '';
      position: absolute;
      top: 2px;
      left: 2px;
      width: 18px;
      height: 18px;
      background: var(--text-muted);
      border-radius: 50%;
      transition: all 0.25s ease;
    }

    .toggle-switch.on::after {
      left: 22px;
      background: var(--accent);
    }

    .toggle-label {
      font-size: 12px;
      color: var(--text-muted);
    }

    .override-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .override-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 12px;
      border: 1px solid var(--border);
      border-radius: 10px;
      cursor: pointer;
      background: rgba(255, 255, 255, 0.02);
      transition: all 0.2s ease;
    }

    .override-item:hover {
      border-color: var(--border-input);
    }

    .override-item input {
      display: none;
    }

    .override-item .check {
      width: 16px;
      height: 16px;
      border: 2px solid var(--border-input);
      border-radius: 4px;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .override-item.checked .check,
    .override-item input:checked+.check {
      border-color: var(--accent);
      background: var(--accent-soft);
    }

    .override-item.checked .check::after,
    .override-item input:checked+.check::after {
      content: '✓';
      font-size: 10px;
      color: var(--accent);
      font-weight: 800;
    }

    .override-item .check-txt {
      font-size: 12px;
      color: var(--text);
    }

    .privacy-note {
      font-size: 10px;
      color: var(--text-muted);
      margin-top: 6px;
    }

    .btn-next {
      width: 100%;
      margin-top: 16px;
      padding: 12px 16px;
      font-size: 13px;
      font-weight: 600;
      border: 1px solid var(--border-input);
      border-radius: 12px;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
      color: var(--text);
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .btn-next:hover {
      background: rgba(255, 255, 255, 0.1);
      border-color: rgba(255, 255, 255, 0.15);
    }

    .btn-save-wrap {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      padding: 16px;
      background: linear-gradient(180deg, transparent, rgba(28, 28, 32, 0.98) 24%);
      z-index: 2;
    }

    .btn-save {
      width: 100%;
      padding: 14px 20px;
      font-size: 14px;
      font-weight: 600;
      border: none;
      border-radius: 12px;
      background: linear-gradient(180deg, #CCFF00, #a8d900);
      color: #000;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: all 0.2s ease;
      box-shadow: 0 0 20px rgba(204, 255, 0, 0.3);
    }

    .btn-save:hover {
      background: linear-gradient(180deg, #d4ff33, #b8e600);
      transform: translateY(-1px);
      box-shadow: 0 0 30px rgba(204, 255, 0, 0.5);
    }

    .btn-save.loading {
      pointer-events: none;
    }

    .btn-save .spinner {
      width: 16px;
      height: 16px;
      border: 2px solid rgba(255, 255, 255, 0.3);
      border-top-color: #fff;
      border-radius: 50%;
      animation: spin 0.7s linear infinite;
    }

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

    /* Toast */
    .toast {
      position: fixed;
      bottom: 100px;
      left: 50%;
      transform: translateX(-50%) translateY(20px);
      padding: 14px 28px;
      background: rgba(0, 0, 0, 0.9);
      border: 1px solid var(--accent);
      border-radius: 12px;
      color: var(--accent);
      font-size: 14px;
      font-weight: 600;
      box-shadow: 0 0 30px var(--accent-glow);
      opacity: 0;
      visibility: hidden;
      transition: all 0.35s ease;
      z-index: 200;
    }

    .toast.show {
      opacity: 1;
      visibility: visible;
      transform: translateX(-50%) translateY(0);
    }

    .btn-gen-actions,
    .btn-submit-task,
    .btn-clear-data,
    .btn-export-json {
      width: 100%;
      padding: 10px 14px;
      font-size: 13px;
      border: 1px solid var(--border-input);
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.06);
      color: var(--text);
      cursor: pointer;
      transition: all 0.2s ease;
      margin-bottom: 10px;
    }

    .btn-gen-actions:hover,
    .btn-submit-task:hover {
      border-color: var(--accent);
      background: var(--accent-soft);
    }

    .btn-clear-data:hover {
      border-color: #ff6b6b;
      background: rgba(255, 107, 107, 0.1);
      color: #ff6b6b;
    }

    .btn-export-json:hover {
      border-color: var(--accent);
      background: var(--accent-soft);
    }

    .actions-list,
    .tasks-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-top: 10px;
    }

    .action-item,
    .task-item {
      padding: 12px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: rgba(255, 255, 255, 0.02);
      font-size: 12px;
    }

    .action-item input,
    .action-item select,
    .action-item textarea {
      margin-top: 6px;
      font-size: 12px;
    }

    .action-item .action-status {
      width: 100%;
      max-width: 120px;
    }

    .task-item .task-status {
      color: var(--text-muted);
    }

    .task-item.done .task-download {
      margin-top: 6px;
    }

    .task-item .task-download a {
      color: var(--accent);
    }

    @media (max-width: 1100px) {
      .history-sidebar {
        width: 220px;
        min-width: 220px;
      }

      .memory-pane {
        width: 300px;
        min-width: 300px;
      }
    }

    .mobile-tab-bar {
      display: none;
    }

    @media (max-width: 900px) {
      .main-wrap {
        flex-direction: column;
        height: calc(100vh - 72px - 56px);
      }

      .history-sidebar {
        display: none;
        width: 100%;
        min-width: 0;
        height: 100%;
        max-height: none;
        overflow-y: auto;
      }

      .chat-pane {
        display: flex;
        width: 100%;
        height: 100%;
        min-height: 0;
      }

      .memory-pane {
        display: none;
        width: 100%;
        min-width: 0;
        height: 100%;
        min-height: 0;
        overflow-y: auto;
      }

      .history-sidebar.mobile-active {
        display: flex;
      }

      .chat-pane.mobile-active {
        display: flex;
      }

      .memory-pane.mobile-active {
        display: flex;
      }

      .mobile-tab-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 56px;
        background: var(--bg-side);
        border-top: 1px solid var(--border);
        z-index: 1000;
        justify-content: space-around;
        align-items: center;
        padding: 0 8px;
        padding-bottom: env(safe-area-inset-bottom, 0);
      }

      .mobile-tab-bar .tab-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 6px 16px;
        border-radius: 8px;
        cursor: pointer;
        color: var(--text-dim);
        font-size: 11px;
        transition: all 0.2s;
        border: none;
        background: none;
        -webkit-tap-highlight-color: transparent;
      }

      .mobile-tab-bar .tab-item .tab-icon {
        font-size: 20px;
        line-height: 1;
      }

      .mobile-tab-bar .tab-item.active {
        color: var(--accent);
        background: rgba(0, 200, 255, 0.08);
      }

      .chat-input-wrap {
        padding-bottom: 4px;
      }

      .model-indicator {
        display: flex !important;
      }
    }

    @media (max-width: 768px) {
      body {
        background-attachment: scroll;
      }

      .chat-input {
        min-height: 44px;
        font-size: 16px;
      }

      .btn-send {
        min-width: 44px;
        min-height: 44px;
        font-size: 16px;
      }

      .btn-upload-img {
        min-width: 44px;
        min-height: 44px;
      }

      input[type="text"],
      input[type="number"],
      textarea,
      select {
        min-height: 44px;
        font-size: 16px;
      }

      .btn-next,
      .btn-save,
      .btn-new-chat,
      .btn-gen-actions,
      .btn-submit-task,
      .btn-clear-data,
      .btn-export-json {
        min-height: 44px;
        font-size: 16px;
      }
    }

    /* ═══════════════════════════════════════════════════════════════
       主题切换按钮
       ═══════════════════════════════════════════════════════════════ */
    .btn-theme-toggle {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      min-width: 72px;
      height: 36px;
      padding: 0 12px;
      border: 1.5px solid var(--accent);
      border-radius: 10px;
      background: var(--accent-soft);
      color: var(--text);
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.25s ease;
      flex-shrink: 0;
    }

    .btn-theme-toggle:hover {
      border-color: var(--accent);
      background: var(--accent-soft);
    }

    .btn-theme-toggle .icon-sun,
    .btn-theme-toggle .icon-moon {
      display: none;
    }

    [data-theme="dark"] .btn-theme-toggle .icon-sun {
      display: block;
    }

    [data-theme="light"] .btn-theme-toggle .icon-moon {
      display: block;
    }

    /* ═══════════════════════════════════════════════════════════════
       历史对话列表增强样式
       ═══════════════════════════════════════════════════════════════ */
    .history-group {
      margin-bottom: 16px;
    }

    .history-group-title {
      font-size: 11px;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      padding: 8px 14px 6px;
      font-weight: 600;
    }

    .history-item {
      position: relative;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .history-item.active {
      background: var(--accent-soft);
      color: var(--accent);
    }

    .history-item .history-title {
      flex: 1;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .history-item .history-delete {
      display: none;
      width: 20px;
      height: 20px;
      border: none;
      border-radius: 4px;
      background: transparent;
      color: var(--text-muted);
      font-size: 14px;
      cursor: pointer;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .history-item:hover .history-delete {
      display: flex;
    }

    .history-item .history-delete:hover {
      color: #ff6b6b;
      background: rgba(255, 107, 107, 0.1);
    }

    .history-empty {
      padding: 20px 14px;
      text-align: center;
      color: var(--text-muted);
      font-size: 13px;
    }

    .history-loading {
      padding: 20px 14px;
      text-align: center;
      color: var(--text-muted);
      font-size: 13px;
    }

    /* 加载动画 */
    @keyframes pulse {
      0%, 100% { opacity: 0.4; }
      50% { opacity: 1; }
    }

    .loading-dots {
      display: inline-flex;
      gap: 4px;
    }

    .loading-dots span {
      width: 6px;
      height: 6px;
      background: var(--accent);
      border-radius: 50%;
      animation: pulse 1.2s infinite;
    }

    .loading-dots span:nth-child(2) {
      animation-delay: 0.2s;
    }

    .loading-dots span:nth-child(3) {
      animation-delay: 0.4s;
    }