/* 竞品评价拆解 — PM 四步闭环 */
.ra-tool-panel {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    min-height: 0;
}

.ra-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-muted, #f9fafb);
    flex-shrink: 0;
}

.ra-toolbar-left { display: flex; align-items: center; gap: 8px; }

.ra-title {
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ra-title i { color: #f59e0b; }

.ra-badge {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.ra-toolbar-right { display: flex; align-items: center; gap: 6px; }

.ra-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    font-size: 0.78rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    cursor: pointer;
}

.ra-btn:hover { border-color: #f59e0b; color: #d97706; }

.ra-btn-primary {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-color: transparent;
    color: #fff !important;
}

.ra-canvas-wrap {
    flex: 1;
    overflow: auto;
    padding: 16px;
    background-color: #f3f4f6;
    background-image: radial-gradient(circle, #d1d5db 1px, transparent 1px);
    background-size: 20px 20px;
    min-height: 520px;
}

.ra-board {
    max-width: 1240px;
    margin: 0 auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    padding: 24px 18px 18px;
    min-width: 800px;
}

.ra-map-header { margin-bottom: 16px; }

.ra-map-title {
    margin: 0 0 4px;
    font-size: 1.35rem;
    font-weight: 700;
    outline: none;
}

.ra-map-subtitle {
    margin: 0;
    font-size: 0.82rem;
    color: #6b7280;
    line-height: 1.5;
    outline: none;
}

.ra-pipeline {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.ra-phase {
    flex: 1;
    min-width: 0;
    border-radius: 12px;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
}

.ra-phase-scope { background: linear-gradient(180deg, #f8fafc, #f1f5f9); border: 1px solid #e2e8f0; }
.ra-phase-pain { background: linear-gradient(180deg, #fff1f2, #ffe4e6); border: 1px solid #fecdd3; }
.ra-phase-judge { background: linear-gradient(180deg, #ecfdf5, #d1fae5); border: 1px solid #a7f3d0; }
.ra-phase-action { background: linear-gradient(180deg, #eff6ff, #dbeafe); border: 1px solid #bfdbfe; }

.ra-phase-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0 2px;
    color: #94a3b8;
    font-size: 1.4rem;
}

.ra-phase-head {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: flex-start;
}

.ra-phase-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 800;
    color: #fff;
}

.ra-phase-scope .ra-phase-num { background: #64748b; }
.ra-phase-pain .ra-phase-num { background: #e11d48; }
.ra-phase-judge .ra-phase-num { background: #059669; }
.ra-phase-action .ra-phase-num { background: #2563eb; }

.ra-phase-name {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    outline: none;
}

.ra-phase-hint {
    margin: 3px 0 0;
    font-size: 0.68rem;
    color: #6b7280;
    line-height: 1.35;
    outline: none;
}

.ra-cards {
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1;
}

.ra-card {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 9px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.ra-card-tag {
    flex-shrink: 0;
    min-width: 44px;
    padding: 2px 6px;
    font-size: 0.62rem;
    font-weight: 700;
    text-align: center;
    border-radius: 4px;
    outline: none;
    line-height: 1.3;
}

.ra-tag-scope { background: #e2e8f0; color: #475569; }
.ra-tag-pain { background: #fecdd3; color: #be123c; }
.ra-tag-win { background: #a7f3d0; color: #047857; }
.ra-tag-risk { background: #fde68a; color: #b45309; }
.ra-tag-p0 { background: #fecaca; color: #b91c1c; }
.ra-tag-p1 { background: #fed7aa; color: #c2410c; }
.ra-tag-p2 { background: #e2e8f0; color: #475569; }

.ra-card-text {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.45;
    color: #374151;
    outline: none;
    cursor: text;
    flex: 1;
    min-width: 0;
}

.ra-card-text:focus {
    background: #fff;
    border-radius: 4px;
}

.ra-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed #e5e7eb;
}

.ra-summary-item {
    flex: 1;
    min-width: 240px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 0.74rem;
    color: #4b5563;
}

.ra-summary-item i {
    flex-shrink: 0;
    font-size: 1rem;
    color: #8b5cf6;
    margin-top: 1px;
}

.ra-summary-item span { outline: none; flex: 1; }

@media (max-width: 1024px) {
    .ra-pipeline { flex-wrap: wrap; }
    .ra-phase { flex: 1 1 calc(50% - 20px); min-width: 280px; }
    .ra-phase-arrow { display: none; }
}

@media (max-width: 640px) {
    .ra-phase { flex: 1 1 100%; }
    .ra-board { min-width: 0; }
}
