﻿/* =========================================================
   批量录入大弹窗 · 素雅中式风格（对标小程序 batch-input）
   配色：宣纸底 + 黛墨文字 + 檀棕主色 + 赭陶点缀（配偶）
   ========================================================= */

/* ---------- 遮罩 & 弹窗外壳 ---------- */
.bi-mask{position:fixed;inset:0;background:rgba(30,22,10,.55);z-index:12000;opacity:0;visibility:hidden;transition:opacity .25s ease,visibility .25s ease}
.bi-mask.show{opacity:1;visibility:visible}
.bi-modal{position:fixed;top:4vh;left:50%;transform:translate(-50%,20px) scale(.98);width:1200px;max-width:97vw;height:92vh;background:#F6F3EC;border-radius:18px;z-index:12001;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 32px 90px rgba(30,22,10,.45),0 0 0 1px rgba(212,160,23,.15);opacity:0;visibility:hidden;transition:all .25s ease}
.bi-modal.show{transform:translate(-50%,0) scale(1);opacity:1;visibility:visible}

/* ---------- 顶栏 ---------- */
.bi-header{flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:14px 24px;background:linear-gradient(180deg,#FFFDF5,#FBF6EE);border-bottom:1px solid #ECE4D4;box-shadow:0 2px 12px rgba(94,74,48,.06);z-index:5}
.bi-header-left{display:flex;align-items:center;gap:10px;min-width:0}
.bi-header-badge{font-size:20px}
.bi-header-title{font-size:18px;font-weight:700;color:#2A1810;letter-spacing:0;color:#8A6A4A;background:#F5EDDD;border:1px solid #E5D9BE;border-radius:14px;padding:3px 12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:480px}
.bi-header-close{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:22px;color:#8A6A4A;cursor:pointer;transition:all .2s;flex-shrink:0}
.bi-header-close:hover{background:#F0E4CC;color:#A63A2C}

/* ---------- 滚动主体 ---------- */
.bi-scroll{flex:1;overflow-y:auto;padding:18px 24px 120px}
.bi-scroll::-webkit-scrollbar{width:8px}
.bi-scroll::-webkit-scrollbar-thumb{background:#D4C4A8;border-radius:4px}
.bi-scroll::-webkit-scrollbar-track{background:transparent}

/* ---------- 通用卡片 ---------- */
.bi-card{background:#FFFFFF;border:1px solid #ECE4D4;border-radius:14px;padding:16px 18px;margin-bottom:14px;box-shadow:0 2px 10px rgba(94,74,48,.05)}
.bi-title-bar{display:inline-block;width:4px;height:15px;background:linear-gradient(180deg,#D4A017,#B8860B);border-radius:2px;margin-right:8px;vertical-align:-2px}

/* ---------- 示例引导 ---------- */
.bi-guide-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.bi-guide-title{font-size:16px;font-weight:700;color:#2A1810}
.bi-guide-toggle{display:flex;align-items:center;gap:5px;font-size: 14px;color:#8A6A1F;cursor:pointer;padding:5px 14px;border:1px solid #E5D9BE;border-radius:16px;background:#FBF6EE;transition:all .2s;white-space:nowrap}
.bi-guide-toggle:hover{background:#F5EDDD;color:#5A3A00}
.bi-guide-arrow::after{content:'▾';display:inline-block;transition:transform .2s}
.bi-guide-arrow.expanded::after{transform:rotate(180deg)}
.bi-guide-box{margin-top:12px;padding:14px;background:#FDF9F0;border:1px solid #EFE5CE;border-radius:10px}
.bi-guide-tip{font-size: 14px;color:#8A6A4A;margin-bottom:10px}
.bi-guide-ex{display:flex;flex-direction:column;gap:8px}
.bi-guide-ex-row{display:flex;align-items:flex-start;gap:10px}
.bi-guide-tag{flex-shrink:0;font-size:11.5px;color:#7A5C1E;background:#F3E8CE;border-radius:6px;padding:3px 8px;font-weight:600}
.bi-guide-text{font-size: 14px;color:#4A3E2A;line-height:1.7}
.bi-guide-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.bi-chip{font-size: 14px;color:#3D6B3D;background:#EDF3EA;border:1px solid #D6E3D2;border-radius:12px;padding:3px 10px}
.bi-guide-rule-btn{margin-top:12px;display:flex;align-items:center;justify-content:space-between;padding:11px 16px;background:linear-gradient(135deg,#FDF4DF,#F8EBC8);border:1px solid #E5CE96;border-radius:10px;font-size:13.5px;color:#7A5210;font-weight:600;cursor:pointer;transition:all .2s}
.bi-guide-rule-btn:hover{background:linear-gradient(135deg,#F8EBC8,#F1DFB0);box-shadow:0 3px 10px rgba(184,134,11,.15)}
.bi-guide-rule-arrow{font-size:16px}

/* ---------- 输入卡 ---------- */
.bi-card-label-row,.bi-result-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.bi-card-label{font-size:15px;font-weight:700;color:#2A1810;display:flex;align-items:center}
.bi-text-count{font-size:12.5px;color:#B0A488}
.bi-textarea{width:100%;box-sizing:border-box;min-height:130px;resize:vertical;padding:12px 14px;border:1.5px solid #E0D5BC;border-radius:10px;background:#FFFDF5;font-family:inherit;font-size:14px;line-height:1.8;color:#3A342B;transition:border-color .2s,box-shadow .2s}
.bi-textarea:focus{outline:none;border-color:#C9A23B;box-shadow:0 0 0 3px rgba(201,162,59,.14)}
.bi-textarea::placeholder{color:#C4BBA6}
.bi-action-bar{display:none;align-items:center;justify-content:space-between;margin-top:10px}
.bi-action-bar.show{display:flex}
.bi-gong-row{display:flex;align-items:center;gap:8px;font-size:13.5px;color:#4A3E2A;cursor:pointer;user-select:none}
.bi-gong-row input{width:16px;height:16px;accent-color:#B8860B;cursor:pointer}
.bi-clear-btn{font-size: 14px;color:#A63A2C;cursor:pointer;padding:5px 16px;border:1px solid #E0B9AC;border-radius:16px;background:#FBF3EE;transition:all .2s}
.bi-clear-btn:hover{background:#F5E3DB;border-color:#A63A2C}
.bi-parse-btn{margin-top:12px;height:46px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#D4A017,#B8860B);color:#FFFDF5;font-size:15.5px;font-weight:700;letter-spacing:0;border-radius:12px;cursor:pointer;transition:all .2s;box-shadow:0 4px 14px rgba(184,134,11,.3)}
.bi-parse-btn:hover{box-shadow:0 6px 20px rgba(184,134,11,.42);transform:translateY(-1px)}
.bi-parse-btn.disabled{background:#D5D2C8;color:#98917E;cursor:not-allowed;box-shadow:none;transform:none;letter-spacing:0;align-items:center;gap:12px}
.bi-result-count{font-size:13.5px;color:#8A6A4A;font-weight:600}
.bi-convert-btn{font-size: 14px;color:#7A5C1E;background:#F3E8CE;border:1px solid #E0CE9E;border-radius:16px;padding:5px 16px;cursor:pointer;transition:all .2s;font-weight:600}
.bi-convert-btn:hover{background:#EFE0BC;box-shadow:0 2px 8px rgba(184,134,11,.2)}
.bi-mismatch-banner{padding:12px 16px;background:#FDF0EC;border:1px solid #EFC9BB;border-left:4px solid #A63A2C;border-radius:10px;margin-bottom:12px}
.bi-mismatch-title{font-size:14px;font-weight:700;color:#A63A2C;margin-bottom:4px}
.bi-mismatch-desc{font-size: 14px;color:#8B4A2E;line-height:1.7}
.bi-mismatch-tip{color:#C43E2A;font-weight:600}
.bi-count-banner{padding:12px 16px;border-radius:10px;margin-bottom:12px;font-size: 14px;line-height:1.7}
.bi-count-warn{background:#FDF6E4;border:1px solid #EBD9A8;border-left:4px solid #D4A017}
.bi-count-warn .bi-count-banner-title{color:#8A6A1F;font-weight:700;font-size:14px;margin-bottom:4px}
.bi-count-warn .bi-count-banner-desc{color:#96824E}
.bi-count-over{background:#FDF0EC;border:1px solid #EFC9BB;border-left:4px solid #A63A2C}
.bi-count-over .bi-count-banner-title{color:#A63A2C;font-weight:700;font-size:14px;margin-bottom:4px}
.bi-count-over .bi-count-banner-desc{color:#8B4A2E}
.bi-empty{display:flex;flex-direction:column;align-items:center;padding:40px 0;gap:12px}
.bi-empty-seal{width:64px;height:64px;border:3px solid #C43E2A;color:#C43E2A;font-size:32px;font-weight:700;display:flex;align-items:center;justify-content:center;border-radius:8px;opacity:.6;transform:rotate(-6deg)}
.bi-empty-text{font-size:14px;color:#8A8272}
.bi-empty-btn{font-size:13.5px;color:#7A5C1E;background:#F3E8CE;border:1px solid #E0CE9E;border-radius:18px;padding:8px 24px;cursor:pointer;transition:all .2s}
.bi-empty-btn:hover{background:#EFE0BC}

/* ---------- 族人卡片 ---------- */
.bi-person-card{background:#FFFFFF;border:1px solid #EAE1CC;border-radius:14px;margin-bottom:12px;overflow:hidden;box-shadow:0 2px 8px rgba(94,74,48,.05);transition:box-shadow .2s}
.bi-person-card:hover{box-shadow:0 4px 14px rgba(94,74,48,.1)}
/* 20261102j：已被后台自动合并的重复条目 → 置灰 + "已自动合并"角标 */
.bi-person-card-merged{opacity:.62;background:#FBF9F4;border-style:dashed}
.bi-person-card-merged .bi-person-head{background:#F7F4EC}
.bi-person-merged-tag{flex-shrink:0;font-size:12px;color:#8A7B5C;background:#EFEAE0;border:1px dashed #C9BFA8;border-radius:8px;padding:1px 7px;font-weight:600}
@keyframes biFlashBg{0%{background:#FFF3C4}100%{background:#FFFFFF}}
.person-card-flash{animation:biFlashBg .9s ease}
.bi-person-head{display:flex;align-items:center;gap:10px;padding:11px 14px;cursor:pointer;background:linear-gradient(180deg,#FFFEFA,#FBF8F0);border-bottom:1px solid #F0E9D8}
.bi-person-badge{flex-shrink:0;width:30px;height:30px;border-radius:50%;background:linear-gradient(135deg,#D4A017,#B8860B);color:#FFFDF5;font-size:14px;font-weight:700;display:flex;align-items:center;justify-content:center}
.bi-person-id{flex:1;min-width:0}
.bi-person-name-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.bi-person-name{font-size:15.5px;font-weight:700;color:#2A1810}
.bi-person-gen{flex-shrink:0;font-size: 14px;color:#7A5C1E;background:#F3E8CE;border-radius:8px;padding:2px 8px;font-weight:600}
.bi-person-rank{font-size: 14px;color:#8A6A4A;background:#F7F2E6;border-radius:8px;padding:2px 8px}
.bi-person-relation{display:block;font-size: 14px;color:#B0A488;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bi-chevron{flex-shrink:0;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-top:7px solid #B8AE94;transition:transform .2s}
.bi-chevron.right{transform:rotate(-90deg)}
.bi-card-remove{flex-shrink:0;width:26px;height:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:16px;color:#C9A23B;cursor:pointer;transition:all .2s}
.bi-card-remove:hover{background:#FBE9E3;color:#A63A2C}
.bi-card-errors{padding:8px 14px;background:#FDF0EC;border-bottom:1px solid #F3D9CE}
.bi-card-errors-text{font-size:12.5px;color:#A63A2C;line-height:1.7}
.bi-card-notes{padding:8px 14px;background:#FBF7EA;border-bottom:1px solid #EFE5CE}
.bi-card-notes-text{font-size:12.5px;color:#8A7444;line-height:1.7}
.bi-person-body{padding:14px}
@keyframes biFlashField{0%{background:#FFE9B8;box-shadow:0 0 0 3px rgba(212,160,23,.35)}100%{background:transparent}}
.bi-field-flash{animation:biFlashField .9s ease;border-radius:8px}

/* ---------- 头像 ---------- */
.bi-avatar{position:relative;flex-shrink:0;width:46px;height:46px;border-radius:10px;border:1.5px dashed #C9BC9A;background:#FAF6EA;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;transition:all .2s;gap:1px}
.bi-avatar:hover{border-color:#B8860B;background:#F7F0DC}
.bi-avatar.filled{border-style:solid;border-color:#E5D9BE;padding:0}
.bi-avatar-plus{font-size:15px;color:#B8AE94;line-height:1}
.bi-avatar-tip{font-size: 14px;color:#B8AE94;line-height:1}
.bi-avatar-img{width:100%;height:100%;object-fit:cover;border-radius:9px;display:block}
.bi-avatar-del{position:absolute;top:-7px;right:-7px;width:18px;height:18px;border-radius:50%;background:#A63A2C;color:#fff;font-size: 14px;display:flex;align-items:center;justify-content:center;box-shadow:0 1px 4px rgba(0,0,0,.25)}
.bi-avatar-spouse{width:38px;height:38px;border-radius:8px}

/* ---------- 表单 ---------- */
.bi-form-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px 12px}
.bi-form-grid-spouse{background:#FDFAF3;border-radius:10px;padding:10px}
.bi-field{display:flex;flex-direction:column;gap:4px;min-width:0}
.bi-field.bi-half{grid-column:span 1}
.bi-field.bi-wide{grid-column:span 4}
.bi-field-label{font-size: 14px;color:#8A7B5C;font-weight:600}
.bi-date-label-row{display:flex;align-items:center;justify-content:space-between}
.bi-conv-quick{font-size: 14px;color:#7A5C1E;background:#F3E8CE;border-radius:8px;padding:1px 8px;cursor:pointer;transition:all .2s;user-select:none}
.bi-conv-quick:hover{background:#E8D7AE;color:#5A3A00}
.bi-field-wrap{position:relative;display:flex;align-items:center}
.bi-finput{width:100%;box-sizing:border-box;height:34px;padding:0 9px;border:1.5px solid #E5DCC4;border-radius:8px;background:#FFFDF7;font-family:inherit;font-size:13.5px;color:#3A342B;transition:border-color .2s,box-shadow .2s}
.bi-finput:focus{outline:none;border-color:#C9A23B;box-shadow:0 0 0 2px rgba(201,162,59,.15)}
.bi-finput::placeholder{color:#C8BFA8}
textarea.bi-finput{height:auto;min-height:56px;padding:8px 9px;resize:vertical;line-height:1.6}
.bi-field-select .bi-bselect{width:100%;height:34px;padding:0 6px;border:1.5px solid #E5DCC4;border-radius:8px;background:#FFFDF7;font-family:inherit;font-size:13.5px;color:#3A342B;cursor:pointer}
.bi-field-select .bi-bselect:focus{outline:none;border-color:#C9A23B}
.bi-rank-badge{flex-shrink:0;margin-left:6px;font-size:10.5px;color:#7A6A3E;background:#F1E8CE;border-radius:6px;padding:2px 6px;white-space:nowrap}
.bi-year-badge{position:absolute;right:8px;top:50%;transform:translateY(-50%);font-size:10.5px;color:#7A5C1E;background:#F3E8CE;border-radius:6px;padding:2px 6px;font-weight:700;pointer-events:none}
.bi-conv-hint{font-size: 14px;color:#3D6B3D;line-height:1.5;min-height:0}
.bi-conv-hint:empty{display:none}

/* ---------- 配偶卡 ---------- */
.bi-spouse-card{margin-top:12px;border:1px solid #EADFD0;border-radius:12px;background:#FDFAF3;overflow:hidden}
.bi-spouse-head{display:flex;align-items:center;gap:9px;padding:9px 12px;background:#F9F3E4;border-bottom:1px solid #EFE3CC}
.bi-spouse-tag{flex-shrink:0;font-size:11.5px;color:#8B4A2E;background:#F5E2D8;border-radius:6px;padding:3px 9px;font-weight:700}
.bi-spouse-name{flex:1;min-width:0;font-size:14px;font-weight:600;color:#3A342B;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bi-spouse-remove{flex-shrink:0;font-size: 14px;color:#A63A2C;cursor:pointer;padding:4px 12px;border:1px solid #E0B9AC;border-radius:12px;background:#FBF3EE;transition:all .2s}
.bi-spouse-remove:hover{background:#F5E3DB}
.bi-spouse-add{margin-top:10px;height:36px;display:flex;align-items:center;justify-content:center;border:1.5px dashed #D4C4A8;border-radius:10px;font-size: 14px;color:#8A6A1F;cursor:pointer;transition:all .2s;background:#FCF8EE}
.bi-spouse-add:hover{border-color:#B8860B;color:#5A3A00;background:#F8F1DC}

/* ---------- 列表尾 ---------- */
.bi-list-end{display:flex;align-items:center;gap:14px;padding:14px 0 4px}
.bi-list-end-line{flex:1;height:1px;background:linear-gradient(90deg,transparent,#D4C4A8,transparent)}
.bi-list-end-text{font-size: 14px;color:#B0A488;white-space:nowrap}

/* ---------- 问题数入口 & 返回顶部 ---------- */
.bi-issues-entry{position:absolute;top:74px;left:50%;transform:translateX(-50%);z-index:30;display:none;align-items:center;gap:8px;padding:8px 16px;background:#A63A2C;color:#FFF5F0;border-radius:22px;font-size: 14px;cursor:pointer;box-shadow:0 4px 16px rgba(166,58,44,.4);transition:all .2s;white-space:nowrap}
.bi-issues-entry.show{display:flex}
.bi-issues-entry:hover{transform:translateY(-1px);box-shadow:0 6px 20px rgba(166,58,44,.5)}
.bi-issues-badge{min-width:20px;height:20px;border-radius:10px;background:#FFF5F0;color:#A63A2C;font-size: 14px;font-weight:700;display:flex;align-items:center;justify-content:center;padding:0 5px}
.bi-issues-arrow{font-size:15px}
.bi-back-top{position:absolute;right:18px;bottom:96px;z-index:30;width:40px;height:40px;border-radius:50%;background:#FFFDF5;border:1px solid #E0D5BC;color:#8A6A4A;font-size:18px;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 4px 14px rgba(94,74,48,.2);opacity:0;visibility:hidden;transition:all .25s}
.bi-back-top.show{opacity:1;visibility:visible}
.bi-back-top:hover{background:#F5EDDD;color:#5A3A00}

/* ---------- 问题抽屉 ---------- */
.bi-drawer-mask{position:absolute;inset:0;background:rgba(30,22,10,.4);z-index:40;opacity:0;visibility:hidden;transition:all .25s}
.bi-drawer-mask.show{opacity:1;visibility:visible}
.bi-drawer{position:absolute;top:0;right:-420px;bottom:0;width:400px;max-width:90%;background:#FBF8F0;z-index:41;display:flex;flex-direction:column;box-shadow:-8px 0 32px rgba(30,22,10,.25);transition:right .28s ease}
.bi-drawer.open{right:0}
.bi-drawer-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid #EAE1CC}
.bi-drawer-head-left{display:flex;align-items:center;gap:10px}
.bi-drawer-badge{min-width:26px;height:26px;border-radius:13px;background:#A63A2C;color:#fff;font-size: 14px;font-weight:700;display:flex;align-items:center;justify-content:center;padding:0 7px}
.bi-drawer-title{font-size:16px;font-weight:700;color:#2A1810}
.bi-drawer-close{font-size:24px;color:#8A7B5C;cursor:pointer;line-height:1}
.bi-drawer-close:hover{color:#A63A2C}
.bi-drawer-desc{padding:10px 18px;font-size: 14px;color:#9A917C;border-bottom:1px dashed #E5DCC4;line-height:1.6}
.bi-drawer-list{flex:1;overflow-y:auto;padding:12px}
.bi-issue-item{background:#FFF;border:1px solid #EFE5CE;border-left:4px solid #A63A2C;border-radius:10px;padding:10px 12px;margin-bottom:10px;cursor:pointer;transition:all .2s}
.bi-issue-item:hover{box-shadow:0 3px 10px rgba(94,74,48,.12)}
.bi-issue-item.warning{border-left-color:#D4A017;background:#FFFDF4}
.bi-issue-head{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-bottom:5px}
.bi-issue-seq{font-size: 14px;color:#FFF;background:#8A6A4A;border-radius:5px;padding:1px 7px}
.bi-issue-name{font-size:13.5px;font-weight:700;color:#2A1810}
.bi-issue-tag{font-size: 14px;color:#A63A2C;background:#FBE9E3;border-radius:5px;padding:2px 7px;font-weight:600}
.bi-issue-tag.warn{color:#8A6A1F;background:#F3E8CE}
.bi-issue-msg{font-size:12.5px;color:#5A4E38;line-height:1.7}
.bi-issue-dup-btns{display:flex;gap:8px;margin-top:8px}
.bi-dup-btn{font-size: 14px;border-radius:14px;padding:4px 14px;cursor:pointer;font-weight:600;transition:all .2s}
.bi-dup-btn.merge{background:#A63A2C;color:#fff}
.bi-dup-btn.merge:hover{background:#8B2F22}
.bi-dup-btn.keep{background:#F3E8CE;color:#7A5C1E;border:1px solid #E0CE9E}
.bi-dup-btn.keep:hover{background:#EFE0BC}
/* 抽屉批量操作按钮（20261102g：全部合并覆盖 / 全部保留两条） */
.bi-issue-bulk{display:flex;gap:10px;padding:10px 16px 6px;border-bottom:1px dashed #E5DCC4}
.bi-bulk-btn{flex:1;text-align:center;font-size:14px;font-weight:600;border-radius:16px;padding:8px 0;cursor:pointer;transition:all .2s}
.bi-bulk-btn.merge{background:#A63A2C;color:#fff}
.bi-bulk-btn.merge:hover{background:#8B2F22}
.bi-bulk-btn.keep{background:#F3E8CE;color:#7A5C1E;border:1px solid #E0CE9E}
.bi-bulk-btn.keep:hover{background:#EFE0BC}
.bi-parent-cands{margin-top:8px;padding-top:8px;border-top:1px dashed #E5DCC4}
.bi-parent-cands-hint{font-size: 14px;color:#8A7B5C;margin-bottom:6px}
.bi-parent-cand-row{display:flex;align-items:center;justify-content:space-between;padding:7px 10px;background:#FBF6EE;border:1px solid #EAE1CC;border-radius:8px;margin-bottom:6px;cursor:pointer;transition:all .15s}
.bi-parent-cand-row:hover{background:#F5EDDD;border-color:#C9A23B}
.bi-parent-cand-name{font-size: 14px;font-weight:600;color:#2A1810}
.bi-parent-cand-meta{display:flex;gap:8px;margin-top:2px}
.bi-parent-cand-gen{font-size: 14px;color:#7A5C1E;background:#F3E8CE;border-radius:5px;padding:1px 6px}
.bi-parent-cand-fa{font-size: 14px;color:#9A917C}
.bi-parent-cand-check{font-size: 14px;color:#3D6B3D;font-weight:700;white-space:nowrap}
.bi-drawer-empty{flex:1;display:flex;align-items:center;justify-content:center;font-size:14px;color:#B0A488}

/* ---------- 底部保存栏 ---------- */
.bi-bottom-bar{position:absolute;left:0;right:0;bottom:0;z-index:35;display:none;flex-direction:column;gap:0;background:linear-gradient(180deg,#FFFDF5,#FBF6EE);border-top:1px solid #E5D9BE;box-shadow:0 -4px 18px rgba(94,74,48,.12);padding:12px 24px}
.bi-bottom-bar.show{display:flex}
.bi-bar-top{display:flex;align-items:center;justify-content:space-between;gap:16px}
.bi-daughter-row{display:flex;align-items:center;gap:8px;font-size:13.5px;color:#4A3E2A;cursor:pointer;user-select:none}
.bi-daughter-row input{width:16px;height:16px;accent-color:#B8860B;cursor:pointer}
.bi-save-btn{min-width:220px;height:44px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#C43E2A,#A63A2C);color:#FFFDF5;font-size:15px;font-weight:700;border-radius:22px;cursor:pointer;letter-spacing:0;transition:all .2s;box-shadow:0 4px 14px rgba(166,58,44,.35);padding:0 26px}
.bi-save-btn:hover{box-shadow:0 6px 20px rgba(166,58,44,.45);transform:translateY(-1px)}
.bi-save-btn.saving{opacity:.75;cursor:wait;letter-spacing:0;box-shadow:none;cursor:not-allowed;transform:none}
.bi-bar-bottom{display:flex;align-items:center;justify-content:space-between;margin-top:7px}
.bi-daughter-tip{font-size:11.5px;color:#B0A488}
.bi-summary{font-size: 14px;color:#6A5C42}
.bi-summary em{font-style:normal;font-size:15px;font-weight:700;color:#A63A2C;margin:0 2px}

/* ---------- 保存进度 ---------- */
.bi-progress-mask{position:absolute;inset:0;background:rgba(30,22,10,.5);z-index:60;display:none;align-items:center;justify-content:center}
.bi-progress-mask.show{display:flex}
.bi-progress-box{width:400px;max-width:88%;background:#FFFDF5;border-radius:16px;padding:26px 30px;display:flex;flex-direction:column;align-items:center;gap:12px;box-shadow:0 20px 60px rgba(30,22,10,.4)}
.bi-progress-title{font-size:16px;font-weight:700;color:#2A1810}
.bi-progress-bar{width:100%;height:14px;border-radius:8px;background:#EFE5CE;overflow:hidden;box-shadow:inset 0 1px 3px rgba(184,134,11,.2)}
.bi-progress-inner{height:100%;width:0;background:linear-gradient(90deg,#D4A017,#B8860B);border-radius:8px;transition:width .3s ease}
.bi-progress-percent{font-size:22px;font-weight:700;color:#B8860B}
.bi-progress-current{font-size:12.5px;color:#8A7B5C;text-align:center;line-height:1.6}

/* ---------- 干支换算 FAB & 面板 ---------- */
.bi-conv-fab{position:absolute;right:18px;bottom:152px;z-index:31;height:40px;padding:0 18px;border-radius:20px;background:linear-gradient(135deg,#D4A017,#B8860B);color:#FFFDF5;font-size:13.5px;font-weight:700;display:flex;align-items:center;cursor:pointer;box-shadow:0 4px 16px rgba(184,134,11,.4);transition:all .2s}
.bi-conv-fab:hover{transform:translateY(-1px);box-shadow:0 6px 20px rgba(184,134,11,.5)}
.bi-conv-fab.open{background:linear-gradient(135deg,#8A8272,#6A6454)}
.bi-conv-mask{position:absolute;inset:0;background:rgba(30,22,10,.35);z-index:45;opacity:0;visibility:hidden;transition:all .25s}
.bi-conv-mask.show{opacity:1;visibility:visible}
.bi-conv-panel{position:absolute;left:50%;top:50%;transform:translate(-50%,-46%) scale(.97);width:520px;max-width:92%;background:#FFFDF5;border:1px solid #E5D9BE;border-radius:16px;z-index:46;padding:18px 22px;opacity:0;visibility:hidden;transition:all .22s;box-shadow:0 24px 70px rgba(30,22,10,.4)}
.bi-conv-panel.show{opacity:1;visibility:visible;transform:translate(-50%,-50%) scale(1)}
.bi-conv-header{display:flex;align-items:center;margin-bottom:14px}
.bi-conv-title{font-size:16px;font-weight:700;color:#2A1810;flex:1}
.bi-conv-close{font-size:24px;color:#8A7B5C;cursor:pointer;line-height:1}
.bi-conv-close:hover{color:#A63A2C}
.bi-conv-row{display:flex;gap:10px;margin-bottom:12px}
.bi-conv-picker{flex-shrink:0;display:flex;align-items:center;gap:8px;height:38px;padding:0 14px;border:1.5px solid #E0D5BC;border-radius:9px;background:#FBF6EE;cursor:pointer;font-size:14px;color:#3A342B;font-weight:600;user-select:none}
.bi-conv-picker:hover{border-color:#C9A23B}
.bi-conv-arrow{font-size: 14px;color:#8A7B5C;transition:transform .2s}
.bi-conv-arrow.up{transform:rotate(180deg)}
.bi-conv-year{flex:1;height:38px;padding:0 12px;border:1.5px solid #E0D5BC;border-radius:9px;background:#FFF;font-family:inherit;font-size:14px;color:#3A342B}
.bi-conv-year:focus{outline:none;border-color:#C9A23B}
.bi-era-drop{border:1px solid #E5D9BE;border-radius:10px;background:#FFFDF5;margin-bottom:12px;overflow:hidden}
.bi-era-search{width:100%;box-sizing:border-box;height:36px;padding:0 12px;border:none;border-bottom:1px solid #EFE5CE;background:#FBF6EE;font-family:inherit;font-size: 14px;color:#3A342B}
.bi-era-search:focus{outline:none}
.bi-era-list{max-height:220px;overflow-y:auto;padding:10px}
.bi-era-group{margin-bottom:10px}
.bi-era-group-name{font-size: 14px;color:#8A7B5C;font-weight:700;margin-bottom:5px}
.bi-era-chips{display:flex;flex-wrap:wrap;gap:6px}
.bi-era-chip{font-size:12.5px;color:#5A4E38;background:#F5EDDD;border:1px solid #E5D9BE;border-radius:13px;padding:3px 12px;cursor:pointer;transition:all .15s}
.bi-era-chip:hover{border-color:#C9A23B;background:#F0E4C8}
.bi-era-chip.on{background:linear-gradient(135deg,#D4A017,#B8860B);color:#FFFDF5;border-color:#B8860B;font-weight:600}
.bi-era-empty{padding:20px;text-align:center;font-size: 14px;color:#B0A488}
.bi-conv-select{height:38px;padding:0 8px;border:1.5px solid #E0D5BC;border-radius:9px;background:#FBF6EE;font-family:inherit;font-size: 14px;color:#3A342B;cursor:pointer;min-width:0}
.bi-conv-hour{flex:1;min-width:150px}
.bi-conv-leap-row{display:flex;align-items:center;gap:12px;margin-bottom:10px}
.bi-conv-leap-row label{display:flex;align-items:center;gap:7px;font-size:13.5px;color:#4A3E2A;cursor:pointer}
.bi-conv-leap-row input{width:16px;height:16px;accent-color:#B8860B;cursor:pointer}
.bi-conv-leap-tip{font-size:11.5px;color:#B0A488}
.bi-conv-result{display:flex;align-items:flex-start;gap:10px;padding:11px 14px;background:#EDF3EA;border:1px solid #C9DCC4;border-radius:9px;margin-bottom:8px}
.bi-conv-result span:first-child{flex:1;font-size: 14px;color:#2E5A2E;line-height:1.6;word-break:break-all}
.bi-conv-copy{flex-shrink:0;font-size: 14px;color:#3D6B3D;border:1px solid #B8CDB2;border-radius:12px;padding:3px 12px;cursor:pointer;transition:all .15s}
.bi-conv-copy:hover{background:#DEEBDA}
.bi-conv-error{padding:11px 14px;background:#FDF0EC;border:1px solid #EFC9BB;border-radius:9px;margin-bottom:8px;font-size: 14px;color:#A63A2C;line-height:1.6}
.bi-conv-tip{font-size:11.5px;color:#B0A488;line-height:1.6}

/* ---------- 完整规则弹窗 ---------- */
.bi-guide-mask{position:absolute;inset:0;background:rgba(30,22,10,.55);z-index:70;opacity:0;visibility:hidden;transition:all .25s}
.bi-guide-mask.show{opacity:1;visibility:visible}
.bi-guide-modal{position:absolute;top:50%;left:50%;transform:translate(-50%,-46%) scale(.98);width:760px;max-width:94%;max-height:88%;background:#FFFDF5;border-radius:16px;z-index:71;display:flex;flex-direction:column;opacity:0;visibility:hidden;transition:all .25s;box-shadow:0 24px 70px rgba(30,22,10,.45)}
.bi-guide-modal.show{opacity:1;visibility:visible;transform:translate(-50%,-50%) scale(1)}
.bi-guide-modal-head{display:flex;align-items:center;justify-content:space-between;padding:16px 22px;border-bottom:1px solid #EAE1CC;flex-shrink:0}
.bi-guide-modal-head-left{display:flex;align-items:center;gap:10px}
.bi-gm-badge{font-size:20px}
.bi-gm-title{font-size:17px;font-weight:700;color:#2A1810}
.bi-gm-close{font-size:26px;color:#8A7B5C;cursor:pointer;line-height:1}
.bi-gm-close:hover{color:#A63A2C}
.bi-guide-modal-list{overflow-y:auto;padding:18px 22px}
.bi-gsec{margin-bottom:22px}
.bi-gsec-summary{background:#FDF4DF;border:1px solid #EBD9A8;border-radius:10px;padding:12px 16px}
.bi-gsummary{font-size:14px;color:#5A3A00;line-height:1.8}
.bi-gsec-title{font-size:15px;font-weight:700;color:#2A1810;margin-bottom:10px;display:flex;align-items:center;gap:8px}
.bi-gsec-num{width:24px;height:24px;border-radius:50%;background:linear-gradient(135deg,#D4A017,#B8860B);color:#fff;font-size: 14px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.bi-gformat-box{background:#FBF6EE;border:1px solid #E5D9BE;border-left:4px solid #B8860B;border-radius:9px;padding:11px 14px;font-size:13.5px;color:#4A3E2A;line-height:1.8;margin-bottom:10px;word-break:break-all}
.bi-gfield-list{display:flex;flex-direction:column;gap:7px}
.bi-gfield-item{display:flex;gap:10px;align-items:baseline}
.bi-gfield-name{flex-shrink:0;font-size: 14px;font-weight:700;color:#7A5C1E}
.bi-gfield-desc{font-size: 14px;color:#5A4E38;line-height:1.7}
.bi-gfmt-card{background:#FFF;border:1px solid #EAE1CC;border-radius:10px;padding:11px 14px;margin-bottom:9px}
.bi-gfmt-name{font-size:13.5px;font-weight:700;color:#2A1810;margin-bottom:5px}
.bi-gfmt-example{font-size: 14px;color:#7A5210;background:#FDF4DF;border-radius:7px;padding:7px 10px;margin-bottom:5px;line-height:1.7;word-break:break-all}
.bi-gfmt-desc{font-size:12.5px;color:#8A7B5C;line-height:1.7}
.bi-gstep-card{display:flex;gap:10px;background:#FFF;border:1px solid #EAE1CC;border-radius:10px;padding:11px 14px;margin-bottom:9px}
.bi-gstep-card.warn{background:#FDF6E4;border-color:#EBD9A8}
.bi-gstep-num{flex-shrink:0;font-size: 14px;color:#FFF;background:#B8860B;border-radius:7px;padding:3px 9px;height:fit-content;font-weight:600;white-space:nowrap}
.bi-gstep-num.warn{background:#C43E2A}
.bi-gstep-title{font-size:13.5px;font-weight:700;color:#2A1810;margin-bottom:3px}
.bi-gstep-desc{font-size:12.5px;color:#5A4E38;line-height:1.7}
.bi-gdesc{display:flex;gap:8px;margin-bottom:7px}
.bi-gdesc-b{color:#C9A23B;font-size: 14px;line-height:1.9}
.bi-gdesc span:last-child{font-size: 14px;color:#5A4E38;line-height:1.8}
.bi-gdesc b{color:#7A5210}
.bi-gm-foot{padding-top:8px;display:flex;flex-direction:column;align-items:center;gap:12px}
.bi-gm-foot-text{font-size:12.5px;color:#B0A488;text-align:center}
.bi-gm-foot-btn{font-size:14px;font-weight:700;color:#FFFDF5;background:linear-gradient(135deg,#D4A017,#B8860B);border-radius:20px;padding:10px 34px;cursor:pointer;transition:all .2s;letter-spacing:0}
/* 确认对话框遮罩（20261102c 修复：此前本规则的样式被误并入 .bi-gm-foot-btn，导致对话框跑左下角）；
   位于 .bi-modal（transform 祖先）内，fixed 相对母弹窗定位 → 居中于母弹窗 */
.bi-dialog-mask{position:fixed;inset:0;background:rgba(30,22,10,.45);z-index:80;display:none;align-items:center;justify-content:center}
.bi-dialog-mask.show{display:flex}
.bi-dialog{width:480px;max-width:90%;max-height:80%;background:#FFFDF5;border-radius:14px;padding:20px 24px;box-shadow:0 24px 70px rgba(30,22,10,.45);display:flex;flex-direction:column;overflow:hidden}
.bi-dlg-title{font-size:16px;font-weight:700;color:#2A1810;margin-bottom:10px}
.bi-dlg-body{font-size:13.5px;color:#4A3E2A;line-height:1.8;overflow-y:auto;word-break:break-all}
.bi-dlg-cand-list{max-height:220px;overflow-y:auto;margin-top:8px}
.bi-dlg-cand{padding:8px 12px;border:1px solid #E5D9BE;border-radius:8px;margin-bottom:6px;font-size: 14px;color:#4A3E2A;cursor:pointer;transition:all .15s;line-height:1.6}
.bi-dlg-cand:hover{border-color:#C9A23B;background:#FBF6EE}
.bi-dlg-cand.on{border-color:#B8860B;background:#FDF4DF;box-shadow:0 0 0 2px rgba(184,134,11,.18)}
.bi-dlg-btns{display:flex;justify-content:flex-end;gap:10px;margin-top:16px;flex-shrink:0}
.bi-dlg-btn{height:36px;padding:0 22px;border-radius:9px;font-size:13.5px;font-weight:600;cursor:pointer;border:1.5px solid #E0D5BC;background:#fff;color:#6A5C42;font-family:inherit;transition:all .2s}
.bi-dlg-btn:hover{border-color:#B8860B;color:#3A2A08}
.bi-dlg-btn-plain{background:#FBF6EE}
.bi-dlg-btn-primary{background:linear-gradient(135deg,#D4A017,#B8860B);border-color:#B8860B;color:#FFFDF5}
.bi-dlg-btn-primary:hover{color:#fff}
.bi-dlg-btn-danger{background:linear-gradient(135deg,#C43E2A,#A63A2C);border-color:#A63A2C;color:#FFFDF5}
.bi-dlg-btn-danger:hover{color:#fff}

/* ---------- 窄屏适配 ---------- */
@media (max-width:1100px){
  .bi-form-grid{grid-template-columns:repeat(2,1fr)}
  .bi-field.bi-wide{grid-column:span 2}
  .bi-header-sub{display:none}
}
@media (max-width:640px){
  .bi-form-grid{grid-template-columns:1fr}
  .bi-field.bi-wide{grid-column:span 1}
  .bi-modal{top:2vh;height:96vh}
  .bi-save-btn{min-width:150px}
}

/* =========================================================
   修复（2026-10-30）：css/beautify.css「弹窗层级置顶」规则里的
   [class*="-mask"] 会把本组件所有 *-mask 强制抬到 z-index:100000 !important，
   而 bi-modal(12001)/bi-drawer(41)/bi-conv-panel(46)/bi-guide-modal(71) 未被命中
   → 弹窗被自己的暗色遮罩盖住，无法操作。
   这里用 body 前缀(0,1,1) 提高特异性，恢复 mask<panel 的设计层级。
   ========================================================= */
body .bi-mask { z-index: 12000 !important; }
body .bi-modal { z-index: 12001 !important; }
body .bi-drawer-mask { z-index: 40 !important; }
body .bi-drawer { z-index: 41 !important; }
body .bi-progress-mask { z-index: 60 !important; }
body .bi-conv-mask { z-index: 45 !important; }
body .bi-conv-panel { z-index: 46 !important; }
body .bi-guide-mask { z-index: 70 !important; }
body .bi-guide-modal { z-index: 71 !important; }
