/* 案件と人の合わせ方。style.css・flow.css・br.css の上に重ねる（接頭辞 mt-） */
.mt-h4 { margin: 0 0 8px; font-size: 14px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.mt-nl { display: block; margin: 6px 0 0; }
.mt-box { padding: 12px 14px; min-width: 0; }
.mt-tbl { font-size: 12.5px; }
.mt-tbl th, .mt-tbl td { padding: 6px 8px; }
.mt-tnote { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.mt-small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.mt-num { font-family: var(--latin); white-space: nowrap; }
.mt-tips { margin-top: 12px; }

/* 3 つの案件の表・人の台帳 */
.mt-ctbl { min-width: 980px; }
.mt-ctbl tbody th { white-space: nowrap; }
.mt-ctbl td:nth-child(3) { min-width: 14em; }
.mt-ptbl { min-width: 980px; }
.mt-ptbl td:nth-child(3) { min-width: 16em; }
.mt-ptbl td:nth-child(8) { min-width: 12em; }
.mt-ptbl tbody th, .mt-ptbl td:nth-child(2), .mt-ptbl td:nth-child(7) { white-space: nowrap; }

/* 道具の操作 */
.mt-ctl { padding: 12px 14px; display: grid; gap: 8px; margin-bottom: 10px; }
.mt-crow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.mt-lab { font-size: 12.5px; font-weight: 700; color: var(--muted); min-width: 5em; }
.mt-lnote { margin: 0; font-size: 12px; color: var(--muted); }
.mt-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12px; color: var(--ink2); }
.mt-lh { color: var(--muted); }
.mt-vb { display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 1px 8px; border: 1px solid var(--line); white-space: nowrap; }

/* 判定の色（マス・凡例・判定の文） */
.mt-v-go { background: #f0fdf4; border-color: #86efac; color: #14532d; }
.mt-v-talk { background: #fffbeb; border-color: #fcd34d; color: #78350f; }
.mt-v-no { background: #f8fafc; border-color: #cbd5e1; color: #334155; }
.mt-v-nomust { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }

/* 合い方の表 */
.mt-tool { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 10px; align-items: start; }
.mt-mcard, .mt-detail { padding: 12px 14px; min-width: 0; }
.mt-mx { min-width: 300px; }
.mt-mx th, .mt-mx td { padding: 5px 6px; text-align: center; vertical-align: middle; }
.mt-mx tbody th { text-align: left; white-space: nowrap; }
.mt-cell { appearance: none; font: inherit; width: 100%; min-width: 72px; border: 1px solid var(--line); border-radius: 10px; padding: 5px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.mt-cell b { font: 700 16px/1.2 var(--latin); }
.mt-cell small { font-size: 10.5px; font-weight: 700; line-height: 1.3; }
.mt-cell:hover { filter: brightness(.97); }
.mt-cell[aria-pressed="true"] { outline: 3px solid #0f172a; outline-offset: 1px; }
.mt-best { margin: 10px 0 0; font-size: 12.5px; color: var(--ink2); background: var(--line2); border-radius: 8px; padding: 7px 11px; line-height: 1.7; }
.mt-dtbl { font-size: 12.5px; }
.mt-dtbl th, .mt-dtbl td { padding: 5px 8px; }
.mt-dtbl tbody th { white-space: nowrap; font-weight: 700; }
.mt-dtbl tfoot th, .mt-dtbl tfoot td { border-top: 2px solid var(--line); font-size: 13.5px; }
.mt-dtbl tfoot b { font: 700 16px var(--latin); }
.mt-verdict { margin: 10px 0 0; font-size: 13px; border: 1px solid; border-radius: 8px; padding: 8px 11px; }
.mt-gh { margin-top: 12px; }
.mt-gaps { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; font-size: 12.5px; color: var(--ink2); }
.mt-warn { margin: 8px 0 0; font-size: 12.5px; color: #7f1d1d; background: #fef2f2; border-radius: 8px; padding: 6px 9px; }
.mt-fnote { margin: 8px 0 0; font-size: 12px; color: var(--muted); }

/* 残す形 */
.mt-tpls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 10px; }
.mt-tpl { padding: 12px 14px; min-width: 0; }
.mt-tplh { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.mt-tplh .mt-h4 { margin: 0; }
.mt-pre { margin: 0; background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: 10px 12px; font: 500 12px/1.6 var(--latin); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow-y: auto; }
.mt-ttbl { min-width: 1200px; }
.mt-ttbl th { white-space: nowrap; }
.mt-ttbl td { min-width: 6em; }

.mt-cell:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }

@media (max-width: 1100px) {
  .mt-tool { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .mt-lab { min-width: 0; width: 100%; }
  .mt-cell { min-width: 0; }
  .mt-mx th, .mt-mx td { padding: 4px 3px; }
}
