/* ======================================================================
 *  身体安全红绿灯 /tool/body-safety
 *  依赖 calc-common.css 变量与公共类，支持黑夜模式，适配移动端。
 * ====================================================================== */

/* ---------- 模式切换 ---------- */
.bs-seg {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}
.bs-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: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.16s ease;
    white-space: nowrap;
}
.bs-seg button:hover { border-color: #008e9b; color: #008e9b; }
.bs-seg button.is-active {
    background: linear-gradient(135deg, rgba(0, 142, 155, 0.14), rgba(0, 184, 169, 0.07));
    border-color: rgba(0, 142, 155, 0.55);
    color: #008e9b;
}

/* ---------- HUD ---------- */
.bs-hud {
    display: flex;
    gap: 16px;
    font-size: 12.5px;
    color: var(--c-text-muted);
    margin-bottom: 8px;
}
.bs-hud b { color: var(--c-text); font-size: 14px; }
.bs-bar {
    height: 8px;
    border-radius: 99px;
    background: var(--c-surface-soft);
    border: 1px solid var(--c-border);
    overflow: hidden;
    margin-bottom: 16px;
}
.bs-bar i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 99px;
    background: linear-gradient(90deg, #008e9b, #00c8a9);
    transition: width 0.35s ease;
}

/* ---------- 情景卡 ---------- */
.bs-scene {
    position: relative;
    padding: 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 142, 155, 0.08), rgba(0, 200, 169, 0.05));
    border: 1px solid rgba(0, 142, 155, 0.28);
    margin-bottom: 14px;
}
.bs-scene-label {
    position: absolute;
    top: -9px;
    left: 14px;
    padding: 1px 10px;
    border-radius: 99px;
    background: #008e9b;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
}
.bs-q { font-size: 15px; font-weight: 700; line-height: 1.75; color: var(--c-text); }

/* ---------- 红黄绿灯 ---------- */
.bs-lights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}
.bs-light {
    padding: 13px 6px 11px;
    border-radius: 14px;
    border: 2px solid var(--c-border);
    background: var(--c-surface-soft);
    cursor: pointer;
    font-family: inherit;
    text-align: center;
    transition: all 0.15s ease;
}
.bs-light .bs-light > span { display: block; }
.bs-light span { display: block; font-size: 15px; font-weight: 800; margin-top: 3px; }
.bs-light small { display: block; font-size: 11px; color: var(--c-text-muted); margin-top: 3px; line-height: 1.5; }
.bs-light--g .bs-light-emoji, .bs-light--g { color: #1f9d43; }
.bs-light--y, .bs-light--y span { color: #d98a00; }
.bs-light--r, .bs-light--r span { color: #e0342b; }
.bs-light--g span { color: #1f9d43; }
.bs-light .bs-light-emoji { font-size: 26px; display: block; }
.bs-light--g { border-color: rgba(52, 199, 89, 0.4); background: rgba(52, 199, 89, 0.06); }
.bs-light--y { border-color: rgba(255, 176, 32, 0.4); background: rgba(255, 176, 32, 0.06); }
.bs-light--r { border-color: rgba(255, 59, 48, 0.4); background: rgba(255, 59, 48, 0.06); }
.bs-light:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.bs-light:disabled { cursor: default; opacity: 0.55; }
.bs-light.is-answer {
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(0, 142, 155, 0.35);
    animation: bsPop 0.3s ease;
}
@keyframes bsPop {
    0% { transform: scale(0.95); }
    60% { transform: scale(1.04); }
    100% { transform: scale(1); }
}

/* ---------- 反馈 ---------- */
.bs-feedback {
    padding: 13px 15px;
    border-radius: 12px;
    margin-bottom: 14px;
    animation: calcFade 0.25s ease;
}
.bs-feedback.is-ok {
    background: rgba(52, 199, 89, 0.08);
    border: 1px solid rgba(52, 199, 89, 0.35);
}
.bs-feedback.is-bad {
    background: rgba(255, 59, 48, 0.07);
    border: 1px solid rgba(255, 59, 48, 0.32);
}
.bs-fb-head { font-size: 14.5px; font-weight: 800; margin-bottom: 6px; }
.bs-fb-why { font-size: 13px; line-height: 1.75; color: var(--c-text); }

.bs-btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- 结算 ---------- */
.bs-over { text-align: center; padding: 18px 12px 4px; animation: calcFade 0.3s ease; }
.bs-stars {
    font-size: 34px;
    letter-spacing: 6px;
    color: #ffb020;
    text-shadow: 0 2px 10px rgba(255, 176, 32, 0.35);
    margin-bottom: 8px;
}
.bs-over-txt { font-size: 14.5px; font-weight: 700; color: var(--c-text); margin-bottom: 12px; }

/* ---------- 知识卡 ---------- */
.bs-know-card {
    padding: 15px 16px;
    border-radius: 14px;
    margin-bottom: 12px;
    border: 1px solid var(--c-border);
}
.bs-know-card h3 { font-size: 14.5px; font-weight: 800; margin-bottom: 8px; }
.bs-know-card p { font-size: 13.5px; line-height: 1.9; color: var(--c-text-sub); }
.bs-know-card p b { color: var(--c-text); }
.bs-know-card--g { background: rgba(52, 199, 89, 0.07); border-color: rgba(52, 199, 89, 0.3); }
.bs-know-card--y { background: rgba(255, 176, 32, 0.07); border-color: rgba(255, 176, 32, 0.32); }
.bs-know-card--r { background: rgba(255, 59, 48, 0.06); border-color: rgba(255, 59, 48, 0.3); }

/* ---------- AI ---------- */
.bs-ai-lead { font-size: 13px; line-height: 1.8; color: var(--c-text-sub); margin-bottom: 10px; }
.bs-ai textarea {
    width: 100%;
    margin: 10px 0 2px;
    padding: 11px 13px;
    border-radius: 12px;
    border: 1px solid var(--c-border);
    background: var(--c-surface-soft);
    color: var(--c-text);
    font-family: inherit;
    font-size: 13.5px;
    line-height: 1.7;
    resize: vertical;
    outline: none;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.bs-ai textarea:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-soft); }
.bs-ai-text { font-size: 13px; line-height: 1.85; color: var(--c-text); margin: 8px 0 12px; }

/* ---------- 右侧解析 ---------- */
.bs-detail-tag {
    display: inline-block;
    padding: 3px 14px;
    border-radius: 99px;
    background: rgba(0, 142, 155, 0.12);
    color: #008e9b;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 12px;
}
.bs-detail-q { font-size: 14.5px; font-weight: 700; line-height: 1.7; color: var(--c-text); margin-bottom: 12px; }
.bs-detail-verdict {
    font-size: 13.5px;
    font-weight: 700;
    padding: 10px 13px;
    border-radius: 10px;
    margin-bottom: 10px;
}
.bs-detail-verdict.is-ok {
    background: rgba(52, 199, 89, 0.08);
    border: 1px solid rgba(52, 199, 89, 0.3);
    color: #1f9d43;
}
.bs-detail-verdict.is-bad {
    background: rgba(255, 59, 48, 0.07);
    border: 1px solid rgba(255, 59, 48, 0.3);
    color: #e0342b;
}
.bs-detail-why { font-size: 13px; line-height: 1.85; color: var(--c-text-sub); }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
    .bs-seg { grid-template-columns: 1fr; }
    .bs-q { font-size: 14px; }
    .bs-light .bs-light-emoji { font-size: 22px; }
    .bs-light span { font-size: 13.5px; }
    .bs-light small { font-size: 10px; }
}

/* ---------- 黑夜模式 ---------- */
[data-theme="dark"] .bs-seg button { background: rgba(255, 255, 255, 0.04); }
[data-theme="dark"] .bs-seg button.is-active {
    background: rgba(0, 142, 155, 0.2);
    border-color: rgba(0, 184, 169, 0.5);
    color: #4dd0d0;
}
[data-theme="dark"] .bs-scene { background: rgba(0, 142, 155, 0.12); border-color: rgba(0, 184, 169, 0.32); }
[data-theme="dark"] .bs-light--g { background: rgba(52, 199, 89, 0.1); }
[data-theme="dark"] .bs-light--y { background: rgba(255, 176, 32, 0.1); }
[data-theme="dark"] .bs-light--r { background: rgba(255, 59, 48, 0.1); }
[data-theme="dark"] .bs-light--g, [data-theme="dark"] .bs-light--g span { color: #4ede78; }
[data-theme="dark"] .bs-light--y, [data-theme="dark"] .bs-light--y span { color: #ffb84d; }
[data-theme="dark"] .bs-light--r, [data-theme="dark"] .bs-light--r span { color: #ff9a94; }
[data-theme="dark"] .bs-detail-tag { background: rgba(0, 142, 155, 0.2); color: #4dd0d0; }
[data-theme="dark"] .bs-detail-verdict.is-ok { background: rgba(52, 199, 89, 0.13); color: #4ede78; }
[data-theme="dark"] .bs-detail-verdict.is-bad { background: rgba(255, 59, 48, 0.13); color: #ff9a94; }
[data-theme="dark"] .bs-ai textarea { background: rgba(255, 255, 255, 0.04); }
