/* 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: #8a7a55; 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: #6a5a38; 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: #4a5a3a; background: #eef4e6; border: 1px solid #cfdcc0; border-radius: 8px; padding: 6px 10px; line-height: 1.6; }
#sys-tieban .tb-carry a { color: #9a3a2a; 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: #5a4a2a; 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: #8a7a55; }
#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: #9a8a65; }
#sys-tieban .tb-col .tb-hl { font-size: 12px; color: #8a7a55; }
#sys-tieban .tb-col .tb-sum { font-size: 14px; font-weight: 600; color: var(--seal, #b5342a); }
#sys-tieban .tb-meta { font-size: 13px; color: #5a4e34; line-height: 1.8; }
#sys-tieban .tb-meta b { color: #3a2e14; }
#sys-tieban .tb-warnbox { color: #9a3a2a; background: #fff3ee; border: 1px solid #e8c4b8; 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: #3a2e14; }
#sys-tieban .tb-hex .tb-hexrole { font-size: 11px; color: #9a8a65; }
#sys-tieban .tb-lines { display: flex; flex-direction: column; gap: 3px; font-family: monospace; font-size: 12px; line-height: 1; color: #5a4a2a; letter-spacing: -1px; }
#sys-tieban .tb-lines span { display: block; white-space: pre; }
#sys-tieban .tb-derive { font-size: 13px; color: #5a4e34; 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: #8a7a55; 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: #6a5a38; cursor: pointer; }
#sys-tieban .tb-vseg button.on { background: #3a2e14; color: #f6efdc; border-color: #3a2e14; }
#sys-tieban .tb-vseg .tb-vlab { font-size: 12px; color: #9a8a65; align-self: center; margin-right: 4px; }
#sys-tieban .tb-vseg .tb-vnext { background: var(--seal, #b5342a); color: #fff; border-color: var(--seal, #b5342a); font-weight: 600; margin-right: 6px; }
#sys-tieban .tb-vseg .tb-vnext:disabled { background: #cfc4a8; border-color: #cfc4a8; color: #fff; cursor: default; }
#sys-tieban .tb-vseg .tb-vreset { color: #9a3a2a; border-color: #d9b8b0; }
#sys-tieban .tb-vhint { font-size: 12px; color: #6a5a38; line-height: 1.6; margin: -4px 0 10px; }
#sys-tieban .tb-tag.tb-on { background: var(--seal, #b5342a); color: #fff; 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: #8a7a55; 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: #3a2e14; line-height: 1.6; }
#sys-tieban .tb-tw td.tb-n { font-weight: 600; white-space: nowrap; color: #5a4a2a; }
#sys-tieban .tb-tw td.tb-off { white-space: nowrap; color: #8a7a55; 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: #9a8a65; }
#sys-tieban .tb-tag { display: inline-block; font-size: 11px; padding: 0 6px; border-radius: 999px; border: 1px solid #d9cba8; color: #6a5a38; margin-right: 4px; vertical-align: 1px; }
#sys-tieban .tb-tag.tb-sex { border-color: #c9a6a0; color: #9a3a2a; }
#sys-tieban .tb-tag.tb-src { border-color: #b8c9d9; color: #2a4a6a; }
#sys-tieban .tb-notes summary { cursor: pointer; font-size: 13px; color: #6a5a38; }
#sys-tieban .tb-notes ul { margin: 8px 0 0; padding-left: 18px; font-size: 12px; color: #6a5a38; 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; }
}
