/**
 * 六亲强弱模块（qin-strength.css）
 * - 包含六亲强弱仪表盘、用神选择条、代表爻/多现手选（无胶囊，仅交互）与计算过程浮层样式。
 * - 仅负责六亲强弱相关 UI，不含通用卦象排版与其它业务模块样式。
 * - 建议在 result-narrative.css 之后、style.css 之前加载。
 */
.liuyao-qin-strength {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: left;
}
.liuyao-qin-strength-head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin: 0 0 10px;
}
.liuyao-qin-strength-title { margin: 0; font-size: 15px; color: #1e3d2f; font-weight: 700; }
.liuyao-qin-strength-note { margin: 0; font-size: 12px; line-height: 1.55; color: #64748b; }
.liuyao-qin-strength-shift-note {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #92400e;
    padding: 6px 10px;
    background: #fffbeb;
    border-radius: 8px;
    border: 1px solid #fde68a;
}
.liuyao-qin-strength-yong-shi {
    margin: 0 0 12px;
    font-size: 12px;
    line-height: 1.5;
    color: #475569;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid #6366f1;
}
.liuyao-qin-strength-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
.liuyao-qin-strength-row + .liuyao-qin-strength-row { border-top: 1px solid rgba(47, 107, 82, 0.16); margin-top: 12px; padding-top: 12px; }
.liuyao-qin-strength-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}
.liuyao-qin-strength-label { display: flex; align-items: flex-start; justify-content: flex-start; min-width: 0; }
.liuyao-qin-strength-label-pill {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    box-sizing: border-box;
    max-width: 100%;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #4338ca;
    background: linear-gradient(165deg, #fafbff 0%, #e8ecff 38%, #d4dcfa 100%);
    border: 1px solid #a5b4fc;
    border-radius: 15px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 1px 2px rgba(255, 255, 255, 0.55) inset,
        0 3px 8px rgba(99, 102, 241, 0.18),
        0 1px 3px rgba(15, 23, 42, 0.08);
    line-height: 1.45;
    user-select: none;
    pointer-events: none;
}
.liuyao-qin-strength-label-pill--with-hint { align-items: baseline; }
.liuyao-qin-strength-pill-hint { font-weight: 500; color: #3730a3; }
.liuyao-qin-strength-bar { height: 12px; border-radius: 999px; background: #e8f3ee; border: 1px solid rgba(47, 107, 82, 0.18); overflow: hidden; }
.liuyao-qin-strength-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2f6b52 0%, #3ea97f 100%); width: 0%; transition: width 0.2s ease; }
.liuyao-qin-strength-bar-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; width: 100%; }

.liuyao-qin-strength-matter {
    margin: 0;
    padding: 8px 10px 10px;
    font-size: 13px;
    line-height: 1.6;
    color: #334155;
    text-align: left;
    background: #f1f5f9;
    border-radius: 10px;
    border-left: 3px solid #2563eb;
}
.liuyao-qin-strength-matter--standalone { margin: 0 0 12px; grid-area: unset; }
.liuyao-qin-strength-fushen-line { margin: 0 0 8px; }
.liuyao-qin-strength-fushen-line:last-of-type:not(.liuyao-qin-strength-matter-extra) { margin-bottom: 0; }
.liuyao-qin-strength-matter-extra { margin: 0; font-size: 13px; line-height: 1.6; color: #334155; }
.liuyao-qin-strength-matter-desc-bordered { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #b8c5d9; }

.liuyao-qin-strength-yong-line {
    margin: 0;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.55;
    color: #334155;
    text-align: left;
    background: #f1f5f9;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    white-space: pre-wrap;
}
.liuyao-qin-strength-yong-bridge-wrap {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed rgba(47, 107, 82, 0.22);
}
.liuyao-qin-strength-yong-bridge-line {
    margin: 0 0 8px;
    font-size: 12px;
    line-height: 1.55;
    color: #475569;
}
.liuyao-qin-strength-yong-bridge-line:last-child { margin-bottom: 0; }

.yongshen-select-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
}
.yongshen-btn-wrapper { flex: 1; display: flex; flex-direction: column; align-items: stretch; }
.yongshen-select-btn {
    box-sizing: border-box;
    padding: 4px 6px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 6px;
    background: linear-gradient(180deg, #fafafa 0%, #f1f5f9 100%);
    color: #334155;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.22s ease, transform 0.15s ease;
    text-align: center;
    width: 100%;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 1px 2px rgba(15, 23, 42, 0.06);
}
.yongshen-select-btn:hover:not(.active) {
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    border-color: rgba(100, 116, 139, 0.5);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.92) inset,
        0 2px 4px rgba(15, 23, 42, 0.07);
}
.yongshen-select-btn.active {
    color: #064e3b;
    font-weight: 600;
    border: 1px solid rgba(52, 211, 153, 0.55);
    background: linear-gradient(165deg, #ecfdf5 0%, #d1fae5 42%, #a7f3d0 100%);
    transform: translateY(-1px);
}
.yongshen-energy-bar { height: 5px; background: #e0e0e0; border-radius: 0 0 2px 2px; margin-top: -1px; overflow: hidden; width: 100%; position: relative; }
.yongshen-energy-bar::after { content: ''; position: absolute; top: 0; left: 0; height: 100%; width: var(--energy-width, 0%); background: linear-gradient(90deg, #4CAF50, #8BC34A); transition: width 0.3s ease; }

/* 代表爻 / 同六亲多现手选：各模式均无胶囊视觉；.multi-rep-pick 保留点击切换 */
.yao-liuqin.liuyao-representative-underline,
.yao-liuqin.liuyao-liuqin-multi-rep-pick {
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    background: none;
    box-shadow: none;
    box-decoration-break: unset;
    -webkit-box-decoration-break: unset;
    text-decoration: none;
    border-bottom: none;
    transform: none;
    transition: none;
}
.yao-liuqin.liuyao-liuqin-multi-rep-pick {
    cursor: pointer;
    touch-action: manipulation;
}
.yao-liuqin.liuyao-liuqin-multi-rep-pick:active {
    transform: none;
    box-shadow: none;
}

.liuyao-qin-detail-overlay { position: fixed; inset: 0; z-index: 12100; display: none; }
.liuyao-qin-detail-overlay.is-open { display: block; }
.liuyao-qin-detail-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.48); }
.liuyao-qin-detail-panel {
    position: relative;
    z-index: 1;
    width: min(92vw, 560px);
    max-height: 82vh;
    margin: 7vh auto 0;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 50px rgba(2, 6, 23, 0.35);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.liuyao-qin-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px 12px; background: linear-gradient(180deg, #1e3a2f 0%, #2a6350 100%); color: #f8fafc; }
.liuyao-qin-detail-head-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.liuyao-qin-detail-titlebar { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.45; color: #f8fafc; word-break: break-word; }
.liuyao-qin-detail-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: stretch; }
.liuyao-qin-detail-tab {
    border: 1px solid rgba(248, 250, 252, 0.45);
    background: rgba(15, 23, 42, 0.2);
    color: #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.35;
    padding: 6px 10px;
    cursor: pointer;
    text-align: left;
    max-width: 100%;
}
.liuyao-qin-detail-tab:hover { background: rgba(15, 23, 42, 0.35); }
.liuyao-qin-detail-tab.is-active {
    background: #f8fafc;
    color: #14532d;
    border-color: #f8fafc;
    font-weight: 700;
}
.liuyao-qin-detail-reset-rep {
    align-self: flex-start;
    border: 1px solid rgba(248, 250, 252, 0.5);
    background: transparent;
    color: #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    padding: 4px 10px;
    cursor: pointer;
}
.liuyao-qin-detail-reset-rep:hover { background: rgba(248, 250, 252, 0.12); }
.liuyao-qin-detail-head h3 { margin: 0; font-size: 15px; }
.liuyao-qin-detail-close { border: 0; background: transparent; color: #f8fafc; font-size: 22px; line-height: 1; cursor: pointer; }
.liuyao-qin-detail-body { padding: 12px; overflow: auto; }
.liuyao-qin-detail-title { margin: 0 0 8px; font-size: 15px; color: #0f172a; }
.liuyao-qin-detail-rep-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 10px;
}
.liuyao-qin-detail-rep-row .liuyao-qin-detail-rep { margin: 0; flex: 1 1 auto; min-width: 0; color: #334155; font-size: 13px; }
.liuyao-qin-detail-rep-row .liuyao-qin-detail-fold-btn { flex: 0 0 auto; align-self: flex-start; margin-top: 1px; }
.liuyao-qin-detail-tag-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin: 0 0 12px;
}
.liuyao-qin-detail-pick-body { margin: 0 0 12px; }
.liuyao-qin-detail-group-title { margin: 10px 0 6px; font-size: 13px; color: #0f172a; }
.liuyao-qin-detail-base { margin: 0 0 8px; color: #334155; font-size: 13px; }
.liuyao-qin-detail-steps { margin: 0; padding-left: 18px; }
.liuyao-qin-detail-steps li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed #e2e8f0; padding: 6px 0; font-size: 13px; }
.liuyao-qin-detail-val { color: #0f766e; white-space: nowrap; }
.liuyao-qin-detail-empty { margin: 0; color: #64748b; font-size: 13px; }
.liuyao-qin-detail-final-row { margin-top: 10px; padding-top: 8px; border-top: 1px solid #e2e8f0; display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.liuyao-qin-detail-final-row .liuyao-qin-detail-val { font-size: 16px; font-weight: 700; line-height: 1.2; }
.liuyao-qin-detail-final-row--normalize { margin-top: 6px; padding-top: 0; border-top: 0; }
.liuyao-qin-detail-final-row--ratio { margin-top: 6px; padding-top: 0; border-top: 0; }
.liuyao-qin-detail-final-note { margin-top: 6px; color: #475569; font-size: 12px; }
.liuyao-qin-detail-compare-wrap { margin: 6px 0 8px; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
.liuyao-qin-detail-compare-list { padding: 6px 8px; }
.liuyao-qin-detail-compare-item { padding: 6px 0; font-size: 12px; color: #111; }
.liuyao-qin-detail-compare-item + .liuyao-qin-detail-compare-item { border-top: 1px dashed #e2e8f0; }
.liuyao-qin-detail-compare-item-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.liuyao-qin-detail-compare-text { color: #111; flex: 1 1 auto; min-width: 0; }
.liuyao-qin-detail-compare-score { color: #111; font-weight: 700; flex: 0 0 auto; white-space: nowrap; }
.liuyao-qin-detail-compare-tags { margin-top: 4px; padding: 0 0 2px; font-size: 12px; line-height: 1.5; color: #111; word-break: break-word; }
.liuyao-qin-detail-divider { margin: 10px 0 8px; border-top: 1px solid #e2e8f0; }
.liuyao-qin-detail-fold-btn { border: 1px solid #cfd4dc; background: #f3f4f6; color: #374151; border-radius: 6px; font-size: 12px; line-height: 1.2; padding: 2px 8px; cursor: pointer; }
.liuyao-qin-detail-fold-btn:hover { background: #e9ecef; border-color: #adb5bd; }

/*
 * 标签胶囊：主页面 #liuyao-qin-strength 行内已不再输出；精简解卦 compact 等仍用下列 class。
 */
.liuyao-qin-strength-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    align-items: center;
    min-width: 0;
}
.liuyao-qin-strength-tag {
    font-size: 12px;
    line-height: 1;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #475569;
    white-space: nowrap;
}
.liuyao-qin-strength-tag--bad { background: var(--liuyao-jixiong-xiong-bg); border-color: var(--liuyao-jixiong-xiong-border); color: var(--liuyao-jixiong-xiong); }
.liuyao-qin-strength-tag--good { background: var(--liuyao-jixiong-ji-bg); border-color: var(--liuyao-jixiong-ji-border); color: var(--liuyao-jixiong-ji); }
.liuyao-qin-strength-tag--bad-medium { color: #b91c1c; }
.liuyao-qin-strength-tag--bad-strong { color: #b91c1c; font-weight: 700; }
.liuyao-qin-strength-tag-note {
    flex: 1 1 100%;
    width: 100%;
    font-size: 12px;
    line-height: 1.45;
    color: #64748b;
    text-align: right;
    margin-top: 2px;
}

/* 趋势箭头样式 */
.liuyao-qin-strength-trend { display: inline-block; margin-left: 4px; font-size: 0.85em; }
.liuyao-qin-strength-trend.trend-up { color: #22c55e; }
.liuyao-qin-strength-trend.trend-down { color: #ef4444; }
.liuyao-qin-strength-tag.trend-up { background-color: #dcfce7; color: #166534; }
.liuyao-qin-strength-tag.trend-down {
    background-color: #fee2e2;
    color: #991b1b;
    font-size: 14px;
    padding: 4px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #f5f6f8;
    color: #333;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
