/* 現場のトラブル。style.css・flow.css・br.css の上に重ねる（接頭辞 tr-） */
.tr-h4 { margin: 0 0 8px; font-size: 14px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.tr-tips { margin-top: 12px; }
.tr-box { padding: 12px 14px; min-width: 0; margin-bottom: 4px; }
.tr-tbl { font-size: 12.5px; }
.tr-tbl th, .tr-tbl td { padding: 6px 8px; }
.tr-tbl tbody th { font-weight: 700; color: var(--ink); white-space: nowrap; }
.tr-tnote { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.tr-etbl { min-width: 900px; }
.tr-otbl { min-width: 980px; }
.tr-otbl td:nth-child(n+2):nth-child(-n+7) { font-family: var(--latin); white-space: nowrap; }

/* 練習 */
.tr-ctl { padding: 12px 14px; display: grid; gap: 8px; margin-bottom: 10px; }
.tr-qnote { margin: 0; font-size: 13px; color: var(--ink2); }
.tr-sum { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.tr-score { font-size: 13px; font-weight: 700; color: var(--ink); }
.tr-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.tr-quiz { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tr-q { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--paper); min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.tr-q.tr-q-best { border-color: #86efac; }
.tr-q.tr-q-mid { border-color: #fcd34d; }
.tr-q.tr-q-bad { border-color: #fca5a5; }
.tr-qh { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; font-size: 13.5px; }
.tr-qn { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--line2); color: var(--ink2); font: 600 11.5px/22px var(--latin); text-align: center; }
.tr-kind { font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 1px 8px; background: #eef2ff; color: #3730a3; }
.tr-qt { margin: 0; font-size: 13px; color: var(--ink2); }
.tr-opts { display: grid; gap: 6px; }
.tr-opt { appearance: none; font: inherit; font-size: 12.5px; text-align: left; line-height: 1.5; color: var(--ink); background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; cursor: pointer; }
.tr-opt:hover { border-color: #94a3b8; }
.tr-opt:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.tr-opt[aria-pressed="true"] { font-weight: 700; }
.tr-opt.tr-o-best { background: #f0fdf4; border-color: #16a34a; color: #14532d; }
.tr-opt.tr-o-mid { background: #fffbeb; border-color: #d97706; color: #78350f; }
.tr-opt.tr-o-bad { background: #fef2f2; border-color: #dc2626; color: #7f1d1d; }
.tr-ans { border-radius: 10px; padding: 8px 11px; font-size: 12.5px; color: var(--ink2); background: var(--line2); }
.tr-ans p { margin: 0 0 4px; }
.tr-ans p:last-child { margin-bottom: 0; }
.tr-ans.tr-a-best > p:first-child b { color: #166534; }
.tr-ans.tr-a-mid > p:first-child b { color: #92400e; }
.tr-ans.tr-a-bad > p:first-child b { color: #991b1b; }
.tr-ans .srcl { margin-top: 6px; }

/* 残す形 */
.tr-tpls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.tr-tpl { padding: 12px 14px; min-width: 0; }
.tr-tplh { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.tr-tplh .tr-h4 { margin: 0; }
.tr-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; }

@media (max-width: 760px) {
  .tr-quiz { grid-template-columns: minmax(0, 1fr); }
}
