/* =====================================================================
   📘 Chapter Learning Profile UI
   ===================================================================== */
.summary-section-chapter-profile {
    margin-top: 18px;
}
#chapter-learning-profile-mount {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.chapter-profile-empty,
.chapter-profile-card {
    border: 1px solid rgba(0,240,255,0.18);
    background: linear-gradient(145deg, rgba(0,240,255,0.055), rgba(112,0,255,0.055));
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 12px 34px rgba(0,0,0,0.22);
}
.chapter-profile-empty {
    color: var(--text-muted);
    line-height: 1.7;
}
.chapter-profile-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}
.chapter-profile-head h4 {
    margin: 0 0 4px;
    color: var(--text-color);
    font-size: 1.05rem;
    font-weight: 900;
}
.chapter-profile-head p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.75rem;
    word-break: break-word;
}
.chapter-profile-status {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 999px;
    color: #00f0ff;
    background: rgba(0,240,255,0.1);
    border: 1px solid rgba(0,240,255,0.25);
    font-weight: 900;
    font-size: 0.78rem;
    text-align: center;
}
.chapter-profile-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 8px;
    margin-bottom: 10px;
}
.chapter-profile-metrics > div {
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 10px;
    text-align: center;
}
.chapter-profile-metrics b {
    display: block;
    color: var(--accent);
    font-size: 1.05rem;
    font-weight: 900;
}
.chapter-profile-metrics span {
    display: block;
    color: var(--text-muted);
    font-size: 0.72rem;
    margin-top: 3px;
}
.chapter-profile-freshness {
    padding: 10px 12px;
    border-radius: 13px;
    background: rgba(255,210,0,0.07);
    border: 1px dashed rgba(255,210,0,0.25);
    color: #ffd54f;
    font-size: 0.82rem;
    font-weight: 800;
    margin-bottom: 12px;
}
.chapter-profile-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 10px;
}
.chapter-profile-block {
    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.075);
    border-radius: 14px;
    padding: 12px;
    min-width: 0;
}
.chapter-profile-block h5 {
    margin: 0 0 8px;
    color: var(--secondary);
    font-size: 0.86rem;
    font-weight: 900;
}
.chapter-profile-block p {
    margin: 5px 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.55;
}
.chapter-profile-skill-row,
.chapter-profile-diagnosis-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 8px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.chapter-profile-skill-row:first-of-type,
.chapter-profile-diagnosis-row:first-of-type { border-top: none; }
.chapter-profile-skill-row b,
.chapter-profile-diagnosis-row b {
    display: block;
    color: var(--text-color);
    font-size: 0.78rem;
    line-height: 1.35;
}
.chapter-profile-skill-row span,
.chapter-profile-diagnosis-row small {
    display: block;
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.45;
    margin-top: 2px;
}
.chapter-profile-diagnosis-row > span {
    flex: 0 0 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,0,127,0.12);
    color: #ff7abf;
    font-weight: 900;
    font-size: 0.75rem;
}
.chapter-profile-mini-empty {
    color: var(--text-muted);
    font-size: 0.78rem;
    padding: 8px 0;
}
.chapter-profile-recommend {
    margin-top: 12px;
    padding: 11px 12px;
    border-radius: 14px;
    background: rgba(0,255,136,0.065);
    border: 1px solid rgba(0,255,136,0.16);
    color: var(--text-color);
    font-size: 0.82rem;
    line-height: 1.65;
}
.chapter-profile-recommend b {
    color: var(--success);
    margin-right: 6px;
}
@media (max-width: 860px) {
    .chapter-profile-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .chapter-profile-columns { grid-template-columns: 1fr; }
    .chapter-profile-head { flex-direction: column; }
    .chapter-profile-status { align-self: flex-start; }
}
