/* ======================================================================
 *  亲子沟通话术库 /tool/parent-talk
 *  依赖 calc-common.css，支持黑夜模式。
 * ====================================================================== */

.pt-seg {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}
.pt-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;
}
.pt-seg button:hover { border-color: #f06595; color: #f06595; }
.pt-seg button.is-active {
    background: linear-gradient(135deg, rgba(240, 101, 149, 0.15), rgba(236, 72, 153, 0.06));
    border-color: rgba(240, 101, 149, 0.55);
    color: #d6336c;
}

.pt-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 11px; flex-wrap: wrap; }
.pt-filter {
    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: 6px 14px;
    cursor: pointer;
}
.pt-filter.is-on { background: #fff3d6; border-color: #f0b429; color: #b3791a; }
.pt-tip { font-size: 12px; color: var(--c-text-muted); }

.pt-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pt-chip {
    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: 600;
    border-radius: 99px;
    padding: 7px 13px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.pt-chip:hover { border-color: #f06595; color: #f06595; }
.pt-chip.is-active {
    background: linear-gradient(135deg, #f06595, #d6336c);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 12px rgba(240, 101, 149, 0.3);
}

/* ---------- 场景卡 ---------- */
.pt-scene-card {
    border: 1px solid var(--c-border);
    border-radius: 15px;
    overflow: hidden;
    background: var(--c-bg-card);
    animation: calcFade 0.25s ease;
}
.pt-scene-title {
    font-size: 15.5px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #f06595, #d6336c);
    padding: 12px 16px;
}
.pt-col { padding: 13px 16px 4px; }
.pt-col--bad { background: rgba(255, 59, 48, 0.05); }
.pt-col--good { background: rgba(52, 199, 89, 0.05); border-top: 1px dashed var(--c-border); }
.pt-col h4 { font-size: 13px; font-weight: 800; margin-bottom: 9px; }
.pt-col--bad h4 { color: #e0342b; }
.pt-col--good h4 { color: #1f9d43; }
.pt-col ul { list-style: none; padding: 0; margin: 0 0 9px; display: grid; gap: 8px; }

.pt-phrase {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 12px;
    border-radius: 11px;
    background: var(--c-surface-soft);
    border: 1px solid var(--c-border);
}
.pt-phrase-mark {
    flex: none;
    width: 22px; height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 900;
    color: #fff;
    margin-top: 1px;
}
.pt-phrase--bad .pt-phrase-mark { background: #ff3b30; }
.pt-phrase--good .pt-phrase-mark { background: #34c759; }
.pt-phrase-txt { flex: 1; font-size: 13.5px; line-height: 1.75; color: var(--c-text); margin: 0; }
.pt-col--bad .pt-phrase-txt { color: var(--c-text-sub); text-decoration: line-through; text-decoration-color: rgba(224,52,43,.45); text-decoration-thickness: 1.5px; }
.pt-phrase-ops { flex: none; display: flex; gap: 5px; margin-top: 1px; }
.pt-fav, .pt-copy {
    border: 1px solid var(--c-border);
    background: var(--c-bg-card);
    color: var(--c-text-muted);
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 8px;
    padding: 3px 9px;
    cursor: pointer;
    line-height: 1.5;
}
.pt-fav { color: #d1d5db; font-size: 13px; padding: 1px 8px 3px; }
.pt-fav.is-on { color: #f5a623; border-color: #f5a623; background: #fff8e7; }
.pt-copy:hover { border-color: #f06595; color: #f06595; }
.pt-copy.is-copied { background: #34c759; border-color: #34c759; color: #fff; }

.pt-why {
    margin-top: 0;
    padding: 12px 16px;
    border-top: 1px dashed var(--c-border);
    background: rgba(124, 92, 255, 0.06);
    font-size: 12.5px;
    line-height: 1.85;
    color: var(--c-text-sub);
}
.pt-why b { color: var(--c-text); }
.pt-empty {
    padding: 34px 16px;
    text-align: center;
    font-size: 13px;
    color: var(--c-text-muted);
    border: 1.5px dashed var(--c-border);
    border-radius: 14px;
}

/* ---------- AI ---------- */
.pt-ai-lead { font-size: 13px; line-height: 1.85; color: var(--c-text-sub); margin-bottom: 12px; }
.pt-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;
}
.pt-textarea:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-soft); }
.pt-ai-box { margin-top: 14px; animation: calcFade 0.25s ease; }
.pt-why-box {
    padding: 11px 14px;
    border-radius: 12px;
    background: rgba(124, 92, 255, 0.07);
    border: 1px solid rgba(124, 92, 255, 0.25);
    font-size: 12.5px;
    line-height: 1.8;
    color: var(--c-text-sub);
    margin-bottom: 10px;
}
.pt-why-box b { color: var(--c-text); }
.pt-ai-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }

/* ---------- 右侧原则卡 ---------- */
.pt-side h3 { font-size: 14.5px; font-weight: 800; margin: 14px 0 7px; }
.pt-side h3:first-child { margin-top: 0; }
.pt-side p, .pt-side li { font-size: 13px; line-height: 1.85; color: var(--c-text-sub); }
.pt-side b { color: var(--c-text); }
.pt-ban { padding-left: 20px; }
.pt-ban li { margin-bottom: 5px; color: #d6336c; }
.pt-formula {
    margin-top: 6px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--c-surface-soft);
    border: 1px solid var(--c-border);
    display: grid;
    gap: 8px;
}
.pt-formula p { margin: 0; }

@media (max-width: 640px) {
    .pt-seg { grid-template-columns: 1fr; }
    .pt-phrase { flex-wrap: wrap; }
}

/* ---------- 黑夜模式 ---------- */
[data-theme="dark"] .pt-seg button { background: rgba(255, 255, 255, 0.04); }
[data-theme="dark"] .pt-seg button.is-active { background: rgba(240, 101, 149, 0.2); border-color: rgba(240, 101, 149, 0.55); color: #ff9bbf; }
[data-theme="dark"] .pt-chip { background: rgba(255, 255, 255, 0.04); }
[data-theme="dark"] .pt-filter { background: rgba(255, 255, 255, 0.04); }
[data-theme="dark"] .pt-filter.is-on { background: rgba(240, 180, 41, 0.18); border-color: rgba(240, 180, 41, 0.5); color: #ffce6e; }
[data-theme="dark"] .pt-scene-card { background: rgba(255, 255, 255, 0.03); }
[data-theme="dark"] .pt-col--bad { background: rgba(255, 59, 48, 0.08); }
[data-theme="dark"] .pt-col--good { background: rgba(52, 199, 89, 0.08); }
[data-theme="dark"] .pt-phrase { background: rgba(255, 255, 255, 0.04); }
[data-theme="dark"] .pt-fav, .pt-copy { background: rgba(255, 255, 255, 0.05); }
[data-theme="dark"] .pt-fav.is-on { background: rgba(245, 166, 35, 0.18); }
[data-theme="dark"] .pt-why { background: rgba(124, 92, 255, 0.12); }
[data-theme="dark"] .pt-textarea { background: rgba(255, 255, 255, 0.04); }
[data-theme="dark"] .pt-why-box { background: rgba(124, 92, 255, 0.12); border-color: rgba(124, 92, 255, 0.3); }
[data-theme="dark"] .pt-formula { background: rgba(255, 255, 255, 0.03); }
[data-theme="dark"] .pt-ban li { color: #ff9bbf; }
