/* ===== 小组积分 PK 板 class-points ===== */
.cp-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.cp-activity-input {
    height: 40px;
    min-width: 260px;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    color: var(--c-text);
    background: var(--c-surface-soft);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    outline: none;
}
.cp-activity-input:focus { border-color: #f59f5d; box-shadow: 0 0 0 3px rgba(245,159,93,.18); }
.cp-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12px; border-radius: 9px; }

.cp-manage {
    border: 1px dashed var(--c-border);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 16px;
    background: var(--c-surface-soft);
}
.cp-manage-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.cp-manage-row { display: flex; align-items: center; gap: 8px; }
.cp-manage-row i {
    width: 14px; height: 14px; border-radius: 4px; display: inline-block; flex: none;
}
.cp-manage-row input {
    flex: 1;
    height: 38px;
    padding: 0 12px;
    font-size: 13.5px;
    font-family: inherit;
    color: var(--c-text);
    background: var(--c-bg-card);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    outline: none;
}
.cp-manage-row button {
    border: 1px solid var(--c-border);
    background: var(--c-bg-card);
    border-radius: 9px;
    height: 34px;
    padding: 0 12px;
    cursor: pointer;
    font-size: 12.5px;
    color: var(--c-text-sub);
}
.cp-manage-row button:hover { color: #e0447c; border-color: rgba(224,68,124,.5); }
.cp-add-team { display: flex; gap: 8px; }
.cp-add-team .calc-input { flex: 1; height: 40px; }
.cp-add-team .btn-primary { height: 40px; white-space: nowrap; }

/* 积分卡 */
.cp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
}
.cp-card {
    border-radius: 16px;
    border: 1px solid var(--c-border);
    overflow: hidden;
    background: var(--c-surface-soft);
    position: relative;
}
.cp-card-head {
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}
.cp-rank { font-size: 12px; font-weight: 700; background: rgba(255,255,255,.22); border-radius: 99px; padding: 2px 10px; }
.cp-rank.is-king { background: #fff; color: #d98a00; }
.cp-score {
    text-align: center;
    font-size: 52px;
    font-weight: 900;
    line-height: 1.15;
    color: var(--c-text);
    padding: 14px 0 8px;
    font-variant-numeric: tabular-nums;
}
.cp-score small { font-size: 15px; color: var(--c-text-muted); font-weight: 700; margin-left: 3px; }
.cp-score.just-changed { animation: cpPop .35s ease; }
@keyframes cpPop {
    0% { transform: scale(.8); }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
.cp-delta {
    position: absolute;
    top: 46px; left: 50%;
    transform: translateX(-50%);
    font-size: 22px;
    font-weight: 900;
    pointer-events: none;
    opacity: 0;
}
.cp-delta.fly { animation: cpFly .8s ease forwards; }
@keyframes cpFly {
    0% { opacity: 0; transform: translate(-50%, 10px) scale(.8); }
    25% { opacity: 1; transform: translate(-50%, -6px) scale(1.1); }
    100% { opacity: 0; transform: translate(-50%, -44px) scale(1); }
}
.cp-btns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 0 12px 14px;
}
.cp-btns button {
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--c-border);
    background: var(--c-bg-card);
    color: var(--c-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .08s ease;
}
.cp-btns button:active { transform: scale(.92); }
.cp-btns .cp-plus { color: #1f9d43; }
.cp-btns .cp-minus { color: #e0447c; }

/* 日志 */
.cp-log-wrap { margin-top: 18px; }
.cp-log {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 96px;
    overflow-y: auto;
}
.cp-log-empty { font-size: 12.5px; color: var(--c-text-muted); }
.cp-log-item {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 99px;
    background: var(--c-surface-soft);
    border: 1px solid var(--c-border);
    color: var(--c-text-sub);
}
.cp-log-item b.is-plus { color: #1f9d43; }
.cp-log-item b.is-minus { color: #e0447c; }

/* 投屏层 */
.cp-overlay[hidden] { display: none; }
.cp-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: linear-gradient(160deg, #1a2242 0%, #0e1428 100%);
    color: #fff;
    padding: 40px 48px;
    display: flex;
    flex-direction: column;
}
.cp-overlay-close {
    position: absolute;
    top: 22px; right: 26px;
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.25);
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}
.cp-overlay-close:hover { background: rgba(255,255,255,.2); }
.cp-ov-activity {
    text-align: center;
    font-size: clamp(18px, 3vw, 30px);
    font-weight: 800;
    color: rgba(255,255,255,.8);
    margin-bottom: 30px;
}
.cp-ov-board { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: clamp(10px, 2.2vh, 26px); max-width: 1100px; width: 100%; margin: 0 auto; }
.cp-ov-row { display: grid; grid-template-columns: 70px minmax(160px, 1fr) 130px; align-items: center; gap: 22px; }
.cp-ov-rank {
    font-size: clamp(24px, 3.4vw, 40px);
    font-weight: 900;
    text-align: center;
    color: rgba(255,255,255,.75);
}
.cp-ov-rank .crown { display: block; font-size: .72em; }
.cp-ov-barwrap { height: clamp(34px, 7vh, 64px); background: rgba(255,255,255,.07); border-radius: 14px; overflow: hidden; position: relative; }
.cp-ov-bar {
    height: 100%;
    border-radius: 14px;
    display: flex;
    align-items: center;
    padding: 0 18px;
    font-size: clamp(14px, 2vw, 22px);
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    transition: width .5s cubic-bezier(.22,1,.36,1);
    min-width: 120px;
}
.cp-ov-score {
    font-size: clamp(34px, 5vw, 60px);
    font-weight: 900;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.cp-ov-hint { text-align: center; color: rgba(255,255,255,.4); font-size: 14px; margin-top: 22px; }

@media (max-width: 760px) {
    .cp-activity-input { min-width: 0; width: 100%; }
    .cp-right { width: 100%; }
    .cp-overlay { padding: 50px 16px 24px; }
    .cp-ov-row { grid-template-columns: 40px minmax(0, 1fr) 76px; gap: 10px; }
}
