/* ======================================================================
 *  具体化表扬语生成器 /tool/praise-phrases
 *  依赖 calc-common.css，支持黑夜模式。
 * ====================================================================== */

.pp-seg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}
.pp-seg button {
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--c-border);
    background: var(--c-surface-soft);
    color: var(--c-text-sub);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.16s ease;
}
.pp-seg button:hover { border-color: #34c759; color: #34c759; }
.pp-seg button.is-active {
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.15), rgba(52, 199, 89, 0.05));
    border-color: rgba(52, 199, 89, 0.55);
    color: #1f9d43;
}

/* ---------- 分类选择 ---------- */
.pp-cat-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pp-cat {
    border: 1px solid var(--c-border);
    background: var(--c-surface-soft);
    color: var(--c-text-sub);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    border-radius: 99px;
    padding: 7px 14px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.pp-cat:hover { border-color: #34c759; color: #34c759; }
.pp-cat.is-active {
    background: linear-gradient(135deg, #34c759, #28a745);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
}

/* ---------- 抽取舞台 ---------- */
.pp-stage {
    position: relative;
    min-height: 210px;
    border-radius: 16px;
    border: 2px dashed rgba(52, 199, 89, 0.4);
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.06), rgba(255, 204, 0, 0.04));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 26px 22px 18px;
    margin-bottom: 12px;
}
.pp-stage-cat {
    font-size: 12.5px;
    font-weight: 800;
    color: #1f9d43;
    background: rgba(52, 199, 89, 0.12);
    border: 1px solid rgba(52, 199, 89, 0.3);
    padding: 3px 13px;
    border-radius: 99px;
    margin-bottom: 14px;
    min-height: 24px;
}
.pp-stage-text {
    font-size: 19px;
    font-weight: 800;
    line-height: 1.75;
    color: var(--c-text);
    margin: 0 0 16px;
}
.pp-stage-text.is-pop { animation: ppPop 0.3s ease; }
@keyframes ppPop {
    0% { transform: scale(0.92); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.pp-stage-ops { display: flex; gap: 8px; }
.pp-mini { height: 32px; padding: 0 14px; font-size: 12.5px; }
.pp-mini.is-copied { background: #34c759; border-color: #34c759; color: #fff; }
.pp-draw-btn { height: 48px; font-size: 15px; font-weight: 800; }

.pp-history-title { font-size: 12px; font-weight: 700; color: var(--c-text-muted); margin: 14px 0 7px; }
.pp-history { display: flex; flex-direction: column; gap: 6px; }
.pp-hist-item {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
    border: 1px solid var(--c-border);
    background: var(--c-surface-soft);
    border-radius: 10px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 12.5px;
    color: var(--c-text-sub);
    cursor: pointer;
    line-height: 1.6;
}
.pp-hist-item:hover { border-color: #34c759; }
.pp-hist-item span { flex: none; }

/* ---------- AI ---------- */
.pp-ai-lead { font-size: 13px; line-height: 1.85; color: var(--c-text-sub); margin-bottom: 12px; }
.pp-textarea {
    width: 100%;
    border: 1px solid var(--c-border);
    border-radius: 12px;
    background: var(--c-surface-soft);
    color: var(--c-text);
    font-family: inherit;
    font-size: 13.5px;
    line-height: 1.7;
    padding: 11px 13px;
    resize: vertical;
    outline: none;
}
.pp-textarea:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-soft); }
.pp-ai-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 9px; }
.pp-ai-list li {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid rgba(52, 199, 89, 0.3);
    background: rgba(52, 199, 89, 0.06);
    border-radius: 12px;
    padding: 11px 13px;
}
.pp-ai-list p { margin: 2px 0 0; font-size: 13.5px; line-height: 1.75; color: var(--c-text); }
.pp-ai-list .pp-mini { flex: none; }

/* ---------- 右侧 ---------- */
.pp-side h3 { font-size: 14.5px; font-weight: 800; margin: 14px 0 7px; }
.pp-side h3:first-child { margin-top: 0; }
.pp-side p, .pp-side li { font-size: 13px; line-height: 1.85; color: var(--c-text-sub); }
.pp-side b { color: var(--c-text); }
.pp-compare { display: grid; gap: 9px; margin: 8px 0 4px; }
.pp-compare-bad, .pp-compare-good { border-radius: 12px; padding: 11px 13px; }
.pp-compare-bad { background: rgba(255, 59, 48, 0.07); border: 1px solid rgba(255, 59, 48, 0.25); }
.pp-compare-good { background: rgba(52, 199, 89, 0.07); border: 1px solid rgba(52, 199, 89, 0.3); }
.pp-compare h4 { font-size: 12.5px; font-weight: 800; margin: 0 0 6px; }
.pp-compare-bad h4 { color: #e0342b; }
.pp-compare-good h4 { color: #1f9d43; }
.pp-compare p { margin: 0 0 4px; font-size: 12.5px; }
.pp-compare-note { font-size: 11.5px; color: var(--c-text-muted); }
.pp-rules { padding-left: 20px; }
.pp-rules li { margin-bottom: 5px; }

@media (max-width: 640px) {
    .pp-seg { grid-template-columns: 1fr; }
    .pp-stage-text { font-size: 16.5px; }
    .pp-ai-list li { flex-direction: column; }
}

/* ---------- 黑夜模式 ---------- */
[data-theme="dark"] .pp-seg button { background: rgba(255, 255, 255, 0.04); }
[data-theme="dark"] .pp-seg button.is-active { background: rgba(52, 199, 89, 0.2); border-color: rgba(52, 199, 89, 0.55); color: #6ee789; }
[data-theme="dark"] .pp-cat { background: rgba(255, 255, 255, 0.04); }
[data-theme="dark"] .pp-stage { background: rgba(52, 199, 89, 0.08); border-color: rgba(52, 199, 89, 0.4); }
[data-theme="dark"] .pp-stage-cat { background: rgba(52, 199, 89, 0.15); color: #6ee789; }
[data-theme="dark"] .pp-hist-item { background: rgba(255, 255, 255, 0.04); }
[data-theme="dark"] .pp-textarea { background: rgba(255, 255, 255, 0.04); }
[data-theme="dark"] .pp-ai-list li { background: rgba(52, 199, 89, 0.1); }
[data-theme="dark"] .pp-compare-bad { background: rgba(255, 59, 48, 0.1); }
[data-theme="dark"] .pp-compare-good { background: rgba(52, 199, 89, 0.1); }
