/* tieban.css — 铁板神数（第7系统页签）。样式全限定 #sys-tieban 作用域，与其余系统零冲突。
   复用全局 .panel/.seg/.hint/.go(.primary/.ghost)；结果卡 .tb-card 自定。DOM id 一律 tb- 前缀。
   ⚠ 全局 input{width:100%;padding} 会渗透到复选框——.tb-check input 已显式 width:auto。 */

/* ── 表单 ── */
#sys-tieban .tb-form-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr 1fr; gap: 8px; align-items: end; }
#sys-tieban .tb-num label, #sys-tieban .tb-text label { display: block; font-size: 12px; color: #9aa3aa; margin-bottom: 3px; }
#sys-tieban .tb-num input, #sys-tieban .tb-text input { width: 100%; box-sizing: border-box; }
#sys-tieban .tb-row2 { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 10px; }
#sys-tieban .tb-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #c8ccd0; cursor: pointer; }
#sys-tieban .tb-check input { width: auto; padding: 0; margin: 0; }
#sys-tieban .tb-go { justify-content: center; gap: 12px; }
#sys-tieban .tb-carry { margin-top: 10px; font-size: 12px; color: #c8ccd0; background: #0f1f16; border: 1px solid #2f5a3a; border-radius: 8px; padding: 6px 10px; line-height: 1.6; }
#sys-tieban .tb-carry a { color: #e0715f; margin-left: 4px; }
#sys-tieban .tb-go button { min-width: 110px; }

/* ── 结果卡 ── */
#sys-tieban .tb-card { margin-top: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); }
#sys-tieban .tb-h { font-size: 15px; font-weight: 600; color: #e6dcc4; margin: 0 0 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#sys-tieban .tb-h .tb-sub { font-size: 12px; font-weight: 400; color: #9aa3aa; }
#sys-tieban .tb-top { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; }
#sys-tieban .tb-sizhu { display: flex; gap: 14px; }
#sys-tieban .tb-col { display: flex; flex-direction: column; align-items: center; gap: 2px; }
#sys-tieban .tb-col .tb-g, #sys-tieban .tb-col .tb-z { font-size: 24px; font-weight: 600; line-height: 1.15; }
#sys-tieban .tb-col .tb-pn { font-size: 11px; color: #9aa3aa; }
#sys-tieban .tb-col .tb-hl { font-size: 12px; color: #9aa3aa; }
#sys-tieban .tb-col .tb-sum { font-size: 14px; font-weight: 600; color: var(--seal, #b5342a); }
#sys-tieban .tb-meta { font-size: 13px; color: #c8ccd0; line-height: 1.8; }
#sys-tieban .tb-meta b { color: #f0e9d8; }
#sys-tieban .tb-warnbox { color: #e0715f; background: #2a1512; border: 1px solid #7a3a2f; border-radius: 8px; padding: 8px 12px; font-size: 13px; }

/* ── 卦区 ── */
#sys-tieban .tb-guahead { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
#sys-tieban .tb-hex { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 88px; }
#sys-tieban .tb-hex .tb-hexname { font-size: 15px; font-weight: 600; color: #f0e9d8; }
#sys-tieban .tb-hex .tb-hexrole { font-size: 11px; color: #9aa3aa; }
#sys-tieban .tb-lines { display: flex; flex-direction: column; gap: 5px; }
#sys-tieban .tb-yl { display: flex; width: 66px; height: 11px; gap: 8px; }
#sys-tieban .tb-yl i { flex: 1; height: 100%; background: var(--ink, #e6dcc4); border-radius: 2px; display: block; }
@media (max-width: 560px) { #sys-tieban .tb-yl { width: 52px; gap: 6px; height: 10px; } }
#sys-tieban .tb-derive { font-size: 13px; color: #c8ccd0; line-height: 1.9; flex: 1; min-width: 220px; }
#sys-tieban .tb-code { font-size: 20px; font-weight: 700; color: var(--seal, #b5342a); letter-spacing: 2px; }
#sys-tieban .tb-code small { font-size: 12px; font-weight: 400; color: #9aa3aa; letter-spacing: 0; }
#sys-tieban .tb-vseg { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
#sys-tieban .tb-vseg button { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: #c8ccd0; cursor: pointer; }
#sys-tieban .tb-vseg button.on { background: var(--seal); color: #20170d; border-color: var(--seal); }
#sys-tieban .tb-vseg .tb-vlab { font-size: 12px; color: #9aa3aa; align-self: center; margin-right: 4px; }
#sys-tieban .tb-vseg .tb-vnext { background: var(--seal, #b5342a); color: #20170d; border-color: var(--seal, #b5342a); font-weight: 600; margin-right: 6px; }
#sys-tieban .tb-vseg .tb-vnext:disabled { background: #2a3540; border-color: #2a3540; color: #fff; cursor: default; }
#sys-tieban .tb-vseg .tb-vreset { color: #e0715f; border-color: #7a3a2f; }
#sys-tieban .tb-vhint { font-size: 12px; color: #c8ccd0; line-height: 1.6; margin: -4px 0 10px; }
#sys-tieban .tb-tag.tb-on { background: var(--seal, #b5342a); color: #20170d; border-color: var(--seal, #b5342a); }

/* ── 条文表 ── */
#sys-tieban .tb-tw { width: 100%; border-collapse: collapse; font-size: 13px; }
#sys-tieban .tb-tw th { text-align: left; font-weight: 500; color: #9aa3aa; font-size: 12px; padding: 4px 6px; border-bottom: 1px solid var(--line); }
#sys-tieban .tb-tw td { padding: 6px 6px; border-bottom: 1px dashed var(--line); vertical-align: top; color: #f0e9d8; line-height: 1.6; }
#sys-tieban .tb-tw td.tb-n { font-weight: 600; white-space: nowrap; color: #e6dcc4; }
#sys-tieban .tb-tw td.tb-off { white-space: nowrap; color: #9aa3aa; font-size: 12px; }
#sys-tieban .tb-tw td.tb-age { white-space: nowrap; color: var(--seal, #b5342a); font-weight: 600; }
#sys-tieban .tb-tw tr.tb-miss td { color: #9aa3aa; }
#sys-tieban .tb-tag { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 999px; border: 1px solid var(--line-soft); color: #c8ccd0; margin-right: 4px; vertical-align: 1px; }
#sys-tieban .tb-tag.tb-sex { border-color: #7a3a2f; color: #e0715f; }
#sys-tieban .tb-tag.tb-src { border-color: #3a5570; color: #6db3e8; }
#sys-tieban .tb-notes summary { cursor: pointer; font-size: 13px; color: #c8ccd0; }
#sys-tieban .tb-notes ul { margin: 8px 0 0; padding-left: 18px; font-size: 12px; color: #c8ccd0; line-height: 1.7; }

@media (max-width: 640px) {
  #sys-tieban .tb-form-grid { grid-template-columns: 1fr 1fr 1fr; }
  #sys-tieban .tb-top { grid-template-columns: 1fr; }
  #sys-tieban .tb-tw td.tb-off { display: none; }
  #sys-tieban .tb-tw th.tb-off { display: none; }
}

/* ── v2（徐宇辳正法）新增 ── */
#sys-tieban .tb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
#sys-tieban .tb-gp { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: rgba(255,255,255,0.02); min-width: 0; }
#sys-tieban .tb-gph { font-weight: 600; color: #e6dcc4; margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
#sys-tieban .tb-gph .tb-sub { font-size: 12px; font-weight: 400; color: #9aa3aa; }
#sys-tieban .tb-yl.on i { background: var(--seal, #b5342a); }
#sys-tieban .tb-yaotab { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
#sys-tieban .tb-yaotab th { text-align: left; font-weight: 500; color: #9aa3aa; font-size: 12px; padding: 3px 5px; border-bottom: 1px solid var(--line); }
#sys-tieban .tb-yaotab td { padding: 3px 5px; border-bottom: 1px dashed var(--line); color: #f0e9d8; white-space: nowrap; }
#sys-tieban .tb-yaotab tr.on td { background: rgba(224,182,77,0.10); }
#sys-tieban .tb-yaotab small { color: #9aa3aa; margin-left: 2px; }
#sys-tieban .tb-htab { border-collapse: collapse; margin-top: 6px; font-size: 12px; }
#sys-tieban .tb-htab th, #sys-tieban .tb-htab td { border: 1px solid var(--line); padding: 2px 6px; text-align: center; color: #c8ccd0; }
#sys-tieban .tb-htab th { color: #e6dcc4; }
#sys-tieban .tb-htab .on { background: var(--seal, #b5342a); color: #20170d; font-weight: 600; }
#sys-tieban .tb-kv { font-size: 13px; color: #c8ccd0; line-height: 1.9; margin-top: 8px; }
#sys-tieban .tb-kv b { color: #f0e9d8; }
#sys-tieban .tb-mini { font-size: 12px; color: #9aa3aa; }
#sys-tieban .tb-x { overflow-x: auto; }
#sys-tieban .tb-tw tr.on td { background: rgba(224,182,77,0.12); }
#sys-tieban .tb-pd { margin-top: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; }
#sys-tieban .tb-pd summary { cursor: pointer; font-size: 13px; color: #e6dcc4; }
#sys-tieban .tb-dq { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0 8px; }
#sys-tieban .tb-dq input { width: 76px; padding: 4px 6px; }
#sys-tieban .tb-dq button { padding: 4px 10px; }
#sys-tieban .tb-ml { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 10px; }
#sys-tieban .tb-mc { border: 1px solid var(--line); border-radius: 8px; padding: 6px 4px; text-align: center; }
#sys-tieban .tb-mc.on { border-color: var(--seal, #b5342a); background: rgba(224,182,77,0.10); }
#sys-tieban .tb-mc .tb-hex { min-width: 0; }
#sys-tieban .tb-mc .tb-yl { width: 44px; height: 8px; gap: 5px; }
#sys-tieban .tb-mc .tb-hexname { font-size: 13px; }
#sys-tieban .tb-tw1 { display: inline-block; margin: 2px 10px 2px 0; font-size: 13px; color: #c8ccd0; }
#sys-tieban .tb-tw1 b { color: #e6dcc4; margin-right: 4px; }
#sys-tieban .tb-tw1 em { font-style: normal; font-size: 11px; color: #9aa3aa; border: 1px solid var(--line); border-radius: 999px; padding: 0 5px; margin-right: 4px; }
#sys-tieban .tb-tw1.main { color: #f0e9d8; }
#sys-tieban .tb-tw1.main b { color: var(--seal, #b5342a); }
#sys-tieban .tb-cand { margin-top: 8px; padding: 6px 8px; border-left: 2px solid var(--line); }
#sys-tieban .tb-candh { font-size: 13px; color: #e6dcc4; }
#sys-tieban .tb-tg { margin-top: 8px; }
#sys-tieban .tb-tgh { font-weight: 600; color: #e6dcc4; }
#sys-tieban .tb-dc { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: #c8ccd0; margin-top: 6px; }
#sys-tieban .tb-gn { font-size: 13px; color: #c8ccd0; margin-top: 6px; line-height: 1.8; }
#sys-tieban .tb-kunout { font-size: 13px; }
@media (max-width: 760px) {
  #sys-tieban .tb-two { grid-template-columns: 1fr; }
  #sys-tieban .tb-ml { grid-template-columns: repeat(3, 1fr); }
}
/* ── 考刻分 ── */
#sys-tieban .tb-kfrow { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; padding: 2px 0; }
#sys-tieban .tb-kfrow.on { background: rgba(224,182,77,0.10); border-radius: 6px; }
#sys-tieban .tb-kfrow.base .tb-zx { color: #e6dcc4; font-weight: 600; }
#sys-tieban .tb-kf { font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: #c8ccd0; cursor: pointer; white-space: nowrap; }
#sys-tieban .tb-kf.on { background: var(--seal, #b5342a); color: #20170d; border-color: var(--seal, #b5342a); font-weight: 600; }
#sys-tieban .tb-kfsum { font-size: 13px; color: #c8ccd0; margin: 4px 0 10px; line-height: 1.7; }
#sys-tieban .tb-kfsum b { color: #e0b64d; }
#sys-tieban .tb-ladder { margin-top: 6px; max-height: 320px; overflow: auto; }
#sys-tieban .tb-ladder .tb-off { display: inline-block; min-width: 46px; font-size: 12px; color: #9aa3aa; }
#sys-tieban .tb-ladder .tb-zx { display: inline-block; min-width: 54px; font-size: 12px; color: #c8ccd0; }
#sys-tieban .tb-ladder .tb-zx small { color: #6db3e8; margin-left: 2px; }
#sys-tieban .tb-tw tr.tb-guess td { color: #9aa3aa; }
