        /* ================= 1. 全局基础样式 ================= */
        * { box-sizing: border-box; margin: 0; padding: 0; }
        body {
            background-color: #f9fafb;
            color: #111827;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        }

        /* ================= 2. 居中竖排大框架 ================= */
        .container {
            max-width: 700px;
            margin: 0 auto;
            background-color: #ffffff;
            padding: 40px 24px;
            min-height: 100vh;
        }

        /* ================= 3. 顶部大标题与副标题 ================= */
        .header-section {
            text-align: center;
            margin-bottom: 30px;
        }
        .main-title {
            font-size: 32px;
            font-weight: 800;
            letter-spacing: -0.5px;
            margin: 0 0 12px 0;
        }
        .subtitle {
            font-size: 14px;
            color: #6b7280;
            line-height: 1.6;
        }

        /* ================= 4. 搜索框区域 ================= */
        .search-section { margin-bottom: 24px; }
        .search-row {
            display: flex;
            gap: 10px;
        }
        .search-input {
            flex: 1;
            padding: 14px 16px;
            font-size: 18px;
            font-weight: bold;
            border: 2px solid #e5e7eb;
            border-radius: 12px;
            outline: none;
        }
        .search-input:focus { border-color: #2563eb; }
        .trending-row {
            margin-top: 8px;
            font-size: 13px;
            color: #9ca3af;
        }
        .trending-row span {
            color: #2563eb;
            font-weight: bold;
            margin-left: 6px;
            cursor: pointer;
        }
        .trending-row span:hover { text-decoration: underline; }

        /* ================= 4.5 雪球关注榜列表 ================= */
        .xq-list-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 14px;
            margin-bottom: 8px;
        }
        .xq-list-title {
            font-size: 12px;
            font-weight: bold;
            color: #9ca3af;
            text-transform: uppercase;
        }
        .xq-list-toggle {
            font-size: 12px;
            color: #2563eb;
            cursor: pointer;
            font-weight: 600;
        }
        .xq-list-toggle:hover { text-decoration: underline; }
        .xq-list {
            max-height: 280px;
            overflow-y: auto;
            border: 1px solid #e5e7eb;
            border-radius: 10px;
            display: none;
        }
        .xq-list.show { display: block; }
        .xq-list::-webkit-scrollbar { width: 5px; }
        .xq-list::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
        .xq-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 9px 14px;
            cursor: pointer;
            transition: background 0.12s;
            border-bottom: 1px solid #f3f4f6;
        }
        .xq-item:last-child { border-bottom: none; }
        .xq-item:hover { background: #eff6ff; }
        .xq-item.active { background: #fffbeb; }
        .xq-rank {
            font-size: 11px;
            font-weight: 700;
            color: #9ca3af;
            min-width: 22px;
            text-align: right;
        }
        .xq-item.active .xq-rank { color: #f59e0b; }
        .xq-name {
            font-size: 14px;
            font-weight: 600;
            color: #111827;
            flex: 1;
        }
        .xq-follow {
            font-size: 11px;
            color: #6b7280;
            min-width: 70px;
            text-align: right;
        }
        .xq-pct {
            font-size: 12px;
            font-weight: 700;
            min-width: 56px;
            text-align: right;
        }
        .xq-pct.up { color: #dc2626; }
        .xq-pct.down { color: #16a34a; }
        .xq-pct.flat { color: #9ca3af; }

        /* ================= 4.6 研报选择区 ================= */
        .research-toggle {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 13px;
            color: #9ca3af;
            cursor: pointer;
            margin-bottom: 12px;
            user-select: none;
        }
        .research-toggle:hover { color: #2563eb; }
        .research-panel {
            display: none;
            border: 1px solid #e5e7eb;
            border-radius: 10px;
            padding: 14px 16px;
            margin-bottom: 20px;
            max-height: 400px;
            overflow-y: auto;
        }
        .research-panel.show { display: block; }
        .research-panel::-webkit-scrollbar { width: 5px; }
        .research-panel::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
        .research-loading {
            text-align: center;
            color: #9ca3af;
            padding: 20px;
            font-size: 13px;
        }
        .research-section-title {
            font-size: 12px;
            font-weight: bold;
            color: #6b7280;
            text-transform: uppercase;
            margin: 10px 0 6px;
            padding-bottom: 4px;
            border-bottom: 1px solid #f3f4f6;
        }
        .research-section-title:first-child { margin-top: 0; }
        .research-item {
            display: flex;
            gap: 10px;
            padding: 10px 8px;
            cursor: pointer;
            border-radius: 6px;
            transition: background 0.12s;
            align-items: flex-start;
            position: relative;
        }
        .research-item:hover { background: #f9fafb; }
        .research-item.selected { background: #fffbeb; }
        .research-item.selected::before {
            content: '✓';
            position: absolute;
            right: 10px;
            top: 10px;
            color: #d97706;
            font-weight: bold;
        }
        .research-item-body { flex: 1; min-width: 0; }
        .research-item-head {
            font-size: 13px;
            font-weight: 600;
            color: #111827;
            margin-bottom: 2px;
        }
        .research-item-meta {
            font-size: 11px;
            color: #6b7280;
        }
        .research-item-meta .rating-buy { color: #dc2626; font-weight: 700; }
        .research-item-meta .rating-hold { color: #d97706; font-weight: 700; }
        .research-item-meta .rating-sell { color: #16a34a; font-weight: 700; }
        .research-item-summary {
            font-size: 12px;
            color: #4b5563;
            line-height: 1.5;
            margin-top: 4px;
        }
        .research-pdf-link {
            flex-shrink: 0;
            font-size: 11px;
            color: #2563eb;
            text-decoration: none;
            padding: 4px 8px;
            border: 1px solid #dbeafe;
            border-radius: 4px;
            white-space: nowrap;
            align-self: center;
        }
        .research-pdf-link:hover { background: #eff6ff; }

        /* ================= 5. 设置折叠区 ================= */
        .settings-toggle {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 13px;
            color: #9ca3af;
            cursor: pointer;
            margin-bottom: 12px;
            user-select: none;
        }
        .settings-panel {
            background: #f9fafb;
            border-radius: 12px;
            padding: 14px 16px;
            margin-bottom: 20px;
            display: none;
        }
        .settings-panel.show { display: block; }
        .settings-row {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
        }
        .settings-row:last-child { margin-bottom: 0; }
        .settings-label {
            font-size: 12px;
            font-weight: bold;
            color: #6b7280;
            min-width: 70px;
            text-transform: uppercase;
        }
        .settings-input {
            flex: 1;
            padding: 8px 12px;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            font-size: 13px;
            outline: none;
        }
        .settings-input:focus { border-color: #2563eb; }

        /* ================= 6. 大师选择区 ================= */
        .master-section { margin-bottom: 24px; }
        .section-title {
            font-size: 12px;
            font-weight: bold;
            color: #9ca3af;
            text-transform: uppercase;
            margin-bottom: 12px;
        }
        .master-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
            gap: 10px;
        }
        .master-card {
            border: 2px solid #e5e7eb;
            border-radius: 12px;
            padding: 10px 6px;
            text-align: center;
            cursor: pointer;
            transition: all 0.15s ease;
            user-select: none;
        }
        .master-card:hover {
            border-color: #cbd5e1;
            transform: translateY(-1px);
        }
        .master-card.selected {
            border-color: #f59e0b;
            background-color: #fffbeb;
        }
        .master-card .emoji { font-size: 22px; margin-bottom: 2px; }
        .master-card .name {
            font-size: 11px;
            font-weight: 700;
            color: #111827;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .master-card .check {
            font-size: 10px;
            margin-top: 4px;
            color: #9ca3af;
        }
        .master-card.selected .check { color: #f59e0b; font-weight: 700; }
        .select-actions {
            display: flex;
            gap: 10px;
            margin-top: 10px;
            font-size: 12px;
        }
        .select-actions span {
            color: #2563eb;
            cursor: pointer;
            font-weight: 600;
        }
        .select-actions span:hover { text-decoration: underline; }

        /* ================= 7. 启动大按钮 ================= */
        .btn-submit {
            width: 100%;
            background-color: #f59e0b;
            color: #ffffff;
            font-weight: 700;
            font-size: 15px;
            padding: 16px;
            border: none;
            border-radius: 12px;
            cursor: pointer;
            margin-bottom: 32px;
            transition: background-color 0.15s;
        }
        .btn-submit:hover { background-color: #d97706; }
        .btn-submit:disabled {
            background-color: #d1d5db;
            cursor: not-allowed;
        }

        /* ================= 8. 进度状态栏 ================= */
        .status-bar {
            display: none;
            align-items: center;
            gap: 10px;
            padding: 12px 16px;
            background: #eff6ff;
            border: 1px solid #bfdbfe;
            border-radius: 10px;
            margin-bottom: 20px;
            font-size: 13px;
            color: #1e40af;
        }
        .status-bar.show { display: flex; }
        .status-spinner {
            width: 18px; height: 18px;
            border: 2px solid #bfdbfe;
            border-top-color: #3b82f6;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }
        @keyframes spin { to { transform: rotate(360deg); } }
        .status-text { flex: 1; }

        /* ================= 9. 错误提示 ================= */
        .error-bar {
            display: none;
            padding: 12px 16px;
            background: #fef2f2;
            border: 1px solid #fecaca;
            border-radius: 10px;
            margin-bottom: 20px;
            font-size: 13px;
            color: #991b1b;
            white-space: pre-line;
        }
        .error-bar.show { display: block; }

        /* ================= 10. 结果区域 ================= */
        .result-section {
            border-top: 1px solid #f3f4f6;
            padding-top: 25px;
            display: none;
        }
        .result-section.show { display: block; }

        /* 大师分析卡片 */
        .result-card {
            background-color: #ffffff;
            border: 1px solid #e5e7eb;
            border-radius: 12px;
            padding: 20px;
            margin-bottom: 16px;
            position: relative;
            transition: all 0.3s ease;
        }
        .result-card.loading {
            opacity: 0.7;
            transition: none;
        }
        .card-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
        }
        .card-name {
            font-size: 14px;
            font-weight: 700;
            margin: 0;
        }
        .card-meta {
            font-size: 10px;
            color: #9ca3af;
            margin: 2px 0 0 0;
        }
        .card-body {
            background-color: #f9fafb;
            border-radius: 8px;
            padding: 14px;
            font-size: 14px;
            color: #4b5563;
            line-height: 1.6;
            min-height: 40px;
        }
        .card-progress {
            font-size: 12px;
            color: #6b7280;
            margin-top: 8px;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .card-progress-dot {
            width: 6px; height: 6px;
            background: #3b82f6;
            border-radius: 50%;
            animation: pulse 1.2s ease-in-out infinite;
        }
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.3; }
        }
        .card-actions {
            display: flex;
            justify-content: flex-end;
            gap: 8px;
            margin-top: 10px;
        }
        .card-action-btn {
            font-size: 12px;
            color: #475569;
            background: #f1f5f9;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            padding: 4px 10px;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .card-action-btn:hover {
            background: #e2e8f0;
            color: #0f172a;
        }
        .card-action-btn.copied {
            background: #dcfce7;
            border-color: #86efac;
            color: #15803d;
        }

        /* ================= 10.5 我的版本（每张大师卡片内嵌的 Refiner 区）================= */
        .refiner-panel {
            background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
            border: 1px solid #fcd34d;
            border-radius: 10px;
            padding: 14px 16px 12px;
            margin-top: 12px;
            display: none;
        }
        .refiner-panel.show { display: block; }
        .refiner-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 14px;
            gap: 10px;
            flex-wrap: wrap;
        }
        .refiner-title {
            font-size: 15px;
            font-weight: 800;
            color: #92400e;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .refiner-badge {
            font-size: 10px;
            font-weight: 700;
            color: #92400e;
            background: #fde68a;
            padding: 2px 8px;
            border-radius: 999px;
        }
        .refiner-actions {
            display: flex;
            gap: 8px;
            align-items: center;
            flex-wrap: wrap;
        }
        .persona-select {
            font-size: 12px;
            font-weight: 600;
            padding: 6px 10px;
            border: 1px solid #fcd34d;
            background: #fffbeb;
            border-radius: 8px;
            color: #92400e;
            cursor: pointer;
            outline: none;
        }
        .refiner-btn {
            font-size: 12px;
            font-weight: 600;
            padding: 6px 12px;
            border-radius: 8px;
            border: 1px solid #fcd34d;
            background: #fffbeb;
            color: #92400e;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .refiner-btn:hover { background: #fde68a; }
        .refiner-btn.primary {
            background: #f59e0b;
            color: #fff;
            border-color: #f59e0b;
        }
        .refiner-btn.primary:hover { background: #d97706; }
        .refiner-btn.copied {
            background: #10b981 !important;
            color: #fff !important;
            border-color: #10b981 !important;
        }
        .refiner-body {
            font-size: 15px;
            line-height: 1.85;
            color: #1f2937;
            font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
            white-space: pre-wrap;
            word-break: break-word;
            min-height: 120px;
        }
        .refiner-body p { margin: 0 0 12px 0; }
        .refiner-body.editing {
            width: 100%;
            border: 1px dashed #f59e0b;
            border-radius: 8px;
            padding: 12px;
            background: #fff;
            outline: none;
        }
        .refiner-meta {
            margin-top: 12px;
            padding-top: 10px;
            border-top: 1px dashed #fcd34d;
            font-size: 11px;
            color: #92400e;
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
        }

        /* A/B 双稿对照 */
        .refiner-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 14px;
            margin-top: 12px;
        }
        @media (max-width: 800px) {
            .refiner-grid { grid-template-columns: 1fr; }
        }
        /* 历史记录弹窗 */
        .history-overlay {
            display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4);
            z-index: 9999; justify-content: center; align-items: center;
        }
        .history-overlay.show { display: flex; }
        .history-dialog {
            background: #fffbeb; border: 2px solid #f59e0b; border-radius: 14px;
            width: 90%; max-width: 600px; max-height: 80vh; overflow-y: auto;
            padding: 20px 24px; box-shadow: 0 8px 32px rgba(0,0,0,0.2);
        }
        .history-dialog h3 { margin: 0 0 12px; color: #92400e; font-size: 18px; }
        .history-dialog .history-close {
            float: right; cursor: pointer; font-size: 20px; color: #92400e;
            border: none; background: none; padding: 0 4px;
        }
        .history-dialog .history-empty { color: #a8a29e; text-align: center; padding: 30px 0; }
        .history-dialog .history-post {
            background: #fff; border: 1px solid #fde68a; border-radius: 8px;
            padding: 10px 14px; margin-bottom: 10px;
        }
        .history-dialog .history-post-head {
            font-size: 13px; color: #92400e; margin-bottom: 6px; font-weight: 600;
        }
        .history-dialog .history-post-body {
            font-size: 13px; color: #444; line-height: 1.6;
        }
        .history-dialog .history-stances {
            margin-top: 16px; border-top: 1px solid #fde68a; padding-top: 12px;
        }
        .history-dialog .history-stances h4 { margin: 0 0 8px; font-size: 14px; color: #92400e; }
        .history-dialog .stance-row {
            display: flex; gap: 8px; font-size: 13px; padding: 4px 0; color: #444;
        }
        .history-dialog .stance-row .stance-tag {
            font-weight: 600; min-width: 40px;
        }
        .history-dialog .stance-row .stance-bull { color: #16a34a; }
        .history-dialog .stance-row .stance-bear { color: #dc2626; }
        .history-dialog .stance-row .stance-neutral { color: #d97706; }
        .candidate {
            background: #fff;
            border: 1.5px solid #fcd34d;
            border-radius: 10px;
            padding: 14px 14px 10px;
            position: relative;
            transition: all 0.2s ease;
        }
        .candidate.dimmed {
            opacity: 0.45;
            filter: grayscale(0.3);
        }
        .candidate.chosen {
            border-color: #10b981;
            border-width: 2px;
            box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
        }
        .candidate-tag {
            position: absolute;
            top: -10px;
            left: 12px;
            background: #f59e0b;
            color: #fff;
            font-size: 11px;
            font-weight: 800;
            padding: 2px 10px;
            border-radius: 999px;
            letter-spacing: 0.5px;
        }
        .candidate.chosen .candidate-tag { background: #10b981; }
        .candidate-body {
            font-size: 14px;
            line-height: 1.8;
            color: #1f2937;
            font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
            white-space: pre-wrap;
            word-break: break-word;
            min-height: 100px;
            margin-bottom: 10px;
            margin-top: 6px;
        }
        .candidate-body p { margin: 0 0 10px 0; }
        .candidate-body.editing {
            border: 1px dashed #f59e0b;
            border-radius: 6px;
            padding: 8px;
            background: #fffbeb;
            outline: none;
        }
        .candidate-actions {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
            padding-top: 8px;
            border-top: 1px dashed #fde68a;
        }
        .candidate-actions .refiner-btn { font-size: 11px; padding: 4px 9px; }
        .fidelity-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-size: 11px;
            font-weight: 700;
            padding: 3px 8px;
            border-radius: 999px;
            margin-left: auto;
            cursor: help;
            white-space: nowrap;
        }
        .fidelity-badge.ok    { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
        .fidelity-badge.warn  { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
        .fidelity-badge.bad   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
        .fidelity-badge.none  { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
        .pick-btn {
            background: #10b981;
            color: #fff;
            border: 1px solid #10b981;
            font-weight: 700;
        }
        .pick-btn:hover { background: #059669; border-color: #059669; }
        .candidate.chosen .pick-btn {
            background: #fff;
            color: #10b981;
            cursor: default;
        }

        /* ================= 11. 印章样式 ================= */
        .stamp {
            position: absolute;
            right: 16px;
            top: 16px;
            font-family: monospace;
            font-weight: bold;
            font-size: 12px;
            padding: 4px 8px;
            border-radius: 4px;
        }
        .stamp-buy {
            color: #10b981;
            border: 2px solid #10b981;
        }
        .stamp-wait {
            color: #d97706;
            border: 2px solid #d97706;
        }
        .stamp-sell {
            color: #ef4444;
            border: 2px solid #ef4444;
        }
        .stamp-loading {
            color: #9ca3af;
            border: 2px solid #e5e7eb;
        }

        /* ================= 12. 响应式 ================= */
        @media (max-width: 500px) {
            .container { padding: 24px 16px; }
            .main-title { font-size: 24px; }
            .master-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }
            .master-card { padding: 8px 4px; }
            .master-card .emoji { font-size: 18px; }
            .master-card .name { font-size: 10px; }
        }
