/* PP 立项报告工作台 — 页面专属样式 */

/* ===== 三栏布局 ===== */
.pp-workbench {
    display: flex;
    overflow: hidden;
}

.pp-sidebar {
    width: 300px;
    min-width: 300px;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.pp-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #f9fafb;
}

.pp-right-panel {
    width: 30%;
    min-width: 260px;
    max-width: 400px;
    background: #fff;
    border-left: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

/* ===== 消息流区域 ===== */
.pp-message-stream {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.pp-message-stream .pp-msg {
    margin-bottom: 16px;
    animation: pp-fade-in 0.3s ease-in-out;
}

@keyframes pp-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 步骤标题行（时间线风格） */
.pp-msg-step-start {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    padding: 10px 0;
    position: relative;
}

.pp-msg-step-start .pp-step-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    background: #eff6ff;
    color: #2563eb;
    border: 2px solid #dbeafe;
}

/* 事实条目 */
.pp-msg-fact {
    font-size: 13px;
    color: #6b7280;
    padding: 3px 0 3px 42px;
    display: flex;
    gap: 8px;
}

.pp-msg-fact .pp-fact-key {
    color: #9ca3af;
    flex-shrink: 0;
    min-width: 80px;
}

.pp-msg-fact .pp-fact-value {
    color: #4b5563;
}

/* 章节内容块 */
.pp-chapter-block {
    margin: 8px 0 8px 42px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.pp-chapter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    cursor: pointer;
    user-select: none;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    transition: background 0.2s;
}

.pp-chapter-header:hover {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.pp-chapter-header .pp-chapter-toggle {
    transition: transform 0.2s;
    color: #9ca3af;
    font-size: 12px;
}

.pp-chapter-content {
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.75;
    color: #374151;
    max-height: 500px;
    overflow-y: auto;
}

.pp-chapter-content.collapsed {
    display: none;
}

/* 章节流式追加时的"打字机"光标 */
.pp-chapter-content .pp-cursor::after {
    content: '▌';
    color: #3b82f6;
    animation: pp-blink 1s step-end infinite;
}

@keyframes pp-blink {
    50% { opacity: 0; }
}

/* 步骤完成 */
.pp-msg-step-complete {
    font-size: 13px;
    color: #10b981;
    padding: 4px 0 4px 42px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===== 对话气泡 ===== */
.pp-chat-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    animation: pp-fade-in 0.3s ease-in-out;
}

.pp-chat-row.user {
    flex-direction: row-reverse;
}

.pp-chat-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    margin-top: 2px;
}

.pp-chat-avatar.user {
    background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
    color: #fff;
}

.pp-chat-avatar.assistant {
    background: linear-gradient(135deg, #f0f7ff 0%, #dbeafe 100%);
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.pp-chat-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.7;
    word-break: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.pp-chat-bubble.user {
    background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.pp-chat-bubble.assistant {
    margin-right: auto;
    background: #fff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    border-bottom-left-radius: 4px;
}

/* 气泡内 Markdown 渲染 */
.pp-chat-bubble.assistant p { margin: 0 0 8px; }
.pp-chat-bubble.assistant p:last-child { margin-bottom: 0; }
.pp-chat-bubble.assistant ul, .pp-chat-bubble.assistant ol { margin: 4px 0; padding-left: 20px; }
.pp-chat-bubble.assistant code {
    background: #f1f5f9; padding: 1px 5px; border-radius: 4px;
    font-size: 13px; color: #d97706;
}
.pp-chat-bubble.assistant pre {
    background: #f8fafc; padding: 10px 12px; border-radius: 6px;
    overflow-x: auto; margin: 8px 0; font-size: 13px;
    border: 1px solid #e5e7eb;
}
.pp-chat-bubble.assistant pre code {
    background: none; padding: 0; color: #374151;
}
.pp-chat-bubble.assistant table {
    width: 100%; border-collapse: collapse; margin: 8px 0;
}
.pp-chat-bubble.assistant th, .pp-chat-bubble.assistant td {
    border: 1px solid #e5e7eb; padding: 6px 10px; font-size: 13px;
}
.pp-chat-bubble.assistant th { background: #f9fafb; font-weight: 600; }

/* 错误消息 */
.pp-msg-error {
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #dc2626;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 完成分隔线 */
.pp-done-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #10b981;
    font-size: 14px;
    font-weight: 600;
}

.pp-done-divider::before,
.pp-done-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d1d5db, transparent);
}

/* ===== 输入框区域 ===== */
.pp-input-area {
    border-top: 1px solid #e5e7eb;
    background: #fff;
    padding: 12px 16px;
    flex-shrink: 0;
}

.pp-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: #f9fafb;
    border: 1.5px solid #d1d5db;
    border-radius: 14px;
    padding: 10px 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pp-input-wrapper:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.pp-input-wrapper.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.pp-input-text {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    resize: none;
    max-height: 120px;
    line-height: 1.5;
    color: #1f2937;
}

.pp-input-text::placeholder {
    color: #9ca3af;
}

.pp-send-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0066FF 0%, #0052CC 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 102, 255, 0.2);
}

.pp-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(0, 102, 255, 0.3);
}

.pp-send-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.pp-attach-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    color: #6b7280;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s;
}

.pp-attach-btn:hover {
    color: #3b82f6;
}

/* 文件拖拽高亮 */
.pp-input-wrapper.drag-over {
    border-color: #3b82f6;
    background: #eff6ff;
}

/* 已选文件列表 */
.pp-file-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.pp-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    font-size: 12px;
    color: #1e40af;
}

.pp-file-chip .pp-file-remove {
    cursor: pointer;
    color: #6b7280;
    font-size: 14px;
    line-height: 1;
}

.pp-file-chip .pp-file-remove:hover {
    color: #dc2626;
}

/* 启动确认卡片 */
.pp-confirm-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin: 8px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.pp-confirm-card .pp-confirm-row {
    font-size: 13px;
    color: #6b7280;
    padding: 2px 0;
}

.pp-confirm-card .pp-confirm-btn {
    margin-top: 10px;
    width: 100%;
    padding: 10px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.pp-confirm-card .pp-confirm-btn:hover {
    background: #2563eb;
}

/* ===== 左栏任务卡片 ===== */
.pp-task-card {
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 8px;
    background: #fff;
}

.pp-task-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.1);
}

.pp-task-card.active {
    border-color: #3b82f6;
    background: #eff6ff;
}

.pp-task-card .pp-task-name {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pp-task-card .pp-task-meta {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pp-task-card .pp-task-status-badge {
    font-size: 12px;
    padding: 1px 6px;
    border-radius: 10px;
}

.pp-task-status-badge.completed {
    background: #d1fae5;
    color: #059669;
}

.pp-task-status-badge.generating {
    background: #fef3c7;
    color: #d97706;
}

.pp-task-status-badge.failed {
    background: #fee2e2;
    color: #dc2626;
}

.pp-task-status-badge.pending {
    background: #f3f4f6;
    color: #6b7280;
}

/* ===== 右栏子任务 ===== */
.pp-subtask-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
    color: #4b5563;
}

.pp-subtask-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.pp-subtask-icon.completed {
    background: #d1fae5;
    color: #059669;
}

.pp-subtask-icon.in_progress {
    background: #fef3c7;
    color: #d97706;
    animation: pp-spin 1s linear infinite;
}

.pp-subtask-icon.pending {
    background: #f3f4f6;
    color: #9ca3af;
}

@keyframes pp-spin {
    to { transform: rotate(360deg); }
}

/* 右栏报告输出物 */
.pp-report-output {
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-top: 8px;
}

.pp-report-output .pp-report-name {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 8px;
}

.pp-report-output .pp-report-actions {
    display: flex;
    gap: 8px;
}

.pp-report-output .pp-report-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    background: #fff;
    color: #374151;
}

.pp-report-output .pp-report-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.pp-report-output .pp-report-btn.primary {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.pp-report-output .pp-report-btn.primary:hover {
    background: #2563eb;
}

/* ===== 企业搜索结果卡片 ===== */
.pp-search-result-card {
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.pp-search-result-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.1);
}

.pp-search-result-card .pp-org-name {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

.pp-search-result-card .pp-org-info {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

.pp-search-result-card .pp-org-select-btn {
    margin-top: 8px;
    padding: 6px 16px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

/* ===== 滚动条 ===== */
.pp-workbench ::-webkit-scrollbar {
    width: 6px;
}

.pp-workbench ::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.pp-workbench ::-webkit-scrollbar-track {
    background: transparent;
}

/* ===== 隐藏文件输入 ===== */
.pp-file-input-hidden {
    display: none;
}

/* ===== 欢迎页 ===== */
.pp-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 24px 24px;
    animation: pp-fade-in 0.5s ease-in-out;
}

/* Hero 区域 */
.pp-welcome-hero {
    text-align: center;
    margin-bottom: 36px;
}

.pp-welcome-logo {
    height: 64px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    margin: 0 auto 16px;
    display: block;
}

.pp-welcome-title {
    font-size: 26px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 8px;
    letter-spacing: 1px;
}

.pp-welcome-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* 功能卡片 */
.pp-welcome-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 720px;
    width: 100%;
    margin-bottom: 36px;
}

.pp-feature-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 14px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pp-feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border-color: #bfdbfe;
}

.pp-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #2563eb;
}

.pp-feature-name {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 4px;
}

.pp-feature-desc {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.5;
}

/* 输入要求 */
.pp-welcome-requirements {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px 24px;
    max-width: 560px;
    width: 100%;
    margin-bottom: 28px;
}

.pp-req-title {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pp-req-title i {
    color: #3b82f6;
}

.pp-req-items {
    display: flex;
    gap: 24px;
}

.pp-req-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
}

.pp-req-item > i {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
    background: #f0fdf4;
    color: #16a34a;
}

.pp-req-item:nth-child(2) > i {
    background: #fffbeb;
    color: #d97706;
}

.pp-req-label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 2px;
}

.pp-req-hint {
    font-size: 12px;
    color: #94a3b8;
}

/* 底部提示 */
.pp-welcome-hint {
    font-size: 13px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: pp-bounce 2s ease-in-out infinite;
}

@keyframes pp-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

/* 响应式：窄屏功能卡片 2x2 */
@media (max-width: 640px) {
    .pp-welcome-features {
        grid-template-columns: repeat(2, 1fr);
    }
    .pp-req-items {
        flex-direction: column;
        gap: 12px;
    }
}

/* ===== PP 专属：图片资产 ===== */

/* 右栏图片资产摘要区 */
.pp-image-section {
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-top: 12px;
    background: #fafbfc;
}

.pp-image-section .pp-image-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.pp-image-section .pp-image-count {
    font-size: 13px;
    color: #374151;
}

.pp-image-section .pp-image-view-btn {
    font-size: 12px;
    color: var(--color-primary, #2563eb);
    background: none;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    transition: background .15s;
}

.pp-image-section .pp-image-view-btn:hover {
    background: #eff6ff;
}

.pp-image-thumb-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.pp-image-thumb {
    position: relative;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
}

.pp-image-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pp-image-thumb:hover {
    border-color: #93c5fd;
}

/* 图片资产占位（生成中/无图） */
.pp-image-placeholder {
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    padding: 10px 0;
}

/* ── 图库弹层 ── */
.pp-gallery-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(2px);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.pp-gallery {
    width: min(1080px, 96vw);
    height: min(760px, 92vh);
    background: #fff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}

.pp-gallery-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.pp-gallery-header .pp-gallery-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    flex: 1;
}

.pp-gallery-header .pp-gallery-filter {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    color: #374151;
    background: #fff;
    outline: none;
    cursor: pointer;
}

.pp-gallery-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: #f3f4f6;
    color: #4b5563;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pp-gallery-close:hover {
    background: #e5e7eb;
}

.pp-gallery-grid {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    align-content: start;
}

.pp-gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #9ca3af;
    padding: 60px 0;
    font-size: 14px;
}

.pp-gallery-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 12px 18px;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.pp-gallery-page-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pp-gallery-page-btn:hover:not(:disabled) {
    background: #f3f4f6;
}

.pp-gallery-page-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.pp-gallery-page-info {
    font-size: 13px;
    color: #6b7280;
}

.pp-gallery-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    transition: box-shadow .15s, transform .15s;
    display: flex;
    flex-direction: column;
}

.pp-gallery-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, .10);
    transform: translateY(-2px);
}

.pp-gallery-card .pp-gallery-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    background: #f3f4f6;
}

.pp-gallery-card .pp-gallery-card-body {
    padding: 10px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pp-gallery-card .pp-gallery-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pp-gallery-card .pp-gallery-card-desc {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pp-gallery-card .pp-gallery-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #9ca3af;
    margin-top: auto;
}

.pp-gallery-card .pp-gallery-cat-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

/* ── 单图详情弹层（lightbox） ── */
.pp-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .78);
    z-index: 950;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.pp-lightbox-panel {
    max-width: min(1100px, 94vw);
    max-height: 88vh;
    background: #fff;
    border-radius: 12px;
    display: flex;
    overflow: hidden;
}

.pp-lightbox-panel .pp-lightbox-figure {
    flex: 1.6;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    padding: 12px;
}

.pp-lightbox-panel .pp-lightbox-figure img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 6px;
}

.pp-lightbox-panel .pp-lightbox-info {
    flex: 1;
    min-width: 280px;
    max-width: 360px;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pp-lightbox-panel .pp-lightbox-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.pp-lightbox-panel .pp-lightbox-info .pp-lightbox-desc {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.7;
    margin: 0;
}

.pp-lightbox-panel .pp-lightbox-info .pp-lightbox-kv {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.6;
}

.pp-lightbox-panel .pp-lightbox-info .pp-lightbox-kv strong {
    color: #374151;
}

.pp-lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .9);
    color: #374151;
    font-size: 18px;
    cursor: pointer;
    z-index: 960;
}

.pp-lightbox-close:hover {
    background: #fff;
}
