    * { box-sizing: border-box; margin: 0; padding: 0; }
    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
      background: #f5f5f7;
      color: #1d1d1f;
      height: 100vh;
      overflow: hidden;
      display: flex;
    }

    /* ── Sidebar ── */
    #app-sidebar {
      width: 220px;
      min-width: 220px;
      background: #1a1a2e;
      display: flex;
      flex-direction: column;
      transition: width 0.25s ease, min-width 0.25s ease;
      overflow: hidden;
      flex-shrink: 0;
      z-index: 200;
    }
    #app-sidebar.collapsed { width: 56px; min-width: 56px; }
    .sb-logo {
      height: 56px;
      display: flex;
      align-items: center;
      padding: 0 16px;
      gap: 10px;
      border-bottom: 1px solid #ffffff18;
      flex-shrink: 0;
      cursor: pointer;
    }
    .sb-logo-icon { font-size: 20px; flex-shrink: 0; }
    .sb-logo-text { font-size: 14px; font-weight: 700; color: #fff; white-space: nowrap; transition: opacity 0.2s; }
    #app-sidebar.collapsed .sb-logo-text { opacity: 0; pointer-events: none; }
    .sb-section-label {
      font-size: 10px; color: #ffffff45; letter-spacing: 0.08em; text-transform: uppercase;
      padding: 14px 16px 5px; white-space: nowrap; overflow: hidden; transition: opacity 0.2s;
    }
    #app-sidebar.collapsed .sb-section-label { opacity: 0; }
    .sb-item {
      display: flex; align-items: center; gap: 10px;
      padding: 9px 16px; cursor: pointer;
      color: #ffffffaa; font-size: 13px; white-space: nowrap;
      transition: background 0.15s, color 0.15s;
      position: relative; border: none; background: none; width: 100%; text-align: left;
      font-family: inherit;
    }
    .sb-item:hover { background: #ffffff12; color: #fff; }
    .sb-item.active { background: #4f46e518; color: #818cf8; }
    .sb-item.active::before {
      content: ''; position: absolute; left: 0; top: 4px; bottom: 4px;
      width: 3px; background: #818cf8; border-radius: 0 2px 2px 0;
    }
    .sb-item-icon { font-size: 15px; flex-shrink: 0; width: 24px; text-align: center; }
    .sb-item-label { overflow: hidden; transition: opacity 0.2s; }
    #app-sidebar.collapsed .sb-item-label { opacity: 0; pointer-events: none; }
    .sb-divider { height: 1px; background: #ffffff10; margin: 6px 0; }
    .sb-item.sb-cmo { color: #a78bfa; font-weight: 600; }
    .sb-item.sb-cmo.active { color: #c4b5fd; background: #4f46e530; }
    /* WeChat-style unread badge */
    .sb-unread-badge {
      display: none; min-width: 18px; height: 18px; padding: 0 5px;
      background: #ef4444; color: #fff; border-radius: 9px;
      font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
      margin-left: auto; flex-shrink: 0;
    }
    #app-sidebar.collapsed .sb-unread-badge { min-width: 10px; height: 10px; padding: 0; border-radius: 5px; font-size: 0; position: absolute; top: 6px; right: 6px; }
    .sb-team-agent .sb-unread-badge { margin-left: auto; }

    /* Collapsible tools section */
    .sb-tools-toggle {
      display: flex; align-items: center; gap: 8px;
      padding: 8px 16px; cursor: pointer;
      color: #ffffff40; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
      border: none; background: none; width: 100%; text-align: left; font-family: inherit;
      transition: color 0.15s;
    }
    .sb-tools-toggle:hover { color: #ffffff80; }
    .sb-tools-toggle .sb-tools-arrow { margin-left: auto; transition: transform 0.2s; font-size: 9px; }
    .sb-tools-toggle.open .sb-tools-arrow { transform: rotate(180deg); }
    .sb-tools-body { display: none; }
    .sb-tools-body.open { display: block; }
    #app-sidebar.collapsed .sb-tools-toggle { justify-content: center; padding: 8px; }
    #app-sidebar.collapsed .sb-tools-toggle span:not(.sb-tools-arrow) { display: none; }
    #app-sidebar.collapsed .sb-tools-arrow { display: none; }
    #app-sidebar.collapsed .sb-tools-body { display: none !important; }

    #app-sidebar.collapsed .sb-logo-collapse { display: none; }
    #app-sidebar.collapsed #sb-chat-search-wrap { display: none; }

    /* ── Chat Inner Tabs (Chat / Performance / Calendar) ── */
    .chat-inner-tabs {
      display: flex; gap: 2px; background: #f3f4f6; border-radius: 8px; padding: 3px;
    }
    .chat-inner-tab {
      padding: 5px 14px; border: none; background: none; border-radius: 6px;
      font-size: 12px; font-weight: 500; color: #6b7280; cursor: pointer;
      transition: all .15s; white-space: nowrap; font-family: inherit;
    }
    .chat-inner-tab:hover { color: #374151; background: #e5e7eb; }
    .chat-inner-tab.active { background: white; color: #111827; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }

    /* Panel that replaces chat-messages when Performance/Calendar tab active */
    .chat-inner-panel {
      flex: 1; overflow-y: auto; padding: 24px; min-height: 0; background: #fafafa;
    }
    /* Hide chat UI elements when inner panel is shown */
    .chat-center.panel-active .chat-messages,
    .chat-center.panel-active .chat-hire-banner,
    .chat-center.panel-active .chat-input-bar { display: none !important; }
    .chat-center.panel-active .chat-inner-panel { display: block; }

    /* Performance panel styles */
    .cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 14px; margin-bottom: 24px; }
    .cp-card { background: white; border: 1px solid #e5e7eb; border-radius: 12px; padding: 18px; }
    .cp-card-label { font-size: 11px; color: #9ca3af; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
    .cp-card-value { font-size: 26px; font-weight: 800; color: #111827; }
    .cp-card-sub { font-size: 12px; color: #6b7280; margin-top: 4px; }
    .cp-card-trend { font-size: 11px; font-weight: 600; margin-top: 6px; }
    .cp-card-trend.up { color: #16a34a; }
    .cp-card-trend.down { color: #dc2626; }
    .cp-section-title { font-size: 14px; font-weight: 700; color: #111827; margin-bottom: 12px; margin-top: 8px; }
    .cp-connect-banner { background: linear-gradient(135deg, #6366f1, #8b5cf6); border-radius: 14px; padding: 28px; color: white; text-align: center; margin-bottom: 20px; }
    .cp-connect-btn { background: white; color: #6366f1; border: none; border-radius: 8px; padding: 10px 24px; font-size: 13px; font-weight: 700; cursor: pointer; margin-top: 14px; }

    /* Calendar panel styles */
    .cc-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; margin-bottom: 16px; }
    .cc-day-header { text-align: center; font-size: 10px; font-weight: 600; color: #9ca3af; text-transform: uppercase; padding: 4px 0; }
    .cc-day { background: white; border: 1px solid #e5e7eb; border-radius: 8px; min-height: 72px; padding: 6px; position: relative; cursor: pointer; transition: border-color .15s; }
    .cc-day:hover { border-color: #6366f1; }
    .cc-day.today { border-color: #6366f1; background: #ede9fe; }
    .cc-day.other-month { opacity: .4; }
    .cc-day-num { font-size: 11px; font-weight: 600; color: #374151; margin-bottom: 4px; }
    .cc-day.today .cc-day-num { color: #6366f1; }
    .cc-post-dot { font-size: 10px; background: #dbeafe; color: #1d4ed8; border-radius: 4px; padding: 1px 5px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .cc-post-dot.xhs { background: #fce7f3; color: #be185d; }
    .cc-post-dot.tiktok { background: #f3e8ff; color: #7e22ce; }
    .cc-post-dot.youtube { background: #fee2e2; color: #dc2626; }
    .cc-post-dot.reddit { background: #ffedd5; color: #c2410c; }
    .cc-post-dot.x { background: #e0f2fe; color: #0369a1; }
    .cc-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
    .cc-nav-btn { background: none; border: 1px solid #e5e7eb; border-radius: 8px; padding: 6px 12px; cursor: pointer; font-size: 14px; color: #374151; transition: all .15s; }
    .cc-nav-btn:hover { background: #f3f4f6; }
    .cc-month-label { font-size: 15px; font-weight: 700; color: #111827; }
    .cc-add-btn { background: #6366f1; color: white; border: none; border-radius: 8px; padding: 7px 16px; font-size: 12px; font-weight: 600; cursor: pointer; }

    /* ── Agent Chat Tab layout (same as chat-main) ── */
    #tab-agent-chat.active {
      display: flex; flex-direction: column;
      height: 100vh;
    }
    .main:has(#tab-agent-chat.active) { max-width: none; padding: 0; margin: 0; }
    #app-main-scroll:has(#tab-agent-chat.active) { overflow: hidden; }

    /* ── Hire Specialist Modal Cards ── */
    .hire-card {
      border: 1.5px solid #e5e7eb; border-radius: 14px; padding: 16px;
      cursor: pointer; transition: all .15s; background: white;
      display: flex; flex-direction: column; gap: 10px;
    }
    .hire-card:hover { border-color: #6366f1; box-shadow: 0 4px 16px rgba(99,102,241,.12); transform: translateY(-1px); }
    .hire-card.hired { border-color: #22c55e; background: #f0fdf4; cursor: default; transform: none; }
    .hire-card.locked { opacity: .55; cursor: not-allowed; }
    .hire-card.locked:hover { border-color: #e5e7eb; box-shadow: none; transform: none; }
    .hire-card-top { display: flex; align-items: center; gap: 10px; }
    .hire-card-emoji { font-size: 28px; }
    .hire-card-info { flex: 1; }
    .hire-card-name { font-size: 14px; font-weight: 700; color: #111827; }
    .hire-card-role { font-size: 11px; color: #6b7280; margin-top: 1px; }
    .hire-card-desc { font-size: 12px; color: #6b7280; line-height: 1.5; }
    .hire-card-skills { display: flex; flex-wrap: wrap; gap: 4px; }
    .hire-skill-tag { font-size: 10px; background: #f3f4f6; color: #374151; padding: 2px 8px; border-radius: 10px; }
    .hire-card-btn { padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; border: none; cursor: pointer; transition: all .15s; }
    .hire-card-btn.hire { background: #6366f1; color: white; }
    .hire-card-btn.hire:hover { background: #4f46e5; }
    .hire-card-btn.hired { background: #dcfce7; color: #16a34a; cursor: default; }
    .hire-card-btn.locked { background: #f3f4f6; color: #9ca3af; cursor: not-allowed; }

    /* ── My Team sidebar items ── */
    .sb-team-agent {
      display: flex; align-items: center; gap: 8px;
      padding: 8px 16px; cursor: pointer;
      color: #ffffffaa; font-size: 12px; white-space: nowrap;
      transition: background .15s, color .15s;
      background: none; border: none; width: 100%; text-align: left; font-family: inherit;
    }
    .sb-team-agent:hover { background: #ffffff12; color: #fff; }
    .sb-team-agent.active { background: #4f46e518; color: #a5b4fc; }
    .sb-team-agent .agent-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }
    .sb-team-agent .agent-emoji { font-size: 14px; width: 22px; text-align: center; flex-shrink: 0; }
    .sb-team-agent .agent-name { flex: 1; overflow: hidden; text-overflow: ellipsis; }
    #app-sidebar.collapsed .sb-team-agent .agent-name { opacity: 0; pointer-events: none; }

    /* ── Chat Main Layout ── */
    #tab-chat-main.active, #tab-all-hands.active {
      display: flex; flex-direction: column;
      height: 100vh;
    }
    .main:has(#tab-all-hands.active) { max-width: none; padding: 0; margin: 0; }
    #app-main-scroll:has(#tab-all-hands.active) { overflow: hidden; }
    .chat-layout {
      display: flex; flex: 1; overflow: hidden; min-height: 0;
    }
    .chat-center {
      flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #fff;
    }
    .chat-right-panel-wrap {
      display: flex; flex-direction: row; position: relative; flex-shrink: 0;
    }
    .chat-right-panel {
      width: 280px; min-width: 280px; border-left: 1px solid #e5e7eb;
      background: #fafafa; overflow-y: auto; padding: 0;
      font-size: 13px; transition: width .22s ease, min-width .22s ease, opacity .15s ease;
    }
    .chat-right-panel.collapsed {
      width: 0; min-width: 0; overflow: hidden; opacity: 0; border-left: none;
    }
    .rp-toggle-btn {
      position: absolute; left: -20px; top: 12px;
      width: 20px; height: 20px; border-radius: 6px 0 0 6px;
      border: 1px solid #e5e7eb; border-right: none;
      background: #fafafa; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      font-size: 10px; color: #9ca3af; z-index: 10;
      transition: background .15s, color .15s;
    }
    .rp-toggle-btn:hover { background: #f0f0f0; color: #374151; }

    /* Channel header */
    .channel-header {
      height: 52px; border-bottom: 1px solid #e5e7eb;
      display: flex; align-items: center; padding: 0 20px;
      font-size: 16px; font-weight: 700; color: #111827;
      flex-shrink: 0; background: #fff;
    }
    .channel-header-sub { font-size: 12px; color: #6b7280; margin-left: 8px; font-weight: 400; }

    /* Chat messages */
    .chat-messages {
      flex: 1; overflow-y: auto; padding: 16px 20px 20px; min-height: 0;
      background: #f5f5f5;
    }
    .chat-date-sep {
      text-align: center; color: #9ca3af; font-size: 12px;
      margin: 16px 0; position: relative;
    }
    .chat-date-sep span {
      background: #fff; padding: 0 12px; position: relative; z-index: 1;
    }
    .chat-date-sep::before {
      content: ''; position: absolute; left: 0; right: 0; top: 50%;
      border-top: 1px solid #e5e7eb;
    }
    .chat-msg {
      display: flex; gap: 10px; margin-bottom: 12px; padding: 6px 0;
    }
    .chat-avatar {
      width: 36px; height: 36px; border-radius: 6px; flex-shrink: 0;
      display: flex; align-items: center; justify-content: center;
      font-size: 18px; background: #f3f4f6;
    }
    .chat-avatar.user-avatar { background: #3b82f6; color: white; font-size: 14px; font-weight: 700; }
    .chat-avatar.agent-avatar { background: #10b981; color: white; font-size: 16px; }
    .chat-body { flex: 1; min-width: 0; }
    .chat-name { font-weight: 700; font-size: 14px; color: #111827; margin-bottom: 2px; }
    .chat-name .chat-time { font-weight: 400; font-size: 11px; color: #9ca3af; margin-left: 8px; }
    .chat-text { font-size: 14px; color: #374151; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
    .chat-text a { color: #3b82f6; }

    /* Status messages (green dot style like Helena) */
    .chat-status {
      display: flex; align-items: center; gap: 8px;
      padding: 4px 0; margin: 2px 0; color: #6b7280; font-size: 13px;
    }
    .chat-status-dot {
      width: 8px; height: 8px; border-radius: 50%; background: #10b981;
      flex-shrink: 0; animation: statusPulse 1.5s ease-in-out infinite;
    }
    .chat-status-dot.done { animation: none; background: #9ca3af; }
    @keyframes statusPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

    /* Extended thinking bubble */
    .thinking-wrap { width:100%; display:flex; flex-direction:column; margin:4px 0; }
    .thinking-toggle {
      display:inline-flex; align-items:center; gap:6px; padding:6px 14px;
      background:#f5f3ff; border:1px solid #ddd6fe; border-radius:20px;
      cursor:pointer; font-size:12px; color:#7c3aed; font-weight:500;
      margin-left:62px; width:fit-content; user-select:none;
    }
    .thinking-toggle .th-dot {
      width:7px; height:7px; border-radius:50%; background:#7c3aed;
      animation: statusPulse 1.2s ease-in-out infinite; flex-shrink:0;
    }
    .thinking-toggle.done .th-dot { animation:none; background:#a78bfa; }
    .thinking-body {
      display:none; margin:6px 0 4px 62px; padding:10px 14px;
      background:#faf5ff; border:1px solid #ede9fe; border-radius:12px;
      font-size:12px; color:#6b21a8; line-height:1.6; white-space:pre-wrap;
      max-height:300px; overflow-y:auto;
    }
    .thinking-body.open { display:block; }

    /* Chat input bar */
    .chat-input-bar {
      padding: 12px 20px; border-top: 1px solid #e5e7eb; background: #fff;
      display: flex; align-items: center; gap: 8px; flex-shrink: 0;
    }
    .chat-attach-btn {
      width: 32px; height: 32px; border-radius: 50%; border: 1px solid #d1d5db;
      background: white; cursor: pointer; font-size: 16px; color: #6b7280;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0; transition: background 0.15s;
    }
    .chat-attach-btn:hover { background: #f3f4f6; }
    .chat-input {
      flex: 1; padding: 10px 16px; border: 1px solid #d1d5db; border-radius: 20px;
      font-size: 14px; outline: none; font-family: inherit;
      transition: border-color 0.2s;
    }
    .chat-input:focus { border-color: #3b82f6; }
    .chat-send-btn {
      width: 32px; height: 32px; border-radius: 50%; border: none;
      background: #111827; color: white; cursor: pointer; font-size: 14px;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0; transition: background 0.15s;
    }
    .chat-send-btn:hover { background: #374151; }
    /* + menu button */
    .chat-plus-btn {
      width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid #e5e7eb;
      background: white; cursor: pointer; font-size: 18px; display: flex;
      align-items: center; justify-content: center; flex-shrink: 0;
      color: #6b7280; transition: all .15s; line-height: 1;
    }
    .chat-plus-btn:hover { border-color: #9ca3af; color: #374151; }

    /* + menu popup */
    .chat-plus-menu {
      position: absolute; bottom: 52px; left: 12px; z-index: 200;
      background: white; border: 1px solid #e5e7eb; border-radius: 14px;
      box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 6px; min-width: 210px;
      display: none;
    }
    .chat-plus-menu.open { display: block; }
    .chat-plus-menu-item {
      display: flex; align-items: center; gap: 10px; padding: 9px 12px;
      border-radius: 8px; cursor: pointer; font-size: 14px; color: #111827;
      transition: background .1s; border: none; background: none; width: 100%;
      text-align: left; font-family: inherit;
    }
    .chat-plus-menu-item:hover { background: #f3f4f6; }
    .chat-plus-menu-item .pm-icon { font-size: 16px; width: 22px; text-align: center; }
    .chat-plus-menu-item.active { background: #f5f3ff; color: #7c3aed; }
    .chat-plus-menu-item.active .pm-check { display: block !important; }
    .chat-plus-menu hr { border: none; border-top: 1px solid #f3f4f6; margin: 4px 0; }

    /* Active mode tags above input */
    .chat-mode-tags {
      display: flex; gap: 6px; flex-wrap: wrap;
      padding: 6px 16px 0; min-height: 0;
    }
    .chat-mode-tag {
      display: inline-flex; align-items: center; gap: 4px;
      padding: 2px 10px; border-radius: 20px; font-size: 12px; font-weight: 500;
      cursor: pointer;
    }
    .chat-mode-tag.search { background: #e0f2fe; color: #0369a1; }
    .chat-mode-tag.think  { background: #f5f3ff; color: #7c3aed; }
    .chat-mode-tag .tag-x { font-size: 10px; opacity: .7; margin-left: 2px; }

    /* ── Slash Command Popup ── */
    .slash-popup {
      position: fixed; background: #fff; border: 1px solid #e5e7eb;
      border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.14);
      padding: 6px; z-index: 9000; width: 280px; display: none;
    }
    .slash-popup.open { display: block; }
    .slash-popup-header {
      padding: 6px 12px 8px; font-size: 10px; font-weight: 600;
      color: #9ca3af; letter-spacing: .8px; text-transform: uppercase;
    }
    .slash-tool-item {
      display: flex; align-items: center; gap: 12px; padding: 9px 12px;
      border-radius: 9px; cursor: pointer; transition: background .1s;
    }
    .slash-tool-item:hover, .slash-tool-item.selected { background: #f3f4f6; }
    .slash-tool-icon {
      width: 32px; height: 32px; border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      font-size: 16px; flex-shrink: 0;
    }
    .slash-tool-info { flex: 1; min-width: 0; }
    .slash-tool-name { font-size: 13px; font-weight: 600; color: #111827; }
    .slash-tool-desc { font-size: 11px; color: #9ca3af; margin-top: 1px; }
    .slash-tool-badge {
      font-size: 10px; padding: 2px 7px; border-radius: 999px; font-weight: 500;
    }
    .slash-tool-badge.text { background: #dbeafe; color: #1d4ed8; }
    .slash-tool-badge.panel { background: #f3e8ff; color: #7c3aed; }

    /* ── Tool Back Button (floating, shown on tool pages) ── */
    #tool-back-btn {
      position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
      background: #111827; color: white; border: none; border-radius: 999px;
      padding: 9px 20px; font-size: 13px; font-weight: 600; cursor: pointer;
      display: none; align-items: center; gap: 8px; z-index: 3000;
      box-shadow: 0 4px 20px rgba(0,0,0,.3); transition: all .2s;
      white-space: nowrap;
    }
    #tool-back-btn.show { display: flex; }
    #tool-back-btn:hover { background: #374151; transform: translateX(-50%) translateY(-1px); }

    /* ── Report Card (Daily Briefing / Weekly Report in chat) ── */
    .report-card {
      border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden;
      margin: 6px 0; background: #fff; max-width: 520px;
      box-shadow: 0 1px 4px rgba(0,0,0,.06);
    }
    .report-card-header {
      display: flex; align-items: center; gap: 8px;
      padding: 11px 14px; border-bottom: 1px solid #f0f0f0;
      background: #fafafa;
    }
    .report-card-title { font-size: 13px; font-weight: 700; color: #111827; flex: 1; }
    .report-card-date  { font-size: 11px; color: #9ca3af; }
    .report-card-badge {
      font-size: 10px; padding: 2px 8px; border-radius: 999px;
      background: #ede9fe; color: #6366f1; font-weight: 600;
    }
    .report-card-body {
      padding: 14px; font-size: 13px; color: #374151; line-height: 1.7;
      max-height: 280px; overflow-y: auto; transition: max-height .3s ease;
    }
    .report-card-body.collapsed { max-height: 72px; overflow: hidden; position: relative; }
    .report-card-body.collapsed::after {
      content: ''; position: absolute; bottom: 0; left: 0; right: 0;
      height: 36px; background: linear-gradient(transparent, white);
    }
    .report-card-footer {
      display: flex; align-items: center; gap: 8px; padding: 8px 14px;
      border-top: 1px solid #f0f0f0; background: #fafafa;
    }
    .report-card-wc { font-size: 11px; color: #9ca3af; flex: 1; }
    .report-card-btn {
      display: flex; align-items: center; gap: 5px; padding: 5px 12px;
      border: 1px solid #e5e7eb; border-radius: 7px; background: white;
      font-size: 11px; color: #6b7280; cursor: pointer; transition: all .15s;
      font-family: inherit;
    }
    .report-card-btn:hover { border-color: #6366f1; color: #6366f1; }

    /* ── Tool Result Card (posted back to chat) ── */
    .tool-result-card {
      margin: 4px 0 8px 52px; border: 1px solid #e5e7eb; border-radius: 12px;
      overflow: hidden; background: #f9fafb;
    }
    .tool-result-header {
      display: flex; align-items: center; gap: 8px; padding: 10px 14px;
      background: #fff; border-bottom: 1px solid #f0f0f0;
      font-size: 13px; font-weight: 600; color: #111827;
    }
    .tool-result-body { padding: 12px 14px; font-size: 13px; color: #374151; line-height: 1.6; }

    /* Attach popup menu */
    .attach-popup {
      position: fixed; background: #fff; border: 1px solid #e5e7eb;
      border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
      padding: 6px; z-index: 9999; min-width: 150px; display: none;
    }
    .attach-popup.open { display: block; }
    .attach-popup-item {
      display: flex; align-items: center; gap: 10px; padding: 9px 14px;
      border-radius: 7px; cursor: pointer; font-size: 13px; color: #374151;
      transition: background .12s;
    }
    .attach-popup-item:hover { background: #f3f4f6; }

    /* Three-dot dropdown */
    .chat-dots-menu {
      position: fixed; background: #fff; border: 1px solid #e5e7eb;
      border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
      padding: 6px; z-index: 9999; min-width: 160px; display: none;
    }
    .chat-dots-menu.open { display: block; }
    .chat-dots-item {
      display: flex; align-items: center; gap: 10px; padding: 9px 14px;
      border-radius: 7px; cursor: pointer; font-size: 13px; color: #374151;
      transition: background .12s;
    }
    .chat-dots-item:hover { background: #f3f4f6; }
    .chat-dots-btn {
      width: 30px; height: 30px; border: none; background: none; cursor: pointer;
      font-size: 18px; color: #9ca3af; border-radius: 6px; display: flex;
      align-items: center; justify-content: center; transition: background .12s;
      flex-shrink: 0;
    }
    .chat-dots-btn:hover { background: #f3f4f6; color: #374151; }

    /* ── Capri Analysis Thinking Bubble (Claude-style) ── */
    .capri-think-wrap { margin: 4px 0 8px 62px; max-width: 520px; }
    .capri-think-toggle {
      display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px;
      background: #f5f3ff; border: 1px solid #ede9fe; border-radius: 20px;
      cursor: pointer; font-size: 12px; color: #7c3aed; font-weight: 500;
      user-select: none; transition: background .12s;
    }
    .capri-think-toggle:hover { background: #ede9fe; }
    .capri-think-toggle .ct-dot {
      width: 7px; height: 7px; border-radius: 50%; background: #7c3aed;
      animation: statusPulse 1.2s ease-in-out infinite; flex-shrink: 0;
    }
    .capri-think-toggle.done .ct-dot { animation: none; background: #a78bfa; }
    .capri-think-toggle .ct-arrow { font-size: 10px; color: #a78bfa; transition: transform .2s; }
    .capri-think-wrap.open .capri-think-toggle .ct-arrow { transform: rotate(180deg); }
    .capri-think-body {
      max-height: 0; overflow: hidden; transition: max-height .3s ease;
      margin-top: 6px; border-left: 2px solid #ede9fe; padding-left: 12px;
    }
    .capri-think-wrap.open .capri-think-body {
      max-height: 220px; overflow-y: auto;
    }
    .capri-think-body::-webkit-scrollbar { width: 3px; }
    .capri-think-body::-webkit-scrollbar-thumb { background: #ddd6fe; border-radius: 2px; }
    .capri-think-log {
      font-size: 12px; line-height: 1.6; color: #6b7280;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    }
    .capri-think-log.success { color: #059669; }
    .capri-think-log.insight { color: #7c3aed; font-weight: 500; }

    /* Social Posts Modal tabs */
    .sp-tab {
      padding: 10px 14px; font-size: 12px; color: #6b7280; cursor: pointer;
      border: none; background: none; border-bottom: 2px solid transparent;
      white-space: nowrap; font-weight: 500; transition: all .15s;
    }
    .sp-tab:hover { color: #111827; }
    .sp-tab.active { color: #6366f1; border-bottom-color: #6366f1; }

    /* ── Analysis Result Cards (inline in chat, light theme matching report-card) ── */
    @keyframes cardSlideIn {
      from { opacity: 0; transform: translateY(12px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    .analysis-card {
      margin: 6px 0 6px 62px; border: 1px solid #e5e7eb; border-radius: 12px;
      overflow: hidden; background: #fff; max-width: 520px;
      box-shadow: 0 1px 4px rgba(0,0,0,.06);
      animation: cardSlideIn .4s ease-out;
    }
    .analysis-card-header {
      display: flex; align-items: center; gap: 8px;
      padding: 11px 14px; border-bottom: 1px solid #f0f0f0;
      background: #fafafa; cursor: pointer; user-select: none;
      transition: background .15s;
    }
    .analysis-card-header:hover { background: #f3f4f6; }
    .analysis-card-icon {
      width: 28px; height: 28px; border-radius: 7px;
      display: flex; align-items: center; justify-content: center;
      font-size: 14px; flex-shrink: 0;
    }
    .analysis-card-title {
      flex: 1; font-size: 13px; font-weight: 700; color: #111827;
    }
    .analysis-card-badge {
      font-size: 10px; padding: 2px 8px; border-radius: 999px;
      font-weight: 600;
    }
    .analysis-card-toggle {
      color: #9ca3af; font-size: 12px; transition: transform .2s;
    }
    .analysis-card.expanded .analysis-card-toggle { transform: rotate(180deg); }
    .analysis-card-body {
      max-height: 0; overflow: hidden; transition: max-height .35s ease;
      padding: 0 14px; opacity: 0;
    }
    .analysis-card.expanded .analysis-card-body {
      max-height: 600px; padding: 12px 14px; opacity: 1;
    }
    .analysis-card-body p, .analysis-card-body li {
      font-size: 12.5px; color: #374151; line-height: 1.7; margin: 0;
    }
    .analysis-card-body ul { padding-left: 16px; margin: 6px 0; }
    .analysis-card-divider {
      height: 1px; background: #f0f0f0; margin: 8px 0;
    }
    .analysis-card-label {
      font-size: 10px; color: #9ca3af; text-transform: uppercase;
      letter-spacing: .5px; margin-bottom: 4px; font-weight: 600;
    }
    .analysis-card-value {
      font-size: 12.5px; color: #374151; line-height: 1.6;
    }
    .analysis-card-row {
      display: flex; justify-content: space-between; align-items: center;
      padding: 4px 0;
    }
    .analysis-card-chip {
      display: inline-block; font-size: 10px; padding: 2px 8px;
      border-radius: 999px; background: #f3f4f6;
      color: #6b7280; margin: 2px 2px;
    }
    .analysis-card-footer {
      display: flex; align-items: center; gap: 8px; padding: 8px 14px;
      border-top: 1px solid #f0f0f0; background: #fafafa;
    }
    .analysis-card-footer-btn {
      display: flex; align-items: center; gap: 5px; padding: 5px 12px;
      border: 1px solid #e5e7eb; border-radius: 7px; background: white;
      font-size: 11px; color: #6b7280; cursor: pointer; transition: all .15s;
    }
    .analysis-card-footer-btn:hover { border-color: #6366f1; color: #6366f1; }

    /* Card icon variants */
    .card-product .analysis-card-icon { background: #ede9fe; }
    .card-brand .analysis-card-icon { background: #fce7f3; }
    .card-competitors .analysis-card-icon { background: #fef3c7; }
    .card-seo .analysis-card-icon { background: #d1fae5; }
    .card-social .analysis-card-icon { background: #dbeafe; }
    .card-summary .analysis-card-icon { background: #ede9fe; }

    /* SEO score circle */
    .seo-score-circle {
      width: 44px; height: 44px; border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 16px; font-weight: 800; color: white; flex-shrink: 0;
    }
    .seo-score-circle.good { background: linear-gradient(135deg, #10b981, #059669); }
    .seo-score-circle.warn { background: linear-gradient(135deg, #f59e0b, #d97706); }
    .seo-score-circle.bad  { background: linear-gradient(135deg, #ef4444, #dc2626); }

    /* Opportunity card */
    .analysis-opp-card {
      margin: 6px 0 6px 62px; border: 1px solid #e5e7eb; border-radius: 12px;
      overflow: hidden; background: #fff; max-width: 520px;
      box-shadow: 0 1px 4px rgba(0,0,0,.06);
      animation: cardSlideIn .4s ease-out;
      display: flex; align-items: center; gap: 12px;
      padding: 12px 14px;
    }
    .opp-score {
      width: 40px; height: 40px; border-radius: 10px;
      display: flex; align-items: center; justify-content: center;
      font-size: 16px; font-weight: 800; color: white; flex-shrink: 0;
    }
    .opp-score.high { background: linear-gradient(135deg, #10b981, #059669); }
    .opp-score.mid  { background: linear-gradient(135deg, #f59e0b, #d97706); }
    .opp-score.low  { background: linear-gradient(135deg, #6b7280, #4b5563); }
    .opp-info { flex: 1; min-width: 0; }
    .opp-name { font-size: 13px; font-weight: 700; color: #111827; }
    .opp-reason { font-size: 11px; color: #6b7280; margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .opp-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
    .opp-hire-btn {
      padding: 6px 14px; border-radius: 8px; font-size: 11px; font-weight: 600;
      background: #6366f1; color: white; border: none; cursor: pointer;
      transition: background .15s;
    }
    .opp-hire-btn:hover { background: #4f46e5; }
    .opp-dismiss-btn {
      width: 24px; height: 24px; border-radius: 6px;
      border: 1px solid #e5e7eb; background: white; color: #9ca3af;
      cursor: pointer; font-size: 12px;
      display: flex; align-items: center; justify-content: center;
      transition: all .15s;
    }
    .opp-dismiss-btn:hover { border-color: #ef4444; color: #ef4444; background: #fef2f2; }

    /* Summary panel card */
    .analysis-summary-panel {
      margin: 8px 0 8px 62px; border: 1px solid #e5e7eb; border-radius: 12px;
      overflow: hidden; background: #fff; max-width: 520px;
      box-shadow: 0 1px 4px rgba(0,0,0,.06);
      animation: cardSlideIn .4s ease-out;
      padding: 16px 18px;
    }
    .summary-headline {
      font-size: 14px; font-weight: 700; color: #111827;
      line-height: 1.5; margin-bottom: 14px;
    }
    .summary-section-title {
      font-size: 11px; font-weight: 700; color: #6366f1;
      text-transform: uppercase; letter-spacing: .5px;
      margin: 12px 0 6px; display: flex; align-items: center; gap: 6px;
    }
    .summary-item {
      font-size: 12.5px; color: #374151; line-height: 1.7;
      padding: 4px 0 4px 12px;
      border-left: 2px solid #e0e7ff;
      margin-bottom: 4px;
    }
    .summary-item strong { color: #111827; }

    /* Right panel action styles */
    .action-section { margin-bottom: 16px; }
    .action-section-title {
      font-size: 11px; font-weight: 700; color: #6b7280;
      text-transform: uppercase; letter-spacing: .5px;
      margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
    }
    .action-item {
      display: flex; align-items: center; gap: 8px;
      padding: 8px 10px; border-radius: 8px;
      background: rgba(255,255,255,.03); margin-bottom: 4px;
      transition: background .15s;
    }
    .action-item:hover { background: rgba(255,255,255,.06); }
    .action-item-text { flex: 1; font-size: 12px; color: #d1d5db; }
    .action-item-btn {
      padding: 4px 10px; border-radius: 6px; font-size: 10px; font-weight: 600;
      border: 1px solid rgba(99,102,241,.4); color: #a5b4fc;
      background: none; cursor: pointer; transition: all .15s; white-space: nowrap;
    }
    .action-item-btn:hover { background: rgba(99,102,241,.15); border-color: #6366f1; }
    .action-item-btn.upload {
      border-color: rgba(245,158,11,.4); color: #fbbf24;
    }
    .action-item-btn.upload:hover { background: rgba(245,158,11,.15); border-color: #f59e0b; }

    /* Analysis progress in right panel */
    .progress-stages { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
    .progress-stage {
      display: flex; align-items: center; gap: 8px;
      padding: 6px 10px; border-radius: 8px; font-size: 12px;
      color: #4b5563; transition: all .3s;
    }
    .progress-stage .stage-dot {
      width: 8px; height: 8px; border-radius: 50%;
      background: #374151; flex-shrink: 0; transition: all .3s;
    }
    .progress-stage.active { color: #a5b4fc; background: rgba(99,102,241,.08); }
    .progress-stage.active .stage-dot { background: #6366f1; animation: termPulse 1.2s ease-in-out infinite; }
    .progress-stage.done { color: #6ee7b7; }
    .progress-stage.done .stage-dot { background: #10b981; }

    /* Chat Search Modal */
    #chat-search-overlay { display: none; }
    #chat-search-overlay.open { display: flex !important; }
    .cs-modal {
      background: #f5f5f5; border-radius: 12px; width: min(520px, 92vw); max-height: 75vh;
      display: flex; flex-direction: column; overflow: hidden;
      box-shadow: 0 20px 60px rgba(0,0,0,.3);
      animation: csModalIn .2s ease;
    }
    @keyframes csModalIn { from { opacity:0; transform: scale(.96) translateY(6px); } to { opacity:1; transform: none; } }
    .cs-msg-highlight { animation: csMsgFlash 2s ease; }
    @keyframes csMsgFlash { 0%,30% { background: rgba(99,102,241,.15); } 100% { background: transparent; } }
    .cs-title {
      text-align: center; font-size: 14px; font-weight: 600; color: #1a1a1a;
      padding: 16px 16px 12px; letter-spacing: -.2px;
    }
    .cs-search-box {
      display: flex; align-items: center; gap: 6px; background: #fff;
      border: 2px solid #07c160; border-radius: 8px; padding: 8px 12px;
    }
    .cs-tabs {
      display: flex; gap: 0; border-bottom: 1px solid #e0e0e0; padding: 0 16px;
      overflow-x: auto; -webkit-overflow-scrolling: touch; flex-shrink: 0;
    }
    .cs-tabs::-webkit-scrollbar { display: none; }
    .cs-tab {
      padding: 10px 16px; font-size: 13px; color: #07c160; cursor: pointer;
      white-space: nowrap; border-bottom: 2px solid transparent; transition: all .15s;
      font-weight: 500;
    }
    .cs-tab:hover { background: rgba(7,193,96,.05); }
    .cs-tab.active { color: #07c160; border-bottom-color: #07c160; }
    .cs-result-item {
      padding: 14px 20px; border-bottom: 1px solid #f3f4f6; cursor: pointer;
      transition: background .12s;
    }
    .cs-result-item:hover { background: #f9fafb; }
    .cs-result-sender { font-size: 12px; color: #9ca3af; margin-bottom: 3px; }
    .cs-result-text { font-size: 14px; color: #111827; line-height: 1.4; }
    .cs-result-text mark { background: #fef08a; border-radius: 2px; }
    .cs-result-time { font-size: 11px; color: #d1d5db; margin-top: 3px; }
    .cs-section-header {
      padding: 10px 20px 6px; font-size: 11px; font-weight: 600;
      color: #9ca3af; text-transform: uppercase; letter-spacing: .5px;
      background: #fafafa; border-bottom: 1px solid #f0f0f0;
    }
    .cs-empty { text-align: center; color: #9ca3af; font-size: 14px; padding: 48px 20px; }

    /* Right panel sections */
    .rp-section {
      border-bottom: 1px solid #e5e7eb; padding: 14px 16px;
    }
    .rp-section-header {
      display: flex; align-items: center; justify-content: space-between;
      font-weight: 600; font-size: 13px; color: #374151; cursor: pointer;
      margin-bottom: 10px;
    }
    .rp-section-header .rp-collapse { color: #9ca3af; font-size: 10px; }
    .rp-link { color: #10b981; font-size: 12px; cursor: pointer; font-weight: 500; }
    .rp-link:hover { text-decoration: underline; }
    .rp-metric-row {
      display: flex; gap: 8px; margin-bottom: 10px;
    }
    .rp-metric-card {
      flex: 1; padding: 10px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff;
    }
    .rp-metric-label { font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.5px; }
    .rp-metric-sublabel { font-size: 11px; color: #9ca3af; }
    .rp-channel-row {
      display: flex; align-items: center; justify-content: space-between;
      margin-bottom: 8px;
    }
    .rp-autopilot {
      display: flex; align-items: center; gap: 6px; font-size: 12px; color: #6b7280;
    }
    .rp-toggle {
      width: 36px; height: 20px; border-radius: 10px; background: #d1d5db;
      position: relative; cursor: pointer; transition: background 0.2s;
    }
    .rp-toggle.on { background: #10b981; }
    .rp-toggle::after {
      content: ''; position: absolute; top: 2px; left: 2px;
      width: 16px; height: 16px; border-radius: 50%; background: white;
      transition: transform 0.2s;
    }
    .rp-toggle.on::after { transform: translateX(16px); }
    .rp-add-channel {
      display: flex; align-items: center; gap: 8px; padding: 8px 0;
      color: #6b7280; font-size: 13px; cursor: pointer; border: none; background: none;
      font-family: inherit;
    }
    .rp-add-channel:hover { color: #374151; }
    .rp-task-item {
      padding: 10px; border: 1px solid #e5e7eb; border-radius: 8px;
      background: #fff; margin-bottom: 8px;
    }
    .rp-task-title { font-weight: 600; font-size: 13px; color: #111827; }
    .rp-task-meta { font-size: 11px; color: #9ca3af; margin-top: 4px; display: flex; align-items: center; gap: 6px; }
    .rp-kb-item {
      display: flex; align-items: center; justify-content: space-between;
      padding: 10px; border: 1px solid #e5e7eb; border-radius: 8px;
      background: #fff; margin-bottom: 6px; cursor: pointer;
      transition: background 0.15s;
    }
    .rp-kb-item:hover { background: #f9fafb; }
    .rp-kb-icon { width: 28px; height: 28px; border-radius: 6px; background: #f3f4f6; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
    .rp-kb-info { flex: 1; margin-left: 10px; }
    .rp-kb-name { font-weight: 600; font-size: 13px; color: #111827; }
    .rp-kb-date { font-size: 11px; color: #9ca3af; }

    /* KB detail modal */
    .kb-modal-overlay {
      display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4);
      z-index: 1000; align-items: center; justify-content: center;
    }
    .kb-modal-overlay.show { display: flex; }
    .kb-modal {
      background: white; border-radius: 16px; max-width: 720px; width: 92%;
      max-height: 85vh; overflow-y: auto; padding: 0;
      box-shadow: 0 20px 60px rgba(0,0,0,.2);
    }
    .kb-modal-header {
      display: flex; align-items: center; gap: 12px; padding: 20px 24px;
      border-bottom: 1px solid #f0f0f0; position: sticky; top: 0; background: white;
      z-index: 1; border-radius: 16px 16px 0 0;
    }
    .kb-modal-header h2 { font-size: 17px; font-weight: 700; color: #111827; margin: 0; flex: 1; }
    .kb-modal-actions { display: flex; gap: 6px; }
    .kb-modal-btn {
      padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 600;
      border: 1px solid #e5e7eb; background: white; color: #374151;
      cursor: pointer; transition: all .15s; display: flex; align-items: center; gap: 4px;
    }
    .kb-modal-btn:hover { border-color: #6366f1; color: #6366f1; }
    .kb-modal-btn.primary { background: #6366f1; color: white; border-color: #6366f1; }
    .kb-modal-btn.primary:hover { background: #4f46e5; }
    .kb-modal-close { background: none; border: none; font-size: 18px; cursor: pointer; color: #9ca3af; padding: 4px; }
    .kb-modal-close:hover { color: #374151; }
    .kb-modal-body { padding: 24px; font-size: 14px; line-height: 1.7; color: #374151; }
    .kb-modal-body table { width: 100%; border-collapse: collapse; margin: 12px 0; }
    .kb-modal-body th, .kb-modal-body td { padding: 10px 14px; border: 1px solid #f0f0f0; text-align: left; font-size: 13px; }
    .kb-modal-body th { background: #f9fafb; font-weight: 600; color: #6b7280; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
    .kb-section { margin-bottom: 20px; }
    .kb-section-title { font-size: 11px; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
    .kb-field { margin-bottom: 12px; }
    .kb-field-label { font-size: 12px; color: #9ca3af; margin-bottom: 2px; }
    .kb-field-value { font-size: 14px; color: #111827; }
    .kb-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #f3f4f6; color: #374151; font-size: 12px; margin: 2px 2px; }
    .kb-chip.green { background: #d1fae5; color: #059669; }
    .kb-chip.red { background: #fee2e2; color: #dc2626; }
    .kb-chip.yellow { background: #fef3c7; color: #d97706; }
    .kb-chip.blue { background: #dbeafe; color: #2563eb; }
    .kb-list-item { padding: 8px 0; border-bottom: 1px solid #f5f5f5; font-size: 13px; }
    .kb-list-item:last-child { border-bottom: none; }
    .kb-score-bar { height: 6px; border-radius: 3px; background: #f3f4f6; overflow: hidden; margin-top: 4px; }
    .kb-score-fill { height: 100%; border-radius: 3px; }

    /* Hire CTA banner */
    .chat-hire-banner {
      text-align: center; padding: 24px; color: #6b7280; font-size: 14px; flex-shrink: 0;
    }
    .chat-hire-btn {
      display: inline-block; padding: 12px 32px; background: #3b82f6; color: white;
      border: none; border-radius: 24px; font-size: 15px; font-weight: 600;
      cursor: pointer; margin-top: 8px; transition: background 0.15s;
    }
    .chat-hire-btn:hover { background: #2563eb; }
    .chat-hire-sub { font-size: 12px; color: #9ca3af; margin-top: 6px; }

    /* ── Performance / Social Analytics ── */
    .perf-card {
      padding: 20px; border: 1px solid #e5e7eb; border-radius: 12px; background: white;
      cursor: pointer; transition: box-shadow 0.2s, border-color 0.2s;
    }
    .perf-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); border-color: #d1d5db; }
    .perf-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
    .perf-card-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; }
    .perf-card-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .perf-stat { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #374151; }
    .perf-stat-icon { color: #9ca3af; font-size: 14px; }
    .perf-stat b { font-weight: 700; }
    .perf-engagement { color: #10b981; font-size: 13px; font-weight: 600; margin-top: 10px; display: flex; align-items: center; gap: 4px; }
    .perf-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 12px; color: #9ca3af; }
    .perf-time-btn {
      padding: 6px 14px; border: none; background: white; cursor: pointer;
      font-size: 13px; color: #6b7280; transition: all 0.15s; font-family: inherit;
    }
    .perf-time-btn:hover { background: #f9fafb; }
    .perf-time-btn.active { background: #f0fdf4; color: #10b981; font-weight: 600; }
    .perf-metric-card {
      padding: 16px; border: 1px solid #e5e7eb; border-radius: 12px; background: white;
    }
    .perf-metric-label { font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.5px; display: flex; justify-content: space-between; align-items: center; }
    .perf-metric-value { font-size: 24px; font-weight: 800; color: #111827; margin-top: 4px; }
    .perf-post-card {
      border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; background: white;
      transition: box-shadow 0.2s;
    }
    .perf-post-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
    .perf-post-thumb { width: 100%; height: 180px; object-fit: cover; background: #f3f4f6; }
    .perf-post-body { padding: 12px; }
    .perf-post-text { font-size: 13px; color: #374151; line-height: 1.4; max-height: 40px; overflow: hidden; margin-bottom: 8px; }
    .perf-post-stats { display: flex; gap: 12px; font-size: 12px; color: #6b7280; }

    /* ── Automation Wizard ── */
    .aw-step {
      display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1;
      position: relative;
    }
    .aw-step::after {
      content: ''; position: absolute; top: 20px; left: 60%; right: -40%;
      height: 2px; background: #e5e7eb;
    }
    .aw-step:last-child::after { display: none; }
    .aw-step.active::after, .aw-step.done::after { background: #ec4899; }
    .aw-step-icon {
      width: 40px; height: 40px; border-radius: 50%; border: 2px solid #e5e7eb;
      display: flex; align-items: center; justify-content: center; font-size: 16px;
      background: white; position: relative; z-index: 1;
    }
    .aw-step.active .aw-step-icon { border-color: #ec4899; background: #ec4899; color: white; }
    .aw-step.done .aw-step-icon { border-color: #ec4899; background: #fce7f3; }
    .aw-step-label { font-size: 11px; color: #9ca3af; }
    .aw-step.active .aw-step-label { color: #ec4899; font-weight: 600; }
    .aw-step.done .aw-step-label { color: #ec4899; }
    .aw-card {
      border: 2px solid #e5e7eb; border-radius: 12px; padding: 16px; cursor: pointer;
      transition: all 0.15s; background: white;
    }
    .aw-card:hover { border-color: #d1d5db; }
    .aw-card.selected { border-color: #ec4899; background: #fdf2f8; }
    .aw-card.selected .aw-check { display: flex; }
    .aw-check {
      display: none; width: 22px; height: 22px; border-radius: 50%;
      background: #ec4899; color: white; align-items: center; justify-content: center;
      font-size: 12px; position: absolute; top: 10px; right: 10px;
    }
    .aw-field { margin-bottom: 18px; }
    .aw-label { font-weight: 700; font-size: 14px; margin-bottom: 6px; display: block; }
    .aw-sublabel { font-size: 12px; color: #6b7280; margin-bottom: 8px; }
    .aw-input {
      width: 100%; padding: 10px 14px; border: 1px solid #d1d5db; border-radius: 8px;
      font-size: 14px; outline: none; font-family: inherit;
    }
    .aw-input:focus { border-color: #ec4899; }
    .aw-textarea { resize: vertical; min-height: 80px; }
    .aw-select {
      width: 100%; padding: 10px 14px; border: 1px solid #d1d5db; border-radius: 8px;
      font-size: 14px; background: white; font-family: inherit; cursor: pointer;
    }
    .aw-checkbox-row {
      display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: 14px;
    }
    .aw-checkbox-row input[type="checkbox"] { accent-color: #ec4899; width: 18px; height: 18px; }
    .aw-radio-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; }
    .aw-radio-row input[type="radio"] { accent-color: #ec4899; width: 18px; height: 18px; }
    .aw-section { border: 1px solid #e5e7eb; border-radius: 12px; padding: 20px; margin-bottom: 16px; }
    .aw-section h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
    .aw-note {
      background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; padding: 12px;
      font-size: 13px; color: #1e40af; margin-bottom: 16px;
    }
    .aw-note b { color: #1e40af; }
    .auto-status { padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
    .auto-status.draft { background: #f3f4f6; color: #6b7280; }
    .auto-status.active { background: #dcfce7; color: #16a34a; }
    .auto-status.paused { background: #fef3c7; color: #d97706; }

    /* ── App shell (right of sidebar) ── */
    #app-shell {
      flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0;
    }

    /* ── Topbar ── */
    #app-topbar {
      height: 56px; background: #fff; border-bottom: 1px solid #e5e7eb;
      display: flex; align-items: center; padding: 0 20px; gap: 10px; flex-shrink: 0;
    }
    .topbar-toggle {
      background: none; border: none; cursor: pointer; font-size: 16px; color: #6b7280;
      padding: 6px; border-radius: 6px; transition: background 0.15s;
    }
    .topbar-toggle:hover { background: #f3f4f6; }
    .topbar-breadcrumb { font-size: 14px; color: #6b7280; }
    .topbar-breadcrumb strong { color: #111827; }
    #topbar-page-name { font-weight: 600; color: #111827; }
    .topbar-spacer { flex: 1; }

    /* ── Header (hidden now — replaced by topbar) ── */
    .header { display: none; }

    /* ── Layout ── */
    #app-main-scroll { flex: 1; overflow-y: auto; }
    .main { max-width: 1100px; margin: 0 auto; padding: 28px 20px; }
    /* Slides tab: break out of .main constraints → full width, natural page scroll */
    .main:has(#tab-chat-main.active) { max-width: none; padding: 0; margin: 0; }
    #app-main-scroll:has(#tab-chat-main.active) { overflow: hidden; }
    .main:has(#tab-slides.active) { max-width: none; padding: 0; margin: 0; }
    #app-main-scroll:has(#tab-slides.active) { overflow-y: auto; }
    /* XHS 信息图 tab: same full-width two-panel */
    .main:has(#tab-xhs.active) { max-width: none; padding: 0; margin: 0; }
    #app-main-scroll:has(#tab-xhs.active) { overflow: hidden; }

    /* ── Badge ── */
    .badge {
      font-size: 11px;
      background: #eff6ff;
      color: #3b82f6;
      padding: 2px 8px;
      border-radius: 20px;
      font-weight: 500;
    }

    .card {
      background: white;
      border-radius: 12px;
      padding: 24px;
      margin-bottom: 20px;
      box-shadow: 0 1px 3px rgba(0,0,0,.07);
    }

    /* ── Form ── */
    .form-row { display: flex; gap: 10px; }
    .input-keyword {
      flex: 1;
      padding: 10px 16px;
      border: 1.5px solid #d1d5db;
      border-radius: 8px;
      font-size: 15px;
      outline: none;
      transition: border-color .2s, box-shadow .2s;
      font-family: inherit;
    }
    .input-keyword:focus {
      border-color: #3b82f6;
      box-shadow: 0 0 0 3px rgba(59,130,246,.12);
    }
    .btn-generate {
      padding: 10px 24px;
      background: #3b82f6;
      color: white;
      border: none;
      border-radius: 8px;
      font-size: 15px;
      font-weight: 500;
      cursor: pointer;
      white-space: nowrap;
      transition: background .15s;
      font-family: inherit;
    }
    .btn-generate:hover:not(:disabled) { background: #2563eb; }
    .btn-generate:disabled { background: #93c5fd; cursor: not-allowed; }

    /* ── Platform checkboxes ── */
    .form-options { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
    .platform-checks { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
    .check-label {
      display: inline-flex; align-items: center; gap: 5px;
      padding: 5px 10px;
      border: 1.5px solid #d1d5db;
      border-radius: 20px;
      font-size: 13px;
      cursor: pointer;
      user-select: none;
      transition: all .15s;
      color: #374151;
    }
    .check-label input { display: none; }
    .check-label.checked { border-color: #3b82f6; background: #eff6ff; color: #1d4ed8; font-weight: 500; }
    .form-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
    .input-num {
      width: 52px;
      padding: 6px 8px;
      border: 1.5px solid #d1d5db;
      border-radius: 8px;
      font-size: 14px;
      text-align: center;
      outline: none;
      font-family: inherit;
      transition: border-color .2s;
    }
    .input-num:focus { border-color: #3b82f6; }
    .meta-label { font-size: 13px; color: #6b7280; white-space: nowrap; }
    .meta-sep { color: #d1d5db; }
    .btn-toggle { font-size: 12px; color: #6b7280; background: none; border: none; cursor: pointer; text-decoration: underline; padding: 0; flex-shrink: 0; }

    /* ── Progress ── */
    #progress-area { display: none; margin-top: 20px; }
    .progress-label {
      font-size: 13px;
      color: #6b7280;
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .spinner {
      width: 14px; height: 14px;
      border: 2px solid #e5e7eb;
      border-top-color: #3b82f6;
      border-radius: 50%;
      animation: spin .7s linear infinite;
      flex-shrink: 0;
    }
    @keyframes spin { to { transform: rotate(360deg); } }

    .progress-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
    }
    .platform-badge {
      display: flex;
      flex-direction: column;
      gap: 6px;
      padding: 12px 14px;
      border: 1.5px solid #e5e7eb;
      border-radius: 10px;
      font-size: 13px;
      transition: border-color .2s;
    }
    .platform-badge .row1 { display: flex; align-items: center; gap: 6px; }
    .dot {
      width: 8px; height: 8px;
      border-radius: 50%;
      background: #d1d5db;
      flex-shrink: 0;
      transition: background .3s;
    }
    .platform-badge.waiting  { border-color: #e5e7eb; }
    .platform-badge.loading  { border-color: #fbbf24; }
    .platform-badge.loading .dot { background: #f59e0b; animation: pulse 1s infinite; }
    .platform-badge.done     { border-color: #86efac; background: #f0fdf4; }
    .platform-badge.done .dot { background: #22c55e; }
    .platform-badge.error    { border-color: #fca5a5; background: #fff5f5; }
    .platform-badge.error .dot { background: #ef4444; }
    .platform-count { font-size: 12px; color: #9ca3af; }
    .platform-badge.done .platform-count { color: #16a34a; }
    @keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .2 } }

    /* ── Report toolbar ── */
    #report-area { display: none; }
    .toolbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 20px;
      padding-bottom: 16px;
      border-bottom: 1px solid #f3f4f6;
    }
    .toolbar-title { font-size: 14px; font-weight: 600; color: #374151; }
    .toolbar-actions { display: flex; gap: 8px; }
    .btn-sm {
      padding: 6px 14px;
      border: 1.5px solid #e5e7eb;
      border-radius: 6px;
      font-size: 13px;
      background: white;
      cursor: pointer;
      font-family: inherit;
      transition: all .15s;
      color: #374151;
    }
    .btn-sm:hover { background: #f9fafb; border-color: #9ca3af; }
    .btn-sm.copied { background: #f0fdf4; border-color: #86efac; color: #16a34a; }

    /* ── Report HTML styles ── */
    #report-content { font-size: 14px; color: #374151; line-height: 1.6; }

    .rpt-header { margin-bottom: 24px; }
    .rpt-header h1 { font-size: 20px; color: #111827; margin-bottom: 6px; }
    .rpt-meta { font-size: 13px; color: #9ca3af; }

    .rpt-h2 {
      font-size: 15px; font-weight: 600; color: #111827;
      margin: 28px 0 12px;
      padding-bottom: 8px;
      border-bottom: 1px solid #f3f4f6;
    }
    .rpt-h3 { font-size: 14px; font-weight: 600; color: #1f2937; margin: 20px 0 8px; }
    .rpt-empty { color: #9ca3af; font-size: 13px; padding: 8px 0; }

    /* General table */
    .rpt-table {
      width: 100%;
      border-collapse: collapse;
      margin-bottom: 8px;
      font-size: 13px;
    }
    .rpt-table th {
      background: #f9fafb;
      padding: 8px 10px;
      text-align: left;
      border: 1px solid #e5e7eb;
      font-weight: 600;
      color: #374151;
      white-space: nowrap;
    }
    .rpt-table td {
      padding: 8px 10px;
      border: 1px solid #e5e7eb;
      vertical-align: top;
    }
    .rpt-table tr:hover td { background: #fafafa; }
    .rpt-table a { color: #3b82f6; text-decoration: none; }
    .rpt-table a:hover { text-decoration: underline; }

    /* Posts table specifics */
    .rpt-posts td { vertical-align: middle; }
    .td-thumb { width: 100px; padding: 6px !important; }
    .td-content { max-width: 240px; }
    .td-tags { max-width: 180px; }
    .td-type { white-space: nowrap; font-size: 12px; }
    .td-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
    .td-date { white-space: nowrap; color: #9ca3af; font-size: 12px; }
    .td-author { max-width: 110px; }
    .td-link { text-align: center; }

    .rpt-thumb {
      width: 88px; height: 66px;
      object-fit: cover;
      border-radius: 4px;
      display: block;
      background: #f3f4f6;
    }
    .rpt-thumb-placeholder {
      width: 88px; height: 66px;
      background: #f3f4f6;
      border-radius: 4px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 22px;
    }
    .rpt-title {
      font-weight: 500;
      color: #111827;
      font-size: 13px;
      line-height: 1.4;
      margin-bottom: 4px;
    }
    .rpt-text {
      font-size: 12px;
      color: #6b7280;
      line-height: 1.4;
    }
    /* Post detail slide-in panel */
    .post-detail-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 1000; opacity: 0; transition: opacity .2s; pointer-events: none; }
    .post-detail-overlay.open { opacity: 1; pointer-events: auto; }
    .post-detail-panel { position: fixed; top: 0; right: -520px; width: 520px; height: 100vh; background: white; z-index: 1001; overflow-y: auto; transition: right .3s ease; box-shadow: -4px 0 20px rgba(0,0,0,.1); }
    .post-detail-panel.open { right: 0; }
    .post-detail-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 22px; cursor: pointer; color: #6b7280; z-index: 2; }
    .post-detail-content { padding: 28px; }
    .post-detail-content h2 { font-size: 18px; font-weight: 700; margin-bottom: 16px; line-height: 1.4; }
    .post-detail-content .pd-platform { display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 10px; font-weight: 600; margin-bottom: 12px; }
    .post-detail-content .pd-meta { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
    .post-detail-content .pd-meta-item { font-size: 13px; color: #6b7280; }
    .post-detail-content .pd-meta-item strong { color: #111827; }
    .post-detail-content .pd-thumb { width: 100%; max-height: 300px; object-fit: cover; border-radius: 10px; margin-bottom: 16px; }
    .post-detail-content .pd-section { margin-bottom: 20px; }
    .post-detail-content .pd-section-title { font-size: 13px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
    .post-detail-content .pd-text { font-size: 14px; line-height: 1.7; color: #374151; white-space: pre-wrap; word-break: break-word; background: #f9fafb; padding: 16px; border-radius: 10px; border: 1px solid #e5e7eb; position: relative; }
    .post-detail-content .pd-copy-btn { position: absolute; top: 8px; right: 8px; padding: 4px 10px; background: #111827; color: white; border: none; border-radius: 6px; font-size: 11px; cursor: pointer; opacity: 0; transition: opacity .15s; }
    .post-detail-content .pd-text:hover .pd-copy-btn { opacity: 1; }
    .post-detail-content .pd-tags { display: flex; flex-wrap: wrap; gap: 6px; }
    .post-detail-content .pd-tag { display: inline-block; background: #eff6ff; color: #3b82f6; font-size: 12px; padding: 3px 10px; border-radius: 10px; }
    .post-detail-content .pd-actions { display: flex; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid #e5e7eb; }
    .post-detail-content .pd-action-btn { padding: 10px 18px; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid #d1d5db; background: white; color: #374151; transition: all .15s; }
    .post-detail-content .pd-action-btn:hover { border-color: #3b82f6; color: #3b82f6; }
    .post-detail-content .pd-action-btn.primary { background: #111827; color: white; border-color: #111827; }
    .post-detail-content .pd-action-btn.primary:hover { background: #374151; }
    .rpt-posts tbody tr { cursor: pointer; transition: background .15s; }
    .rpt-posts tbody tr:hover { background: #f8faff; }

    .rpt-tag {
      display: inline-block;
      background: #eff6ff;
      color: #3b82f6;
      font-size: 11px;
      padding: 1px 6px;
      border-radius: 10px;
      margin: 1px 2px 1px 0;
      white-space: nowrap;
    }
    .rpt-link {
      display: inline-block;
      padding: 3px 8px;
      background: #3b82f6;
      color: white !important;
      border-radius: 4px;
      font-size: 12px;
      text-decoration: none !important;
    }
    .rpt-link:hover { background: #2563eb; }
    .rpt-author {
      font-size: 12px;
      color: #374151;
      word-break: break-all;
    }
    a.rpt-author { color: #3b82f6; }

    /* ── Gemini Insight Section ── */
    .rpt-insight-summary {
      background: linear-gradient(135deg, #eff6ff, #f0fdf4);
      border: 1px solid #bfdbfe;
      border-radius: 10px;
      padding: 14px 18px;
      font-size: 14px;
      font-weight: 500;
      color: #1e40af;
      margin-bottom: 16px;
      line-height: 1.6;
    }
    .rpt-insight-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 14px;
      margin-bottom: 16px;
    }
    .rpt-insight-card {
      background: #fafafa;
      border: 1px solid #e5e7eb;
      border-radius: 10px;
      padding: 14px 16px;
    }
    .rpt-insight-title {
      font-size: 13px;
      font-weight: 600;
      color: #111827;
      margin-bottom: 10px;
    }
    .rpt-insight-card ul {
      margin: 0;
      padding-left: 16px;
    }
    .rpt-insight-card li {
      font-size: 13px;
      color: #374151;
      line-height: 1.7;
    }

    /* ── Tab navigation ── */
    .tabs {
      display: flex;
      gap: 4px;
      margin-bottom: 20px;
      border-bottom: 2px solid #e5e7eb;
      padding-bottom: 0;
    }
    .tab-btn { display: none; } /* replaced by sidebar */
    .tabs { display: none; }    /* replaced by sidebar */
    .tab-pane { display: none; }
    .tab-pane.active { display: block; }

    /* ── Account form extras ── */
    .acct-platform-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
    .acct-platform-btn {
      padding: 6px 14px;
      border: 1.5px solid #d1d5db;
      border-radius: 20px;
      font-size: 13px;
      cursor: pointer;
      background: white;
      font-family: inherit;
      transition: all .15s;
      color: #374151;
    }
    .acct-platform-btn.active { border-color: #3b82f6; background: #eff6ff; color: #1d4ed8; font-weight: 500; }
    .acct-platform-btn.disabled { opacity: .45; cursor: not-allowed; }
    .acct-options { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
    .sort-toggle { display: flex; border: 1.5px solid #d1d5db; border-radius: 8px; overflow: hidden; }
    .sort-btn {
      padding: 6px 12px; font-size: 13px; border: none; background: white;
      cursor: pointer; font-family: inherit; color: #374151; transition: background .15s;
    }
    .sort-btn.active { background: #3b82f6; color: white; }

    /* ── 内容解析 tab ── */
    .scrape-hint { color: #6b7280; font-size: 13px; margin: 0 0 10px; }
    .scrape-stats { display: flex; gap: 16px; flex-wrap: wrap; margin: 8px 0 14px; font-size: 14px; color: #374151; }
    .scrape-stats span { background: #f3f4f6; padding: 4px 10px; border-radius: 20px; }
    .scrape-title { font-size: 18px; font-weight: 700; color: #111827; margin: 12px 0 8px; line-height: 1.4; }
    .scrape-text { font-size: 14px; line-height: 1.8; color: #374151; white-space: pre-wrap;
      background: #f9fafb; border-radius: 8px; padding: 14px 16px; margin: 8px 0 12px; }
    .scrape-tags { margin: 4px 0 16px; }
    .scrape-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 12px; margin: 12px 0 20px; }
    .scrape-img-wrap { position: relative; border-radius: 10px; overflow: hidden;
      background: #f3f4f6; aspect-ratio: 3/4; }
    .scrape-img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .scrape-img-dl { position: absolute; bottom: 6px; right: 6px;
      background: rgba(0,0,0,.55); color: white; font-size: 11px; padding: 3px 8px;
      border-radius: 6px; text-decoration: none; transition: background .15s; }
    .scrape-img-dl:hover { background: rgba(0,0,0,.8); }
    .btn-dl-all { display: inline-flex; align-items: center; gap: 6px;
      background: #0f766e; color: white; border: none; border-radius: 8px;
      padding: 8px 18px; font-size: 13px; font-weight: 600; cursor: pointer;
      font-family: inherit; margin-bottom: 12px; transition: opacity .15s; }
    .btn-dl-all:hover { opacity: .85; }
    .btn-dl-all:disabled { opacity: .5; cursor: not-allowed; }
    /* ── Slides tab ──────────────────────────────────────────────── */
    .slides-textarea { width: 100%; box-sizing: border-box; border: 1.5px solid #e5e7eb;
      border-radius: 10px; padding: 12px 14px; font-size: 14px; font-family: inherit;
      resize: vertical; min-height: 80px; outline: none; transition: border .15s; }
    .slides-textarea:focus { border-color: #3b82f6; }
    .slides-select { border: 1.5px solid #e5e7eb; border-radius: 8px; padding: 8px 10px;
      font-size: 13px; font-family: inherit; background: white; cursor: pointer; outline: none; }
    .slides-section-title { font-size: 15px; font-weight: 700; color: #111827; margin: 0 0 10px; }
    .slides-plan-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
    .slides-caption-box { background: #f8fafc; border-radius: 8px; padding: 12px 14px;
      font-size: 14px; color: #374151; line-height: 1.6; white-space: pre-wrap; }
    .slides-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
    /* Slot grid */
    .slides-slots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
    .slides-slot { border: 2px dashed #d1d5db; border-radius: 12px; overflow: hidden;
      display: flex; flex-direction: column; transition: border-color .15s; }
    .slides-slot:hover { border-color: #3b82f6; }
    .slides-slot.has-image { border-style: solid; border-color: #10b981; }
    .slides-slot-header { background: #f9fafb; padding: 8px 10px; font-size: 12px;
      color: #6b7280; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
    .slot-del-btn { margin-left: auto; background: none; border: none; color: #d1d5db;
      font-size: 13px; cursor: pointer; padding: 2px 5px; border-radius: 4px; line-height: 1; }
    .slot-del-btn:hover { background: #fee2e2; color: #ef4444; }
    .slides-slot-add { border-style: dashed; display: flex; align-items: center; justify-content: center;
      min-height: 80px; cursor: pointer; }
    .slot-add-btn { background: none; border: none; font-size: 15px; font-weight: 600;
      color: #9ca3af; cursor: pointer; padding: 20px; font-family: inherit; width: 100%; height: 100%; }
    .slot-add-btn:hover { color: #3b82f6; }
    /* Quick upload section */
    .slides-quick-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
    .slides-quick-title { font-size: 15px; font-weight: 700; color: #111827; }
    .slides-quick-sub { font-size: 13px; color: #6b7280; flex: 1; }
    .slides-quick-add { margin-left: auto; padding: 5px 14px; border: 1.5px solid #3b82f6; border-radius: 8px;
      background: #eff6ff; color: #1d4ed8; font-size: 13px; font-weight: 600; cursor: pointer; }
    .slides-quick-add:hover { background: #dbeafe; }

    /* ── XHS 信息图 tab ── */
    .xhs-options-row { display: flex; gap: 16px; margin-top: 14px; flex-wrap: wrap; align-items: flex-start; }
    .xhs-option-group { flex: 1; min-width: 180px; }
    .xhs-option-label { display: block; font-size: 11px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 7px; }
    .xhs-style-grid { display: flex; flex-wrap: wrap; gap: 6px; }
    .xhs-style-chip {
      padding: 5px 13px; border-radius: 20px; border: 2px solid transparent;
      font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s;
      box-shadow: 0 1px 3px rgba(0,0,0,.1);
    }
    .xhs-style-chip:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0,0,0,.15); }
    .xhs-style-chip.active { outline: 3px solid #3b82f6; outline-offset: 1px; }
    .xhs-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
    .xhs-card { border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.12); position: relative; aspect-ratio: 3/4; background: #f3f4f6; }
    .xhs-card canvas { width: 100%; height: 100%; display: block; }
    .xhs-card img { width: 100%; height: 100%; display: block; object-fit: cover; }
    .xhs-card-dl { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,.55); color: white; font-size: 12px; padding: 4px 10px; border-radius: 20px; cursor: pointer; backdrop-filter: blur(4px); transition: background .15s; }
    .xhs-card-dl:hover { background: rgba(0,0,0,.8); }
    .xhs-strategies-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
    .xhs-strategy-card { border: 2px solid #e5e7eb; border-radius: 12px; padding: 14px; cursor: pointer; transition: all .15s; }
    .xhs-strategy-card:hover { border-color: #3b82f6; background: #f0f7ff; }
    .xhs-strategy-card.selected { border-color: #10b981; background: #f0fdf4; }
    .xhs-strategy-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
    .xhs-strategy-id { width: 28px; height: 28px; border-radius: 50%; background: #e5e7eb; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
    .xhs-strategy-card.selected .xhs-strategy-id { background: #10b981; color: white; }
    .xhs-strategy-name { font-size: 14px; font-weight: 700; color: #111827; }
    .xhs-strategy-desc { font-size: 12px; color: #6b7280; margin-bottom: 8px; line-height: 1.5; }
    .xhs-strategy-outline { font-size: 12px; color: #374151; line-height: 1.6; border-top: 1px solid #f3f4f6; padding-top: 8px; }
    .xhs-strategy-outline li { list-style: none; padding: 2px 0; }
    .xhs-strategy-outline li::before { content: '›'; margin-right: 5px; color: #9ca3af; }
    .xhs-card-placeholder { border-radius: 12px; background: #f3f4f6; display: flex; align-items: center; justify-content: center; aspect-ratio: 3/4; flex-direction: column; gap: 8px; }
    .xhs-card-placeholder .spinner { width: 24px; height: 24px; border-width: 3px; }
    .xhs-card-placeholder span { font-size: 12px; color: #9ca3af; }
    /* ── Card editor ── */
    .xhs-edit-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
    .xhs-edit-card { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; background: #f9fafb; border-radius: 8px; border: 1px solid #e5e7eb; transition: border-color .15s; }
    .xhs-edit-card:hover { border-color: #d1d5db; }
    .xhs-edit-num { width: 22px; height: 22px; border-radius: 50%; background: #e5e7eb; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #6b7280; flex: 0 0 auto; margin-top: 4px; }
    .xhs-edit-emoji { font-size: 20px; flex: 0 0 26px; text-align: center; line-height: 1.6; }
    .xhs-edit-fields { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
    .xhs-edit-title { font-size: 13px; font-weight: 600; border: 1px solid #e5e7eb; border-radius: 5px; padding: 4px 8px; width: 100%; box-sizing: border-box; outline: none; }
    .xhs-edit-title:focus { border-color: #3b82f6; }
    .xhs-edit-body { font-size: 12px; border: 1px solid #e5e7eb; border-radius: 5px; padding: 4px 8px; width: 100%; resize: vertical; box-sizing: border-box; min-height: 44px; line-height: 1.5; outline: none; font-family: inherit; }
    .xhs-edit-body:focus { border-color: #3b82f6; }
    .xhs-edit-sub { font-size: 12px; border: 1px solid #e5e7eb; border-radius: 5px; padding: 4px 8px; width: 100%; box-sizing: border-box; color: #6b7280; outline: none; }
    .xhs-edit-sub:focus { border-color: #3b82f6; }
    .xhs-del-btn { background: none; border: none; cursor: pointer; color: #d1d5db; font-size: 20px; line-height: 1; padding: 0 2px; flex: 0 0 auto; transition: color .15s; }
    .xhs-del-btn:hover { color: #ef4444; }
    .btn-add-card { background: none; border: 1px dashed #d1d5db; border-radius: 8px; color: #6b7280; font-size: 13px; padding: 8px 14px; cursor: pointer; width: 100%; margin-top: 4px; transition: all .15s; }
    .btn-add-card:hover { border-color: #3b82f6; color: #3b82f6; background: #eff6ff; }
    /* ── XHS 信息图 two-panel layout ───────────────────────────────── */
    .xhs2-wrap { display:flex; height:calc(100vh - 56px); overflow:hidden; }
    .xhs2-left { width:300px; flex-shrink:0; padding:20px 18px; overflow-y:auto; border-right:1px solid #e5e7eb; background:#fff; }
    .xhs2-right { flex:1; display:flex; flex-direction:column; overflow-y:auto; background:#f8fafc; padding:20px; min-width:0; gap:16px; }
    .xhs2-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; flex:1; min-height:320px; gap:12px; color:#9ca3af; text-align:center; }
    .xhs2-section { background:#fff; border-radius:14px; padding:18px; border:1px solid #e5e7eb; }

    /* ── Slides v2 two-panel ─────────────────────────────────────── */
    .sl2-wrap { display:flex; align-items:flex-start; min-height:calc(100vh - 56px); }
    .sl2-left { width:200px; flex-shrink:0; padding:16px 12px; border-right:1px solid #f0abfc; background:#fff; position:sticky; top:0; height:100vh; overflow-y:auto; box-sizing:border-box; }
    .sl2-right { flex:1; display:flex; flex-direction:column; background:#f3f4f6; min-width:0; min-height:100vh; max-width:520px; }
    .sl2-label { display:block; font-size:12px; font-weight:600; color:#374151; margin-bottom:6px; }
    .sl2-field { margin-bottom:14px; }
    .sl2-ta { width:100%; box-sizing:border-box; border:1.5px solid #e5e7eb; border-radius:10px; padding:10px 12px; font-size:13px; resize:vertical; outline:none; font-family:inherit; }
    .sl2-ta:focus { border-color:#e879f9; }
    .sl2-sel { width:100%; padding:9px 12px; border:1.5px solid #e5e7eb; border-radius:10px; font-size:13px; background:white; cursor:pointer; outline:none; }
    .sl2-sel:focus { border-color:#e879f9; }
    .sl2-sel-pink { border-color:#f0abfc !important; }
    .sl2-gen-btn { width:100%; padding:14px; border:none; border-radius:12px; background:linear-gradient(135deg,#e879f9,#a855f7); color:white; font-size:15px; font-weight:700; cursor:pointer; margin-bottom:14px; transition:opacity .15s; }
    .sl2-gen-btn:hover { opacity:.88; }
    .sl2-gen-btn:disabled { opacity:.55; cursor:not-allowed; }
    .sl2-adv-wrap { display:none; }
    /* Topic tag library */
    .sl-topic-tags { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px; }
    .sl-topic-tag { padding:4px 10px; border:1.5px solid #e5e7eb; border-radius:20px; font-size:12px; font-weight:600; color:#374151; background:white; cursor:pointer; transition:all .15s; white-space:nowrap; }
    .sl-topic-tag:hover { border-color:#f9a8d4; color:#ec4899; background:#fdf4ff; }
    .sl-topic-tag.active { border-color:#ec4899; background:#fce7f3; color:#be185d; }
    .sl2-chips { display:flex; flex-wrap:wrap; gap:6px; }
    .sl2-chip { padding:5px 11px; border:1.5px solid #e5e7eb; border-radius:16px; font-size:12px; cursor:pointer; background:white; color:#374151; transition:all .15s; }
    .sl2-chip.active { background:#7c3aed; border-color:#7c3aed; color:white; }
    .sl2-save-btn { width:100%; padding:11px; border:none; border-radius:10px; background:#fce7f3; color:#be185d; font-size:13px; font-weight:700; cursor:pointer; margin-bottom:8px; transition:background .15s; }
    .sl2-save-btn:hover { background:#fbcfe8; }
    .sl2-video-btn { width:100%; padding:11px; border:none; border-radius:10px; background:#ec4899; color:white; font-size:13px; font-weight:700; cursor:pointer; transition:background .15s; }
    .sl2-video-btn:hover { background:#db2777; }
    /* Right panel */
    .sl2-preview-tabs { display:flex; align-items:center; border-bottom:1px solid #f0abfc; background:white; }
    .sl2-preview-tab { padding:13px 18px; border:none; border-bottom:2px solid transparent; background:none; font-size:14px; font-weight:600; color:#9ca3af; cursor:pointer; transition:color .15s; flex-shrink:0; }
    .sl2-preview-tab.active { color:#111827; border-bottom-color:#e879f9; }
    .sl2-tab-actions { margin-left:auto; display:flex; gap:8px; padding:0 14px; align-items:center; }
    .sl2-play-btn { padding:6px 14px; border:1.5px solid #e5e7eb; border-radius:8px; background:white; color:#374151; font-size:13px; font-weight:600; cursor:pointer; white-space:nowrap; transition:all .15s; }
    .sl2-play-btn:hover { background:#f9fafb; }
    .sl2-play-btn.playing { border-color:#f59e0b; background:#fef3c7; color:#92400e; }
    .sl2-dl-btn { padding:6px 14px; border:none; border-radius:8px; background:#ec4899; color:white; font-size:13px; font-weight:700; cursor:pointer; white-space:nowrap; transition:background .15s; }
    .sl2-dl-btn:hover { background:#db2777; }
    .sl2-video-export-btn { padding:6px 14px; border:none; border-radius:8px; background:linear-gradient(135deg,#6366f1,#8b5cf6); color:white; font-size:13px; font-weight:700; cursor:pointer; white-space:nowrap; transition:opacity .15s; }
    .sl2-video-export-btn:hover { opacity:.88; }
    .sl2-preview-body { flex:1; display:flex; flex-direction:column; }
    /* ── Single-slide carousel display ── */
    .sl2-canvas-area { flex:1; overflow:visible; padding:20px 16px 16px; background:white; display:flex; flex-direction:column; align-items:center; width:100%; box-sizing:border-box; }
    /* Nav arrows — absolute overlay on canvas wrap */
    .sl2-nav { display:none; } /* hidden — use thumbnail strip to navigate */
    /* Single canvas wrap */
    .sl2-canvas-wrap { width:100%; max-width:400px; display:block; position:relative; cursor:pointer; container-type:inline-size; border-radius:12px; overflow:hidden; border:2px solid #f0abfc; }
    .sl2-canvas-wrap.has-slides:hover::after { content:'✏️ 点击编辑文字'; position:absolute; bottom:12px; left:50%; transform:translateX(-50%); background:rgba(0,0,0,.55); color:white; font-size:11px; padding:4px 10px; border-radius:20px; pointer-events:none; opacity:0; animation:slHintFade .3s ease .4s forwards; white-space:nowrap; }
    /* Feed items hidden — we use single-slide mode */
    .sl2-feed-item { display:none !important; }
    .sl2-feed-add { display:none !important; }
    @keyframes slHintFade { to { opacity:1; } }
    /* On-canvas draggable text elements */
    .sl-txt { position:absolute; left:4%; right:4%; text-align:center; cursor:grab; z-index:20; padding:4px 8px; border-radius:8px; touch-action:none; white-space:pre-wrap; word-break:break-word; transform:translateY(-50%); min-height:24px; }
    .sl-txt:hover { outline:1.5px dashed rgba(255,255,255,0.5); outline-offset:4px; }
    .sl-txt.sl-txt-dragging { cursor:grabbing; }
    .sl-txt[contenteditable=true] { cursor:text; outline:2px dashed rgba(255,255,255,0.7); outline-offset:4px; user-select:text; }
    .sl-txt-main { font-size:clamp(14px,8cqw,42px); font-weight:900; font-family:'Impact','Arial Black','Arial',sans-serif; color:white; -webkit-text-stroke:2.5px #000; paint-order:stroke fill; text-shadow:0 2px 10px rgba(0,0,0,.7); line-height:1.3; letter-spacing:0.01em; }
    .sl-txt-sub  { font-size:clamp(10px,5cqw,24px); font-weight:700; font-family:'Arial Black','Arial',sans-serif; color:white; -webkit-text-stroke:1.5px #000; paint-order:stroke fill; text-shadow:0 1px 6px rgba(0,0,0,.8); line-height:1.28; opacity:0.95; }
    /* Color overrides — stroke stays black for readability */
    .sl-txt-main.sl-sty-white  { color:white; }
    .sl-txt-main.sl-sty-bold   { color:white; font-size:clamp(16px,9.5cqw,50px); }
    .sl-txt-main.sl-sty-yellow { color:#fbbf24; }
    .sl-txt-main.sl-sty-pink   { color:#f9a8d4; }
    .sl-txt-main.sl-sty-light  { color:rgba(255,255,255,0.85); }
    .sl-txt-main.sl-sty-dark   { color:#1e293b; -webkit-text-stroke:1px rgba(255,255,255,0.3); text-shadow:0 1px 3px rgba(255,255,255,0.2); }
    .sl-txt-sub.sl-sty-white   { color:rgba(255,255,255,0.92); }
    .sl-txt-sub.sl-sty-bold    { color:rgba(255,255,255,0.92); }
    .sl-txt-sub.sl-sty-yellow  { color:#fde68a; }
    .sl-txt-sub.sl-sty-pink    { color:#fbcfe8; }
    .sl-txt-sub.sl-sty-light   { color:rgba(255,255,255,0.75); }
    .sl-txt-sub.sl-sty-dark    { color:#1e293b; -webkit-text-stroke:0.5px rgba(255,255,255,0.2); text-shadow:none; }
    /* Progress badge + swipe cue overlays */
    .sl-progress-badge { position:absolute; top:10px; right:10px; z-index:30; font-family:'Arial Black','Arial',sans-serif; font-size:clamp(9px,2.5cqw,13px); font-weight:700; color:white; -webkit-text-stroke:1px #000; paint-order:stroke fill; text-shadow:0 1px 4px rgba(0,0,0,.6); letter-spacing:0.05em; pointer-events:none; }
    .sl-swipe-cue { position:absolute; bottom:14px; left:50%; transform:translateX(-50%); z-index:30; font-family:'Impact','Arial Black','Arial',sans-serif; font-size:clamp(10px,2.8cqw,14px); font-weight:900; color:white; -webkit-text-stroke:1.5px #000; paint-order:stroke fill; text-shadow:0 1px 6px rgba(0,0,0,.7); letter-spacing:0.05em; white-space:nowrap; pointer-events:none; opacity:0.85; }
    /* Text style bar */
    .sl-text-style-bar { display:flex; align-items:center; gap:6px; padding:6px 16px; background:transparent; flex-wrap:wrap; min-height:36px; }
    .sl-style-hint { flex:1; text-align:center; font-size:12px; color:#9ca3af; font-style:italic; }
    .sl-tsty-bar { width:32px; height:32px; border:1.5px solid #e5e7eb; border-radius:8px; font-size:13px; font-weight:700; cursor:pointer; display:flex; align-items:center; justify-content:center; background:white; transition:all .15s; flex-shrink:0; }
    .sl-tsty-bar:hover { border-color:#e879f9; }
    .sl-tsty-bar.active { border-color:#e879f9; box-shadow:0 0 0 2px #f9d8ff; }
    .sl-tbar-sep { width:1px; height:22px; background:#e5e7eb; margin:0 2px; flex-shrink:0; }
    .sl-tbar-btn { padding:5px 12px; border-radius:8px; border:1.5px solid #e5e7eb; font-size:12px; font-weight:600; cursor:pointer; background:white; display:flex; align-items:center; gap:4px; white-space:nowrap; transition:background .15s; }
    .sl-tbar-btn-remove { background:#fee2e2; border-color:#fecaca; color:#dc2626; }
    .sl-tbar-btn-apply { background:#ede9fe; border-color:#ddd6fe; color:#7c3aed; }
    .sl-tbar-done { margin-left:auto; padding:5px 14px; border-radius:8px; border:none; background:#ec4899; color:white; font-size:12px; font-weight:700; cursor:pointer; transition:background .15s; }
    .sl-tbar-done:hover { background:#db2777; }
    .sl2-empty { padding:40px 20px; text-align:center; }
    /* Hint bar */
    .sl2-hint-bar { padding:7px 20px; background:#fffbff; border-top:1px solid #f0e6ff; font-size:12px; color:#a78bfa; flex-shrink:0; font-style:italic; display:flex; align-items:center; justify-content:center; gap:10px; }
    .sl-hint-add-btn { padding:3px 14px; border:1.5px dashed #e879f9; border-radius:20px; background:white; color:#e879f9; font-size:11px; font-weight:700; cursor:pointer; font-style:normal; transition:background .15s; white-space:nowrap; flex-shrink:0; }
    .sl-hint-add-btn:hover { background:#fdf4ff; }
    /* Editing toolbar */
    .sl2-edit-toolbar { display:flex; align-items:center; gap:6px; padding:8px 10px; background:transparent; flex-wrap:wrap; }
    .sl2-dur-wrap { display:flex; align-items:center; gap:4px; padding:5px 10px; border:1.5px solid #f0abfc; border-radius:20px; font-size:12px; color:#7c3aed; cursor:pointer; }
    .sl2-dur-sel { border:none; font-size:12px; color:#7c3aed; outline:none; cursor:pointer; background:transparent; font-weight:600; }
    .sl2-tool-btn { width:36px; height:36px; border:1.5px solid #fda4af; border-radius:10px; background:white; color:#e11d48; font-size:14px; font-weight:700; cursor:pointer; transition:background .15s; display:flex; align-items:center; justify-content:center; }
    .sl2-tool-btn:hover { background:#fff1f2; }
    .sl2-tool-btn.active { background:#fdf4ff; border-color:#e879f9; }
    .sl2-tool-danger { border-color:#fca5a5 !important; color:#dc2626; }
    .sl2-tool-danger:hover { background:#fee2e2 !important; }
    /* Thumbnail strip */
    .sl2-thumb-strip { display:flex; gap:8px; padding:12px 16px; background:white; border-top:1px solid #f3f4f6; overflow-x:auto; flex-shrink:0; align-items:center; min-height:74px; scrollbar-width:thin; width:100%; box-sizing:border-box; }
    .sl2-thumb { width:40px; height:52px; border:2px solid #e5e7eb; border-radius:7px; overflow:hidden; cursor:pointer; background:#f9fafb; flex-shrink:0; position:relative; transition:border-color .15s; }
    .sl2-thumb.active { border-color:#e879f9; box-shadow:0 0 0 2px #f9d8ff; }
    .sl2-thumb canvas { width:100%; height:100%; display:block; object-fit:cover; }
    .sl2-thumb-num { position:absolute; bottom:0; left:0; right:0; text-align:center; font-size:9px; color:white; background:rgba(0,0,0,.38); padding:1px 0; font-weight:700; }
    .sl2-thumb-add { width:40px; height:52px; border:2px dashed #d1d5db; border-radius:7px; background:white; color:#9ca3af; font-size:24px; cursor:pointer; flex-shrink:0; display:flex; align-items:center; justify-content:center; transition:background .15s,border-color .15s; }
    .sl2-thumb-add:hover { background:#fdf4ff; border-color:#e879f9; }
    .sl2-insp-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px; padding:20px; overflow-y:auto; }
    /* ── Inspiration Pool ─────────────────────────────────────────────── */
    /* ── Inspiration grid — ReelMoney style ── */
    .sl-insp-topbar { padding:10px 12px 8px; border-bottom:1px solid #f3f4f6; display:flex; flex-direction:column; gap:8px; flex-shrink:0; }
    .sl-insp-search-wrap { position:relative; }
    .sl-insp-search { width:100%; padding:8px 12px 8px 34px; border:1.5px solid #e5e7eb; border-radius:10px; font-size:12px; color:#374151; outline:none; box-sizing:border-box; transition:border-color .15s; }
    .sl-insp-search:focus { border-color:#ec4899; }
    .sl-insp-search-icon { position:absolute; left:10px; top:50%; transform:translateY(-50%); color:#9ca3af; font-size:14px; pointer-events:none; }
    .sl-insp-filter-row { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
    .sl-insp-select { padding:5px 10px; border:1.5px solid #e5e7eb; border-radius:8px; font-size:11px; font-weight:600; color:#374151; background:white; cursor:pointer; outline:none; }
    .sl-insp-select:focus { border-color:#ec4899; }
    .sl-insp-count { font-size:11px; color:#9ca3af; margin-left:auto; }
    .sl-insp-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; padding:10px; }
    .sl-insp-card { position:relative; border-radius:10px; overflow:hidden; cursor:pointer; aspect-ratio:4/5; background:#111; transition:transform .18s,box-shadow .18s; }
    .sl-insp-card:hover { transform:translateY(-2px); box-shadow:0 6px 20px rgba(0,0,0,.18); }
    .sl-insp-card:hover .sl-insp-create-overlay { opacity:1; }
    .sl-insp-thumb { width:100%; height:100%; object-fit:cover; display:block; }
    .sl-insp-badge { position:absolute; top:7px; left:7px; background:rgba(0,0,0,.65); backdrop-filter:blur(4px); color:#fff; font-size:9px; font-weight:700; padding:3px 7px; border-radius:20px; display:flex; align-items:center; gap:3px; }
    .sl-insp-bottom { position:absolute; bottom:0; left:0; right:0; padding:24px 8px 7px; background:linear-gradient(transparent,rgba(0,0,0,.75)); display:flex; align-items:center; justify-content:space-between; }
    .sl-insp-stats { display:flex; gap:8px; font-size:9px; color:rgba(255,255,255,.9); font-weight:600; }
    .sl-insp-eng { font-size:9px; color:rgba(255,255,255,.8); font-weight:700; }
    .sl-insp-create-overlay { position:absolute; inset:0; background:rgba(236,72,153,.85); display:flex; align-items:center; justify-content:center; opacity:0; transition:opacity .18s; }
    .sl-insp-create-btn { background:white; color:#ec4899; border:none; border-radius:20px; padding:7px 14px; font-size:11px; font-weight:700; cursor:pointer; }
    .sl-insp-banner { display:none; background:#fdf4ff; border:1px solid #f0abfc; border-radius:10px; padding:10px 12px; margin-bottom:12px; align-items:center; gap:10px; }
    .sl-insp-banner.show { display:flex; }
    .sl-insp-banner img { width:36px; height:48px; object-fit:cover; border-radius:6px; }
    .sl-insp-banner-text { flex:1; font-size:12px; color:#86198f; font-weight:500; }
    .sl-insp-banner-close { background:none; border:none; color:#86198f; cursor:pointer; font-size:16px; }
    /* Inspiration detail modal */
    .sl-insp-detail-backdrop { position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:3000; display:flex; align-items:center; justify-content:center; padding:20px; }
    .sl-insp-detail-box { background:#fff; border-radius:16px; width:min(900px,96vw); max-height:90vh; display:flex; overflow:hidden; box-shadow:0 24px 80px rgba(0,0,0,.3); }
    .sl-insp-detail-left { width:340px; flex-shrink:0; background:#000; position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:480px; }
    .sl-insp-detail-img { width:100%; height:100%; object-fit:contain; max-height:520px; }
    .sl-insp-detail-nav { position:absolute; top:50%; transform:translateY(-50%); background:rgba(255,255,255,.2); border:none; color:#fff; width:32px; height:32px; border-radius:50%; cursor:pointer; font-size:16px; display:flex; align-items:center; justify-content:center; transition:background .15s; }
    .sl-insp-detail-nav:hover { background:rgba(255,255,255,.4); }
    .sl-insp-detail-nav.prev { left:8px; }
    .sl-insp-detail-nav.next { right:8px; }
    .sl-insp-detail-dots { position:absolute; bottom:10px; display:flex; gap:4px; }
    .sl-insp-detail-dot { width:5px; height:5px; border-radius:50%; background:rgba(255,255,255,.4); transition:background .15s; }
    .sl-insp-detail-dot.active { background:#fff; }
    .sl-insp-detail-counter { position:absolute; top:10px; right:10px; background:rgba(0,0,0,.55); color:#fff; font-size:11px; padding:3px 8px; border-radius:20px; }
    .sl-insp-detail-right { flex:1; overflow-y:auto; padding:24px; display:flex; flex-direction:column; gap:16px; }
    .sl-insp-detail-close { position:absolute; top:12px; right:12px; background:#f3f4f6; border:none; border-radius:50%; width:28px; height:28px; cursor:pointer; font-size:14px; display:flex; align-items:center; justify-content:center; color:#374151; }
    .sl-insp-detail-close:hover { background:#e5e7eb; }
    .sl-insp-detail-title { font-size:16px; font-weight:700; color:#111; line-height:1.4; padding-right:32px; }
    .sl-insp-detail-platforms { display:flex; gap:8px; }
    .sl-insp-detail-platform-tag { background:#f3f4f6; border-radius:20px; padding:3px 10px; font-size:11px; font-weight:600; color:#374151; }
    .sl-insp-detail-section { }
    .sl-insp-detail-section-title { font-size:11px; font-weight:700; color:#6b7280; text-transform:uppercase; letter-spacing:.05em; margin-bottom:8px; }
    .sl-insp-detail-perf { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
    .sl-insp-detail-perf-item { background:#f9fafb; border-radius:8px; padding:10px 12px; }
    .sl-insp-detail-perf-label { font-size:10px; color:#9ca3af; margin-bottom:2px; }
    .sl-insp-detail-perf-val { font-size:15px; font-weight:700; color:#111; }
    .sl-insp-detail-perf-val.highlight { color:#ec4899; }
    .sl-insp-detail-caption { font-size:12px; color:#374151; line-height:1.6; background:#f9fafb; border-radius:8px; padding:10px 12px; }
    .sl-insp-detail-tags { display:flex; flex-wrap:wrap; gap:6px; }
    .sl-insp-detail-tag { background:#ede9fe; color:#7c3aed; font-size:11px; padding:3px 9px; border-radius:20px; font-weight:500; }
    .sl-insp-detail-creator { display:flex; align-items:center; gap:10px; background:#f9fafb; border-radius:8px; padding:10px 12px; }
    .sl-insp-detail-creator-avatar { width:36px; height:36px; border-radius:50%; background:#e5e7eb; display:flex; align-items:center; justify-content:center; font-size:16px; flex-shrink:0; }
    .sl-insp-detail-creator-name { font-size:13px; font-weight:600; color:#111; }
    .sl-insp-detail-creator-handle { font-size:11px; color:#9ca3af; }
    .sl-insp-detail-actions { display:flex; flex-direction:column; gap:8px; margin-top:auto; }
    .sl-insp-detail-view-btn { display:flex; align-items:center; justify-content:center; gap:6px; padding:10px; border:1.5px solid #e5e7eb; border-radius:10px; background:#fff; color:#374151; font-size:13px; font-weight:600; cursor:pointer; text-decoration:none; transition:background .15s; }
    .sl-insp-detail-view-btn:hover { background:#f9fafb; }
    .sl-insp-detail-create-btn { padding:12px; background:linear-gradient(135deg,#ec4899,#a855f7); border:none; border-radius:10px; color:#fff; font-size:14px; font-weight:700; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:6px; transition:opacity .15s; }
    .sl-insp-detail-create-btn:hover { opacity:.9; }
    .sl-insp-scroll-wrap { flex:1; overflow-y:auto; }
    .sl-text-action-btn { padding:5px 12px; border:none; border-radius:8px; font-size:12px; font-weight:600; cursor:pointer; }
    /* Slide image picker modal */
    .sl-imgpick-backdrop { position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:2000; display:flex; align-items:center; justify-content:center; }
    .sl-imgpick-box { background:white; border-radius:16px; width:min(780px,96vw); max-height:86vh; display:flex; flex-direction:column; overflow:hidden; box-shadow:0 20px 60px rgba(0,0,0,.28); }
    .sl-imgpick-header { display:flex; justify-content:space-between; align-items:center; padding:16px 20px; border-bottom:1px solid #f0abfc; flex-shrink:0; }
    .sl-imgpick-title { font-size:16px; font-weight:700; color:#111827; }
    .sl-imgpick-close { background:none; border:none; font-size:20px; cursor:pointer; color:#9ca3af; line-height:1; }
    .sl-imgpick-body { flex:1; overflow-y:auto; padding:16px; }
    .sl-imgpick-section { font-size:12px; font-weight:700; color:#7c3aed; text-transform:uppercase; letter-spacing:.05em; margin-bottom:10px; }
    .sl-imgpick-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:10px; margin-bottom:20px; }
    .sl-imgpick-item { aspect-ratio:3/4; border-radius:10px; overflow:hidden; cursor:pointer; border:2px solid transparent; transition:border-color .15s; background:#f3f4f6; }
    .sl-imgpick-item:hover { border-color:#e879f9; }
    .sl-imgpick-item img { width:100%; height:100%; object-fit:cover; display:block; }
    .sl-imgpick-upload { display:flex; align-items:center; gap:10px; padding:14px; border:2px dashed #f0abfc; border-radius:12px; cursor:pointer; margin-top:4px; }
    .sl-imgpick-upload:hover { background:#fdf4ff; }
    .sl-imgpick-upload input { display:none; }

    .slides-slot-type-mood    { color: #7c3aed; background: #ede9fe; border-radius: 4px; padding: 1px 6px; }
    .slides-slot-type-product { color: #0369a1; background: #e0f2fe; border-radius: 4px; padding: 1px 6px; }
    .slides-slot-hint { padding: 8px 10px; font-size: 12px; color: #9ca3af; line-height: 1.4; }
    .slides-slot-upload { margin: 0 10px 10px; cursor: pointer; }
    .slides-slot-upload input[type=file] { display: none; }
    .slides-slot-upload-btn { width: 100%; padding: 8px; border-radius: 8px; border: 1.5px solid #e5e7eb;
      background: white; font-size: 12px; font-family: inherit; cursor: pointer;
      color: #374151; transition: background .15s; }
    .slides-slot-upload-btn:hover { background: #f3f4f6; }
    .slides-slot-canvas-wrap { position: relative; width: 100%; aspect-ratio: 3/4;
      background: #111; overflow: hidden; container-type: inline-size; }
    .slides-slot-canvas-wrap canvas { width: 100%; height: 100%; display: block; }
    .slides-slot-dl { position: absolute; bottom: 6px; right: 6px;
      background: rgba(0,0,0,.55); color: white; font-size: 11px; padding: 3px 8px;
      border-radius: 6px; text-decoration: none; cursor: pointer; z-index: 10; }
    .slides-slot-dl:hover { background: rgba(0,0,0,.8); }
    /* Draggable text overlays */
    .slide-text-drag { position: absolute; left: 5%; width: 90%; text-align: center;
      cursor: grab; user-select: none; padding: 4px 6px; border-radius: 4px;
      transition: outline .1s; touch-action: none; z-index: 5; }
    .slide-text-drag:hover { outline: 1px dashed rgba(255,255,255,0.6); }
    .slide-text-drag:active { cursor: grabbing; }
    .slide-text-drag.drag-title { font-size: clamp(13px, 6cqi, 20px); font-weight: 800; color: white;
      text-shadow: 1px 1px 0 #000,-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,0 2px 8px rgba(0,0,0,.9);
      line-height: 1.25; }
    .slide-text-drag.drag-body { font-size: clamp(9px, 3.5cqi, 13px); font-weight: 500; color: rgba(255,255,255,.95);
      text-shadow: 0 1px 4px rgba(0,0,0,.9),1px 1px 0 rgba(0,0,0,.6); line-height: 1.65; white-space: pre-line; }
    .slide-text-drag.drag-sub { font-size: clamp(10px, 4cqi, 14px); font-weight: 700; color: #ffe066;
      text-shadow: 1px 1px 0 #000,-1px -1px 0 #000,0 2px 6px rgba(0,0,0,.85); line-height: 1.3; }
    .slides-slot-text-row { padding: 6px 10px 10px; display: flex; flex-direction: column; gap: 5px; }
    .slides-slot-text-row input, .slides-slot-text-row textarea { border: 1px solid #e5e7eb; border-radius: 6px;
      padding: 5px 8px; font-size: 12px; font-family: inherit; outline: none; resize: vertical; }
    .slides-slot-text-row input:focus, .slides-slot-text-row textarea:focus { border-color: #3b82f6; }
    .slides-slot-text-row textarea { line-height: 1.55; }
    .slides-slot-rerender { width: 100%; margin-top: 4px; padding: 5px; border-radius: 6px;
      border: 1px solid #e5e7eb; background: #f3f4f6; font-size: 12px;
      font-family: inherit; cursor: pointer; }
    .slides-slot-rerender:hover { background: #e5e7eb; }
    /* ── Image library modal ───────────────────────────────────── */
    .lib-modal-backdrop { position:fixed; inset:0; background:rgba(0,0,0,.55);
      z-index:1000; display:flex; align-items:center; justify-content:center; }
    .lib-modal-box { background:white; border-radius:16px; width:min(860px,95vw);
      max-height:85vh; display:flex; flex-direction:column; overflow:hidden; box-shadow:0 24px 60px rgba(0,0,0,.3); }
    .lib-modal-header { display:flex; justify-content:space-between; align-items:center;
      padding:14px 18px 0; border-bottom:1px solid #e5e7eb; flex-shrink:0; }
    .lib-modal-tabs { display:flex; gap:4px; }
    .lib-tab { background:none; border:none; border-bottom:2px solid transparent;
      padding:8px 16px 12px; font-size:14px; font-weight:600; color:#6b7280;
      cursor:pointer; font-family:inherit; transition:color .15s,border-color .15s; }
    .lib-tab.active { color:#3b82f6; border-bottom-color:#3b82f6; }
    .lib-close { background:none; border:none; font-size:18px; color:#9ca3af;
      cursor:pointer; padding:4px 8px; border-radius:6px; }
    .lib-close:hover { background:#f3f4f6; color:#374151; }
    .lib-pane { flex:1; overflow:hidden; display:flex; flex-direction:column; }
    .lib-upload-area { margin:24px; border:2px dashed #d1d5db; border-radius:12px;
      padding:40px; text-align:center; cursor:pointer; transition:border-color .15s,background .15s; }
    .lib-upload-area:hover { border-color:#3b82f6; background:#eff6ff; }
    .lib-category-tabs { display:flex; gap:6px; padding:12px 16px; overflow-x:auto;
      flex-shrink:0; border-bottom:1px solid #f3f4f6; scrollbar-width:none; }
    .lib-category-tabs::-webkit-scrollbar { display:none; }
    .lib-cat-btn { flex-shrink:0; padding:5px 12px; border-radius:20px; border:1.5px solid #e5e7eb;
      background:white; font-size:12px; font-family:inherit; cursor:pointer; white-space:nowrap;
      transition:all .15s; color:#374151; }
    .lib-cat-btn.active { background:#3b82f6; border-color:#3b82f6; color:white; }
    .lib-cat-btn:hover:not(.active) { border-color:#3b82f6; color:#3b82f6; }
    .lib-image-grid { flex:1; overflow-y:auto; display:grid;
      grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:6px; padding:12px 16px; }
    .lib-img-item { position:relative; padding-bottom:133.33%; overflow:hidden; border-radius:8px; cursor:pointer;
      background:#f3f4f6; border:2px solid transparent; transition:border-color .15s; }
    .lib-img-item:hover { border-color:#3b82f6; }
    .lib-img-item img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; }
    .lib-img-item:hover::after { content:'选择'; position:absolute; inset:0;
      background:rgba(59,130,246,.35); display:flex; align-items:center; justify-content:center;
      color:white; font-weight:700; font-size:13px; display:flex; align-items:center; justify-content:center; }
    /* Preset cards */
    .slides-presets { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
    .slides-preset-card, .aps-preset-card {
      display: flex; align-items: center; gap: 10px; padding: 10px 14px;
      border: 2px solid #e5e7eb; border-radius: 10px; cursor: pointer;
      flex: 1; min-width: 160px; transition: border-color .15s, background .15s; }
    .slides-preset-card:hover, .aps-preset-card:hover { border-color: #3b82f6; background: #eff6ff; }
    .slides-preset-card.active, .aps-preset-card.active { border-color: #3b82f6; background: #eff6ff; }
    .slides-preset-icon { font-size: 22px; line-height: 1; }
    .slides-preset-name { font-size: 14px; font-weight: 700; color: #111827; }
    .slides-preset-desc { font-size: 12px; color: #6b7280; margin-top: 2px; }
    .slides-features-label { font-size: 13px; font-weight: 600; color: #374151; margin: 14px 0 8px; }
    .slides-features-grid { display: flex; flex-wrap: wrap; gap: 8px; }
    .slides-feature-item { display: flex; align-items: center; gap: 6px; padding: 6px 12px;
      border: 1.5px solid #e5e7eb; border-radius: 20px; cursor: pointer;
      font-size: 13px; color: #374151; transition: all .15s; user-select: none; }
    .slides-feature-item:hover { border-color: #3b82f6; color: #1d4ed8; }
    .slides-feature-item.checked { background: #eff6ff; border-color: #3b82f6; color: #1d4ed8; font-weight: 600; }
    .slides-feature-item input[type=checkbox] { display: none; }
    .scrape-embed { margin: 12px 0; }
    .scrape-embed iframe { max-width: 100%; border-radius: 8px; }
    .mimic-btn-row { display: flex; justify-content: center; margin: 24px 0 8px; }
    .btn-mimic { background: linear-gradient(135deg,#7c3aed,#4f46e5); color: white;
      border: none; border-radius: 10px; padding: 12px 32px; font-size: 15px;
      font-weight: 600; cursor: pointer; font-family: inherit; transition: opacity .15s; }
    .btn-mimic:hover { opacity: .88; }
    .btn-mimic:disabled { opacity: .5; cursor: not-allowed; }
    .mimic-output { margin-top: 20px; border-top: 2px solid #e5e7eb; padding-top: 20px; }
    .mimic-output h3 { font-size: 15px; font-weight: 700; color: #7c3aed; margin: 0 0 12px; }
    .mimic-title-out { font-size: 17px; font-weight: 700; color: #111827;
      padding: 10px 14px; background: #faf5ff; border-left: 3px solid #7c3aed;
      border-radius: 4px; margin-bottom: 12px; }
    .mimic-text-out { width: 100%; box-sizing: border-box; min-height: 160px;
      padding: 12px 14px; border: 1.5px solid #d1d5db; border-radius: 8px;
      font-size: 14px; line-height: 1.8; font-family: inherit; resize: vertical; color: #374151; }
    .mimic-text-out:focus { outline: none; border-color: #7c3aed; }
    .mimic-tags-out { margin-top: 10px; }
    .mimic-copy-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
    .btn-copy-mimic { font-size: 13px; padding: 6px 14px; border: 1.5px solid #7c3aed;
      border-radius: 6px; background: white; color: #7c3aed; cursor: pointer;
      font-family: inherit; transition: all .15s; }
    .btn-copy-mimic:hover { background: #7c3aed; color: white; }
    /* ── 我的作品 library ── */
    .lib-works-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; }
    .lib-work-card { border-radius: 10px; overflow: hidden; box-shadow: 0 1px 6px rgba(0,0,0,.1); cursor: pointer; transition: transform .15s, box-shadow .15s; position: relative; background: #f9fafb; }
    .lib-work-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.16); }
    .lib-thumb { position: relative; padding-bottom: 133.33%; overflow: hidden; background: #e5e7eb; }
    .lib-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
    .lib-thumb-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 36px; color: #9ca3af; }
    .lib-work-info { padding: 8px 10px 10px; }
    .lib-work-title { font-size: 12px; font-weight: 600; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
    .lib-work-meta { font-size: 11px; color: #9ca3af; }
    .lib-type-tag { font-size: 10px; padding: 1px 6px; border-radius: 8px; font-weight: 600; margin-left: 4px; vertical-align: middle; }
    .lib-type-xhs { background: #fce7f3; color: #db2777; }
    .lib-type-slides { background: #ede9fe; color: #7c3aed; }
    .lib-type-report { background: #fff7ed; color: #ea580c; }
    .lib-type-scrape  { background: #f0fdf4; color: #16a34a; }
    .lib-draft-badge  { font-size: 10px; padding: 1px 6px; border-radius: 8px; font-weight: 600; margin-left: 4px; vertical-align: middle; background: #fef3c7; color: #d97706; }
    /* ── Idea库 ── */
    .idea-input-row { display:flex; gap:8px; margin-bottom:18px; align-items:center; }
    .idea-input-row input { flex:1; padding:9px 14px; border:1.5px solid #e5e7eb; border-radius:10px; font-size:13px; font-family:inherit; outline:none; transition:border-color .15s; }
    .idea-input-row input:focus { border-color:#f59e0b; }
    .idea-input-row select { padding:8px 10px; border:1.5px solid #e5e7eb; border-radius:10px; font-size:12px; font-family:inherit; background:white; cursor:pointer; outline:none; color:#374151; }
    .idea-input-row button { background:#f59e0b; color:white; border:none; border-radius:10px; padding:9px 18px; font-size:13px; font-weight:600; cursor:pointer; font-family:inherit; white-space:nowrap; transition:opacity .15s; }
    .idea-input-row button:hover { opacity:.85; }
    .idea-list { display:flex; flex-direction:column; gap:1px; background:#e5e7eb; border-radius:10px; overflow:hidden; }
    .idea-list-item { display:flex; align-items:center; gap:10px; padding:12px 14px; background:white; cursor:pointer; transition:background .1s; position:relative; }
    .idea-list-item:hover { background:#fefce8; }
    .idea-list-bar { width:3px; align-self:stretch; border-radius:2px; flex-shrink:0; }
    .idea-list-icon { font-size:14px; flex-shrink:0; width:20px; text-align:center; }
    .idea-list-text { flex:1; min-width:0; font-size:13px; color:#111827; line-height:1.4; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .idea-list-right { display:flex; align-items:center; gap:8px; flex-shrink:0; }
    .idea-brand-pill { font-size:10px; padding:2px 8px; border-radius:10px; font-weight:600; white-space:nowrap; }
    .idea-list-date { font-size:11px; color:#9ca3af; white-space:nowrap; }
    .idea-list-del { background:none; border:none; font-size:14px; color:#d1d5db; cursor:pointer; padding:2px 4px; border-radius:4px; opacity:0; transition:all .15s; }
    .idea-list-item:hover .idea-list-del { opacity:1; }
    .idea-list-del:hover { color:#ef4444; background:#fef2f2; }
    .idea-brand-chip { padding:5px 12px; border-radius:16px; border:1.5px solid #e5e7eb; background:white; font-size:12px; cursor:pointer; transition:all .15s; font-family:inherit; color:#374151; }
    .idea-brand-chip:hover:not(.active) { border-color:#f59e0b; }
    .idea-brand-chip.active { background:#f59e0b; border-color:#f59e0b; color:white; font-weight:600; }
    .idea-add-brand-btn { padding:5px 12px; border-radius:16px; border:1.5px dashed #d1d5db; background:none; font-size:12px; cursor:pointer; color:#9ca3af; transition:all .15s; font-family:inherit; }
    .idea-add-brand-btn:hover { border-color:#f59e0b; color:#f59e0b; }
    .btn-idea-save { background:linear-gradient(135deg,#f59e0b,#d97706); color:white; border:none; border-radius:10px; padding:12px 24px; font-size:15px; font-weight:600; cursor:pointer; font-family:inherit; transition:opacity .15s; margin-left:10px; }
    .btn-idea-save:hover { opacity:.88; }
    .idea-detail-backdrop { position:fixed; inset:0; z-index:4000; background:rgba(0,0,0,.5); display:flex; align-items:center; justify-content:center; padding:16px; }
    .idea-detail-modal { background:white; border-radius:16px; width:min(820px,100%); max-height:90vh; display:flex; flex-direction:column; overflow:hidden; box-shadow:0 24px 60px rgba(0,0,0,.3); }
    .idea-detail-hdr { display:flex; align-items:flex-start; justify-content:space-between; padding:16px 20px; border-bottom:1px solid #e5e7eb; flex-shrink:0; gap:10px; }
    .idea-detail-hdr h2 { font-size:16px; font-weight:700; margin:0; }
    .idea-detail-meta { font-size:12px; color:#6b7280; margin-top:4px; display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
    .idea-detail-body { flex:1; overflow-y:auto; padding:16px 20px; }
    .idea-detail-note-box { background:#fffbeb; border:1px solid #fde68a; border-radius:8px; padding:0; margin-bottom:16px; font-size:13px; color:#92400e; display:flex; align-items:flex-start; gap:6px; }
    .idea-detail-note-box textarea { flex:1; background:none; border:none; outline:none; font-size:13px; color:#92400e; font-family:inherit; resize:vertical; padding:10px 14px 10px 0; min-height:20px; line-height:1.5; }
    .idea-detail-note-box textarea::placeholder { color:#d97706; opacity:.5; }
    .idea-detail-note-box .note-icon { padding:10px 0 10px 14px; flex-shrink:0; }
    .idea-detail-html { font-size:13px; color:#374151; line-height:1.65; }
    .idea-detail-html h1,.idea-detail-html h2,.idea-detail-html h3 { margin:10px 0 4px; }
    .idea-detail-ftr { padding:12px 20px; border-top:1px solid #e5e7eb; display:flex; align-items:center; gap:10px; flex-shrink:0; }
    /* ── 内容日历 ── */
    .cal-header { display:flex; align-items:center; gap:12px; margin-bottom:20px; }
    .cal-nav-btn { background:none; border:1px solid #e5e7eb; border-radius:8px; padding:5px 12px; cursor:pointer; font-size:15px; transition:all .15s; font-family:inherit; }
    .cal-nav-btn:hover { background:#f3f4f6; }
    .cal-month-label { font-size:16px; font-weight:700; color:#111827; min-width:88px; text-align:center; }
    .cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:1px; background:#e5e7eb; border:1px solid #e5e7eb; border-radius:12px; overflow:hidden; }
    .cal-dow { background:#f9fafb; padding:8px 4px; text-align:center; font-size:11px; font-weight:600; color:#6b7280; }
    .cal-day { background:white; min-height:88px; padding:6px 5px; }
    .cal-day.other-month { background:#fafafa; }
    .cal-day.today { background:#eff6ff; }
    .cal-day-num { font-size:12px; font-weight:600; color:#374151; margin-bottom:3px; }
    .cal-day.other-month .cal-day-num { color:#d1d5db; }
    .cal-day.today .cal-day-num { color:#3b82f6; font-size:13px; font-weight:800; }
    .cal-chip { display:flex; align-items:center; gap:3px; padding:2px 4px; border-radius:5px; margin-bottom:2px; cursor:pointer; max-width:100%; overflow:hidden; transition:opacity .12s; }
    .cal-chip:hover { opacity:.72; }
    .cal-chip-thumb { width:14px; height:14px; border-radius:3px; object-fit:cover; flex-shrink:0; }
    .cal-chip-icon { font-size:10px; flex-shrink:0; line-height:1; }
    .cal-chip-label { font-size:10px; font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; min-width:0; }
    .cal-chip-done { font-size:9px; color:#16a34a; flex-shrink:0; margin-left:1px; }
    .cal-more { font-size:9px; color:#9ca3af; padding:1px 3px; margin-top:1px; }
    /* ── Schedule section ── */
    .lib-schedule-section { margin-top:20px; padding:16px; background:#f8fafc; border-radius:10px; border:1px solid #e5e7eb; }
    .lib-schedule-section h4 { font-size:13px; font-weight:600; color:#374151; margin:0 0 10px; }
    .platform-chips-row { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:12px; }
    .platform-chip { padding:4px 10px; border-radius:16px; border:1.5px solid #e5e7eb; background:white; font-size:11px; cursor:pointer; transition:all .15s; white-space:nowrap; font-family:inherit; color:#374151; }
    .platform-chip:hover:not(.active) { border-color:#6366f1; color:#6366f1; }
    .platform-chip.active { background:#6366f1; border-color:#6366f1; color:white; font-weight:600; }
    .sched-status-bar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:10px; min-height:22px; }
    .sched-badge { display:inline-flex; align-items:center; gap:4px; padding:3px 10px; border-radius:12px; font-size:11px; font-weight:600; }
    .sched-badge-scheduled { background:#dbeafe; color:#2563eb; }
    .sched-badge-published { background:#dcfce7; color:#16a34a; }
    .lib-detail-html { font-size: 13px; color: #374151; line-height: 1.65; overflow-y: auto; max-height: 70vh; padding: 16px; background: #f8fafc; border-radius: 8px; border: 1px solid #e5e7eb; }
    .lib-detail-html h1,.lib-detail-html h2,.lib-detail-html h3 { margin: 10px 0 4px; }
    .lib-del-btn { position: absolute; top: 5px; right: 5px; background: rgba(0,0,0,.5); color: #fff; border: none; border-radius: 50%; width: 22px; height: 22px; font-size: 14px; line-height: 1; cursor: pointer; display: none; align-items: center; justify-content: center; transition: background .15s; }
    .lib-del-btn:hover { background: #ef4444; }
    .lib-work-card:hover .lib-del-btn { display: flex; }
    /* Card three-dot menu */
    .lib-card-menu-btn { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.48); color: #fff; border: none; border-radius: 6px; padding: 3px 7px; font-size: 13px; font-weight: 700; letter-spacing: 1px; line-height: 1.4; cursor: pointer; opacity: 0; transition: opacity .15s; backdrop-filter: blur(3px); font-family: inherit; }
    .lib-work-card:hover .lib-card-menu-btn { opacity: 1; }
    .lib-card-dropdown { position: absolute; top: 34px; right: 6px; z-index: 300; background: white; border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.16), 0 0 0 1px rgba(0,0,0,.06); overflow: hidden; min-width: 140px; display: none; }
    .lib-card-dropdown.open { display: block; }
    .btn-lib-back { background: none; border: 1px solid #e5e7eb; border-radius: 8px; padding: 6px 14px; font-size: 13px; cursor: pointer; color: #374151; transition: all .15s; }
    .btn-lib-back:hover { background: #f3f4f6; }
    .btn-lib-delete { background: none; border: 1px solid #fca5a5; border-radius: 8px; padding: 6px 14px; font-size: 13px; cursor: pointer; color: #ef4444; transition: all .15s; }
    .btn-lib-delete:hover { background: #fef2f2; }
    .btn-lib-share { background: none; border: 1px solid #bfdbfe; border-radius: 8px; padding: 6px 14px; font-size: 13px; cursor: pointer; color: #3b82f6; transition: all .15s; white-space: nowrap; }
    .btn-lib-share:hover { background: #eff6ff; }
    /* Three-dot action menu */
    .lib-menu-wrap { position: relative; flex-shrink: 0; }
    .lib-menu-trigger { background: none; border: 1.5px solid #e5e7eb; border-radius: 8px; padding: 5px 11px; cursor: pointer; font-size: 17px; color: #6b7280; line-height: 1; letter-spacing: 1px; font-weight: 700; transition: all .15s; font-family: inherit; }
    .lib-menu-trigger:hover { background: #f3f4f6; border-color: #d1d5db; }
    .lib-dropdown { position: absolute; top: calc(100% + 6px); right: 0; z-index: 200; background: white; border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.14), 0 0 0 1px rgba(0,0,0,.06); overflow: hidden; min-width: 148px; display: none; }
    .lib-dropdown.open { display: block; }
    .lib-dd-item { display: flex; align-items: center; gap: 10px; padding: 11px 16px; font-size: 13px; cursor: pointer; color: #374151; border: none; background: none; width: 100%; font-family: inherit; text-align: left; transition: background .1s; }
    .lib-dd-item:hover { background: #f9fafb; }
    .lib-dd-item.danger { color: #ef4444; }
    .lib-dd-item.danger:hover { background: #fef2f2; }
    /* Toast */
    #save-toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: #111827; color: #fff; padding: 10px 22px; border-radius: 24px; font-size: 13px; z-index: 9999; opacity: 0; transition: opacity .3s; pointer-events: none; white-space: nowrap; }

    /* ── APP Screenshots tab ──────────────────────────────────────────────── */
    .aps-style-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
    .aps-style-chip { padding: 6px 14px; border-radius: 20px; font-size: 13px; cursor: pointer; border: 2px solid #e5e7eb; background: #f9fafb; color: #374151; transition: all .15s; user-select: none; }
    .aps-style-chip:hover { border-color: #9ca3af; }
    .aps-style-chip.active { border-color: #3b82f6; background: #eff6ff; color: #1d4ed8; font-weight: 500; }
    .aps-color-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 12px; }
    .aps-color-label { font-size: 13px; color: #6b7280; display: flex; align-items: center; gap: 6px; }
    .aps-color-label input[type=color] { width: 36px; height: 28px; border: 1.5px solid #d1d5db; border-radius: 6px; padding: 2px; cursor: pointer; background: none; }

    /* Slide editor row */
    .aps-slide-editor { display: flex; gap: 18px; padding: 16px; background: #f8fafc; border-radius: 10px; margin-bottom: 12px; align-items: flex-start; border: 1px solid #e5e7eb; }
    .aps-slide-info { flex: 1; min-width: 0; }
    .aps-slide-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
    .aps-slide-num { font-size: 12px; font-weight: 700; color: #6b7280; background: #e5e7eb; border-radius: 20px; padding: 2px 8px; }
    .aps-type-badge { font-size: 11px; font-weight: 600; border-radius: 12px; padding: 2px 8px; }
    .aps-type-hero    { background: #fef3c7; color: #92400e; }
    .aps-type-feature { background: #dbeafe; color: #1e40af; }
    .aps-type-trust   { background: #d1fae5; color: #065f46; }
    .aps-text-input { width: 100%; padding: 6px 10px; border: 1.5px solid #d1d5db; border-radius: 7px; font-size: 13px; font-family: inherit; resize: vertical; outline: none; transition: border-color .2s; }
    .aps-text-input:focus { border-color: #3b82f6; }
    .aps-field-label { font-size: 11px; color: #9ca3af; margin-bottom: 3px; display: block; }
    .aps-size-btn { width: 22px; height: 22px; border: 1.5px solid #d1d5db; border-radius: 5px; background: #fff; font-size: 14px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; transition: background .15s; }
    .aps-size-btn:hover { background: #f3f4f6; }

    /* Slide preview */
    .aps-preview-clip { width: 145px; height: 315px; overflow: hidden; border-radius: 12px; flex-shrink: 0; box-shadow: 0 4px 20px rgba(0,0,0,.15); position: relative; }
    .aps-preview-scale { transform: scale(0.4394); transform-origin: top left; }

    /* The actual slide canvas div — 330×717, exported at 4× = 1320×2868 */
    .aps-slide-div { width: 330px; height: 717px; position: relative; overflow: hidden; font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif; }
    .aps-bg-decor { position: absolute; inset: 0; pointer-events: none; }
    .aps-slide-text { position: absolute; top: 0; left: 0; right: 0; padding: 42px 26px 16px; text-align: center; z-index: 2; }
    .aps-headline { font-size: 44px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; white-space: pre-line; }
    .aps-subheadline { font-size: 14px; font-weight: 400; line-height: 1.55; margin-top: 12px; opacity: 0.82; }

    /* CSS-only iPhone frame */
    .aps-phone-outer { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); width: 182px; height: 395px; background: #1c1c1e; border-radius: 44px; box-shadow: 0 0 0 2px #3a3a3c, 0 0 0 5px #1c1c1e, 0 24px 56px rgba(0,0,0,.5); padding: 13px; z-index: 2; }
    .aps-phone-screen { width: 100%; height: 100%; border-radius: 33px; overflow: hidden; background: #000; position: relative; }
    .aps-phone-island { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 86px; height: 26px; background: #1c1c1e; border-radius: 18px; z-index: 3; }
    .aps-phone-img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .aps-phone-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #555; flex-direction: column; gap: 6px; }
    .aps-phone-ph span { font-size: 11px; color: #666; }

    /* ══ AI CMO ══ */
    .cmo-wrap { max-width: 100%; margin: 0 auto; padding: 0 24px; }
    .cmo-overview-banner { background: white; border-radius: 12px; padding: 20px 24px; border: 1px solid #e5e7eb; box-shadow: 0 1px 3px rgba(0,0,0,.04); margin-bottom: 20px; }
    .cmo-two-col { display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: start; }
    .cmo-sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 20px; max-height: calc(100vh - 100px); overflow-y: auto; }
    .cmo-sidebar::-webkit-scrollbar { width: 4px; }
    .cmo-sidebar::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }
    .cmo-side-card { background: white; border-radius: 12px; padding: 20px; border: 1px solid #e5e7eb; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
    .cmo-side-title { font-size: 13px; font-weight: 700; color: #374151; margin-bottom: 10px; text-transform: uppercase; letter-spacing: .5px; }
    .cmo-main-area { min-height: 500px; }
    .cmo-main-tabs { display: flex; gap: 0; background: white; border-radius: 12px 12px 0 0; border: 1px solid #e5e7eb; border-bottom: none; overflow: hidden; }
    .cmo-main-tab { flex: 1; padding: 12px 16px; font-size: 13px; font-weight: 500; color: #6b7280; cursor: pointer; border: none; background: none; border-bottom: 2px solid transparent; transition: all .15s; }
    .cmo-main-tab:hover { background: #f9fafb; }
    .cmo-main-tab.active { color: #111827; font-weight: 600; border-bottom-color: #111827; background: white; }
    .cmo-tab-pane { display: none; background: white; border: 1px solid #e5e7eb; border-top: none; border-radius: 0 0 12px 12px; padding: 24px 28px; min-height: 400px; }
    .cmo-tab-pane.active { display: block; }

    /* SEO sub-tabs */
    .cmo-seo-subtabs { display: flex; gap: 0; border-bottom: 1px solid #e5e7eb; margin: -20px -20px 20px; padding: 0 20px; }
    .cmo-seo-subtab { padding: 10px 16px; font-size: 13px; color: #6b7280; cursor: pointer; border: none; background: none; border-bottom: 2px solid transparent; transition: all .15s; }
    .cmo-seo-subtab:hover { color: #374151; }
    .cmo-seo-subtab.active { color: #111827; font-weight: 600; border-bottom-color: #3b82f6; }
    .cmo-seo-count { display: inline-block; font-size: 10px; background: #fef2f2; color: #dc2626; padding: 1px 6px; border-radius: 10px; margin-left: 4px; font-weight: 600; }
    .cmo-seo-count-green { display: inline-block; font-size: 10px; background: #f0fdf4; color: #16a34a; padding: 1px 6px; border-radius: 10px; margin-left: 4px; font-weight: 600; }
    .cmo-seo-subpane { display: none; }
    .cmo-seo-subpane.active { display: block; }
    @media (max-width: 900px) { .cmo-two-col { grid-template-columns: 1fr; } .cmo-sidebar { position: static; max-height: none; } }
    .cmo-input-bar { display: flex; gap: 10px; margin-bottom: 16px; }
    .cmo-has-domain .cmo-input-bar { display: none; }
    .cmo-input-bar input { flex: 1; padding: 12px 16px; border: 1.5px solid #d1d5db; border-radius: 10px; font-size: 14px; outline: none; transition: border .2s; }
    .cmo-input-bar input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
    .cmo-input-bar button { padding: 12px 28px; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); color: #00ff88; border: none; border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: opacity .2s; font-family: 'SF Mono', 'Fira Code', monospace; }
    .cmo-input-bar button:hover { opacity: .9; }
    .cmo-input-bar button:disabled { opacity: .5; cursor: not-allowed; }

    /* Terminal */
    .cmo-terminal-wrap { background: #1a1a2e; border-radius: 12px; margin-bottom: 20px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
    .cmo-terminal-header { background: #16213e; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; }
    .cmo-terminal-header .cmo-th-left { display: flex; align-items: center; gap: 8px; }
    .cmo-terminal-header .cmo-dots { display: flex; gap: 6px; }
    .cmo-terminal-header .cmo-dots span { width: 12px; height: 12px; border-radius: 50%; }
    .cmo-terminal-header .cmo-dot-r { background: #ff5f56; }
    .cmo-terminal-header .cmo-dot-y { background: #ffbd2e; }
    .cmo-terminal-header .cmo-dot-g { background: #27c93f; }
    .cmo-terminal-title { color: #e2e8f0; font-size: 13px; font-family: 'SF Mono', 'Fira Code', monospace; font-weight: 500; }
    .cmo-terminal-status { color: #00ff88; font-size: 11px; font-family: 'SF Mono', monospace; display: flex; align-items: center; gap: 6px; }
    .cmo-terminal-status .cmo-pulse { width: 8px; height: 8px; border-radius: 50%; background: #00ff88; animation: cmoPulse 2s infinite; }
    @keyframes cmoPulse { 0%,100%{opacity:1} 50%{opacity:.3} }
    .cmo-terminal-toggle { background: none; border: none; color: #64748b; cursor: pointer; font-size: 16px; padding: 4px; }
    #cmo-terminal { padding: 14px 18px; max-height: 360px; overflow-y: auto; font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace; font-size: 12.5px; line-height: 1.7; }
    #cmo-terminal::-webkit-scrollbar { width: 6px; }
    #cmo-terminal::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
    #cmo-terminal .cmo-line { margin: 0; white-space: pre-wrap; word-break: break-all; }
    #cmo-terminal .cmo-line.info { color: #00ff88; }
    #cmo-terminal .cmo-line.warn { color: #fbbf24; }
    #cmo-terminal .cmo-line.error { color: #ef4444; }
    #cmo-terminal .cmo-line.success { color: #22d3ee; }
    #cmo-terminal .cmo-line.dim { color: #64748b; }
    #cmo-terminal .cmo-line.thinking { color: #c084fc; }
    #cmo-terminal .cmo-line.dispatch { color: #60a5fa; }
    #cmo-terminal .cmo-line.conclude { color: #34d399; font-weight: 600; }
    #cmo-terminal .cmo-line.iteration { color: #fbbf24; opacity: 0.7; font-size: 0.85em; border-top: 1px solid #334155; margin-top: 4px; padding-top: 4px; }
    #cmo-terminal .cmo-line.insight { color: #fbbf24; font-weight: 600; margin-top: 4px; padding: 4px 0; }
    #cmo-terminal .cmo-line.result { color: #94a3b8; font-size: 0.9em; }
    .cmo-terminal-collapsed #cmo-terminal { display: none; }

    /* Section cards */
    .cmo-section, .cmo-chat-section { opacity: 0; transform: translateY(20px); max-height: 0; overflow: hidden; margin-bottom: 0; padding: 0; border: none; transition: opacity .5s ease, transform .5s ease, max-height .5s ease, margin .3s ease, padding .3s ease; }
    .cmo-section.visible, .cmo-chat-section.visible { opacity: 1; transform: translateY(0); max-height: 5000px; overflow: visible; margin-bottom: 20px; padding: 24px; border: 1px solid #e5e7eb; }
    .cmo-section { background: white; border-radius: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
    .cmo-section.visible { background: white; border-radius: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
    .cmo-section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
    .cmo-section-header h3 { font-size: 16px; font-weight: 700; color: #111827; margin: 0; }
    .cmo-section-header .cmo-section-icon { font-size: 20px; }

    /* Overview card */
    .cmo-overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
    @media (max-width: 640px) { .cmo-overview-grid { grid-template-columns: 1fr; } }
    /* Responsive: reduce card left margin on narrow screens */
    @media (max-width: 600px) {
      .analysis-card, .analysis-summary-panel, .opportunity-card { margin-left: 12px !important; margin-right: 4px !important; }
      .chat-msg-time { margin-left: 12px; }
    }
    .cmo-overview-left .cmo-prod-name { font-size: 18px; font-weight: 700; color: #111827; margin-bottom: 6px; }
    .cmo-overview-left .cmo-prod-liner { font-size: 13px; color: #6b7280; line-height: 1.6; }
    .cmo-speed-grid { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
    .cmo-score-item { text-align: center; }
    .cmo-score-ring { position: relative; width: 64px; height: 64px; }
    .cmo-score-ring svg { transform: rotate(-90deg); }
    .cmo-score-ring .cmo-score-val { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; }
    .cmo-score-label { font-size: 10px; color: #6b7280; margin-top: 4px; }
    .cmo-cwv-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f3f4f6; font-size: 13px; }
    .cmo-cwv-row:last-child { border-bottom: none; }
    .cmo-cwv-val { font-weight: 600; }
    .cmo-cwv-val.good { color: #22c55e; }
    .cmo-cwv-val.needs-improvement { color: #f59e0b; }
    .cmo-cwv-val.poor { color: #ef4444; }
    .cmo-health-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f3f4f6; font-size: 13px; }
    .cmo-health-row:last-child { border-bottom: none; }
    .cmo-health-row .cmo-check { color: #22c55e; margin-right: 8px; }
    .cmo-health-val { color: #6b7280; font-size: 12px; font-weight: 500; }

    /* Knowledge Base */
    .cmo-kb-cards { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
    .cmo-kb-card { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: #f9fafb; border-radius: 10px; border: 1px solid #e5e7eb; cursor: pointer; transition: all .15s; font-size: 13px; font-weight: 500; color: #374151; }
    .cmo-kb-card:hover { border-color: #3b82f6; background: #f0f5ff; }
    .cmo-kb-card.disabled { opacity: .4; cursor: default; pointer-events: none; }
    .cmo-kb-card .cmo-kb-icon { font-size: 16px; }
    .cmo-comp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
    .cmo-comp-chip { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #f9fafb; border-radius: 10px; border: 1px solid #e5e7eb; font-size: 12px; color: #374151; cursor: pointer; transition: all .15s; position: relative; }
    .cmo-comp-chip:hover { border-color: #3b82f6; }
    .cmo-comp-chip img { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; }
    .cmo-comp-chip .cmo-comp-x { position: absolute; top: -4px; right: -4px; width: 18px; height: 18px; border-radius: 50%; background: #f3f4f6; border: 1px solid #d1d5db; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #6b7280; cursor: pointer; opacity: 0; transition: opacity .15s; }
    .cmo-comp-chip:hover .cmo-comp-x { opacity: 1; }
    .cmo-comp-add { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border: 2px dashed #d1d5db; border-radius: 10px; font-size: 12px; color: #9ca3af; cursor: pointer; transition: all .15s; }
    .cmo-comp-add:hover { border-color: #3b82f6; color: #3b82f6; }

    /* Assets */
    .cmo-asset-todo { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 10px; border: 1px solid #e5e7eb; margin-bottom: 10px; transition: all .15s; }
    .cmo-asset-todo:hover { border-color: #d1d5db; }
    .cmo-asset-todo .cmo-asset-check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #d1d5db; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
    .cmo-asset-todo .cmo-asset-check.done { background: #22c55e; border-color: #22c55e; color: white; }
    .cmo-asset-todo .cmo-asset-info { flex: 1; }
    .cmo-asset-todo .cmo-asset-name { font-size: 13px; font-weight: 600; color: #111827; }
    .cmo-asset-todo .cmo-asset-desc { font-size: 11px; color: #6b7280; margin-top: 2px; }
    .cmo-asset-upload-btn { padding: 6px 14px; border: 1px solid #d1d5db; background: white; border-radius: 8px; font-size: 12px; color: #374151; cursor: pointer; font-weight: 500; transition: all .15s; }
    .cmo-asset-upload-btn:hover { background: #f3f4f6; border-color: #3b82f6; color: #3b82f6; }
    .cmo-asset-progress { margin-top: 14px; }
    .cmo-asset-progress-bar { height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; }
    .cmo-asset-progress-fill { height: 100%; background: linear-gradient(90deg, #3b82f6, #6366f1); border-radius: 3px; transition: width .3s; }
    .cmo-asset-progress-text { font-size: 11px; color: #6b7280; margin-top: 6px; text-align: right; }
    .cmo-asset-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; margin-top: 16px; }
    .cmo-asset-thumb { width: 100%; aspect-ratio: 1; border-radius: 8px; object-fit: cover; border: 1px solid #e5e7eb; }
    .cmo-upload-drop { border: 2px dashed #d1d5db; border-radius: 12px; padding: 24px; text-align: center; color: #9ca3af; font-size: 13px; cursor: pointer; transition: all .15s; margin-top: 12px; }
    .cmo-upload-drop:hover { border-color: #3b82f6; color: #3b82f6; background: #f8faff; }
    .cmo-upload-drop.dragover { border-color: #3b82f6; background: #eff6ff; }

    /* Content Tasks */
    .cmo-task-filters { display: flex; gap: 0; margin-bottom: 16px; background: #f3f4f6; border-radius: 10px; overflow: hidden; }
    .cmo-task-filter { flex: 1; padding: 8px 12px; font-size: 12px; color: #6b7280; cursor: pointer; border: none; background: none; transition: all .15s; font-weight: 500; text-align: center; }
    .cmo-task-filter:hover { color: #374151; }
    .cmo-task-filter.active { background: white; color: #111827; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); border-radius: 8px; margin: 2px; }
    .cmo-task-grid { display: flex; flex-direction: column; gap: 8px; }
    .cmo-task-card { padding: 16px; border-radius: 10px; border: 1px solid #e5e7eb; cursor: pointer; transition: all .15s; background: white; display: flex; flex-direction: column; gap: 8px; }
    .cmo-task-card:hover { border-color: #3b82f6; box-shadow: 0 2px 8px rgba(59,130,246,.1); transform: translateY(-1px); }
    .cmo-task-top { display: flex; align-items: center; gap: 8px; }
    .cmo-badge { display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 600; text-transform: uppercase; }
    .cmo-badge.critical { background: #fef2f2; color: #dc2626; }
    .cmo-badge.high { background: #fff7ed; color: #ea580c; }
    .cmo-badge.medium { background: #f0fdf4; color: #16a34a; }
    .cmo-badge.low { background: #f0f9ff; color: #0284c7; }
    .cmo-badge-type { font-size: 11px; color: #6b7280; }
    .cmo-task-title { font-size: 13px; font-weight: 600; color: #111827; line-height: 1.4; }
    .cmo-task-btn { padding: 6px 14px; border: none; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all .15s; width: 100%; text-align: center; margin-top: auto; }
    .cmo-task-btn.generate { background: #111827; color: white; }
    .cmo-task-btn.generate:hover { background: #374151; }
    .cmo-task-btn.blocked { background: #f3f4f6; color: #9ca3af; border: 1px solid #e5e7eb; }
    .cmo-task-btn.blocked:hover { border-color: #3b82f6; color: #3b82f6; }

    /* Opportunities Tab */
    .cmo-opp-section-title { font-size: 14px; font-weight: 700; color: #111827; margin-bottom: 12px; }
    .cmo-opp-card { display: flex; gap: 14px; padding: 16px; margin-bottom: 10px; border-radius: 10px; border: 1px solid #e5e7eb; border-left: 4px solid; transition: all .15s; }
    .cmo-opp-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
    .cmo-opp-card.high { border-left-color: #22c55e; background: #f0fdf4; }
    .cmo-opp-card.medium { border-left-color: #eab308; background: #fefce8; }
    .cmo-opp-card.low { border-left-color: #ef4444; background: #fef2f2; }
    .cmo-opp-score { font-size: 28px; font-weight: 800; min-width: 48px; text-align: center; line-height: 1.1; }
    .cmo-opp-card.high .cmo-opp-score { color: #16a34a; }
    .cmo-opp-card.medium .cmo-opp-score { color: #ca8a04; }
    .cmo-opp-card.low .cmo-opp-score { color: #dc2626; }
    .cmo-opp-body { flex: 1; }
    .cmo-opp-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
    .cmo-opp-platform { font-size: 14px; font-weight: 700; color: #111827; }
    .cmo-opp-content-type { font-size: 12px; color: #6b7280; background: #f3f4f6; padding: 1px 8px; border-radius: 4px; }
    .cmo-opp-reason { font-size: 13px; color: #4b5563; line-height: 1.5; margin-bottom: 6px; }
    .cmo-opp-status { font-size: 12px; font-weight: 600; }
    .cmo-opp-status.ready { color: #16a34a; }
    .cmo-opp-status.blocked { color: #ca8a04; }
    .cmo-opp-upload-btn { font-size: 12px; color: #3b82f6; background: none; border: 1px solid #3b82f6; border-radius: 6px; padding: 2px 10px; cursor: pointer; margin-left: 6px; }
    .cmo-opp-upload-btn:hover { background: #3b82f6; color: white; }
    .cmo-spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid #e5e7eb; border-top-color: #3b82f6; border-radius: 50%; animation: spin 1s linear infinite; }
    @keyframes spin { to { transform: rotate(360deg); } }
    .cmo-opp-dismiss { background: none; border: none; color: #d1d5db; font-size: 16px; cursor: pointer; padding: 0 2px; margin-left: auto; line-height: 1; transition: color .15s; }
    .cmo-opp-dismiss:hover { color: #ef4444; }
    .cmo-opp-links { display: flex; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #f3f4f6; }
    .cmo-opp-link { font-size: 12px; color: #6b7280; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 6px; padding: 4px 12px; cursor: pointer; transition: all .15s; }
    .cmo-opp-link:hover { color: #111827; background: #f3f4f6; border-color: #d1d5db; }
    .cmo-asset-guide { margin-top: 20px; padding: 16px; background: #f9fafb; border-radius: 10px; border: 1px solid #e5e7eb; }
    .cmo-asset-guide-title { font-size: 13px; font-weight: 700; color: #111827; margin-bottom: 10px; }
    .cmo-asset-guide-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f3f4f6; font-size: 13px; color: #374151; }
    .cmo-asset-guide-item:last-child { border-bottom: none; }
    .cmo-asset-guide-count { font-weight: 700; color: #3b82f6; }

    /* Action Plan (Tasks tab redesign) */
    .cmo-action-item { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid #e5e7eb; border-radius: 10px; margin-bottom: 8px; align-items: flex-start; transition: all .15s; cursor: pointer; }
    .cmo-action-item:hover { border-color: #3b82f6; box-shadow: 0 2px 8px rgba(59,130,246,.08); }
    .cmo-action-rank { font-size: 20px; font-weight: 800; color: #d1d5db; min-width: 32px; text-align: center; line-height: 1.2; }
    .cmo-action-body { flex: 1; }
    .cmo-action-title { font-size: 14px; font-weight: 600; color: #111827; margin-bottom: 4px; }
    .cmo-action-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
    .cmo-action-badge { font-size: 11px; padding: 1px 8px; border-radius: 4px; font-weight: 500; }
    .cmo-action-badge.platform { background: #ede9fe; color: #7c3aed; }
    .cmo-action-badge.type { background: #f3f4f6; color: #6b7280; }
    .cmo-action-badge.impact-high { background: #dcfce7; color: #16a34a; }
    .cmo-action-badge.impact-medium { background: #fef9c3; color: #a16207; }
    .cmo-action-right { display: flex; align-items: center; flex-shrink: 0; }
    .cmo-action-btn { padding: 6px 16px; border: none; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; }
    .cmo-action-btn.ready { background: #111827; color: white; }
    .cmo-action-btn.ready:hover { background: #374151; }
    .cmo-action-btn.blocked { background: #f3f4f6; color: #9ca3af; border: 1px solid #e5e7eb; font-weight: 500; }
    .cmo-action-btn.blocked:hover { border-color: #3b82f6; color: #3b82f6; }

    /* Social Summary */
    .cmo-social-overview { margin-bottom: 20px; }
    .cmo-social-overview-title { font-size: 14px; font-weight: 700; color: #111827; margin-bottom: 12px; }
    .cmo-social-overview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-bottom: 16px; }
    .cmo-social-overview-card { padding: 14px; border-radius: 10px; border: 1px solid #e5e7eb; text-align: center; cursor: pointer; transition: all .15s; }
    .cmo-social-overview-card:hover { border-color: #3b82f6; box-shadow: 0 2px 6px rgba(59,130,246,.1); }
    .cmo-social-overview-card.active { border-color: #111827; background: #f9fafb; }
    .cmo-social-overview-emoji { font-size: 24px; margin-bottom: 4px; }
    .cmo-social-overview-name { font-size: 13px; font-weight: 600; color: #111827; }
    .cmo-social-overview-count { font-size: 20px; font-weight: 800; color: #3b82f6; margin: 4px 0; }
    .cmo-social-overview-stat { font-size: 11px; color: #6b7280; }
    .cmo-social-overview-bar { height: 4px; border-radius: 2px; background: #e5e7eb; margin-top: 8px; overflow: hidden; }
    .cmo-social-overview-bar-fill { height: 100%; border-radius: 2px; background: #3b82f6; }

    /* Social Insights */
    .cmo-social-tabs { display: flex; gap: 0; margin-bottom: 16px; border-bottom: 2px solid #e5e7eb; }
    .cmo-social-tab { padding: 8px 16px; font-size: 13px; color: #6b7280; cursor: pointer; border: none; background: none; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .15s; font-weight: 500; }
    .cmo-social-tab:hover { color: #374151; }
    .cmo-social-tab.active { color: #111827; font-weight: 600; border-bottom-color: #111827; }
    .cmo-social-table { width: 100%; border-collapse: collapse; font-size: 13px; }
    .cmo-social-table th { text-align: left; padding: 8px 10px; font-size: 11px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid #e5e7eb; }
    .cmo-social-table td { padding: 10px; border-bottom: 1px solid #f3f4f6; color: #374151; vertical-align: top; }
    .cmo-social-table tr { cursor: pointer; }
    .cmo-social-table tr:hover td { background: #f9fafb; }
    .cmo-social-thumb { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; background: #f3f4f6; }
    .cmo-social-thumb-placeholder { width: 72px; height: 72px; border-radius: 8px; background: #f3f4f6; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #9ca3af; }
    .cmo-social-post-title { font-weight: 600; color: #111827; font-size: 13px; line-height: 1.4; margin-bottom: 3px; }
    .cmo-social-post-text { color: #6b7280; font-size: 12px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .cmo-social-tag { display: inline-block; background: #f3f4f6; color: #6b7280; font-size: 11px; padding: 1px 6px; border-radius: 4px; margin: 2px 2px 0 0; }
    .cmo-social-stat { font-size: 12px; color: #6b7280; white-space: nowrap; }
    .cmo-social-author { font-size: 12px; color: #3b82f6; text-decoration: none; }
    .cmo-social-author:hover { text-decoration: underline; }
    .cmo-social-link { color: #3b82f6; text-decoration: none; font-size: 12px; }
    .cmo-social-link:hover { text-decoration: underline; }
    .cmo-social-keyword-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; padding: 8px 12px; background: #f9fafb; border-radius: 8px; font-size: 12px; color: #6b7280; }
    .cmo-social-keyword-bar strong { color: #111827; }

    /* Chat inline */
    .cmo-chat-section { background: white; border-radius: 14px; border: 1px solid #e5e7eb; overflow: hidden; margin-bottom: 20px; }
    .cmo-chat-header { padding: 14px 20px; border-bottom: 1px solid #e5e7eb; font-size: 15px; font-weight: 600; color: #111827; display: flex; align-items: center; gap: 8px; }
    #cmo-chat-messages { padding: 16px 20px; max-height: 320px; overflow-y: auto; min-height: 80px; }
    .cmo-chat-bubble { margin-bottom: 12px; max-width: 85%; }
    .cmo-chat-bubble.ai { background: #f3f4f6; padding: 10px 14px; border-radius: 12px 12px 12px 4px; font-size: 13px; color: #374151; line-height: 1.5; }
    .cmo-chat-bubble.user { background: #111827; color: white; padding: 10px 14px; border-radius: 12px 12px 4px 12px; font-size: 13px; margin-left: auto; line-height: 1.5; }
    .cmo-chat-bubble .cmo-chat-label { font-size: 11px; font-weight: 600; color: #6b7280; margin-bottom: 4px; }
    .cmo-chat-input-wrap { display: flex; gap: 8px; padding: 12px 20px; border-top: 1px solid #e5e7eb; }
    .cmo-chat-input-wrap input { flex: 1; padding: 10px 14px; border: 1px solid #d1d5db; border-radius: 10px; font-size: 13px; outline: none; }
    .cmo-chat-input-wrap input:focus { border-color: #3b82f6; }
    .cmo-chat-input-wrap button { padding: 10px 20px; background: #111827; color: white; border: none; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
    .cmo-chat-input-wrap button:hover { background: #374151; }

    /* Detail slide-in panel */
    .cmo-detail-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 1000; opacity: 0; transition: opacity .2s; pointer-events: none; }
    .cmo-detail-overlay.open { opacity: 1; pointer-events: auto; }
    .cmo-detail-panel { position: fixed; top: 0; right: -500px; width: 500px; height: 100vh; background: white; z-index: 1001; overflow-y: auto; transition: right .3s ease; box-shadow: -4px 0 20px rgba(0,0,0,.1); }
    .cmo-detail-panel.open { right: 0; }
    .cmo-detail-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 22px; cursor: pointer; color: #6b7280; z-index: 2; }
    .cmo-detail-content { padding: 32px 28px; }
    .cmo-detail-content h2 { font-size: 22px; font-weight: 700; margin-bottom: 20px; }
    .cmo-detail-content h3 { font-size: 16px; font-weight: 700; margin: 24px 0 10px; color: #111827; }
    .cmo-detail-content p { font-size: 14px; line-height: 1.7; color: #374151; margin-bottom: 12px; }
    .cmo-detail-content ul { padding-left: 20px; margin-bottom: 12px; }
    .cmo-detail-content li { font-size: 13px; line-height: 1.6; color: #374151; margin-bottom: 6px; }
    .cmo-detail-content .cmo-field { margin-bottom: 16px; }
    .cmo-detail-content .cmo-field-label { font-size: 12px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
    .cmo-detail-content .cmo-field-val { font-size: 14px; color: #111827; line-height: 1.6; }

    /* Article Preview */
    .cmo-article-preview { padding: 0; }
    .cmo-article-cover { width: 100%; border-radius: 12px; margin-bottom: 20px; }
    .cmo-article-progress { display: flex; gap: 16px; padding: 12px 16px; background: #f9fafb; border-radius: 8px; margin-bottom: 20px; font-size: 13px; }
    .cmo-article-progress .done { color: #22c55e; }
    .cmo-article-progress .loading { color: #f59e0b; }
    .cmo-article-progress .pending { color: #9ca3af; }
    .cmo-article-body { font-size: 15px; line-height: 1.8; color: #374151; }
    .cmo-article-body h1 { font-size: 24px; font-weight: 700; margin: 24px 0 12px; }
    .cmo-article-body h2 { font-size: 20px; font-weight: 700; margin: 20px 0 10px; }
    .cmo-article-body h3 { font-size: 17px; font-weight: 600; margin: 16px 0 8px; }
    .cmo-article-body p { margin-bottom: 12px; }
    .cmo-article-body ul, .cmo-article-body ol { margin-bottom: 12px; padding-left: 24px; }
    .cmo-article-body li { margin-bottom: 6px; }
    .cmo-article-body blockquote { border-left: 3px solid #3b82f6; padding-left: 16px; color: #6b7280; margin: 12px 0; }
    .cmo-article-body code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: 13px; }
    .cmo-article-body pre { background: #1e293b; color: #e2e8f0; padding: 16px; border-radius: 8px; overflow-x: auto; margin: 12px 0; }
    .cmo-article-body pre code { background: none; padding: 0; }
    .cmo-article-illustrations { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 20px 0; }
    .cmo-article-illustrations img { width: 100%; border-radius: 8px; border: 1px solid #e5e7eb; }
    .cmo-article-illustrations .cmo-ill-desc { font-size: 12px; color: #6b7280; margin-top: 4px; }
    .cmo-article-actions { display: flex; gap: 10px; padding: 16px 0; border-top: 1px solid #e5e7eb; margin-top: 20px; }
    .cmo-article-actions button { padding: 10px 20px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid #d1d5db; background: white; color: #374151; }
    .cmo-article-actions button:hover { background: #f3f4f6; }
    .cmo-article-lang-select { padding: 4px 8px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 12px; background: white; cursor: pointer; }

    /* Empty state */
    .cmo-empty { text-align: center; padding: 60px 20px; color: #9ca3af; }
    .cmo-empty .cmo-empty-icon { font-size: 48px; margin-bottom: 16px; }
    .cmo-empty .cmo-empty-title { font-size: 16px; font-weight: 600; color: #6b7280; margin-bottom: 8px; }
    .cmo-empty .cmo-empty-desc { font-size: 13px; line-height: 1.5; }

    /* Spinner */
    @keyframes cmoSpin { to { transform: rotate(360deg) } }
    .cmo-spin { display: inline-block; width: 12px; height: 12px; border: 2px solid rgba(255,255,255,.3); border-top-color: white; border-radius: 50%; animation: cmoSpin .6s linear infinite; }

    /* ══════════════════════════════════════════════════════════ */
    /* Phase 1: Analysis Mode — full-screen terminal             */
    /* ══════════════════════════════════════════════════════════ */
    .cmo-phase-analysis .cmo-terminal-wrap { max-width: 800px; margin: 40px auto; max-height: calc(100vh - 256px); display: flex; flex-direction: column; }
    .cmo-phase-analysis #cmo-terminal { flex: 1; overflow-y: auto; max-height: none; }
    .cmo-phase-analysis #cmo-dashboard-v2 { display: none !important; }
    .cmo-phase-analysis .cmo-chat-fixed { display: none !important; }

    .cmo-terminal-progress { display: none; height: 6px; background: #334155; border-radius: 0 0 12px 12px; overflow: hidden; position: relative; }
    .cmo-terminal-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #22c55e, #3b82f6); transition: width 0.8s ease; }

    /* ══════════════════════════════════════════════════════════ */
    /* Phase 2: Dashboard Mode — single-column scroll            */
    /* ══════════════════════════════════════════════════════════ */
    .cmo-phase-dashboard .cmo-terminal-wrap { max-height: 44px; overflow: hidden; cursor: pointer; transition: max-height 0.4s ease; border-radius: 12px; margin-bottom: 20px; }
    .cmo-phase-dashboard .cmo-terminal-wrap.cmo-terminal-expanded { max-height: 600px; cursor: default; }
    .cmo-phase-dashboard .cmo-terminal-wrap .cmo-terminal-header { padding: 10px 16px; }
    .cmo-phase-dashboard #cmo-terminal { display: none; }
    .cmo-phase-dashboard .cmo-terminal-wrap.cmo-terminal-expanded #cmo-terminal { display: block; }
    .cmo-phase-dashboard .cmo-terminal-progress { display: none; }

    #cmo-dashboard-v2 { display: none; max-width: 900px; margin: 0 auto; }
    @keyframes cmoSlideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
    .cmo-dashboard-entering { animation: cmoSlideUp 0.5s ease; }

    /* Sticky nav */
    .cmo-sticky-nav { position: sticky; top: 0; z-index: 100; background: white; border-bottom: 1px solid #e5e7eb; padding: 8px 0; margin-bottom: 20px; display: flex; gap: 4px; }
    .cmo-sticky-nav button { flex: 1; padding: 8px 12px; border: none; background: none; font-size: 13px; font-weight: 500; color: #6b7280; cursor: pointer; border-radius: 8px; transition: all 0.2s; white-space: nowrap; }
    .cmo-sticky-nav button:hover { background: #f3f4f6; color: #111827; }
    .cmo-sticky-nav button.active { background: #111827; color: white; }

    /* Dashboard sections */
    .cmo-dash-section { margin-bottom: 24px; }
    .cmo-dash-section-title { font-size: 15px; font-weight: 700; color: #111827; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }

    /* Opportunity cards — vertical list */
    .cmo-opp-scroll { display: flex; flex-direction: column; gap: 10px; }
    .cmo-opp-card { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 12px; border-left: 4px solid #e5e7eb; background: white; cursor: pointer; transition: all 0.15s; }
    .cmo-opp-card:hover { background: #f9fafb; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
    .cmo-opp-card.score-high { border-left-color: #22c55e; }
    .cmo-opp-card.score-mid { border-left-color: #f59e0b; }
    .cmo-opp-card.score-low { border-left-color: #ef4444; }
    .cmo-opp-score { font-size: 28px; font-weight: 800; color: #111827; min-width: 48px; text-align: center; flex-shrink: 0; }
    .cmo-opp-info { flex: 1; min-width: 0; }
    .cmo-opp-name { font-size: 14px; font-weight: 700; color: #111827; }
    .cmo-opp-reason { font-size: 12px; color: #6b7280; line-height: 1.4; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .cmo-opp-actions-link { font-size: 12px; color: #3b82f6; font-weight: 500; white-space: nowrap; flex-shrink: 0; }
    .cmo-opp-dismiss-btn { background: none; border: none; color: #d1d5db; font-size: 14px; cursor: pointer; padding: 4px; flex-shrink: 0; }
    .cmo-opp-dismiss-btn:hover { color: #ef4444; }
    .cmo-hire-btn { font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 20px; border: 1.5px solid #6366f1; color: #6366f1; background: white; cursor: pointer; white-space: nowrap; flex-shrink: 0; transition: all .15s; }
    .cmo-hire-btn:hover { background: #6366f1; color: white; }
    .cmo-hire-btn.hired { border-color: #22c55e; color: #16a34a; background: #f0fdf4; cursor: default; }
    .sb-agent-item { padding-left: 36px !important; font-size: 13px !important; color: #a5b4fc !important; }
    .sb-agent-item.active { color: #c4b5fd !important; background: #4f46e520 !important; }
    .sb-agents-label { font-size: 10px; font-weight: 600; letter-spacing: .08em; color: #6b7280; padding: 12px 16px 4px; text-transform: uppercase; }
    #app-sidebar.collapsed .sb-agents-label { display: none; }
    #app-sidebar.collapsed .sb-agent-item .sb-item-label { opacity: 0; pointer-events: none; }
    .sb-product-item { display: flex; align-items: center; gap: 8px; padding: 6px 16px; cursor: pointer; border-radius: 6px; margin: 1px 6px; transition: background .15s; }
    .sb-product-item:hover { background: #ffffff12; }
    .sb-product-item-icon { font-size: 13px; width: 20px; text-align: center; flex-shrink: 0; }
    .sb-product-item-label { font-size: 12px; color: #9ca3af; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .sb-product-item-badge { font-size: 10px; font-weight: 700; flex-shrink: 0; }
    .sb-product-item-badge.ok { color: #22c55e; }
    .sb-product-item-badge.warn { color: #f59e0b; }
    .sb-product-item-badge.miss { color: #ef4444; }
    @keyframes sbPulse { 0%,100%{opacity:.3} 50%{opacity:1} }
    .sb-product-item-badge.loading { color: #6366f1; animation: sbPulse .9s ease infinite; font-size: 14px; letter-spacing: 1px; }
    #app-sidebar.collapsed .sb-product-item .sb-product-item-label,
    #app-sidebar.collapsed .sb-product-item .sb-product-item-badge { display: none; }
    #app-sidebar.collapsed #sb-product-section .sb-agents-label { display: none; }

    /* Action groups */
    .cmo-action-group { margin-bottom: 16px; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; }
    .cmo-action-group-header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #f9fafb; cursor: pointer; user-select: none; transition: background 0.15s; }
    .cmo-action-group-header:hover { background: #f3f4f6; }
    .cmo-action-group-header .cmo-ag-icon { font-size: 16px; }
    .cmo-action-group-header .cmo-ag-title { flex: 1; font-size: 14px; font-weight: 600; color: #374151; }
    .cmo-action-group-header .cmo-ag-badge { background: #111827; color: white; font-size: 11px; padding: 1px 8px; border-radius: 10px; }
    .cmo-action-group-header .cmo-ag-arrow { font-size: 12px; color: #9ca3af; transition: transform 0.2s; }
    .cmo-action-group.open .cmo-ag-arrow { transform: rotate(180deg); }
    .cmo-action-group-body { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
    .cmo-action-group.open .cmo-action-group-body { max-height: 2000px; }
    .cmo-action-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid #f3f4f6; }
    .cmo-action-item:hover { background: #fafafa; }
    .cmo-action-item.done { opacity: 0.45; }
    .cmo-action-item.done .cmo-ai-title { text-decoration: line-through; color: #9ca3af; }
    .cmo-task-done-btn { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #d1d5db; background: none; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
    .cmo-task-done-btn:hover { border-color: #22c55e; background: #f0fdf4; }
    .cmo-task-done-btn.done { background: #22c55e; border-color: #22c55e; color: #fff; font-size: 11px; }
    .cmo-ag-badge-done { font-size: 10px; color: #22c55e; margin-left: 4px; }
    .cmo-action-item .cmo-ai-num { font-size: 13px; font-weight: 700; color: #9ca3af; min-width: 24px; }
    .cmo-action-item .cmo-ai-info { flex: 1; min-width: 0; }
    .cmo-action-item .cmo-ai-title { font-size: 13px; font-weight: 600; color: #111827; }
    .cmo-action-item .cmo-ai-platform { font-size: 11px; color: #6b7280; margin-top: 2px; }
    .cmo-action-item .cmo-ai-btn { padding: 5px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; border: none; cursor: pointer; }
    .cmo-ai-btn-generate { background: #111827; color: white; }
    .cmo-ai-btn-upload { background: white; color: #6b7280; border: 1px solid #d1d5db !important; }
    .cmo-ai-btn-done { background: #f0fdf4; color: #22c55e; cursor: default; }

    /* Fixed bottom chat */
    .cmo-chat-fixed { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 90; background: white; border-top: 1px solid #e5e7eb; padding: 10px 20px; box-shadow: 0 -2px 10px rgba(0,0,0,.05); }
    .cmo-chat-fixed form { max-width: 900px; margin: 0 auto; display: flex; gap: 8px; }
    .cmo-chat-fixed input { flex: 1; padding: 10px 14px; border: 1px solid #d1d5db; border-radius: 10px; font-size: 13px; outline: none; }
    .cmo-chat-fixed input:focus { border-color: #3b82f6; }
    .cmo-chat-fixed button { padding: 10px 18px; background: #111827; color: white; border: none; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; }

    /* Competitors inline */
    .cmo-comp-inline { display: flex; flex-wrap: wrap; gap: 8px; }
    .cmo-comp-chip { display: flex; align-items: center; gap: 6px; padding: 6px 12px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 12px; color: #374151; cursor: pointer; transition: all 0.15s; }
    .cmo-comp-chip:hover { background: #f3f4f6; border-color: #d1d5db; }
    .cmo-comp-chip img { width: 16px; height: 16px; border-radius: 4px; }

    /* Social overview compact */
    .cmo-social-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f3f4f6; font-size: 13px; }
    .cmo-social-row:last-child { border-bottom: none; }
    .cmo-social-row .cmo-sr-platform { font-weight: 600; color: #374151; min-width: 80px; }
    .cmo-social-row .cmo-sr-stat { color: #6b7280; }
    .cmo-social-row .cmo-sr-top { color: #9ca3af; font-size: 11px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    /* Pad bottom for fixed chat */
    .cmo-phase-dashboard .cmo-wrap { padding-bottom: 70px; }
